@spot-flow/checkout-inline-js 0.1.43 → 0.1.44-dev.1

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.
@@ -138,7 +138,7 @@ const Oe = (n, e, i) => {
138
138
  } catch (s) {
139
139
  throw s instanceof X ? console.error(`FetchError: ${s.message} (status: ${s.status})`) : s instanceof Be ? console.error(`AuthorizationError: ${s.message}`) : console.error(`UnexpectedError: ${s}`), s;
140
140
  }
141
- }, cn = async (n, e, i, t, s) => {
141
+ }, un = async (n, e, i, t, s) => {
142
142
  try {
143
143
  const o = Oe(n, t), a = await fetch(
144
144
  `${fe(Ue, s)}/payments/verify?reference=${e}`,
@@ -24390,7 +24390,7 @@ function In(n, e) {
24390
24390
  const i = n.createElement("a");
24391
24391
  return i.href = e, i.href;
24392
24392
  }
24393
- function ul(n) {
24393
+ function cl(n) {
24394
24394
  return !!(n.tagName === "svg" || n.ownerSVGElement);
24395
24395
  }
24396
24396
  function bt() {
@@ -24403,7 +24403,7 @@ function Bs(n, e, i, t) {
24403
24403
  function Hs(n, e, i) {
24404
24404
  return (n === "video" || n === "audio") && e === "autoplay";
24405
24405
  }
24406
- function cl(n, e, i) {
24406
+ function ul(n, e, i) {
24407
24407
  try {
24408
24408
  if (typeof e == "string") {
24409
24409
  if (n.classList.contains(e))
@@ -24580,7 +24580,7 @@ function bl(n, e) {
24580
24580
  };
24581
24581
  }
24582
24582
  function fl(n, e) {
24583
- const { doc: i, blockClass: t, blockSelector: s, inlineStylesheet: o, maskInputOptions: a = {}, maskInputFn: l, dataURLOptions: d = {}, inlineImages: p, recordCanvas: v, keepIframeSrcFn: g, newlyAddedElement: f = !1, rootId: y } = e, k = cl(n, t, s), C = nl(n);
24583
+ const { doc: i, blockClass: t, blockSelector: s, inlineStylesheet: o, maskInputOptions: a = {}, maskInputFn: l, dataURLOptions: d = {}, inlineImages: p, recordCanvas: v, keepIframeSrcFn: g, newlyAddedElement: f = !1, rootId: y } = e, k = ul(n, t, s), C = nl(n);
24584
24584
  let w = {};
24585
24585
  const M = n.attributes.length;
24586
24586
  for (let _ = 0; _ < M; _++) {
@@ -24655,7 +24655,7 @@ function fl(n, e) {
24655
24655
  tagName: C,
24656
24656
  attributes: w,
24657
24657
  childNodes: [],
24658
- isSVG: ul(n) || void 0,
24658
+ isSVG: cl(n) || void 0,
24659
24659
  needBlock: k,
24660
24660
  rootId: y,
24661
24661
  isCustom: A
@@ -25017,7 +25017,7 @@ function Fs(n, e) {
25017
25017
  function Gs(n, e) {
25018
25018
  return !!(n.nodeName === "LINK" && n.nodeType === n.ELEMENT_NODE && n.getAttribute && n.getAttribute("rel") === "stylesheet" && e.getMeta(n));
25019
25019
  }
25020
- function ut(n) {
25020
+ function ct(n) {
25021
25021
  return !!(n != null && n.shadowRoot);
25022
25022
  }
25023
25023
  class kl {
@@ -25143,7 +25143,7 @@ class Al {
25143
25143
  recordCanvas: this.recordCanvas,
25144
25144
  inlineImages: this.inlineImages,
25145
25145
  onSerialize: (f) => {
25146
- Fs(f, this.mirror) && this.iframeManager.addIframe(f), Gs(f, this.mirror) && this.stylesheetManager.trackLinkElement(f), ut(d) && this.shadowDomManager.addShadowRoot(d.shadowRoot, this.doc);
25146
+ Fs(f, this.mirror) && this.iframeManager.addIframe(f), Gs(f, this.mirror) && this.stylesheetManager.trackLinkElement(f), ct(d) && this.shadowDomManager.addShadowRoot(d.shadowRoot, this.doc);
25147
25147
  },
25148
25148
  onIframeLoad: (f, y) => {
25149
25149
  this.iframeManager.attachIframe(f, y), this.shadowDomManager.observeAttachShadow(f);
@@ -25298,7 +25298,7 @@ class Al {
25298
25298
  }
25299
25299
  e.addedNodes.forEach((i) => this.genAdds(i, e.target)), e.removedNodes.forEach((i) => {
25300
25300
  const t = this.mirror.getId(i), s = zn(e.target) ? this.mirror.getId(e.target.host) : this.mirror.getId(e.target);
25301
- Me(e.target, this.blockClass, this.blockSelector, !1) || tt(i, this.mirror) || !Cl(i, this.mirror) || (this.addedSet.has(i) ? (ct(this.addedSet, i), this.droppedSet.add(i)) : this.addedSet.has(e.target) && t === -1 || js(e.target, this.mirror) || (this.movedSet.has(i) && this.movedMap[ss(t, s)] ? ct(this.movedSet, i) : this.removes.push({
25301
+ Me(e.target, this.blockClass, this.blockSelector, !1) || tt(i, this.mirror) || !Cl(i, this.mirror) || (this.addedSet.has(i) ? (ut(this.addedSet, i), this.droppedSet.add(i)) : this.addedSet.has(e.target) && t === -1 || js(e.target, this.mirror) || (this.movedSet.has(i) && this.movedMap[ss(t, s)] ? ut(this.movedSet, i) : this.removes.push({
25302
25302
  parentId: s,
25303
25303
  id: t,
25304
25304
  isShadow: zn(e.target) && Wn(e.target) ? !0 : void 0
@@ -25317,7 +25317,7 @@ class Al {
25317
25317
  i && this.mirror.hasNode(i) && (t = this.mirror.getId(i)), t && t !== -1 && (this.movedMap[ss(this.mirror.getId(e), t)] = !0);
25318
25318
  } else
25319
25319
  this.addedSet.add(e), this.droppedSet.delete(e);
25320
- Me(e, this.blockClass, this.blockSelector, !1) || (e.childNodes.forEach((t) => this.genAdds(t)), ut(e) && e.shadowRoot.childNodes.forEach((t) => {
25320
+ Me(e, this.blockClass, this.blockSelector, !1) || (e.childNodes.forEach((t) => this.genAdds(t)), ct(e) && e.shadowRoot.childNodes.forEach((t) => {
25321
25321
  this.processedNodeManager.add(t, this), this.genAdds(t, e);
25322
25322
  }));
25323
25323
  }
@@ -25369,8 +25369,8 @@ class Al {
25369
25369
  this.shadowDomManager.reset(), this.canvasManager.reset();
25370
25370
  }
25371
25371
  }
25372
- function ct(n, e) {
25373
- n.delete(e), e.childNodes.forEach((i) => ct(n, i));
25372
+ function ut(n, e) {
25373
+ n.delete(e), e.childNodes.forEach((i) => ut(n, i));
25374
25374
  }
25375
25375
  function os(n, e, i) {
25376
25376
  return n.length === 0 ? !1 : Ws(n, e, i);
@@ -26341,7 +26341,7 @@ function Jl(n, e, i, t) {
26341
26341
  function $l(n) {
26342
26342
  return n === "experimental-webgl" ? "webgl" : n;
26343
26343
  }
26344
- function us(n, e, i, t) {
26344
+ function cs(n, e, i, t) {
26345
26345
  const s = [];
26346
26346
  try {
26347
26347
  const o = Vn(n.HTMLCanvasElement.prototype, "getContext", function(a) {
@@ -26368,7 +26368,7 @@ function us(n, e, i, t) {
26368
26368
  s.forEach((o) => o());
26369
26369
  };
26370
26370
  }
26371
- function cs(n, e, i, t, s, o, a) {
26371
+ function us(n, e, i, t, s, o, a) {
26372
26372
  const l = [], d = Object.getOwnPropertyNames(n);
26373
26373
  for (const p of d)
26374
26374
  if (![
@@ -26412,7 +26412,7 @@ function cs(n, e, i, t, s, o, a) {
26412
26412
  }
26413
26413
  function Yl(n, e, i, t, s) {
26414
26414
  const o = [];
26415
- return o.push(...cs(e.WebGLRenderingContext.prototype, Rn.WebGL, n, i, t, s, e)), typeof e.WebGL2RenderingContext < "u" && o.push(...cs(e.WebGL2RenderingContext.prototype, Rn.WebGL2, n, i, t, s, e)), () => {
26415
+ return o.push(...us(e.WebGLRenderingContext.prototype, Rn.WebGL, n, i, t, s, e)), typeof e.WebGL2RenderingContext < "u" && o.push(...us(e.WebGL2RenderingContext.prototype, Rn.WebGL2, n, i, t, s, e)), () => {
26416
26416
  o.forEach((a) => a());
26417
26417
  };
26418
26418
  }
@@ -26555,7 +26555,7 @@ class id {
26555
26555
  });
26556
26556
  }
26557
26557
  initCanvasFPSObserver(e, i, t, s, o) {
26558
- const a = us(i, t, s, !0), l = /* @__PURE__ */ new Map(), d = new nd();
26558
+ const a = cs(i, t, s, !0), l = /* @__PURE__ */ new Map(), d = new nd();
26559
26559
  d.onmessage = (k) => {
26560
26560
  const { id: C } = k.data;
26561
26561
  if (l.set(C, !1), !("base64" in k.data))
@@ -26626,7 +26626,7 @@ class id {
26626
26626
  }
26627
26627
  initCanvasMutationObserver(e, i, t) {
26628
26628
  this.startRAFTimestamping(), this.startPendingCanvasMutationFlusher();
26629
- const s = us(e, i, t, !1), o = Jl(this.processMutation.bind(this), e, i, t), a = Yl(this.processMutation.bind(this), e, i, t, this.mirror);
26629
+ const s = cs(e, i, t, !1), o = Jl(this.processMutation.bind(this), e, i, t), a = Yl(this.processMutation.bind(this), e, i, t, this.mirror);
26630
26630
  this.resetObservers = () => {
26631
26631
  s(), o(), a();
26632
26632
  };
@@ -26781,16 +26781,16 @@ function si(n = {}) {
26781
26781
  };
26782
26782
  re = (N, de) => {
26783
26783
  var Y;
26784
- if (!((Y = kn[0]) === null || Y === void 0) && Y.isFrozen() && N.type !== W.FullSnapshot && !(N.type === W.IncrementalSnapshot && N.data.source === q.Mutation) && kn.forEach((ue) => ue.unfreeze()), we)
26784
+ if (!((Y = kn[0]) === null || Y === void 0) && Y.isFrozen() && N.type !== W.FullSnapshot && !(N.type === W.IncrementalSnapshot && N.data.source === q.Mutation) && kn.forEach((ce) => ce.unfreeze()), we)
26785
26785
  e == null || e(Te(N), de);
26786
26786
  else if (ze) {
26787
- const ue = {
26787
+ const ce = {
26788
26788
  type: "rrweb",
26789
26789
  event: Te(N),
26790
26790
  origin: window.location.origin,
26791
26791
  isCheckout: de
26792
26792
  };
26793
- window.parent.postMessage(ue, "*");
26793
+ window.parent.postMessage(ce, "*");
26794
26794
  }
26795
26795
  if (N.type === W.FullSnapshot)
26796
26796
  bn = N, on = 0;
@@ -26798,8 +26798,8 @@ function si(n = {}) {
26798
26798
  if (N.data.source === q.Mutation && N.data.isAttachIframe)
26799
26799
  return;
26800
26800
  on++;
26801
- const ue = t && on >= t, Pe = i && N.timestamp - bn.timestamp > i;
26802
- (ue || Pe) && Si(!0);
26801
+ const ce = t && on >= t, Pe = i && N.timestamp - bn.timestamp > i;
26802
+ (ce || Pe) && Si(!0);
26803
26803
  }
26804
26804
  };
26805
26805
  const Ze = (N) => {
@@ -26893,13 +26893,13 @@ function si(n = {}) {
26893
26893
  recordCanvas: K,
26894
26894
  inlineImages: ge,
26895
26895
  onSerialize: (Y) => {
26896
- Fs(Y, He) && Ee.addIframe(Y), Gs(Y, He) && Ie.trackLinkElement(Y), ut(Y) && je.addShadowRoot(Y.shadowRoot, document);
26896
+ Fs(Y, He) && Ee.addIframe(Y), Gs(Y, He) && Ie.trackLinkElement(Y), ct(Y) && je.addShadowRoot(Y.shadowRoot, document);
26897
26897
  },
26898
- onIframeLoad: (Y, ue) => {
26899
- Ee.attachIframe(Y, ue), je.observeAttachShadow(Y);
26898
+ onIframeLoad: (Y, ce) => {
26899
+ Ee.attachIframe(Y, ce), je.observeAttachShadow(Y);
26900
26900
  },
26901
- onStylesheetLoad: (Y, ue) => {
26902
- Ie.attachLinkElement(Y, ue);
26901
+ onStylesheetLoad: (Y, ce) => {
26902
+ Ie.attachLinkElement(Y, ce);
26903
26903
  },
26904
26904
  keepIframeSrcFn: ke
26905
26905
  });
@@ -26914,7 +26914,7 @@ function si(n = {}) {
26914
26914
  }), N), kn.forEach((Y) => Y.unlock()), document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0 && Ie.adoptStyleSheets(document.adoptedStyleSheets, He.getId(document));
26915
26915
  };
26916
26916
  try {
26917
- const N = [], de = (ue) => {
26917
+ const N = [], de = (ce) => {
26918
26918
  var Pe;
26919
26919
  return z(Kl)({
26920
26920
  mutationCb: Ze,
@@ -26980,7 +26980,7 @@ function si(n = {}) {
26980
26980
  inlineImages: ge,
26981
26981
  userTriggeredOnInput: j,
26982
26982
  collectFonts: te,
26983
- doc: ue,
26983
+ doc: ce,
26984
26984
  maskInputFn: k,
26985
26985
  maskTextFn: C,
26986
26986
  keepIframeSrcFn: ke,
@@ -27007,9 +27007,9 @@ function si(n = {}) {
27007
27007
  }))) || []
27008
27008
  }, w);
27009
27009
  };
27010
- Ee.addLoadListener((ue) => {
27010
+ Ee.addLoadListener((ce) => {
27011
27011
  try {
27012
- N.push(de(ue.contentDocument));
27012
+ N.push(de(ce.contentDocument));
27013
27013
  } catch (Pe) {
27014
27014
  console.warn(Pe);
27015
27015
  }
@@ -27028,7 +27028,7 @@ function si(n = {}) {
27028
27028
  data: {}
27029
27029
  })), U === "load" && Y();
27030
27030
  }, window))), () => {
27031
- N.forEach((ue) => ue()), Ce.destroy(), Ei = !1, xl();
27031
+ N.forEach((ce) => ce()), Ce.destroy(), Ei = !1, xl();
27032
27032
  };
27033
27033
  } catch (N) {
27034
27034
  console.warn(N);
@@ -27073,7 +27073,7 @@ if (typeof window > "u") {
27073
27073
  };
27074
27074
  } else
27075
27075
  H = window;
27076
- var Jn = 24 * 60 * 60 * 1e3, ot = 8 * 1e3, Vi = Array.prototype, od = Function.prototype, io = Object.prototype, dn = Vi.slice, oi = io.toString, Ki = io.hasOwnProperty, he = H.console, un = H.navigator, ee = H.document, fi = H.opera, Pi = H.screen, Ge = un.userAgent, at = od.bind, ms = Vi.forEach, vs = Vi.indexOf, ps = Vi.map, ad = Array.isArray, ht = {}, m = {
27076
+ var Jn = 24 * 60 * 60 * 1e3, ot = 8 * 1e3, Vi = Array.prototype, od = Function.prototype, io = Object.prototype, dn = Vi.slice, oi = io.toString, Ki = io.hasOwnProperty, he = H.console, cn = H.navigator, ee = H.document, fi = H.opera, Pi = H.screen, Ge = cn.userAgent, at = od.bind, ms = Vi.forEach, vs = Vi.indexOf, ps = Vi.map, ad = Array.isArray, ht = {}, m = {
27077
27077
  trim: function(n) {
27078
27078
  return n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
27079
27079
  }
@@ -27856,13 +27856,13 @@ m.info = {
27856
27856
  properties: function(n) {
27857
27857
  return typeof n != "object" && (n = {}), m.extend(m.strip_empty_properties({
27858
27858
  $os: m.info.os(),
27859
- $browser: m.info.browser(Ge, un.vendor, fi),
27859
+ $browser: m.info.browser(Ge, cn.vendor, fi),
27860
27860
  $referrer: ee.referrer,
27861
27861
  $referring_domain: m.info.referringDomain(ee.referrer),
27862
27862
  $device: m.info.device(Ge)
27863
27863
  }), {
27864
27864
  $current_url: m.info.currentUrl(),
27865
- $browser_version: m.info.browserVersion(Ge, un.vendor, fi),
27865
+ $browser_version: m.info.browserVersion(Ge, cn.vendor, fi),
27866
27866
  $screen_height: Pi.height,
27867
27867
  $screen_width: Pi.width,
27868
27868
  mp_lib: "web",
@@ -27875,9 +27875,9 @@ m.info = {
27875
27875
  people_properties: function() {
27876
27876
  return m.extend(m.strip_empty_properties({
27877
27877
  $os: m.info.os(),
27878
- $browser: m.info.browser(Ge, un.vendor, fi)
27878
+ $browser: m.info.browser(Ge, cn.vendor, fi)
27879
27879
  }), {
27880
- $browser_version: m.info.browserVersion(Ge, un.vendor, fi)
27880
+ $browser_version: m.info.browserVersion(Ge, cn.vendor, fi)
27881
27881
  });
27882
27882
  },
27883
27883
  mpPageViewProperties: function() {
@@ -27893,9 +27893,9 @@ m.info = {
27893
27893
  var ft = function(n) {
27894
27894
  var e = Math.random().toString(36).substring(2, 10) + Math.random().toString(36).substring(2, 10);
27895
27895
  return n ? e.substring(0, n) : e;
27896
- }, ud = /[a-z0-9][a-z0-9-]*\.[a-z]+$/i, cd = /[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i, fs = function(n) {
27897
- var e = cd, i = n.split("."), t = i[i.length - 1];
27898
- (t.length > 4 || t === "com" || t === "org") && (e = ud);
27896
+ }, cd = /[a-z0-9][a-z0-9-]*\.[a-z]+$/i, ud = /[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i, fs = function(n) {
27897
+ var e = ud, i = n.split("."), t = i[i.length - 1];
27898
+ (t.length > 4 || t === "com" || t === "org") && (e = cd);
27899
27899
  var s = n.match(e);
27900
27900
  return s ? s[0] : "";
27901
27901
  }, hd = function() {
@@ -28898,14 +28898,14 @@ F.prototype.remove_event_timer = function(n) {
28898
28898
  var e = this.load_prop(ei) || {}, i = e[n];
28899
28899
  return m.isUndefined(i) || (delete this.props[ei][n], this.save()), i;
28900
28900
  };
28901
- var xt, uo = function(n, e) {
28901
+ var xt, co = function(n, e) {
28902
28902
  throw new Error(n + " not available in this build.");
28903
- }, Se, co = 0, Ad = 1, Ld = function(n) {
28903
+ }, Se, uo = 0, Ad = 1, Ld = function(n) {
28904
28904
  return n;
28905
28905
  }, ni = function() {
28906
28906
  }, De = "mixpanel", ho = "base64", xd = "json", Tt = "$device:", Hn = H.XMLHttpRequest && "withCredentials" in new XMLHttpRequest(), mo = !Hn && Ge.indexOf("MSIE") === -1 && Ge.indexOf("Mozilla") === -1, Hi = null;
28907
- un.sendBeacon && (Hi = function() {
28908
- return un.sendBeacon.apply(un, arguments);
28907
+ cn.sendBeacon && (Hi = function() {
28908
+ return cn.sendBeacon.apply(cn, arguments);
28909
28909
  });
28910
28910
  var vo = {
28911
28911
  track: "track/",
@@ -28975,7 +28975,7 @@ var vo = {
28975
28975
  }, po = !1, L = function() {
28976
28976
  }, mt = function(n, e, i) {
28977
28977
  var t, s = i === De ? Se : Se[i];
28978
- if (s && xt === co)
28978
+ if (s && xt === uo)
28979
28979
  t = s;
28980
28980
  else {
28981
28981
  if (s && !m.isArray(s)) {
@@ -29051,7 +29051,7 @@ L.prototype.start_session_recording = mn(function() {
29051
29051
  var n = m.bind(function() {
29052
29052
  this._recorder = this._recorder || new H.__mp_recorder(this), this._recorder.startRecording();
29053
29053
  }, this);
29054
- m.isUndefined(H.__mp_recorder) ? uo(this.get_config("recorder_src"), n) : n();
29054
+ m.isUndefined(H.__mp_recorder) ? co(this.get_config("recorder_src"), n) : n();
29055
29055
  });
29056
29056
  L.prototype.stop_session_recording = function() {
29057
29057
  this._recorder ? this._recorder.stopRecording() : $.critical("Session recorder module not loaded");
@@ -29656,7 +29656,7 @@ var Bn = {}, Ed = function() {
29656
29656
  m.register_event(H, "load", n, !0);
29657
29657
  };
29658
29658
  function Dd(n) {
29659
- return uo = n, xt = co, Se = new L(), Pd(), Se.init(), Id(), Se;
29659
+ return co = n, xt = uo, Se = new L(), Pd(), Se.init(), Id(), Se;
29660
29660
  }
29661
29661
  function Nd(n, e) {
29662
29662
  e();
@@ -29804,7 +29804,7 @@ class Hd {
29804
29804
  }
29805
29805
  o += 1;
29806
29806
  try {
29807
- const v = await cn(
29807
+ const v = await un(
29808
29808
  e,
29809
29809
  this.ref,
29810
29810
  d,
@@ -29850,7 +29850,7 @@ class Hd {
29850
29850
  const Rd = `<div class="flex items-center justify-center md:justify-between w-full text-xxs mt-5">
29851
29851
  <div class="text-tone-60"><span>Powered by</span> <span class="font-bold">Spotflow</span></div>
29852
29852
  <div class="align-center text-tone-60 hidden md:flex gap-4">
29853
- <!-- <span id="test-cards-link" class="hover:font-bold">Test Cards</span> -->
29853
+ <span id="test-cards-link" class="hover:font-bold">Test Cards</span>
29854
29854
  <a href="https://ribbon-scowl-35f.notion.site/Terms-Conditions-940742f0a1b144498ffc1786c5bc6a08?pvs=4" target="_blank" class="hover:font-bold">Terms</a>
29855
29855
  <a href="https://ribbon-scowl-35f.notion.site/Privacy-Policy-Spotflow-3997ee8d923d4cd39a3dc43b7249b713" target="_blank" class="hover:font-bold">Privacy</a>
29856
29856
  <a href="mailto:hello@spotflow.one" class="hover:font-bold">Contact</a>
@@ -30309,10 +30309,11 @@ class Vd {
30309
30309
  h(this, "restartTransactionProcess");
30310
30310
  h(this, "retryingPayment");
30311
30311
  h(this, "isMaxRetriesReached");
30312
+ h(this, "isCancelledPlan");
30312
30313
  h(this, "isMobile", !1);
30313
30314
  this.currency = d, this.onSuccess = f || (() => null), this.container = t, this.encryption = o, this.token = l, this.customer = s, this.planId = a, this.amount = e, this.totalAmount = i, this.rdtCode = p, this.url = v, this.reference = g, this.callBackUrl = y, this.metadata = k, this.localCurrency = C, this._currentStep = 1, this.activeRef = "", this.contents = this.container.querySelector(
30314
30315
  "#payment-content-view"
30315
- ), this.cardResponse = {}, this.cardResponseHeader = {}, this.hidePaymentMethods = w, this.showPaymentMethods = M, this.onClose = A, this.restartTransactionProcess = _, this.retryingPayment = T, this.isMaxRetriesReached = !1, this.renderCardContent(), P.track("card_opens", {
30316
+ ), this.cardResponse = {}, this.cardResponseHeader = {}, this.hidePaymentMethods = w, this.showPaymentMethods = M, this.onClose = A, this.restartTransactionProcess = _, this.retryingPayment = T, this.isMaxRetriesReached = !1, this.isCancelledPlan = !1, this.renderCardContent(), P.track("card_opens", {
30316
30317
  payment_method: "Card"
30317
30318
  }), this.isMobile = window.matchMedia("(max-width: 767px)").matches;
30318
30319
  }
@@ -30409,15 +30410,31 @@ class Vd {
30409
30410
  payment_method: "Card",
30410
30411
  verification_status: "Null",
30411
30412
  authentication_type: "PIN"
30412
- }), l.code === "payment_max_retry_attempts" ? (this.isMaxRetriesReached = !0, this.verifyPaymentProcess(), this.currentStep = 4, this.warningScreen.setPaymentError(
30413
+ }), l.code === "payment_max_retry_attempts" ? (this.isMaxRetriesReached = !0, this.verifyPaymentProcess(), this.currentStep = 4, P.track("max_retries_reached", {
30414
+ payment_method: "Card"
30415
+ }), this.warningScreen.setPaymentError(
30413
30416
  "Maximum retries",
30414
30417
  "You have reached the maximum number of retries allowed. Go back to merchant website to start the payment process again.",
30415
30418
  "Go back to Merchant"
30416
- )) : (this.currentStep = 4, l.message ? this.warningScreen.setPaymentError(l.message) : this.warningScreen.setPaymentError("Payment failed"), this.warningScreen.hideReportIssue());
30419
+ )) : (l.message ? l.code === "7137" ? (this.isCancelledPlan = !0, this.currentStep = 4, P.track("cancelled_plan", {
30420
+ payment_method: "Card"
30421
+ }), this.warningScreen.setPaymentError(
30422
+ l.message,
30423
+ "",
30424
+ "Go back to Merchant"
30425
+ )) : (this.currentStep = 4, this.warningScreen.setPaymentError(l.message)) : (this.currentStep = 4, this.warningScreen.setPaymentError("Payment failed")), this.warningScreen.hideReportIssue());
30417
30426
  }).finally(() => {
30418
30427
  t && s && (t.classList.add("hidden"), s.classList.remove("hidden"));
30419
30428
  });
30420
30429
  }
30430
+ cancellledPlanAction() {
30431
+ if (this.rdtCode)
30432
+ window.history.back();
30433
+ else {
30434
+ const e = document.getElementById("checkout-modal");
30435
+ e && e.remove();
30436
+ }
30437
+ }
30421
30438
  handlePinRequest(e) {
30422
30439
  if (e.length === 4) {
30423
30440
  const i = {
@@ -30683,7 +30700,7 @@ class Vd {
30683
30700
  }
30684
30701
  async verifyPayment(e, i) {
30685
30702
  try {
30686
- const t = await cn(
30703
+ const t = await un(
30687
30704
  this.token,
30688
30705
  this.activeRef,
30689
30706
  void 0,
@@ -30701,7 +30718,7 @@ class Vd {
30701
30718
  }
30702
30719
  async verifyPaymentProcess() {
30703
30720
  try {
30704
- const e = await cn(
30721
+ const e = await un(
30705
30722
  this.token,
30706
30723
  this.reference,
30707
30724
  void 0,
@@ -30714,6 +30731,10 @@ class Vd {
30714
30731
  }
30715
30732
  }
30716
30733
  goBackToMerchant() {
30734
+ if (this.isCancelledPlan) {
30735
+ this.cancellledPlanAction();
30736
+ return;
30737
+ }
30717
30738
  this.redirectTo(
30718
30739
  this.cardResponse,
30719
30740
  this.cardResponseHeader,
@@ -30756,7 +30777,7 @@ class Vd {
30756
30777
  case 4:
30757
30778
  this.warningScreen = new Ln({
30758
30779
  container: this.contents,
30759
- onAction: this.isMaxRetriesReached ? this.goBackToMerchant.bind(this) : this.restartTransactionProcess.bind(this),
30780
+ onAction: this.isMaxRetriesReached || this.isCancelledPlan ? this.goBackToMerchant.bind(this) : this.restartTransactionProcess.bind(this),
30760
30781
  onReportIssue: () => this.currentStep = 8
30761
30782
  }), this.contents.innerHTML = this.warningScreen.render(), this.warningScreen.attachListener(), ki(i), t.classList.remove("text-tone-100", "font-bold");
30762
30783
  break;
@@ -31219,15 +31240,15 @@ var yo = { exports: {} };
31219
31240
  function(i, t, s) {
31220
31241
  s.r(t);
31221
31242
  class o {
31222
- constructor(r, u) {
31223
- this.lastId = 0, this.prefix = r, this.name = u;
31243
+ constructor(r, c) {
31244
+ this.lastId = 0, this.prefix = r, this.name = c;
31224
31245
  }
31225
31246
  create(r) {
31226
31247
  this.lastId++;
31227
- var u = this.lastId, b = this.prefix + u, S = this.name + "[" + u + "]", x = !1, E = function() {
31248
+ var c = this.lastId, b = this.prefix + c, S = this.name + "[" + c + "]", x = !1, E = function() {
31228
31249
  x || (r.apply(null, arguments), x = !0);
31229
31250
  };
31230
- return this[u] = E, { number: u, id: b, name: S, callback: E };
31251
+ return this[c] = E, { number: c, id: b, name: S, callback: E };
31231
31252
  }
31232
31253
  remove(r) {
31233
31254
  delete this[r.number];
@@ -31265,18 +31286,18 @@ var yo = { exports: {} };
31265
31286
  constructor(r) {
31266
31287
  this.options = r, this.receivers = r.receivers || a, this.loading = {};
31267
31288
  }
31268
- load(r, u, b) {
31289
+ load(r, c, b) {
31269
31290
  var S = this;
31270
31291
  if (S.loading[r] && S.loading[r].length > 0)
31271
31292
  S.loading[r].push(b);
31272
31293
  else {
31273
31294
  S.loading[r] = [b];
31274
- var x = O.createScriptRequest(S.getPath(r, u)), E = S.receivers.create(function(D) {
31295
+ var x = O.createScriptRequest(S.getPath(r, c)), E = S.receivers.create(function(D) {
31275
31296
  if (S.receivers.remove(E), S.loading[r]) {
31276
31297
  var B = S.loading[r];
31277
31298
  delete S.loading[r];
31278
- for (var Z = function(ce) {
31279
- ce || x.cleanup();
31299
+ for (var Z = function(ue) {
31300
+ ue || x.cleanup();
31280
31301
  }, Q = 0; Q < B.length; Q++)
31281
31302
  B[Q](D, Z);
31282
31303
  }
@@ -31285,11 +31306,11 @@ var yo = { exports: {} };
31285
31306
  }
31286
31307
  }
31287
31308
  getRoot(r) {
31288
- var u, b = O.getDocument().location.protocol;
31289
- return r && r.useTLS || b === "https:" ? u = this.options.cdn_https : u = this.options.cdn_http, u.replace(/\/*$/, "") + "/" + this.options.version;
31309
+ var c, b = O.getDocument().location.protocol;
31310
+ return r && r.useTLS || b === "https:" ? c = this.options.cdn_https : c = this.options.cdn_http, c.replace(/\/*$/, "") + "/" + this.options.version;
31290
31311
  }
31291
- getPath(r, u) {
31292
- return this.getRoot(u) + "/" + r + this.options.suffix + ".js";
31312
+ getPath(r, c) {
31313
+ return this.getRoot(c) + "/" + r + this.options.suffix + ".js";
31293
31314
  }
31294
31315
  }
31295
31316
  var v = new o("_pusher_dependencies", "Pusher.DependenciesReceivers"), g = new p({
@@ -31319,15 +31340,15 @@ var yo = { exports: {} };
31319
31340
  }
31320
31341
  }
31321
31342
  };
31322
- var k = { buildLogSuffix: function(c) {
31323
- const r = "See:", u = f.urls[c];
31324
- if (!u)
31343
+ var k = { buildLogSuffix: function(u) {
31344
+ const r = "See:", c = f.urls[u];
31345
+ if (!c)
31325
31346
  return "";
31326
31347
  let b;
31327
- return u.fullUrl ? b = u.fullUrl : u.path && (b = f.baseUrl + u.path), b ? `${r} ${b}` : "";
31348
+ return c.fullUrl ? b = c.fullUrl : c.path && (b = f.baseUrl + c.path), b ? `${r} ${b}` : "";
31328
31349
  } }, C;
31329
- (function(c) {
31330
- c.UserAuthentication = "user-authentication", c.ChannelAuthorization = "channel-authorization";
31350
+ (function(u) {
31351
+ u.UserAuthentication = "user-authentication", u.ChannelAuthorization = "channel-authorization";
31331
31352
  })(C || (C = {}));
31332
31353
  class w extends Error {
31333
31354
  constructor(r) {
@@ -31370,17 +31391,17 @@ var yo = { exports: {} };
31370
31391
  }
31371
31392
  }
31372
31393
  class U extends Error {
31373
- constructor(r, u) {
31374
- super(u), this.status = r, Object.setPrototypeOf(this, new.target.prototype);
31394
+ constructor(r, c) {
31395
+ super(c), this.status = r, Object.setPrototypeOf(this, new.target.prototype);
31375
31396
  }
31376
31397
  }
31377
- var te = function(c, r, u, b, S) {
31398
+ var te = function(u, r, c, b, S) {
31378
31399
  const x = O.createXHR();
31379
- x.open("POST", u.endpoint, !0), x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
31380
- for (var E in u.headers)
31381
- x.setRequestHeader(E, u.headers[E]);
31382
- if (u.headersProvider != null) {
31383
- let D = u.headersProvider();
31400
+ x.open("POST", c.endpoint, !0), x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
31401
+ for (var E in c.headers)
31402
+ x.setRequestHeader(E, c.headers[E]);
31403
+ if (c.headersProvider != null) {
31404
+ let D = c.headersProvider();
31384
31405
  for (var E in D)
31385
31406
  x.setRequestHeader(E, D[E]);
31386
31407
  }
@@ -31404,32 +31425,32 @@ var yo = { exports: {} };
31404
31425
  D = `Clients must be authorized to join private or presence channels. ${k.buildLogSuffix("authorizationEndpoint")}`;
31405
31426
  break;
31406
31427
  }
31407
- S(new U(x.status, `Unable to retrieve auth string from ${b.toString()} endpoint - received status: ${x.status} from ${u.endpoint}. ${D}`), null);
31428
+ S(new U(x.status, `Unable to retrieve auth string from ${b.toString()} endpoint - received status: ${x.status} from ${c.endpoint}. ${D}`), null);
31408
31429
  }
31409
31430
  }, x.send(r), x;
31410
31431
  };
31411
- function ge(c) {
31412
- return ze(xe(c));
31432
+ function ge(u) {
31433
+ return ze(xe(u));
31413
31434
  }
31414
- var V = String.fromCharCode, ke = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", le = function(c) {
31415
- var r = c.charCodeAt(0);
31416
- return r < 128 ? c : r < 2048 ? V(192 | r >>> 6) + V(128 | r & 63) : V(224 | r >>> 12 & 15) + V(128 | r >>> 6 & 63) + V(128 | r & 63);
31417
- }, xe = function(c) {
31418
- return c.replace(/[^\x00-\x7F]/g, le);
31419
- }, we = function(c) {
31420
- var r = [0, 2, 1][c.length % 3], u = c.charCodeAt(0) << 16 | (c.length > 1 ? c.charCodeAt(1) : 0) << 8 | (c.length > 2 ? c.charCodeAt(2) : 0), b = [
31421
- ke.charAt(u >>> 18),
31422
- ke.charAt(u >>> 12 & 63),
31423
- r >= 2 ? "=" : ke.charAt(u >>> 6 & 63),
31424
- r >= 1 ? "=" : ke.charAt(u & 63)
31435
+ var V = String.fromCharCode, ke = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", le = function(u) {
31436
+ var r = u.charCodeAt(0);
31437
+ return r < 128 ? u : r < 2048 ? V(192 | r >>> 6) + V(128 | r & 63) : V(224 | r >>> 12 & 15) + V(128 | r >>> 6 & 63) + V(128 | r & 63);
31438
+ }, xe = function(u) {
31439
+ return u.replace(/[^\x00-\x7F]/g, le);
31440
+ }, we = function(u) {
31441
+ var r = [0, 2, 1][u.length % 3], c = u.charCodeAt(0) << 16 | (u.length > 1 ? u.charCodeAt(1) : 0) << 8 | (u.length > 2 ? u.charCodeAt(2) : 0), b = [
31442
+ ke.charAt(c >>> 18),
31443
+ ke.charAt(c >>> 12 & 63),
31444
+ r >= 2 ? "=" : ke.charAt(c >>> 6 & 63),
31445
+ r >= 1 ? "=" : ke.charAt(c & 63)
31425
31446
  ];
31426
31447
  return b.join("");
31427
- }, ze = window.btoa || function(c) {
31428
- return c.replace(/[\s\S]{1,3}/g, we);
31448
+ }, ze = window.btoa || function(u) {
31449
+ return u.replace(/[\s\S]{1,3}/g, we);
31429
31450
  };
31430
31451
  class sn {
31431
- constructor(r, u, b, S) {
31432
- this.clear = u, this.timer = r(() => {
31452
+ constructor(r, c, b, S) {
31453
+ this.clear = c, this.timer = r(() => {
31433
31454
  this.timer && (this.timer = S(this.timer));
31434
31455
  }, b);
31435
31456
  }
@@ -31441,23 +31462,23 @@ var yo = { exports: {} };
31441
31462
  }
31442
31463
  }
31443
31464
  var We = sn;
31444
- function bn(c) {
31445
- window.clearTimeout(c);
31465
+ function bn(u) {
31466
+ window.clearTimeout(u);
31446
31467
  }
31447
- function on(c) {
31448
- window.clearInterval(c);
31468
+ function on(u) {
31469
+ window.clearInterval(u);
31449
31470
  }
31450
31471
  class Te extends We {
31451
- constructor(r, u) {
31472
+ constructor(r, c) {
31452
31473
  super(setTimeout, bn, r, function(b) {
31453
- return u(), null;
31474
+ return c(), null;
31454
31475
  });
31455
31476
  }
31456
31477
  }
31457
31478
  class Ze extends We {
31458
- constructor(r, u) {
31479
+ constructor(r, c) {
31459
31480
  super(setInterval, on, r, function(b) {
31460
- return u(), b;
31481
+ return c(), b;
31461
31482
  });
31462
31483
  }
31463
31484
  }
@@ -31465,116 +31486,116 @@ var yo = { exports: {} };
31465
31486
  now() {
31466
31487
  return Date.now ? Date.now() : (/* @__PURE__ */ new Date()).valueOf();
31467
31488
  },
31468
- defer(c) {
31469
- return new Te(0, c);
31489
+ defer(u) {
31490
+ return new Te(0, u);
31470
31491
  },
31471
- method(c, ...r) {
31472
- var u = Array.prototype.slice.call(arguments, 1);
31492
+ method(u, ...r) {
31493
+ var c = Array.prototype.slice.call(arguments, 1);
31473
31494
  return function(b) {
31474
- return b[c].apply(b, u.concat(arguments));
31495
+ return b[u].apply(b, c.concat(arguments));
31475
31496
  };
31476
31497
  }
31477
31498
  }, ae = fn;
31478
- function pe(c, ...r) {
31479
- for (var u = 0; u < r.length; u++) {
31480
- var b = r[u];
31499
+ function pe(u, ...r) {
31500
+ for (var c = 0; c < r.length; c++) {
31501
+ var b = r[c];
31481
31502
  for (var S in b)
31482
- b[S] && b[S].constructor && b[S].constructor === Object ? c[S] = pe(c[S] || {}, b[S]) : c[S] = b[S];
31503
+ b[S] && b[S].constructor && b[S].constructor === Object ? u[S] = pe(u[S] || {}, b[S]) : u[S] = b[S];
31483
31504
  }
31484
- return c;
31505
+ return u;
31485
31506
  }
31486
31507
  function Ie() {
31487
- for (var c = ["Pusher"], r = 0; r < arguments.length; r++)
31488
- typeof arguments[r] == "string" ? c.push(arguments[r]) : c.push(gn(arguments[r]));
31489
- return c.join(" : ");
31508
+ for (var u = ["Pusher"], r = 0; r < arguments.length; r++)
31509
+ typeof arguments[r] == "string" ? u.push(arguments[r]) : u.push(gn(arguments[r]));
31510
+ return u.join(" : ");
31490
31511
  }
31491
- function Ee(c, r) {
31492
- var u = Array.prototype.indexOf;
31493
- if (c === null)
31512
+ function Ee(u, r) {
31513
+ var c = Array.prototype.indexOf;
31514
+ if (u === null)
31494
31515
  return -1;
31495
- if (u && c.indexOf === u)
31496
- return c.indexOf(r);
31497
- for (var b = 0, S = c.length; b < S; b++)
31498
- if (c[b] === r)
31516
+ if (c && u.indexOf === c)
31517
+ return u.indexOf(r);
31518
+ for (var b = 0, S = u.length; b < S; b++)
31519
+ if (u[b] === r)
31499
31520
  return b;
31500
31521
  return -1;
31501
31522
  }
31502
- function Ce(c, r) {
31503
- for (var u in c)
31504
- Object.prototype.hasOwnProperty.call(c, u) && r(c[u], u, c);
31523
+ function Ce(u, r) {
31524
+ for (var c in u)
31525
+ Object.prototype.hasOwnProperty.call(u, c) && r(u[c], c, u);
31505
31526
  }
31506
- function je(c) {
31527
+ function je(u) {
31507
31528
  var r = [];
31508
- return Ce(c, function(u, b) {
31529
+ return Ce(u, function(c, b) {
31509
31530
  r.push(b);
31510
31531
  }), r;
31511
31532
  }
31512
- function N(c) {
31533
+ function N(u) {
31513
31534
  var r = [];
31514
- return Ce(c, function(u) {
31515
- r.push(u);
31535
+ return Ce(u, function(c) {
31536
+ r.push(c);
31516
31537
  }), r;
31517
31538
  }
31518
- function de(c, r, u) {
31519
- for (var b = 0; b < c.length; b++)
31520
- r.call(u || window, c[b], b, c);
31539
+ function de(u, r, c) {
31540
+ for (var b = 0; b < u.length; b++)
31541
+ r.call(c || window, u[b], b, u);
31521
31542
  }
31522
- function Y(c, r) {
31523
- for (var u = [], b = 0; b < c.length; b++)
31524
- u.push(r(c[b], b, c, u));
31525
- return u;
31543
+ function Y(u, r) {
31544
+ for (var c = [], b = 0; b < u.length; b++)
31545
+ c.push(r(u[b], b, u, c));
31546
+ return c;
31526
31547
  }
31527
- function ue(c, r) {
31528
- var u = {};
31529
- return Ce(c, function(b, S) {
31530
- u[S] = r(b);
31531
- }), u;
31548
+ function ce(u, r) {
31549
+ var c = {};
31550
+ return Ce(u, function(b, S) {
31551
+ c[S] = r(b);
31552
+ }), c;
31532
31553
  }
31533
- function Pe(c, r) {
31554
+ function Pe(u, r) {
31534
31555
  r = r || function(S) {
31535
31556
  return !!S;
31536
31557
  };
31537
- for (var u = [], b = 0; b < c.length; b++)
31538
- r(c[b], b, c, u) && u.push(c[b]);
31539
- return u;
31558
+ for (var c = [], b = 0; b < u.length; b++)
31559
+ r(u[b], b, u, c) && c.push(u[b]);
31560
+ return c;
31540
31561
  }
31541
- function J(c, r) {
31542
- var u = {};
31543
- return Ce(c, function(b, S) {
31544
- (r && r(b, S, c, u) || b) && (u[S] = b);
31545
- }), u;
31562
+ function J(u, r) {
31563
+ var c = {};
31564
+ return Ce(u, function(b, S) {
31565
+ (r && r(b, S, u, c) || b) && (c[S] = b);
31566
+ }), c;
31546
31567
  }
31547
- function an(c) {
31568
+ function an(u) {
31548
31569
  var r = [];
31549
- return Ce(c, function(u, b) {
31550
- r.push([b, u]);
31570
+ return Ce(u, function(c, b) {
31571
+ r.push([b, c]);
31551
31572
  }), r;
31552
31573
  }
31553
- function jn(c, r) {
31554
- for (var u = 0; u < c.length; u++)
31555
- if (r(c[u], u, c))
31574
+ function jn(u, r) {
31575
+ for (var c = 0; c < u.length; c++)
31576
+ if (r(u[c], c, u))
31556
31577
  return !0;
31557
31578
  return !1;
31558
31579
  }
31559
- function ai(c, r) {
31560
- for (var u = 0; u < c.length; u++)
31561
- if (!r(c[u], u, c))
31580
+ function ai(u, r) {
31581
+ for (var c = 0; c < u.length; c++)
31582
+ if (!r(u[c], c, u))
31562
31583
  return !1;
31563
31584
  return !0;
31564
31585
  }
31565
- function ri(c) {
31566
- return ue(c, function(r) {
31586
+ function ri(u) {
31587
+ return ce(u, function(r) {
31567
31588
  return typeof r == "object" && (r = gn(r)), encodeURIComponent(ge(r.toString()));
31568
31589
  });
31569
31590
  }
31570
- function li(c) {
31571
- var r = J(c, function(b) {
31591
+ function li(u) {
31592
+ var r = J(u, function(b) {
31572
31593
  return b !== void 0;
31573
- }), u = Y(an(ri(r)), ae.method("join", "=")).join("&");
31574
- return u;
31594
+ }), c = Y(an(ri(r)), ae.method("join", "=")).join("&");
31595
+ return c;
31575
31596
  }
31576
- function di(c) {
31577
- var r = [], u = [];
31597
+ function di(u) {
31598
+ var r = [], c = [];
31578
31599
  return function b(S, x) {
31579
31600
  var E, D, B;
31580
31601
  switch (typeof S) {
@@ -31583,8 +31604,8 @@ var yo = { exports: {} };
31583
31604
  return null;
31584
31605
  for (E = 0; E < r.length; E += 1)
31585
31606
  if (r[E] === S)
31586
- return { $ref: u[E] };
31587
- if (r.push(S), u.push(x), Object.prototype.toString.apply(S) === "[object Array]")
31607
+ return { $ref: c[E] };
31608
+ if (r.push(S), c.push(x), Object.prototype.toString.apply(S) === "[object Array]")
31588
31609
  for (B = [], E = 0; E < S.length; E += 1)
31589
31610
  B[E] = b(S[E], x + "[" + E + "]");
31590
31611
  else {
@@ -31598,13 +31619,13 @@ var yo = { exports: {} };
31598
31619
  case "boolean":
31599
31620
  return S;
31600
31621
  }
31601
- }(c, "$");
31622
+ }(u, "$");
31602
31623
  }
31603
- function gn(c) {
31624
+ function gn(u) {
31604
31625
  try {
31605
- return JSON.stringify(c);
31626
+ return JSON.stringify(u);
31606
31627
  } catch {
31607
- return JSON.stringify(di(c));
31628
+ return JSON.stringify(di(u));
31608
31629
  }
31609
31630
  }
31610
31631
  class Fn {
@@ -31628,21 +31649,21 @@ var yo = { exports: {} };
31628
31649
  globalLogError(r) {
31629
31650
  window.console && window.console.error ? window.console.error(r) : this.globalLogWarn(r);
31630
31651
  }
31631
- log(r, ...u) {
31652
+ log(r, ...c) {
31632
31653
  var b = Ie.apply(this, arguments);
31633
31654
  et.log ? et.log(b) : et.logToConsole && r.bind(this)(b);
31634
31655
  }
31635
31656
  }
31636
- var oe = new Fn(), ko = function(c, r, u, b, S) {
31637
- (u.headers !== void 0 || u.headersProvider != null) && oe.warn(`To send headers with the ${b.toString()} request, you must use AJAX, rather than JSONP.`);
31638
- var x = c.nextAuthCallbackID.toString();
31639
- c.nextAuthCallbackID++;
31640
- var E = c.getDocument(), D = E.createElement("script");
31641
- c.auth_callbacks[x] = function(Q) {
31657
+ var oe = new Fn(), ko = function(u, r, c, b, S) {
31658
+ (c.headers !== void 0 || c.headersProvider != null) && oe.warn(`To send headers with the ${b.toString()} request, you must use AJAX, rather than JSONP.`);
31659
+ var x = u.nextAuthCallbackID.toString();
31660
+ u.nextAuthCallbackID++;
31661
+ var E = u.getDocument(), D = E.createElement("script");
31662
+ u.auth_callbacks[x] = function(Q) {
31642
31663
  S(null, Q);
31643
31664
  };
31644
31665
  var B = "Pusher.auth_callbacks['" + x + "']";
31645
- D.src = u.endpoint + "?callback=" + encodeURIComponent(B) + "&" + r;
31666
+ D.src = c.endpoint + "?callback=" + encodeURIComponent(B) + "&" + r;
31646
31667
  var Z = E.getElementsByTagName("head")[0] || E.documentElement;
31647
31668
  Z.insertBefore(D, Z.firstChild);
31648
31669
  }, wo = ko;
@@ -31651,28 +31672,28 @@ var yo = { exports: {} };
31651
31672
  this.src = r;
31652
31673
  }
31653
31674
  send(r) {
31654
- var u = this, b = "Error loading " + u.src;
31655
- u.script = document.createElement("script"), u.script.id = r.id, u.script.src = u.src, u.script.type = "text/javascript", u.script.charset = "UTF-8", u.script.addEventListener ? (u.script.onerror = function() {
31675
+ var c = this, b = "Error loading " + c.src;
31676
+ c.script = document.createElement("script"), c.script.id = r.id, c.script.src = c.src, c.script.type = "text/javascript", c.script.charset = "UTF-8", c.script.addEventListener ? (c.script.onerror = function() {
31656
31677
  r.callback(b);
31657
- }, u.script.onload = function() {
31678
+ }, c.script.onload = function() {
31658
31679
  r.callback(null);
31659
- }) : u.script.onreadystatechange = function() {
31660
- (u.script.readyState === "loaded" || u.script.readyState === "complete") && r.callback(null);
31661
- }, u.script.async === void 0 && document.attachEvent && /opera/i.test(navigator.userAgent) ? (u.errorScript = document.createElement("script"), u.errorScript.id = r.id + "_error", u.errorScript.text = r.name + "('" + b + "');", u.script.async = u.errorScript.async = !1) : u.script.async = !0;
31680
+ }) : c.script.onreadystatechange = function() {
31681
+ (c.script.readyState === "loaded" || c.script.readyState === "complete") && r.callback(null);
31682
+ }, c.script.async === void 0 && document.attachEvent && /opera/i.test(navigator.userAgent) ? (c.errorScript = document.createElement("script"), c.errorScript.id = r.id + "_error", c.errorScript.text = r.name + "('" + b + "');", c.script.async = c.errorScript.async = !1) : c.script.async = !0;
31662
31683
  var S = document.getElementsByTagName("head")[0];
31663
- S.insertBefore(u.script, S.firstChild), u.errorScript && S.insertBefore(u.errorScript, u.script.nextSibling);
31684
+ S.insertBefore(c.script, S.firstChild), c.errorScript && S.insertBefore(c.errorScript, c.script.nextSibling);
31664
31685
  }
31665
31686
  cleanup() {
31666
31687
  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;
31667
31688
  }
31668
31689
  }
31669
31690
  class Mo {
31670
- constructor(r, u) {
31671
- this.url = r, this.data = u;
31691
+ constructor(r, c) {
31692
+ this.url = r, this.data = c;
31672
31693
  }
31673
31694
  send(r) {
31674
31695
  if (!this.request) {
31675
- var u = li(this.data), b = this.url + "/" + r.number + "?" + u;
31696
+ var c = li(this.data), b = this.url + "/" + r.number + "?" + c;
31676
31697
  this.request = O.createScriptRequest(b), this.request.send(r);
31677
31698
  }
31678
31699
  }
@@ -31680,10 +31701,10 @@ var yo = { exports: {} };
31680
31701
  this.request && this.request.cleanup();
31681
31702
  }
31682
31703
  }
31683
- var Ao = function(c, r) {
31684
- return function(u, b) {
31685
- var S = "http" + (r ? "s" : "") + "://", x = S + (c.host || c.options.host) + c.options.path, E = O.createJSONPRequest(x, u), D = O.ScriptReceivers.create(function(B, Z) {
31686
- a.remove(D), E.cleanup(), Z && Z.host && (c.host = Z.host), b && b(B, Z);
31704
+ var Ao = function(u, r) {
31705
+ return function(c, b) {
31706
+ var S = "http" + (r ? "s" : "") + "://", x = S + (u.host || u.options.host) + u.options.path, E = O.createJSONPRequest(x, c), D = O.ScriptReceivers.create(function(B, Z) {
31707
+ a.remove(D), E.cleanup(), Z && Z.host && (u.host = Z.host), b && b(B, Z);
31687
31708
  });
31688
31709
  E.send(D);
31689
31710
  };
@@ -31691,30 +31712,30 @@ var yo = { exports: {} };
31691
31712
  name: "jsonp",
31692
31713
  getAgent: Ao
31693
31714
  }, xo = Lo;
31694
- function Gi(c, r, u) {
31695
- var b = c + (r.useTLS ? "s" : ""), S = r.useTLS ? r.hostTLS : r.hostNonTLS;
31696
- return b + "://" + S + u;
31715
+ function Gi(u, r, c) {
31716
+ var b = u + (r.useTLS ? "s" : ""), S = r.useTLS ? r.hostTLS : r.hostNonTLS;
31717
+ return b + "://" + S + c;
31697
31718
  }
31698
- function qi(c, r) {
31699
- var u = "/app/" + c, b = "?protocol=" + d.PROTOCOL + "&client=js&version=" + d.VERSION + (r ? "&" + r : "");
31700
- return u + b;
31719
+ function qi(u, r) {
31720
+ var c = "/app/" + u, b = "?protocol=" + d.PROTOCOL + "&client=js&version=" + d.VERSION + (r ? "&" + r : "");
31721
+ return c + b;
31701
31722
  }
31702
31723
  var To = {
31703
- getInitial: function(c, r) {
31704
- var u = (r.httpPath || "") + qi(c, "flash=false");
31705
- return Gi("ws", r, u);
31724
+ getInitial: function(u, r) {
31725
+ var c = (r.httpPath || "") + qi(u, "flash=false");
31726
+ return Gi("ws", r, c);
31706
31727
  }
31707
31728
  }, Eo = {
31708
- getInitial: function(c, r) {
31709
- var u = (r.httpPath || "/pusher") + qi(c);
31710
- return Gi("http", r, u);
31729
+ getInitial: function(u, r) {
31730
+ var c = (r.httpPath || "/pusher") + qi(u);
31731
+ return Gi("http", r, c);
31711
31732
  }
31712
31733
  }, Po = {
31713
- getInitial: function(c, r) {
31734
+ getInitial: function(u, r) {
31714
31735
  return Gi("http", r, r.httpPath || "/pusher");
31715
31736
  },
31716
- getPath: function(c, r) {
31717
- return qi(c);
31737
+ getPath: function(u, r) {
31738
+ return qi(u);
31718
31739
  }
31719
31740
  };
31720
31741
  class Io {
@@ -31724,70 +31745,70 @@ var yo = { exports: {} };
31724
31745
  get(r) {
31725
31746
  return this._callbacks[zi(r)];
31726
31747
  }
31727
- add(r, u, b) {
31748
+ add(r, c, b) {
31728
31749
  var S = zi(r);
31729
31750
  this._callbacks[S] = this._callbacks[S] || [], this._callbacks[S].push({
31730
- fn: u,
31751
+ fn: c,
31731
31752
  context: b
31732
31753
  });
31733
31754
  }
31734
- remove(r, u, b) {
31735
- if (!r && !u && !b) {
31755
+ remove(r, c, b) {
31756
+ if (!r && !c && !b) {
31736
31757
  this._callbacks = {};
31737
31758
  return;
31738
31759
  }
31739
31760
  var S = r ? [zi(r)] : je(this._callbacks);
31740
- u || b ? this.removeCallback(S, u, b) : this.removeAllCallbacks(S);
31761
+ c || b ? this.removeCallback(S, c, b) : this.removeAllCallbacks(S);
31741
31762
  }
31742
- removeCallback(r, u, b) {
31763
+ removeCallback(r, c, b) {
31743
31764
  de(r, function(S) {
31744
31765
  this._callbacks[S] = Pe(this._callbacks[S] || [], function(x) {
31745
- return u && u !== x.fn || b && b !== x.context;
31766
+ return c && c !== x.fn || b && b !== x.context;
31746
31767
  }), this._callbacks[S].length === 0 && delete this._callbacks[S];
31747
31768
  }, this);
31748
31769
  }
31749
31770
  removeAllCallbacks(r) {
31750
- de(r, function(u) {
31751
- delete this._callbacks[u];
31771
+ de(r, function(c) {
31772
+ delete this._callbacks[c];
31752
31773
  }, this);
31753
31774
  }
31754
31775
  }
31755
- function zi(c) {
31756
- return "_" + c;
31776
+ function zi(u) {
31777
+ return "_" + u;
31757
31778
  }
31758
31779
  class Je {
31759
31780
  constructor(r) {
31760
31781
  this.callbacks = new Io(), this.global_callbacks = [], this.failThrough = r;
31761
31782
  }
31762
- bind(r, u, b) {
31763
- return this.callbacks.add(r, u, b), this;
31783
+ bind(r, c, b) {
31784
+ return this.callbacks.add(r, c, b), this;
31764
31785
  }
31765
31786
  bind_global(r) {
31766
31787
  return this.global_callbacks.push(r), this;
31767
31788
  }
31768
- unbind(r, u, b) {
31769
- return this.callbacks.remove(r, u, b), this;
31789
+ unbind(r, c, b) {
31790
+ return this.callbacks.remove(r, c, b), this;
31770
31791
  }
31771
31792
  unbind_global(r) {
31772
- return r ? (this.global_callbacks = Pe(this.global_callbacks || [], (u) => u !== r), this) : (this.global_callbacks = [], this);
31793
+ return r ? (this.global_callbacks = Pe(this.global_callbacks || [], (c) => c !== r), this) : (this.global_callbacks = [], this);
31773
31794
  }
31774
31795
  unbind_all() {
31775
31796
  return this.unbind(), this.unbind_global(), this;
31776
31797
  }
31777
- emit(r, u, b) {
31798
+ emit(r, c, b) {
31778
31799
  for (var S = 0; S < this.global_callbacks.length; S++)
31779
- this.global_callbacks[S](r, u);
31800
+ this.global_callbacks[S](r, c);
31780
31801
  var x = this.callbacks.get(r), E = [];
31781
- if (b ? E.push(u, b) : u && E.push(u), x && x.length > 0)
31802
+ if (b ? E.push(c, b) : c && E.push(c), x && x.length > 0)
31782
31803
  for (var S = 0; S < x.length; S++)
31783
31804
  x[S].fn.apply(x[S].context || window, E);
31784
- else this.failThrough && this.failThrough(r, u);
31805
+ else this.failThrough && this.failThrough(r, c);
31785
31806
  return this;
31786
31807
  }
31787
31808
  }
31788
31809
  class Do extends Je {
31789
- constructor(r, u, b, S, x) {
31790
- super(), this.initialize = O.transportConnectionInitializer, this.hooks = r, this.name = u, this.priority = b, this.key = S, this.options = x, this.state = "new", this.timeline = x.timeline, this.activityTimeout = x.activityTimeout, this.id = this.timeline.generateUniqueID();
31810
+ constructor(r, c, b, S, x) {
31811
+ super(), this.initialize = O.transportConnectionInitializer, this.hooks = r, this.name = c, this.priority = b, this.key = S, this.options = x, this.state = "new", this.timeline = x.timeline, this.activityTimeout = x.activityTimeout, this.id = this.timeline.generateUniqueID();
31791
31812
  }
31792
31813
  handlesActivityChecks() {
31793
31814
  return !!this.hooks.handlesActivityChecks;
@@ -31801,9 +31822,9 @@ var yo = { exports: {} };
31801
31822
  var r = this.hooks.urls.getInitial(this.key, this.options);
31802
31823
  try {
31803
31824
  this.socket = this.hooks.getSocket(r, this.options);
31804
- } catch (u) {
31825
+ } catch (c) {
31805
31826
  return ae.defer(() => {
31806
- this.onError(u), this.changeState("closed");
31827
+ this.onError(c), this.changeState("closed");
31807
31828
  }), !1;
31808
31829
  }
31809
31830
  return this.bindListeners(), oe.debug("Connecting", { transport: this.name, url: r }), this.changeState("connecting"), !0;
@@ -31854,11 +31875,11 @@ var yo = { exports: {} };
31854
31875
  unbindListeners() {
31855
31876
  this.socket && (this.socket.onopen = void 0, this.socket.onerror = void 0, this.socket.onclose = void 0, this.socket.onmessage = void 0, this.supportsPing() && (this.socket.onactivity = void 0));
31856
31877
  }
31857
- changeState(r, u) {
31878
+ changeState(r, c) {
31858
31879
  this.state = r, this.timeline.info(this.buildTimelineMessage({
31859
31880
  state: r,
31860
- params: u
31861
- })), this.emit(r, u);
31881
+ params: c
31882
+ })), this.emit(r, c);
31862
31883
  }
31863
31884
  buildTimelineMessage(r) {
31864
31885
  return pe({ cid: this.id }, r);
@@ -31871,8 +31892,8 @@ var yo = { exports: {} };
31871
31892
  isSupported(r) {
31872
31893
  return this.hooks.isSupported(r);
31873
31894
  }
31874
- createConnection(r, u, b, S) {
31875
- return new Do(this.hooks, r, u, b, S);
31895
+ createConnection(r, c, b, S) {
31896
+ return new Do(this.hooks, r, c, b, S);
31876
31897
  }
31877
31898
  }
31878
31899
  var No = new xn({
@@ -31885,8 +31906,8 @@ var yo = { exports: {} };
31885
31906
  isSupported: function() {
31886
31907
  return !!O.getWebSocketAPI();
31887
31908
  },
31888
- getSocket: function(c) {
31889
- return O.createWebSocket(c);
31909
+ getSocket: function(u) {
31910
+ return O.createWebSocket(u);
31890
31911
  }
31891
31912
  }), It = {
31892
31913
  urls: Eo,
@@ -31896,12 +31917,12 @@ var yo = { exports: {} };
31896
31917
  return !0;
31897
31918
  }
31898
31919
  }, Dt = pe({
31899
- getSocket: function(c) {
31900
- return O.HTTPFactory.createStreamingSocket(c);
31920
+ getSocket: function(u) {
31921
+ return O.HTTPFactory.createStreamingSocket(u);
31901
31922
  }
31902
31923
  }, It), Nt = pe({
31903
- getSocket: function(c) {
31904
- return O.HTTPFactory.createPollingSocket(c);
31924
+ getSocket: function(u) {
31925
+ return O.HTTPFactory.createPollingSocket(u);
31905
31926
  }
31906
31927
  }, It), Bt = {
31907
31928
  isSupported: function() {
@@ -31911,7 +31932,7 @@ var yo = { exports: {} };
31911
31932
  ws: No,
31912
31933
  xhr_streaming: Bo,
31913
31934
  xhr_polling: Ho
31914
- }, ui = Ro, Oo = new xn({
31935
+ }, ci = Ro, Oo = new xn({
31915
31936
  file: "sockjs",
31916
31937
  urls: Po,
31917
31938
  handlesActivityChecks: !0,
@@ -31922,27 +31943,27 @@ var yo = { exports: {} };
31922
31943
  isInitialized: function() {
31923
31944
  return window.SockJS !== void 0;
31924
31945
  },
31925
- getSocket: function(c, r) {
31926
- return new window.SockJS(c, null, {
31946
+ getSocket: function(u, r) {
31947
+ return new window.SockJS(u, null, {
31927
31948
  js_path: g.getPath("sockjs", {
31928
31949
  useTLS: r.useTLS
31929
31950
  }),
31930
31951
  ignore_null_origin: r.ignoreNullOrigin
31931
31952
  });
31932
31953
  },
31933
- beforeOpen: function(c, r) {
31934
- c.send(JSON.stringify({
31954
+ beforeOpen: function(u, r) {
31955
+ u.send(JSON.stringify({
31935
31956
  path: r
31936
31957
  }));
31937
31958
  }
31938
31959
  }), Ht = {
31939
- isSupported: function(c) {
31940
- var r = O.isXDRSupported(c.useTLS);
31960
+ isSupported: function(u) {
31961
+ var r = O.isXDRSupported(u.useTLS);
31941
31962
  return r;
31942
31963
  }
31943
31964
  }, Uo = new xn(pe({}, Dt, Ht)), Vo = new xn(pe({}, Nt, Ht));
31944
- ui.xdr_streaming = Uo, ui.xdr_polling = Vo, ui.sockjs = Oo;
31945
- var Ko = ui;
31965
+ ci.xdr_streaming = Uo, ci.xdr_polling = Vo, ci.sockjs = Oo;
31966
+ var Ko = ci;
31946
31967
  class jo extends Je {
31947
31968
  constructor() {
31948
31969
  super();
@@ -31959,14 +31980,14 @@ var yo = { exports: {} };
31959
31980
  }
31960
31981
  var Fo = new jo();
31961
31982
  class Go {
31962
- constructor(r, u, b) {
31963
- this.manager = r, this.transport = u, this.minPingDelay = b.minPingDelay, this.maxPingDelay = b.maxPingDelay, this.pingDelay = void 0;
31983
+ constructor(r, c, b) {
31984
+ this.manager = r, this.transport = c, this.minPingDelay = b.minPingDelay, this.maxPingDelay = b.maxPingDelay, this.pingDelay = void 0;
31964
31985
  }
31965
- createConnection(r, u, b, S) {
31986
+ createConnection(r, c, b, S) {
31966
31987
  S = pe({}, S, {
31967
31988
  activityTimeout: this.pingDelay
31968
31989
  });
31969
- var x = this.transport.createConnection(r, u, b, S), E = null, D = function() {
31990
+ var x = this.transport.createConnection(r, c, b, S), E = null, D = function() {
31970
31991
  x.unbind("open", D), x.bind("closed", B), E = ae.now();
31971
31992
  }, B = (Z) => {
31972
31993
  if (x.unbind("closed", B), Z.code === 1002 || Z.code === 1003)
@@ -31983,29 +32004,29 @@ var yo = { exports: {} };
31983
32004
  }
31984
32005
  }
31985
32006
  const Rt = {
31986
- decodeMessage: function(c) {
32007
+ decodeMessage: function(u) {
31987
32008
  try {
31988
- var r = JSON.parse(c.data), u = r.data;
31989
- if (typeof u == "string")
32009
+ var r = JSON.parse(u.data), c = r.data;
32010
+ if (typeof c == "string")
31990
32011
  try {
31991
- u = JSON.parse(r.data);
32012
+ c = JSON.parse(r.data);
31992
32013
  } catch {
31993
32014
  }
31994
32015
  var b = {
31995
32016
  event: r.event,
31996
32017
  channel: r.channel,
31997
- data: u
32018
+ data: c
31998
32019
  };
31999
32020
  return r.user_id && (b.user_id = r.user_id), b;
32000
32021
  } catch (S) {
32001
- throw { type: "MessageParseError", error: S, data: c.data };
32022
+ throw { type: "MessageParseError", error: S, data: u.data };
32002
32023
  }
32003
32024
  },
32004
- encodeMessage: function(c) {
32005
- return JSON.stringify(c);
32025
+ encodeMessage: function(u) {
32026
+ return JSON.stringify(u);
32006
32027
  },
32007
- processHandshake: function(c) {
32008
- var r = Rt.decodeMessage(c);
32028
+ processHandshake: function(u) {
32029
+ var r = Rt.decodeMessage(u);
32009
32030
  if (r.event === "pusher:connection_established") {
32010
32031
  if (!r.data.activity_timeout)
32011
32032
  throw "No activity timeout specified in handshake";
@@ -32023,23 +32044,23 @@ var yo = { exports: {} };
32023
32044
  throw "Invalid handshake";
32024
32045
  }
32025
32046
  },
32026
- getCloseAction: function(c) {
32027
- return c.code < 4e3 ? c.code >= 1002 && c.code <= 1004 ? "backoff" : null : c.code === 4e3 ? "tls_only" : c.code < 4100 ? "refused" : c.code < 4200 ? "backoff" : c.code < 4300 ? "retry" : "refused";
32047
+ getCloseAction: function(u) {
32048
+ return u.code < 4e3 ? u.code >= 1002 && u.code <= 1004 ? "backoff" : null : u.code === 4e3 ? "tls_only" : u.code < 4100 ? "refused" : u.code < 4200 ? "backoff" : u.code < 4300 ? "retry" : "refused";
32028
32049
  },
32029
- getCloseError: function(c) {
32030
- return c.code !== 1e3 && c.code !== 1001 ? {
32050
+ getCloseError: function(u) {
32051
+ return u.code !== 1e3 && u.code !== 1001 ? {
32031
32052
  type: "PusherError",
32032
32053
  data: {
32033
- code: c.code,
32034
- message: c.reason || c.message
32054
+ code: u.code,
32055
+ message: u.reason || u.message
32035
32056
  }
32036
32057
  } : null;
32037
32058
  }
32038
32059
  };
32039
32060
  var yn = Rt;
32040
32061
  class qo extends Je {
32041
- constructor(r, u) {
32042
- super(), this.id = r, this.transport = u, this.activityTimeout = u.activityTimeout, this.bindListeners();
32062
+ constructor(r, c) {
32063
+ super(), this.id = r, this.transport = c, this.activityTimeout = c.activityTimeout, this.bindListeners();
32043
32064
  }
32044
32065
  handlesActivityChecks() {
32045
32066
  return this.transport.handlesActivityChecks();
@@ -32047,8 +32068,8 @@ var yo = { exports: {} };
32047
32068
  send(r) {
32048
32069
  return this.transport.send(r);
32049
32070
  }
32050
- send_event(r, u, b) {
32051
- var S = { event: r, data: u };
32071
+ send_event(r, c, b) {
32072
+ var S = { event: r, data: c };
32052
32073
  return b && (S.channel = b), oe.debug("Event sent", S), this.send(yn.encodeMessage(S));
32053
32074
  }
32054
32075
  ping() {
@@ -32095,9 +32116,9 @@ var yo = { exports: {} };
32095
32116
  this.emit("error", b);
32096
32117
  },
32097
32118
  closed: (b) => {
32098
- u(), b && b.code && this.handleCloseEvent(b), this.transport = null, this.emit("closed");
32119
+ c(), b && b.code && this.handleCloseEvent(b), this.transport = null, this.emit("closed");
32099
32120
  }
32100
- }, u = () => {
32121
+ }, c = () => {
32101
32122
  Ce(r, (b, S) => {
32102
32123
  this.transport.unbind(S, b);
32103
32124
  });
@@ -32107,13 +32128,13 @@ var yo = { exports: {} };
32107
32128
  });
32108
32129
  }
32109
32130
  handleCloseEvent(r) {
32110
- var u = yn.getCloseAction(r), b = yn.getCloseError(r);
32111
- b && this.emit("error", b), u && this.emit(u, { action: u, error: b });
32131
+ var c = yn.getCloseAction(r), b = yn.getCloseError(r);
32132
+ b && this.emit("error", b), c && this.emit(c, { action: c, error: b });
32112
32133
  }
32113
32134
  }
32114
32135
  class zo {
32115
- constructor(r, u) {
32116
- this.transport = r, this.callback = u, this.bindListeners();
32136
+ constructor(r, c) {
32137
+ this.transport = r, this.callback = c, this.bindListeners();
32117
32138
  }
32118
32139
  close() {
32119
32140
  this.unbindListeners(), this.transport.close();
@@ -32121,68 +32142,68 @@ var yo = { exports: {} };
32121
32142
  bindListeners() {
32122
32143
  this.onMessage = (r) => {
32123
32144
  this.unbindListeners();
32124
- var u;
32145
+ var c;
32125
32146
  try {
32126
- u = yn.processHandshake(r);
32147
+ c = yn.processHandshake(r);
32127
32148
  } catch (b) {
32128
32149
  this.finish("error", { error: b }), this.transport.close();
32129
32150
  return;
32130
32151
  }
32131
- u.action === "connected" ? this.finish("connected", {
32132
- connection: new qo(u.id, this.transport),
32133
- activityTimeout: u.activityTimeout
32134
- }) : (this.finish(u.action, { error: u.error }), this.transport.close());
32152
+ c.action === "connected" ? this.finish("connected", {
32153
+ connection: new qo(c.id, this.transport),
32154
+ activityTimeout: c.activityTimeout
32155
+ }) : (this.finish(c.action, { error: c.error }), this.transport.close());
32135
32156
  }, this.onClosed = (r) => {
32136
32157
  this.unbindListeners();
32137
- var u = yn.getCloseAction(r) || "backoff", b = yn.getCloseError(r);
32138
- this.finish(u, { error: b });
32158
+ var c = yn.getCloseAction(r) || "backoff", b = yn.getCloseError(r);
32159
+ this.finish(c, { error: b });
32139
32160
  }, this.transport.bind("message", this.onMessage), this.transport.bind("closed", this.onClosed);
32140
32161
  }
32141
32162
  unbindListeners() {
32142
32163
  this.transport.unbind("message", this.onMessage), this.transport.unbind("closed", this.onClosed);
32143
32164
  }
32144
- finish(r, u) {
32145
- this.callback(pe({ transport: this.transport, action: r }, u));
32165
+ finish(r, c) {
32166
+ this.callback(pe({ transport: this.transport, action: r }, c));
32146
32167
  }
32147
32168
  }
32148
32169
  class Wo {
32149
- constructor(r, u) {
32150
- this.timeline = r, this.options = u || {};
32170
+ constructor(r, c) {
32171
+ this.timeline = r, this.options = c || {};
32151
32172
  }
32152
- send(r, u) {
32153
- this.timeline.isEmpty() || this.timeline.send(O.TimelineTransport.getAgent(this, r), u);
32173
+ send(r, c) {
32174
+ this.timeline.isEmpty() || this.timeline.send(O.TimelineTransport.getAgent(this, r), c);
32154
32175
  }
32155
32176
  }
32156
32177
  class Wi extends Je {
32157
- constructor(r, u) {
32178
+ constructor(r, c) {
32158
32179
  super(function(b, S) {
32159
32180
  oe.debug("No callbacks on " + r + " for " + b);
32160
- }), this.name = r, this.pusher = u, this.subscribed = !1, this.subscriptionPending = !1, this.subscriptionCancelled = !1;
32181
+ }), this.name = r, this.pusher = c, this.subscribed = !1, this.subscriptionPending = !1, this.subscriptionCancelled = !1;
32161
32182
  }
32162
- authorize(r, u) {
32163
- return u(null, { auth: "" });
32183
+ authorize(r, c) {
32184
+ return c(null, { auth: "" });
32164
32185
  }
32165
- trigger(r, u) {
32186
+ trigger(r, c) {
32166
32187
  if (r.indexOf("client-") !== 0)
32167
32188
  throw new w("Event '" + r + "' does not start with 'client-'");
32168
32189
  if (!this.subscribed) {
32169
32190
  var b = k.buildLogSuffix("triggeringClientEvents");
32170
32191
  oe.warn(`Client event triggered before channel 'subscription_succeeded' event . ${b}`);
32171
32192
  }
32172
- return this.pusher.send_event(r, u, this.name);
32193
+ return this.pusher.send_event(r, c, this.name);
32173
32194
  }
32174
32195
  disconnect() {
32175
32196
  this.subscribed = !1, this.subscriptionPending = !1;
32176
32197
  }
32177
32198
  handleEvent(r) {
32178
- var u = r.event, b = r.data;
32179
- if (u === "pusher_internal:subscription_succeeded")
32199
+ var c = r.event, b = r.data;
32200
+ if (c === "pusher_internal:subscription_succeeded")
32180
32201
  this.handleSubscriptionSucceededEvent(r);
32181
- else if (u === "pusher_internal:subscription_count")
32202
+ else if (c === "pusher_internal:subscription_count")
32182
32203
  this.handleSubscriptionCountEvent(r);
32183
- else if (u.indexOf("pusher_internal:") !== 0) {
32204
+ else if (c.indexOf("pusher_internal:") !== 0) {
32184
32205
  var S = {};
32185
- this.emit(u, b, S);
32206
+ this.emit(c, b, S);
32186
32207
  }
32187
32208
  }
32188
32209
  handleSubscriptionSucceededEvent(r) {
@@ -32192,13 +32213,13 @@ var yo = { exports: {} };
32192
32213
  r.data.subscription_count && (this.subscriptionCount = r.data.subscription_count), this.emit("pusher:subscription_count", r.data);
32193
32214
  }
32194
32215
  subscribe() {
32195
- this.subscribed || (this.subscriptionPending = !0, this.subscriptionCancelled = !1, this.authorize(this.pusher.connection.socket_id, (r, u) => {
32216
+ this.subscribed || (this.subscriptionPending = !0, this.subscriptionCancelled = !1, this.authorize(this.pusher.connection.socket_id, (r, c) => {
32196
32217
  r ? (this.subscriptionPending = !1, oe.error(r.toString()), this.emit("pusher:subscription_error", Object.assign({}, {
32197
32218
  type: "AuthError",
32198
32219
  error: r.message
32199
32220
  }, r instanceof U ? { status: r.status } : {}))) : this.pusher.send_event("pusher:subscribe", {
32200
- auth: u.auth,
32201
- channel_data: u.channel_data,
32221
+ auth: c.auth,
32222
+ channel_data: c.channel_data,
32202
32223
  channel: this.name
32203
32224
  });
32204
32225
  }));
@@ -32216,11 +32237,11 @@ var yo = { exports: {} };
32216
32237
  }
32217
32238
  }
32218
32239
  class Zi extends Wi {
32219
- authorize(r, u) {
32240
+ authorize(r, c) {
32220
32241
  return this.pusher.config.channelAuthorizer({
32221
32242
  channelName: this.name,
32222
32243
  socketId: r
32223
- }, u);
32244
+ }, c);
32224
32245
  }
32225
32246
  }
32226
32247
  class Zo {
@@ -32234,7 +32255,7 @@ var yo = { exports: {} };
32234
32255
  } : null;
32235
32256
  }
32236
32257
  each(r) {
32237
- Ce(this.members, (u, b) => {
32258
+ Ce(this.members, (c, b) => {
32238
32259
  r(this.get(b));
32239
32260
  });
32240
32261
  }
@@ -32248,45 +32269,45 @@ var yo = { exports: {} };
32248
32269
  return this.get(r.user_id) === null && this.count++, this.members[r.user_id] = r.user_info, this.get(r.user_id);
32249
32270
  }
32250
32271
  removeMember(r) {
32251
- var u = this.get(r.user_id);
32252
- return u && (delete this.members[r.user_id], this.count--), u;
32272
+ var c = this.get(r.user_id);
32273
+ return c && (delete this.members[r.user_id], this.count--), c;
32253
32274
  }
32254
32275
  reset() {
32255
32276
  this.members = {}, this.count = 0, this.myID = null, this.me = null;
32256
32277
  }
32257
32278
  }
32258
- var Jo = function(c, r, u, b) {
32279
+ var Jo = function(u, r, c, b) {
32259
32280
  function S(x) {
32260
- return x instanceof u ? x : new u(function(E) {
32281
+ return x instanceof c ? x : new c(function(E) {
32261
32282
  E(x);
32262
32283
  });
32263
32284
  }
32264
- return new (u || (u = Promise))(function(x, E) {
32285
+ return new (c || (c = Promise))(function(x, E) {
32265
32286
  function D(Q) {
32266
32287
  try {
32267
32288
  Z(b.next(Q));
32268
- } catch (ce) {
32269
- E(ce);
32289
+ } catch (ue) {
32290
+ E(ue);
32270
32291
  }
32271
32292
  }
32272
32293
  function B(Q) {
32273
32294
  try {
32274
32295
  Z(b.throw(Q));
32275
- } catch (ce) {
32276
- E(ce);
32296
+ } catch (ue) {
32297
+ E(ue);
32277
32298
  }
32278
32299
  }
32279
32300
  function Z(Q) {
32280
32301
  Q.done ? x(Q.value) : S(Q.value).then(D, B);
32281
32302
  }
32282
- Z((b = b.apply(c, r || [])).next());
32303
+ Z((b = b.apply(u, r || [])).next());
32283
32304
  });
32284
32305
  };
32285
32306
  class $o extends Zi {
32286
- constructor(r, u) {
32287
- super(r, u), this.members = new Zo();
32307
+ constructor(r, c) {
32308
+ super(r, c), this.members = new Zo();
32288
32309
  }
32289
- authorize(r, u) {
32310
+ authorize(r, c) {
32290
32311
  super.authorize(r, (b, S) => Jo(this, void 0, void 0, function* () {
32291
32312
  if (!b)
32292
32313
  if (S = S, S.channel_data != null) {
@@ -32296,24 +32317,24 @@ var yo = { exports: {} };
32296
32317
  this.members.setMyID(this.pusher.user.user_data.id);
32297
32318
  else {
32298
32319
  let E = k.buildLogSuffix("authorizationEndpoint");
32299
- oe.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${E}, or the user should be signed in.`), u("Invalid auth response");
32320
+ oe.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${E}, or the user should be signed in.`), c("Invalid auth response");
32300
32321
  return;
32301
32322
  }
32302
- u(b, S);
32323
+ c(b, S);
32303
32324
  }));
32304
32325
  }
32305
32326
  handleEvent(r) {
32306
- var u = r.event;
32307
- if (u.indexOf("pusher_internal:") === 0)
32327
+ var c = r.event;
32328
+ if (c.indexOf("pusher_internal:") === 0)
32308
32329
  this.handleInternalEvent(r);
32309
32330
  else {
32310
32331
  var b = r.data, S = {};
32311
- r.user_id && (S.user_id = r.user_id), this.emit(u, b, S);
32332
+ r.user_id && (S.user_id = r.user_id), this.emit(c, b, S);
32312
32333
  }
32313
32334
  }
32314
32335
  handleInternalEvent(r) {
32315
- var u = r.event, b = r.data;
32316
- switch (u) {
32336
+ var c = r.event, b = r.data;
32337
+ switch (c) {
32317
32338
  case "pusher_internal:subscription_succeeded":
32318
32339
  this.handleSubscriptionSucceededEvent(r);
32319
32340
  break;
@@ -32339,49 +32360,49 @@ var yo = { exports: {} };
32339
32360
  }
32340
32361
  var Yo = s(1), Ji = s(0);
32341
32362
  class Qo extends Zi {
32342
- constructor(r, u, b) {
32343
- super(r, u), this.key = null, this.nacl = b;
32363
+ constructor(r, c, b) {
32364
+ super(r, c), this.key = null, this.nacl = b;
32344
32365
  }
32345
- authorize(r, u) {
32366
+ authorize(r, c) {
32346
32367
  super.authorize(r, (b, S) => {
32347
32368
  if (b) {
32348
- u(b, S);
32369
+ c(b, S);
32349
32370
  return;
32350
32371
  }
32351
32372
  let x = S.shared_secret;
32352
32373
  if (!x) {
32353
- u(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`), null);
32374
+ c(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`), null);
32354
32375
  return;
32355
32376
  }
32356
- this.key = Object(Ji.decode)(x), delete S.shared_secret, u(null, S);
32377
+ this.key = Object(Ji.decode)(x), delete S.shared_secret, c(null, S);
32357
32378
  });
32358
32379
  }
32359
- trigger(r, u) {
32380
+ trigger(r, c) {
32360
32381
  throw new I("Client events are not currently supported for encrypted channels");
32361
32382
  }
32362
32383
  handleEvent(r) {
32363
- var u = r.event, b = r.data;
32364
- if (u.indexOf("pusher_internal:") === 0 || u.indexOf("pusher:") === 0) {
32384
+ var c = r.event, b = r.data;
32385
+ if (c.indexOf("pusher_internal:") === 0 || c.indexOf("pusher:") === 0) {
32365
32386
  super.handleEvent(r);
32366
32387
  return;
32367
32388
  }
32368
- this.handleEncryptedEvent(u, b);
32389
+ this.handleEncryptedEvent(c, b);
32369
32390
  }
32370
- handleEncryptedEvent(r, u) {
32391
+ handleEncryptedEvent(r, c) {
32371
32392
  if (!this.key) {
32372
32393
  oe.debug("Received encrypted event before key has been retrieved from the authEndpoint");
32373
32394
  return;
32374
32395
  }
32375
- if (!u.ciphertext || !u.nonce) {
32376
- oe.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: " + u);
32396
+ if (!c.ciphertext || !c.nonce) {
32397
+ oe.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: " + c);
32377
32398
  return;
32378
32399
  }
32379
- let b = Object(Ji.decode)(u.ciphertext);
32400
+ let b = Object(Ji.decode)(c.ciphertext);
32380
32401
  if (b.length < this.nacl.secretbox.overheadLength) {
32381
32402
  oe.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${b.length}`);
32382
32403
  return;
32383
32404
  }
32384
- let S = Object(Ji.decode)(u.nonce);
32405
+ let S = Object(Ji.decode)(c.nonce);
32385
32406
  if (S.length < this.nacl.secretbox.nonceLength) {
32386
32407
  oe.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${S.length}`);
32387
32408
  return;
@@ -32404,17 +32425,17 @@ var yo = { exports: {} };
32404
32425
  this.emit(r, this.getDataToEmit(x));
32405
32426
  }
32406
32427
  getDataToEmit(r) {
32407
- let u = Object(Yo.decode)(r);
32428
+ let c = Object(Yo.decode)(r);
32408
32429
  try {
32409
- return JSON.parse(u);
32430
+ return JSON.parse(c);
32410
32431
  } catch {
32411
- return u;
32432
+ return c;
32412
32433
  }
32413
32434
  }
32414
32435
  }
32415
32436
  class Xo extends Je {
32416
- constructor(r, u) {
32417
- super(), this.state = "initialized", this.connection = null, this.key = r, this.options = u, 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);
32437
+ constructor(r, c) {
32438
+ super(), this.state = "initialized", this.connection = null, this.key = r, this.options = c, 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);
32418
32439
  var b = O.getNetwork();
32419
32440
  b.bind("online", () => {
32420
32441
  this.timeline.info({ netinfo: "online" }), (this.state === "connecting" || this.state === "unavailable") && this.retryIn(0);
@@ -32434,8 +32455,8 @@ var yo = { exports: {} };
32434
32455
  send(r) {
32435
32456
  return this.connection ? this.connection.send(r) : !1;
32436
32457
  }
32437
- send_event(r, u, b) {
32438
- return this.connection ? this.connection.send_event(r, u, b) : !1;
32458
+ send_event(r, c, b) {
32459
+ return this.connection ? this.connection.send_event(r, c, b) : !1;
32439
32460
  }
32440
32461
  disconnect() {
32441
32462
  this.disconnectInternally(), this.updateState("disconnected");
@@ -32444,8 +32465,8 @@ var yo = { exports: {} };
32444
32465
  return this.usingTLS;
32445
32466
  }
32446
32467
  startConnecting() {
32447
- var r = (u, b) => {
32448
- u ? this.runner = this.strategy.connect(0, r) : b.action === "error" ? (this.emit("error", {
32468
+ var r = (c, b) => {
32469
+ c ? this.runner = this.strategy.connect(0, r) : b.action === "error" ? (this.emit("error", {
32449
32470
  type: "HandshakeError",
32450
32471
  error: b.error
32451
32472
  }), this.timeline.error({ handshakeError: b.error })) : (this.abortConnecting(), this.handshakeCallbacks[b.action](b));
@@ -32499,8 +32520,8 @@ var yo = { exports: {} };
32499
32520
  }
32500
32521
  buildConnectionCallbacks(r) {
32501
32522
  return pe({}, r, {
32502
- message: (u) => {
32503
- this.resetActivityCheck(), this.emit("message", u);
32523
+ message: (c) => {
32524
+ this.resetActivityCheck(), this.emit("message", c);
32504
32525
  },
32505
32526
  ping: () => {
32506
32527
  this.send_event("pusher:pong", {});
@@ -32508,8 +32529,8 @@ var yo = { exports: {} };
32508
32529
  activity: () => {
32509
32530
  this.resetActivityCheck();
32510
32531
  },
32511
- error: (u) => {
32512
- this.emit("error", u);
32532
+ error: (c) => {
32533
+ this.emit("error", c);
32513
32534
  },
32514
32535
  closed: () => {
32515
32536
  this.abandonConnection(), this.shouldRetry() && this.retryIn(1e3);
@@ -32518,14 +32539,14 @@ var yo = { exports: {} };
32518
32539
  }
32519
32540
  buildHandshakeCallbacks(r) {
32520
32541
  return pe({}, r, {
32521
- connected: (u) => {
32522
- this.activityTimeout = Math.min(this.options.activityTimeout, u.activityTimeout, u.connection.activityTimeout || 1 / 0), this.clearUnavailableTimer(), this.setConnection(u.connection), this.socket_id = this.connection.id, this.updateState("connected", { socket_id: this.socket_id });
32542
+ connected: (c) => {
32543
+ this.activityTimeout = Math.min(this.options.activityTimeout, c.activityTimeout, c.connection.activityTimeout || 1 / 0), this.clearUnavailableTimer(), this.setConnection(c.connection), this.socket_id = this.connection.id, this.updateState("connected", { socket_id: this.socket_id });
32523
32544
  }
32524
32545
  });
32525
32546
  }
32526
32547
  buildErrorCallbacks() {
32527
- let r = (u) => (b) => {
32528
- b.error && this.emit("error", { type: "WebSocketError", error: b.error }), u(b);
32548
+ let r = (c) => (b) => {
32549
+ b.error && this.emit("error", { type: "WebSocketError", error: b.error }), c(b);
32529
32550
  };
32530
32551
  return {
32531
32552
  tls_only: r(() => {
@@ -32544,8 +32565,8 @@ var yo = { exports: {} };
32544
32565
  }
32545
32566
  setConnection(r) {
32546
32567
  this.connection = r;
32547
- for (var u in this.connectionCallbacks)
32548
- this.connection.bind(u, this.connectionCallbacks[u]);
32568
+ for (var c in this.connectionCallbacks)
32569
+ this.connection.bind(c, this.connectionCallbacks[c]);
32549
32570
  this.resetActivityCheck();
32550
32571
  }
32551
32572
  abandonConnection() {
@@ -32553,15 +32574,15 @@ var yo = { exports: {} };
32553
32574
  this.stopActivityCheck();
32554
32575
  for (var r in this.connectionCallbacks)
32555
32576
  this.connection.unbind(r, this.connectionCallbacks[r]);
32556
- var u = this.connection;
32557
- return this.connection = null, u;
32577
+ var c = this.connection;
32578
+ return this.connection = null, c;
32558
32579
  }
32559
32580
  }
32560
- updateState(r, u) {
32581
+ updateState(r, c) {
32561
32582
  var b = this.state;
32562
32583
  if (this.state = r, b !== r) {
32563
32584
  var S = r;
32564
- S === "connected" && (S += " with new socket ID " + u.socket_id), oe.debug("State changed", b + " -> " + S), this.timeline.info({ state: r, params: u }), this.emit("state_change", { previous: b, current: r }), this.emit(r, u);
32585
+ S === "connected" && (S += " with new socket ID " + c.socket_id), oe.debug("State changed", b + " -> " + S), this.timeline.info({ state: r, params: c }), this.emit("state_change", { previous: b, current: r }), this.emit(r, c);
32565
32586
  }
32566
32587
  }
32567
32588
  shouldRetry() {
@@ -32572,8 +32593,8 @@ var yo = { exports: {} };
32572
32593
  constructor() {
32573
32594
  this.channels = {};
32574
32595
  }
32575
- add(r, u) {
32576
- return this.channels[r] || (this.channels[r] = na(r, u)), this.channels[r];
32596
+ add(r, c) {
32597
+ return this.channels[r] || (this.channels[r] = na(r, c)), this.channels[r];
32577
32598
  }
32578
32599
  all() {
32579
32600
  return N(this.channels);
@@ -32582,8 +32603,8 @@ var yo = { exports: {} };
32582
32603
  return this.channels[r];
32583
32604
  }
32584
32605
  remove(r) {
32585
- var u = this.channels[r];
32586
- return delete this.channels[r], u;
32606
+ var c = this.channels[r];
32607
+ return delete this.channels[r], c;
32587
32608
  }
32588
32609
  disconnect() {
32589
32610
  Ce(this.channels, function(r) {
@@ -32591,49 +32612,49 @@ var yo = { exports: {} };
32591
32612
  });
32592
32613
  }
32593
32614
  }
32594
- function na(c, r) {
32595
- if (c.indexOf("private-encrypted-") === 0) {
32615
+ function na(u, r) {
32616
+ if (u.indexOf("private-encrypted-") === 0) {
32596
32617
  if (r.config.nacl)
32597
- return $e.createEncryptedChannel(c, r, r.config.nacl);
32598
- let u = "Tried to subscribe to a private-encrypted- channel but no nacl implementation available", b = k.buildLogSuffix("encryptedChannelSupport");
32599
- throw new I(`${u}. ${b}`);
32618
+ return $e.createEncryptedChannel(u, r, r.config.nacl);
32619
+ let c = "Tried to subscribe to a private-encrypted- channel but no nacl implementation available", b = k.buildLogSuffix("encryptedChannelSupport");
32620
+ throw new I(`${c}. ${b}`);
32600
32621
  } else {
32601
- if (c.indexOf("private-") === 0)
32602
- return $e.createPrivateChannel(c, r);
32603
- if (c.indexOf("presence-") === 0)
32604
- return $e.createPresenceChannel(c, r);
32605
- if (c.indexOf("#") === 0)
32606
- throw new M('Cannot create a channel with name "' + c + '".');
32607
- return $e.createChannel(c, r);
32622
+ if (u.indexOf("private-") === 0)
32623
+ return $e.createPrivateChannel(u, r);
32624
+ if (u.indexOf("presence-") === 0)
32625
+ return $e.createPresenceChannel(u, r);
32626
+ if (u.indexOf("#") === 0)
32627
+ throw new M('Cannot create a channel with name "' + u + '".');
32628
+ return $e.createChannel(u, r);
32608
32629
  }
32609
32630
  }
32610
32631
  var ia = {
32611
32632
  createChannels() {
32612
32633
  return new ea();
32613
32634
  },
32614
- createConnectionManager(c, r) {
32615
- return new Xo(c, r);
32635
+ createConnectionManager(u, r) {
32636
+ return new Xo(u, r);
32616
32637
  },
32617
- createChannel(c, r) {
32618
- return new Wi(c, r);
32638
+ createChannel(u, r) {
32639
+ return new Wi(u, r);
32619
32640
  },
32620
- createPrivateChannel(c, r) {
32621
- return new Zi(c, r);
32641
+ createPrivateChannel(u, r) {
32642
+ return new Zi(u, r);
32622
32643
  },
32623
- createPresenceChannel(c, r) {
32624
- return new $o(c, r);
32644
+ createPresenceChannel(u, r) {
32645
+ return new $o(u, r);
32625
32646
  },
32626
- createEncryptedChannel(c, r, u) {
32627
- return new Qo(c, r, u);
32647
+ createEncryptedChannel(u, r, c) {
32648
+ return new Qo(u, r, c);
32628
32649
  },
32629
- createTimelineSender(c, r) {
32630
- return new Wo(c, r);
32650
+ createTimelineSender(u, r) {
32651
+ return new Wo(u, r);
32631
32652
  },
32632
- createHandshake(c, r) {
32633
- return new zo(c, r);
32653
+ createHandshake(u, r) {
32654
+ return new zo(u, r);
32634
32655
  },
32635
- createAssistantToTheTransportManager(c, r, u) {
32636
- return new Go(c, r, u);
32656
+ createAssistantToTheTransportManager(u, r, c) {
32657
+ return new Go(u, r, c);
32637
32658
  }
32638
32659
  }, $e = ia;
32639
32660
  class Ot {
@@ -32654,15 +32675,15 @@ var yo = { exports: {} };
32654
32675
  }
32655
32676
  }
32656
32677
  class Cn {
32657
- constructor(r, u) {
32658
- this.strategies = r, this.loop = !!u.loop, this.failFast = !!u.failFast, this.timeout = u.timeout, this.timeoutLimit = u.timeoutLimit;
32678
+ constructor(r, c) {
32679
+ this.strategies = r, this.loop = !!c.loop, this.failFast = !!c.failFast, this.timeout = c.timeout, this.timeoutLimit = c.timeoutLimit;
32659
32680
  }
32660
32681
  isSupported() {
32661
32682
  return jn(this.strategies, ae.method("isSupported"));
32662
32683
  }
32663
- connect(r, u) {
32684
+ connect(r, c) {
32664
32685
  var b = this.strategies, S = 0, x = this.timeout, E = null, D = (B, Z) => {
32665
- Z ? u(null, Z) : (S = S + 1, this.loop && (S = S % b.length), S < b.length ? (x && (x = x * 2, this.timeoutLimit && (x = Math.min(x, this.timeoutLimit))), E = this.tryStrategy(b[S], r, { timeout: x, failFast: this.failFast }, D)) : u(!0));
32686
+ Z ? c(null, Z) : (S = S + 1, this.loop && (S = S % b.length), S < b.length ? (x && (x = x * 2, this.timeoutLimit && (x = Math.min(x, this.timeoutLimit))), E = this.tryStrategy(b[S], r, { timeout: x, failFast: this.failFast }, D)) : c(!0));
32666
32687
  };
32667
32688
  return E = this.tryStrategy(b[S], r, { timeout: x, failFast: this.failFast }, D), {
32668
32689
  abort: function() {
@@ -32673,11 +32694,11 @@ var yo = { exports: {} };
32673
32694
  }
32674
32695
  };
32675
32696
  }
32676
- tryStrategy(r, u, b, S) {
32697
+ tryStrategy(r, c, b, S) {
32677
32698
  var x = null, E = null;
32678
32699
  return b.timeout > 0 && (x = new Te(b.timeout, function() {
32679
32700
  E.abort(), S(!0);
32680
- })), E = r.connect(u, function(D, B) {
32701
+ })), E = r.connect(c, function(D, B) {
32681
32702
  D && x && x.isRunning() && !b.failFast || (x && x.ensureAborted(), S(D, B));
32682
32703
  }), {
32683
32704
  abort: function() {
@@ -32696,23 +32717,23 @@ var yo = { exports: {} };
32696
32717
  isSupported() {
32697
32718
  return jn(this.strategies, ae.method("isSupported"));
32698
32719
  }
32699
- connect(r, u) {
32720
+ connect(r, c) {
32700
32721
  return ta(this.strategies, r, function(b, S) {
32701
32722
  return function(x, E) {
32702
32723
  if (S[b].error = x, x) {
32703
- sa(S) && u(!0);
32724
+ sa(S) && c(!0);
32704
32725
  return;
32705
32726
  }
32706
32727
  de(S, function(D) {
32707
32728
  D.forceMinPriority(E.transport.priority);
32708
- }), u(null, E);
32729
+ }), c(null, E);
32709
32730
  };
32710
32731
  });
32711
32732
  }
32712
32733
  }
32713
- function ta(c, r, u) {
32714
- var b = Y(c, function(S, x, E, D) {
32715
- return S.connect(r, u(x, D));
32734
+ function ta(u, r, c) {
32735
+ var b = Y(u, function(S, x, E, D) {
32736
+ return S.connect(r, c(x, D));
32716
32737
  });
32717
32738
  return {
32718
32739
  abort: function() {
@@ -32725,22 +32746,22 @@ var yo = { exports: {} };
32725
32746
  }
32726
32747
  };
32727
32748
  }
32728
- function sa(c) {
32729
- return ai(c, function(r) {
32749
+ function sa(u) {
32750
+ return ai(u, function(r) {
32730
32751
  return !!r.error;
32731
32752
  });
32732
32753
  }
32733
- function oa(c) {
32734
- !c.error && !c.aborted && (c.abort(), c.aborted = !0);
32754
+ function oa(u) {
32755
+ !u.error && !u.aborted && (u.abort(), u.aborted = !0);
32735
32756
  }
32736
32757
  class aa {
32737
- constructor(r, u, b) {
32738
- this.strategy = r, this.transports = u, this.ttl = b.ttl || 1800 * 1e3, this.usingTLS = b.useTLS, this.timeline = b.timeline;
32758
+ constructor(r, c, b) {
32759
+ this.strategy = r, this.transports = c, this.ttl = b.ttl || 1800 * 1e3, this.usingTLS = b.useTLS, this.timeline = b.timeline;
32739
32760
  }
32740
32761
  isSupported() {
32741
32762
  return this.strategy.isSupported();
32742
32763
  }
32743
- connect(r, u) {
32764
+ connect(r, c) {
32744
32765
  var b = this.usingTLS, S = ra(b), x = S && S.cacheSkipCount ? S.cacheSkipCount : 0, E = [this.strategy];
32745
32766
  if (S && S.timestamp + this.ttl >= ae.now()) {
32746
32767
  var D = this.transports[S.transport];
@@ -32753,8 +32774,8 @@ var yo = { exports: {} };
32753
32774
  failFast: !0
32754
32775
  }))) : x++);
32755
32776
  }
32756
- var B = ae.now(), Z = E.pop().connect(r, function Q(ce, mi) {
32757
- ce ? (Ut(b), E.length > 0 ? (B = ae.now(), Z = E.pop().connect(r, Q)) : u(ce)) : (la(b, mi.transport.name, ae.now() - B, x), u(null, mi));
32777
+ var B = ae.now(), Z = E.pop().connect(r, function Q(ue, mi) {
32778
+ ue ? (Ut(b), E.length > 0 ? (B = ae.now(), Z = E.pop().connect(r, Q)) : c(ue)) : (la(b, mi.transport.name, ae.now() - B, x), c(null, mi));
32758
32779
  });
32759
32780
  return {
32760
32781
  abort: function() {
@@ -32766,52 +32787,52 @@ var yo = { exports: {} };
32766
32787
  };
32767
32788
  }
32768
32789
  }
32769
- function Yi(c) {
32770
- return "pusherTransport" + (c ? "TLS" : "NonTLS");
32790
+ function Yi(u) {
32791
+ return "pusherTransport" + (u ? "TLS" : "NonTLS");
32771
32792
  }
32772
- function ra(c) {
32793
+ function ra(u) {
32773
32794
  var r = O.getLocalStorage();
32774
32795
  if (r)
32775
32796
  try {
32776
- var u = r[Yi(c)];
32777
- if (u)
32778
- return JSON.parse(u);
32797
+ var c = r[Yi(u)];
32798
+ if (c)
32799
+ return JSON.parse(c);
32779
32800
  } catch {
32780
- Ut(c);
32801
+ Ut(u);
32781
32802
  }
32782
32803
  return null;
32783
32804
  }
32784
- function la(c, r, u, b) {
32805
+ function la(u, r, c, b) {
32785
32806
  var S = O.getLocalStorage();
32786
32807
  if (S)
32787
32808
  try {
32788
- S[Yi(c)] = gn({
32809
+ S[Yi(u)] = gn({
32789
32810
  timestamp: ae.now(),
32790
32811
  transport: r,
32791
- latency: u,
32812
+ latency: c,
32792
32813
  cacheSkipCount: b
32793
32814
  });
32794
32815
  } catch {
32795
32816
  }
32796
32817
  }
32797
- function Ut(c) {
32818
+ function Ut(u) {
32798
32819
  var r = O.getLocalStorage();
32799
32820
  if (r)
32800
32821
  try {
32801
- delete r[Yi(c)];
32822
+ delete r[Yi(u)];
32802
32823
  } catch {
32803
32824
  }
32804
32825
  }
32805
- class ci {
32806
- constructor(r, { delay: u }) {
32807
- this.strategy = r, this.options = { delay: u };
32826
+ class ui {
32827
+ constructor(r, { delay: c }) {
32828
+ this.strategy = r, this.options = { delay: c };
32808
32829
  }
32809
32830
  isSupported() {
32810
32831
  return this.strategy.isSupported();
32811
32832
  }
32812
- connect(r, u) {
32833
+ connect(r, c) {
32813
32834
  var b = this.strategy, S, x = new Te(this.options.delay, function() {
32814
- S = b.connect(r, u);
32835
+ S = b.connect(r, c);
32815
32836
  });
32816
32837
  return {
32817
32838
  abort: function() {
@@ -32824,16 +32845,16 @@ var yo = { exports: {} };
32824
32845
  }
32825
32846
  }
32826
32847
  class Gn {
32827
- constructor(r, u, b) {
32828
- this.test = r, this.trueBranch = u, this.falseBranch = b;
32848
+ constructor(r, c, b) {
32849
+ this.test = r, this.trueBranch = c, this.falseBranch = b;
32829
32850
  }
32830
32851
  isSupported() {
32831
32852
  var r = this.test() ? this.trueBranch : this.falseBranch;
32832
32853
  return r.isSupported();
32833
32854
  }
32834
- connect(r, u) {
32855
+ connect(r, c) {
32835
32856
  var b = this.test() ? this.trueBranch : this.falseBranch;
32836
- return b.connect(r, u);
32857
+ return b.connect(r, c);
32837
32858
  }
32838
32859
  }
32839
32860
  class da {
@@ -32843,95 +32864,95 @@ var yo = { exports: {} };
32843
32864
  isSupported() {
32844
32865
  return this.strategy.isSupported();
32845
32866
  }
32846
- connect(r, u) {
32867
+ connect(r, c) {
32847
32868
  var b = this.strategy.connect(r, function(S, x) {
32848
- x && b.abort(), u(S, x);
32869
+ x && b.abort(), c(S, x);
32849
32870
  });
32850
32871
  return b;
32851
32872
  }
32852
32873
  }
32853
- function qn(c) {
32874
+ function qn(u) {
32854
32875
  return function() {
32855
- return c.isSupported();
32876
+ return u.isSupported();
32856
32877
  };
32857
32878
  }
32858
- var ua = function(c, r, u) {
32879
+ var ca = function(u, r, c) {
32859
32880
  var b = {};
32860
- function S($t, dr, ur, cr, hr) {
32861
- var Yt = u(c, $t, dr, ur, cr, hr);
32881
+ function S($t, dr, cr, ur, hr) {
32882
+ var Yt = c(u, $t, dr, cr, ur, hr);
32862
32883
  return b[$t] = Yt, Yt;
32863
32884
  }
32864
32885
  var x = Object.assign({}, r, {
32865
- hostNonTLS: c.wsHost + ":" + c.wsPort,
32866
- hostTLS: c.wsHost + ":" + c.wssPort,
32867
- httpPath: c.wsPath
32886
+ hostNonTLS: u.wsHost + ":" + u.wsPort,
32887
+ hostTLS: u.wsHost + ":" + u.wssPort,
32888
+ httpPath: u.wsPath
32868
32889
  }), E = Object.assign({}, x, {
32869
32890
  useTLS: !0
32870
32891
  }), D = Object.assign({}, r, {
32871
- hostNonTLS: c.httpHost + ":" + c.httpPort,
32872
- hostTLS: c.httpHost + ":" + c.httpsPort,
32873
- httpPath: c.httpPath
32892
+ hostNonTLS: u.httpHost + ":" + u.httpPort,
32893
+ hostTLS: u.httpHost + ":" + u.httpsPort,
32894
+ httpPath: u.httpPath
32874
32895
  }), B = {
32875
32896
  loop: !0,
32876
32897
  timeout: 15e3,
32877
32898
  timeoutLimit: 6e4
32878
32899
  }, Z = new Ot({
32879
32900
  minPingDelay: 1e4,
32880
- maxPingDelay: c.activityTimeout
32901
+ maxPingDelay: u.activityTimeout
32881
32902
  }), Q = new Ot({
32882
32903
  lives: 2,
32883
32904
  minPingDelay: 1e4,
32884
- maxPingDelay: c.activityTimeout
32885
- }), ce = S("ws", "ws", 3, x, Z), mi = S("wss", "ws", 3, E, Z), sr = S("sockjs", "sockjs", 1, D), Gt = S("xhr_streaming", "xhr_streaming", 1, D, Q), or = S("xdr_streaming", "xdr_streaming", 1, D, Q), qt = S("xhr_polling", "xhr_polling", 1, D), ar = S("xdr_polling", "xdr_polling", 1, D), zt = new Cn([ce], B), rr = new Cn([mi], B), lr = new Cn([sr], B), Wt = new Cn([
32905
+ maxPingDelay: u.activityTimeout
32906
+ }), ue = S("ws", "ws", 3, x, Z), mi = S("wss", "ws", 3, E, Z), sr = S("sockjs", "sockjs", 1, D), Gt = S("xhr_streaming", "xhr_streaming", 1, D, Q), or = S("xdr_streaming", "xdr_streaming", 1, D, Q), qt = S("xhr_polling", "xhr_polling", 1, D), ar = S("xdr_polling", "xdr_polling", 1, D), zt = new Cn([ue], B), rr = new Cn([mi], B), lr = new Cn([sr], B), Wt = new Cn([
32886
32907
  new Gn(qn(Gt), Gt, or)
32887
32908
  ], B), Zt = new Cn([
32888
32909
  new Gn(qn(qt), qt, ar)
32889
32910
  ], B), Jt = new Cn([
32890
32911
  new Gn(qn(Wt), new $i([
32891
32912
  Wt,
32892
- new ci(Zt, { delay: 4e3 })
32913
+ new ui(Zt, { delay: 4e3 })
32893
32914
  ]), Zt)
32894
32915
  ], B), nt = new Gn(qn(Jt), Jt, lr), it;
32895
32916
  return r.useTLS ? it = new $i([
32896
32917
  zt,
32897
- new ci(nt, { delay: 2e3 })
32918
+ new ui(nt, { delay: 2e3 })
32898
32919
  ]) : it = new $i([
32899
32920
  zt,
32900
- new ci(rr, { delay: 2e3 }),
32901
- new ci(nt, { delay: 5e3 })
32902
- ]), new aa(new da(new Gn(qn(ce), it, nt)), b, {
32921
+ new ui(rr, { delay: 2e3 }),
32922
+ new ui(nt, { delay: 5e3 })
32923
+ ]), new aa(new da(new Gn(qn(ue), it, nt)), b, {
32903
32924
  ttl: 18e5,
32904
32925
  timeline: r.timeline,
32905
32926
  useTLS: r.useTLS
32906
32927
  });
32907
- }, ca = ua, ha = function() {
32908
- var c = this;
32909
- c.timeline.info(c.buildTimelineMessage({
32910
- transport: c.name + (c.options.useTLS ? "s" : "")
32911
- })), c.hooks.isInitialized() ? c.changeState("initialized") : c.hooks.file ? (c.changeState("initializing"), g.load(c.hooks.file, { useTLS: c.options.useTLS }, function(r, u) {
32912
- c.hooks.isInitialized() ? (c.changeState("initialized"), u(!0)) : (r && c.onError(r), c.onClose(), u(!1));
32913
- })) : c.onClose();
32928
+ }, ua = ca, ha = function() {
32929
+ var u = this;
32930
+ u.timeline.info(u.buildTimelineMessage({
32931
+ transport: u.name + (u.options.useTLS ? "s" : "")
32932
+ })), u.hooks.isInitialized() ? u.changeState("initialized") : u.hooks.file ? (u.changeState("initializing"), g.load(u.hooks.file, { useTLS: u.options.useTLS }, function(r, c) {
32933
+ u.hooks.isInitialized() ? (u.changeState("initialized"), c(!0)) : (r && u.onError(r), u.onClose(), c(!1));
32934
+ })) : u.onClose();
32914
32935
  }, ma = {
32915
- getRequest: function(c) {
32936
+ getRequest: function(u) {
32916
32937
  var r = new window.XDomainRequest();
32917
32938
  return r.ontimeout = function() {
32918
- c.emit("error", new A()), c.close();
32919
- }, r.onerror = function(u) {
32920
- c.emit("error", u), c.close();
32939
+ u.emit("error", new A()), u.close();
32940
+ }, r.onerror = function(c) {
32941
+ u.emit("error", c), u.close();
32921
32942
  }, r.onprogress = function() {
32922
- r.responseText && r.responseText.length > 0 && c.onChunk(200, r.responseText);
32943
+ r.responseText && r.responseText.length > 0 && u.onChunk(200, r.responseText);
32923
32944
  }, r.onload = function() {
32924
- r.responseText && r.responseText.length > 0 && c.onChunk(200, r.responseText), c.emit("finished", 200), c.close();
32945
+ r.responseText && r.responseText.length > 0 && u.onChunk(200, r.responseText), u.emit("finished", 200), u.close();
32925
32946
  }, r;
32926
32947
  },
32927
- abortRequest: function(c) {
32928
- c.ontimeout = c.onerror = c.onprogress = c.onload = null, c.abort();
32948
+ abortRequest: function(u) {
32949
+ u.ontimeout = u.onerror = u.onprogress = u.onload = null, u.abort();
32929
32950
  }
32930
32951
  }, va = ma;
32931
32952
  const pa = 256 * 1024;
32932
32953
  class ba extends Je {
32933
- constructor(r, u, b) {
32934
- super(), this.hooks = r, this.method = u, this.url = b;
32954
+ constructor(r, c, b) {
32955
+ super(), this.hooks = r, this.method = c, this.url = b;
32935
32956
  }
32936
32957
  start(r) {
32937
32958
  this.position = 0, this.xhr = this.hooks.getRequest(this), this.unloader = () => {
@@ -32941,33 +32962,33 @@ var yo = { exports: {} };
32941
32962
  close() {
32942
32963
  this.unloader && (O.removeUnloadListener(this.unloader), this.unloader = null), this.xhr && (this.hooks.abortRequest(this.xhr), this.xhr = null);
32943
32964
  }
32944
- onChunk(r, u) {
32965
+ onChunk(r, c) {
32945
32966
  for (; ; ) {
32946
- var b = this.advanceBuffer(u);
32967
+ var b = this.advanceBuffer(c);
32947
32968
  if (b)
32948
32969
  this.emit("chunk", { status: r, data: b });
32949
32970
  else
32950
32971
  break;
32951
32972
  }
32952
- this.isBufferTooLong(u) && this.emit("buffer_too_long");
32973
+ this.isBufferTooLong(c) && this.emit("buffer_too_long");
32953
32974
  }
32954
32975
  advanceBuffer(r) {
32955
- var u = r.slice(this.position), b = u.indexOf(`
32976
+ var c = r.slice(this.position), b = c.indexOf(`
32956
32977
  `);
32957
- return b !== -1 ? (this.position += b + 1, u.slice(0, b)) : null;
32978
+ return b !== -1 ? (this.position += b + 1, c.slice(0, b)) : null;
32958
32979
  }
32959
32980
  isBufferTooLong(r) {
32960
32981
  return this.position === r.length && r.length > pa;
32961
32982
  }
32962
32983
  }
32963
32984
  var Qi;
32964
- (function(c) {
32965
- c[c.CONNECTING = 0] = "CONNECTING", c[c.OPEN = 1] = "OPEN", c[c.CLOSED = 3] = "CLOSED";
32985
+ (function(u) {
32986
+ u[u.CONNECTING = 0] = "CONNECTING", u[u.OPEN = 1] = "OPEN", u[u.CLOSED = 3] = "CLOSED";
32966
32987
  })(Qi || (Qi = {}));
32967
32988
  var Sn = Qi, fa = 1;
32968
32989
  class ga {
32969
- constructor(r, u) {
32970
- this.hooks = r, this.session = Kt(1e3) + "/" + ka(8), this.location = ya(u), this.readyState = Sn.CONNECTING, this.openStream();
32990
+ constructor(r, c) {
32991
+ this.hooks = r, this.session = Kt(1e3) + "/" + ka(8), this.location = ya(c), this.readyState = Sn.CONNECTING, this.openStream();
32971
32992
  }
32972
32993
  send(r) {
32973
32994
  return this.sendRaw(JSON.stringify([r]));
@@ -32975,8 +32996,8 @@ var yo = { exports: {} };
32975
32996
  ping() {
32976
32997
  this.hooks.sendHeartbeat(this);
32977
32998
  }
32978
- close(r, u) {
32979
- this.onClose(r, u, !0);
32999
+ close(r, c) {
33000
+ this.onClose(r, c, !0);
32980
33001
  }
32981
33002
  sendRaw(r) {
32982
33003
  if (this.readyState === Sn.OPEN)
@@ -32991,34 +33012,34 @@ var yo = { exports: {} };
32991
33012
  reconnect() {
32992
33013
  this.closeStream(), this.openStream();
32993
33014
  }
32994
- onClose(r, u, b) {
33015
+ onClose(r, c, b) {
32995
33016
  this.closeStream(), this.readyState = Sn.CLOSED, this.onclose && this.onclose({
32996
33017
  code: r,
32997
- reason: u,
33018
+ reason: c,
32998
33019
  wasClean: b
32999
33020
  });
33000
33021
  }
33001
33022
  onChunk(r) {
33002
33023
  if (r.status === 200) {
33003
33024
  this.readyState === Sn.OPEN && this.onActivity();
33004
- var u, b = r.data.slice(0, 1);
33025
+ var c, b = r.data.slice(0, 1);
33005
33026
  switch (b) {
33006
33027
  case "o":
33007
- u = JSON.parse(r.data.slice(1) || "{}"), this.onOpen(u);
33028
+ c = JSON.parse(r.data.slice(1) || "{}"), this.onOpen(c);
33008
33029
  break;
33009
33030
  case "a":
33010
- u = JSON.parse(r.data.slice(1) || "[]");
33011
- for (var S = 0; S < u.length; S++)
33012
- this.onEvent(u[S]);
33031
+ c = JSON.parse(r.data.slice(1) || "[]");
33032
+ for (var S = 0; S < c.length; S++)
33033
+ this.onEvent(c[S]);
33013
33034
  break;
33014
33035
  case "m":
33015
- u = JSON.parse(r.data.slice(1) || "null"), this.onEvent(u);
33036
+ c = JSON.parse(r.data.slice(1) || "null"), this.onEvent(c);
33016
33037
  break;
33017
33038
  case "h":
33018
33039
  this.hooks.onHeartbeat(this);
33019
33040
  break;
33020
33041
  case "c":
33021
- u = JSON.parse(r.data.slice(1) || "[]"), this.onClose(u[0], u[1], !0);
33042
+ c = JSON.parse(r.data.slice(1) || "[]"), this.onClose(c[0], c[1], !0);
33022
33043
  break;
33023
33044
  }
33024
33045
  }
@@ -33055,100 +33076,100 @@ var yo = { exports: {} };
33055
33076
  this.stream && (this.stream.unbind_all(), this.stream.close(), this.stream = null);
33056
33077
  }
33057
33078
  }
33058
- function ya(c) {
33059
- var r = /([^\?]*)\/*(\??.*)/.exec(c);
33079
+ function ya(u) {
33080
+ var r = /([^\?]*)\/*(\??.*)/.exec(u);
33060
33081
  return {
33061
33082
  base: r[1],
33062
33083
  queryString: r[2]
33063
33084
  };
33064
33085
  }
33065
- function Ca(c, r) {
33066
- return c.base + "/" + r + "/xhr_send";
33086
+ function Ca(u, r) {
33087
+ return u.base + "/" + r + "/xhr_send";
33067
33088
  }
33068
- function Vt(c) {
33069
- var r = c.indexOf("?") === -1 ? "?" : "&";
33070
- return c + r + "t=" + +/* @__PURE__ */ new Date() + "&n=" + fa++;
33089
+ function Vt(u) {
33090
+ var r = u.indexOf("?") === -1 ? "?" : "&";
33091
+ return u + r + "t=" + +/* @__PURE__ */ new Date() + "&n=" + fa++;
33071
33092
  }
33072
- function Sa(c, r) {
33073
- var u = /(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(c);
33074
- return u[1] + r + u[3];
33093
+ function Sa(u, r) {
33094
+ var c = /(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(u);
33095
+ return c[1] + r + c[3];
33075
33096
  }
33076
- function Kt(c) {
33077
- return O.randomInt(c);
33097
+ function Kt(u) {
33098
+ return O.randomInt(u);
33078
33099
  }
33079
- function ka(c) {
33080
- for (var r = [], u = 0; u < c; u++)
33100
+ function ka(u) {
33101
+ for (var r = [], c = 0; c < u; c++)
33081
33102
  r.push(Kt(32).toString(32));
33082
33103
  return r.join("");
33083
33104
  }
33084
33105
  var wa = ga, _a = {
33085
- getReceiveURL: function(c, r) {
33086
- return c.base + "/" + r + "/xhr_streaming" + c.queryString;
33106
+ getReceiveURL: function(u, r) {
33107
+ return u.base + "/" + r + "/xhr_streaming" + u.queryString;
33087
33108
  },
33088
- onHeartbeat: function(c) {
33089
- c.sendRaw("[]");
33109
+ onHeartbeat: function(u) {
33110
+ u.sendRaw("[]");
33090
33111
  },
33091
- sendHeartbeat: function(c) {
33092
- c.sendRaw("[]");
33112
+ sendHeartbeat: function(u) {
33113
+ u.sendRaw("[]");
33093
33114
  },
33094
- onFinished: function(c, r) {
33095
- c.onClose(1006, "Connection interrupted (" + r + ")", !1);
33115
+ onFinished: function(u, r) {
33116
+ u.onClose(1006, "Connection interrupted (" + r + ")", !1);
33096
33117
  }
33097
33118
  }, Ma = _a, Aa = {
33098
- getReceiveURL: function(c, r) {
33099
- return c.base + "/" + r + "/xhr" + c.queryString;
33119
+ getReceiveURL: function(u, r) {
33120
+ return u.base + "/" + r + "/xhr" + u.queryString;
33100
33121
  },
33101
33122
  onHeartbeat: function() {
33102
33123
  },
33103
- sendHeartbeat: function(c) {
33104
- c.sendRaw("[]");
33124
+ sendHeartbeat: function(u) {
33125
+ u.sendRaw("[]");
33105
33126
  },
33106
- onFinished: function(c, r) {
33107
- r === 200 ? c.reconnect() : c.onClose(1006, "Connection interrupted (" + r + ")", !1);
33127
+ onFinished: function(u, r) {
33128
+ r === 200 ? u.reconnect() : u.onClose(1006, "Connection interrupted (" + r + ")", !1);
33108
33129
  }
33109
33130
  }, La = Aa, xa = {
33110
- getRequest: function(c) {
33111
- var r = O.getXHRAPI(), u = new r();
33112
- return u.onreadystatechange = u.onprogress = function() {
33113
- switch (u.readyState) {
33131
+ getRequest: function(u) {
33132
+ var r = O.getXHRAPI(), c = new r();
33133
+ return c.onreadystatechange = c.onprogress = function() {
33134
+ switch (c.readyState) {
33114
33135
  case 3:
33115
- u.responseText && u.responseText.length > 0 && c.onChunk(u.status, u.responseText);
33136
+ c.responseText && c.responseText.length > 0 && u.onChunk(c.status, c.responseText);
33116
33137
  break;
33117
33138
  case 4:
33118
- u.responseText && u.responseText.length > 0 && c.onChunk(u.status, u.responseText), c.emit("finished", u.status), c.close();
33139
+ c.responseText && c.responseText.length > 0 && u.onChunk(c.status, c.responseText), u.emit("finished", c.status), u.close();
33119
33140
  break;
33120
33141
  }
33121
- }, u;
33142
+ }, c;
33122
33143
  },
33123
- abortRequest: function(c) {
33124
- c.onreadystatechange = null, c.abort();
33144
+ abortRequest: function(u) {
33145
+ u.onreadystatechange = null, u.abort();
33125
33146
  }
33126
33147
  }, Ta = xa, Ea = {
33127
- createStreamingSocket(c) {
33128
- return this.createSocket(Ma, c);
33148
+ createStreamingSocket(u) {
33149
+ return this.createSocket(Ma, u);
33129
33150
  },
33130
- createPollingSocket(c) {
33131
- return this.createSocket(La, c);
33151
+ createPollingSocket(u) {
33152
+ return this.createSocket(La, u);
33132
33153
  },
33133
- createSocket(c, r) {
33134
- return new wa(c, r);
33154
+ createSocket(u, r) {
33155
+ return new wa(u, r);
33135
33156
  },
33136
- createXHR(c, r) {
33137
- return this.createRequest(Ta, c, r);
33157
+ createXHR(u, r) {
33158
+ return this.createRequest(Ta, u, r);
33138
33159
  },
33139
- createRequest(c, r, u) {
33140
- return new ba(c, r, u);
33160
+ createRequest(u, r, c) {
33161
+ return new ba(u, r, c);
33141
33162
  }
33142
33163
  }, jt = Ea;
33143
- jt.createXDR = function(c, r) {
33144
- return this.createRequest(va, c, r);
33164
+ jt.createXDR = function(u, r) {
33165
+ return this.createRequest(va, u, r);
33145
33166
  };
33146
33167
  var Pa = jt, Ia = {
33147
33168
  nextAuthCallbackID: 1,
33148
33169
  auth_callbacks: {},
33149
33170
  ScriptReceivers: a,
33150
33171
  DependenciesReceivers: v,
33151
- getDefaultStrategy: ca,
33172
+ getDefaultStrategy: ua,
33152
33173
  Transports: Ko,
33153
33174
  transportConnectionInitializer: ha,
33154
33175
  HTTPFactory: Pa,
@@ -33159,10 +33180,10 @@ var yo = { exports: {} };
33159
33180
  getWebSocketAPI() {
33160
33181
  return window.WebSocket || window.MozWebSocket;
33161
33182
  },
33162
- setup(c) {
33163
- window.Pusher = c;
33183
+ setup(u) {
33184
+ window.Pusher = u;
33164
33185
  var r = () => {
33165
- this.onDocumentBody(c.ready);
33186
+ this.onDocumentBody(u.ready);
33166
33187
  };
33167
33188
  window.JSON ? r() : g.load("json2", {}, r);
33168
33189
  },
@@ -33175,16 +33196,16 @@ var yo = { exports: {} };
33175
33196
  getAuthorizers() {
33176
33197
  return { ajax: te, jsonp: wo };
33177
33198
  },
33178
- onDocumentBody(c) {
33179
- document.body ? c() : setTimeout(() => {
33180
- this.onDocumentBody(c);
33199
+ onDocumentBody(u) {
33200
+ document.body ? u() : setTimeout(() => {
33201
+ this.onDocumentBody(u);
33181
33202
  }, 0);
33182
33203
  },
33183
- createJSONPRequest(c, r) {
33184
- return new Mo(c, r);
33204
+ createJSONPRequest(u, r) {
33205
+ return new Mo(u, r);
33185
33206
  },
33186
- createScriptRequest(c) {
33187
- return new _o(c);
33207
+ createScriptRequest(u) {
33208
+ return new _o(u);
33188
33209
  },
33189
33210
  getLocalStorage() {
33190
33211
  try {
@@ -33197,8 +33218,8 @@ var yo = { exports: {} };
33197
33218
  return this.getXHRAPI() ? this.createXMLHttpRequest() : this.createMicrosoftXHR();
33198
33219
  },
33199
33220
  createXMLHttpRequest() {
33200
- var c = this.getXHRAPI();
33201
- return new c();
33221
+ var u = this.getXHRAPI();
33222
+ return new u();
33202
33223
  },
33203
33224
  createMicrosoftXHR() {
33204
33225
  return new ActiveXObject("Microsoft.XMLHTTP");
@@ -33206,47 +33227,47 @@ var yo = { exports: {} };
33206
33227
  getNetwork() {
33207
33228
  return Fo;
33208
33229
  },
33209
- createWebSocket(c) {
33230
+ createWebSocket(u) {
33210
33231
  var r = this.getWebSocketAPI();
33211
- return new r(c);
33232
+ return new r(u);
33212
33233
  },
33213
- createSocketRequest(c, r) {
33234
+ createSocketRequest(u, r) {
33214
33235
  if (this.isXHRSupported())
33215
- return this.HTTPFactory.createXHR(c, r);
33236
+ return this.HTTPFactory.createXHR(u, r);
33216
33237
  if (this.isXDRSupported(r.indexOf("https:") === 0))
33217
- return this.HTTPFactory.createXDR(c, r);
33238
+ return this.HTTPFactory.createXDR(u, r);
33218
33239
  throw "Cross-origin HTTP requests are not supported";
33219
33240
  },
33220
33241
  isXHRSupported() {
33221
- var c = this.getXHRAPI();
33222
- return !!c && new c().withCredentials !== void 0;
33242
+ var u = this.getXHRAPI();
33243
+ return !!u && new u().withCredentials !== void 0;
33223
33244
  },
33224
- isXDRSupported(c) {
33225
- var r = c ? "https:" : "http:", u = this.getProtocol();
33226
- return !!window.XDomainRequest && u === r;
33245
+ isXDRSupported(u) {
33246
+ var r = u ? "https:" : "http:", c = this.getProtocol();
33247
+ return !!window.XDomainRequest && c === r;
33227
33248
  },
33228
- addUnloadListener(c) {
33229
- window.addEventListener !== void 0 ? window.addEventListener("unload", c, !1) : window.attachEvent !== void 0 && window.attachEvent("onunload", c);
33249
+ addUnloadListener(u) {
33250
+ window.addEventListener !== void 0 ? window.addEventListener("unload", u, !1) : window.attachEvent !== void 0 && window.attachEvent("onunload", u);
33230
33251
  },
33231
- removeUnloadListener(c) {
33232
- window.addEventListener !== void 0 ? window.removeEventListener("unload", c, !1) : window.detachEvent !== void 0 && window.detachEvent("onunload", c);
33252
+ removeUnloadListener(u) {
33253
+ window.addEventListener !== void 0 ? window.removeEventListener("unload", u, !1) : window.detachEvent !== void 0 && window.detachEvent("onunload", u);
33233
33254
  },
33234
- randomInt(c) {
33255
+ randomInt(u) {
33235
33256
  return Math.floor(function() {
33236
33257
  return (window.crypto || window.msCrypto).getRandomValues(new Uint32Array(1))[0] / Math.pow(2, 32);
33237
- }() * c);
33258
+ }() * u);
33238
33259
  }
33239
33260
  }, O = Ia, Xi;
33240
- (function(c) {
33241
- c[c.ERROR = 3] = "ERROR", c[c.INFO = 6] = "INFO", c[c.DEBUG = 7] = "DEBUG";
33261
+ (function(u) {
33262
+ u[u.ERROR = 3] = "ERROR", u[u.INFO = 6] = "INFO", u[u.DEBUG = 7] = "DEBUG";
33242
33263
  })(Xi || (Xi = {}));
33243
33264
  var hi = Xi;
33244
33265
  class Da {
33245
- constructor(r, u, b) {
33246
- this.key = r, this.session = u, this.events = [], this.options = b || {}, this.sent = 0, this.uniqueID = 0;
33266
+ constructor(r, c, b) {
33267
+ this.key = r, this.session = c, this.events = [], this.options = b || {}, this.sent = 0, this.uniqueID = 0;
33247
33268
  }
33248
- log(r, u) {
33249
- r <= this.options.level && (this.events.push(pe({}, u, { timestamp: ae.now() })), this.options.limit && this.events.length > this.options.limit && this.events.shift());
33269
+ log(r, c) {
33270
+ r <= this.options.level && (this.events.push(pe({}, c, { timestamp: ae.now() })), this.options.limit && this.events.length > this.options.limit && this.events.shift());
33250
33271
  }
33251
33272
  error(r) {
33252
33273
  this.log(hi.ERROR, r);
@@ -33260,7 +33281,7 @@ var yo = { exports: {} };
33260
33281
  isEmpty() {
33261
33282
  return this.events.length === 0;
33262
33283
  }
33263
- send(r, u) {
33284
+ send(r, c) {
33264
33285
  var b = pe({
33265
33286
  session: this.session,
33266
33287
  bundle: this.sent + 1,
@@ -33272,7 +33293,7 @@ var yo = { exports: {} };
33272
33293
  timeline: this.events
33273
33294
  }, this.options.params);
33274
33295
  return this.events = [], r(b, (S, x) => {
33275
- S || this.sent++, u && u(S, x);
33296
+ S || this.sent++, c && c(S, x);
33276
33297
  }), !0;
33277
33298
  }
33278
33299
  generateUniqueID() {
@@ -33280,31 +33301,31 @@ var yo = { exports: {} };
33280
33301
  }
33281
33302
  }
33282
33303
  class Na {
33283
- constructor(r, u, b, S) {
33284
- this.name = r, this.priority = u, this.transport = b, this.options = S || {};
33304
+ constructor(r, c, b, S) {
33305
+ this.name = r, this.priority = c, this.transport = b, this.options = S || {};
33285
33306
  }
33286
33307
  isSupported() {
33287
33308
  return this.transport.isSupported({
33288
33309
  useTLS: this.options.useTLS
33289
33310
  });
33290
33311
  }
33291
- connect(r, u) {
33312
+ connect(r, c) {
33292
33313
  if (this.isSupported()) {
33293
33314
  if (this.priority < r)
33294
- return Ft(new _(), u);
33295
- } else return Ft(new G(), u);
33315
+ return Ft(new _(), c);
33316
+ } else return Ft(new G(), c);
33296
33317
  var b = !1, S = this.transport.createConnection(this.name, this.priority, this.options.key, this.options), x = null, E = function() {
33297
33318
  S.unbind("initialized", E), S.connect();
33298
33319
  }, D = function() {
33299
- x = $e.createHandshake(S, function(ce) {
33300
- b = !0, Q(), u(null, ce);
33320
+ x = $e.createHandshake(S, function(ue) {
33321
+ b = !0, Q(), c(null, ue);
33301
33322
  });
33302
- }, B = function(ce) {
33303
- Q(), u(ce);
33323
+ }, B = function(ue) {
33324
+ Q(), c(ue);
33304
33325
  }, Z = function() {
33305
33326
  Q();
33306
- var ce;
33307
- ce = gn(S), u(new T(ce));
33327
+ var ue;
33328
+ ue = gn(S), c(new T(ue));
33308
33329
  }, Q = function() {
33309
33330
  S.unbind("initialized", E), S.unbind("open", D), S.unbind("error", B), S.unbind("closed", Z);
33310
33331
  };
@@ -33312,15 +33333,15 @@ var yo = { exports: {} };
33312
33333
  abort: () => {
33313
33334
  b || (Q(), x ? x.close() : S.close());
33314
33335
  },
33315
- forceMinPriority: (ce) => {
33316
- b || this.priority < ce && (x ? x.close() : S.close());
33336
+ forceMinPriority: (ue) => {
33337
+ b || this.priority < ue && (x ? x.close() : S.close());
33317
33338
  }
33318
33339
  };
33319
33340
  }
33320
33341
  }
33321
- function Ft(c, r) {
33342
+ function Ft(u, r) {
33322
33343
  return ae.defer(function() {
33323
- r(c);
33344
+ r(u);
33324
33345
  }), {
33325
33346
  abort: function() {
33326
33347
  },
@@ -33329,76 +33350,76 @@ var yo = { exports: {} };
33329
33350
  };
33330
33351
  }
33331
33352
  const { Transports: Ba } = O;
33332
- var Ha = function(c, r, u, b, S, x) {
33333
- var E = Ba[u];
33353
+ var Ha = function(u, r, c, b, S, x) {
33354
+ var E = Ba[c];
33334
33355
  if (!E)
33335
- throw new K(u);
33336
- var D = (!c.enabledTransports || Ee(c.enabledTransports, r) !== -1) && (!c.disabledTransports || Ee(c.disabledTransports, r) === -1), B;
33337
- return D ? (S = Object.assign({ ignoreNullOrigin: c.ignoreNullOrigin }, S), B = new Na(r, b, x ? x.getAssistant(E) : E, S)) : B = Ra, B;
33356
+ throw new K(c);
33357
+ var D = (!u.enabledTransports || Ee(u.enabledTransports, r) !== -1) && (!u.disabledTransports || Ee(u.disabledTransports, r) === -1), B;
33358
+ return D ? (S = Object.assign({ ignoreNullOrigin: u.ignoreNullOrigin }, S), B = new Na(r, b, x ? x.getAssistant(E) : E, S)) : B = Ra, B;
33338
33359
  }, Ra = {
33339
33360
  isSupported: function() {
33340
33361
  return !1;
33341
33362
  },
33342
- connect: function(c, r) {
33343
- var u = ae.defer(function() {
33363
+ connect: function(u, r) {
33364
+ var c = ae.defer(function() {
33344
33365
  r(new G());
33345
33366
  });
33346
33367
  return {
33347
33368
  abort: function() {
33348
- u.ensureAborted();
33369
+ c.ensureAborted();
33349
33370
  },
33350
33371
  forceMinPriority: function() {
33351
33372
  }
33352
33373
  };
33353
33374
  }
33354
33375
  };
33355
- function Oa(c) {
33356
- if (c == null)
33376
+ function Oa(u) {
33377
+ if (u == null)
33357
33378
  throw "You must pass an options object";
33358
- if (c.cluster == null)
33379
+ if (u.cluster == null)
33359
33380
  throw "Options object must provide a cluster";
33360
- "disableStats" in c && oe.warn("The disableStats option is deprecated in favor of enableStats");
33381
+ "disableStats" in u && oe.warn("The disableStats option is deprecated in favor of enableStats");
33361
33382
  }
33362
- const Ua = (c, r) => {
33363
- var u = "socket_id=" + encodeURIComponent(c.socketId);
33383
+ const Ua = (u, r) => {
33384
+ var c = "socket_id=" + encodeURIComponent(u.socketId);
33364
33385
  for (var b in r.params)
33365
- u += "&" + encodeURIComponent(b) + "=" + encodeURIComponent(r.params[b]);
33386
+ c += "&" + encodeURIComponent(b) + "=" + encodeURIComponent(r.params[b]);
33366
33387
  if (r.paramsProvider != null) {
33367
33388
  let S = r.paramsProvider();
33368
33389
  for (var b in S)
33369
- u += "&" + encodeURIComponent(b) + "=" + encodeURIComponent(S[b]);
33390
+ c += "&" + encodeURIComponent(b) + "=" + encodeURIComponent(S[b]);
33370
33391
  }
33371
- return u;
33392
+ return c;
33372
33393
  };
33373
- var Va = (c) => {
33374
- if (typeof O.getAuthorizers()[c.transport] > "u")
33375
- throw `'${c.transport}' is not a recognized auth transport`;
33376
- return (r, u) => {
33377
- const b = Ua(r, c);
33378
- O.getAuthorizers()[c.transport](O, b, c, C.UserAuthentication, u);
33394
+ var Va = (u) => {
33395
+ if (typeof O.getAuthorizers()[u.transport] > "u")
33396
+ throw `'${u.transport}' is not a recognized auth transport`;
33397
+ return (r, c) => {
33398
+ const b = Ua(r, u);
33399
+ O.getAuthorizers()[u.transport](O, b, u, C.UserAuthentication, c);
33379
33400
  };
33380
33401
  };
33381
- const Ka = (c, r) => {
33382
- var u = "socket_id=" + encodeURIComponent(c.socketId);
33383
- u += "&channel_name=" + encodeURIComponent(c.channelName);
33402
+ const Ka = (u, r) => {
33403
+ var c = "socket_id=" + encodeURIComponent(u.socketId);
33404
+ c += "&channel_name=" + encodeURIComponent(u.channelName);
33384
33405
  for (var b in r.params)
33385
- u += "&" + encodeURIComponent(b) + "=" + encodeURIComponent(r.params[b]);
33406
+ c += "&" + encodeURIComponent(b) + "=" + encodeURIComponent(r.params[b]);
33386
33407
  if (r.paramsProvider != null) {
33387
33408
  let S = r.paramsProvider();
33388
33409
  for (var b in S)
33389
- u += "&" + encodeURIComponent(b) + "=" + encodeURIComponent(S[b]);
33410
+ c += "&" + encodeURIComponent(b) + "=" + encodeURIComponent(S[b]);
33390
33411
  }
33391
- return u;
33412
+ return c;
33392
33413
  };
33393
- var ja = (c) => {
33394
- if (typeof O.getAuthorizers()[c.transport] > "u")
33395
- throw `'${c.transport}' is not a recognized auth transport`;
33396
- return (r, u) => {
33397
- const b = Ka(r, c);
33398
- O.getAuthorizers()[c.transport](O, b, c, C.ChannelAuthorization, u);
33414
+ var ja = (u) => {
33415
+ if (typeof O.getAuthorizers()[u.transport] > "u")
33416
+ throw `'${u.transport}' is not a recognized auth transport`;
33417
+ return (r, c) => {
33418
+ const b = Ka(r, u);
33419
+ O.getAuthorizers()[u.transport](O, b, u, C.ChannelAuthorization, c);
33399
33420
  };
33400
33421
  };
33401
- const Fa = (c, r, u) => {
33422
+ const Fa = (u, r, c) => {
33402
33423
  const b = {
33403
33424
  authTransport: r.transport,
33404
33425
  authEndpoint: r.endpoint,
@@ -33408,105 +33429,105 @@ var yo = { exports: {} };
33408
33429
  }
33409
33430
  };
33410
33431
  return (S, x) => {
33411
- const E = c.channel(S.channelName);
33412
- u(E, b).authorize(S.socketId, x);
33432
+ const E = u.channel(S.channelName);
33433
+ c(E, b).authorize(S.socketId, x);
33413
33434
  };
33414
33435
  };
33415
- function Ga(c, r) {
33416
- let u = {
33417
- activityTimeout: c.activityTimeout || d.activityTimeout,
33418
- cluster: c.cluster,
33419
- httpPath: c.httpPath || d.httpPath,
33420
- httpPort: c.httpPort || d.httpPort,
33421
- httpsPort: c.httpsPort || d.httpsPort,
33422
- pongTimeout: c.pongTimeout || d.pongTimeout,
33423
- statsHost: c.statsHost || d.stats_host,
33424
- unavailableTimeout: c.unavailableTimeout || d.unavailableTimeout,
33425
- wsPath: c.wsPath || d.wsPath,
33426
- wsPort: c.wsPort || d.wsPort,
33427
- wssPort: c.wssPort || d.wssPort,
33428
- enableStats: Ja(c),
33429
- httpHost: qa(c),
33430
- useTLS: Za(c),
33431
- wsHost: za(c),
33432
- userAuthenticator: $a(c),
33433
- channelAuthorizer: Qa(c, r)
33436
+ function Ga(u, r) {
33437
+ let c = {
33438
+ activityTimeout: u.activityTimeout || d.activityTimeout,
33439
+ cluster: u.cluster,
33440
+ httpPath: u.httpPath || d.httpPath,
33441
+ httpPort: u.httpPort || d.httpPort,
33442
+ httpsPort: u.httpsPort || d.httpsPort,
33443
+ pongTimeout: u.pongTimeout || d.pongTimeout,
33444
+ statsHost: u.statsHost || d.stats_host,
33445
+ unavailableTimeout: u.unavailableTimeout || d.unavailableTimeout,
33446
+ wsPath: u.wsPath || d.wsPath,
33447
+ wsPort: u.wsPort || d.wsPort,
33448
+ wssPort: u.wssPort || d.wssPort,
33449
+ enableStats: Ja(u),
33450
+ httpHost: qa(u),
33451
+ useTLS: Za(u),
33452
+ wsHost: za(u),
33453
+ userAuthenticator: $a(u),
33454
+ channelAuthorizer: Qa(u, r)
33434
33455
  };
33435
- return "disabledTransports" in c && (u.disabledTransports = c.disabledTransports), "enabledTransports" in c && (u.enabledTransports = c.enabledTransports), "ignoreNullOrigin" in c && (u.ignoreNullOrigin = c.ignoreNullOrigin), "timelineParams" in c && (u.timelineParams = c.timelineParams), "nacl" in c && (u.nacl = c.nacl), u;
33456
+ return "disabledTransports" in u && (c.disabledTransports = u.disabledTransports), "enabledTransports" in u && (c.enabledTransports = u.enabledTransports), "ignoreNullOrigin" in u && (c.ignoreNullOrigin = u.ignoreNullOrigin), "timelineParams" in u && (c.timelineParams = u.timelineParams), "nacl" in u && (c.nacl = u.nacl), c;
33436
33457
  }
33437
- function qa(c) {
33438
- return c.httpHost ? c.httpHost : c.cluster ? `sockjs-${c.cluster}.pusher.com` : d.httpHost;
33458
+ function qa(u) {
33459
+ return u.httpHost ? u.httpHost : u.cluster ? `sockjs-${u.cluster}.pusher.com` : d.httpHost;
33439
33460
  }
33440
- function za(c) {
33441
- return c.wsHost ? c.wsHost : Wa(c.cluster);
33461
+ function za(u) {
33462
+ return u.wsHost ? u.wsHost : Wa(u.cluster);
33442
33463
  }
33443
- function Wa(c) {
33444
- return `ws-${c}.pusher.com`;
33464
+ function Wa(u) {
33465
+ return `ws-${u}.pusher.com`;
33445
33466
  }
33446
- function Za(c) {
33447
- return O.getProtocol() === "https:" ? !0 : c.forceTLS !== !1;
33467
+ function Za(u) {
33468
+ return O.getProtocol() === "https:" ? !0 : u.forceTLS !== !1;
33448
33469
  }
33449
- function Ja(c) {
33450
- return "enableStats" in c ? c.enableStats : "disableStats" in c ? !c.disableStats : !1;
33470
+ function Ja(u) {
33471
+ return "enableStats" in u ? u.enableStats : "disableStats" in u ? !u.disableStats : !1;
33451
33472
  }
33452
- function $a(c) {
33453
- const r = Object.assign(Object.assign({}, d.userAuthentication), c.userAuthentication);
33473
+ function $a(u) {
33474
+ const r = Object.assign(Object.assign({}, d.userAuthentication), u.userAuthentication);
33454
33475
  return "customHandler" in r && r.customHandler != null ? r.customHandler : Va(r);
33455
33476
  }
33456
- function Ya(c, r) {
33457
- let u;
33458
- return "channelAuthorization" in c ? u = Object.assign(Object.assign({}, d.channelAuthorization), c.channelAuthorization) : (u = {
33459
- transport: c.authTransport || d.authTransport,
33460
- endpoint: c.authEndpoint || d.authEndpoint
33461
- }, "auth" in c && ("params" in c.auth && (u.params = c.auth.params), "headers" in c.auth && (u.headers = c.auth.headers)), "authorizer" in c && (u.customHandler = Fa(r, u, c.authorizer))), u;
33477
+ function Ya(u, r) {
33478
+ let c;
33479
+ return "channelAuthorization" in u ? c = Object.assign(Object.assign({}, d.channelAuthorization), u.channelAuthorization) : (c = {
33480
+ transport: u.authTransport || d.authTransport,
33481
+ endpoint: u.authEndpoint || d.authEndpoint
33482
+ }, "auth" in u && ("params" in u.auth && (c.params = u.auth.params), "headers" in u.auth && (c.headers = u.auth.headers)), "authorizer" in u && (c.customHandler = Fa(r, c, u.authorizer))), c;
33462
33483
  }
33463
- function Qa(c, r) {
33464
- const u = Ya(c, r);
33465
- return "customHandler" in u && u.customHandler != null ? u.customHandler : ja(u);
33484
+ function Qa(u, r) {
33485
+ const c = Ya(u, r);
33486
+ return "customHandler" in c && c.customHandler != null ? c.customHandler : ja(c);
33466
33487
  }
33467
33488
  class Xa extends Je {
33468
33489
  constructor(r) {
33469
- super(function(u, b) {
33470
- oe.debug(`No callbacks on watchlist events for ${u}`);
33490
+ super(function(c, b) {
33491
+ oe.debug(`No callbacks on watchlist events for ${c}`);
33471
33492
  }), this.pusher = r, this.bindWatchlistInternalEvent();
33472
33493
  }
33473
33494
  handleEvent(r) {
33474
- r.data.events.forEach((u) => {
33475
- this.emit(u.name, u);
33495
+ r.data.events.forEach((c) => {
33496
+ this.emit(c.name, c);
33476
33497
  });
33477
33498
  }
33478
33499
  bindWatchlistInternalEvent() {
33479
33500
  this.pusher.connection.bind("message", (r) => {
33480
- var u = r.event;
33481
- u === "pusher_internal:watchlist_events" && this.handleEvent(r);
33501
+ var c = r.event;
33502
+ c === "pusher_internal:watchlist_events" && this.handleEvent(r);
33482
33503
  });
33483
33504
  }
33484
33505
  }
33485
33506
  function er() {
33486
- let c, r;
33507
+ let u, r;
33487
33508
  return { promise: new Promise((b, S) => {
33488
- c = b, r = S;
33489
- }), resolve: c, reject: r };
33509
+ u = b, r = S;
33510
+ }), resolve: u, reject: r };
33490
33511
  }
33491
33512
  var nr = er;
33492
33513
  class ir extends Je {
33493
33514
  constructor(r) {
33494
- super(function(u, b) {
33495
- oe.debug("No callbacks on user for " + u);
33496
- }), this.signin_requested = !1, this.user_data = null, this.serverToUserChannel = null, this.signinDonePromise = null, this._signinDoneResolve = null, this._onAuthorize = (u, b) => {
33497
- if (u) {
33498
- oe.warn(`Error during signin: ${u}`), this._cleanup();
33515
+ super(function(c, b) {
33516
+ oe.debug("No callbacks on user for " + c);
33517
+ }), this.signin_requested = !1, this.user_data = null, this.serverToUserChannel = null, this.signinDonePromise = null, this._signinDoneResolve = null, this._onAuthorize = (c, b) => {
33518
+ if (c) {
33519
+ oe.warn(`Error during signin: ${c}`), this._cleanup();
33499
33520
  return;
33500
33521
  }
33501
33522
  this.pusher.send_event("pusher:signin", {
33502
33523
  auth: b.auth,
33503
33524
  user_data: b.user_data
33504
33525
  });
33505
- }, this.pusher = r, this.pusher.connection.bind("state_change", ({ previous: u, current: b }) => {
33506
- u !== "connected" && b === "connected" && this._signin(), u === "connected" && b !== "connected" && (this._cleanup(), this._newSigninPromiseIfNeeded());
33507
- }), this.watchlist = new Xa(r), this.pusher.connection.bind("message", (u) => {
33508
- var b = u.event;
33509
- b === "pusher:signin_success" && this._onSigninSuccess(u.data), this.serverToUserChannel && this.serverToUserChannel.name === u.channel && this.serverToUserChannel.handleEvent(u);
33526
+ }, this.pusher = r, this.pusher.connection.bind("state_change", ({ previous: c, current: b }) => {
33527
+ c !== "connected" && b === "connected" && this._signin(), c === "connected" && b !== "connected" && (this._cleanup(), this._newSigninPromiseIfNeeded());
33528
+ }), this.watchlist = new Xa(r), this.pusher.connection.bind("message", (c) => {
33529
+ var b = c.event;
33530
+ b === "pusher:signin_success" && this._onSigninSuccess(c.data), this.serverToUserChannel && this.serverToUserChannel.name === c.channel && this.serverToUserChannel.handleEvent(c);
33510
33531
  });
33511
33532
  }
33512
33533
  signin() {
@@ -33531,11 +33552,11 @@ var yo = { exports: {} };
33531
33552
  this._signinDoneResolve(), this._subscribeChannels();
33532
33553
  }
33533
33554
  _subscribeChannels() {
33534
- const r = (u) => {
33535
- u.subscriptionPending && u.subscriptionCancelled ? u.reinstateSubscription() : !u.subscriptionPending && this.pusher.connection.state === "connected" && u.subscribe();
33555
+ const r = (c) => {
33556
+ c.subscriptionPending && c.subscriptionCancelled ? c.reinstateSubscription() : !c.subscriptionPending && this.pusher.connection.state === "connected" && c.subscribe();
33536
33557
  };
33537
- this.serverToUserChannel = new Wi(`#server-to-user-${this.user_data.id}`, this.pusher), this.serverToUserChannel.bind_global((u, b) => {
33538
- u.indexOf("pusher_internal:") === 0 || u.indexOf("pusher:") === 0 || this.emit(u, b);
33558
+ this.serverToUserChannel = new Wi(`#server-to-user-${this.user_data.id}`, this.pusher), this.serverToUserChannel.bind_global((c, b) => {
33559
+ c.indexOf("pusher_internal:") === 0 || c.indexOf("pusher:") === 0 || this.emit(c, b);
33539
33560
  }), r(this.serverToUserChannel);
33540
33561
  }
33541
33562
  _cleanup() {
@@ -33544,18 +33565,18 @@ var yo = { exports: {} };
33544
33565
  _newSigninPromiseIfNeeded() {
33545
33566
  if (!this.signin_requested || this.signinDonePromise && !this.signinDonePromise.done)
33546
33567
  return;
33547
- const { promise: r, resolve: u, reject: b } = nr();
33568
+ const { promise: r, resolve: c, reject: b } = nr();
33548
33569
  r.done = !1;
33549
33570
  const S = () => {
33550
33571
  r.done = !0;
33551
33572
  };
33552
- r.then(S).catch(S), this.signinDonePromise = r, this._signinDoneResolve = u;
33573
+ r.then(S).catch(S), this.signinDonePromise = r, this._signinDoneResolve = c;
33553
33574
  }
33554
33575
  }
33555
33576
  class ye {
33556
33577
  static ready() {
33557
33578
  ye.isReady = !0;
33558
- for (var r = 0, u = ye.instances.length; r < u; r++)
33579
+ for (var r = 0, c = ye.instances.length; r < c; r++)
33559
33580
  ye.instances[r].connect();
33560
33581
  }
33561
33582
  static getClientFeatures() {
@@ -33563,8 +33584,8 @@ var yo = { exports: {} };
33563
33584
  return r.isSupported({});
33564
33585
  }));
33565
33586
  }
33566
- constructor(r, u) {
33567
- tr(r), Oa(u), this.key = r, this.config = Ga(u, this), this.channels = $e.createChannels(), this.global_emitter = new Je(), this.sessionID = O.randomInt(1e9), this.timeline = new Da(this.key, this.sessionID, {
33587
+ constructor(r, c) {
33588
+ tr(r), Oa(c), this.key = r, this.config = Ga(c, this), this.channels = $e.createChannels(), this.global_emitter = new Je(), this.sessionID = O.randomInt(1e9), this.timeline = new Da(this.key, this.sessionID, {
33568
33589
  cluster: this.config.cluster,
33569
33590
  features: ye.getClientFeatures(),
33570
33591
  params: this.config.timelineParams || {},
@@ -33608,20 +33629,20 @@ var yo = { exports: {} };
33608
33629
  }
33609
33630
  connect() {
33610
33631
  if (this.connection.connect(), this.timelineSender && !this.timelineSenderTimer) {
33611
- var r = this.connection.isUsingTLS(), u = this.timelineSender;
33632
+ var r = this.connection.isUsingTLS(), c = this.timelineSender;
33612
33633
  this.timelineSenderTimer = new Ze(6e4, function() {
33613
- u.send(r);
33634
+ c.send(r);
33614
33635
  });
33615
33636
  }
33616
33637
  }
33617
33638
  disconnect() {
33618
33639
  this.connection.disconnect(), this.timelineSenderTimer && (this.timelineSenderTimer.ensureAborted(), this.timelineSenderTimer = null);
33619
33640
  }
33620
- bind(r, u, b) {
33621
- return this.global_emitter.bind(r, u, b), this;
33641
+ bind(r, c, b) {
33642
+ return this.global_emitter.bind(r, c, b), this;
33622
33643
  }
33623
- unbind(r, u, b) {
33624
- return this.global_emitter.unbind(r, u, b), this;
33644
+ unbind(r, c, b) {
33645
+ return this.global_emitter.unbind(r, c, b), this;
33625
33646
  }
33626
33647
  bind_global(r) {
33627
33648
  return this.global_emitter.bind_global(r), this;
@@ -33638,15 +33659,15 @@ var yo = { exports: {} };
33638
33659
  this.channels.channels.hasOwnProperty(r) && this.subscribe(r);
33639
33660
  }
33640
33661
  subscribe(r) {
33641
- var u = this.channels.add(r, this);
33642
- return u.subscriptionPending && u.subscriptionCancelled ? u.reinstateSubscription() : !u.subscriptionPending && this.connection.state === "connected" && u.subscribe(), u;
33662
+ var c = this.channels.add(r, this);
33663
+ return c.subscriptionPending && c.subscriptionCancelled ? c.reinstateSubscription() : !c.subscriptionPending && this.connection.state === "connected" && c.subscribe(), c;
33643
33664
  }
33644
33665
  unsubscribe(r) {
33645
- var u = this.channels.find(r);
33646
- u && u.subscriptionPending ? u.cancelSubscription() : (u = this.channels.remove(r), u && u.subscribed && u.unsubscribe());
33666
+ var c = this.channels.find(r);
33667
+ c && c.subscriptionPending ? c.cancelSubscription() : (c = this.channels.remove(r), c && c.subscribed && c.unsubscribe());
33647
33668
  }
33648
- send_event(r, u, b) {
33649
- return this.connection.send_event(r, u, b);
33669
+ send_event(r, c, b) {
33670
+ return this.connection.send_event(r, c, b);
33650
33671
  }
33651
33672
  shouldUseTLS() {
33652
33673
  return this.config.useTLS;
@@ -33657,8 +33678,8 @@ var yo = { exports: {} };
33657
33678
  }
33658
33679
  ye.instances = [], ye.isReady = !1, ye.logToConsole = !1, ye.Runtime = O, ye.ScriptReceivers = O.ScriptReceivers, ye.DependenciesReceivers = O.DependenciesReceivers, ye.auth_callbacks = O.auth_callbacks;
33659
33680
  var et = t.default = ye;
33660
- function tr(c) {
33661
- if (c == null)
33681
+ function tr(u) {
33682
+ if (u == null)
33662
33683
  throw "You must pass your app key when you instantiate Pusher.";
33663
33684
  }
33664
33685
  O.setup(ye);
@@ -33890,7 +33911,7 @@ class zd {
33890
33911
  }
33891
33912
  s += 1;
33892
33913
  try {
33893
- const p = await cn(
33914
+ const p = await un(
33894
33915
  e,
33895
33916
  this.ref,
33896
33917
  l,
@@ -34066,7 +34087,7 @@ class Jd {
34066
34087
  }
34067
34088
  async verifyTransfer() {
34068
34089
  try {
34069
- const e = await cn(
34090
+ const e = await un(
34070
34091
  this.token,
34071
34092
  this.reference,
34072
34093
  void 0,
@@ -34644,7 +34665,7 @@ const Xd = `<div id="viewCode">
34644
34665
  </div>
34645
34666
  </div>
34646
34667
  </div>`;
34647
- class eu {
34668
+ class ec {
34648
34669
  constructor(e) {
34649
34670
  h(this, "container");
34650
34671
  h(this, "selected");
@@ -34764,10 +34785,10 @@ class eu {
34764
34785
  return Xd;
34765
34786
  }
34766
34787
  }
34767
- var nu = Object.defineProperty, iu = (n, e, i, t) => {
34788
+ var nc = Object.defineProperty, ic = (n, e, i, t) => {
34768
34789
  for (var s = void 0, o = n.length - 1, a; o >= 0; o--)
34769
34790
  (a = n[o]) && (s = a(e, i, s) || s);
34770
- return s && nu(e, i, s), s;
34791
+ return s && nc(e, i, s), s;
34771
34792
  };
34772
34793
  class So {
34773
34794
  constructor({
@@ -34888,7 +34909,7 @@ class So {
34888
34909
  }), this.bankDetail.renderContent();
34889
34910
  break;
34890
34911
  case 2:
34891
- this.viewUssdCode = new eu({
34912
+ this.viewUssdCode = new ec({
34892
34913
  container: this.contents,
34893
34914
  onAction: (t, s) => {
34894
34915
  this.activeRef = s, this.currentStep = 4, this.intervalPayment = setInterval(() => {
@@ -34955,11 +34976,11 @@ class So {
34955
34976
  }, 400), this.currentStep = 2;
34956
34977
  }
34957
34978
  }
34958
- iu([
34979
+ ic([
34959
34980
  Ms(),
34960
34981
  Ms()
34961
34982
  ], So.prototype, "selectedCode");
34962
- const tu = {
34983
+ const tc = {
34963
34984
  NGN: "Nigerian Naira",
34964
34985
  USD: "US Dollar",
34965
34986
  GHS: "Ghanaian Cedi",
@@ -34967,8 +34988,8 @@ const tu = {
34967
34988
  ZAF: "South African Rand",
34968
34989
  USDT: "Tether",
34969
34990
  KSH: "Kenyan Shilling"
34970
- }, su = (n) => n == null ? void 0 : n.replace(/_/g, " ");
34971
- function ou(n) {
34991
+ }, sc = (n) => n == null ? void 0 : n.replace(/_/g, " ");
34992
+ function oc(n) {
34972
34993
  return n.split(" ").map(
34973
34994
  (e) => e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()
34974
34995
  // Capitalize the first letter and make the rest lowercase
@@ -34976,11 +34997,11 @@ function ou(n) {
34976
34997
  }
34977
34998
  const gi = (n) => {
34978
34999
  if (n) {
34979
- const e = su(n);
34980
- return ou(e);
35000
+ const e = sc(n);
35001
+ return oc(e);
34981
35002
  }
34982
35003
  return "";
34983
- }, au = `<div>
35004
+ }, ac = `<div>
34984
35005
  <button id="go-back" class="md:hidden" aria-label="Go back">
34985
35006
  </button>
34986
35007
  </div>
@@ -35117,7 +35138,7 @@ const gi = (n) => {
35117
35138
  <!-- Tab options -->
35118
35139
  </div>
35119
35140
  </div>`;
35120
- class ru {
35141
+ class rc {
35121
35142
  constructor(e) {
35122
35143
  h(this, "container");
35123
35144
  h(this, "email");
@@ -35150,7 +35171,7 @@ class ru {
35150
35171
  });
35151
35172
  }
35152
35173
  renderComponent() {
35153
- var G, U, j, te, ge, V, ke, le, xe, we, ze, sn, We, bn, on, Te, Ze, fn, ae, pe, Ie, Ee, Ce, je, N, de, Y, ue, Pe, J, an, jn, ai, ri, li, di, gn;
35174
+ var G, U, j, te, ge, V, ke, le, xe, we, ze, sn, We, bn, on, Te, Ze, fn, ae, pe, Ie, Ee, Ce, je, N, de, Y, ce, Pe, J, an, jn, ai, ri, li, di, gn;
35154
35175
  this.container.innerHTML = this.render(), this.amount = this.amount;
35155
35176
  const e = this.container.querySelector(
35156
35177
  "#merchant-logo-container"
@@ -35197,10 +35218,10 @@ class ru {
35197
35218
  )} `) : d.innerHTML = ""), p && (this.currency === "USD" ? g && (g.innerHTML = `1 ${((ae = (fn = this.merchantDetail) == null ? void 0 : fn.rate) == null ? void 0 : ae.to) || "-"} = ${((Ie = (pe = this.merchantDetail) == null ? void 0 : pe.rate) == null ? void 0 : Ie.from) || "-"} ${Le(
35198
35219
  ((Ee = this.merchantDetail.rate) == null ? void 0 : Ee.rate) || 1,
35199
35220
  2
35200
- )} `) : p.innerHTML = ""), (je = (Ce = this.merchantDetail) == null ? void 0 : Ce.plan) != null && je.title || (N = this.metadata) != null && N.productName ? f && (f.innerHTML = `${this.currency} ${Le(this.amount, 2)}`) : (k && (k.innerHTML = `<span> ${this.currency} ${Le(this.amount, 2)} </span>`), o && a && (o.remove(), a == null || a.remove()), this.localCurrency ? f == null || f.remove() : l && l.remove()), y && (y.innerHTML = `${this.currency} ${Le(this.amount, 2)}`), C && (this.localCurrency && this.localCurrency !== this.currency ? C.children[1].innerHTML = `${this.localCurrency} ${Le(this.amount * (((Y = (de = this.merchantDetail) == null ? void 0 : de.rate) == null ? void 0 : Y.rate) || 1), 2)}` : C.remove()), w && (this.localCurrency && this.localCurrency !== this.currency ? w.children[1].innerHTML = `${this.localCurrency} ${Le(this.amount * (((Pe = (ue = this.merchantDetail) == null ? void 0 : ue.rate) == null ? void 0 : Pe.rate) || 1), 2)}` : w.remove());
35221
+ )} `) : p.innerHTML = ""), (je = (Ce = this.merchantDetail) == null ? void 0 : Ce.plan) != null && je.title || (N = this.metadata) != null && N.productName ? f && (f.innerHTML = `${this.currency} ${Le(this.amount, 2)}`) : (k && (k.innerHTML = `<span> ${this.currency} ${Le(this.amount, 2)} </span>`), o && a && (o.remove(), a == null || a.remove()), this.localCurrency ? f == null || f.remove() : l && l.remove()), y && (y.innerHTML = `${this.currency} ${Le(this.amount, 2)}`), C && (this.localCurrency && this.localCurrency !== this.currency ? C.children[1].innerHTML = `${this.localCurrency} ${Le(this.amount * (((Y = (de = this.merchantDetail) == null ? void 0 : de.rate) == null ? void 0 : Y.rate) || 1), 2)}` : C.remove()), w && (this.localCurrency && this.localCurrency !== this.currency ? w.children[1].innerHTML = `${this.localCurrency} ${Le(this.amount * (((Pe = (ce = this.merchantDetail) == null ? void 0 : ce.rate) == null ? void 0 : Pe.rate) || 1), 2)}` : w.remove());
35201
35222
  const I = this.localCurrency !== this.currency ? this.amount * (((an = (J = this.merchantDetail) == null ? void 0 : J.rate) == null ? void 0 : an.rate) || 1) : this.amount;
35202
35223
  M && (jn = this.merchantDetail) != null && jn.taxQuoteId && (ai = this.merchantDetail) != null && ai.totalAmount && (M.classList.remove("hidden"), M.children[1].innerHTML = `${this.localCurrency !== this.currency ? this.localCurrency : this.currency} ${Le(((ri = this.merchantDetail) == null ? void 0 : ri.totalAmount) - I, 2)}`), A && (li = this.merchantDetail) != null && li.taxQuoteId && (di = this.merchantDetail) != null && di.totalAmount && (A.classList.remove("hidden"), A.children[1].innerHTML = `${this.localCurrency !== this.currency ? this.localCurrency : this.currency} ${Le(((gn = this.merchantDetail) == null ? void 0 : gn.totalAmount) - I, 2)}`);
35203
- const K = tu[this.localCurrency];
35224
+ const K = tc[this.localCurrency];
35204
35225
  _ && this.localCurrency && (_.innerHTML = K ? `${K} (${this.localCurrency})` : this.localCurrency), T && this.localCurrency && (T.innerHTML = K ? `${K} (${this.localCurrency})` : this.localCurrency), this.renderPaymentOptions(this.container), this.attachListeners();
35205
35226
  }
35206
35227
  renderPaymentOptions(e) {
@@ -35273,10 +35294,10 @@ class ru {
35273
35294
  }
35274
35295
  }
35275
35296
  render() {
35276
- return au;
35297
+ return ac;
35277
35298
  }
35278
35299
  }
35279
- const lu = `<div id="mobileConfirmationProgress">
35300
+ const lc = `<div id="mobileConfirmationProgress">
35280
35301
  <div>
35281
35302
  <div>
35282
35303
  <div class=" grid grid-rows-[auto_1fr] gap-4 mx-5">
@@ -35316,7 +35337,7 @@ const lu = `<div id="mobileConfirmationProgress">
35316
35337
  </div>
35317
35338
  </div>
35318
35339
  </div>`;
35319
- class du {
35340
+ class dc {
35320
35341
  constructor(e) {
35321
35342
  h(this, "container");
35322
35343
  h(this, "onAction");
@@ -35360,7 +35381,7 @@ class du {
35360
35381
  }
35361
35382
  o += 1;
35362
35383
  try {
35363
- const v = await cn(
35384
+ const v = await un(
35364
35385
  e,
35365
35386
  this.ref,
35366
35387
  d,
@@ -35400,10 +35421,10 @@ class du {
35400
35421
  this.container.innerHTML = this.render(), this.attachListeners();
35401
35422
  }
35402
35423
  render() {
35403
- return lu;
35424
+ return lc;
35404
35425
  }
35405
35426
  }
35406
- const uu = `<form id="mobile-money-form">
35427
+ const cc = `<form id="mobile-money-form">
35407
35428
  <div>
35408
35429
  <h5 class="text-grey-400 font-semibold text-sm">Please enter your Mobile Money details to begin payment</h5>
35409
35430
 
@@ -35481,7 +35502,7 @@ const uu = `<form id="mobile-money-form">
35481
35502
  </div>
35482
35503
 
35483
35504
  </form>`;
35484
- class cu {
35505
+ class uc {
35485
35506
  constructor(e) {
35486
35507
  h(this, "container");
35487
35508
  h(this, "payment");
@@ -35624,10 +35645,10 @@ class cu {
35624
35645
  });
35625
35646
  }
35626
35647
  render() {
35627
- return uu;
35648
+ return cc;
35628
35649
  }
35629
35650
  }
35630
- const hu = `<div id="checkoutMobileOtp">
35651
+ const hc = `<div id="checkoutMobileOtp">
35631
35652
  <div class="w-full">
35632
35653
  <div id="otp-content" class=" grid gap-4">
35633
35654
  <h5 class="text-black" id="otp-message">
@@ -35667,7 +35688,7 @@ const hu = `<div id="checkoutMobileOtp">
35667
35688
  </div>
35668
35689
  </div>
35669
35690
  </div>`;
35670
- class mu {
35691
+ class mc {
35671
35692
  constructor(e) {
35672
35693
  h(this, "container");
35673
35694
  h(this, "momoOtp");
@@ -35710,10 +35731,10 @@ class mu {
35710
35731
  e && (e.innerHTML = this.otpMessage), this.attachListener();
35711
35732
  }
35712
35733
  render() {
35713
- return hu;
35734
+ return hc;
35714
35735
  }
35715
35736
  }
35716
- class vu {
35737
+ class vc {
35717
35738
  constructor(e) {
35718
35739
  h(this, "container");
35719
35740
  h(this, "onAction");
@@ -35750,7 +35771,7 @@ class vu {
35750
35771
  return bo;
35751
35772
  }
35752
35773
  }
35753
- class pu {
35774
+ class pc {
35754
35775
  constructor({
35755
35776
  container: e,
35756
35777
  merchantKey: i,
@@ -35960,7 +35981,7 @@ class pu {
35960
35981
  }
35961
35982
  async verifyPaymentProcess() {
35962
35983
  try {
35963
- const e = await cn(
35984
+ const e = await un(
35964
35985
  this.token,
35965
35986
  this.reference,
35966
35987
  void 0,
@@ -35987,7 +36008,7 @@ class pu {
35987
36008
  }
35988
36009
  switch (this.currentStep === 6 ? this.hidePaymentMethods() : this.showPaymentMethods(), this.isMobile && this.hidePaymentMethods(), this.currentStep) {
35989
36010
  case 1:
35990
- this.mobileMoneyForm = new cu({
36011
+ this.mobileMoneyForm = new uc({
35991
36012
  container: this.contents,
35992
36013
  merchantKey: this.token,
35993
36014
  url: this.url,
@@ -36010,7 +36031,7 @@ class pu {
36010
36031
  this.mainLoader = new Ne(this.contents), this.mainLoader.mountLoader("25dvh"), this.mainLoader.updateMessage("Please wait");
36011
36032
  break;
36012
36033
  case 3:
36013
- this.mobileMoneyConfirmation = new du({
36034
+ this.mobileMoneyConfirmation = new dc({
36014
36035
  container: this.contents,
36015
36036
  onAction: (t) => {
36016
36037
  this.currentStep = t;
@@ -36043,7 +36064,7 @@ class pu {
36043
36064
  }), this.contents.innerHTML = this.warningScreen.render(), this.warningScreen.attachListener();
36044
36065
  break;
36045
36066
  case 6:
36046
- this.mobileMoneyValidationForm = new mu({
36067
+ this.mobileMoneyValidationForm = new mc({
36047
36068
  container: this.contents,
36048
36069
  onClose: this.onClose,
36049
36070
  onAction: (t) => (s) => this.submitOtp.bind(this)(t, s),
@@ -36054,7 +36075,7 @@ class pu {
36054
36075
  this.pageLoader = new Ne(this.contents), this.pageLoader.mountLoader(), this.pageLoader.updateMessage("Verifying Payment");
36055
36076
  break;
36056
36077
  case 8:
36057
- this.mobileMoneyConfirmationEnd = new vu({
36078
+ this.mobileMoneyConfirmationEnd = new vc({
36058
36079
  container: this.contents,
36059
36080
  onAction: (t) => {
36060
36081
  this.currentStep = t;
@@ -36092,7 +36113,7 @@ class pu {
36092
36113
  this.attachInputListeners();
36093
36114
  }
36094
36115
  }
36095
- const bu = `<div id="eft-authenticate-container">
36116
+ const bc = `<div id="eft-authenticate-container">
36096
36117
  <div class="pt-3">
36097
36118
  <div class="container-center">
36098
36119
  <svg width="98" height="32" viewBox="0 0 98 32" fill="none" xmlns="http://www.w3.org/2000/svg"
@@ -36155,10 +36176,10 @@ class Ls {
36155
36176
  this.container.innerHTML = this.render(), this.attachListener();
36156
36177
  }
36157
36178
  render() {
36158
- return bu;
36179
+ return bc;
36159
36180
  }
36160
36181
  }
36161
- class fu {
36182
+ class fc {
36162
36183
  constructor({
36163
36184
  amount: e,
36164
36185
  totalAmount: i,
@@ -36310,7 +36331,7 @@ class fu {
36310
36331
  }
36311
36332
  async verifyPaymentProcess() {
36312
36333
  try {
36313
- const e = await cn(
36334
+ const e = await un(
36314
36335
  this.token,
36315
36336
  this.reference,
36316
36337
  void 0,
@@ -36403,7 +36424,7 @@ class fu {
36403
36424
  }
36404
36425
  }
36405
36426
  }
36406
- class gu {
36427
+ class gc {
36407
36428
  constructor({
36408
36429
  container: e,
36409
36430
  customerDetails: i,
@@ -36464,7 +36485,7 @@ class gu {
36464
36485
  const o = (l = (a = this.merchantPlanDetail.plan) == null ? void 0 : a.pricingOptions) == null ? void 0 : l.find(
36465
36486
  (d) => d.currency === this.currency
36466
36487
  );
36467
- this.amount = (o == null ? void 0 : o.amount) || this.amount, this.totalAmount = this.merchantPlanDetail.totalAmount || this.amount, this.mainHeader = new ru({
36488
+ this.amount = (o == null ? void 0 : o.amount) || this.amount, this.totalAmount = this.merchantPlanDetail.totalAmount || this.amount, this.mainHeader = new rc({
36468
36489
  container: document.getElementById("main-header"),
36469
36490
  email: this.customerDetails.email,
36470
36491
  amount: this.amount,
@@ -36622,7 +36643,7 @@ class gu {
36622
36643
  }
36623
36644
  });
36624
36645
  case "mobile_money":
36625
- return this.mobileMoney = new pu({
36646
+ return this.mobileMoney = new pc({
36626
36647
  container: this.modalContainer,
36627
36648
  customer: i || this.customerDetails,
36628
36649
  currency: o,
@@ -36651,7 +36672,7 @@ class gu {
36651
36672
  countryCode: this.countryCode || ""
36652
36673
  });
36653
36674
  case "eft":
36654
- return this.eft = new fu({
36675
+ return this.eft = new fc({
36655
36676
  container: this.modalContainer,
36656
36677
  amount: t,
36657
36678
  totalAmount: s,
@@ -36815,8 +36836,8 @@ class xs {
36815
36836
  `;
36816
36837
  }
36817
36838
  }
36818
- const yu = "data:image/svg+xml,%3csvg%20width='40'%20height='40'%20viewBox='0%200%2040%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='10'%20y='11.6667'%20width='20'%20height='18.3333'%20fill='white'/%3e%3cpath%20d='M19.9955%2036.6666C15.5754%2036.6706%2011.3352%2034.9161%208.20965%2031.7898C5.08414%2028.6635%203.33001%2024.4222%203.33399%2020.0009V19.6676C3.47026%2012.9884%207.57901%207.0353%2013.7747%204.54029C19.9704%202.04528%2027.0568%203.49007%2031.7819%208.21164C36.5512%2012.9782%2037.9786%2020.1498%2035.398%2026.38C32.8174%2032.6101%2026.7375%2036.6706%2019.9955%2036.6666ZM19.9955%2022.3508L24.3109%2026.6672L26.6601%2024.3174L22.3448%2020.0009L26.6601%2015.6845L24.3109%2013.3347L19.9955%2017.6511L15.6802%2013.3347L13.3309%2015.6845L17.6463%2020.0009L13.3309%2024.3174L15.6802%2026.6672L19.9955%2022.3525V22.3508Z'%20fill='%23D62020'/%3e%3c/svg%3e";
36819
- class Cu {
36839
+ const yc = "data:image/svg+xml,%3csvg%20width='40'%20height='40'%20viewBox='0%200%2040%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='10'%20y='11.6667'%20width='20'%20height='18.3333'%20fill='white'/%3e%3cpath%20d='M19.9955%2036.6666C15.5754%2036.6706%2011.3352%2034.9161%208.20965%2031.7898C5.08414%2028.6635%203.33001%2024.4222%203.33399%2020.0009V19.6676C3.47026%2012.9884%207.57901%207.0353%2013.7747%204.54029C19.9704%202.04528%2027.0568%203.49007%2031.7819%208.21164C36.5512%2012.9782%2037.9786%2020.1498%2035.398%2026.38C32.8174%2032.6101%2026.7375%2036.6706%2019.9955%2036.6666ZM19.9955%2022.3508L24.3109%2026.6672L26.6601%2024.3174L22.3448%2020.0009L26.6601%2015.6845L24.3109%2013.3347L19.9955%2017.6511L15.6802%2013.3347L13.3309%2015.6845L17.6463%2020.0009L13.3309%2024.3174L15.6802%2026.6672L19.9955%2022.3525V22.3508Z'%20fill='%23D62020'/%3e%3c/svg%3e";
36840
+ class Cc {
36820
36841
  constructor(e) {
36821
36842
  h(this, "container");
36822
36843
  h(this, "currency", "");
@@ -36857,7 +36878,7 @@ class Cu {
36857
36878
  `;
36858
36879
  }
36859
36880
  }
36860
- class Au {
36881
+ class Ac {
36861
36882
  constructor() {
36862
36883
  h(this, "modalContainer");
36863
36884
  h(this, "mainLayout");
@@ -36938,7 +36959,7 @@ class Au {
36938
36959
  token: this.merchantKey,
36939
36960
  rdtCode: this.rdtCode,
36940
36961
  url: this.url
36941
- }), this.localCurrency = y || "", this.mainScreen = new gu({
36962
+ }), this.localCurrency = y || "", this.mainScreen = new gc({
36942
36963
  container: this.mainLayout,
36943
36964
  modalContainer: this.modalContainer,
36944
36965
  merchantKey: s,
@@ -37002,7 +37023,7 @@ class Au {
37002
37023
  }), P.track("checkout_opens");
37003
37024
  const { validChannels: t, disabledChannels: s } = this.getAvailableChannels();
37004
37025
  if (((a = this.merchantPlanDetail) == null ? void 0 : a.limits) && this.merchantPlanDetail.limits.length > 0 && (t.length === 0 || t[0] === "ussd" && t.length === 1)) {
37005
- const d = new Cu(this.mainLayout);
37026
+ const d = new Cc(this.mainLayout);
37006
37027
  this.mainError = d;
37007
37028
  let p = 0;
37008
37029
  throw (l = this.merchantPlanDetail) != null && l.limits && this.merchantPlanDetail.limits.length > 0 && (p = Math.max(
@@ -37022,12 +37043,12 @@ class Au {
37022
37043
  showErrorIcon() {
37023
37044
  var i;
37024
37045
  const e = this.mainLayout.querySelector("#shared-error-container");
37025
- e && (e.classList.remove("hidden"), e.parentElement.classList.add("mx-auto"), e.classList.add("flex", "flex-col", "items-center", "gap-2"), (i = e.querySelector("img")) == null || i.setAttribute("src", yu));
37046
+ e && (e.classList.remove("hidden"), e.parentElement.classList.add("mx-auto"), e.classList.add("flex", "flex-col", "items-center", "gap-2"), (i = e.querySelector("img")) == null || i.setAttribute("src", yc));
37026
37047
  }
37027
37048
  closeModal() {
37028
37049
  this.modalContainer && this.modalContainer.parentNode && document.body.removeChild(this.modalContainer), this.mainScreen.closeModal();
37029
37050
  }
37030
37051
  }
37031
37052
  export {
37032
- Au as CheckoutForm
37053
+ Ac as CheckoutForm
37033
37054
  };