@commentkit/comment-kit 0.7.7 → 1.0.0-beta.2

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.
Files changed (129) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/README.md +172 -732
  3. package/SECURITY.md +24 -14
  4. package/dist/npm/THIRD_PARTY_NOTICES.txt +73 -0
  5. package/dist/npm/chunks/Guest-CKoV6pEK.js +157 -0
  6. package/dist/npm/chunks/MarkupEditor-DAo4qppg.js +199 -0
  7. package/dist/npm/chunks/Panel-BRBDHlGg.js +399 -0
  8. package/dist/npm/chunks/Shortcuts-CHMcrjAM.js +56 -0
  9. package/dist/npm/chunks/ThreadCard-D8FzIxbs.js +570 -0
  10. package/dist/npm/chunks/anchor-DT-Ynhh1.js +270 -0
  11. package/dist/npm/chunks/ar-D3SPpN1T.js +195 -0
  12. package/dist/npm/chunks/client-D1NizpDK.js +627 -0
  13. package/dist/{shared/capture-colors-D0uLr-vZ.js → npm/chunks/colors-CX-IPjvb.js} +2 -0
  14. package/dist/npm/chunks/de-C8eC6c6f.js +187 -0
  15. package/dist/npm/chunks/es-Bczf42tm.js +187 -0
  16. package/dist/npm/chunks/extension--it1LAj-.js +54 -0
  17. package/dist/npm/chunks/extension-XfuRGu2o.js +26 -0
  18. package/dist/npm/chunks/format-Bw_tNOh9.js +524 -0
  19. package/dist/npm/chunks/fr-BaQw-v2e.js +187 -0
  20. package/dist/npm/chunks/hi-BamV-yXv.js +187 -0
  21. package/dist/npm/chunks/html2canvas-DfGb8yka.js +4024 -0
  22. package/dist/npm/chunks/it-DC14_EjN.js +187 -0
  23. package/dist/npm/chunks/ja-B1mmTN7Y.js +187 -0
  24. package/dist/npm/chunks/mount-5fFig0k6.js +1447 -0
  25. package/dist/npm/chunks/nl-BfhqUsmX.js +187 -0
  26. package/dist/npm/chunks/privacy-DLhezjyi.js +30 -0
  27. package/dist/npm/chunks/pt-BR-CEPu4W5U.js +187 -0
  28. package/dist/{shared/pusher-CnhQgAvF.js → npm/chunks/pusher-BSsQoE1K.js} +224 -222
  29. package/dist/npm/chunks/realtime-CBRW9BB3.js +34 -0
  30. package/dist/npm/chunks/report-Dh4fxd4J.js +27 -0
  31. package/dist/npm/chunks/rolldown-runtime-Y_bBpyJl.js +20 -0
  32. package/dist/npm/chunks/src-DujplxfI.js +517 -0
  33. package/dist/npm/chunks/zh-CN-kgqjYwHQ.js +187 -0
  34. package/dist/npm/element.js +41 -0
  35. package/dist/npm/headless.js +3 -0
  36. package/dist/npm/index.js +3 -0
  37. package/dist/npm/react.js +26 -0
  38. package/dist/npm/svelte.js +17 -0
  39. package/dist/npm/types/adapters/react.d.ts +11 -0
  40. package/dist/npm/types/adapters/svelte.d.ts +9 -0
  41. package/dist/npm/types/adapters/vue.d.ts +118 -0
  42. package/dist/npm/types/anchor/index.d.ts +49 -0
  43. package/dist/npm/types/core/api.d.ts +31 -0
  44. package/dist/npm/types/core/auth.d.ts +87 -0
  45. package/dist/npm/types/core/client.d.ts +114 -0
  46. package/dist/npm/types/core/store.d.ts +7 -0
  47. package/dist/npm/types/core/types.d.ts +303 -0
  48. package/dist/npm/types/element.d.ts +13 -0
  49. package/dist/npm/types/headless.d.ts +7 -0
  50. package/dist/npm/types/index.d.ts +32 -0
  51. package/dist/npm/vue.js +71 -0
  52. package/package.json +71 -173
  53. package/dist/THIRD_PARTY_NOTICES.txt +0 -284
  54. package/dist/angular.es.js +0 -321
  55. package/dist/comment-kit.es.js +0 -218
  56. package/dist/demo.es.js +0 -483
  57. package/dist/headless.es.js +0 -4
  58. package/dist/preact.es.js +0 -117
  59. package/dist/qwik.es.js +0 -1
  60. package/dist/qwik.qwik.mjs +0 -114
  61. package/dist/react.es.js +0 -98
  62. package/dist/shared/ShadowRootContext-DD6a0QaI.js +0 -11
  63. package/dist/shared/annotation-icons-Dh-bmNYK.js +0 -172
  64. package/dist/shared/annotation-toolbar-zeiCmKIr.js +0 -1086
  65. package/dist/shared/attachment-refresh-DAacLaRu.js +0 -94
  66. package/dist/shared/bridge-CJoGYngu.js +0 -177
  67. package/dist/shared/button-D4GHW6oZ.js +0 -474
  68. package/dist/shared/button-group-BVR7iT-S.js +0 -91
  69. package/dist/shared/capture-privacy-CiOrcAlt.js +0 -101
  70. package/dist/shared/comment-drawing-canvas-Btc12IsS.js +0 -124
  71. package/dist/shared/comment-icon-D8JTCEJ7.js +0 -607
  72. package/dist/shared/comment-image-lightbox--QpbcAtH.js +0 -190
  73. package/dist/shared/comment-images-content-C_r4SHM-.js +0 -214
  74. package/dist/shared/comment-kit-core-CmLUFujd.js +0 -3682
  75. package/dist/shared/comment-kit-ui-BHwYuSIi.js +0 -19391
  76. package/dist/shared/comment-screenshot-annotator-zJZyO-XM.js +0 -151
  77. package/dist/shared/comment-screenshot-overlay-CoKTYB0J.js +0 -205
  78. package/dist/shared/comment-shortcut-groups-CfEmkitU.js +0 -153
  79. package/dist/shared/createReactComponent-BZHeRbD0.js +0 -45
  80. package/dist/shared/dev-export-panel-Cnt6oCZU.js +0 -207
  81. package/dist/shared/dev-grab-B85jo9AS.js +0 -197
  82. package/dist/shared/dist-D9A5k-N4.js +0 -617
  83. package/dist/shared/dom-Bhf4WFtY.js +0 -223
  84. package/dist/shared/element-selector-Cng84xC7.js +0 -902
  85. package/dist/shared/error-boundary-D3PD74vI.js +0 -21
  86. package/dist/shared/errors-Bu5ajEmB.js +0 -22
  87. package/dist/shared/icons-nzMOLzrm.js +0 -266
  88. package/dist/shared/input-UPtAj0M6.js +0 -111
  89. package/dist/shared/mount-ui-Dz7FB_Ak.js +0 -208
  90. package/dist/shared/realtime-recovery-BjlV-ewc.js +0 -162
  91. package/dist/shared/realtime-yGLX4wMK.js +0 -334
  92. package/dist/shared/request-activity-DQrAUwfA.js +0 -11
  93. package/dist/shared/screenshot-B5-hwpmt.js +0 -199
  94. package/dist/shared/separator-UhJb0Row.js +0 -3955
  95. package/dist/shared/shadow-root-B58ZI2yz.js +0 -133
  96. package/dist/shared/styles-CnYsLS2f.js +0 -2
  97. package/dist/shared/text-B4HHZNaa.js +0 -23
  98. package/dist/shared/token-session-D92MYbNu.js +0 -25
  99. package/dist/shared/useLabelableId-8n0QmH8N.js +0 -154
  100. package/dist/shared/useRender-Uxk1OPK-.js +0 -5
  101. package/dist/shared/useValueChanged-DKq5cMot.js +0 -92
  102. package/dist/shared/validation-3wbbbuX0.js +0 -70
  103. package/dist/shared/websocket-manager-KhH4hL0Q.js +0 -381
  104. package/dist/solid.es.js +0 -98
  105. package/dist/svelte.es.js +0 -130
  106. package/dist/types/adapters/bridge.d.ts +0 -122
  107. package/dist/types/angular/index.d.ts +0 -145
  108. package/dist/types/core/agent-context.d.ts +0 -17
  109. package/dist/types/core/api-client.d.ts +0 -155
  110. package/dist/types/core/comment-kit-core.d.ts +0 -254
  111. package/dist/types/core/local-demo.d.ts +0 -60
  112. package/dist/types/core/types.d.ts +0 -770
  113. package/dist/types/core/websocket-manager.d.ts +0 -125
  114. package/dist/types/core/write-access.d.ts +0 -11
  115. package/dist/types/demo.d.ts +0 -17
  116. package/dist/types/headless.d.ts +0 -8
  117. package/dist/types/index.d.ts +0 -87
  118. package/dist/types/preact/index.d.ts +0 -25
  119. package/dist/types/qwik/index.d.ts +0 -73
  120. package/dist/types/react/client.d.ts +0 -31
  121. package/dist/types/react/index.d.ts +0 -4
  122. package/dist/types/solid/index.d.ts +0 -37
  123. package/dist/types/svelte/index.d.ts +0 -55
  124. package/dist/types/utils/dom.d.ts +0 -59
  125. package/dist/types/utils/event-emitter.d.ts +0 -11
  126. package/dist/types/vue/index.d.ts +0 -87
  127. package/dist/vue.es.js +0 -148
  128. package/docs/api-reference.md +0 -405
  129. package/docs/local-demo.md +0 -60
