@aswin.dev/editor 0.6.3 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AccessibilityPanel-CvQGLdu6.js +108 -0
- package/dist/AiChatSidebar-B3SJIKG_.js +229 -0
- package/dist/AiFeatureMenu-BLLKoOos.js +63 -0
- package/dist/BlockA11yBadge-CXDLqkcJ.js +34 -0
- package/dist/CloudEditor-BCz1ZTYC.js +1172 -0
- package/dist/CollaboratorBar-DuPYW5iF.js +95 -0
- package/dist/CommentsSidebar-B1pvJdqF.js +441 -0
- package/dist/CountdownBlock-BNSj1jvJ.js +92 -0
- package/dist/CountdownToolbar-ClJr2GzL.js +210 -0
- package/dist/DesignReferenceSidebar-B8V_F2yF.js +276 -0
- package/dist/LoadingTrack-B0CWFHXQ.js +10 -0
- package/dist/ModuleBrowserModal-DrUFMTDx.js +206 -0
- package/dist/ModulePreviewCanvas-CHdOwV_4.js +106 -0
- package/dist/NumberWithSuffix-DkXUez9t.js +422 -0
- package/dist/ParagraphEditor-D75wl3BX.js +695 -0
- package/dist/RichTextEditorContent-DYkIauIk.js +137 -0
- package/dist/SaveModuleDialog-FZ9lxY7_.js +123 -0
- package/dist/SnapshotHistory-BR3eV120.js +127 -0
- package/dist/TemplateScoringPanel-4GTNHej5.js +256 -0
- package/dist/TestEmailModal--ue5w9fT.js +94 -0
- package/dist/TitleEditor-fStSADI-.js +172 -0
- package/dist/TplModal-BwSfxIHf.js +44 -0
- package/dist/_plugin-vue_export-helper-B0hnzhyu.js +8 -0
- package/dist/accessibility-e8JYu_zd.js +27 -0
- package/dist/blockTypeIcons-BcTrDjmH.js +126 -0
- package/dist/bundle-stats.json +10 -0
- package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js +97 -0
- package/dist/cdn/chunks/AccessibilityPanel-B6DOjojm.js.map +1 -0
- package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js +59 -0
- package/dist/cdn/chunks/AiFeatureMenu-qEdB2fZJ.js.map +1 -0
- package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js +33 -0
- package/dist/cdn/chunks/BlockA11yBadge-DcEZftf6.js.map +1 -0
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js +1143 -0
- package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +1 -0
- package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js +51 -0
- package/dist/cdn/chunks/CollaboratorBar--nO7TX6b.js.map +1 -0
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js +93 -0
- package/dist/cdn/chunks/CountdownBlock-5YdT1uUu.js.map +1 -0
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js +212 -0
- package/dist/cdn/chunks/CountdownToolbar-DXPXrbAA.js.map +1 -0
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js +195 -0
- package/dist/cdn/chunks/ModuleBrowserModal-DxoPp81s.js.map +1 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js +107 -0
- package/dist/cdn/chunks/ModulePreviewCanvas-CoLdb4ar.js.map +1 -0
- package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js +423 -0
- package/dist/cdn/chunks/NumberWithSuffix-CE3NrZhH.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js +544 -0
- package/dist/cdn/chunks/ParagraphEditor-B6Ygu-Mq.js.map +1 -0
- package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js +106 -0
- package/dist/cdn/chunks/RichTextEditorContent-DL_y2SrR.js.map +1 -0
- package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js +119 -0
- package/dist/cdn/chunks/SaveModuleDialog-B0TnO_o9.js.map +1 -0
- package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js +171 -0
- package/dist/cdn/chunks/TitleEditor-BHpfxvwy.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js +22 -0
- package/dist/cdn/chunks/blockTypeIcons-BzzY9_kA.js.map +1 -0
- package/dist/cdn/chunks/de-Ce-LbJ2J.js +89 -0
- package/dist/cdn/chunks/de-Ce-LbJ2J.js.map +1 -0
- package/dist/cdn/chunks/de-D8CnZxV9.js +523 -0
- package/dist/cdn/chunks/de-D8CnZxV9.js.map +1 -0
- package/dist/cdn/chunks/de-RQrZR56a.js +209 -0
- package/dist/cdn/chunks/de-RQrZR56a.js.map +1 -0
- package/dist/cdn/chunks/draggable-Bcb86AsV.js +11572 -0
- package/dist/cdn/chunks/draggable-Bcb86AsV.js.map +1 -0
- package/dist/cdn/chunks/emojiData-EMFlj6FJ.js +19 -0
- package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +1 -0
- package/dist/cdn/chunks/en-8FHaQv4V.js +523 -0
- package/dist/cdn/chunks/en-8FHaQv4V.js.map +1 -0
- package/dist/cdn/chunks/en-Bl1ecfRF.js +209 -0
- package/dist/cdn/chunks/en-Bl1ecfRF.js.map +1 -0
- package/dist/cdn/chunks/en-DiCWK5fG.js +89 -0
- package/dist/cdn/chunks/en-DiCWK5fG.js.map +1 -0
- package/dist/cdn/chunks/extensions-DIxF31tA.js +598 -0
- package/dist/cdn/chunks/extensions-DIxF31tA.js.map +1 -0
- package/dist/cdn/chunks/features-DEMb13KS.js +6814 -0
- package/dist/cdn/chunks/features-DEMb13KS.js.map +1 -0
- package/dist/cdn/chunks/icons-CsLTcirh.js +700 -0
- package/dist/cdn/chunks/icons-CsLTcirh.js.map +1 -0
- package/dist/cdn/chunks/liquid.browser-lQbkge2E.js +3279 -0
- package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +1 -0
- package/dist/cdn/chunks/media-library-CVaNvhpM.js +6014 -0
- package/dist/cdn/chunks/media-library-CVaNvhpM.js.map +1 -0
- package/dist/cdn/chunks/pusher-CDbNlZBE.js +2508 -0
- package/dist/cdn/chunks/pusher-CDbNlZBE.js.map +1 -0
- package/dist/cdn/chunks/quality-BaBfc54_.js +1456 -0
- package/dist/cdn/chunks/quality-BaBfc54_.js.map +1 -0
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js +32 -0
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +1 -0
- package/dist/cdn/chunks/renderer-CUxvx7ro.js +548 -0
- package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +1 -0
- package/dist/cdn/chunks/rolldown-runtime-BNuo_Jkg.js +20 -0
- package/dist/cdn/chunks/src-CRaqN-p8.js +497 -0
- package/dist/cdn/chunks/src-CRaqN-p8.js.map +1 -0
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js +57 -0
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +1 -0
- package/dist/cdn/chunks/styles-BHJULjNR.js +2947 -0
- package/dist/cdn/chunks/styles-BHJULjNR.js.map +1 -0
- package/dist/cdn/chunks/tiptap-ZhwKyFp7.js +14654 -0
- package/dist/cdn/chunks/tiptap-ZhwKyFp7.js.map +1 -0
- package/dist/cdn/editor.css +2 -0
- package/dist/cdn/editor.js +250 -0
- package/dist/cdn/editor.js.map +1 -0
- package/dist/check-Da05j8yl.js +7 -0
- package/dist/chevron-down-R2uY34iD.js +7 -0
- package/dist/circle-alert-DZuGWPX-.js +25 -0
- package/dist/clock-CRp2sIub.js +12 -0
- package/dist/cloud-DEk_b4CR.js +1733 -0
- package/dist/createLucideIcon-C3pa2siy.js +43 -0
- package/dist/de-Brqvgr43.js +521 -0
- package/dist/de-DCaaCE5s.js +207 -0
- package/dist/dist-B1IR0bpH.js +326 -0
- package/dist/dist-BFawx6IS.js +519 -0
- package/dist/dist-BaQIYPsn.js +35 -0
- package/dist/dist-Cp0zXPAD.js +189 -0
- package/dist/dist-D6uC2xhi.js +5 -0
- package/dist/dist-D90y8dvT.js +2082 -0
- package/dist/dist-DDJIWTRY.js +776 -0
- package/dist/dist-DJmnUmW9.js +362 -0
- package/dist/dist-DjviJBCi.js +74 -0
- package/dist/dist-KoBJjK1G.js +61 -0
- package/dist/dist-aRzjfSRN.js +35 -0
- package/dist/dist-iLBdeBDR.js +10658 -0
- package/dist/dist-us-RpCWN.js +47 -0
- package/dist/dist-wzMIGj-D.js +5 -0
- package/dist/emojiData-PQyVa4bU.js +17 -0
- package/dist/en-DXCyK4-X.js +207 -0
- package/dist/en-WDVp87TE.js +521 -0
- package/dist/extensions-CUcl9Ok4.js +799 -0
- package/dist/formatRelativeTime-BOEf47hq.js +12 -0
- package/dist/image-up-MBZKKg9p.js +23 -0
- package/dist/index.d.ts +275 -0
- package/dist/info-CJEC7piy.js +19 -0
- package/dist/keys-ciNfSSGj.js +10 -0
- package/dist/liquid.browser-CdMv1BTn.js +3277 -0
- package/dist/loader-circle-DsY5Yg33.js +7 -0
- package/dist/message-circle-yElBbR2C.js +7 -0
- package/dist/readableTextColor-CY3SiRnt.js +30 -0
- package/dist/refresh-cw-CE_AGtn8.js +29 -0
- package/dist/rolldown-runtime-BZGGJVDF.js +20 -0
- package/dist/scan-line-D0vcUekt.js +25 -0
- package/dist/send-DH4oDQqC.js +10 -0
- package/dist/shield-check-CfJgs2Hd.js +10 -0
- package/dist/sparkles-CvRXGqFs.js +23 -0
- package/dist/style.css +2 -0
- package/dist/styleConstants-fWzlIIwN.js +55 -0
- package/dist/styles-DEXEkBvg.js +3176 -0
- package/dist/templatical-editor.js +249 -0
- package/dist/text-align-start-BT9VUDxK.js +43 -0
- package/dist/timeouts-BSGxjuUF.js +4 -0
- package/dist/trash-2-DbP2Y6t2.js +25 -0
- package/dist/triangle-alert-aOXceTSe.js +17 -0
- package/dist/useCloudI18n-BuIwR6OE.js +23 -0
- package/dist/useEditorCore-C6ost42Q.js +9342 -0
- package/dist/useI18n-lb2DHDiu.js +17 -0
- package/dist/useMergeTag-CBwKnnNB.js +34 -0
- package/dist/vue.runtime.esm-bundler-DpvJL-nX.js +5775 -0
- package/dist/x-u2oVmjN_.js +10 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pusher-CDbNlZBE.js","names":["exports","web_http_http","module"],"sources":["../../../../../node_modules/.pnpm/pusher-js@8.5.0/node_modules/pusher-js/dist/web/pusher.js"],"sourcesContent":["/*!\n * Pusher JavaScript Library v8.5.0\n * https://pusher.com/\n *\n * Copyright 2020, Pusher\n * Released under the MIT licence.\n */\n\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Pusher\"] = factory();\n\telse\n\t\troot[\"Pusher\"] = factory();\n})(self, () => {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ 594\n(__unused_webpack_module, exports) {\n\n\"use strict\";\n\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\n/**\n * Package base64 implements Base64 encoding and decoding.\n */\n// Invalid character used in decoding to indicate\n// that the character to decode is out of range of\n// alphabet and cannot be decoded.\nvar INVALID_BYTE = 256;\n/**\n * Implements standard Base64 encoding.\n *\n * Operates in constant time.\n */\nvar Coder = /** @class */ (function () {\n // TODO(dchest): methods to encode chunk-by-chunk.\n function Coder(_paddingCharacter) {\n if (_paddingCharacter === void 0) { _paddingCharacter = \"=\"; }\n this._paddingCharacter = _paddingCharacter;\n }\n Coder.prototype.encodedLength = function (length) {\n if (!this._paddingCharacter) {\n return (length * 8 + 5) / 6 | 0;\n }\n return (length + 2) / 3 * 4 | 0;\n };\n Coder.prototype.encode = function (data) {\n var out = \"\";\n var i = 0;\n for (; i < data.length - 2; i += 3) {\n var c = (data[i] << 16) | (data[i + 1] << 8) | (data[i + 2]);\n out += this._encodeByte((c >>> 3 * 6) & 63);\n out += this._encodeByte((c >>> 2 * 6) & 63);\n out += this._encodeByte((c >>> 1 * 6) & 63);\n out += this._encodeByte((c >>> 0 * 6) & 63);\n }\n var left = data.length - i;\n if (left > 0) {\n var c = (data[i] << 16) | (left === 2 ? data[i + 1] << 8 : 0);\n out += this._encodeByte((c >>> 3 * 6) & 63);\n out += this._encodeByte((c >>> 2 * 6) & 63);\n if (left === 2) {\n out += this._encodeByte((c >>> 1 * 6) & 63);\n }\n else {\n out += this._paddingCharacter || \"\";\n }\n out += this._paddingCharacter || \"\";\n }\n return out;\n };\n Coder.prototype.maxDecodedLength = function (length) {\n if (!this._paddingCharacter) {\n return (length * 6 + 7) / 8 | 0;\n }\n return length / 4 * 3 | 0;\n };\n Coder.prototype.decodedLength = function (s) {\n return this.maxDecodedLength(s.length - this._getPaddingLength(s));\n };\n Coder.prototype.decode = function (s) {\n if (s.length === 0) {\n return new Uint8Array(0);\n }\n var paddingLength = this._getPaddingLength(s);\n var length = s.length - paddingLength;\n var out = new Uint8Array(this.maxDecodedLength(length));\n var op = 0;\n var i = 0;\n var haveBad = 0;\n var v0 = 0, v1 = 0, v2 = 0, v3 = 0;\n for (; i < length - 4; i += 4) {\n v0 = this._decodeChar(s.charCodeAt(i + 0));\n v1 = this._decodeChar(s.charCodeAt(i + 1));\n v2 = this._decodeChar(s.charCodeAt(i + 2));\n v3 = this._decodeChar(s.charCodeAt(i + 3));\n out[op++] = (v0 << 2) | (v1 >>> 4);\n out[op++] = (v1 << 4) | (v2 >>> 2);\n out[op++] = (v2 << 6) | v3;\n haveBad |= v0 & INVALID_BYTE;\n haveBad |= v1 & INVALID_BYTE;\n haveBad |= v2 & INVALID_BYTE;\n haveBad |= v3 & INVALID_BYTE;\n }\n if (i < length - 1) {\n v0 = this._decodeChar(s.charCodeAt(i));\n v1 = this._decodeChar(s.charCodeAt(i + 1));\n out[op++] = (v0 << 2) | (v1 >>> 4);\n haveBad |= v0 & INVALID_BYTE;\n haveBad |= v1 & INVALID_BYTE;\n }\n if (i < length - 2) {\n v2 = this._decodeChar(s.charCodeAt(i + 2));\n out[op++] = (v1 << 4) | (v2 >>> 2);\n haveBad |= v2 & INVALID_BYTE;\n }\n if (i < length - 3) {\n v3 = this._decodeChar(s.charCodeAt(i + 3));\n out[op++] = (v2 << 6) | v3;\n haveBad |= v3 & INVALID_BYTE;\n }\n if (haveBad !== 0) {\n throw new Error(\"Base64Coder: incorrect characters for decoding\");\n }\n return out;\n };\n // Standard encoding have the following encoded/decoded ranges,\n // which we need to convert between.\n //\n // ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 + /\n // Index: 0 - 25 26 - 51 52 - 61 62 63\n // ASCII: 65 - 90 97 - 122 48 - 57 43 47\n //\n // Encode 6 bits in b into a new character.\n Coder.prototype._encodeByte = function (b) {\n // Encoding uses constant time operations as follows:\n //\n // 1. Define comparison of A with B using (A - B) >>> 8:\n // if A > B, then result is positive integer\n // if A <= B, then result is 0\n //\n // 2. Define selection of C or 0 using bitwise AND: X & C:\n // if X == 0, then result is 0\n // if X != 0, then result is C\n //\n // 3. Start with the smallest comparison (b >= 0), which is always\n // true, so set the result to the starting ASCII value (65).\n //\n // 4. Continue comparing b to higher ASCII values, and selecting\n // zero if comparison isn't true, otherwise selecting a value\n // to add to result, which:\n //\n // a) undoes the previous addition\n // b) provides new value to add\n //\n var result = b;\n // b >= 0\n result += 65;\n // b > 25\n result += ((25 - b) >>> 8) & ((0 - 65) - 26 + 97);\n // b > 51\n result += ((51 - b) >>> 8) & ((26 - 97) - 52 + 48);\n // b > 61\n result += ((61 - b) >>> 8) & ((52 - 48) - 62 + 43);\n // b > 62\n result += ((62 - b) >>> 8) & ((62 - 43) - 63 + 47);\n return String.fromCharCode(result);\n };\n // Decode a character code into a byte.\n // Must return 256 if character is out of alphabet range.\n Coder.prototype._decodeChar = function (c) {\n // Decoding works similar to encoding: using the same comparison\n // function, but now it works on ranges: result is always incremented\n // by value, but this value becomes zero if the range is not\n // satisfied.\n //\n // Decoding starts with invalid value, 256, which is then\n // subtracted when the range is satisfied. If none of the ranges\n // apply, the function returns 256, which is then checked by\n // the caller to throw error.\n var result = INVALID_BYTE; // start with invalid character\n // c == 43 (c > 42 and c < 44)\n result += (((42 - c) & (c - 44)) >>> 8) & (-INVALID_BYTE + c - 43 + 62);\n // c == 47 (c > 46 and c < 48)\n result += (((46 - c) & (c - 48)) >>> 8) & (-INVALID_BYTE + c - 47 + 63);\n // c > 47 and c < 58\n result += (((47 - c) & (c - 58)) >>> 8) & (-INVALID_BYTE + c - 48 + 52);\n // c > 64 and c < 91\n result += (((64 - c) & (c - 91)) >>> 8) & (-INVALID_BYTE + c - 65 + 0);\n // c > 96 and c < 123\n result += (((96 - c) & (c - 123)) >>> 8) & (-INVALID_BYTE + c - 97 + 26);\n return result;\n };\n Coder.prototype._getPaddingLength = function (s) {\n var paddingLength = 0;\n if (this._paddingCharacter) {\n for (var i = s.length - 1; i >= 0; i--) {\n if (s[i] !== this._paddingCharacter) {\n break;\n }\n paddingLength++;\n }\n if (s.length < 4 || paddingLength > 2) {\n throw new Error(\"Base64Coder: incorrect padding\");\n }\n }\n return paddingLength;\n };\n return Coder;\n}());\nexports.Coder = Coder;\nvar stdCoder = new Coder();\nfunction encode(data) {\n return stdCoder.encode(data);\n}\nexports.encode = encode;\nfunction decode(s) {\n return stdCoder.decode(s);\n}\nexports.decode = decode;\n/**\n * Implements URL-safe Base64 encoding.\n * (Same as Base64, but '+' is replaced with '-', and '/' with '_').\n *\n * Operates in constant time.\n */\nvar URLSafeCoder = /** @class */ (function (_super) {\n __extends(URLSafeCoder, _super);\n function URLSafeCoder() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n // URL-safe encoding have the following encoded/decoded ranges:\n //\n // ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz 0123456789 - _\n // Index: 0 - 25 26 - 51 52 - 61 62 63\n // ASCII: 65 - 90 97 - 122 48 - 57 45 95\n //\n URLSafeCoder.prototype._encodeByte = function (b) {\n var result = b;\n // b >= 0\n result += 65;\n // b > 25\n result += ((25 - b) >>> 8) & ((0 - 65) - 26 + 97);\n // b > 51\n result += ((51 - b) >>> 8) & ((26 - 97) - 52 + 48);\n // b > 61\n result += ((61 - b) >>> 8) & ((52 - 48) - 62 + 45);\n // b > 62\n result += ((62 - b) >>> 8) & ((62 - 45) - 63 + 95);\n return String.fromCharCode(result);\n };\n URLSafeCoder.prototype._decodeChar = function (c) {\n var result = INVALID_BYTE;\n // c == 45 (c > 44 and c < 46)\n result += (((44 - c) & (c - 46)) >>> 8) & (-INVALID_BYTE + c - 45 + 62);\n // c == 95 (c > 94 and c < 96)\n result += (((94 - c) & (c - 96)) >>> 8) & (-INVALID_BYTE + c - 95 + 63);\n // c > 47 and c < 58\n result += (((47 - c) & (c - 58)) >>> 8) & (-INVALID_BYTE + c - 48 + 52);\n // c > 64 and c < 91\n result += (((64 - c) & (c - 91)) >>> 8) & (-INVALID_BYTE + c - 65 + 0);\n // c > 96 and c < 123\n result += (((96 - c) & (c - 123)) >>> 8) & (-INVALID_BYTE + c - 97 + 26);\n return result;\n };\n return URLSafeCoder;\n}(Coder));\nexports.URLSafeCoder = URLSafeCoder;\nvar urlSafeCoder = new URLSafeCoder();\nfunction encodeURLSafe(data) {\n return urlSafeCoder.encode(data);\n}\nexports.encodeURLSafe = encodeURLSafe;\nfunction decodeURLSafe(s) {\n return urlSafeCoder.decode(s);\n}\nexports.decodeURLSafe = decodeURLSafe;\nexports.encodedLength = function (length) {\n return stdCoder.encodedLength(length);\n};\nexports.maxDecodedLength = function (length) {\n return stdCoder.maxDecodedLength(length);\n};\nexports.decodedLength = function (s) {\n return stdCoder.decodedLength(s);\n};\n\n\n/***/ },\n\n/***/ 978\n(__unused_webpack_module, exports) {\n\n\"use strict\";\nvar __webpack_unused_export__;\n\n// Copyright (C) 2016 Dmitry Chestnykh\n// MIT License. See LICENSE file for details.\n__webpack_unused_export__ = ({ value: true });\n/**\n * Package utf8 implements UTF-8 encoding and decoding.\n */\nvar INVALID_UTF16 = \"utf8: invalid string\";\nvar INVALID_UTF8 = \"utf8: invalid source encoding\";\n/**\n * Encodes the given string into UTF-8 byte array.\n * Throws if the source string has invalid UTF-16 encoding.\n */\nfunction encode(s) {\n // Calculate result length and allocate output array.\n // encodedLength() also validates string and throws errors,\n // so we don't need repeat validation here.\n var arr = new Uint8Array(encodedLength(s));\n var pos = 0;\n for (var i = 0; i < s.length; i++) {\n var c = s.charCodeAt(i);\n if (c < 0x80) {\n arr[pos++] = c;\n }\n else if (c < 0x800) {\n arr[pos++] = 0xc0 | c >> 6;\n arr[pos++] = 0x80 | c & 0x3f;\n }\n else if (c < 0xd800) {\n arr[pos++] = 0xe0 | c >> 12;\n arr[pos++] = 0x80 | (c >> 6) & 0x3f;\n arr[pos++] = 0x80 | c & 0x3f;\n }\n else {\n i++; // get one more character\n c = (c & 0x3ff) << 10;\n c |= s.charCodeAt(i) & 0x3ff;\n c += 0x10000;\n arr[pos++] = 0xf0 | c >> 18;\n arr[pos++] = 0x80 | (c >> 12) & 0x3f;\n arr[pos++] = 0x80 | (c >> 6) & 0x3f;\n arr[pos++] = 0x80 | c & 0x3f;\n }\n }\n return arr;\n}\n__webpack_unused_export__ = encode;\n/**\n * Returns the number of bytes required to encode the given string into UTF-8.\n * Throws if the source string has invalid UTF-16 encoding.\n */\nfunction encodedLength(s) {\n var result = 0;\n for (var i = 0; i < s.length; i++) {\n var c = s.charCodeAt(i);\n if (c < 0x80) {\n result += 1;\n }\n else if (c < 0x800) {\n result += 2;\n }\n else if (c < 0xd800) {\n result += 3;\n }\n else if (c <= 0xdfff) {\n if (i >= s.length - 1) {\n throw new Error(INVALID_UTF16);\n }\n i++; // \"eat\" next character\n result += 4;\n }\n else {\n throw new Error(INVALID_UTF16);\n }\n }\n return result;\n}\n__webpack_unused_export__ = encodedLength;\n/**\n * Decodes the given byte array from UTF-8 into a string.\n * Throws if encoding is invalid.\n */\nfunction decode(arr) {\n var chars = [];\n for (var i = 0; i < arr.length; i++) {\n var b = arr[i];\n if (b & 0x80) {\n var min = void 0;\n if (b < 0xe0) {\n // Need 1 more byte.\n if (i >= arr.length) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n if ((n1 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x1f) << 6 | (n1 & 0x3f);\n min = 0x80;\n }\n else if (b < 0xf0) {\n // Need 2 more bytes.\n if (i >= arr.length - 1) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 12 | (n1 & 0x3f) << 6 | (n2 & 0x3f);\n min = 0x800;\n }\n else if (b < 0xf8) {\n // Need 3 more bytes.\n if (i >= arr.length - 2) {\n throw new Error(INVALID_UTF8);\n }\n var n1 = arr[++i];\n var n2 = arr[++i];\n var n3 = arr[++i];\n if ((n1 & 0xc0) !== 0x80 || (n2 & 0xc0) !== 0x80 || (n3 & 0xc0) !== 0x80) {\n throw new Error(INVALID_UTF8);\n }\n b = (b & 0x0f) << 18 | (n1 & 0x3f) << 12 | (n2 & 0x3f) << 6 | (n3 & 0x3f);\n min = 0x10000;\n }\n else {\n throw new Error(INVALID_UTF8);\n }\n if (b < min || (b >= 0xd800 && b <= 0xdfff)) {\n throw new Error(INVALID_UTF8);\n }\n if (b >= 0x10000) {\n // Surrogate pair.\n if (b > 0x10ffff) {\n throw new Error(INVALID_UTF8);\n }\n b -= 0x10000;\n chars.push(String.fromCharCode(0xd800 | (b >> 10)));\n b = 0xdc00 | (b & 0x3ff);\n }\n }\n chars.push(String.fromCharCode(b));\n }\n return chars.join(\"\");\n}\nexports.D4 = decode;\n\n\n/***/ },\n\n/***/ 721\n(module, __unused_webpack_exports, __webpack_require__) {\n\n// required so we don't have to do require('pusher').default etc.\nmodule.exports = __webpack_require__(207)[\"default\"];\n\n\n/***/ },\n\n/***/ 207\n(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n \"default\": () => (/* binding */ pusher)\n});\n\n;// ./src/runtimes/web/dom/script_receiver_factory.ts\nclass ScriptReceiverFactory {\n constructor(prefix, name) {\n this.lastId = 0;\n this.prefix = prefix;\n this.name = name;\n }\n create(callback) {\n this.lastId++;\n var number = this.lastId;\n var id = this.prefix + number;\n var name = this.name + '[' + number + ']';\n var called = false;\n var callbackWrapper = function () {\n if (!called) {\n callback.apply(null, arguments);\n called = true;\n }\n };\n this[number] = callbackWrapper;\n return { number: number, id: id, name: name, callback: callbackWrapper };\n }\n remove(receiver) {\n delete this[receiver.number];\n }\n}\nvar ScriptReceivers = new ScriptReceiverFactory('_pusher_script_', 'Pusher.ScriptReceivers');\n\n;// ./src/core/defaults.ts\nvar Defaults = {\n VERSION: \"8.5.0\",\n PROTOCOL: 7,\n wsPort: 80,\n wssPort: 443,\n wsPath: '',\n httpHost: 'sockjs.pusher.com',\n httpPort: 80,\n httpsPort: 443,\n httpPath: '/pusher',\n stats_host: 'stats.pusher.com',\n authEndpoint: '/pusher/auth',\n authTransport: 'ajax',\n activityTimeout: 120000,\n pongTimeout: 30000,\n unavailableTimeout: 10000,\n userAuthentication: {\n endpoint: '/pusher/user-auth',\n transport: 'ajax',\n },\n channelAuthorization: {\n endpoint: '/pusher/auth',\n transport: 'ajax',\n },\n cdn_http: \"http://js.pusher.com\",\n cdn_https: \"https://js.pusher.com\",\n dependency_suffix: \"\",\n};\n/* harmony default export */ const defaults = (Defaults);\n\n;// ./src/runtimes/web/dom/dependency_loader.ts\n\n\nclass DependencyLoader {\n constructor(options) {\n this.options = options;\n this.receivers = options.receivers || ScriptReceivers;\n this.loading = {};\n }\n load(name, options, callback) {\n var self = this;\n if (self.loading[name] && self.loading[name].length > 0) {\n self.loading[name].push(callback);\n }\n else {\n self.loading[name] = [callback];\n var request = runtime.createScriptRequest(self.getPath(name, options));\n var receiver = self.receivers.create(function (error) {\n self.receivers.remove(receiver);\n if (self.loading[name]) {\n var callbacks = self.loading[name];\n delete self.loading[name];\n var successCallback = function (wasSuccessful) {\n if (!wasSuccessful) {\n request.cleanup();\n }\n };\n for (var i = 0; i < callbacks.length; i++) {\n callbacks[i](error, successCallback);\n }\n }\n });\n request.send(receiver);\n }\n }\n getRoot(options) {\n var cdn;\n var protocol = runtime.getDocument().location.protocol;\n if ((options && options.useTLS) || protocol === 'https:') {\n cdn = this.options.cdn_https;\n }\n else {\n cdn = this.options.cdn_http;\n }\n return cdn.replace(/\\/*$/, '') + '/' + this.options.version;\n }\n getPath(name, options) {\n return this.getRoot(options) + '/' + name + this.options.suffix + '.js';\n }\n}\n\n;// ./src/runtimes/web/dom/dependencies.ts\n\n\n\nvar DependenciesReceivers = new ScriptReceiverFactory('_pusher_dependencies', 'Pusher.DependenciesReceivers');\nvar Dependencies = new DependencyLoader({\n cdn_http: defaults.cdn_http,\n cdn_https: defaults.cdn_https,\n version: defaults.VERSION,\n suffix: defaults.dependency_suffix,\n receivers: DependenciesReceivers,\n});\n\n;// ./src/core/utils/url_store.ts\nconst urlStore = {\n baseUrl: 'https://pusher.com',\n urls: {\n authenticationEndpoint: {\n path: '/docs/channels/server_api/authenticating_users',\n },\n authorizationEndpoint: {\n path: '/docs/channels/server_api/authorizing-users/',\n },\n javascriptQuickStart: {\n path: '/docs/javascript_quick_start',\n },\n triggeringClientEvents: {\n path: '/docs/client_api_guide/client_events#trigger-events',\n },\n encryptedChannelSupport: {\n fullUrl: 'https://github.com/pusher/pusher-js/tree/cc491015371a4bde5743d1c87a0fbac0feb53195#encrypted-channel-support',\n },\n },\n};\nconst buildLogSuffix = function (key) {\n const urlPrefix = 'See:';\n const urlObj = urlStore.urls[key];\n if (!urlObj)\n return '';\n let url;\n if (urlObj.fullUrl) {\n url = urlObj.fullUrl;\n }\n else if (urlObj.path) {\n url = urlStore.baseUrl + urlObj.path;\n }\n if (!url)\n return '';\n return `${urlPrefix} ${url}`;\n};\n/* harmony default export */ const url_store = ({ buildLogSuffix });\n\n;// ./src/core/auth/options.ts\nvar AuthRequestType;\n(function (AuthRequestType) {\n AuthRequestType[\"UserAuthentication\"] = \"user-authentication\";\n AuthRequestType[\"ChannelAuthorization\"] = \"channel-authorization\";\n})(AuthRequestType || (AuthRequestType = {}));\n\n;// ./src/core/errors.ts\nclass BadEventName extends Error {\n constructor(msg) {\n super(msg);\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\nclass BadChannelName extends Error {\n constructor(msg) {\n super(msg);\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\nclass RequestTimedOut extends Error {\n constructor(msg) {\n super(msg);\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\nclass TransportPriorityTooLow extends Error {\n constructor(msg) {\n super(msg);\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\nclass TransportClosed extends Error {\n constructor(msg) {\n super(msg);\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\nclass UnsupportedFeature extends Error {\n constructor(msg) {\n super(msg);\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\nclass UnsupportedTransport extends Error {\n constructor(msg) {\n super(msg);\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\nclass UnsupportedStrategy extends Error {\n constructor(msg) {\n super(msg);\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\nclass HTTPAuthError extends Error {\n constructor(status, msg) {\n super(msg);\n this.status = status;\n Object.setPrototypeOf(this, new.target.prototype);\n }\n}\n\n;// ./src/runtimes/isomorphic/auth/xhr_auth.ts\n\n\n\n\nconst ajax = function (context, query, authOptions, authRequestType, callback) {\n const xhr = runtime.createXHR();\n xhr.open('POST', authOptions.endpoint, true);\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n for (var headerName in authOptions.headers) {\n xhr.setRequestHeader(headerName, authOptions.headers[headerName]);\n }\n if (authOptions.headersProvider != null) {\n let dynamicHeaders = authOptions.headersProvider();\n for (var headerName in dynamicHeaders) {\n xhr.setRequestHeader(headerName, dynamicHeaders[headerName]);\n }\n }\n xhr.onreadystatechange = function () {\n if (xhr.readyState === 4) {\n if (xhr.status === 200) {\n let data;\n let parsed = false;\n try {\n data = JSON.parse(xhr.responseText);\n parsed = true;\n }\n catch (e) {\n callback(new HTTPAuthError(200, `JSON returned from ${authRequestType.toString()} endpoint was invalid, yet status code was 200. Data was: ${xhr.responseText}`), null);\n }\n if (parsed) {\n callback(null, data);\n }\n }\n else {\n let suffix = '';\n switch (authRequestType) {\n case AuthRequestType.UserAuthentication:\n suffix = url_store.buildLogSuffix('authenticationEndpoint');\n break;\n case AuthRequestType.ChannelAuthorization:\n suffix = `Clients must be authorized to join private or presence channels. ${url_store.buildLogSuffix('authorizationEndpoint')}`;\n break;\n }\n callback(new HTTPAuthError(xhr.status, `Unable to retrieve auth string from ${authRequestType.toString()} endpoint - ` +\n `received status: ${xhr.status} from ${authOptions.endpoint}. ${suffix}`), null);\n }\n }\n };\n xhr.send(query);\n return xhr;\n};\n/* harmony default export */ const xhr_auth = (ajax);\n\n;// ./src/core/base64.ts\nfunction encode(s) {\n return btoa(utob(s));\n}\nvar fromCharCode = String.fromCharCode;\nvar b64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\nvar b64tab = {};\nfor (var i = 0, l = b64chars.length; i < l; i++) {\n b64tab[b64chars.charAt(i)] = i;\n}\nvar cb_utob = function (c) {\n var cc = c.charCodeAt(0);\n return cc < 0x80\n ? c\n : cc < 0x800\n ? fromCharCode(0xc0 | (cc >>> 6)) + fromCharCode(0x80 | (cc & 0x3f))\n : fromCharCode(0xe0 | ((cc >>> 12) & 0x0f)) +\n fromCharCode(0x80 | ((cc >>> 6) & 0x3f)) +\n fromCharCode(0x80 | (cc & 0x3f));\n};\nvar utob = function (u) {\n return u.replace(/[^\\x00-\\x7F]/g, cb_utob);\n};\nvar cb_encode = function (ccc) {\n var padlen = [0, 2, 1][ccc.length % 3];\n var ord = (ccc.charCodeAt(0) << 16) |\n ((ccc.length > 1 ? ccc.charCodeAt(1) : 0) << 8) |\n (ccc.length > 2 ? ccc.charCodeAt(2) : 0);\n var chars = [\n b64chars.charAt(ord >>> 18),\n b64chars.charAt((ord >>> 12) & 63),\n padlen >= 2 ? '=' : b64chars.charAt((ord >>> 6) & 63),\n padlen >= 1 ? '=' : b64chars.charAt(ord & 63),\n ];\n return chars.join('');\n};\nvar btoa = window.btoa ||\n function (b) {\n return b.replace(/[\\s\\S]{1,3}/g, cb_encode);\n };\n\n;// ./src/core/utils/timers/abstract_timer.ts\nclass Timer {\n constructor(set, clear, delay, callback) {\n this.clear = clear;\n this.timer = set(() => {\n if (this.timer) {\n this.timer = callback(this.timer);\n }\n }, delay);\n }\n isRunning() {\n return this.timer !== null;\n }\n ensureAborted() {\n if (this.timer) {\n this.clear(this.timer);\n this.timer = null;\n }\n }\n}\n/* harmony default export */ const abstract_timer = (Timer);\n\n;// ./src/core/utils/timers/index.ts\n\nfunction timers_clearTimeout(timer) {\n window.clearTimeout(timer);\n}\nfunction timers_clearInterval(timer) {\n window.clearInterval(timer);\n}\nclass OneOffTimer extends abstract_timer {\n constructor(delay, callback) {\n super(setTimeout, timers_clearTimeout, delay, function (timer) {\n callback();\n return null;\n });\n }\n}\nclass PeriodicTimer extends abstract_timer {\n constructor(delay, callback) {\n super(setInterval, timers_clearInterval, delay, function (timer) {\n callback();\n return timer;\n });\n }\n}\n\n;// ./src/core/util.ts\n\nvar Util = {\n now() {\n if (Date.now) {\n return Date.now();\n }\n else {\n return new Date().valueOf();\n }\n },\n defer(callback) {\n return new OneOffTimer(0, callback);\n },\n method(name, ...args) {\n var boundArguments = Array.prototype.slice.call(arguments, 1);\n return function (object) {\n return object[name].apply(object, boundArguments.concat(arguments));\n };\n },\n};\n/* harmony default export */ const util = (Util);\n\n;// ./src/core/utils/collections.ts\n\n\nfunction extend(target, ...sources) {\n for (var i = 0; i < sources.length; i++) {\n var extensions = sources[i];\n for (var property in extensions) {\n if (extensions[property] &&\n extensions[property].constructor &&\n extensions[property].constructor === Object) {\n target[property] = extend(target[property] || {}, extensions[property]);\n }\n else {\n target[property] = extensions[property];\n }\n }\n }\n return target;\n}\nfunction stringify() {\n var m = ['Pusher'];\n for (var i = 0; i < arguments.length; i++) {\n if (typeof arguments[i] === 'string') {\n m.push(arguments[i]);\n }\n else {\n m.push(safeJSONStringify(arguments[i]));\n }\n }\n return m.join(' : ');\n}\nfunction arrayIndexOf(array, item) {\n var nativeIndexOf = Array.prototype.indexOf;\n if (array === null) {\n return -1;\n }\n if (nativeIndexOf && array.indexOf === nativeIndexOf) {\n return array.indexOf(item);\n }\n for (var i = 0, l = array.length; i < l; i++) {\n if (array[i] === item) {\n return i;\n }\n }\n return -1;\n}\nfunction objectApply(object, f) {\n for (var key in object) {\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n f(object[key], key, object);\n }\n }\n}\nfunction keys(object) {\n var keys = [];\n objectApply(object, function (_, key) {\n keys.push(key);\n });\n return keys;\n}\nfunction values(object) {\n var values = [];\n objectApply(object, function (value) {\n values.push(value);\n });\n return values;\n}\nfunction apply(array, f, context) {\n for (var i = 0; i < array.length; i++) {\n f.call(context || window, array[i], i, array);\n }\n}\nfunction map(array, f) {\n var result = [];\n for (var i = 0; i < array.length; i++) {\n result.push(f(array[i], i, array, result));\n }\n return result;\n}\nfunction mapObject(object, f) {\n var result = {};\n objectApply(object, function (value, key) {\n result[key] = f(value);\n });\n return result;\n}\nfunction filter(array, test) {\n test =\n test ||\n function (value) {\n return !!value;\n };\n var result = [];\n for (var i = 0; i < array.length; i++) {\n if (test(array[i], i, array, result)) {\n result.push(array[i]);\n }\n }\n return result;\n}\nfunction filterObject(object, test) {\n var result = {};\n objectApply(object, function (value, key) {\n if ((test && test(value, key, object, result)) || Boolean(value)) {\n result[key] = value;\n }\n });\n return result;\n}\nfunction flatten(object) {\n var result = [];\n objectApply(object, function (value, key) {\n result.push([key, value]);\n });\n return result;\n}\nfunction any(array, test) {\n for (var i = 0; i < array.length; i++) {\n if (test(array[i], i, array)) {\n return true;\n }\n }\n return false;\n}\nfunction collections_all(array, test) {\n for (var i = 0; i < array.length; i++) {\n if (!test(array[i], i, array)) {\n return false;\n }\n }\n return true;\n}\nfunction encodeParamsObject(data) {\n return mapObject(data, function (value) {\n if (typeof value === 'object') {\n value = safeJSONStringify(value);\n }\n return encodeURIComponent(encode(value.toString()));\n });\n}\nfunction buildQueryString(data) {\n var params = filterObject(data, function (value) {\n return value !== undefined;\n });\n var query = map(flatten(encodeParamsObject(params)), util.method('join', '=')).join('&');\n return query;\n}\nfunction decycleObject(object) {\n var objects = [], paths = [];\n return (function derez(value, path) {\n var i, name, nu;\n switch (typeof value) {\n case 'object':\n if (!value) {\n return null;\n }\n for (i = 0; i < objects.length; i += 1) {\n if (objects[i] === value) {\n return { $ref: paths[i] };\n }\n }\n objects.push(value);\n paths.push(path);\n if (Object.prototype.toString.apply(value) === '[object Array]') {\n nu = [];\n for (i = 0; i < value.length; i += 1) {\n nu[i] = derez(value[i], path + '[' + i + ']');\n }\n }\n else {\n nu = {};\n for (name in value) {\n if (Object.prototype.hasOwnProperty.call(value, name)) {\n nu[name] = derez(value[name], path + '[' + JSON.stringify(name) + ']');\n }\n }\n }\n return nu;\n case 'number':\n case 'string':\n case 'boolean':\n return value;\n }\n })(object, '$');\n}\nfunction safeJSONStringify(source) {\n try {\n return JSON.stringify(source);\n }\n catch (e) {\n return JSON.stringify(decycleObject(source));\n }\n}\n\n;// ./src/core/logger.ts\n\n\nclass Logger {\n constructor() {\n this.globalLog = (message) => {\n if (window.console && window.console.log) {\n window.console.log(message);\n }\n };\n }\n debug(...args) {\n this.log(this.globalLog, args);\n }\n warn(...args) {\n this.log(this.globalLogWarn, args);\n }\n error(...args) {\n this.log(this.globalLogError, args);\n }\n globalLogWarn(message) {\n if (window.console && window.console.warn) {\n window.console.warn(message);\n }\n else {\n this.globalLog(message);\n }\n }\n globalLogError(message) {\n if (window.console && window.console.error) {\n window.console.error(message);\n }\n else {\n this.globalLogWarn(message);\n }\n }\n log(defaultLoggingFunction, ...args) {\n var message = stringify.apply(this, arguments);\n if (pusher.log) {\n pusher.log(message);\n }\n else if (pusher.logToConsole) {\n const log = defaultLoggingFunction.bind(this);\n log(message);\n }\n }\n}\n/* harmony default export */ const logger = (new Logger());\n\n;// ./src/runtimes/web/auth/jsonp_auth.ts\n\nvar jsonp = function (context, query, authOptions, authRequestType, callback) {\n if (authOptions.headers !== undefined ||\n authOptions.headersProvider != null) {\n logger.warn(`To send headers with the ${authRequestType.toString()} request, you must use AJAX, rather than JSONP.`);\n }\n var callbackName = context.nextAuthCallbackID.toString();\n context.nextAuthCallbackID++;\n var document = context.getDocument();\n var script = document.createElement('script');\n context.auth_callbacks[callbackName] = function (data) {\n callback(null, data);\n };\n var callback_name = \"Pusher.auth_callbacks['\" + callbackName + \"']\";\n script.src =\n authOptions.endpoint +\n '?callback=' +\n encodeURIComponent(callback_name) +\n '&' +\n query;\n var head = document.getElementsByTagName('head')[0] || document.documentElement;\n head.insertBefore(script, head.firstChild);\n};\n/* harmony default export */ const jsonp_auth = (jsonp);\n\n;// ./src/runtimes/web/dom/script_request.ts\nclass ScriptRequest {\n constructor(src) {\n this.src = src;\n }\n send(receiver) {\n var self = this;\n var errorString = 'Error loading ' + self.src;\n self.script = document.createElement('script');\n self.script.id = receiver.id;\n self.script.src = self.src;\n self.script.type = 'text/javascript';\n self.script.charset = 'UTF-8';\n if (self.script.addEventListener) {\n self.script.onerror = function () {\n receiver.callback(errorString);\n };\n self.script.onload = function () {\n receiver.callback(null);\n };\n }\n else {\n self.script.onreadystatechange = function () {\n if (self.script.readyState === 'loaded' ||\n self.script.readyState === 'complete') {\n receiver.callback(null);\n }\n };\n }\n if (self.script.async === undefined &&\n document.attachEvent &&\n /opera/i.test(navigator.userAgent)) {\n self.errorScript = document.createElement('script');\n self.errorScript.id = receiver.id + '_error';\n self.errorScript.text = receiver.name + \"('\" + errorString + \"');\";\n self.script.async = self.errorScript.async = false;\n }\n else {\n self.script.async = true;\n }\n var head = document.getElementsByTagName('head')[0];\n head.insertBefore(self.script, head.firstChild);\n if (self.errorScript) {\n head.insertBefore(self.errorScript, self.script.nextSibling);\n }\n }\n cleanup() {\n if (this.script) {\n this.script.onload = this.script.onerror = null;\n this.script.onreadystatechange = null;\n }\n if (this.script && this.script.parentNode) {\n this.script.parentNode.removeChild(this.script);\n }\n if (this.errorScript && this.errorScript.parentNode) {\n this.errorScript.parentNode.removeChild(this.errorScript);\n }\n this.script = null;\n this.errorScript = null;\n }\n}\n\n;// ./src/runtimes/web/dom/jsonp_request.ts\n\n\nclass JSONPRequest {\n constructor(url, data) {\n this.url = url;\n this.data = data;\n }\n send(receiver) {\n if (this.request) {\n return;\n }\n var query = buildQueryString(this.data);\n var url = this.url + '/' + receiver.number + '?' + query;\n this.request = runtime.createScriptRequest(url);\n this.request.send(receiver);\n }\n cleanup() {\n if (this.request) {\n this.request.cleanup();\n }\n }\n}\n\n;// ./src/runtimes/web/timeline/jsonp_timeline.ts\n\n\nvar getAgent = function (sender, useTLS) {\n return function (data, callback) {\n var scheme = 'http' + (useTLS ? 's' : '') + '://';\n var url = scheme + (sender.host || sender.options.host) + sender.options.path;\n var request = runtime.createJSONPRequest(url, data);\n var receiver = runtime.ScriptReceivers.create(function (error, result) {\n ScriptReceivers.remove(receiver);\n request.cleanup();\n if (result && result.host) {\n sender.host = result.host;\n }\n if (callback) {\n callback(error, result);\n }\n });\n request.send(receiver);\n };\n};\nvar jsonp_timeline_jsonp = {\n name: 'jsonp',\n getAgent,\n};\n/* harmony default export */ const jsonp_timeline = (jsonp_timeline_jsonp);\n\n;// ./src/core/transports/url_schemes.ts\n\nfunction getGenericURL(baseScheme, params, path) {\n var scheme = baseScheme + (params.useTLS ? 's' : '');\n var host = params.useTLS ? params.hostTLS : params.hostNonTLS;\n return scheme + '://' + host + path;\n}\nfunction getGenericPath(key, queryString) {\n var path = '/app/' + key;\n var query = '?protocol=' +\n defaults.PROTOCOL +\n '&client=js' +\n '&version=' +\n defaults.VERSION +\n (queryString ? '&' + queryString : '');\n return path + query;\n}\nvar ws = {\n getInitial: function (key, params) {\n var path = (params.httpPath || '') + getGenericPath(key, 'flash=false');\n return getGenericURL('ws', params, path);\n },\n};\nvar http = {\n getInitial: function (key, params) {\n var path = (params.httpPath || '/pusher') + getGenericPath(key);\n return getGenericURL('http', params, path);\n },\n};\nvar sockjs = {\n getInitial: function (key, params) {\n return getGenericURL('http', params, params.httpPath || '/pusher');\n },\n getPath: function (key, params) {\n return getGenericPath(key);\n },\n};\n\n;// ./src/core/events/callback_registry.ts\n\nclass CallbackRegistry {\n constructor() {\n this._callbacks = {};\n }\n get(name) {\n return this._callbacks[prefix(name)];\n }\n add(name, callback, context) {\n var prefixedEventName = prefix(name);\n this._callbacks[prefixedEventName] =\n this._callbacks[prefixedEventName] || [];\n this._callbacks[prefixedEventName].push({\n fn: callback,\n context: context,\n });\n }\n remove(name, callback, context) {\n if (!name && !callback && !context) {\n this._callbacks = {};\n return;\n }\n var names = name ? [prefix(name)] : keys(this._callbacks);\n if (callback || context) {\n this.removeCallback(names, callback, context);\n }\n else {\n this.removeAllCallbacks(names);\n }\n }\n removeCallback(names, callback, context) {\n apply(names, function (name) {\n this._callbacks[name] = filter(this._callbacks[name] || [], function (binding) {\n return ((callback && callback !== binding.fn) ||\n (context && context !== binding.context));\n });\n if (this._callbacks[name].length === 0) {\n delete this._callbacks[name];\n }\n }, this);\n }\n removeAllCallbacks(names) {\n apply(names, function (name) {\n delete this._callbacks[name];\n }, this);\n }\n}\nfunction prefix(name) {\n return '_' + name;\n}\n\n;// ./src/core/events/dispatcher.ts\n\n\nclass Dispatcher {\n constructor(failThrough) {\n this.callbacks = new CallbackRegistry();\n this.global_callbacks = [];\n this.failThrough = failThrough;\n }\n bind(eventName, callback, context) {\n this.callbacks.add(eventName, callback, context);\n return this;\n }\n bind_global(callback) {\n this.global_callbacks.push(callback);\n return this;\n }\n unbind(eventName, callback, context) {\n this.callbacks.remove(eventName, callback, context);\n return this;\n }\n unbind_global(callback) {\n if (!callback) {\n this.global_callbacks = [];\n return this;\n }\n this.global_callbacks = filter(this.global_callbacks || [], (c) => c !== callback);\n return this;\n }\n unbind_all() {\n this.unbind();\n this.unbind_global();\n return this;\n }\n emit(eventName, data, metadata) {\n for (var i = 0; i < this.global_callbacks.length; i++) {\n this.global_callbacks[i](eventName, data);\n }\n var callbacks = this.callbacks.get(eventName);\n var args = [];\n if (metadata) {\n args.push(data, metadata);\n }\n else if (data) {\n args.push(data);\n }\n if (callbacks && callbacks.length > 0) {\n for (var i = 0; i < callbacks.length; i++) {\n callbacks[i].fn.apply(callbacks[i].context || window, args);\n }\n }\n else if (this.failThrough) {\n this.failThrough(eventName, data);\n }\n return this;\n }\n}\n\n;// ./src/core/transports/transport_connection.ts\n\n\n\n\n\nclass TransportConnection extends Dispatcher {\n constructor(hooks, name, priority, key, options) {\n super();\n this.initialize = runtime.transportConnectionInitializer;\n this.hooks = hooks;\n this.name = name;\n this.priority = priority;\n this.key = key;\n this.options = options;\n this.state = 'new';\n this.timeline = options.timeline;\n this.activityTimeout = options.activityTimeout;\n this.id = this.timeline.generateUniqueID();\n }\n handlesActivityChecks() {\n return Boolean(this.hooks.handlesActivityChecks);\n }\n supportsPing() {\n return Boolean(this.hooks.supportsPing);\n }\n connect() {\n if (this.socket || this.state !== 'initialized') {\n return false;\n }\n var url = this.hooks.urls.getInitial(this.key, this.options);\n try {\n this.socket = this.hooks.getSocket(url, this.options);\n }\n catch (e) {\n util.defer(() => {\n this.onError(e);\n this.changeState('closed');\n });\n return false;\n }\n this.bindListeners();\n logger.debug('Connecting', { transport: this.name, url });\n this.changeState('connecting');\n return true;\n }\n close() {\n if (this.socket) {\n this.socket.close();\n return true;\n }\n else {\n return false;\n }\n }\n send(data) {\n if (this.state === 'open') {\n util.defer(() => {\n if (this.socket) {\n this.socket.send(data);\n }\n });\n return true;\n }\n else {\n return false;\n }\n }\n ping() {\n if (this.state === 'open' && this.supportsPing()) {\n this.socket.ping();\n }\n }\n onOpen() {\n if (this.hooks.beforeOpen) {\n this.hooks.beforeOpen(this.socket, this.hooks.urls.getPath(this.key, this.options));\n }\n this.changeState('open');\n this.socket.onopen = undefined;\n }\n onError(error) {\n this.emit('error', { type: 'WebSocketError', error: error });\n this.timeline.error(this.buildTimelineMessage({ error: error.toString() }));\n }\n onClose(closeEvent) {\n if (closeEvent) {\n this.changeState('closed', {\n code: closeEvent.code,\n reason: closeEvent.reason,\n wasClean: closeEvent.wasClean,\n });\n }\n else {\n this.changeState('closed');\n }\n this.unbindListeners();\n this.socket = undefined;\n }\n onMessage(message) {\n this.emit('message', message);\n }\n onActivity() {\n this.emit('activity');\n }\n bindListeners() {\n this.socket.onopen = () => {\n this.onOpen();\n };\n this.socket.onerror = (error) => {\n this.onError(error);\n };\n this.socket.onclose = (closeEvent) => {\n this.onClose(closeEvent);\n };\n this.socket.onmessage = (message) => {\n this.onMessage(message);\n };\n if (this.supportsPing()) {\n this.socket.onactivity = () => {\n this.onActivity();\n };\n }\n }\n unbindListeners() {\n if (this.socket) {\n this.socket.onopen = undefined;\n this.socket.onerror = undefined;\n this.socket.onclose = undefined;\n this.socket.onmessage = undefined;\n if (this.supportsPing()) {\n this.socket.onactivity = undefined;\n }\n }\n }\n changeState(state, params) {\n this.state = state;\n this.timeline.info(this.buildTimelineMessage({\n state: state,\n params: params,\n }));\n this.emit(state, params);\n }\n buildTimelineMessage(message) {\n return extend({ cid: this.id }, message);\n }\n}\n\n;// ./src/core/transports/transport.ts\n\nclass Transport {\n constructor(hooks) {\n this.hooks = hooks;\n }\n isSupported(environment) {\n return this.hooks.isSupported(environment);\n }\n createConnection(name, priority, key, options) {\n return new TransportConnection(this.hooks, name, priority, key, options);\n }\n}\n\n;// ./src/runtimes/isomorphic/transports/transports.ts\n\n\n\n\nvar WSTransport = new Transport({\n urls: ws,\n handlesActivityChecks: false,\n supportsPing: false,\n isInitialized: function () {\n return Boolean(runtime.getWebSocketAPI());\n },\n isSupported: function () {\n return Boolean(runtime.getWebSocketAPI());\n },\n getSocket: function (url) {\n return runtime.createWebSocket(url);\n },\n});\nvar httpConfiguration = {\n urls: http,\n handlesActivityChecks: false,\n supportsPing: true,\n isInitialized: function () {\n return true;\n },\n};\nvar streamingConfiguration = extend({\n getSocket: function (url) {\n return runtime.HTTPFactory.createStreamingSocket(url);\n },\n}, httpConfiguration);\nvar pollingConfiguration = extend({\n getSocket: function (url) {\n return runtime.HTTPFactory.createPollingSocket(url);\n },\n}, httpConfiguration);\nvar xhrConfiguration = {\n isSupported: function () {\n return runtime.isXHRSupported();\n },\n};\nvar XHRStreamingTransport = new Transport((extend({}, streamingConfiguration, xhrConfiguration)));\nvar XHRPollingTransport = new Transport((extend({}, pollingConfiguration, xhrConfiguration)));\nvar Transports = {\n ws: WSTransport,\n xhr_streaming: XHRStreamingTransport,\n xhr_polling: XHRPollingTransport,\n};\n/* harmony default export */ const transports = (Transports);\n\n;// ./src/runtimes/web/transports/transports.ts\n\n\n\n\n\n\nvar SockJSTransport = new Transport({\n file: 'sockjs',\n urls: sockjs,\n handlesActivityChecks: true,\n supportsPing: false,\n isSupported: function () {\n return true;\n },\n isInitialized: function () {\n return window.SockJS !== undefined;\n },\n getSocket: function (url, options) {\n return new window.SockJS(url, null, {\n js_path: Dependencies.getPath('sockjs', {\n useTLS: options.useTLS,\n }),\n ignore_null_origin: options.ignoreNullOrigin,\n });\n },\n beforeOpen: function (socket, path) {\n socket.send(JSON.stringify({\n path: path,\n }));\n },\n});\nvar xdrConfiguration = {\n isSupported: function (environment) {\n var yes = runtime.isXDRSupported(environment.useTLS);\n return yes;\n },\n};\nvar XDRStreamingTransport = new Transport((extend({}, streamingConfiguration, xdrConfiguration)));\nvar XDRPollingTransport = new Transport((extend({}, pollingConfiguration, xdrConfiguration)));\ntransports.xdr_streaming = XDRStreamingTransport;\ntransports.xdr_polling = XDRPollingTransport;\ntransports.sockjs = SockJSTransport;\n/* harmony default export */ const transports_transports = (transports);\n\n;// ./src/runtimes/web/net_info.ts\n\nclass NetInfo extends Dispatcher {\n constructor() {\n super();\n var self = this;\n if (window.addEventListener !== undefined) {\n window.addEventListener('online', function () {\n self.emit('online');\n }, false);\n window.addEventListener('offline', function () {\n self.emit('offline');\n }, false);\n }\n }\n isOnline() {\n if (window.navigator.onLine === undefined) {\n return true;\n }\n else {\n return window.navigator.onLine;\n }\n }\n}\nvar Network = new NetInfo();\n\n;// ./src/core/transports/assistant_to_the_transport_manager.ts\n\n\nclass AssistantToTheTransportManager {\n constructor(manager, transport, options) {\n this.manager = manager;\n this.transport = transport;\n this.minPingDelay = options.minPingDelay;\n this.maxPingDelay = options.maxPingDelay;\n this.pingDelay = undefined;\n }\n createConnection(name, priority, key, options) {\n options = extend({}, options, {\n activityTimeout: this.pingDelay,\n });\n var connection = this.transport.createConnection(name, priority, key, options);\n var openTimestamp = null;\n var onOpen = function () {\n connection.unbind('open', onOpen);\n connection.bind('closed', onClosed);\n openTimestamp = util.now();\n };\n var onClosed = (closeEvent) => {\n connection.unbind('closed', onClosed);\n if (closeEvent.code === 1002 || closeEvent.code === 1003) {\n this.manager.reportDeath();\n }\n else if (!closeEvent.wasClean && openTimestamp) {\n var lifespan = util.now() - openTimestamp;\n if (lifespan < 2 * this.maxPingDelay) {\n this.manager.reportDeath();\n this.pingDelay = Math.max(lifespan / 2, this.minPingDelay);\n }\n }\n };\n connection.bind('open', onOpen);\n return connection;\n }\n isSupported(environment) {\n return this.manager.isAlive() && this.transport.isSupported(environment);\n }\n}\n\n;// ./src/core/connection/protocol/protocol.ts\nconst Protocol = {\n decodeMessage: function (messageEvent) {\n try {\n var messageData = JSON.parse(messageEvent.data);\n var pusherEventData = messageData.data;\n if (typeof pusherEventData === 'string') {\n try {\n pusherEventData = JSON.parse(messageData.data);\n }\n catch (e) { }\n }\n var pusherEvent = {\n event: messageData.event,\n channel: messageData.channel,\n data: pusherEventData,\n };\n if (messageData.user_id) {\n pusherEvent.user_id = messageData.user_id;\n }\n return pusherEvent;\n }\n catch (e) {\n throw { type: 'MessageParseError', error: e, data: messageEvent.data };\n }\n },\n encodeMessage: function (event) {\n return JSON.stringify(event);\n },\n processHandshake: function (messageEvent) {\n var message = Protocol.decodeMessage(messageEvent);\n if (message.event === 'pusher:connection_established') {\n if (!message.data.activity_timeout) {\n throw 'No activity timeout specified in handshake';\n }\n return {\n action: 'connected',\n id: message.data.socket_id,\n activityTimeout: message.data.activity_timeout * 1000,\n };\n }\n else if (message.event === 'pusher:error') {\n return {\n action: this.getCloseAction(message.data),\n error: this.getCloseError(message.data),\n };\n }\n else {\n throw 'Invalid handshake';\n }\n },\n getCloseAction: function (closeEvent) {\n if (closeEvent.code < 4000) {\n if (closeEvent.code >= 1002 && closeEvent.code <= 1004) {\n return 'backoff';\n }\n else {\n return null;\n }\n }\n else if (closeEvent.code === 4000) {\n return 'tls_only';\n }\n else if (closeEvent.code < 4100) {\n return 'refused';\n }\n else if (closeEvent.code < 4200) {\n return 'backoff';\n }\n else if (closeEvent.code < 4300) {\n return 'retry';\n }\n else {\n return 'refused';\n }\n },\n getCloseError: function (closeEvent) {\n if (closeEvent.code !== 1000 && closeEvent.code !== 1001) {\n return {\n type: 'PusherError',\n data: {\n code: closeEvent.code,\n message: closeEvent.reason || closeEvent.message,\n },\n };\n }\n else {\n return null;\n }\n },\n};\n/* harmony default export */ const protocol = (Protocol);\n\n;// ./src/core/connection/connection.ts\n\n\n\n\nclass Connection extends Dispatcher {\n constructor(id, transport) {\n super();\n this.id = id;\n this.transport = transport;\n this.activityTimeout = transport.activityTimeout;\n this.bindListeners();\n }\n handlesActivityChecks() {\n return this.transport.handlesActivityChecks();\n }\n send(data) {\n return this.transport.send(data);\n }\n send_event(name, data, channel) {\n var event = { event: name, data: data };\n if (channel) {\n event.channel = channel;\n }\n logger.debug('Event sent', event);\n return this.send(protocol.encodeMessage(event));\n }\n ping() {\n if (this.transport.supportsPing()) {\n this.transport.ping();\n }\n else {\n this.send_event('pusher:ping', {});\n }\n }\n close() {\n this.transport.close();\n }\n bindListeners() {\n var listeners = {\n message: (messageEvent) => {\n var pusherEvent;\n try {\n pusherEvent = protocol.decodeMessage(messageEvent);\n }\n catch (e) {\n this.emit('error', {\n type: 'MessageParseError',\n error: e,\n data: messageEvent.data,\n });\n }\n if (pusherEvent !== undefined) {\n logger.debug('Event recd', pusherEvent);\n switch (pusherEvent.event) {\n case 'pusher:error':\n this.emit('error', {\n type: 'PusherError',\n data: pusherEvent.data,\n });\n break;\n case 'pusher:ping':\n this.emit('ping');\n break;\n case 'pusher:pong':\n this.emit('pong');\n break;\n }\n this.emit('message', pusherEvent);\n }\n },\n activity: () => {\n this.emit('activity');\n },\n error: (error) => {\n this.emit('error', error);\n },\n closed: (closeEvent) => {\n unbindListeners();\n if (closeEvent && closeEvent.code) {\n this.handleCloseEvent(closeEvent);\n }\n this.transport = null;\n this.emit('closed');\n },\n };\n var unbindListeners = () => {\n objectApply(listeners, (listener, event) => {\n this.transport.unbind(event, listener);\n });\n };\n objectApply(listeners, (listener, event) => {\n this.transport.bind(event, listener);\n });\n }\n handleCloseEvent(closeEvent) {\n var action = protocol.getCloseAction(closeEvent);\n var error = protocol.getCloseError(closeEvent);\n if (error) {\n this.emit('error', error);\n }\n if (action) {\n this.emit(action, { action: action, error: error });\n }\n }\n}\n\n;// ./src/core/connection/handshake/index.ts\n\n\n\nclass Handshake {\n constructor(transport, callback) {\n this.transport = transport;\n this.callback = callback;\n this.bindListeners();\n }\n close() {\n this.unbindListeners();\n this.transport.close();\n }\n bindListeners() {\n this.onMessage = (m) => {\n this.unbindListeners();\n var result;\n try {\n result = protocol.processHandshake(m);\n }\n catch (e) {\n this.finish('error', { error: e });\n this.transport.close();\n return;\n }\n if (result.action === 'connected') {\n this.finish('connected', {\n connection: new Connection(result.id, this.transport),\n activityTimeout: result.activityTimeout,\n });\n }\n else {\n this.finish(result.action, { error: result.error });\n this.transport.close();\n }\n };\n this.onClosed = (closeEvent) => {\n this.unbindListeners();\n var action = protocol.getCloseAction(closeEvent) || 'backoff';\n var error = protocol.getCloseError(closeEvent);\n this.finish(action, { error: error });\n };\n this.transport.bind('message', this.onMessage);\n this.transport.bind('closed', this.onClosed);\n }\n unbindListeners() {\n this.transport.unbind('message', this.onMessage);\n this.transport.unbind('closed', this.onClosed);\n }\n finish(action, params) {\n this.callback(extend({ transport: this.transport, action: action }, params));\n }\n}\n\n;// ./src/core/timeline/timeline_sender.ts\n\nclass TimelineSender {\n constructor(timeline, options) {\n this.timeline = timeline;\n this.options = options || {};\n }\n send(useTLS, callback) {\n if (this.timeline.isEmpty()) {\n return;\n }\n this.timeline.send(runtime.TimelineTransport.getAgent(this, useTLS), callback);\n }\n}\n\n;// ./src/core/channels/channel.ts\n\n\n\n\n\nclass Channel extends Dispatcher {\n constructor(name, pusher) {\n super(function (event, data) {\n logger.debug('No callbacks on ' + name + ' for ' + event);\n });\n this.name = name;\n this.pusher = pusher;\n this.subscribed = false;\n this.subscriptionPending = false;\n this.subscriptionCancelled = false;\n }\n authorize(socketId, callback) {\n return callback(null, { auth: '' });\n }\n trigger(event, data) {\n if (event.indexOf('client-') !== 0) {\n throw new BadEventName(\"Event '\" + event + \"' does not start with 'client-'\");\n }\n if (!this.subscribed) {\n var suffix = url_store.buildLogSuffix('triggeringClientEvents');\n logger.warn(`Client event triggered before channel 'subscription_succeeded' event . ${suffix}`);\n }\n return this.pusher.send_event(event, data, this.name);\n }\n disconnect() {\n this.subscribed = false;\n this.subscriptionPending = false;\n }\n handleEvent(event) {\n var eventName = event.event;\n var data = event.data;\n if (eventName === 'pusher_internal:subscription_succeeded') {\n this.handleSubscriptionSucceededEvent(event);\n }\n else if (eventName === 'pusher_internal:subscription_count') {\n this.handleSubscriptionCountEvent(event);\n }\n else if (eventName.indexOf('pusher_internal:') !== 0) {\n var metadata = {};\n this.emit(eventName, data, metadata);\n }\n }\n handleSubscriptionSucceededEvent(event) {\n this.subscriptionPending = false;\n this.subscribed = true;\n if (this.subscriptionCancelled) {\n this.pusher.unsubscribe(this.name);\n }\n else {\n this.emit('pusher:subscription_succeeded', event.data);\n }\n }\n handleSubscriptionCountEvent(event) {\n if (event.data.subscription_count) {\n this.subscriptionCount = event.data.subscription_count;\n }\n this.emit('pusher:subscription_count', event.data);\n }\n subscribe() {\n if (this.subscribed) {\n return;\n }\n this.subscriptionPending = true;\n this.subscriptionCancelled = false;\n this.authorize(this.pusher.connection.socket_id, (error, data) => {\n if (error) {\n this.subscriptionPending = false;\n logger.error(error.toString());\n this.emit('pusher:subscription_error', Object.assign({}, {\n type: 'AuthError',\n error: error.message,\n }, error instanceof HTTPAuthError ? { status: error.status } : {}));\n }\n else {\n this.pusher.send_event('pusher:subscribe', {\n auth: data.auth,\n channel_data: data.channel_data,\n channel: this.name,\n });\n }\n });\n }\n unsubscribe() {\n this.subscribed = false;\n this.pusher.send_event('pusher:unsubscribe', {\n channel: this.name,\n });\n }\n cancelSubscription() {\n this.subscriptionCancelled = true;\n }\n reinstateSubscription() {\n this.subscriptionCancelled = false;\n }\n}\n\n;// ./src/core/channels/private_channel.ts\n\nclass PrivateChannel extends Channel {\n authorize(socketId, callback) {\n return this.pusher.config.channelAuthorizer({\n channelName: this.name,\n socketId: socketId,\n }, callback);\n }\n}\n\n;// ./src/core/channels/members.ts\n\nclass Members {\n constructor() {\n this.reset();\n }\n get(id) {\n if (Object.prototype.hasOwnProperty.call(this.members, id)) {\n return {\n id: id,\n info: this.members[id],\n };\n }\n else {\n return null;\n }\n }\n each(callback) {\n objectApply(this.members, (member, id) => {\n callback(this.get(id));\n });\n }\n setMyID(id) {\n this.myID = id;\n }\n onSubscription(subscriptionData) {\n this.members = subscriptionData.presence.hash;\n this.count = subscriptionData.presence.count;\n this.me = this.get(this.myID);\n }\n addMember(memberData) {\n if (this.get(memberData.user_id) === null) {\n this.count++;\n }\n this.members[memberData.user_id] = memberData.user_info;\n return this.get(memberData.user_id);\n }\n removeMember(memberData) {\n var member = this.get(memberData.user_id);\n if (member) {\n delete this.members[memberData.user_id];\n this.count--;\n }\n return member;\n }\n reset() {\n this.members = {};\n this.count = 0;\n this.myID = null;\n this.me = null;\n }\n}\n\n;// ./src/core/channels/presence_channel.ts\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\n\n\n\nclass PresenceChannel extends PrivateChannel {\n constructor(name, pusher) {\n super(name, pusher);\n this.members = new Members();\n }\n authorize(socketId, callback) {\n super.authorize(socketId, (error, authData) => __awaiter(this, void 0, void 0, function* () {\n if (!error) {\n authData = authData;\n if (authData.channel_data != null) {\n var channelData = JSON.parse(authData.channel_data);\n this.members.setMyID(channelData.user_id);\n }\n else {\n yield this.pusher.user.signinDonePromise;\n if (this.pusher.user.user_data != null) {\n this.members.setMyID(this.pusher.user.user_data.id);\n }\n else {\n let suffix = url_store.buildLogSuffix('authorizationEndpoint');\n logger.error(`Invalid auth response for channel '${this.name}', ` +\n `expected 'channel_data' field. ${suffix}, ` +\n `or the user should be signed in.`);\n callback('Invalid auth response');\n return;\n }\n }\n }\n callback(error, authData);\n }));\n }\n handleEvent(event) {\n var eventName = event.event;\n if (eventName.indexOf('pusher_internal:') === 0) {\n this.handleInternalEvent(event);\n }\n else {\n var data = event.data;\n var metadata = {};\n if (event.user_id) {\n metadata.user_id = event.user_id;\n }\n this.emit(eventName, data, metadata);\n }\n }\n handleInternalEvent(event) {\n var eventName = event.event;\n var data = event.data;\n switch (eventName) {\n case 'pusher_internal:subscription_succeeded':\n this.handleSubscriptionSucceededEvent(event);\n break;\n case 'pusher_internal:subscription_count':\n this.handleSubscriptionCountEvent(event);\n break;\n case 'pusher_internal:member_added':\n var addedMember = this.members.addMember(data);\n this.emit('pusher:member_added', addedMember);\n break;\n case 'pusher_internal:member_removed':\n var removedMember = this.members.removeMember(data);\n if (removedMember) {\n this.emit('pusher:member_removed', removedMember);\n }\n break;\n }\n }\n handleSubscriptionSucceededEvent(event) {\n this.subscriptionPending = false;\n this.subscribed = true;\n if (this.subscriptionCancelled) {\n this.pusher.unsubscribe(this.name);\n }\n else {\n this.members.onSubscription(event.data);\n this.emit('pusher:subscription_succeeded', this.members);\n }\n }\n disconnect() {\n this.members.reset();\n super.disconnect();\n }\n}\n\n// EXTERNAL MODULE: ./node_modules/@stablelib/utf8/lib/utf8.js\nvar utf8 = __webpack_require__(978);\n// EXTERNAL MODULE: ./node_modules/@stablelib/base64/lib/base64.js\nvar base64 = __webpack_require__(594);\n;// ./src/core/channels/encrypted_channel.ts\n\n\n\n\n\nclass EncryptedChannel extends PrivateChannel {\n constructor(name, pusher, nacl) {\n super(name, pusher);\n this.key = null;\n this.nacl = nacl;\n }\n authorize(socketId, callback) {\n super.authorize(socketId, (error, authData) => {\n if (error) {\n callback(error, authData);\n return;\n }\n let sharedSecret = authData['shared_secret'];\n if (!sharedSecret) {\n callback(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`), null);\n return;\n }\n this.key = (0,base64.decode)(sharedSecret);\n delete authData['shared_secret'];\n callback(null, authData);\n });\n }\n trigger(event, data) {\n throw new UnsupportedFeature('Client events are not currently supported for encrypted channels');\n }\n handleEvent(event) {\n var eventName = event.event;\n var data = event.data;\n if (eventName.indexOf('pusher_internal:') === 0 ||\n eventName.indexOf('pusher:') === 0) {\n super.handleEvent(event);\n return;\n }\n this.handleEncryptedEvent(eventName, data);\n }\n handleEncryptedEvent(event, data) {\n if (!this.key) {\n logger.debug('Received encrypted event before key has been retrieved from the authEndpoint');\n return;\n }\n if (!data.ciphertext || !data.nonce) {\n logger.error('Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: ' +\n data);\n return;\n }\n let cipherText = (0,base64.decode)(data.ciphertext);\n if (cipherText.length < this.nacl.secretbox.overheadLength) {\n logger.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${cipherText.length}`);\n return;\n }\n let nonce = (0,base64.decode)(data.nonce);\n if (nonce.length < this.nacl.secretbox.nonceLength) {\n logger.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${nonce.length}`);\n return;\n }\n let bytes = this.nacl.secretbox.open(cipherText, nonce, this.key);\n if (bytes === null) {\n logger.debug('Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint...');\n this.authorize(this.pusher.connection.socket_id, (error, authData) => {\n if (error) {\n logger.error(`Failed to make a request to the authEndpoint: ${authData}. Unable to fetch new key, so dropping encrypted event`);\n return;\n }\n bytes = this.nacl.secretbox.open(cipherText, nonce, this.key);\n if (bytes === null) {\n logger.error(`Failed to decrypt event with new key. Dropping encrypted event`);\n return;\n }\n this.emit(event, this.getDataToEmit(bytes));\n return;\n });\n return;\n }\n this.emit(event, this.getDataToEmit(bytes));\n }\n getDataToEmit(bytes) {\n let raw = (0,utf8/* decode */.D4)(bytes);\n try {\n return JSON.parse(raw);\n }\n catch (_a) {\n return raw;\n }\n }\n}\n\n;// ./src/core/connection/connection_manager.ts\n\n\n\n\n\nclass ConnectionManager extends Dispatcher {\n constructor(key, options) {\n super();\n this.state = 'initialized';\n this.connection = null;\n this.key = key;\n this.options = options;\n this.timeline = this.options.timeline;\n this.usingTLS = this.options.useTLS;\n this.errorCallbacks = this.buildErrorCallbacks();\n this.connectionCallbacks = this.buildConnectionCallbacks(this.errorCallbacks);\n this.handshakeCallbacks = this.buildHandshakeCallbacks(this.errorCallbacks);\n var Network = runtime.getNetwork();\n Network.bind('online', () => {\n this.timeline.info({ netinfo: 'online' });\n if (this.state === 'connecting' || this.state === 'unavailable') {\n this.retryIn(0);\n }\n });\n Network.bind('offline', () => {\n this.timeline.info({ netinfo: 'offline' });\n if (this.connection) {\n this.sendActivityCheck();\n }\n });\n this.updateStrategy();\n }\n switchCluster(key) {\n this.key = key;\n this.updateStrategy();\n this.retryIn(0);\n }\n connect() {\n if (this.connection || this.runner) {\n return;\n }\n if (!this.strategy.isSupported()) {\n this.updateState('failed');\n return;\n }\n this.updateState('connecting');\n this.startConnecting();\n this.setUnavailableTimer();\n }\n send(data) {\n if (this.connection) {\n return this.connection.send(data);\n }\n else {\n return false;\n }\n }\n send_event(name, data, channel) {\n if (this.connection) {\n return this.connection.send_event(name, data, channel);\n }\n else {\n return false;\n }\n }\n disconnect() {\n this.disconnectInternally();\n this.updateState('disconnected');\n }\n isUsingTLS() {\n return this.usingTLS;\n }\n startConnecting() {\n var callback = (error, handshake) => {\n if (error) {\n this.runner = this.strategy.connect(0, callback);\n }\n else {\n if (handshake.action === 'error') {\n this.emit('error', {\n type: 'HandshakeError',\n error: handshake.error,\n });\n this.timeline.error({ handshakeError: handshake.error });\n }\n else {\n this.abortConnecting();\n this.handshakeCallbacks[handshake.action](handshake);\n }\n }\n };\n this.runner = this.strategy.connect(0, callback);\n }\n abortConnecting() {\n if (this.runner) {\n this.runner.abort();\n this.runner = null;\n }\n }\n disconnectInternally() {\n this.abortConnecting();\n this.clearRetryTimer();\n this.clearUnavailableTimer();\n if (this.connection) {\n var connection = this.abandonConnection();\n connection.close();\n }\n }\n updateStrategy() {\n this.strategy = this.options.getStrategy({\n key: this.key,\n timeline: this.timeline,\n useTLS: this.usingTLS,\n });\n }\n retryIn(delay) {\n this.timeline.info({ action: 'retry', delay: delay });\n if (delay > 0) {\n this.emit('connecting_in', Math.round(delay / 1000));\n }\n this.retryTimer = new OneOffTimer(delay || 0, () => {\n this.disconnectInternally();\n this.connect();\n });\n }\n clearRetryTimer() {\n if (this.retryTimer) {\n this.retryTimer.ensureAborted();\n this.retryTimer = null;\n }\n }\n setUnavailableTimer() {\n this.unavailableTimer = new OneOffTimer(this.options.unavailableTimeout, () => {\n this.updateState('unavailable');\n });\n }\n clearUnavailableTimer() {\n if (this.unavailableTimer) {\n this.unavailableTimer.ensureAborted();\n }\n }\n sendActivityCheck() {\n this.stopActivityCheck();\n this.connection.ping();\n this.activityTimer = new OneOffTimer(this.options.pongTimeout, () => {\n this.timeline.error({ pong_timed_out: this.options.pongTimeout });\n this.retryIn(0);\n });\n }\n resetActivityCheck() {\n this.stopActivityCheck();\n if (this.connection && !this.connection.handlesActivityChecks()) {\n this.activityTimer = new OneOffTimer(this.activityTimeout, () => {\n this.sendActivityCheck();\n });\n }\n }\n stopActivityCheck() {\n if (this.activityTimer) {\n this.activityTimer.ensureAborted();\n }\n }\n buildConnectionCallbacks(errorCallbacks) {\n return extend({}, errorCallbacks, {\n message: (message) => {\n this.resetActivityCheck();\n this.emit('message', message);\n },\n ping: () => {\n this.send_event('pusher:pong', {});\n },\n activity: () => {\n this.resetActivityCheck();\n },\n error: (error) => {\n this.emit('error', error);\n },\n closed: () => {\n this.abandonConnection();\n if (this.shouldRetry()) {\n this.retryIn(1000);\n }\n },\n });\n }\n buildHandshakeCallbacks(errorCallbacks) {\n return extend({}, errorCallbacks, {\n connected: (handshake) => {\n this.activityTimeout = Math.min(this.options.activityTimeout, handshake.activityTimeout, handshake.connection.activityTimeout || Infinity);\n this.clearUnavailableTimer();\n this.setConnection(handshake.connection);\n this.socket_id = this.connection.id;\n this.updateState('connected', { socket_id: this.socket_id });\n },\n });\n }\n buildErrorCallbacks() {\n let withErrorEmitted = (callback) => {\n return (result) => {\n if (result.error) {\n this.emit('error', { type: 'WebSocketError', error: result.error });\n }\n callback(result);\n };\n };\n return {\n tls_only: withErrorEmitted(() => {\n this.usingTLS = true;\n this.updateStrategy();\n this.retryIn(0);\n }),\n refused: withErrorEmitted(() => {\n this.disconnect();\n }),\n backoff: withErrorEmitted(() => {\n this.retryIn(1000);\n }),\n retry: withErrorEmitted(() => {\n this.retryIn(0);\n }),\n };\n }\n setConnection(connection) {\n this.connection = connection;\n for (var event in this.connectionCallbacks) {\n this.connection.bind(event, this.connectionCallbacks[event]);\n }\n this.resetActivityCheck();\n }\n abandonConnection() {\n if (!this.connection) {\n return;\n }\n this.stopActivityCheck();\n for (var event in this.connectionCallbacks) {\n this.connection.unbind(event, this.connectionCallbacks[event]);\n }\n var connection = this.connection;\n this.connection = null;\n return connection;\n }\n updateState(newState, data) {\n var previousState = this.state;\n this.state = newState;\n if (previousState !== newState) {\n var newStateDescription = newState;\n if (newStateDescription === 'connected') {\n newStateDescription += ' with new socket ID ' + data.socket_id;\n }\n logger.debug('State changed', previousState + ' -> ' + newStateDescription);\n this.timeline.info({ state: newState, params: data });\n this.emit('state_change', { previous: previousState, current: newState });\n this.emit(newState, data);\n }\n }\n shouldRetry() {\n return this.state === 'connecting' || this.state === 'connected';\n }\n}\n\n;// ./src/core/channels/channels.ts\n\n\n\n\nclass Channels {\n constructor() {\n this.channels = {};\n }\n add(name, pusher) {\n if (!this.channels[name]) {\n this.channels[name] = createChannel(name, pusher);\n }\n return this.channels[name];\n }\n all() {\n return values(this.channels);\n }\n find(name) {\n return this.channels[name];\n }\n remove(name) {\n var channel = this.channels[name];\n delete this.channels[name];\n return channel;\n }\n disconnect() {\n objectApply(this.channels, function (channel) {\n channel.disconnect();\n });\n }\n}\nfunction createChannel(name, pusher) {\n if (name.indexOf('private-encrypted-') === 0) {\n if (pusher.config.nacl) {\n return factory.createEncryptedChannel(name, pusher, pusher.config.nacl);\n }\n let errMsg = 'Tried to subscribe to a private-encrypted- channel but no nacl implementation available';\n let suffix = url_store.buildLogSuffix('encryptedChannelSupport');\n throw new UnsupportedFeature(`${errMsg}. ${suffix}`);\n }\n else if (name.indexOf('private-') === 0) {\n return factory.createPrivateChannel(name, pusher);\n }\n else if (name.indexOf('presence-') === 0) {\n return factory.createPresenceChannel(name, pusher);\n }\n else if (name.indexOf('#') === 0) {\n throw new BadChannelName('Cannot create a channel with name \"' + name + '\".');\n }\n else {\n return factory.createChannel(name, pusher);\n }\n}\n\n;// ./src/core/utils/factory.ts\n\n\n\n\n\n\n\n\n\nvar Factory = {\n createChannels() {\n return new Channels();\n },\n createConnectionManager(key, options) {\n return new ConnectionManager(key, options);\n },\n createChannel(name, pusher) {\n return new Channel(name, pusher);\n },\n createPrivateChannel(name, pusher) {\n return new PrivateChannel(name, pusher);\n },\n createPresenceChannel(name, pusher) {\n return new PresenceChannel(name, pusher);\n },\n createEncryptedChannel(name, pusher, nacl) {\n return new EncryptedChannel(name, pusher, nacl);\n },\n createTimelineSender(timeline, options) {\n return new TimelineSender(timeline, options);\n },\n createHandshake(transport, callback) {\n return new Handshake(transport, callback);\n },\n createAssistantToTheTransportManager(manager, transport, options) {\n return new AssistantToTheTransportManager(manager, transport, options);\n },\n};\n/* harmony default export */ const factory = (Factory);\n\n;// ./src/core/transports/transport_manager.ts\n\nclass TransportManager {\n constructor(options) {\n this.options = options || {};\n this.livesLeft = this.options.lives || Infinity;\n }\n getAssistant(transport) {\n return factory.createAssistantToTheTransportManager(this, transport, {\n minPingDelay: this.options.minPingDelay,\n maxPingDelay: this.options.maxPingDelay,\n });\n }\n isAlive() {\n return this.livesLeft > 0;\n }\n reportDeath() {\n this.livesLeft -= 1;\n }\n}\n\n;// ./src/core/strategies/sequential_strategy.ts\n\n\n\nclass SequentialStrategy {\n constructor(strategies, options) {\n this.strategies = strategies;\n this.loop = Boolean(options.loop);\n this.failFast = Boolean(options.failFast);\n this.timeout = options.timeout;\n this.timeoutLimit = options.timeoutLimit;\n }\n isSupported() {\n return any(this.strategies, util.method('isSupported'));\n }\n connect(minPriority, callback) {\n var strategies = this.strategies;\n var current = 0;\n var timeout = this.timeout;\n var runner = null;\n var tryNextStrategy = (error, handshake) => {\n if (handshake) {\n callback(null, handshake);\n }\n else {\n current = current + 1;\n if (this.loop) {\n current = current % strategies.length;\n }\n if (current < strategies.length) {\n if (timeout) {\n timeout = timeout * 2;\n if (this.timeoutLimit) {\n timeout = Math.min(timeout, this.timeoutLimit);\n }\n }\n runner = this.tryStrategy(strategies[current], minPriority, { timeout, failFast: this.failFast }, tryNextStrategy);\n }\n else {\n callback(true);\n }\n }\n };\n runner = this.tryStrategy(strategies[current], minPriority, { timeout: timeout, failFast: this.failFast }, tryNextStrategy);\n return {\n abort: function () {\n runner.abort();\n },\n forceMinPriority: function (p) {\n minPriority = p;\n if (runner) {\n runner.forceMinPriority(p);\n }\n },\n };\n }\n tryStrategy(strategy, minPriority, options, callback) {\n var timer = null;\n var runner = null;\n if (options.timeout > 0) {\n timer = new OneOffTimer(options.timeout, function () {\n runner.abort();\n callback(true);\n });\n }\n runner = strategy.connect(minPriority, function (error, handshake) {\n if (error && timer && timer.isRunning() && !options.failFast) {\n return;\n }\n if (timer) {\n timer.ensureAborted();\n }\n callback(error, handshake);\n });\n return {\n abort: function () {\n if (timer) {\n timer.ensureAborted();\n }\n runner.abort();\n },\n forceMinPriority: function (p) {\n runner.forceMinPriority(p);\n },\n };\n }\n}\n\n;// ./src/core/strategies/best_connected_ever_strategy.ts\n\n\nclass BestConnectedEverStrategy {\n constructor(strategies) {\n this.strategies = strategies;\n }\n isSupported() {\n return any(this.strategies, util.method('isSupported'));\n }\n connect(minPriority, callback) {\n return connect(this.strategies, minPriority, function (i, runners) {\n return function (error, handshake) {\n runners[i].error = error;\n if (error) {\n if (allRunnersFailed(runners)) {\n callback(true);\n }\n return;\n }\n apply(runners, function (runner) {\n runner.forceMinPriority(handshake.transport.priority);\n });\n callback(null, handshake);\n };\n });\n }\n}\nfunction connect(strategies, minPriority, callbackBuilder) {\n var runners = map(strategies, function (strategy, i, _, rs) {\n return strategy.connect(minPriority, callbackBuilder(i, rs));\n });\n return {\n abort: function () {\n apply(runners, abortRunner);\n },\n forceMinPriority: function (p) {\n apply(runners, function (runner) {\n runner.forceMinPriority(p);\n });\n },\n };\n}\nfunction allRunnersFailed(runners) {\n return collections_all(runners, function (runner) {\n return Boolean(runner.error);\n });\n}\nfunction abortRunner(runner) {\n if (!runner.error && !runner.aborted) {\n runner.abort();\n runner.aborted = true;\n }\n}\n\n;// ./src/core/strategies/websocket_prioritized_cached_strategy.ts\n\n\n\n\nclass WebSocketPrioritizedCachedStrategy {\n constructor(strategy, transports, options) {\n this.strategy = strategy;\n this.transports = transports;\n this.ttl = options.ttl || 1800 * 1000;\n this.usingTLS = options.useTLS;\n this.timeline = options.timeline;\n }\n isSupported() {\n return this.strategy.isSupported();\n }\n connect(minPriority, callback) {\n var usingTLS = this.usingTLS;\n var info = fetchTransportCache(usingTLS);\n var cacheSkipCount = info && info.cacheSkipCount ? info.cacheSkipCount : 0;\n var strategies = [this.strategy];\n if (info && info.timestamp + this.ttl >= util.now()) {\n var transport = this.transports[info.transport];\n if (transport) {\n if (['ws', 'wss'].includes(info.transport) || cacheSkipCount > 3) {\n this.timeline.info({\n cached: true,\n transport: info.transport,\n latency: info.latency,\n });\n strategies.push(new SequentialStrategy([transport], {\n timeout: info.latency * 2 + 1000,\n failFast: true,\n }));\n }\n else {\n cacheSkipCount++;\n }\n }\n }\n var startTimestamp = util.now();\n var runner = strategies\n .pop()\n .connect(minPriority, function cb(error, handshake) {\n if (error) {\n flushTransportCache(usingTLS);\n if (strategies.length > 0) {\n startTimestamp = util.now();\n runner = strategies.pop().connect(minPriority, cb);\n }\n else {\n callback(error);\n }\n }\n else {\n storeTransportCache(usingTLS, handshake.transport.name, util.now() - startTimestamp, cacheSkipCount);\n callback(null, handshake);\n }\n });\n return {\n abort: function () {\n runner.abort();\n },\n forceMinPriority: function (p) {\n minPriority = p;\n if (runner) {\n runner.forceMinPriority(p);\n }\n },\n };\n }\n}\nfunction getTransportCacheKey(usingTLS) {\n return 'pusherTransport' + (usingTLS ? 'TLS' : 'NonTLS');\n}\nfunction fetchTransportCache(usingTLS) {\n var storage = runtime.getLocalStorage();\n if (storage) {\n try {\n var serializedCache = storage[getTransportCacheKey(usingTLS)];\n if (serializedCache) {\n return JSON.parse(serializedCache);\n }\n }\n catch (e) {\n flushTransportCache(usingTLS);\n }\n }\n return null;\n}\nfunction storeTransportCache(usingTLS, transport, latency, cacheSkipCount) {\n var storage = runtime.getLocalStorage();\n if (storage) {\n try {\n storage[getTransportCacheKey(usingTLS)] = safeJSONStringify({\n timestamp: util.now(),\n transport: transport,\n latency: latency,\n cacheSkipCount: cacheSkipCount,\n });\n }\n catch (e) {\n }\n }\n}\nfunction flushTransportCache(usingTLS) {\n var storage = runtime.getLocalStorage();\n if (storage) {\n try {\n delete storage[getTransportCacheKey(usingTLS)];\n }\n catch (e) {\n }\n }\n}\n\n;// ./src/core/strategies/delayed_strategy.ts\n\nclass DelayedStrategy {\n constructor(strategy, { delay: number }) {\n this.strategy = strategy;\n this.options = { delay: number };\n }\n isSupported() {\n return this.strategy.isSupported();\n }\n connect(minPriority, callback) {\n var strategy = this.strategy;\n var runner;\n var timer = new OneOffTimer(this.options.delay, function () {\n runner = strategy.connect(minPriority, callback);\n });\n return {\n abort: function () {\n timer.ensureAborted();\n if (runner) {\n runner.abort();\n }\n },\n forceMinPriority: function (p) {\n minPriority = p;\n if (runner) {\n runner.forceMinPriority(p);\n }\n },\n };\n }\n}\n\n;// ./src/core/strategies/if_strategy.ts\nclass IfStrategy {\n constructor(test, trueBranch, falseBranch) {\n this.test = test;\n this.trueBranch = trueBranch;\n this.falseBranch = falseBranch;\n }\n isSupported() {\n var branch = this.test() ? this.trueBranch : this.falseBranch;\n return branch.isSupported();\n }\n connect(minPriority, callback) {\n var branch = this.test() ? this.trueBranch : this.falseBranch;\n return branch.connect(minPriority, callback);\n }\n}\n\n;// ./src/core/strategies/first_connected_strategy.ts\nclass FirstConnectedStrategy {\n constructor(strategy) {\n this.strategy = strategy;\n }\n isSupported() {\n return this.strategy.isSupported();\n }\n connect(minPriority, callback) {\n var runner = this.strategy.connect(minPriority, function (error, handshake) {\n if (handshake) {\n runner.abort();\n }\n callback(error, handshake);\n });\n return runner;\n }\n}\n\n;// ./src/runtimes/web/default_strategy.ts\n\n\n\n\n\n\n\nfunction testSupportsStrategy(strategy) {\n return function () {\n return strategy.isSupported();\n };\n}\nvar getDefaultStrategy = function (config, baseOptions, defineTransport) {\n var definedTransports = {};\n function defineTransportStrategy(name, type, priority, options, manager) {\n var transport = defineTransport(config, name, type, priority, options, manager);\n definedTransports[name] = transport;\n return transport;\n }\n var ws_options = Object.assign({}, baseOptions, {\n hostNonTLS: config.wsHost + ':' + config.wsPort,\n hostTLS: config.wsHost + ':' + config.wssPort,\n httpPath: config.wsPath,\n });\n var wss_options = Object.assign({}, ws_options, {\n useTLS: true,\n });\n var sockjs_options = Object.assign({}, baseOptions, {\n hostNonTLS: config.httpHost + ':' + config.httpPort,\n hostTLS: config.httpHost + ':' + config.httpsPort,\n httpPath: config.httpPath,\n });\n var timeouts = {\n loop: true,\n timeout: 15000,\n timeoutLimit: 60000,\n };\n var ws_manager = new TransportManager({\n minPingDelay: 10000,\n maxPingDelay: config.activityTimeout,\n });\n var streaming_manager = new TransportManager({\n lives: 2,\n minPingDelay: 10000,\n maxPingDelay: config.activityTimeout,\n });\n var ws_transport = defineTransportStrategy('ws', 'ws', 3, ws_options, ws_manager);\n var wss_transport = defineTransportStrategy('wss', 'ws', 3, wss_options, ws_manager);\n var sockjs_transport = defineTransportStrategy('sockjs', 'sockjs', 1, sockjs_options);\n var xhr_streaming_transport = defineTransportStrategy('xhr_streaming', 'xhr_streaming', 1, sockjs_options, streaming_manager);\n var xdr_streaming_transport = defineTransportStrategy('xdr_streaming', 'xdr_streaming', 1, sockjs_options, streaming_manager);\n var xhr_polling_transport = defineTransportStrategy('xhr_polling', 'xhr_polling', 1, sockjs_options);\n var xdr_polling_transport = defineTransportStrategy('xdr_polling', 'xdr_polling', 1, sockjs_options);\n var ws_loop = new SequentialStrategy([ws_transport], timeouts);\n var wss_loop = new SequentialStrategy([wss_transport], timeouts);\n var sockjs_loop = new SequentialStrategy([sockjs_transport], timeouts);\n var streaming_loop = new SequentialStrategy([\n new IfStrategy(testSupportsStrategy(xhr_streaming_transport), xhr_streaming_transport, xdr_streaming_transport),\n ], timeouts);\n var polling_loop = new SequentialStrategy([\n new IfStrategy(testSupportsStrategy(xhr_polling_transport), xhr_polling_transport, xdr_polling_transport),\n ], timeouts);\n var http_loop = new SequentialStrategy([\n new IfStrategy(testSupportsStrategy(streaming_loop), new BestConnectedEverStrategy([\n streaming_loop,\n new DelayedStrategy(polling_loop, { delay: 4000 }),\n ]), polling_loop),\n ], timeouts);\n var http_fallback_loop = new IfStrategy(testSupportsStrategy(http_loop), http_loop, sockjs_loop);\n var wsStrategy;\n if (baseOptions.useTLS) {\n wsStrategy = new BestConnectedEverStrategy([\n ws_loop,\n new DelayedStrategy(http_fallback_loop, { delay: 2000 }),\n ]);\n }\n else {\n wsStrategy = new BestConnectedEverStrategy([\n ws_loop,\n new DelayedStrategy(wss_loop, { delay: 2000 }),\n new DelayedStrategy(http_fallback_loop, { delay: 5000 }),\n ]);\n }\n return new WebSocketPrioritizedCachedStrategy(new FirstConnectedStrategy(new IfStrategy(testSupportsStrategy(ws_transport), wsStrategy, http_fallback_loop)), definedTransports, {\n ttl: 1800000,\n timeline: baseOptions.timeline,\n useTLS: baseOptions.useTLS,\n });\n};\n/* harmony default export */ const default_strategy = (getDefaultStrategy);\n\n;// ./src/runtimes/web/transports/transport_connection_initializer.ts\n\n/* harmony default export */ function transport_connection_initializer() {\n var self = this;\n self.timeline.info(self.buildTimelineMessage({\n transport: self.name + (self.options.useTLS ? 's' : ''),\n }));\n if (self.hooks.isInitialized()) {\n self.changeState('initialized');\n }\n else if (self.hooks.file) {\n self.changeState('initializing');\n Dependencies.load(self.hooks.file, { useTLS: self.options.useTLS }, function (error, callback) {\n if (self.hooks.isInitialized()) {\n self.changeState('initialized');\n callback(true);\n }\n else {\n if (error) {\n self.onError(error);\n }\n self.onClose();\n callback(false);\n }\n });\n }\n else {\n self.onClose();\n }\n}\n\n;// ./src/runtimes/web/http/http_xdomain_request.ts\n\nvar hooks = {\n getRequest: function (socket) {\n var xdr = new window.XDomainRequest();\n xdr.ontimeout = function () {\n socket.emit('error', new RequestTimedOut());\n socket.close();\n };\n xdr.onerror = function (e) {\n socket.emit('error', e);\n socket.close();\n };\n xdr.onprogress = function () {\n if (xdr.responseText && xdr.responseText.length > 0) {\n socket.onChunk(200, xdr.responseText);\n }\n };\n xdr.onload = function () {\n if (xdr.responseText && xdr.responseText.length > 0) {\n socket.onChunk(200, xdr.responseText);\n }\n socket.emit('finished', 200);\n socket.close();\n };\n return xdr;\n },\n abortRequest: function (xdr) {\n xdr.ontimeout = xdr.onerror = xdr.onprogress = xdr.onload = null;\n xdr.abort();\n },\n};\n/* harmony default export */ const http_xdomain_request = (hooks);\n\n;// ./src/core/http/http_request.ts\n\n\nconst MAX_BUFFER_LENGTH = 256 * 1024;\nclass HTTPRequest extends Dispatcher {\n constructor(hooks, method, url) {\n super();\n this.hooks = hooks;\n this.method = method;\n this.url = url;\n }\n start(payload) {\n this.position = 0;\n this.xhr = this.hooks.getRequest(this);\n this.unloader = () => {\n this.close();\n };\n runtime.addUnloadListener(this.unloader);\n this.xhr.open(this.method, this.url, true);\n if (this.xhr.setRequestHeader) {\n this.xhr.setRequestHeader('Content-Type', 'application/json');\n }\n this.xhr.send(payload);\n }\n close() {\n if (this.unloader) {\n runtime.removeUnloadListener(this.unloader);\n this.unloader = null;\n }\n if (this.xhr) {\n this.hooks.abortRequest(this.xhr);\n this.xhr = null;\n }\n }\n onChunk(status, data) {\n while (true) {\n var chunk = this.advanceBuffer(data);\n if (chunk) {\n this.emit('chunk', { status: status, data: chunk });\n }\n else {\n break;\n }\n }\n if (this.isBufferTooLong(data)) {\n this.emit('buffer_too_long');\n }\n }\n advanceBuffer(buffer) {\n var unreadData = buffer.slice(this.position);\n var endOfLinePosition = unreadData.indexOf('\\n');\n if (endOfLinePosition !== -1) {\n this.position += endOfLinePosition + 1;\n return unreadData.slice(0, endOfLinePosition);\n }\n else {\n return null;\n }\n }\n isBufferTooLong(buffer) {\n return this.position === buffer.length && buffer.length > MAX_BUFFER_LENGTH;\n }\n}\n\n;// ./src/core/http/state.ts\nvar State;\n(function (State) {\n State[State[\"CONNECTING\"] = 0] = \"CONNECTING\";\n State[State[\"OPEN\"] = 1] = \"OPEN\";\n State[State[\"CLOSED\"] = 3] = \"CLOSED\";\n})(State || (State = {}));\n/* harmony default export */ const state = (State);\n\n;// ./src/core/http/http_socket.ts\n\n\n\nvar autoIncrement = 1;\nclass HTTPSocket {\n constructor(hooks, url) {\n this.hooks = hooks;\n this.session = randomNumber(1000) + '/' + randomString(8);\n this.location = getLocation(url);\n this.readyState = state.CONNECTING;\n this.openStream();\n }\n send(payload) {\n return this.sendRaw(JSON.stringify([payload]));\n }\n ping() {\n this.hooks.sendHeartbeat(this);\n }\n close(code, reason) {\n this.onClose(code, reason, true);\n }\n sendRaw(payload) {\n if (this.readyState === state.OPEN) {\n try {\n runtime.createSocketRequest('POST', getUniqueURL(getSendURL(this.location, this.session))).start(payload);\n return true;\n }\n catch (e) {\n return false;\n }\n }\n else {\n return false;\n }\n }\n reconnect() {\n this.closeStream();\n this.openStream();\n }\n onClose(code, reason, wasClean) {\n this.closeStream();\n this.readyState = state.CLOSED;\n if (this.onclose) {\n this.onclose({\n code: code,\n reason: reason,\n wasClean: wasClean,\n });\n }\n }\n onChunk(chunk) {\n if (chunk.status !== 200) {\n return;\n }\n if (this.readyState === state.OPEN) {\n this.onActivity();\n }\n var payload;\n var type = chunk.data.slice(0, 1);\n switch (type) {\n case 'o':\n payload = JSON.parse(chunk.data.slice(1) || '{}');\n this.onOpen(payload);\n break;\n case 'a':\n payload = JSON.parse(chunk.data.slice(1) || '[]');\n for (var i = 0; i < payload.length; i++) {\n this.onEvent(payload[i]);\n }\n break;\n case 'm':\n payload = JSON.parse(chunk.data.slice(1) || 'null');\n this.onEvent(payload);\n break;\n case 'h':\n this.hooks.onHeartbeat(this);\n break;\n case 'c':\n payload = JSON.parse(chunk.data.slice(1) || '[]');\n this.onClose(payload[0], payload[1], true);\n break;\n }\n }\n onOpen(options) {\n if (this.readyState === state.CONNECTING) {\n if (options && options.hostname) {\n this.location.base = replaceHost(this.location.base, options.hostname);\n }\n this.readyState = state.OPEN;\n if (this.onopen) {\n this.onopen();\n }\n }\n else {\n this.onClose(1006, 'Server lost session', true);\n }\n }\n onEvent(event) {\n if (this.readyState === state.OPEN && this.onmessage) {\n this.onmessage({ data: event });\n }\n }\n onActivity() {\n if (this.onactivity) {\n this.onactivity();\n }\n }\n onError(error) {\n if (this.onerror) {\n this.onerror(error);\n }\n }\n openStream() {\n this.stream = runtime.createSocketRequest('POST', getUniqueURL(this.hooks.getReceiveURL(this.location, this.session)));\n this.stream.bind('chunk', (chunk) => {\n this.onChunk(chunk);\n });\n this.stream.bind('finished', (status) => {\n this.hooks.onFinished(this, status);\n });\n this.stream.bind('buffer_too_long', () => {\n this.reconnect();\n });\n try {\n this.stream.start();\n }\n catch (error) {\n util.defer(() => {\n this.onError(error);\n this.onClose(1006, 'Could not start streaming', false);\n });\n }\n }\n closeStream() {\n if (this.stream) {\n this.stream.unbind_all();\n this.stream.close();\n this.stream = null;\n }\n }\n}\nfunction getLocation(url) {\n var parts = /([^\\?]*)\\/*(\\??.*)/.exec(url);\n return {\n base: parts[1],\n queryString: parts[2],\n };\n}\nfunction getSendURL(url, session) {\n return url.base + '/' + session + '/xhr_send';\n}\nfunction getUniqueURL(url) {\n var separator = url.indexOf('?') === -1 ? '?' : '&';\n return url + separator + 't=' + +new Date() + '&n=' + autoIncrement++;\n}\nfunction replaceHost(url, hostname) {\n var urlParts = /(https?:\\/\\/)([^\\/:]+)((\\/|:)?.*)/.exec(url);\n return urlParts[1] + hostname + urlParts[3];\n}\nfunction randomNumber(max) {\n return runtime.randomInt(max);\n}\nfunction randomString(length) {\n var result = [];\n for (var i = 0; i < length; i++) {\n result.push(randomNumber(32).toString(32));\n }\n return result.join('');\n}\n/* harmony default export */ const http_socket = (HTTPSocket);\n\n;// ./src/core/http/http_streaming_socket.ts\nvar http_streaming_socket_hooks = {\n getReceiveURL: function (url, session) {\n return url.base + '/' + session + '/xhr_streaming' + url.queryString;\n },\n onHeartbeat: function (socket) {\n socket.sendRaw('[]');\n },\n sendHeartbeat: function (socket) {\n socket.sendRaw('[]');\n },\n onFinished: function (socket, status) {\n socket.onClose(1006, 'Connection interrupted (' + status + ')', false);\n },\n};\n/* harmony default export */ const http_streaming_socket = (http_streaming_socket_hooks);\n\n;// ./src/core/http/http_polling_socket.ts\nvar http_polling_socket_hooks = {\n getReceiveURL: function (url, session) {\n return url.base + '/' + session + '/xhr' + url.queryString;\n },\n onHeartbeat: function () {\n },\n sendHeartbeat: function (socket) {\n socket.sendRaw('[]');\n },\n onFinished: function (socket, status) {\n if (status === 200) {\n socket.reconnect();\n }\n else {\n socket.onClose(1006, 'Connection interrupted (' + status + ')', false);\n }\n },\n};\n/* harmony default export */ const http_polling_socket = (http_polling_socket_hooks);\n\n;// ./src/runtimes/isomorphic/http/http_xhr_request.ts\n\nvar http_xhr_request_hooks = {\n getRequest: function (socket) {\n var Constructor = runtime.getXHRAPI();\n var xhr = new Constructor();\n xhr.onreadystatechange = xhr.onprogress = function () {\n switch (xhr.readyState) {\n case 3:\n if (xhr.responseText && xhr.responseText.length > 0) {\n socket.onChunk(xhr.status, xhr.responseText);\n }\n break;\n case 4:\n if (xhr.responseText && xhr.responseText.length > 0) {\n socket.onChunk(xhr.status, xhr.responseText);\n }\n socket.emit('finished', xhr.status);\n socket.close();\n break;\n }\n };\n return xhr;\n },\n abortRequest: function (xhr) {\n xhr.onreadystatechange = null;\n xhr.abort();\n },\n};\n/* harmony default export */ const http_xhr_request = (http_xhr_request_hooks);\n\n;// ./src/runtimes/isomorphic/http/http.ts\n\n\n\n\n\nvar HTTP = {\n createStreamingSocket(url) {\n return this.createSocket(http_streaming_socket, url);\n },\n createPollingSocket(url) {\n return this.createSocket(http_polling_socket, url);\n },\n createSocket(hooks, url) {\n return new http_socket(hooks, url);\n },\n createXHR(method, url) {\n return this.createRequest(http_xhr_request, method, url);\n },\n createRequest(hooks, method, url) {\n return new HTTPRequest(hooks, method, url);\n },\n};\n/* harmony default export */ const http_http = (HTTP);\n\n;// ./src/runtimes/web/http/http.ts\n\n\nhttp_http.createXDR = function (method, url) {\n return this.createRequest(http_xdomain_request, method, url);\n};\n/* harmony default export */ const web_http_http = (http_http);\n\n;// ./src/runtimes/web/runtime.ts\n\n\n\n\n\n\n\n\n\n\n\n\nvar Runtime = {\n nextAuthCallbackID: 1,\n auth_callbacks: {},\n ScriptReceivers: ScriptReceivers,\n DependenciesReceivers: DependenciesReceivers,\n getDefaultStrategy: default_strategy,\n Transports: transports_transports,\n transportConnectionInitializer: transport_connection_initializer,\n HTTPFactory: web_http_http,\n TimelineTransport: jsonp_timeline,\n getXHRAPI() {\n return window.XMLHttpRequest;\n },\n getWebSocketAPI() {\n return window.WebSocket || window.MozWebSocket;\n },\n setup(PusherClass) {\n window.Pusher = PusherClass;\n var initializeOnDocumentBody = () => {\n this.onDocumentBody(PusherClass.ready);\n };\n if (!window.JSON) {\n Dependencies.load('json2', {}, initializeOnDocumentBody);\n }\n else {\n initializeOnDocumentBody();\n }\n },\n getDocument() {\n return document;\n },\n getProtocol() {\n return this.getDocument().location.protocol;\n },\n getAuthorizers() {\n return { ajax: xhr_auth, jsonp: jsonp_auth };\n },\n onDocumentBody(callback) {\n if (document.body) {\n callback();\n }\n else {\n setTimeout(() => {\n this.onDocumentBody(callback);\n }, 0);\n }\n },\n createJSONPRequest(url, data) {\n return new JSONPRequest(url, data);\n },\n createScriptRequest(src) {\n return new ScriptRequest(src);\n },\n getLocalStorage() {\n try {\n return window.localStorage;\n }\n catch (e) {\n return undefined;\n }\n },\n createXHR() {\n if (this.getXHRAPI()) {\n return this.createXMLHttpRequest();\n }\n else {\n return this.createMicrosoftXHR();\n }\n },\n createXMLHttpRequest() {\n var Constructor = this.getXHRAPI();\n return new Constructor();\n },\n createMicrosoftXHR() {\n return new ActiveXObject('Microsoft.XMLHTTP');\n },\n getNetwork() {\n return Network;\n },\n createWebSocket(url) {\n var Constructor = this.getWebSocketAPI();\n return new Constructor(url);\n },\n createSocketRequest(method, url) {\n if (this.isXHRSupported()) {\n return this.HTTPFactory.createXHR(method, url);\n }\n else if (this.isXDRSupported(url.indexOf('https:') === 0)) {\n return this.HTTPFactory.createXDR(method, url);\n }\n else {\n throw 'Cross-origin HTTP requests are not supported';\n }\n },\n isXHRSupported() {\n var Constructor = this.getXHRAPI();\n return (Boolean(Constructor) && new Constructor().withCredentials !== undefined);\n },\n isXDRSupported(useTLS) {\n var protocol = useTLS ? 'https:' : 'http:';\n var documentProtocol = this.getProtocol();\n return (Boolean(window['XDomainRequest']) && documentProtocol === protocol);\n },\n addUnloadListener(listener) {\n if (window.addEventListener !== undefined) {\n window.addEventListener('unload', listener, false);\n }\n else if (window.attachEvent !== undefined) {\n window.attachEvent('onunload', listener);\n }\n },\n removeUnloadListener(listener) {\n if (window.addEventListener !== undefined) {\n window.removeEventListener('unload', listener, false);\n }\n else if (window.detachEvent !== undefined) {\n window.detachEvent('onunload', listener);\n }\n },\n randomInt(max) {\n const random = function () {\n const crypto = window.crypto || window['msCrypto'];\n const random = crypto.getRandomValues(new Uint32Array(1))[0];\n return random / Math.pow(2, 32);\n };\n return Math.floor(random() * max);\n },\n};\n/* harmony default export */ const runtime = (Runtime);\n\n;// ./src/core/timeline/level.ts\nvar TimelineLevel;\n(function (TimelineLevel) {\n TimelineLevel[TimelineLevel[\"ERROR\"] = 3] = \"ERROR\";\n TimelineLevel[TimelineLevel[\"INFO\"] = 6] = \"INFO\";\n TimelineLevel[TimelineLevel[\"DEBUG\"] = 7] = \"DEBUG\";\n})(TimelineLevel || (TimelineLevel = {}));\n/* harmony default export */ const level = (TimelineLevel);\n\n;// ./src/core/timeline/timeline.ts\n\n\n\nclass Timeline {\n constructor(key, session, options) {\n this.key = key;\n this.session = session;\n this.events = [];\n this.options = options || {};\n this.sent = 0;\n this.uniqueID = 0;\n }\n log(level, event) {\n if (level <= this.options.level) {\n this.events.push(extend({}, event, { timestamp: util.now() }));\n if (this.options.limit && this.events.length > this.options.limit) {\n this.events.shift();\n }\n }\n }\n error(event) {\n this.log(level.ERROR, event);\n }\n info(event) {\n this.log(level.INFO, event);\n }\n debug(event) {\n this.log(level.DEBUG, event);\n }\n isEmpty() {\n return this.events.length === 0;\n }\n send(sendfn, callback) {\n var data = extend({\n session: this.session,\n bundle: this.sent + 1,\n key: this.key,\n lib: 'js',\n version: this.options.version,\n cluster: this.options.cluster,\n features: this.options.features,\n timeline: this.events,\n }, this.options.params);\n this.events = [];\n sendfn(data, (error, result) => {\n if (!error) {\n this.sent++;\n }\n if (callback) {\n callback(error, result);\n }\n });\n return true;\n }\n generateUniqueID() {\n this.uniqueID++;\n return this.uniqueID;\n }\n}\n\n;// ./src/core/strategies/transport_strategy.ts\n\n\n\n\nclass TransportStrategy {\n constructor(name, priority, transport, options) {\n this.name = name;\n this.priority = priority;\n this.transport = transport;\n this.options = options || {};\n }\n isSupported() {\n return this.transport.isSupported({\n useTLS: this.options.useTLS,\n });\n }\n connect(minPriority, callback) {\n if (!this.isSupported()) {\n return failAttempt(new UnsupportedStrategy(), callback);\n }\n else if (this.priority < minPriority) {\n return failAttempt(new TransportPriorityTooLow(), callback);\n }\n var connected = false;\n var transport = this.transport.createConnection(this.name, this.priority, this.options.key, this.options);\n var handshake = null;\n var onInitialized = function () {\n transport.unbind('initialized', onInitialized);\n transport.connect();\n };\n var onOpen = function () {\n handshake = factory.createHandshake(transport, function (result) {\n connected = true;\n unbindListeners();\n callback(null, result);\n });\n };\n var onError = function (error) {\n unbindListeners();\n callback(error);\n };\n var onClosed = function () {\n unbindListeners();\n var serializedTransport;\n serializedTransport = safeJSONStringify(transport);\n callback(new TransportClosed(serializedTransport));\n };\n var unbindListeners = function () {\n transport.unbind('initialized', onInitialized);\n transport.unbind('open', onOpen);\n transport.unbind('error', onError);\n transport.unbind('closed', onClosed);\n };\n transport.bind('initialized', onInitialized);\n transport.bind('open', onOpen);\n transport.bind('error', onError);\n transport.bind('closed', onClosed);\n transport.initialize();\n return {\n abort: () => {\n if (connected) {\n return;\n }\n unbindListeners();\n if (handshake) {\n handshake.close();\n }\n else {\n transport.close();\n }\n },\n forceMinPriority: (p) => {\n if (connected) {\n return;\n }\n if (this.priority < p) {\n if (handshake) {\n handshake.close();\n }\n else {\n transport.close();\n }\n }\n },\n };\n }\n}\nfunction failAttempt(error, callback) {\n util.defer(function () {\n callback(error);\n });\n return {\n abort: function () { },\n forceMinPriority: function () { },\n };\n}\n\n;// ./src/core/strategies/strategy_builder.ts\n\n\n\n\n\nconst { Transports: strategy_builder_Transports } = runtime;\nvar defineTransport = function (config, name, type, priority, options, manager) {\n var transportClass = strategy_builder_Transports[type];\n if (!transportClass) {\n throw new UnsupportedTransport(type);\n }\n var enabled = (!config.enabledTransports ||\n arrayIndexOf(config.enabledTransports, name) !== -1) &&\n (!config.disabledTransports ||\n arrayIndexOf(config.disabledTransports, name) === -1);\n var transport;\n if (enabled) {\n options = Object.assign({ ignoreNullOrigin: config.ignoreNullOrigin }, options);\n transport = new TransportStrategy(name, priority, manager ? manager.getAssistant(transportClass) : transportClass, options);\n }\n else {\n transport = strategy_builder_UnsupportedStrategy;\n }\n return transport;\n};\nvar strategy_builder_UnsupportedStrategy = {\n isSupported: function () {\n return false;\n },\n connect: function (_, callback) {\n var deferred = util.defer(function () {\n callback(new UnsupportedStrategy());\n });\n return {\n abort: function () {\n deferred.ensureAborted();\n },\n forceMinPriority: function () { },\n };\n },\n};\n\n;// ./src/core/options.ts\n\nfunction validateOptions(options) {\n if (options == null) {\n throw 'You must pass an options object';\n }\n if (options.cluster == null) {\n throw 'Options object must provide a cluster';\n }\n if ('disableStats' in options) {\n logger.warn('The disableStats option is deprecated in favor of enableStats');\n }\n}\n\n;// ./src/core/auth/user_authenticator.ts\n\n\nconst composeChannelQuery = (params, authOptions) => {\n var query = 'socket_id=' + encodeURIComponent(params.socketId);\n for (var key in authOptions.params) {\n query +=\n '&' +\n encodeURIComponent(key) +\n '=' +\n encodeURIComponent(authOptions.params[key]);\n }\n if (authOptions.paramsProvider != null) {\n let dynamicParams = authOptions.paramsProvider();\n for (var key in dynamicParams) {\n query +=\n '&' +\n encodeURIComponent(key) +\n '=' +\n encodeURIComponent(dynamicParams[key]);\n }\n }\n return query;\n};\nconst UserAuthenticator = (authOptions) => {\n if (typeof runtime.getAuthorizers()[authOptions.transport] === 'undefined') {\n throw `'${authOptions.transport}' is not a recognized auth transport`;\n }\n return (params, callback) => {\n const query = composeChannelQuery(params, authOptions);\n runtime.getAuthorizers()[authOptions.transport](runtime, query, authOptions, AuthRequestType.UserAuthentication, callback);\n };\n};\n/* harmony default export */ const user_authenticator = (UserAuthenticator);\n\n;// ./src/core/auth/channel_authorizer.ts\n\n\nconst channel_authorizer_composeChannelQuery = (params, authOptions) => {\n var query = 'socket_id=' + encodeURIComponent(params.socketId);\n query += '&channel_name=' + encodeURIComponent(params.channelName);\n for (var key in authOptions.params) {\n query +=\n '&' +\n encodeURIComponent(key) +\n '=' +\n encodeURIComponent(authOptions.params[key]);\n }\n if (authOptions.paramsProvider != null) {\n let dynamicParams = authOptions.paramsProvider();\n for (var key in dynamicParams) {\n query +=\n '&' +\n encodeURIComponent(key) +\n '=' +\n encodeURIComponent(dynamicParams[key]);\n }\n }\n return query;\n};\nconst ChannelAuthorizer = (authOptions) => {\n if (typeof runtime.getAuthorizers()[authOptions.transport] === 'undefined') {\n throw `'${authOptions.transport}' is not a recognized auth transport`;\n }\n return (params, callback) => {\n const query = channel_authorizer_composeChannelQuery(params, authOptions);\n runtime.getAuthorizers()[authOptions.transport](runtime, query, authOptions, AuthRequestType.ChannelAuthorization, callback);\n };\n};\n/* harmony default export */ const channel_authorizer = (ChannelAuthorizer);\n\n;// ./src/core/auth/deprecated_channel_authorizer.ts\nconst ChannelAuthorizerProxy = (pusher, authOptions, channelAuthorizerGenerator) => {\n const deprecatedAuthorizerOptions = {\n authTransport: authOptions.transport,\n authEndpoint: authOptions.endpoint,\n auth: {\n params: authOptions.params,\n headers: authOptions.headers,\n },\n };\n return (params, callback) => {\n const channel = pusher.channel(params.channelName);\n const channelAuthorizer = channelAuthorizerGenerator(channel, deprecatedAuthorizerOptions);\n channelAuthorizer.authorize(params.socketId, callback);\n };\n};\n\n;// ./src/core/config.ts\n\n\n\n\n\nfunction getConfig(opts, pusher) {\n let config = {\n activityTimeout: opts.activityTimeout || defaults.activityTimeout,\n cluster: opts.cluster,\n httpPath: opts.httpPath || defaults.httpPath,\n httpPort: opts.httpPort || defaults.httpPort,\n httpsPort: opts.httpsPort || defaults.httpsPort,\n pongTimeout: opts.pongTimeout || defaults.pongTimeout,\n statsHost: opts.statsHost || defaults.stats_host,\n unavailableTimeout: opts.unavailableTimeout || defaults.unavailableTimeout,\n wsPath: opts.wsPath || defaults.wsPath,\n wsPort: opts.wsPort || defaults.wsPort,\n wssPort: opts.wssPort || defaults.wssPort,\n enableStats: getEnableStatsConfig(opts),\n httpHost: getHttpHost(opts),\n useTLS: shouldUseTLS(opts),\n wsHost: getWebsocketHost(opts),\n userAuthenticator: buildUserAuthenticator(opts),\n channelAuthorizer: buildChannelAuthorizer(opts, pusher),\n };\n if ('disabledTransports' in opts)\n config.disabledTransports = opts.disabledTransports;\n if ('enabledTransports' in opts)\n config.enabledTransports = opts.enabledTransports;\n if ('ignoreNullOrigin' in opts)\n config.ignoreNullOrigin = opts.ignoreNullOrigin;\n if ('timelineParams' in opts)\n config.timelineParams = opts.timelineParams;\n if ('nacl' in opts) {\n config.nacl = opts.nacl;\n }\n return config;\n}\nfunction getHttpHost(opts) {\n if (opts.httpHost) {\n return opts.httpHost;\n }\n if (opts.cluster) {\n return `sockjs-${opts.cluster}.pusher.com`;\n }\n return defaults.httpHost;\n}\nfunction getWebsocketHost(opts) {\n if (opts.wsHost) {\n return opts.wsHost;\n }\n return getWebsocketHostFromCluster(opts.cluster);\n}\nfunction getWebsocketHostFromCluster(cluster) {\n return `ws-${cluster}.pusher.com`;\n}\nfunction shouldUseTLS(opts) {\n if (runtime.getProtocol() === 'https:') {\n return true;\n }\n else if (opts.forceTLS === false) {\n return false;\n }\n return true;\n}\nfunction getEnableStatsConfig(opts) {\n if ('enableStats' in opts) {\n return opts.enableStats;\n }\n if ('disableStats' in opts) {\n return !opts.disableStats;\n }\n return false;\n}\nconst hasCustomHandler = (auth) => {\n return 'customHandler' in auth && auth['customHandler'] != null;\n};\nfunction buildUserAuthenticator(opts) {\n const userAuthentication = Object.assign(Object.assign({}, defaults.userAuthentication), opts.userAuthentication);\n if (hasCustomHandler(userAuthentication)) {\n return userAuthentication['customHandler'];\n }\n return user_authenticator(userAuthentication);\n}\nfunction buildChannelAuth(opts, pusher) {\n let channelAuthorization;\n if ('channelAuthorization' in opts) {\n channelAuthorization = Object.assign(Object.assign({}, defaults.channelAuthorization), opts.channelAuthorization);\n }\n else {\n channelAuthorization = {\n transport: opts.authTransport || defaults.authTransport,\n endpoint: opts.authEndpoint || defaults.authEndpoint,\n };\n if ('auth' in opts) {\n if ('params' in opts.auth)\n channelAuthorization.params = opts.auth.params;\n if ('headers' in opts.auth)\n channelAuthorization.headers = opts.auth.headers;\n }\n if ('authorizer' in opts) {\n return {\n customHandler: ChannelAuthorizerProxy(pusher, channelAuthorization, opts.authorizer),\n };\n }\n }\n return channelAuthorization;\n}\nfunction buildChannelAuthorizer(opts, pusher) {\n const channelAuthorization = buildChannelAuth(opts, pusher);\n if (hasCustomHandler(channelAuthorization)) {\n return channelAuthorization['customHandler'];\n }\n return channel_authorizer(channelAuthorization);\n}\n\n;// ./src/core/watchlist.ts\n\n\nclass WatchlistFacade extends Dispatcher {\n constructor(pusher) {\n super(function (eventName, data) {\n logger.debug(`No callbacks on watchlist events for ${eventName}`);\n });\n this.pusher = pusher;\n this.bindWatchlistInternalEvent();\n }\n handleEvent(pusherEvent) {\n pusherEvent.data.events.forEach((watchlistEvent) => {\n this.emit(watchlistEvent.name, watchlistEvent);\n });\n }\n bindWatchlistInternalEvent() {\n this.pusher.connection.bind('message', (pusherEvent) => {\n var eventName = pusherEvent.event;\n if (eventName === 'pusher_internal:watchlist_events') {\n this.handleEvent(pusherEvent);\n }\n });\n }\n}\n\n;// ./src/core/utils/flat_promise.ts\nfunction flatPromise() {\n let resolve, reject;\n const promise = new Promise((res, rej) => {\n resolve = res;\n reject = rej;\n });\n return { promise, resolve, reject };\n}\n/* harmony default export */ const flat_promise = (flatPromise);\n\n;// ./src/core/user.ts\n\n\n\n\n\nclass UserFacade extends Dispatcher {\n constructor(pusher) {\n super(function (eventName, data) {\n logger.debug('No callbacks on user for ' + eventName);\n });\n this.signin_requested = false;\n this.user_data = null;\n this.serverToUserChannel = null;\n this.signinDonePromise = null;\n this._signinDoneResolve = null;\n this._onAuthorize = (err, authData) => {\n if (err) {\n logger.warn(`Error during signin: ${err}`);\n this._cleanup();\n return;\n }\n this.pusher.send_event('pusher:signin', {\n auth: authData.auth,\n user_data: authData.user_data,\n });\n };\n this.pusher = pusher;\n this.pusher.connection.bind('state_change', ({ previous, current }) => {\n if (previous !== 'connected' && current === 'connected') {\n this._signin();\n }\n if (previous === 'connected' && current !== 'connected') {\n this._cleanup();\n this._newSigninPromiseIfNeeded();\n }\n });\n this.watchlist = new WatchlistFacade(pusher);\n this.pusher.connection.bind('message', (event) => {\n var eventName = event.event;\n if (eventName === 'pusher:signin_success') {\n this._onSigninSuccess(event.data);\n }\n if (this.serverToUserChannel &&\n this.serverToUserChannel.name === event.channel) {\n this.serverToUserChannel.handleEvent(event);\n }\n });\n }\n signin() {\n if (this.signin_requested) {\n return;\n }\n this.signin_requested = true;\n this._signin();\n }\n _signin() {\n if (!this.signin_requested) {\n return;\n }\n this._newSigninPromiseIfNeeded();\n if (this.pusher.connection.state !== 'connected') {\n return;\n }\n this.pusher.config.userAuthenticator({\n socketId: this.pusher.connection.socket_id,\n }, this._onAuthorize);\n }\n _onSigninSuccess(data) {\n try {\n this.user_data = JSON.parse(data.user_data);\n }\n catch (e) {\n logger.error(`Failed parsing user data after signin: ${data.user_data}`);\n this._cleanup();\n return;\n }\n if (typeof this.user_data.id !== 'string' || this.user_data.id === '') {\n logger.error(`user_data doesn't contain an id. user_data: ${this.user_data}`);\n this._cleanup();\n return;\n }\n this._signinDoneResolve();\n this._subscribeChannels();\n }\n _subscribeChannels() {\n const ensure_subscribed = (channel) => {\n if (channel.subscriptionPending && channel.subscriptionCancelled) {\n channel.reinstateSubscription();\n }\n else if (!channel.subscriptionPending &&\n this.pusher.connection.state === 'connected') {\n channel.subscribe();\n }\n };\n this.serverToUserChannel = new Channel(`#server-to-user-${this.user_data.id}`, this.pusher);\n this.serverToUserChannel.bind_global((eventName, data) => {\n if (eventName.indexOf('pusher_internal:') === 0 ||\n eventName.indexOf('pusher:') === 0) {\n return;\n }\n this.emit(eventName, data);\n });\n ensure_subscribed(this.serverToUserChannel);\n }\n _cleanup() {\n this.user_data = null;\n if (this.serverToUserChannel) {\n this.serverToUserChannel.unbind_all();\n this.serverToUserChannel.disconnect();\n this.serverToUserChannel = null;\n }\n if (this.signin_requested) {\n this._signinDoneResolve();\n }\n }\n _newSigninPromiseIfNeeded() {\n if (!this.signin_requested) {\n return;\n }\n if (this.signinDonePromise && !this.signinDonePromise.done) {\n return;\n }\n const { promise, resolve, reject: _ } = flat_promise();\n promise.done = false;\n const setDone = () => {\n promise.done = true;\n };\n promise.then(setDone).catch(setDone);\n this.signinDonePromise = promise;\n this._signinDoneResolve = resolve;\n }\n}\n\n;// ./src/core/pusher.ts\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Pusher {\n static ready() {\n Pusher.isReady = true;\n for (var i = 0, l = Pusher.instances.length; i < l; i++) {\n Pusher.instances[i].connect();\n }\n }\n static getClientFeatures() {\n return keys(filterObject({ ws: runtime.Transports.ws }, function (t) {\n return t.isSupported({});\n }));\n }\n constructor(app_key, options) {\n checkAppKey(app_key);\n validateOptions(options);\n this.key = app_key;\n this.options = options;\n this.config = getConfig(this.options, this);\n this.channels = factory.createChannels();\n this.global_emitter = new Dispatcher();\n this.sessionID = runtime.randomInt(1000000000);\n this.timeline = new Timeline(this.key, this.sessionID, {\n cluster: this.config.cluster,\n features: Pusher.getClientFeatures(),\n params: this.config.timelineParams || {},\n limit: 50,\n level: level.INFO,\n version: defaults.VERSION,\n });\n if (this.config.enableStats) {\n this.timelineSender = factory.createTimelineSender(this.timeline, {\n host: this.config.statsHost,\n path: '/timeline/v2/' + runtime.TimelineTransport.name,\n });\n }\n var getStrategy = (options) => {\n return runtime.getDefaultStrategy(this.config, options, defineTransport);\n };\n this.connection = factory.createConnectionManager(this.key, {\n getStrategy: getStrategy,\n timeline: this.timeline,\n activityTimeout: this.config.activityTimeout,\n pongTimeout: this.config.pongTimeout,\n unavailableTimeout: this.config.unavailableTimeout,\n useTLS: Boolean(this.config.useTLS),\n });\n this.connection.bind('connected', () => {\n this.subscribeAll();\n if (this.timelineSender) {\n this.timelineSender.send(this.connection.isUsingTLS());\n }\n });\n this.connection.bind('message', (event) => {\n var eventName = event.event;\n var internal = eventName.indexOf('pusher_internal:') === 0;\n if (event.channel) {\n var channel = this.channel(event.channel);\n if (channel) {\n channel.handleEvent(event);\n }\n }\n if (!internal) {\n this.global_emitter.emit(event.event, event.data);\n }\n });\n this.connection.bind('connecting', () => {\n this.channels.disconnect();\n });\n this.connection.bind('disconnected', () => {\n this.channels.disconnect();\n });\n this.connection.bind('error', (err) => {\n logger.warn(err);\n });\n Pusher.instances.push(this);\n this.timeline.info({ instances: Pusher.instances.length });\n this.user = new UserFacade(this);\n if (Pusher.isReady) {\n this.connect();\n }\n }\n switchCluster(options) {\n const { appKey, cluster } = options;\n this.key = appKey;\n this.options = Object.assign(Object.assign({}, this.options), { cluster });\n this.config = getConfig(this.options, this);\n this.connection.switchCluster(this.key);\n }\n channel(name) {\n return this.channels.find(name);\n }\n allChannels() {\n return this.channels.all();\n }\n connect() {\n this.connection.connect();\n if (this.timelineSender) {\n if (!this.timelineSenderTimer) {\n var usingTLS = this.connection.isUsingTLS();\n var timelineSender = this.timelineSender;\n this.timelineSenderTimer = new PeriodicTimer(60000, function () {\n timelineSender.send(usingTLS);\n });\n }\n }\n }\n disconnect() {\n this.connection.disconnect();\n if (this.timelineSenderTimer) {\n this.timelineSenderTimer.ensureAborted();\n this.timelineSenderTimer = null;\n }\n }\n bind(event_name, callback, context) {\n this.global_emitter.bind(event_name, callback, context);\n return this;\n }\n unbind(event_name, callback, context) {\n this.global_emitter.unbind(event_name, callback, context);\n return this;\n }\n bind_global(callback) {\n this.global_emitter.bind_global(callback);\n return this;\n }\n unbind_global(callback) {\n this.global_emitter.unbind_global(callback);\n return this;\n }\n unbind_all(callback) {\n this.global_emitter.unbind_all();\n return this;\n }\n subscribeAll() {\n var channelName;\n for (channelName in this.channels.channels) {\n if (this.channels.channels.hasOwnProperty(channelName)) {\n this.subscribe(channelName);\n }\n }\n }\n subscribe(channel_name) {\n var channel = this.channels.add(channel_name, this);\n if (channel.subscriptionPending && channel.subscriptionCancelled) {\n channel.reinstateSubscription();\n }\n else if (!channel.subscriptionPending &&\n this.connection.state === 'connected') {\n channel.subscribe();\n }\n return channel;\n }\n unsubscribe(channel_name) {\n var channel = this.channels.find(channel_name);\n if (channel && channel.subscriptionPending) {\n channel.cancelSubscription();\n }\n else {\n channel = this.channels.remove(channel_name);\n if (channel && channel.subscribed) {\n channel.unsubscribe();\n }\n }\n }\n send_event(event_name, data, channel) {\n return this.connection.send_event(event_name, data, channel);\n }\n shouldUseTLS() {\n return this.config.useTLS;\n }\n signin() {\n this.user.signin();\n }\n}\nPusher.instances = [];\nPusher.isReady = false;\nPusher.logToConsole = false;\nPusher.Runtime = runtime;\nPusher.ScriptReceivers = runtime.ScriptReceivers;\nPusher.DependenciesReceivers = runtime.DependenciesReceivers;\nPusher.auth_callbacks = runtime.auth_callbacks;\n/* harmony default export */ const pusher = (Pusher);\nfunction checkAppKey(key) {\n if (key === null || key === undefined) {\n throw 'You must pass your app key when you instantiate Pusher.';\n }\n}\nruntime.setup(Pusher);\n\n\n/***/ }\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t(() => {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = (exports, definition) => {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t(() => {\n/******/ \t\t__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))\n/******/ \t})();\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \t// This entry module used 'module' so it can't be inlined\n/******/ \tvar __webpack_exports__ = __webpack_require__(721);\n/******/ \t\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});\n//# sourceMappingURL=pusher.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAQA,EAAC,SAA0C,GAAM,GAAS;AACzD,EAAG,OAAO,KAAY,YAAY,OAAO,KAAW,WACnD,EAAO,UAAU,GAAS,GACnB,OAAO,UAAW,cAAc,OAAO,MAC9C,OAAO,EAAE,EAAE,EAAQ,GACZ,OAAO,KAAY,WAC1B,EAAQ,SAAY,GAAS,GAE7B,EAAK,SAAY,GAAS;IACzB,mBACoB;EACb,IAAI,IAAuB;GAE/B,IACL,GAAyB,GAAS;IAMnC,IAAI,IAAa,QAAQ,KAAK,cAAe,WAAY;KACrD,IAAI,IAAgB,SAAU,GAAG,GAAG;AAIhC,aAHA,IAAgB,OAAO,kBAClB,EAAE,WAAW,EAAE,EAAE,YAAY,SAAS,SAAU,GAAG,GAAG;AAAE,SAAE,YAAY;WACvE,SAAU,GAAG,GAAG;AAAE,YAAK,IAAI,KAAK,EAAG,CAAI,EAAE,eAAe,EAAE,KAAE,EAAE,KAAK,EAAE;SAClE,EAAc,GAAG,EAAE;;AAE9B,YAAO,SAAU,GAAG,GAAG;AACnB,QAAc,GAAG,EAAE;MACnB,SAAS,IAAK;AAAE,YAAK,cAAc;;AACnC,QAAE,YAAY,MAAM,OAAO,OAAO,OAAO,EAAE,IAAI,EAAG,YAAY,EAAE,WAAW,IAAI,GAAI;;QAEvF;AACJ,WAAO,eAAeA,GAAS,cAAe,EAAE,OAAO,IAAM,CAAE;IAO/D,IAAI,IAAe,KAMf,IAAuB,WAAY;KAEnC,SAAS,EAAM,GAAmB;AAE9B,MADI,MAA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