From 64120216da3a049c237e22de46b47d72516ab74c Mon Sep 17 00:00:00 2001 From: Ian Jennings Date: Mon, 26 Mar 2018 23:30:01 -0500 Subject: [PATCH 1/4] update react example to use create-react-app --- javascript/chat.html | 2 +- package-lock.json | 5807 ---------------------------- react/.gitignore | 18 +- react/package.json | 12 +- react/public/favicon.ico | Bin 24838 -> 3870 bytes react/public/index.html | 19 +- react/public/manifest.json | 15 + react/src/index.js | 36 +- react/src/logo.svg | 7 + react/src/registerServiceWorker.js | 117 + 10 files changed, 195 insertions(+), 5838 deletions(-) delete mode 100644 package-lock.json create mode 100644 react/public/manifest.json create mode 100644 react/src/logo.svg create mode 100644 react/src/registerServiceWorker.js diff --git a/javascript/chat.html b/javascript/chat.html index 84bd038..fa272c8 100644 --- a/javascript/chat.html +++ b/javascript/chat.html @@ -33,7 +33,7 @@ - + diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index c17d02d..0000000 --- a/package-lock.json +++ /dev/null @@ -1,5807 +0,0 @@ -{ - "name": "chat-engine-examples", - "version": "0.0.1", - "lockfileVersion": 1, - "requires": true, - "dependencies": { - "agent-base": { - "version": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "semver": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz" - } - }, - "agentkeepalive": { - "version": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.3.0.tgz", - "integrity": "sha1-bV3lgpr9O+JxIgGjknX9EcZRhXw=", - "requires": { - "humanize-ms": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz" - } - }, - "ajv": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.3.0.tgz", - "integrity": "sha1-RBT/dKUIecII7l/cgm4ywwNUnto=", - "requires": { - "co": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "fast-deep-equal": "1.0.0", - "fast-json-stable-stringify": "2.0.0", - "json-schema-traverse": "0.3.1" - } - }, - "amdefine": { - "version": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "optional": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "requires": { - "sprintf-js": "1.0.3" - } - }, - "asap": { - "version": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", - "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" - }, - "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "ast-types": { - "version": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.12.tgz", - "integrity": "sha1-sTYwDWcCZiWuFTJpgsqZGOXbc8k=" - }, - "async": { - "version": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", - "integrity": "sha1-hDGQ/WtzV6C54clW7d3V7IRitU0=", - "requires": { - "lodash": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz" - } - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" - }, - "axios": { - "version": "0.16.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.16.2.tgz", - "integrity": "sha1-uk+S8XFn37q0CYN4VFS5rBScPG0=", - "requires": { - "follow-redirects": "1.2.5", - "is-buffer": "1.1.6" - } - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", - "optional": true, - "requires": { - "tweetnacl": "0.14.5" - } - }, - "boom": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", - "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", - "requires": { - "hoek": "4.2.0" - } - }, - "bytes": { - "version": "https://registry.npmjs.org/bytes/-/bytes-2.5.0.tgz", - "integrity": "sha1-TJQj6i0lLCcMQbK97+/5u2tiwGo=" - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "chat-engine": { - "version": "0.9.5", - "resolved": "https://registry.npmjs.org/chat-engine/-/chat-engine-0.9.5.tgz", - "integrity": "sha1-sBgy7nGkE9Cpm/2Davbw0sXw9Eo=", - "requires": { - "async": "2.6.0", - "axios": "0.16.2", - "eventemitter2": "2.2.2", - "pubnub": "4.20.2" - }, - "dependencies": { - "agent-base": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz", - "integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==", - "requires": { - "es6-promisify": "5.0.0" - } - }, - "agentkeepalive": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.4.1.tgz", - "integrity": "sha512-MPIwsZU9PP9kOrZpyu2042kYA8Fdt/AedQYkYXucHgF9QoD9dXVp0ypuGnHXSR0hTstBxdt85Xkh4JolYfK5wg==", - "requires": { - "humanize-ms": "1.2.1" - } - }, - "ast-types": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.11.3.tgz", - "integrity": "sha512-XA5o5dsNw8MhyW0Q7MWXJWc4oOzZKbdsEJq45h7c8q/d9DwWZ5F2ugUc1PuMLPGsUnphCt/cNDHu8JeBbxf1qA==" - }, - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", - "requires": { - "lodash": "4.17.5" - } - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "requires": { - "delayed-stream": "1.0.0" - } - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" - }, - "cookiejar": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", - "integrity": "sha1-Qa1XsbVVlR7BcUEqgZQrHoIA00o=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "data-uri-to-buffer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", - "integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==" - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "degenerator": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", - "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", - "requires": { - "ast-types": "0.11.3", - "escodegen": "1.9.1", - "esprima": "3.1.3" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" - }, - "es6-promise": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", - "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==" - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "requires": { - "es6-promise": "4.2.4" - } - }, - "escodegen": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", - "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", - "requires": { - "esprima": "3.1.3", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "optionator": "0.8.2", - "source-map": "0.6.1" - } - }, - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "eventemitter2": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-2.2.2.tgz", - "integrity": "sha1-QH6nHCAgzVdTggOrfnpr3Pt2ktU=" - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.6", - "mime-types": "2.1.18" - } - }, - "formidable": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", - "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==" - }, - "ftp": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", - "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", - "requires": { - "readable-stream": "1.1.14", - "xregexp": "2.0.0" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - }, - "get-uri": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.1.tgz", - "integrity": "sha512-7aelVrYqCLuVjq2kEKRTH8fXPTC0xKTkM+G7UlFkEwCXY3sFbSxvY375JoFowOAYbkaU47SrBvOefUlLZZ+6QA==", - "requires": { - "data-uri-to-buffer": "1.2.0", - "debug": "2.6.9", - "extend": "3.0.1", - "file-uri-to-path": "1.0.0", - "ftp": "0.3.10", - "readable-stream": "2.3.5" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", - "requires": { - "depd": "1.1.1", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": "1.4.0" - } - }, - "http-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz", - "integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "https-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", - "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", - "requires": { - "ms": "2.1.1" - } - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" - } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "requires": { - "mime-db": "1.33.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - }, - "netmask": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", - "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=" - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" - } - }, - "pac-proxy-agent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-2.0.0.tgz", - "integrity": "sha512-t57UiJpi5mFLTvjheC1SNSwIhml3+ElNOj69iRrydtQXZJr8VIFYSDtyPi/3ZysA62kD2dmww6pDlzk0VaONZg==", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "get-uri": "2.0.1", - "http-proxy-agent": "1.0.0", - "https-proxy-agent": "1.0.0", - "pac-resolver": "3.0.0", - "raw-body": "2.3.2", - "socks-proxy-agent": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "pac-resolver": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz", - "integrity": "sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA==", - "requires": { - "co": "4.6.0", - "degenerator": "1.0.4", - "ip": "1.1.5", - "netmask": "1.0.6", - "thunkify": "2.1.2" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "proxy-agent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.2.0.tgz", - "integrity": "sha512-cmWjNB7/5pVrYAFAt+6ppLyUAWd4LhWw47hkUISXHAieM5jT2PWjhh1dbpHUEX3lJhWjAqdNGrW8RnUFfLCU9w==", - "requires": { - "agent-base": "4.2.0", - "debug": "2.6.9", - "http-proxy-agent": "1.0.0", - "https-proxy-agent": "1.0.0", - "lru-cache": "2.7.3", - "pac-proxy-agent": "2.0.0", - "socks-proxy-agent": "3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "pubnub": { - "version": "4.20.2", - "resolved": "https://registry.npmjs.org/pubnub/-/pubnub-4.20.2.tgz", - "integrity": "sha512-oItfZqV+ixr7W97URhdVxvNjoEcoOg8t5AGM6RtG0UxAGSAIU//m3i92g27/9A40SPE5GxGSwtNBiSP4oizWgw==", - "requires": { - "agentkeepalive": "3.4.1", - "lil-uuid": "0.1.1", - "superagent": "3.8.2", - "superagent-proxy": "1.0.3" - } - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - }, - "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" - } - }, - "readable-stream": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", - "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "semver": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", - "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=" - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" - }, - "smart-buffer": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", - "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=" - }, - "socks": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", - "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", - "requires": { - "ip": "1.1.5", - "smart-buffer": "1.1.15" - } - }, - "socks-proxy-agent": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz", - "integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==", - "requires": { - "agent-base": "4.2.0", - "socks": "1.1.10" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "superagent": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", - "integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", - "requires": { - "component-emitter": "1.2.1", - "cookiejar": "2.1.1", - "debug": "3.1.0", - "extend": "3.0.1", - "form-data": "2.3.2", - "formidable": "1.2.1", - "methods": "1.1.2", - "mime": "1.6.0", - "qs": "6.5.1", - "readable-stream": "2.3.5" - } - }, - "superagent-proxy": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/superagent-proxy/-/superagent-proxy-1.0.3.tgz", - "integrity": "sha512-79Ujg1lRL2ICfuHUdX+H2MjIw73kB7bXsIkxLwHURz3j0XUmEEEoJ+u/wq+mKwna21Uejsm2cGR3OESA00TIjA==", - "requires": { - "debug": "3.1.0", - "proxy-agent": "2.2.0" - } - }, - "thunkify": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", - "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=" - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "1.1.2" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - }, - "xregexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", - "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=" - } - } - }, - "chat-engine-desktop-notifications": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/chat-engine-desktop-notifications/-/chat-engine-desktop-notifications-0.0.4.tgz", - "integrity": "sha1-pAB77o7BaWuiefPQ3bF5GYx+Xls=", - "requires": { - "chat-engine": "0.5.2" - }, - "dependencies": { - "agent-base": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz", - "integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==", - "requires": { - "es6-promisify": "5.0.0" - } - }, - "agentkeepalive": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.4.1.tgz", - "integrity": "sha512-MPIwsZU9PP9kOrZpyu2042kYA8Fdt/AedQYkYXucHgF9QoD9dXVp0ypuGnHXSR0hTstBxdt85Xkh4JolYfK5wg==", - "requires": { - "humanize-ms": "1.2.1" - } - }, - "ast-types": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.11.3.tgz", - "integrity": "sha512-XA5o5dsNw8MhyW0Q7MWXJWc4oOzZKbdsEJq45h7c8q/d9DwWZ5F2ugUc1PuMLPGsUnphCt/cNDHu8JeBbxf1qA==" - }, - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", - "requires": { - "lodash": "4.17.5" - } - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" - }, - "chat-engine": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/chat-engine/-/chat-engine-0.5.2.tgz", - "integrity": "sha1-OEIc7mEMLuIP4LrTCNhATAXG0lI=", - "requires": { - "async": "2.6.0", - "axios": "0.16.2", - "eventemitter2": "2.2.2", - "pubnub": "4.20.2", - "request": "2.83.0" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "requires": { - "delayed-stream": "1.0.0" - } - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" - }, - "cookiejar": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", - "integrity": "sha1-Qa1XsbVVlR7BcUEqgZQrHoIA00o=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "data-uri-to-buffer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", - "integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==" - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "degenerator": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", - "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", - "requires": { - "ast-types": "0.11.3", - "escodegen": "1.9.1", - "esprima": "3.1.3" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" - }, - "es6-promise": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", - "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==" - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "requires": { - "es6-promise": "4.2.4" - } - }, - "escodegen": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", - "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", - "requires": { - "esprima": "3.1.3", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "optionator": "0.8.2", - "source-map": "0.6.1" - } - }, - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "eventemitter2": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-2.2.2.tgz", - "integrity": "sha1-QH6nHCAgzVdTggOrfnpr3Pt2ktU=" - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.6", - "mime-types": "2.1.18" - } - }, - "formidable": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", - "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==" - }, - "ftp": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", - "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", - "requires": { - "readable-stream": "1.1.14", - "xregexp": "2.0.0" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - }, - "get-uri": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.1.tgz", - "integrity": "sha512-7aelVrYqCLuVjq2kEKRTH8fXPTC0xKTkM+G7UlFkEwCXY3sFbSxvY375JoFowOAYbkaU47SrBvOefUlLZZ+6QA==", - "requires": { - "data-uri-to-buffer": "1.2.0", - "debug": "2.6.9", - "extend": "3.0.1", - "file-uri-to-path": "1.0.0", - "ftp": "0.3.10", - "readable-stream": "2.3.5" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", - "requires": { - "depd": "1.1.1", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": "1.4.0" - } - }, - "http-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz", - "integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "https-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", - "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", - "requires": { - "ms": "2.1.1" - } - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" - } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "requires": { - "mime-db": "1.33.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - }, - "netmask": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", - "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=" - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" - } - }, - "pac-proxy-agent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-2.0.0.tgz", - "integrity": "sha512-t57UiJpi5mFLTvjheC1SNSwIhml3+ElNOj69iRrydtQXZJr8VIFYSDtyPi/3ZysA62kD2dmww6pDlzk0VaONZg==", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "get-uri": "2.0.1", - "http-proxy-agent": "1.0.0", - "https-proxy-agent": "1.0.0", - "pac-resolver": "3.0.0", - "raw-body": "2.3.2", - "socks-proxy-agent": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "pac-resolver": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz", - "integrity": "sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA==", - "requires": { - "co": "4.6.0", - "degenerator": "1.0.4", - "ip": "1.1.5", - "netmask": "1.0.6", - "thunkify": "2.1.2" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "proxy-agent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.2.0.tgz", - "integrity": "sha512-cmWjNB7/5pVrYAFAt+6ppLyUAWd4LhWw47hkUISXHAieM5jT2PWjhh1dbpHUEX3lJhWjAqdNGrW8RnUFfLCU9w==", - "requires": { - "agent-base": "4.2.0", - "debug": "2.6.9", - "http-proxy-agent": "1.0.0", - "https-proxy-agent": "1.0.0", - "lru-cache": "2.7.3", - "pac-proxy-agent": "2.0.0", - "socks-proxy-agent": "3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "pubnub": { - "version": "4.20.2", - "resolved": "https://registry.npmjs.org/pubnub/-/pubnub-4.20.2.tgz", - "integrity": "sha512-oItfZqV+ixr7W97URhdVxvNjoEcoOg8t5AGM6RtG0UxAGSAIU//m3i92g27/9A40SPE5GxGSwtNBiSP4oizWgw==", - "requires": { - "agentkeepalive": "3.4.1", - "lil-uuid": "0.1.1", - "superagent": "3.8.2", - "superagent-proxy": "1.0.3" - } - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - }, - "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" - } - }, - "readable-stream": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", - "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "semver": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", - "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=" - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" - }, - "smart-buffer": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", - "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=" - }, - "socks": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", - "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", - "requires": { - "ip": "1.1.5", - "smart-buffer": "1.1.15" - } - }, - "socks-proxy-agent": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz", - "integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==", - "requires": { - "agent-base": "4.2.0", - "socks": "1.1.10" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "superagent": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", - "integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", - "requires": { - "component-emitter": "1.2.1", - "cookiejar": "2.1.1", - "debug": "3.1.0", - "extend": "3.0.1", - "form-data": "2.3.2", - "formidable": "1.2.1", - "methods": "1.1.2", - "mime": "1.6.0", - "qs": "6.5.1", - "readable-stream": "2.3.5" - } - }, - "superagent-proxy": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/superagent-proxy/-/superagent-proxy-1.0.3.tgz", - "integrity": "sha512-79Ujg1lRL2ICfuHUdX+H2MjIw73kB7bXsIkxLwHURz3j0XUmEEEoJ+u/wq+mKwna21Uejsm2cGR3OESA00TIjA==", - "requires": { - "debug": "3.1.0", - "proxy-agent": "2.2.0" - } - }, - "thunkify": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", - "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=" - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "1.1.2" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - }, - "xregexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", - "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=" - } - } - }, - "chat-engine-emoji": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/chat-engine-emoji/-/chat-engine-emoji-0.0.7.tgz", - "integrity": "sha512-hJA2fI8JmxNu2ihBMY0zJoi9oLlp4vtz7Vx/7BQNAnSn1hC+9NMkndqmSSG6Wp7Aq69GVIt9PqWVGS8teuKinw==", - "requires": { - "chat-engine": "0.5.2", - "dotty": "0.0.2" - }, - "dependencies": { - "agent-base": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz", - "integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==", - "requires": { - "es6-promisify": "5.0.0" - } - }, - "agentkeepalive": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.4.1.tgz", - "integrity": "sha512-MPIwsZU9PP9kOrZpyu2042kYA8Fdt/AedQYkYXucHgF9QoD9dXVp0ypuGnHXSR0hTstBxdt85Xkh4JolYfK5wg==", - "requires": { - "humanize-ms": "1.2.1" - } - }, - "ast-types": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.11.3.tgz", - "integrity": "sha512-XA5o5dsNw8MhyW0Q7MWXJWc4oOzZKbdsEJq45h7c8q/d9DwWZ5F2ugUc1PuMLPGsUnphCt/cNDHu8JeBbxf1qA==" - }, - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", - "requires": { - "lodash": "4.17.5" - } - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" - }, - "chat-engine": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/chat-engine/-/chat-engine-0.5.2.tgz", - "integrity": "sha1-OEIc7mEMLuIP4LrTCNhATAXG0lI=", - "requires": { - "async": "2.6.0", - "axios": "0.16.2", - "eventemitter2": "2.2.2", - "pubnub": "4.20.2", - "request": "2.83.0" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "requires": { - "delayed-stream": "1.0.0" - } - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" - }, - "cookiejar": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", - "integrity": "sha1-Qa1XsbVVlR7BcUEqgZQrHoIA00o=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "data-uri-to-buffer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", - "integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==" - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "degenerator": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", - "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", - "requires": { - "ast-types": "0.11.3", - "escodegen": "1.9.1", - "esprima": "3.1.3" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" - }, - "dotty": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/dotty/-/dotty-0.0.2.tgz", - "integrity": "sha1-4d6NRiZ7YvreErW1jCHKUUxKeqE=" - }, - "es6-promise": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", - "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==" - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "requires": { - "es6-promise": "4.2.4" - } - }, - "escodegen": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", - "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", - "requires": { - "esprima": "3.1.3", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "optionator": "0.8.2", - "source-map": "0.6.1" - } - }, - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "eventemitter2": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-2.2.2.tgz", - "integrity": "sha1-QH6nHCAgzVdTggOrfnpr3Pt2ktU=" - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.6", - "mime-types": "2.1.18" - } - }, - "formidable": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", - "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==" - }, - "ftp": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", - "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", - "requires": { - "readable-stream": "1.1.14", - "xregexp": "2.0.0" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - }, - "get-uri": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.1.tgz", - "integrity": "sha512-7aelVrYqCLuVjq2kEKRTH8fXPTC0xKTkM+G7UlFkEwCXY3sFbSxvY375JoFowOAYbkaU47SrBvOefUlLZZ+6QA==", - "requires": { - "data-uri-to-buffer": "1.2.0", - "debug": "2.6.9", - "extend": "3.0.1", - "file-uri-to-path": "1.0.0", - "ftp": "0.3.10", - "readable-stream": "2.3.5" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", - "requires": { - "depd": "1.1.1", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": "1.4.0" - } - }, - "http-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz", - "integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "https-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", - "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", - "requires": { - "ms": "2.1.1" - } - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" - } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "requires": { - "mime-db": "1.33.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - }, - "netmask": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", - "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=" - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" - } - }, - "pac-proxy-agent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-2.0.0.tgz", - "integrity": "sha512-t57UiJpi5mFLTvjheC1SNSwIhml3+ElNOj69iRrydtQXZJr8VIFYSDtyPi/3ZysA62kD2dmww6pDlzk0VaONZg==", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "get-uri": "2.0.1", - "http-proxy-agent": "1.0.0", - "https-proxy-agent": "1.0.0", - "pac-resolver": "3.0.0", - "raw-body": "2.3.2", - "socks-proxy-agent": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "pac-resolver": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz", - "integrity": "sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA==", - "requires": { - "co": "4.6.0", - "degenerator": "1.0.4", - "ip": "1.1.5", - "netmask": "1.0.6", - "thunkify": "2.1.2" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "proxy-agent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.2.0.tgz", - "integrity": "sha512-cmWjNB7/5pVrYAFAt+6ppLyUAWd4LhWw47hkUISXHAieM5jT2PWjhh1dbpHUEX3lJhWjAqdNGrW8RnUFfLCU9w==", - "requires": { - "agent-base": "4.2.0", - "debug": "2.6.9", - "http-proxy-agent": "1.0.0", - "https-proxy-agent": "1.0.0", - "lru-cache": "2.7.3", - "pac-proxy-agent": "2.0.0", - "socks-proxy-agent": "3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "pubnub": { - "version": "4.20.2", - "resolved": "https://registry.npmjs.org/pubnub/-/pubnub-4.20.2.tgz", - "integrity": "sha512-oItfZqV+ixr7W97URhdVxvNjoEcoOg8t5AGM6RtG0UxAGSAIU//m3i92g27/9A40SPE5GxGSwtNBiSP4oizWgw==", - "requires": { - "agentkeepalive": "3.4.1", - "lil-uuid": "0.1.1", - "superagent": "3.8.2", - "superagent-proxy": "1.0.3" - } - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - }, - "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" - } - }, - "readable-stream": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", - "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "semver": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", - "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=" - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" - }, - "smart-buffer": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", - "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=" - }, - "socks": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", - "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", - "requires": { - "ip": "1.1.5", - "smart-buffer": "1.1.15" - } - }, - "socks-proxy-agent": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz", - "integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==", - "requires": { - "agent-base": "4.2.0", - "socks": "1.1.10" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "superagent": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", - "integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", - "requires": { - "component-emitter": "1.2.1", - "cookiejar": "2.1.1", - "debug": "3.1.0", - "extend": "3.0.1", - "form-data": "2.3.2", - "formidable": "1.2.1", - "methods": "1.1.2", - "mime": "1.6.0", - "qs": "6.5.1", - "readable-stream": "2.3.5" - } - }, - "superagent-proxy": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/superagent-proxy/-/superagent-proxy-1.0.3.tgz", - "integrity": "sha512-79Ujg1lRL2ICfuHUdX+H2MjIw73kB7bXsIkxLwHURz3j0XUmEEEoJ+u/wq+mKwna21Uejsm2cGR3OESA00TIjA==", - "requires": { - "debug": "3.1.0", - "proxy-agent": "2.2.0" - } - }, - "thunkify": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", - "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=" - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "1.1.2" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - }, - "xregexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", - "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=" - } - } - }, - "chat-engine-markdown": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/chat-engine-markdown/-/chat-engine-markdown-0.0.8.tgz", - "integrity": "sha512-WdsB+d6lzvfDC1W9bnXYCvJ0NOyenfxN6gyYXVkVfVDvY+xBvN0wNhvCNnOtbpDmJH509kjDV3asoGLWUWT9Yg==", - "requires": { - "chat-engine": "0.8.4", - "dotty": "0.0.2", - "markdown-it": "8.4.1" - }, - "dependencies": { - "agent-base": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz", - "integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==", - "requires": { - "es6-promisify": "5.0.0" - } - }, - "agentkeepalive": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.4.1.tgz", - "integrity": "sha512-MPIwsZU9PP9kOrZpyu2042kYA8Fdt/AedQYkYXucHgF9QoD9dXVp0ypuGnHXSR0hTstBxdt85Xkh4JolYfK5wg==", - "requires": { - "humanize-ms": "1.2.1" - } - }, - "ast-types": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.11.3.tgz", - "integrity": "sha512-XA5o5dsNw8MhyW0Q7MWXJWc4oOzZKbdsEJq45h7c8q/d9DwWZ5F2ugUc1PuMLPGsUnphCt/cNDHu8JeBbxf1qA==" - }, - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", - "requires": { - "lodash": "4.17.5" - } - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" - }, - "chat-engine": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/chat-engine/-/chat-engine-0.8.4.tgz", - "integrity": "sha1-gV2KArouEDckZ6YdkGlv18SM2PY=", - "requires": { - "async": "2.6.0", - "axios": "0.16.2", - "eventemitter2": "2.2.2", - "pubnub": "4.20.2" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "requires": { - "delayed-stream": "1.0.0" - } - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" - }, - "cookiejar": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", - "integrity": "sha1-Qa1XsbVVlR7BcUEqgZQrHoIA00o=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "data-uri-to-buffer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", - "integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==" - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "degenerator": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", - "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", - "requires": { - "ast-types": "0.11.3", - "escodegen": "1.9.1", - "esprima": "3.1.3" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" - }, - "dotty": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/dotty/-/dotty-0.0.2.tgz", - "integrity": "sha1-4d6NRiZ7YvreErW1jCHKUUxKeqE=" - }, - "es6-promise": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", - "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==" - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "requires": { - "es6-promise": "4.2.4" - } - }, - "escodegen": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", - "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", - "requires": { - "esprima": "3.1.3", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "optionator": "0.8.2", - "source-map": "0.6.1" - } - }, - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "eventemitter2": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-2.2.2.tgz", - "integrity": "sha1-QH6nHCAgzVdTggOrfnpr3Pt2ktU=" - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.6", - "mime-types": "2.1.18" - } - }, - "formidable": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", - "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==" - }, - "ftp": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", - "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", - "requires": { - "readable-stream": "1.1.14", - "xregexp": "2.0.0" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - }, - "get-uri": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.1.tgz", - "integrity": "sha512-7aelVrYqCLuVjq2kEKRTH8fXPTC0xKTkM+G7UlFkEwCXY3sFbSxvY375JoFowOAYbkaU47SrBvOefUlLZZ+6QA==", - "requires": { - "data-uri-to-buffer": "1.2.0", - "debug": "2.6.9", - "extend": "3.0.1", - "file-uri-to-path": "1.0.0", - "ftp": "0.3.10", - "readable-stream": "2.3.5" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", - "requires": { - "depd": "1.1.1", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": "1.4.0" - } - }, - "http-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz", - "integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "https-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", - "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", - "requires": { - "ms": "2.1.1" - } - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" - } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "requires": { - "mime-db": "1.33.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - }, - "netmask": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", - "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=" - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" - } - }, - "pac-proxy-agent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-2.0.0.tgz", - "integrity": "sha512-t57UiJpi5mFLTvjheC1SNSwIhml3+ElNOj69iRrydtQXZJr8VIFYSDtyPi/3ZysA62kD2dmww6pDlzk0VaONZg==", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "get-uri": "2.0.1", - "http-proxy-agent": "1.0.0", - "https-proxy-agent": "1.0.0", - "pac-resolver": "3.0.0", - "raw-body": "2.3.2", - "socks-proxy-agent": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "pac-resolver": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz", - "integrity": "sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA==", - "requires": { - "co": "4.6.0", - "degenerator": "1.0.4", - "ip": "1.1.5", - "netmask": "1.0.6", - "thunkify": "2.1.2" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "proxy-agent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.2.0.tgz", - "integrity": "sha512-cmWjNB7/5pVrYAFAt+6ppLyUAWd4LhWw47hkUISXHAieM5jT2PWjhh1dbpHUEX3lJhWjAqdNGrW8RnUFfLCU9w==", - "requires": { - "agent-base": "4.2.0", - "debug": "2.6.9", - "http-proxy-agent": "1.0.0", - "https-proxy-agent": "1.0.0", - "lru-cache": "2.7.3", - "pac-proxy-agent": "2.0.0", - "socks-proxy-agent": "3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "pubnub": { - "version": "4.20.2", - "resolved": "https://registry.npmjs.org/pubnub/-/pubnub-4.20.2.tgz", - "integrity": "sha512-oItfZqV+ixr7W97URhdVxvNjoEcoOg8t5AGM6RtG0UxAGSAIU//m3i92g27/9A40SPE5GxGSwtNBiSP4oizWgw==", - "requires": { - "agentkeepalive": "3.4.1", - "lil-uuid": "0.1.1", - "superagent": "3.8.2", - "superagent-proxy": "1.0.3" - } - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - }, - "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" - } - }, - "readable-stream": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", - "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "semver": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", - "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=" - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" - }, - "smart-buffer": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", - "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=" - }, - "socks": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", - "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", - "requires": { - "ip": "1.1.5", - "smart-buffer": "1.1.15" - } - }, - "socks-proxy-agent": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz", - "integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==", - "requires": { - "agent-base": "4.2.0", - "socks": "1.1.10" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "superagent": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", - "integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", - "requires": { - "component-emitter": "1.2.1", - "cookiejar": "2.1.1", - "debug": "3.1.0", - "extend": "3.0.1", - "form-data": "2.3.2", - "formidable": "1.2.1", - "methods": "1.1.2", - "mime": "1.6.0", - "qs": "6.5.1", - "readable-stream": "2.3.5" - } - }, - "superagent-proxy": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/superagent-proxy/-/superagent-proxy-1.0.3.tgz", - "integrity": "sha512-79Ujg1lRL2ICfuHUdX+H2MjIw73kB7bXsIkxLwHURz3j0XUmEEEoJ+u/wq+mKwna21Uejsm2cGR3OESA00TIjA==", - "requires": { - "debug": "3.1.0", - "proxy-agent": "2.2.0" - } - }, - "thunkify": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", - "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=" - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "1.1.2" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - }, - "xregexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", - "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=" - } - } - }, - "chat-engine-online-user-search": { - "version": "https://registry.npmjs.org/chat-engine-online-user-search/-/chat-engine-online-user-search-0.0.7.tgz", - "integrity": "sha1-W55qxzcFaz6qF3qEb4pSQ6dB2qM=", - "requires": { - "chat-engine": "0.5.2", - "dotty": "https://registry.npmjs.org/dotty/-/dotty-0.0.2.tgz" - }, - "dependencies": { - "chat-engine": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/chat-engine/-/chat-engine-0.5.2.tgz", - "integrity": "sha1-OEIc7mEMLuIP4LrTCNhATAXG0lI=", - "requires": { - "async": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", - "axios": "0.16.2", - "eventemitter2": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-2.2.2.tgz", - "pubnub": "https://registry.npmjs.org/pubnub/-/pubnub-4.15.1.tgz", - "request": "2.83.0" - } - } - } - }, - "chat-engine-random-username": { - "version": "https://registry.npmjs.org/chat-engine-random-username/-/chat-engine-random-username-0.0.4.tgz", - "integrity": "sha1-bYy2vC33poviBu2eW0js0FRIXiI=", - "requires": { - "chat-engine": "0.5.2" - }, - "dependencies": { - "chat-engine": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/chat-engine/-/chat-engine-0.5.2.tgz", - "integrity": "sha1-OEIc7mEMLuIP4LrTCNhATAXG0lI=", - "requires": { - "async": "https://registry.npmjs.org/async/-/async-2.5.0.tgz", - "axios": "0.16.2", - "eventemitter2": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-2.2.2.tgz", - "pubnub": "https://registry.npmjs.org/pubnub/-/pubnub-4.15.1.tgz", - "request": "2.83.0" - } - } - } - }, - "chat-engine-typing-indicator": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/chat-engine-typing-indicator/-/chat-engine-typing-indicator-0.0.9.tgz", - "integrity": "sha512-Xf6kIf9ZzhTZVBaeJ5iVJK8rSnHQSrNg/raH54Nt+Jkxrph4xAyqQRw0+8a+GHkVb8kNVK7UABfUYz0YInDF4Q==", - "requires": { - "chat-engine": "0.8.4" - }, - "dependencies": { - "agent-base": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz", - "integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==", - "requires": { - "es6-promisify": "5.0.0" - } - }, - "agentkeepalive": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.4.1.tgz", - "integrity": "sha512-MPIwsZU9PP9kOrZpyu2042kYA8Fdt/AedQYkYXucHgF9QoD9dXVp0ypuGnHXSR0hTstBxdt85Xkh4JolYfK5wg==", - "requires": { - "humanize-ms": "1.2.1" - } - }, - "ast-types": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.11.3.tgz", - "integrity": "sha512-XA5o5dsNw8MhyW0Q7MWXJWc4oOzZKbdsEJq45h7c8q/d9DwWZ5F2ugUc1PuMLPGsUnphCt/cNDHu8JeBbxf1qA==" - }, - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", - "requires": { - "lodash": "4.17.5" - } - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" - }, - "chat-engine": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/chat-engine/-/chat-engine-0.8.4.tgz", - "integrity": "sha1-gV2KArouEDckZ6YdkGlv18SM2PY=", - "requires": { - "async": "2.6.0", - "axios": "0.16.2", - "eventemitter2": "2.2.2", - "pubnub": "4.20.2" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "requires": { - "delayed-stream": "1.0.0" - } - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" - }, - "cookiejar": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", - "integrity": "sha1-Qa1XsbVVlR7BcUEqgZQrHoIA00o=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "data-uri-to-buffer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", - "integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==" - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "degenerator": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", - "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", - "requires": { - "ast-types": "0.11.3", - "escodegen": "1.9.1", - "esprima": "3.1.3" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" - }, - "es6-promise": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", - "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==" - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "requires": { - "es6-promise": "4.2.4" - } - }, - "escodegen": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", - "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", - "requires": { - "esprima": "3.1.3", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "optionator": "0.8.2", - "source-map": "0.6.1" - } - }, - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "eventemitter2": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-2.2.2.tgz", - "integrity": "sha1-QH6nHCAgzVdTggOrfnpr3Pt2ktU=" - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.6", - "mime-types": "2.1.18" - } - }, - "formidable": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", - "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==" - }, - "ftp": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", - "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", - "requires": { - "readable-stream": "1.1.14", - "xregexp": "2.0.0" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - }, - "get-uri": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.1.tgz", - "integrity": "sha512-7aelVrYqCLuVjq2kEKRTH8fXPTC0xKTkM+G7UlFkEwCXY3sFbSxvY375JoFowOAYbkaU47SrBvOefUlLZZ+6QA==", - "requires": { - "data-uri-to-buffer": "1.2.0", - "debug": "2.6.9", - "extend": "3.0.1", - "file-uri-to-path": "1.0.0", - "ftp": "0.3.10", - "readable-stream": "2.3.5" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", - "requires": { - "depd": "1.1.1", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": "1.4.0" - } - }, - "http-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz", - "integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "https-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", - "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", - "requires": { - "ms": "2.1.1" - } - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" - } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "requires": { - "mime-db": "1.33.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - }, - "netmask": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", - "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=" - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" - } - }, - "pac-proxy-agent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-2.0.0.tgz", - "integrity": "sha512-t57UiJpi5mFLTvjheC1SNSwIhml3+ElNOj69iRrydtQXZJr8VIFYSDtyPi/3ZysA62kD2dmww6pDlzk0VaONZg==", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "get-uri": "2.0.1", - "http-proxy-agent": "1.0.0", - "https-proxy-agent": "1.0.0", - "pac-resolver": "3.0.0", - "raw-body": "2.3.2", - "socks-proxy-agent": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "pac-resolver": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz", - "integrity": "sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA==", - "requires": { - "co": "4.6.0", - "degenerator": "1.0.4", - "ip": "1.1.5", - "netmask": "1.0.6", - "thunkify": "2.1.2" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "proxy-agent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.2.0.tgz", - "integrity": "sha512-cmWjNB7/5pVrYAFAt+6ppLyUAWd4LhWw47hkUISXHAieM5jT2PWjhh1dbpHUEX3lJhWjAqdNGrW8RnUFfLCU9w==", - "requires": { - "agent-base": "4.2.0", - "debug": "2.6.9", - "http-proxy-agent": "1.0.0", - "https-proxy-agent": "1.0.0", - "lru-cache": "2.7.3", - "pac-proxy-agent": "2.0.0", - "socks-proxy-agent": "3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "pubnub": { - "version": "4.20.2", - "resolved": "https://registry.npmjs.org/pubnub/-/pubnub-4.20.2.tgz", - "integrity": "sha512-oItfZqV+ixr7W97URhdVxvNjoEcoOg8t5AGM6RtG0UxAGSAIU//m3i92g27/9A40SPE5GxGSwtNBiSP4oizWgw==", - "requires": { - "agentkeepalive": "3.4.1", - "lil-uuid": "0.1.1", - "superagent": "3.8.2", - "superagent-proxy": "1.0.3" - } - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - }, - "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" - } - }, - "readable-stream": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", - "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "semver": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", - "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=" - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" - }, - "smart-buffer": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", - "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=" - }, - "socks": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", - "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", - "requires": { - "ip": "1.1.5", - "smart-buffer": "1.1.15" - } - }, - "socks-proxy-agent": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz", - "integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==", - "requires": { - "agent-base": "4.2.0", - "socks": "1.1.10" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "superagent": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", - "integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", - "requires": { - "component-emitter": "1.2.1", - "cookiejar": "2.1.1", - "debug": "3.1.0", - "extend": "3.0.1", - "form-data": "2.3.2", - "formidable": "1.2.1", - "methods": "1.1.2", - "mime": "1.6.0", - "qs": "6.5.1", - "readable-stream": "2.3.5" - } - }, - "superagent-proxy": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/superagent-proxy/-/superagent-proxy-1.0.3.tgz", - "integrity": "sha512-79Ujg1lRL2ICfuHUdX+H2MjIw73kB7bXsIkxLwHURz3j0XUmEEEoJ+u/wq+mKwna21Uejsm2cGR3OESA00TIjA==", - "requires": { - "debug": "3.1.0", - "proxy-agent": "2.2.0" - } - }, - "thunkify": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", - "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=" - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "1.1.2" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - }, - "xregexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", - "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=" - } - } - }, - "chat-engine-unread-messages": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/chat-engine-unread-messages/-/chat-engine-unread-messages-0.0.8.tgz", - "integrity": "sha512-xftoPIvR5zVQy2n7MEO5BBjGwRo0EqSfZmiJMmqNMDgjFR/VsBVTU1C4B/SLnUl6mKoUX6sL5sLZ5s1F/gvoZw==", - "requires": { - "chat-engine": "0.8.4" - }, - "dependencies": { - "agent-base": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.0.tgz", - "integrity": "sha512-c+R/U5X+2zz2+UCrCFv6odQzJdoqI+YecuhnAJLa1zYaMc13zPfwMwZrr91Pd1DYNo/yPRbiM4WVf9whgwFsIg==", - "requires": { - "es6-promisify": "5.0.0" - } - }, - "agentkeepalive": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.4.1.tgz", - "integrity": "sha512-MPIwsZU9PP9kOrZpyu2042kYA8Fdt/AedQYkYXucHgF9QoD9dXVp0ypuGnHXSR0hTstBxdt85Xkh4JolYfK5wg==", - "requires": { - "humanize-ms": "1.2.1" - } - }, - "ast-types": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.11.3.tgz", - "integrity": "sha512-XA5o5dsNw8MhyW0Q7MWXJWc4oOzZKbdsEJq45h7c8q/d9DwWZ5F2ugUc1PuMLPGsUnphCt/cNDHu8JeBbxf1qA==" - }, - "async": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz", - "integrity": "sha512-xAfGg1/NTLBBKlHFmnd7PlmUW9KhVQIUuSrYem9xzFUZy13ScvtyGGejaae9iAVRiRq9+Cx7DPFaAAhCpyxyPw==", - "requires": { - "lodash": "4.17.5" - } - }, - "bytes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", - "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" - }, - "chat-engine": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/chat-engine/-/chat-engine-0.8.4.tgz", - "integrity": "sha1-gV2KArouEDckZ6YdkGlv18SM2PY=", - "requires": { - "async": "2.6.0", - "axios": "0.16.2", - "eventemitter2": "2.2.2", - "pubnub": "4.20.2" - } - }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", - "requires": { - "delayed-stream": "1.0.0" - } - }, - "component-emitter": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" - }, - "cookiejar": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", - "integrity": "sha1-Qa1XsbVVlR7BcUEqgZQrHoIA00o=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "data-uri-to-buffer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", - "integrity": "sha512-vKQ9DTQPN1FLYiiEEOQ6IBGFqvjCa5rSK3cWMy/Nespm5d/x3dGFT9UBZnkLxCwua/IXBi2TYnwTEpsOvhC4UQ==" - }, - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - }, - "dependencies": { - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "deep-is": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "degenerator": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", - "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", - "requires": { - "ast-types": "0.11.3", - "escodegen": "1.9.1", - "esprima": "3.1.3" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "depd": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", - "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" - }, - "es6-promise": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", - "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==" - }, - "es6-promisify": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "requires": { - "es6-promise": "4.2.4" - } - }, - "escodegen": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.9.1.tgz", - "integrity": "sha512-6hTjO1NAWkHnDk3OqQ4YrCuwwmGHL9S3nPlzBOUG/R44rda3wLNrfvQ5fkSGjyhHFKM7ALPKcKGrwvCLe0lC7Q==", - "requires": { - "esprima": "3.1.3", - "estraverse": "4.2.0", - "esutils": "2.0.2", - "optionator": "0.8.2", - "source-map": "0.6.1" - } - }, - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" - }, - "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=" - }, - "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "eventemitter2": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-2.2.2.tgz", - "integrity": "sha1-QH6nHCAgzVdTggOrfnpr3Pt2ktU=" - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, - "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", - "requires": { - "asynckit": "0.4.0", - "combined-stream": "1.0.6", - "mime-types": "2.1.18" - } - }, - "formidable": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.1.tgz", - "integrity": "sha512-Fs9VRguL0gqGHkXS5GQiMCr1VhZBxz0JnJs4JmMp/2jL18Fmbzvv7vOFRU+U8TBkHEE/CX1qDXzJplVULgsLeg==" - }, - "ftp": { - "version": "0.3.10", - "resolved": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", - "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", - "requires": { - "readable-stream": "1.1.14", - "xregexp": "2.0.0" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "0.0.1", - "string_decoder": "0.10.31" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - }, - "get-uri": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.1.tgz", - "integrity": "sha512-7aelVrYqCLuVjq2kEKRTH8fXPTC0xKTkM+G7UlFkEwCXY3sFbSxvY375JoFowOAYbkaU47SrBvOefUlLZZ+6QA==", - "requires": { - "data-uri-to-buffer": "1.2.0", - "debug": "2.6.9", - "extend": "3.0.1", - "file-uri-to-path": "1.0.0", - "ftp": "0.3.10", - "readable-stream": "2.3.5" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "http-errors": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", - "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", - "requires": { - "depd": "1.1.1", - "inherits": "2.0.3", - "setprototypeof": "1.0.3", - "statuses": "1.4.0" - } - }, - "http-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz", - "integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "https-proxy-agent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", - "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "extend": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", - "requires": { - "ms": "2.1.1" - } - }, - "iconv-lite": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", - "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "1.1.2", - "type-check": "0.3.2" - } - }, - "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==" - }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=" - }, - "methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" - }, - "mime-db": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", - "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" - }, - "mime-types": { - "version": "2.1.18", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", - "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", - "requires": { - "mime-db": "1.33.0" - } - }, - "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" - }, - "netmask": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", - "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=" - }, - "optionator": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "requires": { - "deep-is": "0.1.3", - "fast-levenshtein": "2.0.6", - "levn": "0.3.0", - "prelude-ls": "1.1.2", - "type-check": "0.3.2", - "wordwrap": "1.0.0" - } - }, - "pac-proxy-agent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-2.0.0.tgz", - "integrity": "sha512-t57UiJpi5mFLTvjheC1SNSwIhml3+ElNOj69iRrydtQXZJr8VIFYSDtyPi/3ZysA62kD2dmww6pDlzk0VaONZg==", - "requires": { - "agent-base": "2.1.1", - "debug": "2.6.9", - "get-uri": "2.0.1", - "http-proxy-agent": "1.0.0", - "https-proxy-agent": "1.0.0", - "pac-resolver": "3.0.0", - "raw-body": "2.3.2", - "socks-proxy-agent": "3.0.1" - }, - "dependencies": { - "agent-base": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "integrity": "sha1-1t4Q1a9hMtW9aSQn1G/FOFOQlMc=", - "requires": { - "extend": "3.0.1", - "semver": "5.0.3" - } - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "pac-resolver": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz", - "integrity": "sha512-tcc38bsjuE3XZ5+4vP96OfhOugrX+JcnpUbhfuc4LuXBLQhoTthOstZeoQJBDnQUDYzYmdImKsbz0xSl1/9qeA==", - "requires": { - "co": "4.6.0", - "degenerator": "1.0.4", - "ip": "1.1.5", - "netmask": "1.0.6", - "thunkify": "2.1.2" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "proxy-agent": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.2.0.tgz", - "integrity": "sha512-cmWjNB7/5pVrYAFAt+6ppLyUAWd4LhWw47hkUISXHAieM5jT2PWjhh1dbpHUEX3lJhWjAqdNGrW8RnUFfLCU9w==", - "requires": { - "agent-base": "4.2.0", - "debug": "2.6.9", - "http-proxy-agent": "1.0.0", - "https-proxy-agent": "1.0.0", - "lru-cache": "2.7.3", - "pac-proxy-agent": "2.0.0", - "socks-proxy-agent": "3.0.1" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } - }, - "pubnub": { - "version": "4.20.2", - "resolved": "https://registry.npmjs.org/pubnub/-/pubnub-4.20.2.tgz", - "integrity": "sha512-oItfZqV+ixr7W97URhdVxvNjoEcoOg8t5AGM6RtG0UxAGSAIU//m3i92g27/9A40SPE5GxGSwtNBiSP4oizWgw==", - "requires": { - "agentkeepalive": "3.4.1", - "lil-uuid": "0.1.1", - "superagent": "3.8.2", - "superagent-proxy": "1.0.3" - } - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - }, - "raw-body": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", - "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", - "requires": { - "bytes": "3.0.0", - "http-errors": "1.6.2", - "iconv-lite": "0.4.19", - "unpipe": "1.0.0" - } - }, - "readable-stream": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", - "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "semver": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", - "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=" - }, - "setprototypeof": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" - }, - "smart-buffer": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", - "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=" - }, - "socks": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", - "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", - "requires": { - "ip": "1.1.5", - "smart-buffer": "1.1.15" - } - }, - "socks-proxy-agent": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz", - "integrity": "sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA==", - "requires": { - "agent-base": "4.2.0", - "socks": "1.1.10" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true - }, - "statuses": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", - "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "superagent": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", - "integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", - "requires": { - "component-emitter": "1.2.1", - "cookiejar": "2.1.1", - "debug": "3.1.0", - "extend": "3.0.1", - "form-data": "2.3.2", - "formidable": "1.2.1", - "methods": "1.1.2", - "mime": "1.6.0", - "qs": "6.5.1", - "readable-stream": "2.3.5" - } - }, - "superagent-proxy": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/superagent-proxy/-/superagent-proxy-1.0.3.tgz", - "integrity": "sha512-79Ujg1lRL2ICfuHUdX+H2MjIw73kB7bXsIkxLwHURz3j0XUmEEEoJ+u/wq+mKwna21Uejsm2cGR3OESA00TIjA==", - "requires": { - "debug": "3.1.0", - "proxy-agent": "2.2.0" - } - }, - "thunkify": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", - "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=" - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "1.1.2" - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - }, - "xregexp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", - "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=" - } - } - }, - "co": { - "version": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, - "combined-stream": { - "version": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "integrity": "sha1-k4NwpXtKUd6ix3wV1cX9+JUWQAk=", - "requires": { - "delayed-stream": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" - } - }, - "component-emitter": { - "version": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" - }, - "cookiejar": { - "version": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", - "integrity": "sha1-Qa1XsbVVlR7BcUEqgZQrHoIA00o=" - }, - "core-js": { - "version": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", - "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=" - }, - "core-util-is": { - "version": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "cryptiles": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", - "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", - "requires": { - "boom": "5.2.0" - }, - "dependencies": { - "boom": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", - "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", - "requires": { - "hoek": "4.2.0" - } - } - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "1.0.0" - } - }, - "data-uri-to-buffer": { - "version": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", - "integrity": "sha1-dxY+qcINhkG0cH6PGKvfmnjzSDU=" - }, - "debug": { - "version": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "integrity": "sha1-5zFTHKLt4n0YgiJCfaF4IdaP9Pw=", - "requires": { - "ms": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" - } - }, - "deep-is": { - "version": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=" - }, - "degenerator": { - "version": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", - "integrity": "sha1-/PSQo37OJmRk2cxDGrmMWBnO0JU=", - "requires": { - "ast-types": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.12.tgz", - "escodegen": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "esprima": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz" - } - }, - "delayed-stream": { - "version": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "depd": { - "version": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", - "integrity": "sha1-4b2Cxqq2ztlluXuIsX7T5SjKGMM=" - }, - "dotty": { - "version": "https://registry.npmjs.org/dotty/-/dotty-0.0.2.tgz", - "integrity": "sha1-4d6NRiZ7YvreErW1jCHKUUxKeqE=" - }, - "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "optional": true, - "requires": { - "jsbn": "0.1.1" - } - }, - "encoding": { - "version": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", - "requires": { - "iconv-lite": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz" - } - }, - "entities": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.1.tgz", - "integrity": "sha1-blwtClYhtdra7O+AuQ7ftc13cvA=" - }, - "es6-promise": { - "version": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz", - "integrity": "sha1-iBHpCRXZoNujYnTwskLb2nj5ySo=" - }, - "es6-promisify": { - "version": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz", - "integrity": "sha1-UQnWLz5W6pZ8S2NQWu8IKRyKUgM=", - "requires": { - "es6-promise": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.1.1.tgz" - } - }, - "escodegen": { - "version": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", - "requires": { - "esprima": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "estraverse": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "esutils": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "optionator": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "source-map": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz" - }, - "dependencies": { - "esprima": { - "version": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=" - } - } - }, - "esprima": { - "version": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" - }, - "estraverse": { - "version": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=" - }, - "esutils": { - "version": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=" - }, - "eventemitter2": { - "version": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-2.2.2.tgz", - "integrity": "sha1-QH6nHCAgzVdTggOrfnpr3Pt2ktU=" - }, - "extend": { - "version": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "fast-deep-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", - "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" - }, - "fast-json-stable-stringify": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" - }, - "fast-levenshtein": { - "version": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=" - }, - "fbjs": { - "version": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.14.tgz", - "integrity": "sha1-0dviviVMNakeCfMfnNUKQLKg7Rw=", - "requires": { - "core-js": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", - "isomorphic-fetch": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", - "loose-envify": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "object-assign": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "promise": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "setimmediate": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "ua-parser-js": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.14.tgz" - } - }, - "file-uri-to-path": { - "version": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha1-VTp7hEb/b2hDWcRF8eN6BdrMM90=" - }, - "follow-redirects": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.2.5.tgz", - "integrity": "sha512-lMhwQTryFbG+wYsAIEKC1Kf5IGDlVNnONRogIBllh7LLoV7pNIxW0z9fhjRar9NBql+hd2Y49KboVVNxf6GEfg==", - "requires": { - "debug": "2.6.9" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "requires": { - "ms": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" - } - } - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc4.tgz", - "integrity": "sha1-BaxrwiIntD5EYfSIFhVUaZ1Pi14=", - "requires": { - "async": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "combined-stream": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "mime-types": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz" - }, - "dependencies": { - "async": { - "version": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" - } - } - }, - "formidable": { - "version": "https://registry.npmjs.org/formidable/-/formidable-1.1.1.tgz", - "integrity": "sha1-lriIb3w8NQi5Mta9cMTTqI818ak=" - }, - "ftp": { - "version": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", - "integrity": "sha1-kZfYYa2BQvPmPVqDv+TFn3MwiF0=", - "requires": { - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "xregexp": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz" - }, - "dependencies": { - "isarray": { - "version": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, - "readable-stream": { - "version": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "requires": { - "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "isarray": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "string_decoder": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" - } - }, - "string_decoder": { - "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" - } - } - }, - "get-uri": { - "version": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.1.tgz", - "integrity": "sha1-29ysrNjGCKODFoaTaBF2l6FjHFk=", - "requires": { - "data-uri-to-buffer": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-1.2.0.tgz", - "debug": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "file-uri-to-path": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "ftp": "https://registry.npmjs.org/ftp/-/ftp-0.3.10.tgz", - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" - } - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "1.0.0" - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", - "requires": { - "ajv": "5.3.0", - "har-schema": "2.0.0" - } - }, - "hawk": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", - "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", - "requires": { - "boom": "4.3.1", - "cryptiles": "3.1.2", - "hoek": "4.2.0", - "sntp": "2.1.0" - } - }, - "hoek": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.0.tgz", - "integrity": "sha512-v0XCLxICi9nPfYrS9RL8HbYnXi9obYAeLbSP00BmnZwCK9+Ih9WOjoZ8YoHCoav2csqn4FOz4Orldsy2dmDwmQ==" - }, - "http-errors": { - "version": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz", - "integrity": "sha1-X4uO2YrKVFZWv1cplzh/kEpyIlc=", - "requires": { - "depd": "https://registry.npmjs.org/depd/-/depd-1.1.0.tgz", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "setprototypeof": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "statuses": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz" - } - }, - "http-proxy-agent": { - "version": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz", - "integrity": "sha1-zBzjjkU7+YSg93AtLdWcc9CBKEo=", - "requires": { - "agent-base": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "debug": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "1.0.0", - "jsprim": "1.4.1", - "sshpk": "1.13.1" - } - }, - "https-proxy-agent": { - "version": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", - "integrity": "sha1-NffabEjOTdv6JkiRrFk+5f+GceY=", - "requires": { - "agent-base": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "debug": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz" - } - }, - "humanize-ms": { - "version": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha1-xG4xWaKT9riW2ikxbYtv6Lt5u+0=", - "requires": { - "ms": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" - } - }, - "iconv-lite": { - "version": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz", - "integrity": "sha1-I9hlaxaq5nQqwpcy6o8DNqR4nPI=" - }, - "inherits": { - "version": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "ip": { - "version": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=" - }, - "is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" - }, - "is-stream": { - "version": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "isarray": { - "version": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "isomorphic-fetch": { - "version": "https://registry.npmjs.org/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz", - "integrity": "sha1-YRrhrPFPXoH3KVB0coGf6XM1WKk=", - "requires": { - "node-fetch": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.2.tgz", - "whatwg-fetch": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz" - } - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "js-tokens": { - "version": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=" - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "levn": { - "version": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "type-check": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz" - } - }, - "lil-uuid": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/lil-uuid/-/lil-uuid-0.1.1.tgz", - "integrity": "sha1-+e3PI/AOQr9D8PhD2Y2LU/M0HxY=" - }, - "linkify-it": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.0.3.tgz", - "integrity": "sha1-2UpGSPmxwXnWT6lykSaL22zpQ08=", - "requires": { - "uc.micro": "1.0.5" - } - }, - "lodash": { - "version": "https://registry.npmjs.org/lodash/-/lodash-4.17.4.tgz", - "integrity": "sha1-eCA6TRwyiuHYbcpkYONptX9AVa4=" - }, - "loose-envify": { - "version": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "integrity": "sha1-0aitM/qc4OcT1l/dCsi3SNR4yEg=", - "requires": { - "js-tokens": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz" - } - }, - "lru-cache": { - "version": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz", - "integrity": "sha1-5W1jVBSO3o13B7WNFDIg/QjfD9U=" - }, - "markdown-it": { - "version": "8.4.1", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.1.tgz", - "integrity": "sha512-CzzqSSNkFRUf9vlWvhK1awpJreMRqdCrBvZ8DIoDWTOkESMIF741UPAhuAmbyWmdiFPA6WARNhnu2M6Nrhwa+A==", - "requires": { - "argparse": "1.0.10", - "entities": "1.1.1", - "linkify-it": "2.0.3", - "mdurl": "1.0.1", - "uc.micro": "1.0.5" - } - }, - "mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" - }, - "methods": { - "version": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" - }, - "mime": { - "version": "https://registry.npmjs.org/mime/-/mime-1.3.6.tgz", - "integrity": "sha1-WR2E02U6awtKO5343lqoEI5y5eA=" - }, - "mime-db": { - "version": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz", - "integrity": "sha1-SNJtI1WJZRcErFkWygYAGRQmaHg=" - }, - "mime-types": { - "version": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.16.tgz", - "integrity": "sha1-K4WKUuXs1RbbiXrCvodIeDBpjiM=", - "requires": { - "mime-db": "https://registry.npmjs.org/mime-db/-/mime-db-1.29.0.tgz" - } - }, - "ms": { - "version": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "netmask": { - "version": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", - "integrity": "sha1-ICl+idhvb2QA8lDZ9Pa0wZRfzTU=" - }, - "node-fetch": { - "version": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.2.tgz", - "integrity": "sha1-xU6arFfkModSM1JfPIkcQVn/79c=", - "requires": { - "encoding": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "is-stream": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz" - } - }, - "node-libs-react-native": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/node-libs-react-native/-/node-libs-react-native-1.0.2.tgz", - "integrity": "sha512-nbnRJADhGYR7b7QPJmdx+XWraoyw8NbrMbtyynNAbwTLIs4IVaoHplicORi0o1BHfoqzI8iAwIPxYx3EwBt3sg==", - "requires": { - "assert": "1.4.1", - "browserify-zlib": "0.2.0", - "buffer": "5.1.0", - "console-browserify": "1.1.0", - "constants-browserify": "1.0.0", - "domain-browser": "1.2.0", - "events": "1.1.1", - "https-browserify": "1.0.0", - "os-browserify": "0.3.0", - "path-browserify": "0.0.0", - "process": "0.11.10", - "punycode": "2.1.0", - "querystring-es3": "0.2.1", - "react-native-crypto": "2.1.2", - "react-native-randombytes": "2.3.0", - "readable-stream": "2.3.5", - "stream-http": "2.8.1", - "string_decoder": "1.1.0", - "timers-browserify": "2.0.6", - "tty-browserify": "0.0.0", - "url": "0.11.0", - "util": "0.10.3" - }, - "dependencies": { - "asn1.js": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", - "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", - "requires": { - "bn.js": "4.11.8", - "inherits": "2.0.1", - "minimalistic-assert": "1.0.0" - } - }, - "assert": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.4.1.tgz", - "integrity": "sha1-mZEtWRg2tab1s0XA8H7vwI/GXZE=", - "requires": { - "util": "0.10.3" - } - }, - "base64-js": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.2.3.tgz", - "integrity": "sha512-MsAhsUW1GxCdgYSO6tAfZrNapmUKk7mWx/k5mFY/A1gBtkaCaNapTg+FExCw1r9yeaZhqx/xPg43xgTFH6KL5w==" - }, - "bn.js": { - "version": "4.11.8", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", - "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" - }, - "browserify-aes": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.1.tgz", - "integrity": "sha512-UGnTYAnB2a3YuYKIRy1/4FB2HdM866E0qC46JXvVTYKlBlZlnvfpSfY6OKfXZAkv70eJ2a1SqzpAo5CRhZGDFg==", - "requires": { - "buffer-xor": "1.0.3", - "cipher-base": "1.0.4", - "create-hash": "1.1.3", - "evp_bytestokey": "1.0.3", - "inherits": "2.0.1", - "safe-buffer": "5.1.1" - } - }, - "browserify-cipher": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", - "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", - "requires": { - "browserify-aes": "1.1.1", - "browserify-des": "1.0.0", - "evp_bytestokey": "1.0.3" - } - }, - "browserify-des": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", - "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", - "requires": { - "cipher-base": "1.0.4", - "des.js": "1.0.0", - "inherits": "2.0.1" - } - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "requires": { - "bn.js": "4.11.8", - "randombytes": "2.0.6" - } - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "elliptic": "6.4.0", - "inherits": "2.0.1", - "parse-asn1": "5.1.0" - } - }, - "browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "requires": { - "pako": "1.0.6" - } - }, - "buffer": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.1.0.tgz", - "integrity": "sha512-YkIRgwsZwJWTnyQrsBTWefizHh+8GYj3kbL1BTiAQ/9pwpino0G7B2gp5tx/FUBqUlvtxV85KNR3mwfAtv15Yw==", - "requires": { - "base64-js": "1.2.3", - "ieee754": "1.1.10" - } - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=" - }, - "builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=" - }, - "cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "requires": { - "inherits": "2.0.1", - "safe-buffer": "5.1.1" - } - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "requires": { - "date-now": "0.1.4" - } - }, - "constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "create-ecdh": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", - "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", - "requires": { - "bn.js": "4.11.8", - "elliptic": "6.4.0" - } - }, - "create-hash": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", - "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", - "requires": { - "cipher-base": "1.0.4", - "inherits": "2.0.1", - "ripemd160": "2.0.1", - "sha.js": "2.4.11" - } - }, - "create-hmac": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz", - "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", - "requires": { - "cipher-base": "1.0.4", - "create-hash": "1.1.3", - "inherits": "2.0.1", - "ripemd160": "2.0.1", - "safe-buffer": "5.1.1", - "sha.js": "2.4.11" - } - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=" - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "requires": { - "inherits": "2.0.1", - "minimalistic-assert": "1.0.0" - } - }, - "diffie-hellman": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", - "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", - "requires": { - "bn.js": "4.11.8", - "miller-rabin": "4.0.1", - "randombytes": "2.0.6" - } - }, - "domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" - }, - "elliptic": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", - "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", - "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0", - "hash.js": "1.1.3", - "hmac-drbg": "1.0.1", - "inherits": "2.0.1", - "minimalistic-assert": "1.0.0", - "minimalistic-crypto-utils": "1.0.1" - } - }, - "events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=" - }, - "evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "requires": { - "md5.js": "1.3.4", - "safe-buffer": "5.1.1" - } - }, - "hash-base": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", - "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", - "requires": { - "inherits": "2.0.1" - } - }, - "hash.js": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.3.tgz", - "integrity": "sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA==", - "requires": { - "inherits": "2.0.3", - "minimalistic-assert": "1.0.0" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } - } - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "requires": { - "hash.js": "1.1.3", - "minimalistic-assert": "1.0.0", - "minimalistic-crypto-utils": "1.0.1" - } - }, - "https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=" - }, - "ieee754": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.10.tgz", - "integrity": "sha512-byWFX8OyW/qeVxcY21r6Ncxl0ZYHgnf0cPup2h34eHXrCJbOp7IuqnJ4Q0omfyWl6Z++BTI6bByf31pZt7iRLg==" - }, - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=" - }, - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" - }, - "md5.js": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", - "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", - "requires": { - "hash-base": "3.0.4", - "inherits": "2.0.1" - }, - "dependencies": { - "hash-base": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", - "integrity": "sha1-X8hoaEfs1zSZQDMZprCj8/auSRg=", - "requires": { - "inherits": "2.0.1", - "safe-buffer": "5.1.1" - } - } - } - }, - "miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "requires": { - "bn.js": "4.11.8", - "brorand": "1.1.0" - } - }, - "minimalistic-assert": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", - "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=" - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" - }, - "os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=" - }, - "pako": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.6.tgz", - "integrity": "sha512-lQe48YPsMJAig+yngZ87Lus+NF+3mtu7DVOBu6b/gHO1YpKwIj5AWjZ/TOS7i46HD/UixzWb1zeWDZfGZ3iYcg==" - }, - "parse-asn1": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz", - "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", - "requires": { - "asn1.js": "4.10.1", - "browserify-aes": "1.1.1", - "create-hash": "1.1.3", - "evp_bytestokey": "1.0.3", - "pbkdf2": "3.0.8" - } - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=" - }, - "pbkdf2": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.8.tgz", - "integrity": "sha1-L4q/FuvsyCJ3lF10irodeHYfYeI=", - "requires": { - "create-hmac": "1.1.6" - } - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=" - }, - "process-nextick-args": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", - "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" - }, - "public-encrypt": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", - "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", - "requires": { - "bn.js": "4.11.8", - "browserify-rsa": "4.0.1", - "create-hash": "1.1.3", - "parse-asn1": "5.1.0", - "randombytes": "2.0.6" - } - }, - "punycode": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", - "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=" - }, - "randombytes": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.6.tgz", - "integrity": "sha512-CIQ5OFxf4Jou6uOKe9t1AOgqpeU5fd70A8NPdHSGeYXqXsPe6peOwI0cUl88RWZ6sP1vPMV3avd/R6cZ5/sP1A==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "react-native-crypto": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/react-native-crypto/-/react-native-crypto-2.1.2.tgz", - "integrity": "sha1-z+aMrVHNH3OkICt6wWT5bBFEyyo=", - "requires": { - "browserify-cipher": "1.0.0", - "browserify-sign": "4.0.4", - "create-ecdh": "4.0.0", - "create-hash": "1.1.3", - "create-hmac": "1.1.6", - "diffie-hellman": "5.0.2", - "inherits": "2.0.1", - "pbkdf2": "3.0.8", - "public-encrypt": "4.0.0" - } - }, - "react-native-randombytes": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/react-native-randombytes/-/react-native-randombytes-2.3.0.tgz", - "integrity": "sha1-Ptb4pKgDxFPXh5YQR/ayZQ18czU=", - "requires": { - "buffer": "4.9.1", - "sjcl": "1.0.7" - }, - "dependencies": { - "buffer": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", - "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", - "requires": { - "base64-js": "1.2.3", - "ieee754": "1.1.10", - "isarray": "1.0.0" - } - } - } - }, - "readable-stream": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.5.tgz", - "integrity": "sha512-tK0yDhrkygt/knjowCUiWP9YdV7c5R+8cR0r/kt9ZhBU906Fs6RpQJCEilamRJj1Nx2rWI6LkW9gKqjTkshhEw==", - "requires": { - "core-util-is": "1.0.2", - "inherits": "2.0.3", - "isarray": "1.0.0", - "process-nextick-args": "2.0.0", - "safe-buffer": "5.1.1", - "string_decoder": "1.0.3", - "util-deprecate": "1.0.2" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - }, - "string_decoder": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", - "requires": { - "safe-buffer": "5.1.1" - } - } - } - }, - "ripemd160": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", - "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", - "requires": { - "hash-base": "2.0.2", - "inherits": "2.0.1" - } - }, - "safe-buffer": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" - }, - "setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - }, - "sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "requires": { - "inherits": "2.0.1", - "safe-buffer": "5.1.1" - } - }, - "sjcl": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/sjcl/-/sjcl-1.0.7.tgz", - "integrity": "sha1-MrNlpQ3Ju6JriLo8nfjqNCF9n0U=" - }, - "stream-http": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.1.tgz", - "integrity": "sha512-cQ0jo17BLca2r0GfRdZKYAGLU6JRoIWxqSOakUMuKOT6MOK7AAlE856L33QuDmAy/eeOrhLee3dZKX0Uadu93A==", - "requires": { - "builtin-status-codes": "3.0.0", - "inherits": "2.0.1", - "readable-stream": "2.3.5", - "to-arraybuffer": "1.0.1", - "xtend": "4.0.1" - } - }, - "string_decoder": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.0.tgz", - "integrity": "sha512-8zQpRF6juocE69ae7CSPmYEGJe4VCXwP6S6dxUWI7i53Gwv54/ec41fiUA+X7BPGGv7fRSQJjBQVa0gomGaOgg==", - "requires": { - "safe-buffer": "5.1.1" - } - }, - "timers-browserify": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.6.tgz", - "integrity": "sha512-HQ3nbYRAowdVd0ckGFvmJPPCOH/CHleFN/Y0YQCX1DVaB7t+KFvisuyN09fuP8Jtp1CpfSh8O8bMkHbdbPe6Pw==", - "requires": { - "setimmediate": "1.0.5" - } - }, - "to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=" - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=" - }, - "url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "requires": { - "punycode": "1.3.2", - "querystring": "0.2.0" - }, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" - } - } - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "requires": { - "inherits": "2.0.1" - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" - } - } - }, - "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" - }, - "object-assign": { - "version": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" - }, - "optionator": { - "version": "https://registry.npmjs.org/optionator/-/optionator-0.8.2.tgz", - "integrity": "sha1-NkxeQJ0/TWMB1sC0wFu6UBgK62Q=", - "requires": { - "deep-is": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", - "fast-levenshtein": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "levn": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "prelude-ls": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "type-check": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "wordwrap": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" - } - }, - "pac-proxy-agent": { - "version": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-2.0.0.tgz", - "integrity": "sha1-vrF80rBqILN51X4bLiwpvg3+X5o=", - "requires": { - "agent-base": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "debug": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "get-uri": "https://registry.npmjs.org/get-uri/-/get-uri-2.0.1.tgz", - "http-proxy-agent": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz", - "https-proxy-agent": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", - "pac-resolver": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz", - "raw-body": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.0.tgz", - "socks-proxy-agent": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.0.tgz" - }, - "dependencies": { - "socks-proxy-agent": { - "version": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-3.0.0.tgz", - "integrity": "sha1-6iMIXNK96U0ISmJEjzETnKftYkU=", - "requires": { - "agent-base": "https://registry.npmjs.org/agent-base/-/agent-base-4.1.1.tgz", - "socks": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz" - }, - "dependencies": { - "agent-base": { - "version": "https://registry.npmjs.org/agent-base/-/agent-base-4.1.1.tgz", - "integrity": "sha1-ktik/CUko7CbNmajO2yXlg8j1qQ=", - "requires": { - "es6-promisify": "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz" - } - } - } - } - } - }, - "pac-resolver": { - "version": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-3.0.0.tgz", - "integrity": "sha1-auoweH2wqJFwTet4AKcip2FabyY=", - "requires": { - "co": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "degenerator": "https://registry.npmjs.org/degenerator/-/degenerator-1.0.4.tgz", - "ip": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "netmask": "https://registry.npmjs.org/netmask/-/netmask-1.0.6.tgz", - "thunkify": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz" - } - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "prelude-ls": { - "version": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "process-nextick-args": { - "version": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" - }, - "promise": { - "version": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha1-BktyYCsY+Q8pGSuLG8QY/9Hr078=", - "requires": { - "asap": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz" - } - }, - "proxy-agent": { - "version": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.1.0.tgz", - "integrity": "sha1-o6Kzhm3r/rebt5HzRdybyHbn/4Y=", - "requires": { - "agent-base": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "debug": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "http-proxy-agent": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-1.0.0.tgz", - "https-proxy-agent": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-1.0.0.tgz", - "lru-cache": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.6.5.tgz", - "pac-proxy-agent": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-2.0.0.tgz", - "socks-proxy-agent": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-2.1.1.tgz" - } - }, - "pubnub": { - "version": "https://registry.npmjs.org/pubnub/-/pubnub-4.15.1.tgz", - "integrity": "sha1-pRhdQqbIhgdGoZa0eEMCcD1632k=", - "requires": { - "agentkeepalive": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.3.0.tgz", - "superagent": "https://registry.npmjs.org/superagent/-/superagent-2.3.0.tgz", - "superagent-proxy": "https://registry.npmjs.org/superagent-proxy/-/superagent-proxy-1.0.2.tgz", - "uuid": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz" - } - }, - "qs": { - "version": "https://registry.npmjs.org/qs/-/qs-6.5.0.tgz", - "integrity": "sha1-jQSVTTZN7z78VbWgeT4eLIsebkk=" - }, - "raw-body": { - "version": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.0.tgz", - "integrity": "sha1-95zhrKyrpbY2LTNFTXhdcSn0vGc=", - "requires": { - "bytes": "https://registry.npmjs.org/bytes/-/bytes-2.5.0.tgz", - "http-errors": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.1.tgz", - "iconv-lite": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz", - "unpipe": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" - } - }, - "react": { - "version": "https://registry.npmjs.org/react/-/react-15.4.2.tgz", - "integrity": "sha1-QfeZGyYYU5K6m66WyIiefgGDl+8=", - "requires": { - "fbjs": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.14.tgz", - "loose-envify": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "object-assign": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" - } - }, - "react-dom": { - "version": "https://registry.npmjs.org/react-dom/-/react-dom-15.4.2.tgz", - "integrity": "sha1-AVNj8FsKH9Uq6e/dOgBg2QaVII8=", - "requires": { - "fbjs": "https://registry.npmjs.org/fbjs/-/fbjs-0.8.14.tgz", - "loose-envify": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.3.1.tgz", - "object-assign": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" - } - }, - "readable-stream": { - "version": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz", - "integrity": "sha1-No8lEtefnUb9/HE0mueHi7weuVw=", - "requires": { - "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "inherits": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "isarray": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "process-nextick-args": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "string_decoder": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "util-deprecate": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - } - }, - "request": { - "version": "2.83.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", - "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", - "requires": { - "aws-sign2": "0.7.0", - "aws4": "1.6.0", - "caseless": "0.12.0", - "combined-stream": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "forever-agent": "0.6.1", - "form-data": "2.3.1", - "har-validator": "5.0.3", - "hawk": "6.0.2", - "http-signature": "1.2.0", - "is-typedarray": "1.0.0", - "isstream": "0.1.2", - "json-stringify-safe": "5.0.1", - "mime-types": "2.1.17", - "oauth-sign": "0.8.2", - "performance-now": "2.1.0", - "qs": "6.5.1", - "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "stringstream": "0.0.5", - "tough-cookie": "2.3.3", - "tunnel-agent": "0.6.0", - "uuid": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz" - }, - "dependencies": { - "form-data": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.1.tgz", - "integrity": "sha1-b7lPvXGIUwbXPRXMSX/kzE7NRL8=", - "requires": { - "asynckit": "0.4.0", - "combined-stream": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.5.tgz", - "mime-types": "2.1.17" - } - }, - "mime-db": { - "version": "1.30.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.30.0.tgz", - "integrity": "sha1-dMZD2i3Z1qRTmZY0ZbJtXKfXHwE=" - }, - "mime-types": { - "version": "2.1.17", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.17.tgz", - "integrity": "sha1-Cdejk/A+mVp5+K+Fe3Cp4KsWVXo=", - "requires": { - "mime-db": "1.30.0" - } - }, - "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" - } - } - }, - "safe-buffer": { - "version": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", - "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" - }, - "semver": { - "version": "https://registry.npmjs.org/semver/-/semver-5.0.3.tgz", - "integrity": "sha1-d0Zt5YnNXTyV8TiqeLxWmjy10no=" - }, - "setimmediate": { - "version": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=" - }, - "setprototypeof": { - "version": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", - "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" - }, - "smart-buffer": { - "version": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz", - "integrity": "sha1-fxFLW2X6s+KjWqd1uxLw0cZJvxY=" - }, - "sntp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", - "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", - "requires": { - "hoek": "4.2.0" - } - }, - "socks": { - "version": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz", - "integrity": "sha1-W4t/x8jzQcU+0FbpKbe/Tei6e1o=", - "requires": { - "ip": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "smart-buffer": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz" - } - }, - "socks-proxy-agent": { - "version": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-2.1.1.tgz", - "integrity": "sha1-huuwcZMlhjeHDhO3vZnybGY989M=", - "requires": { - "agent-base": "https://registry.npmjs.org/agent-base/-/agent-base-2.1.1.tgz", - "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "socks": "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz" - } - }, - "source-map": { - "version": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", - "optional": true, - "requires": { - "amdefine": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz" - } - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, - "sshpk": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", - "requires": { - "asn1": "0.2.3", - "assert-plus": "1.0.0", - "bcrypt-pbkdf": "1.0.1", - "dashdash": "1.14.1", - "ecc-jsbn": "0.1.1", - "getpass": "0.1.7", - "jsbn": "0.1.1", - "tweetnacl": "0.14.5" - } - }, - "statuses": { - "version": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", - "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" - }, - "string_decoder": { - "version": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", - "integrity": "sha1-D8Z9fBQYJd6UKC3VNr7GubzoYKs=", - "requires": { - "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" - } - }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" - }, - "superagent": { - "version": "https://registry.npmjs.org/superagent/-/superagent-2.3.0.tgz", - "integrity": "sha1-cDUpoHFOV+EjlZ3e+84ZOy5Q0RU=", - "requires": { - "component-emitter": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", - "cookiejar": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", - "debug": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "extend": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "form-data": "https://registry.npmjs.org/form-data/-/form-data-1.0.0-rc4.tgz", - "formidable": "https://registry.npmjs.org/formidable/-/formidable-1.1.1.tgz", - "methods": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "mime": "https://registry.npmjs.org/mime/-/mime-1.3.6.tgz", - "qs": "https://registry.npmjs.org/qs/-/qs-6.5.0.tgz", - "readable-stream": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.3.tgz" - } - }, - "superagent-proxy": { - "version": "https://registry.npmjs.org/superagent-proxy/-/superagent-proxy-1.0.2.tgz", - "integrity": "sha1-ktNmBXj2GO1DqCz4yseZ/ik4ui0=", - "requires": { - "debug": "https://registry.npmjs.org/debug/-/debug-2.6.8.tgz", - "proxy-agent": "https://registry.npmjs.org/proxy-agent/-/proxy-agent-2.1.0.tgz" - } - }, - "thunkify": { - "version": "https://registry.npmjs.org/thunkify/-/thunkify-2.1.2.tgz", - "integrity": "sha1-+qDp0jDFGsyVyhOjYawFyn4EVT0=" - }, - "tough-cookie": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", - "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", - "requires": { - "punycode": "1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - } - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true - }, - "type-check": { - "version": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz" - } - }, - "ua-parser-js": { - "version": "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.14.tgz", - "integrity": "sha1-EQ1T+kw/MmwSEpK76skE0uAzh8o=" - }, - "uc.micro": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.5.tgz", - "integrity": "sha512-JoLI4g5zv5qNyT09f4YAvEZIIV1oOjqnewYg5D38dkQljIzpPT296dbIGvKro3digYI1bkb7W6EP1y4uDlmzLg==" - }, - "unpipe": { - "version": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, - "util-deprecate": { - "version": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" - }, - "uuid": { - "version": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha1-PdPT55Crwk17DToDT/q6vijrvAQ=" - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "1.0.0", - "core-util-is": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "extsprintf": "1.3.0" - } - }, - "whatwg-fetch": { - "version": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz", - "integrity": "sha1-nITsLc9oGH/wC8ZOEnS0QhduHIQ=" - }, - "wordwrap": { - "version": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=" - }, - "xregexp": { - "version": "https://registry.npmjs.org/xregexp/-/xregexp-2.0.0.tgz", - "integrity": "sha1-UqY+VsoLhKfzpfPWGHLxJq16WUM=" - } - } -} diff --git a/react/.gitignore b/react/.gitignore index 6c96c5c..d30f40e 100644 --- a/react/.gitignore +++ b/react/.gitignore @@ -1,15 +1,21 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. +# See https://help.github.com/ignore-files/ for more about ignoring files. # dependencies -node_modules +/node_modules # testing -coverage +/coverage # production -build +/build # misc .DS_Store -.env -npm-debug.log +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/react/package.json b/react/package.json index e6a5f0d..874243a 100644 --- a/react/package.json +++ b/react/package.json @@ -1,17 +1,17 @@ { - "name": "react-example", + "name": "ce-app", "version": "0.1.0", "private": true, - "devDependencies": { - "react-scripts": "0.8.5" + "dependencies": { + "create-react-class": "^15.6.3", + "react": "^16.2.0", + "react-dom": "^16.2.0", + "react-scripts": "1.1.1" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", "eject": "react-scripts eject" - }, - "dependencies": { - "chat-engine": "^0.8.4" } } diff --git a/react/public/favicon.ico b/react/public/favicon.ico index 5c125de5d897c1ff5692a656485b3216123dcd89..a11777cc471a4344702741ab1c8a588998b1311a 100644 GIT binary patch literal 3870 zcma);c{J4h9>;%nil|2-o+rCuEF-(I%-F}ijC~o(k~HKAkr0)!FCj~d>`RtpD?8b; zXOC1OD!V*IsqUwzbMF1)-gEDD=A573Z-&G7^LoAC9|WO7Xc0Cx1g^Zu0u_SjAPB3vGa^W|sj)80f#V0@M_CAZTIO(t--xg= z!sii`1giyH7EKL_+Wi0ab<)&E_0KD!3Rp2^HNB*K2@PHCs4PWSA32*-^7d{9nH2_E zmC{C*N*)(vEF1_aMamw2A{ZH5aIDqiabnFdJ|y0%aS|64E$`s2ccV~3lR!u<){eS` z#^Mx6o(iP1Ix%4dv`t@!&Za-K@mTm#vadc{0aWDV*_%EiGK7qMC_(`exc>-$Gb9~W!w_^{*pYRm~G zBN{nA;cm^w$VWg1O^^<6vY`1XCD|s_zv*g*5&V#wv&s#h$xlUilPe4U@I&UXZbL z0)%9Uj&@yd03n;!7do+bfixH^FeZ-Ema}s;DQX2gY+7g0s(9;`8GyvPY1*vxiF&|w z>!vA~GA<~JUqH}d;DfBSi^IT*#lrzXl$fNpq0_T1tA+`A$1?(gLb?e#0>UELvljtQ zK+*74m0jn&)5yk8mLBv;=@}c{t0ztT<v;Avck$S6D`Z)^c0(jiwKhQsn|LDRY&w(Fmi91I7H6S;b0XM{e zXp0~(T@k_r-!jkLwd1_Vre^v$G4|kh4}=Gi?$AaJ)3I+^m|Zyj#*?Kp@w(lQdJZf4 z#|IJW5z+S^e9@(6hW6N~{pj8|NO*>1)E=%?nNUAkmv~OY&ZV;m-%?pQ_11)hAr0oAwILrlsGawpxx4D43J&K=n+p3WLnlDsQ$b(9+4 z?mO^hmV^F8MV{4Lx>(Q=aHhQ1){0d*(e&s%G=i5rq3;t{JC zmgbn5Nkl)t@fPH$v;af26lyhH!k+#}_&aBK4baYPbZy$5aFx4}ka&qxl z$=Rh$W;U)>-=S-0=?7FH9dUAd2(q#4TCAHky!$^~;Dz^j|8_wuKc*YzfdAht@Q&ror?91Dm!N03=4=O!a)I*0q~p0g$Fm$pmr$ zb;wD;STDIi$@M%y1>p&_>%?UP($15gou_ue1u0!4(%81;qcIW8NyxFEvXpiJ|H4wz z*mFT(qVx1FKufG11hByuX%lPk4t#WZ{>8ka2efjY`~;AL6vWyQKpJun2nRiZYDij$ zP>4jQXPaP$UC$yIVgGa)jDV;F0l^n(V=HMRB5)20V7&r$jmk{UUIe zVjKroK}JAbD>B`2cwNQ&GDLx8{pg`7hbA~grk|W6LgiZ`8y`{Iq0i>t!3p2}MS6S+ zO_ruKyAElt)rdS>CtF7j{&6rP-#c=7evGMt7B6`7HG|-(WL`bDUAjyn+k$mx$CH;q2Dz4x;cPP$hW=`pFfLO)!jaCL@V2+F)So3}vg|%O*^T1j>C2lx zsURO-zIJC$^$g2byVbRIo^w>UxK}74^TqUiRR#7s_X$e)$6iYG1(PcW7un-va-S&u zHk9-6Zn&>T==A)lM^D~bk{&rFzCi35>UR!ZjQkdSiNX*-;l4z9j*7|q`TBl~Au`5& z+c)*8?#-tgUR$Zd%Q3bs96w6k7q@#tUn`5rj+r@_sAVVLqco|6O{ILX&U-&-cbVa3 zY?ngHR@%l{;`ri%H*0EhBWrGjv!LE4db?HEWb5mu*t@{kv|XwK8?npOshmzf=vZA@ zVSN9sL~!sn?r(AK)Q7Jk2(|M67Uy3I{eRy z_l&Y@A>;vjkWN5I2xvFFTLX0i+`{qz7C_@bo`ZUzDugfq4+>a3?1v%)O+YTd6@Ul7 zAfLfm=nhZ`)P~&v90$&UcF+yXm9sq!qCx3^9gzIcO|Y(js^Fj)Rvq>nQAHI92ap=P z10A4@prk+AGWCb`2)dQYFuR$|H6iDE8p}9a?#nV2}LBCoCf(Xi2@szia7#gY>b|l!-U`c}@ zLdhvQjc!BdLJvYvzzzngnw51yRYCqh4}$oRCy-z|v3Hc*d|?^Wj=l~18*E~*cR_kU z{XsxM1i{V*4GujHQ3DBpl2w4FgFR48Nma@HPgnyKoIEY-MqmMeY=I<%oG~l!f<+FN z1ZY^;10j4M4#HYXP zw5eJpA_y(>uLQ~OucgxDLuf}fVs272FaMxhn4xnDGIyLXnw>Xsd^J8XhcWIwIoQ9} z%FoSJTAGW(SRGwJwb=@pY7r$uQRK3Zd~XbxU)ts!4XsJrCycrWSI?e!IqwqIR8+Jh zlRjZ`UO1I!BtJR_2~7AbkbSm%XQqxEPkz6BTGWx8e}nQ=w7bZ|eVP4?*Tb!$(R)iC z9)&%bS*u(lXqzitAN)Oo=&Ytn>%Hzjc<5liuPi>zC_nw;Z0AE3Y$Jao_Q90R-gl~5 z_xAb2J%eArrC1CN4G$}-zVvCqF1;H;abAu6G*+PDHSYFx@Tdbfox*uEd3}BUyYY-l zTfEsOqsi#f9^FoLO;ChK<554qkri&Av~SIM*{fEYRE?vH7pTAOmu2pz3X?Wn*!ROX ztd54huAk&mFBemMooL33RV-*1f0Q3_(7hl$<#*|WF9P!;r;4_+X~k~uKEqdzZ$5Al zV63XN@)j$FN#cCD;ek1R#l zv%pGrhB~KWgoCj%GT?%{@@o(AJGt*PG#l3i>lhmb_twKH^EYvacVY-6bsCl5*^~L0 zonm@lk2UvvTKr2RS%}T>^~EYqdL1q4nD%0n&Xqr^cK^`J5W;lRRB^R-O8b&HENO||mo0xaD+S=I8RTlIfVgqN@SXDr2&-)we--K7w= zJVU8?Z+7k9dy;s;^gDkQa`0nz6N{T?(A&Iz)2!DEecLyRa&FI!id#5Z7B*O2=PsR0 zEvc|8{NS^)!d)MDX(97Xw}m&kEO@5jqRaDZ!+%`wYOI<23q|&js`&o4xvjP7D_xv@ z5hEwpsp{HezI9!~6O{~)lLR@oF7?J7i>1|5a~UuoN=q&6N}EJPV_GD`&M*v8Y`^2j zKII*d_@Fi$+i*YEW+Hbzn{iQk~yP z>7N{S4)r*!NwQ`(qcN#8SRQsNK6>{)X12nbF`*7#ecO7I)Q$uZsV+xS4E7aUn+U(K baj7?x%VD!5Cxk2YbYLNVeiXvvpMCWYo=by@ literal 24838 zcmeI4X^>UL6@VY56)S&I{`6Nu0RscWCdj@GJHx(%?6_-;yKy1n;EEf9f}pr1CW5HA zYt$%U#C=}?jWH&%G@BaHBxsWAoUb3}&6%Ei@4Ii_JRa1`RQ23*yU)_wJ$?H0>6gj0 z${d_I^w5kvTW3xYEc?FvyP3>p$!py@`@T`|dVepIsjbbvR}af%KKy7YuQ%SDC^zmNWPYR^7avI5P-@dKev}UZ^aDAOyci9Nn zwR4qEz~tSvrp|#ACvWzo9`3B;`}^{t18dxaH;?xT7#hmJiKAaI;|O=$yxzXNOHGw~ z^!5pE^SW`av%t_$22LFPsM^l%=PSp!3r`>9w%s+^ZQYnnTQ*Ggd9-1~kj_o$YdW@b ztCkJ(ZGYjusqV5L4{^)R9Gt@gzU1t|?xhE&c^q(|(R#oa*}Sj5c({A$mhrB8*Y@tc zr)K#C{KOp-eHl35ZWJ1&zkmI>9DL%!KJE@_!=W?aH;i?ZDb0O1HPFy6 zcV0Kf)eZ0BHmz9vowF7EA{z*aue9M)iJP&Zd)qYlfJ-c^sS1qY^?>s)!!Ta@x zr@Lz|80r)7<{QVk9Z$}5SDaVtz*Rc?oH5~Wcjoc^eA&EdJ^h@aZ-BvL{K2s_7Cvfr zFL&(R?D&(9OxsS%z_BzI9^Ai^AOF$PUpGk~oO(=OpMc3@Zh&KH1a9>G%%0rC)t@oQ z4d~M`hX+g^Wf8P>A&&qjq|tZe*44Laq7qVPK#QIc)s*Qj34P`NL`Q{xBI`SnR!RC? zlGdTvC%oVZ@0BgcH>}qc!uzul@{i@sH}L0|=eZBJ9qF!HHaw?`s0(_DJj(v`(memI z6jH}=BfGlSlRV4)ouv#h*65yRR>G zo;I#~BVK&l&{+H=_~Nq$d%bFLh7GE5pS&>Fr{RMe>)MM19~z6F1oQo_y>vtlpEZF# zIc82TpMc3z9;{Q)=zG5B#4+96yHCvYy8p4;C%6x`%y$2HccC9|#vGVD)**C0xX|R| z%h)}ze!Tnrvvb@RZ!GX@2lMEq`=`08b`9$%FnN@*zJLo2wD5?MbE&LN)Z>Kty*;m= zt{Cn0>Q3nk)`bR^{dVf!3ECg6Yz4YcskI>$XH*L8E)MsudhnkP0B>+M(XEcErHUBKi~ z1`fEP&WPhp{@Ew?cPlR(ma9iw8NbJWHqp=btCtM*FnP*@ZwwlJ&-Y|LEjgvJzUtPc zz5CrWNBRV8d0-bpWAl<=zM1PU8lJseDxBK^QuuCj2fg{&2#*IG5ezf1B(o%lU+OZx7So4D?yi2*h zFBkr5pG3AJs83uy!~C3mQZLp~ss7-N9oAY>t)!eC#s)CrPukK!(!G*)H?v(~JCoj# zfvgTxMV{4?zL1neQ;ITVBAdFDf`1yG$o{g7^1sR_n{RZ7tnXio?tM%240}(z9xFY0 zlz{^-G*RET;-`7`>e0b{{`!2kM)t7Si9ZqD$~wh*hyGC>z~qs@0T&u*;h}hiKGEga zHkJ;%7aNc^o_0(>Z{Gp069H;TwPTUnvvX0SJ+kGGZ0lFBWocl>kaa)AoiMta+x_-J-?#KHFnJ*! zwD1V?)4s#|?O)DlMBhVv4IgZs?d>b<6%xK3<{o91H?-%8?PK!_fm#3d>{{gQ z?*8`b{G6?bZKdO{_9IVlz{R$PcGjeL|3*|@upby()_Lf^eQ&XQe)CjsbJ3Uolrgt< zweld3GH|fZpn(=1@PencO_a_)v6tU?WV-w8wfXLbOGae0{<*C?Ead$6v+> z|EQKThJTmwXK!c6AOD+FgtDv7i<48{-OPce!KDVkzR+XKOcREPha(;$}iUb!*)f-Fb}Y4@r9z-_{OIg z`xn^T#ZtEPv_T$M*Sr+=Z{q#~8$|7Y{0!*2u${D*Jj%dfOrS~FzpH*_|55J!7kl4w z?LT!7T(!3!632pmZh?dh`n-z$_ts42pn6;c`}hx;TSYd0idsqal5&0uGV=UM{c9xQ z1KK6&TS+a^H|6B_hPo1W3 zh+Dun!`UkP%H3}*@IE18q{7&MH2f3?T6o}Jf+xI@fh=SyUOArw`*w1_-PUlHZTHc@ z--yqIxPtI}IjPRzLIZ8cPv4P=>?A&=E~~0)>&J#V;TwAR*6}`01iu~U$@prtzW6YS ze}E>gUX+0YuF}B+Uhw2x7a7Q+oOzMNFHTNN<)40Rzg#`pABKF18@l}5A>RL`?Ri;Z zC8ExD$)im1@R{N7(wIog8$Yn(6%q$yd9(zKe};OnH%;mWBs7)>ls~T3Wi6!Xqw6+dpJLVS1P| z9qV%io-nE*rYcPxiS31>U_>mbPTXxkC*!?*zefr#2vF|qr8{|4|u^7-pD|f z&OPc->UKu)=iHgIpysp;Lsbyj}GJWoBkufOA={CRTUjr%af zc5pUH9{pg?M5%+)oN`q9yBbBt@+3xHV)qGm8b)Cp-w7~CwEhtBUk0rbjrqM zTb|tQ3-5-pw^cul`T+X&s?O;?V(FD!(Q9Qg@(LTCNz{0-vBM^SX5lti3|GpxFn4;Ax6pGc~t)R!Bo${lYH(* z!F&5X*?S&}YoDCyzwv1H+XI(+rL`;RN9}iLxlfr-r&vGG8OQa@=>+a)+Ij)sd_{wu z1Am(+3-RFr4&N8N6+hqo19S#;SA1-hG>07p3}&*j4CR+rqdV)^6n; z_vFr!(a%-=#=kb{pYmNL@6|DWkw~%E2V2jYl*e1}c{e$fib?(O+hs}eoBLRo&9(;J}YV}0Mi;LZAe{U$(s= zT<-IaV$Z+q-P!~3{HxN>Kbw30jXzM&I(S<6Ksx^}HvU2Vntb!etSsm0>)j}Me^+L5{2yz--)?W`Q?az z!WLG4UNP}+#C+NKH+ZG-Q=E>IPp%LuKLx$$8NAOGr(#~P>!EA zDYlpXDR=xM?Xv5(-qp74Cw3LzBeASHSBY`OezkbOyjP!G%WSymju_C$VBl--z + - + + + + diff --git a/react/public/manifest.json b/react/public/manifest.json new file mode 100644 index 0000000..ef19ec2 --- /dev/null +++ b/react/public/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + } + ], + "start_url": "./index.html", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/react/src/index.js b/react/src/index.js index bada0fe..61ee00b 100644 --- a/react/src/index.js +++ b/react/src/index.js @@ -1,14 +1,18 @@ +import registerServiceWorker from './registerServiceWorker'; import React from 'react'; import ReactDOM from 'react-dom'; import './index.css'; import ChatEngineCore from 'chat-engine' +import createReactClass from 'create-react-class' + +registerServiceWorker(); const now = new Date().getTime(); const username = ['user', now].join('-'); const ChatEngine = ChatEngineCore.create({ - publishKey: 'pub-c-d8599c43-cecf-42ba-a72f-aa3b24653c2b', - subscribeKey: 'sub-c-6c6c021c-c4e2-11e7-9628-f616d8b03518' + publishKey: 'pub-c-df1f983b-8334-44aa-b32b-2fa23eff1f8f', + subscribeKey: 'sub-c-bf3164ba-f737-11e7-b8a6-46d99af2bb8c' }, { globalChannel: 'chat-engine-react' }); @@ -17,8 +21,11 @@ ChatEngine.connect(username, { signedOnTime: now }, 'auth-key'); -var Message = React.createClass({ +let Message = createReactClass({ render: function() { + + console.log('mes', this.props) + return ( < div > { this.props.uuid }: { this.props.text } < /div> @@ -26,7 +33,7 @@ var Message = React.createClass({ } }); -var Chat = React.createClass({ +let Chat = createReactClass({ getInitialState: function() { return { @@ -59,14 +66,9 @@ var Chat = React.createClass({ let messages = this.state.messages; - messages.push( < - Message key = { this.state.messages.length } uuid = { payload.sender.uuid } text = { payload.data.text } - /> - ); + messages.push(payload); - this.setState({ - messages: messages - }); + this.setState({messages}); }); @@ -79,10 +81,18 @@ var Chat = React.createClass({ }, render: function() { + + console.log('render called') + + console.log(this.state.messages) + + let messageList = this.state.messages.map(function(payload){ + return + }); + return ( < div > - < - div id = "chat-output" > { this.state.messages } < /div> < +
{ messageList } < /div> < input id = "chat-input" type = "text" name = "" diff --git a/react/src/logo.svg b/react/src/logo.svg new file mode 100644 index 0000000..6b60c10 --- /dev/null +++ b/react/src/logo.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/react/src/registerServiceWorker.js b/react/src/registerServiceWorker.js new file mode 100644 index 0000000..a3e6c0c --- /dev/null +++ b/react/src/registerServiceWorker.js @@ -0,0 +1,117 @@ +// In production, we register a service worker to serve assets from local cache. + +// This lets the app load faster on subsequent visits in production, and gives +// it offline capabilities. However, it also means that developers (and users) +// will only see deployed updates on the "N+1" visit to a page, since previously +// cached resources are updated in the background. + +// To learn more about the benefits of this model, read https://goo.gl/KwvDNy. +// This link also includes instructions on opting out of this behavior. + +const isLocalhost = Boolean( + window.location.hostname === 'localhost' || + // [::1] is the IPv6 localhost address. + window.location.hostname === '[::1]' || + // 127.0.0.1/8 is considered localhost for IPv4. + window.location.hostname.match( + /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ + ) +); + +export default function register() { + if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { + // The URL constructor is available in all browsers that support SW. + const publicUrl = new URL(process.env.PUBLIC_URL, window.location); + if (publicUrl.origin !== window.location.origin) { + // Our service worker won't work if PUBLIC_URL is on a different origin + // from what our page is served on. This might happen if a CDN is used to + // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374 + return; + } + + window.addEventListener('load', () => { + const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; + + if (isLocalhost) { + // This is running on localhost. Lets check if a service worker still exists or not. + checkValidServiceWorker(swUrl); + + // Add some additional logging to localhost, pointing developers to the + // service worker/PWA documentation. + navigator.serviceWorker.ready.then(() => { + console.log( + 'This web app is being served cache-first by a service ' + + 'worker. To learn more, visit https://goo.gl/SC7cgQ' + ); + }); + } else { + // Is not local host. Just register service worker + registerValidSW(swUrl); + } + }); + } +} + +function registerValidSW(swUrl) { + navigator.serviceWorker + .register(swUrl) + .then(registration => { + registration.onupdatefound = () => { + const installingWorker = registration.installing; + installingWorker.onstatechange = () => { + if (installingWorker.state === 'installed') { + if (navigator.serviceWorker.controller) { + // At this point, the old content will have been purged and + // the fresh content will have been added to the cache. + // It's the perfect time to display a "New content is + // available; please refresh." message in your web app. + console.log('New content is available; please refresh.'); + } else { + // At this point, everything has been precached. + // It's the perfect time to display a + // "Content is cached for offline use." message. + console.log('Content is cached for offline use.'); + } + } + }; + }; + }) + .catch(error => { + console.error('Error during service worker registration:', error); + }); +} + +function checkValidServiceWorker(swUrl) { + // Check if the service worker can be found. If it can't reload the page. + fetch(swUrl) + .then(response => { + // Ensure service worker exists, and that we really are getting a JS file. + if ( + response.status === 404 || + response.headers.get('content-type').indexOf('javascript') === -1 + ) { + // No service worker found. Probably a different app. Reload the page. + navigator.serviceWorker.ready.then(registration => { + registration.unregister().then(() => { + window.location.reload(); + }); + }); + } else { + // Service worker found. Proceed as normal. + registerValidSW(swUrl); + } + }) + .catch(() => { + console.log( + 'No internet connection found. App is running in offline mode.' + ); + }); +} + +export function unregister() { + if ('serviceWorker' in navigator) { + navigator.serviceWorker.ready.then(registration => { + registration.unregister(); + }); + } +} From b6b1708cb26192f73d513ed0c6c96ef31f057f7e Mon Sep 17 00:00:00 2001 From: Ian Jennings Date: Mon, 26 Mar 2018 23:32:57 -0500 Subject: [PATCH 2/4] delete gitignore --- react/.gitignore | 21 ------------------- react/build/asset-manifest.json | 6 ++++++ react/build/favicon.ico | Bin 0 -> 3870 bytes react/build/index.html | 1 + react/build/manifest.json | 15 +++++++++++++ react/build/service-worker.js | 1 + react/build/static/css/main.ea890535.css | 2 ++ react/build/static/css/main.ea890535.css.map | 1 + react/build/static/js/main.ec658a00.js | 2 ++ react/build/static/js/main.ec658a00.js.map | 1 + 10 files changed, 29 insertions(+), 21 deletions(-) delete mode 100644 react/.gitignore create mode 100644 react/build/asset-manifest.json create mode 100644 react/build/favicon.ico create mode 100644 react/build/index.html create mode 100644 react/build/manifest.json create mode 100644 react/build/service-worker.js create mode 100644 react/build/static/css/main.ea890535.css create mode 100644 react/build/static/css/main.ea890535.css.map create mode 100644 react/build/static/js/main.ec658a00.js create mode 100644 react/build/static/js/main.ec658a00.js.map diff --git a/react/.gitignore b/react/.gitignore deleted file mode 100644 index d30f40e..0000000 --- a/react/.gitignore +++ /dev/null @@ -1,21 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -/node_modules - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -npm-debug.log* -yarn-debug.log* -yarn-error.log* diff --git a/react/build/asset-manifest.json b/react/build/asset-manifest.json new file mode 100644 index 0000000..8d68253 --- /dev/null +++ b/react/build/asset-manifest.json @@ -0,0 +1,6 @@ +{ + "main.css": "static/css/main.ea890535.css", + "main.css.map": "static/css/main.ea890535.css.map", + "main.js": "static/js/main.ec658a00.js", + "main.js.map": "static/js/main.ec658a00.js.map" +} \ No newline at end of file diff --git a/react/build/favicon.ico b/react/build/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a11777cc471a4344702741ab1c8a588998b1311a GIT binary patch literal 3870 zcma);c{J4h9>;%nil|2-o+rCuEF-(I%-F}ijC~o(k~HKAkr0)!FCj~d>`RtpD?8b; zXOC1OD!V*IsqUwzbMF1)-gEDD=A573Z-&G7^LoAC9|WO7Xc0Cx1g^Zu0u_SjAPB3vGa^W|sj)80f#V0@M_CAZTIO(t--xg= z!sii`1giyH7EKL_+Wi0ab<)&E_0KD!3Rp2^HNB*K2@PHCs4PWSA32*-^7d{9nH2_E zmC{C*N*)(vEF1_aMamw2A{ZH5aIDqiabnFdJ|y0%aS|64E$`s2ccV~3lR!u<){eS` z#^Mx6o(iP1Ix%4dv`t@!&Za-K@mTm#vadc{0aWDV*_%EiGK7qMC_(`exc>-$Gb9~W!w_^{*pYRm~G zBN{nA;cm^w$VWg1O^^<6vY`1XCD|s_zv*g*5&V#wv&s#h$xlUilPe4U@I&UXZbL z0)%9Uj&@yd03n;!7do+bfixH^FeZ-Ema}s;DQX2gY+7g0s(9;`8GyvPY1*vxiF&|w z>!vA~GA<~JUqH}d;DfBSi^IT*#lrzXl$fNpq0_T1tA+`A$1?(gLb?e#0>UELvljtQ zK+*74m0jn&)5yk8mLBv;=@}c{t0ztT<v;Avck$S6D`Z)^c0(jiwKhQsn|LDRY&w(Fmi91I7H6S;b0XM{e zXp0~(T@k_r-!jkLwd1_Vre^v$G4|kh4}=Gi?$AaJ)3I+^m|Zyj#*?Kp@w(lQdJZf4 z#|IJW5z+S^e9@(6hW6N~{pj8|NO*>1)E=%?nNUAkmv~OY&ZV;m-%?pQ_11)hAr0oAwILrlsGawpxx4D43J&K=n+p3WLnlDsQ$b(9+4 z?mO^hmV^F8MV{4Lx>(Q=aHhQ1){0d*(e&s%G=i5rq3;t{JC zmgbn5Nkl)t@fPH$v;af26lyhH!k+#}_&aBK4baYPbZy$5aFx4}ka&qxl z$=Rh$W;U)>-=S-0=?7FH9dUAd2(q#4TCAHky!$^~;Dz^j|8_wuKc*YzfdAht@Q&ror?91Dm!N03=4=O!a)I*0q~p0g$Fm$pmr$ zb;wD;STDIi$@M%y1>p&_>%?UP($15gou_ue1u0!4(%81;qcIW8NyxFEvXpiJ|H4wz z*mFT(qVx1FKufG11hByuX%lPk4t#WZ{>8ka2efjY`~;AL6vWyQKpJun2nRiZYDij$ zP>4jQXPaP$UC$yIVgGa)jDV;F0l^n(V=HMRB5)20V7&r$jmk{UUIe zVjKroK}JAbD>B`2cwNQ&GDLx8{pg`7hbA~grk|W6LgiZ`8y`{Iq0i>t!3p2}MS6S+ zO_ruKyAElt)rdS>CtF7j{&6rP-#c=7evGMt7B6`7HG|-(WL`bDUAjyn+k$mx$CH;q2Dz4x;cPP$hW=`pFfLO)!jaCL@V2+F)So3}vg|%O*^T1j>C2lx zsURO-zIJC$^$g2byVbRIo^w>UxK}74^TqUiRR#7s_X$e)$6iYG1(PcW7un-va-S&u zHk9-6Zn&>T==A)lM^D~bk{&rFzCi35>UR!ZjQkdSiNX*-;l4z9j*7|q`TBl~Au`5& z+c)*8?#-tgUR$Zd%Q3bs96w6k7q@#tUn`5rj+r@_sAVVLqco|6O{ILX&U-&-cbVa3 zY?ngHR@%l{;`ri%H*0EhBWrGjv!LE4db?HEWb5mu*t@{kv|XwK8?npOshmzf=vZA@ zVSN9sL~!sn?r(AK)Q7Jk2(|M67Uy3I{eRy z_l&Y@A>;vjkWN5I2xvFFTLX0i+`{qz7C_@bo`ZUzDugfq4+>a3?1v%)O+YTd6@Ul7 zAfLfm=nhZ`)P~&v90$&UcF+yXm9sq!qCx3^9gzIcO|Y(js^Fj)Rvq>nQAHI92ap=P z10A4@prk+AGWCb`2)dQYFuR$|H6iDE8p}9a?#nV2}LBCoCf(Xi2@szia7#gY>b|l!-U`c}@ zLdhvQjc!BdLJvYvzzzngnw51yRYCqh4}$oRCy-z|v3Hc*d|?^Wj=l~18*E~*cR_kU z{XsxM1i{V*4GujHQ3DBpl2w4FgFR48Nma@HPgnyKoIEY-MqmMeY=I<%oG~l!f<+FN z1ZY^;10j4M4#HYXP zw5eJpA_y(>uLQ~OucgxDLuf}fVs272FaMxhn4xnDGIyLXnw>Xsd^J8XhcWIwIoQ9} z%FoSJTAGW(SRGwJwb=@pY7r$uQRK3Zd~XbxU)ts!4XsJrCycrWSI?e!IqwqIR8+Jh zlRjZ`UO1I!BtJR_2~7AbkbSm%XQqxEPkz6BTGWx8e}nQ=w7bZ|eVP4?*Tb!$(R)iC z9)&%bS*u(lXqzitAN)Oo=&Ytn>%Hzjc<5liuPi>zC_nw;Z0AE3Y$Jao_Q90R-gl~5 z_xAb2J%eArrC1CN4G$}-zVvCqF1;H;abAu6G*+PDHSYFx@Tdbfox*uEd3}BUyYY-l zTfEsOqsi#f9^FoLO;ChK<554qkri&Av~SIM*{fEYRE?vH7pTAOmu2pz3X?Wn*!ROX ztd54huAk&mFBemMooL33RV-*1f0Q3_(7hl$<#*|WF9P!;r;4_+X~k~uKEqdzZ$5Al zV63XN@)j$FN#cCD;ek1R#l zv%pGrhB~KWgoCj%GT?%{@@o(AJGt*PG#l3i>lhmb_twKH^EYvacVY-6bsCl5*^~L0 zonm@lk2UvvTKr2RS%}T>^~EYqdL1q4nD%0n&Xqr^cK^`J5W;lRRB^R-O8b&HENO||mo0xaD+S=I8RTlIfVgqN@SXDr2&-)we--K7w= zJVU8?Z+7k9dy;s;^gDkQa`0nz6N{T?(A&Iz)2!DEecLyRa&FI!id#5Z7B*O2=PsR0 zEvc|8{NS^)!d)MDX(97Xw}m&kEO@5jqRaDZ!+%`wYOI<23q|&js`&o4xvjP7D_xv@ z5hEwpsp{HezI9!~6O{~)lLR@oF7?J7i>1|5a~UuoN=q&6N}EJPV_GD`&M*v8Y`^2j zKII*d_@Fi$+i*YEW+Hbzn{iQk~yP z>7N{S4)r*!NwQ`(qcN#8SRQsNK6>{)X12nbF`*7#ecO7I)Q$uZsV+xS4E7aUn+U(K baj7?x%VD!5Cxk2YbYLNVeiXvvpMCWYo=by@ literal 0 HcmV?d00001 diff --git a/react/build/index.html b/react/build/index.html new file mode 100644 index 0000000..d2a296e --- /dev/null +++ b/react/build/index.html @@ -0,0 +1 @@ +React App
\ No newline at end of file diff --git a/react/build/manifest.json b/react/build/manifest.json new file mode 100644 index 0000000..ef19ec2 --- /dev/null +++ b/react/build/manifest.json @@ -0,0 +1,15 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + } + ], + "start_url": "./index.html", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/react/build/service-worker.js b/react/build/service-worker.js new file mode 100644 index 0000000..ce9f509 --- /dev/null +++ b/react/build/service-worker.js @@ -0,0 +1 @@ +"use strict";var precacheConfig=[["/index.html","b94050cc605eb0745f7927fd029d7b25"],["/static/css/main.ea890535.css","e77dd8634a1bd267c57692afe84f6eb8"],["/static/js/main.ec658a00.js","7100d84d5e30087ac8dba27c8f486794"]],cacheName="sw-precache-v3-sw-precache-webpack-plugin-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var n=new URL(e);return"/"===n.pathname.slice(-1)&&(n.pathname+=t),n.toString()},cleanResponse=function(t){return t.redirected?("body"in t?Promise.resolve(t.body):t.blob()).then(function(e){return new Response(e,{headers:t.headers,status:t.status,statusText:t.statusText})}):Promise.resolve(t)},createCacheKey=function(e,t,n,r){var a=new URL(e);return r&&a.pathname.match(r)||(a.search+=(a.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(n)),a.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var n=new URL(t).pathname;return e.some(function(e){return n.match(e)})},stripIgnoredUrlParameters=function(e,n){var t=new URL(e);return t.hash="",t.search=t.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(t){return n.every(function(e){return!e.test(t[0])})}).map(function(e){return e.join("=")}).join("&"),t.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],n=e[1],r=new URL(t,self.location),a=createCacheKey(r,hashParamName,n,/\.\w{8}\./);return[r.toString(),a]}));function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(r){return setOfCachedUrls(r).then(function(n){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(t){if(!n.has(t)){var e=new Request(t,{credentials:"same-origin"});return fetch(e).then(function(e){if(!e.ok)throw new Error("Request for "+t+" returned a response with status "+e.status);return cleanResponse(e).then(function(e){return r.put(t,e)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var n=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(t){return t.keys().then(function(e){return Promise.all(e.map(function(e){if(!n.has(e.url))return t.delete(e)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(t){if("GET"===t.request.method){var e,n=stripIgnoredUrlParameters(t.request.url,ignoreUrlParametersMatching),r="index.html";(e=urlsToCacheKeys.has(n))||(n=addDirectoryIndex(n,r),e=urlsToCacheKeys.has(n));var a="/index.html";!e&&"navigate"===t.request.mode&&isPathWhitelisted(["^(?!\\/__).*"],t.request.url)&&(n=new URL(a,self.location).toString(),e=urlsToCacheKeys.has(n)),e&&t.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(n)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(e){return console.warn('Couldn\'t serve response for "%s" from cache: %O',t.request.url,e),fetch(t.request)}))}}); \ No newline at end of file diff --git a/react/build/static/css/main.ea890535.css b/react/build/static/css/main.ea890535.css new file mode 100644 index 0000000..a1f4496 --- /dev/null +++ b/react/build/static/css/main.ea890535.css @@ -0,0 +1,2 @@ +*{margin:0;padding:0}body{width:500px;margin:30px auto;background-color:#fff} +/*# sourceMappingURL=main.ea890535.css.map*/ \ No newline at end of file diff --git a/react/build/static/css/main.ea890535.css.map b/react/build/static/css/main.ea890535.css.map new file mode 100644 index 0000000..526842a --- /dev/null +++ b/react/build/static/css/main.ea890535.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["index.css"],"names":[],"mappings":"AAAA,EACI,SACA,SAAa,CAEjB,KACI,YACA,iBACA,qBAAuB","file":"static/css/main.ea890535.css","sourcesContent":["* {\n margin: 0px;\n padding: 0px;\n}\nbody {\n width: 500px;\n margin: 30px auto;\n background-color: #fff;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.css"],"sourceRoot":""} \ No newline at end of file diff --git a/react/build/static/js/main.ec658a00.js b/react/build/static/js/main.ec658a00.js new file mode 100644 index 0000000..054d74d --- /dev/null +++ b/react/build/static/js/main.ec658a00.js @@ -0,0 +1,2 @@ +!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=5)}([function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=r(e),c=1;cc){for(var t=0,n=a.length-u;t-1?t:e}function d(e,t){t=t||{};var n=t.body;if(e instanceof d){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=p(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function y(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}function g(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var m={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(m.arrayBuffer)var v=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=function(e){return e&&DataView.prototype.isPrototypeOf(e)},_=ArrayBuffer.isView||function(e){return e&&v.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];this.map[e]=o?o+","+r:r},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=n(r)},o.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},m.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this,{body:this._bodyInit})},f.call(d.prototype),f.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},g.error=function(){var e=new g(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];g.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new g(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=d,e.Response=g,e.fetch=function(e,t){return new Promise(function(n,r){var o=new d(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:y(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;n(new g(t,e))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&m.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"===typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),o=n(1),i=n.n(o),a=n(15),s=n.n(a),u=n(25),c=(n.n(u),n(26)),l=n.n(c),f=n(27),p=n.n(f);Object(r.a)();var d=(new Date).getTime(),h=["user",d].join("-"),y=l.a.create({publishKey:"pub-c-df1f983b-8334-44aa-b32b-2fa23eff1f8f",subscribeKey:"sub-c-bf3164ba-f737-11e7-b8a6-46d99af2bb8c"},{globalChannel:"chat-engine-react"});y.connect(h,{signedOnTime:d},"auth-key");var g=p()({displayName:"Message",render:function(){return console.log("mes",this.props),i.a.createElement("div",null," ",this.props.uuid,": ",this.props.text," ")}}),m=p()({displayName:"Chat",getInitialState:function(){return{messages:[],chatInput:""}},setChatInput:function(e){this.setState({chatInput:e.target.value})},sendChat:function(){this.state.chatInput&&(y.global.emit("message",{text:this.state.chatInput}),this.setState({chatInput:""}))},componentDidMount:function(){var e=this;y.global.on("message",function(t){var n=e.state.messages;n.push(t),e.setState({messages:n})})},_handleKeyPress:function(e){"Enter"===e.key&&this.sendChat()},render:function(){console.log("render called"),console.log(this.state.messages);var e=this.state.messages.map(function(e){return i.a.createElement(g,{key:e.timetoken,uuid:e.sender.uuid,text:e.data.text})});return i.a.createElement("div",null,i.a.createElement("div",{id:"chat-output"}," ",e," ")," ",i.a.createElement("input",{id:"chat-input",type:"text",name:"",value:this.state.chatInput,onChange:this.setChatInput,onKeyPress:this._handleKeyPress})," ",i.a.createElement("input",{type:"button",onClick:this.sendChat,value:"Send Chat"}))}});y.on("$.ready",function(){s.a.render(i.a.createElement(m,null),document.getElementById("root"))})},function(e,t,n){"use strict";function r(){if("serviceWorker"in navigator){if(new URL("",window.location).origin!==window.location.origin)return;window.addEventListener("load",function(){var e="/service-worker.js";a?(i(e),navigator.serviceWorker.ready.then(function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://goo.gl/SC7cgQ")})):o(e)})}}function o(e){navigator.serviceWorker.register(e).then(function(e){e.onupdatefound=function(){var t=e.installing;t.onstatechange=function(){"installed"===t.state&&(navigator.serviceWorker.controller?console.log("New content is available; please refresh."):console.log("Content is cached for offline use."))}}}).catch(function(e){console.error("Error during service worker registration:",e)})}function i(e){fetch(e).then(function(t){404===t.status||-1===t.headers.get("content-type").indexOf("javascript")?navigator.serviceWorker.ready.then(function(e){e.unregister().then(function(){window.location.reload()})}):o(e)}).catch(function(){console.log("No internet connection found. App is running in offline mode.")})}t.a=r;var a=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;rI.length&&I.push(e)}function d(e,t,n,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case k:case E:case C:case x:a=!0}}if(a)return n(o,e,""===t?"."+h(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var s=0;sthis.eventPool.length&&this.eventPool.push(e)}function K(e){e.eventPool=[],e.getPooled=H,e.release=B}function z(e,t,n,r){return F.call(this,e,t,n,r)}function q(e,t,n,r){return F.call(this,e,t,n,r)}function G(e,t){switch(e){case"topKeyUp":return-1!==dr.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function V(e){return e=e.detail,"object"===typeof e&&"data"in e?e.data:null}function W(e,t){switch(e){case"topCompositionEnd":return V(t);case"topKeyPress":return 32!==t.which?null:(Er=!0,wr);case"topTextInput":return e=t.data,e===wr&&Er?null:e;default:return null}}function $(e,t){if(Cr)return"topCompositionEnd"===e||!hr&&G(e,t)?(e=U(),lr._root=null,lr._startText=null,lr._fallbackText=null,Cr=!1,e):null;switch(e){case"topPaste":return null;case"topKeyPress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1Kr.length&&Kr.push(e)}}}function Ae(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function Re(e){if(Wr[e])return Wr[e];if(!Vr[e])return e;var t,n=Vr[e];for(t in n)if(n.hasOwnProperty(t)&&t in $r)return Wr[e]=n[t];return""}function Ie(e){return Object.prototype.hasOwnProperty.call(e,Jr)||(e[Jr]=Xr++,Qr[e[Jr]]={}),Qr[e[Jr]]}function De(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ue(e,t){var n=De(e);e=0;for(var r;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=De(n)}}function Le(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)}function Fe(e,t){if(oo||null==to||to!==Cn())return null;var n=to;return"selectionStart"in n&&Le(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,ro&&xn(ro,n)?null:(ro=n,e=F.getPooled(eo.select,no,e,t),e.type="select",e.target=to,R(e),e)}function He(e,t,n,r){return F.call(this,e,t,n,r)}function Be(e,t,n,r){return F.call(this,e,t,n,r)}function Ke(e,t,n,r){return F.call(this,e,t,n,r)}function ze(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,32<=e||13===e?e:0}function qe(e,t,n,r){return F.call(this,e,t,n,r)}function Ge(e,t,n,r){return F.call(this,e,t,n,r)}function Ve(e,t,n,r){return F.call(this,e,t,n,r)}function We(e,t,n,r){return F.call(this,e,t,n,r)}function $e(e,t,n,r){return F.call(this,e,t,n,r)}function Ye(e){0>po||(e.current=fo[po],fo[po]=null,po--)}function Qe(e,t){po++,fo[po]=e.current,e.current=t}function Xe(e){return Ze(e)?go:ho.current}function Je(e,t){var n=e.type.contextTypes;if(!n)return Pn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ze(e){return 2===e.tag&&null!=e.type.childContextTypes}function et(e){Ze(e)&&(Ye(yo,e),Ye(ho,e))}function tt(e,t,n){null!=ho.cursor&&r("168"),Qe(ho,t,e),Qe(yo,n,e)}function nt(e,t){var n=e.stateNode,o=e.type.childContextTypes;if("function"!==typeof n.getChildContext)return t;n=n.getChildContext();for(var i in n)i in o||r("108",we(e)||"Unknown",i);return wn({},t,n)}function rt(e){if(!Ze(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Pn,go=ho.current,Qe(ho,t,e),Qe(yo,yo.current,e),!0}function ot(e,t){var n=e.stateNode;if(n||r("169"),t){var o=nt(e,go);n.__reactInternalMemoizedMergedChildContext=o,Ye(yo,e),Ye(ho,e),Qe(ho,o,e)}else Ye(yo,e);Qe(yo,t,e)}function it(e,t,n){this.tag=e,this.key=t,this.stateNode=this.type=null,this.sibling=this.child=this.return=null,this.index=0,this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null,this.internalContextTag=n,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function at(e,t,n){var r=e.alternate;return null===r?(r=new it(e.tag,e.key,e.internalContextTag),r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.pendingProps=t,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function st(e,t,n){var o=void 0,i=e.type,a=e.key;return"function"===typeof i?(o=i.prototype&&i.prototype.isReactComponent?new it(2,a,t):new it(0,a,t),o.type=i,o.pendingProps=e.props):"string"===typeof i?(o=new it(5,a,t),o.type=i,o.pendingProps=e.props):"object"===typeof i&&null!==i&&"number"===typeof i.tag?(o=i,o.pendingProps=e.props):r("130",null==i?i:typeof i,""),o.expirationTime=n,o}function ut(e,t,n,r){return t=new it(10,r,t),t.pendingProps=e,t.expirationTime=n,t}function ct(e,t,n){return t=new it(6,null,t),t.pendingProps=e,t.expirationTime=n,t}function lt(e,t,n){return t=new it(7,e.key,t),t.type=e.handler,t.pendingProps=e,t.expirationTime=n,t}function ft(e,t,n){return e=new it(9,null,t),e.expirationTime=n,e}function pt(e,t,n){return t=new it(4,e.key,t),t.pendingProps=e.children||[],t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function dt(e){return function(t){try{return e(t)}catch(e){}}}function ht(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);mo=dt(function(e){return t.onCommitFiberRoot(n,e)}),vo=dt(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function yt(e){"function"===typeof mo&&mo(e)}function gt(e){"function"===typeof vo&&vo(e)}function mt(e){return{baseState:e,expirationTime:0,first:null,last:null,callbackList:null,hasForceUpdate:!1,isInitialized:!1}}function vt(e,t){null===e.last?e.first=e.last=t:(e.last.next=t,e.last=t),(0===e.expirationTime||e.expirationTime>t.expirationTime)&&(e.expirationTime=t.expirationTime)}function bt(e,t){var n=e.alternate,r=e.updateQueue;null===r&&(r=e.updateQueue=mt(null)),null!==n?null===(e=n.updateQueue)&&(e=n.updateQueue=mt(null)):e=null,e=e!==r?e:null,null===e?vt(r,t):null===r.last||null===e.last?(vt(r,t),vt(e,t)):(vt(r,t),e.last=t)}function _t(e,t,n,r){return e=e.partialState,"function"===typeof e?e.call(t,n,r):e}function wt(e,t,n,r,o,i){null!==e&&e.updateQueue===n&&(n=t.updateQueue={baseState:n.baseState,expirationTime:n.expirationTime,first:n.first,last:n.last,isInitialized:n.isInitialized,callbackList:null,hasForceUpdate:!1}),n.expirationTime=0,n.isInitialized?e=n.baseState:(e=n.baseState=t.memoizedState,n.isInitialized=!0);for(var a=!0,s=n.first,u=!1;null!==s;){var c=s.expirationTime;if(c>i){var l=n.expirationTime;(0===l||l>c)&&(n.expirationTime=c),u||(u=!0,n.baseState=e)}else u||(n.first=s.next,null===n.first&&(n.last=null)),s.isReplace?(e=_t(s,r,e,o),a=!0):(c=_t(s,r,e,o))&&(e=a?wn({},e,c):wn(e,c),a=!1),s.isForced&&(n.hasForceUpdate=!0),null!==s.callback&&(c=n.callbackList,null===c&&(c=n.callbackList=[]),c.push(s));s=s.next}return null!==n.callbackList?t.effectTag|=32:null!==n.first||n.hasForceUpdate||(t.updateQueue=null),u||(n.baseState=e),e}function kt(e,t){var n=e.callbackList;if(null!==n)for(e.callbackList=null,e=0;ep?(d=f,f=null):d=f.sibling;var m=y(r,f,s[p],u);if(null===m){null===f&&(f=d);break}e&&f&&null===m.alternate&&t(r,f),i=a(m,i,p),null===l?c=m:l.sibling=m,l=m,f=d}if(p===s.length)return n(r,f),c;if(null===f){for(;pd?(m=p,p=null):m=p.sibling;var b=y(i,p,v.value,c);if(null===b){p||(p=m);break}e&&p&&null===b.alternate&&t(i,p),s=a(b,s,d),null===f?l=b:f.sibling=b,f=b,p=m}if(v.done)return n(i,p),l;if(null===p){for(;!v.done;d++,v=u.next())null!==(v=h(i,v.value,c))&&(s=a(v,s,d),null===f?l=v:f.sibling=v,f=v);return l}for(p=o(i,p);!v.done;d++,v=u.next())null!==(v=g(p,i,d,v.value,c))&&(e&&null!==v.alternate&&p.delete(null===v.key?d:v.key),s=a(v,s,d),null===f?l=v:f.sibling=v,f=v);return e&&p.forEach(function(e){return t(i,e)}),l}return function(e,o,a,u){"object"===typeof a&&null!==a&&a.type===Co&&null===a.key&&(a=a.props.children);var c="object"===typeof a&&null!==a;if(c)switch(a.$$typeof){case _o:e:{var l=a.key;for(c=o;null!==c;){if(c.key===l){if(10===c.tag?a.type===Co:c.type===a.type){n(e,c.sibling),o=i(c,a.type===Co?a.props.children:a.props,u),o.ref=xt(c,a),o.return=e,e=o;break e}n(e,c);break}t(e,c),c=c.sibling}a.type===Co?(o=ut(a.props.children,e.internalContextTag,u,a.key),o.return=e,e=o):(u=st(a,e.internalContextTag,u),u.ref=xt(o,a),u.return=e,e=u)}return s(e);case wo:e:{for(c=a.key;null!==o;){if(o.key===c){if(7===o.tag){n(e,o.sibling),o=i(o,a,u),o.return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}o=lt(a,e.internalContextTag,u),o.return=e,e=o}return s(e);case ko:e:{if(null!==o){if(9===o.tag){n(e,o.sibling),o=i(o,null,u),o.type=a.value,o.return=e,e=o;break e}n(e,o)}o=ft(a,e.internalContextTag,u),o.type=a.value,o.return=e,e=o}return s(e);case Eo:e:{for(c=a.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(e,o.sibling),o=i(o,a.children||[],u),o.return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}o=pt(a,e.internalContextTag,u),o.return=e,e=o}return s(e)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==o&&6===o.tag?(n(e,o.sibling),o=i(o,a,u)):(n(e,o),o=ct(a,e.internalContextTag,u)),o.return=e,e=o,s(e);if(To(a))return m(e,o,a,u);if(Ct(a))return v(e,o,a,u);if(c&&Tt(e,a),"undefined"===typeof a)switch(e.tag){case 2:case 1:u=e.type,r("152",u.displayName||u.name||"Component")}return n(e,o)}}function Pt(e,t,n,o,i){function a(e,t,n){var r=t.expirationTime;t.child=null===e?Po(t,null,n,r):So(t,e.child,n,r)}function s(e,t){var n=t.ref;null===n||e&&e.ref===n||(t.effectTag|=128)}function u(e,t,n,r){if(s(e,t),!n)return r&&ot(t,!1),l(e,t);n=t.stateNode,Br.current=t;var o=n.render();return t.effectTag|=1,a(e,t,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&ot(t,!0),t.child}function c(e){var t=e.stateNode;t.pendingContext?tt(e,t.pendingContext,t.pendingContext!==t.context):t.context&&tt(e,t.context,!1),g(e,t.containerInfo)}function l(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=at(e,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=at(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}function f(e,t){switch(t.tag){case 3:c(t);break;case 2:rt(t);break;case 4:g(t,t.stateNode.containerInfo)}return null}var p=e.shouldSetTextContent,d=e.useSyncScheduling,h=e.shouldDeprioritizeSubtree,y=t.pushHostContext,g=t.pushHostContainer,m=n.enterHydrationState,v=n.resetHydrationState,b=n.tryToClaimNextHydratableInstance;e=Et(o,i,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t});var _=e.adoptClassInstance,w=e.constructClassInstance,k=e.mountClassInstance,E=e.updateClassInstance;return{beginWork:function(e,t,n){if(0===t.expirationTime||t.expirationTime>n)return f(e,t);switch(t.tag){case 0:null!==e&&r("155");var o=t.type,i=t.pendingProps,C=Xe(t);return C=Je(t,C),o=o(i,C),t.effectTag|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render?(t.tag=2,i=rt(t),_(t,o),k(t,n),t=u(e,t,!0,i)):(t.tag=1,a(e,t,o),t.memoizedProps=i,t=t.child),t;case 1:e:{if(i=t.type,n=t.pendingProps,o=t.memoizedProps,yo.current)null===n&&(n=o);else if(null===n||o===n){t=l(e,t);break e}o=Xe(t),o=Je(t,o),i=i(n,o),t.effectTag|=1,a(e,t,i),t.memoizedProps=n,t=t.child}return t;case 2:return i=rt(t),o=void 0,null===e?t.stateNode?r("153"):(w(t,t.pendingProps),k(t,n),o=!0):o=E(e,t,n),u(e,t,o,i);case 3:return c(t),i=t.updateQueue,null!==i?(o=t.memoizedState,i=wt(e,t,i,null,null,n),o===i?(v(),t=l(e,t)):(o=i.element,C=t.stateNode,(null===e||null===e.child)&&C.hydrate&&m(t)?(t.effectTag|=2,t.child=Po(t,null,o,n)):(v(),a(e,t,o)),t.memoizedState=i,t=t.child)):(v(),t=l(e,t)),t;case 5:y(t),null===e&&b(t),i=t.type;var x=t.memoizedProps;return o=t.pendingProps,null===o&&null===(o=x)&&r("154"),C=null!==e?e.memoizedProps:null,yo.current||null!==o&&x!==o?(x=o.children,p(i,o)?x=null:C&&p(i,C)&&(t.effectTag|=16),s(e,t),2147483647!==n&&!d&&h(i,o)?(t.expirationTime=2147483647,t=null):(a(e,t,x),t.memoizedProps=o,t=t.child)):t=l(e,t),t;case 6:return null===e&&b(t),e=t.pendingProps,null===e&&(e=t.memoizedProps),t.memoizedProps=e,null;case 8:t.tag=7;case 7:return i=t.pendingProps,yo.current?null===i&&null===(i=e&&e.memoizedProps)&&r("154"):null!==i&&t.memoizedProps!==i||(i=t.memoizedProps),o=i.children,t.stateNode=null===e?Po(t,t.stateNode,o,n):So(t,t.stateNode,o,n),t.memoizedProps=i,t.stateNode;case 9:return null;case 4:e:{if(g(t,t.stateNode.containerInfo),i=t.pendingProps,yo.current)null===i&&null==(i=e&&e.memoizedProps)&&r("154");else if(null===i||t.memoizedProps===i){t=l(e,t);break e}null===e?t.child=So(t,null,i,n):a(e,t,i),t.memoizedProps=i,t=t.child}return t;case 10:e:{if(n=t.pendingProps,yo.current)null===n&&(n=t.memoizedProps);else if(null===n||t.memoizedProps===n){t=l(e,t);break e}a(e,t,n),t.memoizedProps=n,t=t.child}return t;default:r("156")}},beginFailedWork:function(e,t,n){switch(t.tag){case 2:rt(t);break;case 3:c(t);break;default:r("157")}return t.effectTag|=64,null===e?t.child=null:t.child!==e.child&&(t.child=e.child),0===t.expirationTime||t.expirationTime>n?f(e,t):(t.firstEffect=null,t.lastEffect=null,t.child=null===e?Po(t,null,null,n):So(t,e.child,null,n),2===t.tag&&(e=t.stateNode,t.memoizedProps=e.props,t.memoizedState=e.state),t.child)}}}function Ot(e,t,n){function o(e){e.effectTag|=4}var i=e.createInstance,a=e.createTextInstance,s=e.appendInitialChild,u=e.finalizeInitialChildren,c=e.prepareUpdate,l=e.persistence,f=t.getRootHostContainer,p=t.popHostContext,d=t.getHostContext,h=t.popHostContainer,y=n.prepareToHydrateHostInstance,g=n.prepareToHydrateHostTextInstance,m=n.popHydrationState,v=void 0,b=void 0,_=void 0;return e.mutation?(v=function(){},b=function(e,t,n){(t.updateQueue=n)&&o(t)},_=function(e,t,n,r){n!==r&&o(t)}):r(l?"235":"236"),{completeWork:function(e,t,n){var l=t.pendingProps;switch(null===l?l=t.memoizedProps:2147483647===t.expirationTime&&2147483647!==n||(t.pendingProps=null),t.tag){case 1:return null;case 2:return et(t),null;case 3:return h(t),Ye(yo,t),Ye(ho,t),l=t.stateNode,l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),null!==e&&null!==e.child||(m(t),t.effectTag&=-3),v(t),null;case 5:p(t),n=f();var w=t.type;if(null!==e&&null!=t.stateNode){var k=e.memoizedProps,E=t.stateNode,C=d();E=c(E,w,k,l,n,C),b(e,t,E,w,k,l,n),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!l)return null===t.stateNode&&r("166"),null;if(e=d(),m(t))y(t,n,e)&&o(t);else{e=i(w,l,n,e,t);e:for(k=t.child;null!==k;){if(5===k.tag||6===k.tag)s(e,k.stateNode);else if(4!==k.tag&&null!==k.child){k.child.return=k,k=k.child;continue}if(k===t)break;for(;null===k.sibling;){if(null===k.return||k.return===t)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}u(e,w,l,n)&&o(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)_(e,t,e.memoizedProps,l);else{if("string"!==typeof l)return null===t.stateNode&&r("166"),null;e=f(),n=d(),m(t)?g(t)&&o(t):t.stateNode=a(l,e,n,t)}return null;case 7:(l=t.memoizedProps)||r("165"),t.tag=8,w=[];e:for((k=t.stateNode)&&(k.return=t);null!==k;){if(5===k.tag||6===k.tag||4===k.tag)r("247");else if(9===k.tag)w.push(k.type);else if(null!==k.child){k.child.return=k,k=k.child;continue}for(;null===k.sibling;){if(null===k.return||k.return===t)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}return k=l.handler,l=k(l.props,w),t.child=So(t,null!==e?e.child:null,l,n),t.child;case 8:return t.tag=7,null;case 9:case 10:return null;case 4:return h(t),v(t),null;case 0:r("167");default:r("156")}}}}function Nt(e,t){function n(e){var n=e.ref;if(null!==n)try{n(null)}catch(n){t(e,n)}}function o(e){switch("function"===typeof gt&>(e),e.tag){case 2:n(e);var r=e.stateNode;if("function"===typeof r.componentWillUnmount)try{r.props=e.memoizedProps,r.state=e.memoizedState,r.componentWillUnmount()}catch(n){t(e,n)}break;case 5:n(e);break;case 7:i(e.stateNode);break;case 4:c&&s(e)}}function i(e){for(var t=e;;)if(o(t),null===t.child||c&&4===t.tag){if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}else t.child.return=t,t=t.child}function a(e){return 5===e.tag||3===e.tag||4===e.tag}function s(e){for(var t=e,n=!1,a=void 0,s=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:a=n.stateNode,s=!1;break e;case 3:case 4:a=n.stateNode.containerInfo,s=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag)i(t),s?b(a,t.stateNode):v(a,t.stateNode);else if(4===t.tag?a=t.stateNode.containerInfo:o(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,4===t.tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}var u=e.getPublicInstance,c=e.mutation;e=e.persistence,c||r(e?"235":"236");var l=c.commitMount,f=c.commitUpdate,p=c.resetTextContent,d=c.commitTextUpdate,h=c.appendChild,y=c.appendChildToContainer,g=c.insertBefore,m=c.insertInContainerBefore,v=c.removeChild,b=c.removeChildFromContainer;return{commitResetTextContent:function(e){p(e.stateNode)},commitPlacement:function(e){e:{for(var t=e.return;null!==t;){if(a(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var o=t=void 0;switch(n.tag){case 5:t=n.stateNode,o=!1;break;case 3:case 4:t=n.stateNode.containerInfo,o=!0;break;default:r("161")}16&n.effectTag&&(p(t),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||a(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){if(5===i.tag||6===i.tag)n?o?m(t,i.stateNode,n):g(t,i.stateNode,n):o?y(t,i.stateNode):h(t,i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},commitDeletion:function(e){s(e),e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)},commitWork:function(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var o=t.memoizedProps;e=null!==e?e.memoizedProps:o;var i=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&f(n,a,i,e,o,t)}break;case 6:null===t.stateNode&&r("162"),n=t.memoizedProps,d(t.stateNode,null!==e?e.memoizedProps:n,n);break;case 3:break;default:r("163")}},commitLifeCycles:function(e,t){switch(t.tag){case 2:var n=t.stateNode;if(4&t.effectTag)if(null===e)n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidMount();else{var o=e.memoizedProps;e=e.memoizedState,n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidUpdate(o,e)}t=t.updateQueue,null!==t&&kt(t,n);break;case 3:n=t.updateQueue,null!==n&&kt(n,null!==t.child?t.child.stateNode:null);break;case 5:n=t.stateNode,null===e&&4&t.effectTag&&l(n,t.type,t.memoizedProps,t);break;case 6:case 4:break;default:r("163")}},commitAttachRef:function(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case 5:t(u(n));break;default:t(n)}}},commitDetachRef:function(e){null!==(e=e.ref)&&e(null)}}}function Mt(e){function t(e){return e===Oo&&r("174"),e}var n=e.getChildHostContext,o=e.getRootHostContext,i={current:Oo},a={current:Oo},s={current:Oo};return{getHostContext:function(){return t(i.current)},getRootHostContainer:function(){return t(s.current)},popHostContainer:function(e){Ye(i,e),Ye(a,e),Ye(s,e)},popHostContext:function(e){a.current===e&&(Ye(i,e),Ye(a,e))},pushHostContainer:function(e,t){Qe(s,t,e),t=o(t),Qe(a,e,e),Qe(i,t,e)},pushHostContext:function(e){var r=t(s.current),o=t(i.current);r=n(o,e.type,r),o!==r&&(Qe(a,e,e),Qe(i,r,e))},resetHostContainer:function(){i.current=Oo,s.current=Oo}}}function jt(e){function t(e,t){var n=new it(5,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function n(e,t){switch(e.tag){case 5:return null!==(t=a(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=s(t,e.pendingProps))&&(e.stateNode=t,!0);default:return!1}}function o(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;p=e}var i=e.shouldSetTextContent;if(!(e=e.hydration))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){r("175")},prepareToHydrateHostTextInstance:function(){r("176")},popHydrationState:function(){return!1}};var a=e.canHydrateInstance,s=e.canHydrateTextInstance,u=e.getNextHydratableSibling,c=e.getFirstHydratableChild,l=e.hydrateInstance,f=e.hydrateTextInstance,p=null,d=null,h=!1;return{enterHydrationState:function(e){return d=c(e.stateNode.containerInfo),p=e,h=!0},resetHydrationState:function(){d=p=null,h=!1},tryToClaimNextHydratableInstance:function(e){if(h){var r=d;if(r){if(!n(e,r)){if(!(r=u(r))||!n(e,r))return e.effectTag|=2,h=!1,void(p=e);t(p,d)}p=e,d=c(r)}else e.effectTag|=2,h=!1,p=e}},prepareToHydrateHostInstance:function(e,t,n){return t=l(e.stateNode,e.type,e.memoizedProps,t,n,e),e.updateQueue=t,null!==t},prepareToHydrateHostTextInstance:function(e){return f(e.stateNode,e.memoizedProps,e)},popHydrationState:function(e){if(e!==p)return!1;if(!h)return o(e),h=!0,!1;var n=e.type;if(5!==e.tag||"head"!==n&&"body"!==n&&!i(n,e.memoizedProps))for(n=d;n;)t(e,n),n=u(n);return o(e),d=p?u(e.stateNode):null,!0}}}function At(e){function t(e){ie=Y=!0;var t=e.stateNode;if(t.current===e&&r("177"),t.isReadyForCommit=!1,Br.current=null,1a.expirationTime)&&(i=a.expirationTime),a=a.sibling;o.expirationTime=i}if(null!==t)return t;if(null!==n&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1e))if(J<=W)for(;null!==Q;)Q=c(Q)?i(Q):o(Q);else for(;null!==Q&&!k();)Q=c(Q)?i(Q):o(Q)}else if(!(0===J||J>e))if(J<=W)for(;null!==Q;)Q=o(Q);else for(;null!==Q&&!k();)Q=o(Q)}function s(e,t){if(Y&&r("243"),Y=!0,e.isReadyForCommit=!1,e!==X||t!==J||null===Q){for(;-1t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!Y&&n===X&&t_e&&r("185"),null===o.nextScheduledRoot)o.remainingExpirationTime=i,null===ue?(se=ue=o,o.nextScheduledRoot=o):(ue=ue.nextScheduledRoot=o,ue.nextScheduledRoot=se);else{var a=o.remainingExpirationTime;(0===a||ice)return;K(le)}var t=H()-V;ce=e,le=B(b,{timeout:10*(e-2)-t})}function v(){var e=0,t=null;if(null!==ue)for(var n=ue,o=se;null!==o;){var i=o.remainingExpirationTime;if(0===i){if((null===n||null===ue)&&r("244"),o===o.nextScheduledRoot){se=ue=o.nextScheduledRoot=null;break}if(o===se)se=i=o.nextScheduledRoot,ue.nextScheduledRoot=i,o.nextScheduledRoot=null;else{if(o===ue){ue=n,ue.nextScheduledRoot=se,o.nextScheduledRoot=null;break}n.nextScheduledRoot=o.nextScheduledRoot,o.nextScheduledRoot=null}o=n.nextScheduledRoot}else{if((0===e||iEe)&&(he=!0)}function E(e){null===pe&&r("246"),pe.remainingExpirationTime=0,ye||(ye=!0,ge=e)}var C=Mt(e),x=jt(e),T=C.popHostContainer,S=C.popHostContext,P=C.resetHostContainer,O=Pt(e,C,x,d,p),N=O.beginWork,M=O.beginFailedWork,j=Ot(e,C,x).completeWork;C=Nt(e,u);var A=C.commitResetTextContent,R=C.commitPlacement,I=C.commitDeletion,D=C.commitWork,U=C.commitLifeCycles,L=C.commitAttachRef,F=C.commitDetachRef,H=e.now,B=e.scheduleDeferredCallback,K=e.cancelDeferredCallback,z=e.useSyncScheduling,q=e.prepareForCommit,G=e.resetAfterCommit,V=H(),W=2,$=0,Y=!1,Q=null,X=null,J=0,Z=null,ee=null,te=null,ne=null,re=null,oe=!1,ie=!1,ae=!1,se=null,ue=null,ce=0,le=-1,fe=!1,pe=null,de=0,he=!1,ye=!1,ge=null,me=null,ve=!1,be=!1,_e=1e3,ke=0,Ee=1;return{computeAsyncExpiration:f,computeExpirationForFiber:p,scheduleWork:d,batchedUpdates:function(e,t){var n=ve;ve=!0;try{return e(t)}finally{(ve=n)||fe||_(1,null)}},unbatchedUpdates:function(e){if(ve&&!be){be=!0;try{return e()}finally{be=!1}}return e()},flushSync:function(e){var t=ve;ve=!0;try{e:{var n=$;$=1;try{var o=e();break e}finally{$=n}o=void 0}return o}finally{ve=t,fe&&r("187"),_(1,null)}},deferredUpdates:function(e){var t=$;$=f();try{return e()}finally{$=t}}}}function Rt(e){function t(e){return e=Te(e),null===e?null:e.stateNode}var n=e.getPublicInstance;e=At(e);var o=e.computeAsyncExpiration,i=e.computeExpirationForFiber,a=e.scheduleWork;return{createContainer:function(e,t){var n=new it(3,null,0);return e={current:n,containerInfo:e,pendingChildren:null,remainingExpirationTime:0,isReadyForCommit:!1,finishedWork:null,context:null,pendingContext:null,hydrate:t,nextScheduledRoot:null},n.stateNode=e},updateContainer:function(e,t,n,s){var u=t.current;if(n){n=n._reactInternalFiber;var c;e:{for(2===ke(n)&&2===n.tag||r("170"),c=n;3!==c.tag;){if(Ze(c)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}(c=c.return)||r("171")}c=c.stateNode.context}n=Ze(n)?nt(n,c):c}else n=Pn;null===t.context?t.context=n:t.pendingContext=n,t=s,t=void 0===t?null:t,s=null!=e&&null!=e.type&&null!=e.type.prototype&&!0===e.type.prototype.unstable_isAsyncReactComponent?o():i(u),bt(u,{expirationTime:s,partialState:{element:e},callback:t,isReplace:!1,isForced:!1,nextCallback:null,next:null}),a(u,s)},batchedUpdates:e.batchedUpdates,unbatchedUpdates:e.unbatchedUpdates,deferredUpdates:e.deferredUpdates,flushSync:e.flushSync,getPublicRootInstance:function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return n(e.child.stateNode);default:return e.child.stateNode}},findHostInstance:t,findHostInstanceWithNoPortals:function(e){return e=Se(e),null===e?null:e.stateNode},injectIntoDevTools:function(e){var n=e.findFiberByHostInstance;return ht(wn({},e,{findHostInstanceByFiber:function(e){return t(e)},findFiberByHostInstance:function(e){return n?n(e):null}}))}}}function It(e,t,n){var r=3n||r.hasOverloadedBooleanValue&&!1===n?Ft(e,t):r.mustUseProperty?e[r.propertyName]=n:(t=r.attributeName,(o=r.attributeNamespace)?e.setAttributeNS(o,t,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&!0===n?e.setAttribute(t,""):e.setAttribute(t,""+n))}else Lt(e,t,i(t,n)?n:null)}function Lt(e,t,n){Dt(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))}function Ft(e,t){var n=a(t);n?(t=n.mutationMethod)?t(e,void 0):n.mustUseProperty?e[n.propertyName]=!n.hasBooleanValue&&"":e.removeAttribute(n.attributeName):e.removeAttribute(t)}function Ht(e,t){var n=t.value,r=t.checked;return wn({type:void 0,step:void 0,min:void 0,max:void 0},t,{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked})}function Bt(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:null!=t.value?t.value:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Kt(e,t){null!=(t=t.checked)&&Ut(e,"checked",t)}function zt(e,t){Kt(e,t);var n=t.value;null!=n?0===n&&""===e.value?e.value="0":"number"===t.type?(t=parseFloat(e.value)||0,(n!=t||n==t&&e.value!=n)&&(e.value=""+n)):e.value!==""+n&&(e.value=""+n):(null==t.value&&null!=t.defaultValue&&e.defaultValue!==""+t.defaultValue&&(e.defaultValue=""+t.defaultValue),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked))}function qt(e,t){switch(t.type){case"submit":case"reset":break;case"color":case"date":case"datetime":case"datetime-local":case"month":case"time":case"week":e.value="",e.value=e.defaultValue;break;default:e.value=e.value}t=e.name,""!==t&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==t&&(e.name=t)}function Gt(e){var t="";return bn.Children.forEach(e,function(e){null==e||"string"!==typeof e&&"number"!==typeof e||(t+=e)}),t}function Vt(e,t){return e=wn({children:void 0},t),(t=Gt(t.children))&&(e.children=t),e}function Wt(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function Xt(e,t){var n=t.value;null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function Jt(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function Zt(e){switch(e){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 en(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Zt(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function tn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function nn(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,i=t[n];o=null==i||"boolean"===typeof i||""===i?"":r||"number"!==typeof i||0===i||Zo.hasOwnProperty(o)&&Zo[o]?(""+i).trim():i+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}function rn(e,t,n){t&&(ti[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"===typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!==typeof t.style&&r("62",n()))}function on(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){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}}function an(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var n=Ie(e);t=Qn[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"===typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function un(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function cn(e,t,n,r){var o=on(t,n);switch(t){case"iframe":case"object":Ne("topLoad","load",e);var i=n;break;case"video":case"audio":for(i in oi)oi.hasOwnProperty(i)&&Ne(i,oi[i],e);i=n;break;case"source":Ne("topError","error",e),i=n;break;case"img":case"image":Ne("topError","error",e),Ne("topLoad","load",e),i=n;break;case"form":Ne("topReset","reset",e),Ne("topSubmit","submit",e),i=n;break;case"details":Ne("topToggle","toggle",e),i=n;break;case"input":Bt(e,n),i=Ht(e,n),Ne("topInvalid","invalid",e),an(r,"onChange");break;case"option":i=Vt(e,n);break;case"select":$t(e,n),i=wn({},n,{value:void 0}),Ne("topInvalid","invalid",e),an(r,"onChange");break;case"textarea":Qt(e,n),i=Yt(e,n),Ne("topInvalid","invalid",e),an(r,"onChange");break;default:i=n}rn(t,i,ri);var a,s=i;for(a in s)if(s.hasOwnProperty(a)){var u=s[a];"style"===a?nn(e,u,ri):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&Jo(e,u):"children"===a?"string"===typeof u?("textarea"!==t||""!==u)&&tn(e,u):"number"===typeof u&&tn(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(Yn.hasOwnProperty(a)?null!=u&&an(r,a):o?Lt(e,a,u):null!=u&&Ut(e,a,u))}switch(t){case"input":ie(e),qt(e,n);break;case"textarea":ie(e),Jt(e,n);break;case"option":null!=n.value&&e.setAttribute("value",n.value);break;case"select":e.multiple=!!n.multiple,t=n.value,null!=t?Wt(e,!!n.multiple,t,!1):null!=n.defaultValue&&Wt(e,!!n.multiple,n.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=kn)}}function ln(e,t,n,r,o){var i=null;switch(t){case"input":n=Ht(e,n),r=Ht(e,r),i=[];break;case"option":n=Vt(e,n),r=Vt(e,r),i=[];break;case"select":n=wn({},n,{value:void 0}),r=wn({},r,{value:void 0}),i=[];break;case"textarea":n=Yt(e,n),r=Yt(e,r),i=[];break;default:"function"!==typeof n.onClick&&"function"===typeof r.onClick&&(e.onclick=kn)}rn(t,r,ri);var a,s;e=null;for(a in n)if(!r.hasOwnProperty(a)&&n.hasOwnProperty(a)&&null!=n[a])if("style"===a)for(s in t=n[a])t.hasOwnProperty(s)&&(e||(e={}),e[s]="");else"dangerouslySetInnerHTML"!==a&&"children"!==a&&"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(Yn.hasOwnProperty(a)?i||(i=[]):(i=i||[]).push(a,null));for(a in r){var u=r[a];if(t=null!=n?n[a]:void 0,r.hasOwnProperty(a)&&u!==t&&(null!=u||null!=t))if("style"===a)if(t){for(s in t)!t.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(e||(e={}),e[s]="");for(s in u)u.hasOwnProperty(s)&&t[s]!==u[s]&&(e||(e={}),e[s]=u[s])}else e||(i||(i=[]),i.push(a,e)),e=u;else"dangerouslySetInnerHTML"===a?(u=u?u.__html:void 0,t=t?t.__html:void 0,null!=u&&t!==u&&(i=i||[]).push(a,""+u)):"children"===a?t===u||"string"!==typeof u&&"number"!==typeof u||(i=i||[]).push(a,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&(Yn.hasOwnProperty(a)?(null!=u&&an(o,a),i||t===u||(i=[])):(i=i||[]).push(a,u))}return e&&(i=i||[]).push("style",e),i}function fn(e,t,n,r,o){"input"===n&&"radio"===o.type&&null!=o.name&&Kt(e,o),on(n,r),r=on(n,o);for(var i=0;i=u.hasBooleanValue+u.hasNumericValue+u.hasOverloadedBooleanValue||r("50",s),a.hasOwnProperty(s)&&(u.attributeName=a[s]),i.hasOwnProperty(s)&&(u.attributeNamespace=i[s]),e.hasOwnProperty(s)&&(u.mutationMethod=e[s]),Mn[s]=u}}},Mn={},jn=Nn,An=jn.MUST_USE_PROPERTY,Rn=jn.HAS_BOOLEAN_VALUE,In=jn.HAS_NUMERIC_VALUE,Dn=jn.HAS_POSITIVE_NUMERIC_VALUE,Un=jn.HAS_OVERLOADED_BOOLEAN_VALUE,Ln=jn.HAS_STRING_BOOLEAN_VALUE,Fn={Properties:{allowFullScreen:Rn,async:Rn,autoFocus:Rn,autoPlay:Rn,capture:Un,checked:An|Rn,cols:Dn,contentEditable:Ln,controls:Rn,default:Rn,defer:Rn,disabled:Rn,download:Un,draggable:Ln,formNoValidate:Rn,hidden:Rn,loop:Rn,multiple:An|Rn,muted:An|Rn,noValidate:Rn,open:Rn,playsInline:Rn,readOnly:Rn,required:Rn,reversed:Rn,rows:Dn,rowSpan:In,scoped:Rn,seamless:Rn,selected:An|Rn,size:Dn,start:In,span:Dn,spellCheck:Ln,style:0,tabIndex:0,itemScope:Rn,acceptCharset:0,className:0,htmlFor:0,httpEquiv:0,value:Ln},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMMutationMethods:{value:function(e,t){if(null==t)return e.removeAttribute("value");"number"!==e.type||!1===e.hasAttribute("value")?e.setAttribute("value",""+t):e.validity&&!e.validity.badInput&&e.ownerDocument.activeElement!==e&&e.setAttribute("value",""+t)}}},Hn=jn.HAS_STRING_BOOLEAN_VALUE,Bn={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Kn={Properties:{autoReverse:Hn,externalResourcesRequired:Hn,preserveAlpha:Hn},DOMAttributeNames:{autoReverse:"autoReverse",externalResourcesRequired:"externalResourcesRequired",preserveAlpha:"preserveAlpha"},DOMAttributeNamespaces:{xlinkActuate:Bn.xlink,xlinkArcrole:Bn.xlink,xlinkHref:Bn.xlink,xlinkRole:Bn.xlink,xlinkShow:Bn.xlink,xlinkTitle:Bn.xlink,xlinkType:Bn.xlink,xmlBase:Bn.xml,xmlLang:Bn.xml,xmlSpace:Bn.xml}},zn=/[\-\:]([a-z])/g;"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 x-height xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xmlns:xlink xml:lang xml:space".split(" ").forEach(function(e){var t=e.replace(zn,s);Kn.Properties[t]=0,Kn.DOMAttributeNames[t]=e}),jn.injectDOMPropertyConfig(Fn),jn.injectDOMPropertyConfig(Kn);var qn={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,injection:{injectErrorUtils:function(e){"function"!==typeof e.invokeGuardedCallback&&r("197"),u=e.invokeGuardedCallback}},invokeGuardedCallback:function(e,t,n,r,o,i,a,s,c){u.apply(qn,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,o,i,a,s,u){if(qn.invokeGuardedCallback.apply(this,arguments),qn.hasCaughtError()){var c=qn.clearCaughtError();qn._hasRethrowError||(qn._hasRethrowError=!0,qn._rethrowError=c)}},rethrowCaughtError:function(){return c.apply(qn,arguments)},hasCaughtError:function(){return qn._hasCaughtError},clearCaughtError:function(){if(qn._hasCaughtError){var e=qn._caughtError;return qn._caughtError=null,qn._hasCaughtError=!1,e}r("198")}},Gn=null,Vn={},Wn=[],$n={},Yn={},Qn={},Xn=Object.freeze({plugins:Wn,eventNameDispatchConfigs:$n,registrationNameModules:Yn,registrationNameDependencies:Qn,possibleRegistrationNames:null,injectEventPluginOrder:p,injectEventPluginsByName:d}),Jn=null,Zn=null,er=null,tr=null,nr={injectEventPluginOrder:p,injectEventPluginsByName:d},rr=Object.freeze({injection:nr,getListener:_,extractEvents:w,enqueueEvents:k,processEventQueue:E}),or=Math.random().toString(36).slice(2),ir="__reactInternalInstance$"+or,ar="__reactEventHandlers$"+or,sr=Object.freeze({precacheFiberNode:function(e,t){t[ir]=e},getClosestInstanceFromNode:C,getInstanceFromNode:function(e){return e=e[ir],!e||5!==e.tag&&6!==e.tag?null:e},getNodeFromInstance:x,getFiberCurrentPropsFromNode:T,updateFiberProps:function(e,t){e[ar]=t}}),ur=Object.freeze({accumulateTwoPhaseDispatches:R,accumulateTwoPhaseDispatchesSkipTarget:function(e){g(e,M)},accumulateEnterLeaveDispatches:I,accumulateDirectDispatches:function(e){g(e,A)}}),cr=null,lr={_root:null,_startText:null,_fallbackText:null},fr="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),pr={type:null,target:null,currentTarget:kn.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};wn(F.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=kn.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=kn.thatReturnsTrue)},persist:function(){this.isPersistent=kn.thatReturnsTrue},isPersistent:kn.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t=parseInt(mr.version(),10))}var vr,br=gr,_r=_n.canUseDOM&&(!hr||yr&&8=yr),wr=String.fromCharCode(32),kr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},Er=!1,Cr=!1,xr={eventTypes:kr,extractEvents:function(e,t,n,r){var o;if(hr)e:{switch(e){case"topCompositionStart":var i=kr.compositionStart;break e;case"topCompositionEnd":i=kr.compositionEnd;break e;case"topCompositionUpdate":i=kr.compositionUpdate;break e}i=void 0}else Cr?G(e,n)&&(i=kr.compositionEnd):"topKeyDown"===e&&229===n.keyCode&&(i=kr.compositionStart);return i?(_r&&(Cr||i!==kr.compositionStart?i===kr.compositionEnd&&Cr&&(o=U()):(lr._root=r,lr._startText=L(),Cr=!0)),i=z.getPooled(i,t,n,r),o?i.data=o:null!==(o=V(n))&&(i.data=o),R(i),o=i):o=null,(e=br?W(e,n):$(e,n))?(t=q.getPooled(kr.beforeInput,t,n,r),t.data=e,R(t)):t=null,[o,t]}},Tr=null,Sr=null,Pr=null,Or={injectFiberControlledHostComponent:function(e){Tr=e}},Nr=Object.freeze({injection:Or,enqueueStateRestore:Q,restoreStateIfNeeded:X}),Mr=!1,jr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};_n.canUseDOM&&(vr=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""));var Ar={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}},Rr=null,Ir=null,Dr=!1;_n.canUseDOM&&(Dr=ne("input")&&(!document.documentMode||9=document.documentMode,eo={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},to=null,no=null,ro=null,oo=!1,io={eventTypes:eo,extractEvents:function(e,t,n,r){var o,i=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!i)){e:{i=Ie(i),o=Qn.onSelect;for(var a=0;a=Ko-e){if(!(-1!==Ho&&Ho<=e))return void(Bo||(Bo=!0,requestAnimationFrame(Vo)));Uo.didTimeout=!0}else Uo.didTimeout=!1;Ho=-1,e=Lo,Lo=null,null!==e&&e(Uo)}},!1);var Vo=function(e){Bo=!1;var t=e-Ko+qo;tt&&(t=8),qo=t"+t+"",t=Xo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),Zo={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,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,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ei=["Webkit","ms","Moz","O"];Object.keys(Zo).forEach(function(e){ei.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zo[t]=Zo[e]})});var ti=wn({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}),ni=Qo.html,ri=kn.thatReturns(""),oi={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},ii=Object.freeze({createElement:sn,createTextNode:un,setInitialProperties:cn,diffProperties:ln,updateProperties:fn,diffHydratedProperties:pn,diffHydratedText:dn,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(zt(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;tr&&(o=r,r=e,e=o),o=Ue(n,e);var i=Ue(n,r);if(o&&i&&(1!==t.rangeCount||t.anchorNode!==o.node||t.anchorOffset!==o.offset||t.focusNode!==i.node||t.focusOffset!==i.offset)){var a=document.createRange();a.setStart(o.node,o.offset),t.removeAllRanges(),e>r?(t.addRange(a),t.extend(i.node,i.offset)):(a.setEnd(i.node,i.offset),t.addRange(a))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(Sn(n),n=0;n1)for(var n=1;n1&&void 0!==arguments[1]?arguments[1]:{};return n.chatEngine._emit(e,t,n),n.emitter.emit(e,t),n},n.on=function(e,t){return n.events[e]=n.events[e]||new l(n.chatEngine,n,e),n._on(e,t),n},n}return i(t,e),s(t,[{key:"addChild",value:function(e,t){this[e]=t,this._dataset[e]||(this._dataset[e]={}),t.parent=this,t.get=this.get.bind(this._dataset[e]),t.set=this.set.bind(this._dataset[e])}},{key:"get",value:function(e){return this[e]}},{key:"set",value:function(e,t){this[e]&&!t?delete this[e]:this[e]=t}},{key:"plugin",value:function(e){return this.plugins.push(e),e.extends&&e.extends[this.name]&&(this.addChild(e.namespace,new e.extends[this.name]),this[e.namespace].ChatEngine=this.chatEngine,this[e.namespace].construct&&this[e.namespace].construct()),this}},{key:"bindProtoPlugins",value:function(){var e=this;this.chatEngine.protoPlugins[this.name]&&this.chatEngine.protoPlugins[this.name].forEach(function(t){e.plugin(t)})}},{key:"trigger",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=function(){t.runPluginQueue("on",e,function(e){e(null,n)},function(n,o){n?r(n):(t._emit(e,o),r(null,e,o))})};"object"===("undefined"===typeof n?"undefined":a(n))?(n.chat||(n.chat=this),n.sender&&"string"===typeof n.sender?(n.sender=new this.chatEngine.User(n.sender),n.sender._getState(function(){o()})):o()):o()}},{key:"runPluginQueue",value:function(e,t,n,r){var o=[];o.push(n),this.plugins.forEach(function(n){n.middleware&&n.middleware[e]&&(n.middleware[e][t]&&o.push(n.middleware[e][t]),n.middleware[e]["*"]&&o.push(n.middleware[e]["*"]))}),u(o,r)}},{key:"onConstructed",value:function(){this.bindProtoPlugins(),this.trigger(["$","created",this.name.toLowerCase()].join("."))}}]),t}(c);e.exports=f},function(e,t,n){"use strict";(function(t){function r(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var o=n(0),i=n(38),a={"Content-Type":"application/x-www-form-urlencoded"},s={adapter:function(){var e;return"undefined"!==typeof XMLHttpRequest?e=n(14):"undefined"!==typeof t&&(e=n(14)),e}(),transformRequest:[function(e,t){return i(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(e){s.headers[e]={}}),o.forEach(["post","put","patch"],function(e){s.headers[e]=o.merge(a)}),e.exports=s}).call(t,n(1))},function(e,t,n){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(55).EventEmitter2,i=function e(){var t=this;r(this,e),this.events={},this.name="RootEmitter",this.emitter=new o({wildcard:!0,newListener:!0,maxListeners:50,verboseMemoryLeak:!0}),this._emit=this.emitter.emit.bind(this.emitter),this._on=this.emitter.on.bind(this.emitter),this.on=function(e,n){return t.emitter.on(e,n),t},this.off=function(e,n){return t.emitter.off(e,n),t},this.onAny=function(e,n){return t.emitter.onAny(e,n),t},this.once=function(e,n){return t.emitter.once(e,n),t}};e.exports=i},function(e,t,n){"use strict";function r(){}e.exports=r},function(e,t,n){"use strict";var r,o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"===typeof window?"undefined":o(window))&&(r=window)}e.exports=r},function(e,t,n){"use strict";function r(e){return null!=e&&i(e.length)&&!o(e)}var o=n(66),i=n(28);e.exports=r},function(e,t,n){"use strict";function r(e){return null==e?void 0===e?u:s:c&&c in Object(e)?i(e):a(e)}var o=n(25),i=n(67),a=n(68),s="[object Null]",u="[object Undefined]",c=o?o.toStringTag:void 0;e.exports=r},function(e,t,n){"use strict";function r(e){return null!=e&&"object"==("undefined"===typeof e?"undefined":o(e))}var o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r-1&&e%1==0&&e<=o}var o=9007199254740991;e.exports=r},function(e,t,n){"use strict";function r(e,t){return function(n,r,o){return e(n,t,r,o)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};r(this,t);var s=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return s.chatEngine=e,s.name="User","string"!==typeof n&&s.chatEngine.throwError(s,"trigger","construct",new Error("UUID must be of type string")),s.uuid=n,s.state={},s._stateFetched=!1,s._stateInProgress=!1,s.feed=new s.chatEngine.Chat([e.global.channel,"user",n,"read.","feed"].join("#"),!1,"Me"===s.constructor.name,{},"system"),s.direct=new s.chatEngine.Chat([e.global.channel,"user",n,"write.","direct"].join("#"),!1,"Me"===s.constructor.name,{},"system"),e.users[n]||(e.users[n]=s),s.assign(a),i=s,o(s,i)}return i(t,e),a(t,[{key:"update",value:function(e){var t=this.state||{};this.state=Object.assign(t,e)}},{key:"assign",value:function(e){this.update(e)}},{key:"_getState",value:function(e){var t=this;this._stateFetched||this._stateInProgress?e(this.state):(this._stateInProgress=!0,this.chatEngine.pubnub.getState({uuid:this.uuid,channels:[this.chatEngine.global.channel]},function(n,r){if(200===n.statusCode){var o=r.channels[t.chatEngine.global.channel];Object.keys(o).length?(t.assign(r.data),t._stateFetched=!0,e(t.state)):t.chatEngine.request("get","user_state",{user:t.uuid}).then(function(n){t.assign(n.data),t._stateFetched=!0,e(t.state)}).catch(function(e){t.chatEngine.throwError(t,"trigger","getState",e)})}else t.chatEngine.throwError(t,"trigger","getState",new Error("There was a problem getting user state from the PubNub network."))}))}}]),t}(s);e.exports=u},function(e,t,n){e.exports=n(32)},function(e,t,n){"use strict";var r=n(33),o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.globalChannel?t.globalChannel=t.globalChannel.toString():t.globalChannel="chat-engine","undefined"===typeof t.throwErrors&&(t.throwErrors=!0),"undefined"===typeof t.enableSync&&(t.enableSync=!1),t.endpoint=t.endpoint||"https://pubsub.pubnub.com/v1/blocks/sub-key/"+e.subscribeKey+"/chat-engine-server",e.heartbeatInterval=e.heartbeatInterval||30,e.presenceTimeout=e.presenceTimeout||60,r(t,e)},i={plugin:{},create:o};e.exports=i,e.exports.ChatEngineCore=i},function(e,t,n){"use strict";var r=n(34),o=n(53),i=n(54),a=n(7),s=n(56),u=n(88),c=n(30),l=n(90);e.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new a;if(n.ceConfig=e,n.pnConfig=t,n.users={},n.chats={},n.global=!1,n.me=!1,n.pubnub=!1,n.ready=!1,n.package=i,n.throwError=function(t,n,r,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(e.throwErrors)throw console.error(i),o;i.ceError=o.toString(),t[n](["$","error",r].join("."),i)},e.debug&&n.onAny(function(e,t){console.info("debug:",e,t)}),e.profile){var f={};n.onAny(function(e,t){f["event: "+e]=f[e]||0,f["event: "+e]+=1}),setInterval(function(){f.chats=Object.keys(n.chats).length,f.users=Object.keys(n.users).length,console.table(f)},3e3)}return n.protoPlugins={},n.proto=function(e,t){n.protoPlugins[e]=n.protoPlugins[e]||[],n.protoPlugins[e].push(t)},n.request=function(t,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s={uuid:n.pnConfig.uuid,global:e.globalChannel,authKey:n.pnConfig.authKey},u={route:o};return s=Object.assign(s,i),u=Object.assign(u,a),"get"===t||"delete"===t?(u=Object.assign(u,s),r[t](e.endpoint,{params:u})):r[t](e.endpoint,s,{params:u})},n.parseChannel=function(e){var t=e.split("#");return{global:t[0],type:t[1],private:"private."===t[2]}},n.augmentChannel=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(new Date).getTime(),t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=e.toString(),o="public.";return t&&(o="private."),-1===r.indexOf(n.ceConfig.globalChannel)&&(r=[n.ceConfig.globalChannel,"chat",o,r].join("#")),r},n.handshake=function(t){l([function(e){n.request("post","bootstrap").then(function(){e(null)}).catch(e)},function(e){n.request("post","user_read").then(function(){e(null)}).catch(e)},function(e){n.request("post","user_write").then(function(){e(null)}).catch(e)},function(e){n.request("post","group").then(t).catch(e)}],function(t){t&&n.throwError(n,"_emit","auth",new Error("There was a problem logging into the auth server ("+e.endpoint+")."+t&&t.response&&t.response.data),{error:t})})},n.listenToPubNub=function(){n.pubnub.addListener({message:function(e){e.message.timetoken=e.timetoken,n.chats[e.channel]&&n.chats[e.channel].trigger(e.message.event,e.message)},presence:function(e){n.chats[e.channel]&&n.chats[e.channel].onPresence(e)},status:function(e){var t={PNNetworkUpCategory:"up.online",PNNetworkDownCategory:"down.offline",PNNetworkIssuesCategory:"down.issue",PNReconnectedCategory:"up.reconnected",PNConnectedCategory:"up.connected",PNAccessDeniedCategory:"down.denied",PNMalformedResponseCategory:"down.malformed",PNBadRequestCategory:"down.badrequest",PNDecryptionErrorCategory:"down.decryption",PNTimeoutCategory:"down.timeout"},r=["$","network",t[e.category]||"other"].join(".");n._emit(r,e)}})},n.subscribeToPubNub=function(){var t=[e.globalChannel+"#"+n.me.uuid+"#rooms",e.globalChannel+"#"+n.me.uuid+"#system",e.globalChannel+"#"+n.me.uuid+"#custom"];n.pubnub.subscribe({channelGroups:t,withPresence:!0})},n.firstConnect=function(t){n.pubnub=new o(n.pnConfig),n.global=new n.Chat(e.globalChannel,!1,!0,{},"system"),n.global.once("$.connected",function(){n.me=new u(n,n.pnConfig.uuid),n.me.onConstructed(),n.ceConfig.enableSync&&(n.me.session.subscribe(),n.me.session.restore()),n.me.update(t),n._emit("$.ready",{me:n.me}),n.ready=!0,n.listenToPubNub(),n.subscribeToPubNub(),n.global.getUserUpdates()})},n.disconnect=function(){n.pubnub.unsubscribeAll(),Object.keys(n.chats).forEach(function(e){n.chats[e].sleep()})},n.reconnect=function(){n.handshake(function(){Object.keys(n.chats).forEach(function(e){n.chats[e].wake()}),n.subscribeToPubNub()})},n.setAuth=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.generateUUID();n.pnConfig.authKey=e,n.pubnub.setAuthKey(e)},n.reauthorize=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.generateUUID();n.global.once("$.disconnected",function(){n.setAuth(e),n.reconnect()}),n.disconnect()},n.connect=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.generateUUID();n.pnConfig.uuid=e,n.pnConfig.authKey=r,n.handshake(function(){n.firstConnect(t)})},n.destroy=function(){Object.keys(n.chats).forEach(function(e){n.chats[e].emitter.removeAllListeners()}),Object.keys(n.users).forEach(function(e){n.users[e].emitter.removeAllListeners()}),n.emitter.removeAllListeners()},n.Chat=function(){for(var e=arguments.length,t=Array(e),r=0;r>8-s%1*8)){if((n=o.charCodeAt(s+=.75))>255)throw new r;t=t<<8|n}return a}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",e.exports=o},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(0);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(0),i=n(48),a=n(16),s=n(5);e.exports=function(e){return r(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return r(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(r(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";function r(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(17);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r(function(t){e=t}),cancel:e}},e.exports=r},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";(function(e){var n,r,o,i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a,s){"object"==i(t)&&"object"==i(e)?e.exports=s():(r=[],n=s,void 0!==(o="function"===typeof n?n.apply(t,r):n)&&(e.exports=o))}(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"===typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){if(!navigator||!navigator.sendBeacon)return!1;navigator.sendBeacon(e)}Object.defineProperty(t,"__esModule",{value:!0});var c=n(1),l=r(c),f=n(39),p=r(f),d=n(40),h=r(d),y=n(41),g=(n(5),function(e){function t(e){o(this,t);var n=e.listenToBrowserNetworkEvents,r=void 0===n||n;e.db=h.default,e.sdkFamily="Web",e.networking=new p.default({del:y.del,get:y.get,post:y.post,sendBeacon:u});var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r&&(window.addEventListener("offline",function(){i.networkDownDetected()}),window.addEventListener("online",function(){i.networkUpDetected()})),i}return s(t,e),t}(l.default));t.default=g,e.exports=t.default},function(e,t,n){function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(r+o)%4*8;else if(65535>>2]=n[o>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r>>2]>>>24-r%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},c=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=r.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,o=n.sigBytes,i=this.blockSize,s=o/(4*i),s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0);if(t=s*i,o=e.min(4*t,o),t){for(var u=0;ul;){var f;e:{f=c;for(var p=e.sqrt(f),d=2;d<=p;d++)if(!(f%d)){f=!1;break e}f=!0}f&&(8>l&&(a[l]=u(e.pow(c,.5))),s[l]=u(e.pow(c,1/3)),l++),c++}var h=[],r=r.SHA256=i.extend({_doReset:function(){this._hash=new o.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],u=n[4],c=n[5],l=n[6],f=n[7],p=0;64>p;p++){if(16>p)h[p]=0|e[t+p];else{var d=h[p-15],y=h[p-2];h[p]=((d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3)+h[p-7]+((y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10)+h[p-16]}d=f+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&c^~u&l)+s[p]+h[p],y=((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+(r&o^r&i^o&i),f=l,l=c,c=u,u=a+d|0,a=i,i=o,o=r,r=d+y|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+f|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=e.floor(r/4294967296),n[15+(o+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=i._createHelper(r),t.HmacSHA256=i._createHmacHelper(r)}(Math),function(){var e=n,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,n){e=this._hasher=new e.init,"string"==typeof n&&(n=t.parse(n));var r=e.blockSize,o=4*r;n.sigBytes>o&&(n=e.finalize(n)),n.clamp();for(var i=this._oKey=n.clone(),a=this._iKey=n.clone(),s=i.words,u=a.words,c=0;c>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;4>a&&o+.75*a>>6*(3-a)&63));if(t=r.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var n=e.length,r=this._map,o=r.charAt(64);o&&-1!=(o=e.indexOf(o))&&(n=o);for(var o=[],i=0,a=0;a>>6-a%4*2;o[i>>>2]|=(s|u)<<24-i%4*8,i++}return t.create(o,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(e){function t(e,t,n,r,o,i,a){return((e=e+(t&n|~t&r)+o+a)<>>32-i)+t}function r(e,t,n,r,o,i,a){return((e=e+(t&r|n&~r)+o+a)<>>32-i)+t}function o(e,t,n,r,o,i,a){return((e=e+(t^n^r)+o+a)<>>32-i)+t}function i(e,t,n,r,o,i,a){return((e=e+(n^(t|~r))+o+a)<>>32-i)+t}for(var a=n,s=a.lib,u=s.WordArray,c=s.Hasher,s=a.algo,l=[],f=0;64>f;f++)l[f]=4294967296*e.abs(e.sin(f+1))|0;s=s.MD5=c.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,n){for(var a=0;16>a;a++){var s=n+a,u=e[s];e[s]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}var a=this._hash.words,s=e[n+0],u=e[n+1],c=e[n+2],f=e[n+3],p=e[n+4],d=e[n+5],h=e[n+6],y=e[n+7],g=e[n+8],m=e[n+9],v=e[n+10],b=e[n+11],_=e[n+12],w=e[n+13],k=e[n+14],E=e[n+15],C=a[0],x=a[1],T=a[2],S=a[3],C=t(C,x,T,S,s,7,l[0]),S=t(S,C,x,T,u,12,l[1]),T=t(T,S,C,x,c,17,l[2]),x=t(x,T,S,C,f,22,l[3]),C=t(C,x,T,S,p,7,l[4]),S=t(S,C,x,T,d,12,l[5]),T=t(T,S,C,x,h,17,l[6]),x=t(x,T,S,C,y,22,l[7]),C=t(C,x,T,S,g,7,l[8]),S=t(S,C,x,T,m,12,l[9]),T=t(T,S,C,x,v,17,l[10]),x=t(x,T,S,C,b,22,l[11]),C=t(C,x,T,S,_,7,l[12]),S=t(S,C,x,T,w,12,l[13]),T=t(T,S,C,x,k,17,l[14]),x=t(x,T,S,C,E,22,l[15]),C=r(C,x,T,S,u,5,l[16]),S=r(S,C,x,T,h,9,l[17]),T=r(T,S,C,x,b,14,l[18]),x=r(x,T,S,C,s,20,l[19]),C=r(C,x,T,S,d,5,l[20]),S=r(S,C,x,T,v,9,l[21]),T=r(T,S,C,x,E,14,l[22]),x=r(x,T,S,C,p,20,l[23]),C=r(C,x,T,S,m,5,l[24]),S=r(S,C,x,T,k,9,l[25]),T=r(T,S,C,x,f,14,l[26]),x=r(x,T,S,C,g,20,l[27]),C=r(C,x,T,S,w,5,l[28]),S=r(S,C,x,T,c,9,l[29]),T=r(T,S,C,x,y,14,l[30]),x=r(x,T,S,C,_,20,l[31]),C=o(C,x,T,S,d,4,l[32]),S=o(S,C,x,T,g,11,l[33]),T=o(T,S,C,x,b,16,l[34]),x=o(x,T,S,C,k,23,l[35]),C=o(C,x,T,S,u,4,l[36]),S=o(S,C,x,T,p,11,l[37]),T=o(T,S,C,x,y,16,l[38]),x=o(x,T,S,C,v,23,l[39]),C=o(C,x,T,S,w,4,l[40]),S=o(S,C,x,T,s,11,l[41]),T=o(T,S,C,x,f,16,l[42]),x=o(x,T,S,C,h,23,l[43]),C=o(C,x,T,S,m,4,l[44]),S=o(S,C,x,T,_,11,l[45]),T=o(T,S,C,x,E,16,l[46]),x=o(x,T,S,C,c,23,l[47]),C=i(C,x,T,S,s,6,l[48]),S=i(S,C,x,T,y,10,l[49]),T=i(T,S,C,x,k,15,l[50]),x=i(x,T,S,C,d,21,l[51]),C=i(C,x,T,S,_,6,l[52]),S=i(S,C,x,T,f,10,l[53]),T=i(T,S,C,x,v,15,l[54]),x=i(x,T,S,C,u,21,l[55]),C=i(C,x,T,S,g,6,l[56]),S=i(S,C,x,T,E,10,l[57]),T=i(T,S,C,x,h,15,l[58]),x=i(x,T,S,C,w,21,l[59]),C=i(C,x,T,S,p,6,l[60]),S=i(S,C,x,T,b,10,l[61]),T=i(T,S,C,x,c,15,l[62]),x=i(x,T,S,C,m,21,l[63]);a[0]=a[0]+C|0,a[1]=a[1]+x|0,a[2]=a[2]+T|0,a[3]=a[3]+S|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;n[o>>>5]|=128<<24-o%32;var i=e.floor(r/4294967296);for(n[15+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),n[14+(o+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(n.length+1),this._process(),t=this._hash,n=t.words,r=0;4>r;r++)o=n[r],n[r]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);return t},clone:function(){var e=c.clone.call(this);return e._hash=this._hash.clone(),e}}),a.MD5=c._createHelper(s),a.HmacMD5=c._createHmacHelper(s)}(Math),function(){var e=n,t=e.lib,r=t.Base,o=t.WordArray,t=e.algo,i=t.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:t.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=n.hasher.create(),i=o.create(),a=i.words,s=n.keySize,n=n.iterations;a.length>>2]}},r.BlockCipher=c.extend({cfg:c.cfg.extend({mode:l,padding:p}),reset:function(){c.reset.call(this);var e=this.cfg,t=e.iv,e=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=e.createEncryptor;else n=e.createDecryptor,this._minBufferSize=1;this._mode=n.call(e,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var d=r.CipherParams=o.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),l=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return e=e.salt,(e?i.create([1398893684,1701076831]).concat(e).concat(t):t).toString(s)},parse:function(e){e=s.parse(e);var t=e.words;if(1398893684==t[0]&&1701076831==t[1]){var n=i.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return d.create({ciphertext:e,salt:n})}},h=r.SerializableCipher=o.extend({cfg:o.extend({format:l}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var o=e.createEncryptor(n,r);return t=o.finalize(t),o=o.cfg,d.create({ciphertext:t,key:n,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),t=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){return r||(r=i.random(8)),e=u.create({keySize:t+n}).compute(e,r),n=i.create(e.words.slice(t),4*n),e.sigBytes=4*t,d.create({key:e,iv:n,salt:r})}},y=r.PasswordBasedCipher=h.extend({cfg:h.cfg.extend({kdf:t}),encrypt:function(e,t,n,r){return r=this.cfg.extend(r),n=r.kdf.execute(n,e.keySize,e.ivSize),r.iv=n.iv,e=h.encrypt.call(this,e,t,n.key,r),e.mixIn(n),e},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),n=r.kdf.execute(n,e.keySize,e.ivSize,t.salt),r.iv=n.iv,h.decrypt.call(this,e,t,n.key,r)}})}(),function(){for(var e=n,t=e.lib.BlockCipher,r=e.algo,o=[],i=[],a=[],s=[],u=[],c=[],l=[],f=[],p=[],d=[],h=[],y=0;256>y;y++)h[y]=128>y?y<<1:y<<1^283;for(var g=0,m=0,y=0;256>y;y++){var v=m^m<<1^m<<2^m<<3^m<<4,v=v>>>8^255&v^99;o[g]=v,i[v]=g;var b=h[g],_=h[b],w=h[_],k=257*h[v]^16843008*v;a[g]=k<<24|k>>>8,s[g]=k<<16|k>>>16,u[g]=k<<8|k>>>24,c[g]=k,k=16843009*w^65537*_^257*b^16843008*g,l[v]=k<<24|k>>>8,f[v]=k<<16|k>>>16,p[v]=k<<8|k>>>24,d[v]=k,g?(g=b^h[h[h[w^b]]],m^=h[h[m]]):g=m=1}var E=[0,1,2,4,8,16,32,64,128,27,54],r=r.AES=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes/4,e=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],i=0;i>>24]<<24|o[a>>>16&255]<<16|o[a>>>8&255]<<8|o[255&a]):(a=a<<8|a>>>24,a=o[a>>>24]<<24|o[a>>>16&255]<<16|o[a>>>8&255]<<8|o[255&a],a^=E[i/n|0]<<24),r[i]=r[i-n]^a}for(t=this._invKeySchedule=[],n=0;nn||4>=i?a:l[o[a>>>24]]^f[o[a>>>16&255]]^p[o[a>>>8&255]]^d[o[255&a]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,u,c,o)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,f,p,d,i),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,o,i,a,s){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],f=e[t+2]^n[2],p=e[t+3]^n[3],d=4,h=1;h>>24]^o[l>>>16&255]^i[f>>>8&255]^a[255&p]^n[d++],g=r[l>>>24]^o[f>>>16&255]^i[p>>>8&255]^a[255&c]^n[d++],m=r[f>>>24]^o[p>>>16&255]^i[c>>>8&255]^a[255&l]^n[d++],p=r[p>>>24]^o[c>>>16&255]^i[l>>>8&255]^a[255&f]^n[d++],c=y,l=g,f=m;y=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&p])^n[d++],g=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[p>>>8&255]<<8|s[255&c])^n[d++],m=(s[f>>>24]<<24|s[p>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^n[d++],p=(s[p>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^n[d++],e[t]=y,e[t+1]=g,e[t+2]=m,e[t+3]=p},keySize:8});e.AES=t._createHelper(r)}(),n.mode.ECB=function(){var e=n.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e}(),e.exports=n},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=a){var u={};u.category=g.default.PNRequestMessageCountExceededCategory,u.operation=e.operation,this._listenerManager.announceStatus(u)}o.forEach(function(e){var t=e.channel,r=e.subscriptionMatch,o=e.publishMetaData;if(t===r&&(r=null),s){if(n._dedupingManager.isDuplicate(e))return;n._dedupingManager.addEntry(e)}if(h.default.endsWith(e.channel,"-pnpres")){var i={};i.channel=null,i.subscription=null,i.actualChannel=null!=r?t:null,i.subscribedChannel=null!=r?r:t,t&&(i.channel=t.substring(0,t.lastIndexOf("-pnpres"))),r&&(i.subscription=r.substring(0,r.lastIndexOf("-pnpres"))),i.action=e.payload.action,i.state=e.payload.data,i.timetoken=o.publishTimetoken,i.occupancy=e.payload.occupancy,i.uuid=e.payload.uuid,i.timestamp=e.payload.timestamp,e.payload.join&&(i.join=e.payload.join),e.payload.leave&&(i.leave=e.payload.leave),e.payload.timeout&&(i.timeout=e.payload.timeout),n._listenerManager.announcePresence(i)}else{var a={};a.channel=null,a.subscription=null,a.actualChannel=null!=r?t:null,a.subscribedChannel=null!=r?r:t,a.channel=t,a.subscription=r,a.timetoken=o.publishTimetoken,a.publisher=e.issuingClientId,e.userMetadata&&(a.userMetadata=e.userMetadata),n._config.cipherKey?a.message=n._crypto.decrypt(e.payload):a.message=e.payload,n._listenerManager.announceMessage(a)}}),this._region=t.metadata.region,this._startSubscribeLoop()}},{key:"_stopSubscribeLoop",value:function(){this._subscribeCall&&("function"==typeof this._subscribeCall.abort&&this._subscribeCall.abort(),this._subscribeCall=null)}}]),e}();t.default=m,e.exports=t.default},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n=this._config.maximumCacheSize&&this.hashHistory.shift(),this.hashHistory.push(this.getKey(e))}},{key:"clearHistory",value:function(){this.hashHistory=[]}}]),e}();t.default=s,e.exports=t.default},function(e,t){function n(e){var t=[];return Object.keys(e).forEach(function(e){return t.push(e)}),t}function r(e){return encodeURIComponent(e).replace(/[!~*'()]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function o(e){return n(e).sort()}function i(e){return o(e).map(function(t){return t+"="+r(e[t])}).join("&")}function a(e,t){return-1!==e.indexOf(t,this.length-t.length)}function s(){var e=void 0,t=void 0;return{promise:new Promise(function(n,r){e=n,t=r}),reject:t,fulfill:e}}e.exports={signPamFromParams:i,endsWith:a,createPromise:s,encodeString:r}},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"===typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e,t){return e.type=t,e.error=!0,e}function c(e){return u({message:e},"validationError")}function l(e,t,n){return e.usePost&&e.usePost(t,n)?e.postURL(t,n):e.getURL(t,n)}function f(e){if(e.sdkName)return e.sdkName;var t="PubNub-JS-"+e.sdkFamily;return e.partnerId&&(t+="-"+e.partnerId),t+="/"+e.getVersion()}function p(e,t,n){var r=e.config,o=e.crypto;n.timestamp=Math.floor((new Date).getTime()/1e3);var i=r.subscribeKey+"\n"+r.publishKey+"\n"+t+"\n";i+=g.default.signPamFromParams(n);var a=o.HMACSHA256(i);a=a.replace(/\+/g,"-"),a=a.replace(/\//g,"_"),n.signature=a}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.networking,r=e.config,o=null,i=null,a={};t.getOperation()===b.default.PNTimeOperation||t.getOperation()===b.default.PNChannelGroupsOperation?o=arguments.length<=2?void 0:arguments[2]:(a=arguments.length<=2?void 0:arguments[2],o=arguments.length<=3?void 0:arguments[3]),"undefined"==typeof Promise||o||(i=g.default.createPromise());var s=t.validateParams(e,a);if(!s){var u=t.prepareParams(e,a),d=l(t,e,a),y=void 0,m={url:d,operation:t.getOperation(),timeout:t.getRequestTimeout(e)};u.uuid=r.UUID,u.pnsdk=f(r),r.useInstanceId&&(u.instanceid=r.instanceId),r.useRequestId&&(u.requestid=h.default.createUUID()),t.isAuthSupported()&&r.getAuthKey()&&(u.auth=r.getAuthKey()),r.secretKey&&p(e,d,u);var v=function(n,r){if(n.error)return void(o?o(n):i&&i.reject(new _("PubNub call failed, check status for details",n)));var s=t.handleResponse(e,r,a);o?o(n,s):i&&i.fulfill(s)};if(t.usePost&&t.usePost(e,a)){var w=t.postPayload(e,a);y=n.POST(u,w,m,v)}else y=t.useDelete&&t.useDelete()?n.DELETE(u,m,v):n.GET(u,m,v);return t.getOperation()===b.default.PNSubscribeOperation?y:i?i.promise:void 0}return o?o(c(s)):i?(i.reject(new _("Validation failed, check status for details",c(s))),i.promise):void 0};var d=n(3),h=r(d),y=(n(5),n(15)),g=r(y),m=n(2),v=(r(m),n(13)),b=r(v),_=function(e){function t(e,n){o(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.name=r.constructor.name,r.status=n,r.message=e,r}return s(t,e),t}(Error);e.exports=t.default},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNAddChannelsToGroupOperation}function i(e,t){var n=t.channels,r=t.channelGroup,o=e.config;return r?n&&0!==n.length?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"}function a(e,t){var n=t.channelGroup;return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group/"+h.default.encodeString(n)}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channels;return{add:(void 0===n?[]:n).join(",")}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNRemoveChannelsFromGroupOperation}function i(e,t){var n=t.channels,r=t.channelGroup,o=e.config;return r?n&&0!==n.length?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"}function a(e,t){var n=t.channelGroup;return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group/"+h.default.encodeString(n)}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channels;return{remove:(void 0===n?[]:n).join(",")}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNRemoveGroupOperation}function i(e,t){var n=t.channelGroup,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"}function a(e,t){var n=t.channelGroup;return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group/"+h.default.encodeString(n)+"/remove"}function s(){return!0}function u(e){return e.config.getTransactionTimeout()}function c(){return{}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.isAuthSupported=s,t.getRequestTimeout=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(){return f.default.PNChannelGroupsOperation}function o(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function i(e){return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group"}function a(e){return e.config.getTransactionTimeout()}function s(){return!0}function u(){return{}}function c(e,t){return{groups:t.payload.groups}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=o,t.getURL=i,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),f=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNChannelsForGroupOperation}function i(e,t){var n=t.channelGroup,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"}function a(e,t){var n=t.channelGroup;return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group/"+h.default.encodeString(n)}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(){return{}}function l(e,t){return{channels:t.payload.channels}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(){return f.default.PNPushNotificationEnabledChannelsOperation}function o(e,t){var n=t.device,r=t.pushGateway,o=t.channels,i=e.config;return n?r?o&&0!==o.length?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function i(e,t){var n=t.device;return"/v1/push/sub-key/"+e.config.subscribeKey+"/devices/"+n}function a(e){return e.config.getTransactionTimeout()}function s(){return!0}function u(e,t){var n=t.pushGateway,r=t.channels;return{type:n,add:(void 0===r?[]:r).join(",")}}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=o,t.getURL=i,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),f=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){function r(){return f.default.PNPushNotificationEnabledChannelsOperation}function o(e,t){var n=t.device,r=t.pushGateway,o=t.channels,i=e.config;return n?r?o&&0!==o.length?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function i(e,t){var n=t.device;return"/v1/push/sub-key/"+e.config.subscribeKey+"/devices/"+n}function a(e){return e.config.getTransactionTimeout()}function s(){return!0}function u(e,t){var n=t.pushGateway,r=t.channels;return{type:n,remove:(void 0===r?[]:r).join(",")}}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=o,t.getURL=i,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),f=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){function r(){return f.default.PNPushNotificationEnabledChannelsOperation}function o(e,t){var n=t.device,r=t.pushGateway,o=e.config;return n?r?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function i(e,t){var n=t.device;return"/v1/push/sub-key/"+e.config.subscribeKey+"/devices/"+n}function a(e){return e.config.getTransactionTimeout()}function s(){return!0}function u(e,t){return{type:t.pushGateway}}function c(e,t){return{channels:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=o,t.getURL=i,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),f=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){function r(){return f.default.PNRemoveAllPushNotificationsOperation}function o(e,t){var n=t.device,r=t.pushGateway,o=e.config;return n?r?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function i(e,t){var n=t.device;return"/v1/push/sub-key/"+e.config.subscribeKey+"/devices/"+n+"/remove"}function a(e){return e.config.getTransactionTimeout()}function s(){return!0}function u(e,t){return{type:t.pushGateway}}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=o,t.getURL=i,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),f=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNUnsubscribeOperation}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var n=e.config,r=t.channels,o=void 0===r?[]:r,i=o.length>0?o.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+h.default.encodeString(i)+"/leave"}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,o={};return r.length>0&&(o["channel-group"]=r.join(",")),o}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(){return f.default.PNWhereNowOperation}function o(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function i(e,t){var n=e.config,r=t.uuid,o=void 0===r?n.UUID:r;return"/v2/presence/sub-key/"+n.subscribeKey+"/uuid/"+o}function a(e){return e.config.getTransactionTimeout()}function s(){return!0}function u(){return{}}function c(e,t){return t.payload?{channels:t.payload.channels}:{channels:[]}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=o,t.getURL=i,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),f=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNHeartbeatOperation}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var n=e.config,r=t.channels,o=void 0===r?[]:r,i=o.length>0?o.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+h.default.encodeString(i)+"/heartbeat"}function s(){return!0}function u(e){return e.config.getTransactionTimeout()}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,o=t.state,i=void 0===o?{}:o,a=e.config,s={};return r.length>0&&(s["channel-group"]=r.join(",")),s.state=JSON.stringify(i),s.heartbeat=a.getPresenceTimeout(),s}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.isAuthSupported=s,t.getRequestTimeout=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNGetStateOperation}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var n=e.config,r=t.uuid,o=void 0===r?n.UUID:r,i=t.channels,a=void 0===i?[]:i,s=a.length>0?a.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+h.default.encodeString(s)+"/uuid/"+o}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,o={};return r.length>0&&(o["channel-group"]=r.join(",")),o}function l(e,t,n){var r=n.channels,o=void 0===r?[]:r,i=n.channelGroups,a=void 0===i?[]:i,s={};return 1===o.length&&0===a.length?s[o[0]]=t.payload:s=t.payload,{channels:s}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNSetStateOperation}function i(e,t){var n=e.config,r=t.state,o=t.channels,i=void 0===o?[]:o,a=t.channelGroups,s=void 0===a?[]:a;return r?n.subscribeKey?0===i.length&&0===s.length?"Please provide a list of channels and/or channel-groups":void 0:"Missing Subscribe Key":"Missing State"}function a(e,t){var n=e.config,r=t.channels,o=void 0===r?[]:r,i=o.length>0?o.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+h.default.encodeString(i)+"/uuid/"+n.UUID+"/data"}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.state,r=t.channelGroups,o=void 0===r?[]:r,i={};return i.state=JSON.stringify(n),o.length>0&&(i["channel-group"]=o.join(",")),i}function l(e,t){return{state:t.payload}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNHereNowOperation}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var n=e.config,r=t.channels,o=void 0===r?[]:r,i=t.channelGroups,a=void 0===i?[]:i,s="/v2/presence/sub-key/"+n.subscribeKey;if(o.length>0||a.length>0){var u=o.length>0?o.join(","):",";s+="/channel/"+h.default.encodeString(u)}return s}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,o=t.includeUUIDs,i=void 0===o||o,a=t.includeState,s=void 0!==a&&a,u={};return i||(u.disable_uuids=1),s&&(u.state=1),r.length>0&&(u["channel-group"]=r.join(",")),u}function l(e,t,n){var r=n.channels,o=void 0===r?[]:r,i=n.channelGroups,a=void 0===i?[]:i,s=n.includeUUIDs,u=void 0===s||s,c=n.includeState,l=void 0!==c&&c;return o.length>1||a.length>0||0===a.length&&0===o.length?function(){var e={};return e.totalChannels=t.payload.total_channels,e.totalOccupancy=t.payload.total_occupancy,e.channels={},Object.keys(t.payload.channels).forEach(function(n){var r=t.payload.channels[n],o=[];return e.channels[n]={occupants:o,name:n,occupancy:r.occupancy},u&&r.uuids.forEach(function(e){l?o.push({state:e.state,uuid:e.uuid}):o.push({state:null,uuid:e})}),e}),e}():function(){var e={},n=[];return e.totalChannels=1,e.totalOccupancy=t.occupancy,e.channels={},e.channels[o[0]]={occupants:n,name:o[0],occupancy:t.occupancy},u&&t.uuids&&t.uuids.forEach(function(e){l?n.push({state:e.state,uuid:e.uuid}):n.push({state:null,uuid:e})}),e}()}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(){return f.default.PNAccessManagerAudit}function o(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function i(e){return"/v2/auth/audit/sub-key/"+e.config.subscribeKey}function a(e){return e.config.getTransactionTimeout()}function s(){return!1}function u(e,t){var n=t.channel,r=t.channelGroup,o=t.authKeys,i=void 0===o?[]:o,a={};return n&&(a.channel=n),r&&(a["channel-group"]=r),i.length>0&&(a.auth=i.join(",")),a}function c(e,t){return t.payload}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=o,t.getURL=i,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),f=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){function r(){return f.default.PNAccessManagerGrant}function o(e){var t=e.config;return t.subscribeKey?t.publishKey?t.secretKey?void 0:"Missing Secret Key":"Missing Publish Key":"Missing Subscribe Key"}function i(e){return"/v2/auth/grant/sub-key/"+e.config.subscribeKey}function a(e){return e.config.getTransactionTimeout()}function s(){return!1}function u(e,t){var n=t.channels,r=void 0===n?[]:n,o=t.channelGroups,i=void 0===o?[]:o,a=t.ttl,s=t.read,u=void 0!==s&&s,c=t.write,l=void 0!==c&&c,f=t.manage,p=void 0!==f&&f,d=t.authKeys,h=void 0===d?[]:d,y={};return y.r=u?"1":"0",y.w=l?"1":"0",y.m=p?"1":"0",r.length>0&&(y.channel=r.join(",")),i.length>0&&(y["channel-group"]=i.join(",")),h.length>0&&(y.auth=h.join(",")),(a||0===a)&&(y.ttl=a),y}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=o,t.getURL=i,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),f=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=e.crypto,r=e.config,o=JSON.stringify(t);return r.cipherKey&&(o=n.encrypt(o),o=JSON.stringify(o)),o}function a(){return v.default.PNPublishOperation}function s(e,t){var n=e.config,r=t.message;return t.channel?r?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"}function u(e,t){var n=t.sendByPost;return void 0!==n&&n}function c(e,t){var n=e.config,r=t.channel,i=t.message,a=o(e,i);return"/publish/"+n.publishKey+"/"+n.subscribeKey+"/0/"+_.default.encodeString(r)+"/0/"+_.default.encodeString(a)}function l(e,t){var n=e.config,r=t.channel;return"/publish/"+n.publishKey+"/"+n.subscribeKey+"/0/"+_.default.encodeString(r)+"/0"}function f(e){return e.config.getTransactionTimeout()}function p(){return!0}function d(e,t){return o(e,t.message)}function h(e,t){var n=t.meta,r=t.replicate,o=void 0===r||r,i=t.storeInHistory,a=t.ttl,s={};return null!=i&&(s.store=i?"1":"0"),a&&(s.ttl=a),!1===o&&(s.norep="true"),n&&"object"===(void 0===n?"undefined":g(n))&&(s.meta=JSON.stringify(n)),s}function y(e,t){return{timetoken:t[2]}}Object.defineProperty(t,"__esModule",{value:!0});var g="function"==typeof Symbol&&"symbol"==i(Symbol.iterator)?function(e){return"undefined"===typeof e?"undefined":i(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"===typeof e?"undefined":i(e)};t.getOperation=a,t.validateParams=s,t.usePost=u,t.getURL=c,t.postURL=l,t.getRequestTimeout=f,t.isAuthSupported=p,t.postPayload=d,t.prepareParams=h,t.handleResponse=y;var m=(n(5),n(13)),v=r(m),b=n(15),_=r(b)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=e.config,r=e.crypto;if(!n.cipherKey)return t;try{return r.decrypt(t)}catch(e){return t}}function i(){return d.default.PNHistoryOperation}function a(e,t){var n=t.channel,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"}function s(e,t){var n=t.channel;return"/v2/history/sub-key/"+e.config.subscribeKey+"/channel/"+y.default.encodeString(n)}function u(e){return e.config.getTransactionTimeout()}function c(){return!0}function l(e,t){var n=t.start,r=t.end,o=t.reverse,i=t.count,a=void 0===i?100:i,s=t.stringifiedTimeToken,u=void 0!==s&&s,c={include_token:"true"};return c.count=a,n&&(c.start=n),r&&(c.end=r),u&&(c.string_message_token="true"),null!=o&&(c.reverse=o.toString()),c}function f(e,t){var n={messages:[],startTimeToken:t[1],endTimeToken:t[2]};return t[0].forEach(function(t){var r={timetoken:t.timetoken,entry:o(e,t.message)};n.messages.push(r)}),n}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=a,t.getURL=s,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=l,t.handleResponse=f;var p=(n(5),n(13)),d=r(p),h=n(15),y=r(h)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return d.default.PNDeleteMessagesOperation}function i(e,t){var n=t.channel,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"}function a(){return!0}function s(e,t){var n=t.channel;return"/v3/history/sub-key/"+e.config.subscribeKey+"/channel/"+y.default.encodeString(n)}function u(e){return e.config.getTransactionTimeout()}function c(){return!0}function l(e,t){var n=t.start,r=t.end,o={};return n&&(o.start=n),r&&(o.end=r),o}function f(e,t){return t.payload}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.useDelete=a,t.getURL=s,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=l,t.handleResponse=f;var p=(n(5),n(13)),d=r(p),h=n(15),y=r(h)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=e.config,r=e.crypto;if(!n.cipherKey)return t;try{return r.decrypt(t)}catch(e){return t}}function i(){return d.default.PNFetchMessagesOperation}function a(e,t){var n=t.channels,r=e.config;return n&&0!==n.length?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channels"}function s(e,t){var n=t.channels,r=void 0===n?[]:n,o=e.config,i=r.length>0?r.join(","):",";return"/v3/history/sub-key/"+o.subscribeKey+"/channel/"+y.default.encodeString(i)}function u(e){return e.config.getTransactionTimeout()}function c(){return!0}function l(e,t){var n=t.start,r=t.end,o=t.count,i={};return o&&(i.max=o),n&&(i.start=n),r&&(i.end=r),i}function f(e,t){var n={channels:{}};return Object.keys(t.channels||{}).forEach(function(r){n.channels[r]=[],(t.channels[r]||[]).forEach(function(t){var i={};i.channel=r,i.subscription=null,i.timetoken=t.timetoken,i.message=o(e,t.message),n.channels[r].push(i)})}),n}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=a,t.getURL=s,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=l,t.handleResponse=f;var p=(n(5),n(13)),d=r(p),h=n(15),y=r(h)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNSubscribeOperation}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var n=e.config,r=t.channels,o=void 0===r?[]:r,i=o.length>0?o.join(","):",";return"/v2/subscribe/"+n.subscribeKey+"/"+h.default.encodeString(i)+"/0"}function s(e){return e.config.getSubscribeTimeout()}function u(){return!0}function c(e,t){var n=e.config,r=t.channelGroups,o=void 0===r?[]:r,i=t.timetoken,a=t.filterExpression,s=t.region,u={heartbeat:n.getPresenceTimeout()};return o.length>0&&(u["channel-group"]=o.join(",")),a&&a.length>0&&(u["filter-expr"]=a),i&&(u.tt=i),s&&(u.tr=s),u}function l(e,t){var n=[];t.m.forEach(function(e){var t={publishTimetoken:e.p.t,region:e.p.r},r={shard:parseInt(e.a,10),subscriptionMatch:e.b,channel:e.c,payload:e.d,flags:e.f,issuingClientId:e.i,subscribeKey:e.k,originationTimetoken:e.o,userMetadata:e.u,publishMetaData:t};n.push(r)});var r={timetoken:t.t.t,region:t.t.r};return{messages:n,metadata:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=this._maxSubDomain&&(this._currentSubDomain=1),e=this._currentSubDomain.toString(),this._providedFQDN.replace("pubsub","ps"+e)}},{key:"hasModule",value:function(e){return e in this._modules}},{key:"shiftStandardOrigin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._standardOrigin=this.nextOrigin(e),this._standardOrigin}},{key:"getStandardOrigin",value:function(){return this._standardOrigin}},{key:"POST",value:function(e,t,n,r){return this._modules.post(e,t,n,r)}},{key:"GET",value:function(e,t,n){return this._modules.get(e,t,n)}},{key:"DELETE",value:function(e,t,n){return this._modules.del(e,t,n)}},{key:"_detectErrorCategory",value:function(e){if("ENOTFOUND"===e.code)return u.default.PNNetworkIssuesCategory;if("ECONNREFUSED"===e.code)return u.default.PNNetworkIssuesCategory;if("ECONNRESET"===e.code)return u.default.PNNetworkIssuesCategory;if("EAI_AGAIN"===e.code)return u.default.PNNetworkIssuesCategory;if(0===e.status||e.hasOwnProperty("status")&&void 0===e.status)return u.default.PNNetworkIssuesCategory;if(e.timeout)return u.default.PNTimeoutCategory;if(e.response){if(e.response.badRequest)return u.default.PNBadRequestCategory;if(e.response.forbidden)return u.default.PNAccessDeniedCategory}return u.default.PNUnknownCategory}}]),e}());t.default=c,e.exports=t.default},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={get:function(e){try{return localStorage.getItem(e)}catch(e){return null}},set:function(e,t){try{return localStorage.setItem(e,t)}catch(e){return null}}},e.exports=t.default},function(e,t,n){function r(e){var t=(new Date).getTime(),n=(new Date).toISOString(),r=function(){return console&&console.log?console:window&&window.console&&window.console.log?window.console:console}();r.log("<<<<<"),r.log("["+n+"]","\n",e.url,"\n",e.qs),r.log("-----"),e.on("response",function(n){var o=(new Date).getTime(),i=o-t,a=(new Date).toISOString();r.log(">>>>>>"),r.log("["+a+" / "+i+"]","\n",e.url,"\n",e.qs,"\n",n.text),r.log("-----")})}function o(e,t,n){var o=this;return this._config.logVerbosity&&(e=e.use(r)),this._config.proxy&&this._modules.proxy&&(e=this._modules.proxy.call(this,e)),this._config.keepAlive&&this._modules.keepAlive&&(e=this._modules.keepAlive(e)),e.timeout(t.timeout).end(function(e,r){var i={};if(i.error=null!==e,i.operation=t.operation,r&&r.status&&(i.statusCode=r.status),e)return i.errorData=e,i.category=o._detectErrorCategory(e),n(i,null);var a=JSON.parse(r.text);return a.error&&1===a.error&&a.status&&a.message&&a.service?(i.errorData=a,i.statusCode=a.status,i.error=!0,i.category=o._detectErrorCategory(i),n(i,null)):n(i,a)})}function i(e,t,n){var r=c.default.get(this.getStandardOrigin()+t.url).query(e);return o.call(this,r,t,n)}function a(e,t,n,r){var i=c.default.post(this.getStandardOrigin()+n.url).query(e).send(t);return o.call(this,i,n,r)}function s(e,t,n){var r=c.default.delete(this.getStandardOrigin()+t.url).query(e);return o.call(this,r,t,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.get=i,t.post=a,t.del=s;var u=n(42),c=function(e){return e&&e.__esModule?e:{default:e}}(u);n(5)},function(e,t,n){function r(){}function o(e){if(!g(e))return e;var t=[];for(var n in e)a(t,n,e[n]);return t.join("&")}function a(e,t,n){if(null!=n)if(Array.isArray(n))n.forEach(function(n){a(e,t,n)});else if(g(n))for(var r in n)a(e,t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));else null===n&&e.push(encodeURIComponent(t))}function s(e){for(var t,n,r={},o=e.split("&"),i=0,a=o.length;i=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.onprogress=r.bind(null,"download"),t.upload&&(t.upload.onprogress=r.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],i=this._serializer||b.serialize[o?o.split(";")[0]:""];!i&&c(o)&&(i=b.serialize["application/json"]),i&&(n=i(n))}for(var a in this.header)null!=this.header[a]&&this.header.hasOwnProperty(a)&&t.setRequestHeader(a,this.header[a]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0!==n?n:null),this},b.agent=function(){return new v},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){v.prototype[e.toLowerCase()]=function(t,n){var r=new b.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}}),v.prototype.del=v.prototype.delete,b.get=function(e,t,n){var r=b("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},b.head=function(e,t,n){var r=b("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},b.options=function(e,t,n){var r=b("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.del=p,b.delete=p,b.patch=function(e,t,n){var r=b("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.post=function(e,t,n){var r=b("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.put=function(e,t,n){var r=b("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},function(e,t,n){function r(e){if(e)return o(e)}function o(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,o=0;o=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~s.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},r.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},r.prototype.then=function(e,t){if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(e,t){n.end(function(n,r){n?t(n):e(r)})})}return this._fullfilledPromise.then(e,t)},r.prototype.catch=function(e){return this.then(void 0,e)},r.prototype.use=function(e){return e(this),this},r.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},r.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},r.prototype.get=function(e){return this._header[e.toLowerCase()]},r.prototype.getHeader=r.prototype.get,r.prototype.set=function(e,t){if(a(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},r.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},r.prototype.field=function(e,t){if(null===e||void 0===e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),a(e)){for(var n in e)this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)this.field(e,t[r]);return this}if(null===t||void 0===t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},r.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},r.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic "+r(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},r.prototype.withCredentials=function(e){return void 0==e&&(e=!0),this._withCredentials=e,this},r.prototype.redirects=function(e){return this._maxRedirects=e,this},r.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},r.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},r.prototype.send=function(e){var t=a(e),n=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&a(this._data))for(var r in e)this._data[r]=e[r];else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"==n?this._data?this._data+"&"+e:e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(n||this.type("json"),this)},r.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},r.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.substring(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.substring(0,t)+"?"+n.join("&")}}},r.prototype._appendQueryString=function(){console.trace("Unsupported")},r.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error(e+t+"ms exceeded");r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.abort(),this.callback(r)}},r.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t){function n(e){return null!==e&&"object"==("undefined"===typeof e?"undefined":i(e))}e.exports=n},function(e,t,n){function r(e){if(e)return o(e)}function o(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}var i=n(47);e.exports=r,r.prototype.get=function(e){return this.header[e.toLowerCase()]},r.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=i.type(t);var n=i.params(t);for(var r in n)this[r]=n[r];this.links={};try{e.link&&(this.links=i.parseLinks(e.link))}catch(e){}},r.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e}},function(e,t){t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce(function(e,t){var n=t.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(e[r]=o),e},{})},t.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e},{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(e){n.prototype[e]=function(){return this._defaults.push({fn:e,arguments:arguments}),this}}),n.prototype._setDefaults=function(e){this._defaults.forEach(function(t){e[t.fn].apply(e,t.arguments)})},e.exports=n}])})}).call(t,n(6)(e))},function(e,t){e.exports={author:"PubNub",name:"chat-engine",version:"0.9.5",description:"ChatEngine",main:"dist/chat-engine.js",scripts:{deploy:"gulp; npm publish;",docs:"jsdoc src/index.js -c jsdoc.json"},repository:{type:"git",url:"git+https://github.com/pubnub/chat-engine.git"},keywords:["pubnub","chat","sdk","realtime"],bugs:{url:"https://github.com/pubnub/chat-engine/issues"},homepage:"https://github.com/pubnub/chat-engine#readme",devDependencies:{"babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.2",chai:"^3.5.0","chat-engine-typing-indicator":"0.0.x",decache:"^4.3.0",docdash:"^0.4.0","es6-promise":"^4.1.1",eslint:"^4.7.1","eslint-config-airbnb":"^15.1.0","eslint-plugin-import":"^2.7.0",express:"^4.15.3",gulp:"^3.9.1","gulp-clean":"^0.3.2","gulp-eslint":"^4.0.0","gulp-istanbul":"^1.1.2","gulp-jsdoc3":"^1.0.1","gulp-mocha":"^3.0.1","gulp-rename":"^1.2.2","gulp-surge":"^0.1.0","gulp-uglify":"^2.0.0","gulp-uglify-es":"^0.1.3","http-server":"^0.10.0",isparta:"^4.0.0",jsdoc:"^3.5.5",mocha:"^3.1.2",proxyquire:"^1.8.0","pubnub-functions-mock":"^0.0.13",request:"^2.82.0","run-sequence":"^2.2.0",sinon:"^4.0.0","stats-webpack-plugin":"^0.6.1",surge:"^0.19.0","uglifyjs-webpack-plugin":"^1.0.1",webpack:"^3.11.0","webpack-stream":"^4.0.0"},dependencies:{async:"^2.1.2",axios:"^0.16.2","babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0",eventemitter2:"^2.2.1",pubnub:"^4.20.1"}}},function(e,t,n){"use strict";var r,o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(i){function a(){this._events={},this._conf&&s.call(this,this._conf)}function s(e){e?(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),this._events.maxListeners=e.maxListeners!==i?e.maxListeners:d,e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this.newListener=e.newListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),this.wildcard&&(this.listenerTree={})):this._events.maxListeners=d}function u(e,t){var n="(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.";this.verboseMemoryLeak?(n+=" Event name: %s.",console.error(n,e,t)):console.error(n,e),console.trace&&console.trace()}function c(e){this._events={},this.newListener=!1,this.verboseMemoryLeak=!1,s.call(this,e)}function l(e,t,n,r){if(!n)return[];var o,i,a,s,u,c,f,p=[],d=t.length,h=t[r],y=t[r+1];if(r===d&&n._listeners){if("function"===typeof n._listeners)return e&&e.push(n._listeners),[n];for(o=0,i=n._listeners.length;o0&&o._listeners.length>this._events.maxListeners&&(o._listeners.warned=!0,u.call(this,o._listeners.length,a))):o._listeners=t,!0;a=e.shift()}return!0}var p=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},d=10;c.EventEmitter2=c,c.prototype.delimiter=".",c.prototype.setMaxListeners=function(e){e!==i&&(this._events||a.call(this),this._events.maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},c.prototype.event="",c.prototype.once=function(e,t){return this.many(e,1,t),this},c.prototype.many=function(e,t,n){function r(){0===--t&&o.off(e,r),n.apply(this,arguments)}var o=this;if("function"!==typeof n)throw new Error("many only accepts instances of Function");return r._origin=n,this.on(e,r),o},c.prototype.emit=function(){this._events||a.call(this);var e=arguments[0];if("newListener"===e&&!this.newListener&&!this._events.newListener)return!1;var t,n,r,o,i,s=arguments.length;if(this._all&&this._all.length){if(i=this._all.slice(),s>3)for(t=new Array(s),o=0;o3)for(t=new Array(s-1),o=1;o3)for(t=new Array(u),o=1;o3)for(t=new Array(u-1),o=1;o0&&this._events[e].length>this._events.maxListeners&&(this._events[e].warned=!0,u.call(this,this._events[e].length,e))):this._events[e]=t,this)},c.prototype.onAny=function(e){if("function"!==typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),this._all.push(e),this},c.prototype.addListener=c.prototype.on,c.prototype.off=function(e,t){function n(e){if(e!==i){var t=Object.keys(e);for(var r in t){var a=t[r],s=e[a];s instanceof Function||"object"!==("undefined"===typeof s?"undefined":o(s))||null===s||(Object.keys(s).length>0&&n(e[a]),0===Object.keys(s).length&&delete e[a])}}}if("function"!==typeof t)throw new Error("removeListener only takes instances of Function");var r,a=[];if(this.wildcard){var s="string"===typeof e?e.split(this.delimiter):e.slice();a=l.call(this,null,s,this.listenerTree,0)}else{if(!this._events[e])return this;r=this._events[e],a.push({_listeners:r})}for(var u=0;u0){for(t=this._all,n=0,r=t.length;n1&&void 0!==arguments[1]?arguments[1]:(new Date).getTime(),a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"custom";r(this,t);var l=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return l.chatEngine=e,l.name="Chat",l.group=c,l.isPrivate=a,l.meta=u||{},l.channel=l.chatEngine.augmentChannel(i,l.isPrivate),l.users={},l.connected=!1,l.hasConnected=!1,l.asleep=!1,l.chatEngine.chats[l.channel]=l,s&&l.connect(),n=l,o(l,n)}return i(t,e),s(t,[{key:"onHereNow",value:function(e,t){var n=this;if(e.error)this.chatEngine.throwError(this,"trigger","presence",new Error("Getting presence of this Chat. Make sure PubNub presence is enabled for this key"));else{t.channels[this.channel].occupants.forEach(function(e){n.userUpdate(e.uuid,e.state)})}}},{key:"objectify",value:function(){return{channel:this.channel,group:this.group,private:this.isPrivate,meta:this.meta}}},{key:"invite",value:function(e){var t=this;this.chatEngine.request("post","invite",{to:e.uuid,chat:this.objectify()}).then(function(){var n=function(){e.direct.emit("$.invite",{channel:t.channel})};e.direct.connected?n():(e.direct.connect(),e.direct.on("$.connected",n))}).catch(function(e){t.chatEngine.throwError(t,"trigger","search",new Error("Something went wrong while making a request to authentication server."),{error:e})})}},{key:"onPresence",value:function(e){"join"===e.action&&this.userJoin(e.uuid,e.state),"leave"===e.action&&this.userLeave(e.uuid),"timeout"===e.action&&this.userDisconnect(e.uuid),"state-change"===e.action&&this.userUpdate(e.uuid,e.state)}},{key:"update",value:function(e){var t=this,n=this.meta||{};this.meta=Object.assign(n,e),this.chatEngine.request("post","chat",{chat:this.objectify()}).then(function(){}).catch(function(e){t.chatEngine.throwError(t,"trigger","chat",new Error("Something went wrong while making a request to chat server."),{error:e})})}},{key:"emit",value:function(e,t){if("message"===e&&"object"!==("undefined"===typeof t?"undefined":a(t)))throw new Error("the payload has to be an object");var n={data:t,sender:this.chatEngine.me.uuid,chat:this,event:e,chatengineSDK:this.chatEngine.package.version},r=new l(this.chatEngine,this,e);return this.runPluginQueue("emit",e,function(e){e(null,n)},function(e,t){delete t.chat,r.publish(t)}),r}},{key:"userJoin",value:function(e,t){this.chatEngine.users[e]=this.chatEngine.users[e]||new this.chatEngine.User(e),this.chatEngine.users[e].assign(t);var n=this.users[e];return this.users[e]=this.chatEngine.users[e],n?this.trigger("$.online.here",{user:this.users[e]}):this.trigger("$.online.join",{user:this.users[e]}),this.chatEngine.users[e]}},{key:"userUpdate",value:function(e,t){this.chatEngine.users[e]=this.chatEngine.users[e]||new this.chatEngine.User(e),this.users[e]||this.userJoin(e,t),this.users[e].assign(t),this.chatEngine._emit("$.state",{user:this.users[e],state:this.users[e].state})}},{key:"sleep",value:function(){this.connected&&(this.onDisconnected(),this.asleep=!0)}},{key:"wake",value:function(){var e=this;this.asleep&&this.handshake(function(){e.onConnected()})}},{key:"onConnected",value:function(){this.connected=!0,this.trigger("$.connected")}},{key:"onDisconnected",value:function(){this.connected=!1,this.trigger("$.disconnected")}},{key:"onLeave",value:function(){this.trigger("$.left"),this.onDisconnected()}},{key:"leave",value:function(){var e=this;this.chatEngine.pubnub.unsubscribe({channels:[this.channel]}),this.chatEngine.request("post","leave",{chat:this.objectify()}).then(function(){e.onLeave(),e.emit("$.system.leave",{subject:e.objectify()}),e.chatEngine.me.session&&e.chatEngine.me.session.leave(e)}).catch(function(t){e.chatEngine.throwError(e,"trigger","chat",new Error("Something went wrong while making a request to chat server."),{error:t})})}},{key:"userLeave",value:function(e){var t=this.users[e];delete this.users[e],t&&this.trigger("$.offline.leave",{user:t})}},{key:"userDisconnect",value:function(e){var t=this.users[e];delete this.users[e],t&&this.trigger("$.offline.disconnect",{user:t})}},{key:"setState",value:function(e){this.chatEngine.pubnub.setState({state:e,channels:[this.chatEngine.global.channel]},function(){})}},{key:"search",value:function(e){if(this.hasConnected)return new f(this.chatEngine,this,e);this.chatEngine.throwError(this,"trigger","search",new Error("You must wait for the $.connected event before calling Chat#search"))}},{key:"connectionReady",value:function(){var e=this;this.connected=!0,this.hasConnected=!0,this.onConnected(),this.chatEngine.me.session&&this.chatEngine.me.session.join(this),this.users[this.chatEngine.me.uuid]=this.chatEngine.me,this.trigger("$.online.join",{user:this.chatEngine.me}),this.channel!==this.chatEngine.global.channel&&"custom"===this.group&&(this.getUserUpdates(),setTimeout(function(){e.getUserUpdates()},5e3)),this.on("$.system.leave",function(t){e.userLeave(t.sender.uuid)})}},{key:"getUserUpdates",value:function(){var e=this;this.chatEngine.pubnub.hereNow({channels:[this.channel],includeUUIDs:!0,includeState:!0},function(t,n){e.onHereNow(t,n)})}},{key:"connect",value:function(){var e=this;this.handshake(function(t){t.data.found?e.meta=t.data.chat.meta:e.update(e.meta),e.connectionReady()})}},{key:"handshake",value:function(e){var t=this;u([function(e){t.chatEngine.pubnub?e():e("You must call ChatEngine.connect() and wait for the $.ready event before creating new Chats.")},function(e){t.chatEngine.request("post","grant",{chat:t.objectify()}).then(function(){e()}).catch(e)},function(e){t.chatEngine.request("post","join",{chat:t.objectify()}).then(function(){e()}).catch(e)},function(n){t.chatEngine.request("get","chat",{},{channel:t.channel}).then(e).catch(n)}],function(e){t.chatEngine.throwError(t,"trigger","auth",new Error("Something went wrong while making a request to authentication server."),{error:e})})}}]),t}(c);e.exports=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return(0,l.default)(function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}(0,u.default)(r)&&"function"===typeof r.then?r.then(function(e){i(n,null,e)},function(e){i(n,e.message?e:new Error(e))}):n(null,r)})}function i(e,t,n){try{e(t,n)}catch(e){(0,p.default)(a,e)}}function a(e){throw e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var s=n(22),u=r(s),c=n(58),l=r(c),f=n(59),p=r(f);e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){var t=(0,o.default)(arguments),n=t.pop();e.call(this,t,n)}};var r=n(2),o=function(e){return e&&e.__esModule?e:{default:e}}(r);e.exports=t.default},function(e,t,n){"use strict";(function(e,r){function o(e){setTimeout(e,0)}function i(e){return function(t){var n=(0,c.default)(arguments,1);e(function(){t.apply(null,n)})}}var a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0}),t.hasNextTick=t.hasSetImmediate=void 0,t.fallback=o,t.wrap=i;var s,u=n(2),c=function(e){return e&&e.__esModule?e:{default:e}}(u),l=t.hasSetImmediate="function"===typeof e&&e,f=t.hasNextTick="object"===("undefined"===typeof r?"undefined":a(r))&&"function"===typeof r.nextTick;s=l?e:f?r.nextTick:o,t.default=i(s)}).call(t,n(60).setImmediate,n(1))},function(e,t,n){"use strict";(function(e){function r(e,t){this._id=e,this._clearFn=t}var o=Function.prototype.apply;t.setTimeout=function(){return new r(o.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(o.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(61),t.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof e&&e.setImmediate||void 0,t.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof e&&e.clearImmediate||void 0}).call(t,n(9))},function(e,t,n){"use strict";(function(e,t){!function(e,n){function r(e){"function"!==typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n2&&void 0!==arguments[2]?arguments[2]:{};r(this,t);var a=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));a.chatEngine=e,a.name="Search",a.chat=n,a.config=i,a.config.event=i.event,a.config.limit=i.limit||20,a.config.channel=a.chat.channel,a.config.includeTimetoken=!0,a.config.stringifiedTimeToken=!0,a.config.count=a.config.count||100,a.config.pages=a.config.pages||10,a.maxPage=a.config.pages,a.numPage=0,a.referenceDate=a.config.end||0,a.hasMore=!0,a.messagesBetweenTimetokens=a.config.start>"0"&&a.config.end>"0",a.needleCount=0,a.page=function(e){var t=Object.assign({},a.config,{start:a.referenceDate});delete t.reverse,delete t.end,a._emit("$.search.page.request"),a.chatEngine.pubnub.history(t,function(t,n){if(a._emit("$.search.page.response"),t.error)a.chatEngine.throwError(a,"trigger","search",new Error("There was a problem searching history. Make sure your request parameters are valid and history is enabled for this PubNub key."),t);else{var r=n.startTimeToken;a.referenceDate=n.startTimeToken,a.hasMore=n.messages.length===a.config.count&&"0"!==r,n.messages.sort(function(e,t){return e.timetoken=a.config.start})),e(n)}})};return a.triggerHistory=function(e,t){a.needleCount=a.config.limit&&!a.messagesBetweenTimetokens&&(a.hasMore=!1),a._emit("$.search.finish"))})}),a},a.config.event&&a.plugin(function(e){return{middleware:{on:{"*":function(t,n){n(!(t&&t.event&&t.event===e),t)}}}}}(a.config.event)),a.config.sender&&a.plugin(function(e){return{middleware:{on:{"*":function(t,n){n(!(t&&t.sender&&t.sender.uuid===e.uuid),t)}}}}}(a.config.sender)),a._emit("$.search.start"),a.find(),a}return i(t,e),t}(a);e.exports=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(64),i=r(o),a=n(29),s=r(a);t.default=(0,s.default)(i.default,1),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,r){(0,a.default)(t)(e,(0,u.default)((0,l.default)(n)),r)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(24),a=r(i),s=n(87),u=r(s),c=n(3),l=r(c);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=-1,n=e.length;return function(){return++t-1&&e%1==0&&e2&&(o=(0,l.default)(arguments,1)),r[t]=o,n(e)})},function(e){n(e,r)})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(8),a=r(i),s=n(10),u=r(s),c=n(2),l=r(c),f=n(3),p=r(f);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(93),i=r(o),a=n(29),s=r(a);t.default=(0,s.default)(i.default,1),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,r){(0,a.default)(t)(e,(0,u.default)(n),r)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(24),a=r(i),s=n(3),u=r(s);e.exports=t.default}])})},function(e,t,n){"use strict";var r=n(1),o=n(28);if("undefined"===typeof r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var i=(new r.Component).updater;e.exports=o(r.Component,r.isValidElement,i)},function(e,t,n){"use strict";function r(e){return e}function o(e,t,n){function o(e,t){var n=v.hasOwnProperty(t)?v[t]:null;E.hasOwnProperty(t)&&s("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&s("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function c(e,n){if(n){s("function"!==typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),s(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,i=r.__reactAutoBindPairs;n.hasOwnProperty(u)&&_.mixins(e,n.mixins);for(var a in n)if(n.hasOwnProperty(a)&&a!==u){var c=n[a],l=r.hasOwnProperty(a);if(o(l,a),_.hasOwnProperty(a))_[a](e,c);else{var f=v.hasOwnProperty(a),h="function"===typeof c,y=h&&!f&&!l&&!1!==n.autobind;if(y)i.push(a,c),r[a]=c;else if(l){var g=v[a];s(f&&("DEFINE_MANY_MERGED"===g||"DEFINE_MANY"===g),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",g,a),"DEFINE_MANY_MERGED"===g?r[a]=p(r[a],c):"DEFINE_MANY"===g&&(r[a]=d(r[a],c))}else r[a]=c}}}else;}function l(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in _;s(!o,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var i=n in e;if(i){var a=b.hasOwnProperty(n)?b[n]:null;return s("DEFINE_MANY_MERGED"===a,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(e[n]=p(e[n],r))}e[n]=r}}}function f(e,t){s(e&&t&&"object"===typeof e&&"object"===typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in t)t.hasOwnProperty(n)&&(s(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function p(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return f(o,n),f(o,r),o}}function d(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function h(e,t){var n=t.bind(e);return n}function y(e){for(var t=e.__reactAutoBindPairs,n=0;n capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9)))\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\nvar g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\n} catch(e) {\n\t// This works if the window reference is available\n\tif(typeof window === \"object\")\n\t\tg = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = __webpack_require__(4);\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._44);\n p._83 = 1;\n p._18 = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nPromise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._83 === 3) {\n val = val._18;\n }\n if (val._83 === 1) return res(i, val._18);\n if (val._83 === 2) reject(val._18);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n values.forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\n(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n rawHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = 'status' in options ? options.status : 200\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__registerServiceWorker__ = __webpack_require__(13);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom__ = __webpack_require__(15);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_dom__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_css__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__index_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_chat_engine__ = __webpack_require__(26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_chat_engine___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_chat_engine__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_create_react_class__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_create_react_class__);\nObject(__WEBPACK_IMPORTED_MODULE_0__registerServiceWorker__[\"a\" /* default */])();var now=new Date().getTime();var username=['user',now].join('-');var ChatEngine=__WEBPACK_IMPORTED_MODULE_4_chat_engine___default.a.create({publishKey:'pub-c-df1f983b-8334-44aa-b32b-2fa23eff1f8f',subscribeKey:'sub-c-bf3164ba-f737-11e7-b8a6-46d99af2bb8c'},{globalChannel:'chat-engine-react'});ChatEngine.connect(username,{signedOnTime:now},'auth-key');var Message=__WEBPACK_IMPORTED_MODULE_5_create_react_class___default()({displayName:'Message',render:function render(){console.log('mes',this.props);return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div',null,' ',this.props.uuid,': ',this.props.text,' ');}});var Chat=__WEBPACK_IMPORTED_MODULE_5_create_react_class___default()({displayName:'Chat',getInitialState:function getInitialState(){return{messages:[],chatInput:''};},setChatInput:function setChatInput(event){this.setState({chatInput:event.target.value});},sendChat:function sendChat(){if(this.state.chatInput){ChatEngine.global.emit('message',{text:this.state.chatInput});this.setState({chatInput:''});}},componentDidMount:function componentDidMount(){var _this=this;ChatEngine.global.on('message',function(payload){var messages=_this.state.messages;messages.push(payload);_this.setState({messages:messages});});},_handleKeyPress:function _handleKeyPress(e){if(e.key==='Enter'){this.sendChat();}},render:function render(){console.log('render called');console.log(this.state.messages);var messageList=this.state.messages.map(function(payload){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(Message,{key:payload.timetoken,uuid:payload.sender.uuid,text:payload.data.text});});return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div',{id:'chat-output'},' ',messageList,' '),' ',__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input',{id:'chat-input',type:'text',name:'',value:this.state.chatInput,onChange:this.setChatInput,onKeyPress:this._handleKeyPress}),' ',__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input',{type:'button',onClick:this.sendChat,value:'Send Chat'}));}});ChatEngine.on('$.ready',function(){__WEBPACK_IMPORTED_MODULE_2_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(Chat,null),document.getElementById('root'));});\n\n/***/ }),\n/* 13 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = register;\n/* unused harmony export unregister */\n// In production, we register a service worker to serve assets from local cache.\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\n// cached resources are updated in the background.\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\n// This link also includes instructions on opting out of this behavior.\nvar isLocalhost=Boolean(window.location.hostname==='localhost'||// [::1] is the IPv6 localhost address.\nwindow.location.hostname==='[::1]'||// 127.0.0.1/8 is considered localhost for IPv4.\nwindow.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function register(){if(\"production\"==='production'&&'serviceWorker'in navigator){// The URL constructor is available in all browsers that support SW.\nvar publicUrl=new URL(\"\",window.location);if(publicUrl.origin!==window.location.origin){// Our service worker won't work if PUBLIC_URL is on a different origin\n// from what our page is served on. This might happen if a CDN is used to\n// serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\nreturn;}window.addEventListener('load',function(){var swUrl=\"\"+'/service-worker.js';if(isLocalhost){// This is running on localhost. Lets check if a service worker still exists or not.\ncheckValidServiceWorker(swUrl);// Add some additional logging to localhost, pointing developers to the\n// service worker/PWA documentation.\nnavigator.serviceWorker.ready.then(function(){console.log('This web app is being served cache-first by a service '+'worker. To learn more, visit https://goo.gl/SC7cgQ');});}else{// Is not local host. Just register service worker\nregisterValidSW(swUrl);}});}}function registerValidSW(swUrl){navigator.serviceWorker.register(swUrl).then(function(registration){registration.onupdatefound=function(){var installingWorker=registration.installing;installingWorker.onstatechange=function(){if(installingWorker.state==='installed'){if(navigator.serviceWorker.controller){// At this point, the old content will have been purged and\n// the fresh content will have been added to the cache.\n// It's the perfect time to display a \"New content is\n// available; please refresh.\" message in your web app.\nconsole.log('New content is available; please refresh.');}else{// At this point, everything has been precached.\n// It's the perfect time to display a\n// \"Content is cached for offline use.\" message.\nconsole.log('Content is cached for offline use.');}}};};}).catch(function(error){console.error('Error during service worker registration:',error);});}function checkValidServiceWorker(swUrl){// Check if the service worker can be found. If it can't reload the page.\nfetch(swUrl).then(function(response){// Ensure service worker exists, and that we really are getting a JS file.\nif(response.status===404||response.headers.get('content-type').indexOf('javascript')===-1){// No service worker found. Probably a different app. Reload the page.\nnavigator.serviceWorker.ready.then(function(registration){registration.unregister().then(function(){window.location.reload();});});}else{// Service worker found. Proceed as normal.\nregisterValidSW(swUrl);}}).catch(function(){console.log('No internet connection found. App is running in offline mode.');});}function unregister(){if('serviceWorker'in navigator){navigator.serviceWorker.ready.then(function(registration){registration.unregister();});}}\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/** @license React v16.2.0\n * react.production.min.js\n *\n * Copyright (c) 2013-present, Facebook, Inc.\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\nvar m=__webpack_require__(0),n=__webpack_require__(2),p=__webpack_require__(3),q=\"function\"===typeof Symbol&&Symbol[\"for\"],r=q?Symbol[\"for\"](\"react.element\"):60103,t=q?Symbol[\"for\"](\"react.call\"):60104,u=q?Symbol[\"for\"](\"react.return\"):60105,v=q?Symbol[\"for\"](\"react.portal\"):60106,w=q?Symbol[\"for\"](\"react.fragment\"):60107,x=\"function\"===typeof Symbol&&Symbol.iterator;\nfunction y(a){for(var b=arguments.length-1,e=\"Minified React error #\"+a+\"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\\x3d\"+a,c=0;cM.length&&M.push(a)}\nfunction P(a,b,e,c){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case r:case t:case u:case v:g=!0}}if(g)return e(c,a,\"\"===b?\".\"+Q(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var k=0;k=g.hasBooleanValue+g.hasNumericValue+g.hasOverloadedBooleanValue?void 0:E(\"50\",f);e.hasOwnProperty(f)&&(g.attributeName=e[f]);d.hasOwnProperty(f)&&(g.attributeNamespace=d[f]);a.hasOwnProperty(f)&&(g.mutationMethod=a[f]);ua[f]=g}}},ua={};\nfunction va(a,b){if(oa.hasOwnProperty(a)||2this.eventPool.length&&this.eventPool.push(a)}function Jb(a){a.eventPool=[];a.getPooled=Kb;a.release=Lb}function Mb(a,b,c,d){return T.call(this,a,b,c,d)}T.augmentClass(Mb,{data:null});function Nb(a,b,c,d){return T.call(this,a,b,c,d)}T.augmentClass(Nb,{data:null});var Pb=[9,13,27,32],Vb=l.canUseDOM&&\"CompositionEvent\"in window,Wb=null;l.canUseDOM&&\"documentMode\"in document&&(Wb=document.documentMode);var Xb;\nif(Xb=l.canUseDOM&&\"TextEvent\"in window&&!Wb){var Yb=window.opera;Xb=!(\"object\"===typeof Yb&&\"function\"===typeof Yb.version&&12>=parseInt(Yb.version(),10))}\nvar Zb=Xb,$b=l.canUseDOM&&(!Vb||Wb&&8=Wb),ac=String.fromCharCode(32),bc={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"topCompositionEnd\",\"topKeyPress\",\"topTextInput\",\"topPaste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown\".split(\" \")}},cc=!1;\nfunction dc(a,b){switch(a){case \"topKeyUp\":return-1!==Pb.indexOf(b.keyCode);case \"topKeyDown\":return 229!==b.keyCode;case \"topKeyPress\":case \"topMouseDown\":case \"topBlur\":return!0;default:return!1}}function ec(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var fc=!1;function gc(a,b){switch(a){case \"topCompositionEnd\":return ec(b);case \"topKeyPress\":if(32!==b.which)return null;cc=!0;return ac;case \"topTextInput\":return a=b.data,a===ac&&cc?null:a;default:return null}}\nfunction hc(a,b){if(fc)return\"topCompositionEnd\"===a||!Vb&&dc(a,b)?(a=Fb(),S._root=null,S._startText=null,S._fallbackText=null,fc=!1,a):null;switch(a){case \"topPaste\":return null;case \"topKeyPress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1qd.length&&qd.push(a)}}}\nvar xd=Object.freeze({get _enabled(){return td},get _handleTopLevel(){return sd},setHandleTopLevel:function(a){sd=a},setEnabled:ud,isEnabled:function(){return td},trapBubbledEvent:U,trapCapturedEvent:wd,dispatchEvent:vd});function yd(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c[\"Webkit\"+a]=\"webkit\"+b;c[\"Moz\"+a]=\"moz\"+b;c[\"ms\"+a]=\"MS\"+b;c[\"O\"+a]=\"o\"+b.toLowerCase();return c}\nvar zd={animationend:yd(\"Animation\",\"AnimationEnd\"),animationiteration:yd(\"Animation\",\"AnimationIteration\"),animationstart:yd(\"Animation\",\"AnimationStart\"),transitionend:yd(\"Transition\",\"TransitionEnd\")},Ad={},Bd={};l.canUseDOM&&(Bd=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete zd.animationend.animation,delete zd.animationiteration.animation,delete zd.animationstart.animation),\"TransitionEvent\"in window||delete zd.transitionend.transition);\nfunction Cd(a){if(Ad[a])return Ad[a];if(!zd[a])return a;var b=zd[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Bd)return Ad[a]=b[c];return\"\"}\nvar Dd={topAbort:\"abort\",topAnimationEnd:Cd(\"animationend\")||\"animationend\",topAnimationIteration:Cd(\"animationiteration\")||\"animationiteration\",topAnimationStart:Cd(\"animationstart\")||\"animationstart\",topBlur:\"blur\",topCancel:\"cancel\",topCanPlay:\"canplay\",topCanPlayThrough:\"canplaythrough\",topChange:\"change\",topClick:\"click\",topClose:\"close\",topCompositionEnd:\"compositionend\",topCompositionStart:\"compositionstart\",topCompositionUpdate:\"compositionupdate\",topContextMenu:\"contextmenu\",topCopy:\"copy\",\ntopCut:\"cut\",topDoubleClick:\"dblclick\",topDrag:\"drag\",topDragEnd:\"dragend\",topDragEnter:\"dragenter\",topDragExit:\"dragexit\",topDragLeave:\"dragleave\",topDragOver:\"dragover\",topDragStart:\"dragstart\",topDrop:\"drop\",topDurationChange:\"durationchange\",topEmptied:\"emptied\",topEncrypted:\"encrypted\",topEnded:\"ended\",topError:\"error\",topFocus:\"focus\",topInput:\"input\",topKeyDown:\"keydown\",topKeyPress:\"keypress\",topKeyUp:\"keyup\",topLoadedData:\"loadeddata\",topLoad:\"load\",topLoadedMetadata:\"loadedmetadata\",topLoadStart:\"loadstart\",\ntopMouseDown:\"mousedown\",topMouseMove:\"mousemove\",topMouseOut:\"mouseout\",topMouseOver:\"mouseover\",topMouseUp:\"mouseup\",topPaste:\"paste\",topPause:\"pause\",topPlay:\"play\",topPlaying:\"playing\",topProgress:\"progress\",topRateChange:\"ratechange\",topScroll:\"scroll\",topSeeked:\"seeked\",topSeeking:\"seeking\",topSelectionChange:\"selectionchange\",topStalled:\"stalled\",topSuspend:\"suspend\",topTextInput:\"textInput\",topTimeUpdate:\"timeupdate\",topToggle:\"toggle\",topTouchCancel:\"touchcancel\",topTouchEnd:\"touchend\",topTouchMove:\"touchmove\",\ntopTouchStart:\"touchstart\",topTransitionEnd:Cd(\"transitionend\")||\"transitionend\",topVolumeChange:\"volumechange\",topWaiting:\"waiting\",topWheel:\"wheel\"},Ed={},Fd=0,Gd=\"_reactListenersID\"+(\"\"+Math.random()).slice(2);function Hd(a){Object.prototype.hasOwnProperty.call(a,Gd)||(a[Gd]=Fd++,Ed[a[Gd]]={});return Ed[a[Gd]]}function Id(a){for(;a&&a.firstChild;)a=a.firstChild;return a}\nfunction Jd(a,b){var c=Id(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=Id(c)}}function Kd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&\"text\"===a.type||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Ld=l.canUseDOM&&\"documentMode\"in document&&11>=document.documentMode,Md={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange\".split(\" \")}},Nd=null,Od=null,Pd=null,Qd=!1;\nfunction Rd(a,b){if(Qd||null==Nd||Nd!==da())return null;var c=Nd;\"selectionStart\"in c&&Kd(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return Pd&&ea(Pd,c)?null:(Pd=c,a=T.getPooled(Md.select,Od,a,b),a.type=\"select\",a.target=Nd,Ab(a),a)}\nvar Sd={eventTypes:Md,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=Hd(e);f=Sa.onSelect;for(var g=0;ghe||(a.current=ge[he],ge[he]=null,he--)}function W(a,b){he++;ge[he]=a.current;a.current=b}new Set;var ie={current:D},X={current:!1},je=D;function ke(a){return le(a)?je:ie.current}\nfunction me(a,b){var c=a.type.contextTypes;if(!c)return D;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 le(a){return 2===a.tag&&null!=a.type.childContextTypes}function ne(a){le(a)&&(V(X,a),V(ie,a))}\nfunction oe(a,b,c){null!=ie.cursor?E(\"168\"):void 0;W(ie,b,a);W(X,c,a)}function pe(a,b){var c=a.stateNode,d=a.type.childContextTypes;if(\"function\"!==typeof c.getChildContext)return b;c=c.getChildContext();for(var e in c)e in d?void 0:E(\"108\",jd(a)||\"Unknown\",e);return B({},b,c)}function qe(a){if(!le(a))return!1;var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||D;je=ie.current;W(ie,b,a);W(X,X.current,a);return!0}\nfunction re(a,b){var c=a.stateNode;c?void 0:E(\"169\");if(b){var d=pe(a,je);c.__reactInternalMemoizedMergedChildContext=d;V(X,a);V(ie,a);W(ie,d,a)}else V(X,a);W(X,b,a)}\nfunction Y(a,b,c){this.tag=a;this.key=b;this.stateNode=this.type=null;this.sibling=this.child=this[\"return\"]=null;this.index=0;this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null;this.internalContextTag=c;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.expirationTime=0;this.alternate=null}\nfunction se(a,b,c){var d=a.alternate;null===d?(d=new Y(a.tag,a.key,a.internalContextTag),d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.effectTag=0,d.nextEffect=null,d.firstEffect=null,d.lastEffect=null);d.expirationTime=c;d.pendingProps=b;d.child=a.child;d.memoizedProps=a.memoizedProps;d.memoizedState=a.memoizedState;d.updateQueue=a.updateQueue;d.sibling=a.sibling;d.index=a.index;d.ref=a.ref;return d}\nfunction te(a,b,c){var d=void 0,e=a.type,f=a.key;\"function\"===typeof e?(d=e.prototype&&e.prototype.isReactComponent?new Y(2,f,b):new Y(0,f,b),d.type=e,d.pendingProps=a.props):\"string\"===typeof e?(d=new Y(5,f,b),d.type=e,d.pendingProps=a.props):\"object\"===typeof e&&null!==e&&\"number\"===typeof e.tag?(d=e,d.pendingProps=a.props):E(\"130\",null==e?e:typeof e,\"\");d.expirationTime=c;return d}function ue(a,b,c,d){b=new Y(10,d,b);b.pendingProps=a;b.expirationTime=c;return b}\nfunction ve(a,b,c){b=new Y(6,null,b);b.pendingProps=a;b.expirationTime=c;return b}function we(a,b,c){b=new Y(7,a.key,b);b.type=a.handler;b.pendingProps=a;b.expirationTime=c;return b}function xe(a,b,c){a=new Y(9,null,b);a.expirationTime=c;return a}function ye(a,b,c){b=new Y(4,a.key,b);b.pendingProps=a.children||[];b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}var ze=null,Ae=null;\nfunction Be(a){return function(b){try{return a(b)}catch(c){}}}function Ce(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);ze=Be(function(a){return b.onCommitFiberRoot(c,a)});Ae=Be(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}function De(a){\"function\"===typeof ze&&ze(a)}function Ee(a){\"function\"===typeof Ae&&Ae(a)}\nfunction Fe(a){return{baseState:a,expirationTime:0,first:null,last:null,callbackList:null,hasForceUpdate:!1,isInitialized:!1}}function Ge(a,b){null===a.last?a.first=a.last=b:(a.last.next=b,a.last=b);if(0===a.expirationTime||a.expirationTime>b.expirationTime)a.expirationTime=b.expirationTime}\nfunction He(a,b){var c=a.alternate,d=a.updateQueue;null===d&&(d=a.updateQueue=Fe(null));null!==c?(a=c.updateQueue,null===a&&(a=c.updateQueue=Fe(null))):a=null;a=a!==d?a:null;null===a?Ge(d,b):null===d.last||null===a.last?(Ge(d,b),Ge(a,b)):(Ge(d,b),a.last=b)}function Ie(a,b,c,d){a=a.partialState;return\"function\"===typeof a?a.call(b,c,d):a}\nfunction Je(a,b,c,d,e,f){null!==a&&a.updateQueue===c&&(c=b.updateQueue={baseState:c.baseState,expirationTime:c.expirationTime,first:c.first,last:c.last,isInitialized:c.isInitialized,callbackList:null,hasForceUpdate:!1});c.expirationTime=0;c.isInitialized?a=c.baseState:(a=c.baseState=b.memoizedState,c.isInitialized=!0);for(var g=!0,h=c.first,k=!1;null!==h;){var q=h.expirationTime;if(q>f){var v=c.expirationTime;if(0===v||v>q)c.expirationTime=q;k||(k=!0,c.baseState=a)}else{k||(c.first=h.next,null===\nc.first&&(c.last=null));if(h.isReplace)a=Ie(h,d,a,e),g=!0;else if(q=Ie(h,d,a,e))a=g?B({},a,q):B(a,q),g=!1;h.isForced&&(c.hasForceUpdate=!0);null!==h.callback&&(q=c.callbackList,null===q&&(q=c.callbackList=[]),q.push(h))}h=h.next}null!==c.callbackList?b.effectTag|=32:null!==c.first||c.hasForceUpdate||(b.updateQueue=null);k||(c.baseState=a);return a}\nfunction Ke(a,b){var c=a.callbackList;if(null!==c)for(a.callbackList=null,a=0;aw?(k=n,n=null):k=n.sibling;var x=G(e,n,m[w],A);if(null===x){null===n&&(n=k);break}a&&n&&null===x.alternate&&b(e,n);g=f(x,g,w);null===r?h=x:r.sibling=x;r=x;n=k}if(w===m.length)return c(e,n),h;if(null===n){for(;ww?(k=n,n=null):k=n.sibling;var J=G(e,n,x.value,A);if(null===J){n||(n=k);break}a&&n&&null===J.alternate&&b(e,n);g=f(J,\ng,w);null===r?h=J:r.sibling=J;r=J;n=k}if(x.done)return c(e,n),h;if(null===n){for(;!x.done;w++,x=m.next())x=z(e,x.value,A),null!==x&&(g=f(x,g,w),null===r?h=x:r.sibling=x,r=x);return h}for(n=d(e,n);!x.done;w++,x=m.next())if(x=I(n,e,w,x.value,A),null!==x){if(a&&null!==x.alternate)n[\"delete\"](null===x.key?w:x.key);g=f(x,g,w);null===r?h=x:r.sibling=x;r=x}a&&n.forEach(function(a){return b(e,a)});return h}return function(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===Ve&&null===f.key&&(f=f.props.children);\nvar m=\"object\"===typeof f&&null!==f;if(m)switch(f.$$typeof){case Re:a:{var r=f.key;for(m=d;null!==m;){if(m.key===r)if(10===m.tag?f.type===Ve:m.type===f.type){c(a,m.sibling);d=e(m,f.type===Ve?f.props.children:f.props,h);d.ref=Ze(m,f);d[\"return\"]=a;a=d;break a}else{c(a,m);break}else b(a,m);m=m.sibling}f.type===Ve?(d=ue(f.props.children,a.internalContextTag,h,f.key),d[\"return\"]=a,a=d):(h=te(f,a.internalContextTag,h),h.ref=Ze(d,f),h[\"return\"]=a,a=h)}return g(a);case Se:a:{for(m=f.key;null!==d;){if(d.key===\nm)if(7===d.tag){c(a,d.sibling);d=e(d,f,h);d[\"return\"]=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=we(f,a.internalContextTag,h);d[\"return\"]=a;a=d}return g(a);case Te:a:{if(null!==d)if(9===d.tag){c(a,d.sibling);d=e(d,null,h);d.type=f.value;d[\"return\"]=a;a=d;break a}else c(a,d);d=xe(f,a.internalContextTag,h);d.type=f.value;d[\"return\"]=a;a=d}return g(a);case Ue:a:{for(m=f.key;null!==d;){if(d.key===m)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===\nf.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=ye(f,a.internalContextTag,h);d[\"return\"]=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h)):(c(a,d),d=ve(f,a.internalContextTag,h)),d[\"return\"]=a,a=d,g(a);if(Ye(f))return L(a,d,f,h);if(Xe(f))return N(a,d,f,h);m&&$e(a,f);if(\"undefined\"===typeof f)switch(a.tag){case 2:case 1:h=a.type,E(\"152\",h.displayName||\nh.name||\"Component\")}return c(a,d)}}var bf=af(!0),cf=af(!1);\nfunction df(a,b,c,d,e){function f(a,b,c){var d=b.expirationTime;b.child=null===a?cf(b,null,c,d):bf(b,a.child,c,d)}function g(a,b){var c=b.ref;null===c||a&&a.ref===c||(b.effectTag|=128)}function h(a,b,c,d){g(a,b);if(!c)return d&&re(b,!1),q(a,b);c=b.stateNode;id.current=b;var e=c.render();b.effectTag|=1;f(a,b,e);b.memoizedState=c.state;b.memoizedProps=c.props;d&&re(b,!0);return b.child}function k(a){var b=a.stateNode;b.pendingContext?oe(a,b.pendingContext,b.pendingContext!==b.context):b.context&&oe(a,\nb.context,!1);I(a,b.containerInfo)}function q(a,b){null!==a&&b.child!==a.child?E(\"153\"):void 0;if(null!==b.child){a=b.child;var c=se(a,a.pendingProps,a.expirationTime);b.child=c;for(c[\"return\"]=b;null!==a.sibling;)a=a.sibling,c=c.sibling=se(a,a.pendingProps,a.expirationTime),c[\"return\"]=b;c.sibling=null}return b.child}function v(a,b){switch(b.tag){case 3:k(b);break;case 2:qe(b);break;case 4:I(b,b.stateNode.containerInfo)}return null}var y=a.shouldSetTextContent,u=a.useSyncScheduling,z=a.shouldDeprioritizeSubtree,\nG=b.pushHostContext,I=b.pushHostContainer,L=c.enterHydrationState,N=c.resetHydrationState,J=c.tryToClaimNextHydratableInstance;a=Le(d,e,function(a,b){a.memoizedProps=b},function(a,b){a.memoizedState=b});var w=a.adoptClassInstance,m=a.constructClassInstance,A=a.mountClassInstance,Ob=a.updateClassInstance;return{beginWork:function(a,b,c){if(0===b.expirationTime||b.expirationTime>c)return v(a,b);switch(b.tag){case 0:null!==a?E(\"155\"):void 0;var d=b.type,e=b.pendingProps,r=ke(b);r=me(b,r);d=d(e,r);b.effectTag|=\n1;\"object\"===typeof d&&null!==d&&\"function\"===typeof d.render?(b.tag=2,e=qe(b),w(b,d),A(b,c),b=h(a,b,!0,e)):(b.tag=1,f(a,b,d),b.memoizedProps=e,b=b.child);return b;case 1:a:{e=b.type;c=b.pendingProps;d=b.memoizedProps;if(X.current)null===c&&(c=d);else if(null===c||d===c){b=q(a,b);break a}d=ke(b);d=me(b,d);e=e(c,d);b.effectTag|=1;f(a,b,e);b.memoizedProps=c;b=b.child}return b;case 2:return e=qe(b),d=void 0,null===a?b.stateNode?E(\"153\"):(m(b,b.pendingProps),A(b,c),d=!0):d=Ob(a,b,c),h(a,b,d,e);case 3:return k(b),\ne=b.updateQueue,null!==e?(d=b.memoizedState,e=Je(a,b,e,null,null,c),d===e?(N(),b=q(a,b)):(d=e.element,r=b.stateNode,(null===a||null===a.child)&&r.hydrate&&L(b)?(b.effectTag|=2,b.child=cf(b,null,d,c)):(N(),f(a,b,d)),b.memoizedState=e,b=b.child)):(N(),b=q(a,b)),b;case 5:G(b);null===a&&J(b);e=b.type;var n=b.memoizedProps;d=b.pendingProps;null===d&&(d=n,null===d?E(\"154\"):void 0);r=null!==a?a.memoizedProps:null;X.current||null!==d&&n!==d?(n=d.children,y(e,d)?n=null:r&&y(e,r)&&(b.effectTag|=16),g(a,b),\n2147483647!==c&&!u&&z(e,d)?(b.expirationTime=2147483647,b=null):(f(a,b,n),b.memoizedProps=d,b=b.child)):b=q(a,b);return b;case 6:return null===a&&J(b),a=b.pendingProps,null===a&&(a=b.memoizedProps),b.memoizedProps=a,null;case 8:b.tag=7;case 7:e=b.pendingProps;if(X.current)null===e&&(e=a&&a.memoizedProps,null===e?E(\"154\"):void 0);else if(null===e||b.memoizedProps===e)e=b.memoizedProps;d=e.children;b.stateNode=null===a?cf(b,b.stateNode,d,c):bf(b,b.stateNode,d,c);b.memoizedProps=e;return b.stateNode;\ncase 9:return null;case 4:a:{I(b,b.stateNode.containerInfo);e=b.pendingProps;if(X.current)null===e&&(e=a&&a.memoizedProps,null==e?E(\"154\"):void 0);else if(null===e||b.memoizedProps===e){b=q(a,b);break a}null===a?b.child=bf(b,null,e,c):f(a,b,e);b.memoizedProps=e;b=b.child}return b;case 10:a:{c=b.pendingProps;if(X.current)null===c&&(c=b.memoizedProps);else if(null===c||b.memoizedProps===c){b=q(a,b);break a}f(a,b,c);b.memoizedProps=c;b=b.child}return b;default:E(\"156\")}},beginFailedWork:function(a,b,\nc){switch(b.tag){case 2:qe(b);break;case 3:k(b);break;default:E(\"157\")}b.effectTag|=64;null===a?b.child=null:b.child!==a.child&&(b.child=a.child);if(0===b.expirationTime||b.expirationTime>c)return v(a,b);b.firstEffect=null;b.lastEffect=null;b.child=null===a?cf(b,null,null,c):bf(b,a.child,null,c);2===b.tag&&(a=b.stateNode,b.memoizedProps=a.props,b.memoizedState=a.state);return b.child}}}\nfunction ef(a,b,c){function d(a){a.effectTag|=4}var e=a.createInstance,f=a.createTextInstance,g=a.appendInitialChild,h=a.finalizeInitialChildren,k=a.prepareUpdate,q=a.persistence,v=b.getRootHostContainer,y=b.popHostContext,u=b.getHostContext,z=b.popHostContainer,G=c.prepareToHydrateHostInstance,I=c.prepareToHydrateHostTextInstance,L=c.popHydrationState,N=void 0,J=void 0,w=void 0;a.mutation?(N=function(){},J=function(a,b,c){(b.updateQueue=c)&&d(b)},w=function(a,b,c,e){c!==e&&d(b)}):q?E(\"235\"):E(\"236\");\nreturn{completeWork:function(a,b,c){var m=b.pendingProps;if(null===m)m=b.memoizedProps;else if(2147483647!==b.expirationTime||2147483647===c)b.pendingProps=null;switch(b.tag){case 1:return null;case 2:return ne(b),null;case 3:z(b);V(X,b);V(ie,b);m=b.stateNode;m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null);if(null===a||null===a.child)L(b),b.effectTag&=-3;N(b);return null;case 5:y(b);c=v();var A=b.type;if(null!==a&&null!=b.stateNode){var p=a.memoizedProps,q=b.stateNode,x=u();q=\nk(q,A,p,m,c,x);J(a,b,q,A,p,m,c);a.ref!==b.ref&&(b.effectTag|=128)}else{if(!m)return null===b.stateNode?E(\"166\"):void 0,null;a=u();if(L(b))G(b,c,a)&&d(b);else{a=e(A,m,c,a,b);a:for(p=b.child;null!==p;){if(5===p.tag||6===p.tag)g(a,p.stateNode);else if(4!==p.tag&&null!==p.child){p.child[\"return\"]=p;p=p.child;continue}if(p===b)break;for(;null===p.sibling;){if(null===p[\"return\"]||p[\"return\"]===b)break a;p=p[\"return\"]}p.sibling[\"return\"]=p[\"return\"];p=p.sibling}h(a,A,m,c)&&d(b);b.stateNode=a}null!==b.ref&&\n(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)w(a,b,a.memoizedProps,m);else{if(\"string\"!==typeof m)return null===b.stateNode?E(\"166\"):void 0,null;a=v();c=u();L(b)?I(b)&&d(b):b.stateNode=f(m,a,c,b)}return null;case 7:(m=b.memoizedProps)?void 0:E(\"165\");b.tag=8;A=[];a:for((p=b.stateNode)&&(p[\"return\"]=b);null!==p;){if(5===p.tag||6===p.tag||4===p.tag)E(\"247\");else if(9===p.tag)A.push(p.type);else if(null!==p.child){p.child[\"return\"]=p;p=p.child;continue}for(;null===p.sibling;){if(null===\np[\"return\"]||p[\"return\"]===b)break a;p=p[\"return\"]}p.sibling[\"return\"]=p[\"return\"];p=p.sibling}p=m.handler;m=p(m.props,A);b.child=bf(b,null!==a?a.child:null,m,c);return b.child;case 8:return b.tag=7,null;case 9:return null;case 10:return null;case 4:return z(b),N(b),null;case 0:E(\"167\");default:E(\"156\")}}}}\nfunction ff(a,b){function c(a){var c=a.ref;if(null!==c)try{c(null)}catch(A){b(a,A)}}function d(a){\"function\"===typeof Ee&&Ee(a);switch(a.tag){case 2:c(a);var d=a.stateNode;if(\"function\"===typeof d.componentWillUnmount)try{d.props=a.memoizedProps,d.state=a.memoizedState,d.componentWillUnmount()}catch(A){b(a,A)}break;case 5:c(a);break;case 7:e(a.stateNode);break;case 4:k&&g(a)}}function e(a){for(var b=a;;)if(d(b),null===b.child||k&&4===b.tag){if(b===a)break;for(;null===b.sibling;){if(null===b[\"return\"]||\nb[\"return\"]===a)return;b=b[\"return\"]}b.sibling[\"return\"]=b[\"return\"];b=b.sibling}else b.child[\"return\"]=b,b=b.child}function f(a){return 5===a.tag||3===a.tag||4===a.tag}function g(a){for(var b=a,c=!1,f=void 0,g=void 0;;){if(!c){c=b[\"return\"];a:for(;;){null===c?E(\"160\"):void 0;switch(c.tag){case 5:f=c.stateNode;g=!1;break a;case 3:f=c.stateNode.containerInfo;g=!0;break a;case 4:f=c.stateNode.containerInfo;g=!0;break a}c=c[\"return\"]}c=!0}if(5===b.tag||6===b.tag)e(b),g?J(f,b.stateNode):N(f,b.stateNode);\nelse if(4===b.tag?f=b.stateNode.containerInfo:d(b),null!==b.child){b.child[\"return\"]=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b[\"return\"]||b[\"return\"]===a)return;b=b[\"return\"];4===b.tag&&(c=!1)}b.sibling[\"return\"]=b[\"return\"];b=b.sibling}}var h=a.getPublicInstance,k=a.mutation;a=a.persistence;k||(a?E(\"235\"):E(\"236\"));var q=k.commitMount,v=k.commitUpdate,y=k.resetTextContent,u=k.commitTextUpdate,z=k.appendChild,G=k.appendChildToContainer,I=k.insertBefore,L=k.insertInContainerBefore,\nN=k.removeChild,J=k.removeChildFromContainer;return{commitResetTextContent:function(a){y(a.stateNode)},commitPlacement:function(a){a:{for(var b=a[\"return\"];null!==b;){if(f(b)){var c=b;break a}b=b[\"return\"]}E(\"160\");c=void 0}var d=b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:E(\"161\")}c.effectTag&16&&(y(b),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c[\"return\"]||f(c[\"return\"])){c=\nnull;break a}c=c[\"return\"]}c.sibling[\"return\"]=c[\"return\"];for(c=c.sibling;5!==c.tag&&6!==c.tag;){if(c.effectTag&2)continue b;if(null===c.child||4===c.tag)continue b;else c.child[\"return\"]=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)c?d?L(b,e.stateNode,c):I(b,e.stateNode,c):d?G(b,e.stateNode):z(b,e.stateNode);else if(4!==e.tag&&null!==e.child){e.child[\"return\"]=e;e=e.child;continue}if(e===a)break;for(;null===e.sibling;){if(null===e[\"return\"]||e[\"return\"]===\na)return;e=e[\"return\"]}e.sibling[\"return\"]=e[\"return\"];e=e.sibling}},commitDeletion:function(a){g(a);a[\"return\"]=null;a.child=null;a.alternate&&(a.alternate.child=null,a.alternate[\"return\"]=null)},commitWork:function(a,b){switch(b.tag){case 2:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&v(c,f,e,a,d,b)}break;case 6:null===b.stateNode?E(\"162\"):void 0;c=b.memoizedProps;u(b.stateNode,null!==a?a.memoizedProps:\nc,c);break;case 3:break;default:E(\"163\")}},commitLifeCycles:function(a,b){switch(b.tag){case 2:var c=b.stateNode;if(b.effectTag&4)if(null===a)c.props=b.memoizedProps,c.state=b.memoizedState,c.componentDidMount();else{var d=a.memoizedProps;a=a.memoizedState;c.props=b.memoizedProps;c.state=b.memoizedState;c.componentDidUpdate(d,a)}b=b.updateQueue;null!==b&&Ke(b,c);break;case 3:c=b.updateQueue;null!==c&&Ke(c,null!==b.child?b.child.stateNode:null);break;case 5:c=b.stateNode;null===a&&b.effectTag&4&&q(c,\nb.type,b.memoizedProps,b);break;case 6:break;case 4:break;default:E(\"163\")}},commitAttachRef:function(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:b(h(c));break;default:b(c)}}},commitDetachRef:function(a){a=a.ref;null!==a&&a(null)}}}var gf={};\nfunction hf(a){function b(a){a===gf?E(\"174\"):void 0;return a}var c=a.getChildHostContext,d=a.getRootHostContext,e={current:gf},f={current:gf},g={current:gf};return{getHostContext:function(){return b(e.current)},getRootHostContainer:function(){return b(g.current)},popHostContainer:function(a){V(e,a);V(f,a);V(g,a)},popHostContext:function(a){f.current===a&&(V(e,a),V(f,a))},pushHostContainer:function(a,b){W(g,b,a);b=d(b);W(f,a,a);W(e,b,a)},pushHostContext:function(a){var d=b(g.current),h=b(e.current);\nd=c(h,a.type,d);h!==d&&(W(f,a,a),W(e,d,a))},resetHostContainer:function(){e.current=gf;g.current=gf}}}\nfunction jf(a){function b(a,b){var c=new Y(5,null,0);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 c(a,b){switch(a.tag){case 5:return b=f(b,a.type,a.pendingProps),null!==b?(a.stateNode=b,!0):!1;case 6:return b=g(b,a.pendingProps),null!==b?(a.stateNode=b,!0):!1;default:return!1}}function d(a){for(a=a[\"return\"];null!==a&&5!==a.tag&&3!==a.tag;)a=a[\"return\"];y=a}var e=a.shouldSetTextContent;\na=a.hydration;if(!a)return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){E(\"175\")},prepareToHydrateHostTextInstance:function(){E(\"176\")},popHydrationState:function(){return!1}};var f=a.canHydrateInstance,g=a.canHydrateTextInstance,h=a.getNextHydratableSibling,k=a.getFirstHydratableChild,q=a.hydrateInstance,v=a.hydrateTextInstance,y=null,u=null,z=!1;return{enterHydrationState:function(a){u=\nk(a.stateNode.containerInfo);y=a;return z=!0},resetHydrationState:function(){u=y=null;z=!1},tryToClaimNextHydratableInstance:function(a){if(z){var d=u;if(d){if(!c(a,d)){d=h(d);if(!d||!c(a,d)){a.effectTag|=2;z=!1;y=a;return}b(y,u)}y=a;u=k(d)}else a.effectTag|=2,z=!1,y=a}},prepareToHydrateHostInstance:function(a,b,c){b=q(a.stateNode,a.type,a.memoizedProps,b,c,a);a.updateQueue=b;return null!==b?!0:!1},prepareToHydrateHostTextInstance:function(a){return v(a.stateNode,a.memoizedProps,a)},popHydrationState:function(a){if(a!==\ny)return!1;if(!z)return d(a),z=!0,!1;var c=a.type;if(5!==a.tag||\"head\"!==c&&\"body\"!==c&&!e(c,a.memoizedProps))for(c=u;c;)b(a,c),c=h(c);d(a);u=y?h(a.stateNode):null;return!0}}}\nfunction kf(a){function b(a){Qb=ja=!0;var b=a.stateNode;b.current===a?E(\"177\"):void 0;b.isReadyForCommit=!1;id.current=null;if(1g.expirationTime)&&(f=g.expirationTime),g=g.sibling;e.expirationTime=f}if(null!==b)return b;null!==c&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1a))if(H<=Uc)for(;null!==F;)F=k(F)?e(F):d(F);else for(;null!==F&&!A();)F=k(F)?e(F):d(F)}else if(!(0===H||H>a))if(H<=Uc)for(;null!==F;)F=d(F);else for(;null!==F&&!A();)F=d(F)}function g(a,b){ja?E(\"243\"):void 0;ja=!0;a.isReadyForCommit=\n!1;if(a!==ra||b!==H||null===F){for(;-1b)a.expirationTime=b;null!==a.alternate&&(0===a.alternate.expirationTime||a.alternate.expirationTime>b)&&(a.alternate.expirationTime=b);if(null===a[\"return\"])if(3===a.tag){var c=a.stateNode;!ja&&c===ra&&bIg&&E(\"185\");if(null===d.nextScheduledRoot)d.remainingExpirationTime=e,null===O?(sa=O=d,d.nextScheduledRoot=d):(O=O.nextScheduledRoot=d,O.nextScheduledRoot=sa);else{var f=d.remainingExpirationTime;if(0===f||eTb)return;Jg(Xc)}var b=Wc()-Pe;Tb=a;Xc=Kg(J,{timeout:10*(a-2)-b})}function N(){var a=0,b=null;if(null!==O)for(var c=O,d=sa;null!==d;){var e=d.remainingExpirationTime;if(0===e){null===c||null===O?E(\"244\"):void 0;if(d===d.nextScheduledRoot){sa=O=d.nextScheduledRoot=null;break}else if(d===sa)sa=e=d.nextScheduledRoot,\nO.nextScheduledRoot=e,d.nextScheduledRoot=null;else if(d===O){O=c;O.nextScheduledRoot=sa;d.nextScheduledRoot=null;break}else c.nextScheduledRoot=d.nextScheduledRoot,d.nextScheduledRoot=null;d=c.nextScheduledRoot}else{if(0===a||eLg?!1:Yc=!0}function Ob(a){null===ma?E(\"246\"):\nvoid 0;ma.remainingExpirationTime=0;Ub||(Ub=!0,Zc=a)}var r=hf(a),n=jf(a),p=r.popHostContainer,qg=r.popHostContext,x=r.resetHostContainer,Me=df(a,r,n,u,y),rg=Me.beginWork,Gg=Me.beginFailedWork,Fg=ef(a,r,n).completeWork;r=ff(a,h);var zg=r.commitResetTextContent,Ne=r.commitPlacement,Bg=r.commitDeletion,Oe=r.commitWork,Dg=r.commitLifeCycles,Eg=r.commitAttachRef,Ag=r.commitDetachRef,Wc=a.now,Kg=a.scheduleDeferredCallback,Jg=a.cancelDeferredCallback,Hg=a.useSyncScheduling,yg=a.prepareForCommit,Cg=a.resetAfterCommit,\nPe=Wc(),Uc=2,ka=0,ja=!1,F=null,ra=null,H=0,t=null,R=null,qa=null,ha=null,ca=null,eb=!1,Qb=!1,Sc=!1,sa=null,O=null,Tb=0,Xc=-1,Fa=!1,ma=null,na=0,Yc=!1,Ub=!1,Zc=null,fb=null,la=!1,Sb=!1,Ig=1E3,Rb=0,Lg=1;return{computeAsyncExpiration:v,computeExpirationForFiber:y,scheduleWork:u,batchedUpdates:function(a,b){var c=la;la=!0;try{return a(b)}finally{(la=c)||Fa||w(1,null)}},unbatchedUpdates:function(a){if(la&&!Sb){Sb=!0;try{return a()}finally{Sb=!1}}return a()},flushSync:function(a){var b=la;la=!0;try{a:{var c=\nka;ka=1;try{var d=a();break a}finally{ka=c}d=void 0}return d}finally{la=b,Fa?E(\"187\"):void 0,w(1,null)}},deferredUpdates:function(a){var b=ka;ka=v();try{return a()}finally{ka=b}}}}\nfunction lf(a){function b(a){a=od(a);return null===a?null:a.stateNode}var c=a.getPublicInstance;a=kf(a);var d=a.computeAsyncExpiration,e=a.computeExpirationForFiber,f=a.scheduleWork;return{createContainer:function(a,b){var c=new Y(3,null,0);a={current:c,containerInfo:a,pendingChildren:null,remainingExpirationTime:0,isReadyForCommit:!1,finishedWork:null,context:null,pendingContext:null,hydrate:b,nextScheduledRoot:null};return c.stateNode=a},updateContainer:function(a,b,c,q){var g=b.current;if(c){c=\nc._reactInternalFiber;var h;b:{2===kd(c)&&2===c.tag?void 0:E(\"170\");for(h=c;3!==h.tag;){if(le(h)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}(h=h[\"return\"])?void 0:E(\"171\")}h=h.stateNode.context}c=le(c)?pe(c,h):h}else c=D;null===b.context?b.context=c:b.pendingContext=c;b=q;b=void 0===b?null:b;q=null!=a&&null!=a.type&&null!=a.type.prototype&&!0===a.type.prototype.unstable_isAsyncReactComponent?d():e(g);He(g,{expirationTime:q,partialState:{element:a},callback:b,isReplace:!1,isForced:!1,\nnextCallback:null,next:null});f(g,q)},batchedUpdates:a.batchedUpdates,unbatchedUpdates:a.unbatchedUpdates,deferredUpdates:a.deferredUpdates,flushSync:a.flushSync,getPublicRootInstance:function(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return c(a.child.stateNode);default:return a.child.stateNode}},findHostInstance:b,findHostInstanceWithNoPortals:function(a){a=pd(a);return null===a?null:a.stateNode},injectIntoDevTools:function(a){var c=a.findFiberByHostInstance;return Ce(B({},\na,{findHostInstanceByFiber:function(a){return b(a)},findFiberByHostInstance:function(a){return c?c(a):null}}))}}}var mf=Object.freeze({default:lf}),nf=mf&&lf||mf,of=nf[\"default\"]?nf[\"default\"]:nf;function pf(a,b,c){var d=3=yf-a)if(-1!==wf&&wf<=\na)Bf.didTimeout=!0;else{xf||(xf=!0,requestAnimationFrame(Df));return}else Bf.didTimeout=!1;wf=-1;a=uf;uf=null;null!==a&&a(Bf)}},!1);var Df=function(a){xf=!1;var b=a-yf+Af;bb&&(b=8),Af=bc||d.hasOverloadedBooleanValue&&!1===c?Jf(a,b):d.mustUseProperty?a[d.propertyName]=c:(b=d.attributeName,(e=d.attributeNamespace)?a.setAttributeNS(e,b,\"\"+c):d.hasBooleanValue||d.hasOverloadedBooleanValue&&!0===c?a.setAttribute(b,\"\"):a.setAttribute(b,\"\"+c))}else Kf(a,b,va(b,c)?c:null)}\nfunction Kf(a,b,c){Hf(b)&&(null==c?a.removeAttribute(b):a.setAttribute(b,\"\"+c))}function Jf(a,b){var c=wa(b);c?(b=c.mutationMethod)?b(a,void 0):c.mustUseProperty?a[c.propertyName]=c.hasBooleanValue?!1:\"\":a.removeAttribute(c.attributeName):a.removeAttribute(b)}\nfunction Lf(a,b){var c=b.value,d=b.checked;return B({type:void 0,step:void 0,min:void 0,max:void 0},b,{defaultChecked:void 0,defaultValue:void 0,value:null!=c?c:a._wrapperState.initialValue,checked:null!=d?d:a._wrapperState.initialChecked})}function Mf(a,b){var c=b.defaultValue;a._wrapperState={initialChecked:null!=b.checked?b.checked:b.defaultChecked,initialValue:null!=b.value?b.value:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}\nfunction Nf(a,b){b=b.checked;null!=b&&If(a,\"checked\",b)}function Of(a,b){Nf(a,b);var c=b.value;if(null!=c)if(0===c&&\"\"===a.value)a.value=\"0\";else if(\"number\"===b.type){if(b=parseFloat(a.value)||0,c!=b||c==b&&a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else null==b.value&&null!=b.defaultValue&&a.defaultValue!==\"\"+b.defaultValue&&(a.defaultValue=\"\"+b.defaultValue),null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction Pf(a,b){switch(b.type){case \"submit\":case \"reset\":break;case \"color\":case \"date\":case \"datetime\":case \"datetime-local\":case \"month\":case \"time\":case \"week\":a.value=\"\";a.value=a.defaultValue;break;default:a.value=a.value}b=a.name;\"\"!==b&&(a.name=\"\");a.defaultChecked=!a.defaultChecked;a.defaultChecked=!a.defaultChecked;\"\"!==b&&(a.name=b)}function Qf(a){var b=\"\";aa.Children.forEach(a,function(a){null==a||\"string\"!==typeof a&&\"number\"!==typeof a||(b+=a)});return b}\nfunction Rf(a,b){a=B({children:void 0},b);if(b=Qf(b.children))a.children=b;return a}function Sf(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e=b.length?void 0:E(\"93\"),b=b[0]),c=\"\"+b),null==c&&(c=\"\"));a._wrapperState={initialValue:\"\"+c}}\nfunction Wf(a,b){var c=b.value;null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));null!=b.defaultValue&&(a.defaultValue=b.defaultValue)}function Xf(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var Yf={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction Zf(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 $f(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?Zf(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar ag=void 0,bg=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!==Yf.svg||\"innerHTML\"in a)a.innerHTML=b;else{ag=ag||document.createElement(\"div\");ag.innerHTML=\"\\x3csvg\\x3e\"+b+\"\\x3c/svg\\x3e\";for(b=ag.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction cg(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar dg={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,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,floodOpacity:!0,\nstopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},eg=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(dg).forEach(function(a){eg.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);dg[b]=dg[a]})});\nfunction fg(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\");var e=c;var f=b[c];e=null==f||\"boolean\"===typeof f||\"\"===f?\"\":d||\"number\"!==typeof f||0===f||dg.hasOwnProperty(e)&&dg[e]?(\"\"+f).trim():f+\"px\";\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var gg=B({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 hg(a,b,c){b&&(gg[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?E(\"137\",a,c()):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?E(\"60\"):void 0,\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML?void 0:E(\"61\")),null!=b.style&&\"object\"!==typeof b.style?E(\"62\",c()):void 0)}\nfunction ig(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}}var jg=Yf.html,kg=C.thatReturns(\"\");\nfunction lg(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Hd(a);b=Sa[b];for(var d=0;d\nd&&(e=d,d=a,a=e);e=Jd(c,a);var f=Jd(c,d);if(e&&f&&(1!==b.rangeCount||b.anchorNode!==e.node||b.anchorOffset!==e.offset||b.focusNode!==f.node||b.focusOffset!==f.offset)){var g=document.createRange();g.setStart(e.node,e.offset);b.removeAllRanges();a>d?(b.addRange(g),b.extend(f.node,f.offset)):(g.setEnd(f.node,f.offset),b.addRange(g))}}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});ia(c);for(c=0;c undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return typeof window !== 'undefined' && typeof document !== 'undefined';\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' && !isArray(obj)) {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge() /* obj1, obj2, obj3, ... */{\n var result = {};\n function assignValue(val, key) {\n if (_typeof(result[key]) === 'object' && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim\n};\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n})();\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while (len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) {\n return [];\n};\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () {\n return '/';\n};\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function () {\n return 0;\n};\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = slice;\nfunction slice(arrayLike, start) {\n start = start | 0;\n var newLen = Math.max(arrayLike.length - start, 0);\n var newArr = Array(newLen);\n for (var idx = 0; idx < newLen; idx++) {\n newArr[idx] = arrayLike[start + idx];\n }\n return newArr;\n}\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isAsync = undefined;\n\nvar _asyncify = __webpack_require__(57);\n\nvar _asyncify2 = _interopRequireDefault(_asyncify);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\nvar supportsSymbol = typeof Symbol === 'function';\n\nfunction isAsync(fn) {\n return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction';\n}\n\nfunction wrapAsync(asyncFn) {\n return isAsync(asyncFn) ? (0, _asyncify2.default)(asyncFn) : asyncFn;\n}\n\nexports.default = wrapAsync;\nexports.isAsync = isAsync;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar waterfall = __webpack_require__(18);\nvar RootEmitter = __webpack_require__(7);\nvar Event = __webpack_require__(23);\n\n/**\n An ChatEngine generic emitter that supports plugins and duplicates\n events on the root emitter.\n @class Emitter\n @extends RootEmitter\n */\n\nvar Emitter = function (_RootEmitter) {\n _inherits(Emitter, _RootEmitter);\n\n function Emitter(chatEngine) {\n _classCallCheck(this, Emitter);\n\n var _this = _possibleConstructorReturn(this, (Emitter.__proto__ || Object.getPrototypeOf(Emitter)).call(this));\n\n _this.chatEngine = chatEngine;\n\n _this.name = 'Emitter';\n\n /**\n Stores a list of plugins bound to this object\n @private\n */\n _this.plugins = [];\n\n /**\n Stores in memory keys and values\n @private\n */\n _this._dataset = {};\n\n /**\n Emit events locally.\n @private\n @param {String} event The event payload object\n */\n _this._emit = function (event) {\n var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\n // all events are forwarded to ChatEngine object\n // so you can globally bind to events with ChatEngine.on()\n _this.chatEngine._emit(event, data, _this);\n\n // emit the event from the object that created it\n _this.emitter.emit(event, data);\n\n return _this;\n };\n\n /**\n * Listen for a specific event and fire a callback when it's emitted. Supports wildcard matching.\n * @method\n * @param {String} event The event name\n * @param {Function} cb The function to run when the event is emitted\n * @example\n *\n * // Get notified whenever someone joins the room\n * object.on('event', (payload) => {\n * console.log('event was fired').\n * })\n *\n * // Get notified of event.a and event.b\n * object.on('event.*', (payload) => {\n * console.log('event.a or event.b was fired').;\n * })\n */\n _this.on = function (event, cb) {\n\n // keep track of all events on this emitter\n _this.events[event] = _this.events[event] || new Event(_this.chatEngine, _this, event);\n\n // call the private _on property\n _this._on(event, cb);\n\n return _this;\n };\n\n return _this;\n }\n\n // add an object as a subobject under a namespoace\n\n\n _createClass(Emitter, [{\n key: 'addChild',\n value: function addChild(childName, childOb) {\n // assign the new child object as a property of parent under the\n // given namespace\n this[childName] = childOb;\n\n // assign a data set for the namespace if it doesn't exist\n if (!this._dataset[childName]) {\n this._dataset[childName] = {};\n }\n\n // the new object can use ```this.parent``` to access\n // the root class\n childOb.parent = this;\n\n // bind get() and set() to the data set\n childOb.get = this.get.bind(this._dataset[childName]);\n childOb.set = this.set.bind(this._dataset[childName]);\n }\n }, {\n key: 'get',\n value: function get(key) {\n return this[key];\n }\n }, {\n key: 'set',\n value: function set(key, value) {\n if (this[key] && !value) {\n delete this[key];\n } else {\n this[key] = value;\n }\n }\n\n /**\n Binds a plugin to this object\n @param {Object} module The plugin module\n @tutorial using\n */\n\n }, {\n key: 'plugin',\n value: function plugin(module) {\n\n // add this plugin to a list of plugins for this object\n this.plugins.push(module);\n\n // see if there are plugins to attach to this class\n if (module.extends && module.extends[this.name]) {\n // attach the plugins to this class\n // under their namespace\n this.addChild(module.namespace, new module.extends[this.name]());\n\n this[module.namespace].ChatEngine = this.chatEngine;\n\n // if the plugin has a special construct function\n // run it\n if (this[module.namespace].construct) {\n this[module.namespace].construct();\n }\n }\n\n return this;\n }\n }, {\n key: 'bindProtoPlugins',\n value: function bindProtoPlugins() {\n var _this2 = this;\n\n if (this.chatEngine.protoPlugins[this.name]) {\n\n this.chatEngine.protoPlugins[this.name].forEach(function (module) {\n _this2.plugin(module);\n });\n }\n }\n\n /**\n Broadcasts an event locally to all listeners.\n @private\n @param {String} event The event name\n @param {Object} payload The event payload object\n */\n\n }, {\n key: 'trigger',\n value: function trigger(event) {\n var _this3 = this;\n\n var payload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var done = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};\n\n\n var complete = function complete() {\n\n // let plugins modify the event\n _this3.runPluginQueue('on', event, function (next) {\n next(null, payload);\n }, function (reject, pluginResponse) {\n\n if (reject) {\n done(reject);\n } else {\n // emit this event to any listener\n _this3._emit(event, pluginResponse);\n done(null, event, pluginResponse);\n }\n });\n };\n\n // this can be made into plugin\n if ((typeof payload === 'undefined' ? 'undefined' : _typeof(payload)) === 'object') {\n\n // restore chat in payload\n if (!payload.chat) {\n payload.chat = this;\n }\n\n // if we should try to restore the sender property\n if (payload.sender && typeof payload.sender === 'string') {\n\n // the user doesn't exist, create it\n payload.sender = new this.chatEngine.User(payload.sender);\n\n payload.sender._getState(function () {\n complete();\n });\n } else {\n // there's no \"sender\" in this object, move on\n complete();\n }\n } else {\n // payload is not an object, we want nothing to do with it.\n complete();\n }\n }\n\n /**\n Load plugins and attach a queue of functions to execute before and\n after events are trigger or received.\n @private\n @param {String} location Where in the middleeware the event should run (emit, trigger)\n @param {String} event The event name\n @param {String} first The first function to run before the plugins have run\n @param {String} last The last function to run after the plugins have run\n */\n\n }, {\n key: 'runPluginQueue',\n value: function runPluginQueue(location, event, first, last) {\n\n // this assembles a queue of functions to run as middleware\n // event is a triggered event key\n var pluginQueue = [];\n\n // the first function is always required\n pluginQueue.push(first);\n\n // look through the configured plugins\n this.plugins.forEach(function (pluginItem) {\n\n // if they have defined a function to run specifically\n // for this event\n if (pluginItem.middleware && pluginItem.middleware[location]) {\n\n if (pluginItem.middleware[location][event]) {\n // add the function to the queue\n pluginQueue.push(pluginItem.middleware[location][event]);\n }\n\n if (pluginItem.middleware[location]['*']) {\n // add the function to the queue\n pluginQueue.push(pluginItem.middleware[location]['*']);\n }\n }\n });\n\n // waterfall runs the functions in assigned order\n // waiting for one to complete before moving to the next\n // when it's done, the ```last``` parameter is called\n waterfall(pluginQueue, last);\n }\n }, {\n key: 'onConstructed',\n value: function onConstructed() {\n\n this.bindProtoPlugins();\n this.trigger(['$', 'created', this.name.toLowerCase()].join('.'));\n }\n }]);\n\n return Emitter;\n}(RootEmitter);\n\nmodule.exports = Emitter;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {\n\nvar utils = __webpack_require__(0);\nvar normalizeHeaderName = __webpack_require__(38);\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = __webpack_require__(14);\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = __webpack_require__(14);\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) {/* Ignore */}\n }\n return data;\n }],\n\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function () {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function get() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function get() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// Allows us to create and bind to events. Everything in ChatEngine is an event\n// emitter\nvar EventEmitter2 = __webpack_require__(55).EventEmitter2;\n\n/**\n* The {@link ChatEngine} object is a RootEmitter. Configures an event emitter that other ChatEngine objects inherit. Adds shortcut methods for\n* ```this.on()```, ```this.emit()```, etc.\n* @class RootEmitter\n*/\n\nvar RootEmitter = function RootEmitter() {\n var _this = this;\n\n _classCallCheck(this, RootEmitter);\n\n /**\n * @private\n */\n this.events = {};\n\n this.name = 'RootEmitter';\n\n /**\n Create a new EventEmitter2 object for this class.\n @private\n */\n this.emitter = new EventEmitter2({\n wildcard: true,\n newListener: true,\n maxListeners: 50,\n verboseMemoryLeak: true\n });\n\n // we bind to make sure wildcards work\n // https://github.com/asyncly/EventEmitter2/issues/186\n\n /**\n Private emit method that broadcasts the event to listeners on this page.\n @private\n @param {String} event The event name\n @param {Object} the event payload\n */\n this._emit = this.emitter.emit.bind(this.emitter);\n\n /**\n Listen for a specific event and fire a callback when it's emitted. This is reserved in case ```this.on``` is overwritten.\n @private\n @param {String} event The event name\n @param {Function} callback The function to run when the event is emitted\n */\n\n this._on = this.emitter.on.bind(this.emitter);\n\n /**\n * Listen for a specific event and fire a callback when it's emitted. Supports wildcard matching.\n * @method\n * @param {String} event The event name\n * @param {Function} cb The function to run when the event is emitted\n * @example\n *\n * // Get notified whenever someone joins the room\n * object.on('event', (payload) => {\n * console.log('event was fired').\n * })\n *\n * // Get notified of event.a and event.b\n * object.on('event.*', (payload) => {\n * console.log('event.a or event.b was fired').;\n * })\n */\n this.on = function (event, callback) {\n\n // emit the event from the object that created it\n _this.emitter.on(event, callback);\n\n return _this;\n };\n\n /**\n * Stop a callback from listening to an event.\n * @method\n * @param {String} event The event name\n * @example\n * let callback = function(payload;) {\n * console.log('something happend!');\n * };\n * object.on('event', callback);\n * // ...\n * object.off('event', callback);\n */\n this.off = function (event, callback) {\n\n // emit the event from the object that created it\n _this.emitter.off(event, callback);\n\n return _this;\n };\n\n /**\n * Listen for any event on this object and fire a callback when it's emitted\n * @method\n * @param {Function} callback The function to run when any event is emitted. First parameter is the event name and second is the payload.\n * @example\n * object.onAny((event, payload) => {\n * console.log('All events trigger this.');\n * });\n */\n this.onAny = function (event, callback) {\n\n // emit the event from the object that created it\n _this.emitter.onAny(event, callback);\n\n return _this;\n };\n\n /**\n * Listen for an event and only fire the callback a single time\n * @method\n * @param {String} event The event name\n * @param {Function} callback The function to run once\n * @example\n * object.once('message', => (event, payload) {\n * console.log('This is only fired once!');\n * });\n */\n this.once = function (event, callback) {\n\n // emit the event from the object that created it\n _this.emitter.once(event, callback);\n\n return _this;\n };\n};\n\nmodule.exports = RootEmitter;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar g;\n\n// This works in non-strict mode\ng = function () {\n\treturn this;\n}();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\n} catch (e) {\n\t// This works if the window reference is available\n\tif ((typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar isFunction = __webpack_require__(66),\n isLength = __webpack_require__(28);\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _Symbol = __webpack_require__(25),\n getRawTag = __webpack_require__(67),\n objectToString = __webpack_require__(68);\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) == 'object';\n}\n\nmodule.exports = isObjectLike;\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {\n\nvar utils = __webpack_require__(0);\nvar settle = __webpack_require__(39);\nvar buildURL = __webpack_require__(41);\nvar parseHeaders = __webpack_require__(42);\nvar isURLSameOrigin = __webpack_require__(43);\nvar createError = __webpack_require__(15);\nvar btoa = typeof window !== 'undefined' && window.btoa && window.btoa.bind(window) || __webpack_require__(44);\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n var loadEvent = 'onreadystatechange';\n var xDomain = false;\n\n // For IE 8/9 CORS support\n // Only supports POST and GET calls and doesn't returns the response headers.\n // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n if (process.env.NODE_ENV !== 'test' && typeof window !== 'undefined' && window.XDomainRequest && !('withCredentials' in request) && !isURLSameOrigin(config.url)) {\n request = new window.XDomainRequest();\n loadEvent = 'onload';\n xDomain = true;\n request.onprogress = function handleProgress() {};\n request.ontimeout = function handleTimeout() {};\n }\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request[loadEvent] = function handleLoad() {\n if (!request || request.readyState !== 4 && !xDomain) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201)\n status: request.status === 1223 ? 204 : request.status,\n statusText: request.status === 1223 ? 'No Content' : request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = __webpack_require__(45);\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar enhanceError = __webpack_require__(40);\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\n\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function (tasks, callback) {\n callback = (0, _once2.default)(callback || _noop2.default);\n if (!(0, _isArray2.default)(tasks)) return callback(new Error('First argument to waterfall must be an array of functions'));\n if (!tasks.length) return callback();\n var taskIndex = 0;\n\n function nextTask(args) {\n var task = (0, _wrapAsync2.default)(tasks[taskIndex++]);\n args.push((0, _onlyOnce2.default)(next));\n task.apply(null, args);\n }\n\n function next(err /*, ...args*/) {\n if (err || taskIndex === tasks.length) {\n return callback.apply(null, arguments);\n }\n nextTask((0, _slice2.default)(arguments, 1));\n }\n\n nextTask([]);\n};\n\nvar _isArray = __webpack_require__(19);\n\nvar _isArray2 = _interopRequireDefault(_isArray);\n\nvar _noop = __webpack_require__(8);\n\nvar _noop2 = _interopRequireDefault(_noop);\n\nvar _once = __webpack_require__(20);\n\nvar _once2 = _interopRequireDefault(_once);\n\nvar _slice = __webpack_require__(2);\n\nvar _slice2 = _interopRequireDefault(_slice);\n\nvar _onlyOnce = __webpack_require__(21);\n\nvar _onlyOnce2 = _interopRequireDefault(_onlyOnce);\n\nvar _wrapAsync = __webpack_require__(3);\n\nvar _wrapAsync2 = _interopRequireDefault(_wrapAsync);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\nmodule.exports = exports['default'];\n\n/**\n * Runs the `tasks` array of functions in series, each passing their results to\n * the next in the array. However, if any of the `tasks` pass an error to their\n * own callback, the next function is not executed, and the main `callback` is\n * immediately called with the error.\n *\n * @name waterfall\n * @static\n * @memberOf module:ControlFlow\n * @method\n * @category Control Flow\n * @param {Array} tasks - An array of [async functions]{@link AsyncFunction}\n * to run.\n * Each function should complete with any number of `result` values.\n * The `result` values will be passed as arguments, in order, to the next task.\n * @param {Function} [callback] - An optional callback to run once all the\n * functions have completed. This will be passed the results of the last task's\n * callback. Invoked with (err, [results]).\n * @returns undefined\n * @example\n *\n * async.waterfall([\n * function(callback) {\n * callback(null, 'one', 'two');\n * },\n * function(arg1, arg2, callback) {\n * // arg1 now equals 'one' and arg2 now equals 'two'\n * callback(null, 'three');\n * },\n * function(arg1, callback) {\n * // arg1 now equals 'three'\n * callback(null, 'done');\n * }\n * ], function (err, result) {\n * // result now equals 'done'\n * });\n *\n * // Or, with named functions:\n * async.waterfall([\n * myFirstFunction,\n * mySecondFunction,\n * myLastFunction,\n * ], function (err, result) {\n * // result now equals 'done'\n * });\n * function myFirstFunction(callback) {\n * callback(null, 'one', 'two');\n * }\n * function mySecondFunction(arg1, arg2, callback) {\n * // arg1 now equals 'one' and arg2 now equals 'two'\n * callback(null, 'three');\n * }\n * function myLastFunction(arg1, callback) {\n * // arg1 now equals 'three'\n * callback(null, 'done');\n * }\n */\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = once;\nfunction once(fn) {\n return function () {\n if (fn === null) return;\n var callFn = fn;\n fn = null;\n callFn.apply(this, arguments);\n };\n}\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = onlyOnce;\nfunction onlyOnce(fn) {\n return function () {\n if (fn === null) throw new Error(\"Callback was already called.\");\n var callFn = fn;\n fn = null;\n callFn.apply(this, arguments);\n };\n}\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Emitter = __webpack_require__(7);\n\n/**\n * @class Event\n * Represents an {@link Chat} event.\n * @fires $\".\"emitted\n * @extends Emitter\n * @extends RootEmitter\n */\n\nvar Event = function (_Emitter) {\n _inherits(Event, _Emitter);\n\n function Event(chatEngine, chat, event) {\n var _ret;\n\n _classCallCheck(this, Event);\n\n /**\n * @private\n */\n var _this = _possibleConstructorReturn(this, (Event.__proto__ || Object.getPrototypeOf(Event)).call(this));\n\n _this.chatEngine = chatEngine;\n\n /**\n * The {@link Chat#channel} that this event is registered to.\n * @type String\n * @see [PubNub Channels](https://support.pubnub.com/support/solutions/articles/14000045182-what-is-a-channel-)\n * @readonly\n */\n _this.channel = chat.channel;\n\n /**\n * Events are always a property of a {@link Chat}. Responsible for\n * listening to specific events and firing events when they occur.\n * @readonly\n * @type {Chat}\n */\n _this.chat = chat;\n\n /**\n * The string representation of the event. This is supplied as the first parameter to {@link Chat#on}\n * @type {String}\n */\n _this.event = event;\n\n /**\n * A name that identifies this class\n * @type {String}\n */\n _this.name = 'Event';\n\n return _ret = _this, _possibleConstructorReturn(_this, _ret);\n }\n\n /**\n Publishes the event over the PubNub network to the {@link Event} channel\n @private\n @param {Object} data The event payload object\n */\n\n\n _createClass(Event, [{\n key: 'publish',\n value: function publish(m) {\n var _this2 = this;\n\n m.event = this.event;\n\n this.chatEngine.pubnub.publish({\n message: m,\n channel: this.channel\n }, function (status, response) {\n\n if (status.statusCode === 200) {\n\n if (response) {\n m.timetoken = response.timetoken;\n }\n\n /**\n * Message successfully published\n * @event Event#$\".\"emitted\"\n * @param {Object} data The message payload\n */\n _this2._emit('$.emitted', m);\n } else {\n\n /**\n * There was a problem publishing over the PubNub network.\n * @event Chat#$\".\"error\".\"publish\n */\n _this2.chatEngine.throwError(_this2, '_emit', 'emitter', new Error('There was a problem publishing over the PubNub network.'), status);\n }\n });\n }\n }]);\n\n return Event;\n}(Emitter);\n\nmodule.exports = Event;\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _eachOfLimit;\n\nvar _noop = __webpack_require__(8);\n\nvar _noop2 = _interopRequireDefault(_noop);\n\nvar _once = __webpack_require__(20);\n\nvar _once2 = _interopRequireDefault(_once);\n\nvar _iterator = __webpack_require__(65);\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _onlyOnce = __webpack_require__(21);\n\nvar _onlyOnce2 = _interopRequireDefault(_onlyOnce);\n\nvar _breakLoop = __webpack_require__(86);\n\nvar _breakLoop2 = _interopRequireDefault(_breakLoop);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\nfunction _eachOfLimit(limit) {\n return function (obj, iteratee, callback) {\n callback = (0, _once2.default)(callback || _noop2.default);\n if (limit <= 0 || !obj) {\n return callback(null);\n }\n var nextElem = (0, _iterator2.default)(obj);\n var done = false;\n var running = 0;\n\n function iterateeCallback(err, value) {\n running -= 1;\n if (err) {\n done = true;\n callback(err);\n } else if (value === _breakLoop2.default || done && running <= 0) {\n done = true;\n return callback(null);\n } else {\n replenish();\n }\n }\n\n function replenish() {\n while (running < limit && !done) {\n var elem = nextElem();\n if (elem === null) {\n done = true;\n if (running <= 0) {\n callback(null);\n }\n return;\n }\n running += 1;\n iteratee(elem.value, elem.key, (0, _onlyOnce2.default)(iterateeCallback));\n }\n }\n\n replenish();\n };\n}\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar root = __webpack_require__(26);\n\n/** Built-in value references. */\nvar _Symbol = root.Symbol;\n\nmodule.exports = _Symbol;\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar freeGlobal = __webpack_require__(27);\n\n/** Detect free variable `self`. */\nvar freeSelf = (typeof self === 'undefined' ? 'undefined' : _typeof(self)) == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = (typeof global === 'undefined' ? 'undefined' : _typeof(global)) == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9)))\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = doLimit;\nfunction doLimit(fn, limit) {\n return function (iterable, iteratee, callback) {\n return fn(iterable, limit, iteratee, callback);\n };\n}\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Emitter = __webpack_require__(4);\n\n/**\nThis is our User class which represents a connected client. User's are automatically created and managed by {@link Chat}s, but you can also instantiate them yourself.\nIf a User has been created but has never been authenticated, you will recieve 403s when connecting to their feed or direct Chats.\n@class User\n@extends Emitter\n@extends RootEmitter\n@param {User#uuid} uuid A unique identifier for this user.\n@param {User#state} state The {@link User}'s state object synchronized between all clients of the chat.\n */\n\nvar User = function (_Emitter) {\n _inherits(User, _Emitter);\n\n function User(chatEngine, uuid) {\n var _ret;\n\n var state = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n _classCallCheck(this, User);\n\n var _this = _possibleConstructorReturn(this, (User.__proto__ || Object.getPrototypeOf(User)).call(this));\n\n _this.chatEngine = chatEngine;\n\n _this.name = 'User';\n\n /**\n The User's unique identifier, usually a device uuid. This helps ChatEngine identify the user between events. This is public id exposed to the network.\n Check out [the wikipedia page on UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier).\n @readonly\n @type String\n */\n\n if (typeof uuid !== 'string') {\n _this.chatEngine.throwError(_this, 'trigger', 'construct', new Error('UUID must be of type string'));\n }\n\n _this.uuid = uuid;\n\n /**\n * Gets the user state. See {@link Me#update} for how to assign state values.\n * @return {Object} Returns a generic JSON object containing state information.\n * @example\n *\n * // State\n * let state = user.state;\n */\n _this.state = {};\n\n _this._stateFetched = false;\n\n _this._stateInProgress = false;\n\n /**\n * Feed is a Chat that only streams things a User does, like\n * 'startTyping' or 'idle' events for example. Anybody can subscribe\n * to a User's feed, but only the User can publish to it. Users will\n * not be able to converse in this channel.\n *\n * @type Chat\n * @example\n * // me\n * me.feed.emit('update', 'I may be away from my computer right now');\n *\n * // another instance\n * them.feed.connect();\n * them.feed.on('update', (payload) => {})\n */\n\n // grants for these chats are done on auth. Even though they're marked private, they are locked down via the server\n _this.feed = new _this.chatEngine.Chat([chatEngine.global.channel, 'user', uuid, 'read.', 'feed'].join('#'), false, _this.constructor.name === 'Me', {}, 'system');\n\n /**\n * Direct is a private channel that anybody can publish to but only\n * the user can subscribe to. Great for pushing notifications or\n * inviting to other chats. Users will not be able to communicate\n * with one another inside of this chat. Check out the\n * {@link Chat#invite} method for private chats utilizing\n * {@link User#direct}.\n *\n * @type Chat\n * @example\n * // me\n * me.direct.on('private-message', (payload) -> {\n * console.log(payload.sender.uuid, 'sent your a direct message');\n * });\n *\n * // another instance\n * them.direct.connect();\n * them.direct.emit('private-message', {secret: 42});\n */\n _this.direct = new _this.chatEngine.Chat([chatEngine.global.channel, 'user', uuid, 'write.', 'direct'].join('#'), false, _this.constructor.name === 'Me', {}, 'system');\n\n // if the user does not exist at all and we get enough\n // information to build the user\n if (!chatEngine.users[uuid]) {\n chatEngine.users[uuid] = _this;\n }\n\n // update this user's state in it's created context\n _this.assign(state);\n\n return _ret = _this, _possibleConstructorReturn(_this, _ret);\n }\n\n /**\n * @private\n * @param {Object} state The new state for the user\n * @param {Chat} chat Chatroom to retrieve state from\n */\n\n\n _createClass(User, [{\n key: 'update',\n value: function update(state) {\n var oldState = this.state || {};\n this.state = Object.assign(oldState, state);\n }\n\n /**\n this is only called from network updates\n @private\n */\n\n }, {\n key: 'assign',\n value: function assign(state) {\n this.update(state);\n }\n\n /**\n Get stored user state from remote server.\n @private\n */\n\n }, {\n key: '_getState',\n value: function _getState(callback) {\n var _this2 = this;\n\n if (!this._stateFetched && !this._stateInProgress) {\n\n this._stateInProgress = true;\n\n this.chatEngine.pubnub.getState({\n uuid: this.uuid,\n channels: [this.chatEngine.global.channel]\n }, function (status, response) {\n\n if (status.statusCode === 200) {\n\n var pnState = response.channels[_this2.chatEngine.global.channel];\n if (Object.keys(pnState).length) {\n\n _this2.assign(response.data);\n _this2._stateFetched = true;\n callback(_this2.state);\n } else {\n\n _this2.chatEngine.request('get', 'user_state', {\n user: _this2.uuid\n }).then(function (res) {\n\n _this2.assign(res.data);\n _this2._stateFetched = true;\n callback(_this2.state);\n }).catch(function (err) {\n _this2.chatEngine.throwError(_this2, 'trigger', 'getState', err);\n });\n }\n } else {\n _this2.chatEngine.throwError(_this2, 'trigger', 'getState', new Error('There was a problem getting user state from the PubNub network.'));\n }\n });\n } else {\n callback(this.state);\n }\n }\n }]);\n\n return User;\n}(Emitter);\n\nmodule.exports = User;\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(32);\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar init = __webpack_require__(33);\n\n/**\nGlobal object used to create an instance of {@link ChatEngine}.\n\n@alias ChatEngineCore\n@param pnConfig {Object} ChatEngine is based off PubNub. Supply your PubNub configuration parameters here. See the getting started tutorial and [the PubNub docs](https://www.pubnub.com/docs/java-se-java/api-reference-configuration).\n@param ceConfig {Object} A list of ChatEngine specific configuration options.\n@param [ceConfig.globalChannel=chat-engine] {String} The root channel. See {@link ChatEngine.global}\n@param [ceConfig.enableSync] {Boolean} Synchronizes chats between instances with the same {@link Me#uuid}. See {@link Me#sync}.\n@param [ceConfig.throwErrors=true] {Boolean} Throws errors in JS console.\n@param [ceConfig.endpoint='https://pubsub.pubnub.com/v1/blocks/sub-key/YOUR_SUB_KEY/chat-engine-server'] {String} The root URL of the server used to manage permissions for private channels. Set by default to match the PubNub functions deployed to your account. See {@tutorial privacy} for more.\n@param [ceConfig.debug] {Boolean} Logs all ChatEngine events to the console This should not be enabled in production.\n@param [ceConfig.profile] {Boolean} Sums event counts and outputs a table to the console every few seconds.\n@return {ChatEngine} Returns an instance of {@link ChatEngine}\n@example\nChatEngine = ChatEngineCore.create({\n publishKey: 'YOUR_PUB_KEY',\n subscribeKey: 'YOUR_SUB_KEY'\n});\n*/\n\nvar create = function create(pnConfig) {\n var ceConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\n if (ceConfig.globalChannel) {\n ceConfig.globalChannel = ceConfig.globalChannel.toString();\n } else {\n ceConfig.globalChannel = 'chat-engine';\n }\n\n if (typeof ceConfig.throwErrors === 'undefined') {\n ceConfig.throwErrors = true;\n }\n\n if (typeof ceConfig.enableSync === 'undefined') {\n ceConfig.enableSync = false;\n }\n\n ceConfig.endpoint = ceConfig.endpoint || 'https://pubsub.pubnub.com/v1/blocks/sub-key/' + pnConfig.subscribeKey + '/chat-engine-server';\n\n pnConfig.heartbeatInterval = pnConfig.heartbeatInterval || 30;\n pnConfig.presenceTimeout = pnConfig.presenceTimeout || 60;\n\n // return an instance of ChatEngine\n return init(ceConfig, pnConfig);\n};\n\n// export the ChatEngine api\nvar ChatEngineCore = {\n plugin: {},\n create: create\n};\n\nmodule.exports = ChatEngineCore;\n\nmodule.exports.ChatEngineCore = ChatEngineCore;\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar axios = __webpack_require__(34);\nvar PubNub = __webpack_require__(53);\nvar pack = __webpack_require__(54);\n\nvar RootEmitter = __webpack_require__(7);\nvar Chat = __webpack_require__(56);\nvar Me = __webpack_require__(88);\nvar User = __webpack_require__(30);\nvar series = __webpack_require__(90);\n\n/**\n@class ChatEngine\n@extends RootEmitter\n@return {ChatEngine} Returns an instance of {@link ChatEngine}\n*/\nmodule.exports = function () {\n var ceConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var pnConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\n // Create the root ChatEngine object\n var ChatEngine = new RootEmitter();\n\n ChatEngine.ceConfig = ceConfig;\n ChatEngine.pnConfig = pnConfig;\n\n /**\n * A map of all known {@link User}s in this instance of ChatEngine.\n * @type {Object}\n * @memberof ChatEngine\n */\n ChatEngine.users = {};\n\n /**\n * A map of all known {@link Chat}s in this instance of ChatEngine.\n * @memberof ChatEngine\n * @type {Object}\n */\n ChatEngine.chats = {};\n\n /**\n * A global {@link Chat} that all {@link User}s join when they connect to ChatEngine. Useful for announcements, alerts, and global events.\n * @member {Chat} global\n * @memberof ChatEngine\n */\n ChatEngine.global = false;\n\n /**\n * This instance of ChatEngine represented as a special {@link User} know as {@link Me}.\n * @member {Me} me\n * @memberof ChatEngine\n */\n ChatEngine.me = false;\n\n /**\n * An instance of PubNub, the networking infrastructure that powers the realtime communication between {@link User}s in {@link Chats}.\n * @member {Object} pubnub\n * @memberof ChatEngine\n */\n ChatEngine.pubnub = false;\n\n /**\n * Indicates if ChatEngine has fired the {@link ChatEngine#$\".\"ready} event.\n * @member {Object} ready\n * @memberof ChatEngine\n */\n ChatEngine.ready = false;\n\n /**\n * The package.json for ChatEngine. Used mainly for detecting package version.\n * @type {Object}\n */\n ChatEngine.package = pack;\n\n ChatEngine.throwError = function (self, cb, key, ceError) {\n var payload = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n\n\n if (ceConfig.throwErrors) {\n // throw ceError;\n console.error(payload);\n throw ceError;\n }\n\n payload.ceError = ceError.toString();\n\n self[cb](['$', 'error', key].join('.'), payload);\n };\n\n if (ceConfig.debug) {\n\n ChatEngine.onAny(function (event, payload) {\n console.info('debug:', event, payload);\n });\n }\n\n if (ceConfig.profile) {\n\n var countObject = {};\n\n ChatEngine.onAny(function (event, payload) {\n countObject['event: ' + event] = countObject[event] || 0;\n countObject['event: ' + event] += 1;\n });\n\n setInterval(function () {\n\n countObject.chats = Object.keys(ChatEngine.chats).length;\n countObject.users = Object.keys(ChatEngine.users).length;\n\n console.table(countObject);\n }, 3000);\n }\n\n ChatEngine.protoPlugins = {};\n\n /**\n * Bind a plugin to all future instances of a Class.\n * @method ChatEngine#proto\n * @param {String} className The string representation of a class to bind to\n * @param {Class} plugin The plugin function.\n */\n ChatEngine.proto = function (className, plugin) {\n ChatEngine.protoPlugins[className] = ChatEngine.protoPlugins[className] || [];\n ChatEngine.protoPlugins[className].push(plugin);\n };\n\n /**\n * @private\n */\n ChatEngine.request = function (method, route) {\n var inputBody = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var inputParams = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n\n var body = {\n uuid: ChatEngine.pnConfig.uuid,\n global: ceConfig.globalChannel,\n authKey: ChatEngine.pnConfig.authKey\n };\n\n var params = {\n route: route\n };\n\n body = Object.assign(body, inputBody);\n params = Object.assign(params, inputParams);\n\n if (method === 'get' || method === 'delete') {\n params = Object.assign(params, body);\n return axios[method](ceConfig.endpoint, { params: params });\n } else {\n return axios[method](ceConfig.endpoint, body, { params: params });\n }\n };\n\n /**\n * Parse a channel name into chat object parts\n * @private\n */\n ChatEngine.parseChannel = function (channel) {\n\n var info = channel.split('#');\n\n return {\n global: info[0],\n type: info[1],\n private: info[2] === 'private.'\n };\n };\n\n /**\n * Get the internal channel name of supplied string\n * @private\n */\n ChatEngine.augmentChannel = function () {\n var original = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date().getTime();\n var isPrivate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\n var channel = original.toString();\n\n // public.* has PubNub permissions for everyone to read and write\n // private.* is totally locked down and users must be granted access one by one\n var chanPrivString = 'public.';\n\n if (isPrivate) {\n chanPrivString = 'private.';\n }\n\n if (channel.indexOf(ChatEngine.ceConfig.globalChannel) === -1) {\n channel = [ChatEngine.ceConfig.globalChannel, 'chat', chanPrivString, channel].join('#');\n }\n\n return channel;\n };\n\n /**\n * Initial communication with the server. Server grants permissions to\n * talk in chats, etc.\n * @private\n */\n ChatEngine.handshake = function (complete) {\n\n series([function (next) {\n ChatEngine.request('post', 'bootstrap').then(function () {\n next(null);\n }).catch(next);\n }, function (next) {\n ChatEngine.request('post', 'user_read').then(function () {\n next(null);\n }).catch(next);\n }, function (next) {\n ChatEngine.request('post', 'user_write').then(function () {\n next(null);\n }).catch(next);\n }, function (next) {\n ChatEngine.request('post', 'group').then(complete).catch(next);\n }], function (error) {\n if (error) {\n ChatEngine.throwError(ChatEngine, '_emit', 'auth', new Error('There was a problem logging into the auth server (' + ceConfig.endpoint + ').' + error && error.response && error.response.data), { error: error });\n }\n });\n };\n\n /**\n * Listen to PubNub events and forward them into ChatEngine system.\n * @private\n */\n ChatEngine.listenToPubNub = function () {\n\n ChatEngine.pubnub.addListener({\n message: function message(m) {\n\n // assign the message timetoken as a property of the payload\n m.message.timetoken = m.timetoken;\n\n if (ChatEngine.chats[m.channel]) {\n ChatEngine.chats[m.channel].trigger(m.message.event, m.message);\n }\n },\n presence: function presence(payload) {\n\n if (ChatEngine.chats[payload.channel]) {\n ChatEngine.chats[payload.channel].onPresence(payload);\n }\n },\n status: function status(statusEvent) {\n\n /**\n * SDK detected that network is online.\n * @event ChatEngine#$\".\"network\".\"up\".\"online\n */\n\n /**\n * SDK detected that network is down.\n * @event ChatEngine#$\".\"network\".\"down\".\"offline\n */\n\n /**\n * A subscribe event experienced an exception when running.\n * @event ChatEngine#$\".\"network\".\"down\".\"issue\n */\n\n /**\n * SDK was able to reconnect to pubnub.\n * @event ChatEngine#$\".\"network\".\"up\".\"reconnected\n */\n\n /**\n * SDK subscribed with a new mix of channels.\n * @event ChatEngine#$\".\"network\".\"up\".\"connected\n */\n\n /**\n * JSON parsing crashed.\n * @event ChatEngine#$\".\"network\".\"down\".\"malformed\n */\n\n /**\n * Server rejected the request.\n * @event ChatEngine#$\".\"network\".\"down\".\"badrequest\n */\n\n /**\n * If using decryption strategies and the decryption fails.\n * @event ChatEngine#$\".\"network\".\"down\".\"decryption\n */\n\n /**\n * Request timed out.\n * @event ChatEngine#$\".\"network\".\"down\".\"timeout\n */\n\n /**\n * PAM permission failure.\n * @event ChatEngine#$\".\"network\".\"down\".\"denied\n */\n\n // map the pubnub events into ChatEngine events\n var categories = {\n PNNetworkUpCategory: 'up.online',\n PNNetworkDownCategory: 'down.offline',\n PNNetworkIssuesCategory: 'down.issue',\n PNReconnectedCategory: 'up.reconnected',\n PNConnectedCategory: 'up.connected',\n PNAccessDeniedCategory: 'down.denied',\n PNMalformedResponseCategory: 'down.malformed',\n PNBadRequestCategory: 'down.badrequest',\n PNDecryptionErrorCategory: 'down.decryption',\n PNTimeoutCategory: 'down.timeout'\n };\n\n var eventName = ['$', 'network', categories[statusEvent.category] || 'other'].join('.');\n\n ChatEngine._emit(eventName, statusEvent);\n }\n });\n };\n\n /**\n * Subscribe to PubNub and begin receiving events.\n * @private\n */\n ChatEngine.subscribeToPubNub = function () {\n\n var chanGroups = [ceConfig.globalChannel + '#' + ChatEngine.me.uuid + '#rooms', ceConfig.globalChannel + '#' + ChatEngine.me.uuid + '#system', ceConfig.globalChannel + '#' + ChatEngine.me.uuid + '#custom'];\n\n ChatEngine.pubnub.subscribe({\n channelGroups: chanGroups,\n withPresence: true\n });\n };\n\n /**\n * Initialize ChatEngine modules on first time boot.\n * @private\n */\n ChatEngine.firstConnect = function (state) {\n\n ChatEngine.pubnub = new PubNub(ChatEngine.pnConfig);\n\n // create a new chat to use as global chat\n // we don't do auth on this one because it's assumed to be done with the /auth request below\n ChatEngine.global = new ChatEngine.Chat(ceConfig.globalChannel, false, true, {}, 'system');\n\n ChatEngine.global.once('$.connected', function () {\n\n // build the current user\n ChatEngine.me = new Me(ChatEngine, ChatEngine.pnConfig.uuid);\n\n /**\n * Fired when a {@link Me} has been created within ChatEngine.\n * @event ChatEngine#$\".\"created\".\"me\n * @example\n * ChatEngine.on('$.created.me', (data, me) => {\n * console.log('Me was created', me);\n * });\n */\n ChatEngine.me.onConstructed();\n\n if (ChatEngine.ceConfig.enableSync) {\n ChatEngine.me.session.subscribe();\n ChatEngine.me.session.restore();\n }\n\n ChatEngine.me.update(state);\n\n /**\n * Fired when ChatEngine is connected to the internet and ready to go!\n * @event ChatEngine#$\".\"ready\n * @example\n * ChatEngine.on('$.ready', (data) => {\n * let me = data.me;\n * })\n */\n\n ChatEngine._emit('$.ready', {\n me: ChatEngine.me\n });\n\n ChatEngine.ready = true;\n\n ChatEngine.listenToPubNub();\n ChatEngine.subscribeToPubNub();\n\n ChatEngine.global.getUserUpdates();\n });\n };\n\n /**\n * Disconnect from all {@link Chat}s and mark them as asleep.\n * @example\n *\n * // create a new chat\n * let chat = new ChatEngine.Chat(new Date().getTime());\n *\n * // disconnect from ChatEngine\n * ChatEngine.disconnect();\n *\n * // every individual chat will be disconnected\n * chat.on('$.disconnected', () => {\n * done();\n * });\n *\n * // Changing User:\n * ChatEngine.disconnect()\n * ChatEngine = new ChatEngine({}, {});\n * ChatEngine.connect()\n */\n ChatEngine.disconnect = function () {\n\n // Unsubscribe from all PubNub chats\n ChatEngine.pubnub.unsubscribeAll();\n\n // for every chat in ChatEngine.chats, signal disconnected\n Object.keys(ChatEngine.chats).forEach(function (key) {\n ChatEngine.chats[key].sleep();\n });\n };\n\n /**\n * Performs authentication with server and restores connection\n * to all sleeping chats.\n * @example\n *\n * // create a new chat\n * let chat = new ChatEngine.Chat(new Date().getTime());\n *\n * // disconnect from ChatEngine\n * ChatEngine.disconnect();\n *\n * // reconnect sometime later\n * ChatEngine.reconnect();\n *\n */\n ChatEngine.reconnect = function () {\n\n // do the whole auth flow with the new authKey\n ChatEngine.handshake(function () {\n\n // for every chat in ChatEngine.chats, call .connect()\n Object.keys(ChatEngine.chats).forEach(function (key) {\n ChatEngine.chats[key].wake();\n });\n\n ChatEngine.subscribeToPubNub();\n });\n };\n\n /**\n @private\n */\n ChatEngine.setAuth = function () {\n var authKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : PubNub.generateUUID();\n\n\n ChatEngine.pnConfig.authKey = authKey;\n ChatEngine.pubnub.setAuthKey(authKey);\n };\n\n /**\n * Disconnects, changes authentication token, performs handshake with server\n * and reconnects with new auth key. Used for extending logged in sessions\n * for active users.\n * @example\n * // early\n * ChatEngine.connect(...);\n *\n * ChatEngine.once('$.connected', () => {\n * // first connection established\n * });\n *\n * // some time passes, session token expires\n * ChatEngine.reauthorize(authKey);\n *\n * // we are connected again\n * ChatEngine.once('$.connected', () => {\n * // we are connected again\n * });\n */\n ChatEngine.reauthorize = function () {\n var authKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : PubNub.generateUUID();\n\n\n ChatEngine.global.once('$.disconnected', function () {\n\n ChatEngine.setAuth(authKey);\n ChatEngine.reconnect();\n });\n\n ChatEngine.disconnect();\n };\n\n /**\n * Connect to realtime service and create instance of {@link Me}\n * @method ChatEngine#connect\n * @param {String} uuid A unique string for {@link Me}. It can be a device id, username, user id, email, etc. Must be alphanumeric.\n * @param {Object} state An object containing information about this client ({@link Me}). This JSON object is sent to all other clients on the network, so no passwords!\n * @param {String} [authKey] A authentication secret. Will be sent to authentication backend for validation. This is usually an access token. See {@tutorial auth} for more.\n * @fires $\".\"connected\n */\n ChatEngine.connect = function (uuid) {\n var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var authKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : PubNub.generateUUID();\n\n\n // this creates a user known as Me and\n // connects to the global chatroom\n ChatEngine.pnConfig.uuid = uuid;\n ChatEngine.pnConfig.authKey = authKey;\n\n ChatEngine.handshake(function () {\n ChatEngine.firstConnect(state);\n });\n };\n\n ChatEngine.destroy = function () {\n\n Object.keys(ChatEngine.chats).forEach(function (chat) {\n ChatEngine.chats[chat].emitter.removeAllListeners();\n });\n\n Object.keys(ChatEngine.users).forEach(function (user) {\n ChatEngine.users[user].emitter.removeAllListeners();\n });\n\n ChatEngine.emitter.removeAllListeners();\n };\n\n /**\n * The {@link Chat} class. Creates a new Chat when initialized, or returns an existing instance if chat has already been created.\n * @member {Chat} Chat\n * @memberof ChatEngine\n * @see {@link Chat}\n */\n ChatEngine.Chat = function createChat() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var internalChannel = ChatEngine.augmentChannel(args[0], args[1]);\n\n if (ChatEngine.chats[internalChannel]) {\n return ChatEngine.chats[internalChannel];\n } else {\n\n var newChat = new (Function.prototype.bind.apply(Chat, [null].concat([ChatEngine], args)))();\n\n /**\n * Fired when a {@link Chat} has been created within ChatEngine.\n * @event ChatEngine#$\".\"created\".\"chat\n * @example\n * ChatEngine.on('$.created.chat', (data, chat) => {\n * console.log('Chat was created', chat);\n * });\n */\n newChat.onConstructed();\n\n return newChat;\n }\n };\n\n /**\n * The {@link User} class. Creates a new User when initialized, or returns an existing instance if chat has already been created.\n * @member {User} User\n * @memberof ChatEngine\n * @see {@link User}\n */\n ChatEngine.User = function createUser() {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n if (ChatEngine.me.uuid === args[0]) {\n return ChatEngine.me;\n } else if (ChatEngine.users[args[0]]) {\n return ChatEngine.users[args[0]];\n } else {\n\n var newUser = new (Function.prototype.bind.apply(User, [null].concat([ChatEngine], args)))();\n\n /**\n * Fired when a {@link User} has been created within ChatEngine.\n * @event ChatEngine#$\".\"created\".\"user\n * @example\n * ChatEngine.on('$.created.user', (data, user) => {\n * console.log('Chat was created', user);\n * });\n */\n newUser.onConstructed();\n\n return newUser;\n }\n };\n\n return ChatEngine;\n};\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = __webpack_require__(35);\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\nvar bind = __webpack_require__(13);\nvar Axios = __webpack_require__(37);\nvar defaults = __webpack_require__(5);\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = __webpack_require__(17);\naxios.CancelToken = __webpack_require__(51);\naxios.isCancel = __webpack_require__(16);\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = __webpack_require__(52);\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer);\n};\n\nfunction isBuffer(obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj);\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer(obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0));\n}\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar defaults = __webpack_require__(5);\nvar utils = __webpack_require__(0);\nvar InterceptorManager = __webpack_require__(46);\nvar dispatchRequest = __webpack_require__(47);\nvar isAbsoluteURL = __webpack_require__(49);\nvar combineURLs = __webpack_require__(50);\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, this.defaults, { method: 'get' }, config);\n config.method = config.method.toLowerCase();\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function (url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function (url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar createError = __webpack_require__(15);\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError('Request failed with status code ' + response.status, response.config, null, response.request, response));\n }\n};\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\n\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\n\nfunction encode(val) {\n return encodeURIComponent(val).replace(/%40/gi, '@').replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n }\n\n if (!utils.isArray(val)) {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) {\n return parsed;\n }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\n\nmodule.exports = utils.isStandardBrowserEnv() ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\nfunction standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;\n return parsed.protocol === originURL.protocol && parsed.host === originURL.host;\n };\n}() :\n\n// Non standard browser envs (web workers, react-native) lack needed support.\nfunction nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n}();\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction E() {\n this.message = 'String contains an invalid character';\n}\nE.prototype = new Error();\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\n\nfunction btoa(input) {\n var str = String(input);\n var output = '';\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars;\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new E();\n }\n block = block << 8 | charCode;\n }\n return output;\n}\n\nmodule.exports = btoa;\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\n\nmodule.exports = utils.isStandardBrowserEnv() ?\n\n// Standard browser envs support document.cookie\nfunction standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return match ? decodeURIComponent(match[3]) : null;\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n}() :\n\n// Non standard browser env (web workers, react-native) lack needed support.\nfunction nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() {\n return null;\n },\n remove: function remove() {}\n };\n}();\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\nvar transformData = __webpack_require__(48);\nvar isCancel = __webpack_require__(16);\nvar defaults = __webpack_require__(5);\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(config.data, config.headers, config.transformRequest);\n\n // Flatten headers\n config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers || {});\n\n utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function cleanHeaderConfig(method) {\n delete config.headers[method];\n });\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(response.data, response.headers, config.transformResponse);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(reason.response.data, reason.response.headers, config.transformResponse);\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\n\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return (/^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url)\n );\n};\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\n\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '') : baseURL;\n};\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar Cancel = __webpack_require__(17);\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\n\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n!function (e, t) {\n \"object\" == ( false ? \"undefined\" : _typeof(exports)) && \"object\" == ( false ? \"undefined\" : _typeof(module)) ? module.exports = t() : true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (t),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : \"object\" == (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) ? exports.PubNub = t() : e.PubNub = t();\n}(undefined, function () {\n return function (e) {\n function t(r) {\n if (n[r]) return n[r].exports;var i = n[r] = { exports: {}, id: r, loaded: !1 };return e[r].call(i.exports, i, i.exports, t), i.loaded = !0, i.exports;\n }var n = {};return t.m = e, t.c = n, t.p = \"\", t(0);\n }([function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }function s(e, t) {\n if (!e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return !t || \"object\" != (typeof t === \"undefined\" ? \"undefined\" : _typeof(t)) && \"function\" != typeof t ? e : t;\n }function o(e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof t === \"undefined\" ? \"undefined\" : _typeof(t)));e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);\n }function a(e) {\n if (!navigator || !navigator.sendBeacon) return !1;navigator.sendBeacon(e);\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var u = n(1),\n c = r(u),\n l = n(39),\n h = r(l),\n f = n(40),\n p = r(f),\n d = n(41),\n y = (n(5), function (e) {\n function t(e) {\n i(this, t);var n = e.listenToBrowserNetworkEvents,\n r = void 0 === n || n;e.db = p.default, e.sdkFamily = \"Web\", e.networking = new h.default({ del: d.del, get: d.get, post: d.post, sendBeacon: a });var o = s(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));return r && (window.addEventListener(\"offline\", function () {\n o.networkDownDetected();\n }), window.addEventListener(\"online\", function () {\n o.networkUpDetected();\n })), o;\n }return o(t, e), t;\n }(c.default));t.default = y, e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n if (e && e.__esModule) return e;var t = {};if (null != e) for (var n in e) {\n Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);\n }return t.default = e, t;\n }function i(e) {\n return e && e.__esModule ? e : { default: e };\n }function s(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var o = function () {\n function e(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }return function (t, n, r) {\n return n && e(t.prototype, n), r && e(t, r), t;\n };\n }(),\n a = n(2),\n u = i(a),\n c = n(6),\n l = i(c),\n h = n(8),\n f = i(h),\n p = n(9),\n d = i(p),\n y = n(16),\n g = i(y),\n b = n(17),\n v = r(b),\n _ = n(18),\n m = r(_),\n k = n(19),\n P = r(k),\n O = n(20),\n S = r(O),\n w = n(21),\n T = r(w),\n C = n(22),\n M = r(C),\n E = n(23),\n x = r(E),\n N = n(24),\n R = r(N),\n A = n(25),\n D = r(A),\n K = n(26),\n j = r(K),\n U = n(27),\n G = r(U),\n I = n(28),\n H = r(I),\n B = n(29),\n L = r(B),\n q = n(30),\n F = r(q),\n z = n(31),\n X = r(z),\n W = n(32),\n $ = r(W),\n J = n(33),\n V = r(J),\n Q = n(34),\n Y = r(Q),\n Z = n(35),\n ee = r(Z),\n te = n(36),\n ne = r(te),\n re = n(37),\n ie = r(re),\n se = n(12),\n oe = r(se),\n ae = n(38),\n ue = r(ae),\n ce = n(13),\n le = i(ce),\n he = n(10),\n fe = i(he),\n pe = (n(5), n(3)),\n de = i(pe),\n ye = function () {\n function e(t) {\n var n = this;s(this, e);var r = t.db,\n i = t.networking,\n o = this._config = new u.default({ setup: t, db: r }),\n a = new l.default({ config: o });i.init(o);var c = { config: o, networking: i, crypto: a },\n h = g.default.bind(this, c, oe),\n p = g.default.bind(this, c, j),\n y = g.default.bind(this, c, H),\n b = g.default.bind(this, c, F),\n _ = g.default.bind(this, c, ue),\n k = this._listenerManager = new d.default(),\n O = new f.default({ timeEndpoint: h, leaveEndpoint: p, heartbeatEndpoint: y, setStateEndpoint: b, subscribeEndpoint: _, crypto: c.crypto, config: c.config, listenerManager: k });this.addListener = k.addListener.bind(k), this.removeListener = k.removeListener.bind(k), this.removeAllListeners = k.removeAllListeners.bind(k), this.channelGroups = { listGroups: g.default.bind(this, c, S), listChannels: g.default.bind(this, c, T), addChannels: g.default.bind(this, c, v), removeChannels: g.default.bind(this, c, m), deleteGroup: g.default.bind(this, c, P) }, this.push = { addChannels: g.default.bind(this, c, M), removeChannels: g.default.bind(this, c, x), deleteDevice: g.default.bind(this, c, D), listChannels: g.default.bind(this, c, R) }, this.hereNow = g.default.bind(this, c, X), this.whereNow = g.default.bind(this, c, G), this.getState = g.default.bind(this, c, L), this.setState = O.adaptStateChange.bind(O), this.grant = g.default.bind(this, c, V), this.audit = g.default.bind(this, c, $), this.publish = g.default.bind(this, c, Y), this.fire = function (e, t) {\n return e.replicate = !1, e.storeInHistory = !1, n.publish(e, t);\n }, this.history = g.default.bind(this, c, ee), this.deleteMessages = g.default.bind(this, c, ne), this.fetchMessages = g.default.bind(this, c, ie), this.time = h, this.subscribe = O.adaptSubscribeChange.bind(O), this.presence = O.adaptPresenceChange.bind(O), this.unsubscribe = O.adaptUnsubscribeChange.bind(O), this.disconnect = O.disconnect.bind(O), this.reconnect = O.reconnect.bind(O), this.destroy = function (e) {\n O.unsubscribeAll(e), O.disconnect();\n }, this.stop = this.destroy, this.unsubscribeAll = O.unsubscribeAll.bind(O), this.getSubscribedChannels = O.getSubscribedChannels.bind(O), this.getSubscribedChannelGroups = O.getSubscribedChannelGroups.bind(O), this.encrypt = a.encrypt.bind(a), this.decrypt = a.decrypt.bind(a), this.getAuthKey = c.config.getAuthKey.bind(c.config), this.setAuthKey = c.config.setAuthKey.bind(c.config), this.setCipherKey = c.config.setCipherKey.bind(c.config), this.getUUID = c.config.getUUID.bind(c.config), this.setUUID = c.config.setUUID.bind(c.config), this.getFilterExpression = c.config.getFilterExpression.bind(c.config), this.setFilterExpression = c.config.setFilterExpression.bind(c.config), this.setHeartbeatInterval = c.config.setHeartbeatInterval.bind(c.config), i.hasModule(\"proxy\") && (this.setProxy = function (e) {\n c.config.setProxy(e), n.reconnect();\n });\n }return o(e, [{ key: \"getVersion\", value: function value() {\n return this._config.getVersion();\n } }, { key: \"networkDownDetected\", value: function value() {\n this._listenerManager.announceNetworkDown(), this._config.restore ? this.disconnect() : this.destroy(!0);\n } }, { key: \"networkUpDetected\", value: function value() {\n this._listenerManager.announceNetworkUp(), this.reconnect();\n } }], [{ key: \"generateUUID\", value: function value() {\n return de.default.createUUID();\n } }]), e;\n }();ye.OPERATIONS = le.default, ye.CATEGORIES = fe.default, t.default = ye, e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n function r(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var i = function () {\n function e(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }return function (t, n, r) {\n return n && e(t.prototype, n), r && e(t, r), t;\n };\n }(),\n s = n(3),\n o = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(s),\n a = (n(5), function () {\n function e(t) {\n var n = t.setup,\n i = t.db;r(this, e), this._db = i, this.instanceId = \"pn-\" + o.default.createUUID(), this.secretKey = n.secretKey || n.secret_key, this.subscribeKey = n.subscribeKey || n.subscribe_key, this.publishKey = n.publishKey || n.publish_key, this.sdkName = n.sdkName, this.sdkFamily = n.sdkFamily, this.partnerId = n.partnerId, this.setAuthKey(n.authKey), this.setCipherKey(n.cipherKey), this.setFilterExpression(n.filterExpression), this.origin = n.origin || \"pubsub.pndsn.com\", this.secure = n.ssl || !1, this.restore = n.restore || !1, this.proxy = n.proxy, this.keepAlive = n.keepAlive, this.keepAliveSettings = n.keepAliveSettings, this.autoNetworkDetection = n.autoNetworkDetection || !1, this.dedupeOnSubscribe = n.dedupeOnSubscribe || !1, this.maximumCacheSize = n.maximumCacheSize || 100, this.customEncrypt = n.customEncrypt, this.customDecrypt = n.customDecrypt, \"undefined\" != typeof location && \"https:\" === location.protocol && (this.secure = !0), this.logVerbosity = n.logVerbosity || !1, this.suppressLeaveEvents = n.suppressLeaveEvents || !1, this.announceFailedHeartbeats = n.announceFailedHeartbeats || !0, this.announceSuccessfulHeartbeats = n.announceSuccessfulHeartbeats || !1, this.useInstanceId = n.useInstanceId || !1, this.useRequestId = n.useRequestId || !1, this.requestMessageCountThreshold = n.requestMessageCountThreshold, this.setTransactionTimeout(n.transactionalRequestTimeout || 15e3), this.setSubscribeTimeout(n.subscribeRequestTimeout || 31e4), this.setSendBeaconConfig(n.useSendBeacon || !0), this.setPresenceTimeout(n.presenceTimeout || 300), null != n.heartbeatInterval && this.setHeartbeatInterval(n.heartbeatInterval), this.setUUID(this._decideUUID(n.uuid));\n }return i(e, [{ key: \"getAuthKey\", value: function value() {\n return this.authKey;\n } }, { key: \"setAuthKey\", value: function value(e) {\n return this.authKey = e, this;\n } }, { key: \"setCipherKey\", value: function value(e) {\n return this.cipherKey = e, this;\n } }, { key: \"getUUID\", value: function value() {\n return this.UUID;\n } }, { key: \"setUUID\", value: function value(e) {\n return this._db && this._db.set && this._db.set(this.subscribeKey + \"uuid\", e), this.UUID = e, this;\n } }, { key: \"getFilterExpression\", value: function value() {\n return this.filterExpression;\n } }, { key: \"setFilterExpression\", value: function value(e) {\n return this.filterExpression = e, this;\n } }, { key: \"getPresenceTimeout\", value: function value() {\n return this._presenceTimeout;\n } }, { key: \"setPresenceTimeout\", value: function value(e) {\n return this._presenceTimeout = e, this.setHeartbeatInterval(this._presenceTimeout / 2 - 1), this;\n } }, { key: \"setProxy\", value: function value(e) {\n this.proxy = e;\n } }, { key: \"getHeartbeatInterval\", value: function value() {\n return this._heartbeatInterval;\n } }, { key: \"setHeartbeatInterval\", value: function value(e) {\n return this._heartbeatInterval = e, this;\n } }, { key: \"getSubscribeTimeout\", value: function value() {\n return this._subscribeRequestTimeout;\n } }, { key: \"setSubscribeTimeout\", value: function value(e) {\n return this._subscribeRequestTimeout = e, this;\n } }, { key: \"getTransactionTimeout\", value: function value() {\n return this._transactionalRequestTimeout;\n } }, { key: \"setTransactionTimeout\", value: function value(e) {\n return this._transactionalRequestTimeout = e, this;\n } }, { key: \"isSendBeaconEnabled\", value: function value() {\n return this._useSendBeacon;\n } }, { key: \"setSendBeaconConfig\", value: function value(e) {\n return this._useSendBeacon = e, this;\n } }, { key: \"getVersion\", value: function value() {\n return \"4.20.2\";\n } }, { key: \"_decideUUID\", value: function value(e) {\n return e || (this._db && this._db.get && this._db.get(this.subscribeKey + \"uuid\") ? this._db.get(this.subscribeKey + \"uuid\") : \"pn-\" + o.default.createUUID());\n } }]), e;\n }());t.default = a, e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n Object.defineProperty(t, \"__esModule\", { value: !0 });var r = n(4),\n i = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(r);t.default = { createUUID: function createUUID() {\n return i.default.uuid ? i.default.uuid() : (0, i.default)();\n } }, e.exports = t.default;\n }, function (e, t, n) {\n var r, i, s;!function (n, o) {\n i = [t], r = o, void 0 !== (s = \"function\" == typeof r ? r.apply(t, i) : r) && (e.exports = s);\n }(0, function (e) {\n function t() {\n var e,\n t,\n n = \"\";for (e = 0; e < 32; e++) {\n t = 16 * Math.random() | 0, 8 !== e && 12 !== e && 16 !== e && 20 !== e || (n += \"-\"), n += (12 === e ? 4 : 16 === e ? 3 & t | 8 : t).toString(16);\n }return n;\n }function n(e, t) {\n var n = r[t || \"all\"];return n && n.test(e) || !1;\n }var r = { 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i, 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i };t.isUUID = n, t.VERSION = \"0.1.0\", e.uuid = t, e.isUUID = n;\n });\n }, function (e, t) {\n \"use strict\";\n e.exports = {};\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var s = function () {\n function e(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }return function (t, n, r) {\n return n && e(t.prototype, n), r && e(t, r), t;\n };\n }(),\n o = n(2),\n a = (r(o), n(7)),\n u = r(a),\n c = function () {\n function e(t) {\n var n = t.config;i(this, e), this._config = n, this._iv = \"0123456789012345\", this._allowedKeyEncodings = [\"hex\", \"utf8\", \"base64\", \"binary\"], this._allowedKeyLengths = [128, 256], this._allowedModes = [\"ecb\", \"cbc\"], this._defaultOptions = { encryptKey: !0, keyEncoding: \"utf8\", keyLength: 256, mode: \"cbc\" };\n }return s(e, [{ key: \"HMACSHA256\", value: function value(e) {\n return u.default.HmacSHA256(e, this._config.secretKey).toString(u.default.enc.Base64);\n } }, { key: \"SHA256\", value: function value(e) {\n return u.default.SHA256(e).toString(u.default.enc.Hex);\n } }, { key: \"_parseOptions\", value: function value(e) {\n var t = e || {};return t.hasOwnProperty(\"encryptKey\") || (t.encryptKey = this._defaultOptions.encryptKey), t.hasOwnProperty(\"keyEncoding\") || (t.keyEncoding = this._defaultOptions.keyEncoding), t.hasOwnProperty(\"keyLength\") || (t.keyLength = this._defaultOptions.keyLength), t.hasOwnProperty(\"mode\") || (t.mode = this._defaultOptions.mode), -1 === this._allowedKeyEncodings.indexOf(t.keyEncoding.toLowerCase()) && (t.keyEncoding = this._defaultOptions.keyEncoding), -1 === this._allowedKeyLengths.indexOf(parseInt(t.keyLength, 10)) && (t.keyLength = this._defaultOptions.keyLength), -1 === this._allowedModes.indexOf(t.mode.toLowerCase()) && (t.mode = this._defaultOptions.mode), t;\n } }, { key: \"_decodeKey\", value: function value(e, t) {\n return \"base64\" === t.keyEncoding ? u.default.enc.Base64.parse(e) : \"hex\" === t.keyEncoding ? u.default.enc.Hex.parse(e) : e;\n } }, { key: \"_getPaddedKey\", value: function value(e, t) {\n return e = this._decodeKey(e, t), t.encryptKey ? u.default.enc.Utf8.parse(this.SHA256(e).slice(0, 32)) : e;\n } }, { key: \"_getMode\", value: function value(e) {\n return \"ecb\" === e.mode ? u.default.mode.ECB : u.default.mode.CBC;\n } }, { key: \"_getIV\", value: function value(e) {\n return \"cbc\" === e.mode ? u.default.enc.Utf8.parse(this._iv) : null;\n } }, { key: \"encrypt\", value: function value(e, t, n) {\n return this._config.customEncrypt ? this._config.customEncrypt(e) : this.pnEncrypt(e, t, n);\n } }, { key: \"decrypt\", value: function value(e, t, n) {\n return this._config.customDecrypt ? this._config.customDecrypt(e) : this.pnDecrypt(e, t, n);\n } }, { key: \"pnEncrypt\", value: function value(e, t, n) {\n if (!t && !this._config.cipherKey) return e;n = this._parseOptions(n);var r = this._getIV(n),\n i = this._getMode(n),\n s = this._getPaddedKey(t || this._config.cipherKey, n);return u.default.AES.encrypt(e, s, { iv: r, mode: i }).ciphertext.toString(u.default.enc.Base64) || e;\n } }, { key: \"pnDecrypt\", value: function value(e, t, n) {\n if (!t && !this._config.cipherKey) return e;n = this._parseOptions(n);var r = this._getIV(n),\n i = this._getMode(n),\n s = this._getPaddedKey(t || this._config.cipherKey, n);try {\n var o = u.default.enc.Base64.parse(e),\n a = u.default.AES.decrypt({ ciphertext: o }, s, { iv: r, mode: i }).toString(u.default.enc.Utf8);return JSON.parse(a);\n } catch (e) {\n return null;\n }\n } }]), e;\n }();t.default = c, e.exports = t.default;\n }, function (e, t) {\n \"use strict\";\n var n = n || function (e, t) {\n var n = {},\n r = n.lib = {},\n i = function i() {},\n s = r.Base = { extend: function extend(e) {\n i.prototype = this;var t = new i();return e && t.mixIn(e), t.hasOwnProperty(\"init\") || (t.init = function () {\n t.$super.init.apply(this, arguments);\n }), t.init.prototype = t, t.$super = this, t;\n }, create: function create() {\n var e = this.extend();return e.init.apply(e, arguments), e;\n }, init: function init() {}, mixIn: function mixIn(e) {\n for (var t in e) {\n e.hasOwnProperty(t) && (this[t] = e[t]);\n }e.hasOwnProperty(\"toString\") && (this.toString = e.toString);\n }, clone: function clone() {\n return this.init.prototype.extend(this);\n } },\n o = r.WordArray = s.extend({ init: function init(e, t) {\n e = this.words = e || [], this.sigBytes = void 0 != t ? t : 4 * e.length;\n }, toString: function toString(e) {\n return (e || u).stringify(this);\n }, concat: function concat(e) {\n var t = this.words,\n n = e.words,\n r = this.sigBytes;if (e = e.sigBytes, this.clamp(), r % 4) for (var i = 0; i < e; i++) {\n t[r + i >>> 2] |= (n[i >>> 2] >>> 24 - i % 4 * 8 & 255) << 24 - (r + i) % 4 * 8;\n } else if (65535 < n.length) for (i = 0; i < e; i += 4) {\n t[r + i >>> 2] = n[i >>> 2];\n } else t.push.apply(t, n);return this.sigBytes += e, this;\n }, clamp: function clamp() {\n var t = this.words,\n n = this.sigBytes;t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);\n }, clone: function clone() {\n var e = s.clone.call(this);return e.words = this.words.slice(0), e;\n }, random: function random(t) {\n for (var n = [], r = 0; r < t; r += 4) {\n n.push(4294967296 * e.random() | 0);\n }return new o.init(n, t);\n } }),\n a = n.enc = {},\n u = a.Hex = { stringify: function stringify(e) {\n var t = e.words;e = e.sigBytes;for (var n = [], r = 0; r < e; r++) {\n var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;n.push((i >>> 4).toString(16)), n.push((15 & i).toString(16));\n }return n.join(\"\");\n }, parse: function parse(e) {\n for (var t = e.length, n = [], r = 0; r < t; r += 2) {\n n[r >>> 3] |= parseInt(e.substr(r, 2), 16) << 24 - r % 8 * 4;\n }return new o.init(n, t / 2);\n } },\n c = a.Latin1 = { stringify: function stringify(e) {\n var t = e.words;e = e.sigBytes;for (var n = [], r = 0; r < e; r++) {\n n.push(String.fromCharCode(t[r >>> 2] >>> 24 - r % 4 * 8 & 255));\n }return n.join(\"\");\n }, parse: function parse(e) {\n for (var t = e.length, n = [], r = 0; r < t; r++) {\n n[r >>> 2] |= (255 & e.charCodeAt(r)) << 24 - r % 4 * 8;\n }return new o.init(n, t);\n } },\n l = a.Utf8 = { stringify: function stringify(e) {\n try {\n return decodeURIComponent(escape(c.stringify(e)));\n } catch (e) {\n throw Error(\"Malformed UTF-8 data\");\n }\n }, parse: function parse(e) {\n return c.parse(unescape(encodeURIComponent(e)));\n } },\n h = r.BufferedBlockAlgorithm = s.extend({ reset: function reset() {\n this._data = new o.init(), this._nDataBytes = 0;\n }, _append: function _append(e) {\n \"string\" == typeof e && (e = l.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;\n }, _process: function _process(t) {\n var n = this._data,\n r = n.words,\n i = n.sigBytes,\n s = this.blockSize,\n a = i / (4 * s),\n a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0);if (t = a * s, i = e.min(4 * t, i), t) {\n for (var u = 0; u < t; u += s) {\n this._doProcessBlock(r, u);\n }u = r.splice(0, t), n.sigBytes -= i;\n }return new o.init(u, i);\n }, clone: function clone() {\n var e = s.clone.call(this);return e._data = this._data.clone(), e;\n }, _minBufferSize: 0 });r.Hasher = h.extend({ cfg: s.extend(), init: function init(e) {\n this.cfg = this.cfg.extend(e), this.reset();\n }, reset: function reset() {\n h.reset.call(this), this._doReset();\n }, update: function update(e) {\n return this._append(e), this._process(), this;\n }, finalize: function finalize(e) {\n return e && this._append(e), this._doFinalize();\n }, blockSize: 16, _createHelper: function _createHelper(e) {\n return function (t, n) {\n return new e.init(n).finalize(t);\n };\n }, _createHmacHelper: function _createHmacHelper(e) {\n return function (t, n) {\n return new f.HMAC.init(e, n).finalize(t);\n };\n } });var f = n.algo = {};return n;\n }(Math);!function (e) {\n for (var t = n, r = t.lib, i = r.WordArray, s = r.Hasher, r = t.algo, o = [], a = [], u = function u(e) {\n return 4294967296 * (e - (0 | e)) | 0;\n }, c = 2, l = 0; 64 > l;) {\n var h;e: {\n h = c;for (var f = e.sqrt(h), p = 2; p <= f; p++) {\n if (!(h % p)) {\n h = !1;break e;\n }\n }h = !0;\n }h && (8 > l && (o[l] = u(e.pow(c, .5))), a[l] = u(e.pow(c, 1 / 3)), l++), c++;\n }var d = [],\n r = r.SHA256 = s.extend({ _doReset: function _doReset() {\n this._hash = new i.init(o.slice(0));\n }, _doProcessBlock: function _doProcessBlock(e, t) {\n for (var n = this._hash.words, r = n[0], i = n[1], s = n[2], o = n[3], u = n[4], c = n[5], l = n[6], h = n[7], f = 0; 64 > f; f++) {\n if (16 > f) d[f] = 0 | e[t + f];else {\n var p = d[f - 15],\n y = d[f - 2];d[f] = ((p << 25 | p >>> 7) ^ (p << 14 | p >>> 18) ^ p >>> 3) + d[f - 7] + ((y << 15 | y >>> 17) ^ (y << 13 | y >>> 19) ^ y >>> 10) + d[f - 16];\n }p = h + ((u << 26 | u >>> 6) ^ (u << 21 | u >>> 11) ^ (u << 7 | u >>> 25)) + (u & c ^ ~u & l) + a[f] + d[f], y = ((r << 30 | r >>> 2) ^ (r << 19 | r >>> 13) ^ (r << 10 | r >>> 22)) + (r & i ^ r & s ^ i & s), h = l, l = c, c = u, u = o + p | 0, o = s, s = i, i = r, r = p + y | 0;\n }n[0] = n[0] + r | 0, n[1] = n[1] + i | 0, n[2] = n[2] + s | 0, n[3] = n[3] + o | 0, n[4] = n[4] + u | 0, n[5] = n[5] + c | 0, n[6] = n[6] + l | 0, n[7] = n[7] + h | 0;\n }, _doFinalize: function _doFinalize() {\n var t = this._data,\n n = t.words,\n r = 8 * this._nDataBytes,\n i = 8 * t.sigBytes;return n[i >>> 5] |= 128 << 24 - i % 32, n[14 + (i + 64 >>> 9 << 4)] = e.floor(r / 4294967296), n[15 + (i + 64 >>> 9 << 4)] = r, t.sigBytes = 4 * n.length, this._process(), this._hash;\n }, clone: function clone() {\n var e = s.clone.call(this);return e._hash = this._hash.clone(), e;\n } });t.SHA256 = s._createHelper(r), t.HmacSHA256 = s._createHmacHelper(r);\n }(Math), function () {\n var e = n,\n t = e.enc.Utf8;e.algo.HMAC = e.lib.Base.extend({ init: function init(e, n) {\n e = this._hasher = new e.init(), \"string\" == typeof n && (n = t.parse(n));var r = e.blockSize,\n i = 4 * r;n.sigBytes > i && (n = e.finalize(n)), n.clamp();for (var s = this._oKey = n.clone(), o = this._iKey = n.clone(), a = s.words, u = o.words, c = 0; c < r; c++) {\n a[c] ^= 1549556828, u[c] ^= 909522486;\n }s.sigBytes = o.sigBytes = i, this.reset();\n }, reset: function reset() {\n var e = this._hasher;e.reset(), e.update(this._iKey);\n }, update: function update(e) {\n return this._hasher.update(e), this;\n }, finalize: function finalize(e) {\n var t = this._hasher;return e = t.finalize(e), t.reset(), t.finalize(this._oKey.clone().concat(e));\n } });\n }(), function () {\n var e = n,\n t = e.lib.WordArray;e.enc.Base64 = { stringify: function stringify(e) {\n var t = e.words,\n n = e.sigBytes,\n r = this._map;e.clamp(), e = [];for (var i = 0; i < n; i += 3) {\n for (var s = (t[i >>> 2] >>> 24 - i % 4 * 8 & 255) << 16 | (t[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255) << 8 | t[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255, o = 0; 4 > o && i + .75 * o < n; o++) {\n e.push(r.charAt(s >>> 6 * (3 - o) & 63));\n }\n }if (t = r.charAt(64)) for (; e.length % 4;) {\n e.push(t);\n }return e.join(\"\");\n }, parse: function parse(e) {\n var n = e.length,\n r = this._map,\n i = r.charAt(64);i && -1 != (i = e.indexOf(i)) && (n = i);for (var i = [], s = 0, o = 0; o < n; o++) {\n if (o % 4) {\n var a = r.indexOf(e.charAt(o - 1)) << o % 4 * 2,\n u = r.indexOf(e.charAt(o)) >>> 6 - o % 4 * 2;i[s >>> 2] |= (a | u) << 24 - s % 4 * 8, s++;\n }\n }return t.create(i, s);\n }, _map: \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\" };\n }(), function (e) {\n function t(e, t, n, r, i, s, o) {\n return ((e = e + (t & n | ~t & r) + i + o) << s | e >>> 32 - s) + t;\n }function r(e, t, n, r, i, s, o) {\n return ((e = e + (t & r | n & ~r) + i + o) << s | e >>> 32 - s) + t;\n }function i(e, t, n, r, i, s, o) {\n return ((e = e + (t ^ n ^ r) + i + o) << s | e >>> 32 - s) + t;\n }function s(e, t, n, r, i, s, o) {\n return ((e = e + (n ^ (t | ~r)) + i + o) << s | e >>> 32 - s) + t;\n }for (var o = n, a = o.lib, u = a.WordArray, c = a.Hasher, a = o.algo, l = [], h = 0; 64 > h; h++) {\n l[h] = 4294967296 * e.abs(e.sin(h + 1)) | 0;\n }a = a.MD5 = c.extend({ _doReset: function _doReset() {\n this._hash = new u.init([1732584193, 4023233417, 2562383102, 271733878]);\n }, _doProcessBlock: function _doProcessBlock(e, n) {\n for (var o = 0; 16 > o; o++) {\n var a = n + o,\n u = e[a];e[a] = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8);\n }var o = this._hash.words,\n a = e[n + 0],\n u = e[n + 1],\n c = e[n + 2],\n h = e[n + 3],\n f = e[n + 4],\n p = e[n + 5],\n d = e[n + 6],\n y = e[n + 7],\n g = e[n + 8],\n b = e[n + 9],\n v = e[n + 10],\n _ = e[n + 11],\n m = e[n + 12],\n k = e[n + 13],\n P = e[n + 14],\n O = e[n + 15],\n S = o[0],\n w = o[1],\n T = o[2],\n C = o[3],\n S = t(S, w, T, C, a, 7, l[0]),\n C = t(C, S, w, T, u, 12, l[1]),\n T = t(T, C, S, w, c, 17, l[2]),\n w = t(w, T, C, S, h, 22, l[3]),\n S = t(S, w, T, C, f, 7, l[4]),\n C = t(C, S, w, T, p, 12, l[5]),\n T = t(T, C, S, w, d, 17, l[6]),\n w = t(w, T, C, S, y, 22, l[7]),\n S = t(S, w, T, C, g, 7, l[8]),\n C = t(C, S, w, T, b, 12, l[9]),\n T = t(T, C, S, w, v, 17, l[10]),\n w = t(w, T, C, S, _, 22, l[11]),\n S = t(S, w, T, C, m, 7, l[12]),\n C = t(C, S, w, T, k, 12, l[13]),\n T = t(T, C, S, w, P, 17, l[14]),\n w = t(w, T, C, S, O, 22, l[15]),\n S = r(S, w, T, C, u, 5, l[16]),\n C = r(C, S, w, T, d, 9, l[17]),\n T = r(T, C, S, w, _, 14, l[18]),\n w = r(w, T, C, S, a, 20, l[19]),\n S = r(S, w, T, C, p, 5, l[20]),\n C = r(C, S, w, T, v, 9, l[21]),\n T = r(T, C, S, w, O, 14, l[22]),\n w = r(w, T, C, S, f, 20, l[23]),\n S = r(S, w, T, C, b, 5, l[24]),\n C = r(C, S, w, T, P, 9, l[25]),\n T = r(T, C, S, w, h, 14, l[26]),\n w = r(w, T, C, S, g, 20, l[27]),\n S = r(S, w, T, C, k, 5, l[28]),\n C = r(C, S, w, T, c, 9, l[29]),\n T = r(T, C, S, w, y, 14, l[30]),\n w = r(w, T, C, S, m, 20, l[31]),\n S = i(S, w, T, C, p, 4, l[32]),\n C = i(C, S, w, T, g, 11, l[33]),\n T = i(T, C, S, w, _, 16, l[34]),\n w = i(w, T, C, S, P, 23, l[35]),\n S = i(S, w, T, C, u, 4, l[36]),\n C = i(C, S, w, T, f, 11, l[37]),\n T = i(T, C, S, w, y, 16, l[38]),\n w = i(w, T, C, S, v, 23, l[39]),\n S = i(S, w, T, C, k, 4, l[40]),\n C = i(C, S, w, T, a, 11, l[41]),\n T = i(T, C, S, w, h, 16, l[42]),\n w = i(w, T, C, S, d, 23, l[43]),\n S = i(S, w, T, C, b, 4, l[44]),\n C = i(C, S, w, T, m, 11, l[45]),\n T = i(T, C, S, w, O, 16, l[46]),\n w = i(w, T, C, S, c, 23, l[47]),\n S = s(S, w, T, C, a, 6, l[48]),\n C = s(C, S, w, T, y, 10, l[49]),\n T = s(T, C, S, w, P, 15, l[50]),\n w = s(w, T, C, S, p, 21, l[51]),\n S = s(S, w, T, C, m, 6, l[52]),\n C = s(C, S, w, T, h, 10, l[53]),\n T = s(T, C, S, w, v, 15, l[54]),\n w = s(w, T, C, S, u, 21, l[55]),\n S = s(S, w, T, C, g, 6, l[56]),\n C = s(C, S, w, T, O, 10, l[57]),\n T = s(T, C, S, w, d, 15, l[58]),\n w = s(w, T, C, S, k, 21, l[59]),\n S = s(S, w, T, C, f, 6, l[60]),\n C = s(C, S, w, T, _, 10, l[61]),\n T = s(T, C, S, w, c, 15, l[62]),\n w = s(w, T, C, S, b, 21, l[63]);o[0] = o[0] + S | 0, o[1] = o[1] + w | 0, o[2] = o[2] + T | 0, o[3] = o[3] + C | 0;\n }, _doFinalize: function _doFinalize() {\n var t = this._data,\n n = t.words,\n r = 8 * this._nDataBytes,\n i = 8 * t.sigBytes;n[i >>> 5] |= 128 << 24 - i % 32;var s = e.floor(r / 4294967296);for (n[15 + (i + 64 >>> 9 << 4)] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), n[14 + (i + 64 >>> 9 << 4)] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8), t.sigBytes = 4 * (n.length + 1), this._process(), t = this._hash, n = t.words, r = 0; 4 > r; r++) {\n i = n[r], n[r] = 16711935 & (i << 8 | i >>> 24) | 4278255360 & (i << 24 | i >>> 8);\n }return t;\n }, clone: function clone() {\n var e = c.clone.call(this);return e._hash = this._hash.clone(), e;\n } }), o.MD5 = c._createHelper(a), o.HmacMD5 = c._createHmacHelper(a);\n }(Math), function () {\n var e = n,\n t = e.lib,\n r = t.Base,\n i = t.WordArray,\n t = e.algo,\n s = t.EvpKDF = r.extend({ cfg: r.extend({ keySize: 4, hasher: t.MD5, iterations: 1 }), init: function init(e) {\n this.cfg = this.cfg.extend(e);\n }, compute: function compute(e, t) {\n for (var n = this.cfg, r = n.hasher.create(), s = i.create(), o = s.words, a = n.keySize, n = n.iterations; o.length < a;) {\n u && r.update(u);var u = r.update(e).finalize(t);r.reset();for (var c = 1; c < n; c++) {\n u = r.finalize(u), r.reset();\n }s.concat(u);\n }return s.sigBytes = 4 * a, s;\n } });e.EvpKDF = function (e, t, n) {\n return s.create(n).compute(e, t);\n };\n }(), n.lib.Cipher || function (e) {\n var t = n,\n r = t.lib,\n i = r.Base,\n s = r.WordArray,\n o = r.BufferedBlockAlgorithm,\n a = t.enc.Base64,\n u = t.algo.EvpKDF,\n c = r.Cipher = o.extend({ cfg: i.extend(), createEncryptor: function createEncryptor(e, t) {\n return this.create(this._ENC_XFORM_MODE, e, t);\n }, createDecryptor: function createDecryptor(e, t) {\n return this.create(this._DEC_XFORM_MODE, e, t);\n }, init: function init(e, t, n) {\n this.cfg = this.cfg.extend(n), this._xformMode = e, this._key = t, this.reset();\n }, reset: function reset() {\n o.reset.call(this), this._doReset();\n }, process: function process(e) {\n return this._append(e), this._process();\n }, finalize: function finalize(e) {\n return e && this._append(e), this._doFinalize();\n }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function _createHelper(e) {\n return { encrypt: function encrypt(t, n, r) {\n return (\"string\" == typeof n ? y : d).encrypt(e, t, n, r);\n }, decrypt: function decrypt(t, n, r) {\n return (\"string\" == typeof n ? y : d).decrypt(e, t, n, r);\n } };\n } });r.StreamCipher = c.extend({ _doFinalize: function _doFinalize() {\n return this._process(!0);\n }, blockSize: 1 });var l = t.mode = {},\n h = function h(e, t, n) {\n var r = this._iv;r ? this._iv = void 0 : r = this._prevBlock;for (var i = 0; i < n; i++) {\n e[t + i] ^= r[i];\n }\n },\n f = (r.BlockCipherMode = i.extend({ createEncryptor: function createEncryptor(e, t) {\n return this.Encryptor.create(e, t);\n }, createDecryptor: function createDecryptor(e, t) {\n return this.Decryptor.create(e, t);\n }, init: function init(e, t) {\n this._cipher = e, this._iv = t;\n } })).extend();f.Encryptor = f.extend({ processBlock: function processBlock(e, t) {\n var n = this._cipher,\n r = n.blockSize;h.call(this, e, t, r), n.encryptBlock(e, t), this._prevBlock = e.slice(t, t + r);\n } }), f.Decryptor = f.extend({ processBlock: function processBlock(e, t) {\n var n = this._cipher,\n r = n.blockSize,\n i = e.slice(t, t + r);n.decryptBlock(e, t), h.call(this, e, t, r), this._prevBlock = i;\n } }), l = l.CBC = f, f = (t.pad = {}).Pkcs7 = { pad: function pad(e, t) {\n for (var n = 4 * t, n = n - e.sigBytes % n, r = n << 24 | n << 16 | n << 8 | n, i = [], o = 0; o < n; o += 4) {\n i.push(r);\n }n = s.create(i, n), e.concat(n);\n }, unpad: function unpad(e) {\n e.sigBytes -= 255 & e.words[e.sigBytes - 1 >>> 2];\n } }, r.BlockCipher = c.extend({ cfg: c.cfg.extend({ mode: l, padding: f }), reset: function reset() {\n c.reset.call(this);var e = this.cfg,\n t = e.iv,\n e = e.mode;if (this._xformMode == this._ENC_XFORM_MODE) var n = e.createEncryptor;else n = e.createDecryptor, this._minBufferSize = 1;this._mode = n.call(e, this, t && t.words);\n }, _doProcessBlock: function _doProcessBlock(e, t) {\n this._mode.processBlock(e, t);\n }, _doFinalize: function _doFinalize() {\n var e = this.cfg.padding;if (this._xformMode == this._ENC_XFORM_MODE) {\n e.pad(this._data, this.blockSize);var t = this._process(!0);\n } else t = this._process(!0), e.unpad(t);return t;\n }, blockSize: 4 });var p = r.CipherParams = i.extend({ init: function init(e) {\n this.mixIn(e);\n }, toString: function toString(e) {\n return (e || this.formatter).stringify(this);\n } }),\n l = (t.format = {}).OpenSSL = { stringify: function stringify(e) {\n var t = e.ciphertext;return e = e.salt, (e ? s.create([1398893684, 1701076831]).concat(e).concat(t) : t).toString(a);\n }, parse: function parse(e) {\n e = a.parse(e);var t = e.words;if (1398893684 == t[0] && 1701076831 == t[1]) {\n var n = s.create(t.slice(2, 4));t.splice(0, 4), e.sigBytes -= 16;\n }return p.create({ ciphertext: e, salt: n });\n } },\n d = r.SerializableCipher = i.extend({ cfg: i.extend({ format: l }), encrypt: function encrypt(e, t, n, r) {\n r = this.cfg.extend(r);var i = e.createEncryptor(n, r);return t = i.finalize(t), i = i.cfg, p.create({ ciphertext: t, key: n, iv: i.iv, algorithm: e, mode: i.mode, padding: i.padding, blockSize: e.blockSize, formatter: r.format });\n }, decrypt: function decrypt(e, t, n, r) {\n return r = this.cfg.extend(r), t = this._parse(t, r.format), e.createDecryptor(n, r).finalize(t.ciphertext);\n }, _parse: function _parse(e, t) {\n return \"string\" == typeof e ? t.parse(e, this) : e;\n } }),\n t = (t.kdf = {}).OpenSSL = { execute: function execute(e, t, n, r) {\n return r || (r = s.random(8)), e = u.create({ keySize: t + n }).compute(e, r), n = s.create(e.words.slice(t), 4 * n), e.sigBytes = 4 * t, p.create({ key: e, iv: n, salt: r });\n } },\n y = r.PasswordBasedCipher = d.extend({ cfg: d.cfg.extend({ kdf: t }), encrypt: function encrypt(e, t, n, r) {\n return r = this.cfg.extend(r), n = r.kdf.execute(n, e.keySize, e.ivSize), r.iv = n.iv, e = d.encrypt.call(this, e, t, n.key, r), e.mixIn(n), e;\n }, decrypt: function decrypt(e, t, n, r) {\n return r = this.cfg.extend(r), t = this._parse(t, r.format), n = r.kdf.execute(n, e.keySize, e.ivSize, t.salt), r.iv = n.iv, d.decrypt.call(this, e, t, n.key, r);\n } });\n }(), function () {\n for (var e = n, t = e.lib.BlockCipher, r = e.algo, i = [], s = [], o = [], a = [], u = [], c = [], l = [], h = [], f = [], p = [], d = [], y = 0; 256 > y; y++) {\n d[y] = 128 > y ? y << 1 : y << 1 ^ 283;\n }for (var g = 0, b = 0, y = 0; 256 > y; y++) {\n var v = b ^ b << 1 ^ b << 2 ^ b << 3 ^ b << 4,\n v = v >>> 8 ^ 255 & v ^ 99;i[g] = v, s[v] = g;var _ = d[g],\n m = d[_],\n k = d[m],\n P = 257 * d[v] ^ 16843008 * v;o[g] = P << 24 | P >>> 8, a[g] = P << 16 | P >>> 16, u[g] = P << 8 | P >>> 24, c[g] = P, P = 16843009 * k ^ 65537 * m ^ 257 * _ ^ 16843008 * g, l[v] = P << 24 | P >>> 8, h[v] = P << 16 | P >>> 16, f[v] = P << 8 | P >>> 24, p[v] = P, g ? (g = _ ^ d[d[d[k ^ _]]], b ^= d[d[b]]) : g = b = 1;\n }var O = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54],\n r = r.AES = t.extend({ _doReset: function _doReset() {\n for (var e = this._key, t = e.words, n = e.sigBytes / 4, e = 4 * ((this._nRounds = n + 6) + 1), r = this._keySchedule = [], s = 0; s < e; s++) {\n if (s < n) r[s] = t[s];else {\n var o = r[s - 1];s % n ? 6 < n && 4 == s % n && (o = i[o >>> 24] << 24 | i[o >>> 16 & 255] << 16 | i[o >>> 8 & 255] << 8 | i[255 & o]) : (o = o << 8 | o >>> 24, o = i[o >>> 24] << 24 | i[o >>> 16 & 255] << 16 | i[o >>> 8 & 255] << 8 | i[255 & o], o ^= O[s / n | 0] << 24), r[s] = r[s - n] ^ o;\n }\n }for (t = this._invKeySchedule = [], n = 0; n < e; n++) {\n s = e - n, o = n % 4 ? r[s] : r[s - 4], t[n] = 4 > n || 4 >= s ? o : l[i[o >>> 24]] ^ h[i[o >>> 16 & 255]] ^ f[i[o >>> 8 & 255]] ^ p[i[255 & o]];\n }\n }, encryptBlock: function encryptBlock(e, t) {\n this._doCryptBlock(e, t, this._keySchedule, o, a, u, c, i);\n }, decryptBlock: function decryptBlock(e, t) {\n var n = e[t + 1];e[t + 1] = e[t + 3], e[t + 3] = n, this._doCryptBlock(e, t, this._invKeySchedule, l, h, f, p, s), n = e[t + 1], e[t + 1] = e[t + 3], e[t + 3] = n;\n }, _doCryptBlock: function _doCryptBlock(e, t, n, r, i, s, o, a) {\n for (var u = this._nRounds, c = e[t] ^ n[0], l = e[t + 1] ^ n[1], h = e[t + 2] ^ n[2], f = e[t + 3] ^ n[3], p = 4, d = 1; d < u; d++) {\n var y = r[c >>> 24] ^ i[l >>> 16 & 255] ^ s[h >>> 8 & 255] ^ o[255 & f] ^ n[p++],\n g = r[l >>> 24] ^ i[h >>> 16 & 255] ^ s[f >>> 8 & 255] ^ o[255 & c] ^ n[p++],\n b = r[h >>> 24] ^ i[f >>> 16 & 255] ^ s[c >>> 8 & 255] ^ o[255 & l] ^ n[p++],\n f = r[f >>> 24] ^ i[c >>> 16 & 255] ^ s[l >>> 8 & 255] ^ o[255 & h] ^ n[p++],\n c = y,\n l = g,\n h = b;\n }y = (a[c >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & f]) ^ n[p++], g = (a[l >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & c]) ^ n[p++], b = (a[h >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[c >>> 8 & 255] << 8 | a[255 & l]) ^ n[p++], f = (a[f >>> 24] << 24 | a[c >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & h]) ^ n[p++], e[t] = y, e[t + 1] = g, e[t + 2] = b, e[t + 3] = f;\n }, keySize: 8 });e.AES = t._createHelper(r);\n }(), n.mode.ECB = function () {\n var e = n.lib.BlockCipherMode.extend();return e.Encryptor = e.extend({ processBlock: function processBlock(e, t) {\n this._cipher.encryptBlock(e, t);\n } }), e.Decryptor = e.extend({ processBlock: function processBlock(e, t) {\n this._cipher.decryptBlock(e, t);\n } }), e;\n }(), e.exports = n;\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var s = function () {\n function e(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }return function (t, n, r) {\n return n && e(t.prototype, n), r && e(t, r), t;\n };\n }(),\n o = n(6),\n a = (r(o), n(2)),\n u = (r(a), n(9)),\n c = (r(u), n(11)),\n l = r(c),\n h = n(14),\n f = r(h),\n p = n(15),\n d = r(p),\n y = (n(5), n(10)),\n g = r(y),\n b = function () {\n function e(t) {\n var n = t.subscribeEndpoint,\n r = t.leaveEndpoint,\n s = t.heartbeatEndpoint,\n o = t.setStateEndpoint,\n a = t.timeEndpoint,\n u = t.config,\n c = t.crypto,\n h = t.listenerManager;i(this, e), this._listenerManager = h, this._config = u, this._leaveEndpoint = r, this._heartbeatEndpoint = s, this._setStateEndpoint = o, this._subscribeEndpoint = n, this._crypto = c, this._channels = {}, this._presenceChannels = {}, this._heartbeatChannels = {}, this._heartbeatChannelGroups = {}, this._channelGroups = {}, this._presenceChannelGroups = {}, this._pendingChannelSubscriptions = [], this._pendingChannelGroupSubscriptions = [], this._currentTimetoken = 0, this._lastTimetoken = 0, this._storedTimetoken = null, this._subscriptionStatusAnnounced = !1, this._isOnline = !0, this._reconnectionManager = new l.default({ timeEndpoint: a }), this._dedupingManager = new f.default({ config: u });\n }return s(e, [{ key: \"adaptStateChange\", value: function value(e, t) {\n var n = this,\n r = e.state,\n i = e.channels,\n s = void 0 === i ? [] : i,\n o = e.channelGroups,\n a = void 0 === o ? [] : o;return s.forEach(function (e) {\n e in n._channels && (n._channels[e].state = r);\n }), a.forEach(function (e) {\n e in n._channelGroups && (n._channelGroups[e].state = r);\n }), this._setStateEndpoint({ state: r, channels: s, channelGroups: a }, t);\n } }, { key: \"adaptPresenceChange\", value: function value(e) {\n var t = this,\n n = e.connected,\n r = e.channels,\n i = void 0 === r ? [] : r,\n s = e.channelGroups,\n o = void 0 === s ? [] : s;n ? (i.forEach(function (e) {\n t._heartbeatChannels[e] = { state: {} };\n }), o.forEach(function (e) {\n t._heartbeatChannelGroups[e] = { state: {} };\n })) : (i.forEach(function (e) {\n e in t._heartbeatChannels && delete t._heartbeatChannels[e];\n }), o.forEach(function (e) {\n e in t._heartbeatChannelGroups && delete t._heartbeatChannelGroups[e];\n }), !1 === this._config.suppressLeaveEvents && this._leaveEndpoint({ channels: i, channelGroups: o }, function (e) {\n t._listenerManager.announceStatus(e);\n })), this.reconnect();\n } }, { key: \"adaptSubscribeChange\", value: function value(e) {\n var t = this,\n n = e.timetoken,\n r = e.channels,\n i = void 0 === r ? [] : r,\n s = e.channelGroups,\n o = void 0 === s ? [] : s,\n a = e.withPresence,\n u = void 0 !== a && a;if (!this._config.subscribeKey || \"\" === this._config.subscribeKey) return void (console && console.log && console.log(\"subscribe key missing; aborting subscribe\"));n && (this._lastTimetoken = this._currentTimetoken, this._currentTimetoken = n), \"0\" !== this._currentTimetoken && (this._storedTimetoken = this._currentTimetoken, this._currentTimetoken = 0), i.forEach(function (e) {\n t._channels[e] = { state: {} }, u && (t._presenceChannels[e] = {}), t._pendingChannelSubscriptions.push(e);\n }), o.forEach(function (e) {\n t._channelGroups[e] = { state: {} }, u && (t._presenceChannelGroups[e] = {}), t._pendingChannelGroupSubscriptions.push(e);\n }), this._subscriptionStatusAnnounced = !1, this.reconnect();\n } }, { key: \"adaptUnsubscribeChange\", value: function value(e, t) {\n var n = this,\n r = e.channels,\n i = void 0 === r ? [] : r,\n s = e.channelGroups,\n o = void 0 === s ? [] : s,\n a = [],\n u = [];i.forEach(function (e) {\n e in n._channels && (delete n._channels[e], a.push(e)), e in n._presenceChannels && (delete n._presenceChannels[e], a.push(e));\n }), o.forEach(function (e) {\n e in n._channelGroups && (delete n._channelGroups[e], u.push(e)), e in n._presenceChannelGroups && (delete n._channelGroups[e], u.push(e));\n }), 0 === a.length && 0 === u.length || (!1 !== this._config.suppressLeaveEvents || t || this._leaveEndpoint({ channels: a, channelGroups: u }, function (e) {\n e.affectedChannels = a, e.affectedChannelGroups = u, e.currentTimetoken = n._currentTimetoken, e.lastTimetoken = n._lastTimetoken, n._listenerManager.announceStatus(e);\n }), 0 === Object.keys(this._channels).length && 0 === Object.keys(this._presenceChannels).length && 0 === Object.keys(this._channelGroups).length && 0 === Object.keys(this._presenceChannelGroups).length && (this._lastTimetoken = 0, this._currentTimetoken = 0, this._storedTimetoken = null, this._region = null, this._reconnectionManager.stopPolling()), this.reconnect());\n } }, { key: \"unsubscribeAll\", value: function value(e) {\n this.adaptUnsubscribeChange({ channels: this.getSubscribedChannels(), channelGroups: this.getSubscribedChannelGroups() }, e);\n } }, { key: \"getHeartbeatChannels\", value: function value() {\n return Object.keys(this._heartbeatChannels);\n } }, { key: \"getHeartbeatChannelGroups\", value: function value() {\n return Object.keys(this._heartbeatChannelGroups);\n } }, { key: \"getSubscribedChannels\", value: function value() {\n return Object.keys(this._channels);\n } }, { key: \"getSubscribedChannelGroups\", value: function value() {\n return Object.keys(this._channelGroups);\n } }, { key: \"reconnect\", value: function value() {\n this._startSubscribeLoop(), this._registerHeartbeatTimer();\n } }, { key: \"disconnect\", value: function value() {\n this._stopSubscribeLoop(), this._stopHeartbeatTimer(), this._reconnectionManager.stopPolling();\n } }, { key: \"_registerHeartbeatTimer\", value: function value() {\n this._stopHeartbeatTimer(), 0 !== this._config.getHeartbeatInterval() && (this._performHeartbeatLoop(), this._heartbeatTimer = setInterval(this._performHeartbeatLoop.bind(this), 1e3 * this._config.getHeartbeatInterval()));\n } }, { key: \"_stopHeartbeatTimer\", value: function value() {\n this._heartbeatTimer && (clearInterval(this._heartbeatTimer), this._heartbeatTimer = null);\n } }, { key: \"_performHeartbeatLoop\", value: function value() {\n var e = this,\n t = [];t = t.concat(this.getHeartbeatChannels()), t = t.concat(this.getSubscribedChannels());var n = [];n = n.concat(this.getHeartbeatChannelGroups()), n = n.concat(this.getSubscribedChannelGroups());var r = {};if (0 !== t.length || 0 !== n.length) {\n this.getSubscribedChannels().forEach(function (t) {\n var n = e._channels[t].state;Object.keys(n).length && (r[t] = n);\n }), this.getSubscribedChannelGroups().forEach(function (t) {\n var n = e._channelGroups[t].state;Object.keys(n).length && (r[t] = n);\n });var i = function i(t) {\n t.error && e._config.announceFailedHeartbeats && e._listenerManager.announceStatus(t), t.error && e._config.autoNetworkDetection && e._isOnline && (e._isOnline = !1, e.disconnect(), e._listenerManager.announceNetworkDown(), e.reconnect()), !t.error && e._config.announceSuccessfulHeartbeats && e._listenerManager.announceStatus(t);\n };this._heartbeatEndpoint({ channels: t, channelGroups: n, state: r }, i.bind(this));\n }\n } }, { key: \"_startSubscribeLoop\", value: function value() {\n this._stopSubscribeLoop();var e = [],\n t = [];if (Object.keys(this._channels).forEach(function (t) {\n return e.push(t);\n }), Object.keys(this._presenceChannels).forEach(function (t) {\n return e.push(t + \"-pnpres\");\n }), Object.keys(this._channelGroups).forEach(function (e) {\n return t.push(e);\n }), Object.keys(this._presenceChannelGroups).forEach(function (e) {\n return t.push(e + \"-pnpres\");\n }), 0 !== e.length || 0 !== t.length) {\n var n = { channels: e, channelGroups: t, timetoken: this._currentTimetoken, filterExpression: this._config.filterExpression, region: this._region };this._subscribeCall = this._subscribeEndpoint(n, this._processSubscribeResponse.bind(this));\n }\n } }, { key: \"_processSubscribeResponse\", value: function value(e, t) {\n var n = this;if (e.error) return void (e.category === g.default.PNTimeoutCategory ? this._startSubscribeLoop() : e.category === g.default.PNNetworkIssuesCategory ? (this.disconnect(), e.error && this._config.autoNetworkDetection && this._isOnline && (this._isOnline = !1, this._listenerManager.announceNetworkDown()), this._reconnectionManager.onReconnection(function () {\n n._config.autoNetworkDetection && !n._isOnline && (n._isOnline = !0, n._listenerManager.announceNetworkUp()), n.reconnect(), n._subscriptionStatusAnnounced = !0;var t = { category: g.default.PNReconnectedCategory, operation: e.operation, lastTimetoken: n._lastTimetoken, currentTimetoken: n._currentTimetoken };n._listenerManager.announceStatus(t);\n }), this._reconnectionManager.startPolling(), this._listenerManager.announceStatus(e)) : e.category === g.default.PNBadRequestCategory ? (this._stopHeartbeatTimer(), this._listenerManager.announceStatus(e)) : this._listenerManager.announceStatus(e));if (this._storedTimetoken ? (this._currentTimetoken = this._storedTimetoken, this._storedTimetoken = null) : (this._lastTimetoken = this._currentTimetoken, this._currentTimetoken = t.metadata.timetoken), !this._subscriptionStatusAnnounced) {\n var r = {};r.category = g.default.PNConnectedCategory, r.operation = e.operation, r.affectedChannels = this._pendingChannelSubscriptions, r.subscribedChannels = this.getSubscribedChannels(), r.affectedChannelGroups = this._pendingChannelGroupSubscriptions, r.lastTimetoken = this._lastTimetoken, r.currentTimetoken = this._currentTimetoken, this._subscriptionStatusAnnounced = !0, this._listenerManager.announceStatus(r), this._pendingChannelSubscriptions = [], this._pendingChannelGroupSubscriptions = [];\n }var i = t.messages || [],\n s = this._config,\n o = s.requestMessageCountThreshold,\n a = s.dedupeOnSubscribe;if (o && i.length >= o) {\n var u = {};u.category = g.default.PNRequestMessageCountExceededCategory, u.operation = e.operation, this._listenerManager.announceStatus(u);\n }i.forEach(function (e) {\n var t = e.channel,\n r = e.subscriptionMatch,\n i = e.publishMetaData;if (t === r && (r = null), a) {\n if (n._dedupingManager.isDuplicate(e)) return;n._dedupingManager.addEntry(e);\n }if (d.default.endsWith(e.channel, \"-pnpres\")) {\n var s = {};s.channel = null, s.subscription = null, s.actualChannel = null != r ? t : null, s.subscribedChannel = null != r ? r : t, t && (s.channel = t.substring(0, t.lastIndexOf(\"-pnpres\"))), r && (s.subscription = r.substring(0, r.lastIndexOf(\"-pnpres\"))), s.action = e.payload.action, s.state = e.payload.data, s.timetoken = i.publishTimetoken, s.occupancy = e.payload.occupancy, s.uuid = e.payload.uuid, s.timestamp = e.payload.timestamp, e.payload.join && (s.join = e.payload.join), e.payload.leave && (s.leave = e.payload.leave), e.payload.timeout && (s.timeout = e.payload.timeout), n._listenerManager.announcePresence(s);\n } else {\n var o = {};o.channel = null, o.subscription = null, o.actualChannel = null != r ? t : null, o.subscribedChannel = null != r ? r : t, o.channel = t, o.subscription = r, o.timetoken = i.publishTimetoken, o.publisher = e.issuingClientId, e.userMetadata && (o.userMetadata = e.userMetadata), n._config.cipherKey ? o.message = n._crypto.decrypt(e.payload) : o.message = e.payload, n._listenerManager.announceMessage(o);\n }\n }), this._region = t.metadata.region, this._startSubscribeLoop();\n } }, { key: \"_stopSubscribeLoop\", value: function value() {\n this._subscribeCall && (\"function\" == typeof this._subscribeCall.abort && this._subscribeCall.abort(), this._subscribeCall = null);\n } }]), e;\n }();t.default = b, e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n function r(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var i = function () {\n function e(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }return function (t, n, r) {\n return n && e(t.prototype, n), r && e(t, r), t;\n };\n }(),\n s = (n(5), n(10)),\n o = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(s),\n a = function () {\n function e() {\n r(this, e), this._listeners = [];\n }return i(e, [{ key: \"addListener\", value: function value(e) {\n this._listeners.push(e);\n } }, { key: \"removeListener\", value: function value(e) {\n var t = [];this._listeners.forEach(function (n) {\n n !== e && t.push(n);\n }), this._listeners = t;\n } }, { key: \"removeAllListeners\", value: function value() {\n this._listeners = [];\n } }, { key: \"announcePresence\", value: function value(e) {\n this._listeners.forEach(function (t) {\n t.presence && t.presence(e);\n });\n } }, { key: \"announceStatus\", value: function value(e) {\n this._listeners.forEach(function (t) {\n t.status && t.status(e);\n });\n } }, { key: \"announceMessage\", value: function value(e) {\n this._listeners.forEach(function (t) {\n t.message && t.message(e);\n });\n } }, { key: \"announceNetworkUp\", value: function value() {\n var e = {};e.category = o.default.PNNetworkUpCategory, this.announceStatus(e);\n } }, { key: \"announceNetworkDown\", value: function value() {\n var e = {};e.category = o.default.PNNetworkDownCategory, this.announceStatus(e);\n } }]), e;\n }();t.default = a, e.exports = t.default;\n }, function (e, t) {\n \"use strict\";\n Object.defineProperty(t, \"__esModule\", { value: !0 }), t.default = { PNNetworkUpCategory: \"PNNetworkUpCategory\", PNNetworkDownCategory: \"PNNetworkDownCategory\", PNNetworkIssuesCategory: \"PNNetworkIssuesCategory\", PNTimeoutCategory: \"PNTimeoutCategory\", PNBadRequestCategory: \"PNBadRequestCategory\", PNAccessDeniedCategory: \"PNAccessDeniedCategory\", PNUnknownCategory: \"PNUnknownCategory\", PNReconnectedCategory: \"PNReconnectedCategory\", PNConnectedCategory: \"PNConnectedCategory\", PNRequestMessageCountExceededCategory: \"PNRequestMessageCountExceededCategory\" }, e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n function r(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var i = function () {\n function e(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }return function (t, n, r) {\n return n && e(t.prototype, n), r && e(t, r), t;\n };\n }(),\n s = n(12),\n o = (function (e) {\n e && e.__esModule;\n }(s), n(5), function () {\n function e(t) {\n var n = t.timeEndpoint;r(this, e), this._timeEndpoint = n;\n }return i(e, [{ key: \"onReconnection\", value: function value(e) {\n this._reconnectionCallback = e;\n } }, { key: \"startPolling\", value: function value() {\n this._timeTimer = setInterval(this._performTimeLoop.bind(this), 3e3);\n } }, { key: \"stopPolling\", value: function value() {\n clearInterval(this._timeTimer);\n } }, { key: \"_performTimeLoop\", value: function value() {\n var e = this;this._timeEndpoint(function (t) {\n t.error || (clearInterval(e._timeTimer), e._reconnectionCallback());\n });\n } }]), e;\n }());t.default = o, e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNTimeOperation;\n }function i() {\n return \"/time/0\";\n }function s(e) {\n return e.config.getTransactionTimeout();\n }function o() {\n return {};\n }function a() {\n return !1;\n }function u(e, t) {\n return { timetoken: t[0] };\n }function c() {}Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.getURL = i, t.getRequestTimeout = s, t.prepareParams = o, t.isAuthSupported = a, t.handleResponse = u, t.validateParams = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(l);\n }, function (e, t) {\n \"use strict\";\n Object.defineProperty(t, \"__esModule\", { value: !0 }), t.default = { PNTimeOperation: \"PNTimeOperation\", PNHistoryOperation: \"PNHistoryOperation\", PNDeleteMessagesOperation: \"PNDeleteMessagesOperation\", PNFetchMessagesOperation: \"PNFetchMessagesOperation\", PNSubscribeOperation: \"PNSubscribeOperation\", PNUnsubscribeOperation: \"PNUnsubscribeOperation\", PNPublishOperation: \"PNPublishOperation\", PNPushNotificationEnabledChannelsOperation: \"PNPushNotificationEnabledChannelsOperation\", PNRemoveAllPushNotificationsOperation: \"PNRemoveAllPushNotificationsOperation\", PNWhereNowOperation: \"PNWhereNowOperation\", PNSetStateOperation: \"PNSetStateOperation\", PNHereNowOperation: \"PNHereNowOperation\", PNGetStateOperation: \"PNGetStateOperation\", PNHeartbeatOperation: \"PNHeartbeatOperation\", PNChannelGroupsOperation: \"PNChannelGroupsOperation\", PNRemoveGroupOperation: \"PNRemoveGroupOperation\", PNChannelsForGroupOperation: \"PNChannelsForGroupOperation\", PNAddChannelsToGroupOperation: \"PNAddChannelsToGroupOperation\", PNRemoveChannelsFromGroupOperation: \"PNRemoveChannelsFromGroupOperation\", PNAccessManagerGrant: \"PNAccessManagerGrant\", PNAccessManagerAudit: \"PNAccessManagerAudit\" }, e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n function r(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var i = function () {\n function e(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }return function (t, n, r) {\n return n && e(t.prototype, n), r && e(t, r), t;\n };\n }(),\n s = n(2),\n o = (function (e) {\n e && e.__esModule;\n }(s), n(5), function (e) {\n var t = 0;if (0 === e.length) return t;for (var n = 0; n < e.length; n += 1) {\n t = (t << 5) - t + e.charCodeAt(n), t &= t;\n }return t;\n }),\n a = function () {\n function e(t) {\n var n = t.config;r(this, e), this.hashHistory = [], this._config = n;\n }return i(e, [{ key: \"getKey\", value: function value(e) {\n var t = o(JSON.stringify(e.payload)).toString();return e.publishMetaData.publishTimetoken + \"-\" + t;\n } }, { key: \"isDuplicate\", value: function value(e) {\n return this.hashHistory.includes(this.getKey(e));\n } }, { key: \"addEntry\", value: function value(e) {\n this.hashHistory.length >= this._config.maximumCacheSize && this.hashHistory.shift(), this.hashHistory.push(this.getKey(e));\n } }, { key: \"clearHistory\", value: function value() {\n this.hashHistory = [];\n } }]), e;\n }();t.default = a, e.exports = t.default;\n }, function (e, t) {\n \"use strict\";\n function n(e) {\n var t = [];return Object.keys(e).forEach(function (e) {\n return t.push(e);\n }), t;\n }function r(e) {\n return encodeURIComponent(e).replace(/[!~*'()]/g, function (e) {\n return \"%\" + e.charCodeAt(0).toString(16).toUpperCase();\n });\n }function i(e) {\n return n(e).sort();\n }function s(e) {\n return i(e).map(function (t) {\n return t + \"=\" + r(e[t]);\n }).join(\"&\");\n }function o(e, t) {\n return -1 !== e.indexOf(t, this.length - t.length);\n }function a() {\n var e = void 0,\n t = void 0;return { promise: new Promise(function (n, r) {\n e = n, t = r;\n }), reject: t, fulfill: e };\n }e.exports = { signPamFromParams: s, endsWith: o, createPromise: a, encodeString: r };\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }function s(e, t) {\n if (!e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return !t || \"object\" != (typeof t === \"undefined\" ? \"undefined\" : _typeof(t)) && \"function\" != typeof t ? e : t;\n }function o(e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof t === \"undefined\" ? \"undefined\" : _typeof(t)));e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);\n }function a(e, t) {\n return e.type = t, e.error = !0, e;\n }function u(e) {\n return a({ message: e }, \"validationError\");\n }function c(e, t, n) {\n return e.usePost && e.usePost(t, n) ? e.postURL(t, n) : e.getURL(t, n);\n }function l(e) {\n if (e.sdkName) return e.sdkName;var t = \"PubNub-JS-\" + e.sdkFamily;return e.partnerId && (t += \"-\" + e.partnerId), t += \"/\" + e.getVersion();\n }function h(e, t, n) {\n var r = e.config,\n i = e.crypto;n.timestamp = Math.floor(new Date().getTime() / 1e3);var s = r.subscribeKey + \"\\n\" + r.publishKey + \"\\n\" + t + \"\\n\";s += y.default.signPamFromParams(n);var o = i.HMACSHA256(s);o = o.replace(/\\+/g, \"-\"), o = o.replace(/\\//g, \"_\"), n.signature = o;\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.default = function (e, t) {\n var n = e.networking,\n r = e.config,\n i = null,\n s = null,\n o = {};t.getOperation() === v.default.PNTimeOperation || t.getOperation() === v.default.PNChannelGroupsOperation ? i = arguments.length <= 2 ? void 0 : arguments[2] : (o = arguments.length <= 2 ? void 0 : arguments[2], i = arguments.length <= 3 ? void 0 : arguments[3]), \"undefined\" == typeof Promise || i || (s = y.default.createPromise());var a = t.validateParams(e, o);if (!a) {\n var f = t.prepareParams(e, o),\n d = c(t, e, o),\n g = void 0,\n b = { url: d, operation: t.getOperation(), timeout: t.getRequestTimeout(e) };f.uuid = r.UUID, f.pnsdk = l(r), r.useInstanceId && (f.instanceid = r.instanceId), r.useRequestId && (f.requestid = p.default.createUUID()), t.isAuthSupported() && r.getAuthKey() && (f.auth = r.getAuthKey()), r.secretKey && h(e, d, f);var m = function m(n, r) {\n if (n.error) return void (i ? i(n) : s && s.reject(new _(\"PubNub call failed, check status for details\", n)));var a = t.handleResponse(e, r, o);i ? i(n, a) : s && s.fulfill(a);\n };if (t.usePost && t.usePost(e, o)) {\n var k = t.postPayload(e, o);g = n.POST(f, k, b, m);\n } else g = t.useDelete && t.useDelete() ? n.DELETE(f, b, m) : n.GET(f, b, m);return t.getOperation() === v.default.PNSubscribeOperation ? g : s ? s.promise : void 0;\n }return i ? i(u(a)) : s ? (s.reject(new _(\"Validation failed, check status for details\", u(a))), s.promise) : void 0;\n };var f = n(3),\n p = r(f),\n d = (n(5), n(15)),\n y = r(d),\n g = n(2),\n b = (r(g), n(13)),\n v = r(b),\n _ = function (e) {\n function t(e, n) {\n i(this, t);var r = s(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));return r.name = r.constructor.name, r.status = n, r.message = e, r;\n }return o(t, e), t;\n }(Error);e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNAddChannelsToGroupOperation;\n }function s(e, t) {\n var n = t.channels,\n r = t.channelGroup,\n i = e.config;return r ? n && 0 !== n.length ? i.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing Channels\" : \"Missing Channel Group\";\n }function o(e, t) {\n var n = t.channelGroup;return \"/v1/channel-registration/sub-key/\" + e.config.subscribeKey + \"/channel-group/\" + d.default.encodeString(n);\n }function a(e) {\n return e.config.getTransactionTimeout();\n }function u() {\n return !0;\n }function c(e, t) {\n var n = t.channels;return { add: (void 0 === n ? [] : n).join(\",\") };\n }function l() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.getRequestTimeout = a, t.isAuthSupported = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNRemoveChannelsFromGroupOperation;\n }function s(e, t) {\n var n = t.channels,\n r = t.channelGroup,\n i = e.config;return r ? n && 0 !== n.length ? i.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing Channels\" : \"Missing Channel Group\";\n }function o(e, t) {\n var n = t.channelGroup;return \"/v1/channel-registration/sub-key/\" + e.config.subscribeKey + \"/channel-group/\" + d.default.encodeString(n);\n }function a(e) {\n return e.config.getTransactionTimeout();\n }function u() {\n return !0;\n }function c(e, t) {\n var n = t.channels;return { remove: (void 0 === n ? [] : n).join(\",\") };\n }function l() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.getRequestTimeout = a, t.isAuthSupported = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNRemoveGroupOperation;\n }function s(e, t) {\n var n = t.channelGroup,\n r = e.config;return n ? r.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing Channel Group\";\n }function o(e, t) {\n var n = t.channelGroup;return \"/v1/channel-registration/sub-key/\" + e.config.subscribeKey + \"/channel-group/\" + d.default.encodeString(n) + \"/remove\";\n }function a() {\n return !0;\n }function u(e) {\n return e.config.getTransactionTimeout();\n }function c() {\n return {};\n }function l() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.isAuthSupported = a, t.getRequestTimeout = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNChannelGroupsOperation;\n }function i(e) {\n if (!e.config.subscribeKey) return \"Missing Subscribe Key\";\n }function s(e) {\n return \"/v1/channel-registration/sub-key/\" + e.config.subscribeKey + \"/channel-group\";\n }function o(e) {\n return e.config.getTransactionTimeout();\n }function a() {\n return !0;\n }function u() {\n return {};\n }function c(e, t) {\n return { groups: t.payload.groups };\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.validateParams = i, t.getURL = s, t.getRequestTimeout = o, t.isAuthSupported = a, t.prepareParams = u, t.handleResponse = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(l);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNChannelsForGroupOperation;\n }function s(e, t) {\n var n = t.channelGroup,\n r = e.config;return n ? r.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing Channel Group\";\n }function o(e, t) {\n var n = t.channelGroup;return \"/v1/channel-registration/sub-key/\" + e.config.subscribeKey + \"/channel-group/\" + d.default.encodeString(n);\n }function a(e) {\n return e.config.getTransactionTimeout();\n }function u() {\n return !0;\n }function c() {\n return {};\n }function l(e, t) {\n return { channels: t.payload.channels };\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.getRequestTimeout = a, t.isAuthSupported = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNPushNotificationEnabledChannelsOperation;\n }function i(e, t) {\n var n = t.device,\n r = t.pushGateway,\n i = t.channels,\n s = e.config;return n ? r ? i && 0 !== i.length ? s.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing Channels\" : \"Missing GW Type (pushGateway: gcm or apns)\" : \"Missing Device ID (device)\";\n }function s(e, t) {\n var n = t.device;return \"/v1/push/sub-key/\" + e.config.subscribeKey + \"/devices/\" + n;\n }function o(e) {\n return e.config.getTransactionTimeout();\n }function a() {\n return !0;\n }function u(e, t) {\n var n = t.pushGateway,\n r = t.channels;return { type: n, add: (void 0 === r ? [] : r).join(\",\") };\n }function c() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.validateParams = i, t.getURL = s, t.getRequestTimeout = o, t.isAuthSupported = a, t.prepareParams = u, t.handleResponse = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(l);\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNPushNotificationEnabledChannelsOperation;\n }function i(e, t) {\n var n = t.device,\n r = t.pushGateway,\n i = t.channels,\n s = e.config;return n ? r ? i && 0 !== i.length ? s.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing Channels\" : \"Missing GW Type (pushGateway: gcm or apns)\" : \"Missing Device ID (device)\";\n }function s(e, t) {\n var n = t.device;return \"/v1/push/sub-key/\" + e.config.subscribeKey + \"/devices/\" + n;\n }function o(e) {\n return e.config.getTransactionTimeout();\n }function a() {\n return !0;\n }function u(e, t) {\n var n = t.pushGateway,\n r = t.channels;return { type: n, remove: (void 0 === r ? [] : r).join(\",\") };\n }function c() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.validateParams = i, t.getURL = s, t.getRequestTimeout = o, t.isAuthSupported = a, t.prepareParams = u, t.handleResponse = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(l);\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNPushNotificationEnabledChannelsOperation;\n }function i(e, t) {\n var n = t.device,\n r = t.pushGateway,\n i = e.config;return n ? r ? i.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing GW Type (pushGateway: gcm or apns)\" : \"Missing Device ID (device)\";\n }function s(e, t) {\n var n = t.device;return \"/v1/push/sub-key/\" + e.config.subscribeKey + \"/devices/\" + n;\n }function o(e) {\n return e.config.getTransactionTimeout();\n }function a() {\n return !0;\n }function u(e, t) {\n return { type: t.pushGateway };\n }function c(e, t) {\n return { channels: t };\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.validateParams = i, t.getURL = s, t.getRequestTimeout = o, t.isAuthSupported = a, t.prepareParams = u, t.handleResponse = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(l);\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNRemoveAllPushNotificationsOperation;\n }function i(e, t) {\n var n = t.device,\n r = t.pushGateway,\n i = e.config;return n ? r ? i.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing GW Type (pushGateway: gcm or apns)\" : \"Missing Device ID (device)\";\n }function s(e, t) {\n var n = t.device;return \"/v1/push/sub-key/\" + e.config.subscribeKey + \"/devices/\" + n + \"/remove\";\n }function o(e) {\n return e.config.getTransactionTimeout();\n }function a() {\n return !0;\n }function u(e, t) {\n return { type: t.pushGateway };\n }function c() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.validateParams = i, t.getURL = s, t.getRequestTimeout = o, t.isAuthSupported = a, t.prepareParams = u, t.handleResponse = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(l);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNUnsubscribeOperation;\n }function s(e) {\n if (!e.config.subscribeKey) return \"Missing Subscribe Key\";\n }function o(e, t) {\n var n = e.config,\n r = t.channels,\n i = void 0 === r ? [] : r,\n s = i.length > 0 ? i.join(\",\") : \",\";return \"/v2/presence/sub-key/\" + n.subscribeKey + \"/channel/\" + d.default.encodeString(s) + \"/leave\";\n }function a(e) {\n return e.config.getTransactionTimeout();\n }function u() {\n return !0;\n }function c(e, t) {\n var n = t.channelGroups,\n r = void 0 === n ? [] : n,\n i = {};return r.length > 0 && (i[\"channel-group\"] = r.join(\",\")), i;\n }function l() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.getRequestTimeout = a, t.isAuthSupported = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNWhereNowOperation;\n }function i(e) {\n if (!e.config.subscribeKey) return \"Missing Subscribe Key\";\n }function s(e, t) {\n var n = e.config,\n r = t.uuid,\n i = void 0 === r ? n.UUID : r;return \"/v2/presence/sub-key/\" + n.subscribeKey + \"/uuid/\" + i;\n }function o(e) {\n return e.config.getTransactionTimeout();\n }function a() {\n return !0;\n }function u() {\n return {};\n }function c(e, t) {\n return t.payload ? { channels: t.payload.channels } : { channels: [] };\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.validateParams = i, t.getURL = s, t.getRequestTimeout = o, t.isAuthSupported = a, t.prepareParams = u, t.handleResponse = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(l);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNHeartbeatOperation;\n }function s(e) {\n if (!e.config.subscribeKey) return \"Missing Subscribe Key\";\n }function o(e, t) {\n var n = e.config,\n r = t.channels,\n i = void 0 === r ? [] : r,\n s = i.length > 0 ? i.join(\",\") : \",\";return \"/v2/presence/sub-key/\" + n.subscribeKey + \"/channel/\" + d.default.encodeString(s) + \"/heartbeat\";\n }function a() {\n return !0;\n }function u(e) {\n return e.config.getTransactionTimeout();\n }function c(e, t) {\n var n = t.channelGroups,\n r = void 0 === n ? [] : n,\n i = t.state,\n s = void 0 === i ? {} : i,\n o = e.config,\n a = {};return r.length > 0 && (a[\"channel-group\"] = r.join(\",\")), a.state = JSON.stringify(s), a.heartbeat = o.getPresenceTimeout(), a;\n }function l() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.isAuthSupported = a, t.getRequestTimeout = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNGetStateOperation;\n }function s(e) {\n if (!e.config.subscribeKey) return \"Missing Subscribe Key\";\n }function o(e, t) {\n var n = e.config,\n r = t.uuid,\n i = void 0 === r ? n.UUID : r,\n s = t.channels,\n o = void 0 === s ? [] : s,\n a = o.length > 0 ? o.join(\",\") : \",\";return \"/v2/presence/sub-key/\" + n.subscribeKey + \"/channel/\" + d.default.encodeString(a) + \"/uuid/\" + i;\n }function a(e) {\n return e.config.getTransactionTimeout();\n }function u() {\n return !0;\n }function c(e, t) {\n var n = t.channelGroups,\n r = void 0 === n ? [] : n,\n i = {};return r.length > 0 && (i[\"channel-group\"] = r.join(\",\")), i;\n }function l(e, t, n) {\n var r = n.channels,\n i = void 0 === r ? [] : r,\n s = n.channelGroups,\n o = void 0 === s ? [] : s,\n a = {};return 1 === i.length && 0 === o.length ? a[i[0]] = t.payload : a = t.payload, { channels: a };\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.getRequestTimeout = a, t.isAuthSupported = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNSetStateOperation;\n }function s(e, t) {\n var n = e.config,\n r = t.state,\n i = t.channels,\n s = void 0 === i ? [] : i,\n o = t.channelGroups,\n a = void 0 === o ? [] : o;return r ? n.subscribeKey ? 0 === s.length && 0 === a.length ? \"Please provide a list of channels and/or channel-groups\" : void 0 : \"Missing Subscribe Key\" : \"Missing State\";\n }function o(e, t) {\n var n = e.config,\n r = t.channels,\n i = void 0 === r ? [] : r,\n s = i.length > 0 ? i.join(\",\") : \",\";return \"/v2/presence/sub-key/\" + n.subscribeKey + \"/channel/\" + d.default.encodeString(s) + \"/uuid/\" + n.UUID + \"/data\";\n }function a(e) {\n return e.config.getTransactionTimeout();\n }function u() {\n return !0;\n }function c(e, t) {\n var n = t.state,\n r = t.channelGroups,\n i = void 0 === r ? [] : r,\n s = {};return s.state = JSON.stringify(n), i.length > 0 && (s[\"channel-group\"] = i.join(\",\")), s;\n }function l(e, t) {\n return { state: t.payload };\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.getRequestTimeout = a, t.isAuthSupported = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNHereNowOperation;\n }function s(e) {\n if (!e.config.subscribeKey) return \"Missing Subscribe Key\";\n }function o(e, t) {\n var n = e.config,\n r = t.channels,\n i = void 0 === r ? [] : r,\n s = t.channelGroups,\n o = void 0 === s ? [] : s,\n a = \"/v2/presence/sub-key/\" + n.subscribeKey;if (i.length > 0 || o.length > 0) {\n var u = i.length > 0 ? i.join(\",\") : \",\";a += \"/channel/\" + d.default.encodeString(u);\n }return a;\n }function a(e) {\n return e.config.getTransactionTimeout();\n }function u() {\n return !0;\n }function c(e, t) {\n var n = t.channelGroups,\n r = void 0 === n ? [] : n,\n i = t.includeUUIDs,\n s = void 0 === i || i,\n o = t.includeState,\n a = void 0 !== o && o,\n u = {};return s || (u.disable_uuids = 1), a && (u.state = 1), r.length > 0 && (u[\"channel-group\"] = r.join(\",\")), u;\n }function l(e, t, n) {\n var r = n.channels,\n i = void 0 === r ? [] : r,\n s = n.channelGroups,\n o = void 0 === s ? [] : s,\n a = n.includeUUIDs,\n u = void 0 === a || a,\n c = n.includeState,\n l = void 0 !== c && c;return i.length > 1 || o.length > 0 || 0 === o.length && 0 === i.length ? function () {\n var e = {};return e.totalChannels = t.payload.total_channels, e.totalOccupancy = t.payload.total_occupancy, e.channels = {}, Object.keys(t.payload.channels).forEach(function (n) {\n var r = t.payload.channels[n],\n i = [];return e.channels[n] = { occupants: i, name: n, occupancy: r.occupancy }, u && r.uuids.forEach(function (e) {\n l ? i.push({ state: e.state, uuid: e.uuid }) : i.push({ state: null, uuid: e });\n }), e;\n }), e;\n }() : function () {\n var e = {},\n n = [];return e.totalChannels = 1, e.totalOccupancy = t.occupancy, e.channels = {}, e.channels[i[0]] = { occupants: n, name: i[0], occupancy: t.occupancy }, u && t.uuids && t.uuids.forEach(function (e) {\n l ? n.push({ state: e.state, uuid: e.uuid }) : n.push({ state: null, uuid: e });\n }), e;\n }();\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.getRequestTimeout = a, t.isAuthSupported = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNAccessManagerAudit;\n }function i(e) {\n if (!e.config.subscribeKey) return \"Missing Subscribe Key\";\n }function s(e) {\n return \"/v2/auth/audit/sub-key/\" + e.config.subscribeKey;\n }function o(e) {\n return e.config.getTransactionTimeout();\n }function a() {\n return !1;\n }function u(e, t) {\n var n = t.channel,\n r = t.channelGroup,\n i = t.authKeys,\n s = void 0 === i ? [] : i,\n o = {};return n && (o.channel = n), r && (o[\"channel-group\"] = r), s.length > 0 && (o.auth = s.join(\",\")), o;\n }function c(e, t) {\n return t.payload;\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.validateParams = i, t.getURL = s, t.getRequestTimeout = o, t.isAuthSupported = a, t.prepareParams = u, t.handleResponse = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(l);\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNAccessManagerGrant;\n }function i(e) {\n var t = e.config;return t.subscribeKey ? t.publishKey ? t.secretKey ? void 0 : \"Missing Secret Key\" : \"Missing Publish Key\" : \"Missing Subscribe Key\";\n }function s(e) {\n return \"/v2/auth/grant/sub-key/\" + e.config.subscribeKey;\n }function o(e) {\n return e.config.getTransactionTimeout();\n }function a() {\n return !1;\n }function u(e, t) {\n var n = t.channels,\n r = void 0 === n ? [] : n,\n i = t.channelGroups,\n s = void 0 === i ? [] : i,\n o = t.ttl,\n a = t.read,\n u = void 0 !== a && a,\n c = t.write,\n l = void 0 !== c && c,\n h = t.manage,\n f = void 0 !== h && h,\n p = t.authKeys,\n d = void 0 === p ? [] : p,\n y = {};return y.r = u ? \"1\" : \"0\", y.w = l ? \"1\" : \"0\", y.m = f ? \"1\" : \"0\", r.length > 0 && (y.channel = r.join(\",\")), s.length > 0 && (y[\"channel-group\"] = s.join(\",\")), d.length > 0 && (y.auth = d.join(\",\")), (o || 0 === o) && (y.ttl = o), y;\n }function c() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.validateParams = i, t.getURL = s, t.getRequestTimeout = o, t.isAuthSupported = a, t.prepareParams = u, t.handleResponse = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : {\n default: e };\n }(l);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i(e, t) {\n var n = e.crypto,\n r = e.config,\n i = JSON.stringify(t);return r.cipherKey && (i = n.encrypt(i), i = JSON.stringify(i)), i;\n }function s() {\n return b.default.PNPublishOperation;\n }function o(e, t) {\n var n = e.config,\n r = t.message;return t.channel ? r ? n.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing Message\" : \"Missing Channel\";\n }function a(e, t) {\n var n = t.sendByPost;return void 0 !== n && n;\n }function u(e, t) {\n var n = e.config,\n r = t.channel,\n s = t.message,\n o = i(e, s);return \"/publish/\" + n.publishKey + \"/\" + n.subscribeKey + \"/0/\" + _.default.encodeString(r) + \"/0/\" + _.default.encodeString(o);\n }function c(e, t) {\n var n = e.config,\n r = t.channel;return \"/publish/\" + n.publishKey + \"/\" + n.subscribeKey + \"/0/\" + _.default.encodeString(r) + \"/0\";\n }function l(e) {\n return e.config.getTransactionTimeout();\n }function h() {\n return !0;\n }function f(e, t) {\n return i(e, t.message);\n }function p(e, t) {\n var n = t.meta,\n r = t.replicate,\n i = void 0 === r || r,\n s = t.storeInHistory,\n o = t.ttl,\n a = {};return null != s && (a.store = s ? \"1\" : \"0\"), o && (a.ttl = o), !1 === i && (a.norep = \"true\"), n && \"object\" === (void 0 === n ? \"undefined\" : y(n)) && (a.meta = JSON.stringify(n)), a;\n }function d(e, t) {\n return { timetoken: t[2] };\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var y = \"function\" == typeof Symbol && \"symbol\" == _typeof(Symbol.iterator) ? function (e) {\n return typeof e === \"undefined\" ? \"undefined\" : _typeof(e);\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e === \"undefined\" ? \"undefined\" : _typeof(e);\n };t.getOperation = s, t.validateParams = o, t.usePost = a, t.getURL = u, t.postURL = c, t.getRequestTimeout = l, t.isAuthSupported = h, t.postPayload = f, t.prepareParams = p, t.handleResponse = d;var g = (n(5), n(13)),\n b = r(g),\n v = n(15),\n _ = r(v);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i(e, t) {\n var n = e.config,\n r = e.crypto;if (!n.cipherKey) return t;try {\n return r.decrypt(t);\n } catch (e) {\n return t;\n }\n }function s() {\n return p.default.PNHistoryOperation;\n }function o(e, t) {\n var n = t.channel,\n r = e.config;return n ? r.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing channel\";\n }function a(e, t) {\n var n = t.channel;return \"/v2/history/sub-key/\" + e.config.subscribeKey + \"/channel/\" + y.default.encodeString(n);\n }function u(e) {\n return e.config.getTransactionTimeout();\n }function c() {\n return !0;\n }function l(e, t) {\n var n = t.start,\n r = t.end,\n i = t.reverse,\n s = t.count,\n o = void 0 === s ? 100 : s,\n a = t.stringifiedTimeToken,\n u = void 0 !== a && a,\n c = { include_token: \"true\" };return c.count = o, n && (c.start = n), r && (c.end = r), u && (c.string_message_token = \"true\"), null != i && (c.reverse = i.toString()), c;\n }function h(e, t) {\n var n = { messages: [], startTimeToken: t[1], endTimeToken: t[2] };return t[0].forEach(function (t) {\n var r = { timetoken: t.timetoken, entry: i(e, t.message) };n.messages.push(r);\n }), n;\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = s, t.validateParams = o, t.getURL = a, t.getRequestTimeout = u, t.isAuthSupported = c, t.prepareParams = l, t.handleResponse = h;var f = (n(5), n(13)),\n p = r(f),\n d = n(15),\n y = r(d);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return p.default.PNDeleteMessagesOperation;\n }function s(e, t) {\n var n = t.channel,\n r = e.config;return n ? r.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing channel\";\n }function o() {\n return !0;\n }function a(e, t) {\n var n = t.channel;return \"/v3/history/sub-key/\" + e.config.subscribeKey + \"/channel/\" + y.default.encodeString(n);\n }function u(e) {\n return e.config.getTransactionTimeout();\n }function c() {\n return !0;\n }function l(e, t) {\n var n = t.start,\n r = t.end,\n i = {};return n && (i.start = n), r && (i.end = r), i;\n }function h(e, t) {\n return t.payload;\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.useDelete = o, t.getURL = a, t.getRequestTimeout = u, t.isAuthSupported = c, t.prepareParams = l, t.handleResponse = h;var f = (n(5), n(13)),\n p = r(f),\n d = n(15),\n y = r(d);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i(e, t) {\n var n = e.config,\n r = e.crypto;if (!n.cipherKey) return t;try {\n return r.decrypt(t);\n } catch (e) {\n return t;\n }\n }function s() {\n return p.default.PNFetchMessagesOperation;\n }function o(e, t) {\n var n = t.channels,\n r = e.config;return n && 0 !== n.length ? r.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing channels\";\n }function a(e, t) {\n var n = t.channels,\n r = void 0 === n ? [] : n,\n i = e.config,\n s = r.length > 0 ? r.join(\",\") : \",\";return \"/v3/history/sub-key/\" + i.subscribeKey + \"/channel/\" + y.default.encodeString(s);\n }function u(e) {\n return e.config.getTransactionTimeout();\n }function c() {\n return !0;\n }function l(e, t) {\n var n = t.start,\n r = t.end,\n i = t.count,\n s = {};return i && (s.max = i), n && (s.start = n), r && (s.end = r), s;\n }function h(e, t) {\n var n = { channels: {} };return Object.keys(t.channels || {}).forEach(function (r) {\n n.channels[r] = [], (t.channels[r] || []).forEach(function (t) {\n var s = {};s.channel = r, s.subscription = null, s.timetoken = t.timetoken, s.message = i(e, t.message), n.channels[r].push(s);\n });\n }), n;\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = s, t.validateParams = o, t.getURL = a, t.getRequestTimeout = u, t.isAuthSupported = c, t.prepareParams = l, t.handleResponse = h;var f = (n(5), n(13)),\n p = r(f),\n d = n(15),\n y = r(d);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNSubscribeOperation;\n }function s(e) {\n if (!e.config.subscribeKey) return \"Missing Subscribe Key\";\n }function o(e, t) {\n var n = e.config,\n r = t.channels,\n i = void 0 === r ? [] : r,\n s = i.length > 0 ? i.join(\",\") : \",\";return \"/v2/subscribe/\" + n.subscribeKey + \"/\" + d.default.encodeString(s) + \"/0\";\n }function a(e) {\n return e.config.getSubscribeTimeout();\n }function u() {\n return !0;\n }function c(e, t) {\n var n = e.config,\n r = t.channelGroups,\n i = void 0 === r ? [] : r,\n s = t.timetoken,\n o = t.filterExpression,\n a = t.region,\n u = { heartbeat: n.getPresenceTimeout() };return i.length > 0 && (u[\"channel-group\"] = i.join(\",\")), o && o.length > 0 && (u[\"filter-expr\"] = o), s && (u.tt = s), a && (u.tr = a), u;\n }function l(e, t) {\n var n = [];t.m.forEach(function (e) {\n var t = { publishTimetoken: e.p.t, region: e.p.r },\n r = { shard: parseInt(e.a, 10), subscriptionMatch: e.b, channel: e.c, payload: e.d, flags: e.f, issuingClientId: e.i, subscribeKey: e.k, originationTimetoken: e.o, userMetadata: e.u, publishMetaData: t };n.push(r);\n });var r = { timetoken: t.t.t, region: t.t.r };return { messages: n, metadata: r };\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.getRequestTimeout = a, t.isAuthSupported = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var s = function () {\n function e(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }return function (t, n, r) {\n return n && e(t.prototype, n), r && e(t, r), t;\n };\n }(),\n o = n(2),\n a = (r(o), n(10)),\n u = r(a),\n c = (n(5), function () {\n function e(t) {\n var n = this;i(this, e), this._modules = {}, Object.keys(t).forEach(function (e) {\n n._modules[e] = t[e].bind(n);\n });\n }return s(e, [{ key: \"init\", value: function value(e) {\n this._config = e, this._maxSubDomain = 20, this._currentSubDomain = Math.floor(Math.random() * this._maxSubDomain), this._providedFQDN = (this._config.secure ? \"https://\" : \"http://\") + this._config.origin, this._coreParams = {}, this.shiftStandardOrigin();\n } }, { key: \"nextOrigin\", value: function value() {\n if (-1 === this._providedFQDN.indexOf(\"pubsub.\")) return this._providedFQDN;var e = void 0;return this._currentSubDomain = this._currentSubDomain + 1, this._currentSubDomain >= this._maxSubDomain && (this._currentSubDomain = 1), e = this._currentSubDomain.toString(), this._providedFQDN.replace(\"pubsub\", \"ps\" + e);\n } }, { key: \"hasModule\", value: function value(e) {\n return e in this._modules;\n } }, { key: \"shiftStandardOrigin\", value: function value() {\n var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];return this._standardOrigin = this.nextOrigin(e), this._standardOrigin;\n } }, { key: \"getStandardOrigin\", value: function value() {\n return this._standardOrigin;\n } }, { key: \"POST\", value: function value(e, t, n, r) {\n return this._modules.post(e, t, n, r);\n } }, { key: \"GET\", value: function value(e, t, n) {\n return this._modules.get(e, t, n);\n } }, { key: \"DELETE\", value: function value(e, t, n) {\n return this._modules.del(e, t, n);\n } }, { key: \"_detectErrorCategory\", value: function value(e) {\n if (\"ENOTFOUND\" === e.code) return u.default.PNNetworkIssuesCategory;if (\"ECONNREFUSED\" === e.code) return u.default.PNNetworkIssuesCategory;if (\"ECONNRESET\" === e.code) return u.default.PNNetworkIssuesCategory;if (\"EAI_AGAIN\" === e.code) return u.default.PNNetworkIssuesCategory;if (0 === e.status || e.hasOwnProperty(\"status\") && void 0 === e.status) return u.default.PNNetworkIssuesCategory;if (e.timeout) return u.default.PNTimeoutCategory;if (e.response) {\n if (e.response.badRequest) return u.default.PNBadRequestCategory;if (e.response.forbidden) return u.default.PNAccessDeniedCategory;\n }return u.default.PNUnknownCategory;\n } }]), e;\n }());t.default = c, e.exports = t.default;\n }, function (e, t) {\n \"use strict\";\n Object.defineProperty(t, \"__esModule\", { value: !0 }), t.default = { get: function get(e) {\n try {\n return localStorage.getItem(e);\n } catch (e) {\n return null;\n }\n }, set: function set(e, t) {\n try {\n return localStorage.setItem(e, t);\n } catch (e) {\n return null;\n }\n } }, e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n var t = new Date().getTime(),\n n = new Date().toISOString(),\n r = function () {\n return console && console.log ? console : window && window.console && window.console.log ? window.console : console;\n }();r.log(\"<<<<<\"), r.log(\"[\" + n + \"]\", \"\\n\", e.url, \"\\n\", e.qs), r.log(\"-----\"), e.on(\"response\", function (n) {\n var i = new Date().getTime(),\n s = i - t,\n o = new Date().toISOString();r.log(\">>>>>>\"), r.log(\"[\" + o + \" / \" + s + \"]\", \"\\n\", e.url, \"\\n\", e.qs, \"\\n\", n.text), r.log(\"-----\");\n });\n }function i(e, t, n) {\n var i = this;return this._config.logVerbosity && (e = e.use(r)), this._config.proxy && this._modules.proxy && (e = this._modules.proxy.call(this, e)), this._config.keepAlive && this._modules.keepAlive && (e = this._modules.keepAlive(e)), e.timeout(t.timeout).end(function (e, r) {\n var s = {};if (s.error = null !== e, s.operation = t.operation, r && r.status && (s.statusCode = r.status), e) return s.errorData = e, s.category = i._detectErrorCategory(e), n(s, null);var o = JSON.parse(r.text);return o.error && 1 === o.error && o.status && o.message && o.service ? (s.errorData = o, s.statusCode = o.status, s.error = !0, s.category = i._detectErrorCategory(s), n(s, null)) : n(s, o);\n });\n }function s(e, t, n) {\n var r = c.default.get(this.getStandardOrigin() + t.url).query(e);return i.call(this, r, t, n);\n }function o(e, t, n, r) {\n var s = c.default.post(this.getStandardOrigin() + n.url).query(e).send(t);return i.call(this, s, n, r);\n }function a(e, t, n) {\n var r = c.default.delete(this.getStandardOrigin() + t.url).query(e);return i.call(this, r, t, n);\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.get = s, t.post = o, t.del = a;var u = n(42),\n c = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(u);n(5);\n }, function (e, t, n) {\n function r() {}function i(e) {\n if (!y(e)) return e;var t = [];for (var n in e) {\n s(t, n, e[n]);\n }return t.join(\"&\");\n }function s(e, t, n) {\n if (null != n) {\n if (Array.isArray(n)) n.forEach(function (n) {\n s(e, t, n);\n });else if (y(n)) for (var r in n) {\n s(e, t + \"[\" + r + \"]\", n[r]);\n } else e.push(encodeURIComponent(t) + \"=\" + encodeURIComponent(n));\n } else null === n && e.push(encodeURIComponent(t));\n }function o(e) {\n for (var t, n, r = {}, i = e.split(\"&\"), s = 0, o = i.length; s < o; ++s) {\n t = i[s], n = t.indexOf(\"=\"), -1 == n ? r[decodeURIComponent(t)] = \"\" : r[decodeURIComponent(t.slice(0, n))] = decodeURIComponent(t.slice(n + 1));\n }return r;\n }function a(e) {\n for (var t, n, r, i, s = e.split(/\\r?\\n/), o = {}, a = 0, u = s.length; a < u; ++a) {\n n = s[a], -1 !== (t = n.indexOf(\":\")) && (r = n.slice(0, t).toLowerCase(), i = _(n.slice(t + 1)), o[r] = i);\n }return o;\n }function u(e) {\n return (/[\\/+]json($|[^-\\w])/.test(e)\n );\n }function c(e) {\n this.req = e, this.xhr = this.req.xhr, this.text = \"HEAD\" != this.req.method && (\"\" === this.xhr.responseType || \"text\" === this.xhr.responseType) || void 0 === this.xhr.responseType ? this.xhr.responseText : null, this.statusText = this.req.xhr.statusText;var t = this.xhr.status;1223 === t && (t = 204), this._setStatusProperties(t), this.header = this.headers = a(this.xhr.getAllResponseHeaders()), this.header[\"content-type\"] = this.xhr.getResponseHeader(\"content-type\"), this._setHeaderProperties(this.header), null === this.text && e._responseType ? this.body = this.xhr.response : this.body = \"HEAD\" != this.req.method ? this._parseBody(this.text ? this.text : this.xhr.response) : null;\n }function l(e, t) {\n var n = this;this._query = this._query || [], this.method = e, this.url = t, this.header = {}, this._header = {}, this.on(\"end\", function () {\n var e = null,\n t = null;try {\n t = new c(n);\n } catch (t) {\n return e = new Error(\"Parser is unable to parse the response\"), e.parse = !0, e.original = t, n.xhr ? (e.rawResponse = void 0 === n.xhr.responseType ? n.xhr.responseText : n.xhr.response, e.status = n.xhr.status ? n.xhr.status : null, e.statusCode = e.status) : (e.rawResponse = null, e.status = null), n.callback(e);\n }n.emit(\"response\", t);var r;try {\n n._isResponseOK(t) || (r = new Error(t.statusText || \"Unsuccessful HTTP response\"));\n } catch (e) {\n r = e;\n }r ? (r.original = e, r.response = t, r.status = t.status, n.callback(r, t)) : n.callback(null, t);\n });\n }function h(e, t, n) {\n var r = v(\"DELETE\", e);return \"function\" == typeof t && (n = t, t = null), t && r.send(t), n && r.end(n), r;\n }var f;\"undefined\" != typeof window ? f = window : \"undefined\" != typeof self ? f = self : (console.warn(\"Using browser-only version of superagent in non-browser environment\"), f = this);var p = n(43),\n d = n(44),\n y = n(45),\n g = n(46),\n b = n(48),\n v = t = e.exports = function (e, n) {\n return \"function\" == typeof n ? new t.Request(\"GET\", e).end(n) : 1 == arguments.length ? new t.Request(\"GET\", e) : new t.Request(e, n);\n };t.Request = l, v.getXHR = function () {\n if (!(!f.XMLHttpRequest || f.location && \"file:\" == f.location.protocol && f.ActiveXObject)) return new XMLHttpRequest();try {\n return new ActiveXObject(\"Microsoft.XMLHTTP\");\n } catch (e) {}try {\n return new ActiveXObject(\"Msxml2.XMLHTTP.6.0\");\n } catch (e) {}try {\n return new ActiveXObject(\"Msxml2.XMLHTTP.3.0\");\n } catch (e) {}try {\n return new ActiveXObject(\"Msxml2.XMLHTTP\");\n } catch (e) {}throw Error(\"Browser-only version of superagent could not find XHR\");\n };var _ = \"\".trim ? function (e) {\n return e.trim();\n } : function (e) {\n return e.replace(/(^\\s*|\\s*$)/g, \"\");\n };v.serializeObject = i, v.parseString = o, v.types = { html: \"text/html\", json: \"application/json\", xml: \"text/xml\", urlencoded: \"application/x-www-form-urlencoded\", form: \"application/x-www-form-urlencoded\", \"form-data\": \"application/x-www-form-urlencoded\" }, v.serialize = { \"application/x-www-form-urlencoded\": i, \"application/json\": JSON.stringify }, v.parse = { \"application/x-www-form-urlencoded\": o, \"application/json\": JSON.parse }, g(c.prototype), c.prototype._parseBody = function (e) {\n var t = v.parse[this.type];return this.req._parser ? this.req._parser(this, e) : (!t && u(this.type) && (t = v.parse[\"application/json\"]), t && e && (e.length || e instanceof Object) ? t(e) : null);\n }, c.prototype.toError = function () {\n var e = this.req,\n t = e.method,\n n = e.url,\n r = \"cannot \" + t + \" \" + n + \" (\" + this.status + \")\",\n i = new Error(r);return i.status = this.status, i.method = t, i.url = n, i;\n }, v.Response = c, p(l.prototype), d(l.prototype), l.prototype.type = function (e) {\n return this.set(\"Content-Type\", v.types[e] || e), this;\n }, l.prototype.accept = function (e) {\n return this.set(\"Accept\", v.types[e] || e), this;\n }, l.prototype.auth = function (e, t, n) {\n 1 === arguments.length && (t = \"\"), \"object\" == (typeof t === \"undefined\" ? \"undefined\" : _typeof(t)) && null !== t && (n = t, t = \"\"), n || (n = { type: \"function\" == typeof btoa ? \"basic\" : \"auto\" });var r = function r(e) {\n if (\"function\" == typeof btoa) return btoa(e);throw new Error(\"Cannot use basic auth, btoa is not a function\");\n };return this._auth(e, t, n, r);\n }, l.prototype.query = function (e) {\n return \"string\" != typeof e && (e = i(e)), e && this._query.push(e), this;\n }, l.prototype.attach = function (e, t, n) {\n if (t) {\n if (this._data) throw Error(\"superagent can't mix .send() and .attach()\");this._getFormData().append(e, t, n || t.name);\n }return this;\n }, l.prototype._getFormData = function () {\n return this._formData || (this._formData = new f.FormData()), this._formData;\n }, l.prototype.callback = function (e, t) {\n if (this._shouldRetry(e, t)) return this._retry();var n = this._callback;this.clearTimeout(), e && (this._maxRetries && (e.retries = this._retries - 1), this.emit(\"error\", e)), n(e, t);\n }, l.prototype.crossDomainError = function () {\n var e = new Error(\"Request has been terminated\\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.\");e.crossDomain = !0, e.status = this.status, e.method = this.method, e.url = this.url, this.callback(e);\n }, l.prototype.buffer = l.prototype.ca = l.prototype.agent = function () {\n return console.warn(\"This is not supported in browser version of superagent\"), this;\n }, l.prototype.pipe = l.prototype.write = function () {\n throw Error(\"Streaming is not supported in browser version of superagent\");\n }, l.prototype._isHost = function (e) {\n return e && \"object\" == (typeof e === \"undefined\" ? \"undefined\" : _typeof(e)) && !Array.isArray(e) && \"[object Object]\" !== Object.prototype.toString.call(e);\n }, l.prototype.end = function (e) {\n return this._endCalled && console.warn(\"Warning: .end() was called twice. This is not supported in superagent\"), this._endCalled = !0, this._callback = e || r, this._finalizeQueryString(), this._end();\n }, l.prototype._end = function () {\n var e = this,\n t = this.xhr = v.getXHR(),\n n = this._formData || this._data;this._setTimeouts(), t.onreadystatechange = function () {\n var n = t.readyState;if (n >= 2 && e._responseTimeoutTimer && clearTimeout(e._responseTimeoutTimer), 4 == n) {\n var r;try {\n r = t.status;\n } catch (e) {\n r = 0;\n }if (!r) {\n if (e.timedout || e._aborted) return;return e.crossDomainError();\n }e.emit(\"end\");\n }\n };var r = function r(t, n) {\n n.total > 0 && (n.percent = n.loaded / n.total * 100), n.direction = t, e.emit(\"progress\", n);\n };if (this.hasListeners(\"progress\")) try {\n t.onprogress = r.bind(null, \"download\"), t.upload && (t.upload.onprogress = r.bind(null, \"upload\"));\n } catch (e) {}try {\n this.username && this.password ? t.open(this.method, this.url, !0, this.username, this.password) : t.open(this.method, this.url, !0);\n } catch (e) {\n return this.callback(e);\n }if (this._withCredentials && (t.withCredentials = !0), !this._formData && \"GET\" != this.method && \"HEAD\" != this.method && \"string\" != typeof n && !this._isHost(n)) {\n var i = this._header[\"content-type\"],\n s = this._serializer || v.serialize[i ? i.split(\";\")[0] : \"\"];!s && u(i) && (s = v.serialize[\"application/json\"]), s && (n = s(n));\n }for (var o in this.header) {\n null != this.header[o] && this.header.hasOwnProperty(o) && t.setRequestHeader(o, this.header[o]);\n }return this._responseType && (t.responseType = this._responseType), this.emit(\"request\", this), t.send(void 0 !== n ? n : null), this;\n }, v.agent = function () {\n return new b();\n }, [\"GET\", \"POST\", \"OPTIONS\", \"PATCH\", \"PUT\", \"DELETE\"].forEach(function (e) {\n b.prototype[e.toLowerCase()] = function (t, n) {\n var r = new v.Request(e, t);return this._setDefaults(r), n && r.end(n), r;\n };\n }), b.prototype.del = b.prototype.delete, v.get = function (e, t, n) {\n var r = v(\"GET\", e);return \"function\" == typeof t && (n = t, t = null), t && r.query(t), n && r.end(n), r;\n }, v.head = function (e, t, n) {\n var r = v(\"HEAD\", e);return \"function\" == typeof t && (n = t, t = null), t && r.query(t), n && r.end(n), r;\n }, v.options = function (e, t, n) {\n var r = v(\"OPTIONS\", e);return \"function\" == typeof t && (n = t, t = null), t && r.send(t), n && r.end(n), r;\n }, v.del = h, v.delete = h, v.patch = function (e, t, n) {\n var r = v(\"PATCH\", e);return \"function\" == typeof t && (n = t, t = null), t && r.send(t), n && r.end(n), r;\n }, v.post = function (e, t, n) {\n var r = v(\"POST\", e);return \"function\" == typeof t && (n = t, t = null), t && r.send(t), n && r.end(n), r;\n }, v.put = function (e, t, n) {\n var r = v(\"PUT\", e);return \"function\" == typeof t && (n = t, t = null), t && r.send(t), n && r.end(n), r;\n };\n }, function (e, t, n) {\n function r(e) {\n if (e) return i(e);\n }function i(e) {\n for (var t in r.prototype) {\n e[t] = r.prototype[t];\n }return e;\n }e.exports = r, r.prototype.on = r.prototype.addEventListener = function (e, t) {\n return this._callbacks = this._callbacks || {}, (this._callbacks[\"$\" + e] = this._callbacks[\"$\" + e] || []).push(t), this;\n }, r.prototype.once = function (e, t) {\n function n() {\n this.off(e, n), t.apply(this, arguments);\n }return n.fn = t, this.on(e, n), this;\n }, r.prototype.off = r.prototype.removeListener = r.prototype.removeAllListeners = r.prototype.removeEventListener = function (e, t) {\n if (this._callbacks = this._callbacks || {}, 0 == arguments.length) return this._callbacks = {}, this;var n = this._callbacks[\"$\" + e];if (!n) return this;if (1 == arguments.length) return delete this._callbacks[\"$\" + e], this;for (var r, i = 0; i < n.length; i++) {\n if ((r = n[i]) === t || r.fn === t) {\n n.splice(i, 1);break;\n }\n }return this;\n }, r.prototype.emit = function (e) {\n this._callbacks = this._callbacks || {};var t = [].slice.call(arguments, 1),\n n = this._callbacks[\"$\" + e];if (n) {\n n = n.slice(0);for (var r = 0, i = n.length; r < i; ++r) {\n n[r].apply(this, t);\n }\n }return this;\n }, r.prototype.listeners = function (e) {\n return this._callbacks = this._callbacks || {}, this._callbacks[\"$\" + e] || [];\n }, r.prototype.hasListeners = function (e) {\n return !!this.listeners(e).length;\n };\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n if (e) return i(e);\n }function i(e) {\n for (var t in r.prototype) {\n e[t] = r.prototype[t];\n }return e;\n }var s = n(45);e.exports = r, r.prototype.clearTimeout = function () {\n return clearTimeout(this._timer), clearTimeout(this._responseTimeoutTimer), delete this._timer, delete this._responseTimeoutTimer, this;\n }, r.prototype.parse = function (e) {\n return this._parser = e, this;\n }, r.prototype.responseType = function (e) {\n return this._responseType = e, this;\n }, r.prototype.serialize = function (e) {\n return this._serializer = e, this;\n }, r.prototype.timeout = function (e) {\n if (!e || \"object\" != (typeof e === \"undefined\" ? \"undefined\" : _typeof(e))) return this._timeout = e, this._responseTimeout = 0, this;for (var t in e) {\n switch (t) {case \"deadline\":\n this._timeout = e.deadline;break;case \"response\":\n this._responseTimeout = e.response;break;default:\n console.warn(\"Unknown timeout option\", t);}\n }return this;\n }, r.prototype.retry = function (e, t) {\n return 0 !== arguments.length && !0 !== e || (e = 1), e <= 0 && (e = 0), this._maxRetries = e, this._retries = 0, this._retryCallback = t, this;\n };var o = [\"ECONNRESET\", \"ETIMEDOUT\", \"EADDRINFO\", \"ESOCKETTIMEDOUT\"];r.prototype._shouldRetry = function (e, t) {\n if (!this._maxRetries || this._retries++ >= this._maxRetries) return !1;if (this._retryCallback) try {\n var n = this._retryCallback(e, t);if (!0 === n) return !0;if (!1 === n) return !1;\n } catch (e) {\n console.error(e);\n }if (t && t.status && t.status >= 500 && 501 != t.status) return !0;if (e) {\n if (e.code && ~o.indexOf(e.code)) return !0;if (e.timeout && \"ECONNABORTED\" == e.code) return !0;if (e.crossDomain) return !0;\n }return !1;\n }, r.prototype._retry = function () {\n return this.clearTimeout(), this.req && (this.req = null, this.req = this.request()), this._aborted = !1, this.timedout = !1, this._end();\n }, r.prototype.then = function (e, t) {\n if (!this._fullfilledPromise) {\n var n = this;this._endCalled && console.warn(\"Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises\"), this._fullfilledPromise = new Promise(function (e, t) {\n n.end(function (n, r) {\n n ? t(n) : e(r);\n });\n });\n }return this._fullfilledPromise.then(e, t);\n }, r.prototype.catch = function (e) {\n return this.then(void 0, e);\n }, r.prototype.use = function (e) {\n return e(this), this;\n }, r.prototype.ok = function (e) {\n if (\"function\" != typeof e) throw Error(\"Callback required\");return this._okCallback = e, this;\n }, r.prototype._isResponseOK = function (e) {\n return !!e && (this._okCallback ? this._okCallback(e) : e.status >= 200 && e.status < 300);\n }, r.prototype.get = function (e) {\n return this._header[e.toLowerCase()];\n }, r.prototype.getHeader = r.prototype.get, r.prototype.set = function (e, t) {\n if (s(e)) {\n for (var n in e) {\n this.set(n, e[n]);\n }return this;\n }return this._header[e.toLowerCase()] = t, this.header[e] = t, this;\n }, r.prototype.unset = function (e) {\n return delete this._header[e.toLowerCase()], delete this.header[e], this;\n }, r.prototype.field = function (e, t) {\n if (null === e || void 0 === e) throw new Error(\".field(name, val) name can not be empty\");if (this._data && console.error(\".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()\"), s(e)) {\n for (var n in e) {\n this.field(n, e[n]);\n }return this;\n }if (Array.isArray(t)) {\n for (var r in t) {\n this.field(e, t[r]);\n }return this;\n }if (null === t || void 0 === t) throw new Error(\".field(name, val) val can not be empty\");return \"boolean\" == typeof t && (t = \"\" + t), this._getFormData().append(e, t), this;\n }, r.prototype.abort = function () {\n return this._aborted ? this : (this._aborted = !0, this.xhr && this.xhr.abort(), this.req && this.req.abort(), this.clearTimeout(), this.emit(\"abort\"), this);\n }, r.prototype._auth = function (e, t, n, r) {\n switch (n.type) {case \"basic\":\n this.set(\"Authorization\", \"Basic \" + r(e + \":\" + t));break;case \"auto\":\n this.username = e, this.password = t;break;case \"bearer\":\n this.set(\"Authorization\", \"Bearer \" + e);}return this;\n }, r.prototype.withCredentials = function (e) {\n return void 0 == e && (e = !0), this._withCredentials = e, this;\n }, r.prototype.redirects = function (e) {\n return this._maxRedirects = e, this;\n }, r.prototype.maxResponseSize = function (e) {\n if (\"number\" != typeof e) throw TypeError(\"Invalid argument\");return this._maxResponseSize = e, this;\n }, r.prototype.toJSON = function () {\n return { method: this.method, url: this.url, data: this._data, headers: this._header };\n }, r.prototype.send = function (e) {\n var t = s(e),\n n = this._header[\"content-type\"];if (this._formData && console.error(\".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()\"), t && !this._data) Array.isArray(e) ? this._data = [] : this._isHost(e) || (this._data = {});else if (e && this._data && this._isHost(this._data)) throw Error(\"Can't merge these send calls\");if (t && s(this._data)) for (var r in e) {\n this._data[r] = e[r];\n } else \"string\" == typeof e ? (n || this.type(\"form\"), n = this._header[\"content-type\"], this._data = \"application/x-www-form-urlencoded\" == n ? this._data ? this._data + \"&\" + e : e : (this._data || \"\") + e) : this._data = e;return !t || this._isHost(e) ? this : (n || this.type(\"json\"), this);\n }, r.prototype.sortQuery = function (e) {\n return this._sort = void 0 === e || e, this;\n }, r.prototype._finalizeQueryString = function () {\n var e = this._query.join(\"&\");if (e && (this.url += (this.url.indexOf(\"?\") >= 0 ? \"&\" : \"?\") + e), this._query.length = 0, this._sort) {\n var t = this.url.indexOf(\"?\");if (t >= 0) {\n var n = this.url.substring(t + 1).split(\"&\");\"function\" == typeof this._sort ? n.sort(this._sort) : n.sort(), this.url = this.url.substring(0, t) + \"?\" + n.join(\"&\");\n }\n }\n }, r.prototype._appendQueryString = function () {\n console.trace(\"Unsupported\");\n }, r.prototype._timeoutError = function (e, t, n) {\n if (!this._aborted) {\n var r = new Error(e + t + \"ms exceeded\");r.timeout = t, r.code = \"ECONNABORTED\", r.errno = n, this.timedout = !0, this.abort(), this.callback(r);\n }\n }, r.prototype._setTimeouts = function () {\n var e = this;this._timeout && !this._timer && (this._timer = setTimeout(function () {\n e._timeoutError(\"Timeout of \", e._timeout, \"ETIME\");\n }, this._timeout)), this._responseTimeout && !this._responseTimeoutTimer && (this._responseTimeoutTimer = setTimeout(function () {\n e._timeoutError(\"Response timeout of \", e._responseTimeout, \"ETIMEDOUT\");\n }, this._responseTimeout));\n };\n }, function (e, t) {\n \"use strict\";\n function n(e) {\n return null !== e && \"object\" == (typeof e === \"undefined\" ? \"undefined\" : _typeof(e));\n }e.exports = n;\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n if (e) return i(e);\n }function i(e) {\n for (var t in r.prototype) {\n e[t] = r.prototype[t];\n }return e;\n }var s = n(47);e.exports = r, r.prototype.get = function (e) {\n return this.header[e.toLowerCase()];\n }, r.prototype._setHeaderProperties = function (e) {\n var t = e[\"content-type\"] || \"\";this.type = s.type(t);var n = s.params(t);for (var r in n) {\n this[r] = n[r];\n }this.links = {};try {\n e.link && (this.links = s.parseLinks(e.link));\n } catch (e) {}\n }, r.prototype._setStatusProperties = function (e) {\n var t = e / 100 | 0;this.status = this.statusCode = e, this.statusType = t, this.info = 1 == t, this.ok = 2 == t, this.redirect = 3 == t, this.clientError = 4 == t, this.serverError = 5 == t, this.error = (4 == t || 5 == t) && this.toError(), this.accepted = 202 == e, this.noContent = 204 == e, this.badRequest = 400 == e, this.unauthorized = 401 == e, this.notAcceptable = 406 == e, this.forbidden = 403 == e, this.notFound = 404 == e;\n };\n }, function (e, t) {\n \"use strict\";\n t.type = function (e) {\n return e.split(/ *; */).shift();\n }, t.params = function (e) {\n return e.split(/ *; */).reduce(function (e, t) {\n var n = t.split(/ *= */),\n r = n.shift(),\n i = n.shift();return r && i && (e[r] = i), e;\n }, {});\n }, t.parseLinks = function (e) {\n return e.split(/ *, */).reduce(function (e, t) {\n var n = t.split(/ *; */),\n r = n[0].slice(1, -1);return e[n[1].split(/ *= */)[1].slice(1, -1)] = r, e;\n }, {});\n }, t.cleanHeader = function (e, t) {\n return delete e[\"content-type\"], delete e[\"content-length\"], delete e[\"transfer-encoding\"], delete e.host, t && (delete e.authorization, delete e.cookie), e;\n };\n }, function (e, t) {\n function n() {\n this._defaults = [];\n }[\"use\", \"on\", \"once\", \"set\", \"query\", \"type\", \"accept\", \"auth\", \"withCredentials\", \"sortQuery\", \"retry\", \"ok\", \"redirects\", \"timeout\", \"buffer\", \"serialize\", \"parse\", \"ca\", \"key\", \"pfx\", \"cert\"].forEach(function (e) {\n n.prototype[e] = function () {\n return this._defaults.push({ fn: e, arguments: arguments }), this;\n };\n }), n.prototype._setDefaults = function (e) {\n this._defaults.forEach(function (t) {\n e[t.fn].apply(e, t.arguments);\n });\n }, e.exports = n;\n }]);\n});\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)(module)))\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports) {\n\nmodule.exports = {\"author\":\"PubNub\",\"name\":\"chat-engine\",\"version\":\"0.9.5\",\"description\":\"ChatEngine\",\"main\":\"dist/chat-engine.js\",\"scripts\":{\"deploy\":\"gulp; npm publish;\",\"docs\":\"jsdoc src/index.js -c jsdoc.json\"},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/pubnub/chat-engine.git\"},\"keywords\":[\"pubnub\",\"chat\",\"sdk\",\"realtime\"],\"bugs\":{\"url\":\"https://github.com/pubnub/chat-engine/issues\"},\"homepage\":\"https://github.com/pubnub/chat-engine#readme\",\"devDependencies\":{\"babel-cli\":\"^6.26.0\",\"babel-preset-env\":\"^1.6.1\",\"body-parser\":\"^1.17.2\",\"chai\":\"^3.5.0\",\"chat-engine-typing-indicator\":\"0.0.x\",\"decache\":\"^4.3.0\",\"docdash\":\"^0.4.0\",\"es6-promise\":\"^4.1.1\",\"eslint\":\"^4.7.1\",\"eslint-config-airbnb\":\"^15.1.0\",\"eslint-plugin-import\":\"^2.7.0\",\"express\":\"^4.15.3\",\"gulp\":\"^3.9.1\",\"gulp-clean\":\"^0.3.2\",\"gulp-eslint\":\"^4.0.0\",\"gulp-istanbul\":\"^1.1.2\",\"gulp-jsdoc3\":\"^1.0.1\",\"gulp-mocha\":\"^3.0.1\",\"gulp-rename\":\"^1.2.2\",\"gulp-surge\":\"^0.1.0\",\"gulp-uglify\":\"^2.0.0\",\"gulp-uglify-es\":\"^0.1.3\",\"http-server\":\"^0.10.0\",\"isparta\":\"^4.0.0\",\"jsdoc\":\"^3.5.5\",\"mocha\":\"^3.1.2\",\"proxyquire\":\"^1.8.0\",\"pubnub-functions-mock\":\"^0.0.13\",\"request\":\"^2.82.0\",\"run-sequence\":\"^2.2.0\",\"sinon\":\"^4.0.0\",\"stats-webpack-plugin\":\"^0.6.1\",\"surge\":\"^0.19.0\",\"uglifyjs-webpack-plugin\":\"^1.0.1\",\"webpack\":\"^3.11.0\",\"webpack-stream\":\"^4.0.0\"},\"dependencies\":{\"async\":\"^2.1.2\",\"axios\":\"^0.16.2\",\"babel-core\":\"^6.26.0\",\"babel-loader\":\"^7.1.4\",\"babel-polyfill\":\"^6.26.0\",\"eventemitter2\":\"^2.2.1\",\"pubnub\":\"^4.20.1\"}}\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\nvar __WEBPACK_AMD_DEFINE_RESULT__;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/*!\r\n * EventEmitter2\r\n * https://github.com/hij1nx/EventEmitter2\r\n *\r\n * Copyright (c) 2013 hij1nx\r\n * Licensed under the MIT license.\r\n */\n;!function (undefined) {\n\n var isArray = Array.isArray ? Array.isArray : function _isArray(obj) {\n return Object.prototype.toString.call(obj) === \"[object Array]\";\n };\n var defaultMaxListeners = 10;\n\n function init() {\n this._events = {};\n if (this._conf) {\n configure.call(this, this._conf);\n }\n }\n\n function configure(conf) {\n if (conf) {\n this._conf = conf;\n\n conf.delimiter && (this.delimiter = conf.delimiter);\n this._events.maxListeners = conf.maxListeners !== undefined ? conf.maxListeners : defaultMaxListeners;\n conf.wildcard && (this.wildcard = conf.wildcard);\n conf.newListener && (this.newListener = conf.newListener);\n conf.verboseMemoryLeak && (this.verboseMemoryLeak = conf.verboseMemoryLeak);\n\n if (this.wildcard) {\n this.listenerTree = {};\n }\n } else {\n this._events.maxListeners = defaultMaxListeners;\n }\n }\n\n function logPossibleMemoryLeak(count, eventName) {\n var errorMsg = '(node) warning: possible EventEmitter memory ' + 'leak detected. %d listeners added. ' + 'Use emitter.setMaxListeners() to increase limit.';\n\n if (this.verboseMemoryLeak) {\n errorMsg += ' Event name: %s.';\n console.error(errorMsg, count, eventName);\n } else {\n console.error(errorMsg, count);\n }\n\n if (console.trace) {\n console.trace();\n }\n }\n\n function EventEmitter(conf) {\n this._events = {};\n this.newListener = false;\n this.verboseMemoryLeak = false;\n configure.call(this, conf);\n }\n EventEmitter.EventEmitter2 = EventEmitter; // backwards compatibility for exporting EventEmitter property\n\n //\n // Attention, function return type now is array, always !\n // It has zero elements if no any matches found and one or more\n // elements (leafs) if there are matches\n //\n function searchListenerTree(handlers, type, tree, i) {\n if (!tree) {\n return [];\n }\n var listeners = [],\n leaf,\n len,\n branch,\n xTree,\n xxTree,\n isolatedBranch,\n endReached,\n typeLength = type.length,\n currentType = type[i],\n nextType = type[i + 1];\n if (i === typeLength && tree._listeners) {\n //\n // If at the end of the event(s) list and the tree has listeners\n // invoke those listeners.\n //\n if (typeof tree._listeners === 'function') {\n handlers && handlers.push(tree._listeners);\n return [tree];\n } else {\n for (leaf = 0, len = tree._listeners.length; leaf < len; leaf++) {\n handlers && handlers.push(tree._listeners[leaf]);\n }\n return [tree];\n }\n }\n\n if (currentType === '*' || currentType === '**' || tree[currentType]) {\n //\n // If the event emitted is '*' at this part\n // or there is a concrete match at this patch\n //\n if (currentType === '*') {\n for (branch in tree) {\n if (branch !== '_listeners' && tree.hasOwnProperty(branch)) {\n listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], i + 1));\n }\n }\n return listeners;\n } else if (currentType === '**') {\n endReached = i + 1 === typeLength || i + 2 === typeLength && nextType === '*';\n if (endReached && tree._listeners) {\n // The next element has a _listeners, add it to the handlers.\n listeners = listeners.concat(searchListenerTree(handlers, type, tree, typeLength));\n }\n\n for (branch in tree) {\n if (branch !== '_listeners' && tree.hasOwnProperty(branch)) {\n if (branch === '*' || branch === '**') {\n if (tree[branch]._listeners && !endReached) {\n listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], typeLength));\n }\n listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], i));\n } else if (branch === nextType) {\n listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], i + 2));\n } else {\n // No match on this one, shift into the tree but not in the type array.\n listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], i));\n }\n }\n }\n return listeners;\n }\n\n listeners = listeners.concat(searchListenerTree(handlers, type, tree[currentType], i + 1));\n }\n\n xTree = tree['*'];\n if (xTree) {\n //\n // If the listener tree will allow any match for this part,\n // then recursively explore all branches of the tree\n //\n searchListenerTree(handlers, type, xTree, i + 1);\n }\n\n xxTree = tree['**'];\n if (xxTree) {\n if (i < typeLength) {\n if (xxTree._listeners) {\n // If we have a listener on a '**', it will catch all, so add its handler.\n searchListenerTree(handlers, type, xxTree, typeLength);\n }\n\n // Build arrays of matching next branches and others.\n for (branch in xxTree) {\n if (branch !== '_listeners' && xxTree.hasOwnProperty(branch)) {\n if (branch === nextType) {\n // We know the next element will match, so jump twice.\n searchListenerTree(handlers, type, xxTree[branch], i + 2);\n } else if (branch === currentType) {\n // Current node matches, move into the tree.\n searchListenerTree(handlers, type, xxTree[branch], i + 1);\n } else {\n isolatedBranch = {};\n isolatedBranch[branch] = xxTree[branch];\n searchListenerTree(handlers, type, { '**': isolatedBranch }, i + 1);\n }\n }\n }\n } else if (xxTree._listeners) {\n // We have reached the end and still on a '**'\n searchListenerTree(handlers, type, xxTree, typeLength);\n } else if (xxTree['*'] && xxTree['*']._listeners) {\n searchListenerTree(handlers, type, xxTree['*'], typeLength);\n }\n }\n\n return listeners;\n }\n\n function growListenerTree(type, listener) {\n\n type = typeof type === 'string' ? type.split(this.delimiter) : type.slice();\n\n //\n // Looks for two consecutive '**', if so, don't add the event at all.\n //\n for (var i = 0, len = type.length; i + 1 < len; i++) {\n if (type[i] === '**' && type[i + 1] === '**') {\n return;\n }\n }\n\n var tree = this.listenerTree;\n var name = type.shift();\n\n while (name !== undefined) {\n\n if (!tree[name]) {\n tree[name] = {};\n }\n\n tree = tree[name];\n\n if (type.length === 0) {\n\n if (!tree._listeners) {\n tree._listeners = listener;\n } else {\n if (typeof tree._listeners === 'function') {\n tree._listeners = [tree._listeners];\n }\n\n tree._listeners.push(listener);\n\n if (!tree._listeners.warned && this._events.maxListeners > 0 && tree._listeners.length > this._events.maxListeners) {\n tree._listeners.warned = true;\n logPossibleMemoryLeak.call(this, tree._listeners.length, name);\n }\n }\n return true;\n }\n name = type.shift();\n }\n return true;\n }\n\n // By default EventEmitters will print a warning if more than\n // 10 listeners are added to it. This is a useful default which\n // helps finding memory leaks.\n //\n // Obviously not all Emitters should be limited to 10. This function allows\n // that to be increased. Set to zero for unlimited.\n\n EventEmitter.prototype.delimiter = '.';\n\n EventEmitter.prototype.setMaxListeners = function (n) {\n if (n !== undefined) {\n this._events || init.call(this);\n this._events.maxListeners = n;\n if (!this._conf) this._conf = {};\n this._conf.maxListeners = n;\n }\n };\n\n EventEmitter.prototype.event = '';\n\n EventEmitter.prototype.once = function (event, fn) {\n this.many(event, 1, fn);\n return this;\n };\n\n EventEmitter.prototype.many = function (event, ttl, fn) {\n var self = this;\n\n if (typeof fn !== 'function') {\n throw new Error('many only accepts instances of Function');\n }\n\n function listener() {\n if (--ttl === 0) {\n self.off(event, listener);\n }\n fn.apply(this, arguments);\n }\n\n listener._origin = fn;\n\n this.on(event, listener);\n\n return self;\n };\n\n EventEmitter.prototype.emit = function () {\n\n this._events || init.call(this);\n\n var type = arguments[0];\n\n if (type === 'newListener' && !this.newListener) {\n if (!this._events.newListener) {\n return false;\n }\n }\n\n var al = arguments.length;\n var args, l, i, j;\n var handler;\n\n if (this._all && this._all.length) {\n handler = this._all.slice();\n if (al > 3) {\n args = new Array(al);\n for (j = 0; j < al; j++) {\n args[j] = arguments[j];\n }\n }\n\n for (i = 0, l = handler.length; i < l; i++) {\n this.event = type;\n switch (al) {\n case 1:\n handler[i].call(this, type);\n break;\n case 2:\n handler[i].call(this, type, arguments[1]);\n break;\n case 3:\n handler[i].call(this, type, arguments[1], arguments[2]);\n break;\n default:\n handler[i].apply(this, args);\n }\n }\n }\n\n if (this.wildcard) {\n handler = [];\n var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice();\n searchListenerTree.call(this, handler, ns, this.listenerTree, 0);\n } else {\n handler = this._events[type];\n if (typeof handler === 'function') {\n this.event = type;\n switch (al) {\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n default:\n args = new Array(al - 1);\n for (j = 1; j < al; j++) {\n args[j - 1] = arguments[j];\n }handler.apply(this, args);\n }\n return true;\n } else if (handler) {\n // need to make copy of handlers because list can change in the middle\n // of emit call\n handler = handler.slice();\n }\n }\n\n if (handler && handler.length) {\n if (al > 3) {\n args = new Array(al - 1);\n for (j = 1; j < al; j++) {\n args[j - 1] = arguments[j];\n }\n }\n for (i = 0, l = handler.length; i < l; i++) {\n this.event = type;\n switch (al) {\n case 1:\n handler[i].call(this);\n break;\n case 2:\n handler[i].call(this, arguments[1]);\n break;\n case 3:\n handler[i].call(this, arguments[1], arguments[2]);\n break;\n default:\n handler[i].apply(this, args);\n }\n }\n return true;\n } else if (!this._all && type === 'error') {\n if (arguments[1] instanceof Error) {\n throw arguments[1]; // Unhandled 'error' event\n } else {\n throw new Error(\"Uncaught, unspecified 'error' event.\");\n }\n return false;\n }\n\n return !!this._all;\n };\n\n EventEmitter.prototype.emitAsync = function () {\n\n this._events || init.call(this);\n\n var type = arguments[0];\n\n if (type === 'newListener' && !this.newListener) {\n if (!this._events.newListener) {\n return Promise.resolve([false]);\n }\n }\n\n var promises = [];\n\n var al = arguments.length;\n var args, l, i, j;\n var handler;\n\n if (this._all) {\n if (al > 3) {\n args = new Array(al);\n for (j = 1; j < al; j++) {\n args[j] = arguments[j];\n }\n }\n for (i = 0, l = this._all.length; i < l; i++) {\n this.event = type;\n switch (al) {\n case 1:\n promises.push(this._all[i].call(this, type));\n break;\n case 2:\n promises.push(this._all[i].call(this, type, arguments[1]));\n break;\n case 3:\n promises.push(this._all[i].call(this, type, arguments[1], arguments[2]));\n break;\n default:\n promises.push(this._all[i].apply(this, args));\n }\n }\n }\n\n if (this.wildcard) {\n handler = [];\n var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice();\n searchListenerTree.call(this, handler, ns, this.listenerTree, 0);\n } else {\n handler = this._events[type];\n }\n\n if (typeof handler === 'function') {\n this.event = type;\n switch (al) {\n case 1:\n promises.push(handler.call(this));\n break;\n case 2:\n promises.push(handler.call(this, arguments[1]));\n break;\n case 3:\n promises.push(handler.call(this, arguments[1], arguments[2]));\n break;\n default:\n args = new Array(al - 1);\n for (j = 1; j < al; j++) {\n args[j - 1] = arguments[j];\n }promises.push(handler.apply(this, args));\n }\n } else if (handler && handler.length) {\n if (al > 3) {\n args = new Array(al - 1);\n for (j = 1; j < al; j++) {\n args[j - 1] = arguments[j];\n }\n }\n for (i = 0, l = handler.length; i < l; i++) {\n this.event = type;\n switch (al) {\n case 1:\n promises.push(handler[i].call(this));\n break;\n case 2:\n promises.push(handler[i].call(this, arguments[1]));\n break;\n case 3:\n promises.push(handler[i].call(this, arguments[1], arguments[2]));\n break;\n default:\n promises.push(handler[i].apply(this, args));\n }\n }\n } else if (!this._all && type === 'error') {\n if (arguments[1] instanceof Error) {\n return Promise.reject(arguments[1]); // Unhandled 'error' event\n } else {\n return Promise.reject(\"Uncaught, unspecified 'error' event.\");\n }\n }\n\n return Promise.all(promises);\n };\n\n EventEmitter.prototype.on = function (type, listener) {\n if (typeof type === 'function') {\n this.onAny(type);\n return this;\n }\n\n if (typeof listener !== 'function') {\n throw new Error('on only accepts instances of Function');\n }\n this._events || init.call(this);\n\n // To avoid recursion in the case that type == \"newListeners\"! Before\n // adding it to the listeners, first emit \"newListeners\".\n this.emit('newListener', type, listener);\n\n if (this.wildcard) {\n growListenerTree.call(this, type, listener);\n return this;\n }\n\n if (!this._events[type]) {\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n } else {\n if (typeof this._events[type] === 'function') {\n // Change to array.\n this._events[type] = [this._events[type]];\n }\n\n // If we've already got an array, just append.\n this._events[type].push(listener);\n\n // Check for listener leak\n if (!this._events[type].warned && this._events.maxListeners > 0 && this._events[type].length > this._events.maxListeners) {\n this._events[type].warned = true;\n logPossibleMemoryLeak.call(this, this._events[type].length, type);\n }\n }\n\n return this;\n };\n\n EventEmitter.prototype.onAny = function (fn) {\n if (typeof fn !== 'function') {\n throw new Error('onAny only accepts instances of Function');\n }\n\n if (!this._all) {\n this._all = [];\n }\n\n // Add the function to the event listener collection.\n this._all.push(fn);\n return this;\n };\n\n EventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n EventEmitter.prototype.off = function (type, listener) {\n if (typeof listener !== 'function') {\n throw new Error('removeListener only takes instances of Function');\n }\n\n var handlers,\n leafs = [];\n\n if (this.wildcard) {\n var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice();\n leafs = searchListenerTree.call(this, null, ns, this.listenerTree, 0);\n } else {\n // does not use listeners(), so no side effect of creating _events[type]\n if (!this._events[type]) return this;\n handlers = this._events[type];\n leafs.push({ _listeners: handlers });\n }\n\n for (var iLeaf = 0; iLeaf < leafs.length; iLeaf++) {\n var leaf = leafs[iLeaf];\n handlers = leaf._listeners;\n if (isArray(handlers)) {\n\n var position = -1;\n\n for (var i = 0, length = handlers.length; i < length; i++) {\n if (handlers[i] === listener || handlers[i].listener && handlers[i].listener === listener || handlers[i]._origin && handlers[i]._origin === listener) {\n position = i;\n break;\n }\n }\n\n if (position < 0) {\n continue;\n }\n\n if (this.wildcard) {\n leaf._listeners.splice(position, 1);\n } else {\n this._events[type].splice(position, 1);\n }\n\n if (handlers.length === 0) {\n if (this.wildcard) {\n delete leaf._listeners;\n } else {\n delete this._events[type];\n }\n }\n\n this.emit(\"removeListener\", type, listener);\n\n return this;\n } else if (handlers === listener || handlers.listener && handlers.listener === listener || handlers._origin && handlers._origin === listener) {\n if (this.wildcard) {\n delete leaf._listeners;\n } else {\n delete this._events[type];\n }\n\n this.emit(\"removeListener\", type, listener);\n }\n }\n\n function recursivelyGarbageCollect(root) {\n if (root === undefined) {\n return;\n }\n var keys = Object.keys(root);\n for (var i in keys) {\n var key = keys[i];\n var obj = root[key];\n if (obj instanceof Function || (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== \"object\" || obj === null) continue;\n if (Object.keys(obj).length > 0) {\n recursivelyGarbageCollect(root[key]);\n }\n if (Object.keys(obj).length === 0) {\n delete root[key];\n }\n }\n }\n recursivelyGarbageCollect(this.listenerTree);\n\n return this;\n };\n\n EventEmitter.prototype.offAny = function (fn) {\n var i = 0,\n l = 0,\n fns;\n if (fn && this._all && this._all.length > 0) {\n fns = this._all;\n for (i = 0, l = fns.length; i < l; i++) {\n if (fn === fns[i]) {\n fns.splice(i, 1);\n this.emit(\"removeListenerAny\", fn);\n return this;\n }\n }\n } else {\n fns = this._all;\n for (i = 0, l = fns.length; i < l; i++) {\n this.emit(\"removeListenerAny\", fns[i]);\n }this._all = [];\n }\n return this;\n };\n\n EventEmitter.prototype.removeListener = EventEmitter.prototype.off;\n\n EventEmitter.prototype.removeAllListeners = function (type) {\n if (arguments.length === 0) {\n !this._events || init.call(this);\n return this;\n }\n\n if (this.wildcard) {\n var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice();\n var leafs = searchListenerTree.call(this, null, ns, this.listenerTree, 0);\n\n for (var iLeaf = 0; iLeaf < leafs.length; iLeaf++) {\n var leaf = leafs[iLeaf];\n leaf._listeners = null;\n }\n } else if (this._events) {\n this._events[type] = null;\n }\n return this;\n };\n\n EventEmitter.prototype.listeners = function (type) {\n if (this.wildcard) {\n var handlers = [];\n var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice();\n searchListenerTree.call(this, handlers, ns, this.listenerTree, 0);\n return handlers;\n }\n\n this._events || init.call(this);\n\n if (!this._events[type]) this._events[type] = [];\n if (!isArray(this._events[type])) {\n this._events[type] = [this._events[type]];\n }\n return this._events[type];\n };\n\n EventEmitter.prototype.listenerCount = function (type) {\n return this.listeners(type).length;\n };\n\n EventEmitter.prototype.listenersAny = function () {\n\n if (this._all) {\n return this._all;\n } else {\n return [];\n }\n };\n\n if (true) {\n // AMD. Register as an anonymous module.\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n return EventEmitter;\n }).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object') {\n // CommonJS\n module.exports = EventEmitter;\n } else {\n // Browser global.\n window.EventEmitter2 = EventEmitter;\n }\n}();\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar waterfall = __webpack_require__(18);\nvar Emitter = __webpack_require__(4);\nvar Event = __webpack_require__(23);\nvar Search = __webpack_require__(62);\n\n/**\n This is the root {@link Chat} class that represents a chat room\n\n @param {String} [channel=new Date().getTime()] A unique identifier for this chat {@link Chat}. Must be alphanumeric. The channel is the unique name of a {@link Chat}, and is usually something like \"The Watercooler\", \"Support\", or \"Off Topic\". See [PubNub Channels](https://support.pubnub.com/support/solutions/articles/14000045182-what-is-a-channel-).\n @param {Boolean} [isPrivate=true] Attempt to authenticate ourselves before connecting to this {@link Chat}.\n @param {Boolean} [autoConnect=true] Connect to this chat as soon as its initiated. If set to ```false```, call the {@link Chat#connect} method to connect to this {@link Chat}.\n @param {Object} [meta={}] Chat metadata that will be persisted on the server and populated on creation.\n @param {String} [group='default'] Groups chat into a \"type\". This is the key which chats will be grouped into within {@link Me.session} object.\n @class Chat\n @extends Emitter\n @extends RootEmitter\n @fires Chat#$\".\"ready\n @fires Chat#$\".\"state\n @fires Chat#$\".\"online\".\"*\n @fires Chat#$\".\"offline\".\"*\n */\n\nvar Chat = function (_Emitter) {\n _inherits(Chat, _Emitter);\n\n function Chat(chatEngine) {\n var channel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date().getTime();\n var isPrivate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var autoConnect = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n var meta = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n\n var _ret;\n\n var group = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'custom';\n\n _classCallCheck(this, Chat);\n\n var _this = _possibleConstructorReturn(this, (Chat.__proto__ || Object.getPrototypeOf(Chat)).call(this, chatEngine));\n\n _this.chatEngine = chatEngine;\n\n _this.name = 'Chat';\n\n /**\n * Classify the chat within some group, Valid options are 'system', 'fixed', or 'custom'.\n * @type Boolean\n * @readonly\n * @private\n */\n _this.group = group;\n\n /**\n * Excludes all users from reading or writing to the {@link chat} unless they have been explicitly invited via {@link Chat#invite};\n * @type Boolean\n * @readonly\n */\n _this.isPrivate = isPrivate;\n\n /**\n * Chat metadata persisted on the server. Useful for storing things like the name and description. Call {@link Chat#update} to update the remote information.\n * @type Object\n * @readonly\n */\n _this.meta = meta || {};\n\n /**\n * A string identifier for the Chat room. Any chat with an identical channel will be able to communicate with one another.\n * @type String\n * @readonly\n * @see [PubNub Channels](https://support.pubnub.com/support/solutions/articles/14000045182-what-is-a-channel-)\n */\n _this.channel = _this.chatEngine.augmentChannel(channel, _this.isPrivate);\n\n /**\n A list of users in this {@link Chat}. Automatically kept in sync as users join and leave the chat.\n Use [$.join](/Chat.html#event:$%2522.%2522join) and related events to get notified when this changes\n @type Object\n @readonly\n */\n _this.users = {};\n\n /**\n * Boolean value that indicates of the Chat is connected to the network\n * @type {Boolean}\n */\n _this.connected = false;\n\n /**\n * Keep a record if we've every successfully connected to this chat before.\n * @type {Boolean}\n */\n _this.hasConnected = false;\n\n /**\n * If user manually disconnects via {@link ChatEngine#disconnect}, the\n * chat is put to \"sleep\". If a connection is reestablished\n * via {@link ChatEngine#reconnect}, sleeping chats reconnect automatically.\n * @type {Boolean}\n */\n _this.asleep = false;\n\n _this.chatEngine.chats[_this.channel] = _this;\n\n if (autoConnect) {\n _this.connect();\n }\n\n return _ret = _this, _possibleConstructorReturn(_this, _ret);\n }\n\n /**\n Updates list of {@link User}s in this {@link Chat}\n based on who is online now.\n @private\n @param {Object} status The response status\n @param {Object} response The response payload object\n */\n\n\n _createClass(Chat, [{\n key: 'onHereNow',\n value: function onHereNow(status, response) {\n var _this2 = this;\n\n if (status.error) {\n\n /**\n * There was a problem fetching the presence of this chat\n * @event Chat#$\".\"error\".\"presence\n */\n this.chatEngine.throwError(this, 'trigger', 'presence', new Error('Getting presence of this Chat. Make sure PubNub presence is enabled for this key'));\n } else {\n\n // get the list of occupants in this channel\n var occupants = response.channels[this.channel].occupants;\n\n // format the userList for rltm.js standard\n occupants.forEach(function (occupant) {\n _this2.userUpdate(occupant.uuid, occupant.state);\n });\n }\n }\n\n /**\n * Turns a {@link Chat} into a JSON representation.\n * @return {Object}\n */\n\n }, {\n key: 'objectify',\n value: function objectify() {\n\n return {\n channel: this.channel,\n group: this.group,\n private: this.isPrivate,\n meta: this.meta\n };\n }\n\n /**\n * Invite a user to this Chat. Authorizes the invited user in the Chat and sends them an invite via {@link User#direct}.\n * @param {User} user The {@link User} to invite to this chatroom.\n * @fires Me#event:$\".\"invite\n * @example\n * // one user running ChatEngine\n * let secretChat = new ChatEngine.Chat('secret-channel');\n * secretChat.invite(someoneElse);\n *\n * // someoneElse in another instance of ChatEngine\n * me.direct.on('$.invite', (payload) => {\n * let secretChat = new ChatEngine.Chat(payload.data.channel);\n * });\n */\n\n }, {\n key: 'invite',\n value: function invite(user) {\n var _this3 = this;\n\n this.chatEngine.request('post', 'invite', {\n to: user.uuid,\n chat: this.objectify()\n }).then(function () {\n\n var send = function send() {\n\n /**\n * Notifies {@link Me} that they've been invited to a new private {@link Chat}.\n * Fired by the {@link Chat#invite} method.\n * @event Me#$\".\"invite\n * @tutorial private\n * @example\n * me.direct.on('$.invite', (payload) => {\n * let privChat = new ChatEngine.Chat(payload.data.channel));\n * });\n */\n user.direct.emit('$.invite', {\n channel: _this3.channel\n });\n };\n\n if (!user.direct.connected) {\n user.direct.connect();\n user.direct.on('$.connected', send);\n } else {\n send();\n }\n }).catch(function (error) {\n _this3.chatEngine.throwError(_this3, 'trigger', 'search', new Error('Something went wrong while making a request to authentication server.'), { error: error });\n });\n }\n\n /**\n Keep track of {@link User}s in the room by subscribing to PubNub presence events.\n @private\n @param {Object} data The PubNub presence response for this event\n */\n\n }, {\n key: 'onPresence',\n value: function onPresence(presenceEvent) {\n\n // make sure channel matches this channel\n\n // someone joins channel\n if (presenceEvent.action === 'join') {\n this.userJoin(presenceEvent.uuid, presenceEvent.state);\n }\n\n // someone leaves channel\n if (presenceEvent.action === 'leave') {\n this.userLeave(presenceEvent.uuid);\n }\n\n // someone timesout\n if (presenceEvent.action === 'timeout') {\n this.userDisconnect(presenceEvent.uuid);\n }\n\n // someone's state is updated\n if (presenceEvent.action === 'state-change') {\n this.userUpdate(presenceEvent.uuid, presenceEvent.state);\n }\n }\n\n /**\n * Update the {@link Chat} metadata on the server.\n * @param {object} data JSON object representing chat metadta.\n */\n\n }, {\n key: 'update',\n value: function update(data) {\n var _this4 = this;\n\n var oldMeta = this.meta || {};\n this.meta = Object.assign(oldMeta, data);\n\n this.chatEngine.request('post', 'chat', {\n chat: this.objectify()\n }).then(function () {}).catch(function (error) {\n _this4.chatEngine.throwError(_this4, 'trigger', 'chat', new Error('Something went wrong while making a request to chat server.'), { error: error });\n });\n }\n\n /**\n * Send events to other clients in this {@link User}.\n * Events are trigger over the network and all events are made\n * on behalf of {@link Me}\n *\n * @param {String} event The event name\n * @param {Object} data The event payload object\n * @example\n * chat.emit('custom-event', {value: true});\n * chat.on('custom-event', (payload) => {\n * console.log(payload.sender.uuid, 'emitted the value', payload.data.value);\n * });\n */\n\n }, {\n key: 'emit',\n value: function emit(event, data) {\n\n if (event === 'message' && (typeof data === 'undefined' ? 'undefined' : _typeof(data)) !== 'object') {\n throw new Error('the payload has to be an object');\n }\n\n // create a standardized payload object\n var payload = {\n data: data, // the data supplied from params\n sender: this.chatEngine.me.uuid, // my own uuid\n chat: this, // an instance of this chat\n event: event,\n chatengineSDK: this.chatEngine.package.version\n };\n\n var tracer = new Event(this.chatEngine, this, event);\n\n // run the plugin queue to modify the event\n this.runPluginQueue('emit', event, function (next) {\n next(null, payload);\n }, function (err, pluginResponse) {\n\n // remove chat otherwise it would be serialized\n // instead, it's rebuilt on the other end.\n // see this.trigger\n delete pluginResponse.chat;\n\n // publish the event and data over the configured channel\n tracer.publish(pluginResponse);\n });\n\n return tracer;\n }\n\n /**\n Add a user to the {@link Chat}, creating it if it doesn't already exist.\n @private\n @param {String} uuid The user uuid\n @param {Object} state The user initial state\n @param {Boolean} trigger Force a trigger that this user is online\n */\n\n }, {\n key: 'userJoin',\n value: function userJoin(uuid, state) {\n\n // Ensure that this user exists in the global list\n // so we can reference it from here out\n this.chatEngine.users[uuid] = this.chatEngine.users[uuid] || new this.chatEngine.User(uuid);\n this.chatEngine.users[uuid].assign(state);\n\n // check if the user already exists within the chatroom\n // so we know if we need to notify or not\n var userAlreadyHere = this.users[uuid];\n\n // assign the user to the chatroom\n this.users[uuid] = this.chatEngine.users[uuid];\n\n // trigger the join event over this chatroom\n if (userAlreadyHere) {\n\n /**\n * Broadcast that a {@link User} has come online. This is when\n * the framework firsts learn of a user. This can be triggered\n * by, ```$.join```, or other network events that\n * notify the framework of a new user.\n *\n * @event Chat#$\".\"online\".\"here\n * @param {Object} data The payload returned by the event\n * @param {User} data.user The {@link User} that came online\n * @example\n * chat.on('$.online.here', (data) => {\n * console.log('User has come online:', data.user);\n * });\n */\n\n this.trigger('$.online.here', { user: this.users[uuid] });\n } else {\n\n /**\n * Fired when a {@link User} has joined the room.\n *\n * @event Chat#$\".\"online\".\"join\n * @param {Object} data The payload returned by the event\n * @param {User} data.user The {@link User} that came online\n * @example\n * chat.on('$.join', (data) => {\n * console.log('User has joined the room!', data.user);\n * });\n */\n\n this.trigger('$.online.join', { user: this.users[uuid] });\n }\n\n // return the instance of this user\n return this.chatEngine.users[uuid];\n }\n\n /**\n * Update a user's state.\n * @private\n * @param {String} uuid The {@link User} uuid\n * @param {Object} state State to update for the user\n */\n\n }, {\n key: 'userUpdate',\n value: function userUpdate(uuid, state) {\n\n // ensure the user exists within the global space\n this.chatEngine.users[uuid] = this.chatEngine.users[uuid] || new this.chatEngine.User(uuid);\n\n // if we don't know about this user\n if (!this.users[uuid]) {\n // do the whole join thing\n this.userJoin(uuid, state);\n }\n\n // update this user's state in this chatroom\n this.users[uuid].assign(state);\n\n /**\n * Broadcast that a {@link User} has changed state.\n * @event ChatEngine#$\".\"state\n * @param {Object} data The payload returned by the event\n * @param {User} data.user The {@link User} that changed state\n * @param {Object} data.state The new user state\n * @example\n * ChatEngine.on('$.state', (data) => {\n * console.log('User has changed state:', data.user, 'new state:', data.state);\n * });\n */\n this.chatEngine._emit('$.state', {\n user: this.users[uuid],\n state: this.users[uuid].state\n });\n }\n\n /**\n * Called by {@link ChatEngine#disconnect}. Fires disconnection notifications\n * and stores \"sleep\" state in memory. Sleep means the Chat was previously connected.\n * @private\n */\n\n }, {\n key: 'sleep',\n value: function sleep() {\n\n if (this.connected) {\n this.onDisconnected();\n this.asleep = true;\n }\n }\n\n /**\n * Called by {@link ChatEngine#reconnect}. Wakes the Chat up from sleep state.\n * Re-authenticates with the server, and fires connection events once established.\n * @private\n */\n\n }, {\n key: 'wake',\n value: function wake() {\n var _this5 = this;\n\n if (this.asleep) {\n this.handshake(function () {\n _this5.onConnected();\n });\n }\n }\n\n /**\n * Fired upon successful connection to the network.\n * @private\n */\n\n }, {\n key: 'onConnected',\n value: function onConnected() {\n this.connected = true;\n this.trigger('$.connected');\n }\n\n /**\n * Fires upon disconnection from the network through any means.\n * @private\n */\n\n }, {\n key: 'onDisconnected',\n value: function onDisconnected() {\n this.connected = false;\n this.trigger('$.disconnected');\n }\n /**\n * Fires upon manually invoked leaving.\n * @private\n */\n\n }, {\n key: 'onLeave',\n value: function onLeave() {\n this.trigger('$.left');\n this.onDisconnected();\n }\n\n /**\n * Leave from the {@link Chat} on behalf of {@link Me}. Disconnects from the {@link Chat} and will stop\n * receiving events.\n * @fires Chat#event:$\".\"offline\".\"leave\n * @example\n * chat.leave();\n */\n\n }, {\n key: 'leave',\n value: function leave() {\n var _this6 = this;\n\n // unsubscribe from the channel locally\n this.chatEngine.pubnub.unsubscribe({\n channels: [this.channel]\n });\n\n // tell the server we left\n this.chatEngine.request('post', 'leave', { chat: this.objectify() }).then(function () {\n\n // trigger the disconnect events and update state\n _this6.onLeave();\n\n // tell the chat we've left\n _this6.emit('$.system.leave', { subject: _this6.objectify() });\n\n // tell session we've left\n if (_this6.chatEngine.me.session) {\n _this6.chatEngine.me.session.leave(_this6);\n }\n }).catch(function (error) {\n _this6.chatEngine.throwError(_this6, 'trigger', 'chat', new Error('Something went wrong while making a request to chat server.'), { error: error });\n });\n }\n\n /**\n Perform updates when a user has left the {@link Chat}.\n @private\n */\n\n }, {\n key: 'userLeave',\n value: function userLeave(uuid) {\n\n // store a temporary reference to send with our event\n var user = this.users[uuid];\n\n // remove the user from the local list of users\n // we don't remove the user from the global list,\n // because they may be online in other channels\n delete this.users[uuid];\n\n // make sure this event is real, user may have already left\n if (user) {\n\n // if a user leaves, trigger the event\n\n /**\n * Fired when a {@link User} intentionally leaves a {@link Chat}.\n *\n * @event Chat#$\".\"offline\".\"leave\n * @param {Object} data The data payload from the event\n * @param {User} user The {@link User} that has left the room\n * @example\n * chat.on('$.offline.leave', (data) => {\n * console.log('User left the room manually:', data.user);\n * });\n */\n this.trigger('$.offline.leave', { user: user });\n }\n }\n\n /**\n Fired when a user disconnects from the {@link Chat}\n @private\n @param {String} uuid The uuid of the {@link Chat} that left\n */\n\n }, {\n key: 'userDisconnect',\n value: function userDisconnect(uuid) {\n\n var user = this.users[uuid];\n delete this.users[uuid];\n\n // make sure this event is real, user may have already left\n if (user) {\n\n /**\n * Fired specifically when a {@link User} looses network connection\n * to the {@link Chat} involuntarily.\n *\n * @event Chat#$\".\"offline\".\"disconnect\n * @param {Object} data The {@link User} that disconnected\n * @param {Object} data.user The {@link User} that disconnected\n * @example\n * chat.on('$.offline.disconnect', (data) => {\n * console.log('User disconnected from the network:', data.user);\n * });\n */\n this.trigger('$.offline.disconnect', { user: user });\n }\n }\n\n /**\n Set the state for {@link Me} within this {@link User}.\n Broadcasts the ```$.state``` event on other clients\n @private\n @param {Object} state The new state {@link Me} will have within this {@link User}\n */\n\n }, {\n key: 'setState',\n value: function setState(state) {\n this.chatEngine.pubnub.setState({ state: state, channels: [this.chatEngine.global.channel] }, function () {\n // handle status, response\n });\n }\n\n /**\n Search through previously emitted events. Parameters act as AND operators. Returns an instance of the emitter based {@link History}. Will\n which will emit all old events unless ```config.event``` is supplied.\n @param {Object} [config] Our configuration for the PubNub history request. See the [PubNub History](https://www.pubnub.com/docs/web-javascript/storage-and-history) docs for more information on these parameters.\n @param {Event} [config.event] The {@link Event} to search for.\n @param {User} [config.sender] The {@link User} who sent the message.\n @param {Number} [config.limit=20] The maximum number of results to return that match search criteria. Search will continue operating until it returns this number of results or it reached the end of history. Limit will be ignored in case if both 'start' and 'end' timetokens has been passed in search configuration.\n @param {Number} [config.start=0] The timetoken to begin searching between.\n @param {Number} [config.end=0] The timetoken to end searching between.\n @param {Boolean} [config.reverse=false] Search oldest messages first.\n @return {Search}\n @example\n chat.search({\n event: 'my-custom-event',\n sender: ChatEngine.me,\n limit: 20\n }).on('my-custom-event', (event) => {\n console.log('this is an old event!', event);\n }).on('$.search.finish', () => {\n console.log('we have all our results!')\n });\n */\n\n }, {\n key: 'search',\n value: function search(config) {\n\n if (this.hasConnected) {\n return new Search(this.chatEngine, this, config);\n } else {\n this.chatEngine.throwError(this, 'trigger', 'search', new Error('You must wait for the $.connected event before calling Chat#search'));\n }\n }\n\n /**\n * Fired when the chat first connects to network.\n * @private\n */\n\n }, {\n key: 'connectionReady',\n value: function connectionReady() {\n var _this7 = this;\n\n this.connected = true;\n this.hasConnected = true;\n\n /**\n * Broadcast that the {@link Chat} is connected to the network.\n * @event Chat#$\".\"connected\n * @example\n * chat.on('$.connected', () => {\n * console.log('chat is ready to go!');\n * });\n */\n this.onConnected();\n\n if (this.chatEngine.me.session) {\n this.chatEngine.me.session.join(this);\n }\n\n // add self to list of users\n this.users[this.chatEngine.me.uuid] = this.chatEngine.me;\n\n // trigger my own online event\n this.trigger('$.online.join', {\n user: this.chatEngine.me\n });\n\n // global channel updates are triggered manually, only get presence on custom chats\n if (this.channel !== this.chatEngine.global.channel && this.group === 'custom') {\n\n this.getUserUpdates();\n\n // we may miss updates, so call this again 5 seconds later\n setTimeout(function () {\n _this7.getUserUpdates();\n }, 5000);\n }\n\n this.on('$.system.leave', function (payload) {\n _this7.userLeave(payload.sender.uuid);\n });\n }\n\n /**\n * Ask PubNub for information about {@link User}s in this {@link Chat}.\n */\n\n }, {\n key: 'getUserUpdates',\n value: function getUserUpdates() {\n var _this8 = this;\n\n // get a list of users online now\n // ask PubNub for information about connected users in this channel\n this.chatEngine.pubnub.hereNow({\n channels: [this.channel],\n includeUUIDs: true,\n includeState: true\n }, function (s, r) {\n _this8.onHereNow(s, r);\n });\n }\n\n /**\n * Establish authentication with the server, then subscribe with PubNub.\n * @fires Chat#$\".\"ready\n */\n\n }, {\n key: 'connect',\n value: function connect() {\n var _this9 = this;\n\n // establish good will with the server\n this.handshake(function (response) {\n\n // asign metadata locally\n if (response.data.found) {\n _this9.meta = response.data.chat.meta;\n } else {\n _this9.update(_this9.meta);\n }\n\n // now that we've got connection, do everything else via connectionReady\n _this9.connectionReady();\n });\n }\n\n /**\n * Connect to PubNub servers to initialize the chat.\n * @example\n * // create a new chatroom, but don't connect to it automatically\n * let chat = new Chat('some-chat', false)\n *\n * // connect to the chat when we feel like it\n * chat.connect();\n */\n\n }, {\n key: 'handshake',\n value: function handshake(callback) {\n var _this10 = this;\n\n waterfall([function (next) {\n if (!_this10.chatEngine.pubnub) {\n next('You must call ChatEngine.connect() and wait for the $.ready event before creating new Chats.');\n } else {\n next();\n }\n }, function (next) {\n\n _this10.chatEngine.request('post', 'grant', { chat: _this10.objectify() }).then(function () {\n next();\n }).catch(next);\n }, function (next) {\n\n _this10.chatEngine.request('post', 'join', { chat: _this10.objectify() }).then(function () {\n next();\n }).catch(next);\n }, function (next) {\n\n _this10.chatEngine.request('get', 'chat', {}, { channel: _this10.channel }).then(callback).catch(next);\n }], function (error) {\n _this10.chatEngine.throwError(_this10, 'trigger', 'auth', new Error('Something went wrong while making a request to authentication server.'), { error: error });\n });\n }\n }]);\n\n return Chat;\n}(Emitter);\n\nmodule.exports = Chat;\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = asyncify;\n\nvar _isObject = __webpack_require__(22);\n\nvar _isObject2 = _interopRequireDefault(_isObject);\n\nvar _initialParams = __webpack_require__(58);\n\nvar _initialParams2 = _interopRequireDefault(_initialParams);\n\nvar _setImmediate = __webpack_require__(59);\n\nvar _setImmediate2 = _interopRequireDefault(_setImmediate);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\n/**\n * Take a sync function and make it async, passing its return value to a\n * callback. This is useful for plugging sync functions into a waterfall,\n * series, or other async functions. Any arguments passed to the generated\n * function will be passed to the wrapped function (except for the final\n * callback argument). Errors thrown will be passed to the callback.\n *\n * If the function passed to `asyncify` returns a Promise, that promises's\n * resolved/rejected state will be used to call the callback, rather than simply\n * the synchronous return value.\n *\n * This also means you can asyncify ES2017 `async` functions.\n *\n * @name asyncify\n * @static\n * @memberOf module:Utils\n * @method\n * @alias wrapSync\n * @category Util\n * @param {Function} func - The synchronous function, or Promise-returning\n * function to convert to an {@link AsyncFunction}.\n * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be\n * invoked with `(args..., callback)`.\n * @example\n *\n * // passing a regular synchronous function\n * async.waterfall([\n * async.apply(fs.readFile, filename, \"utf8\"),\n * async.asyncify(JSON.parse),\n * function (data, next) {\n * // data is the result of parsing the text.\n * // If there was a parsing error, it would have been caught.\n * }\n * ], callback);\n *\n * // passing a function returning a promise\n * async.waterfall([\n * async.apply(fs.readFile, filename, \"utf8\"),\n * async.asyncify(function (contents) {\n * return db.model.create(contents);\n * }),\n * function (model, next) {\n * // `model` is the instantiated model object.\n * // If there was an error, this function would be skipped.\n * }\n * ], callback);\n *\n * // es2017 example, though `asyncify` is not needed if your JS environment\n * // supports async functions out of the box\n * var q = async.queue(async.asyncify(async function(file) {\n * var intermediateStep = await processFile(file);\n * return await somePromise(intermediateStep)\n * }));\n *\n * q.push(files);\n */\nfunction asyncify(func) {\n return (0, _initialParams2.default)(function (args, callback) {\n var result;\n try {\n result = func.apply(this, args);\n } catch (e) {\n return callback(e);\n }\n // if result is Promise object\n if ((0, _isObject2.default)(result) && typeof result.then === 'function') {\n result.then(function (value) {\n invokeCallback(callback, null, value);\n }, function (err) {\n invokeCallback(callback, err.message ? err : new Error(err));\n });\n } else {\n callback(null, result);\n }\n });\n}\n\nfunction invokeCallback(callback, error, value) {\n try {\n callback(error, value);\n } catch (e) {\n (0, _setImmediate2.default)(rethrow, e);\n }\n}\n\nfunction rethrow(error) {\n throw error;\n}\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function (fn) {\n return function () /*...args, callback*/{\n var args = (0, _slice2.default)(arguments);\n var callback = args.pop();\n fn.call(this, args, callback);\n };\n};\n\nvar _slice = __webpack_require__(2);\n\nvar _slice2 = _interopRequireDefault(_slice);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(setImmediate, process) {\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.hasNextTick = exports.hasSetImmediate = undefined;\nexports.fallback = fallback;\nexports.wrap = wrap;\n\nvar _slice = __webpack_require__(2);\n\nvar _slice2 = _interopRequireDefault(_slice);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\nvar hasSetImmediate = exports.hasSetImmediate = typeof setImmediate === 'function' && setImmediate;\nvar hasNextTick = exports.hasNextTick = (typeof process === 'undefined' ? 'undefined' : _typeof(process)) === 'object' && typeof process.nextTick === 'function';\n\nfunction fallback(fn) {\n setTimeout(fn, 0);\n}\n\nfunction wrap(defer) {\n return function (fn /*, ...args*/) {\n var args = (0, _slice2.default)(arguments, 1);\n defer(function () {\n fn.apply(null, args);\n });\n };\n}\n\nvar _defer;\n\nif (hasSetImmediate) {\n _defer = setImmediate;\n} else if (hasNextTick) {\n _defer = process.nextTick;\n} else {\n _defer = fallback;\n}\n\nexports.default = wrap(_defer);\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(60).setImmediate, __webpack_require__(1)))\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {\n\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function () {\n return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n};\nexports.setInterval = function () {\n return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n};\nexports.clearTimeout = exports.clearInterval = function (timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function () {};\nTimeout.prototype.close = function () {\n this._clearFn.call(window, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function (item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function (item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function (item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout) item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\n__webpack_require__(61);\n// On some exotic environments, it's not clear which object `setimmeidate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = typeof self !== \"undefined\" && self.setImmediate || typeof global !== \"undefined\" && global.setImmediate || undefined && undefined.setImmediate;\nexports.clearImmediate = typeof self !== \"undefined\" && self.clearImmediate || typeof global !== \"undefined\" && global.clearImmediate || undefined && undefined.clearImmediate;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9)))\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global, process) {\n\n(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function registerImmediate(handle) {\n process.nextTick(function () {\n runIfPresent(handle);\n });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function () {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function onGlobalMessage(event) {\n if (event.source === global && typeof event.data === \"string\" && event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function registerImmediate(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function (event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function registerImmediate(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function registerImmediate(handle) {\n // Create a \ No newline at end of file diff --git a/react/build/manifest.json b/react/build/manifest.json deleted file mode 100644 index ef19ec2..0000000 --- a/react/build/manifest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - } - ], - "start_url": "./index.html", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/react/build/service-worker.js b/react/build/service-worker.js deleted file mode 100644 index ce9f509..0000000 --- a/react/build/service-worker.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";var precacheConfig=[["/index.html","b94050cc605eb0745f7927fd029d7b25"],["/static/css/main.ea890535.css","e77dd8634a1bd267c57692afe84f6eb8"],["/static/js/main.ec658a00.js","7100d84d5e30087ac8dba27c8f486794"]],cacheName="sw-precache-v3-sw-precache-webpack-plugin-"+(self.registration?self.registration.scope:""),ignoreUrlParametersMatching=[/^utm_/],addDirectoryIndex=function(e,t){var n=new URL(e);return"/"===n.pathname.slice(-1)&&(n.pathname+=t),n.toString()},cleanResponse=function(t){return t.redirected?("body"in t?Promise.resolve(t.body):t.blob()).then(function(e){return new Response(e,{headers:t.headers,status:t.status,statusText:t.statusText})}):Promise.resolve(t)},createCacheKey=function(e,t,n,r){var a=new URL(e);return r&&a.pathname.match(r)||(a.search+=(a.search?"&":"")+encodeURIComponent(t)+"="+encodeURIComponent(n)),a.toString()},isPathWhitelisted=function(e,t){if(0===e.length)return!0;var n=new URL(t).pathname;return e.some(function(e){return n.match(e)})},stripIgnoredUrlParameters=function(e,n){var t=new URL(e);return t.hash="",t.search=t.search.slice(1).split("&").map(function(e){return e.split("=")}).filter(function(t){return n.every(function(e){return!e.test(t[0])})}).map(function(e){return e.join("=")}).join("&"),t.toString()},hashParamName="_sw-precache",urlsToCacheKeys=new Map(precacheConfig.map(function(e){var t=e[0],n=e[1],r=new URL(t,self.location),a=createCacheKey(r,hashParamName,n,/\.\w{8}\./);return[r.toString(),a]}));function setOfCachedUrls(e){return e.keys().then(function(e){return e.map(function(e){return e.url})}).then(function(e){return new Set(e)})}self.addEventListener("install",function(e){e.waitUntil(caches.open(cacheName).then(function(r){return setOfCachedUrls(r).then(function(n){return Promise.all(Array.from(urlsToCacheKeys.values()).map(function(t){if(!n.has(t)){var e=new Request(t,{credentials:"same-origin"});return fetch(e).then(function(e){if(!e.ok)throw new Error("Request for "+t+" returned a response with status "+e.status);return cleanResponse(e).then(function(e){return r.put(t,e)})})}}))})}).then(function(){return self.skipWaiting()}))}),self.addEventListener("activate",function(e){var n=new Set(urlsToCacheKeys.values());e.waitUntil(caches.open(cacheName).then(function(t){return t.keys().then(function(e){return Promise.all(e.map(function(e){if(!n.has(e.url))return t.delete(e)}))})}).then(function(){return self.clients.claim()}))}),self.addEventListener("fetch",function(t){if("GET"===t.request.method){var e,n=stripIgnoredUrlParameters(t.request.url,ignoreUrlParametersMatching),r="index.html";(e=urlsToCacheKeys.has(n))||(n=addDirectoryIndex(n,r),e=urlsToCacheKeys.has(n));var a="/index.html";!e&&"navigate"===t.request.mode&&isPathWhitelisted(["^(?!\\/__).*"],t.request.url)&&(n=new URL(a,self.location).toString(),e=urlsToCacheKeys.has(n)),e&&t.respondWith(caches.open(cacheName).then(function(e){return e.match(urlsToCacheKeys.get(n)).then(function(e){if(e)return e;throw Error("The cached response that was expected is missing.")})}).catch(function(e){return console.warn('Couldn\'t serve response for "%s" from cache: %O',t.request.url,e),fetch(t.request)}))}}); \ No newline at end of file diff --git a/react/build/static/css/main.ea890535.css b/react/build/static/css/main.ea890535.css deleted file mode 100644 index a1f4496..0000000 --- a/react/build/static/css/main.ea890535.css +++ /dev/null @@ -1,2 +0,0 @@ -*{margin:0;padding:0}body{width:500px;margin:30px auto;background-color:#fff} -/*# sourceMappingURL=main.ea890535.css.map*/ \ No newline at end of file diff --git a/react/build/static/css/main.ea890535.css.map b/react/build/static/css/main.ea890535.css.map deleted file mode 100644 index 526842a..0000000 --- a/react/build/static/css/main.ea890535.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["index.css"],"names":[],"mappings":"AAAA,EACI,SACA,SAAa,CAEjB,KACI,YACA,iBACA,qBAAuB","file":"static/css/main.ea890535.css","sourcesContent":["* {\n margin: 0px;\n padding: 0px;\n}\nbody {\n width: 500px;\n margin: 30px auto;\n background-color: #fff;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.css"],"sourceRoot":""} \ No newline at end of file diff --git a/react/build/static/js/main.ec658a00.js b/react/build/static/js/main.ec658a00.js deleted file mode 100644 index 054d74d..0000000 --- a/react/build/static/js/main.ec658a00.js +++ /dev/null @@ -1,2 +0,0 @@ -!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=5)}([function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=r(e),c=1;cc){for(var t=0,n=a.length-u;t-1?t:e}function d(e,t){t=t||{};var n=t.body;if(e instanceof d){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new o(e.headers)),this.method=e.method,this.mode=e.mode,n||null==e._bodyInit||(n=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"omit",!t.headers&&this.headers||(this.headers=new o(t.headers)),this.method=p(t.method||this.method||"GET"),this.mode=t.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function h(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),r=n.shift().replace(/\+/g," "),o=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(r),decodeURIComponent(o))}}),t}function y(e){var t=new o;return e.split(/\r?\n/).forEach(function(e){var n=e.split(":"),r=n.shift().trim();if(r){var o=n.join(":").trim();t.append(r,o)}}),t}function g(e,t){t||(t={}),this.type="default",this.status="status"in t?t.status:200,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new o(t.headers),this.url=t.url||"",this._initBody(e)}if(!e.fetch){var m={searchParams:"URLSearchParams"in e,iterable:"Symbol"in e&&"iterator"in Symbol,blob:"FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),formData:"FormData"in e,arrayBuffer:"ArrayBuffer"in e};if(m.arrayBuffer)var v=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],b=function(e){return e&&DataView.prototype.isPrototypeOf(e)},_=ArrayBuffer.isView||function(e){return e&&v.indexOf(Object.prototype.toString.call(e))>-1};o.prototype.append=function(e,r){e=t(e),r=n(r);var o=this.map[e];this.map[e]=o?o+","+r:r},o.prototype.delete=function(e){delete this.map[t(e)]},o.prototype.get=function(e){return e=t(e),this.has(e)?this.map[e]:null},o.prototype.has=function(e){return this.map.hasOwnProperty(t(e))},o.prototype.set=function(e,r){this.map[t(e)]=n(r)},o.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},o.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),r(e)},o.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),r(e)},o.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),r(e)},m.iterable&&(o.prototype[Symbol.iterator]=o.prototype.entries);var w=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];d.prototype.clone=function(){return new d(this,{body:this._bodyInit})},f.call(d.prototype),f.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new o(this.headers),url:this.url})},g.error=function(){var e=new g(null,{status:0,statusText:""});return e.type="error",e};var k=[301,302,303,307,308];g.redirect=function(e,t){if(-1===k.indexOf(t))throw new RangeError("Invalid status code");return new g(null,{status:t,headers:{location:e}})},e.Headers=o,e.Request=d,e.Response=g,e.fetch=function(e,t){return new Promise(function(n,r){var o=new d(e,t),i=new XMLHttpRequest;i.onload=function(){var e={status:i.status,statusText:i.statusText,headers:y(i.getAllResponseHeaders()||"")};e.url="responseURL"in i?i.responseURL:e.headers.get("X-Request-URL");var t="response"in i?i.response:i.responseText;n(new g(t,e))},i.onerror=function(){r(new TypeError("Network request failed"))},i.ontimeout=function(){r(new TypeError("Network request failed"))},i.open(o.method,o.url,!0),"include"===o.credentials&&(i.withCredentials=!0),"responseType"in i&&m.blob&&(i.responseType="blob"),o.headers.forEach(function(e,t){i.setRequestHeader(t,e)}),i.send("undefined"===typeof o._bodyInit?null:o._bodyInit)})},e.fetch.polyfill=!0}}("undefined"!==typeof self?self:this)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),o=n(1),i=n.n(o),a=n(15),s=n.n(a),u=n(25),c=(n.n(u),n(26)),l=n.n(c),f=n(27),p=n.n(f);Object(r.a)();var d=(new Date).getTime(),h=["user",d].join("-"),y=l.a.create({publishKey:"pub-c-df1f983b-8334-44aa-b32b-2fa23eff1f8f",subscribeKey:"sub-c-bf3164ba-f737-11e7-b8a6-46d99af2bb8c"},{globalChannel:"chat-engine-react"});y.connect(h,{signedOnTime:d},"auth-key");var g=p()({displayName:"Message",render:function(){return console.log("mes",this.props),i.a.createElement("div",null," ",this.props.uuid,": ",this.props.text," ")}}),m=p()({displayName:"Chat",getInitialState:function(){return{messages:[],chatInput:""}},setChatInput:function(e){this.setState({chatInput:e.target.value})},sendChat:function(){this.state.chatInput&&(y.global.emit("message",{text:this.state.chatInput}),this.setState({chatInput:""}))},componentDidMount:function(){var e=this;y.global.on("message",function(t){var n=e.state.messages;n.push(t),e.setState({messages:n})})},_handleKeyPress:function(e){"Enter"===e.key&&this.sendChat()},render:function(){console.log("render called"),console.log(this.state.messages);var e=this.state.messages.map(function(e){return i.a.createElement(g,{key:e.timetoken,uuid:e.sender.uuid,text:e.data.text})});return i.a.createElement("div",null,i.a.createElement("div",{id:"chat-output"}," ",e," ")," ",i.a.createElement("input",{id:"chat-input",type:"text",name:"",value:this.state.chatInput,onChange:this.setChatInput,onKeyPress:this._handleKeyPress})," ",i.a.createElement("input",{type:"button",onClick:this.sendChat,value:"Send Chat"}))}});y.on("$.ready",function(){s.a.render(i.a.createElement(m,null),document.getElementById("root"))})},function(e,t,n){"use strict";function r(){if("serviceWorker"in navigator){if(new URL("",window.location).origin!==window.location.origin)return;window.addEventListener("load",function(){var e="/service-worker.js";a?(i(e),navigator.serviceWorker.ready.then(function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://goo.gl/SC7cgQ")})):o(e)})}}function o(e){navigator.serviceWorker.register(e).then(function(e){e.onupdatefound=function(){var t=e.installing;t.onstatechange=function(){"installed"===t.state&&(navigator.serviceWorker.controller?console.log("New content is available; please refresh."):console.log("Content is cached for offline use."))}}}).catch(function(e){console.error("Error during service worker registration:",e)})}function i(e){fetch(e).then(function(t){404===t.status||-1===t.headers.get("content-type").indexOf("javascript")?navigator.serviceWorker.ready.then(function(e){e.unregister().then(function(){window.location.reload()})}):o(e)}).catch(function(){console.log("No internet connection found. App is running in offline mode.")})}t.a=r;var a=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/))},function(e,t,n){"use strict";function r(e){for(var t=arguments.length-1,n="Minified React error #"+e+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+e,r=0;rI.length&&I.push(e)}function d(e,t,n,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case k:case E:case C:case x:a=!0}}if(a)return n(o,e,""===t?"."+h(e,0):t),1;if(a=0,t=""===t?".":t+":",Array.isArray(e))for(var s=0;sthis.eventPool.length&&this.eventPool.push(e)}function K(e){e.eventPool=[],e.getPooled=H,e.release=B}function z(e,t,n,r){return F.call(this,e,t,n,r)}function q(e,t,n,r){return F.call(this,e,t,n,r)}function G(e,t){switch(e){case"topKeyUp":return-1!==dr.indexOf(t.keyCode);case"topKeyDown":return 229!==t.keyCode;case"topKeyPress":case"topMouseDown":case"topBlur":return!0;default:return!1}}function V(e){return e=e.detail,"object"===typeof e&&"data"in e?e.data:null}function W(e,t){switch(e){case"topCompositionEnd":return V(t);case"topKeyPress":return 32!==t.which?null:(Er=!0,wr);case"topTextInput":return e=t.data,e===wr&&Er?null:e;default:return null}}function $(e,t){if(Cr)return"topCompositionEnd"===e||!hr&&G(e,t)?(e=U(),lr._root=null,lr._startText=null,lr._fallbackText=null,Cr=!1,e):null;switch(e){case"topPaste":return null;case"topKeyPress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1Kr.length&&Kr.push(e)}}}function Ae(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n["ms"+e]="MS"+t,n["O"+e]="o"+t.toLowerCase(),n}function Re(e){if(Wr[e])return Wr[e];if(!Vr[e])return e;var t,n=Vr[e];for(t in n)if(n.hasOwnProperty(t)&&t in $r)return Wr[e]=n[t];return""}function Ie(e){return Object.prototype.hasOwnProperty.call(e,Jr)||(e[Jr]=Xr++,Qr[e[Jr]]={}),Qr[e[Jr]]}function De(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ue(e,t){var n=De(e);e=0;for(var r;n;){if(3===n.nodeType){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=De(n)}}function Le(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&"text"===e.type||"textarea"===t||"true"===e.contentEditable)}function Fe(e,t){if(oo||null==to||to!==Cn())return null;var n=to;return"selectionStart"in n&&Le(n)?n={start:n.selectionStart,end:n.selectionEnd}:window.getSelection?(n=window.getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}):n=void 0,ro&&xn(ro,n)?null:(ro=n,e=F.getPooled(eo.select,no,e,t),e.type="select",e.target=to,R(e),e)}function He(e,t,n,r){return F.call(this,e,t,n,r)}function Be(e,t,n,r){return F.call(this,e,t,n,r)}function Ke(e,t,n,r){return F.call(this,e,t,n,r)}function ze(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,32<=e||13===e?e:0}function qe(e,t,n,r){return F.call(this,e,t,n,r)}function Ge(e,t,n,r){return F.call(this,e,t,n,r)}function Ve(e,t,n,r){return F.call(this,e,t,n,r)}function We(e,t,n,r){return F.call(this,e,t,n,r)}function $e(e,t,n,r){return F.call(this,e,t,n,r)}function Ye(e){0>po||(e.current=fo[po],fo[po]=null,po--)}function Qe(e,t){po++,fo[po]=e.current,e.current=t}function Xe(e){return Ze(e)?go:ho.current}function Je(e,t){var n=e.type.contextTypes;if(!n)return Pn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ze(e){return 2===e.tag&&null!=e.type.childContextTypes}function et(e){Ze(e)&&(Ye(yo,e),Ye(ho,e))}function tt(e,t,n){null!=ho.cursor&&r("168"),Qe(ho,t,e),Qe(yo,n,e)}function nt(e,t){var n=e.stateNode,o=e.type.childContextTypes;if("function"!==typeof n.getChildContext)return t;n=n.getChildContext();for(var i in n)i in o||r("108",we(e)||"Unknown",i);return wn({},t,n)}function rt(e){if(!Ze(e))return!1;var t=e.stateNode;return t=t&&t.__reactInternalMemoizedMergedChildContext||Pn,go=ho.current,Qe(ho,t,e),Qe(yo,yo.current,e),!0}function ot(e,t){var n=e.stateNode;if(n||r("169"),t){var o=nt(e,go);n.__reactInternalMemoizedMergedChildContext=o,Ye(yo,e),Ye(ho,e),Qe(ho,o,e)}else Ye(yo,e);Qe(yo,t,e)}function it(e,t,n){this.tag=e,this.key=t,this.stateNode=this.type=null,this.sibling=this.child=this.return=null,this.index=0,this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null,this.internalContextTag=n,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.expirationTime=0,this.alternate=null}function at(e,t,n){var r=e.alternate;return null===r?(r=new it(e.tag,e.key,e.internalContextTag),r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.effectTag=0,r.nextEffect=null,r.firstEffect=null,r.lastEffect=null),r.expirationTime=n,r.pendingProps=t,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function st(e,t,n){var o=void 0,i=e.type,a=e.key;return"function"===typeof i?(o=i.prototype&&i.prototype.isReactComponent?new it(2,a,t):new it(0,a,t),o.type=i,o.pendingProps=e.props):"string"===typeof i?(o=new it(5,a,t),o.type=i,o.pendingProps=e.props):"object"===typeof i&&null!==i&&"number"===typeof i.tag?(o=i,o.pendingProps=e.props):r("130",null==i?i:typeof i,""),o.expirationTime=n,o}function ut(e,t,n,r){return t=new it(10,r,t),t.pendingProps=e,t.expirationTime=n,t}function ct(e,t,n){return t=new it(6,null,t),t.pendingProps=e,t.expirationTime=n,t}function lt(e,t,n){return t=new it(7,e.key,t),t.type=e.handler,t.pendingProps=e,t.expirationTime=n,t}function ft(e,t,n){return e=new it(9,null,t),e.expirationTime=n,e}function pt(e,t,n){return t=new it(4,e.key,t),t.pendingProps=e.children||[],t.expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function dt(e){return function(t){try{return e(t)}catch(e){}}}function ht(e){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);mo=dt(function(e){return t.onCommitFiberRoot(n,e)}),vo=dt(function(e){return t.onCommitFiberUnmount(n,e)})}catch(e){}return!0}function yt(e){"function"===typeof mo&&mo(e)}function gt(e){"function"===typeof vo&&vo(e)}function mt(e){return{baseState:e,expirationTime:0,first:null,last:null,callbackList:null,hasForceUpdate:!1,isInitialized:!1}}function vt(e,t){null===e.last?e.first=e.last=t:(e.last.next=t,e.last=t),(0===e.expirationTime||e.expirationTime>t.expirationTime)&&(e.expirationTime=t.expirationTime)}function bt(e,t){var n=e.alternate,r=e.updateQueue;null===r&&(r=e.updateQueue=mt(null)),null!==n?null===(e=n.updateQueue)&&(e=n.updateQueue=mt(null)):e=null,e=e!==r?e:null,null===e?vt(r,t):null===r.last||null===e.last?(vt(r,t),vt(e,t)):(vt(r,t),e.last=t)}function _t(e,t,n,r){return e=e.partialState,"function"===typeof e?e.call(t,n,r):e}function wt(e,t,n,r,o,i){null!==e&&e.updateQueue===n&&(n=t.updateQueue={baseState:n.baseState,expirationTime:n.expirationTime,first:n.first,last:n.last,isInitialized:n.isInitialized,callbackList:null,hasForceUpdate:!1}),n.expirationTime=0,n.isInitialized?e=n.baseState:(e=n.baseState=t.memoizedState,n.isInitialized=!0);for(var a=!0,s=n.first,u=!1;null!==s;){var c=s.expirationTime;if(c>i){var l=n.expirationTime;(0===l||l>c)&&(n.expirationTime=c),u||(u=!0,n.baseState=e)}else u||(n.first=s.next,null===n.first&&(n.last=null)),s.isReplace?(e=_t(s,r,e,o),a=!0):(c=_t(s,r,e,o))&&(e=a?wn({},e,c):wn(e,c),a=!1),s.isForced&&(n.hasForceUpdate=!0),null!==s.callback&&(c=n.callbackList,null===c&&(c=n.callbackList=[]),c.push(s));s=s.next}return null!==n.callbackList?t.effectTag|=32:null!==n.first||n.hasForceUpdate||(t.updateQueue=null),u||(n.baseState=e),e}function kt(e,t){var n=e.callbackList;if(null!==n)for(e.callbackList=null,e=0;ep?(d=f,f=null):d=f.sibling;var m=y(r,f,s[p],u);if(null===m){null===f&&(f=d);break}e&&f&&null===m.alternate&&t(r,f),i=a(m,i,p),null===l?c=m:l.sibling=m,l=m,f=d}if(p===s.length)return n(r,f),c;if(null===f){for(;pd?(m=p,p=null):m=p.sibling;var b=y(i,p,v.value,c);if(null===b){p||(p=m);break}e&&p&&null===b.alternate&&t(i,p),s=a(b,s,d),null===f?l=b:f.sibling=b,f=b,p=m}if(v.done)return n(i,p),l;if(null===p){for(;!v.done;d++,v=u.next())null!==(v=h(i,v.value,c))&&(s=a(v,s,d),null===f?l=v:f.sibling=v,f=v);return l}for(p=o(i,p);!v.done;d++,v=u.next())null!==(v=g(p,i,d,v.value,c))&&(e&&null!==v.alternate&&p.delete(null===v.key?d:v.key),s=a(v,s,d),null===f?l=v:f.sibling=v,f=v);return e&&p.forEach(function(e){return t(i,e)}),l}return function(e,o,a,u){"object"===typeof a&&null!==a&&a.type===Co&&null===a.key&&(a=a.props.children);var c="object"===typeof a&&null!==a;if(c)switch(a.$$typeof){case _o:e:{var l=a.key;for(c=o;null!==c;){if(c.key===l){if(10===c.tag?a.type===Co:c.type===a.type){n(e,c.sibling),o=i(c,a.type===Co?a.props.children:a.props,u),o.ref=xt(c,a),o.return=e,e=o;break e}n(e,c);break}t(e,c),c=c.sibling}a.type===Co?(o=ut(a.props.children,e.internalContextTag,u,a.key),o.return=e,e=o):(u=st(a,e.internalContextTag,u),u.ref=xt(o,a),u.return=e,e=u)}return s(e);case wo:e:{for(c=a.key;null!==o;){if(o.key===c){if(7===o.tag){n(e,o.sibling),o=i(o,a,u),o.return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}o=lt(a,e.internalContextTag,u),o.return=e,e=o}return s(e);case ko:e:{if(null!==o){if(9===o.tag){n(e,o.sibling),o=i(o,null,u),o.type=a.value,o.return=e,e=o;break e}n(e,o)}o=ft(a,e.internalContextTag,u),o.type=a.value,o.return=e,e=o}return s(e);case Eo:e:{for(c=a.key;null!==o;){if(o.key===c){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(e,o.sibling),o=i(o,a.children||[],u),o.return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}o=pt(a,e.internalContextTag,u),o.return=e,e=o}return s(e)}if("string"===typeof a||"number"===typeof a)return a=""+a,null!==o&&6===o.tag?(n(e,o.sibling),o=i(o,a,u)):(n(e,o),o=ct(a,e.internalContextTag,u)),o.return=e,e=o,s(e);if(To(a))return m(e,o,a,u);if(Ct(a))return v(e,o,a,u);if(c&&Tt(e,a),"undefined"===typeof a)switch(e.tag){case 2:case 1:u=e.type,r("152",u.displayName||u.name||"Component")}return n(e,o)}}function Pt(e,t,n,o,i){function a(e,t,n){var r=t.expirationTime;t.child=null===e?Po(t,null,n,r):So(t,e.child,n,r)}function s(e,t){var n=t.ref;null===n||e&&e.ref===n||(t.effectTag|=128)}function u(e,t,n,r){if(s(e,t),!n)return r&&ot(t,!1),l(e,t);n=t.stateNode,Br.current=t;var o=n.render();return t.effectTag|=1,a(e,t,o),t.memoizedState=n.state,t.memoizedProps=n.props,r&&ot(t,!0),t.child}function c(e){var t=e.stateNode;t.pendingContext?tt(e,t.pendingContext,t.pendingContext!==t.context):t.context&&tt(e,t.context,!1),g(e,t.containerInfo)}function l(e,t){if(null!==e&&t.child!==e.child&&r("153"),null!==t.child){e=t.child;var n=at(e,e.pendingProps,e.expirationTime);for(t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,n=n.sibling=at(e,e.pendingProps,e.expirationTime),n.return=t;n.sibling=null}return t.child}function f(e,t){switch(t.tag){case 3:c(t);break;case 2:rt(t);break;case 4:g(t,t.stateNode.containerInfo)}return null}var p=e.shouldSetTextContent,d=e.useSyncScheduling,h=e.shouldDeprioritizeSubtree,y=t.pushHostContext,g=t.pushHostContainer,m=n.enterHydrationState,v=n.resetHydrationState,b=n.tryToClaimNextHydratableInstance;e=Et(o,i,function(e,t){e.memoizedProps=t},function(e,t){e.memoizedState=t});var _=e.adoptClassInstance,w=e.constructClassInstance,k=e.mountClassInstance,E=e.updateClassInstance;return{beginWork:function(e,t,n){if(0===t.expirationTime||t.expirationTime>n)return f(e,t);switch(t.tag){case 0:null!==e&&r("155");var o=t.type,i=t.pendingProps,C=Xe(t);return C=Je(t,C),o=o(i,C),t.effectTag|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render?(t.tag=2,i=rt(t),_(t,o),k(t,n),t=u(e,t,!0,i)):(t.tag=1,a(e,t,o),t.memoizedProps=i,t=t.child),t;case 1:e:{if(i=t.type,n=t.pendingProps,o=t.memoizedProps,yo.current)null===n&&(n=o);else if(null===n||o===n){t=l(e,t);break e}o=Xe(t),o=Je(t,o),i=i(n,o),t.effectTag|=1,a(e,t,i),t.memoizedProps=n,t=t.child}return t;case 2:return i=rt(t),o=void 0,null===e?t.stateNode?r("153"):(w(t,t.pendingProps),k(t,n),o=!0):o=E(e,t,n),u(e,t,o,i);case 3:return c(t),i=t.updateQueue,null!==i?(o=t.memoizedState,i=wt(e,t,i,null,null,n),o===i?(v(),t=l(e,t)):(o=i.element,C=t.stateNode,(null===e||null===e.child)&&C.hydrate&&m(t)?(t.effectTag|=2,t.child=Po(t,null,o,n)):(v(),a(e,t,o)),t.memoizedState=i,t=t.child)):(v(),t=l(e,t)),t;case 5:y(t),null===e&&b(t),i=t.type;var x=t.memoizedProps;return o=t.pendingProps,null===o&&null===(o=x)&&r("154"),C=null!==e?e.memoizedProps:null,yo.current||null!==o&&x!==o?(x=o.children,p(i,o)?x=null:C&&p(i,C)&&(t.effectTag|=16),s(e,t),2147483647!==n&&!d&&h(i,o)?(t.expirationTime=2147483647,t=null):(a(e,t,x),t.memoizedProps=o,t=t.child)):t=l(e,t),t;case 6:return null===e&&b(t),e=t.pendingProps,null===e&&(e=t.memoizedProps),t.memoizedProps=e,null;case 8:t.tag=7;case 7:return i=t.pendingProps,yo.current?null===i&&null===(i=e&&e.memoizedProps)&&r("154"):null!==i&&t.memoizedProps!==i||(i=t.memoizedProps),o=i.children,t.stateNode=null===e?Po(t,t.stateNode,o,n):So(t,t.stateNode,o,n),t.memoizedProps=i,t.stateNode;case 9:return null;case 4:e:{if(g(t,t.stateNode.containerInfo),i=t.pendingProps,yo.current)null===i&&null==(i=e&&e.memoizedProps)&&r("154");else if(null===i||t.memoizedProps===i){t=l(e,t);break e}null===e?t.child=So(t,null,i,n):a(e,t,i),t.memoizedProps=i,t=t.child}return t;case 10:e:{if(n=t.pendingProps,yo.current)null===n&&(n=t.memoizedProps);else if(null===n||t.memoizedProps===n){t=l(e,t);break e}a(e,t,n),t.memoizedProps=n,t=t.child}return t;default:r("156")}},beginFailedWork:function(e,t,n){switch(t.tag){case 2:rt(t);break;case 3:c(t);break;default:r("157")}return t.effectTag|=64,null===e?t.child=null:t.child!==e.child&&(t.child=e.child),0===t.expirationTime||t.expirationTime>n?f(e,t):(t.firstEffect=null,t.lastEffect=null,t.child=null===e?Po(t,null,null,n):So(t,e.child,null,n),2===t.tag&&(e=t.stateNode,t.memoizedProps=e.props,t.memoizedState=e.state),t.child)}}}function Ot(e,t,n){function o(e){e.effectTag|=4}var i=e.createInstance,a=e.createTextInstance,s=e.appendInitialChild,u=e.finalizeInitialChildren,c=e.prepareUpdate,l=e.persistence,f=t.getRootHostContainer,p=t.popHostContext,d=t.getHostContext,h=t.popHostContainer,y=n.prepareToHydrateHostInstance,g=n.prepareToHydrateHostTextInstance,m=n.popHydrationState,v=void 0,b=void 0,_=void 0;return e.mutation?(v=function(){},b=function(e,t,n){(t.updateQueue=n)&&o(t)},_=function(e,t,n,r){n!==r&&o(t)}):r(l?"235":"236"),{completeWork:function(e,t,n){var l=t.pendingProps;switch(null===l?l=t.memoizedProps:2147483647===t.expirationTime&&2147483647!==n||(t.pendingProps=null),t.tag){case 1:return null;case 2:return et(t),null;case 3:return h(t),Ye(yo,t),Ye(ho,t),l=t.stateNode,l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),null!==e&&null!==e.child||(m(t),t.effectTag&=-3),v(t),null;case 5:p(t),n=f();var w=t.type;if(null!==e&&null!=t.stateNode){var k=e.memoizedProps,E=t.stateNode,C=d();E=c(E,w,k,l,n,C),b(e,t,E,w,k,l,n),e.ref!==t.ref&&(t.effectTag|=128)}else{if(!l)return null===t.stateNode&&r("166"),null;if(e=d(),m(t))y(t,n,e)&&o(t);else{e=i(w,l,n,e,t);e:for(k=t.child;null!==k;){if(5===k.tag||6===k.tag)s(e,k.stateNode);else if(4!==k.tag&&null!==k.child){k.child.return=k,k=k.child;continue}if(k===t)break;for(;null===k.sibling;){if(null===k.return||k.return===t)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}u(e,w,l,n)&&o(t),t.stateNode=e}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)_(e,t,e.memoizedProps,l);else{if("string"!==typeof l)return null===t.stateNode&&r("166"),null;e=f(),n=d(),m(t)?g(t)&&o(t):t.stateNode=a(l,e,n,t)}return null;case 7:(l=t.memoizedProps)||r("165"),t.tag=8,w=[];e:for((k=t.stateNode)&&(k.return=t);null!==k;){if(5===k.tag||6===k.tag||4===k.tag)r("247");else if(9===k.tag)w.push(k.type);else if(null!==k.child){k.child.return=k,k=k.child;continue}for(;null===k.sibling;){if(null===k.return||k.return===t)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}return k=l.handler,l=k(l.props,w),t.child=So(t,null!==e?e.child:null,l,n),t.child;case 8:return t.tag=7,null;case 9:case 10:return null;case 4:return h(t),v(t),null;case 0:r("167");default:r("156")}}}}function Nt(e,t){function n(e){var n=e.ref;if(null!==n)try{n(null)}catch(n){t(e,n)}}function o(e){switch("function"===typeof gt&>(e),e.tag){case 2:n(e);var r=e.stateNode;if("function"===typeof r.componentWillUnmount)try{r.props=e.memoizedProps,r.state=e.memoizedState,r.componentWillUnmount()}catch(n){t(e,n)}break;case 5:n(e);break;case 7:i(e.stateNode);break;case 4:c&&s(e)}}function i(e){for(var t=e;;)if(o(t),null===t.child||c&&4===t.tag){if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return}t.sibling.return=t.return,t=t.sibling}else t.child.return=t,t=t.child}function a(e){return 5===e.tag||3===e.tag||4===e.tag}function s(e){for(var t=e,n=!1,a=void 0,s=void 0;;){if(!n){n=t.return;e:for(;;){switch(null===n&&r("160"),n.tag){case 5:a=n.stateNode,s=!1;break e;case 3:case 4:a=n.stateNode.containerInfo,s=!0;break e}n=n.return}n=!0}if(5===t.tag||6===t.tag)i(t),s?b(a,t.stateNode):v(a,t.stateNode);else if(4===t.tag?a=t.stateNode.containerInfo:o(t),null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return;t=t.return,4===t.tag&&(n=!1)}t.sibling.return=t.return,t=t.sibling}}var u=e.getPublicInstance,c=e.mutation;e=e.persistence,c||r(e?"235":"236");var l=c.commitMount,f=c.commitUpdate,p=c.resetTextContent,d=c.commitTextUpdate,h=c.appendChild,y=c.appendChildToContainer,g=c.insertBefore,m=c.insertInContainerBefore,v=c.removeChild,b=c.removeChildFromContainer;return{commitResetTextContent:function(e){p(e.stateNode)},commitPlacement:function(e){e:{for(var t=e.return;null!==t;){if(a(t)){var n=t;break e}t=t.return}r("160"),n=void 0}var o=t=void 0;switch(n.tag){case 5:t=n.stateNode,o=!1;break;case 3:case 4:t=n.stateNode.containerInfo,o=!0;break;default:r("161")}16&n.effectTag&&(p(t),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||a(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}for(var i=e;;){if(5===i.tag||6===i.tag)n?o?m(t,i.stateNode,n):g(t,i.stateNode,n):o?y(t,i.stateNode):h(t,i.stateNode);else if(4!==i.tag&&null!==i.child){i.child.return=i,i=i.child;continue}if(i===e)break;for(;null===i.sibling;){if(null===i.return||i.return===e)return;i=i.return}i.sibling.return=i.return,i=i.sibling}},commitDeletion:function(e){s(e),e.return=null,e.child=null,e.alternate&&(e.alternate.child=null,e.alternate.return=null)},commitWork:function(e,t){switch(t.tag){case 2:break;case 5:var n=t.stateNode;if(null!=n){var o=t.memoizedProps;e=null!==e?e.memoizedProps:o;var i=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&f(n,a,i,e,o,t)}break;case 6:null===t.stateNode&&r("162"),n=t.memoizedProps,d(t.stateNode,null!==e?e.memoizedProps:n,n);break;case 3:break;default:r("163")}},commitLifeCycles:function(e,t){switch(t.tag){case 2:var n=t.stateNode;if(4&t.effectTag)if(null===e)n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidMount();else{var o=e.memoizedProps;e=e.memoizedState,n.props=t.memoizedProps,n.state=t.memoizedState,n.componentDidUpdate(o,e)}t=t.updateQueue,null!==t&&kt(t,n);break;case 3:n=t.updateQueue,null!==n&&kt(n,null!==t.child?t.child.stateNode:null);break;case 5:n=t.stateNode,null===e&&4&t.effectTag&&l(n,t.type,t.memoizedProps,t);break;case 6:case 4:break;default:r("163")}},commitAttachRef:function(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case 5:t(u(n));break;default:t(n)}}},commitDetachRef:function(e){null!==(e=e.ref)&&e(null)}}}function Mt(e){function t(e){return e===Oo&&r("174"),e}var n=e.getChildHostContext,o=e.getRootHostContext,i={current:Oo},a={current:Oo},s={current:Oo};return{getHostContext:function(){return t(i.current)},getRootHostContainer:function(){return t(s.current)},popHostContainer:function(e){Ye(i,e),Ye(a,e),Ye(s,e)},popHostContext:function(e){a.current===e&&(Ye(i,e),Ye(a,e))},pushHostContainer:function(e,t){Qe(s,t,e),t=o(t),Qe(a,e,e),Qe(i,t,e)},pushHostContext:function(e){var r=t(s.current),o=t(i.current);r=n(o,e.type,r),o!==r&&(Qe(a,e,e),Qe(i,r,e))},resetHostContainer:function(){i.current=Oo,s.current=Oo}}}function jt(e){function t(e,t){var n=new it(5,null,0);n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function n(e,t){switch(e.tag){case 5:return null!==(t=a(t,e.type,e.pendingProps))&&(e.stateNode=t,!0);case 6:return null!==(t=s(t,e.pendingProps))&&(e.stateNode=t,!0);default:return!1}}function o(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag;)e=e.return;p=e}var i=e.shouldSetTextContent;if(!(e=e.hydration))return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){r("175")},prepareToHydrateHostTextInstance:function(){r("176")},popHydrationState:function(){return!1}};var a=e.canHydrateInstance,s=e.canHydrateTextInstance,u=e.getNextHydratableSibling,c=e.getFirstHydratableChild,l=e.hydrateInstance,f=e.hydrateTextInstance,p=null,d=null,h=!1;return{enterHydrationState:function(e){return d=c(e.stateNode.containerInfo),p=e,h=!0},resetHydrationState:function(){d=p=null,h=!1},tryToClaimNextHydratableInstance:function(e){if(h){var r=d;if(r){if(!n(e,r)){if(!(r=u(r))||!n(e,r))return e.effectTag|=2,h=!1,void(p=e);t(p,d)}p=e,d=c(r)}else e.effectTag|=2,h=!1,p=e}},prepareToHydrateHostInstance:function(e,t,n){return t=l(e.stateNode,e.type,e.memoizedProps,t,n,e),e.updateQueue=t,null!==t},prepareToHydrateHostTextInstance:function(e){return f(e.stateNode,e.memoizedProps,e)},popHydrationState:function(e){if(e!==p)return!1;if(!h)return o(e),h=!0,!1;var n=e.type;if(5!==e.tag||"head"!==n&&"body"!==n&&!i(n,e.memoizedProps))for(n=d;n;)t(e,n),n=u(n);return o(e),d=p?u(e.stateNode):null,!0}}}function At(e){function t(e){ie=Y=!0;var t=e.stateNode;if(t.current===e&&r("177"),t.isReadyForCommit=!1,Br.current=null,1a.expirationTime)&&(i=a.expirationTime),a=a.sibling;o.expirationTime=i}if(null!==t)return t;if(null!==n&&(null===n.firstEffect&&(n.firstEffect=e.firstEffect),null!==e.lastEffect&&(null!==n.lastEffect&&(n.lastEffect.nextEffect=e.firstEffect),n.lastEffect=e.lastEffect),1e))if(J<=W)for(;null!==Q;)Q=c(Q)?i(Q):o(Q);else for(;null!==Q&&!k();)Q=c(Q)?i(Q):o(Q)}else if(!(0===J||J>e))if(J<=W)for(;null!==Q;)Q=o(Q);else for(;null!==Q&&!k();)Q=o(Q)}function s(e,t){if(Y&&r("243"),Y=!0,e.isReadyForCommit=!1,e!==X||t!==J||null===Q){for(;-1t)&&(e.expirationTime=t),null!==e.alternate&&(0===e.alternate.expirationTime||e.alternate.expirationTime>t)&&(e.alternate.expirationTime=t),null===e.return){if(3!==e.tag)break;var n=e.stateNode;!Y&&n===X&&t_e&&r("185"),null===o.nextScheduledRoot)o.remainingExpirationTime=i,null===ue?(se=ue=o,o.nextScheduledRoot=o):(ue=ue.nextScheduledRoot=o,ue.nextScheduledRoot=se);else{var a=o.remainingExpirationTime;(0===a||ice)return;K(le)}var t=H()-V;ce=e,le=B(b,{timeout:10*(e-2)-t})}function v(){var e=0,t=null;if(null!==ue)for(var n=ue,o=se;null!==o;){var i=o.remainingExpirationTime;if(0===i){if((null===n||null===ue)&&r("244"),o===o.nextScheduledRoot){se=ue=o.nextScheduledRoot=null;break}if(o===se)se=i=o.nextScheduledRoot,ue.nextScheduledRoot=i,o.nextScheduledRoot=null;else{if(o===ue){ue=n,ue.nextScheduledRoot=se,o.nextScheduledRoot=null;break}n.nextScheduledRoot=o.nextScheduledRoot,o.nextScheduledRoot=null}o=n.nextScheduledRoot}else{if((0===e||iEe)&&(he=!0)}function E(e){null===pe&&r("246"),pe.remainingExpirationTime=0,ye||(ye=!0,ge=e)}var C=Mt(e),x=jt(e),T=C.popHostContainer,S=C.popHostContext,P=C.resetHostContainer,O=Pt(e,C,x,d,p),N=O.beginWork,M=O.beginFailedWork,j=Ot(e,C,x).completeWork;C=Nt(e,u);var A=C.commitResetTextContent,R=C.commitPlacement,I=C.commitDeletion,D=C.commitWork,U=C.commitLifeCycles,L=C.commitAttachRef,F=C.commitDetachRef,H=e.now,B=e.scheduleDeferredCallback,K=e.cancelDeferredCallback,z=e.useSyncScheduling,q=e.prepareForCommit,G=e.resetAfterCommit,V=H(),W=2,$=0,Y=!1,Q=null,X=null,J=0,Z=null,ee=null,te=null,ne=null,re=null,oe=!1,ie=!1,ae=!1,se=null,ue=null,ce=0,le=-1,fe=!1,pe=null,de=0,he=!1,ye=!1,ge=null,me=null,ve=!1,be=!1,_e=1e3,ke=0,Ee=1;return{computeAsyncExpiration:f,computeExpirationForFiber:p,scheduleWork:d,batchedUpdates:function(e,t){var n=ve;ve=!0;try{return e(t)}finally{(ve=n)||fe||_(1,null)}},unbatchedUpdates:function(e){if(ve&&!be){be=!0;try{return e()}finally{be=!1}}return e()},flushSync:function(e){var t=ve;ve=!0;try{e:{var n=$;$=1;try{var o=e();break e}finally{$=n}o=void 0}return o}finally{ve=t,fe&&r("187"),_(1,null)}},deferredUpdates:function(e){var t=$;$=f();try{return e()}finally{$=t}}}}function Rt(e){function t(e){return e=Te(e),null===e?null:e.stateNode}var n=e.getPublicInstance;e=At(e);var o=e.computeAsyncExpiration,i=e.computeExpirationForFiber,a=e.scheduleWork;return{createContainer:function(e,t){var n=new it(3,null,0);return e={current:n,containerInfo:e,pendingChildren:null,remainingExpirationTime:0,isReadyForCommit:!1,finishedWork:null,context:null,pendingContext:null,hydrate:t,nextScheduledRoot:null},n.stateNode=e},updateContainer:function(e,t,n,s){var u=t.current;if(n){n=n._reactInternalFiber;var c;e:{for(2===ke(n)&&2===n.tag||r("170"),c=n;3!==c.tag;){if(Ze(c)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}(c=c.return)||r("171")}c=c.stateNode.context}n=Ze(n)?nt(n,c):c}else n=Pn;null===t.context?t.context=n:t.pendingContext=n,t=s,t=void 0===t?null:t,s=null!=e&&null!=e.type&&null!=e.type.prototype&&!0===e.type.prototype.unstable_isAsyncReactComponent?o():i(u),bt(u,{expirationTime:s,partialState:{element:e},callback:t,isReplace:!1,isForced:!1,nextCallback:null,next:null}),a(u,s)},batchedUpdates:e.batchedUpdates,unbatchedUpdates:e.unbatchedUpdates,deferredUpdates:e.deferredUpdates,flushSync:e.flushSync,getPublicRootInstance:function(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return n(e.child.stateNode);default:return e.child.stateNode}},findHostInstance:t,findHostInstanceWithNoPortals:function(e){return e=Se(e),null===e?null:e.stateNode},injectIntoDevTools:function(e){var n=e.findFiberByHostInstance;return ht(wn({},e,{findHostInstanceByFiber:function(e){return t(e)},findFiberByHostInstance:function(e){return n?n(e):null}}))}}}function It(e,t,n){var r=3n||r.hasOverloadedBooleanValue&&!1===n?Ft(e,t):r.mustUseProperty?e[r.propertyName]=n:(t=r.attributeName,(o=r.attributeNamespace)?e.setAttributeNS(o,t,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&!0===n?e.setAttribute(t,""):e.setAttribute(t,""+n))}else Lt(e,t,i(t,n)?n:null)}function Lt(e,t,n){Dt(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))}function Ft(e,t){var n=a(t);n?(t=n.mutationMethod)?t(e,void 0):n.mustUseProperty?e[n.propertyName]=!n.hasBooleanValue&&"":e.removeAttribute(n.attributeName):e.removeAttribute(t)}function Ht(e,t){var n=t.value,r=t.checked;return wn({type:void 0,step:void 0,min:void 0,max:void 0},t,{defaultChecked:void 0,defaultValue:void 0,value:null!=n?n:e._wrapperState.initialValue,checked:null!=r?r:e._wrapperState.initialChecked})}function Bt(e,t){var n=t.defaultValue;e._wrapperState={initialChecked:null!=t.checked?t.checked:t.defaultChecked,initialValue:null!=t.value?t.value:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Kt(e,t){null!=(t=t.checked)&&Ut(e,"checked",t)}function zt(e,t){Kt(e,t);var n=t.value;null!=n?0===n&&""===e.value?e.value="0":"number"===t.type?(t=parseFloat(e.value)||0,(n!=t||n==t&&e.value!=n)&&(e.value=""+n)):e.value!==""+n&&(e.value=""+n):(null==t.value&&null!=t.defaultValue&&e.defaultValue!==""+t.defaultValue&&(e.defaultValue=""+t.defaultValue),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked))}function qt(e,t){switch(t.type){case"submit":case"reset":break;case"color":case"date":case"datetime":case"datetime-local":case"month":case"time":case"week":e.value="",e.value=e.defaultValue;break;default:e.value=e.value}t=e.name,""!==t&&(e.name=""),e.defaultChecked=!e.defaultChecked,e.defaultChecked=!e.defaultChecked,""!==t&&(e.name=t)}function Gt(e){var t="";return bn.Children.forEach(e,function(e){null==e||"string"!==typeof e&&"number"!==typeof e||(t+=e)}),t}function Vt(e,t){return e=wn({children:void 0},t),(t=Gt(t.children))&&(e.children=t),e}function Wt(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o=t.length||r("93"),t=t[0]),n=""+t),null==n&&(n="")),e._wrapperState={initialValue:""+n}}function Xt(e,t){var n=t.value;null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&(e.defaultValue=n)),null!=t.defaultValue&&(e.defaultValue=t.defaultValue)}function Jt(e){var t=e.textContent;t===e._wrapperState.initialValue&&(e.value=t)}function Zt(e){switch(e){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 en(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Zt(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function tn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function nn(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=n,i=t[n];o=null==i||"boolean"===typeof i||""===i?"":r||"number"!==typeof i||0===i||Zo.hasOwnProperty(o)&&Zo[o]?(""+i).trim():i+"px","float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}function rn(e,t,n){t&&(ti[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML)&&r("137",e,n()),null!=t.dangerouslySetInnerHTML&&(null!=t.children&&r("60"),"object"===typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML||r("61")),null!=t.style&&"object"!==typeof t.style&&r("62",n()))}function on(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){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}}function an(e,t){e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument;var n=Ie(e);t=Qn[t];for(var r=0;r<\/script>",e=e.removeChild(e.firstChild)):e="string"===typeof t.is?n.createElement(e,{is:t.is}):n.createElement(e):e=n.createElementNS(r,e),e}function un(e,t){return(9===t.nodeType?t:t.ownerDocument).createTextNode(e)}function cn(e,t,n,r){var o=on(t,n);switch(t){case"iframe":case"object":Ne("topLoad","load",e);var i=n;break;case"video":case"audio":for(i in oi)oi.hasOwnProperty(i)&&Ne(i,oi[i],e);i=n;break;case"source":Ne("topError","error",e),i=n;break;case"img":case"image":Ne("topError","error",e),Ne("topLoad","load",e),i=n;break;case"form":Ne("topReset","reset",e),Ne("topSubmit","submit",e),i=n;break;case"details":Ne("topToggle","toggle",e),i=n;break;case"input":Bt(e,n),i=Ht(e,n),Ne("topInvalid","invalid",e),an(r,"onChange");break;case"option":i=Vt(e,n);break;case"select":$t(e,n),i=wn({},n,{value:void 0}),Ne("topInvalid","invalid",e),an(r,"onChange");break;case"textarea":Qt(e,n),i=Yt(e,n),Ne("topInvalid","invalid",e),an(r,"onChange");break;default:i=n}rn(t,i,ri);var a,s=i;for(a in s)if(s.hasOwnProperty(a)){var u=s[a];"style"===a?nn(e,u,ri):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&Jo(e,u):"children"===a?"string"===typeof u?("textarea"!==t||""!==u)&&tn(e,u):"number"===typeof u&&tn(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(Yn.hasOwnProperty(a)?null!=u&&an(r,a):o?Lt(e,a,u):null!=u&&Ut(e,a,u))}switch(t){case"input":ie(e),qt(e,n);break;case"textarea":ie(e),Jt(e,n);break;case"option":null!=n.value&&e.setAttribute("value",n.value);break;case"select":e.multiple=!!n.multiple,t=n.value,null!=t?Wt(e,!!n.multiple,t,!1):null!=n.defaultValue&&Wt(e,!!n.multiple,n.defaultValue,!0);break;default:"function"===typeof i.onClick&&(e.onclick=kn)}}function ln(e,t,n,r,o){var i=null;switch(t){case"input":n=Ht(e,n),r=Ht(e,r),i=[];break;case"option":n=Vt(e,n),r=Vt(e,r),i=[];break;case"select":n=wn({},n,{value:void 0}),r=wn({},r,{value:void 0}),i=[];break;case"textarea":n=Yt(e,n),r=Yt(e,r),i=[];break;default:"function"!==typeof n.onClick&&"function"===typeof r.onClick&&(e.onclick=kn)}rn(t,r,ri);var a,s;e=null;for(a in n)if(!r.hasOwnProperty(a)&&n.hasOwnProperty(a)&&null!=n[a])if("style"===a)for(s in t=n[a])t.hasOwnProperty(s)&&(e||(e={}),e[s]="");else"dangerouslySetInnerHTML"!==a&&"children"!==a&&"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(Yn.hasOwnProperty(a)?i||(i=[]):(i=i||[]).push(a,null));for(a in r){var u=r[a];if(t=null!=n?n[a]:void 0,r.hasOwnProperty(a)&&u!==t&&(null!=u||null!=t))if("style"===a)if(t){for(s in t)!t.hasOwnProperty(s)||u&&u.hasOwnProperty(s)||(e||(e={}),e[s]="");for(s in u)u.hasOwnProperty(s)&&t[s]!==u[s]&&(e||(e={}),e[s]=u[s])}else e||(i||(i=[]),i.push(a,e)),e=u;else"dangerouslySetInnerHTML"===a?(u=u?u.__html:void 0,t=t?t.__html:void 0,null!=u&&t!==u&&(i=i||[]).push(a,""+u)):"children"===a?t===u||"string"!==typeof u&&"number"!==typeof u||(i=i||[]).push(a,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&(Yn.hasOwnProperty(a)?(null!=u&&an(o,a),i||t===u||(i=[])):(i=i||[]).push(a,u))}return e&&(i=i||[]).push("style",e),i}function fn(e,t,n,r,o){"input"===n&&"radio"===o.type&&null!=o.name&&Kt(e,o),on(n,r),r=on(n,o);for(var i=0;i=u.hasBooleanValue+u.hasNumericValue+u.hasOverloadedBooleanValue||r("50",s),a.hasOwnProperty(s)&&(u.attributeName=a[s]),i.hasOwnProperty(s)&&(u.attributeNamespace=i[s]),e.hasOwnProperty(s)&&(u.mutationMethod=e[s]),Mn[s]=u}}},Mn={},jn=Nn,An=jn.MUST_USE_PROPERTY,Rn=jn.HAS_BOOLEAN_VALUE,In=jn.HAS_NUMERIC_VALUE,Dn=jn.HAS_POSITIVE_NUMERIC_VALUE,Un=jn.HAS_OVERLOADED_BOOLEAN_VALUE,Ln=jn.HAS_STRING_BOOLEAN_VALUE,Fn={Properties:{allowFullScreen:Rn,async:Rn,autoFocus:Rn,autoPlay:Rn,capture:Un,checked:An|Rn,cols:Dn,contentEditable:Ln,controls:Rn,default:Rn,defer:Rn,disabled:Rn,download:Un,draggable:Ln,formNoValidate:Rn,hidden:Rn,loop:Rn,multiple:An|Rn,muted:An|Rn,noValidate:Rn,open:Rn,playsInline:Rn,readOnly:Rn,required:Rn,reversed:Rn,rows:Dn,rowSpan:In,scoped:Rn,seamless:Rn,selected:An|Rn,size:Dn,start:In,span:Dn,spellCheck:Ln,style:0,tabIndex:0,itemScope:Rn,acceptCharset:0,className:0,htmlFor:0,httpEquiv:0,value:Ln},DOMAttributeNames:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},DOMMutationMethods:{value:function(e,t){if(null==t)return e.removeAttribute("value");"number"!==e.type||!1===e.hasAttribute("value")?e.setAttribute("value",""+t):e.validity&&!e.validity.badInput&&e.ownerDocument.activeElement!==e&&e.setAttribute("value",""+t)}}},Hn=jn.HAS_STRING_BOOLEAN_VALUE,Bn={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Kn={Properties:{autoReverse:Hn,externalResourcesRequired:Hn,preserveAlpha:Hn},DOMAttributeNames:{autoReverse:"autoReverse",externalResourcesRequired:"externalResourcesRequired",preserveAlpha:"preserveAlpha"},DOMAttributeNamespaces:{xlinkActuate:Bn.xlink,xlinkArcrole:Bn.xlink,xlinkHref:Bn.xlink,xlinkRole:Bn.xlink,xlinkShow:Bn.xlink,xlinkTitle:Bn.xlink,xlinkType:Bn.xlink,xmlBase:Bn.xml,xmlLang:Bn.xml,xmlSpace:Bn.xml}},zn=/[\-\:]([a-z])/g;"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 x-height xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xmlns:xlink xml:lang xml:space".split(" ").forEach(function(e){var t=e.replace(zn,s);Kn.Properties[t]=0,Kn.DOMAttributeNames[t]=e}),jn.injectDOMPropertyConfig(Fn),jn.injectDOMPropertyConfig(Kn);var qn={_caughtError:null,_hasCaughtError:!1,_rethrowError:null,_hasRethrowError:!1,injection:{injectErrorUtils:function(e){"function"!==typeof e.invokeGuardedCallback&&r("197"),u=e.invokeGuardedCallback}},invokeGuardedCallback:function(e,t,n,r,o,i,a,s,c){u.apply(qn,arguments)},invokeGuardedCallbackAndCatchFirstError:function(e,t,n,r,o,i,a,s,u){if(qn.invokeGuardedCallback.apply(this,arguments),qn.hasCaughtError()){var c=qn.clearCaughtError();qn._hasRethrowError||(qn._hasRethrowError=!0,qn._rethrowError=c)}},rethrowCaughtError:function(){return c.apply(qn,arguments)},hasCaughtError:function(){return qn._hasCaughtError},clearCaughtError:function(){if(qn._hasCaughtError){var e=qn._caughtError;return qn._caughtError=null,qn._hasCaughtError=!1,e}r("198")}},Gn=null,Vn={},Wn=[],$n={},Yn={},Qn={},Xn=Object.freeze({plugins:Wn,eventNameDispatchConfigs:$n,registrationNameModules:Yn,registrationNameDependencies:Qn,possibleRegistrationNames:null,injectEventPluginOrder:p,injectEventPluginsByName:d}),Jn=null,Zn=null,er=null,tr=null,nr={injectEventPluginOrder:p,injectEventPluginsByName:d},rr=Object.freeze({injection:nr,getListener:_,extractEvents:w,enqueueEvents:k,processEventQueue:E}),or=Math.random().toString(36).slice(2),ir="__reactInternalInstance$"+or,ar="__reactEventHandlers$"+or,sr=Object.freeze({precacheFiberNode:function(e,t){t[ir]=e},getClosestInstanceFromNode:C,getInstanceFromNode:function(e){return e=e[ir],!e||5!==e.tag&&6!==e.tag?null:e},getNodeFromInstance:x,getFiberCurrentPropsFromNode:T,updateFiberProps:function(e,t){e[ar]=t}}),ur=Object.freeze({accumulateTwoPhaseDispatches:R,accumulateTwoPhaseDispatchesSkipTarget:function(e){g(e,M)},accumulateEnterLeaveDispatches:I,accumulateDirectDispatches:function(e){g(e,A)}}),cr=null,lr={_root:null,_startText:null,_fallbackText:null},fr="dispatchConfig _targetInst nativeEvent isDefaultPrevented isPropagationStopped _dispatchListeners _dispatchInstances".split(" "),pr={type:null,target:null,currentTarget:kn.thatReturnsNull,eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};wn(F.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=kn.thatReturnsTrue)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=kn.thatReturnsTrue)},persist:function(){this.isPersistent=kn.thatReturnsTrue},isPersistent:kn.thatReturnsFalse,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;for(t=0;t=parseInt(mr.version(),10))}var vr,br=gr,_r=_n.canUseDOM&&(!hr||yr&&8=yr),wr=String.fromCharCode(32),kr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown".split(" ")}},Er=!1,Cr=!1,xr={eventTypes:kr,extractEvents:function(e,t,n,r){var o;if(hr)e:{switch(e){case"topCompositionStart":var i=kr.compositionStart;break e;case"topCompositionEnd":i=kr.compositionEnd;break e;case"topCompositionUpdate":i=kr.compositionUpdate;break e}i=void 0}else Cr?G(e,n)&&(i=kr.compositionEnd):"topKeyDown"===e&&229===n.keyCode&&(i=kr.compositionStart);return i?(_r&&(Cr||i!==kr.compositionStart?i===kr.compositionEnd&&Cr&&(o=U()):(lr._root=r,lr._startText=L(),Cr=!0)),i=z.getPooled(i,t,n,r),o?i.data=o:null!==(o=V(n))&&(i.data=o),R(i),o=i):o=null,(e=br?W(e,n):$(e,n))?(t=q.getPooled(kr.beforeInput,t,n,r),t.data=e,R(t)):t=null,[o,t]}},Tr=null,Sr=null,Pr=null,Or={injectFiberControlledHostComponent:function(e){Tr=e}},Nr=Object.freeze({injection:Or,enqueueStateRestore:Q,restoreStateIfNeeded:X}),Mr=!1,jr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};_n.canUseDOM&&(vr=document.implementation&&document.implementation.hasFeature&&!0!==document.implementation.hasFeature("",""));var Ar={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"topBlur topChange topClick topFocus topInput topKeyDown topKeyUp topSelectionChange".split(" ")}},Rr=null,Ir=null,Dr=!1;_n.canUseDOM&&(Dr=ne("input")&&(!document.documentMode||9=document.documentMode,eo={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange".split(" ")}},to=null,no=null,ro=null,oo=!1,io={eventTypes:eo,extractEvents:function(e,t,n,r){var o,i=r.window===r?r.document:9===r.nodeType?r:r.ownerDocument;if(!(o=!i)){e:{i=Ie(i),o=Qn.onSelect;for(var a=0;a=Ko-e){if(!(-1!==Ho&&Ho<=e))return void(Bo||(Bo=!0,requestAnimationFrame(Vo)));Uo.didTimeout=!0}else Uo.didTimeout=!1;Ho=-1,e=Lo,Lo=null,null!==e&&e(Uo)}},!1);var Vo=function(e){Bo=!1;var t=e-Ko+qo;tt&&(t=8),qo=t"+t+"",t=Xo.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}),Zo={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,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,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},ei=["Webkit","ms","Moz","O"];Object.keys(Zo).forEach(function(e){ei.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Zo[t]=Zo[e]})});var ti=wn({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}),ni=Qo.html,ri=kn.thatReturns(""),oi={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},ii=Object.freeze({createElement:sn,createTextNode:un,setInitialProperties:cn,diffProperties:ln,updateProperties:fn,diffHydratedProperties:pn,diffHydratedText:dn,warnForUnmatchedText:function(){},warnForDeletedHydratableElement:function(){},warnForDeletedHydratableText:function(){},warnForInsertedHydratedElement:function(){},warnForInsertedHydratedText:function(){},restoreControlledState:function(e,t,n){switch(t){case"input":if(zt(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;tr&&(o=r,r=e,e=o),o=Ue(n,e);var i=Ue(n,r);if(o&&i&&(1!==t.rangeCount||t.anchorNode!==o.node||t.anchorOffset!==o.offset||t.focusNode!==i.node||t.focusOffset!==i.offset)){var a=document.createRange();a.setStart(o.node,o.offset),t.removeAllRanges(),e>r?(t.addRange(a),t.extend(i.node,i.offset)):(a.setEnd(i.node,i.offset),t.addRange(a))}}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(Sn(n),n=0;n1)for(var n=1;n1&&void 0!==arguments[1]?arguments[1]:{};return n.chatEngine._emit(e,t,n),n.emitter.emit(e,t),n},n.on=function(e,t){return n.events[e]=n.events[e]||new l(n.chatEngine,n,e),n._on(e,t),n},n}return i(t,e),s(t,[{key:"addChild",value:function(e,t){this[e]=t,this._dataset[e]||(this._dataset[e]={}),t.parent=this,t.get=this.get.bind(this._dataset[e]),t.set=this.set.bind(this._dataset[e])}},{key:"get",value:function(e){return this[e]}},{key:"set",value:function(e,t){this[e]&&!t?delete this[e]:this[e]=t}},{key:"plugin",value:function(e){return this.plugins.push(e),e.extends&&e.extends[this.name]&&(this.addChild(e.namespace,new e.extends[this.name]),this[e.namespace].ChatEngine=this.chatEngine,this[e.namespace].construct&&this[e.namespace].construct()),this}},{key:"bindProtoPlugins",value:function(){var e=this;this.chatEngine.protoPlugins[this.name]&&this.chatEngine.protoPlugins[this.name].forEach(function(t){e.plugin(t)})}},{key:"trigger",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){},o=function(){t.runPluginQueue("on",e,function(e){e(null,n)},function(n,o){n?r(n):(t._emit(e,o),r(null,e,o))})};"object"===("undefined"===typeof n?"undefined":a(n))?(n.chat||(n.chat=this),n.sender&&"string"===typeof n.sender?(n.sender=new this.chatEngine.User(n.sender),n.sender._getState(function(){o()})):o()):o()}},{key:"runPluginQueue",value:function(e,t,n,r){var o=[];o.push(n),this.plugins.forEach(function(n){n.middleware&&n.middleware[e]&&(n.middleware[e][t]&&o.push(n.middleware[e][t]),n.middleware[e]["*"]&&o.push(n.middleware[e]["*"]))}),u(o,r)}},{key:"onConstructed",value:function(){this.bindProtoPlugins(),this.trigger(["$","created",this.name.toLowerCase()].join("."))}}]),t}(c);e.exports=f},function(e,t,n){"use strict";(function(t){function r(e,t){!o.isUndefined(e)&&o.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var o=n(0),i=n(38),a={"Content-Type":"application/x-www-form-urlencoded"},s={adapter:function(){var e;return"undefined"!==typeof XMLHttpRequest?e=n(14):"undefined"!==typeof t&&(e=n(14)),e}(),transformRequest:[function(e,t){return i(t,"Content-Type"),o.isFormData(e)||o.isArrayBuffer(e)||o.isBuffer(e)||o.isStream(e)||o.isFile(e)||o.isBlob(e)?e:o.isArrayBufferView(e)?e.buffer:o.isURLSearchParams(e)?(r(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):o.isObject(e)?(r(t,"application/json;charset=utf-8"),JSON.stringify(e)):e}],transformResponse:[function(e){if("string"===typeof e)try{e=JSON.parse(e)}catch(e){}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(e){return e>=200&&e<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},o.forEach(["delete","get","head"],function(e){s.headers[e]={}}),o.forEach(["post","put","patch"],function(e){s.headers[e]=o.merge(a)}),e.exports=s}).call(t,n(1))},function(e,t,n){"use strict";e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var o=n(55).EventEmitter2,i=function e(){var t=this;r(this,e),this.events={},this.name="RootEmitter",this.emitter=new o({wildcard:!0,newListener:!0,maxListeners:50,verboseMemoryLeak:!0}),this._emit=this.emitter.emit.bind(this.emitter),this._on=this.emitter.on.bind(this.emitter),this.on=function(e,n){return t.emitter.on(e,n),t},this.off=function(e,n){return t.emitter.off(e,n),t},this.onAny=function(e,n){return t.emitter.onAny(e,n),t},this.once=function(e,n){return t.emitter.once(e,n),t}};e.exports=i},function(e,t,n){"use strict";function r(){}e.exports=r},function(e,t,n){"use strict";var r,o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"===("undefined"===typeof window?"undefined":o(window))&&(r=window)}e.exports=r},function(e,t,n){"use strict";function r(e){return null!=e&&i(e.length)&&!o(e)}var o=n(66),i=n(28);e.exports=r},function(e,t,n){"use strict";function r(e){return null==e?void 0===e?u:s:c&&c in Object(e)?i(e):a(e)}var o=n(25),i=n(67),a=n(68),s="[object Null]",u="[object Undefined]",c=o?o.toStringTag:void 0;e.exports=r},function(e,t,n){"use strict";function r(e){return null!=e&&"object"==("undefined"===typeof e?"undefined":o(e))}var o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};e.exports=r},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r-1&&e%1==0&&e<=o}var o=9007199254740991;e.exports=r},function(e,t,n){"use strict";function r(e,t){return function(n,r,o){return e(n,t,r,o)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!==typeof t&&"function"!==typeof t?e:t}function i(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:{};r(this,t);var s=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return s.chatEngine=e,s.name="User","string"!==typeof n&&s.chatEngine.throwError(s,"trigger","construct",new Error("UUID must be of type string")),s.uuid=n,s.state={},s._stateFetched=!1,s._stateInProgress=!1,s.feed=new s.chatEngine.Chat([e.global.channel,"user",n,"read.","feed"].join("#"),!1,"Me"===s.constructor.name,{},"system"),s.direct=new s.chatEngine.Chat([e.global.channel,"user",n,"write.","direct"].join("#"),!1,"Me"===s.constructor.name,{},"system"),e.users[n]||(e.users[n]=s),s.assign(a),i=s,o(s,i)}return i(t,e),a(t,[{key:"update",value:function(e){var t=this.state||{};this.state=Object.assign(t,e)}},{key:"assign",value:function(e){this.update(e)}},{key:"_getState",value:function(e){var t=this;this._stateFetched||this._stateInProgress?e(this.state):(this._stateInProgress=!0,this.chatEngine.pubnub.getState({uuid:this.uuid,channels:[this.chatEngine.global.channel]},function(n,r){if(200===n.statusCode){var o=r.channels[t.chatEngine.global.channel];Object.keys(o).length?(t.assign(r.data),t._stateFetched=!0,e(t.state)):t.chatEngine.request("get","user_state",{user:t.uuid}).then(function(n){t.assign(n.data),t._stateFetched=!0,e(t.state)}).catch(function(e){t.chatEngine.throwError(t,"trigger","getState",e)})}else t.chatEngine.throwError(t,"trigger","getState",new Error("There was a problem getting user state from the PubNub network."))}))}}]),t}(s);e.exports=u},function(e,t,n){e.exports=n(32)},function(e,t,n){"use strict";var r=n(33),o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t.globalChannel?t.globalChannel=t.globalChannel.toString():t.globalChannel="chat-engine","undefined"===typeof t.throwErrors&&(t.throwErrors=!0),"undefined"===typeof t.enableSync&&(t.enableSync=!1),t.endpoint=t.endpoint||"https://pubsub.pubnub.com/v1/blocks/sub-key/"+e.subscribeKey+"/chat-engine-server",e.heartbeatInterval=e.heartbeatInterval||30,e.presenceTimeout=e.presenceTimeout||60,r(t,e)},i={plugin:{},create:o};e.exports=i,e.exports.ChatEngineCore=i},function(e,t,n){"use strict";var r=n(34),o=n(53),i=n(54),a=n(7),s=n(56),u=n(88),c=n(30),l=n(90);e.exports=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=new a;if(n.ceConfig=e,n.pnConfig=t,n.users={},n.chats={},n.global=!1,n.me=!1,n.pubnub=!1,n.ready=!1,n.package=i,n.throwError=function(t,n,r,o){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};if(e.throwErrors)throw console.error(i),o;i.ceError=o.toString(),t[n](["$","error",r].join("."),i)},e.debug&&n.onAny(function(e,t){console.info("debug:",e,t)}),e.profile){var f={};n.onAny(function(e,t){f["event: "+e]=f[e]||0,f["event: "+e]+=1}),setInterval(function(){f.chats=Object.keys(n.chats).length,f.users=Object.keys(n.users).length,console.table(f)},3e3)}return n.protoPlugins={},n.proto=function(e,t){n.protoPlugins[e]=n.protoPlugins[e]||[],n.protoPlugins[e].push(t)},n.request=function(t,o){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s={uuid:n.pnConfig.uuid,global:e.globalChannel,authKey:n.pnConfig.authKey},u={route:o};return s=Object.assign(s,i),u=Object.assign(u,a),"get"===t||"delete"===t?(u=Object.assign(u,s),r[t](e.endpoint,{params:u})):r[t](e.endpoint,s,{params:u})},n.parseChannel=function(e){var t=e.split("#");return{global:t[0],type:t[1],private:"private."===t[2]}},n.augmentChannel=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(new Date).getTime(),t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=e.toString(),o="public.";return t&&(o="private."),-1===r.indexOf(n.ceConfig.globalChannel)&&(r=[n.ceConfig.globalChannel,"chat",o,r].join("#")),r},n.handshake=function(t){l([function(e){n.request("post","bootstrap").then(function(){e(null)}).catch(e)},function(e){n.request("post","user_read").then(function(){e(null)}).catch(e)},function(e){n.request("post","user_write").then(function(){e(null)}).catch(e)},function(e){n.request("post","group").then(t).catch(e)}],function(t){t&&n.throwError(n,"_emit","auth",new Error("There was a problem logging into the auth server ("+e.endpoint+")."+t&&t.response&&t.response.data),{error:t})})},n.listenToPubNub=function(){n.pubnub.addListener({message:function(e){e.message.timetoken=e.timetoken,n.chats[e.channel]&&n.chats[e.channel].trigger(e.message.event,e.message)},presence:function(e){n.chats[e.channel]&&n.chats[e.channel].onPresence(e)},status:function(e){var t={PNNetworkUpCategory:"up.online",PNNetworkDownCategory:"down.offline",PNNetworkIssuesCategory:"down.issue",PNReconnectedCategory:"up.reconnected",PNConnectedCategory:"up.connected",PNAccessDeniedCategory:"down.denied",PNMalformedResponseCategory:"down.malformed",PNBadRequestCategory:"down.badrequest",PNDecryptionErrorCategory:"down.decryption",PNTimeoutCategory:"down.timeout"},r=["$","network",t[e.category]||"other"].join(".");n._emit(r,e)}})},n.subscribeToPubNub=function(){var t=[e.globalChannel+"#"+n.me.uuid+"#rooms",e.globalChannel+"#"+n.me.uuid+"#system",e.globalChannel+"#"+n.me.uuid+"#custom"];n.pubnub.subscribe({channelGroups:t,withPresence:!0})},n.firstConnect=function(t){n.pubnub=new o(n.pnConfig),n.global=new n.Chat(e.globalChannel,!1,!0,{},"system"),n.global.once("$.connected",function(){n.me=new u(n,n.pnConfig.uuid),n.me.onConstructed(),n.ceConfig.enableSync&&(n.me.session.subscribe(),n.me.session.restore()),n.me.update(t),n._emit("$.ready",{me:n.me}),n.ready=!0,n.listenToPubNub(),n.subscribeToPubNub(),n.global.getUserUpdates()})},n.disconnect=function(){n.pubnub.unsubscribeAll(),Object.keys(n.chats).forEach(function(e){n.chats[e].sleep()})},n.reconnect=function(){n.handshake(function(){Object.keys(n.chats).forEach(function(e){n.chats[e].wake()}),n.subscribeToPubNub()})},n.setAuth=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.generateUUID();n.pnConfig.authKey=e,n.pubnub.setAuthKey(e)},n.reauthorize=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o.generateUUID();n.global.once("$.disconnected",function(){n.setAuth(e),n.reconnect()}),n.disconnect()},n.connect=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.generateUUID();n.pnConfig.uuid=e,n.pnConfig.authKey=r,n.handshake(function(){n.firstConnect(t)})},n.destroy=function(){Object.keys(n.chats).forEach(function(e){n.chats[e].emitter.removeAllListeners()}),Object.keys(n.users).forEach(function(e){n.users[e].emitter.removeAllListeners()}),n.emitter.removeAllListeners()},n.Chat=function(){for(var e=arguments.length,t=Array(e),r=0;r>8-s%1*8)){if((n=o.charCodeAt(s+=.75))>255)throw new r;t=t<<8|n}return a}var i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";r.prototype=new Error,r.prototype.code=5,r.prototype.name="InvalidCharacterError",e.exports=o},function(e,t,n){"use strict";var r=n(0);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";function r(){this.handlers=[]}var o=n(0);r.prototype.use=function(e,t){return this.handlers.push({fulfilled:e,rejected:t}),this.handlers.length-1},r.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},r.prototype.forEach=function(e){o.forEach(this.handlers,function(t){null!==t&&e(t)})},e.exports=r},function(e,t,n){"use strict";function r(e){e.cancelToken&&e.cancelToken.throwIfRequested()}var o=n(0),i=n(48),a=n(16),s=n(5);e.exports=function(e){return r(e),e.headers=e.headers||{},e.data=i(e.data,e.headers,e.transformRequest),e.headers=o.merge(e.headers.common||{},e.headers[e.method]||{},e.headers||{}),o.forEach(["delete","get","head","post","put","patch","common"],function(t){delete e.headers[t]}),(e.adapter||s.adapter)(e).then(function(t){return r(e),t.data=i(t.data,t.headers,e.transformResponse),t},function(t){return a(t)||(r(e),t&&t.response&&(t.response.data=i(t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)})}},function(e,t,n){"use strict";var r=n(0);e.exports=function(e,t,n){return r.forEach(n,function(n){e=n(e,t)}),e}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";function r(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(17);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e;return{token:new r(function(t){e=t}),cancel:e}},e.exports=r},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";(function(e){var n,r,o,i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(a,s){"object"==i(t)&&"object"==i(e)?e.exports=s():(r=[],n=s,void 0!==(o="function"===typeof n?n.apply(t,r):n)&&(e.exports=o))}(0,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"===typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e){if(!navigator||!navigator.sendBeacon)return!1;navigator.sendBeacon(e)}Object.defineProperty(t,"__esModule",{value:!0});var c=n(1),l=r(c),f=n(39),p=r(f),d=n(40),h=r(d),y=n(41),g=(n(5),function(e){function t(e){o(this,t);var n=e.listenToBrowserNetworkEvents,r=void 0===n||n;e.db=h.default,e.sdkFamily="Web",e.networking=new p.default({del:y.del,get:y.get,post:y.post,sendBeacon:u});var i=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r&&(window.addEventListener("offline",function(){i.networkDownDetected()}),window.addEventListener("online",function(){i.networkUpDetected()})),i}return s(t,e),t}(l.default));t.default=g,e.exports=t.default},function(e,t,n){function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function o(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n>>2]|=(n[o>>>2]>>>24-o%4*8&255)<<24-(r+o)%4*8;else if(65535>>2]=n[o>>>2];else t.push.apply(t,n);return this.sigBytes+=e,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(t){for(var n=[],r=0;r>>2]>>>24-r%4*8&255;n.push((o>>>4).toString(16)),n.push((15&o).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new a.init(n,t/2)}},c=s.Latin1={stringify:function(e){var t=e.words;e=e.sigBytes;for(var n=[],r=0;r>>2]>>>24-r%4*8&255));return n.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new a.init(n,t)}},l=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(c.stringify(e)))}catch(e){throw Error("Malformed UTF-8 data")}},parse:function(e){return c.parse(unescape(encodeURIComponent(e)))}},f=r.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new a.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=l.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n=this._data,r=n.words,o=n.sigBytes,i=this.blockSize,s=o/(4*i),s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0);if(t=s*i,o=e.min(4*t,o),t){for(var u=0;ul;){var f;e:{f=c;for(var p=e.sqrt(f),d=2;d<=p;d++)if(!(f%d)){f=!1;break e}f=!0}f&&(8>l&&(a[l]=u(e.pow(c,.5))),s[l]=u(e.pow(c,1/3)),l++),c++}var h=[],r=r.SHA256=i.extend({_doReset:function(){this._hash=new o.init(a.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],o=n[1],i=n[2],a=n[3],u=n[4],c=n[5],l=n[6],f=n[7],p=0;64>p;p++){if(16>p)h[p]=0|e[t+p];else{var d=h[p-15],y=h[p-2];h[p]=((d<<25|d>>>7)^(d<<14|d>>>18)^d>>>3)+h[p-7]+((y<<15|y>>>17)^(y<<13|y>>>19)^y>>>10)+h[p-16]}d=f+((u<<26|u>>>6)^(u<<21|u>>>11)^(u<<7|u>>>25))+(u&c^~u&l)+s[p]+h[p],y=((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+(r&o^r&i^o&i),f=l,l=c,c=u,u=a+d|0,a=i,i=o,o=r,r=d+y|0}n[0]=n[0]+r|0,n[1]=n[1]+o|0,n[2]=n[2]+i|0,n[3]=n[3]+a|0,n[4]=n[4]+u|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+f|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;return n[o>>>5]|=128<<24-o%32,n[14+(o+64>>>9<<4)]=e.floor(r/4294967296),n[15+(o+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}});t.SHA256=i._createHelper(r),t.HmacSHA256=i._createHmacHelper(r)}(Math),function(){var e=n,t=e.enc.Utf8;e.algo.HMAC=e.lib.Base.extend({init:function(e,n){e=this._hasher=new e.init,"string"==typeof n&&(n=t.parse(n));var r=e.blockSize,o=4*r;n.sigBytes>o&&(n=e.finalize(n)),n.clamp();for(var i=this._oKey=n.clone(),a=this._iKey=n.clone(),s=i.words,u=a.words,c=0;c>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,a=0;4>a&&o+.75*a>>6*(3-a)&63));if(t=r.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var n=e.length,r=this._map,o=r.charAt(64);o&&-1!=(o=e.indexOf(o))&&(n=o);for(var o=[],i=0,a=0;a>>6-a%4*2;o[i>>>2]|=(s|u)<<24-i%4*8,i++}return t.create(o,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(e){function t(e,t,n,r,o,i,a){return((e=e+(t&n|~t&r)+o+a)<>>32-i)+t}function r(e,t,n,r,o,i,a){return((e=e+(t&r|n&~r)+o+a)<>>32-i)+t}function o(e,t,n,r,o,i,a){return((e=e+(t^n^r)+o+a)<>>32-i)+t}function i(e,t,n,r,o,i,a){return((e=e+(n^(t|~r))+o+a)<>>32-i)+t}for(var a=n,s=a.lib,u=s.WordArray,c=s.Hasher,s=a.algo,l=[],f=0;64>f;f++)l[f]=4294967296*e.abs(e.sin(f+1))|0;s=s.MD5=c.extend({_doReset:function(){this._hash=new u.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,n){for(var a=0;16>a;a++){var s=n+a,u=e[s];e[s]=16711935&(u<<8|u>>>24)|4278255360&(u<<24|u>>>8)}var a=this._hash.words,s=e[n+0],u=e[n+1],c=e[n+2],f=e[n+3],p=e[n+4],d=e[n+5],h=e[n+6],y=e[n+7],g=e[n+8],m=e[n+9],v=e[n+10],b=e[n+11],_=e[n+12],w=e[n+13],k=e[n+14],E=e[n+15],C=a[0],x=a[1],T=a[2],S=a[3],C=t(C,x,T,S,s,7,l[0]),S=t(S,C,x,T,u,12,l[1]),T=t(T,S,C,x,c,17,l[2]),x=t(x,T,S,C,f,22,l[3]),C=t(C,x,T,S,p,7,l[4]),S=t(S,C,x,T,d,12,l[5]),T=t(T,S,C,x,h,17,l[6]),x=t(x,T,S,C,y,22,l[7]),C=t(C,x,T,S,g,7,l[8]),S=t(S,C,x,T,m,12,l[9]),T=t(T,S,C,x,v,17,l[10]),x=t(x,T,S,C,b,22,l[11]),C=t(C,x,T,S,_,7,l[12]),S=t(S,C,x,T,w,12,l[13]),T=t(T,S,C,x,k,17,l[14]),x=t(x,T,S,C,E,22,l[15]),C=r(C,x,T,S,u,5,l[16]),S=r(S,C,x,T,h,9,l[17]),T=r(T,S,C,x,b,14,l[18]),x=r(x,T,S,C,s,20,l[19]),C=r(C,x,T,S,d,5,l[20]),S=r(S,C,x,T,v,9,l[21]),T=r(T,S,C,x,E,14,l[22]),x=r(x,T,S,C,p,20,l[23]),C=r(C,x,T,S,m,5,l[24]),S=r(S,C,x,T,k,9,l[25]),T=r(T,S,C,x,f,14,l[26]),x=r(x,T,S,C,g,20,l[27]),C=r(C,x,T,S,w,5,l[28]),S=r(S,C,x,T,c,9,l[29]),T=r(T,S,C,x,y,14,l[30]),x=r(x,T,S,C,_,20,l[31]),C=o(C,x,T,S,d,4,l[32]),S=o(S,C,x,T,g,11,l[33]),T=o(T,S,C,x,b,16,l[34]),x=o(x,T,S,C,k,23,l[35]),C=o(C,x,T,S,u,4,l[36]),S=o(S,C,x,T,p,11,l[37]),T=o(T,S,C,x,y,16,l[38]),x=o(x,T,S,C,v,23,l[39]),C=o(C,x,T,S,w,4,l[40]),S=o(S,C,x,T,s,11,l[41]),T=o(T,S,C,x,f,16,l[42]),x=o(x,T,S,C,h,23,l[43]),C=o(C,x,T,S,m,4,l[44]),S=o(S,C,x,T,_,11,l[45]),T=o(T,S,C,x,E,16,l[46]),x=o(x,T,S,C,c,23,l[47]),C=i(C,x,T,S,s,6,l[48]),S=i(S,C,x,T,y,10,l[49]),T=i(T,S,C,x,k,15,l[50]),x=i(x,T,S,C,d,21,l[51]),C=i(C,x,T,S,_,6,l[52]),S=i(S,C,x,T,f,10,l[53]),T=i(T,S,C,x,v,15,l[54]),x=i(x,T,S,C,u,21,l[55]),C=i(C,x,T,S,g,6,l[56]),S=i(S,C,x,T,E,10,l[57]),T=i(T,S,C,x,h,15,l[58]),x=i(x,T,S,C,w,21,l[59]),C=i(C,x,T,S,p,6,l[60]),S=i(S,C,x,T,b,10,l[61]),T=i(T,S,C,x,c,15,l[62]),x=i(x,T,S,C,m,21,l[63]);a[0]=a[0]+C|0,a[1]=a[1]+x|0,a[2]=a[2]+T|0,a[3]=a[3]+S|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;n[o>>>5]|=128<<24-o%32;var i=e.floor(r/4294967296);for(n[15+(o+64>>>9<<4)]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),n[14+(o+64>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(n.length+1),this._process(),t=this._hash,n=t.words,r=0;4>r;r++)o=n[r],n[r]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8);return t},clone:function(){var e=c.clone.call(this);return e._hash=this._hash.clone(),e}}),a.MD5=c._createHelper(s),a.HmacMD5=c._createHmacHelper(s)}(Math),function(){var e=n,t=e.lib,r=t.Base,o=t.WordArray,t=e.algo,i=t.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:t.MD5,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=n.hasher.create(),i=o.create(),a=i.words,s=n.keySize,n=n.iterations;a.length>>2]}},r.BlockCipher=c.extend({cfg:c.cfg.extend({mode:l,padding:p}),reset:function(){c.reset.call(this);var e=this.cfg,t=e.iv,e=e.mode;if(this._xformMode==this._ENC_XFORM_MODE)var n=e.createEncryptor;else n=e.createDecryptor,this._minBufferSize=1;this._mode=n.call(e,this,t&&t.words)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){e.pad(this._data,this.blockSize);var t=this._process(!0)}else t=this._process(!0),e.unpad(t);return t},blockSize:4});var d=r.CipherParams=o.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),l=(t.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return e=e.salt,(e?i.create([1398893684,1701076831]).concat(e).concat(t):t).toString(s)},parse:function(e){e=s.parse(e);var t=e.words;if(1398893684==t[0]&&1701076831==t[1]){var n=i.create(t.slice(2,4));t.splice(0,4),e.sigBytes-=16}return d.create({ciphertext:e,salt:n})}},h=r.SerializableCipher=o.extend({cfg:o.extend({format:l}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var o=e.createEncryptor(n,r);return t=o.finalize(t),o=o.cfg,d.create({ciphertext:t,key:n,iv:o.iv,algorithm:e,mode:o.mode,padding:o.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),t=(t.kdf={}).OpenSSL={execute:function(e,t,n,r){return r||(r=i.random(8)),e=u.create({keySize:t+n}).compute(e,r),n=i.create(e.words.slice(t),4*n),e.sigBytes=4*t,d.create({key:e,iv:n,salt:r})}},y=r.PasswordBasedCipher=h.extend({cfg:h.cfg.extend({kdf:t}),encrypt:function(e,t,n,r){return r=this.cfg.extend(r),n=r.kdf.execute(n,e.keySize,e.ivSize),r.iv=n.iv,e=h.encrypt.call(this,e,t,n.key,r),e.mixIn(n),e},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),n=r.kdf.execute(n,e.keySize,e.ivSize,t.salt),r.iv=n.iv,h.decrypt.call(this,e,t,n.key,r)}})}(),function(){for(var e=n,t=e.lib.BlockCipher,r=e.algo,o=[],i=[],a=[],s=[],u=[],c=[],l=[],f=[],p=[],d=[],h=[],y=0;256>y;y++)h[y]=128>y?y<<1:y<<1^283;for(var g=0,m=0,y=0;256>y;y++){var v=m^m<<1^m<<2^m<<3^m<<4,v=v>>>8^255&v^99;o[g]=v,i[v]=g;var b=h[g],_=h[b],w=h[_],k=257*h[v]^16843008*v;a[g]=k<<24|k>>>8,s[g]=k<<16|k>>>16,u[g]=k<<8|k>>>24,c[g]=k,k=16843009*w^65537*_^257*b^16843008*g,l[v]=k<<24|k>>>8,f[v]=k<<16|k>>>16,p[v]=k<<8|k>>>24,d[v]=k,g?(g=b^h[h[h[w^b]]],m^=h[h[m]]):g=m=1}var E=[0,1,2,4,8,16,32,64,128,27,54],r=r.AES=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes/4,e=4*((this._nRounds=n+6)+1),r=this._keySchedule=[],i=0;i>>24]<<24|o[a>>>16&255]<<16|o[a>>>8&255]<<8|o[255&a]):(a=a<<8|a>>>24,a=o[a>>>24]<<24|o[a>>>16&255]<<16|o[a>>>8&255]<<8|o[255&a],a^=E[i/n|0]<<24),r[i]=r[i-n]^a}for(t=this._invKeySchedule=[],n=0;nn||4>=i?a:l[o[a>>>24]]^f[o[a>>>16&255]]^p[o[a>>>8&255]]^d[o[255&a]]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,u,c,o)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,f,p,d,i),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,o,i,a,s){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],f=e[t+2]^n[2],p=e[t+3]^n[3],d=4,h=1;h>>24]^o[l>>>16&255]^i[f>>>8&255]^a[255&p]^n[d++],g=r[l>>>24]^o[f>>>16&255]^i[p>>>8&255]^a[255&c]^n[d++],m=r[f>>>24]^o[p>>>16&255]^i[c>>>8&255]^a[255&l]^n[d++],p=r[p>>>24]^o[c>>>16&255]^i[l>>>8&255]^a[255&f]^n[d++],c=y,l=g,f=m;y=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[f>>>8&255]<<8|s[255&p])^n[d++],g=(s[l>>>24]<<24|s[f>>>16&255]<<16|s[p>>>8&255]<<8|s[255&c])^n[d++],m=(s[f>>>24]<<24|s[p>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^n[d++],p=(s[p>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&f])^n[d++],e[t]=y,e[t+1]=g,e[t+2]=m,e[t+3]=p},keySize:8});e.AES=t._createHelper(r)}(),n.mode.ECB=function(){var e=n.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e}(),e.exports=n},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=a){var u={};u.category=g.default.PNRequestMessageCountExceededCategory,u.operation=e.operation,this._listenerManager.announceStatus(u)}o.forEach(function(e){var t=e.channel,r=e.subscriptionMatch,o=e.publishMetaData;if(t===r&&(r=null),s){if(n._dedupingManager.isDuplicate(e))return;n._dedupingManager.addEntry(e)}if(h.default.endsWith(e.channel,"-pnpres")){var i={};i.channel=null,i.subscription=null,i.actualChannel=null!=r?t:null,i.subscribedChannel=null!=r?r:t,t&&(i.channel=t.substring(0,t.lastIndexOf("-pnpres"))),r&&(i.subscription=r.substring(0,r.lastIndexOf("-pnpres"))),i.action=e.payload.action,i.state=e.payload.data,i.timetoken=o.publishTimetoken,i.occupancy=e.payload.occupancy,i.uuid=e.payload.uuid,i.timestamp=e.payload.timestamp,e.payload.join&&(i.join=e.payload.join),e.payload.leave&&(i.leave=e.payload.leave),e.payload.timeout&&(i.timeout=e.payload.timeout),n._listenerManager.announcePresence(i)}else{var a={};a.channel=null,a.subscription=null,a.actualChannel=null!=r?t:null,a.subscribedChannel=null!=r?r:t,a.channel=t,a.subscription=r,a.timetoken=o.publishTimetoken,a.publisher=e.issuingClientId,e.userMetadata&&(a.userMetadata=e.userMetadata),n._config.cipherKey?a.message=n._crypto.decrypt(e.payload):a.message=e.payload,n._listenerManager.announceMessage(a)}}),this._region=t.metadata.region,this._startSubscribeLoop()}},{key:"_stopSubscribeLoop",value:function(){this._subscribeCall&&("function"==typeof this._subscribeCall.abort&&this._subscribeCall.abort(),this._subscribeCall=null)}}]),e}();t.default=m,e.exports=t.default},function(e,t,n){function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n=this._config.maximumCacheSize&&this.hashHistory.shift(),this.hashHistory.push(this.getKey(e))}},{key:"clearHistory",value:function(){this.hashHistory=[]}}]),e}();t.default=s,e.exports=t.default},function(e,t){function n(e){var t=[];return Object.keys(e).forEach(function(e){return t.push(e)}),t}function r(e){return encodeURIComponent(e).replace(/[!~*'()]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function o(e){return n(e).sort()}function i(e){return o(e).map(function(t){return t+"="+r(e[t])}).join("&")}function a(e,t){return-1!==e.indexOf(t,this.length-t.length)}function s(){var e=void 0,t=void 0;return{promise:new Promise(function(n,r){e=n,t=r}),reject:t,fulfill:e}}e.exports={signPamFromParams:i,endsWith:a,createPromise:s,encodeString:r}},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=("undefined"===typeof t?"undefined":i(t))&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+("undefined"===typeof t?"undefined":i(t)));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function u(e,t){return e.type=t,e.error=!0,e}function c(e){return u({message:e},"validationError")}function l(e,t,n){return e.usePost&&e.usePost(t,n)?e.postURL(t,n):e.getURL(t,n)}function f(e){if(e.sdkName)return e.sdkName;var t="PubNub-JS-"+e.sdkFamily;return e.partnerId&&(t+="-"+e.partnerId),t+="/"+e.getVersion()}function p(e,t,n){var r=e.config,o=e.crypto;n.timestamp=Math.floor((new Date).getTime()/1e3);var i=r.subscribeKey+"\n"+r.publishKey+"\n"+t+"\n";i+=g.default.signPamFromParams(n);var a=o.HMACSHA256(i);a=a.replace(/\+/g,"-"),a=a.replace(/\//g,"_"),n.signature=a}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=e.networking,r=e.config,o=null,i=null,a={};t.getOperation()===b.default.PNTimeOperation||t.getOperation()===b.default.PNChannelGroupsOperation?o=arguments.length<=2?void 0:arguments[2]:(a=arguments.length<=2?void 0:arguments[2],o=arguments.length<=3?void 0:arguments[3]),"undefined"==typeof Promise||o||(i=g.default.createPromise());var s=t.validateParams(e,a);if(!s){var u=t.prepareParams(e,a),d=l(t,e,a),y=void 0,m={url:d,operation:t.getOperation(),timeout:t.getRequestTimeout(e)};u.uuid=r.UUID,u.pnsdk=f(r),r.useInstanceId&&(u.instanceid=r.instanceId),r.useRequestId&&(u.requestid=h.default.createUUID()),t.isAuthSupported()&&r.getAuthKey()&&(u.auth=r.getAuthKey()),r.secretKey&&p(e,d,u);var v=function(n,r){if(n.error)return void(o?o(n):i&&i.reject(new _("PubNub call failed, check status for details",n)));var s=t.handleResponse(e,r,a);o?o(n,s):i&&i.fulfill(s)};if(t.usePost&&t.usePost(e,a)){var w=t.postPayload(e,a);y=n.POST(u,w,m,v)}else y=t.useDelete&&t.useDelete()?n.DELETE(u,m,v):n.GET(u,m,v);return t.getOperation()===b.default.PNSubscribeOperation?y:i?i.promise:void 0}return o?o(c(s)):i?(i.reject(new _("Validation failed, check status for details",c(s))),i.promise):void 0};var d=n(3),h=r(d),y=(n(5),n(15)),g=r(y),m=n(2),v=(r(m),n(13)),b=r(v),_=function(e){function t(e,n){o(this,t);var r=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.name=r.constructor.name,r.status=n,r.message=e,r}return s(t,e),t}(Error);e.exports=t.default},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNAddChannelsToGroupOperation}function i(e,t){var n=t.channels,r=t.channelGroup,o=e.config;return r?n&&0!==n.length?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"}function a(e,t){var n=t.channelGroup;return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group/"+h.default.encodeString(n)}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channels;return{add:(void 0===n?[]:n).join(",")}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNRemoveChannelsFromGroupOperation}function i(e,t){var n=t.channels,r=t.channelGroup,o=e.config;return r?n&&0!==n.length?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing Channel Group"}function a(e,t){var n=t.channelGroup;return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group/"+h.default.encodeString(n)}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channels;return{remove:(void 0===n?[]:n).join(",")}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNRemoveGroupOperation}function i(e,t){var n=t.channelGroup,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"}function a(e,t){var n=t.channelGroup;return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group/"+h.default.encodeString(n)+"/remove"}function s(){return!0}function u(e){return e.config.getTransactionTimeout()}function c(){return{}}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.isAuthSupported=s,t.getRequestTimeout=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(){return f.default.PNChannelGroupsOperation}function o(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function i(e){return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group"}function a(e){return e.config.getTransactionTimeout()}function s(){return!0}function u(){return{}}function c(e,t){return{groups:t.payload.groups}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=o,t.getURL=i,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),f=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNChannelsForGroupOperation}function i(e,t){var n=t.channelGroup,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channel Group"}function a(e,t){var n=t.channelGroup;return"/v1/channel-registration/sub-key/"+e.config.subscribeKey+"/channel-group/"+h.default.encodeString(n)}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(){return{}}function l(e,t){return{channels:t.payload.channels}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(){return f.default.PNPushNotificationEnabledChannelsOperation}function o(e,t){var n=t.device,r=t.pushGateway,o=t.channels,i=e.config;return n?r?o&&0!==o.length?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function i(e,t){var n=t.device;return"/v1/push/sub-key/"+e.config.subscribeKey+"/devices/"+n}function a(e){return e.config.getTransactionTimeout()}function s(){return!0}function u(e,t){var n=t.pushGateway,r=t.channels;return{type:n,add:(void 0===r?[]:r).join(",")}}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=o,t.getURL=i,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),f=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){function r(){return f.default.PNPushNotificationEnabledChannelsOperation}function o(e,t){var n=t.device,r=t.pushGateway,o=t.channels,i=e.config;return n?r?o&&0!==o.length?i.subscribeKey?void 0:"Missing Subscribe Key":"Missing Channels":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function i(e,t){var n=t.device;return"/v1/push/sub-key/"+e.config.subscribeKey+"/devices/"+n}function a(e){return e.config.getTransactionTimeout()}function s(){return!0}function u(e,t){var n=t.pushGateway,r=t.channels;return{type:n,remove:(void 0===r?[]:r).join(",")}}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=o,t.getURL=i,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),f=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){function r(){return f.default.PNPushNotificationEnabledChannelsOperation}function o(e,t){var n=t.device,r=t.pushGateway,o=e.config;return n?r?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function i(e,t){var n=t.device;return"/v1/push/sub-key/"+e.config.subscribeKey+"/devices/"+n}function a(e){return e.config.getTransactionTimeout()}function s(){return!0}function u(e,t){return{type:t.pushGateway}}function c(e,t){return{channels:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=o,t.getURL=i,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),f=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){function r(){return f.default.PNRemoveAllPushNotificationsOperation}function o(e,t){var n=t.device,r=t.pushGateway,o=e.config;return n?r?o.subscribeKey?void 0:"Missing Subscribe Key":"Missing GW Type (pushGateway: gcm or apns)":"Missing Device ID (device)"}function i(e,t){var n=t.device;return"/v1/push/sub-key/"+e.config.subscribeKey+"/devices/"+n+"/remove"}function a(e){return e.config.getTransactionTimeout()}function s(){return!0}function u(e,t){return{type:t.pushGateway}}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=o,t.getURL=i,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),f=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNUnsubscribeOperation}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var n=e.config,r=t.channels,o=void 0===r?[]:r,i=o.length>0?o.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+h.default.encodeString(i)+"/leave"}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,o={};return r.length>0&&(o["channel-group"]=r.join(",")),o}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(){return f.default.PNWhereNowOperation}function o(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function i(e,t){var n=e.config,r=t.uuid,o=void 0===r?n.UUID:r;return"/v2/presence/sub-key/"+n.subscribeKey+"/uuid/"+o}function a(e){return e.config.getTransactionTimeout()}function s(){return!0}function u(){return{}}function c(e,t){return t.payload?{channels:t.payload.channels}:{channels:[]}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=o,t.getURL=i,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),f=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNHeartbeatOperation}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var n=e.config,r=t.channels,o=void 0===r?[]:r,i=o.length>0?o.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+h.default.encodeString(i)+"/heartbeat"}function s(){return!0}function u(e){return e.config.getTransactionTimeout()}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,o=t.state,i=void 0===o?{}:o,a=e.config,s={};return r.length>0&&(s["channel-group"]=r.join(",")),s.state=JSON.stringify(i),s.heartbeat=a.getPresenceTimeout(),s}function l(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.isAuthSupported=s,t.getRequestTimeout=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNGetStateOperation}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var n=e.config,r=t.uuid,o=void 0===r?n.UUID:r,i=t.channels,a=void 0===i?[]:i,s=a.length>0?a.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+h.default.encodeString(s)+"/uuid/"+o}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,o={};return r.length>0&&(o["channel-group"]=r.join(",")),o}function l(e,t,n){var r=n.channels,o=void 0===r?[]:r,i=n.channelGroups,a=void 0===i?[]:i,s={};return 1===o.length&&0===a.length?s[o[0]]=t.payload:s=t.payload,{channels:s}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNSetStateOperation}function i(e,t){var n=e.config,r=t.state,o=t.channels,i=void 0===o?[]:o,a=t.channelGroups,s=void 0===a?[]:a;return r?n.subscribeKey?0===i.length&&0===s.length?"Please provide a list of channels and/or channel-groups":void 0:"Missing Subscribe Key":"Missing State"}function a(e,t){var n=e.config,r=t.channels,o=void 0===r?[]:r,i=o.length>0?o.join(","):",";return"/v2/presence/sub-key/"+n.subscribeKey+"/channel/"+h.default.encodeString(i)+"/uuid/"+n.UUID+"/data"}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.state,r=t.channelGroups,o=void 0===r?[]:r,i={};return i.state=JSON.stringify(n),o.length>0&&(i["channel-group"]=o.join(",")),i}function l(e,t){return{state:t.payload}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNHereNowOperation}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var n=e.config,r=t.channels,o=void 0===r?[]:r,i=t.channelGroups,a=void 0===i?[]:i,s="/v2/presence/sub-key/"+n.subscribeKey;if(o.length>0||a.length>0){var u=o.length>0?o.join(","):",";s+="/channel/"+h.default.encodeString(u)}return s}function s(e){return e.config.getTransactionTimeout()}function u(){return!0}function c(e,t){var n=t.channelGroups,r=void 0===n?[]:n,o=t.includeUUIDs,i=void 0===o||o,a=t.includeState,s=void 0!==a&&a,u={};return i||(u.disable_uuids=1),s&&(u.state=1),r.length>0&&(u["channel-group"]=r.join(",")),u}function l(e,t,n){var r=n.channels,o=void 0===r?[]:r,i=n.channelGroups,a=void 0===i?[]:i,s=n.includeUUIDs,u=void 0===s||s,c=n.includeState,l=void 0!==c&&c;return o.length>1||a.length>0||0===a.length&&0===o.length?function(){var e={};return e.totalChannels=t.payload.total_channels,e.totalOccupancy=t.payload.total_occupancy,e.channels={},Object.keys(t.payload.channels).forEach(function(n){var r=t.payload.channels[n],o=[];return e.channels[n]={occupants:o,name:n,occupancy:r.occupancy},u&&r.uuids.forEach(function(e){l?o.push({state:e.state,uuid:e.uuid}):o.push({state:null,uuid:e})}),e}),e}():function(){var e={},n=[];return e.totalChannels=1,e.totalOccupancy=t.occupancy,e.channels={},e.channels[o[0]]={occupants:n,name:o[0],occupancy:t.occupancy},u&&t.uuids&&t.uuids.forEach(function(e){l?n.push({state:e.state,uuid:e.uuid}):n.push({state:null,uuid:e})}),e}()}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(){return f.default.PNAccessManagerAudit}function o(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function i(e){return"/v2/auth/audit/sub-key/"+e.config.subscribeKey}function a(e){return e.config.getTransactionTimeout()}function s(){return!1}function u(e,t){var n=t.channel,r=t.channelGroup,o=t.authKeys,i=void 0===o?[]:o,a={};return n&&(a.channel=n),r&&(a["channel-group"]=r),i.length>0&&(a.auth=i.join(",")),a}function c(e,t){return t.payload}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=o,t.getURL=i,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),f=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){function r(){return f.default.PNAccessManagerGrant}function o(e){var t=e.config;return t.subscribeKey?t.publishKey?t.secretKey?void 0:"Missing Secret Key":"Missing Publish Key":"Missing Subscribe Key"}function i(e){return"/v2/auth/grant/sub-key/"+e.config.subscribeKey}function a(e){return e.config.getTransactionTimeout()}function s(){return!1}function u(e,t){var n=t.channels,r=void 0===n?[]:n,o=t.channelGroups,i=void 0===o?[]:o,a=t.ttl,s=t.read,u=void 0!==s&&s,c=t.write,l=void 0!==c&&c,f=t.manage,p=void 0!==f&&f,d=t.authKeys,h=void 0===d?[]:d,y={};return y.r=u?"1":"0",y.w=l?"1":"0",y.m=p?"1":"0",r.length>0&&(y.channel=r.join(",")),i.length>0&&(y["channel-group"]=i.join(",")),h.length>0&&(y.auth=h.join(",")),(a||0===a)&&(y.ttl=a),y}function c(){return{}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=r,t.validateParams=o,t.getURL=i,t.getRequestTimeout=a,t.isAuthSupported=s,t.prepareParams=u,t.handleResponse=c;var l=(n(5),n(13)),f=function(e){return e&&e.__esModule?e:{default:e}}(l)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=e.crypto,r=e.config,o=JSON.stringify(t);return r.cipherKey&&(o=n.encrypt(o),o=JSON.stringify(o)),o}function a(){return v.default.PNPublishOperation}function s(e,t){var n=e.config,r=t.message;return t.channel?r?n.subscribeKey?void 0:"Missing Subscribe Key":"Missing Message":"Missing Channel"}function u(e,t){var n=t.sendByPost;return void 0!==n&&n}function c(e,t){var n=e.config,r=t.channel,i=t.message,a=o(e,i);return"/publish/"+n.publishKey+"/"+n.subscribeKey+"/0/"+_.default.encodeString(r)+"/0/"+_.default.encodeString(a)}function l(e,t){var n=e.config,r=t.channel;return"/publish/"+n.publishKey+"/"+n.subscribeKey+"/0/"+_.default.encodeString(r)+"/0"}function f(e){return e.config.getTransactionTimeout()}function p(){return!0}function d(e,t){return o(e,t.message)}function h(e,t){var n=t.meta,r=t.replicate,o=void 0===r||r,i=t.storeInHistory,a=t.ttl,s={};return null!=i&&(s.store=i?"1":"0"),a&&(s.ttl=a),!1===o&&(s.norep="true"),n&&"object"===(void 0===n?"undefined":g(n))&&(s.meta=JSON.stringify(n)),s}function y(e,t){return{timetoken:t[2]}}Object.defineProperty(t,"__esModule",{value:!0});var g="function"==typeof Symbol&&"symbol"==i(Symbol.iterator)?function(e){return"undefined"===typeof e?"undefined":i(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"===typeof e?"undefined":i(e)};t.getOperation=a,t.validateParams=s,t.usePost=u,t.getURL=c,t.postURL=l,t.getRequestTimeout=f,t.isAuthSupported=p,t.postPayload=d,t.prepareParams=h,t.handleResponse=y;var m=(n(5),n(13)),v=r(m),b=n(15),_=r(b)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=e.config,r=e.crypto;if(!n.cipherKey)return t;try{return r.decrypt(t)}catch(e){return t}}function i(){return d.default.PNHistoryOperation}function a(e,t){var n=t.channel,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"}function s(e,t){var n=t.channel;return"/v2/history/sub-key/"+e.config.subscribeKey+"/channel/"+y.default.encodeString(n)}function u(e){return e.config.getTransactionTimeout()}function c(){return!0}function l(e,t){var n=t.start,r=t.end,o=t.reverse,i=t.count,a=void 0===i?100:i,s=t.stringifiedTimeToken,u=void 0!==s&&s,c={include_token:"true"};return c.count=a,n&&(c.start=n),r&&(c.end=r),u&&(c.string_message_token="true"),null!=o&&(c.reverse=o.toString()),c}function f(e,t){var n={messages:[],startTimeToken:t[1],endTimeToken:t[2]};return t[0].forEach(function(t){var r={timetoken:t.timetoken,entry:o(e,t.message)};n.messages.push(r)}),n}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=a,t.getURL=s,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=l,t.handleResponse=f;var p=(n(5),n(13)),d=r(p),h=n(15),y=r(h)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return d.default.PNDeleteMessagesOperation}function i(e,t){var n=t.channel,r=e.config;return n?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channel"}function a(){return!0}function s(e,t){var n=t.channel;return"/v3/history/sub-key/"+e.config.subscribeKey+"/channel/"+y.default.encodeString(n)}function u(e){return e.config.getTransactionTimeout()}function c(){return!0}function l(e,t){var n=t.start,r=t.end,o={};return n&&(o.start=n),r&&(o.end=r),o}function f(e,t){return t.payload}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.useDelete=a,t.getURL=s,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=l,t.handleResponse=f;var p=(n(5),n(13)),d=r(p),h=n(15),y=r(h)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){var n=e.config,r=e.crypto;if(!n.cipherKey)return t;try{return r.decrypt(t)}catch(e){return t}}function i(){return d.default.PNFetchMessagesOperation}function a(e,t){var n=t.channels,r=e.config;return n&&0!==n.length?r.subscribeKey?void 0:"Missing Subscribe Key":"Missing channels"}function s(e,t){var n=t.channels,r=void 0===n?[]:n,o=e.config,i=r.length>0?r.join(","):",";return"/v3/history/sub-key/"+o.subscribeKey+"/channel/"+y.default.encodeString(i)}function u(e){return e.config.getTransactionTimeout()}function c(){return!0}function l(e,t){var n=t.start,r=t.end,o=t.count,i={};return o&&(i.max=o),n&&(i.start=n),r&&(i.end=r),i}function f(e,t){var n={channels:{}};return Object.keys(t.channels||{}).forEach(function(r){n.channels[r]=[],(t.channels[r]||[]).forEach(function(t){var i={};i.channel=r,i.subscription=null,i.timetoken=t.timetoken,i.message=o(e,t.message),n.channels[r].push(i)})}),n}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=i,t.validateParams=a,t.getURL=s,t.getRequestTimeout=u,t.isAuthSupported=c,t.prepareParams=l,t.handleResponse=f;var p=(n(5),n(13)),d=r(p),h=n(15),y=r(h)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(){return p.default.PNSubscribeOperation}function i(e){if(!e.config.subscribeKey)return"Missing Subscribe Key"}function a(e,t){var n=e.config,r=t.channels,o=void 0===r?[]:r,i=o.length>0?o.join(","):",";return"/v2/subscribe/"+n.subscribeKey+"/"+h.default.encodeString(i)+"/0"}function s(e){return e.config.getSubscribeTimeout()}function u(){return!0}function c(e,t){var n=e.config,r=t.channelGroups,o=void 0===r?[]:r,i=t.timetoken,a=t.filterExpression,s=t.region,u={heartbeat:n.getPresenceTimeout()};return o.length>0&&(u["channel-group"]=o.join(",")),a&&a.length>0&&(u["filter-expr"]=a),i&&(u.tt=i),s&&(u.tr=s),u}function l(e,t){var n=[];t.m.forEach(function(e){var t={publishTimetoken:e.p.t,region:e.p.r},r={shard:parseInt(e.a,10),subscriptionMatch:e.b,channel:e.c,payload:e.d,flags:e.f,issuingClientId:e.i,subscribeKey:e.k,originationTimetoken:e.o,userMetadata:e.u,publishMetaData:t};n.push(r)});var r={timetoken:t.t.t,region:t.t.r};return{messages:n,metadata:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.getOperation=o,t.validateParams=i,t.getURL=a,t.getRequestTimeout=s,t.isAuthSupported=u,t.prepareParams=c,t.handleResponse=l;var f=(n(5),n(13)),p=r(f),d=n(15),h=r(d)},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n=this._maxSubDomain&&(this._currentSubDomain=1),e=this._currentSubDomain.toString(),this._providedFQDN.replace("pubsub","ps"+e)}},{key:"hasModule",value:function(e){return e in this._modules}},{key:"shiftStandardOrigin",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._standardOrigin=this.nextOrigin(e),this._standardOrigin}},{key:"getStandardOrigin",value:function(){return this._standardOrigin}},{key:"POST",value:function(e,t,n,r){return this._modules.post(e,t,n,r)}},{key:"GET",value:function(e,t,n){return this._modules.get(e,t,n)}},{key:"DELETE",value:function(e,t,n){return this._modules.del(e,t,n)}},{key:"_detectErrorCategory",value:function(e){if("ENOTFOUND"===e.code)return u.default.PNNetworkIssuesCategory;if("ECONNREFUSED"===e.code)return u.default.PNNetworkIssuesCategory;if("ECONNRESET"===e.code)return u.default.PNNetworkIssuesCategory;if("EAI_AGAIN"===e.code)return u.default.PNNetworkIssuesCategory;if(0===e.status||e.hasOwnProperty("status")&&void 0===e.status)return u.default.PNNetworkIssuesCategory;if(e.timeout)return u.default.PNTimeoutCategory;if(e.response){if(e.response.badRequest)return u.default.PNBadRequestCategory;if(e.response.forbidden)return u.default.PNAccessDeniedCategory}return u.default.PNUnknownCategory}}]),e}());t.default=c,e.exports=t.default},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={get:function(e){try{return localStorage.getItem(e)}catch(e){return null}},set:function(e,t){try{return localStorage.setItem(e,t)}catch(e){return null}}},e.exports=t.default},function(e,t,n){function r(e){var t=(new Date).getTime(),n=(new Date).toISOString(),r=function(){return console&&console.log?console:window&&window.console&&window.console.log?window.console:console}();r.log("<<<<<"),r.log("["+n+"]","\n",e.url,"\n",e.qs),r.log("-----"),e.on("response",function(n){var o=(new Date).getTime(),i=o-t,a=(new Date).toISOString();r.log(">>>>>>"),r.log("["+a+" / "+i+"]","\n",e.url,"\n",e.qs,"\n",n.text),r.log("-----")})}function o(e,t,n){var o=this;return this._config.logVerbosity&&(e=e.use(r)),this._config.proxy&&this._modules.proxy&&(e=this._modules.proxy.call(this,e)),this._config.keepAlive&&this._modules.keepAlive&&(e=this._modules.keepAlive(e)),e.timeout(t.timeout).end(function(e,r){var i={};if(i.error=null!==e,i.operation=t.operation,r&&r.status&&(i.statusCode=r.status),e)return i.errorData=e,i.category=o._detectErrorCategory(e),n(i,null);var a=JSON.parse(r.text);return a.error&&1===a.error&&a.status&&a.message&&a.service?(i.errorData=a,i.statusCode=a.status,i.error=!0,i.category=o._detectErrorCategory(i),n(i,null)):n(i,a)})}function i(e,t,n){var r=c.default.get(this.getStandardOrigin()+t.url).query(e);return o.call(this,r,t,n)}function a(e,t,n,r){var i=c.default.post(this.getStandardOrigin()+n.url).query(e).send(t);return o.call(this,i,n,r)}function s(e,t,n){var r=c.default.delete(this.getStandardOrigin()+t.url).query(e);return o.call(this,r,t,n)}Object.defineProperty(t,"__esModule",{value:!0}),t.get=i,t.post=a,t.del=s;var u=n(42),c=function(e){return e&&e.__esModule?e:{default:e}}(u);n(5)},function(e,t,n){function r(){}function o(e){if(!g(e))return e;var t=[];for(var n in e)a(t,n,e[n]);return t.join("&")}function a(e,t,n){if(null!=n)if(Array.isArray(n))n.forEach(function(n){a(e,t,n)});else if(g(n))for(var r in n)a(e,t+"["+r+"]",n[r]);else e.push(encodeURIComponent(t)+"="+encodeURIComponent(n));else null===n&&e.push(encodeURIComponent(t))}function s(e){for(var t,n,r={},o=e.split("&"),i=0,a=o.length;i=2&&e._responseTimeoutTimer&&clearTimeout(e._responseTimeoutTimer),4==n){var r;try{r=t.status}catch(e){r=0}if(!r){if(e.timedout||e._aborted)return;return e.crossDomainError()}e.emit("end")}};var r=function(t,n){n.total>0&&(n.percent=n.loaded/n.total*100),n.direction=t,e.emit("progress",n)};if(this.hasListeners("progress"))try{t.onprogress=r.bind(null,"download"),t.upload&&(t.upload.onprogress=r.bind(null,"upload"))}catch(e){}try{this.username&&this.password?t.open(this.method,this.url,!0,this.username,this.password):t.open(this.method,this.url,!0)}catch(e){return this.callback(e)}if(this._withCredentials&&(t.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof n&&!this._isHost(n)){var o=this._header["content-type"],i=this._serializer||b.serialize[o?o.split(";")[0]:""];!i&&c(o)&&(i=b.serialize["application/json"]),i&&(n=i(n))}for(var a in this.header)null!=this.header[a]&&this.header.hasOwnProperty(a)&&t.setRequestHeader(a,this.header[a]);return this._responseType&&(t.responseType=this._responseType),this.emit("request",this),t.send(void 0!==n?n:null),this},b.agent=function(){return new v},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach(function(e){v.prototype[e.toLowerCase()]=function(t,n){var r=new b.Request(e,t);return this._setDefaults(r),n&&r.end(n),r}}),v.prototype.del=v.prototype.delete,b.get=function(e,t,n){var r=b("GET",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},b.head=function(e,t,n){var r=b("HEAD",e);return"function"==typeof t&&(n=t,t=null),t&&r.query(t),n&&r.end(n),r},b.options=function(e,t,n){var r=b("OPTIONS",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.del=p,b.delete=p,b.patch=function(e,t,n){var r=b("PATCH",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.post=function(e,t,n){var r=b("POST",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r},b.put=function(e,t,n){var r=b("PUT",e);return"function"==typeof t&&(n=t,t=null),t&&r.send(t),n&&r.end(n),r}},function(e,t,n){function r(e){if(e)return o(e)}function o(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}e.exports=r,r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var r,o=0;o=this._maxRetries)return!1;if(this._retryCallback)try{var n=this._retryCallback(e,t);if(!0===n)return!0;if(!1===n)return!1}catch(e){console.error(e)}if(t&&t.status&&t.status>=500&&501!=t.status)return!0;if(e){if(e.code&&~s.indexOf(e.code))return!0;if(e.timeout&&"ECONNABORTED"==e.code)return!0;if(e.crossDomain)return!0}return!1},r.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},r.prototype.then=function(e,t){if(!this._fullfilledPromise){var n=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise(function(e,t){n.end(function(n,r){n?t(n):e(r)})})}return this._fullfilledPromise.then(e,t)},r.prototype.catch=function(e){return this.then(void 0,e)},r.prototype.use=function(e){return e(this),this},r.prototype.ok=function(e){if("function"!=typeof e)throw Error("Callback required");return this._okCallback=e,this},r.prototype._isResponseOK=function(e){return!!e&&(this._okCallback?this._okCallback(e):e.status>=200&&e.status<300)},r.prototype.get=function(e){return this._header[e.toLowerCase()]},r.prototype.getHeader=r.prototype.get,r.prototype.set=function(e,t){if(a(e)){for(var n in e)this.set(n,e[n]);return this}return this._header[e.toLowerCase()]=t,this.header[e]=t,this},r.prototype.unset=function(e){return delete this._header[e.toLowerCase()],delete this.header[e],this},r.prototype.field=function(e,t){if(null===e||void 0===e)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),a(e)){for(var n in e)this.field(n,e[n]);return this}if(Array.isArray(t)){for(var r in t)this.field(e,t[r]);return this}if(null===t||void 0===t)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof t&&(t=""+t),this._getFormData().append(e,t),this},r.prototype.abort=function(){return this._aborted?this:(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort"),this)},r.prototype._auth=function(e,t,n,r){switch(n.type){case"basic":this.set("Authorization","Basic "+r(e+":"+t));break;case"auto":this.username=e,this.password=t;break;case"bearer":this.set("Authorization","Bearer "+e)}return this},r.prototype.withCredentials=function(e){return void 0==e&&(e=!0),this._withCredentials=e,this},r.prototype.redirects=function(e){return this._maxRedirects=e,this},r.prototype.maxResponseSize=function(e){if("number"!=typeof e)throw TypeError("Invalid argument");return this._maxResponseSize=e,this},r.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},r.prototype.send=function(e){var t=a(e),n=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),t&&!this._data)Array.isArray(e)?this._data=[]:this._isHost(e)||(this._data={});else if(e&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(t&&a(this._data))for(var r in e)this._data[r]=e[r];else"string"==typeof e?(n||this.type("form"),n=this._header["content-type"],this._data="application/x-www-form-urlencoded"==n?this._data?this._data+"&"+e:e:(this._data||"")+e):this._data=e;return!t||this._isHost(e)?this:(n||this.type("json"),this)},r.prototype.sortQuery=function(e){return this._sort=void 0===e||e,this},r.prototype._finalizeQueryString=function(){var e=this._query.join("&");if(e&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+e),this._query.length=0,this._sort){var t=this.url.indexOf("?");if(t>=0){var n=this.url.substring(t+1).split("&");"function"==typeof this._sort?n.sort(this._sort):n.sort(),this.url=this.url.substring(0,t)+"?"+n.join("&")}}},r.prototype._appendQueryString=function(){console.trace("Unsupported")},r.prototype._timeoutError=function(e,t,n){if(!this._aborted){var r=new Error(e+t+"ms exceeded");r.timeout=t,r.code="ECONNABORTED",r.errno=n,this.timedout=!0,this.abort(),this.callback(r)}},r.prototype._setTimeouts=function(){var e=this;this._timeout&&!this._timer&&(this._timer=setTimeout(function(){e._timeoutError("Timeout of ",e._timeout,"ETIME")},this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout(function(){e._timeoutError("Response timeout of ",e._responseTimeout,"ETIMEDOUT")},this._responseTimeout))}},function(e,t){function n(e){return null!==e&&"object"==("undefined"===typeof e?"undefined":i(e))}e.exports=n},function(e,t,n){function r(e){if(e)return o(e)}function o(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}var i=n(47);e.exports=r,r.prototype.get=function(e){return this.header[e.toLowerCase()]},r.prototype._setHeaderProperties=function(e){var t=e["content-type"]||"";this.type=i.type(t);var n=i.params(t);for(var r in n)this[r]=n[r];this.links={};try{e.link&&(this.links=i.parseLinks(e.link))}catch(e){}},r.prototype._setStatusProperties=function(e){var t=e/100|0;this.status=this.statusCode=e,this.statusType=t,this.info=1==t,this.ok=2==t,this.redirect=3==t,this.clientError=4==t,this.serverError=5==t,this.error=(4==t||5==t)&&this.toError(),this.accepted=202==e,this.noContent=204==e,this.badRequest=400==e,this.unauthorized=401==e,this.notAcceptable=406==e,this.forbidden=403==e,this.notFound=404==e}},function(e,t){t.type=function(e){return e.split(/ *; */).shift()},t.params=function(e){return e.split(/ *; */).reduce(function(e,t){var n=t.split(/ *= */),r=n.shift(),o=n.shift();return r&&o&&(e[r]=o),e},{})},t.parseLinks=function(e){return e.split(/ *, */).reduce(function(e,t){var n=t.split(/ *; */),r=n[0].slice(1,-1);return e[n[1].split(/ *= */)[1].slice(1,-1)]=r,e},{})},t.cleanHeader=function(e,t){return delete e["content-type"],delete e["content-length"],delete e["transfer-encoding"],delete e.host,t&&(delete e.authorization,delete e.cookie),e}},function(e,t){function n(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach(function(e){n.prototype[e]=function(){return this._defaults.push({fn:e,arguments:arguments}),this}}),n.prototype._setDefaults=function(e){this._defaults.forEach(function(t){e[t.fn].apply(e,t.arguments)})},e.exports=n}])})}).call(t,n(6)(e))},function(e,t){e.exports={author:"PubNub",name:"chat-engine",version:"0.9.5",description:"ChatEngine",main:"dist/chat-engine.js",scripts:{deploy:"gulp; npm publish;",docs:"jsdoc src/index.js -c jsdoc.json"},repository:{type:"git",url:"git+https://github.com/pubnub/chat-engine.git"},keywords:["pubnub","chat","sdk","realtime"],bugs:{url:"https://github.com/pubnub/chat-engine/issues"},homepage:"https://github.com/pubnub/chat-engine#readme",devDependencies:{"babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","body-parser":"^1.17.2",chai:"^3.5.0","chat-engine-typing-indicator":"0.0.x",decache:"^4.3.0",docdash:"^0.4.0","es6-promise":"^4.1.1",eslint:"^4.7.1","eslint-config-airbnb":"^15.1.0","eslint-plugin-import":"^2.7.0",express:"^4.15.3",gulp:"^3.9.1","gulp-clean":"^0.3.2","gulp-eslint":"^4.0.0","gulp-istanbul":"^1.1.2","gulp-jsdoc3":"^1.0.1","gulp-mocha":"^3.0.1","gulp-rename":"^1.2.2","gulp-surge":"^0.1.0","gulp-uglify":"^2.0.0","gulp-uglify-es":"^0.1.3","http-server":"^0.10.0",isparta:"^4.0.0",jsdoc:"^3.5.5",mocha:"^3.1.2",proxyquire:"^1.8.0","pubnub-functions-mock":"^0.0.13",request:"^2.82.0","run-sequence":"^2.2.0",sinon:"^4.0.0","stats-webpack-plugin":"^0.6.1",surge:"^0.19.0","uglifyjs-webpack-plugin":"^1.0.1",webpack:"^3.11.0","webpack-stream":"^4.0.0"},dependencies:{async:"^2.1.2",axios:"^0.16.2","babel-core":"^6.26.0","babel-loader":"^7.1.4","babel-polyfill":"^6.26.0",eventemitter2:"^2.2.1",pubnub:"^4.20.1"}}},function(e,t,n){"use strict";var r,o="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(i){function a(){this._events={},this._conf&&s.call(this,this._conf)}function s(e){e?(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),this._events.maxListeners=e.maxListeners!==i?e.maxListeners:d,e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this.newListener=e.newListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),this.wildcard&&(this.listenerTree={})):this._events.maxListeners=d}function u(e,t){var n="(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.";this.verboseMemoryLeak?(n+=" Event name: %s.",console.error(n,e,t)):console.error(n,e),console.trace&&console.trace()}function c(e){this._events={},this.newListener=!1,this.verboseMemoryLeak=!1,s.call(this,e)}function l(e,t,n,r){if(!n)return[];var o,i,a,s,u,c,f,p=[],d=t.length,h=t[r],y=t[r+1];if(r===d&&n._listeners){if("function"===typeof n._listeners)return e&&e.push(n._listeners),[n];for(o=0,i=n._listeners.length;o0&&o._listeners.length>this._events.maxListeners&&(o._listeners.warned=!0,u.call(this,o._listeners.length,a))):o._listeners=t,!0;a=e.shift()}return!0}var p=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},d=10;c.EventEmitter2=c,c.prototype.delimiter=".",c.prototype.setMaxListeners=function(e){e!==i&&(this._events||a.call(this),this._events.maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},c.prototype.event="",c.prototype.once=function(e,t){return this.many(e,1,t),this},c.prototype.many=function(e,t,n){function r(){0===--t&&o.off(e,r),n.apply(this,arguments)}var o=this;if("function"!==typeof n)throw new Error("many only accepts instances of Function");return r._origin=n,this.on(e,r),o},c.prototype.emit=function(){this._events||a.call(this);var e=arguments[0];if("newListener"===e&&!this.newListener&&!this._events.newListener)return!1;var t,n,r,o,i,s=arguments.length;if(this._all&&this._all.length){if(i=this._all.slice(),s>3)for(t=new Array(s),o=0;o3)for(t=new Array(s-1),o=1;o3)for(t=new Array(u),o=1;o3)for(t=new Array(u-1),o=1;o0&&this._events[e].length>this._events.maxListeners&&(this._events[e].warned=!0,u.call(this,this._events[e].length,e))):this._events[e]=t,this)},c.prototype.onAny=function(e){if("function"!==typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),this._all.push(e),this},c.prototype.addListener=c.prototype.on,c.prototype.off=function(e,t){function n(e){if(e!==i){var t=Object.keys(e);for(var r in t){var a=t[r],s=e[a];s instanceof Function||"object"!==("undefined"===typeof s?"undefined":o(s))||null===s||(Object.keys(s).length>0&&n(e[a]),0===Object.keys(s).length&&delete e[a])}}}if("function"!==typeof t)throw new Error("removeListener only takes instances of Function");var r,a=[];if(this.wildcard){var s="string"===typeof e?e.split(this.delimiter):e.slice();a=l.call(this,null,s,this.listenerTree,0)}else{if(!this._events[e])return this;r=this._events[e],a.push({_listeners:r})}for(var u=0;u0){for(t=this._all,n=0,r=t.length;n1&&void 0!==arguments[1]?arguments[1]:(new Date).getTime(),a=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},c=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"custom";r(this,t);var l=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return l.chatEngine=e,l.name="Chat",l.group=c,l.isPrivate=a,l.meta=u||{},l.channel=l.chatEngine.augmentChannel(i,l.isPrivate),l.users={},l.connected=!1,l.hasConnected=!1,l.asleep=!1,l.chatEngine.chats[l.channel]=l,s&&l.connect(),n=l,o(l,n)}return i(t,e),s(t,[{key:"onHereNow",value:function(e,t){var n=this;if(e.error)this.chatEngine.throwError(this,"trigger","presence",new Error("Getting presence of this Chat. Make sure PubNub presence is enabled for this key"));else{t.channels[this.channel].occupants.forEach(function(e){n.userUpdate(e.uuid,e.state)})}}},{key:"objectify",value:function(){return{channel:this.channel,group:this.group,private:this.isPrivate,meta:this.meta}}},{key:"invite",value:function(e){var t=this;this.chatEngine.request("post","invite",{to:e.uuid,chat:this.objectify()}).then(function(){var n=function(){e.direct.emit("$.invite",{channel:t.channel})};e.direct.connected?n():(e.direct.connect(),e.direct.on("$.connected",n))}).catch(function(e){t.chatEngine.throwError(t,"trigger","search",new Error("Something went wrong while making a request to authentication server."),{error:e})})}},{key:"onPresence",value:function(e){"join"===e.action&&this.userJoin(e.uuid,e.state),"leave"===e.action&&this.userLeave(e.uuid),"timeout"===e.action&&this.userDisconnect(e.uuid),"state-change"===e.action&&this.userUpdate(e.uuid,e.state)}},{key:"update",value:function(e){var t=this,n=this.meta||{};this.meta=Object.assign(n,e),this.chatEngine.request("post","chat",{chat:this.objectify()}).then(function(){}).catch(function(e){t.chatEngine.throwError(t,"trigger","chat",new Error("Something went wrong while making a request to chat server."),{error:e})})}},{key:"emit",value:function(e,t){if("message"===e&&"object"!==("undefined"===typeof t?"undefined":a(t)))throw new Error("the payload has to be an object");var n={data:t,sender:this.chatEngine.me.uuid,chat:this,event:e,chatengineSDK:this.chatEngine.package.version},r=new l(this.chatEngine,this,e);return this.runPluginQueue("emit",e,function(e){e(null,n)},function(e,t){delete t.chat,r.publish(t)}),r}},{key:"userJoin",value:function(e,t){this.chatEngine.users[e]=this.chatEngine.users[e]||new this.chatEngine.User(e),this.chatEngine.users[e].assign(t);var n=this.users[e];return this.users[e]=this.chatEngine.users[e],n?this.trigger("$.online.here",{user:this.users[e]}):this.trigger("$.online.join",{user:this.users[e]}),this.chatEngine.users[e]}},{key:"userUpdate",value:function(e,t){this.chatEngine.users[e]=this.chatEngine.users[e]||new this.chatEngine.User(e),this.users[e]||this.userJoin(e,t),this.users[e].assign(t),this.chatEngine._emit("$.state",{user:this.users[e],state:this.users[e].state})}},{key:"sleep",value:function(){this.connected&&(this.onDisconnected(),this.asleep=!0)}},{key:"wake",value:function(){var e=this;this.asleep&&this.handshake(function(){e.onConnected()})}},{key:"onConnected",value:function(){this.connected=!0,this.trigger("$.connected")}},{key:"onDisconnected",value:function(){this.connected=!1,this.trigger("$.disconnected")}},{key:"onLeave",value:function(){this.trigger("$.left"),this.onDisconnected()}},{key:"leave",value:function(){var e=this;this.chatEngine.pubnub.unsubscribe({channels:[this.channel]}),this.chatEngine.request("post","leave",{chat:this.objectify()}).then(function(){e.onLeave(),e.emit("$.system.leave",{subject:e.objectify()}),e.chatEngine.me.session&&e.chatEngine.me.session.leave(e)}).catch(function(t){e.chatEngine.throwError(e,"trigger","chat",new Error("Something went wrong while making a request to chat server."),{error:t})})}},{key:"userLeave",value:function(e){var t=this.users[e];delete this.users[e],t&&this.trigger("$.offline.leave",{user:t})}},{key:"userDisconnect",value:function(e){var t=this.users[e];delete this.users[e],t&&this.trigger("$.offline.disconnect",{user:t})}},{key:"setState",value:function(e){this.chatEngine.pubnub.setState({state:e,channels:[this.chatEngine.global.channel]},function(){})}},{key:"search",value:function(e){if(this.hasConnected)return new f(this.chatEngine,this,e);this.chatEngine.throwError(this,"trigger","search",new Error("You must wait for the $.connected event before calling Chat#search"))}},{key:"connectionReady",value:function(){var e=this;this.connected=!0,this.hasConnected=!0,this.onConnected(),this.chatEngine.me.session&&this.chatEngine.me.session.join(this),this.users[this.chatEngine.me.uuid]=this.chatEngine.me,this.trigger("$.online.join",{user:this.chatEngine.me}),this.channel!==this.chatEngine.global.channel&&"custom"===this.group&&(this.getUserUpdates(),setTimeout(function(){e.getUserUpdates()},5e3)),this.on("$.system.leave",function(t){e.userLeave(t.sender.uuid)})}},{key:"getUserUpdates",value:function(){var e=this;this.chatEngine.pubnub.hereNow({channels:[this.channel],includeUUIDs:!0,includeState:!0},function(t,n){e.onHereNow(t,n)})}},{key:"connect",value:function(){var e=this;this.handshake(function(t){t.data.found?e.meta=t.data.chat.meta:e.update(e.meta),e.connectionReady()})}},{key:"handshake",value:function(e){var t=this;u([function(e){t.chatEngine.pubnub?e():e("You must call ChatEngine.connect() and wait for the $.ready event before creating new Chats.")},function(e){t.chatEngine.request("post","grant",{chat:t.objectify()}).then(function(){e()}).catch(e)},function(e){t.chatEngine.request("post","join",{chat:t.objectify()}).then(function(){e()}).catch(e)},function(n){t.chatEngine.request("get","chat",{},{channel:t.channel}).then(e).catch(n)}],function(e){t.chatEngine.throwError(t,"trigger","auth",new Error("Something went wrong while making a request to authentication server."),{error:e})})}}]),t}(c);e.exports=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return(0,l.default)(function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}(0,u.default)(r)&&"function"===typeof r.then?r.then(function(e){i(n,null,e)},function(e){i(n,e.message?e:new Error(e))}):n(null,r)})}function i(e,t,n){try{e(t,n)}catch(e){(0,p.default)(a,e)}}function a(e){throw e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var s=n(22),u=r(s),c=n(58),l=r(c),f=n(59),p=r(f);e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(){var t=(0,o.default)(arguments),n=t.pop();e.call(this,t,n)}};var r=n(2),o=function(e){return e&&e.__esModule?e:{default:e}}(r);e.exports=t.default},function(e,t,n){"use strict";(function(e,r){function o(e){setTimeout(e,0)}function i(e){return function(t){var n=(0,c.default)(arguments,1);e(function(){t.apply(null,n)})}}var a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0}),t.hasNextTick=t.hasSetImmediate=void 0,t.fallback=o,t.wrap=i;var s,u=n(2),c=function(e){return e&&e.__esModule?e:{default:e}}(u),l=t.hasSetImmediate="function"===typeof e&&e,f=t.hasNextTick="object"===("undefined"===typeof r?"undefined":a(r))&&"function"===typeof r.nextTick;s=l?e:f?r.nextTick:o,t.default=i(s)}).call(t,n(60).setImmediate,n(1))},function(e,t,n){"use strict";(function(e){function r(e,t){this._id=e,this._clearFn=t}var o=Function.prototype.apply;t.setTimeout=function(){return new r(o.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(o.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(61),t.setImmediate="undefined"!==typeof self&&self.setImmediate||"undefined"!==typeof e&&e.setImmediate||void 0,t.clearImmediate="undefined"!==typeof self&&self.clearImmediate||"undefined"!==typeof e&&e.clearImmediate||void 0}).call(t,n(9))},function(e,t,n){"use strict";(function(e,t){!function(e,n){function r(e){"function"!==typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n2&&void 0!==arguments[2]?arguments[2]:{};r(this,t);var a=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));a.chatEngine=e,a.name="Search",a.chat=n,a.config=i,a.config.event=i.event,a.config.limit=i.limit||20,a.config.channel=a.chat.channel,a.config.includeTimetoken=!0,a.config.stringifiedTimeToken=!0,a.config.count=a.config.count||100,a.config.pages=a.config.pages||10,a.maxPage=a.config.pages,a.numPage=0,a.referenceDate=a.config.end||0,a.hasMore=!0,a.messagesBetweenTimetokens=a.config.start>"0"&&a.config.end>"0",a.needleCount=0,a.page=function(e){var t=Object.assign({},a.config,{start:a.referenceDate});delete t.reverse,delete t.end,a._emit("$.search.page.request"),a.chatEngine.pubnub.history(t,function(t,n){if(a._emit("$.search.page.response"),t.error)a.chatEngine.throwError(a,"trigger","search",new Error("There was a problem searching history. Make sure your request parameters are valid and history is enabled for this PubNub key."),t);else{var r=n.startTimeToken;a.referenceDate=n.startTimeToken,a.hasMore=n.messages.length===a.config.count&&"0"!==r,n.messages.sort(function(e,t){return e.timetoken=a.config.start})),e(n)}})};return a.triggerHistory=function(e,t){a.needleCount=a.config.limit&&!a.messagesBetweenTimetokens&&(a.hasMore=!1),a._emit("$.search.finish"))})}),a},a.config.event&&a.plugin(function(e){return{middleware:{on:{"*":function(t,n){n(!(t&&t.event&&t.event===e),t)}}}}}(a.config.event)),a.config.sender&&a.plugin(function(e){return{middleware:{on:{"*":function(t,n){n(!(t&&t.sender&&t.sender.uuid===e.uuid),t)}}}}}(a.config.sender)),a._emit("$.search.start"),a.find(),a}return i(t,e),t}(a);e.exports=u},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(64),i=r(o),a=n(29),s=r(a);t.default=(0,s.default)(i.default,1),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,r){(0,a.default)(t)(e,(0,u.default)((0,l.default)(n)),r)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(24),a=r(i),s=n(87),u=r(s),c=n(3),l=r(c);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=-1,n=e.length;return function(){return++t-1&&e%1==0&&e2&&(o=(0,l.default)(arguments,1)),r[t]=o,n(e)})},function(e){n(e,r)})}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(8),a=r(i),s=n(10),u=r(s),c=n(2),l=r(c),f=n(3),p=r(f);e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(93),i=r(o),a=n(29),s=r(a);t.default=(0,s.default)(i.default,1),e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,r){(0,a.default)(t)(e,(0,u.default)(n),r)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o;var i=n(24),a=r(i),s=n(3),u=r(s);e.exports=t.default}])})},function(e,t,n){"use strict";var r=n(1),o=n(28);if("undefined"===typeof r)throw Error("create-react-class could not find the React object. If you are using script tags, make sure that React is being loaded before create-react-class.");var i=(new r.Component).updater;e.exports=o(r.Component,r.isValidElement,i)},function(e,t,n){"use strict";function r(e){return e}function o(e,t,n){function o(e,t){var n=v.hasOwnProperty(t)?v[t]:null;E.hasOwnProperty(t)&&s("OVERRIDE_BASE"===n,"ReactClassInterface: You are attempting to override `%s` from your class specification. Ensure that your method names do not overlap with React methods.",t),e&&s("DEFINE_MANY"===n||"DEFINE_MANY_MERGED"===n,"ReactClassInterface: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",t)}function c(e,n){if(n){s("function"!==typeof n,"ReactClass: You're attempting to use a component class or function as a mixin. Instead, just use a regular object."),s(!t(n),"ReactClass: You're attempting to use a component as a mixin. Instead, just use a regular object.");var r=e.prototype,i=r.__reactAutoBindPairs;n.hasOwnProperty(u)&&_.mixins(e,n.mixins);for(var a in n)if(n.hasOwnProperty(a)&&a!==u){var c=n[a],l=r.hasOwnProperty(a);if(o(l,a),_.hasOwnProperty(a))_[a](e,c);else{var f=v.hasOwnProperty(a),h="function"===typeof c,y=h&&!f&&!l&&!1!==n.autobind;if(y)i.push(a,c),r[a]=c;else if(l){var g=v[a];s(f&&("DEFINE_MANY_MERGED"===g||"DEFINE_MANY"===g),"ReactClass: Unexpected spec policy %s for key %s when mixing in component specs.",g,a),"DEFINE_MANY_MERGED"===g?r[a]=p(r[a],c):"DEFINE_MANY"===g&&(r[a]=d(r[a],c))}else r[a]=c}}}else;}function l(e,t){if(t)for(var n in t){var r=t[n];if(t.hasOwnProperty(n)){var o=n in _;s(!o,'ReactClass: You are attempting to define a reserved property, `%s`, that shouldn\'t be on the "statics" key. Define it as an instance property instead; it will still be accessible on the constructor.',n);var i=n in e;if(i){var a=b.hasOwnProperty(n)?b[n]:null;return s("DEFINE_MANY_MERGED"===a,"ReactClass: You are attempting to define `%s` on your component more than once. This conflict may be due to a mixin.",n),void(e[n]=p(e[n],r))}e[n]=r}}}function f(e,t){s(e&&t&&"object"===typeof e&&"object"===typeof t,"mergeIntoWithNoDuplicateKeys(): Cannot merge non-objects.");for(var n in t)t.hasOwnProperty(n)&&(s(void 0===e[n],"mergeIntoWithNoDuplicateKeys(): Tried to merge two objects with the same key: `%s`. This conflict may be due to a mixin; in particular, this may be caused by two getInitialState() or getDefaultProps() methods returning objects with clashing keys.",n),e[n]=t[n]);return e}function p(e,t){return function(){var n=e.apply(this,arguments),r=t.apply(this,arguments);if(null==n)return r;if(null==r)return n;var o={};return f(o,n),f(o,r),o}}function d(e,t){return function(){e.apply(this,arguments),t.apply(this,arguments)}}function h(e,t){var n=t.bind(e);return n}function y(e){for(var t=e.__reactAutoBindPairs,n=0;n capacity) {\n // Manually shift all values starting at the index back to the\n // beginning of the queue.\n for (var scan = 0, newLength = queue.length - index; scan < newLength; scan++) {\n queue[scan] = queue[scan + index];\n }\n queue.length -= index;\n index = 0;\n }\n }\n queue.length = 0;\n index = 0;\n flushing = false;\n}\n\n// `requestFlush` is implemented using a strategy based on data collected from\n// every available SauceLabs Selenium web driver worker at time of writing.\n// https://docs.google.com/spreadsheets/d/1mG-5UYGup5qxGdEMWkhP6BWCz053NUb2E1QoUTU16uA/edit#gid=783724593\n\n// Safari 6 and 6.1 for desktop, iPad, and iPhone are the only browsers that\n// have WebKitMutationObserver but not un-prefixed MutationObserver.\n// Must use `global` or `self` instead of `window` to work in both frames and web\n// workers. `global` is a provision of Browserify, Mr, Mrs, or Mop.\n\n/* globals self */\nvar scope = typeof global !== \"undefined\" ? global : self;\nvar BrowserMutationObserver = scope.MutationObserver || scope.WebKitMutationObserver;\n\n// MutationObservers are desirable because they have high priority and work\n// reliably everywhere they are implemented.\n// They are implemented in all modern browsers.\n//\n// - Android 4-4.3\n// - Chrome 26-34\n// - Firefox 14-29\n// - Internet Explorer 11\n// - iPad Safari 6-7.1\n// - iPhone Safari 7-7.1\n// - Safari 6-7\nif (typeof BrowserMutationObserver === \"function\") {\n requestFlush = makeRequestCallFromMutationObserver(flush);\n\n// MessageChannels are desirable because they give direct access to the HTML\n// task queue, are implemented in Internet Explorer 10, Safari 5.0-1, and Opera\n// 11-12, and in web workers in many engines.\n// Although message channels yield to any queued rendering and IO tasks, they\n// would be better than imposing the 4ms delay of timers.\n// However, they do not work reliably in Internet Explorer or Safari.\n\n// Internet Explorer 10 is the only browser that has setImmediate but does\n// not have MutationObservers.\n// Although setImmediate yields to the browser's renderer, it would be\n// preferrable to falling back to setTimeout since it does not have\n// the minimum 4ms penalty.\n// Unfortunately there appears to be a bug in Internet Explorer 10 Mobile (and\n// Desktop to a lesser extent) that renders both setImmediate and\n// MessageChannel useless for the purposes of ASAP.\n// https://github.com/kriskowal/q/issues/396\n\n// Timers are implemented universally.\n// We fall back to timers in workers in most engines, and in foreground\n// contexts in the following browsers.\n// However, note that even this simple case requires nuances to operate in a\n// broad spectrum of browsers.\n//\n// - Firefox 3-13\n// - Internet Explorer 6-9\n// - iPad Safari 4.3\n// - Lynx 2.8.7\n} else {\n requestFlush = makeRequestCallFromTimer(flush);\n}\n\n// `requestFlush` requests that the high priority event queue be flushed as\n// soon as possible.\n// This is useful to prevent an error thrown in a task from stalling the event\n// queue if the exception handled by Node.js’s\n// `process.on(\"uncaughtException\")` or by a domain.\nrawAsap.requestFlush = requestFlush;\n\n// To request a high priority event, we induce a mutation observer by toggling\n// the text of a text node between \"1\" and \"-1\".\nfunction makeRequestCallFromMutationObserver(callback) {\n var toggle = 1;\n var observer = new BrowserMutationObserver(callback);\n var node = document.createTextNode(\"\");\n observer.observe(node, {characterData: true});\n return function requestCall() {\n toggle = -toggle;\n node.data = toggle;\n };\n}\n\n// The message channel technique was discovered by Malte Ubl and was the\n// original foundation for this library.\n// http://www.nonblocking.io/2011/06/windownexttick.html\n\n// Safari 6.0.5 (at least) intermittently fails to create message ports on a\n// page's first load. Thankfully, this version of Safari supports\n// MutationObservers, so we don't need to fall back in that case.\n\n// function makeRequestCallFromMessageChannel(callback) {\n// var channel = new MessageChannel();\n// channel.port1.onmessage = callback;\n// return function requestCall() {\n// channel.port2.postMessage(0);\n// };\n// }\n\n// For reasons explained above, we are also unable to use `setImmediate`\n// under any circumstances.\n// Even if we were, there is another bug in Internet Explorer 10.\n// It is not sufficient to assign `setImmediate` to `requestFlush` because\n// `setImmediate` must be called *by name* and therefore must be wrapped in a\n// closure.\n// Never forget.\n\n// function makeRequestCallFromSetImmediate(callback) {\n// return function requestCall() {\n// setImmediate(callback);\n// };\n// }\n\n// Safari 6.0 has a problem where timers will get lost while the user is\n// scrolling. This problem does not impact ASAP because Safari 6.0 supports\n// mutation observers, so that implementation is used instead.\n// However, if we ever elect to use timers in Safari, the prevalent work-around\n// is to add a scroll event listener that calls for a flush.\n\n// `setTimeout` does not call the passed callback if the delay is less than\n// approximately 7 in web workers in Firefox 8 through 18, and sometimes not\n// even then.\n\nfunction makeRequestCallFromTimer(callback) {\n return function requestCall() {\n // We dispatch a timeout with a specified delay of 0 for engines that\n // can reliably accommodate that request. This will usually be snapped\n // to a 4 milisecond delay, but once we're flushing, there's no delay\n // between events.\n var timeoutHandle = setTimeout(handleTimer, 0);\n // However, since this timer gets frequently dropped in Firefox\n // workers, we enlist an interval handle that will try to fire\n // an event 20 times per second until it succeeds.\n var intervalHandle = setInterval(handleTimer, 50);\n\n function handleTimer() {\n // Whichever timer succeeds will cancel both timers and\n // execute the callback.\n clearTimeout(timeoutHandle);\n clearInterval(intervalHandle);\n callback();\n }\n };\n}\n\n// This is for `asap.js` only.\n// Its name will be periodically randomized to break any code that depends on\n// its existence.\nrawAsap.makeRequestCallFromTimer = makeRequestCallFromTimer;\n\n// ASAP was originally a nextTick shim included in Q. This was factored out\n// into this ASAP package. It was later adapted to RSVP which made further\n// amendments. These decisions, particularly to marginalize MessageChannel and\n// to capture the MutationObserver implementation in a closure, were integrated\n// back into ASAP proper.\n// https://github.com/tildeio/rsvp.js/blob/cddf7232546a9cf858524b75cde6f9edf72620a7/lib/rsvp/asap.js\n\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9)))\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports) {\n\nvar g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1,eval)(\"this\");\n} catch(e) {\n\t// This works if the window reference is available\n\tif(typeof window === \"object\")\n\t\tg = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n//This file contains the ES6 extensions to the core Promises/A+ API\n\nvar Promise = __webpack_require__(4);\n\nmodule.exports = Promise;\n\n/* Static Functions */\n\nvar TRUE = valuePromise(true);\nvar FALSE = valuePromise(false);\nvar NULL = valuePromise(null);\nvar UNDEFINED = valuePromise(undefined);\nvar ZERO = valuePromise(0);\nvar EMPTYSTRING = valuePromise('');\n\nfunction valuePromise(value) {\n var p = new Promise(Promise._44);\n p._83 = 1;\n p._18 = value;\n return p;\n}\nPromise.resolve = function (value) {\n if (value instanceof Promise) return value;\n\n if (value === null) return NULL;\n if (value === undefined) return UNDEFINED;\n if (value === true) return TRUE;\n if (value === false) return FALSE;\n if (value === 0) return ZERO;\n if (value === '') return EMPTYSTRING;\n\n if (typeof value === 'object' || typeof value === 'function') {\n try {\n var then = value.then;\n if (typeof then === 'function') {\n return new Promise(then.bind(value));\n }\n } catch (ex) {\n return new Promise(function (resolve, reject) {\n reject(ex);\n });\n }\n }\n return valuePromise(value);\n};\n\nPromise.all = function (arr) {\n var args = Array.prototype.slice.call(arr);\n\n return new Promise(function (resolve, reject) {\n if (args.length === 0) return resolve([]);\n var remaining = args.length;\n function res(i, val) {\n if (val && (typeof val === 'object' || typeof val === 'function')) {\n if (val instanceof Promise && val.then === Promise.prototype.then) {\n while (val._83 === 3) {\n val = val._18;\n }\n if (val._83 === 1) return res(i, val._18);\n if (val._83 === 2) reject(val._18);\n val.then(function (val) {\n res(i, val);\n }, reject);\n return;\n } else {\n var then = val.then;\n if (typeof then === 'function') {\n var p = new Promise(then.bind(val));\n p.then(function (val) {\n res(i, val);\n }, reject);\n return;\n }\n }\n }\n args[i] = val;\n if (--remaining === 0) {\n resolve(args);\n }\n }\n for (var i = 0; i < args.length; i++) {\n res(i, args[i]);\n }\n });\n};\n\nPromise.reject = function (value) {\n return new Promise(function (resolve, reject) {\n reject(value);\n });\n};\n\nPromise.race = function (values) {\n return new Promise(function (resolve, reject) {\n values.forEach(function(value){\n Promise.resolve(value).then(resolve, reject);\n });\n });\n};\n\n/* Prototype Methods */\n\nPromise.prototype['catch'] = function (onRejected) {\n return this.then(null, onRejected);\n};\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports) {\n\n(function(self) {\n 'use strict';\n\n if (self.fetch) {\n return\n }\n\n var support = {\n searchParams: 'URLSearchParams' in self,\n iterable: 'Symbol' in self && 'iterator' in Symbol,\n blob: 'FileReader' in self && 'Blob' in self && (function() {\n try {\n new Blob()\n return true\n } catch(e) {\n return false\n }\n })(),\n formData: 'FormData' in self,\n arrayBuffer: 'ArrayBuffer' in self\n }\n\n if (support.arrayBuffer) {\n var viewClasses = [\n '[object Int8Array]',\n '[object Uint8Array]',\n '[object Uint8ClampedArray]',\n '[object Int16Array]',\n '[object Uint16Array]',\n '[object Int32Array]',\n '[object Uint32Array]',\n '[object Float32Array]',\n '[object Float64Array]'\n ]\n\n var isDataView = function(obj) {\n return obj && DataView.prototype.isPrototypeOf(obj)\n }\n\n var isArrayBufferView = ArrayBuffer.isView || function(obj) {\n return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1\n }\n }\n\n function normalizeName(name) {\n if (typeof name !== 'string') {\n name = String(name)\n }\n if (/[^a-z0-9\\-#$%&'*+.\\^_`|~]/i.test(name)) {\n throw new TypeError('Invalid character in header field name')\n }\n return name.toLowerCase()\n }\n\n function normalizeValue(value) {\n if (typeof value !== 'string') {\n value = String(value)\n }\n return value\n }\n\n // Build a destructive iterator for the value list\n function iteratorFor(items) {\n var iterator = {\n next: function() {\n var value = items.shift()\n return {done: value === undefined, value: value}\n }\n }\n\n if (support.iterable) {\n iterator[Symbol.iterator] = function() {\n return iterator\n }\n }\n\n return iterator\n }\n\n function Headers(headers) {\n this.map = {}\n\n if (headers instanceof Headers) {\n headers.forEach(function(value, name) {\n this.append(name, value)\n }, this)\n } else if (Array.isArray(headers)) {\n headers.forEach(function(header) {\n this.append(header[0], header[1])\n }, this)\n } else if (headers) {\n Object.getOwnPropertyNames(headers).forEach(function(name) {\n this.append(name, headers[name])\n }, this)\n }\n }\n\n Headers.prototype.append = function(name, value) {\n name = normalizeName(name)\n value = normalizeValue(value)\n var oldValue = this.map[name]\n this.map[name] = oldValue ? oldValue+','+value : value\n }\n\n Headers.prototype['delete'] = function(name) {\n delete this.map[normalizeName(name)]\n }\n\n Headers.prototype.get = function(name) {\n name = normalizeName(name)\n return this.has(name) ? this.map[name] : null\n }\n\n Headers.prototype.has = function(name) {\n return this.map.hasOwnProperty(normalizeName(name))\n }\n\n Headers.prototype.set = function(name, value) {\n this.map[normalizeName(name)] = normalizeValue(value)\n }\n\n Headers.prototype.forEach = function(callback, thisArg) {\n for (var name in this.map) {\n if (this.map.hasOwnProperty(name)) {\n callback.call(thisArg, this.map[name], name, this)\n }\n }\n }\n\n Headers.prototype.keys = function() {\n var items = []\n this.forEach(function(value, name) { items.push(name) })\n return iteratorFor(items)\n }\n\n Headers.prototype.values = function() {\n var items = []\n this.forEach(function(value) { items.push(value) })\n return iteratorFor(items)\n }\n\n Headers.prototype.entries = function() {\n var items = []\n this.forEach(function(value, name) { items.push([name, value]) })\n return iteratorFor(items)\n }\n\n if (support.iterable) {\n Headers.prototype[Symbol.iterator] = Headers.prototype.entries\n }\n\n function consumed(body) {\n if (body.bodyUsed) {\n return Promise.reject(new TypeError('Already read'))\n }\n body.bodyUsed = true\n }\n\n function fileReaderReady(reader) {\n return new Promise(function(resolve, reject) {\n reader.onload = function() {\n resolve(reader.result)\n }\n reader.onerror = function() {\n reject(reader.error)\n }\n })\n }\n\n function readBlobAsArrayBuffer(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsArrayBuffer(blob)\n return promise\n }\n\n function readBlobAsText(blob) {\n var reader = new FileReader()\n var promise = fileReaderReady(reader)\n reader.readAsText(blob)\n return promise\n }\n\n function readArrayBufferAsText(buf) {\n var view = new Uint8Array(buf)\n var chars = new Array(view.length)\n\n for (var i = 0; i < view.length; i++) {\n chars[i] = String.fromCharCode(view[i])\n }\n return chars.join('')\n }\n\n function bufferClone(buf) {\n if (buf.slice) {\n return buf.slice(0)\n } else {\n var view = new Uint8Array(buf.byteLength)\n view.set(new Uint8Array(buf))\n return view.buffer\n }\n }\n\n function Body() {\n this.bodyUsed = false\n\n this._initBody = function(body) {\n this._bodyInit = body\n if (!body) {\n this._bodyText = ''\n } else if (typeof body === 'string') {\n this._bodyText = body\n } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {\n this._bodyBlob = body\n } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {\n this._bodyFormData = body\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this._bodyText = body.toString()\n } else if (support.arrayBuffer && support.blob && isDataView(body)) {\n this._bodyArrayBuffer = bufferClone(body.buffer)\n // IE 10-11 can't handle a DataView body.\n this._bodyInit = new Blob([this._bodyArrayBuffer])\n } else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {\n this._bodyArrayBuffer = bufferClone(body)\n } else {\n throw new Error('unsupported BodyInit type')\n }\n\n if (!this.headers.get('content-type')) {\n if (typeof body === 'string') {\n this.headers.set('content-type', 'text/plain;charset=UTF-8')\n } else if (this._bodyBlob && this._bodyBlob.type) {\n this.headers.set('content-type', this._bodyBlob.type)\n } else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {\n this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')\n }\n }\n }\n\n if (support.blob) {\n this.blob = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return Promise.resolve(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(new Blob([this._bodyArrayBuffer]))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as blob')\n } else {\n return Promise.resolve(new Blob([this._bodyText]))\n }\n }\n\n this.arrayBuffer = function() {\n if (this._bodyArrayBuffer) {\n return consumed(this) || Promise.resolve(this._bodyArrayBuffer)\n } else {\n return this.blob().then(readBlobAsArrayBuffer)\n }\n }\n }\n\n this.text = function() {\n var rejected = consumed(this)\n if (rejected) {\n return rejected\n }\n\n if (this._bodyBlob) {\n return readBlobAsText(this._bodyBlob)\n } else if (this._bodyArrayBuffer) {\n return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))\n } else if (this._bodyFormData) {\n throw new Error('could not read FormData body as text')\n } else {\n return Promise.resolve(this._bodyText)\n }\n }\n\n if (support.formData) {\n this.formData = function() {\n return this.text().then(decode)\n }\n }\n\n this.json = function() {\n return this.text().then(JSON.parse)\n }\n\n return this\n }\n\n // HTTP methods whose capitalization should be normalized\n var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT']\n\n function normalizeMethod(method) {\n var upcased = method.toUpperCase()\n return (methods.indexOf(upcased) > -1) ? upcased : method\n }\n\n function Request(input, options) {\n options = options || {}\n var body = options.body\n\n if (input instanceof Request) {\n if (input.bodyUsed) {\n throw new TypeError('Already read')\n }\n this.url = input.url\n this.credentials = input.credentials\n if (!options.headers) {\n this.headers = new Headers(input.headers)\n }\n this.method = input.method\n this.mode = input.mode\n if (!body && input._bodyInit != null) {\n body = input._bodyInit\n input.bodyUsed = true\n }\n } else {\n this.url = String(input)\n }\n\n this.credentials = options.credentials || this.credentials || 'omit'\n if (options.headers || !this.headers) {\n this.headers = new Headers(options.headers)\n }\n this.method = normalizeMethod(options.method || this.method || 'GET')\n this.mode = options.mode || this.mode || null\n this.referrer = null\n\n if ((this.method === 'GET' || this.method === 'HEAD') && body) {\n throw new TypeError('Body not allowed for GET or HEAD requests')\n }\n this._initBody(body)\n }\n\n Request.prototype.clone = function() {\n return new Request(this, { body: this._bodyInit })\n }\n\n function decode(body) {\n var form = new FormData()\n body.trim().split('&').forEach(function(bytes) {\n if (bytes) {\n var split = bytes.split('=')\n var name = split.shift().replace(/\\+/g, ' ')\n var value = split.join('=').replace(/\\+/g, ' ')\n form.append(decodeURIComponent(name), decodeURIComponent(value))\n }\n })\n return form\n }\n\n function parseHeaders(rawHeaders) {\n var headers = new Headers()\n rawHeaders.split(/\\r?\\n/).forEach(function(line) {\n var parts = line.split(':')\n var key = parts.shift().trim()\n if (key) {\n var value = parts.join(':').trim()\n headers.append(key, value)\n }\n })\n return headers\n }\n\n Body.call(Request.prototype)\n\n function Response(bodyInit, options) {\n if (!options) {\n options = {}\n }\n\n this.type = 'default'\n this.status = 'status' in options ? options.status : 200\n this.ok = this.status >= 200 && this.status < 300\n this.statusText = 'statusText' in options ? options.statusText : 'OK'\n this.headers = new Headers(options.headers)\n this.url = options.url || ''\n this._initBody(bodyInit)\n }\n\n Body.call(Response.prototype)\n\n Response.prototype.clone = function() {\n return new Response(this._bodyInit, {\n status: this.status,\n statusText: this.statusText,\n headers: new Headers(this.headers),\n url: this.url\n })\n }\n\n Response.error = function() {\n var response = new Response(null, {status: 0, statusText: ''})\n response.type = 'error'\n return response\n }\n\n var redirectStatuses = [301, 302, 303, 307, 308]\n\n Response.redirect = function(url, status) {\n if (redirectStatuses.indexOf(status) === -1) {\n throw new RangeError('Invalid status code')\n }\n\n return new Response(null, {status: status, headers: {location: url}})\n }\n\n self.Headers = Headers\n self.Request = Request\n self.Response = Response\n\n self.fetch = function(input, init) {\n return new Promise(function(resolve, reject) {\n var request = new Request(input, init)\n var xhr = new XMLHttpRequest()\n\n xhr.onload = function() {\n var options = {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: parseHeaders(xhr.getAllResponseHeaders() || '')\n }\n options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')\n var body = 'response' in xhr ? xhr.response : xhr.responseText\n resolve(new Response(body, options))\n }\n\n xhr.onerror = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.ontimeout = function() {\n reject(new TypeError('Network request failed'))\n }\n\n xhr.open(request.method, request.url, true)\n\n if (request.credentials === 'include') {\n xhr.withCredentials = true\n }\n\n if ('responseType' in xhr && support.blob) {\n xhr.responseType = 'blob'\n }\n\n request.headers.forEach(function(value, name) {\n xhr.setRequestHeader(name, value)\n })\n\n xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)\n })\n }\n self.fetch.polyfill = true\n})(typeof self !== 'undefined' ? self : this);\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\nObject.defineProperty(__webpack_exports__, \"__esModule\", { value: true });\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__registerServiceWorker__ = __webpack_require__(13);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react__ = __webpack_require__(1);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_react__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom__ = __webpack_require__(15);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react_dom___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react_dom__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_css__ = __webpack_require__(25);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__index_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__index_css__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_chat_engine__ = __webpack_require__(26);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_chat_engine___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_chat_engine__);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_create_react_class__ = __webpack_require__(27);\n/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_create_react_class___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_create_react_class__);\nObject(__WEBPACK_IMPORTED_MODULE_0__registerServiceWorker__[\"a\" /* default */])();var now=new Date().getTime();var username=['user',now].join('-');var ChatEngine=__WEBPACK_IMPORTED_MODULE_4_chat_engine___default.a.create({publishKey:'pub-c-df1f983b-8334-44aa-b32b-2fa23eff1f8f',subscribeKey:'sub-c-bf3164ba-f737-11e7-b8a6-46d99af2bb8c'},{globalChannel:'chat-engine-react'});ChatEngine.connect(username,{signedOnTime:now},'auth-key');var Message=__WEBPACK_IMPORTED_MODULE_5_create_react_class___default()({displayName:'Message',render:function render(){console.log('mes',this.props);return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div',null,' ',this.props.uuid,': ',this.props.text,' ');}});var Chat=__WEBPACK_IMPORTED_MODULE_5_create_react_class___default()({displayName:'Chat',getInitialState:function getInitialState(){return{messages:[],chatInput:''};},setChatInput:function setChatInput(event){this.setState({chatInput:event.target.value});},sendChat:function sendChat(){if(this.state.chatInput){ChatEngine.global.emit('message',{text:this.state.chatInput});this.setState({chatInput:''});}},componentDidMount:function componentDidMount(){var _this=this;ChatEngine.global.on('message',function(payload){var messages=_this.state.messages;messages.push(payload);_this.setState({messages:messages});});},_handleKeyPress:function _handleKeyPress(e){if(e.key==='Enter'){this.sendChat();}},render:function render(){console.log('render called');console.log(this.state.messages);var messageList=this.state.messages.map(function(payload){return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(Message,{key:payload.timetoken,uuid:payload.sender.uuid,text:payload.data.text});});return __WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('div',{id:'chat-output'},' ',messageList,' '),' ',__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input',{id:'chat-input',type:'text',name:'',value:this.state.chatInput,onChange:this.setChatInput,onKeyPress:this._handleKeyPress}),' ',__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement('input',{type:'button',onClick:this.sendChat,value:'Send Chat'}));}});ChatEngine.on('$.ready',function(){__WEBPACK_IMPORTED_MODULE_2_react_dom___default.a.render(__WEBPACK_IMPORTED_MODULE_1_react___default.a.createElement(Chat,null),document.getElementById('root'));});\n\n/***/ }),\n/* 13 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n/* harmony export (immutable) */ __webpack_exports__[\"a\"] = register;\n/* unused harmony export unregister */\n// In production, we register a service worker to serve assets from local cache.\n// This lets the app load faster on subsequent visits in production, and gives\n// it offline capabilities. However, it also means that developers (and users)\n// will only see deployed updates on the \"N+1\" visit to a page, since previously\n// cached resources are updated in the background.\n// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.\n// This link also includes instructions on opting out of this behavior.\nvar isLocalhost=Boolean(window.location.hostname==='localhost'||// [::1] is the IPv6 localhost address.\nwindow.location.hostname==='[::1]'||// 127.0.0.1/8 is considered localhost for IPv4.\nwindow.location.hostname.match(/^127(?:\\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function register(){if(\"production\"==='production'&&'serviceWorker'in navigator){// The URL constructor is available in all browsers that support SW.\nvar publicUrl=new URL(\"\",window.location);if(publicUrl.origin!==window.location.origin){// Our service worker won't work if PUBLIC_URL is on a different origin\n// from what our page is served on. This might happen if a CDN is used to\n// serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374\nreturn;}window.addEventListener('load',function(){var swUrl=\"\"+'/service-worker.js';if(isLocalhost){// This is running on localhost. Lets check if a service worker still exists or not.\ncheckValidServiceWorker(swUrl);// Add some additional logging to localhost, pointing developers to the\n// service worker/PWA documentation.\nnavigator.serviceWorker.ready.then(function(){console.log('This web app is being served cache-first by a service '+'worker. To learn more, visit https://goo.gl/SC7cgQ');});}else{// Is not local host. Just register service worker\nregisterValidSW(swUrl);}});}}function registerValidSW(swUrl){navigator.serviceWorker.register(swUrl).then(function(registration){registration.onupdatefound=function(){var installingWorker=registration.installing;installingWorker.onstatechange=function(){if(installingWorker.state==='installed'){if(navigator.serviceWorker.controller){// At this point, the old content will have been purged and\n// the fresh content will have been added to the cache.\n// It's the perfect time to display a \"New content is\n// available; please refresh.\" message in your web app.\nconsole.log('New content is available; please refresh.');}else{// At this point, everything has been precached.\n// It's the perfect time to display a\n// \"Content is cached for offline use.\" message.\nconsole.log('Content is cached for offline use.');}}};};}).catch(function(error){console.error('Error during service worker registration:',error);});}function checkValidServiceWorker(swUrl){// Check if the service worker can be found. If it can't reload the page.\nfetch(swUrl).then(function(response){// Ensure service worker exists, and that we really are getting a JS file.\nif(response.status===404||response.headers.get('content-type').indexOf('javascript')===-1){// No service worker found. Probably a different app. Reload the page.\nnavigator.serviceWorker.ready.then(function(registration){registration.unregister().then(function(){window.location.reload();});});}else{// Service worker found. Proceed as normal.\nregisterValidSW(swUrl);}}).catch(function(){console.log('No internet connection found. App is running in offline mode.');});}function unregister(){if('serviceWorker'in navigator){navigator.serviceWorker.ready.then(function(registration){registration.unregister();});}}\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/** @license React v16.2.0\n * react.production.min.js\n *\n * Copyright (c) 2013-present, Facebook, Inc.\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\nvar m=__webpack_require__(0),n=__webpack_require__(2),p=__webpack_require__(3),q=\"function\"===typeof Symbol&&Symbol[\"for\"],r=q?Symbol[\"for\"](\"react.element\"):60103,t=q?Symbol[\"for\"](\"react.call\"):60104,u=q?Symbol[\"for\"](\"react.return\"):60105,v=q?Symbol[\"for\"](\"react.portal\"):60106,w=q?Symbol[\"for\"](\"react.fragment\"):60107,x=\"function\"===typeof Symbol&&Symbol.iterator;\nfunction y(a){for(var b=arguments.length-1,e=\"Minified React error #\"+a+\"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant\\x3d\"+a,c=0;cM.length&&M.push(a)}\nfunction P(a,b,e,c){var d=typeof a;if(\"undefined\"===d||\"boolean\"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case \"string\":case \"number\":g=!0;break;case \"object\":switch(a.$$typeof){case r:case t:case u:case v:g=!0}}if(g)return e(c,a,\"\"===b?\".\"+Q(a,0):b),1;g=0;b=\"\"===b?\".\":b+\":\";if(Array.isArray(a))for(var k=0;k=g.hasBooleanValue+g.hasNumericValue+g.hasOverloadedBooleanValue?void 0:E(\"50\",f);e.hasOwnProperty(f)&&(g.attributeName=e[f]);d.hasOwnProperty(f)&&(g.attributeNamespace=d[f]);a.hasOwnProperty(f)&&(g.mutationMethod=a[f]);ua[f]=g}}},ua={};\nfunction va(a,b){if(oa.hasOwnProperty(a)||2this.eventPool.length&&this.eventPool.push(a)}function Jb(a){a.eventPool=[];a.getPooled=Kb;a.release=Lb}function Mb(a,b,c,d){return T.call(this,a,b,c,d)}T.augmentClass(Mb,{data:null});function Nb(a,b,c,d){return T.call(this,a,b,c,d)}T.augmentClass(Nb,{data:null});var Pb=[9,13,27,32],Vb=l.canUseDOM&&\"CompositionEvent\"in window,Wb=null;l.canUseDOM&&\"documentMode\"in document&&(Wb=document.documentMode);var Xb;\nif(Xb=l.canUseDOM&&\"TextEvent\"in window&&!Wb){var Yb=window.opera;Xb=!(\"object\"===typeof Yb&&\"function\"===typeof Yb.version&&12>=parseInt(Yb.version(),10))}\nvar Zb=Xb,$b=l.canUseDOM&&(!Vb||Wb&&8=Wb),ac=String.fromCharCode(32),bc={beforeInput:{phasedRegistrationNames:{bubbled:\"onBeforeInput\",captured:\"onBeforeInputCapture\"},dependencies:[\"topCompositionEnd\",\"topKeyPress\",\"topTextInput\",\"topPaste\"]},compositionEnd:{phasedRegistrationNames:{bubbled:\"onCompositionEnd\",captured:\"onCompositionEndCapture\"},dependencies:\"topBlur topCompositionEnd topKeyDown topKeyPress topKeyUp topMouseDown\".split(\" \")},compositionStart:{phasedRegistrationNames:{bubbled:\"onCompositionStart\",\ncaptured:\"onCompositionStartCapture\"},dependencies:\"topBlur topCompositionStart topKeyDown topKeyPress topKeyUp topMouseDown\".split(\" \")},compositionUpdate:{phasedRegistrationNames:{bubbled:\"onCompositionUpdate\",captured:\"onCompositionUpdateCapture\"},dependencies:\"topBlur topCompositionUpdate topKeyDown topKeyPress topKeyUp topMouseDown\".split(\" \")}},cc=!1;\nfunction dc(a,b){switch(a){case \"topKeyUp\":return-1!==Pb.indexOf(b.keyCode);case \"topKeyDown\":return 229!==b.keyCode;case \"topKeyPress\":case \"topMouseDown\":case \"topBlur\":return!0;default:return!1}}function ec(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var fc=!1;function gc(a,b){switch(a){case \"topCompositionEnd\":return ec(b);case \"topKeyPress\":if(32!==b.which)return null;cc=!0;return ac;case \"topTextInput\":return a=b.data,a===ac&&cc?null:a;default:return null}}\nfunction hc(a,b){if(fc)return\"topCompositionEnd\"===a||!Vb&&dc(a,b)?(a=Fb(),S._root=null,S._startText=null,S._fallbackText=null,fc=!1,a):null;switch(a){case \"topPaste\":return null;case \"topKeyPress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1qd.length&&qd.push(a)}}}\nvar xd=Object.freeze({get _enabled(){return td},get _handleTopLevel(){return sd},setHandleTopLevel:function(a){sd=a},setEnabled:ud,isEnabled:function(){return td},trapBubbledEvent:U,trapCapturedEvent:wd,dispatchEvent:vd});function yd(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c[\"Webkit\"+a]=\"webkit\"+b;c[\"Moz\"+a]=\"moz\"+b;c[\"ms\"+a]=\"MS\"+b;c[\"O\"+a]=\"o\"+b.toLowerCase();return c}\nvar zd={animationend:yd(\"Animation\",\"AnimationEnd\"),animationiteration:yd(\"Animation\",\"AnimationIteration\"),animationstart:yd(\"Animation\",\"AnimationStart\"),transitionend:yd(\"Transition\",\"TransitionEnd\")},Ad={},Bd={};l.canUseDOM&&(Bd=document.createElement(\"div\").style,\"AnimationEvent\"in window||(delete zd.animationend.animation,delete zd.animationiteration.animation,delete zd.animationstart.animation),\"TransitionEvent\"in window||delete zd.transitionend.transition);\nfunction Cd(a){if(Ad[a])return Ad[a];if(!zd[a])return a;var b=zd[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Bd)return Ad[a]=b[c];return\"\"}\nvar Dd={topAbort:\"abort\",topAnimationEnd:Cd(\"animationend\")||\"animationend\",topAnimationIteration:Cd(\"animationiteration\")||\"animationiteration\",topAnimationStart:Cd(\"animationstart\")||\"animationstart\",topBlur:\"blur\",topCancel:\"cancel\",topCanPlay:\"canplay\",topCanPlayThrough:\"canplaythrough\",topChange:\"change\",topClick:\"click\",topClose:\"close\",topCompositionEnd:\"compositionend\",topCompositionStart:\"compositionstart\",topCompositionUpdate:\"compositionupdate\",topContextMenu:\"contextmenu\",topCopy:\"copy\",\ntopCut:\"cut\",topDoubleClick:\"dblclick\",topDrag:\"drag\",topDragEnd:\"dragend\",topDragEnter:\"dragenter\",topDragExit:\"dragexit\",topDragLeave:\"dragleave\",topDragOver:\"dragover\",topDragStart:\"dragstart\",topDrop:\"drop\",topDurationChange:\"durationchange\",topEmptied:\"emptied\",topEncrypted:\"encrypted\",topEnded:\"ended\",topError:\"error\",topFocus:\"focus\",topInput:\"input\",topKeyDown:\"keydown\",topKeyPress:\"keypress\",topKeyUp:\"keyup\",topLoadedData:\"loadeddata\",topLoad:\"load\",topLoadedMetadata:\"loadedmetadata\",topLoadStart:\"loadstart\",\ntopMouseDown:\"mousedown\",topMouseMove:\"mousemove\",topMouseOut:\"mouseout\",topMouseOver:\"mouseover\",topMouseUp:\"mouseup\",topPaste:\"paste\",topPause:\"pause\",topPlay:\"play\",topPlaying:\"playing\",topProgress:\"progress\",topRateChange:\"ratechange\",topScroll:\"scroll\",topSeeked:\"seeked\",topSeeking:\"seeking\",topSelectionChange:\"selectionchange\",topStalled:\"stalled\",topSuspend:\"suspend\",topTextInput:\"textInput\",topTimeUpdate:\"timeupdate\",topToggle:\"toggle\",topTouchCancel:\"touchcancel\",topTouchEnd:\"touchend\",topTouchMove:\"touchmove\",\ntopTouchStart:\"touchstart\",topTransitionEnd:Cd(\"transitionend\")||\"transitionend\",topVolumeChange:\"volumechange\",topWaiting:\"waiting\",topWheel:\"wheel\"},Ed={},Fd=0,Gd=\"_reactListenersID\"+(\"\"+Math.random()).slice(2);function Hd(a){Object.prototype.hasOwnProperty.call(a,Gd)||(a[Gd]=Fd++,Ed[a[Gd]]={});return Ed[a[Gd]]}function Id(a){for(;a&&a.firstChild;)a=a.firstChild;return a}\nfunction Jd(a,b){var c=Id(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=Id(c)}}function Kd(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&\"text\"===a.type||\"textarea\"===b||\"true\"===a.contentEditable)}\nvar Ld=l.canUseDOM&&\"documentMode\"in document&&11>=document.documentMode,Md={select:{phasedRegistrationNames:{bubbled:\"onSelect\",captured:\"onSelectCapture\"},dependencies:\"topBlur topContextMenu topFocus topKeyDown topKeyUp topMouseDown topMouseUp topSelectionChange\".split(\" \")}},Nd=null,Od=null,Pd=null,Qd=!1;\nfunction Rd(a,b){if(Qd||null==Nd||Nd!==da())return null;var c=Nd;\"selectionStart\"in c&&Kd(c)?c={start:c.selectionStart,end:c.selectionEnd}:window.getSelection?(c=window.getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}):c=void 0;return Pd&&ea(Pd,c)?null:(Pd=c,a=T.getPooled(Md.select,Od,a,b),a.type=\"select\",a.target=Nd,Ab(a),a)}\nvar Sd={eventTypes:Md,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=Hd(e);f=Sa.onSelect;for(var g=0;ghe||(a.current=ge[he],ge[he]=null,he--)}function W(a,b){he++;ge[he]=a.current;a.current=b}new Set;var ie={current:D},X={current:!1},je=D;function ke(a){return le(a)?je:ie.current}\nfunction me(a,b){var c=a.type.contextTypes;if(!c)return D;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 le(a){return 2===a.tag&&null!=a.type.childContextTypes}function ne(a){le(a)&&(V(X,a),V(ie,a))}\nfunction oe(a,b,c){null!=ie.cursor?E(\"168\"):void 0;W(ie,b,a);W(X,c,a)}function pe(a,b){var c=a.stateNode,d=a.type.childContextTypes;if(\"function\"!==typeof c.getChildContext)return b;c=c.getChildContext();for(var e in c)e in d?void 0:E(\"108\",jd(a)||\"Unknown\",e);return B({},b,c)}function qe(a){if(!le(a))return!1;var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||D;je=ie.current;W(ie,b,a);W(X,X.current,a);return!0}\nfunction re(a,b){var c=a.stateNode;c?void 0:E(\"169\");if(b){var d=pe(a,je);c.__reactInternalMemoizedMergedChildContext=d;V(X,a);V(ie,a);W(ie,d,a)}else V(X,a);W(X,b,a)}\nfunction Y(a,b,c){this.tag=a;this.key=b;this.stateNode=this.type=null;this.sibling=this.child=this[\"return\"]=null;this.index=0;this.memoizedState=this.updateQueue=this.memoizedProps=this.pendingProps=this.ref=null;this.internalContextTag=c;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.expirationTime=0;this.alternate=null}\nfunction se(a,b,c){var d=a.alternate;null===d?(d=new Y(a.tag,a.key,a.internalContextTag),d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.effectTag=0,d.nextEffect=null,d.firstEffect=null,d.lastEffect=null);d.expirationTime=c;d.pendingProps=b;d.child=a.child;d.memoizedProps=a.memoizedProps;d.memoizedState=a.memoizedState;d.updateQueue=a.updateQueue;d.sibling=a.sibling;d.index=a.index;d.ref=a.ref;return d}\nfunction te(a,b,c){var d=void 0,e=a.type,f=a.key;\"function\"===typeof e?(d=e.prototype&&e.prototype.isReactComponent?new Y(2,f,b):new Y(0,f,b),d.type=e,d.pendingProps=a.props):\"string\"===typeof e?(d=new Y(5,f,b),d.type=e,d.pendingProps=a.props):\"object\"===typeof e&&null!==e&&\"number\"===typeof e.tag?(d=e,d.pendingProps=a.props):E(\"130\",null==e?e:typeof e,\"\");d.expirationTime=c;return d}function ue(a,b,c,d){b=new Y(10,d,b);b.pendingProps=a;b.expirationTime=c;return b}\nfunction ve(a,b,c){b=new Y(6,null,b);b.pendingProps=a;b.expirationTime=c;return b}function we(a,b,c){b=new Y(7,a.key,b);b.type=a.handler;b.pendingProps=a;b.expirationTime=c;return b}function xe(a,b,c){a=new Y(9,null,b);a.expirationTime=c;return a}function ye(a,b,c){b=new Y(4,a.key,b);b.pendingProps=a.children||[];b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}var ze=null,Ae=null;\nfunction Be(a){return function(b){try{return a(b)}catch(c){}}}function Ce(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);ze=Be(function(a){return b.onCommitFiberRoot(c,a)});Ae=Be(function(a){return b.onCommitFiberUnmount(c,a)})}catch(d){}return!0}function De(a){\"function\"===typeof ze&&ze(a)}function Ee(a){\"function\"===typeof Ae&&Ae(a)}\nfunction Fe(a){return{baseState:a,expirationTime:0,first:null,last:null,callbackList:null,hasForceUpdate:!1,isInitialized:!1}}function Ge(a,b){null===a.last?a.first=a.last=b:(a.last.next=b,a.last=b);if(0===a.expirationTime||a.expirationTime>b.expirationTime)a.expirationTime=b.expirationTime}\nfunction He(a,b){var c=a.alternate,d=a.updateQueue;null===d&&(d=a.updateQueue=Fe(null));null!==c?(a=c.updateQueue,null===a&&(a=c.updateQueue=Fe(null))):a=null;a=a!==d?a:null;null===a?Ge(d,b):null===d.last||null===a.last?(Ge(d,b),Ge(a,b)):(Ge(d,b),a.last=b)}function Ie(a,b,c,d){a=a.partialState;return\"function\"===typeof a?a.call(b,c,d):a}\nfunction Je(a,b,c,d,e,f){null!==a&&a.updateQueue===c&&(c=b.updateQueue={baseState:c.baseState,expirationTime:c.expirationTime,first:c.first,last:c.last,isInitialized:c.isInitialized,callbackList:null,hasForceUpdate:!1});c.expirationTime=0;c.isInitialized?a=c.baseState:(a=c.baseState=b.memoizedState,c.isInitialized=!0);for(var g=!0,h=c.first,k=!1;null!==h;){var q=h.expirationTime;if(q>f){var v=c.expirationTime;if(0===v||v>q)c.expirationTime=q;k||(k=!0,c.baseState=a)}else{k||(c.first=h.next,null===\nc.first&&(c.last=null));if(h.isReplace)a=Ie(h,d,a,e),g=!0;else if(q=Ie(h,d,a,e))a=g?B({},a,q):B(a,q),g=!1;h.isForced&&(c.hasForceUpdate=!0);null!==h.callback&&(q=c.callbackList,null===q&&(q=c.callbackList=[]),q.push(h))}h=h.next}null!==c.callbackList?b.effectTag|=32:null!==c.first||c.hasForceUpdate||(b.updateQueue=null);k||(c.baseState=a);return a}\nfunction Ke(a,b){var c=a.callbackList;if(null!==c)for(a.callbackList=null,a=0;aw?(k=n,n=null):k=n.sibling;var x=G(e,n,m[w],A);if(null===x){null===n&&(n=k);break}a&&n&&null===x.alternate&&b(e,n);g=f(x,g,w);null===r?h=x:r.sibling=x;r=x;n=k}if(w===m.length)return c(e,n),h;if(null===n){for(;ww?(k=n,n=null):k=n.sibling;var J=G(e,n,x.value,A);if(null===J){n||(n=k);break}a&&n&&null===J.alternate&&b(e,n);g=f(J,\ng,w);null===r?h=J:r.sibling=J;r=J;n=k}if(x.done)return c(e,n),h;if(null===n){for(;!x.done;w++,x=m.next())x=z(e,x.value,A),null!==x&&(g=f(x,g,w),null===r?h=x:r.sibling=x,r=x);return h}for(n=d(e,n);!x.done;w++,x=m.next())if(x=I(n,e,w,x.value,A),null!==x){if(a&&null!==x.alternate)n[\"delete\"](null===x.key?w:x.key);g=f(x,g,w);null===r?h=x:r.sibling=x;r=x}a&&n.forEach(function(a){return b(e,a)});return h}return function(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===Ve&&null===f.key&&(f=f.props.children);\nvar m=\"object\"===typeof f&&null!==f;if(m)switch(f.$$typeof){case Re:a:{var r=f.key;for(m=d;null!==m;){if(m.key===r)if(10===m.tag?f.type===Ve:m.type===f.type){c(a,m.sibling);d=e(m,f.type===Ve?f.props.children:f.props,h);d.ref=Ze(m,f);d[\"return\"]=a;a=d;break a}else{c(a,m);break}else b(a,m);m=m.sibling}f.type===Ve?(d=ue(f.props.children,a.internalContextTag,h,f.key),d[\"return\"]=a,a=d):(h=te(f,a.internalContextTag,h),h.ref=Ze(d,f),h[\"return\"]=a,a=h)}return g(a);case Se:a:{for(m=f.key;null!==d;){if(d.key===\nm)if(7===d.tag){c(a,d.sibling);d=e(d,f,h);d[\"return\"]=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=we(f,a.internalContextTag,h);d[\"return\"]=a;a=d}return g(a);case Te:a:{if(null!==d)if(9===d.tag){c(a,d.sibling);d=e(d,null,h);d.type=f.value;d[\"return\"]=a;a=d;break a}else c(a,d);d=xe(f,a.internalContextTag,h);d.type=f.value;d[\"return\"]=a;a=d}return g(a);case Ue:a:{for(m=f.key;null!==d;){if(d.key===m)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===\nf.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=ye(f,a.internalContextTag,h);d[\"return\"]=a;a=d}return g(a)}if(\"string\"===typeof f||\"number\"===typeof f)return f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h)):(c(a,d),d=ve(f,a.internalContextTag,h)),d[\"return\"]=a,a=d,g(a);if(Ye(f))return L(a,d,f,h);if(Xe(f))return N(a,d,f,h);m&&$e(a,f);if(\"undefined\"===typeof f)switch(a.tag){case 2:case 1:h=a.type,E(\"152\",h.displayName||\nh.name||\"Component\")}return c(a,d)}}var bf=af(!0),cf=af(!1);\nfunction df(a,b,c,d,e){function f(a,b,c){var d=b.expirationTime;b.child=null===a?cf(b,null,c,d):bf(b,a.child,c,d)}function g(a,b){var c=b.ref;null===c||a&&a.ref===c||(b.effectTag|=128)}function h(a,b,c,d){g(a,b);if(!c)return d&&re(b,!1),q(a,b);c=b.stateNode;id.current=b;var e=c.render();b.effectTag|=1;f(a,b,e);b.memoizedState=c.state;b.memoizedProps=c.props;d&&re(b,!0);return b.child}function k(a){var b=a.stateNode;b.pendingContext?oe(a,b.pendingContext,b.pendingContext!==b.context):b.context&&oe(a,\nb.context,!1);I(a,b.containerInfo)}function q(a,b){null!==a&&b.child!==a.child?E(\"153\"):void 0;if(null!==b.child){a=b.child;var c=se(a,a.pendingProps,a.expirationTime);b.child=c;for(c[\"return\"]=b;null!==a.sibling;)a=a.sibling,c=c.sibling=se(a,a.pendingProps,a.expirationTime),c[\"return\"]=b;c.sibling=null}return b.child}function v(a,b){switch(b.tag){case 3:k(b);break;case 2:qe(b);break;case 4:I(b,b.stateNode.containerInfo)}return null}var y=a.shouldSetTextContent,u=a.useSyncScheduling,z=a.shouldDeprioritizeSubtree,\nG=b.pushHostContext,I=b.pushHostContainer,L=c.enterHydrationState,N=c.resetHydrationState,J=c.tryToClaimNextHydratableInstance;a=Le(d,e,function(a,b){a.memoizedProps=b},function(a,b){a.memoizedState=b});var w=a.adoptClassInstance,m=a.constructClassInstance,A=a.mountClassInstance,Ob=a.updateClassInstance;return{beginWork:function(a,b,c){if(0===b.expirationTime||b.expirationTime>c)return v(a,b);switch(b.tag){case 0:null!==a?E(\"155\"):void 0;var d=b.type,e=b.pendingProps,r=ke(b);r=me(b,r);d=d(e,r);b.effectTag|=\n1;\"object\"===typeof d&&null!==d&&\"function\"===typeof d.render?(b.tag=2,e=qe(b),w(b,d),A(b,c),b=h(a,b,!0,e)):(b.tag=1,f(a,b,d),b.memoizedProps=e,b=b.child);return b;case 1:a:{e=b.type;c=b.pendingProps;d=b.memoizedProps;if(X.current)null===c&&(c=d);else if(null===c||d===c){b=q(a,b);break a}d=ke(b);d=me(b,d);e=e(c,d);b.effectTag|=1;f(a,b,e);b.memoizedProps=c;b=b.child}return b;case 2:return e=qe(b),d=void 0,null===a?b.stateNode?E(\"153\"):(m(b,b.pendingProps),A(b,c),d=!0):d=Ob(a,b,c),h(a,b,d,e);case 3:return k(b),\ne=b.updateQueue,null!==e?(d=b.memoizedState,e=Je(a,b,e,null,null,c),d===e?(N(),b=q(a,b)):(d=e.element,r=b.stateNode,(null===a||null===a.child)&&r.hydrate&&L(b)?(b.effectTag|=2,b.child=cf(b,null,d,c)):(N(),f(a,b,d)),b.memoizedState=e,b=b.child)):(N(),b=q(a,b)),b;case 5:G(b);null===a&&J(b);e=b.type;var n=b.memoizedProps;d=b.pendingProps;null===d&&(d=n,null===d?E(\"154\"):void 0);r=null!==a?a.memoizedProps:null;X.current||null!==d&&n!==d?(n=d.children,y(e,d)?n=null:r&&y(e,r)&&(b.effectTag|=16),g(a,b),\n2147483647!==c&&!u&&z(e,d)?(b.expirationTime=2147483647,b=null):(f(a,b,n),b.memoizedProps=d,b=b.child)):b=q(a,b);return b;case 6:return null===a&&J(b),a=b.pendingProps,null===a&&(a=b.memoizedProps),b.memoizedProps=a,null;case 8:b.tag=7;case 7:e=b.pendingProps;if(X.current)null===e&&(e=a&&a.memoizedProps,null===e?E(\"154\"):void 0);else if(null===e||b.memoizedProps===e)e=b.memoizedProps;d=e.children;b.stateNode=null===a?cf(b,b.stateNode,d,c):bf(b,b.stateNode,d,c);b.memoizedProps=e;return b.stateNode;\ncase 9:return null;case 4:a:{I(b,b.stateNode.containerInfo);e=b.pendingProps;if(X.current)null===e&&(e=a&&a.memoizedProps,null==e?E(\"154\"):void 0);else if(null===e||b.memoizedProps===e){b=q(a,b);break a}null===a?b.child=bf(b,null,e,c):f(a,b,e);b.memoizedProps=e;b=b.child}return b;case 10:a:{c=b.pendingProps;if(X.current)null===c&&(c=b.memoizedProps);else if(null===c||b.memoizedProps===c){b=q(a,b);break a}f(a,b,c);b.memoizedProps=c;b=b.child}return b;default:E(\"156\")}},beginFailedWork:function(a,b,\nc){switch(b.tag){case 2:qe(b);break;case 3:k(b);break;default:E(\"157\")}b.effectTag|=64;null===a?b.child=null:b.child!==a.child&&(b.child=a.child);if(0===b.expirationTime||b.expirationTime>c)return v(a,b);b.firstEffect=null;b.lastEffect=null;b.child=null===a?cf(b,null,null,c):bf(b,a.child,null,c);2===b.tag&&(a=b.stateNode,b.memoizedProps=a.props,b.memoizedState=a.state);return b.child}}}\nfunction ef(a,b,c){function d(a){a.effectTag|=4}var e=a.createInstance,f=a.createTextInstance,g=a.appendInitialChild,h=a.finalizeInitialChildren,k=a.prepareUpdate,q=a.persistence,v=b.getRootHostContainer,y=b.popHostContext,u=b.getHostContext,z=b.popHostContainer,G=c.prepareToHydrateHostInstance,I=c.prepareToHydrateHostTextInstance,L=c.popHydrationState,N=void 0,J=void 0,w=void 0;a.mutation?(N=function(){},J=function(a,b,c){(b.updateQueue=c)&&d(b)},w=function(a,b,c,e){c!==e&&d(b)}):q?E(\"235\"):E(\"236\");\nreturn{completeWork:function(a,b,c){var m=b.pendingProps;if(null===m)m=b.memoizedProps;else if(2147483647!==b.expirationTime||2147483647===c)b.pendingProps=null;switch(b.tag){case 1:return null;case 2:return ne(b),null;case 3:z(b);V(X,b);V(ie,b);m=b.stateNode;m.pendingContext&&(m.context=m.pendingContext,m.pendingContext=null);if(null===a||null===a.child)L(b),b.effectTag&=-3;N(b);return null;case 5:y(b);c=v();var A=b.type;if(null!==a&&null!=b.stateNode){var p=a.memoizedProps,q=b.stateNode,x=u();q=\nk(q,A,p,m,c,x);J(a,b,q,A,p,m,c);a.ref!==b.ref&&(b.effectTag|=128)}else{if(!m)return null===b.stateNode?E(\"166\"):void 0,null;a=u();if(L(b))G(b,c,a)&&d(b);else{a=e(A,m,c,a,b);a:for(p=b.child;null!==p;){if(5===p.tag||6===p.tag)g(a,p.stateNode);else if(4!==p.tag&&null!==p.child){p.child[\"return\"]=p;p=p.child;continue}if(p===b)break;for(;null===p.sibling;){if(null===p[\"return\"]||p[\"return\"]===b)break a;p=p[\"return\"]}p.sibling[\"return\"]=p[\"return\"];p=p.sibling}h(a,A,m,c)&&d(b);b.stateNode=a}null!==b.ref&&\n(b.effectTag|=128)}return null;case 6:if(a&&null!=b.stateNode)w(a,b,a.memoizedProps,m);else{if(\"string\"!==typeof m)return null===b.stateNode?E(\"166\"):void 0,null;a=v();c=u();L(b)?I(b)&&d(b):b.stateNode=f(m,a,c,b)}return null;case 7:(m=b.memoizedProps)?void 0:E(\"165\");b.tag=8;A=[];a:for((p=b.stateNode)&&(p[\"return\"]=b);null!==p;){if(5===p.tag||6===p.tag||4===p.tag)E(\"247\");else if(9===p.tag)A.push(p.type);else if(null!==p.child){p.child[\"return\"]=p;p=p.child;continue}for(;null===p.sibling;){if(null===\np[\"return\"]||p[\"return\"]===b)break a;p=p[\"return\"]}p.sibling[\"return\"]=p[\"return\"];p=p.sibling}p=m.handler;m=p(m.props,A);b.child=bf(b,null!==a?a.child:null,m,c);return b.child;case 8:return b.tag=7,null;case 9:return null;case 10:return null;case 4:return z(b),N(b),null;case 0:E(\"167\");default:E(\"156\")}}}}\nfunction ff(a,b){function c(a){var c=a.ref;if(null!==c)try{c(null)}catch(A){b(a,A)}}function d(a){\"function\"===typeof Ee&&Ee(a);switch(a.tag){case 2:c(a);var d=a.stateNode;if(\"function\"===typeof d.componentWillUnmount)try{d.props=a.memoizedProps,d.state=a.memoizedState,d.componentWillUnmount()}catch(A){b(a,A)}break;case 5:c(a);break;case 7:e(a.stateNode);break;case 4:k&&g(a)}}function e(a){for(var b=a;;)if(d(b),null===b.child||k&&4===b.tag){if(b===a)break;for(;null===b.sibling;){if(null===b[\"return\"]||\nb[\"return\"]===a)return;b=b[\"return\"]}b.sibling[\"return\"]=b[\"return\"];b=b.sibling}else b.child[\"return\"]=b,b=b.child}function f(a){return 5===a.tag||3===a.tag||4===a.tag}function g(a){for(var b=a,c=!1,f=void 0,g=void 0;;){if(!c){c=b[\"return\"];a:for(;;){null===c?E(\"160\"):void 0;switch(c.tag){case 5:f=c.stateNode;g=!1;break a;case 3:f=c.stateNode.containerInfo;g=!0;break a;case 4:f=c.stateNode.containerInfo;g=!0;break a}c=c[\"return\"]}c=!0}if(5===b.tag||6===b.tag)e(b),g?J(f,b.stateNode):N(f,b.stateNode);\nelse if(4===b.tag?f=b.stateNode.containerInfo:d(b),null!==b.child){b.child[\"return\"]=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b[\"return\"]||b[\"return\"]===a)return;b=b[\"return\"];4===b.tag&&(c=!1)}b.sibling[\"return\"]=b[\"return\"];b=b.sibling}}var h=a.getPublicInstance,k=a.mutation;a=a.persistence;k||(a?E(\"235\"):E(\"236\"));var q=k.commitMount,v=k.commitUpdate,y=k.resetTextContent,u=k.commitTextUpdate,z=k.appendChild,G=k.appendChildToContainer,I=k.insertBefore,L=k.insertInContainerBefore,\nN=k.removeChild,J=k.removeChildFromContainer;return{commitResetTextContent:function(a){y(a.stateNode)},commitPlacement:function(a){a:{for(var b=a[\"return\"];null!==b;){if(f(b)){var c=b;break a}b=b[\"return\"]}E(\"160\");c=void 0}var d=b=void 0;switch(c.tag){case 5:b=c.stateNode;d=!1;break;case 3:b=c.stateNode.containerInfo;d=!0;break;case 4:b=c.stateNode.containerInfo;d=!0;break;default:E(\"161\")}c.effectTag&16&&(y(b),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c[\"return\"]||f(c[\"return\"])){c=\nnull;break a}c=c[\"return\"]}c.sibling[\"return\"]=c[\"return\"];for(c=c.sibling;5!==c.tag&&6!==c.tag;){if(c.effectTag&2)continue b;if(null===c.child||4===c.tag)continue b;else c.child[\"return\"]=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){if(5===e.tag||6===e.tag)c?d?L(b,e.stateNode,c):I(b,e.stateNode,c):d?G(b,e.stateNode):z(b,e.stateNode);else if(4!==e.tag&&null!==e.child){e.child[\"return\"]=e;e=e.child;continue}if(e===a)break;for(;null===e.sibling;){if(null===e[\"return\"]||e[\"return\"]===\na)return;e=e[\"return\"]}e.sibling[\"return\"]=e[\"return\"];e=e.sibling}},commitDeletion:function(a){g(a);a[\"return\"]=null;a.child=null;a.alternate&&(a.alternate.child=null,a.alternate[\"return\"]=null)},commitWork:function(a,b){switch(b.tag){case 2:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps;a=null!==a?a.memoizedProps:d;var e=b.type,f=b.updateQueue;b.updateQueue=null;null!==f&&v(c,f,e,a,d,b)}break;case 6:null===b.stateNode?E(\"162\"):void 0;c=b.memoizedProps;u(b.stateNode,null!==a?a.memoizedProps:\nc,c);break;case 3:break;default:E(\"163\")}},commitLifeCycles:function(a,b){switch(b.tag){case 2:var c=b.stateNode;if(b.effectTag&4)if(null===a)c.props=b.memoizedProps,c.state=b.memoizedState,c.componentDidMount();else{var d=a.memoizedProps;a=a.memoizedState;c.props=b.memoizedProps;c.state=b.memoizedState;c.componentDidUpdate(d,a)}b=b.updateQueue;null!==b&&Ke(b,c);break;case 3:c=b.updateQueue;null!==c&&Ke(c,null!==b.child?b.child.stateNode:null);break;case 5:c=b.stateNode;null===a&&b.effectTag&4&&q(c,\nb.type,b.memoizedProps,b);break;case 6:break;case 4:break;default:E(\"163\")}},commitAttachRef:function(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:b(h(c));break;default:b(c)}}},commitDetachRef:function(a){a=a.ref;null!==a&&a(null)}}}var gf={};\nfunction hf(a){function b(a){a===gf?E(\"174\"):void 0;return a}var c=a.getChildHostContext,d=a.getRootHostContext,e={current:gf},f={current:gf},g={current:gf};return{getHostContext:function(){return b(e.current)},getRootHostContainer:function(){return b(g.current)},popHostContainer:function(a){V(e,a);V(f,a);V(g,a)},popHostContext:function(a){f.current===a&&(V(e,a),V(f,a))},pushHostContainer:function(a,b){W(g,b,a);b=d(b);W(f,a,a);W(e,b,a)},pushHostContext:function(a){var d=b(g.current),h=b(e.current);\nd=c(h,a.type,d);h!==d&&(W(f,a,a),W(e,d,a))},resetHostContainer:function(){e.current=gf;g.current=gf}}}\nfunction jf(a){function b(a,b){var c=new Y(5,null,0);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 c(a,b){switch(a.tag){case 5:return b=f(b,a.type,a.pendingProps),null!==b?(a.stateNode=b,!0):!1;case 6:return b=g(b,a.pendingProps),null!==b?(a.stateNode=b,!0):!1;default:return!1}}function d(a){for(a=a[\"return\"];null!==a&&5!==a.tag&&3!==a.tag;)a=a[\"return\"];y=a}var e=a.shouldSetTextContent;\na=a.hydration;if(!a)return{enterHydrationState:function(){return!1},resetHydrationState:function(){},tryToClaimNextHydratableInstance:function(){},prepareToHydrateHostInstance:function(){E(\"175\")},prepareToHydrateHostTextInstance:function(){E(\"176\")},popHydrationState:function(){return!1}};var f=a.canHydrateInstance,g=a.canHydrateTextInstance,h=a.getNextHydratableSibling,k=a.getFirstHydratableChild,q=a.hydrateInstance,v=a.hydrateTextInstance,y=null,u=null,z=!1;return{enterHydrationState:function(a){u=\nk(a.stateNode.containerInfo);y=a;return z=!0},resetHydrationState:function(){u=y=null;z=!1},tryToClaimNextHydratableInstance:function(a){if(z){var d=u;if(d){if(!c(a,d)){d=h(d);if(!d||!c(a,d)){a.effectTag|=2;z=!1;y=a;return}b(y,u)}y=a;u=k(d)}else a.effectTag|=2,z=!1,y=a}},prepareToHydrateHostInstance:function(a,b,c){b=q(a.stateNode,a.type,a.memoizedProps,b,c,a);a.updateQueue=b;return null!==b?!0:!1},prepareToHydrateHostTextInstance:function(a){return v(a.stateNode,a.memoizedProps,a)},popHydrationState:function(a){if(a!==\ny)return!1;if(!z)return d(a),z=!0,!1;var c=a.type;if(5!==a.tag||\"head\"!==c&&\"body\"!==c&&!e(c,a.memoizedProps))for(c=u;c;)b(a,c),c=h(c);d(a);u=y?h(a.stateNode):null;return!0}}}\nfunction kf(a){function b(a){Qb=ja=!0;var b=a.stateNode;b.current===a?E(\"177\"):void 0;b.isReadyForCommit=!1;id.current=null;if(1g.expirationTime)&&(f=g.expirationTime),g=g.sibling;e.expirationTime=f}if(null!==b)return b;null!==c&&(null===c.firstEffect&&(c.firstEffect=a.firstEffect),null!==a.lastEffect&&(null!==c.lastEffect&&(c.lastEffect.nextEffect=a.firstEffect),c.lastEffect=a.lastEffect),1a))if(H<=Uc)for(;null!==F;)F=k(F)?e(F):d(F);else for(;null!==F&&!A();)F=k(F)?e(F):d(F)}else if(!(0===H||H>a))if(H<=Uc)for(;null!==F;)F=d(F);else for(;null!==F&&!A();)F=d(F)}function g(a,b){ja?E(\"243\"):void 0;ja=!0;a.isReadyForCommit=\n!1;if(a!==ra||b!==H||null===F){for(;-1b)a.expirationTime=b;null!==a.alternate&&(0===a.alternate.expirationTime||a.alternate.expirationTime>b)&&(a.alternate.expirationTime=b);if(null===a[\"return\"])if(3===a.tag){var c=a.stateNode;!ja&&c===ra&&bIg&&E(\"185\");if(null===d.nextScheduledRoot)d.remainingExpirationTime=e,null===O?(sa=O=d,d.nextScheduledRoot=d):(O=O.nextScheduledRoot=d,O.nextScheduledRoot=sa);else{var f=d.remainingExpirationTime;if(0===f||eTb)return;Jg(Xc)}var b=Wc()-Pe;Tb=a;Xc=Kg(J,{timeout:10*(a-2)-b})}function N(){var a=0,b=null;if(null!==O)for(var c=O,d=sa;null!==d;){var e=d.remainingExpirationTime;if(0===e){null===c||null===O?E(\"244\"):void 0;if(d===d.nextScheduledRoot){sa=O=d.nextScheduledRoot=null;break}else if(d===sa)sa=e=d.nextScheduledRoot,\nO.nextScheduledRoot=e,d.nextScheduledRoot=null;else if(d===O){O=c;O.nextScheduledRoot=sa;d.nextScheduledRoot=null;break}else c.nextScheduledRoot=d.nextScheduledRoot,d.nextScheduledRoot=null;d=c.nextScheduledRoot}else{if(0===a||eLg?!1:Yc=!0}function Ob(a){null===ma?E(\"246\"):\nvoid 0;ma.remainingExpirationTime=0;Ub||(Ub=!0,Zc=a)}var r=hf(a),n=jf(a),p=r.popHostContainer,qg=r.popHostContext,x=r.resetHostContainer,Me=df(a,r,n,u,y),rg=Me.beginWork,Gg=Me.beginFailedWork,Fg=ef(a,r,n).completeWork;r=ff(a,h);var zg=r.commitResetTextContent,Ne=r.commitPlacement,Bg=r.commitDeletion,Oe=r.commitWork,Dg=r.commitLifeCycles,Eg=r.commitAttachRef,Ag=r.commitDetachRef,Wc=a.now,Kg=a.scheduleDeferredCallback,Jg=a.cancelDeferredCallback,Hg=a.useSyncScheduling,yg=a.prepareForCommit,Cg=a.resetAfterCommit,\nPe=Wc(),Uc=2,ka=0,ja=!1,F=null,ra=null,H=0,t=null,R=null,qa=null,ha=null,ca=null,eb=!1,Qb=!1,Sc=!1,sa=null,O=null,Tb=0,Xc=-1,Fa=!1,ma=null,na=0,Yc=!1,Ub=!1,Zc=null,fb=null,la=!1,Sb=!1,Ig=1E3,Rb=0,Lg=1;return{computeAsyncExpiration:v,computeExpirationForFiber:y,scheduleWork:u,batchedUpdates:function(a,b){var c=la;la=!0;try{return a(b)}finally{(la=c)||Fa||w(1,null)}},unbatchedUpdates:function(a){if(la&&!Sb){Sb=!0;try{return a()}finally{Sb=!1}}return a()},flushSync:function(a){var b=la;la=!0;try{a:{var c=\nka;ka=1;try{var d=a();break a}finally{ka=c}d=void 0}return d}finally{la=b,Fa?E(\"187\"):void 0,w(1,null)}},deferredUpdates:function(a){var b=ka;ka=v();try{return a()}finally{ka=b}}}}\nfunction lf(a){function b(a){a=od(a);return null===a?null:a.stateNode}var c=a.getPublicInstance;a=kf(a);var d=a.computeAsyncExpiration,e=a.computeExpirationForFiber,f=a.scheduleWork;return{createContainer:function(a,b){var c=new Y(3,null,0);a={current:c,containerInfo:a,pendingChildren:null,remainingExpirationTime:0,isReadyForCommit:!1,finishedWork:null,context:null,pendingContext:null,hydrate:b,nextScheduledRoot:null};return c.stateNode=a},updateContainer:function(a,b,c,q){var g=b.current;if(c){c=\nc._reactInternalFiber;var h;b:{2===kd(c)&&2===c.tag?void 0:E(\"170\");for(h=c;3!==h.tag;){if(le(h)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}(h=h[\"return\"])?void 0:E(\"171\")}h=h.stateNode.context}c=le(c)?pe(c,h):h}else c=D;null===b.context?b.context=c:b.pendingContext=c;b=q;b=void 0===b?null:b;q=null!=a&&null!=a.type&&null!=a.type.prototype&&!0===a.type.prototype.unstable_isAsyncReactComponent?d():e(g);He(g,{expirationTime:q,partialState:{element:a},callback:b,isReplace:!1,isForced:!1,\nnextCallback:null,next:null});f(g,q)},batchedUpdates:a.batchedUpdates,unbatchedUpdates:a.unbatchedUpdates,deferredUpdates:a.deferredUpdates,flushSync:a.flushSync,getPublicRootInstance:function(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return c(a.child.stateNode);default:return a.child.stateNode}},findHostInstance:b,findHostInstanceWithNoPortals:function(a){a=pd(a);return null===a?null:a.stateNode},injectIntoDevTools:function(a){var c=a.findFiberByHostInstance;return Ce(B({},\na,{findHostInstanceByFiber:function(a){return b(a)},findFiberByHostInstance:function(a){return c?c(a):null}}))}}}var mf=Object.freeze({default:lf}),nf=mf&&lf||mf,of=nf[\"default\"]?nf[\"default\"]:nf;function pf(a,b,c){var d=3=yf-a)if(-1!==wf&&wf<=\na)Bf.didTimeout=!0;else{xf||(xf=!0,requestAnimationFrame(Df));return}else Bf.didTimeout=!1;wf=-1;a=uf;uf=null;null!==a&&a(Bf)}},!1);var Df=function(a){xf=!1;var b=a-yf+Af;bb&&(b=8),Af=bc||d.hasOverloadedBooleanValue&&!1===c?Jf(a,b):d.mustUseProperty?a[d.propertyName]=c:(b=d.attributeName,(e=d.attributeNamespace)?a.setAttributeNS(e,b,\"\"+c):d.hasBooleanValue||d.hasOverloadedBooleanValue&&!0===c?a.setAttribute(b,\"\"):a.setAttribute(b,\"\"+c))}else Kf(a,b,va(b,c)?c:null)}\nfunction Kf(a,b,c){Hf(b)&&(null==c?a.removeAttribute(b):a.setAttribute(b,\"\"+c))}function Jf(a,b){var c=wa(b);c?(b=c.mutationMethod)?b(a,void 0):c.mustUseProperty?a[c.propertyName]=c.hasBooleanValue?!1:\"\":a.removeAttribute(c.attributeName):a.removeAttribute(b)}\nfunction Lf(a,b){var c=b.value,d=b.checked;return B({type:void 0,step:void 0,min:void 0,max:void 0},b,{defaultChecked:void 0,defaultValue:void 0,value:null!=c?c:a._wrapperState.initialValue,checked:null!=d?d:a._wrapperState.initialChecked})}function Mf(a,b){var c=b.defaultValue;a._wrapperState={initialChecked:null!=b.checked?b.checked:b.defaultChecked,initialValue:null!=b.value?b.value:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}\nfunction Nf(a,b){b=b.checked;null!=b&&If(a,\"checked\",b)}function Of(a,b){Nf(a,b);var c=b.value;if(null!=c)if(0===c&&\"\"===a.value)a.value=\"0\";else if(\"number\"===b.type){if(b=parseFloat(a.value)||0,c!=b||c==b&&a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else null==b.value&&null!=b.defaultValue&&a.defaultValue!==\"\"+b.defaultValue&&(a.defaultValue=\"\"+b.defaultValue),null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction Pf(a,b){switch(b.type){case \"submit\":case \"reset\":break;case \"color\":case \"date\":case \"datetime\":case \"datetime-local\":case \"month\":case \"time\":case \"week\":a.value=\"\";a.value=a.defaultValue;break;default:a.value=a.value}b=a.name;\"\"!==b&&(a.name=\"\");a.defaultChecked=!a.defaultChecked;a.defaultChecked=!a.defaultChecked;\"\"!==b&&(a.name=b)}function Qf(a){var b=\"\";aa.Children.forEach(a,function(a){null==a||\"string\"!==typeof a&&\"number\"!==typeof a||(b+=a)});return b}\nfunction Rf(a,b){a=B({children:void 0},b);if(b=Qf(b.children))a.children=b;return a}function Sf(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e=b.length?void 0:E(\"93\"),b=b[0]),c=\"\"+b),null==c&&(c=\"\"));a._wrapperState={initialValue:\"\"+c}}\nfunction Wf(a,b){var c=b.value;null!=c&&(c=\"\"+c,c!==a.value&&(a.value=c),null==b.defaultValue&&(a.defaultValue=c));null!=b.defaultValue&&(a.defaultValue=b.defaultValue)}function Xf(a){var b=a.textContent;b===a._wrapperState.initialValue&&(a.value=b)}var Yf={html:\"http://www.w3.org/1999/xhtml\",mathml:\"http://www.w3.org/1998/Math/MathML\",svg:\"http://www.w3.org/2000/svg\"};\nfunction Zf(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 $f(a,b){return null==a||\"http://www.w3.org/1999/xhtml\"===a?Zf(b):\"http://www.w3.org/2000/svg\"===a&&\"foreignObject\"===b?\"http://www.w3.org/1999/xhtml\":a}\nvar ag=void 0,bg=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!==Yf.svg||\"innerHTML\"in a)a.innerHTML=b;else{ag=ag||document.createElement(\"div\");ag.innerHTML=\"\\x3csvg\\x3e\"+b+\"\\x3c/svg\\x3e\";for(b=ag.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction cg(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar dg={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,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,floodOpacity:!0,\nstopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},eg=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(dg).forEach(function(a){eg.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);dg[b]=dg[a]})});\nfunction fg(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\");var e=c;var f=b[c];e=null==f||\"boolean\"===typeof f||\"\"===f?\"\":d||\"number\"!==typeof f||0===f||dg.hasOwnProperty(e)&&dg[e]?(\"\"+f).trim():f+\"px\";\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var gg=B({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 hg(a,b,c){b&&(gg[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML?E(\"137\",a,c()):void 0),null!=b.dangerouslySetInnerHTML&&(null!=b.children?E(\"60\"):void 0,\"object\"===typeof b.dangerouslySetInnerHTML&&\"__html\"in b.dangerouslySetInnerHTML?void 0:E(\"61\")),null!=b.style&&\"object\"!==typeof b.style?E(\"62\",c()):void 0)}\nfunction ig(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}}var jg=Yf.html,kg=C.thatReturns(\"\");\nfunction lg(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=Hd(a);b=Sa[b];for(var d=0;d\nd&&(e=d,d=a,a=e);e=Jd(c,a);var f=Jd(c,d);if(e&&f&&(1!==b.rangeCount||b.anchorNode!==e.node||b.anchorOffset!==e.offset||b.focusNode!==f.node||b.focusOffset!==f.offset)){var g=document.createRange();g.setStart(e.node,e.offset);b.removeAllRanges();a>d?(b.addRange(g),b.extend(f.node,f.offset)):(g.setEnd(f.node,f.offset),b.addRange(g))}}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});ia(c);for(c=0;c undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n */\nfunction isStandardBrowserEnv() {\n if (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') {\n return false;\n }\n return typeof window !== 'undefined' && typeof document !== 'undefined';\n}\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n */\nfunction forEach(obj, fn) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n // Force an array if not already something iterable\n if ((typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== 'object' && !isArray(obj)) {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (var i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n fn.call(null, obj[key], key, obj);\n }\n }\n }\n}\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n * @returns {Object} Result of all merge properties\n */\nfunction merge() /* obj1, obj2, obj3, ... */{\n var result = {};\n function assignValue(val, key) {\n if (_typeof(result[key]) === 'object' && (typeof val === 'undefined' ? 'undefined' : _typeof(val)) === 'object') {\n result[key] = merge(result[key], val);\n } else {\n result[key] = val;\n }\n }\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n * @return {Object} The resulting value of object a\n */\nfunction extend(a, b, thisArg) {\n forEach(b, function assignValue(val, key) {\n if (thisArg && typeof val === 'function') {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n });\n return a;\n}\n\nmodule.exports = {\n isArray: isArray,\n isArrayBuffer: isArrayBuffer,\n isBuffer: isBuffer,\n isFormData: isFormData,\n isArrayBufferView: isArrayBufferView,\n isString: isString,\n isNumber: isNumber,\n isObject: isObject,\n isUndefined: isUndefined,\n isDate: isDate,\n isFile: isFile,\n isBlob: isBlob,\n isFunction: isFunction,\n isStream: isStream,\n isURLSearchParams: isURLSearchParams,\n isStandardBrowserEnv: isStandardBrowserEnv,\n forEach: forEach,\n merge: merge,\n extend: extend,\n trim: trim\n};\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout() {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n})();\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e) {\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e) {\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while (len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) {\n return [];\n};\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () {\n return '/';\n};\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function () {\n return 0;\n};\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = slice;\nfunction slice(arrayLike, start) {\n start = start | 0;\n var newLen = Math.max(arrayLike.length - start, 0);\n var newArr = Array(newLen);\n for (var idx = 0; idx < newLen; idx++) {\n newArr[idx] = arrayLike[start + idx];\n }\n return newArr;\n}\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.isAsync = undefined;\n\nvar _asyncify = __webpack_require__(57);\n\nvar _asyncify2 = _interopRequireDefault(_asyncify);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\nvar supportsSymbol = typeof Symbol === 'function';\n\nfunction isAsync(fn) {\n return supportsSymbol && fn[Symbol.toStringTag] === 'AsyncFunction';\n}\n\nfunction wrapAsync(asyncFn) {\n return isAsync(asyncFn) ? (0, _asyncify2.default)(asyncFn) : asyncFn;\n}\n\nexports.default = wrapAsync;\nexports.isAsync = isAsync;\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar waterfall = __webpack_require__(18);\nvar RootEmitter = __webpack_require__(7);\nvar Event = __webpack_require__(23);\n\n/**\n An ChatEngine generic emitter that supports plugins and duplicates\n events on the root emitter.\n @class Emitter\n @extends RootEmitter\n */\n\nvar Emitter = function (_RootEmitter) {\n _inherits(Emitter, _RootEmitter);\n\n function Emitter(chatEngine) {\n _classCallCheck(this, Emitter);\n\n var _this = _possibleConstructorReturn(this, (Emitter.__proto__ || Object.getPrototypeOf(Emitter)).call(this));\n\n _this.chatEngine = chatEngine;\n\n _this.name = 'Emitter';\n\n /**\n Stores a list of plugins bound to this object\n @private\n */\n _this.plugins = [];\n\n /**\n Stores in memory keys and values\n @private\n */\n _this._dataset = {};\n\n /**\n Emit events locally.\n @private\n @param {String} event The event payload object\n */\n _this._emit = function (event) {\n var data = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\n // all events are forwarded to ChatEngine object\n // so you can globally bind to events with ChatEngine.on()\n _this.chatEngine._emit(event, data, _this);\n\n // emit the event from the object that created it\n _this.emitter.emit(event, data);\n\n return _this;\n };\n\n /**\n * Listen for a specific event and fire a callback when it's emitted. Supports wildcard matching.\n * @method\n * @param {String} event The event name\n * @param {Function} cb The function to run when the event is emitted\n * @example\n *\n * // Get notified whenever someone joins the room\n * object.on('event', (payload) => {\n * console.log('event was fired').\n * })\n *\n * // Get notified of event.a and event.b\n * object.on('event.*', (payload) => {\n * console.log('event.a or event.b was fired').;\n * })\n */\n _this.on = function (event, cb) {\n\n // keep track of all events on this emitter\n _this.events[event] = _this.events[event] || new Event(_this.chatEngine, _this, event);\n\n // call the private _on property\n _this._on(event, cb);\n\n return _this;\n };\n\n return _this;\n }\n\n // add an object as a subobject under a namespoace\n\n\n _createClass(Emitter, [{\n key: 'addChild',\n value: function addChild(childName, childOb) {\n // assign the new child object as a property of parent under the\n // given namespace\n this[childName] = childOb;\n\n // assign a data set for the namespace if it doesn't exist\n if (!this._dataset[childName]) {\n this._dataset[childName] = {};\n }\n\n // the new object can use ```this.parent``` to access\n // the root class\n childOb.parent = this;\n\n // bind get() and set() to the data set\n childOb.get = this.get.bind(this._dataset[childName]);\n childOb.set = this.set.bind(this._dataset[childName]);\n }\n }, {\n key: 'get',\n value: function get(key) {\n return this[key];\n }\n }, {\n key: 'set',\n value: function set(key, value) {\n if (this[key] && !value) {\n delete this[key];\n } else {\n this[key] = value;\n }\n }\n\n /**\n Binds a plugin to this object\n @param {Object} module The plugin module\n @tutorial using\n */\n\n }, {\n key: 'plugin',\n value: function plugin(module) {\n\n // add this plugin to a list of plugins for this object\n this.plugins.push(module);\n\n // see if there are plugins to attach to this class\n if (module.extends && module.extends[this.name]) {\n // attach the plugins to this class\n // under their namespace\n this.addChild(module.namespace, new module.extends[this.name]());\n\n this[module.namespace].ChatEngine = this.chatEngine;\n\n // if the plugin has a special construct function\n // run it\n if (this[module.namespace].construct) {\n this[module.namespace].construct();\n }\n }\n\n return this;\n }\n }, {\n key: 'bindProtoPlugins',\n value: function bindProtoPlugins() {\n var _this2 = this;\n\n if (this.chatEngine.protoPlugins[this.name]) {\n\n this.chatEngine.protoPlugins[this.name].forEach(function (module) {\n _this2.plugin(module);\n });\n }\n }\n\n /**\n Broadcasts an event locally to all listeners.\n @private\n @param {String} event The event name\n @param {Object} payload The event payload object\n */\n\n }, {\n key: 'trigger',\n value: function trigger(event) {\n var _this3 = this;\n\n var payload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var done = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};\n\n\n var complete = function complete() {\n\n // let plugins modify the event\n _this3.runPluginQueue('on', event, function (next) {\n next(null, payload);\n }, function (reject, pluginResponse) {\n\n if (reject) {\n done(reject);\n } else {\n // emit this event to any listener\n _this3._emit(event, pluginResponse);\n done(null, event, pluginResponse);\n }\n });\n };\n\n // this can be made into plugin\n if ((typeof payload === 'undefined' ? 'undefined' : _typeof(payload)) === 'object') {\n\n // restore chat in payload\n if (!payload.chat) {\n payload.chat = this;\n }\n\n // if we should try to restore the sender property\n if (payload.sender && typeof payload.sender === 'string') {\n\n // the user doesn't exist, create it\n payload.sender = new this.chatEngine.User(payload.sender);\n\n payload.sender._getState(function () {\n complete();\n });\n } else {\n // there's no \"sender\" in this object, move on\n complete();\n }\n } else {\n // payload is not an object, we want nothing to do with it.\n complete();\n }\n }\n\n /**\n Load plugins and attach a queue of functions to execute before and\n after events are trigger or received.\n @private\n @param {String} location Where in the middleeware the event should run (emit, trigger)\n @param {String} event The event name\n @param {String} first The first function to run before the plugins have run\n @param {String} last The last function to run after the plugins have run\n */\n\n }, {\n key: 'runPluginQueue',\n value: function runPluginQueue(location, event, first, last) {\n\n // this assembles a queue of functions to run as middleware\n // event is a triggered event key\n var pluginQueue = [];\n\n // the first function is always required\n pluginQueue.push(first);\n\n // look through the configured plugins\n this.plugins.forEach(function (pluginItem) {\n\n // if they have defined a function to run specifically\n // for this event\n if (pluginItem.middleware && pluginItem.middleware[location]) {\n\n if (pluginItem.middleware[location][event]) {\n // add the function to the queue\n pluginQueue.push(pluginItem.middleware[location][event]);\n }\n\n if (pluginItem.middleware[location]['*']) {\n // add the function to the queue\n pluginQueue.push(pluginItem.middleware[location]['*']);\n }\n }\n });\n\n // waterfall runs the functions in assigned order\n // waiting for one to complete before moving to the next\n // when it's done, the ```last``` parameter is called\n waterfall(pluginQueue, last);\n }\n }, {\n key: 'onConstructed',\n value: function onConstructed() {\n\n this.bindProtoPlugins();\n this.trigger(['$', 'created', this.name.toLowerCase()].join('.'));\n }\n }]);\n\n return Emitter;\n}(RootEmitter);\n\nmodule.exports = Emitter;\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {\n\nvar utils = __webpack_require__(0);\nvar normalizeHeaderName = __webpack_require__(38);\n\nvar DEFAULT_CONTENT_TYPE = {\n 'Content-Type': 'application/x-www-form-urlencoded'\n};\n\nfunction setContentTypeIfUnset(headers, value) {\n if (!utils.isUndefined(headers) && utils.isUndefined(headers['Content-Type'])) {\n headers['Content-Type'] = value;\n }\n}\n\nfunction getDefaultAdapter() {\n var adapter;\n if (typeof XMLHttpRequest !== 'undefined') {\n // For browsers use XHR adapter\n adapter = __webpack_require__(14);\n } else if (typeof process !== 'undefined') {\n // For node use HTTP adapter\n adapter = __webpack_require__(14);\n }\n return adapter;\n}\n\nvar defaults = {\n adapter: getDefaultAdapter(),\n\n transformRequest: [function transformRequest(data, headers) {\n normalizeHeaderName(headers, 'Content-Type');\n if (utils.isFormData(data) || utils.isArrayBuffer(data) || utils.isBuffer(data) || utils.isStream(data) || utils.isFile(data) || utils.isBlob(data)) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');\n return data.toString();\n }\n if (utils.isObject(data)) {\n setContentTypeIfUnset(headers, 'application/json;charset=utf-8');\n return JSON.stringify(data);\n }\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n /*eslint no-param-reassign:0*/\n if (typeof data === 'string') {\n try {\n data = JSON.parse(data);\n } catch (e) {/* Ignore */}\n }\n return data;\n }],\n\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n }\n};\n\ndefaults.headers = {\n common: {\n 'Accept': 'application/json, text/plain, */*'\n }\n};\n\nutils.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {\n defaults.headers[method] = {};\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n defaults.headers[method] = utils.merge(DEFAULT_CONTENT_TYPE);\n});\n\nmodule.exports = defaults;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function (module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function () {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function get() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function get() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n// Allows us to create and bind to events. Everything in ChatEngine is an event\n// emitter\nvar EventEmitter2 = __webpack_require__(55).EventEmitter2;\n\n/**\n* The {@link ChatEngine} object is a RootEmitter. Configures an event emitter that other ChatEngine objects inherit. Adds shortcut methods for\n* ```this.on()```, ```this.emit()```, etc.\n* @class RootEmitter\n*/\n\nvar RootEmitter = function RootEmitter() {\n var _this = this;\n\n _classCallCheck(this, RootEmitter);\n\n /**\n * @private\n */\n this.events = {};\n\n this.name = 'RootEmitter';\n\n /**\n Create a new EventEmitter2 object for this class.\n @private\n */\n this.emitter = new EventEmitter2({\n wildcard: true,\n newListener: true,\n maxListeners: 50,\n verboseMemoryLeak: true\n });\n\n // we bind to make sure wildcards work\n // https://github.com/asyncly/EventEmitter2/issues/186\n\n /**\n Private emit method that broadcasts the event to listeners on this page.\n @private\n @param {String} event The event name\n @param {Object} the event payload\n */\n this._emit = this.emitter.emit.bind(this.emitter);\n\n /**\n Listen for a specific event and fire a callback when it's emitted. This is reserved in case ```this.on``` is overwritten.\n @private\n @param {String} event The event name\n @param {Function} callback The function to run when the event is emitted\n */\n\n this._on = this.emitter.on.bind(this.emitter);\n\n /**\n * Listen for a specific event and fire a callback when it's emitted. Supports wildcard matching.\n * @method\n * @param {String} event The event name\n * @param {Function} cb The function to run when the event is emitted\n * @example\n *\n * // Get notified whenever someone joins the room\n * object.on('event', (payload) => {\n * console.log('event was fired').\n * })\n *\n * // Get notified of event.a and event.b\n * object.on('event.*', (payload) => {\n * console.log('event.a or event.b was fired').;\n * })\n */\n this.on = function (event, callback) {\n\n // emit the event from the object that created it\n _this.emitter.on(event, callback);\n\n return _this;\n };\n\n /**\n * Stop a callback from listening to an event.\n * @method\n * @param {String} event The event name\n * @example\n * let callback = function(payload;) {\n * console.log('something happend!');\n * };\n * object.on('event', callback);\n * // ...\n * object.off('event', callback);\n */\n this.off = function (event, callback) {\n\n // emit the event from the object that created it\n _this.emitter.off(event, callback);\n\n return _this;\n };\n\n /**\n * Listen for any event on this object and fire a callback when it's emitted\n * @method\n * @param {Function} callback The function to run when any event is emitted. First parameter is the event name and second is the payload.\n * @example\n * object.onAny((event, payload) => {\n * console.log('All events trigger this.');\n * });\n */\n this.onAny = function (event, callback) {\n\n // emit the event from the object that created it\n _this.emitter.onAny(event, callback);\n\n return _this;\n };\n\n /**\n * Listen for an event and only fire the callback a single time\n * @method\n * @param {String} event The event name\n * @param {Function} callback The function to run once\n * @example\n * object.once('message', => (event, payload) {\n * console.log('This is only fired once!');\n * });\n */\n this.once = function (event, callback) {\n\n // emit the event from the object that created it\n _this.emitter.once(event, callback);\n\n return _this;\n };\n};\n\nmodule.exports = RootEmitter;\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar g;\n\n// This works in non-strict mode\ng = function () {\n\treturn this;\n}();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || Function(\"return this\")() || (1, eval)(\"this\");\n} catch (e) {\n\t// This works if the window reference is available\n\tif ((typeof window === \"undefined\" ? \"undefined\" : _typeof(window)) === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar isFunction = __webpack_require__(66),\n isLength = __webpack_require__(28);\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _Symbol = __webpack_require__(25),\n getRawTag = __webpack_require__(67),\n objectToString = __webpack_require__(68);\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = _Symbol ? _Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) == 'object';\n}\n\nmodule.exports = isObjectLike;\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function bind(fn, thisArg) {\n return function wrap() {\n var args = new Array(arguments.length);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i];\n }\n return fn.apply(thisArg, args);\n };\n};\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(process) {\n\nvar utils = __webpack_require__(0);\nvar settle = __webpack_require__(39);\nvar buildURL = __webpack_require__(41);\nvar parseHeaders = __webpack_require__(42);\nvar isURLSameOrigin = __webpack_require__(43);\nvar createError = __webpack_require__(15);\nvar btoa = typeof window !== 'undefined' && window.btoa && window.btoa.bind(window) || __webpack_require__(44);\n\nmodule.exports = function xhrAdapter(config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n var requestData = config.data;\n var requestHeaders = config.headers;\n\n if (utils.isFormData(requestData)) {\n delete requestHeaders['Content-Type']; // Let the browser set it\n }\n\n var request = new XMLHttpRequest();\n var loadEvent = 'onreadystatechange';\n var xDomain = false;\n\n // For IE 8/9 CORS support\n // Only supports POST and GET calls and doesn't returns the response headers.\n // DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.\n if (process.env.NODE_ENV !== 'test' && typeof window !== 'undefined' && window.XDomainRequest && !('withCredentials' in request) && !isURLSameOrigin(config.url)) {\n request = new window.XDomainRequest();\n loadEvent = 'onload';\n xDomain = true;\n request.onprogress = function handleProgress() {};\n request.ontimeout = function handleTimeout() {};\n }\n\n // HTTP basic authentication\n if (config.auth) {\n var username = config.auth.username || '';\n var password = config.auth.password || '';\n requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);\n }\n\n request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);\n\n // Set the request timeout in MS\n request.timeout = config.timeout;\n\n // Listen for ready state\n request[loadEvent] = function handleLoad() {\n if (!request || request.readyState !== 4 && !xDomain) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n\n // Prepare the response\n var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;\n var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;\n var response = {\n data: responseData,\n // IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201)\n status: request.status === 1223 ? 204 : request.status,\n statusText: request.status === 1223 ? 'No Content' : request.statusText,\n headers: responseHeaders,\n config: config,\n request: request\n };\n\n settle(resolve, reject, response);\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(createError('Network Error', config, null, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED', request));\n\n // Clean up request\n request = null;\n };\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n if (utils.isStandardBrowserEnv()) {\n var cookies = __webpack_require__(45);\n\n // Add xsrf header\n var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ? cookies.read(config.xsrfCookieName) : undefined;\n\n if (xsrfValue) {\n requestHeaders[config.xsrfHeaderName] = xsrfValue;\n }\n }\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders, function setRequestHeader(val, key) {\n if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {\n // Remove Content-Type if data is undefined\n delete requestHeaders[key];\n } else {\n // Otherwise add header to the request\n request.setRequestHeader(key, val);\n }\n });\n }\n\n // Add withCredentials to request if needed\n if (config.withCredentials) {\n request.withCredentials = true;\n }\n\n // Add responseType to request if needed\n if (config.responseType) {\n try {\n request.responseType = config.responseType;\n } catch (e) {\n // Expected DOMException thrown by browsers not compatible XMLHttpRequest Level 2.\n // But, this can be suppressed for 'json' type as it can be parsed by default 'transformResponse' function.\n if (config.responseType !== 'json') {\n throw e;\n }\n }\n }\n\n // Handle progress if needed\n if (typeof config.onDownloadProgress === 'function') {\n request.addEventListener('progress', config.onDownloadProgress);\n }\n\n // Not all browsers support upload events\n if (typeof config.onUploadProgress === 'function' && request.upload) {\n request.upload.addEventListener('progress', config.onUploadProgress);\n }\n\n if (config.cancelToken) {\n // Handle cancellation\n config.cancelToken.promise.then(function onCanceled(cancel) {\n if (!request) {\n return;\n }\n\n request.abort();\n reject(cancel);\n // Clean up request\n request = null;\n });\n }\n\n if (requestData === undefined) {\n requestData = null;\n }\n\n // Send the request\n request.send(requestData);\n });\n};\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(1)))\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar enhanceError = __webpack_require__(40);\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The created error.\n */\nmodule.exports = function createError(message, config, code, request, response) {\n var error = new Error(message);\n return enhanceError(error, config, code, request, response);\n};\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = function isCancel(value) {\n return !!(value && value.__CANCEL__);\n};\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * A `Cancel` is an object that is thrown when an operation is canceled.\n *\n * @class\n * @param {string=} message The message.\n */\n\nfunction Cancel(message) {\n this.message = message;\n}\n\nCancel.prototype.toString = function toString() {\n return 'Cancel' + (this.message ? ': ' + this.message : '');\n};\n\nCancel.prototype.__CANCEL__ = true;\n\nmodule.exports = Cancel;\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function (tasks, callback) {\n callback = (0, _once2.default)(callback || _noop2.default);\n if (!(0, _isArray2.default)(tasks)) return callback(new Error('First argument to waterfall must be an array of functions'));\n if (!tasks.length) return callback();\n var taskIndex = 0;\n\n function nextTask(args) {\n var task = (0, _wrapAsync2.default)(tasks[taskIndex++]);\n args.push((0, _onlyOnce2.default)(next));\n task.apply(null, args);\n }\n\n function next(err /*, ...args*/) {\n if (err || taskIndex === tasks.length) {\n return callback.apply(null, arguments);\n }\n nextTask((0, _slice2.default)(arguments, 1));\n }\n\n nextTask([]);\n};\n\nvar _isArray = __webpack_require__(19);\n\nvar _isArray2 = _interopRequireDefault(_isArray);\n\nvar _noop = __webpack_require__(8);\n\nvar _noop2 = _interopRequireDefault(_noop);\n\nvar _once = __webpack_require__(20);\n\nvar _once2 = _interopRequireDefault(_once);\n\nvar _slice = __webpack_require__(2);\n\nvar _slice2 = _interopRequireDefault(_slice);\n\nvar _onlyOnce = __webpack_require__(21);\n\nvar _onlyOnce2 = _interopRequireDefault(_onlyOnce);\n\nvar _wrapAsync = __webpack_require__(3);\n\nvar _wrapAsync2 = _interopRequireDefault(_wrapAsync);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\nmodule.exports = exports['default'];\n\n/**\n * Runs the `tasks` array of functions in series, each passing their results to\n * the next in the array. However, if any of the `tasks` pass an error to their\n * own callback, the next function is not executed, and the main `callback` is\n * immediately called with the error.\n *\n * @name waterfall\n * @static\n * @memberOf module:ControlFlow\n * @method\n * @category Control Flow\n * @param {Array} tasks - An array of [async functions]{@link AsyncFunction}\n * to run.\n * Each function should complete with any number of `result` values.\n * The `result` values will be passed as arguments, in order, to the next task.\n * @param {Function} [callback] - An optional callback to run once all the\n * functions have completed. This will be passed the results of the last task's\n * callback. Invoked with (err, [results]).\n * @returns undefined\n * @example\n *\n * async.waterfall([\n * function(callback) {\n * callback(null, 'one', 'two');\n * },\n * function(arg1, arg2, callback) {\n * // arg1 now equals 'one' and arg2 now equals 'two'\n * callback(null, 'three');\n * },\n * function(arg1, callback) {\n * // arg1 now equals 'three'\n * callback(null, 'done');\n * }\n * ], function (err, result) {\n * // result now equals 'done'\n * });\n *\n * // Or, with named functions:\n * async.waterfall([\n * myFirstFunction,\n * mySecondFunction,\n * myLastFunction,\n * ], function (err, result) {\n * // result now equals 'done'\n * });\n * function myFirstFunction(callback) {\n * callback(null, 'one', 'two');\n * }\n * function mySecondFunction(arg1, arg2, callback) {\n * // arg1 now equals 'one' and arg2 now equals 'two'\n * callback(null, 'three');\n * }\n * function myLastFunction(arg1, callback) {\n * // arg1 now equals 'three'\n * callback(null, 'done');\n * }\n */\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = once;\nfunction once(fn) {\n return function () {\n if (fn === null) return;\n var callFn = fn;\n fn = null;\n callFn.apply(this, arguments);\n };\n}\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = onlyOnce;\nfunction onlyOnce(fn) {\n return function () {\n if (fn === null) throw new Error(\"Callback was already called.\");\n var callFn = fn;\n fn = null;\n callFn.apply(this, arguments);\n };\n}\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value === 'undefined' ? 'undefined' : _typeof(value);\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Emitter = __webpack_require__(7);\n\n/**\n * @class Event\n * Represents an {@link Chat} event.\n * @fires $\".\"emitted\n * @extends Emitter\n * @extends RootEmitter\n */\n\nvar Event = function (_Emitter) {\n _inherits(Event, _Emitter);\n\n function Event(chatEngine, chat, event) {\n var _ret;\n\n _classCallCheck(this, Event);\n\n /**\n * @private\n */\n var _this = _possibleConstructorReturn(this, (Event.__proto__ || Object.getPrototypeOf(Event)).call(this));\n\n _this.chatEngine = chatEngine;\n\n /**\n * The {@link Chat#channel} that this event is registered to.\n * @type String\n * @see [PubNub Channels](https://support.pubnub.com/support/solutions/articles/14000045182-what-is-a-channel-)\n * @readonly\n */\n _this.channel = chat.channel;\n\n /**\n * Events are always a property of a {@link Chat}. Responsible for\n * listening to specific events and firing events when they occur.\n * @readonly\n * @type {Chat}\n */\n _this.chat = chat;\n\n /**\n * The string representation of the event. This is supplied as the first parameter to {@link Chat#on}\n * @type {String}\n */\n _this.event = event;\n\n /**\n * A name that identifies this class\n * @type {String}\n */\n _this.name = 'Event';\n\n return _ret = _this, _possibleConstructorReturn(_this, _ret);\n }\n\n /**\n Publishes the event over the PubNub network to the {@link Event} channel\n @private\n @param {Object} data The event payload object\n */\n\n\n _createClass(Event, [{\n key: 'publish',\n value: function publish(m) {\n var _this2 = this;\n\n m.event = this.event;\n\n this.chatEngine.pubnub.publish({\n message: m,\n channel: this.channel\n }, function (status, response) {\n\n if (status.statusCode === 200) {\n\n if (response) {\n m.timetoken = response.timetoken;\n }\n\n /**\n * Message successfully published\n * @event Event#$\".\"emitted\"\n * @param {Object} data The message payload\n */\n _this2._emit('$.emitted', m);\n } else {\n\n /**\n * There was a problem publishing over the PubNub network.\n * @event Chat#$\".\"error\".\"publish\n */\n _this2.chatEngine.throwError(_this2, '_emit', 'emitter', new Error('There was a problem publishing over the PubNub network.'), status);\n }\n });\n }\n }]);\n\n return Event;\n}(Emitter);\n\nmodule.exports = Event;\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = _eachOfLimit;\n\nvar _noop = __webpack_require__(8);\n\nvar _noop2 = _interopRequireDefault(_noop);\n\nvar _once = __webpack_require__(20);\n\nvar _once2 = _interopRequireDefault(_once);\n\nvar _iterator = __webpack_require__(65);\n\nvar _iterator2 = _interopRequireDefault(_iterator);\n\nvar _onlyOnce = __webpack_require__(21);\n\nvar _onlyOnce2 = _interopRequireDefault(_onlyOnce);\n\nvar _breakLoop = __webpack_require__(86);\n\nvar _breakLoop2 = _interopRequireDefault(_breakLoop);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\nfunction _eachOfLimit(limit) {\n return function (obj, iteratee, callback) {\n callback = (0, _once2.default)(callback || _noop2.default);\n if (limit <= 0 || !obj) {\n return callback(null);\n }\n var nextElem = (0, _iterator2.default)(obj);\n var done = false;\n var running = 0;\n\n function iterateeCallback(err, value) {\n running -= 1;\n if (err) {\n done = true;\n callback(err);\n } else if (value === _breakLoop2.default || done && running <= 0) {\n done = true;\n return callback(null);\n } else {\n replenish();\n }\n }\n\n function replenish() {\n while (running < limit && !done) {\n var elem = nextElem();\n if (elem === null) {\n done = true;\n if (running <= 0) {\n callback(null);\n }\n return;\n }\n running += 1;\n iteratee(elem.value, elem.key, (0, _onlyOnce2.default)(iterateeCallback));\n }\n }\n\n replenish();\n };\n}\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar root = __webpack_require__(26);\n\n/** Built-in value references. */\nvar _Symbol = root.Symbol;\n\nmodule.exports = _Symbol;\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar freeGlobal = __webpack_require__(27);\n\n/** Detect free variable `self`. */\nvar freeSelf = (typeof self === 'undefined' ? 'undefined' : _typeof(self)) == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = (typeof global === 'undefined' ? 'undefined' : _typeof(global)) == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9)))\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = doLimit;\nfunction doLimit(fn, limit) {\n return function (iterable, iteratee, callback) {\n return fn(iterable, limit, iteratee, callback);\n };\n}\nmodule.exports = exports[\"default\"];\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar Emitter = __webpack_require__(4);\n\n/**\nThis is our User class which represents a connected client. User's are automatically created and managed by {@link Chat}s, but you can also instantiate them yourself.\nIf a User has been created but has never been authenticated, you will recieve 403s when connecting to their feed or direct Chats.\n@class User\n@extends Emitter\n@extends RootEmitter\n@param {User#uuid} uuid A unique identifier for this user.\n@param {User#state} state The {@link User}'s state object synchronized between all clients of the chat.\n */\n\nvar User = function (_Emitter) {\n _inherits(User, _Emitter);\n\n function User(chatEngine, uuid) {\n var _ret;\n\n var state = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n _classCallCheck(this, User);\n\n var _this = _possibleConstructorReturn(this, (User.__proto__ || Object.getPrototypeOf(User)).call(this));\n\n _this.chatEngine = chatEngine;\n\n _this.name = 'User';\n\n /**\n The User's unique identifier, usually a device uuid. This helps ChatEngine identify the user between events. This is public id exposed to the network.\n Check out [the wikipedia page on UUIDs](https://en.wikipedia.org/wiki/Universally_unique_identifier).\n @readonly\n @type String\n */\n\n if (typeof uuid !== 'string') {\n _this.chatEngine.throwError(_this, 'trigger', 'construct', new Error('UUID must be of type string'));\n }\n\n _this.uuid = uuid;\n\n /**\n * Gets the user state. See {@link Me#update} for how to assign state values.\n * @return {Object} Returns a generic JSON object containing state information.\n * @example\n *\n * // State\n * let state = user.state;\n */\n _this.state = {};\n\n _this._stateFetched = false;\n\n _this._stateInProgress = false;\n\n /**\n * Feed is a Chat that only streams things a User does, like\n * 'startTyping' or 'idle' events for example. Anybody can subscribe\n * to a User's feed, but only the User can publish to it. Users will\n * not be able to converse in this channel.\n *\n * @type Chat\n * @example\n * // me\n * me.feed.emit('update', 'I may be away from my computer right now');\n *\n * // another instance\n * them.feed.connect();\n * them.feed.on('update', (payload) => {})\n */\n\n // grants for these chats are done on auth. Even though they're marked private, they are locked down via the server\n _this.feed = new _this.chatEngine.Chat([chatEngine.global.channel, 'user', uuid, 'read.', 'feed'].join('#'), false, _this.constructor.name === 'Me', {}, 'system');\n\n /**\n * Direct is a private channel that anybody can publish to but only\n * the user can subscribe to. Great for pushing notifications or\n * inviting to other chats. Users will not be able to communicate\n * with one another inside of this chat. Check out the\n * {@link Chat#invite} method for private chats utilizing\n * {@link User#direct}.\n *\n * @type Chat\n * @example\n * // me\n * me.direct.on('private-message', (payload) -> {\n * console.log(payload.sender.uuid, 'sent your a direct message');\n * });\n *\n * // another instance\n * them.direct.connect();\n * them.direct.emit('private-message', {secret: 42});\n */\n _this.direct = new _this.chatEngine.Chat([chatEngine.global.channel, 'user', uuid, 'write.', 'direct'].join('#'), false, _this.constructor.name === 'Me', {}, 'system');\n\n // if the user does not exist at all and we get enough\n // information to build the user\n if (!chatEngine.users[uuid]) {\n chatEngine.users[uuid] = _this;\n }\n\n // update this user's state in it's created context\n _this.assign(state);\n\n return _ret = _this, _possibleConstructorReturn(_this, _ret);\n }\n\n /**\n * @private\n * @param {Object} state The new state for the user\n * @param {Chat} chat Chatroom to retrieve state from\n */\n\n\n _createClass(User, [{\n key: 'update',\n value: function update(state) {\n var oldState = this.state || {};\n this.state = Object.assign(oldState, state);\n }\n\n /**\n this is only called from network updates\n @private\n */\n\n }, {\n key: 'assign',\n value: function assign(state) {\n this.update(state);\n }\n\n /**\n Get stored user state from remote server.\n @private\n */\n\n }, {\n key: '_getState',\n value: function _getState(callback) {\n var _this2 = this;\n\n if (!this._stateFetched && !this._stateInProgress) {\n\n this._stateInProgress = true;\n\n this.chatEngine.pubnub.getState({\n uuid: this.uuid,\n channels: [this.chatEngine.global.channel]\n }, function (status, response) {\n\n if (status.statusCode === 200) {\n\n var pnState = response.channels[_this2.chatEngine.global.channel];\n if (Object.keys(pnState).length) {\n\n _this2.assign(response.data);\n _this2._stateFetched = true;\n callback(_this2.state);\n } else {\n\n _this2.chatEngine.request('get', 'user_state', {\n user: _this2.uuid\n }).then(function (res) {\n\n _this2.assign(res.data);\n _this2._stateFetched = true;\n callback(_this2.state);\n }).catch(function (err) {\n _this2.chatEngine.throwError(_this2, 'trigger', 'getState', err);\n });\n }\n } else {\n _this2.chatEngine.throwError(_this2, 'trigger', 'getState', new Error('There was a problem getting user state from the PubNub network.'));\n }\n });\n } else {\n callback(this.state);\n }\n }\n }]);\n\n return User;\n}(Emitter);\n\nmodule.exports = User;\n\n/***/ }),\n/* 31 */\n/***/ (function(module, exports, __webpack_require__) {\n\nmodule.exports = __webpack_require__(32);\n\n\n/***/ }),\n/* 32 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar init = __webpack_require__(33);\n\n/**\nGlobal object used to create an instance of {@link ChatEngine}.\n\n@alias ChatEngineCore\n@param pnConfig {Object} ChatEngine is based off PubNub. Supply your PubNub configuration parameters here. See the getting started tutorial and [the PubNub docs](https://www.pubnub.com/docs/java-se-java/api-reference-configuration).\n@param ceConfig {Object} A list of ChatEngine specific configuration options.\n@param [ceConfig.globalChannel=chat-engine] {String} The root channel. See {@link ChatEngine.global}\n@param [ceConfig.enableSync] {Boolean} Synchronizes chats between instances with the same {@link Me#uuid}. See {@link Me#sync}.\n@param [ceConfig.throwErrors=true] {Boolean} Throws errors in JS console.\n@param [ceConfig.endpoint='https://pubsub.pubnub.com/v1/blocks/sub-key/YOUR_SUB_KEY/chat-engine-server'] {String} The root URL of the server used to manage permissions for private channels. Set by default to match the PubNub functions deployed to your account. See {@tutorial privacy} for more.\n@param [ceConfig.debug] {Boolean} Logs all ChatEngine events to the console This should not be enabled in production.\n@param [ceConfig.profile] {Boolean} Sums event counts and outputs a table to the console every few seconds.\n@return {ChatEngine} Returns an instance of {@link ChatEngine}\n@example\nChatEngine = ChatEngineCore.create({\n publishKey: 'YOUR_PUB_KEY',\n subscribeKey: 'YOUR_SUB_KEY'\n});\n*/\n\nvar create = function create(pnConfig) {\n var ceConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\n if (ceConfig.globalChannel) {\n ceConfig.globalChannel = ceConfig.globalChannel.toString();\n } else {\n ceConfig.globalChannel = 'chat-engine';\n }\n\n if (typeof ceConfig.throwErrors === 'undefined') {\n ceConfig.throwErrors = true;\n }\n\n if (typeof ceConfig.enableSync === 'undefined') {\n ceConfig.enableSync = false;\n }\n\n ceConfig.endpoint = ceConfig.endpoint || 'https://pubsub.pubnub.com/v1/blocks/sub-key/' + pnConfig.subscribeKey + '/chat-engine-server';\n\n pnConfig.heartbeatInterval = pnConfig.heartbeatInterval || 30;\n pnConfig.presenceTimeout = pnConfig.presenceTimeout || 60;\n\n // return an instance of ChatEngine\n return init(ceConfig, pnConfig);\n};\n\n// export the ChatEngine api\nvar ChatEngineCore = {\n plugin: {},\n create: create\n};\n\nmodule.exports = ChatEngineCore;\n\nmodule.exports.ChatEngineCore = ChatEngineCore;\n\n/***/ }),\n/* 33 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar axios = __webpack_require__(34);\nvar PubNub = __webpack_require__(53);\nvar pack = __webpack_require__(54);\n\nvar RootEmitter = __webpack_require__(7);\nvar Chat = __webpack_require__(56);\nvar Me = __webpack_require__(88);\nvar User = __webpack_require__(30);\nvar series = __webpack_require__(90);\n\n/**\n@class ChatEngine\n@extends RootEmitter\n@return {ChatEngine} Returns an instance of {@link ChatEngine}\n*/\nmodule.exports = function () {\n var ceConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var pnConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n\n // Create the root ChatEngine object\n var ChatEngine = new RootEmitter();\n\n ChatEngine.ceConfig = ceConfig;\n ChatEngine.pnConfig = pnConfig;\n\n /**\n * A map of all known {@link User}s in this instance of ChatEngine.\n * @type {Object}\n * @memberof ChatEngine\n */\n ChatEngine.users = {};\n\n /**\n * A map of all known {@link Chat}s in this instance of ChatEngine.\n * @memberof ChatEngine\n * @type {Object}\n */\n ChatEngine.chats = {};\n\n /**\n * A global {@link Chat} that all {@link User}s join when they connect to ChatEngine. Useful for announcements, alerts, and global events.\n * @member {Chat} global\n * @memberof ChatEngine\n */\n ChatEngine.global = false;\n\n /**\n * This instance of ChatEngine represented as a special {@link User} know as {@link Me}.\n * @member {Me} me\n * @memberof ChatEngine\n */\n ChatEngine.me = false;\n\n /**\n * An instance of PubNub, the networking infrastructure that powers the realtime communication between {@link User}s in {@link Chats}.\n * @member {Object} pubnub\n * @memberof ChatEngine\n */\n ChatEngine.pubnub = false;\n\n /**\n * Indicates if ChatEngine has fired the {@link ChatEngine#$\".\"ready} event.\n * @member {Object} ready\n * @memberof ChatEngine\n */\n ChatEngine.ready = false;\n\n /**\n * The package.json for ChatEngine. Used mainly for detecting package version.\n * @type {Object}\n */\n ChatEngine.package = pack;\n\n ChatEngine.throwError = function (self, cb, key, ceError) {\n var payload = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n\n\n if (ceConfig.throwErrors) {\n // throw ceError;\n console.error(payload);\n throw ceError;\n }\n\n payload.ceError = ceError.toString();\n\n self[cb](['$', 'error', key].join('.'), payload);\n };\n\n if (ceConfig.debug) {\n\n ChatEngine.onAny(function (event, payload) {\n console.info('debug:', event, payload);\n });\n }\n\n if (ceConfig.profile) {\n\n var countObject = {};\n\n ChatEngine.onAny(function (event, payload) {\n countObject['event: ' + event] = countObject[event] || 0;\n countObject['event: ' + event] += 1;\n });\n\n setInterval(function () {\n\n countObject.chats = Object.keys(ChatEngine.chats).length;\n countObject.users = Object.keys(ChatEngine.users).length;\n\n console.table(countObject);\n }, 3000);\n }\n\n ChatEngine.protoPlugins = {};\n\n /**\n * Bind a plugin to all future instances of a Class.\n * @method ChatEngine#proto\n * @param {String} className The string representation of a class to bind to\n * @param {Class} plugin The plugin function.\n */\n ChatEngine.proto = function (className, plugin) {\n ChatEngine.protoPlugins[className] = ChatEngine.protoPlugins[className] || [];\n ChatEngine.protoPlugins[className].push(plugin);\n };\n\n /**\n * @private\n */\n ChatEngine.request = function (method, route) {\n var inputBody = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n var inputParams = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n\n var body = {\n uuid: ChatEngine.pnConfig.uuid,\n global: ceConfig.globalChannel,\n authKey: ChatEngine.pnConfig.authKey\n };\n\n var params = {\n route: route\n };\n\n body = Object.assign(body, inputBody);\n params = Object.assign(params, inputParams);\n\n if (method === 'get' || method === 'delete') {\n params = Object.assign(params, body);\n return axios[method](ceConfig.endpoint, { params: params });\n } else {\n return axios[method](ceConfig.endpoint, body, { params: params });\n }\n };\n\n /**\n * Parse a channel name into chat object parts\n * @private\n */\n ChatEngine.parseChannel = function (channel) {\n\n var info = channel.split('#');\n\n return {\n global: info[0],\n type: info[1],\n private: info[2] === 'private.'\n };\n };\n\n /**\n * Get the internal channel name of supplied string\n * @private\n */\n ChatEngine.augmentChannel = function () {\n var original = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date().getTime();\n var isPrivate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n\n var channel = original.toString();\n\n // public.* has PubNub permissions for everyone to read and write\n // private.* is totally locked down and users must be granted access one by one\n var chanPrivString = 'public.';\n\n if (isPrivate) {\n chanPrivString = 'private.';\n }\n\n if (channel.indexOf(ChatEngine.ceConfig.globalChannel) === -1) {\n channel = [ChatEngine.ceConfig.globalChannel, 'chat', chanPrivString, channel].join('#');\n }\n\n return channel;\n };\n\n /**\n * Initial communication with the server. Server grants permissions to\n * talk in chats, etc.\n * @private\n */\n ChatEngine.handshake = function (complete) {\n\n series([function (next) {\n ChatEngine.request('post', 'bootstrap').then(function () {\n next(null);\n }).catch(next);\n }, function (next) {\n ChatEngine.request('post', 'user_read').then(function () {\n next(null);\n }).catch(next);\n }, function (next) {\n ChatEngine.request('post', 'user_write').then(function () {\n next(null);\n }).catch(next);\n }, function (next) {\n ChatEngine.request('post', 'group').then(complete).catch(next);\n }], function (error) {\n if (error) {\n ChatEngine.throwError(ChatEngine, '_emit', 'auth', new Error('There was a problem logging into the auth server (' + ceConfig.endpoint + ').' + error && error.response && error.response.data), { error: error });\n }\n });\n };\n\n /**\n * Listen to PubNub events and forward them into ChatEngine system.\n * @private\n */\n ChatEngine.listenToPubNub = function () {\n\n ChatEngine.pubnub.addListener({\n message: function message(m) {\n\n // assign the message timetoken as a property of the payload\n m.message.timetoken = m.timetoken;\n\n if (ChatEngine.chats[m.channel]) {\n ChatEngine.chats[m.channel].trigger(m.message.event, m.message);\n }\n },\n presence: function presence(payload) {\n\n if (ChatEngine.chats[payload.channel]) {\n ChatEngine.chats[payload.channel].onPresence(payload);\n }\n },\n status: function status(statusEvent) {\n\n /**\n * SDK detected that network is online.\n * @event ChatEngine#$\".\"network\".\"up\".\"online\n */\n\n /**\n * SDK detected that network is down.\n * @event ChatEngine#$\".\"network\".\"down\".\"offline\n */\n\n /**\n * A subscribe event experienced an exception when running.\n * @event ChatEngine#$\".\"network\".\"down\".\"issue\n */\n\n /**\n * SDK was able to reconnect to pubnub.\n * @event ChatEngine#$\".\"network\".\"up\".\"reconnected\n */\n\n /**\n * SDK subscribed with a new mix of channels.\n * @event ChatEngine#$\".\"network\".\"up\".\"connected\n */\n\n /**\n * JSON parsing crashed.\n * @event ChatEngine#$\".\"network\".\"down\".\"malformed\n */\n\n /**\n * Server rejected the request.\n * @event ChatEngine#$\".\"network\".\"down\".\"badrequest\n */\n\n /**\n * If using decryption strategies and the decryption fails.\n * @event ChatEngine#$\".\"network\".\"down\".\"decryption\n */\n\n /**\n * Request timed out.\n * @event ChatEngine#$\".\"network\".\"down\".\"timeout\n */\n\n /**\n * PAM permission failure.\n * @event ChatEngine#$\".\"network\".\"down\".\"denied\n */\n\n // map the pubnub events into ChatEngine events\n var categories = {\n PNNetworkUpCategory: 'up.online',\n PNNetworkDownCategory: 'down.offline',\n PNNetworkIssuesCategory: 'down.issue',\n PNReconnectedCategory: 'up.reconnected',\n PNConnectedCategory: 'up.connected',\n PNAccessDeniedCategory: 'down.denied',\n PNMalformedResponseCategory: 'down.malformed',\n PNBadRequestCategory: 'down.badrequest',\n PNDecryptionErrorCategory: 'down.decryption',\n PNTimeoutCategory: 'down.timeout'\n };\n\n var eventName = ['$', 'network', categories[statusEvent.category] || 'other'].join('.');\n\n ChatEngine._emit(eventName, statusEvent);\n }\n });\n };\n\n /**\n * Subscribe to PubNub and begin receiving events.\n * @private\n */\n ChatEngine.subscribeToPubNub = function () {\n\n var chanGroups = [ceConfig.globalChannel + '#' + ChatEngine.me.uuid + '#rooms', ceConfig.globalChannel + '#' + ChatEngine.me.uuid + '#system', ceConfig.globalChannel + '#' + ChatEngine.me.uuid + '#custom'];\n\n ChatEngine.pubnub.subscribe({\n channelGroups: chanGroups,\n withPresence: true\n });\n };\n\n /**\n * Initialize ChatEngine modules on first time boot.\n * @private\n */\n ChatEngine.firstConnect = function (state) {\n\n ChatEngine.pubnub = new PubNub(ChatEngine.pnConfig);\n\n // create a new chat to use as global chat\n // we don't do auth on this one because it's assumed to be done with the /auth request below\n ChatEngine.global = new ChatEngine.Chat(ceConfig.globalChannel, false, true, {}, 'system');\n\n ChatEngine.global.once('$.connected', function () {\n\n // build the current user\n ChatEngine.me = new Me(ChatEngine, ChatEngine.pnConfig.uuid);\n\n /**\n * Fired when a {@link Me} has been created within ChatEngine.\n * @event ChatEngine#$\".\"created\".\"me\n * @example\n * ChatEngine.on('$.created.me', (data, me) => {\n * console.log('Me was created', me);\n * });\n */\n ChatEngine.me.onConstructed();\n\n if (ChatEngine.ceConfig.enableSync) {\n ChatEngine.me.session.subscribe();\n ChatEngine.me.session.restore();\n }\n\n ChatEngine.me.update(state);\n\n /**\n * Fired when ChatEngine is connected to the internet and ready to go!\n * @event ChatEngine#$\".\"ready\n * @example\n * ChatEngine.on('$.ready', (data) => {\n * let me = data.me;\n * })\n */\n\n ChatEngine._emit('$.ready', {\n me: ChatEngine.me\n });\n\n ChatEngine.ready = true;\n\n ChatEngine.listenToPubNub();\n ChatEngine.subscribeToPubNub();\n\n ChatEngine.global.getUserUpdates();\n });\n };\n\n /**\n * Disconnect from all {@link Chat}s and mark them as asleep.\n * @example\n *\n * // create a new chat\n * let chat = new ChatEngine.Chat(new Date().getTime());\n *\n * // disconnect from ChatEngine\n * ChatEngine.disconnect();\n *\n * // every individual chat will be disconnected\n * chat.on('$.disconnected', () => {\n * done();\n * });\n *\n * // Changing User:\n * ChatEngine.disconnect()\n * ChatEngine = new ChatEngine({}, {});\n * ChatEngine.connect()\n */\n ChatEngine.disconnect = function () {\n\n // Unsubscribe from all PubNub chats\n ChatEngine.pubnub.unsubscribeAll();\n\n // for every chat in ChatEngine.chats, signal disconnected\n Object.keys(ChatEngine.chats).forEach(function (key) {\n ChatEngine.chats[key].sleep();\n });\n };\n\n /**\n * Performs authentication with server and restores connection\n * to all sleeping chats.\n * @example\n *\n * // create a new chat\n * let chat = new ChatEngine.Chat(new Date().getTime());\n *\n * // disconnect from ChatEngine\n * ChatEngine.disconnect();\n *\n * // reconnect sometime later\n * ChatEngine.reconnect();\n *\n */\n ChatEngine.reconnect = function () {\n\n // do the whole auth flow with the new authKey\n ChatEngine.handshake(function () {\n\n // for every chat in ChatEngine.chats, call .connect()\n Object.keys(ChatEngine.chats).forEach(function (key) {\n ChatEngine.chats[key].wake();\n });\n\n ChatEngine.subscribeToPubNub();\n });\n };\n\n /**\n @private\n */\n ChatEngine.setAuth = function () {\n var authKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : PubNub.generateUUID();\n\n\n ChatEngine.pnConfig.authKey = authKey;\n ChatEngine.pubnub.setAuthKey(authKey);\n };\n\n /**\n * Disconnects, changes authentication token, performs handshake with server\n * and reconnects with new auth key. Used for extending logged in sessions\n * for active users.\n * @example\n * // early\n * ChatEngine.connect(...);\n *\n * ChatEngine.once('$.connected', () => {\n * // first connection established\n * });\n *\n * // some time passes, session token expires\n * ChatEngine.reauthorize(authKey);\n *\n * // we are connected again\n * ChatEngine.once('$.connected', () => {\n * // we are connected again\n * });\n */\n ChatEngine.reauthorize = function () {\n var authKey = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : PubNub.generateUUID();\n\n\n ChatEngine.global.once('$.disconnected', function () {\n\n ChatEngine.setAuth(authKey);\n ChatEngine.reconnect();\n });\n\n ChatEngine.disconnect();\n };\n\n /**\n * Connect to realtime service and create instance of {@link Me}\n * @method ChatEngine#connect\n * @param {String} uuid A unique string for {@link Me}. It can be a device id, username, user id, email, etc. Must be alphanumeric.\n * @param {Object} state An object containing information about this client ({@link Me}). This JSON object is sent to all other clients on the network, so no passwords!\n * @param {String} [authKey] A authentication secret. Will be sent to authentication backend for validation. This is usually an access token. See {@tutorial auth} for more.\n * @fires $\".\"connected\n */\n ChatEngine.connect = function (uuid) {\n var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var authKey = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : PubNub.generateUUID();\n\n\n // this creates a user known as Me and\n // connects to the global chatroom\n ChatEngine.pnConfig.uuid = uuid;\n ChatEngine.pnConfig.authKey = authKey;\n\n ChatEngine.handshake(function () {\n ChatEngine.firstConnect(state);\n });\n };\n\n ChatEngine.destroy = function () {\n\n Object.keys(ChatEngine.chats).forEach(function (chat) {\n ChatEngine.chats[chat].emitter.removeAllListeners();\n });\n\n Object.keys(ChatEngine.users).forEach(function (user) {\n ChatEngine.users[user].emitter.removeAllListeners();\n });\n\n ChatEngine.emitter.removeAllListeners();\n };\n\n /**\n * The {@link Chat} class. Creates a new Chat when initialized, or returns an existing instance if chat has already been created.\n * @member {Chat} Chat\n * @memberof ChatEngine\n * @see {@link Chat}\n */\n ChatEngine.Chat = function createChat() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var internalChannel = ChatEngine.augmentChannel(args[0], args[1]);\n\n if (ChatEngine.chats[internalChannel]) {\n return ChatEngine.chats[internalChannel];\n } else {\n\n var newChat = new (Function.prototype.bind.apply(Chat, [null].concat([ChatEngine], args)))();\n\n /**\n * Fired when a {@link Chat} has been created within ChatEngine.\n * @event ChatEngine#$\".\"created\".\"chat\n * @example\n * ChatEngine.on('$.created.chat', (data, chat) => {\n * console.log('Chat was created', chat);\n * });\n */\n newChat.onConstructed();\n\n return newChat;\n }\n };\n\n /**\n * The {@link User} class. Creates a new User when initialized, or returns an existing instance if chat has already been created.\n * @member {User} User\n * @memberof ChatEngine\n * @see {@link User}\n */\n ChatEngine.User = function createUser() {\n for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n if (ChatEngine.me.uuid === args[0]) {\n return ChatEngine.me;\n } else if (ChatEngine.users[args[0]]) {\n return ChatEngine.users[args[0]];\n } else {\n\n var newUser = new (Function.prototype.bind.apply(User, [null].concat([ChatEngine], args)))();\n\n /**\n * Fired when a {@link User} has been created within ChatEngine.\n * @event ChatEngine#$\".\"created\".\"user\n * @example\n * ChatEngine.on('$.created.user', (data, user) => {\n * console.log('Chat was created', user);\n * });\n */\n newUser.onConstructed();\n\n return newUser;\n }\n };\n\n return ChatEngine;\n};\n\n/***/ }),\n/* 34 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nmodule.exports = __webpack_require__(35);\n\n/***/ }),\n/* 35 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\nvar bind = __webpack_require__(13);\nvar Axios = __webpack_require__(37);\nvar defaults = __webpack_require__(5);\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n * @return {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n var context = new Axios(defaultConfig);\n var instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context);\n\n // Copy context to instance\n utils.extend(instance, context);\n\n return instance;\n}\n\n// Create the default instance to be exported\nvar axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Factory for creating new instances\naxios.create = function create(instanceConfig) {\n return createInstance(utils.merge(defaults, instanceConfig));\n};\n\n// Expose Cancel & CancelToken\naxios.Cancel = __webpack_require__(17);\naxios.CancelToken = __webpack_require__(51);\naxios.isCancel = __webpack_require__(16);\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\naxios.spread = __webpack_require__(52);\n\nmodule.exports = axios;\n\n// Allow use of default import syntax in TypeScript\nmodule.exports.default = axios;\n\n/***/ }),\n/* 36 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/*!\n * Determine if an object is a Buffer\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n\n// The _isBuffer check is for Safari 5-7 support, because it's missing\n// Object.prototype.constructor. Remove this eventually\nmodule.exports = function (obj) {\n return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer);\n};\n\nfunction isBuffer(obj) {\n return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj);\n}\n\n// For Node v0.10 support. Remove this eventually.\nfunction isSlowBuffer(obj) {\n return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0));\n}\n\n/***/ }),\n/* 37 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar defaults = __webpack_require__(5);\nvar utils = __webpack_require__(0);\nvar InterceptorManager = __webpack_require__(46);\nvar dispatchRequest = __webpack_require__(47);\nvar isAbsoluteURL = __webpack_require__(49);\nvar combineURLs = __webpack_require__(50);\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n */\nfunction Axios(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n}\n\n/**\n * Dispatch a request\n *\n * @param {Object} config The config specific for this request (merged with this.defaults)\n */\nAxios.prototype.request = function request(config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof config === 'string') {\n config = utils.merge({\n url: arguments[0]\n }, arguments[1]);\n }\n\n config = utils.merge(defaults, this.defaults, { method: 'get' }, config);\n config.method = config.method.toLowerCase();\n\n // Support baseURL config\n if (config.baseURL && !isAbsoluteURL(config.url)) {\n config.url = combineURLs(config.baseURL, config.url);\n }\n\n // Hook up interceptors middleware\n var chain = [dispatchRequest, undefined];\n var promise = Promise.resolve(config);\n\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n chain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n chain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n while (chain.length) {\n promise = promise.then(chain.shift(), chain.shift());\n }\n\n return promise;\n};\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function (url, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function (url, data, config) {\n return this.request(utils.merge(config || {}, {\n method: method,\n url: url,\n data: data\n }));\n };\n});\n\nmodule.exports = Axios;\n\n/***/ }),\n/* 38 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\n\nmodule.exports = function normalizeHeaderName(headers, normalizedName) {\n utils.forEach(headers, function processHeader(value, name) {\n if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {\n headers[normalizedName] = value;\n delete headers[name];\n }\n });\n};\n\n/***/ }),\n/* 39 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar createError = __webpack_require__(15);\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n */\nmodule.exports = function settle(resolve, reject, response) {\n var validateStatus = response.config.validateStatus;\n // Note: status is not exposed by XDomainRequest\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(createError('Request failed with status code ' + response.status, response.config, null, response.request, response));\n }\n};\n\n/***/ }),\n/* 40 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Update an Error with the specified config, error code, and response.\n *\n * @param {Error} error The error to update.\n * @param {Object} config The config.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n * @returns {Error} The error.\n */\n\nmodule.exports = function enhanceError(error, config, code, request, response) {\n error.config = config;\n if (code) {\n error.code = code;\n }\n error.request = request;\n error.response = response;\n return error;\n};\n\n/***/ }),\n/* 41 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\n\nfunction encode(val) {\n return encodeURIComponent(val).replace(/%40/gi, '@').replace(/%3A/gi, ':').replace(/%24/g, '$').replace(/%2C/gi, ',').replace(/%20/g, '+').replace(/%5B/gi, '[').replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @returns {string} The formatted url\n */\nmodule.exports = function buildURL(url, params, paramsSerializer) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n\n var serializedParams;\n if (paramsSerializer) {\n serializedParams = paramsSerializer(params);\n } else if (utils.isURLSearchParams(params)) {\n serializedParams = params.toString();\n } else {\n var parts = [];\n\n utils.forEach(params, function serialize(val, key) {\n if (val === null || typeof val === 'undefined') {\n return;\n }\n\n if (utils.isArray(val)) {\n key = key + '[]';\n }\n\n if (!utils.isArray(val)) {\n val = [val];\n }\n\n utils.forEach(val, function parseValue(v) {\n if (utils.isDate(v)) {\n v = v.toISOString();\n } else if (utils.isObject(v)) {\n v = JSON.stringify(v);\n }\n parts.push(encode(key) + '=' + encode(v));\n });\n });\n\n serializedParams = parts.join('&');\n }\n\n if (serializedParams) {\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n};\n\n/***/ }),\n/* 42 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} headers Headers needing to be parsed\n * @returns {Object} Headers parsed into an object\n */\nmodule.exports = function parseHeaders(headers) {\n var parsed = {};\n var key;\n var val;\n var i;\n\n if (!headers) {\n return parsed;\n }\n\n utils.forEach(headers.split('\\n'), function parser(line) {\n i = line.indexOf(':');\n key = utils.trim(line.substr(0, i)).toLowerCase();\n val = utils.trim(line.substr(i + 1));\n\n if (key) {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n\n/***/ }),\n/* 43 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\n\nmodule.exports = utils.isStandardBrowserEnv() ?\n\n// Standard browser envs have full support of the APIs needed to test\n// whether the request URL is of the same origin as current location.\nfunction standardBrowserEnv() {\n var msie = /(msie|trident)/i.test(navigator.userAgent);\n var urlParsingNode = document.createElement('a');\n var originURL;\n\n /**\n * Parse a URL to discover it's components\n *\n * @param {String} url The URL to be parsed\n * @returns {Object}\n */\n function resolveURL(url) {\n var href = url;\n\n if (msie) {\n // IE needs attribute set twice to normalize properties\n urlParsingNode.setAttribute('href', href);\n href = urlParsingNode.href;\n }\n\n urlParsingNode.setAttribute('href', href);\n\n // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils\n return {\n href: urlParsingNode.href,\n protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',\n host: urlParsingNode.host,\n search: urlParsingNode.search ? urlParsingNode.search.replace(/^\\?/, '') : '',\n hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',\n hostname: urlParsingNode.hostname,\n port: urlParsingNode.port,\n pathname: urlParsingNode.pathname.charAt(0) === '/' ? urlParsingNode.pathname : '/' + urlParsingNode.pathname\n };\n }\n\n originURL = resolveURL(window.location.href);\n\n /**\n * Determine if a URL shares the same origin as the current location\n *\n * @param {String} requestURL The URL to test\n * @returns {boolean} True if URL shares the same origin, otherwise false\n */\n return function isURLSameOrigin(requestURL) {\n var parsed = utils.isString(requestURL) ? resolveURL(requestURL) : requestURL;\n return parsed.protocol === originURL.protocol && parsed.host === originURL.host;\n };\n}() :\n\n// Non standard browser envs (web workers, react-native) lack needed support.\nfunction nonStandardBrowserEnv() {\n return function isURLSameOrigin() {\n return true;\n };\n}();\n\n/***/ }),\n/* 44 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n// btoa polyfill for IE<10 courtesy https://github.com/davidchambers/Base64.js\n\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\nfunction E() {\n this.message = 'String contains an invalid character';\n}\nE.prototype = new Error();\nE.prototype.code = 5;\nE.prototype.name = 'InvalidCharacterError';\n\nfunction btoa(input) {\n var str = String(input);\n var output = '';\n for (\n // initialize result and counter\n var block, charCode, idx = 0, map = chars;\n // if the next str index does not exist:\n // change the mapping table to \"=\"\n // check if d has no fractional digits\n str.charAt(idx | 0) || (map = '=', idx % 1);\n // \"8 - idx % 1 * 8\" generates the sequence 2, 4, 6, 8\n output += map.charAt(63 & block >> 8 - idx % 1 * 8)) {\n charCode = str.charCodeAt(idx += 3 / 4);\n if (charCode > 0xFF) {\n throw new E();\n }\n block = block << 8 | charCode;\n }\n return output;\n}\n\nmodule.exports = btoa;\n\n/***/ }),\n/* 45 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\n\nmodule.exports = utils.isStandardBrowserEnv() ?\n\n// Standard browser envs support document.cookie\nfunction standardBrowserEnv() {\n return {\n write: function write(name, value, expires, path, domain, secure) {\n var cookie = [];\n cookie.push(name + '=' + encodeURIComponent(value));\n\n if (utils.isNumber(expires)) {\n cookie.push('expires=' + new Date(expires).toGMTString());\n }\n\n if (utils.isString(path)) {\n cookie.push('path=' + path);\n }\n\n if (utils.isString(domain)) {\n cookie.push('domain=' + domain);\n }\n\n if (secure === true) {\n cookie.push('secure');\n }\n\n document.cookie = cookie.join('; ');\n },\n\n read: function read(name) {\n var match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return match ? decodeURIComponent(match[3]) : null;\n },\n\n remove: function remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n };\n}() :\n\n// Non standard browser env (web workers, react-native) lack needed support.\nfunction nonStandardBrowserEnv() {\n return {\n write: function write() {},\n read: function read() {\n return null;\n },\n remove: function remove() {}\n };\n}();\n\n/***/ }),\n/* 46 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\n\nfunction InterceptorManager() {\n this.handlers = [];\n}\n\n/**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\nInterceptorManager.prototype.use = function use(fulfilled, rejected) {\n this.handlers.push({\n fulfilled: fulfilled,\n rejected: rejected\n });\n return this.handlers.length - 1;\n};\n\n/**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n */\nInterceptorManager.prototype.eject = function eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n};\n\n/**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n */\nInterceptorManager.prototype.forEach = function forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n};\n\nmodule.exports = InterceptorManager;\n\n/***/ }),\n/* 47 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\nvar transformData = __webpack_require__(48);\nvar isCancel = __webpack_require__(16);\nvar defaults = __webpack_require__(5);\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n * @returns {Promise} The Promise to be fulfilled\n */\nmodule.exports = function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n // Ensure headers exist\n config.headers = config.headers || {};\n\n // Transform request data\n config.data = transformData(config.data, config.headers, config.transformRequest);\n\n // Flatten headers\n config.headers = utils.merge(config.headers.common || {}, config.headers[config.method] || {}, config.headers || {});\n\n utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch', 'common'], function cleanHeaderConfig(method) {\n delete config.headers[method];\n });\n\n var adapter = config.adapter || defaults.adapter;\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData(response.data, response.headers, config.transformResponse);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData(reason.response.data, reason.response.headers, config.transformResponse);\n }\n }\n\n return Promise.reject(reason);\n });\n};\n\n/***/ }),\n/* 48 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar utils = __webpack_require__(0);\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Object|String} data The data to be transformed\n * @param {Array} headers The headers for the request or response\n * @param {Array|Function} fns A single function or Array of functions\n * @returns {*} The resulting transformed data\n */\nmodule.exports = function transformData(data, headers, fns) {\n /*eslint no-param-reassign:0*/\n utils.forEach(fns, function transform(fn) {\n data = fn(data, headers);\n });\n\n return data;\n};\n\n/***/ }),\n/* 49 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\n\nmodule.exports = function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return (/^([a-z][a-z\\d\\+\\-\\.]*:)?\\/\\//i.test(url)\n );\n};\n\n/***/ }),\n/* 50 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n * @returns {string} The combined URL\n */\n\nmodule.exports = function combineURLs(baseURL, relativeURL) {\n return relativeURL ? baseURL.replace(/\\/+$/, '') + '/' + relativeURL.replace(/^\\/+/, '') : baseURL;\n};\n\n/***/ }),\n/* 51 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar Cancel = __webpack_require__(17);\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @class\n * @param {Function} executor The executor function.\n */\nfunction CancelToken(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n var resolvePromise;\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n var token = this;\n executor(function cancel(message) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new Cancel(message);\n resolvePromise(token.reason);\n });\n}\n\n/**\n * Throws a `Cancel` if cancellation has been requested.\n */\nCancelToken.prototype.throwIfRequested = function throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n};\n\n/**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\nCancelToken.source = function source() {\n var cancel;\n var token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token: token,\n cancel: cancel\n };\n};\n\nmodule.exports = CancelToken;\n\n/***/ }),\n/* 52 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n * @returns {Function}\n */\n\nmodule.exports = function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n};\n\n/***/ }),\n/* 53 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n!function (e, t) {\n \"object\" == ( false ? \"undefined\" : _typeof(exports)) && \"object\" == ( false ? \"undefined\" : _typeof(module)) ? module.exports = t() : true ? !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (t),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?\n\t\t\t\t(__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : \"object\" == (typeof exports === \"undefined\" ? \"undefined\" : _typeof(exports)) ? exports.PubNub = t() : e.PubNub = t();\n}(undefined, function () {\n return function (e) {\n function t(r) {\n if (n[r]) return n[r].exports;var i = n[r] = { exports: {}, id: r, loaded: !1 };return e[r].call(i.exports, i, i.exports, t), i.loaded = !0, i.exports;\n }var n = {};return t.m = e, t.c = n, t.p = \"\", t(0);\n }([function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }function s(e, t) {\n if (!e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return !t || \"object\" != (typeof t === \"undefined\" ? \"undefined\" : _typeof(t)) && \"function\" != typeof t ? e : t;\n }function o(e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof t === \"undefined\" ? \"undefined\" : _typeof(t)));e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);\n }function a(e) {\n if (!navigator || !navigator.sendBeacon) return !1;navigator.sendBeacon(e);\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var u = n(1),\n c = r(u),\n l = n(39),\n h = r(l),\n f = n(40),\n p = r(f),\n d = n(41),\n y = (n(5), function (e) {\n function t(e) {\n i(this, t);var n = e.listenToBrowserNetworkEvents,\n r = void 0 === n || n;e.db = p.default, e.sdkFamily = \"Web\", e.networking = new h.default({ del: d.del, get: d.get, post: d.post, sendBeacon: a });var o = s(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));return r && (window.addEventListener(\"offline\", function () {\n o.networkDownDetected();\n }), window.addEventListener(\"online\", function () {\n o.networkUpDetected();\n })), o;\n }return o(t, e), t;\n }(c.default));t.default = y, e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n if (e && e.__esModule) return e;var t = {};if (null != e) for (var n in e) {\n Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);\n }return t.default = e, t;\n }function i(e) {\n return e && e.__esModule ? e : { default: e };\n }function s(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var o = function () {\n function e(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }return function (t, n, r) {\n return n && e(t.prototype, n), r && e(t, r), t;\n };\n }(),\n a = n(2),\n u = i(a),\n c = n(6),\n l = i(c),\n h = n(8),\n f = i(h),\n p = n(9),\n d = i(p),\n y = n(16),\n g = i(y),\n b = n(17),\n v = r(b),\n _ = n(18),\n m = r(_),\n k = n(19),\n P = r(k),\n O = n(20),\n S = r(O),\n w = n(21),\n T = r(w),\n C = n(22),\n M = r(C),\n E = n(23),\n x = r(E),\n N = n(24),\n R = r(N),\n A = n(25),\n D = r(A),\n K = n(26),\n j = r(K),\n U = n(27),\n G = r(U),\n I = n(28),\n H = r(I),\n B = n(29),\n L = r(B),\n q = n(30),\n F = r(q),\n z = n(31),\n X = r(z),\n W = n(32),\n $ = r(W),\n J = n(33),\n V = r(J),\n Q = n(34),\n Y = r(Q),\n Z = n(35),\n ee = r(Z),\n te = n(36),\n ne = r(te),\n re = n(37),\n ie = r(re),\n se = n(12),\n oe = r(se),\n ae = n(38),\n ue = r(ae),\n ce = n(13),\n le = i(ce),\n he = n(10),\n fe = i(he),\n pe = (n(5), n(3)),\n de = i(pe),\n ye = function () {\n function e(t) {\n var n = this;s(this, e);var r = t.db,\n i = t.networking,\n o = this._config = new u.default({ setup: t, db: r }),\n a = new l.default({ config: o });i.init(o);var c = { config: o, networking: i, crypto: a },\n h = g.default.bind(this, c, oe),\n p = g.default.bind(this, c, j),\n y = g.default.bind(this, c, H),\n b = g.default.bind(this, c, F),\n _ = g.default.bind(this, c, ue),\n k = this._listenerManager = new d.default(),\n O = new f.default({ timeEndpoint: h, leaveEndpoint: p, heartbeatEndpoint: y, setStateEndpoint: b, subscribeEndpoint: _, crypto: c.crypto, config: c.config, listenerManager: k });this.addListener = k.addListener.bind(k), this.removeListener = k.removeListener.bind(k), this.removeAllListeners = k.removeAllListeners.bind(k), this.channelGroups = { listGroups: g.default.bind(this, c, S), listChannels: g.default.bind(this, c, T), addChannels: g.default.bind(this, c, v), removeChannels: g.default.bind(this, c, m), deleteGroup: g.default.bind(this, c, P) }, this.push = { addChannels: g.default.bind(this, c, M), removeChannels: g.default.bind(this, c, x), deleteDevice: g.default.bind(this, c, D), listChannels: g.default.bind(this, c, R) }, this.hereNow = g.default.bind(this, c, X), this.whereNow = g.default.bind(this, c, G), this.getState = g.default.bind(this, c, L), this.setState = O.adaptStateChange.bind(O), this.grant = g.default.bind(this, c, V), this.audit = g.default.bind(this, c, $), this.publish = g.default.bind(this, c, Y), this.fire = function (e, t) {\n return e.replicate = !1, e.storeInHistory = !1, n.publish(e, t);\n }, this.history = g.default.bind(this, c, ee), this.deleteMessages = g.default.bind(this, c, ne), this.fetchMessages = g.default.bind(this, c, ie), this.time = h, this.subscribe = O.adaptSubscribeChange.bind(O), this.presence = O.adaptPresenceChange.bind(O), this.unsubscribe = O.adaptUnsubscribeChange.bind(O), this.disconnect = O.disconnect.bind(O), this.reconnect = O.reconnect.bind(O), this.destroy = function (e) {\n O.unsubscribeAll(e), O.disconnect();\n }, this.stop = this.destroy, this.unsubscribeAll = O.unsubscribeAll.bind(O), this.getSubscribedChannels = O.getSubscribedChannels.bind(O), this.getSubscribedChannelGroups = O.getSubscribedChannelGroups.bind(O), this.encrypt = a.encrypt.bind(a), this.decrypt = a.decrypt.bind(a), this.getAuthKey = c.config.getAuthKey.bind(c.config), this.setAuthKey = c.config.setAuthKey.bind(c.config), this.setCipherKey = c.config.setCipherKey.bind(c.config), this.getUUID = c.config.getUUID.bind(c.config), this.setUUID = c.config.setUUID.bind(c.config), this.getFilterExpression = c.config.getFilterExpression.bind(c.config), this.setFilterExpression = c.config.setFilterExpression.bind(c.config), this.setHeartbeatInterval = c.config.setHeartbeatInterval.bind(c.config), i.hasModule(\"proxy\") && (this.setProxy = function (e) {\n c.config.setProxy(e), n.reconnect();\n });\n }return o(e, [{ key: \"getVersion\", value: function value() {\n return this._config.getVersion();\n } }, { key: \"networkDownDetected\", value: function value() {\n this._listenerManager.announceNetworkDown(), this._config.restore ? this.disconnect() : this.destroy(!0);\n } }, { key: \"networkUpDetected\", value: function value() {\n this._listenerManager.announceNetworkUp(), this.reconnect();\n } }], [{ key: \"generateUUID\", value: function value() {\n return de.default.createUUID();\n } }]), e;\n }();ye.OPERATIONS = le.default, ye.CATEGORIES = fe.default, t.default = ye, e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n function r(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var i = function () {\n function e(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }return function (t, n, r) {\n return n && e(t.prototype, n), r && e(t, r), t;\n };\n }(),\n s = n(3),\n o = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(s),\n a = (n(5), function () {\n function e(t) {\n var n = t.setup,\n i = t.db;r(this, e), this._db = i, this.instanceId = \"pn-\" + o.default.createUUID(), this.secretKey = n.secretKey || n.secret_key, this.subscribeKey = n.subscribeKey || n.subscribe_key, this.publishKey = n.publishKey || n.publish_key, this.sdkName = n.sdkName, this.sdkFamily = n.sdkFamily, this.partnerId = n.partnerId, this.setAuthKey(n.authKey), this.setCipherKey(n.cipherKey), this.setFilterExpression(n.filterExpression), this.origin = n.origin || \"pubsub.pndsn.com\", this.secure = n.ssl || !1, this.restore = n.restore || !1, this.proxy = n.proxy, this.keepAlive = n.keepAlive, this.keepAliveSettings = n.keepAliveSettings, this.autoNetworkDetection = n.autoNetworkDetection || !1, this.dedupeOnSubscribe = n.dedupeOnSubscribe || !1, this.maximumCacheSize = n.maximumCacheSize || 100, this.customEncrypt = n.customEncrypt, this.customDecrypt = n.customDecrypt, \"undefined\" != typeof location && \"https:\" === location.protocol && (this.secure = !0), this.logVerbosity = n.logVerbosity || !1, this.suppressLeaveEvents = n.suppressLeaveEvents || !1, this.announceFailedHeartbeats = n.announceFailedHeartbeats || !0, this.announceSuccessfulHeartbeats = n.announceSuccessfulHeartbeats || !1, this.useInstanceId = n.useInstanceId || !1, this.useRequestId = n.useRequestId || !1, this.requestMessageCountThreshold = n.requestMessageCountThreshold, this.setTransactionTimeout(n.transactionalRequestTimeout || 15e3), this.setSubscribeTimeout(n.subscribeRequestTimeout || 31e4), this.setSendBeaconConfig(n.useSendBeacon || !0), this.setPresenceTimeout(n.presenceTimeout || 300), null != n.heartbeatInterval && this.setHeartbeatInterval(n.heartbeatInterval), this.setUUID(this._decideUUID(n.uuid));\n }return i(e, [{ key: \"getAuthKey\", value: function value() {\n return this.authKey;\n } }, { key: \"setAuthKey\", value: function value(e) {\n return this.authKey = e, this;\n } }, { key: \"setCipherKey\", value: function value(e) {\n return this.cipherKey = e, this;\n } }, { key: \"getUUID\", value: function value() {\n return this.UUID;\n } }, { key: \"setUUID\", value: function value(e) {\n return this._db && this._db.set && this._db.set(this.subscribeKey + \"uuid\", e), this.UUID = e, this;\n } }, { key: \"getFilterExpression\", value: function value() {\n return this.filterExpression;\n } }, { key: \"setFilterExpression\", value: function value(e) {\n return this.filterExpression = e, this;\n } }, { key: \"getPresenceTimeout\", value: function value() {\n return this._presenceTimeout;\n } }, { key: \"setPresenceTimeout\", value: function value(e) {\n return this._presenceTimeout = e, this.setHeartbeatInterval(this._presenceTimeout / 2 - 1), this;\n } }, { key: \"setProxy\", value: function value(e) {\n this.proxy = e;\n } }, { key: \"getHeartbeatInterval\", value: function value() {\n return this._heartbeatInterval;\n } }, { key: \"setHeartbeatInterval\", value: function value(e) {\n return this._heartbeatInterval = e, this;\n } }, { key: \"getSubscribeTimeout\", value: function value() {\n return this._subscribeRequestTimeout;\n } }, { key: \"setSubscribeTimeout\", value: function value(e) {\n return this._subscribeRequestTimeout = e, this;\n } }, { key: \"getTransactionTimeout\", value: function value() {\n return this._transactionalRequestTimeout;\n } }, { key: \"setTransactionTimeout\", value: function value(e) {\n return this._transactionalRequestTimeout = e, this;\n } }, { key: \"isSendBeaconEnabled\", value: function value() {\n return this._useSendBeacon;\n } }, { key: \"setSendBeaconConfig\", value: function value(e) {\n return this._useSendBeacon = e, this;\n } }, { key: \"getVersion\", value: function value() {\n return \"4.20.2\";\n } }, { key: \"_decideUUID\", value: function value(e) {\n return e || (this._db && this._db.get && this._db.get(this.subscribeKey + \"uuid\") ? this._db.get(this.subscribeKey + \"uuid\") : \"pn-\" + o.default.createUUID());\n } }]), e;\n }());t.default = a, e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n Object.defineProperty(t, \"__esModule\", { value: !0 });var r = n(4),\n i = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(r);t.default = { createUUID: function createUUID() {\n return i.default.uuid ? i.default.uuid() : (0, i.default)();\n } }, e.exports = t.default;\n }, function (e, t, n) {\n var r, i, s;!function (n, o) {\n i = [t], r = o, void 0 !== (s = \"function\" == typeof r ? r.apply(t, i) : r) && (e.exports = s);\n }(0, function (e) {\n function t() {\n var e,\n t,\n n = \"\";for (e = 0; e < 32; e++) {\n t = 16 * Math.random() | 0, 8 !== e && 12 !== e && 16 !== e && 20 !== e || (n += \"-\"), n += (12 === e ? 4 : 16 === e ? 3 & t | 8 : t).toString(16);\n }return n;\n }function n(e, t) {\n var n = r[t || \"all\"];return n && n.test(e) || !1;\n }var r = { 3: /^[0-9A-F]{8}-[0-9A-F]{4}-3[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i, 4: /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, 5: /^[0-9A-F]{8}-[0-9A-F]{4}-5[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i, all: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i };t.isUUID = n, t.VERSION = \"0.1.0\", e.uuid = t, e.isUUID = n;\n });\n }, function (e, t) {\n \"use strict\";\n e.exports = {};\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var s = function () {\n function e(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }return function (t, n, r) {\n return n && e(t.prototype, n), r && e(t, r), t;\n };\n }(),\n o = n(2),\n a = (r(o), n(7)),\n u = r(a),\n c = function () {\n function e(t) {\n var n = t.config;i(this, e), this._config = n, this._iv = \"0123456789012345\", this._allowedKeyEncodings = [\"hex\", \"utf8\", \"base64\", \"binary\"], this._allowedKeyLengths = [128, 256], this._allowedModes = [\"ecb\", \"cbc\"], this._defaultOptions = { encryptKey: !0, keyEncoding: \"utf8\", keyLength: 256, mode: \"cbc\" };\n }return s(e, [{ key: \"HMACSHA256\", value: function value(e) {\n return u.default.HmacSHA256(e, this._config.secretKey).toString(u.default.enc.Base64);\n } }, { key: \"SHA256\", value: function value(e) {\n return u.default.SHA256(e).toString(u.default.enc.Hex);\n } }, { key: \"_parseOptions\", value: function value(e) {\n var t = e || {};return t.hasOwnProperty(\"encryptKey\") || (t.encryptKey = this._defaultOptions.encryptKey), t.hasOwnProperty(\"keyEncoding\") || (t.keyEncoding = this._defaultOptions.keyEncoding), t.hasOwnProperty(\"keyLength\") || (t.keyLength = this._defaultOptions.keyLength), t.hasOwnProperty(\"mode\") || (t.mode = this._defaultOptions.mode), -1 === this._allowedKeyEncodings.indexOf(t.keyEncoding.toLowerCase()) && (t.keyEncoding = this._defaultOptions.keyEncoding), -1 === this._allowedKeyLengths.indexOf(parseInt(t.keyLength, 10)) && (t.keyLength = this._defaultOptions.keyLength), -1 === this._allowedModes.indexOf(t.mode.toLowerCase()) && (t.mode = this._defaultOptions.mode), t;\n } }, { key: \"_decodeKey\", value: function value(e, t) {\n return \"base64\" === t.keyEncoding ? u.default.enc.Base64.parse(e) : \"hex\" === t.keyEncoding ? u.default.enc.Hex.parse(e) : e;\n } }, { key: \"_getPaddedKey\", value: function value(e, t) {\n return e = this._decodeKey(e, t), t.encryptKey ? u.default.enc.Utf8.parse(this.SHA256(e).slice(0, 32)) : e;\n } }, { key: \"_getMode\", value: function value(e) {\n return \"ecb\" === e.mode ? u.default.mode.ECB : u.default.mode.CBC;\n } }, { key: \"_getIV\", value: function value(e) {\n return \"cbc\" === e.mode ? u.default.enc.Utf8.parse(this._iv) : null;\n } }, { key: \"encrypt\", value: function value(e, t, n) {\n return this._config.customEncrypt ? this._config.customEncrypt(e) : this.pnEncrypt(e, t, n);\n } }, { key: \"decrypt\", value: function value(e, t, n) {\n return this._config.customDecrypt ? this._config.customDecrypt(e) : this.pnDecrypt(e, t, n);\n } }, { key: \"pnEncrypt\", value: function value(e, t, n) {\n if (!t && !this._config.cipherKey) return e;n = this._parseOptions(n);var r = this._getIV(n),\n i = this._getMode(n),\n s = this._getPaddedKey(t || this._config.cipherKey, n);return u.default.AES.encrypt(e, s, { iv: r, mode: i }).ciphertext.toString(u.default.enc.Base64) || e;\n } }, { key: \"pnDecrypt\", value: function value(e, t, n) {\n if (!t && !this._config.cipherKey) return e;n = this._parseOptions(n);var r = this._getIV(n),\n i = this._getMode(n),\n s = this._getPaddedKey(t || this._config.cipherKey, n);try {\n var o = u.default.enc.Base64.parse(e),\n a = u.default.AES.decrypt({ ciphertext: o }, s, { iv: r, mode: i }).toString(u.default.enc.Utf8);return JSON.parse(a);\n } catch (e) {\n return null;\n }\n } }]), e;\n }();t.default = c, e.exports = t.default;\n }, function (e, t) {\n \"use strict\";\n var n = n || function (e, t) {\n var n = {},\n r = n.lib = {},\n i = function i() {},\n s = r.Base = { extend: function extend(e) {\n i.prototype = this;var t = new i();return e && t.mixIn(e), t.hasOwnProperty(\"init\") || (t.init = function () {\n t.$super.init.apply(this, arguments);\n }), t.init.prototype = t, t.$super = this, t;\n }, create: function create() {\n var e = this.extend();return e.init.apply(e, arguments), e;\n }, init: function init() {}, mixIn: function mixIn(e) {\n for (var t in e) {\n e.hasOwnProperty(t) && (this[t] = e[t]);\n }e.hasOwnProperty(\"toString\") && (this.toString = e.toString);\n }, clone: function clone() {\n return this.init.prototype.extend(this);\n } },\n o = r.WordArray = s.extend({ init: function init(e, t) {\n e = this.words = e || [], this.sigBytes = void 0 != t ? t : 4 * e.length;\n }, toString: function toString(e) {\n return (e || u).stringify(this);\n }, concat: function concat(e) {\n var t = this.words,\n n = e.words,\n r = this.sigBytes;if (e = e.sigBytes, this.clamp(), r % 4) for (var i = 0; i < e; i++) {\n t[r + i >>> 2] |= (n[i >>> 2] >>> 24 - i % 4 * 8 & 255) << 24 - (r + i) % 4 * 8;\n } else if (65535 < n.length) for (i = 0; i < e; i += 4) {\n t[r + i >>> 2] = n[i >>> 2];\n } else t.push.apply(t, n);return this.sigBytes += e, this;\n }, clamp: function clamp() {\n var t = this.words,\n n = this.sigBytes;t[n >>> 2] &= 4294967295 << 32 - n % 4 * 8, t.length = e.ceil(n / 4);\n }, clone: function clone() {\n var e = s.clone.call(this);return e.words = this.words.slice(0), e;\n }, random: function random(t) {\n for (var n = [], r = 0; r < t; r += 4) {\n n.push(4294967296 * e.random() | 0);\n }return new o.init(n, t);\n } }),\n a = n.enc = {},\n u = a.Hex = { stringify: function stringify(e) {\n var t = e.words;e = e.sigBytes;for (var n = [], r = 0; r < e; r++) {\n var i = t[r >>> 2] >>> 24 - r % 4 * 8 & 255;n.push((i >>> 4).toString(16)), n.push((15 & i).toString(16));\n }return n.join(\"\");\n }, parse: function parse(e) {\n for (var t = e.length, n = [], r = 0; r < t; r += 2) {\n n[r >>> 3] |= parseInt(e.substr(r, 2), 16) << 24 - r % 8 * 4;\n }return new o.init(n, t / 2);\n } },\n c = a.Latin1 = { stringify: function stringify(e) {\n var t = e.words;e = e.sigBytes;for (var n = [], r = 0; r < e; r++) {\n n.push(String.fromCharCode(t[r >>> 2] >>> 24 - r % 4 * 8 & 255));\n }return n.join(\"\");\n }, parse: function parse(e) {\n for (var t = e.length, n = [], r = 0; r < t; r++) {\n n[r >>> 2] |= (255 & e.charCodeAt(r)) << 24 - r % 4 * 8;\n }return new o.init(n, t);\n } },\n l = a.Utf8 = { stringify: function stringify(e) {\n try {\n return decodeURIComponent(escape(c.stringify(e)));\n } catch (e) {\n throw Error(\"Malformed UTF-8 data\");\n }\n }, parse: function parse(e) {\n return c.parse(unescape(encodeURIComponent(e)));\n } },\n h = r.BufferedBlockAlgorithm = s.extend({ reset: function reset() {\n this._data = new o.init(), this._nDataBytes = 0;\n }, _append: function _append(e) {\n \"string\" == typeof e && (e = l.parse(e)), this._data.concat(e), this._nDataBytes += e.sigBytes;\n }, _process: function _process(t) {\n var n = this._data,\n r = n.words,\n i = n.sigBytes,\n s = this.blockSize,\n a = i / (4 * s),\n a = t ? e.ceil(a) : e.max((0 | a) - this._minBufferSize, 0);if (t = a * s, i = e.min(4 * t, i), t) {\n for (var u = 0; u < t; u += s) {\n this._doProcessBlock(r, u);\n }u = r.splice(0, t), n.sigBytes -= i;\n }return new o.init(u, i);\n }, clone: function clone() {\n var e = s.clone.call(this);return e._data = this._data.clone(), e;\n }, _minBufferSize: 0 });r.Hasher = h.extend({ cfg: s.extend(), init: function init(e) {\n this.cfg = this.cfg.extend(e), this.reset();\n }, reset: function reset() {\n h.reset.call(this), this._doReset();\n }, update: function update(e) {\n return this._append(e), this._process(), this;\n }, finalize: function finalize(e) {\n return e && this._append(e), this._doFinalize();\n }, blockSize: 16, _createHelper: function _createHelper(e) {\n return function (t, n) {\n return new e.init(n).finalize(t);\n };\n }, _createHmacHelper: function _createHmacHelper(e) {\n return function (t, n) {\n return new f.HMAC.init(e, n).finalize(t);\n };\n } });var f = n.algo = {};return n;\n }(Math);!function (e) {\n for (var t = n, r = t.lib, i = r.WordArray, s = r.Hasher, r = t.algo, o = [], a = [], u = function u(e) {\n return 4294967296 * (e - (0 | e)) | 0;\n }, c = 2, l = 0; 64 > l;) {\n var h;e: {\n h = c;for (var f = e.sqrt(h), p = 2; p <= f; p++) {\n if (!(h % p)) {\n h = !1;break e;\n }\n }h = !0;\n }h && (8 > l && (o[l] = u(e.pow(c, .5))), a[l] = u(e.pow(c, 1 / 3)), l++), c++;\n }var d = [],\n r = r.SHA256 = s.extend({ _doReset: function _doReset() {\n this._hash = new i.init(o.slice(0));\n }, _doProcessBlock: function _doProcessBlock(e, t) {\n for (var n = this._hash.words, r = n[0], i = n[1], s = n[2], o = n[3], u = n[4], c = n[5], l = n[6], h = n[7], f = 0; 64 > f; f++) {\n if (16 > f) d[f] = 0 | e[t + f];else {\n var p = d[f - 15],\n y = d[f - 2];d[f] = ((p << 25 | p >>> 7) ^ (p << 14 | p >>> 18) ^ p >>> 3) + d[f - 7] + ((y << 15 | y >>> 17) ^ (y << 13 | y >>> 19) ^ y >>> 10) + d[f - 16];\n }p = h + ((u << 26 | u >>> 6) ^ (u << 21 | u >>> 11) ^ (u << 7 | u >>> 25)) + (u & c ^ ~u & l) + a[f] + d[f], y = ((r << 30 | r >>> 2) ^ (r << 19 | r >>> 13) ^ (r << 10 | r >>> 22)) + (r & i ^ r & s ^ i & s), h = l, l = c, c = u, u = o + p | 0, o = s, s = i, i = r, r = p + y | 0;\n }n[0] = n[0] + r | 0, n[1] = n[1] + i | 0, n[2] = n[2] + s | 0, n[3] = n[3] + o | 0, n[4] = n[4] + u | 0, n[5] = n[5] + c | 0, n[6] = n[6] + l | 0, n[7] = n[7] + h | 0;\n }, _doFinalize: function _doFinalize() {\n var t = this._data,\n n = t.words,\n r = 8 * this._nDataBytes,\n i = 8 * t.sigBytes;return n[i >>> 5] |= 128 << 24 - i % 32, n[14 + (i + 64 >>> 9 << 4)] = e.floor(r / 4294967296), n[15 + (i + 64 >>> 9 << 4)] = r, t.sigBytes = 4 * n.length, this._process(), this._hash;\n }, clone: function clone() {\n var e = s.clone.call(this);return e._hash = this._hash.clone(), e;\n } });t.SHA256 = s._createHelper(r), t.HmacSHA256 = s._createHmacHelper(r);\n }(Math), function () {\n var e = n,\n t = e.enc.Utf8;e.algo.HMAC = e.lib.Base.extend({ init: function init(e, n) {\n e = this._hasher = new e.init(), \"string\" == typeof n && (n = t.parse(n));var r = e.blockSize,\n i = 4 * r;n.sigBytes > i && (n = e.finalize(n)), n.clamp();for (var s = this._oKey = n.clone(), o = this._iKey = n.clone(), a = s.words, u = o.words, c = 0; c < r; c++) {\n a[c] ^= 1549556828, u[c] ^= 909522486;\n }s.sigBytes = o.sigBytes = i, this.reset();\n }, reset: function reset() {\n var e = this._hasher;e.reset(), e.update(this._iKey);\n }, update: function update(e) {\n return this._hasher.update(e), this;\n }, finalize: function finalize(e) {\n var t = this._hasher;return e = t.finalize(e), t.reset(), t.finalize(this._oKey.clone().concat(e));\n } });\n }(), function () {\n var e = n,\n t = e.lib.WordArray;e.enc.Base64 = { stringify: function stringify(e) {\n var t = e.words,\n n = e.sigBytes,\n r = this._map;e.clamp(), e = [];for (var i = 0; i < n; i += 3) {\n for (var s = (t[i >>> 2] >>> 24 - i % 4 * 8 & 255) << 16 | (t[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 255) << 8 | t[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 255, o = 0; 4 > o && i + .75 * o < n; o++) {\n e.push(r.charAt(s >>> 6 * (3 - o) & 63));\n }\n }if (t = r.charAt(64)) for (; e.length % 4;) {\n e.push(t);\n }return e.join(\"\");\n }, parse: function parse(e) {\n var n = e.length,\n r = this._map,\n i = r.charAt(64);i && -1 != (i = e.indexOf(i)) && (n = i);for (var i = [], s = 0, o = 0; o < n; o++) {\n if (o % 4) {\n var a = r.indexOf(e.charAt(o - 1)) << o % 4 * 2,\n u = r.indexOf(e.charAt(o)) >>> 6 - o % 4 * 2;i[s >>> 2] |= (a | u) << 24 - s % 4 * 8, s++;\n }\n }return t.create(i, s);\n }, _map: \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\" };\n }(), function (e) {\n function t(e, t, n, r, i, s, o) {\n return ((e = e + (t & n | ~t & r) + i + o) << s | e >>> 32 - s) + t;\n }function r(e, t, n, r, i, s, o) {\n return ((e = e + (t & r | n & ~r) + i + o) << s | e >>> 32 - s) + t;\n }function i(e, t, n, r, i, s, o) {\n return ((e = e + (t ^ n ^ r) + i + o) << s | e >>> 32 - s) + t;\n }function s(e, t, n, r, i, s, o) {\n return ((e = e + (n ^ (t | ~r)) + i + o) << s | e >>> 32 - s) + t;\n }for (var o = n, a = o.lib, u = a.WordArray, c = a.Hasher, a = o.algo, l = [], h = 0; 64 > h; h++) {\n l[h] = 4294967296 * e.abs(e.sin(h + 1)) | 0;\n }a = a.MD5 = c.extend({ _doReset: function _doReset() {\n this._hash = new u.init([1732584193, 4023233417, 2562383102, 271733878]);\n }, _doProcessBlock: function _doProcessBlock(e, n) {\n for (var o = 0; 16 > o; o++) {\n var a = n + o,\n u = e[a];e[a] = 16711935 & (u << 8 | u >>> 24) | 4278255360 & (u << 24 | u >>> 8);\n }var o = this._hash.words,\n a = e[n + 0],\n u = e[n + 1],\n c = e[n + 2],\n h = e[n + 3],\n f = e[n + 4],\n p = e[n + 5],\n d = e[n + 6],\n y = e[n + 7],\n g = e[n + 8],\n b = e[n + 9],\n v = e[n + 10],\n _ = e[n + 11],\n m = e[n + 12],\n k = e[n + 13],\n P = e[n + 14],\n O = e[n + 15],\n S = o[0],\n w = o[1],\n T = o[2],\n C = o[3],\n S = t(S, w, T, C, a, 7, l[0]),\n C = t(C, S, w, T, u, 12, l[1]),\n T = t(T, C, S, w, c, 17, l[2]),\n w = t(w, T, C, S, h, 22, l[3]),\n S = t(S, w, T, C, f, 7, l[4]),\n C = t(C, S, w, T, p, 12, l[5]),\n T = t(T, C, S, w, d, 17, l[6]),\n w = t(w, T, C, S, y, 22, l[7]),\n S = t(S, w, T, C, g, 7, l[8]),\n C = t(C, S, w, T, b, 12, l[9]),\n T = t(T, C, S, w, v, 17, l[10]),\n w = t(w, T, C, S, _, 22, l[11]),\n S = t(S, w, T, C, m, 7, l[12]),\n C = t(C, S, w, T, k, 12, l[13]),\n T = t(T, C, S, w, P, 17, l[14]),\n w = t(w, T, C, S, O, 22, l[15]),\n S = r(S, w, T, C, u, 5, l[16]),\n C = r(C, S, w, T, d, 9, l[17]),\n T = r(T, C, S, w, _, 14, l[18]),\n w = r(w, T, C, S, a, 20, l[19]),\n S = r(S, w, T, C, p, 5, l[20]),\n C = r(C, S, w, T, v, 9, l[21]),\n T = r(T, C, S, w, O, 14, l[22]),\n w = r(w, T, C, S, f, 20, l[23]),\n S = r(S, w, T, C, b, 5, l[24]),\n C = r(C, S, w, T, P, 9, l[25]),\n T = r(T, C, S, w, h, 14, l[26]),\n w = r(w, T, C, S, g, 20, l[27]),\n S = r(S, w, T, C, k, 5, l[28]),\n C = r(C, S, w, T, c, 9, l[29]),\n T = r(T, C, S, w, y, 14, l[30]),\n w = r(w, T, C, S, m, 20, l[31]),\n S = i(S, w, T, C, p, 4, l[32]),\n C = i(C, S, w, T, g, 11, l[33]),\n T = i(T, C, S, w, _, 16, l[34]),\n w = i(w, T, C, S, P, 23, l[35]),\n S = i(S, w, T, C, u, 4, l[36]),\n C = i(C, S, w, T, f, 11, l[37]),\n T = i(T, C, S, w, y, 16, l[38]),\n w = i(w, T, C, S, v, 23, l[39]),\n S = i(S, w, T, C, k, 4, l[40]),\n C = i(C, S, w, T, a, 11, l[41]),\n T = i(T, C, S, w, h, 16, l[42]),\n w = i(w, T, C, S, d, 23, l[43]),\n S = i(S, w, T, C, b, 4, l[44]),\n C = i(C, S, w, T, m, 11, l[45]),\n T = i(T, C, S, w, O, 16, l[46]),\n w = i(w, T, C, S, c, 23, l[47]),\n S = s(S, w, T, C, a, 6, l[48]),\n C = s(C, S, w, T, y, 10, l[49]),\n T = s(T, C, S, w, P, 15, l[50]),\n w = s(w, T, C, S, p, 21, l[51]),\n S = s(S, w, T, C, m, 6, l[52]),\n C = s(C, S, w, T, h, 10, l[53]),\n T = s(T, C, S, w, v, 15, l[54]),\n w = s(w, T, C, S, u, 21, l[55]),\n S = s(S, w, T, C, g, 6, l[56]),\n C = s(C, S, w, T, O, 10, l[57]),\n T = s(T, C, S, w, d, 15, l[58]),\n w = s(w, T, C, S, k, 21, l[59]),\n S = s(S, w, T, C, f, 6, l[60]),\n C = s(C, S, w, T, _, 10, l[61]),\n T = s(T, C, S, w, c, 15, l[62]),\n w = s(w, T, C, S, b, 21, l[63]);o[0] = o[0] + S | 0, o[1] = o[1] + w | 0, o[2] = o[2] + T | 0, o[3] = o[3] + C | 0;\n }, _doFinalize: function _doFinalize() {\n var t = this._data,\n n = t.words,\n r = 8 * this._nDataBytes,\n i = 8 * t.sigBytes;n[i >>> 5] |= 128 << 24 - i % 32;var s = e.floor(r / 4294967296);for (n[15 + (i + 64 >>> 9 << 4)] = 16711935 & (s << 8 | s >>> 24) | 4278255360 & (s << 24 | s >>> 8), n[14 + (i + 64 >>> 9 << 4)] = 16711935 & (r << 8 | r >>> 24) | 4278255360 & (r << 24 | r >>> 8), t.sigBytes = 4 * (n.length + 1), this._process(), t = this._hash, n = t.words, r = 0; 4 > r; r++) {\n i = n[r], n[r] = 16711935 & (i << 8 | i >>> 24) | 4278255360 & (i << 24 | i >>> 8);\n }return t;\n }, clone: function clone() {\n var e = c.clone.call(this);return e._hash = this._hash.clone(), e;\n } }), o.MD5 = c._createHelper(a), o.HmacMD5 = c._createHmacHelper(a);\n }(Math), function () {\n var e = n,\n t = e.lib,\n r = t.Base,\n i = t.WordArray,\n t = e.algo,\n s = t.EvpKDF = r.extend({ cfg: r.extend({ keySize: 4, hasher: t.MD5, iterations: 1 }), init: function init(e) {\n this.cfg = this.cfg.extend(e);\n }, compute: function compute(e, t) {\n for (var n = this.cfg, r = n.hasher.create(), s = i.create(), o = s.words, a = n.keySize, n = n.iterations; o.length < a;) {\n u && r.update(u);var u = r.update(e).finalize(t);r.reset();for (var c = 1; c < n; c++) {\n u = r.finalize(u), r.reset();\n }s.concat(u);\n }return s.sigBytes = 4 * a, s;\n } });e.EvpKDF = function (e, t, n) {\n return s.create(n).compute(e, t);\n };\n }(), n.lib.Cipher || function (e) {\n var t = n,\n r = t.lib,\n i = r.Base,\n s = r.WordArray,\n o = r.BufferedBlockAlgorithm,\n a = t.enc.Base64,\n u = t.algo.EvpKDF,\n c = r.Cipher = o.extend({ cfg: i.extend(), createEncryptor: function createEncryptor(e, t) {\n return this.create(this._ENC_XFORM_MODE, e, t);\n }, createDecryptor: function createDecryptor(e, t) {\n return this.create(this._DEC_XFORM_MODE, e, t);\n }, init: function init(e, t, n) {\n this.cfg = this.cfg.extend(n), this._xformMode = e, this._key = t, this.reset();\n }, reset: function reset() {\n o.reset.call(this), this._doReset();\n }, process: function process(e) {\n return this._append(e), this._process();\n }, finalize: function finalize(e) {\n return e && this._append(e), this._doFinalize();\n }, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: function _createHelper(e) {\n return { encrypt: function encrypt(t, n, r) {\n return (\"string\" == typeof n ? y : d).encrypt(e, t, n, r);\n }, decrypt: function decrypt(t, n, r) {\n return (\"string\" == typeof n ? y : d).decrypt(e, t, n, r);\n } };\n } });r.StreamCipher = c.extend({ _doFinalize: function _doFinalize() {\n return this._process(!0);\n }, blockSize: 1 });var l = t.mode = {},\n h = function h(e, t, n) {\n var r = this._iv;r ? this._iv = void 0 : r = this._prevBlock;for (var i = 0; i < n; i++) {\n e[t + i] ^= r[i];\n }\n },\n f = (r.BlockCipherMode = i.extend({ createEncryptor: function createEncryptor(e, t) {\n return this.Encryptor.create(e, t);\n }, createDecryptor: function createDecryptor(e, t) {\n return this.Decryptor.create(e, t);\n }, init: function init(e, t) {\n this._cipher = e, this._iv = t;\n } })).extend();f.Encryptor = f.extend({ processBlock: function processBlock(e, t) {\n var n = this._cipher,\n r = n.blockSize;h.call(this, e, t, r), n.encryptBlock(e, t), this._prevBlock = e.slice(t, t + r);\n } }), f.Decryptor = f.extend({ processBlock: function processBlock(e, t) {\n var n = this._cipher,\n r = n.blockSize,\n i = e.slice(t, t + r);n.decryptBlock(e, t), h.call(this, e, t, r), this._prevBlock = i;\n } }), l = l.CBC = f, f = (t.pad = {}).Pkcs7 = { pad: function pad(e, t) {\n for (var n = 4 * t, n = n - e.sigBytes % n, r = n << 24 | n << 16 | n << 8 | n, i = [], o = 0; o < n; o += 4) {\n i.push(r);\n }n = s.create(i, n), e.concat(n);\n }, unpad: function unpad(e) {\n e.sigBytes -= 255 & e.words[e.sigBytes - 1 >>> 2];\n } }, r.BlockCipher = c.extend({ cfg: c.cfg.extend({ mode: l, padding: f }), reset: function reset() {\n c.reset.call(this);var e = this.cfg,\n t = e.iv,\n e = e.mode;if (this._xformMode == this._ENC_XFORM_MODE) var n = e.createEncryptor;else n = e.createDecryptor, this._minBufferSize = 1;this._mode = n.call(e, this, t && t.words);\n }, _doProcessBlock: function _doProcessBlock(e, t) {\n this._mode.processBlock(e, t);\n }, _doFinalize: function _doFinalize() {\n var e = this.cfg.padding;if (this._xformMode == this._ENC_XFORM_MODE) {\n e.pad(this._data, this.blockSize);var t = this._process(!0);\n } else t = this._process(!0), e.unpad(t);return t;\n }, blockSize: 4 });var p = r.CipherParams = i.extend({ init: function init(e) {\n this.mixIn(e);\n }, toString: function toString(e) {\n return (e || this.formatter).stringify(this);\n } }),\n l = (t.format = {}).OpenSSL = { stringify: function stringify(e) {\n var t = e.ciphertext;return e = e.salt, (e ? s.create([1398893684, 1701076831]).concat(e).concat(t) : t).toString(a);\n }, parse: function parse(e) {\n e = a.parse(e);var t = e.words;if (1398893684 == t[0] && 1701076831 == t[1]) {\n var n = s.create(t.slice(2, 4));t.splice(0, 4), e.sigBytes -= 16;\n }return p.create({ ciphertext: e, salt: n });\n } },\n d = r.SerializableCipher = i.extend({ cfg: i.extend({ format: l }), encrypt: function encrypt(e, t, n, r) {\n r = this.cfg.extend(r);var i = e.createEncryptor(n, r);return t = i.finalize(t), i = i.cfg, p.create({ ciphertext: t, key: n, iv: i.iv, algorithm: e, mode: i.mode, padding: i.padding, blockSize: e.blockSize, formatter: r.format });\n }, decrypt: function decrypt(e, t, n, r) {\n return r = this.cfg.extend(r), t = this._parse(t, r.format), e.createDecryptor(n, r).finalize(t.ciphertext);\n }, _parse: function _parse(e, t) {\n return \"string\" == typeof e ? t.parse(e, this) : e;\n } }),\n t = (t.kdf = {}).OpenSSL = { execute: function execute(e, t, n, r) {\n return r || (r = s.random(8)), e = u.create({ keySize: t + n }).compute(e, r), n = s.create(e.words.slice(t), 4 * n), e.sigBytes = 4 * t, p.create({ key: e, iv: n, salt: r });\n } },\n y = r.PasswordBasedCipher = d.extend({ cfg: d.cfg.extend({ kdf: t }), encrypt: function encrypt(e, t, n, r) {\n return r = this.cfg.extend(r), n = r.kdf.execute(n, e.keySize, e.ivSize), r.iv = n.iv, e = d.encrypt.call(this, e, t, n.key, r), e.mixIn(n), e;\n }, decrypt: function decrypt(e, t, n, r) {\n return r = this.cfg.extend(r), t = this._parse(t, r.format), n = r.kdf.execute(n, e.keySize, e.ivSize, t.salt), r.iv = n.iv, d.decrypt.call(this, e, t, n.key, r);\n } });\n }(), function () {\n for (var e = n, t = e.lib.BlockCipher, r = e.algo, i = [], s = [], o = [], a = [], u = [], c = [], l = [], h = [], f = [], p = [], d = [], y = 0; 256 > y; y++) {\n d[y] = 128 > y ? y << 1 : y << 1 ^ 283;\n }for (var g = 0, b = 0, y = 0; 256 > y; y++) {\n var v = b ^ b << 1 ^ b << 2 ^ b << 3 ^ b << 4,\n v = v >>> 8 ^ 255 & v ^ 99;i[g] = v, s[v] = g;var _ = d[g],\n m = d[_],\n k = d[m],\n P = 257 * d[v] ^ 16843008 * v;o[g] = P << 24 | P >>> 8, a[g] = P << 16 | P >>> 16, u[g] = P << 8 | P >>> 24, c[g] = P, P = 16843009 * k ^ 65537 * m ^ 257 * _ ^ 16843008 * g, l[v] = P << 24 | P >>> 8, h[v] = P << 16 | P >>> 16, f[v] = P << 8 | P >>> 24, p[v] = P, g ? (g = _ ^ d[d[d[k ^ _]]], b ^= d[d[b]]) : g = b = 1;\n }var O = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54],\n r = r.AES = t.extend({ _doReset: function _doReset() {\n for (var e = this._key, t = e.words, n = e.sigBytes / 4, e = 4 * ((this._nRounds = n + 6) + 1), r = this._keySchedule = [], s = 0; s < e; s++) {\n if (s < n) r[s] = t[s];else {\n var o = r[s - 1];s % n ? 6 < n && 4 == s % n && (o = i[o >>> 24] << 24 | i[o >>> 16 & 255] << 16 | i[o >>> 8 & 255] << 8 | i[255 & o]) : (o = o << 8 | o >>> 24, o = i[o >>> 24] << 24 | i[o >>> 16 & 255] << 16 | i[o >>> 8 & 255] << 8 | i[255 & o], o ^= O[s / n | 0] << 24), r[s] = r[s - n] ^ o;\n }\n }for (t = this._invKeySchedule = [], n = 0; n < e; n++) {\n s = e - n, o = n % 4 ? r[s] : r[s - 4], t[n] = 4 > n || 4 >= s ? o : l[i[o >>> 24]] ^ h[i[o >>> 16 & 255]] ^ f[i[o >>> 8 & 255]] ^ p[i[255 & o]];\n }\n }, encryptBlock: function encryptBlock(e, t) {\n this._doCryptBlock(e, t, this._keySchedule, o, a, u, c, i);\n }, decryptBlock: function decryptBlock(e, t) {\n var n = e[t + 1];e[t + 1] = e[t + 3], e[t + 3] = n, this._doCryptBlock(e, t, this._invKeySchedule, l, h, f, p, s), n = e[t + 1], e[t + 1] = e[t + 3], e[t + 3] = n;\n }, _doCryptBlock: function _doCryptBlock(e, t, n, r, i, s, o, a) {\n for (var u = this._nRounds, c = e[t] ^ n[0], l = e[t + 1] ^ n[1], h = e[t + 2] ^ n[2], f = e[t + 3] ^ n[3], p = 4, d = 1; d < u; d++) {\n var y = r[c >>> 24] ^ i[l >>> 16 & 255] ^ s[h >>> 8 & 255] ^ o[255 & f] ^ n[p++],\n g = r[l >>> 24] ^ i[h >>> 16 & 255] ^ s[f >>> 8 & 255] ^ o[255 & c] ^ n[p++],\n b = r[h >>> 24] ^ i[f >>> 16 & 255] ^ s[c >>> 8 & 255] ^ o[255 & l] ^ n[p++],\n f = r[f >>> 24] ^ i[c >>> 16 & 255] ^ s[l >>> 8 & 255] ^ o[255 & h] ^ n[p++],\n c = y,\n l = g,\n h = b;\n }y = (a[c >>> 24] << 24 | a[l >>> 16 & 255] << 16 | a[h >>> 8 & 255] << 8 | a[255 & f]) ^ n[p++], g = (a[l >>> 24] << 24 | a[h >>> 16 & 255] << 16 | a[f >>> 8 & 255] << 8 | a[255 & c]) ^ n[p++], b = (a[h >>> 24] << 24 | a[f >>> 16 & 255] << 16 | a[c >>> 8 & 255] << 8 | a[255 & l]) ^ n[p++], f = (a[f >>> 24] << 24 | a[c >>> 16 & 255] << 16 | a[l >>> 8 & 255] << 8 | a[255 & h]) ^ n[p++], e[t] = y, e[t + 1] = g, e[t + 2] = b, e[t + 3] = f;\n }, keySize: 8 });e.AES = t._createHelper(r);\n }(), n.mode.ECB = function () {\n var e = n.lib.BlockCipherMode.extend();return e.Encryptor = e.extend({ processBlock: function processBlock(e, t) {\n this._cipher.encryptBlock(e, t);\n } }), e.Decryptor = e.extend({ processBlock: function processBlock(e, t) {\n this._cipher.decryptBlock(e, t);\n } }), e;\n }(), e.exports = n;\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var s = function () {\n function e(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }return function (t, n, r) {\n return n && e(t.prototype, n), r && e(t, r), t;\n };\n }(),\n o = n(6),\n a = (r(o), n(2)),\n u = (r(a), n(9)),\n c = (r(u), n(11)),\n l = r(c),\n h = n(14),\n f = r(h),\n p = n(15),\n d = r(p),\n y = (n(5), n(10)),\n g = r(y),\n b = function () {\n function e(t) {\n var n = t.subscribeEndpoint,\n r = t.leaveEndpoint,\n s = t.heartbeatEndpoint,\n o = t.setStateEndpoint,\n a = t.timeEndpoint,\n u = t.config,\n c = t.crypto,\n h = t.listenerManager;i(this, e), this._listenerManager = h, this._config = u, this._leaveEndpoint = r, this._heartbeatEndpoint = s, this._setStateEndpoint = o, this._subscribeEndpoint = n, this._crypto = c, this._channels = {}, this._presenceChannels = {}, this._heartbeatChannels = {}, this._heartbeatChannelGroups = {}, this._channelGroups = {}, this._presenceChannelGroups = {}, this._pendingChannelSubscriptions = [], this._pendingChannelGroupSubscriptions = [], this._currentTimetoken = 0, this._lastTimetoken = 0, this._storedTimetoken = null, this._subscriptionStatusAnnounced = !1, this._isOnline = !0, this._reconnectionManager = new l.default({ timeEndpoint: a }), this._dedupingManager = new f.default({ config: u });\n }return s(e, [{ key: \"adaptStateChange\", value: function value(e, t) {\n var n = this,\n r = e.state,\n i = e.channels,\n s = void 0 === i ? [] : i,\n o = e.channelGroups,\n a = void 0 === o ? [] : o;return s.forEach(function (e) {\n e in n._channels && (n._channels[e].state = r);\n }), a.forEach(function (e) {\n e in n._channelGroups && (n._channelGroups[e].state = r);\n }), this._setStateEndpoint({ state: r, channels: s, channelGroups: a }, t);\n } }, { key: \"adaptPresenceChange\", value: function value(e) {\n var t = this,\n n = e.connected,\n r = e.channels,\n i = void 0 === r ? [] : r,\n s = e.channelGroups,\n o = void 0 === s ? [] : s;n ? (i.forEach(function (e) {\n t._heartbeatChannels[e] = { state: {} };\n }), o.forEach(function (e) {\n t._heartbeatChannelGroups[e] = { state: {} };\n })) : (i.forEach(function (e) {\n e in t._heartbeatChannels && delete t._heartbeatChannels[e];\n }), o.forEach(function (e) {\n e in t._heartbeatChannelGroups && delete t._heartbeatChannelGroups[e];\n }), !1 === this._config.suppressLeaveEvents && this._leaveEndpoint({ channels: i, channelGroups: o }, function (e) {\n t._listenerManager.announceStatus(e);\n })), this.reconnect();\n } }, { key: \"adaptSubscribeChange\", value: function value(e) {\n var t = this,\n n = e.timetoken,\n r = e.channels,\n i = void 0 === r ? [] : r,\n s = e.channelGroups,\n o = void 0 === s ? [] : s,\n a = e.withPresence,\n u = void 0 !== a && a;if (!this._config.subscribeKey || \"\" === this._config.subscribeKey) return void (console && console.log && console.log(\"subscribe key missing; aborting subscribe\"));n && (this._lastTimetoken = this._currentTimetoken, this._currentTimetoken = n), \"0\" !== this._currentTimetoken && (this._storedTimetoken = this._currentTimetoken, this._currentTimetoken = 0), i.forEach(function (e) {\n t._channels[e] = { state: {} }, u && (t._presenceChannels[e] = {}), t._pendingChannelSubscriptions.push(e);\n }), o.forEach(function (e) {\n t._channelGroups[e] = { state: {} }, u && (t._presenceChannelGroups[e] = {}), t._pendingChannelGroupSubscriptions.push(e);\n }), this._subscriptionStatusAnnounced = !1, this.reconnect();\n } }, { key: \"adaptUnsubscribeChange\", value: function value(e, t) {\n var n = this,\n r = e.channels,\n i = void 0 === r ? [] : r,\n s = e.channelGroups,\n o = void 0 === s ? [] : s,\n a = [],\n u = [];i.forEach(function (e) {\n e in n._channels && (delete n._channels[e], a.push(e)), e in n._presenceChannels && (delete n._presenceChannels[e], a.push(e));\n }), o.forEach(function (e) {\n e in n._channelGroups && (delete n._channelGroups[e], u.push(e)), e in n._presenceChannelGroups && (delete n._channelGroups[e], u.push(e));\n }), 0 === a.length && 0 === u.length || (!1 !== this._config.suppressLeaveEvents || t || this._leaveEndpoint({ channels: a, channelGroups: u }, function (e) {\n e.affectedChannels = a, e.affectedChannelGroups = u, e.currentTimetoken = n._currentTimetoken, e.lastTimetoken = n._lastTimetoken, n._listenerManager.announceStatus(e);\n }), 0 === Object.keys(this._channels).length && 0 === Object.keys(this._presenceChannels).length && 0 === Object.keys(this._channelGroups).length && 0 === Object.keys(this._presenceChannelGroups).length && (this._lastTimetoken = 0, this._currentTimetoken = 0, this._storedTimetoken = null, this._region = null, this._reconnectionManager.stopPolling()), this.reconnect());\n } }, { key: \"unsubscribeAll\", value: function value(e) {\n this.adaptUnsubscribeChange({ channels: this.getSubscribedChannels(), channelGroups: this.getSubscribedChannelGroups() }, e);\n } }, { key: \"getHeartbeatChannels\", value: function value() {\n return Object.keys(this._heartbeatChannels);\n } }, { key: \"getHeartbeatChannelGroups\", value: function value() {\n return Object.keys(this._heartbeatChannelGroups);\n } }, { key: \"getSubscribedChannels\", value: function value() {\n return Object.keys(this._channels);\n } }, { key: \"getSubscribedChannelGroups\", value: function value() {\n return Object.keys(this._channelGroups);\n } }, { key: \"reconnect\", value: function value() {\n this._startSubscribeLoop(), this._registerHeartbeatTimer();\n } }, { key: \"disconnect\", value: function value() {\n this._stopSubscribeLoop(), this._stopHeartbeatTimer(), this._reconnectionManager.stopPolling();\n } }, { key: \"_registerHeartbeatTimer\", value: function value() {\n this._stopHeartbeatTimer(), 0 !== this._config.getHeartbeatInterval() && (this._performHeartbeatLoop(), this._heartbeatTimer = setInterval(this._performHeartbeatLoop.bind(this), 1e3 * this._config.getHeartbeatInterval()));\n } }, { key: \"_stopHeartbeatTimer\", value: function value() {\n this._heartbeatTimer && (clearInterval(this._heartbeatTimer), this._heartbeatTimer = null);\n } }, { key: \"_performHeartbeatLoop\", value: function value() {\n var e = this,\n t = [];t = t.concat(this.getHeartbeatChannels()), t = t.concat(this.getSubscribedChannels());var n = [];n = n.concat(this.getHeartbeatChannelGroups()), n = n.concat(this.getSubscribedChannelGroups());var r = {};if (0 !== t.length || 0 !== n.length) {\n this.getSubscribedChannels().forEach(function (t) {\n var n = e._channels[t].state;Object.keys(n).length && (r[t] = n);\n }), this.getSubscribedChannelGroups().forEach(function (t) {\n var n = e._channelGroups[t].state;Object.keys(n).length && (r[t] = n);\n });var i = function i(t) {\n t.error && e._config.announceFailedHeartbeats && e._listenerManager.announceStatus(t), t.error && e._config.autoNetworkDetection && e._isOnline && (e._isOnline = !1, e.disconnect(), e._listenerManager.announceNetworkDown(), e.reconnect()), !t.error && e._config.announceSuccessfulHeartbeats && e._listenerManager.announceStatus(t);\n };this._heartbeatEndpoint({ channels: t, channelGroups: n, state: r }, i.bind(this));\n }\n } }, { key: \"_startSubscribeLoop\", value: function value() {\n this._stopSubscribeLoop();var e = [],\n t = [];if (Object.keys(this._channels).forEach(function (t) {\n return e.push(t);\n }), Object.keys(this._presenceChannels).forEach(function (t) {\n return e.push(t + \"-pnpres\");\n }), Object.keys(this._channelGroups).forEach(function (e) {\n return t.push(e);\n }), Object.keys(this._presenceChannelGroups).forEach(function (e) {\n return t.push(e + \"-pnpres\");\n }), 0 !== e.length || 0 !== t.length) {\n var n = { channels: e, channelGroups: t, timetoken: this._currentTimetoken, filterExpression: this._config.filterExpression, region: this._region };this._subscribeCall = this._subscribeEndpoint(n, this._processSubscribeResponse.bind(this));\n }\n } }, { key: \"_processSubscribeResponse\", value: function value(e, t) {\n var n = this;if (e.error) return void (e.category === g.default.PNTimeoutCategory ? this._startSubscribeLoop() : e.category === g.default.PNNetworkIssuesCategory ? (this.disconnect(), e.error && this._config.autoNetworkDetection && this._isOnline && (this._isOnline = !1, this._listenerManager.announceNetworkDown()), this._reconnectionManager.onReconnection(function () {\n n._config.autoNetworkDetection && !n._isOnline && (n._isOnline = !0, n._listenerManager.announceNetworkUp()), n.reconnect(), n._subscriptionStatusAnnounced = !0;var t = { category: g.default.PNReconnectedCategory, operation: e.operation, lastTimetoken: n._lastTimetoken, currentTimetoken: n._currentTimetoken };n._listenerManager.announceStatus(t);\n }), this._reconnectionManager.startPolling(), this._listenerManager.announceStatus(e)) : e.category === g.default.PNBadRequestCategory ? (this._stopHeartbeatTimer(), this._listenerManager.announceStatus(e)) : this._listenerManager.announceStatus(e));if (this._storedTimetoken ? (this._currentTimetoken = this._storedTimetoken, this._storedTimetoken = null) : (this._lastTimetoken = this._currentTimetoken, this._currentTimetoken = t.metadata.timetoken), !this._subscriptionStatusAnnounced) {\n var r = {};r.category = g.default.PNConnectedCategory, r.operation = e.operation, r.affectedChannels = this._pendingChannelSubscriptions, r.subscribedChannels = this.getSubscribedChannels(), r.affectedChannelGroups = this._pendingChannelGroupSubscriptions, r.lastTimetoken = this._lastTimetoken, r.currentTimetoken = this._currentTimetoken, this._subscriptionStatusAnnounced = !0, this._listenerManager.announceStatus(r), this._pendingChannelSubscriptions = [], this._pendingChannelGroupSubscriptions = [];\n }var i = t.messages || [],\n s = this._config,\n o = s.requestMessageCountThreshold,\n a = s.dedupeOnSubscribe;if (o && i.length >= o) {\n var u = {};u.category = g.default.PNRequestMessageCountExceededCategory, u.operation = e.operation, this._listenerManager.announceStatus(u);\n }i.forEach(function (e) {\n var t = e.channel,\n r = e.subscriptionMatch,\n i = e.publishMetaData;if (t === r && (r = null), a) {\n if (n._dedupingManager.isDuplicate(e)) return;n._dedupingManager.addEntry(e);\n }if (d.default.endsWith(e.channel, \"-pnpres\")) {\n var s = {};s.channel = null, s.subscription = null, s.actualChannel = null != r ? t : null, s.subscribedChannel = null != r ? r : t, t && (s.channel = t.substring(0, t.lastIndexOf(\"-pnpres\"))), r && (s.subscription = r.substring(0, r.lastIndexOf(\"-pnpres\"))), s.action = e.payload.action, s.state = e.payload.data, s.timetoken = i.publishTimetoken, s.occupancy = e.payload.occupancy, s.uuid = e.payload.uuid, s.timestamp = e.payload.timestamp, e.payload.join && (s.join = e.payload.join), e.payload.leave && (s.leave = e.payload.leave), e.payload.timeout && (s.timeout = e.payload.timeout), n._listenerManager.announcePresence(s);\n } else {\n var o = {};o.channel = null, o.subscription = null, o.actualChannel = null != r ? t : null, o.subscribedChannel = null != r ? r : t, o.channel = t, o.subscription = r, o.timetoken = i.publishTimetoken, o.publisher = e.issuingClientId, e.userMetadata && (o.userMetadata = e.userMetadata), n._config.cipherKey ? o.message = n._crypto.decrypt(e.payload) : o.message = e.payload, n._listenerManager.announceMessage(o);\n }\n }), this._region = t.metadata.region, this._startSubscribeLoop();\n } }, { key: \"_stopSubscribeLoop\", value: function value() {\n this._subscribeCall && (\"function\" == typeof this._subscribeCall.abort && this._subscribeCall.abort(), this._subscribeCall = null);\n } }]), e;\n }();t.default = b, e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n function r(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var i = function () {\n function e(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }return function (t, n, r) {\n return n && e(t.prototype, n), r && e(t, r), t;\n };\n }(),\n s = (n(5), n(10)),\n o = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(s),\n a = function () {\n function e() {\n r(this, e), this._listeners = [];\n }return i(e, [{ key: \"addListener\", value: function value(e) {\n this._listeners.push(e);\n } }, { key: \"removeListener\", value: function value(e) {\n var t = [];this._listeners.forEach(function (n) {\n n !== e && t.push(n);\n }), this._listeners = t;\n } }, { key: \"removeAllListeners\", value: function value() {\n this._listeners = [];\n } }, { key: \"announcePresence\", value: function value(e) {\n this._listeners.forEach(function (t) {\n t.presence && t.presence(e);\n });\n } }, { key: \"announceStatus\", value: function value(e) {\n this._listeners.forEach(function (t) {\n t.status && t.status(e);\n });\n } }, { key: \"announceMessage\", value: function value(e) {\n this._listeners.forEach(function (t) {\n t.message && t.message(e);\n });\n } }, { key: \"announceNetworkUp\", value: function value() {\n var e = {};e.category = o.default.PNNetworkUpCategory, this.announceStatus(e);\n } }, { key: \"announceNetworkDown\", value: function value() {\n var e = {};e.category = o.default.PNNetworkDownCategory, this.announceStatus(e);\n } }]), e;\n }();t.default = a, e.exports = t.default;\n }, function (e, t) {\n \"use strict\";\n Object.defineProperty(t, \"__esModule\", { value: !0 }), t.default = { PNNetworkUpCategory: \"PNNetworkUpCategory\", PNNetworkDownCategory: \"PNNetworkDownCategory\", PNNetworkIssuesCategory: \"PNNetworkIssuesCategory\", PNTimeoutCategory: \"PNTimeoutCategory\", PNBadRequestCategory: \"PNBadRequestCategory\", PNAccessDeniedCategory: \"PNAccessDeniedCategory\", PNUnknownCategory: \"PNUnknownCategory\", PNReconnectedCategory: \"PNReconnectedCategory\", PNConnectedCategory: \"PNConnectedCategory\", PNRequestMessageCountExceededCategory: \"PNRequestMessageCountExceededCategory\" }, e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n function r(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var i = function () {\n function e(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }return function (t, n, r) {\n return n && e(t.prototype, n), r && e(t, r), t;\n };\n }(),\n s = n(12),\n o = (function (e) {\n e && e.__esModule;\n }(s), n(5), function () {\n function e(t) {\n var n = t.timeEndpoint;r(this, e), this._timeEndpoint = n;\n }return i(e, [{ key: \"onReconnection\", value: function value(e) {\n this._reconnectionCallback = e;\n } }, { key: \"startPolling\", value: function value() {\n this._timeTimer = setInterval(this._performTimeLoop.bind(this), 3e3);\n } }, { key: \"stopPolling\", value: function value() {\n clearInterval(this._timeTimer);\n } }, { key: \"_performTimeLoop\", value: function value() {\n var e = this;this._timeEndpoint(function (t) {\n t.error || (clearInterval(e._timeTimer), e._reconnectionCallback());\n });\n } }]), e;\n }());t.default = o, e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNTimeOperation;\n }function i() {\n return \"/time/0\";\n }function s(e) {\n return e.config.getTransactionTimeout();\n }function o() {\n return {};\n }function a() {\n return !1;\n }function u(e, t) {\n return { timetoken: t[0] };\n }function c() {}Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.getURL = i, t.getRequestTimeout = s, t.prepareParams = o, t.isAuthSupported = a, t.handleResponse = u, t.validateParams = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(l);\n }, function (e, t) {\n \"use strict\";\n Object.defineProperty(t, \"__esModule\", { value: !0 }), t.default = { PNTimeOperation: \"PNTimeOperation\", PNHistoryOperation: \"PNHistoryOperation\", PNDeleteMessagesOperation: \"PNDeleteMessagesOperation\", PNFetchMessagesOperation: \"PNFetchMessagesOperation\", PNSubscribeOperation: \"PNSubscribeOperation\", PNUnsubscribeOperation: \"PNUnsubscribeOperation\", PNPublishOperation: \"PNPublishOperation\", PNPushNotificationEnabledChannelsOperation: \"PNPushNotificationEnabledChannelsOperation\", PNRemoveAllPushNotificationsOperation: \"PNRemoveAllPushNotificationsOperation\", PNWhereNowOperation: \"PNWhereNowOperation\", PNSetStateOperation: \"PNSetStateOperation\", PNHereNowOperation: \"PNHereNowOperation\", PNGetStateOperation: \"PNGetStateOperation\", PNHeartbeatOperation: \"PNHeartbeatOperation\", PNChannelGroupsOperation: \"PNChannelGroupsOperation\", PNRemoveGroupOperation: \"PNRemoveGroupOperation\", PNChannelsForGroupOperation: \"PNChannelsForGroupOperation\", PNAddChannelsToGroupOperation: \"PNAddChannelsToGroupOperation\", PNRemoveChannelsFromGroupOperation: \"PNRemoveChannelsFromGroupOperation\", PNAccessManagerGrant: \"PNAccessManagerGrant\", PNAccessManagerAudit: \"PNAccessManagerAudit\" }, e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n function r(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var i = function () {\n function e(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }return function (t, n, r) {\n return n && e(t.prototype, n), r && e(t, r), t;\n };\n }(),\n s = n(2),\n o = (function (e) {\n e && e.__esModule;\n }(s), n(5), function (e) {\n var t = 0;if (0 === e.length) return t;for (var n = 0; n < e.length; n += 1) {\n t = (t << 5) - t + e.charCodeAt(n), t &= t;\n }return t;\n }),\n a = function () {\n function e(t) {\n var n = t.config;r(this, e), this.hashHistory = [], this._config = n;\n }return i(e, [{ key: \"getKey\", value: function value(e) {\n var t = o(JSON.stringify(e.payload)).toString();return e.publishMetaData.publishTimetoken + \"-\" + t;\n } }, { key: \"isDuplicate\", value: function value(e) {\n return this.hashHistory.includes(this.getKey(e));\n } }, { key: \"addEntry\", value: function value(e) {\n this.hashHistory.length >= this._config.maximumCacheSize && this.hashHistory.shift(), this.hashHistory.push(this.getKey(e));\n } }, { key: \"clearHistory\", value: function value() {\n this.hashHistory = [];\n } }]), e;\n }();t.default = a, e.exports = t.default;\n }, function (e, t) {\n \"use strict\";\n function n(e) {\n var t = [];return Object.keys(e).forEach(function (e) {\n return t.push(e);\n }), t;\n }function r(e) {\n return encodeURIComponent(e).replace(/[!~*'()]/g, function (e) {\n return \"%\" + e.charCodeAt(0).toString(16).toUpperCase();\n });\n }function i(e) {\n return n(e).sort();\n }function s(e) {\n return i(e).map(function (t) {\n return t + \"=\" + r(e[t]);\n }).join(\"&\");\n }function o(e, t) {\n return -1 !== e.indexOf(t, this.length - t.length);\n }function a() {\n var e = void 0,\n t = void 0;return { promise: new Promise(function (n, r) {\n e = n, t = r;\n }), reject: t, fulfill: e };\n }e.exports = { signPamFromParams: s, endsWith: o, createPromise: a, encodeString: r };\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }function s(e, t) {\n if (!e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return !t || \"object\" != (typeof t === \"undefined\" ? \"undefined\" : _typeof(t)) && \"function\" != typeof t ? e : t;\n }function o(e, t) {\n if (\"function\" != typeof t && null !== t) throw new TypeError(\"Super expression must either be null or a function, not \" + (typeof t === \"undefined\" ? \"undefined\" : _typeof(t)));e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);\n }function a(e, t) {\n return e.type = t, e.error = !0, e;\n }function u(e) {\n return a({ message: e }, \"validationError\");\n }function c(e, t, n) {\n return e.usePost && e.usePost(t, n) ? e.postURL(t, n) : e.getURL(t, n);\n }function l(e) {\n if (e.sdkName) return e.sdkName;var t = \"PubNub-JS-\" + e.sdkFamily;return e.partnerId && (t += \"-\" + e.partnerId), t += \"/\" + e.getVersion();\n }function h(e, t, n) {\n var r = e.config,\n i = e.crypto;n.timestamp = Math.floor(new Date().getTime() / 1e3);var s = r.subscribeKey + \"\\n\" + r.publishKey + \"\\n\" + t + \"\\n\";s += y.default.signPamFromParams(n);var o = i.HMACSHA256(s);o = o.replace(/\\+/g, \"-\"), o = o.replace(/\\//g, \"_\"), n.signature = o;\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.default = function (e, t) {\n var n = e.networking,\n r = e.config,\n i = null,\n s = null,\n o = {};t.getOperation() === v.default.PNTimeOperation || t.getOperation() === v.default.PNChannelGroupsOperation ? i = arguments.length <= 2 ? void 0 : arguments[2] : (o = arguments.length <= 2 ? void 0 : arguments[2], i = arguments.length <= 3 ? void 0 : arguments[3]), \"undefined\" == typeof Promise || i || (s = y.default.createPromise());var a = t.validateParams(e, o);if (!a) {\n var f = t.prepareParams(e, o),\n d = c(t, e, o),\n g = void 0,\n b = { url: d, operation: t.getOperation(), timeout: t.getRequestTimeout(e) };f.uuid = r.UUID, f.pnsdk = l(r), r.useInstanceId && (f.instanceid = r.instanceId), r.useRequestId && (f.requestid = p.default.createUUID()), t.isAuthSupported() && r.getAuthKey() && (f.auth = r.getAuthKey()), r.secretKey && h(e, d, f);var m = function m(n, r) {\n if (n.error) return void (i ? i(n) : s && s.reject(new _(\"PubNub call failed, check status for details\", n)));var a = t.handleResponse(e, r, o);i ? i(n, a) : s && s.fulfill(a);\n };if (t.usePost && t.usePost(e, o)) {\n var k = t.postPayload(e, o);g = n.POST(f, k, b, m);\n } else g = t.useDelete && t.useDelete() ? n.DELETE(f, b, m) : n.GET(f, b, m);return t.getOperation() === v.default.PNSubscribeOperation ? g : s ? s.promise : void 0;\n }return i ? i(u(a)) : s ? (s.reject(new _(\"Validation failed, check status for details\", u(a))), s.promise) : void 0;\n };var f = n(3),\n p = r(f),\n d = (n(5), n(15)),\n y = r(d),\n g = n(2),\n b = (r(g), n(13)),\n v = r(b),\n _ = function (e) {\n function t(e, n) {\n i(this, t);var r = s(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, e));return r.name = r.constructor.name, r.status = n, r.message = e, r;\n }return o(t, e), t;\n }(Error);e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNAddChannelsToGroupOperation;\n }function s(e, t) {\n var n = t.channels,\n r = t.channelGroup,\n i = e.config;return r ? n && 0 !== n.length ? i.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing Channels\" : \"Missing Channel Group\";\n }function o(e, t) {\n var n = t.channelGroup;return \"/v1/channel-registration/sub-key/\" + e.config.subscribeKey + \"/channel-group/\" + d.default.encodeString(n);\n }function a(e) {\n return e.config.getTransactionTimeout();\n }function u() {\n return !0;\n }function c(e, t) {\n var n = t.channels;return { add: (void 0 === n ? [] : n).join(\",\") };\n }function l() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.getRequestTimeout = a, t.isAuthSupported = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNRemoveChannelsFromGroupOperation;\n }function s(e, t) {\n var n = t.channels,\n r = t.channelGroup,\n i = e.config;return r ? n && 0 !== n.length ? i.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing Channels\" : \"Missing Channel Group\";\n }function o(e, t) {\n var n = t.channelGroup;return \"/v1/channel-registration/sub-key/\" + e.config.subscribeKey + \"/channel-group/\" + d.default.encodeString(n);\n }function a(e) {\n return e.config.getTransactionTimeout();\n }function u() {\n return !0;\n }function c(e, t) {\n var n = t.channels;return { remove: (void 0 === n ? [] : n).join(\",\") };\n }function l() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.getRequestTimeout = a, t.isAuthSupported = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNRemoveGroupOperation;\n }function s(e, t) {\n var n = t.channelGroup,\n r = e.config;return n ? r.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing Channel Group\";\n }function o(e, t) {\n var n = t.channelGroup;return \"/v1/channel-registration/sub-key/\" + e.config.subscribeKey + \"/channel-group/\" + d.default.encodeString(n) + \"/remove\";\n }function a() {\n return !0;\n }function u(e) {\n return e.config.getTransactionTimeout();\n }function c() {\n return {};\n }function l() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.isAuthSupported = a, t.getRequestTimeout = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNChannelGroupsOperation;\n }function i(e) {\n if (!e.config.subscribeKey) return \"Missing Subscribe Key\";\n }function s(e) {\n return \"/v1/channel-registration/sub-key/\" + e.config.subscribeKey + \"/channel-group\";\n }function o(e) {\n return e.config.getTransactionTimeout();\n }function a() {\n return !0;\n }function u() {\n return {};\n }function c(e, t) {\n return { groups: t.payload.groups };\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.validateParams = i, t.getURL = s, t.getRequestTimeout = o, t.isAuthSupported = a, t.prepareParams = u, t.handleResponse = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(l);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNChannelsForGroupOperation;\n }function s(e, t) {\n var n = t.channelGroup,\n r = e.config;return n ? r.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing Channel Group\";\n }function o(e, t) {\n var n = t.channelGroup;return \"/v1/channel-registration/sub-key/\" + e.config.subscribeKey + \"/channel-group/\" + d.default.encodeString(n);\n }function a(e) {\n return e.config.getTransactionTimeout();\n }function u() {\n return !0;\n }function c() {\n return {};\n }function l(e, t) {\n return { channels: t.payload.channels };\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.getRequestTimeout = a, t.isAuthSupported = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNPushNotificationEnabledChannelsOperation;\n }function i(e, t) {\n var n = t.device,\n r = t.pushGateway,\n i = t.channels,\n s = e.config;return n ? r ? i && 0 !== i.length ? s.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing Channels\" : \"Missing GW Type (pushGateway: gcm or apns)\" : \"Missing Device ID (device)\";\n }function s(e, t) {\n var n = t.device;return \"/v1/push/sub-key/\" + e.config.subscribeKey + \"/devices/\" + n;\n }function o(e) {\n return e.config.getTransactionTimeout();\n }function a() {\n return !0;\n }function u(e, t) {\n var n = t.pushGateway,\n r = t.channels;return { type: n, add: (void 0 === r ? [] : r).join(\",\") };\n }function c() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.validateParams = i, t.getURL = s, t.getRequestTimeout = o, t.isAuthSupported = a, t.prepareParams = u, t.handleResponse = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(l);\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNPushNotificationEnabledChannelsOperation;\n }function i(e, t) {\n var n = t.device,\n r = t.pushGateway,\n i = t.channels,\n s = e.config;return n ? r ? i && 0 !== i.length ? s.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing Channels\" : \"Missing GW Type (pushGateway: gcm or apns)\" : \"Missing Device ID (device)\";\n }function s(e, t) {\n var n = t.device;return \"/v1/push/sub-key/\" + e.config.subscribeKey + \"/devices/\" + n;\n }function o(e) {\n return e.config.getTransactionTimeout();\n }function a() {\n return !0;\n }function u(e, t) {\n var n = t.pushGateway,\n r = t.channels;return { type: n, remove: (void 0 === r ? [] : r).join(\",\") };\n }function c() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.validateParams = i, t.getURL = s, t.getRequestTimeout = o, t.isAuthSupported = a, t.prepareParams = u, t.handleResponse = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(l);\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNPushNotificationEnabledChannelsOperation;\n }function i(e, t) {\n var n = t.device,\n r = t.pushGateway,\n i = e.config;return n ? r ? i.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing GW Type (pushGateway: gcm or apns)\" : \"Missing Device ID (device)\";\n }function s(e, t) {\n var n = t.device;return \"/v1/push/sub-key/\" + e.config.subscribeKey + \"/devices/\" + n;\n }function o(e) {\n return e.config.getTransactionTimeout();\n }function a() {\n return !0;\n }function u(e, t) {\n return { type: t.pushGateway };\n }function c(e, t) {\n return { channels: t };\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.validateParams = i, t.getURL = s, t.getRequestTimeout = o, t.isAuthSupported = a, t.prepareParams = u, t.handleResponse = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(l);\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNRemoveAllPushNotificationsOperation;\n }function i(e, t) {\n var n = t.device,\n r = t.pushGateway,\n i = e.config;return n ? r ? i.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing GW Type (pushGateway: gcm or apns)\" : \"Missing Device ID (device)\";\n }function s(e, t) {\n var n = t.device;return \"/v1/push/sub-key/\" + e.config.subscribeKey + \"/devices/\" + n + \"/remove\";\n }function o(e) {\n return e.config.getTransactionTimeout();\n }function a() {\n return !0;\n }function u(e, t) {\n return { type: t.pushGateway };\n }function c() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.validateParams = i, t.getURL = s, t.getRequestTimeout = o, t.isAuthSupported = a, t.prepareParams = u, t.handleResponse = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(l);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNUnsubscribeOperation;\n }function s(e) {\n if (!e.config.subscribeKey) return \"Missing Subscribe Key\";\n }function o(e, t) {\n var n = e.config,\n r = t.channels,\n i = void 0 === r ? [] : r,\n s = i.length > 0 ? i.join(\",\") : \",\";return \"/v2/presence/sub-key/\" + n.subscribeKey + \"/channel/\" + d.default.encodeString(s) + \"/leave\";\n }function a(e) {\n return e.config.getTransactionTimeout();\n }function u() {\n return !0;\n }function c(e, t) {\n var n = t.channelGroups,\n r = void 0 === n ? [] : n,\n i = {};return r.length > 0 && (i[\"channel-group\"] = r.join(\",\")), i;\n }function l() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.getRequestTimeout = a, t.isAuthSupported = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNWhereNowOperation;\n }function i(e) {\n if (!e.config.subscribeKey) return \"Missing Subscribe Key\";\n }function s(e, t) {\n var n = e.config,\n r = t.uuid,\n i = void 0 === r ? n.UUID : r;return \"/v2/presence/sub-key/\" + n.subscribeKey + \"/uuid/\" + i;\n }function o(e) {\n return e.config.getTransactionTimeout();\n }function a() {\n return !0;\n }function u() {\n return {};\n }function c(e, t) {\n return t.payload ? { channels: t.payload.channels } : { channels: [] };\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.validateParams = i, t.getURL = s, t.getRequestTimeout = o, t.isAuthSupported = a, t.prepareParams = u, t.handleResponse = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(l);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNHeartbeatOperation;\n }function s(e) {\n if (!e.config.subscribeKey) return \"Missing Subscribe Key\";\n }function o(e, t) {\n var n = e.config,\n r = t.channels,\n i = void 0 === r ? [] : r,\n s = i.length > 0 ? i.join(\",\") : \",\";return \"/v2/presence/sub-key/\" + n.subscribeKey + \"/channel/\" + d.default.encodeString(s) + \"/heartbeat\";\n }function a() {\n return !0;\n }function u(e) {\n return e.config.getTransactionTimeout();\n }function c(e, t) {\n var n = t.channelGroups,\n r = void 0 === n ? [] : n,\n i = t.state,\n s = void 0 === i ? {} : i,\n o = e.config,\n a = {};return r.length > 0 && (a[\"channel-group\"] = r.join(\",\")), a.state = JSON.stringify(s), a.heartbeat = o.getPresenceTimeout(), a;\n }function l() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.isAuthSupported = a, t.getRequestTimeout = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNGetStateOperation;\n }function s(e) {\n if (!e.config.subscribeKey) return \"Missing Subscribe Key\";\n }function o(e, t) {\n var n = e.config,\n r = t.uuid,\n i = void 0 === r ? n.UUID : r,\n s = t.channels,\n o = void 0 === s ? [] : s,\n a = o.length > 0 ? o.join(\",\") : \",\";return \"/v2/presence/sub-key/\" + n.subscribeKey + \"/channel/\" + d.default.encodeString(a) + \"/uuid/\" + i;\n }function a(e) {\n return e.config.getTransactionTimeout();\n }function u() {\n return !0;\n }function c(e, t) {\n var n = t.channelGroups,\n r = void 0 === n ? [] : n,\n i = {};return r.length > 0 && (i[\"channel-group\"] = r.join(\",\")), i;\n }function l(e, t, n) {\n var r = n.channels,\n i = void 0 === r ? [] : r,\n s = n.channelGroups,\n o = void 0 === s ? [] : s,\n a = {};return 1 === i.length && 0 === o.length ? a[i[0]] = t.payload : a = t.payload, { channels: a };\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.getRequestTimeout = a, t.isAuthSupported = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNSetStateOperation;\n }function s(e, t) {\n var n = e.config,\n r = t.state,\n i = t.channels,\n s = void 0 === i ? [] : i,\n o = t.channelGroups,\n a = void 0 === o ? [] : o;return r ? n.subscribeKey ? 0 === s.length && 0 === a.length ? \"Please provide a list of channels and/or channel-groups\" : void 0 : \"Missing Subscribe Key\" : \"Missing State\";\n }function o(e, t) {\n var n = e.config,\n r = t.channels,\n i = void 0 === r ? [] : r,\n s = i.length > 0 ? i.join(\",\") : \",\";return \"/v2/presence/sub-key/\" + n.subscribeKey + \"/channel/\" + d.default.encodeString(s) + \"/uuid/\" + n.UUID + \"/data\";\n }function a(e) {\n return e.config.getTransactionTimeout();\n }function u() {\n return !0;\n }function c(e, t) {\n var n = t.state,\n r = t.channelGroups,\n i = void 0 === r ? [] : r,\n s = {};return s.state = JSON.stringify(n), i.length > 0 && (s[\"channel-group\"] = i.join(\",\")), s;\n }function l(e, t) {\n return { state: t.payload };\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.getRequestTimeout = a, t.isAuthSupported = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNHereNowOperation;\n }function s(e) {\n if (!e.config.subscribeKey) return \"Missing Subscribe Key\";\n }function o(e, t) {\n var n = e.config,\n r = t.channels,\n i = void 0 === r ? [] : r,\n s = t.channelGroups,\n o = void 0 === s ? [] : s,\n a = \"/v2/presence/sub-key/\" + n.subscribeKey;if (i.length > 0 || o.length > 0) {\n var u = i.length > 0 ? i.join(\",\") : \",\";a += \"/channel/\" + d.default.encodeString(u);\n }return a;\n }function a(e) {\n return e.config.getTransactionTimeout();\n }function u() {\n return !0;\n }function c(e, t) {\n var n = t.channelGroups,\n r = void 0 === n ? [] : n,\n i = t.includeUUIDs,\n s = void 0 === i || i,\n o = t.includeState,\n a = void 0 !== o && o,\n u = {};return s || (u.disable_uuids = 1), a && (u.state = 1), r.length > 0 && (u[\"channel-group\"] = r.join(\",\")), u;\n }function l(e, t, n) {\n var r = n.channels,\n i = void 0 === r ? [] : r,\n s = n.channelGroups,\n o = void 0 === s ? [] : s,\n a = n.includeUUIDs,\n u = void 0 === a || a,\n c = n.includeState,\n l = void 0 !== c && c;return i.length > 1 || o.length > 0 || 0 === o.length && 0 === i.length ? function () {\n var e = {};return e.totalChannels = t.payload.total_channels, e.totalOccupancy = t.payload.total_occupancy, e.channels = {}, Object.keys(t.payload.channels).forEach(function (n) {\n var r = t.payload.channels[n],\n i = [];return e.channels[n] = { occupants: i, name: n, occupancy: r.occupancy }, u && r.uuids.forEach(function (e) {\n l ? i.push({ state: e.state, uuid: e.uuid }) : i.push({ state: null, uuid: e });\n }), e;\n }), e;\n }() : function () {\n var e = {},\n n = [];return e.totalChannels = 1, e.totalOccupancy = t.occupancy, e.channels = {}, e.channels[i[0]] = { occupants: n, name: i[0], occupancy: t.occupancy }, u && t.uuids && t.uuids.forEach(function (e) {\n l ? n.push({ state: e.state, uuid: e.uuid }) : n.push({ state: null, uuid: e });\n }), e;\n }();\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.getRequestTimeout = a, t.isAuthSupported = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNAccessManagerAudit;\n }function i(e) {\n if (!e.config.subscribeKey) return \"Missing Subscribe Key\";\n }function s(e) {\n return \"/v2/auth/audit/sub-key/\" + e.config.subscribeKey;\n }function o(e) {\n return e.config.getTransactionTimeout();\n }function a() {\n return !1;\n }function u(e, t) {\n var n = t.channel,\n r = t.channelGroup,\n i = t.authKeys,\n s = void 0 === i ? [] : i,\n o = {};return n && (o.channel = n), r && (o[\"channel-group\"] = r), s.length > 0 && (o.auth = s.join(\",\")), o;\n }function c(e, t) {\n return t.payload;\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.validateParams = i, t.getURL = s, t.getRequestTimeout = o, t.isAuthSupported = a, t.prepareParams = u, t.handleResponse = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(l);\n }, function (e, t, n) {\n \"use strict\";\n function r() {\n return h.default.PNAccessManagerGrant;\n }function i(e) {\n var t = e.config;return t.subscribeKey ? t.publishKey ? t.secretKey ? void 0 : \"Missing Secret Key\" : \"Missing Publish Key\" : \"Missing Subscribe Key\";\n }function s(e) {\n return \"/v2/auth/grant/sub-key/\" + e.config.subscribeKey;\n }function o(e) {\n return e.config.getTransactionTimeout();\n }function a() {\n return !1;\n }function u(e, t) {\n var n = t.channels,\n r = void 0 === n ? [] : n,\n i = t.channelGroups,\n s = void 0 === i ? [] : i,\n o = t.ttl,\n a = t.read,\n u = void 0 !== a && a,\n c = t.write,\n l = void 0 !== c && c,\n h = t.manage,\n f = void 0 !== h && h,\n p = t.authKeys,\n d = void 0 === p ? [] : p,\n y = {};return y.r = u ? \"1\" : \"0\", y.w = l ? \"1\" : \"0\", y.m = f ? \"1\" : \"0\", r.length > 0 && (y.channel = r.join(\",\")), s.length > 0 && (y[\"channel-group\"] = s.join(\",\")), d.length > 0 && (y.auth = d.join(\",\")), (o || 0 === o) && (y.ttl = o), y;\n }function c() {\n return {};\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = r, t.validateParams = i, t.getURL = s, t.getRequestTimeout = o, t.isAuthSupported = a, t.prepareParams = u, t.handleResponse = c;var l = (n(5), n(13)),\n h = function (e) {\n return e && e.__esModule ? e : {\n default: e };\n }(l);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i(e, t) {\n var n = e.crypto,\n r = e.config,\n i = JSON.stringify(t);return r.cipherKey && (i = n.encrypt(i), i = JSON.stringify(i)), i;\n }function s() {\n return b.default.PNPublishOperation;\n }function o(e, t) {\n var n = e.config,\n r = t.message;return t.channel ? r ? n.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing Message\" : \"Missing Channel\";\n }function a(e, t) {\n var n = t.sendByPost;return void 0 !== n && n;\n }function u(e, t) {\n var n = e.config,\n r = t.channel,\n s = t.message,\n o = i(e, s);return \"/publish/\" + n.publishKey + \"/\" + n.subscribeKey + \"/0/\" + _.default.encodeString(r) + \"/0/\" + _.default.encodeString(o);\n }function c(e, t) {\n var n = e.config,\n r = t.channel;return \"/publish/\" + n.publishKey + \"/\" + n.subscribeKey + \"/0/\" + _.default.encodeString(r) + \"/0\";\n }function l(e) {\n return e.config.getTransactionTimeout();\n }function h() {\n return !0;\n }function f(e, t) {\n return i(e, t.message);\n }function p(e, t) {\n var n = t.meta,\n r = t.replicate,\n i = void 0 === r || r,\n s = t.storeInHistory,\n o = t.ttl,\n a = {};return null != s && (a.store = s ? \"1\" : \"0\"), o && (a.ttl = o), !1 === i && (a.norep = \"true\"), n && \"object\" === (void 0 === n ? \"undefined\" : y(n)) && (a.meta = JSON.stringify(n)), a;\n }function d(e, t) {\n return { timetoken: t[2] };\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var y = \"function\" == typeof Symbol && \"symbol\" == _typeof(Symbol.iterator) ? function (e) {\n return typeof e === \"undefined\" ? \"undefined\" : _typeof(e);\n } : function (e) {\n return e && \"function\" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? \"symbol\" : typeof e === \"undefined\" ? \"undefined\" : _typeof(e);\n };t.getOperation = s, t.validateParams = o, t.usePost = a, t.getURL = u, t.postURL = c, t.getRequestTimeout = l, t.isAuthSupported = h, t.postPayload = f, t.prepareParams = p, t.handleResponse = d;var g = (n(5), n(13)),\n b = r(g),\n v = n(15),\n _ = r(v);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i(e, t) {\n var n = e.config,\n r = e.crypto;if (!n.cipherKey) return t;try {\n return r.decrypt(t);\n } catch (e) {\n return t;\n }\n }function s() {\n return p.default.PNHistoryOperation;\n }function o(e, t) {\n var n = t.channel,\n r = e.config;return n ? r.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing channel\";\n }function a(e, t) {\n var n = t.channel;return \"/v2/history/sub-key/\" + e.config.subscribeKey + \"/channel/\" + y.default.encodeString(n);\n }function u(e) {\n return e.config.getTransactionTimeout();\n }function c() {\n return !0;\n }function l(e, t) {\n var n = t.start,\n r = t.end,\n i = t.reverse,\n s = t.count,\n o = void 0 === s ? 100 : s,\n a = t.stringifiedTimeToken,\n u = void 0 !== a && a,\n c = { include_token: \"true\" };return c.count = o, n && (c.start = n), r && (c.end = r), u && (c.string_message_token = \"true\"), null != i && (c.reverse = i.toString()), c;\n }function h(e, t) {\n var n = { messages: [], startTimeToken: t[1], endTimeToken: t[2] };return t[0].forEach(function (t) {\n var r = { timetoken: t.timetoken, entry: i(e, t.message) };n.messages.push(r);\n }), n;\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = s, t.validateParams = o, t.getURL = a, t.getRequestTimeout = u, t.isAuthSupported = c, t.prepareParams = l, t.handleResponse = h;var f = (n(5), n(13)),\n p = r(f),\n d = n(15),\n y = r(d);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return p.default.PNDeleteMessagesOperation;\n }function s(e, t) {\n var n = t.channel,\n r = e.config;return n ? r.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing channel\";\n }function o() {\n return !0;\n }function a(e, t) {\n var n = t.channel;return \"/v3/history/sub-key/\" + e.config.subscribeKey + \"/channel/\" + y.default.encodeString(n);\n }function u(e) {\n return e.config.getTransactionTimeout();\n }function c() {\n return !0;\n }function l(e, t) {\n var n = t.start,\n r = t.end,\n i = {};return n && (i.start = n), r && (i.end = r), i;\n }function h(e, t) {\n return t.payload;\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.useDelete = o, t.getURL = a, t.getRequestTimeout = u, t.isAuthSupported = c, t.prepareParams = l, t.handleResponse = h;var f = (n(5), n(13)),\n p = r(f),\n d = n(15),\n y = r(d);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i(e, t) {\n var n = e.config,\n r = e.crypto;if (!n.cipherKey) return t;try {\n return r.decrypt(t);\n } catch (e) {\n return t;\n }\n }function s() {\n return p.default.PNFetchMessagesOperation;\n }function o(e, t) {\n var n = t.channels,\n r = e.config;return n && 0 !== n.length ? r.subscribeKey ? void 0 : \"Missing Subscribe Key\" : \"Missing channels\";\n }function a(e, t) {\n var n = t.channels,\n r = void 0 === n ? [] : n,\n i = e.config,\n s = r.length > 0 ? r.join(\",\") : \",\";return \"/v3/history/sub-key/\" + i.subscribeKey + \"/channel/\" + y.default.encodeString(s);\n }function u(e) {\n return e.config.getTransactionTimeout();\n }function c() {\n return !0;\n }function l(e, t) {\n var n = t.start,\n r = t.end,\n i = t.count,\n s = {};return i && (s.max = i), n && (s.start = n), r && (s.end = r), s;\n }function h(e, t) {\n var n = { channels: {} };return Object.keys(t.channels || {}).forEach(function (r) {\n n.channels[r] = [], (t.channels[r] || []).forEach(function (t) {\n var s = {};s.channel = r, s.subscription = null, s.timetoken = t.timetoken, s.message = i(e, t.message), n.channels[r].push(s);\n });\n }), n;\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = s, t.validateParams = o, t.getURL = a, t.getRequestTimeout = u, t.isAuthSupported = c, t.prepareParams = l, t.handleResponse = h;var f = (n(5), n(13)),\n p = r(f),\n d = n(15),\n y = r(d);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i() {\n return f.default.PNSubscribeOperation;\n }function s(e) {\n if (!e.config.subscribeKey) return \"Missing Subscribe Key\";\n }function o(e, t) {\n var n = e.config,\n r = t.channels,\n i = void 0 === r ? [] : r,\n s = i.length > 0 ? i.join(\",\") : \",\";return \"/v2/subscribe/\" + n.subscribeKey + \"/\" + d.default.encodeString(s) + \"/0\";\n }function a(e) {\n return e.config.getSubscribeTimeout();\n }function u() {\n return !0;\n }function c(e, t) {\n var n = e.config,\n r = t.channelGroups,\n i = void 0 === r ? [] : r,\n s = t.timetoken,\n o = t.filterExpression,\n a = t.region,\n u = { heartbeat: n.getPresenceTimeout() };return i.length > 0 && (u[\"channel-group\"] = i.join(\",\")), o && o.length > 0 && (u[\"filter-expr\"] = o), s && (u.tt = s), a && (u.tr = a), u;\n }function l(e, t) {\n var n = [];t.m.forEach(function (e) {\n var t = { publishTimetoken: e.p.t, region: e.p.r },\n r = { shard: parseInt(e.a, 10), subscriptionMatch: e.b, channel: e.c, payload: e.d, flags: e.f, issuingClientId: e.i, subscribeKey: e.k, originationTimetoken: e.o, userMetadata: e.u, publishMetaData: t };n.push(r);\n });var r = { timetoken: t.t.t, region: t.t.r };return { messages: n, metadata: r };\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.getOperation = i, t.validateParams = s, t.getURL = o, t.getRequestTimeout = a, t.isAuthSupported = u, t.prepareParams = c, t.handleResponse = l;var h = (n(5), n(13)),\n f = r(h),\n p = n(15),\n d = r(p);\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n return e && e.__esModule ? e : { default: e };\n }function i(e, t) {\n if (!(e instanceof t)) throw new TypeError(\"Cannot call a class as a function\");\n }Object.defineProperty(t, \"__esModule\", { value: !0 });var s = function () {\n function e(e, t) {\n for (var n = 0; n < t.length; n++) {\n var r = t[n];r.enumerable = r.enumerable || !1, r.configurable = !0, \"value\" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);\n }\n }return function (t, n, r) {\n return n && e(t.prototype, n), r && e(t, r), t;\n };\n }(),\n o = n(2),\n a = (r(o), n(10)),\n u = r(a),\n c = (n(5), function () {\n function e(t) {\n var n = this;i(this, e), this._modules = {}, Object.keys(t).forEach(function (e) {\n n._modules[e] = t[e].bind(n);\n });\n }return s(e, [{ key: \"init\", value: function value(e) {\n this._config = e, this._maxSubDomain = 20, this._currentSubDomain = Math.floor(Math.random() * this._maxSubDomain), this._providedFQDN = (this._config.secure ? \"https://\" : \"http://\") + this._config.origin, this._coreParams = {}, this.shiftStandardOrigin();\n } }, { key: \"nextOrigin\", value: function value() {\n if (-1 === this._providedFQDN.indexOf(\"pubsub.\")) return this._providedFQDN;var e = void 0;return this._currentSubDomain = this._currentSubDomain + 1, this._currentSubDomain >= this._maxSubDomain && (this._currentSubDomain = 1), e = this._currentSubDomain.toString(), this._providedFQDN.replace(\"pubsub\", \"ps\" + e);\n } }, { key: \"hasModule\", value: function value(e) {\n return e in this._modules;\n } }, { key: \"shiftStandardOrigin\", value: function value() {\n var e = arguments.length > 0 && void 0 !== arguments[0] && arguments[0];return this._standardOrigin = this.nextOrigin(e), this._standardOrigin;\n } }, { key: \"getStandardOrigin\", value: function value() {\n return this._standardOrigin;\n } }, { key: \"POST\", value: function value(e, t, n, r) {\n return this._modules.post(e, t, n, r);\n } }, { key: \"GET\", value: function value(e, t, n) {\n return this._modules.get(e, t, n);\n } }, { key: \"DELETE\", value: function value(e, t, n) {\n return this._modules.del(e, t, n);\n } }, { key: \"_detectErrorCategory\", value: function value(e) {\n if (\"ENOTFOUND\" === e.code) return u.default.PNNetworkIssuesCategory;if (\"ECONNREFUSED\" === e.code) return u.default.PNNetworkIssuesCategory;if (\"ECONNRESET\" === e.code) return u.default.PNNetworkIssuesCategory;if (\"EAI_AGAIN\" === e.code) return u.default.PNNetworkIssuesCategory;if (0 === e.status || e.hasOwnProperty(\"status\") && void 0 === e.status) return u.default.PNNetworkIssuesCategory;if (e.timeout) return u.default.PNTimeoutCategory;if (e.response) {\n if (e.response.badRequest) return u.default.PNBadRequestCategory;if (e.response.forbidden) return u.default.PNAccessDeniedCategory;\n }return u.default.PNUnknownCategory;\n } }]), e;\n }());t.default = c, e.exports = t.default;\n }, function (e, t) {\n \"use strict\";\n Object.defineProperty(t, \"__esModule\", { value: !0 }), t.default = { get: function get(e) {\n try {\n return localStorage.getItem(e);\n } catch (e) {\n return null;\n }\n }, set: function set(e, t) {\n try {\n return localStorage.setItem(e, t);\n } catch (e) {\n return null;\n }\n } }, e.exports = t.default;\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n var t = new Date().getTime(),\n n = new Date().toISOString(),\n r = function () {\n return console && console.log ? console : window && window.console && window.console.log ? window.console : console;\n }();r.log(\"<<<<<\"), r.log(\"[\" + n + \"]\", \"\\n\", e.url, \"\\n\", e.qs), r.log(\"-----\"), e.on(\"response\", function (n) {\n var i = new Date().getTime(),\n s = i - t,\n o = new Date().toISOString();r.log(\">>>>>>\"), r.log(\"[\" + o + \" / \" + s + \"]\", \"\\n\", e.url, \"\\n\", e.qs, \"\\n\", n.text), r.log(\"-----\");\n });\n }function i(e, t, n) {\n var i = this;return this._config.logVerbosity && (e = e.use(r)), this._config.proxy && this._modules.proxy && (e = this._modules.proxy.call(this, e)), this._config.keepAlive && this._modules.keepAlive && (e = this._modules.keepAlive(e)), e.timeout(t.timeout).end(function (e, r) {\n var s = {};if (s.error = null !== e, s.operation = t.operation, r && r.status && (s.statusCode = r.status), e) return s.errorData = e, s.category = i._detectErrorCategory(e), n(s, null);var o = JSON.parse(r.text);return o.error && 1 === o.error && o.status && o.message && o.service ? (s.errorData = o, s.statusCode = o.status, s.error = !0, s.category = i._detectErrorCategory(s), n(s, null)) : n(s, o);\n });\n }function s(e, t, n) {\n var r = c.default.get(this.getStandardOrigin() + t.url).query(e);return i.call(this, r, t, n);\n }function o(e, t, n, r) {\n var s = c.default.post(this.getStandardOrigin() + n.url).query(e).send(t);return i.call(this, s, n, r);\n }function a(e, t, n) {\n var r = c.default.delete(this.getStandardOrigin() + t.url).query(e);return i.call(this, r, t, n);\n }Object.defineProperty(t, \"__esModule\", { value: !0 }), t.get = s, t.post = o, t.del = a;var u = n(42),\n c = function (e) {\n return e && e.__esModule ? e : { default: e };\n }(u);n(5);\n }, function (e, t, n) {\n function r() {}function i(e) {\n if (!y(e)) return e;var t = [];for (var n in e) {\n s(t, n, e[n]);\n }return t.join(\"&\");\n }function s(e, t, n) {\n if (null != n) {\n if (Array.isArray(n)) n.forEach(function (n) {\n s(e, t, n);\n });else if (y(n)) for (var r in n) {\n s(e, t + \"[\" + r + \"]\", n[r]);\n } else e.push(encodeURIComponent(t) + \"=\" + encodeURIComponent(n));\n } else null === n && e.push(encodeURIComponent(t));\n }function o(e) {\n for (var t, n, r = {}, i = e.split(\"&\"), s = 0, o = i.length; s < o; ++s) {\n t = i[s], n = t.indexOf(\"=\"), -1 == n ? r[decodeURIComponent(t)] = \"\" : r[decodeURIComponent(t.slice(0, n))] = decodeURIComponent(t.slice(n + 1));\n }return r;\n }function a(e) {\n for (var t, n, r, i, s = e.split(/\\r?\\n/), o = {}, a = 0, u = s.length; a < u; ++a) {\n n = s[a], -1 !== (t = n.indexOf(\":\")) && (r = n.slice(0, t).toLowerCase(), i = _(n.slice(t + 1)), o[r] = i);\n }return o;\n }function u(e) {\n return (/[\\/+]json($|[^-\\w])/.test(e)\n );\n }function c(e) {\n this.req = e, this.xhr = this.req.xhr, this.text = \"HEAD\" != this.req.method && (\"\" === this.xhr.responseType || \"text\" === this.xhr.responseType) || void 0 === this.xhr.responseType ? this.xhr.responseText : null, this.statusText = this.req.xhr.statusText;var t = this.xhr.status;1223 === t && (t = 204), this._setStatusProperties(t), this.header = this.headers = a(this.xhr.getAllResponseHeaders()), this.header[\"content-type\"] = this.xhr.getResponseHeader(\"content-type\"), this._setHeaderProperties(this.header), null === this.text && e._responseType ? this.body = this.xhr.response : this.body = \"HEAD\" != this.req.method ? this._parseBody(this.text ? this.text : this.xhr.response) : null;\n }function l(e, t) {\n var n = this;this._query = this._query || [], this.method = e, this.url = t, this.header = {}, this._header = {}, this.on(\"end\", function () {\n var e = null,\n t = null;try {\n t = new c(n);\n } catch (t) {\n return e = new Error(\"Parser is unable to parse the response\"), e.parse = !0, e.original = t, n.xhr ? (e.rawResponse = void 0 === n.xhr.responseType ? n.xhr.responseText : n.xhr.response, e.status = n.xhr.status ? n.xhr.status : null, e.statusCode = e.status) : (e.rawResponse = null, e.status = null), n.callback(e);\n }n.emit(\"response\", t);var r;try {\n n._isResponseOK(t) || (r = new Error(t.statusText || \"Unsuccessful HTTP response\"));\n } catch (e) {\n r = e;\n }r ? (r.original = e, r.response = t, r.status = t.status, n.callback(r, t)) : n.callback(null, t);\n });\n }function h(e, t, n) {\n var r = v(\"DELETE\", e);return \"function\" == typeof t && (n = t, t = null), t && r.send(t), n && r.end(n), r;\n }var f;\"undefined\" != typeof window ? f = window : \"undefined\" != typeof self ? f = self : (console.warn(\"Using browser-only version of superagent in non-browser environment\"), f = this);var p = n(43),\n d = n(44),\n y = n(45),\n g = n(46),\n b = n(48),\n v = t = e.exports = function (e, n) {\n return \"function\" == typeof n ? new t.Request(\"GET\", e).end(n) : 1 == arguments.length ? new t.Request(\"GET\", e) : new t.Request(e, n);\n };t.Request = l, v.getXHR = function () {\n if (!(!f.XMLHttpRequest || f.location && \"file:\" == f.location.protocol && f.ActiveXObject)) return new XMLHttpRequest();try {\n return new ActiveXObject(\"Microsoft.XMLHTTP\");\n } catch (e) {}try {\n return new ActiveXObject(\"Msxml2.XMLHTTP.6.0\");\n } catch (e) {}try {\n return new ActiveXObject(\"Msxml2.XMLHTTP.3.0\");\n } catch (e) {}try {\n return new ActiveXObject(\"Msxml2.XMLHTTP\");\n } catch (e) {}throw Error(\"Browser-only version of superagent could not find XHR\");\n };var _ = \"\".trim ? function (e) {\n return e.trim();\n } : function (e) {\n return e.replace(/(^\\s*|\\s*$)/g, \"\");\n };v.serializeObject = i, v.parseString = o, v.types = { html: \"text/html\", json: \"application/json\", xml: \"text/xml\", urlencoded: \"application/x-www-form-urlencoded\", form: \"application/x-www-form-urlencoded\", \"form-data\": \"application/x-www-form-urlencoded\" }, v.serialize = { \"application/x-www-form-urlencoded\": i, \"application/json\": JSON.stringify }, v.parse = { \"application/x-www-form-urlencoded\": o, \"application/json\": JSON.parse }, g(c.prototype), c.prototype._parseBody = function (e) {\n var t = v.parse[this.type];return this.req._parser ? this.req._parser(this, e) : (!t && u(this.type) && (t = v.parse[\"application/json\"]), t && e && (e.length || e instanceof Object) ? t(e) : null);\n }, c.prototype.toError = function () {\n var e = this.req,\n t = e.method,\n n = e.url,\n r = \"cannot \" + t + \" \" + n + \" (\" + this.status + \")\",\n i = new Error(r);return i.status = this.status, i.method = t, i.url = n, i;\n }, v.Response = c, p(l.prototype), d(l.prototype), l.prototype.type = function (e) {\n return this.set(\"Content-Type\", v.types[e] || e), this;\n }, l.prototype.accept = function (e) {\n return this.set(\"Accept\", v.types[e] || e), this;\n }, l.prototype.auth = function (e, t, n) {\n 1 === arguments.length && (t = \"\"), \"object\" == (typeof t === \"undefined\" ? \"undefined\" : _typeof(t)) && null !== t && (n = t, t = \"\"), n || (n = { type: \"function\" == typeof btoa ? \"basic\" : \"auto\" });var r = function r(e) {\n if (\"function\" == typeof btoa) return btoa(e);throw new Error(\"Cannot use basic auth, btoa is not a function\");\n };return this._auth(e, t, n, r);\n }, l.prototype.query = function (e) {\n return \"string\" != typeof e && (e = i(e)), e && this._query.push(e), this;\n }, l.prototype.attach = function (e, t, n) {\n if (t) {\n if (this._data) throw Error(\"superagent can't mix .send() and .attach()\");this._getFormData().append(e, t, n || t.name);\n }return this;\n }, l.prototype._getFormData = function () {\n return this._formData || (this._formData = new f.FormData()), this._formData;\n }, l.prototype.callback = function (e, t) {\n if (this._shouldRetry(e, t)) return this._retry();var n = this._callback;this.clearTimeout(), e && (this._maxRetries && (e.retries = this._retries - 1), this.emit(\"error\", e)), n(e, t);\n }, l.prototype.crossDomainError = function () {\n var e = new Error(\"Request has been terminated\\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.\");e.crossDomain = !0, e.status = this.status, e.method = this.method, e.url = this.url, this.callback(e);\n }, l.prototype.buffer = l.prototype.ca = l.prototype.agent = function () {\n return console.warn(\"This is not supported in browser version of superagent\"), this;\n }, l.prototype.pipe = l.prototype.write = function () {\n throw Error(\"Streaming is not supported in browser version of superagent\");\n }, l.prototype._isHost = function (e) {\n return e && \"object\" == (typeof e === \"undefined\" ? \"undefined\" : _typeof(e)) && !Array.isArray(e) && \"[object Object]\" !== Object.prototype.toString.call(e);\n }, l.prototype.end = function (e) {\n return this._endCalled && console.warn(\"Warning: .end() was called twice. This is not supported in superagent\"), this._endCalled = !0, this._callback = e || r, this._finalizeQueryString(), this._end();\n }, l.prototype._end = function () {\n var e = this,\n t = this.xhr = v.getXHR(),\n n = this._formData || this._data;this._setTimeouts(), t.onreadystatechange = function () {\n var n = t.readyState;if (n >= 2 && e._responseTimeoutTimer && clearTimeout(e._responseTimeoutTimer), 4 == n) {\n var r;try {\n r = t.status;\n } catch (e) {\n r = 0;\n }if (!r) {\n if (e.timedout || e._aborted) return;return e.crossDomainError();\n }e.emit(\"end\");\n }\n };var r = function r(t, n) {\n n.total > 0 && (n.percent = n.loaded / n.total * 100), n.direction = t, e.emit(\"progress\", n);\n };if (this.hasListeners(\"progress\")) try {\n t.onprogress = r.bind(null, \"download\"), t.upload && (t.upload.onprogress = r.bind(null, \"upload\"));\n } catch (e) {}try {\n this.username && this.password ? t.open(this.method, this.url, !0, this.username, this.password) : t.open(this.method, this.url, !0);\n } catch (e) {\n return this.callback(e);\n }if (this._withCredentials && (t.withCredentials = !0), !this._formData && \"GET\" != this.method && \"HEAD\" != this.method && \"string\" != typeof n && !this._isHost(n)) {\n var i = this._header[\"content-type\"],\n s = this._serializer || v.serialize[i ? i.split(\";\")[0] : \"\"];!s && u(i) && (s = v.serialize[\"application/json\"]), s && (n = s(n));\n }for (var o in this.header) {\n null != this.header[o] && this.header.hasOwnProperty(o) && t.setRequestHeader(o, this.header[o]);\n }return this._responseType && (t.responseType = this._responseType), this.emit(\"request\", this), t.send(void 0 !== n ? n : null), this;\n }, v.agent = function () {\n return new b();\n }, [\"GET\", \"POST\", \"OPTIONS\", \"PATCH\", \"PUT\", \"DELETE\"].forEach(function (e) {\n b.prototype[e.toLowerCase()] = function (t, n) {\n var r = new v.Request(e, t);return this._setDefaults(r), n && r.end(n), r;\n };\n }), b.prototype.del = b.prototype.delete, v.get = function (e, t, n) {\n var r = v(\"GET\", e);return \"function\" == typeof t && (n = t, t = null), t && r.query(t), n && r.end(n), r;\n }, v.head = function (e, t, n) {\n var r = v(\"HEAD\", e);return \"function\" == typeof t && (n = t, t = null), t && r.query(t), n && r.end(n), r;\n }, v.options = function (e, t, n) {\n var r = v(\"OPTIONS\", e);return \"function\" == typeof t && (n = t, t = null), t && r.send(t), n && r.end(n), r;\n }, v.del = h, v.delete = h, v.patch = function (e, t, n) {\n var r = v(\"PATCH\", e);return \"function\" == typeof t && (n = t, t = null), t && r.send(t), n && r.end(n), r;\n }, v.post = function (e, t, n) {\n var r = v(\"POST\", e);return \"function\" == typeof t && (n = t, t = null), t && r.send(t), n && r.end(n), r;\n }, v.put = function (e, t, n) {\n var r = v(\"PUT\", e);return \"function\" == typeof t && (n = t, t = null), t && r.send(t), n && r.end(n), r;\n };\n }, function (e, t, n) {\n function r(e) {\n if (e) return i(e);\n }function i(e) {\n for (var t in r.prototype) {\n e[t] = r.prototype[t];\n }return e;\n }e.exports = r, r.prototype.on = r.prototype.addEventListener = function (e, t) {\n return this._callbacks = this._callbacks || {}, (this._callbacks[\"$\" + e] = this._callbacks[\"$\" + e] || []).push(t), this;\n }, r.prototype.once = function (e, t) {\n function n() {\n this.off(e, n), t.apply(this, arguments);\n }return n.fn = t, this.on(e, n), this;\n }, r.prototype.off = r.prototype.removeListener = r.prototype.removeAllListeners = r.prototype.removeEventListener = function (e, t) {\n if (this._callbacks = this._callbacks || {}, 0 == arguments.length) return this._callbacks = {}, this;var n = this._callbacks[\"$\" + e];if (!n) return this;if (1 == arguments.length) return delete this._callbacks[\"$\" + e], this;for (var r, i = 0; i < n.length; i++) {\n if ((r = n[i]) === t || r.fn === t) {\n n.splice(i, 1);break;\n }\n }return this;\n }, r.prototype.emit = function (e) {\n this._callbacks = this._callbacks || {};var t = [].slice.call(arguments, 1),\n n = this._callbacks[\"$\" + e];if (n) {\n n = n.slice(0);for (var r = 0, i = n.length; r < i; ++r) {\n n[r].apply(this, t);\n }\n }return this;\n }, r.prototype.listeners = function (e) {\n return this._callbacks = this._callbacks || {}, this._callbacks[\"$\" + e] || [];\n }, r.prototype.hasListeners = function (e) {\n return !!this.listeners(e).length;\n };\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n if (e) return i(e);\n }function i(e) {\n for (var t in r.prototype) {\n e[t] = r.prototype[t];\n }return e;\n }var s = n(45);e.exports = r, r.prototype.clearTimeout = function () {\n return clearTimeout(this._timer), clearTimeout(this._responseTimeoutTimer), delete this._timer, delete this._responseTimeoutTimer, this;\n }, r.prototype.parse = function (e) {\n return this._parser = e, this;\n }, r.prototype.responseType = function (e) {\n return this._responseType = e, this;\n }, r.prototype.serialize = function (e) {\n return this._serializer = e, this;\n }, r.prototype.timeout = function (e) {\n if (!e || \"object\" != (typeof e === \"undefined\" ? \"undefined\" : _typeof(e))) return this._timeout = e, this._responseTimeout = 0, this;for (var t in e) {\n switch (t) {case \"deadline\":\n this._timeout = e.deadline;break;case \"response\":\n this._responseTimeout = e.response;break;default:\n console.warn(\"Unknown timeout option\", t);}\n }return this;\n }, r.prototype.retry = function (e, t) {\n return 0 !== arguments.length && !0 !== e || (e = 1), e <= 0 && (e = 0), this._maxRetries = e, this._retries = 0, this._retryCallback = t, this;\n };var o = [\"ECONNRESET\", \"ETIMEDOUT\", \"EADDRINFO\", \"ESOCKETTIMEDOUT\"];r.prototype._shouldRetry = function (e, t) {\n if (!this._maxRetries || this._retries++ >= this._maxRetries) return !1;if (this._retryCallback) try {\n var n = this._retryCallback(e, t);if (!0 === n) return !0;if (!1 === n) return !1;\n } catch (e) {\n console.error(e);\n }if (t && t.status && t.status >= 500 && 501 != t.status) return !0;if (e) {\n if (e.code && ~o.indexOf(e.code)) return !0;if (e.timeout && \"ECONNABORTED\" == e.code) return !0;if (e.crossDomain) return !0;\n }return !1;\n }, r.prototype._retry = function () {\n return this.clearTimeout(), this.req && (this.req = null, this.req = this.request()), this._aborted = !1, this.timedout = !1, this._end();\n }, r.prototype.then = function (e, t) {\n if (!this._fullfilledPromise) {\n var n = this;this._endCalled && console.warn(\"Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises\"), this._fullfilledPromise = new Promise(function (e, t) {\n n.end(function (n, r) {\n n ? t(n) : e(r);\n });\n });\n }return this._fullfilledPromise.then(e, t);\n }, r.prototype.catch = function (e) {\n return this.then(void 0, e);\n }, r.prototype.use = function (e) {\n return e(this), this;\n }, r.prototype.ok = function (e) {\n if (\"function\" != typeof e) throw Error(\"Callback required\");return this._okCallback = e, this;\n }, r.prototype._isResponseOK = function (e) {\n return !!e && (this._okCallback ? this._okCallback(e) : e.status >= 200 && e.status < 300);\n }, r.prototype.get = function (e) {\n return this._header[e.toLowerCase()];\n }, r.prototype.getHeader = r.prototype.get, r.prototype.set = function (e, t) {\n if (s(e)) {\n for (var n in e) {\n this.set(n, e[n]);\n }return this;\n }return this._header[e.toLowerCase()] = t, this.header[e] = t, this;\n }, r.prototype.unset = function (e) {\n return delete this._header[e.toLowerCase()], delete this.header[e], this;\n }, r.prototype.field = function (e, t) {\n if (null === e || void 0 === e) throw new Error(\".field(name, val) name can not be empty\");if (this._data && console.error(\".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()\"), s(e)) {\n for (var n in e) {\n this.field(n, e[n]);\n }return this;\n }if (Array.isArray(t)) {\n for (var r in t) {\n this.field(e, t[r]);\n }return this;\n }if (null === t || void 0 === t) throw new Error(\".field(name, val) val can not be empty\");return \"boolean\" == typeof t && (t = \"\" + t), this._getFormData().append(e, t), this;\n }, r.prototype.abort = function () {\n return this._aborted ? this : (this._aborted = !0, this.xhr && this.xhr.abort(), this.req && this.req.abort(), this.clearTimeout(), this.emit(\"abort\"), this);\n }, r.prototype._auth = function (e, t, n, r) {\n switch (n.type) {case \"basic\":\n this.set(\"Authorization\", \"Basic \" + r(e + \":\" + t));break;case \"auto\":\n this.username = e, this.password = t;break;case \"bearer\":\n this.set(\"Authorization\", \"Bearer \" + e);}return this;\n }, r.prototype.withCredentials = function (e) {\n return void 0 == e && (e = !0), this._withCredentials = e, this;\n }, r.prototype.redirects = function (e) {\n return this._maxRedirects = e, this;\n }, r.prototype.maxResponseSize = function (e) {\n if (\"number\" != typeof e) throw TypeError(\"Invalid argument\");return this._maxResponseSize = e, this;\n }, r.prototype.toJSON = function () {\n return { method: this.method, url: this.url, data: this._data, headers: this._header };\n }, r.prototype.send = function (e) {\n var t = s(e),\n n = this._header[\"content-type\"];if (this._formData && console.error(\".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()\"), t && !this._data) Array.isArray(e) ? this._data = [] : this._isHost(e) || (this._data = {});else if (e && this._data && this._isHost(this._data)) throw Error(\"Can't merge these send calls\");if (t && s(this._data)) for (var r in e) {\n this._data[r] = e[r];\n } else \"string\" == typeof e ? (n || this.type(\"form\"), n = this._header[\"content-type\"], this._data = \"application/x-www-form-urlencoded\" == n ? this._data ? this._data + \"&\" + e : e : (this._data || \"\") + e) : this._data = e;return !t || this._isHost(e) ? this : (n || this.type(\"json\"), this);\n }, r.prototype.sortQuery = function (e) {\n return this._sort = void 0 === e || e, this;\n }, r.prototype._finalizeQueryString = function () {\n var e = this._query.join(\"&\");if (e && (this.url += (this.url.indexOf(\"?\") >= 0 ? \"&\" : \"?\") + e), this._query.length = 0, this._sort) {\n var t = this.url.indexOf(\"?\");if (t >= 0) {\n var n = this.url.substring(t + 1).split(\"&\");\"function\" == typeof this._sort ? n.sort(this._sort) : n.sort(), this.url = this.url.substring(0, t) + \"?\" + n.join(\"&\");\n }\n }\n }, r.prototype._appendQueryString = function () {\n console.trace(\"Unsupported\");\n }, r.prototype._timeoutError = function (e, t, n) {\n if (!this._aborted) {\n var r = new Error(e + t + \"ms exceeded\");r.timeout = t, r.code = \"ECONNABORTED\", r.errno = n, this.timedout = !0, this.abort(), this.callback(r);\n }\n }, r.prototype._setTimeouts = function () {\n var e = this;this._timeout && !this._timer && (this._timer = setTimeout(function () {\n e._timeoutError(\"Timeout of \", e._timeout, \"ETIME\");\n }, this._timeout)), this._responseTimeout && !this._responseTimeoutTimer && (this._responseTimeoutTimer = setTimeout(function () {\n e._timeoutError(\"Response timeout of \", e._responseTimeout, \"ETIMEDOUT\");\n }, this._responseTimeout));\n };\n }, function (e, t) {\n \"use strict\";\n function n(e) {\n return null !== e && \"object\" == (typeof e === \"undefined\" ? \"undefined\" : _typeof(e));\n }e.exports = n;\n }, function (e, t, n) {\n \"use strict\";\n function r(e) {\n if (e) return i(e);\n }function i(e) {\n for (var t in r.prototype) {\n e[t] = r.prototype[t];\n }return e;\n }var s = n(47);e.exports = r, r.prototype.get = function (e) {\n return this.header[e.toLowerCase()];\n }, r.prototype._setHeaderProperties = function (e) {\n var t = e[\"content-type\"] || \"\";this.type = s.type(t);var n = s.params(t);for (var r in n) {\n this[r] = n[r];\n }this.links = {};try {\n e.link && (this.links = s.parseLinks(e.link));\n } catch (e) {}\n }, r.prototype._setStatusProperties = function (e) {\n var t = e / 100 | 0;this.status = this.statusCode = e, this.statusType = t, this.info = 1 == t, this.ok = 2 == t, this.redirect = 3 == t, this.clientError = 4 == t, this.serverError = 5 == t, this.error = (4 == t || 5 == t) && this.toError(), this.accepted = 202 == e, this.noContent = 204 == e, this.badRequest = 400 == e, this.unauthorized = 401 == e, this.notAcceptable = 406 == e, this.forbidden = 403 == e, this.notFound = 404 == e;\n };\n }, function (e, t) {\n \"use strict\";\n t.type = function (e) {\n return e.split(/ *; */).shift();\n }, t.params = function (e) {\n return e.split(/ *; */).reduce(function (e, t) {\n var n = t.split(/ *= */),\n r = n.shift(),\n i = n.shift();return r && i && (e[r] = i), e;\n }, {});\n }, t.parseLinks = function (e) {\n return e.split(/ *, */).reduce(function (e, t) {\n var n = t.split(/ *; */),\n r = n[0].slice(1, -1);return e[n[1].split(/ *= */)[1].slice(1, -1)] = r, e;\n }, {});\n }, t.cleanHeader = function (e, t) {\n return delete e[\"content-type\"], delete e[\"content-length\"], delete e[\"transfer-encoding\"], delete e.host, t && (delete e.authorization, delete e.cookie), e;\n };\n }, function (e, t) {\n function n() {\n this._defaults = [];\n }[\"use\", \"on\", \"once\", \"set\", \"query\", \"type\", \"accept\", \"auth\", \"withCredentials\", \"sortQuery\", \"retry\", \"ok\", \"redirects\", \"timeout\", \"buffer\", \"serialize\", \"parse\", \"ca\", \"key\", \"pfx\", \"cert\"].forEach(function (e) {\n n.prototype[e] = function () {\n return this._defaults.push({ fn: e, arguments: arguments }), this;\n };\n }), n.prototype._setDefaults = function (e) {\n this._defaults.forEach(function (t) {\n e[t.fn].apply(e, t.arguments);\n });\n }, e.exports = n;\n }]);\n});\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(6)(module)))\n\n/***/ }),\n/* 54 */\n/***/ (function(module, exports) {\n\nmodule.exports = {\"author\":\"PubNub\",\"name\":\"chat-engine\",\"version\":\"0.9.5\",\"description\":\"ChatEngine\",\"main\":\"dist/chat-engine.js\",\"scripts\":{\"deploy\":\"gulp; npm publish;\",\"docs\":\"jsdoc src/index.js -c jsdoc.json\"},\"repository\":{\"type\":\"git\",\"url\":\"git+https://github.com/pubnub/chat-engine.git\"},\"keywords\":[\"pubnub\",\"chat\",\"sdk\",\"realtime\"],\"bugs\":{\"url\":\"https://github.com/pubnub/chat-engine/issues\"},\"homepage\":\"https://github.com/pubnub/chat-engine#readme\",\"devDependencies\":{\"babel-cli\":\"^6.26.0\",\"babel-preset-env\":\"^1.6.1\",\"body-parser\":\"^1.17.2\",\"chai\":\"^3.5.0\",\"chat-engine-typing-indicator\":\"0.0.x\",\"decache\":\"^4.3.0\",\"docdash\":\"^0.4.0\",\"es6-promise\":\"^4.1.1\",\"eslint\":\"^4.7.1\",\"eslint-config-airbnb\":\"^15.1.0\",\"eslint-plugin-import\":\"^2.7.0\",\"express\":\"^4.15.3\",\"gulp\":\"^3.9.1\",\"gulp-clean\":\"^0.3.2\",\"gulp-eslint\":\"^4.0.0\",\"gulp-istanbul\":\"^1.1.2\",\"gulp-jsdoc3\":\"^1.0.1\",\"gulp-mocha\":\"^3.0.1\",\"gulp-rename\":\"^1.2.2\",\"gulp-surge\":\"^0.1.0\",\"gulp-uglify\":\"^2.0.0\",\"gulp-uglify-es\":\"^0.1.3\",\"http-server\":\"^0.10.0\",\"isparta\":\"^4.0.0\",\"jsdoc\":\"^3.5.5\",\"mocha\":\"^3.1.2\",\"proxyquire\":\"^1.8.0\",\"pubnub-functions-mock\":\"^0.0.13\",\"request\":\"^2.82.0\",\"run-sequence\":\"^2.2.0\",\"sinon\":\"^4.0.0\",\"stats-webpack-plugin\":\"^0.6.1\",\"surge\":\"^0.19.0\",\"uglifyjs-webpack-plugin\":\"^1.0.1\",\"webpack\":\"^3.11.0\",\"webpack-stream\":\"^4.0.0\"},\"dependencies\":{\"async\":\"^2.1.2\",\"axios\":\"^0.16.2\",\"babel-core\":\"^6.26.0\",\"babel-loader\":\"^7.1.4\",\"babel-polyfill\":\"^6.26.0\",\"eventemitter2\":\"^2.2.1\",\"pubnub\":\"^4.20.1\"}}\n\n/***/ }),\n/* 55 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\nvar __WEBPACK_AMD_DEFINE_RESULT__;\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\n/*!\r\n * EventEmitter2\r\n * https://github.com/hij1nx/EventEmitter2\r\n *\r\n * Copyright (c) 2013 hij1nx\r\n * Licensed under the MIT license.\r\n */\n;!function (undefined) {\n\n var isArray = Array.isArray ? Array.isArray : function _isArray(obj) {\n return Object.prototype.toString.call(obj) === \"[object Array]\";\n };\n var defaultMaxListeners = 10;\n\n function init() {\n this._events = {};\n if (this._conf) {\n configure.call(this, this._conf);\n }\n }\n\n function configure(conf) {\n if (conf) {\n this._conf = conf;\n\n conf.delimiter && (this.delimiter = conf.delimiter);\n this._events.maxListeners = conf.maxListeners !== undefined ? conf.maxListeners : defaultMaxListeners;\n conf.wildcard && (this.wildcard = conf.wildcard);\n conf.newListener && (this.newListener = conf.newListener);\n conf.verboseMemoryLeak && (this.verboseMemoryLeak = conf.verboseMemoryLeak);\n\n if (this.wildcard) {\n this.listenerTree = {};\n }\n } else {\n this._events.maxListeners = defaultMaxListeners;\n }\n }\n\n function logPossibleMemoryLeak(count, eventName) {\n var errorMsg = '(node) warning: possible EventEmitter memory ' + 'leak detected. %d listeners added. ' + 'Use emitter.setMaxListeners() to increase limit.';\n\n if (this.verboseMemoryLeak) {\n errorMsg += ' Event name: %s.';\n console.error(errorMsg, count, eventName);\n } else {\n console.error(errorMsg, count);\n }\n\n if (console.trace) {\n console.trace();\n }\n }\n\n function EventEmitter(conf) {\n this._events = {};\n this.newListener = false;\n this.verboseMemoryLeak = false;\n configure.call(this, conf);\n }\n EventEmitter.EventEmitter2 = EventEmitter; // backwards compatibility for exporting EventEmitter property\n\n //\n // Attention, function return type now is array, always !\n // It has zero elements if no any matches found and one or more\n // elements (leafs) if there are matches\n //\n function searchListenerTree(handlers, type, tree, i) {\n if (!tree) {\n return [];\n }\n var listeners = [],\n leaf,\n len,\n branch,\n xTree,\n xxTree,\n isolatedBranch,\n endReached,\n typeLength = type.length,\n currentType = type[i],\n nextType = type[i + 1];\n if (i === typeLength && tree._listeners) {\n //\n // If at the end of the event(s) list and the tree has listeners\n // invoke those listeners.\n //\n if (typeof tree._listeners === 'function') {\n handlers && handlers.push(tree._listeners);\n return [tree];\n } else {\n for (leaf = 0, len = tree._listeners.length; leaf < len; leaf++) {\n handlers && handlers.push(tree._listeners[leaf]);\n }\n return [tree];\n }\n }\n\n if (currentType === '*' || currentType === '**' || tree[currentType]) {\n //\n // If the event emitted is '*' at this part\n // or there is a concrete match at this patch\n //\n if (currentType === '*') {\n for (branch in tree) {\n if (branch !== '_listeners' && tree.hasOwnProperty(branch)) {\n listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], i + 1));\n }\n }\n return listeners;\n } else if (currentType === '**') {\n endReached = i + 1 === typeLength || i + 2 === typeLength && nextType === '*';\n if (endReached && tree._listeners) {\n // The next element has a _listeners, add it to the handlers.\n listeners = listeners.concat(searchListenerTree(handlers, type, tree, typeLength));\n }\n\n for (branch in tree) {\n if (branch !== '_listeners' && tree.hasOwnProperty(branch)) {\n if (branch === '*' || branch === '**') {\n if (tree[branch]._listeners && !endReached) {\n listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], typeLength));\n }\n listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], i));\n } else if (branch === nextType) {\n listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], i + 2));\n } else {\n // No match on this one, shift into the tree but not in the type array.\n listeners = listeners.concat(searchListenerTree(handlers, type, tree[branch], i));\n }\n }\n }\n return listeners;\n }\n\n listeners = listeners.concat(searchListenerTree(handlers, type, tree[currentType], i + 1));\n }\n\n xTree = tree['*'];\n if (xTree) {\n //\n // If the listener tree will allow any match for this part,\n // then recursively explore all branches of the tree\n //\n searchListenerTree(handlers, type, xTree, i + 1);\n }\n\n xxTree = tree['**'];\n if (xxTree) {\n if (i < typeLength) {\n if (xxTree._listeners) {\n // If we have a listener on a '**', it will catch all, so add its handler.\n searchListenerTree(handlers, type, xxTree, typeLength);\n }\n\n // Build arrays of matching next branches and others.\n for (branch in xxTree) {\n if (branch !== '_listeners' && xxTree.hasOwnProperty(branch)) {\n if (branch === nextType) {\n // We know the next element will match, so jump twice.\n searchListenerTree(handlers, type, xxTree[branch], i + 2);\n } else if (branch === currentType) {\n // Current node matches, move into the tree.\n searchListenerTree(handlers, type, xxTree[branch], i + 1);\n } else {\n isolatedBranch = {};\n isolatedBranch[branch] = xxTree[branch];\n searchListenerTree(handlers, type, { '**': isolatedBranch }, i + 1);\n }\n }\n }\n } else if (xxTree._listeners) {\n // We have reached the end and still on a '**'\n searchListenerTree(handlers, type, xxTree, typeLength);\n } else if (xxTree['*'] && xxTree['*']._listeners) {\n searchListenerTree(handlers, type, xxTree['*'], typeLength);\n }\n }\n\n return listeners;\n }\n\n function growListenerTree(type, listener) {\n\n type = typeof type === 'string' ? type.split(this.delimiter) : type.slice();\n\n //\n // Looks for two consecutive '**', if so, don't add the event at all.\n //\n for (var i = 0, len = type.length; i + 1 < len; i++) {\n if (type[i] === '**' && type[i + 1] === '**') {\n return;\n }\n }\n\n var tree = this.listenerTree;\n var name = type.shift();\n\n while (name !== undefined) {\n\n if (!tree[name]) {\n tree[name] = {};\n }\n\n tree = tree[name];\n\n if (type.length === 0) {\n\n if (!tree._listeners) {\n tree._listeners = listener;\n } else {\n if (typeof tree._listeners === 'function') {\n tree._listeners = [tree._listeners];\n }\n\n tree._listeners.push(listener);\n\n if (!tree._listeners.warned && this._events.maxListeners > 0 && tree._listeners.length > this._events.maxListeners) {\n tree._listeners.warned = true;\n logPossibleMemoryLeak.call(this, tree._listeners.length, name);\n }\n }\n return true;\n }\n name = type.shift();\n }\n return true;\n }\n\n // By default EventEmitters will print a warning if more than\n // 10 listeners are added to it. This is a useful default which\n // helps finding memory leaks.\n //\n // Obviously not all Emitters should be limited to 10. This function allows\n // that to be increased. Set to zero for unlimited.\n\n EventEmitter.prototype.delimiter = '.';\n\n EventEmitter.prototype.setMaxListeners = function (n) {\n if (n !== undefined) {\n this._events || init.call(this);\n this._events.maxListeners = n;\n if (!this._conf) this._conf = {};\n this._conf.maxListeners = n;\n }\n };\n\n EventEmitter.prototype.event = '';\n\n EventEmitter.prototype.once = function (event, fn) {\n this.many(event, 1, fn);\n return this;\n };\n\n EventEmitter.prototype.many = function (event, ttl, fn) {\n var self = this;\n\n if (typeof fn !== 'function') {\n throw new Error('many only accepts instances of Function');\n }\n\n function listener() {\n if (--ttl === 0) {\n self.off(event, listener);\n }\n fn.apply(this, arguments);\n }\n\n listener._origin = fn;\n\n this.on(event, listener);\n\n return self;\n };\n\n EventEmitter.prototype.emit = function () {\n\n this._events || init.call(this);\n\n var type = arguments[0];\n\n if (type === 'newListener' && !this.newListener) {\n if (!this._events.newListener) {\n return false;\n }\n }\n\n var al = arguments.length;\n var args, l, i, j;\n var handler;\n\n if (this._all && this._all.length) {\n handler = this._all.slice();\n if (al > 3) {\n args = new Array(al);\n for (j = 0; j < al; j++) {\n args[j] = arguments[j];\n }\n }\n\n for (i = 0, l = handler.length; i < l; i++) {\n this.event = type;\n switch (al) {\n case 1:\n handler[i].call(this, type);\n break;\n case 2:\n handler[i].call(this, type, arguments[1]);\n break;\n case 3:\n handler[i].call(this, type, arguments[1], arguments[2]);\n break;\n default:\n handler[i].apply(this, args);\n }\n }\n }\n\n if (this.wildcard) {\n handler = [];\n var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice();\n searchListenerTree.call(this, handler, ns, this.listenerTree, 0);\n } else {\n handler = this._events[type];\n if (typeof handler === 'function') {\n this.event = type;\n switch (al) {\n case 1:\n handler.call(this);\n break;\n case 2:\n handler.call(this, arguments[1]);\n break;\n case 3:\n handler.call(this, arguments[1], arguments[2]);\n break;\n default:\n args = new Array(al - 1);\n for (j = 1; j < al; j++) {\n args[j - 1] = arguments[j];\n }handler.apply(this, args);\n }\n return true;\n } else if (handler) {\n // need to make copy of handlers because list can change in the middle\n // of emit call\n handler = handler.slice();\n }\n }\n\n if (handler && handler.length) {\n if (al > 3) {\n args = new Array(al - 1);\n for (j = 1; j < al; j++) {\n args[j - 1] = arguments[j];\n }\n }\n for (i = 0, l = handler.length; i < l; i++) {\n this.event = type;\n switch (al) {\n case 1:\n handler[i].call(this);\n break;\n case 2:\n handler[i].call(this, arguments[1]);\n break;\n case 3:\n handler[i].call(this, arguments[1], arguments[2]);\n break;\n default:\n handler[i].apply(this, args);\n }\n }\n return true;\n } else if (!this._all && type === 'error') {\n if (arguments[1] instanceof Error) {\n throw arguments[1]; // Unhandled 'error' event\n } else {\n throw new Error(\"Uncaught, unspecified 'error' event.\");\n }\n return false;\n }\n\n return !!this._all;\n };\n\n EventEmitter.prototype.emitAsync = function () {\n\n this._events || init.call(this);\n\n var type = arguments[0];\n\n if (type === 'newListener' && !this.newListener) {\n if (!this._events.newListener) {\n return Promise.resolve([false]);\n }\n }\n\n var promises = [];\n\n var al = arguments.length;\n var args, l, i, j;\n var handler;\n\n if (this._all) {\n if (al > 3) {\n args = new Array(al);\n for (j = 1; j < al; j++) {\n args[j] = arguments[j];\n }\n }\n for (i = 0, l = this._all.length; i < l; i++) {\n this.event = type;\n switch (al) {\n case 1:\n promises.push(this._all[i].call(this, type));\n break;\n case 2:\n promises.push(this._all[i].call(this, type, arguments[1]));\n break;\n case 3:\n promises.push(this._all[i].call(this, type, arguments[1], arguments[2]));\n break;\n default:\n promises.push(this._all[i].apply(this, args));\n }\n }\n }\n\n if (this.wildcard) {\n handler = [];\n var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice();\n searchListenerTree.call(this, handler, ns, this.listenerTree, 0);\n } else {\n handler = this._events[type];\n }\n\n if (typeof handler === 'function') {\n this.event = type;\n switch (al) {\n case 1:\n promises.push(handler.call(this));\n break;\n case 2:\n promises.push(handler.call(this, arguments[1]));\n break;\n case 3:\n promises.push(handler.call(this, arguments[1], arguments[2]));\n break;\n default:\n args = new Array(al - 1);\n for (j = 1; j < al; j++) {\n args[j - 1] = arguments[j];\n }promises.push(handler.apply(this, args));\n }\n } else if (handler && handler.length) {\n if (al > 3) {\n args = new Array(al - 1);\n for (j = 1; j < al; j++) {\n args[j - 1] = arguments[j];\n }\n }\n for (i = 0, l = handler.length; i < l; i++) {\n this.event = type;\n switch (al) {\n case 1:\n promises.push(handler[i].call(this));\n break;\n case 2:\n promises.push(handler[i].call(this, arguments[1]));\n break;\n case 3:\n promises.push(handler[i].call(this, arguments[1], arguments[2]));\n break;\n default:\n promises.push(handler[i].apply(this, args));\n }\n }\n } else if (!this._all && type === 'error') {\n if (arguments[1] instanceof Error) {\n return Promise.reject(arguments[1]); // Unhandled 'error' event\n } else {\n return Promise.reject(\"Uncaught, unspecified 'error' event.\");\n }\n }\n\n return Promise.all(promises);\n };\n\n EventEmitter.prototype.on = function (type, listener) {\n if (typeof type === 'function') {\n this.onAny(type);\n return this;\n }\n\n if (typeof listener !== 'function') {\n throw new Error('on only accepts instances of Function');\n }\n this._events || init.call(this);\n\n // To avoid recursion in the case that type == \"newListeners\"! Before\n // adding it to the listeners, first emit \"newListeners\".\n this.emit('newListener', type, listener);\n\n if (this.wildcard) {\n growListenerTree.call(this, type, listener);\n return this;\n }\n\n if (!this._events[type]) {\n // Optimize the case of one listener. Don't need the extra array object.\n this._events[type] = listener;\n } else {\n if (typeof this._events[type] === 'function') {\n // Change to array.\n this._events[type] = [this._events[type]];\n }\n\n // If we've already got an array, just append.\n this._events[type].push(listener);\n\n // Check for listener leak\n if (!this._events[type].warned && this._events.maxListeners > 0 && this._events[type].length > this._events.maxListeners) {\n this._events[type].warned = true;\n logPossibleMemoryLeak.call(this, this._events[type].length, type);\n }\n }\n\n return this;\n };\n\n EventEmitter.prototype.onAny = function (fn) {\n if (typeof fn !== 'function') {\n throw new Error('onAny only accepts instances of Function');\n }\n\n if (!this._all) {\n this._all = [];\n }\n\n // Add the function to the event listener collection.\n this._all.push(fn);\n return this;\n };\n\n EventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n EventEmitter.prototype.off = function (type, listener) {\n if (typeof listener !== 'function') {\n throw new Error('removeListener only takes instances of Function');\n }\n\n var handlers,\n leafs = [];\n\n if (this.wildcard) {\n var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice();\n leafs = searchListenerTree.call(this, null, ns, this.listenerTree, 0);\n } else {\n // does not use listeners(), so no side effect of creating _events[type]\n if (!this._events[type]) return this;\n handlers = this._events[type];\n leafs.push({ _listeners: handlers });\n }\n\n for (var iLeaf = 0; iLeaf < leafs.length; iLeaf++) {\n var leaf = leafs[iLeaf];\n handlers = leaf._listeners;\n if (isArray(handlers)) {\n\n var position = -1;\n\n for (var i = 0, length = handlers.length; i < length; i++) {\n if (handlers[i] === listener || handlers[i].listener && handlers[i].listener === listener || handlers[i]._origin && handlers[i]._origin === listener) {\n position = i;\n break;\n }\n }\n\n if (position < 0) {\n continue;\n }\n\n if (this.wildcard) {\n leaf._listeners.splice(position, 1);\n } else {\n this._events[type].splice(position, 1);\n }\n\n if (handlers.length === 0) {\n if (this.wildcard) {\n delete leaf._listeners;\n } else {\n delete this._events[type];\n }\n }\n\n this.emit(\"removeListener\", type, listener);\n\n return this;\n } else if (handlers === listener || handlers.listener && handlers.listener === listener || handlers._origin && handlers._origin === listener) {\n if (this.wildcard) {\n delete leaf._listeners;\n } else {\n delete this._events[type];\n }\n\n this.emit(\"removeListener\", type, listener);\n }\n }\n\n function recursivelyGarbageCollect(root) {\n if (root === undefined) {\n return;\n }\n var keys = Object.keys(root);\n for (var i in keys) {\n var key = keys[i];\n var obj = root[key];\n if (obj instanceof Function || (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) !== \"object\" || obj === null) continue;\n if (Object.keys(obj).length > 0) {\n recursivelyGarbageCollect(root[key]);\n }\n if (Object.keys(obj).length === 0) {\n delete root[key];\n }\n }\n }\n recursivelyGarbageCollect(this.listenerTree);\n\n return this;\n };\n\n EventEmitter.prototype.offAny = function (fn) {\n var i = 0,\n l = 0,\n fns;\n if (fn && this._all && this._all.length > 0) {\n fns = this._all;\n for (i = 0, l = fns.length; i < l; i++) {\n if (fn === fns[i]) {\n fns.splice(i, 1);\n this.emit(\"removeListenerAny\", fn);\n return this;\n }\n }\n } else {\n fns = this._all;\n for (i = 0, l = fns.length; i < l; i++) {\n this.emit(\"removeListenerAny\", fns[i]);\n }this._all = [];\n }\n return this;\n };\n\n EventEmitter.prototype.removeListener = EventEmitter.prototype.off;\n\n EventEmitter.prototype.removeAllListeners = function (type) {\n if (arguments.length === 0) {\n !this._events || init.call(this);\n return this;\n }\n\n if (this.wildcard) {\n var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice();\n var leafs = searchListenerTree.call(this, null, ns, this.listenerTree, 0);\n\n for (var iLeaf = 0; iLeaf < leafs.length; iLeaf++) {\n var leaf = leafs[iLeaf];\n leaf._listeners = null;\n }\n } else if (this._events) {\n this._events[type] = null;\n }\n return this;\n };\n\n EventEmitter.prototype.listeners = function (type) {\n if (this.wildcard) {\n var handlers = [];\n var ns = typeof type === 'string' ? type.split(this.delimiter) : type.slice();\n searchListenerTree.call(this, handlers, ns, this.listenerTree, 0);\n return handlers;\n }\n\n this._events || init.call(this);\n\n if (!this._events[type]) this._events[type] = [];\n if (!isArray(this._events[type])) {\n this._events[type] = [this._events[type]];\n }\n return this._events[type];\n };\n\n EventEmitter.prototype.listenerCount = function (type) {\n return this.listeners(type).length;\n };\n\n EventEmitter.prototype.listenersAny = function () {\n\n if (this._all) {\n return this._all;\n } else {\n return [];\n }\n };\n\n if (true) {\n // AMD. Register as an anonymous module.\n !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () {\n return EventEmitter;\n }).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\n } else if ((typeof exports === 'undefined' ? 'undefined' : _typeof(exports)) === 'object') {\n // CommonJS\n module.exports = EventEmitter;\n } else {\n // Browser global.\n window.EventEmitter2 = EventEmitter;\n }\n}();\n\n/***/ }),\n/* 56 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar waterfall = __webpack_require__(18);\nvar Emitter = __webpack_require__(4);\nvar Event = __webpack_require__(23);\nvar Search = __webpack_require__(62);\n\n/**\n This is the root {@link Chat} class that represents a chat room\n\n @param {String} [channel=new Date().getTime()] A unique identifier for this chat {@link Chat}. Must be alphanumeric. The channel is the unique name of a {@link Chat}, and is usually something like \"The Watercooler\", \"Support\", or \"Off Topic\". See [PubNub Channels](https://support.pubnub.com/support/solutions/articles/14000045182-what-is-a-channel-).\n @param {Boolean} [isPrivate=true] Attempt to authenticate ourselves before connecting to this {@link Chat}.\n @param {Boolean} [autoConnect=true] Connect to this chat as soon as its initiated. If set to ```false```, call the {@link Chat#connect} method to connect to this {@link Chat}.\n @param {Object} [meta={}] Chat metadata that will be persisted on the server and populated on creation.\n @param {String} [group='default'] Groups chat into a \"type\". This is the key which chats will be grouped into within {@link Me.session} object.\n @class Chat\n @extends Emitter\n @extends RootEmitter\n @fires Chat#$\".\"ready\n @fires Chat#$\".\"state\n @fires Chat#$\".\"online\".\"*\n @fires Chat#$\".\"offline\".\"*\n */\n\nvar Chat = function (_Emitter) {\n _inherits(Chat, _Emitter);\n\n function Chat(chatEngine) {\n var channel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new Date().getTime();\n var isPrivate = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var autoConnect = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n var meta = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};\n\n var _ret;\n\n var group = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 'custom';\n\n _classCallCheck(this, Chat);\n\n var _this = _possibleConstructorReturn(this, (Chat.__proto__ || Object.getPrototypeOf(Chat)).call(this, chatEngine));\n\n _this.chatEngine = chatEngine;\n\n _this.name = 'Chat';\n\n /**\n * Classify the chat within some group, Valid options are 'system', 'fixed', or 'custom'.\n * @type Boolean\n * @readonly\n * @private\n */\n _this.group = group;\n\n /**\n * Excludes all users from reading or writing to the {@link chat} unless they have been explicitly invited via {@link Chat#invite};\n * @type Boolean\n * @readonly\n */\n _this.isPrivate = isPrivate;\n\n /**\n * Chat metadata persisted on the server. Useful for storing things like the name and description. Call {@link Chat#update} to update the remote information.\n * @type Object\n * @readonly\n */\n _this.meta = meta || {};\n\n /**\n * A string identifier for the Chat room. Any chat with an identical channel will be able to communicate with one another.\n * @type String\n * @readonly\n * @see [PubNub Channels](https://support.pubnub.com/support/solutions/articles/14000045182-what-is-a-channel-)\n */\n _this.channel = _this.chatEngine.augmentChannel(channel, _this.isPrivate);\n\n /**\n A list of users in this {@link Chat}. Automatically kept in sync as users join and leave the chat.\n Use [$.join](/Chat.html#event:$%2522.%2522join) and related events to get notified when this changes\n @type Object\n @readonly\n */\n _this.users = {};\n\n /**\n * Boolean value that indicates of the Chat is connected to the network\n * @type {Boolean}\n */\n _this.connected = false;\n\n /**\n * Keep a record if we've every successfully connected to this chat before.\n * @type {Boolean}\n */\n _this.hasConnected = false;\n\n /**\n * If user manually disconnects via {@link ChatEngine#disconnect}, the\n * chat is put to \"sleep\". If a connection is reestablished\n * via {@link ChatEngine#reconnect}, sleeping chats reconnect automatically.\n * @type {Boolean}\n */\n _this.asleep = false;\n\n _this.chatEngine.chats[_this.channel] = _this;\n\n if (autoConnect) {\n _this.connect();\n }\n\n return _ret = _this, _possibleConstructorReturn(_this, _ret);\n }\n\n /**\n Updates list of {@link User}s in this {@link Chat}\n based on who is online now.\n @private\n @param {Object} status The response status\n @param {Object} response The response payload object\n */\n\n\n _createClass(Chat, [{\n key: 'onHereNow',\n value: function onHereNow(status, response) {\n var _this2 = this;\n\n if (status.error) {\n\n /**\n * There was a problem fetching the presence of this chat\n * @event Chat#$\".\"error\".\"presence\n */\n this.chatEngine.throwError(this, 'trigger', 'presence', new Error('Getting presence of this Chat. Make sure PubNub presence is enabled for this key'));\n } else {\n\n // get the list of occupants in this channel\n var occupants = response.channels[this.channel].occupants;\n\n // format the userList for rltm.js standard\n occupants.forEach(function (occupant) {\n _this2.userUpdate(occupant.uuid, occupant.state);\n });\n }\n }\n\n /**\n * Turns a {@link Chat} into a JSON representation.\n * @return {Object}\n */\n\n }, {\n key: 'objectify',\n value: function objectify() {\n\n return {\n channel: this.channel,\n group: this.group,\n private: this.isPrivate,\n meta: this.meta\n };\n }\n\n /**\n * Invite a user to this Chat. Authorizes the invited user in the Chat and sends them an invite via {@link User#direct}.\n * @param {User} user The {@link User} to invite to this chatroom.\n * @fires Me#event:$\".\"invite\n * @example\n * // one user running ChatEngine\n * let secretChat = new ChatEngine.Chat('secret-channel');\n * secretChat.invite(someoneElse);\n *\n * // someoneElse in another instance of ChatEngine\n * me.direct.on('$.invite', (payload) => {\n * let secretChat = new ChatEngine.Chat(payload.data.channel);\n * });\n */\n\n }, {\n key: 'invite',\n value: function invite(user) {\n var _this3 = this;\n\n this.chatEngine.request('post', 'invite', {\n to: user.uuid,\n chat: this.objectify()\n }).then(function () {\n\n var send = function send() {\n\n /**\n * Notifies {@link Me} that they've been invited to a new private {@link Chat}.\n * Fired by the {@link Chat#invite} method.\n * @event Me#$\".\"invite\n * @tutorial private\n * @example\n * me.direct.on('$.invite', (payload) => {\n * let privChat = new ChatEngine.Chat(payload.data.channel));\n * });\n */\n user.direct.emit('$.invite', {\n channel: _this3.channel\n });\n };\n\n if (!user.direct.connected) {\n user.direct.connect();\n user.direct.on('$.connected', send);\n } else {\n send();\n }\n }).catch(function (error) {\n _this3.chatEngine.throwError(_this3, 'trigger', 'search', new Error('Something went wrong while making a request to authentication server.'), { error: error });\n });\n }\n\n /**\n Keep track of {@link User}s in the room by subscribing to PubNub presence events.\n @private\n @param {Object} data The PubNub presence response for this event\n */\n\n }, {\n key: 'onPresence',\n value: function onPresence(presenceEvent) {\n\n // make sure channel matches this channel\n\n // someone joins channel\n if (presenceEvent.action === 'join') {\n this.userJoin(presenceEvent.uuid, presenceEvent.state);\n }\n\n // someone leaves channel\n if (presenceEvent.action === 'leave') {\n this.userLeave(presenceEvent.uuid);\n }\n\n // someone timesout\n if (presenceEvent.action === 'timeout') {\n this.userDisconnect(presenceEvent.uuid);\n }\n\n // someone's state is updated\n if (presenceEvent.action === 'state-change') {\n this.userUpdate(presenceEvent.uuid, presenceEvent.state);\n }\n }\n\n /**\n * Update the {@link Chat} metadata on the server.\n * @param {object} data JSON object representing chat metadta.\n */\n\n }, {\n key: 'update',\n value: function update(data) {\n var _this4 = this;\n\n var oldMeta = this.meta || {};\n this.meta = Object.assign(oldMeta, data);\n\n this.chatEngine.request('post', 'chat', {\n chat: this.objectify()\n }).then(function () {}).catch(function (error) {\n _this4.chatEngine.throwError(_this4, 'trigger', 'chat', new Error('Something went wrong while making a request to chat server.'), { error: error });\n });\n }\n\n /**\n * Send events to other clients in this {@link User}.\n * Events are trigger over the network and all events are made\n * on behalf of {@link Me}\n *\n * @param {String} event The event name\n * @param {Object} data The event payload object\n * @example\n * chat.emit('custom-event', {value: true});\n * chat.on('custom-event', (payload) => {\n * console.log(payload.sender.uuid, 'emitted the value', payload.data.value);\n * });\n */\n\n }, {\n key: 'emit',\n value: function emit(event, data) {\n\n if (event === 'message' && (typeof data === 'undefined' ? 'undefined' : _typeof(data)) !== 'object') {\n throw new Error('the payload has to be an object');\n }\n\n // create a standardized payload object\n var payload = {\n data: data, // the data supplied from params\n sender: this.chatEngine.me.uuid, // my own uuid\n chat: this, // an instance of this chat\n event: event,\n chatengineSDK: this.chatEngine.package.version\n };\n\n var tracer = new Event(this.chatEngine, this, event);\n\n // run the plugin queue to modify the event\n this.runPluginQueue('emit', event, function (next) {\n next(null, payload);\n }, function (err, pluginResponse) {\n\n // remove chat otherwise it would be serialized\n // instead, it's rebuilt on the other end.\n // see this.trigger\n delete pluginResponse.chat;\n\n // publish the event and data over the configured channel\n tracer.publish(pluginResponse);\n });\n\n return tracer;\n }\n\n /**\n Add a user to the {@link Chat}, creating it if it doesn't already exist.\n @private\n @param {String} uuid The user uuid\n @param {Object} state The user initial state\n @param {Boolean} trigger Force a trigger that this user is online\n */\n\n }, {\n key: 'userJoin',\n value: function userJoin(uuid, state) {\n\n // Ensure that this user exists in the global list\n // so we can reference it from here out\n this.chatEngine.users[uuid] = this.chatEngine.users[uuid] || new this.chatEngine.User(uuid);\n this.chatEngine.users[uuid].assign(state);\n\n // check if the user already exists within the chatroom\n // so we know if we need to notify or not\n var userAlreadyHere = this.users[uuid];\n\n // assign the user to the chatroom\n this.users[uuid] = this.chatEngine.users[uuid];\n\n // trigger the join event over this chatroom\n if (userAlreadyHere) {\n\n /**\n * Broadcast that a {@link User} has come online. This is when\n * the framework firsts learn of a user. This can be triggered\n * by, ```$.join```, or other network events that\n * notify the framework of a new user.\n *\n * @event Chat#$\".\"online\".\"here\n * @param {Object} data The payload returned by the event\n * @param {User} data.user The {@link User} that came online\n * @example\n * chat.on('$.online.here', (data) => {\n * console.log('User has come online:', data.user);\n * });\n */\n\n this.trigger('$.online.here', { user: this.users[uuid] });\n } else {\n\n /**\n * Fired when a {@link User} has joined the room.\n *\n * @event Chat#$\".\"online\".\"join\n * @param {Object} data The payload returned by the event\n * @param {User} data.user The {@link User} that came online\n * @example\n * chat.on('$.join', (data) => {\n * console.log('User has joined the room!', data.user);\n * });\n */\n\n this.trigger('$.online.join', { user: this.users[uuid] });\n }\n\n // return the instance of this user\n return this.chatEngine.users[uuid];\n }\n\n /**\n * Update a user's state.\n * @private\n * @param {String} uuid The {@link User} uuid\n * @param {Object} state State to update for the user\n */\n\n }, {\n key: 'userUpdate',\n value: function userUpdate(uuid, state) {\n\n // ensure the user exists within the global space\n this.chatEngine.users[uuid] = this.chatEngine.users[uuid] || new this.chatEngine.User(uuid);\n\n // if we don't know about this user\n if (!this.users[uuid]) {\n // do the whole join thing\n this.userJoin(uuid, state);\n }\n\n // update this user's state in this chatroom\n this.users[uuid].assign(state);\n\n /**\n * Broadcast that a {@link User} has changed state.\n * @event ChatEngine#$\".\"state\n * @param {Object} data The payload returned by the event\n * @param {User} data.user The {@link User} that changed state\n * @param {Object} data.state The new user state\n * @example\n * ChatEngine.on('$.state', (data) => {\n * console.log('User has changed state:', data.user, 'new state:', data.state);\n * });\n */\n this.chatEngine._emit('$.state', {\n user: this.users[uuid],\n state: this.users[uuid].state\n });\n }\n\n /**\n * Called by {@link ChatEngine#disconnect}. Fires disconnection notifications\n * and stores \"sleep\" state in memory. Sleep means the Chat was previously connected.\n * @private\n */\n\n }, {\n key: 'sleep',\n value: function sleep() {\n\n if (this.connected) {\n this.onDisconnected();\n this.asleep = true;\n }\n }\n\n /**\n * Called by {@link ChatEngine#reconnect}. Wakes the Chat up from sleep state.\n * Re-authenticates with the server, and fires connection events once established.\n * @private\n */\n\n }, {\n key: 'wake',\n value: function wake() {\n var _this5 = this;\n\n if (this.asleep) {\n this.handshake(function () {\n _this5.onConnected();\n });\n }\n }\n\n /**\n * Fired upon successful connection to the network.\n * @private\n */\n\n }, {\n key: 'onConnected',\n value: function onConnected() {\n this.connected = true;\n this.trigger('$.connected');\n }\n\n /**\n * Fires upon disconnection from the network through any means.\n * @private\n */\n\n }, {\n key: 'onDisconnected',\n value: function onDisconnected() {\n this.connected = false;\n this.trigger('$.disconnected');\n }\n /**\n * Fires upon manually invoked leaving.\n * @private\n */\n\n }, {\n key: 'onLeave',\n value: function onLeave() {\n this.trigger('$.left');\n this.onDisconnected();\n }\n\n /**\n * Leave from the {@link Chat} on behalf of {@link Me}. Disconnects from the {@link Chat} and will stop\n * receiving events.\n * @fires Chat#event:$\".\"offline\".\"leave\n * @example\n * chat.leave();\n */\n\n }, {\n key: 'leave',\n value: function leave() {\n var _this6 = this;\n\n // unsubscribe from the channel locally\n this.chatEngine.pubnub.unsubscribe({\n channels: [this.channel]\n });\n\n // tell the server we left\n this.chatEngine.request('post', 'leave', { chat: this.objectify() }).then(function () {\n\n // trigger the disconnect events and update state\n _this6.onLeave();\n\n // tell the chat we've left\n _this6.emit('$.system.leave', { subject: _this6.objectify() });\n\n // tell session we've left\n if (_this6.chatEngine.me.session) {\n _this6.chatEngine.me.session.leave(_this6);\n }\n }).catch(function (error) {\n _this6.chatEngine.throwError(_this6, 'trigger', 'chat', new Error('Something went wrong while making a request to chat server.'), { error: error });\n });\n }\n\n /**\n Perform updates when a user has left the {@link Chat}.\n @private\n */\n\n }, {\n key: 'userLeave',\n value: function userLeave(uuid) {\n\n // store a temporary reference to send with our event\n var user = this.users[uuid];\n\n // remove the user from the local list of users\n // we don't remove the user from the global list,\n // because they may be online in other channels\n delete this.users[uuid];\n\n // make sure this event is real, user may have already left\n if (user) {\n\n // if a user leaves, trigger the event\n\n /**\n * Fired when a {@link User} intentionally leaves a {@link Chat}.\n *\n * @event Chat#$\".\"offline\".\"leave\n * @param {Object} data The data payload from the event\n * @param {User} user The {@link User} that has left the room\n * @example\n * chat.on('$.offline.leave', (data) => {\n * console.log('User left the room manually:', data.user);\n * });\n */\n this.trigger('$.offline.leave', { user: user });\n }\n }\n\n /**\n Fired when a user disconnects from the {@link Chat}\n @private\n @param {String} uuid The uuid of the {@link Chat} that left\n */\n\n }, {\n key: 'userDisconnect',\n value: function userDisconnect(uuid) {\n\n var user = this.users[uuid];\n delete this.users[uuid];\n\n // make sure this event is real, user may have already left\n if (user) {\n\n /**\n * Fired specifically when a {@link User} looses network connection\n * to the {@link Chat} involuntarily.\n *\n * @event Chat#$\".\"offline\".\"disconnect\n * @param {Object} data The {@link User} that disconnected\n * @param {Object} data.user The {@link User} that disconnected\n * @example\n * chat.on('$.offline.disconnect', (data) => {\n * console.log('User disconnected from the network:', data.user);\n * });\n */\n this.trigger('$.offline.disconnect', { user: user });\n }\n }\n\n /**\n Set the state for {@link Me} within this {@link User}.\n Broadcasts the ```$.state``` event on other clients\n @private\n @param {Object} state The new state {@link Me} will have within this {@link User}\n */\n\n }, {\n key: 'setState',\n value: function setState(state) {\n this.chatEngine.pubnub.setState({ state: state, channels: [this.chatEngine.global.channel] }, function () {\n // handle status, response\n });\n }\n\n /**\n Search through previously emitted events. Parameters act as AND operators. Returns an instance of the emitter based {@link History}. Will\n which will emit all old events unless ```config.event``` is supplied.\n @param {Object} [config] Our configuration for the PubNub history request. See the [PubNub History](https://www.pubnub.com/docs/web-javascript/storage-and-history) docs for more information on these parameters.\n @param {Event} [config.event] The {@link Event} to search for.\n @param {User} [config.sender] The {@link User} who sent the message.\n @param {Number} [config.limit=20] The maximum number of results to return that match search criteria. Search will continue operating until it returns this number of results or it reached the end of history. Limit will be ignored in case if both 'start' and 'end' timetokens has been passed in search configuration.\n @param {Number} [config.start=0] The timetoken to begin searching between.\n @param {Number} [config.end=0] The timetoken to end searching between.\n @param {Boolean} [config.reverse=false] Search oldest messages first.\n @return {Search}\n @example\n chat.search({\n event: 'my-custom-event',\n sender: ChatEngine.me,\n limit: 20\n }).on('my-custom-event', (event) => {\n console.log('this is an old event!', event);\n }).on('$.search.finish', () => {\n console.log('we have all our results!')\n });\n */\n\n }, {\n key: 'search',\n value: function search(config) {\n\n if (this.hasConnected) {\n return new Search(this.chatEngine, this, config);\n } else {\n this.chatEngine.throwError(this, 'trigger', 'search', new Error('You must wait for the $.connected event before calling Chat#search'));\n }\n }\n\n /**\n * Fired when the chat first connects to network.\n * @private\n */\n\n }, {\n key: 'connectionReady',\n value: function connectionReady() {\n var _this7 = this;\n\n this.connected = true;\n this.hasConnected = true;\n\n /**\n * Broadcast that the {@link Chat} is connected to the network.\n * @event Chat#$\".\"connected\n * @example\n * chat.on('$.connected', () => {\n * console.log('chat is ready to go!');\n * });\n */\n this.onConnected();\n\n if (this.chatEngine.me.session) {\n this.chatEngine.me.session.join(this);\n }\n\n // add self to list of users\n this.users[this.chatEngine.me.uuid] = this.chatEngine.me;\n\n // trigger my own online event\n this.trigger('$.online.join', {\n user: this.chatEngine.me\n });\n\n // global channel updates are triggered manually, only get presence on custom chats\n if (this.channel !== this.chatEngine.global.channel && this.group === 'custom') {\n\n this.getUserUpdates();\n\n // we may miss updates, so call this again 5 seconds later\n setTimeout(function () {\n _this7.getUserUpdates();\n }, 5000);\n }\n\n this.on('$.system.leave', function (payload) {\n _this7.userLeave(payload.sender.uuid);\n });\n }\n\n /**\n * Ask PubNub for information about {@link User}s in this {@link Chat}.\n */\n\n }, {\n key: 'getUserUpdates',\n value: function getUserUpdates() {\n var _this8 = this;\n\n // get a list of users online now\n // ask PubNub for information about connected users in this channel\n this.chatEngine.pubnub.hereNow({\n channels: [this.channel],\n includeUUIDs: true,\n includeState: true\n }, function (s, r) {\n _this8.onHereNow(s, r);\n });\n }\n\n /**\n * Establish authentication with the server, then subscribe with PubNub.\n * @fires Chat#$\".\"ready\n */\n\n }, {\n key: 'connect',\n value: function connect() {\n var _this9 = this;\n\n // establish good will with the server\n this.handshake(function (response) {\n\n // asign metadata locally\n if (response.data.found) {\n _this9.meta = response.data.chat.meta;\n } else {\n _this9.update(_this9.meta);\n }\n\n // now that we've got connection, do everything else via connectionReady\n _this9.connectionReady();\n });\n }\n\n /**\n * Connect to PubNub servers to initialize the chat.\n * @example\n * // create a new chatroom, but don't connect to it automatically\n * let chat = new Chat('some-chat', false)\n *\n * // connect to the chat when we feel like it\n * chat.connect();\n */\n\n }, {\n key: 'handshake',\n value: function handshake(callback) {\n var _this10 = this;\n\n waterfall([function (next) {\n if (!_this10.chatEngine.pubnub) {\n next('You must call ChatEngine.connect() and wait for the $.ready event before creating new Chats.');\n } else {\n next();\n }\n }, function (next) {\n\n _this10.chatEngine.request('post', 'grant', { chat: _this10.objectify() }).then(function () {\n next();\n }).catch(next);\n }, function (next) {\n\n _this10.chatEngine.request('post', 'join', { chat: _this10.objectify() }).then(function () {\n next();\n }).catch(next);\n }, function (next) {\n\n _this10.chatEngine.request('get', 'chat', {}, { channel: _this10.channel }).then(callback).catch(next);\n }], function (error) {\n _this10.chatEngine.throwError(_this10, 'trigger', 'auth', new Error('Something went wrong while making a request to authentication server.'), { error: error });\n });\n }\n }]);\n\n return Chat;\n}(Emitter);\n\nmodule.exports = Chat;\n\n/***/ }),\n/* 57 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = asyncify;\n\nvar _isObject = __webpack_require__(22);\n\nvar _isObject2 = _interopRequireDefault(_isObject);\n\nvar _initialParams = __webpack_require__(58);\n\nvar _initialParams2 = _interopRequireDefault(_initialParams);\n\nvar _setImmediate = __webpack_require__(59);\n\nvar _setImmediate2 = _interopRequireDefault(_setImmediate);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\n/**\n * Take a sync function and make it async, passing its return value to a\n * callback. This is useful for plugging sync functions into a waterfall,\n * series, or other async functions. Any arguments passed to the generated\n * function will be passed to the wrapped function (except for the final\n * callback argument). Errors thrown will be passed to the callback.\n *\n * If the function passed to `asyncify` returns a Promise, that promises's\n * resolved/rejected state will be used to call the callback, rather than simply\n * the synchronous return value.\n *\n * This also means you can asyncify ES2017 `async` functions.\n *\n * @name asyncify\n * @static\n * @memberOf module:Utils\n * @method\n * @alias wrapSync\n * @category Util\n * @param {Function} func - The synchronous function, or Promise-returning\n * function to convert to an {@link AsyncFunction}.\n * @returns {AsyncFunction} An asynchronous wrapper of the `func`. To be\n * invoked with `(args..., callback)`.\n * @example\n *\n * // passing a regular synchronous function\n * async.waterfall([\n * async.apply(fs.readFile, filename, \"utf8\"),\n * async.asyncify(JSON.parse),\n * function (data, next) {\n * // data is the result of parsing the text.\n * // If there was a parsing error, it would have been caught.\n * }\n * ], callback);\n *\n * // passing a function returning a promise\n * async.waterfall([\n * async.apply(fs.readFile, filename, \"utf8\"),\n * async.asyncify(function (contents) {\n * return db.model.create(contents);\n * }),\n * function (model, next) {\n * // `model` is the instantiated model object.\n * // If there was an error, this function would be skipped.\n * }\n * ], callback);\n *\n * // es2017 example, though `asyncify` is not needed if your JS environment\n * // supports async functions out of the box\n * var q = async.queue(async.asyncify(async function(file) {\n * var intermediateStep = await processFile(file);\n * return await somePromise(intermediateStep)\n * }));\n *\n * q.push(files);\n */\nfunction asyncify(func) {\n return (0, _initialParams2.default)(function (args, callback) {\n var result;\n try {\n result = func.apply(this, args);\n } catch (e) {\n return callback(e);\n }\n // if result is Promise object\n if ((0, _isObject2.default)(result) && typeof result.then === 'function') {\n result.then(function (value) {\n invokeCallback(callback, null, value);\n }, function (err) {\n invokeCallback(callback, err.message ? err : new Error(err));\n });\n } else {\n callback(null, result);\n }\n });\n}\n\nfunction invokeCallback(callback, error, value) {\n try {\n callback(error, value);\n } catch (e) {\n (0, _setImmediate2.default)(rethrow, e);\n }\n}\n\nfunction rethrow(error) {\n throw error;\n}\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 58 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nexports.default = function (fn) {\n return function () /*...args, callback*/{\n var args = (0, _slice2.default)(arguments);\n var callback = args.pop();\n fn.call(this, args, callback);\n };\n};\n\nvar _slice = __webpack_require__(2);\n\nvar _slice2 = _interopRequireDefault(_slice);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\nmodule.exports = exports['default'];\n\n/***/ }),\n/* 59 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(setImmediate, process) {\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.hasNextTick = exports.hasSetImmediate = undefined;\nexports.fallback = fallback;\nexports.wrap = wrap;\n\nvar _slice = __webpack_require__(2);\n\nvar _slice2 = _interopRequireDefault(_slice);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n}\n\nvar hasSetImmediate = exports.hasSetImmediate = typeof setImmediate === 'function' && setImmediate;\nvar hasNextTick = exports.hasNextTick = (typeof process === 'undefined' ? 'undefined' : _typeof(process)) === 'object' && typeof process.nextTick === 'function';\n\nfunction fallback(fn) {\n setTimeout(fn, 0);\n}\n\nfunction wrap(defer) {\n return function (fn /*, ...args*/) {\n var args = (0, _slice2.default)(arguments, 1);\n defer(function () {\n fn.apply(null, args);\n });\n };\n}\n\nvar _defer;\n\nif (hasSetImmediate) {\n _defer = setImmediate;\n} else if (hasNextTick) {\n _defer = process.nextTick;\n} else {\n _defer = fallback;\n}\n\nexports.default = wrap(_defer);\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(60).setImmediate, __webpack_require__(1)))\n\n/***/ }),\n/* 60 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global) {\n\nvar apply = Function.prototype.apply;\n\n// DOM APIs, for completeness\n\nexports.setTimeout = function () {\n return new Timeout(apply.call(setTimeout, window, arguments), clearTimeout);\n};\nexports.setInterval = function () {\n return new Timeout(apply.call(setInterval, window, arguments), clearInterval);\n};\nexports.clearTimeout = exports.clearInterval = function (timeout) {\n if (timeout) {\n timeout.close();\n }\n};\n\nfunction Timeout(id, clearFn) {\n this._id = id;\n this._clearFn = clearFn;\n}\nTimeout.prototype.unref = Timeout.prototype.ref = function () {};\nTimeout.prototype.close = function () {\n this._clearFn.call(window, this._id);\n};\n\n// Does not start the time, just sets up the members needed.\nexports.enroll = function (item, msecs) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = msecs;\n};\n\nexports.unenroll = function (item) {\n clearTimeout(item._idleTimeoutId);\n item._idleTimeout = -1;\n};\n\nexports._unrefActive = exports.active = function (item) {\n clearTimeout(item._idleTimeoutId);\n\n var msecs = item._idleTimeout;\n if (msecs >= 0) {\n item._idleTimeoutId = setTimeout(function onTimeout() {\n if (item._onTimeout) item._onTimeout();\n }, msecs);\n }\n};\n\n// setimmediate attaches itself to the global object\n__webpack_require__(61);\n// On some exotic environments, it's not clear which object `setimmeidate` was\n// able to install onto. Search each possibility in the same order as the\n// `setimmediate` library.\nexports.setImmediate = typeof self !== \"undefined\" && self.setImmediate || typeof global !== \"undefined\" && global.setImmediate || undefined && undefined.setImmediate;\nexports.clearImmediate = typeof self !== \"undefined\" && self.clearImmediate || typeof global !== \"undefined\" && global.clearImmediate || undefined && undefined.clearImmediate;\n/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9)))\n\n/***/ }),\n/* 61 */\n/***/ (function(module, exports, __webpack_require__) {\n\n\"use strict\";\n/* WEBPACK VAR INJECTION */(function(global, process) {\n\n(function (global, undefined) {\n \"use strict\";\n\n if (global.setImmediate) {\n return;\n }\n\n var nextHandle = 1; // Spec says greater than zero\n var tasksByHandle = {};\n var currentlyRunningATask = false;\n var doc = global.document;\n var registerImmediate;\n\n function setImmediate(callback) {\n // Callback can either be a function or a string\n if (typeof callback !== \"function\") {\n callback = new Function(\"\" + callback);\n }\n // Copy function arguments\n var args = new Array(arguments.length - 1);\n for (var i = 0; i < args.length; i++) {\n args[i] = arguments[i + 1];\n }\n // Store and register the task\n var task = { callback: callback, args: args };\n tasksByHandle[nextHandle] = task;\n registerImmediate(nextHandle);\n return nextHandle++;\n }\n\n function clearImmediate(handle) {\n delete tasksByHandle[handle];\n }\n\n function run(task) {\n var callback = task.callback;\n var args = task.args;\n switch (args.length) {\n case 0:\n callback();\n break;\n case 1:\n callback(args[0]);\n break;\n case 2:\n callback(args[0], args[1]);\n break;\n case 3:\n callback(args[0], args[1], args[2]);\n break;\n default:\n callback.apply(undefined, args);\n break;\n }\n }\n\n function runIfPresent(handle) {\n // From the spec: \"Wait until any invocations of this algorithm started before this one have completed.\"\n // So if we're currently running a task, we'll need to delay this invocation.\n if (currentlyRunningATask) {\n // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a\n // \"too much recursion\" error.\n setTimeout(runIfPresent, 0, handle);\n } else {\n var task = tasksByHandle[handle];\n if (task) {\n currentlyRunningATask = true;\n try {\n run(task);\n } finally {\n clearImmediate(handle);\n currentlyRunningATask = false;\n }\n }\n }\n }\n\n function installNextTickImplementation() {\n registerImmediate = function registerImmediate(handle) {\n process.nextTick(function () {\n runIfPresent(handle);\n });\n };\n }\n\n function canUsePostMessage() {\n // The test against `importScripts` prevents this implementation from being installed inside a web worker,\n // where `global.postMessage` means something completely different and can't be used for this purpose.\n if (global.postMessage && !global.importScripts) {\n var postMessageIsAsynchronous = true;\n var oldOnMessage = global.onmessage;\n global.onmessage = function () {\n postMessageIsAsynchronous = false;\n };\n global.postMessage(\"\", \"*\");\n global.onmessage = oldOnMessage;\n return postMessageIsAsynchronous;\n }\n }\n\n function installPostMessageImplementation() {\n // Installs an event handler on `global` for the `message` event: see\n // * https://developer.mozilla.org/en/DOM/window.postMessage\n // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages\n\n var messagePrefix = \"setImmediate$\" + Math.random() + \"$\";\n var onGlobalMessage = function onGlobalMessage(event) {\n if (event.source === global && typeof event.data === \"string\" && event.data.indexOf(messagePrefix) === 0) {\n runIfPresent(+event.data.slice(messagePrefix.length));\n }\n };\n\n if (global.addEventListener) {\n global.addEventListener(\"message\", onGlobalMessage, false);\n } else {\n global.attachEvent(\"onmessage\", onGlobalMessage);\n }\n\n registerImmediate = function registerImmediate(handle) {\n global.postMessage(messagePrefix + handle, \"*\");\n };\n }\n\n function installMessageChannelImplementation() {\n var channel = new MessageChannel();\n channel.port1.onmessage = function (event) {\n var handle = event.data;\n runIfPresent(handle);\n };\n\n registerImmediate = function registerImmediate(handle) {\n channel.port2.postMessage(handle);\n };\n }\n\n function installReadyStateChangeImplementation() {\n var html = doc.documentElement;\n registerImmediate = function registerImmediate(handle) {\n // Create a