@@ -1,4 +1,5 @@
1
- import { a as e } from "./websocket-manager-KhH4hL0Q.js";
1
+ import { t as e } from "./rolldown-runtime-Y_bBpyJl.js";
2
+ //#region node_modules/pusher-js/dist/web/pusher.js
2
3
  var t = /* @__PURE__ */ e(((e, t) => {
3
4
  (function(n, r) {
4
5
  typeof e == "object" && typeof t == "object" ? t.exports = r() : typeof define == "function" && define.amd ? define([], r) : typeof e == "object" ? e.Pusher = r() : n.Pusher = r();
@@ -150,7 +151,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
150
151
  create(e) {
151
152
  this.lastId++;
152
153
  var t = this.lastId, n = this.prefix + t, r = this.name + "[" + t + "]", i = !1, a = function() {
153
- i ||= (e.apply(null, arguments), !0);
154
+ i || (e.apply(null, arguments), i = !0);
154
155
  };
155
156
  return this[t] = a, {
156
157
  number: t,
@@ -246,7 +247,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
246
247
  var d;
247
248
  (function(e) {
248
249
  e.UserAuthentication = "user-authentication", e.ChannelAuthorization = "channel-authorization";
249
- })(d ||= {});
250
+ })(d || (d = {}));
250
251
  class ee extends Error {
251
252
  constructor(e) {
252
253
  super(e), Object.setPrototypeOf(this, new.target.prototype);
@@ -349,14 +350,14 @@ var t = /* @__PURE__ */ e(((e, t) => {
349
350
  class le {
350
351
  constructor(e, t, n, r) {
351
352
  this.clear = t, this.timer = e(() => {
352
- this.timer &&= r(this.timer);
353
+ this.timer && (this.timer = r(this.timer));
353
354
  }, n);
354
355
  }
355
356
  isRunning() {
356
357
  return this.timer !== null;
357
358
  }
358
359
  ensureAborted() {
359
- this.timer &&= (this.clear(this.timer), null);
360
+ this.timer && (this.clear(this.timer), this.timer = null);
360
361
  }
361
362
  }
362
363
  let ue = le;
@@ -402,82 +403,82 @@ var t = /* @__PURE__ */ e(((e, t) => {
402
403
  return e;
403
404
  }
404
405
  function me() {
405
- for (var e = ["Pusher"], t = 0; t < arguments.length; t++) typeof arguments[t] == "string" ? e.push(arguments[t]) : e.push(k(arguments[t]));
406
+ for (var e = ["Pusher"], t = 0; t < arguments.length; t++) typeof arguments[t] == "string" ? e.push(arguments[t]) : e.push(O(arguments[t]));
406
407
  return e.join(" : ");
407
408
  }
408
- function E(e, t) {
409
+ function he(e, t) {
409
410
  var n = Array.prototype.indexOf;
410
411
  if (e === null) return -1;
411
412
  if (n && e.indexOf === n) return e.indexOf(t);
412
413
  for (var r = 0, i = e.length; r < i; r++) if (e[r] === t) return r;
413
414
  return -1;
414
415
  }
415
- function D(e, t) {
416
+ function E(e, t) {
416
417
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t(e[n], n, e);
417
418
  }
418
- function he(e) {
419
+ function ge(e) {
419
420
  var t = [];
420
- return D(e, function(e, n) {
421
+ return E(e, function(e, n) {
421
422
  t.push(n);
422
423
  }), t;
423
424
  }
424
- function ge(e) {
425
+ function _e(e) {
425
426
  var t = [];
426
- return D(e, function(e) {
427
+ return E(e, function(e) {
427
428
  t.push(e);
428
429
  }), t;
429
430
  }
430
- function O(e, t, n) {
431
+ function D(e, t, n) {
431
432
  for (var r = 0; r < e.length; r++) t.call(n || window, e[r], r, e);
432
433
  }
433
- function _e(e, t) {
434
+ function ve(e, t) {
434
435
  for (var n = [], r = 0; r < e.length; r++) n.push(t(e[r], r, e, n));
435
436
  return n;
436
437
  }
437
- function ve(e, t) {
438
+ function ye(e, t) {
438
439
  var n = {};
439
- return D(e, function(e, r) {
440
+ return E(e, function(e, r) {
440
441
  n[r] = t(e);
441
442
  }), n;
442
443
  }
443
- function ye(e, t) {
444
- t ||= function(e) {
444
+ function be(e, t) {
445
+ t = t || function(e) {
445
446
  return !!e;
446
447
  };
447
448
  for (var n = [], r = 0; r < e.length; r++) t(e[r], r, e, n) && n.push(e[r]);
448
449
  return n;
449
450
  }
450
- function be(e, t) {
451
+ function xe(e, t) {
451
452
  var n = {};
452
- return D(e, function(r, i) {
453
+ return E(e, function(r, i) {
453
454
  (t && t(r, i, e, n) || r) && (n[i] = r);
454
455
  }), n;
455
456
  }
456
- function xe(e) {
457
+ function Se(e) {
457
458
  var t = [];
458
- return D(e, function(e, n) {
459
+ return E(e, function(e, n) {
459
460
  t.push([n, e]);
460
461
  }), t;
461
462
  }
462
- function Se(e, t) {
463
+ function Ce(e, t) {
463
464
  for (var n = 0; n < e.length; n++) if (t(e[n], n, e)) return !0;
464
465
  return !1;
465
466
  }
466
- function Ce(e, t) {
467
+ function we(e, t) {
467
468
  for (var n = 0; n < e.length; n++) if (!t(e[n], n, e)) return !1;
468
469
  return !0;
469
470
  }
470
- function we(e) {
471
- return ve(e, function(e) {
472
- return e === null ? "" : (typeof e == "object" && (e = k(e)), encodeURIComponent(y(e.toString())));
471
+ function Te(e) {
472
+ return ye(e, function(e) {
473
+ return e === null ? "" : (typeof e == "object" && (e = O(e)), encodeURIComponent(y(e.toString())));
473
474
  });
474
475
  }
475
- function Te(e) {
476
- return _e(xe(we(be(e, function(e) {
476
+ function Ee(e) {
477
+ return ve(Se(Te(xe(e, function(e) {
477
478
  return e !== void 0;
478
479
  }))), w.method("join", "=")).join("&");
479
480
  }
480
- function Ee(e) {
481
+ function De(e) {
481
482
  var t = [], n = [];
482
483
  return (function e(r, i) {
483
484
  var a, o, s;
@@ -494,14 +495,14 @@ var t = /* @__PURE__ */ e(((e, t) => {
494
495
  }
495
496
  })(e, "$");
496
497
  }
497
- function k(e) {
498
+ function O(e) {
498
499
  try {
499
500
  return JSON.stringify(e);
500
501
  } catch {
501
- return JSON.stringify(Ee(e));
502
+ return JSON.stringify(De(e));
502
503
  }
503
504
  }
504
- class De {
505
+ class Oe {
505
506
  constructor() {
506
507
  this.globalLog = (e) => {
507
508
  window.console && window.console.log && window.console.log(e);
@@ -527,8 +528,8 @@ var t = /* @__PURE__ */ e(((e, t) => {
527
528
  $.log ? $.log(n) : $.logToConsole && e.bind(this)(n);
528
529
  }
529
530
  }
530
- let A = new De(), Oe = function(e, t, n, r, i) {
531
- (n.headers !== void 0 || n.headersProvider != null) && A.warn(`To send headers with the ${r.toString()} request, you must use AJAX, rather than JSONP.`);
531
+ let k = new Oe(), ke = function(e, t, n, r, i) {
532
+ (n.headers !== void 0 || n.headersProvider != null) && k.warn(`To send headers with the ${r.toString()} request, you must use AJAX, rather than JSONP.`);
532
533
  var a = e.nextAuthCallbackID.toString();
533
534
  e.nextAuthCallbackID++;
534
535
  var o = e.getDocument(), s = o.createElement("script");
@@ -540,7 +541,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
540
541
  var l = o.getElementsByTagName("head")[0] || o.documentElement;
541
542
  l.insertBefore(s, l.firstChild);
542
543
  };
543
- class ke {
544
+ class Ae {
544
545
  constructor(e) {
545
546
  this.src = e;
546
547
  }
@@ -560,13 +561,13 @@ var t = /* @__PURE__ */ e(((e, t) => {
560
561
  this.script && (this.script.onload = this.script.onerror = null, this.script.onreadystatechange = null), this.script && this.script.parentNode && this.script.parentNode.removeChild(this.script), this.errorScript && this.errorScript.parentNode && this.errorScript.parentNode.removeChild(this.errorScript), this.script = null, this.errorScript = null;
561
562
  }
562
563
  }
563
- class Ae {
564
+ class je {
564
565
  constructor(e, t) {
565
566
  this.url = e, this.data = t;
566
567
  }
567
568
  send(e) {
568
569
  if (!this.request) {
569
- var t = Te(this.data), n = this.url + "/" + e.number + "?" + t;
570
+ var t = Ee(this.data), n = this.url + "/" + e.number + "?" + t;
570
571
  this.request = Y.createScriptRequest(n), this.request.send(e);
571
572
  }
572
573
  }
@@ -574,7 +575,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
574
575
  this.request && this.request.cleanup();
575
576
  }
576
577
  }
577
- let je = {
578
+ let Me = {
578
579
  name: "jsonp",
579
580
  getAgent: function(e, t) {
580
581
  return function(n, r) {
@@ -585,34 +586,34 @@ var t = /* @__PURE__ */ e(((e, t) => {
585
586
  };
586
587
  }
587
588
  };
588
- function j(e, t, n) {
589
+ function A(e, t, n) {
589
590
  var r = e + (t.useTLS ? "s" : ""), i = t.useTLS ? t.hostTLS : t.hostNonTLS;
590
591
  return r + "://" + i + n;
591
592
  }
592
- function M(e, t) {
593
+ function j(e, t) {
593
594
  return "/app/" + e + ("?protocol=" + a.PROTOCOL + "&client=js&version=" + a.VERSION + (t ? "&" + t : ""));
594
595
  }
595
- var Me = { getInitial: function(e, t) {
596
- return j("ws", t, (t.httpPath || "") + M(e, "flash=false"));
597
- } }, Ne = { getInitial: function(e, t) {
598
- return j("http", t, (t.httpPath || "/pusher") + M(e));
599
- } }, Pe = {
596
+ var Ne = { getInitial: function(e, t) {
597
+ return A("ws", t, (t.httpPath || "") + j(e, "flash=false"));
598
+ } }, Pe = { getInitial: function(e, t) {
599
+ return A("http", t, (t.httpPath || "/pusher") + j(e));
600
+ } }, Fe = {
600
601
  getInitial: function(e, t) {
601
- return j("http", t, t.httpPath || "/pusher");
602
+ return A("http", t, t.httpPath || "/pusher");
602
603
  },
603
604
  getPath: function(e, t) {
604
- return M(e);
605
+ return j(e);
605
606
  }
606
607
  };
607
- class Fe {
608
+ class Ie {
608
609
  constructor() {
609
610
  this._callbacks = {};
610
611
  }
611
612
  get(e) {
612
- return this._callbacks[N(e)];
613
+ return this._callbacks[M(e)];
613
614
  }
614
615
  add(e, t, n) {
615
- var r = N(e);
616
+ var r = M(e);
616
617
  this._callbacks[r] = this._callbacks[r] || [], this._callbacks[r].push({
617
618
  fn: t,
618
619
  context: n
@@ -621,29 +622,29 @@ var t = /* @__PURE__ */ e(((e, t) => {
621
622
  remove(e, t, n) {
622
623
  if (!e && !t && !n) this._callbacks = {};
623
624
  else {
624
- var r = e ? [N(e)] : he(this._callbacks);
625
+ var r = e ? [M(e)] : ge(this._callbacks);
625
626
  t || n ? this.removeCallback(r, t, n) : this.removeAllCallbacks(r);
626
627
  }
627
628
  }
628
629
  removeCallback(e, t, n) {
629
- O(e, function(e) {
630
- this._callbacks[e] = ye(this._callbacks[e] || [], function(e) {
630
+ D(e, function(e) {
631
+ this._callbacks[e] = be(this._callbacks[e] || [], function(e) {
631
632
  return t && t !== e.fn || n && n !== e.context;
632
633
  }), this._callbacks[e].length === 0 && delete this._callbacks[e];
633
634
  }, this);
634
635
  }
635
636
  removeAllCallbacks(e) {
636
- O(e, function(e) {
637
+ D(e, function(e) {
637
638
  delete this._callbacks[e];
638
639
  }, this);
639
640
  }
640
641
  }
641
- function N(e) {
642
+ function M(e) {
642
643
  return "_" + e;
643
644
  }
644
- class P {
645
+ class N {
645
646
  constructor(e) {
646
- this.callbacks = new Fe(), this.global_callbacks = [], this.failThrough = e;
647
+ this.callbacks = new Ie(), this.global_callbacks = [], this.failThrough = e;
647
648
  }
648
649
  bind(e, t, n) {
649
650
  return this.callbacks.add(e, t, n), this;
@@ -655,7 +656,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
655
656
  return this.callbacks.remove(e, t, n), this;
656
657
  }
657
658
  unbind_global(e) {
658
- return e ? (this.global_callbacks = ye(this.global_callbacks || [], (t) => t !== e), this) : (this.global_callbacks = [], this);
659
+ return e ? (this.global_callbacks = be(this.global_callbacks || [], (t) => t !== e), this) : (this.global_callbacks = [], this);
659
660
  }
660
661
  unbind_all() {
661
662
  return this.unbind(), this.unbind_global(), this;
@@ -668,7 +669,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
668
669
  return this;
669
670
  }
670
671
  }
671
- class Ie extends P {
672
+ class Le extends N {
672
673
  constructor(e, t, n, r, i) {
673
674
  super(), this.initialize = Y.transportConnectionInitializer, this.hooks = e, this.name = t, this.priority = n, this.key = r, this.options = i, this.state = "new", this.timeline = i.timeline, this.activityTimeout = i.activityTimeout, this.id = this.timeline.generateUniqueID();
674
675
  }
@@ -688,7 +689,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
688
689
  this.onError(e), this.changeState("closed");
689
690
  }), !1;
690
691
  }
691
- return this.bindListeners(), A.debug("Connecting", {
692
+ return this.bindListeners(), k.debug("Connecting", {
692
693
  transport: this.name,
693
694
  url: e
694
695
  }), this.changeState("connecting"), !0;
@@ -752,7 +753,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
752
753
  return T({ cid: this.id }, e);
753
754
  }
754
755
  }
755
- class F {
756
+ class P {
756
757
  constructor(e) {
757
758
  this.hooks = e;
758
759
  }
@@ -760,11 +761,11 @@ var t = /* @__PURE__ */ e(((e, t) => {
760
761
  return this.hooks.isSupported(e);
761
762
  }
762
763
  createConnection(e, t, n, r) {
763
- return new Ie(this.hooks, e, t, n, r);
764
+ return new Le(this.hooks, e, t, n, r);
764
765
  }
765
766
  }
766
- var Le = new F({
767
- urls: Me,
767
+ var Re = new P({
768
+ urls: Ne,
768
769
  handlesActivityChecks: !1,
769
770
  supportsPing: !1,
770
771
  isInitialized: function() {
@@ -776,28 +777,28 @@ var t = /* @__PURE__ */ e(((e, t) => {
776
777
  getSocket: function(e) {
777
778
  return Y.createWebSocket(e);
778
779
  }
779
- }), Re = {
780
- urls: Ne,
780
+ }), ze = {
781
+ urls: Pe,
781
782
  handlesActivityChecks: !1,
782
783
  supportsPing: !0,
783
784
  isInitialized: function() {
784
785
  return !0;
785
786
  }
786
- }, ze = T({ getSocket: function(e) {
787
+ }, Be = T({ getSocket: function(e) {
787
788
  return Y.HTTPFactory.createStreamingSocket(e);
788
- } }, Re), Be = T({ getSocket: function(e) {
789
+ } }, ze), Ve = T({ getSocket: function(e) {
789
790
  return Y.HTTPFactory.createPollingSocket(e);
790
- } }, Re), Ve = { isSupported: function() {
791
+ } }, ze), He = { isSupported: function() {
791
792
  return Y.isXHRSupported();
792
793
  } };
793
- let I = {
794
- ws: Le,
795
- xhr_streaming: new F(T({}, ze, Ve)),
796
- xhr_polling: new F(T({}, Be, Ve))
794
+ let F = {
795
+ ws: Re,
796
+ xhr_streaming: new P(T({}, Be, He)),
797
+ xhr_polling: new P(T({}, Ve, He))
797
798
  };
798
- var He = new F({
799
+ var Ue = new P({
799
800
  file: "sockjs",
800
- urls: Pe,
801
+ urls: Fe,
801
802
  handlesActivityChecks: !0,
802
803
  supportsPing: !1,
803
804
  isSupported: function() {
@@ -815,12 +816,12 @@ var t = /* @__PURE__ */ e(((e, t) => {
815
816
  beforeOpen: function(e, t) {
816
817
  e.send(JSON.stringify({ path: t }));
817
818
  }
818
- }), Ue = { isSupported: function(e) {
819
+ }), We = { isSupported: function(e) {
819
820
  return Y.isXDRSupported(e.useTLS);
820
- } }, We = new F(T({}, ze, Ue)), Ge = new F(T({}, Be, Ue));
821
- I.xdr_streaming = We, I.xdr_polling = Ge, I.sockjs = He;
822
- let Ke = I;
823
- class qe extends P {
821
+ } }, Ge = new P(T({}, Be, We)), Ke = new P(T({}, Ve, We));
822
+ F.xdr_streaming = Ge, F.xdr_polling = Ke, F.sockjs = Ue;
823
+ let qe = F;
824
+ class Je extends N {
824
825
  constructor() {
825
826
  super();
826
827
  var e = this;
@@ -834,8 +835,8 @@ var t = /* @__PURE__ */ e(((e, t) => {
834
835
  return window.navigator.onLine === void 0 || window.navigator.onLine;
835
836
  }
836
837
  }
837
- var Je = new qe();
838
- class Ye {
838
+ var Ye = new Je();
839
+ class Xe {
839
840
  constructor(e, t, n) {
840
841
  this.manager = e, this.transport = t, this.minPingDelay = n.minPingDelay, this.maxPingDelay = n.maxPingDelay, this.pingDelay = void 0;
841
842
  }
@@ -856,7 +857,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
856
857
  return this.manager.isAlive() && this.transport.isSupported(e);
857
858
  }
858
859
  }
859
- let Xe = {
860
+ let Ze = {
860
861
  decodeMessage: function(e) {
861
862
  try {
862
863
  var t = JSON.parse(e.data), n = t.data;
@@ -881,7 +882,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
881
882
  return JSON.stringify(e);
882
883
  },
883
884
  processHandshake: function(e) {
884
- var t = Xe.decodeMessage(e);
885
+ var t = Ze.decodeMessage(e);
885
886
  if (t.event === "pusher:connection_established") {
886
887
  if (!t.data.activity_timeout) throw "No activity timeout specified in handshake";
887
888
  return {
@@ -908,8 +909,8 @@ var t = /* @__PURE__ */ e(((e, t) => {
908
909
  }
909
910
  } : null;
910
911
  }
911
- }, L = Xe;
912
- class Ze extends P {
912
+ }, I = Ze;
913
+ class Qe extends N {
913
914
  constructor(e, t) {
914
915
  super(), this.id = e, this.transport = t, this.activityTimeout = t.activityTimeout, this.bindListeners();
915
916
  }
@@ -924,7 +925,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
924
925
  event: e,
925
926
  data: t
926
927
  };
927
- return n && (r.channel = n), A.debug("Event sent", r), this.send(L.encodeMessage(r));
928
+ return n && (r.channel = n), k.debug("Event sent", r), this.send(I.encodeMessage(r));
928
929
  }
929
930
  ping() {
930
931
  this.transport.supportsPing() ? this.transport.ping() : this.send_event("pusher:ping", {});
@@ -937,7 +938,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
937
938
  message: (e) => {
938
939
  var t;
939
940
  try {
940
- t = L.decodeMessage(e);
941
+ t = I.decodeMessage(e);
941
942
  } catch (t) {
942
943
  this.emit("error", {
943
944
  type: "MessageParseError",
@@ -946,7 +947,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
946
947
  });
947
948
  }
948
949
  if (t !== void 0) {
949
- switch (A.debug("Event recd", t), t.event) {
950
+ switch (k.debug("Event recd", t), t.event) {
950
951
  case "pusher:error":
951
952
  this.emit("error", {
952
953
  type: "PusherError",
@@ -971,23 +972,23 @@ var t = /* @__PURE__ */ e(((e, t) => {
971
972
  t(), e && e.code && this.handleCloseEvent(e), this.transport = null, this.emit("closed");
972
973
  }
973
974
  }, t = () => {
974
- D(e, (e, t) => {
975
+ E(e, (e, t) => {
975
976
  this.transport.unbind(t, e);
976
977
  });
977
978
  };
978
- D(e, (e, t) => {
979
+ E(e, (e, t) => {
979
980
  this.transport.bind(t, e);
980
981
  });
981
982
  }
982
983
  handleCloseEvent(e) {
983
- var t = L.getCloseAction(e), n = L.getCloseError(e);
984
+ var t = I.getCloseAction(e), n = I.getCloseError(e);
984
985
  n && this.emit("error", n), t && this.emit(t, {
985
986
  action: t,
986
987
  error: n
987
988
  });
988
989
  }
989
990
  }
990
- class Qe {
991
+ class $e {
991
992
  constructor(e, t) {
992
993
  this.transport = e, this.callback = t, this.bindListeners();
993
994
  }
@@ -999,18 +1000,18 @@ var t = /* @__PURE__ */ e(((e, t) => {
999
1000
  this.unbindListeners();
1000
1001
  var t;
1001
1002
  try {
1002
- t = L.processHandshake(e);
1003
+ t = I.processHandshake(e);
1003
1004
  } catch (e) {
1004
1005
  this.finish("error", { error: e }), this.transport.close();
1005
1006
  return;
1006
1007
  }
1007
1008
  t.action === "connected" ? this.finish("connected", {
1008
- connection: new Ze(t.id, this.transport),
1009
+ connection: new Qe(t.id, this.transport),
1009
1010
  activityTimeout: t.activityTimeout
1010
1011
  }) : (this.finish(t.action, { error: t.error }), this.transport.close());
1011
1012
  }, this.onClosed = (e) => {
1012
1013
  this.unbindListeners();
1013
- var t = L.getCloseAction(e) || "backoff", n = L.getCloseError(e);
1014
+ var t = I.getCloseAction(e) || "backoff", n = I.getCloseError(e);
1014
1015
  this.finish(t, { error: n });
1015
1016
  }, this.transport.bind("message", this.onMessage), this.transport.bind("closed", this.onClosed);
1016
1017
  }
@@ -1024,7 +1025,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1024
1025
  }, t));
1025
1026
  }
1026
1027
  }
1027
- class $e {
1028
+ class et {
1028
1029
  constructor(e, t) {
1029
1030
  this.timeline = e, this.options = t || {};
1030
1031
  }
@@ -1032,10 +1033,10 @@ var t = /* @__PURE__ */ e(((e, t) => {
1032
1033
  this.timeline.isEmpty() || this.timeline.send(Y.TimelineTransport.getAgent(this, e), t);
1033
1034
  }
1034
1035
  }
1035
- class R extends P {
1036
+ class L extends N {
1036
1037
  constructor(e, t) {
1037
1038
  super(function(t, n) {
1038
- A.debug("No callbacks on " + e + " for " + t);
1039
+ k.debug("No callbacks on " + e + " for " + t);
1039
1040
  }), this.name = e, this.pusher = t, this.subscribed = !1, this.subscriptionPending = !1, this.subscriptionCancelled = !1;
1040
1041
  }
1041
1042
  authorize(e, t) {
@@ -1045,7 +1046,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1045
1046
  if (e.indexOf("client-") !== 0) throw new ee("Event '" + e + "' does not start with 'client-'");
1046
1047
  if (!this.subscribed) {
1047
1048
  var n = u.buildLogSuffix("triggeringClientEvents");
1048
- A.warn(`Client event triggered before channel 'subscription_succeeded' event . ${n}`);
1049
+ k.warn(`Client event triggered before channel 'subscription_succeeded' event . ${n}`);
1049
1050
  }
1050
1051
  return this.pusher.send_event(e, t, this.name);
1051
1052
  }
@@ -1064,7 +1065,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1064
1065
  }
1065
1066
  subscribe() {
1066
1067
  this.subscribed || (this.subscriptionPending = !0, this.subscriptionCancelled = !1, this.authorize(this.pusher.connection.socket_id, (e, t) => {
1067
- e ? (this.subscriptionPending = !1, A.error(e.toString()), this.emit("pusher:subscription_error", Object.assign({}, {
1068
+ e ? (this.subscriptionPending = !1, k.error(e.toString()), this.emit("pusher:subscription_error", Object.assign({}, {
1068
1069
  type: "AuthError",
1069
1070
  error: e.message
1070
1071
  }, e instanceof _ ? { status: e.status } : {}))) : this.pusher.send_event("pusher:subscribe", {
@@ -1084,7 +1085,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1084
1085
  this.subscriptionCancelled = !1;
1085
1086
  }
1086
1087
  }
1087
- class z extends R {
1088
+ class R extends L {
1088
1089
  authorize(e, t) {
1089
1090
  return this.pusher.config.channelAuthorizer({
1090
1091
  channelName: this.name,
@@ -1092,7 +1093,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1092
1093
  }, t);
1093
1094
  }
1094
1095
  }
1095
- class et {
1096
+ class tt {
1096
1097
  constructor() {
1097
1098
  this.reset();
1098
1099
  }
@@ -1103,7 +1104,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1103
1104
  } : null;
1104
1105
  }
1105
1106
  each(e) {
1106
- D(this.members, (t, n) => {
1107
+ E(this.members, (t, n) => {
1107
1108
  e(this.get(n));
1108
1109
  });
1109
1110
  }
@@ -1124,13 +1125,13 @@ var t = /* @__PURE__ */ e(((e, t) => {
1124
1125
  this.members = {}, this.count = 0, this.myID = null, this.me = null;
1125
1126
  }
1126
1127
  }
1127
- var tt = function(e, t, n, r) {
1128
+ var nt = function(e, t, n, r) {
1128
1129
  function i(e) {
1129
1130
  return e instanceof n ? e : new n(function(t) {
1130
1131
  t(e);
1131
1132
  });
1132
1133
  }
1133
- return new (n ||= Promise)(function(n, a) {
1134
+ return new (n || (n = Promise))(function(n, a) {
1134
1135
  function o(e) {
1135
1136
  try {
1136
1137
  c(r.next(e));
@@ -1151,12 +1152,12 @@ var t = /* @__PURE__ */ e(((e, t) => {
1151
1152
  c((r = r.apply(e, t || [])).next());
1152
1153
  });
1153
1154
  };
1154
- class nt extends z {
1155
+ class rt extends R {
1155
1156
  constructor(e, t) {
1156
- super(e, t), this.members = new et();
1157
+ super(e, t), this.members = new tt();
1157
1158
  }
1158
1159
  authorize(e, t) {
1159
- super.authorize(e, (e, n) => tt(this, void 0, void 0, function* () {
1160
+ super.authorize(e, (e, n) => nt(this, void 0, void 0, function* () {
1160
1161
  if (!e) {
1161
1162
  if (n = n, n.channel_data != null) {
1162
1163
  var r = JSON.parse(n.channel_data);
@@ -1164,7 +1165,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1164
1165
  } else if (yield this.pusher.user.signinDonePromise, this.pusher.user.user_data != null) this.members.setMyID(this.pusher.user.user_data.id);
1165
1166
  else {
1166
1167
  let e = u.buildLogSuffix("authorizationEndpoint");
1167
- A.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${e}, or the user should be signed in.`), t("Invalid auth response");
1168
+ k.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${e}, or the user should be signed in.`), t("Invalid auth response");
1168
1169
  return;
1169
1170
  }
1170
1171
  }
@@ -1204,8 +1205,8 @@ var t = /* @__PURE__ */ e(((e, t) => {
1204
1205
  this.members.reset(), super.disconnect();
1205
1206
  }
1206
1207
  }
1207
- var rt = n(978), B = n(594);
1208
- class it extends z {
1208
+ var it = n(978), z = n(594);
1209
+ class at extends R {
1209
1210
  constructor(e, t, n) {
1210
1211
  super(e, t), this.key = null, this.nacl = n;
1211
1212
  }
@@ -1216,7 +1217,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1216
1217
  return;
1217
1218
  }
1218
1219
  let r = n.shared_secret;
1219
- r ? (this.key = (0, B.decode)(r), delete n.shared_secret, t(null, n)) : t(/* @__PURE__ */ Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`), null);
1220
+ r ? (this.key = (0, z.decode)(r), delete n.shared_secret, t(null, n)) : t(/* @__PURE__ */ Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`), null);
1220
1221
  });
1221
1222
  }
1222
1223
  trigger(e, t) {
@@ -1228,30 +1229,30 @@ var t = /* @__PURE__ */ e(((e, t) => {
1228
1229
  }
1229
1230
  handleEncryptedEvent(e, t) {
1230
1231
  if (!this.key) {
1231
- A.debug("Received encrypted event before key has been retrieved from the authEndpoint");
1232
+ k.debug("Received encrypted event before key has been retrieved from the authEndpoint");
1232
1233
  return;
1233
1234
  }
1234
1235
  if (!t.ciphertext || !t.nonce) {
1235
- A.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: " + t);
1236
+ k.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: " + t);
1236
1237
  return;
1237
1238
  }
1238
- let n = (0, B.decode)(t.ciphertext);
1239
+ let n = (0, z.decode)(t.ciphertext);
1239
1240
  if (n.length < this.nacl.secretbox.overheadLength) {
1240
- A.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${n.length}`);
1241
+ k.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${n.length}`);
1241
1242
  return;
1242
1243
  }
1243
- let r = (0, B.decode)(t.nonce);
1244
+ let r = (0, z.decode)(t.nonce);
1244
1245
  if (r.length < this.nacl.secretbox.nonceLength) {
1245
- A.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${r.length}`);
1246
+ k.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${r.length}`);
1246
1247
  return;
1247
1248
  }
1248
1249
  let i = this.nacl.secretbox.open(n, r, this.key);
1249
- i === null ? (A.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."), this.authorize(this.pusher.connection.socket_id, (t, a) => {
1250
- t ? A.error(`Failed to make a request to the authEndpoint: ${a}. Unable to fetch new key, so dropping encrypted event`) : (i = this.nacl.secretbox.open(n, r, this.key), i === null ? A.error("Failed to decrypt event with new key. Dropping encrypted event") : this.emit(e, this.getDataToEmit(i)));
1250
+ i === null ? (k.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."), this.authorize(this.pusher.connection.socket_id, (t, a) => {
1251
+ t ? k.error(`Failed to make a request to the authEndpoint: ${a}. Unable to fetch new key, so dropping encrypted event`) : (i = this.nacl.secretbox.open(n, r, this.key), i === null ? k.error("Failed to decrypt event with new key. Dropping encrypted event") : this.emit(e, this.getDataToEmit(i)));
1251
1252
  })) : this.emit(e, this.getDataToEmit(i));
1252
1253
  }
1253
1254
  getDataToEmit(e) {
1254
- let t = (0, rt.D4)(e);
1255
+ let t = (0, it.D4)(e);
1255
1256
  try {
1256
1257
  return JSON.parse(t);
1257
1258
  } catch {
@@ -1259,7 +1260,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1259
1260
  }
1260
1261
  }
1261
1262
  }
1262
- class at extends P {
1263
+ class ot extends N {
1263
1264
  constructor(e, t) {
1264
1265
  super(), this.state = "initialized", this.connection = null, this.key = e, this.options = t, this.timeline = this.options.timeline, this.usingTLS = this.options.useTLS, this.errorCallbacks = this.buildErrorCallbacks(), this.connectionCallbacks = this.buildConnectionCallbacks(this.errorCallbacks), this.handshakeCallbacks = this.buildHandshakeCallbacks(this.errorCallbacks);
1265
1266
  var n = Y.getNetwork();
@@ -1297,7 +1298,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1297
1298
  this.runner = this.strategy.connect(0, e);
1298
1299
  }
1299
1300
  abortConnecting() {
1300
- this.runner &&= (this.runner.abort(), null);
1301
+ this.runner && (this.runner.abort(), this.runner = null);
1301
1302
  }
1302
1303
  disconnectInternally() {
1303
1304
  this.abortConnecting(), this.clearRetryTimer(), this.clearUnavailableTimer(), this.connection && this.abandonConnection().close();
@@ -1318,7 +1319,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1318
1319
  });
1319
1320
  }
1320
1321
  clearRetryTimer() {
1321
- this.retryTimer &&= (this.retryTimer.ensureAborted(), null);
1322
+ this.retryTimer && (this.retryTimer.ensureAborted(), this.retryTimer = null);
1322
1323
  }
1323
1324
  setUnavailableTimer() {
1324
1325
  this.unavailableTimer = new C(this.options.unavailableTimeout, () => {
@@ -1402,7 +1403,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1402
1403
  var n = this.state;
1403
1404
  if (this.state = e, n !== e) {
1404
1405
  var r = e;
1405
- r === "connected" && (r += " with new socket ID " + t.socket_id), A.debug("State changed", n + " -> " + r), this.timeline.info({
1406
+ r === "connected" && (r += " with new socket ID " + t.socket_id), k.debug("State changed", n + " -> " + r), this.timeline.info({
1406
1407
  state: e,
1407
1408
  params: t
1408
1409
  }), this.emit("state_change", {
@@ -1415,15 +1416,15 @@ var t = /* @__PURE__ */ e(((e, t) => {
1415
1416
  return this.state === "connecting" || this.state === "connected";
1416
1417
  }
1417
1418
  }
1418
- class ot {
1419
+ class st {
1419
1420
  constructor() {
1420
1421
  this.channels = {};
1421
1422
  }
1422
1423
  add(e, t) {
1423
- return this.channels[e] || (this.channels[e] = st(e, t)), this.channels[e];
1424
+ return this.channels[e] || (this.channels[e] = ct(e, t)), this.channels[e];
1424
1425
  }
1425
1426
  all() {
1426
- return ge(this.channels);
1427
+ return _e(this.channels);
1427
1428
  }
1428
1429
  find(e) {
1429
1430
  return this.channels[e];
@@ -1433,57 +1434,57 @@ var t = /* @__PURE__ */ e(((e, t) => {
1433
1434
  return delete this.channels[e], t;
1434
1435
  }
1435
1436
  disconnect() {
1436
- D(this.channels, function(e) {
1437
+ E(this.channels, function(e) {
1437
1438
  e.disconnect();
1438
1439
  });
1439
1440
  }
1440
1441
  }
1441
- function st(e, t) {
1442
+ function ct(e, t) {
1442
1443
  if (e.indexOf("private-encrypted-") === 0) {
1443
- if (t.config.nacl) return V.createEncryptedChannel(e, t, t.config.nacl);
1444
+ if (t.config.nacl) return B.createEncryptedChannel(e, t, t.config.nacl);
1444
1445
  let n = u.buildLogSuffix("encryptedChannelSupport");
1445
1446
  throw new m(`Tried to subscribe to a private-encrypted- channel but no nacl implementation available. ${n}`);
1446
1447
  }
1447
- if (e.indexOf("private-") === 0) return V.createPrivateChannel(e, t);
1448
- if (e.indexOf("presence-") === 0) return V.createPresenceChannel(e, t);
1448
+ if (e.indexOf("private-") === 0) return B.createPrivateChannel(e, t);
1449
+ if (e.indexOf("presence-") === 0) return B.createPresenceChannel(e, t);
1449
1450
  if (e.indexOf("#") === 0) throw new te("Cannot create a channel with name \"" + e + "\".");
1450
- return V.createChannel(e, t);
1451
+ return B.createChannel(e, t);
1451
1452
  }
1452
- let V = {
1453
+ let B = {
1453
1454
  createChannels() {
1454
- return new ot();
1455
+ return new st();
1455
1456
  },
1456
1457
  createConnectionManager(e, t) {
1457
- return new at(e, t);
1458
+ return new ot(e, t);
1458
1459
  },
1459
1460
  createChannel(e, t) {
1460
- return new R(e, t);
1461
+ return new L(e, t);
1461
1462
  },
1462
1463
  createPrivateChannel(e, t) {
1463
- return new z(e, t);
1464
+ return new R(e, t);
1464
1465
  },
1465
1466
  createPresenceChannel(e, t) {
1466
- return new nt(e, t);
1467
+ return new rt(e, t);
1467
1468
  },
1468
1469
  createEncryptedChannel(e, t, n) {
1469
- return new it(e, t, n);
1470
+ return new at(e, t, n);
1470
1471
  },
1471
1472
  createTimelineSender(e, t) {
1472
- return new $e(e, t);
1473
+ return new et(e, t);
1473
1474
  },
1474
1475
  createHandshake(e, t) {
1475
- return new Qe(e, t);
1476
+ return new $e(e, t);
1476
1477
  },
1477
1478
  createAssistantToTheTransportManager(e, t, n) {
1478
- return new Ye(e, t, n);
1479
+ return new Xe(e, t, n);
1479
1480
  }
1480
1481
  };
1481
- class ct {
1482
+ class lt {
1482
1483
  constructor(e) {
1483
1484
  this.options = e || {}, this.livesLeft = this.options.lives || Infinity;
1484
1485
  }
1485
1486
  getAssistant(e) {
1486
- return V.createAssistantToTheTransportManager(this, e, {
1487
+ return B.createAssistantToTheTransportManager(this, e, {
1487
1488
  minPingDelay: this.options.minPingDelay,
1488
1489
  maxPingDelay: this.options.maxPingDelay
1489
1490
  });
@@ -1495,12 +1496,12 @@ var t = /* @__PURE__ */ e(((e, t) => {
1495
1496
  --this.livesLeft;
1496
1497
  }
1497
1498
  }
1498
- class H {
1499
+ class V {
1499
1500
  constructor(e, t) {
1500
1501
  this.strategies = e, this.loop = !!t.loop, this.failFast = !!t.failFast, this.timeout = t.timeout, this.timeoutLimit = t.timeoutLimit;
1501
1502
  }
1502
1503
  isSupported() {
1503
- return Se(this.strategies, w.method("isSupported"));
1504
+ return Ce(this.strategies, w.method("isSupported"));
1504
1505
  }
1505
1506
  connect(e, t) {
1506
1507
  var n = this.strategies, r = 0, i = this.timeout, a = null, o = (s, c) => {
@@ -1537,47 +1538,47 @@ var t = /* @__PURE__ */ e(((e, t) => {
1537
1538
  };
1538
1539
  }
1539
1540
  }
1540
- class U {
1541
+ class H {
1541
1542
  constructor(e) {
1542
1543
  this.strategies = e;
1543
1544
  }
1544
1545
  isSupported() {
1545
- return Se(this.strategies, w.method("isSupported"));
1546
+ return Ce(this.strategies, w.method("isSupported"));
1546
1547
  }
1547
1548
  connect(e, t) {
1548
- return lt(this.strategies, e, function(e, n) {
1549
+ return ut(this.strategies, e, function(e, n) {
1549
1550
  return function(r, i) {
1550
- n[e].error = r, r ? ut(n) && t(!0) : (O(n, function(e) {
1551
+ n[e].error = r, r ? dt(n) && t(!0) : (D(n, function(e) {
1551
1552
  e.forceMinPriority(i.transport.priority);
1552
1553
  }), t(null, i));
1553
1554
  };
1554
1555
  });
1555
1556
  }
1556
1557
  }
1557
- function lt(e, t, n) {
1558
- var r = _e(e, function(e, r, i, a) {
1558
+ function ut(e, t, n) {
1559
+ var r = ve(e, function(e, r, i, a) {
1559
1560
  return e.connect(t, n(r, a));
1560
1561
  });
1561
1562
  return {
1562
1563
  abort: function() {
1563
- O(r, dt);
1564
+ D(r, ft);
1564
1565
  },
1565
1566
  forceMinPriority: function(e) {
1566
- O(r, function(t) {
1567
+ D(r, function(t) {
1567
1568
  t.forceMinPriority(e);
1568
1569
  });
1569
1570
  }
1570
1571
  };
1571
1572
  }
1572
- function ut(e) {
1573
- return Ce(e, function(e) {
1573
+ function dt(e) {
1574
+ return we(e, function(e) {
1574
1575
  return !!e.error;
1575
1576
  });
1576
1577
  }
1577
- function dt(e) {
1578
+ function ft(e) {
1578
1579
  !e.error && !e.aborted && (e.abort(), e.aborted = !0);
1579
1580
  }
1580
- class ft {
1581
+ class pt {
1581
1582
  constructor(e, t, n) {
1582
1583
  this.strategy = e, this.transports = t, this.ttl = n.ttl || 18e5, this.usingTLS = n.useTLS, this.timeline = n.timeline;
1583
1584
  }
@@ -1585,20 +1586,20 @@ var t = /* @__PURE__ */ e(((e, t) => {
1585
1586
  return this.strategy.isSupported();
1586
1587
  }
1587
1588
  connect(e, t) {
1588
- var n = this.usingTLS, r = pt(n), i = r && r.cacheSkipCount ? r.cacheSkipCount : 0, a = [this.strategy];
1589
+ var n = this.usingTLS, r = mt(n), i = r && r.cacheSkipCount ? r.cacheSkipCount : 0, a = [this.strategy];
1589
1590
  if (r && r.timestamp + this.ttl >= w.now()) {
1590
1591
  var o = this.transports[r.transport];
1591
1592
  o && (["ws", "wss"].includes(r.transport) || i > 3 ? (this.timeline.info({
1592
1593
  cached: !0,
1593
1594
  transport: r.transport,
1594
1595
  latency: r.latency
1595
- }), a.push(new H([o], {
1596
+ }), a.push(new V([o], {
1596
1597
  timeout: r.latency * 2 + 1e3,
1597
1598
  failFast: !0
1598
1599
  }))) : i++);
1599
1600
  }
1600
1601
  var s = w.now(), c = a.pop().connect(e, function r(o, l) {
1601
- o ? (ht(n), a.length > 0 ? (s = w.now(), c = a.pop().connect(e, r)) : t(o)) : (mt(n, l.transport.name, w.now() - s, i), t(null, l));
1602
+ o ? (gt(n), a.length > 0 ? (s = w.now(), c = a.pop().connect(e, r)) : t(o)) : (ht(n, l.transport.name, w.now() - s, i), t(null, l));
1602
1603
  });
1603
1604
  return {
1604
1605
  abort: function() {
@@ -1610,23 +1611,23 @@ var t = /* @__PURE__ */ e(((e, t) => {
1610
1611
  };
1611
1612
  }
1612
1613
  }
1613
- function W(e) {
1614
+ function U(e) {
1614
1615
  return "pusherTransport" + (e ? "TLS" : "NonTLS");
1615
1616
  }
1616
- function pt(e) {
1617
+ function mt(e) {
1617
1618
  var t = Y.getLocalStorage();
1618
1619
  if (t) try {
1619
- var n = t[W(e)];
1620
+ var n = t[U(e)];
1620
1621
  if (n) return JSON.parse(n);
1621
1622
  } catch {
1622
- ht(e);
1623
+ gt(e);
1623
1624
  }
1624
1625
  return null;
1625
1626
  }
1626
- function mt(e, t, n, r) {
1627
+ function ht(e, t, n, r) {
1627
1628
  var i = Y.getLocalStorage();
1628
1629
  if (i) try {
1629
- i[W(e)] = k({
1630
+ i[U(e)] = O({
1630
1631
  timestamp: w.now(),
1631
1632
  transport: t,
1632
1633
  latency: n,
@@ -1634,13 +1635,13 @@ var t = /* @__PURE__ */ e(((e, t) => {
1634
1635
  });
1635
1636
  } catch {}
1636
1637
  }
1637
- function ht(e) {
1638
+ function gt(e) {
1638
1639
  var t = Y.getLocalStorage();
1639
1640
  if (t) try {
1640
- delete t[W(e)];
1641
+ delete t[U(e)];
1641
1642
  } catch {}
1642
1643
  }
1643
- class G {
1644
+ class W {
1644
1645
  constructor(e, { delay: t }) {
1645
1646
  this.strategy = e, this.options = { delay: t };
1646
1647
  }
@@ -1661,7 +1662,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1661
1662
  };
1662
1663
  }
1663
1664
  }
1664
- class K {
1665
+ class G {
1665
1666
  constructor(e, t, n) {
1666
1667
  this.test = e, this.trueBranch = t, this.falseBranch = n;
1667
1668
  }
@@ -1672,7 +1673,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1672
1673
  return (this.test() ? this.trueBranch : this.falseBranch).connect(e, t);
1673
1674
  }
1674
1675
  }
1675
- class gt {
1676
+ class _t {
1676
1677
  constructor(e) {
1677
1678
  this.strategy = e;
1678
1679
  }
@@ -1686,12 +1687,12 @@ var t = /* @__PURE__ */ e(((e, t) => {
1686
1687
  return n;
1687
1688
  }
1688
1689
  }
1689
- function q(e) {
1690
+ function K(e) {
1690
1691
  return function() {
1691
1692
  return e.isSupported();
1692
1693
  };
1693
1694
  }
1694
- let _t = function(e, t, n) {
1695
+ let vt = function(e, t, n) {
1695
1696
  var r = {};
1696
1697
  function i(t, i, a, o, s) {
1697
1698
  var c = n(e, t, i, a, o, s);
@@ -1709,31 +1710,31 @@ var t = /* @__PURE__ */ e(((e, t) => {
1709
1710
  loop: !0,
1710
1711
  timeout: 15e3,
1711
1712
  timeoutLimit: 6e4
1712
- }, l = new ct({
1713
+ }, l = new lt({
1713
1714
  minPingDelay: 1e4,
1714
1715
  maxPingDelay: e.activityTimeout
1715
- }), u = new ct({
1716
+ }), u = new lt({
1716
1717
  lives: 2,
1717
1718
  minPingDelay: 1e4,
1718
1719
  maxPingDelay: e.activityTimeout
1719
- }), d = i("ws", "ws", 3, a, l), ee = i("wss", "ws", 3, o, l), te = i("sockjs", "sockjs", 1, s), f = i("xhr_streaming", "xhr_streaming", 1, s, u), ne = i("xdr_streaming", "xdr_streaming", 1, s, u), p = i("xhr_polling", "xhr_polling", 1, s), m = i("xdr_polling", "xdr_polling", 1, s), h = new H([d], c), g = new H([ee], c), _ = new H([te], c), v = new H([new K(q(f), f, ne)], c), y = new H([new K(q(p), p, m)], c), b = new H([new K(q(v), new U([v, new G(y, { delay: 4e3 })]), y)], c), x = new K(q(b), b, _), re = t.useTLS ? new U([h, new G(x, { delay: 2e3 })]) : new U([
1720
+ }), d = i("ws", "ws", 3, a, l), ee = i("wss", "ws", 3, o, l), te = i("sockjs", "sockjs", 1, s), f = i("xhr_streaming", "xhr_streaming", 1, s, u), ne = i("xdr_streaming", "xdr_streaming", 1, s, u), p = i("xhr_polling", "xhr_polling", 1, s), m = i("xdr_polling", "xdr_polling", 1, s), h = new V([d], c), g = new V([ee], c), _ = new V([te], c), v = new V([new G(K(f), f, ne)], c), y = new V([new G(K(p), p, m)], c), b = new V([new G(K(v), new H([v, new W(y, { delay: 4e3 })]), y)], c), x = new G(K(b), b, _), re = t.useTLS ? new H([h, new W(x, { delay: 2e3 })]) : new H([
1720
1721
  h,
1721
- new G(g, { delay: 2e3 }),
1722
- new G(x, { delay: 5e3 })
1722
+ new W(g, { delay: 2e3 }),
1723
+ new W(x, { delay: 5e3 })
1723
1724
  ]);
1724
- return new ft(new gt(new K(q(d), re, x)), r, {
1725
+ return new pt(new _t(new G(K(d), re, x)), r, {
1725
1726
  ttl: 18e5,
1726
1727
  timeline: t.timeline,
1727
1728
  useTLS: t.useTLS
1728
1729
  });
1729
1730
  };
1730
- function vt() {
1731
+ function yt() {
1731
1732
  var e = this;
1732
1733
  e.timeline.info(e.buildTimelineMessage({ transport: e.name + (e.options.useTLS ? "s" : "") })), e.hooks.isInitialized() ? e.changeState("initialized") : e.hooks.file ? (e.changeState("initializing"), c.load(e.hooks.file, { useTLS: e.options.useTLS }, function(t, n) {
1733
1734
  e.hooks.isInitialized() ? (e.changeState("initialized"), n(!0)) : (t && e.onError(t), e.onClose(), n(!1));
1734
1735
  })) : e.onClose();
1735
1736
  }
1736
- let yt = {
1737
+ let bt = {
1737
1738
  getRequest: function(e) {
1738
1739
  var t = new window.XDomainRequest();
1739
1740
  return t.ontimeout = function() {
@@ -1750,7 +1751,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1750
1751
  e.ontimeout = e.onerror = e.onprogress = e.onload = null, e.abort();
1751
1752
  }
1752
1753
  };
1753
- class bt extends P {
1754
+ class xt extends N {
1754
1755
  constructor(e, t, n) {
1755
1756
  super(), this.hooks = e, this.method = t, this.url = n;
1756
1757
  }
@@ -1760,7 +1761,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1760
1761
  }, Y.addUnloadListener(this.unloader), this.xhr.open(this.method, this.url, !0), this.xhr.setRequestHeader && this.xhr.setRequestHeader("Content-Type", "application/json"), this.xhr.send(e);
1761
1762
  }
1762
1763
  close() {
1763
- this.unloader &&= (Y.removeUnloadListener(this.unloader), null), this.xhr &&= (this.hooks.abortRequest(this.xhr), null);
1764
+ this.unloader && (Y.removeUnloadListener(this.unloader), this.unloader = null), this.xhr && (this.hooks.abortRequest(this.xhr), this.xhr = null);
1764
1765
  }
1765
1766
  onChunk(e, t) {
1766
1767
  for (;;) {
@@ -1781,11 +1782,11 @@ var t = /* @__PURE__ */ e(((e, t) => {
1781
1782
  return this.position === e.length && e.length > 262144;
1782
1783
  }
1783
1784
  }
1784
- var xt;
1785
+ var q;
1785
1786
  (function(e) {
1786
1787
  e[e.CONNECTING = 0] = "CONNECTING", e[e.OPEN = 1] = "OPEN", e[e.CLOSED = 3] = "CLOSED";
1787
- })(xt ||= {});
1788
- let J = xt;
1788
+ })(q || (q = {}));
1789
+ let J = q;
1789
1790
  var St = 1;
1790
1791
  class Ct {
1791
1792
  constructor(e, t) {
@@ -1869,7 +1870,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1869
1870
  }
1870
1871
  }
1871
1872
  closeStream() {
1872
- this.stream &&= (this.stream.unbind_all(), this.stream.close(), null);
1873
+ this.stream && (this.stream.unbind_all(), this.stream.close(), this.stream = null);
1873
1874
  }
1874
1875
  }
1875
1876
  function wt(e) {
@@ -1949,22 +1950,22 @@ var t = /* @__PURE__ */ e(((e, t) => {
1949
1950
  return this.createRequest(Nt, e, t);
1950
1951
  },
1951
1952
  createRequest(e, t, n) {
1952
- return new bt(e, t, n);
1953
+ return new xt(e, t, n);
1953
1954
  }
1954
1955
  };
1955
1956
  Pt.createXDR = function(e, t) {
1956
- return this.createRequest(yt, e, t);
1957
+ return this.createRequest(bt, e, t);
1957
1958
  };
1958
1959
  let Y = {
1959
1960
  nextAuthCallbackID: 1,
1960
1961
  auth_callbacks: {},
1961
1962
  ScriptReceivers: i,
1962
1963
  DependenciesReceivers: s,
1963
- getDefaultStrategy: _t,
1964
- Transports: Ke,
1965
- transportConnectionInitializer: vt,
1964
+ getDefaultStrategy: vt,
1965
+ Transports: qe,
1966
+ transportConnectionInitializer: yt,
1966
1967
  HTTPFactory: Pt,
1967
- TimelineTransport: je,
1968
+ TimelineTransport: Me,
1968
1969
  getXHRAPI() {
1969
1970
  return window.XMLHttpRequest;
1970
1971
  },
@@ -1989,7 +1990,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
1989
1990
  getAuthorizers() {
1990
1991
  return {
1991
1992
  ajax: v,
1992
- jsonp: Oe
1993
+ jsonp: ke
1993
1994
  };
1994
1995
  },
1995
1996
  onDocumentBody(e) {
@@ -1998,10 +1999,10 @@ var t = /* @__PURE__ */ e(((e, t) => {
1998
1999
  }, 0);
1999
2000
  },
2000
2001
  createJSONPRequest(e, t) {
2001
- return new Ae(e, t);
2002
+ return new je(e, t);
2002
2003
  },
2003
2004
  createScriptRequest(e) {
2004
- return new ke(e);
2005
+ return new Ae(e);
2005
2006
  },
2006
2007
  getLocalStorage() {
2007
2008
  try {
@@ -2020,7 +2021,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
2020
2021
  return new ActiveXObject("Microsoft.XMLHTTP");
2021
2022
  },
2022
2023
  getNetwork() {
2023
- return Je;
2024
+ return Ye;
2024
2025
  },
2025
2026
  createWebSocket(e) {
2026
2027
  return new (this.getWebSocketAPI())(e);
@@ -2055,7 +2056,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
2055
2056
  var X;
2056
2057
  (function(e) {
2057
2058
  e[e.ERROR = 3] = "ERROR", e[e.INFO = 6] = "INFO", e[e.DEBUG = 7] = "DEBUG";
2058
- })(X ||= {});
2059
+ })(X || (X = {}));
2059
2060
  let Z = X;
2060
2061
  class Ft {
2061
2062
  constructor(e, t, n) {
@@ -2108,14 +2109,14 @@ var t = /* @__PURE__ */ e(((e, t) => {
2108
2109
  var n = !1, r = this.transport.createConnection(this.name, this.priority, this.options.key, this.options), i = null, a = function() {
2109
2110
  r.unbind("initialized", a), r.connect();
2110
2111
  }, o = function() {
2111
- i = V.createHandshake(r, function(e) {
2112
+ i = B.createHandshake(r, function(e) {
2112
2113
  n = !0, l(), t(null, e);
2113
2114
  });
2114
2115
  }, s = function(e) {
2115
2116
  l(), t(e);
2116
2117
  }, c = function() {
2117
2118
  l();
2118
- var e = k(r);
2119
+ var e = O(r);
2119
2120
  t(new p(e));
2120
2121
  }, l = function() {
2121
2122
  r.unbind("initialized", a), r.unbind("open", o), r.unbind("error", s), r.unbind("closed", c);
@@ -2142,7 +2143,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
2142
2143
  var zt = function(e, t, n, r, i, a) {
2143
2144
  var o = Rt[n];
2144
2145
  if (!o) throw new h(n);
2145
- var s = (!e.enabledTransports || E(e.enabledTransports, t) !== -1) && (!e.disabledTransports || E(e.disabledTransports, t) === -1), c;
2146
+ var s = (!e.enabledTransports || he(e.enabledTransports, t) !== -1) && (!e.disabledTransports || he(e.disabledTransports, t) === -1), c;
2146
2147
  return s ? (i = Object.assign({ ignoreNullOrigin: e.ignoreNullOrigin }, i), c = new It(t, r, a ? a.getAssistant(o) : o, i)) : c = Bt, c;
2147
2148
  }, Bt = {
2148
2149
  isSupported: function() {
@@ -2163,7 +2164,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
2163
2164
  function Vt(e) {
2164
2165
  if (e == null) throw "You must pass an options object";
2165
2166
  if (e.cluster == null) throw "Options object must provide a cluster";
2166
- "disableStats" in e && A.warn("The disableStats option is deprecated in favor of enableStats");
2167
+ "disableStats" in e && k.warn("The disableStats option is deprecated in favor of enableStats");
2167
2168
  }
2168
2169
  let Ht = (e, t) => {
2169
2170
  var n = "socket_id=" + encodeURIComponent(e.socketId);
@@ -2259,10 +2260,10 @@ var t = /* @__PURE__ */ e(((e, t) => {
2259
2260
  let n = tn(e, t);
2260
2261
  return $t(n) ? n.customHandler : Gt(n);
2261
2262
  }
2262
- class rn extends P {
2263
+ class rn extends N {
2263
2264
  constructor(e) {
2264
2265
  super(function(e, t) {
2265
- A.debug(`No callbacks on watchlist events for ${e}`);
2266
+ k.debug(`No callbacks on watchlist events for ${e}`);
2266
2267
  }), this.pusher = e, this.bindWatchlistInternalEvent();
2267
2268
  }
2268
2269
  handleEvent(e) {
@@ -2287,12 +2288,12 @@ var t = /* @__PURE__ */ e(((e, t) => {
2287
2288
  };
2288
2289
  }
2289
2290
  let on = an;
2290
- class sn extends P {
2291
+ class sn extends N {
2291
2292
  constructor(e) {
2292
2293
  super(function(e, t) {
2293
- A.debug("No callbacks on user for " + e);
2294
+ k.debug("No callbacks on user for " + e);
2294
2295
  }), this.signin_requested = !1, this.user_data = null, this.serverToUserChannel = null, this.signinDonePromise = null, this._signinDoneResolve = null, this._onAuthorize = (e, t) => {
2295
- e ? (A.warn(`Error during signin: ${e}`), this.emit("pusher:signin_error", Object.assign({}, {
2296
+ e ? (k.warn(`Error during signin: ${e}`), this.emit("pusher:signin_error", Object.assign({}, {
2296
2297
  type: "AuthError",
2297
2298
  error: e.message
2298
2299
  }, e instanceof _ ? { status: e.status } : {})), this._cleanup()) : this.pusher.send_event("pusher:signin", {
@@ -2315,21 +2316,21 @@ var t = /* @__PURE__ */ e(((e, t) => {
2315
2316
  try {
2316
2317
  this.user_data = JSON.parse(e.user_data);
2317
2318
  } catch {
2318
- A.error(`Failed parsing user data after signin: ${e.user_data}`), this._cleanup();
2319
+ k.error(`Failed parsing user data after signin: ${e.user_data}`), this._cleanup();
2319
2320
  return;
2320
2321
  }
2321
- typeof this.user_data.id != "string" || this.user_data.id === "" ? (A.error(`user_data doesn't contain an id. user_data: ${this.user_data}`), this._cleanup()) : (this._signinDoneResolve(), this._subscribeChannels());
2322
+ typeof this.user_data.id != "string" || this.user_data.id === "" ? (k.error(`user_data doesn't contain an id. user_data: ${this.user_data}`), this._cleanup()) : (this._signinDoneResolve(), this._subscribeChannels());
2322
2323
  }
2323
2324
  _subscribeChannels() {
2324
2325
  let e = (e) => {
2325
2326
  e.subscriptionPending && e.subscriptionCancelled ? e.reinstateSubscription() : !e.subscriptionPending && this.pusher.connection.state === "connected" && e.subscribe();
2326
2327
  };
2327
- this.serverToUserChannel = new R(`#server-to-user-${this.user_data.id}`, this.pusher), this.serverToUserChannel.bind_global((e, t) => {
2328
+ this.serverToUserChannel = new L(`#server-to-user-${this.user_data.id}`, this.pusher), this.serverToUserChannel.bind_global((e, t) => {
2328
2329
  e.indexOf("pusher_internal:") !== 0 && e.indexOf("pusher:") !== 0 && this.emit(e, t);
2329
2330
  }), e(this.serverToUserChannel);
2330
2331
  }
2331
2332
  _cleanup() {
2332
- this.user_data = null, this.serverToUserChannel &&= (this.serverToUserChannel.unbind_all(), this.serverToUserChannel.disconnect(), null), this.signin_requested && this._signinDoneResolve();
2333
+ this.user_data = null, this.serverToUserChannel && (this.serverToUserChannel.unbind_all(), this.serverToUserChannel.disconnect(), this.serverToUserChannel = null), this.signin_requested && this._signinDoneResolve();
2333
2334
  }
2334
2335
  _newSigninPromiseIfNeeded() {
2335
2336
  if (!this.signin_requested || this.signinDonePromise && !this.signinDonePromise.done) return;
@@ -2347,24 +2348,24 @@ var t = /* @__PURE__ */ e(((e, t) => {
2347
2348
  for (var e = 0, t = Q.instances.length; e < t; e++) Q.instances[e].connect();
2348
2349
  }
2349
2350
  static getClientFeatures() {
2350
- return he(be({ ws: Y.Transports.ws }, function(e) {
2351
+ return ge(xe({ ws: Y.Transports.ws }, function(e) {
2351
2352
  return e.isSupported({});
2352
2353
  }));
2353
2354
  }
2354
2355
  constructor(e, t) {
2355
- cn(e), Vt(t), this.key = e, this.options = t, this.config = qt(this.options, this), this.channels = V.createChannels(), this.global_emitter = new P(), this.sessionID = Y.randomInt(1e9), this.timeline = new Ft(this.key, this.sessionID, {
2356
+ cn(e), Vt(t), this.key = e, this.options = t, this.config = qt(this.options, this), this.channels = B.createChannels(), this.global_emitter = new N(), this.sessionID = Y.randomInt(1e9), this.timeline = new Ft(this.key, this.sessionID, {
2356
2357
  cluster: this.config.cluster,
2357
2358
  features: Q.getClientFeatures(),
2358
2359
  params: this.config.timelineParams || {},
2359
2360
  limit: 50,
2360
2361
  level: Z.INFO,
2361
2362
  version: a.VERSION
2362
- }), this.config.enableStats && (this.timelineSender = V.createTimelineSender(this.timeline, {
2363
+ }), this.config.enableStats && (this.timelineSender = B.createTimelineSender(this.timeline, {
2363
2364
  host: this.config.statsHost,
2364
2365
  path: "/timeline/v2/" + Y.TimelineTransport.name
2365
2366
  }));
2366
2367
  var n = (e) => Y.getDefaultStrategy(this.config, e, zt);
2367
- this.connection = V.createConnectionManager(this.key, {
2368
+ this.connection = B.createConnectionManager(this.key, {
2368
2369
  getStrategy: n,
2369
2370
  timeline: this.timeline,
2370
2371
  activityTimeout: this.config.activityTimeout,
@@ -2385,7 +2386,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
2385
2386
  }), this.connection.bind("disconnected", () => {
2386
2387
  this.channels.disconnect();
2387
2388
  }), this.connection.bind("error", (e) => {
2388
- A.warn(e);
2389
+ k.warn(e);
2389
2390
  }), Q.instances.push(this), this.timeline.info({ instances: Q.instances.length }), this.user = new sn(this), Q.isReady && this.connect();
2390
2391
  }
2391
2392
  switchCluster(e) {
@@ -2407,7 +2408,7 @@ var t = /* @__PURE__ */ e(((e, t) => {
2407
2408
  }
2408
2409
  }
2409
2410
  disconnect() {
2410
- this.connection.disconnect(), this.timelineSenderTimer &&= (this.timelineSenderTimer.ensureAborted(), null);
2411
+ this.connection.disconnect(), this.timelineSenderTimer && (this.timelineSenderTimer.ensureAborted(), this.timelineSenderTimer = null);
2411
2412
  }
2412
2413
  bind(e, t, n) {
2413
2414
  return this.global_emitter.bind(e, t, n), this;
@@ -2467,4 +2468,5 @@ var t = /* @__PURE__ */ e(((e, t) => {
2467
2468
  }, n.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t), n(721);
2468
2469
  })());
2469
2470
  }));
2471
+ //#endregion
2470
2472
  export default t();