@sendity/client 0.1.11 → 0.1.13

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.
@@ -241,6 +241,8 @@ const ft = `<template id="sendity-tpl">
241
241
  min-height: var(--sendity-code-min-height);
242
242
  flex: 0 0 auto;
243
243
  text-align: center;
244
+ direction: ltr;
245
+ unicode-bidi: isolate;
244
246
  gap: 0.5rem;
245
247
  overflow: hidden;
246
248
  transition: opacity var(--sendity-crossfade-duration) ease, transform var(--sendity-crossfade-duration) ease, background-color var(--sendity-crossfade-duration) ease, border-color var(--sendity-crossfade-duration) ease, color var(--sendity-crossfade-duration) ease;
@@ -700,7 +702,7 @@ const ft = `<template id="sendity-tpl">
700
702
  --sendity-shadow-error: 0 0 0 1px rgb(244 63 94 / 0.24), 0 18px 46px -18px rgb(244 63 94 / 0.9);
701
703
  }
702
704
  `;
703
- class We {
705
+ class He {
704
706
  constructor() {
705
707
  this.notificationCreatedEvent = ".Illuminate\\Notifications\\Events\\BroadcastNotificationCreated";
706
708
  }
@@ -729,7 +731,7 @@ class We {
729
731
  return this.stopListening(".client-" + i, s);
730
732
  }
731
733
  }
732
- class kt {
734
+ class St {
733
735
  /**
734
736
  * Create a new class instance.
735
737
  */
@@ -756,12 +758,12 @@ function Di(g) {
756
758
  return !1;
757
759
  }
758
760
  }
759
- class Ne extends We {
761
+ class Ne extends He {
760
762
  /**
761
763
  * Create a new class instance.
762
764
  */
763
765
  constructor(i, s, a) {
764
- super(), this.name = s, this.pusher = i, this.options = a, this.eventFormatter = new kt(this.options.namespace), this.subscribe();
766
+ super(), this.name = s, this.pusher = i, this.options = a, this.eventFormatter = new St(this.options.namespace), this.subscribe();
765
767
  }
766
768
  /**
767
769
  * Subscribe to a Pusher channel.
@@ -890,12 +892,12 @@ class $i extends xt {
890
892
  }), this;
891
893
  }
892
894
  }
893
- class Et extends We {
895
+ class Et extends He {
894
896
  /**
895
897
  * Create a new class instance.
896
898
  */
897
899
  constructor(i, s, a) {
898
- super(), this.events = {}, this.listeners = {}, this.name = s, this.socket = i, this.options = a, this.eventFormatter = new kt(this.options.namespace), this.subscribe();
900
+ super(), this.events = {}, this.listeners = {}, this.name = s, this.socket = i, this.options = a, this.eventFormatter = new St(this.options.namespace), this.subscribe();
899
901
  }
900
902
  /**
901
903
  * Subscribe to a Socket.io channel.
@@ -1016,7 +1018,7 @@ class Gi extends Tt {
1016
1018
  ), this;
1017
1019
  }
1018
1020
  }
1019
- class ge extends We {
1021
+ class ge extends He {
1020
1022
  /**
1021
1023
  * Subscribe to a channel.
1022
1024
  */
@@ -1072,7 +1074,7 @@ class _t extends ge {
1072
1074
  return this;
1073
1075
  }
1074
1076
  }
1075
- class Vi extends ge {
1077
+ class Ki extends ge {
1076
1078
  /**
1077
1079
  * Send a whisper event to other clients in the channel.
1078
1080
  */
@@ -1080,7 +1082,7 @@ class Vi extends ge {
1080
1082
  return this;
1081
1083
  }
1082
1084
  }
1083
- class Ki extends _t {
1085
+ class Vi extends _t {
1084
1086
  /**
1085
1087
  * Register a callback to be called anytime the member list changes.
1086
1088
  */
@@ -1148,8 +1150,8 @@ At._defaultOptions = {
1148
1150
  key: null,
1149
1151
  namespace: "App.Events"
1150
1152
  };
1151
- let He = At;
1152
- class pe extends He {
1153
+ let Ie = At;
1154
+ class pe extends Ie {
1153
1155
  constructor() {
1154
1156
  super(...arguments), this.channels = {};
1155
1157
  }
@@ -1286,7 +1288,7 @@ class pe extends He {
1286
1288
  this.pusher.disconnect();
1287
1289
  }
1288
1290
  }
1289
- class Xi extends He {
1291
+ class Xi extends Ie {
1290
1292
  constructor() {
1291
1293
  super(...arguments), this.channels = {};
1292
1294
  }
@@ -1408,7 +1410,7 @@ class Xi extends He {
1408
1410
  this.socket.disconnect();
1409
1411
  }
1410
1412
  }
1411
- class mt extends He {
1413
+ class mt extends Ie {
1412
1414
  constructor() {
1413
1415
  super(...arguments), this.channels = {};
1414
1416
  }
@@ -1439,13 +1441,13 @@ class mt extends He {
1439
1441
  * Get a private encrypted channel instance by name.
1440
1442
  */
1441
1443
  encryptedPrivateChannel(i) {
1442
- return new Vi();
1444
+ return new Ki();
1443
1445
  }
1444
1446
  /**
1445
1447
  * Get a presence channel instance by name.
1446
1448
  */
1447
1449
  presenceChannel(i) {
1448
- return new Ki();
1450
+ return new Vi();
1449
1451
  }
1450
1452
  /**
1451
1453
  * Leave the given channel, as well as its private and presence variants.
@@ -1643,7 +1645,7 @@ class Ji {
1643
1645
  function Yi(g) {
1644
1646
  return g && g.__esModule && Object.prototype.hasOwnProperty.call(g, "default") ? g.default : g;
1645
1647
  }
1646
- var Le = { exports: {} };
1648
+ var Re = { exports: {} };
1647
1649
  var gt;
1648
1650
  function Zi() {
1649
1651
  return gt || (gt = 1, (function(g, i) {
@@ -1655,12 +1657,12 @@ function Zi() {
1655
1657
  var s = {
1656
1658
  /***/
1657
1659
  594(m, v) {
1658
- var y = this && this.__extends || /* @__PURE__ */ (function() {
1660
+ var b = this && this.__extends || /* @__PURE__ */ (function() {
1659
1661
  var x = function(u, p) {
1660
1662
  return x = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(C, P) {
1661
1663
  C.__proto__ = P;
1662
1664
  } || function(C, P) {
1663
- for (var W in P) P.hasOwnProperty(W) && (C[W] = P[W]);
1665
+ for (var H in P) P.hasOwnProperty(H) && (C[H] = P[H]);
1664
1666
  }, x(u, p);
1665
1667
  };
1666
1668
  return function(u, p) {
@@ -1672,7 +1674,7 @@ function Zi() {
1672
1674
  };
1673
1675
  })();
1674
1676
  Object.defineProperty(v, "__esModule", { value: !0 });
1675
- var E = 256, S = (
1677
+ var E = 256, k = (
1676
1678
  /** @class */
1677
1679
  (function() {
1678
1680
  function x(u) {
@@ -1685,10 +1687,10 @@ function Zi() {
1685
1687
  var P = u[C] << 16 | u[C + 1] << 8 | u[C + 2];
1686
1688
  p += this._encodeByte(P >>> 18 & 63), p += this._encodeByte(P >>> 12 & 63), p += this._encodeByte(P >>> 6 & 63), p += this._encodeByte(P >>> 0 & 63);
1687
1689
  }
1688
- var W = u.length - C;
1689
- if (W > 0) {
1690
- var P = u[C] << 16 | (W === 2 ? u[C + 1] << 8 : 0);
1691
- p += this._encodeByte(P >>> 18 & 63), p += this._encodeByte(P >>> 12 & 63), W === 2 ? p += this._encodeByte(P >>> 6 & 63) : p += this._paddingCharacter || "", p += this._paddingCharacter || "";
1690
+ var H = u.length - C;
1691
+ if (H > 0) {
1692
+ var P = u[C] << 16 | (H === 2 ? u[C + 1] << 8 : 0);
1693
+ p += this._encodeByte(P >>> 18 & 63), p += this._encodeByte(P >>> 12 & 63), H === 2 ? p += this._encodeByte(P >>> 6 & 63) : p += this._paddingCharacter || "", p += this._paddingCharacter || "";
1692
1694
  }
1693
1695
  return p;
1694
1696
  }, x.prototype.maxDecodedLength = function(u) {
@@ -1698,9 +1700,9 @@ function Zi() {
1698
1700
  }, x.prototype.decode = function(u) {
1699
1701
  if (u.length === 0)
1700
1702
  return new Uint8Array(0);
1701
- for (var p = this._getPaddingLength(u), C = u.length - p, P = new Uint8Array(this.maxDecodedLength(C)), W = 0, z = 0, U = 0, K = 0, M = 0, q = 0, X = 0; z < C - 4; z += 4)
1702
- K = this._decodeChar(u.charCodeAt(z + 0)), M = this._decodeChar(u.charCodeAt(z + 1)), q = this._decodeChar(u.charCodeAt(z + 2)), X = this._decodeChar(u.charCodeAt(z + 3)), P[W++] = K << 2 | M >>> 4, P[W++] = M << 4 | q >>> 2, P[W++] = q << 6 | X, U |= K & E, U |= M & E, U |= q & E, U |= X & E;
1703
- if (z < C - 1 && (K = this._decodeChar(u.charCodeAt(z)), M = this._decodeChar(u.charCodeAt(z + 1)), P[W++] = K << 2 | M >>> 4, U |= K & E, U |= M & E), z < C - 2 && (q = this._decodeChar(u.charCodeAt(z + 2)), P[W++] = M << 4 | q >>> 2, U |= q & E), z < C - 3 && (X = this._decodeChar(u.charCodeAt(z + 3)), P[W++] = q << 6 | X, U |= X & E), U !== 0)
1703
+ for (var p = this._getPaddingLength(u), C = u.length - p, P = new Uint8Array(this.maxDecodedLength(C)), H = 0, z = 0, O = 0, V = 0, M = 0, q = 0, X = 0; z < C - 4; z += 4)
1704
+ V = this._decodeChar(u.charCodeAt(z + 0)), M = this._decodeChar(u.charCodeAt(z + 1)), q = this._decodeChar(u.charCodeAt(z + 2)), X = this._decodeChar(u.charCodeAt(z + 3)), P[H++] = V << 2 | M >>> 4, P[H++] = M << 4 | q >>> 2, P[H++] = q << 6 | X, O |= V & E, O |= M & E, O |= q & E, O |= X & E;
1705
+ if (z < C - 1 && (V = this._decodeChar(u.charCodeAt(z)), M = this._decodeChar(u.charCodeAt(z + 1)), P[H++] = V << 2 | M >>> 4, O |= V & E, O |= M & E), z < C - 2 && (q = this._decodeChar(u.charCodeAt(z + 2)), P[H++] = M << 4 | q >>> 2, O |= q & E), z < C - 3 && (X = this._decodeChar(u.charCodeAt(z + 3)), P[H++] = q << 6 | X, O |= X & E), O !== 0)
1704
1706
  throw new Error("Base64Coder: incorrect characters for decoding");
1705
1707
  return P;
1706
1708
  }, x.prototype._encodeByte = function(u) {
@@ -1721,20 +1723,20 @@ function Zi() {
1721
1723
  }, x;
1722
1724
  })()
1723
1725
  );
1724
- v.Coder = S;
1725
- var I = new S();
1726
- function k(x) {
1727
- return I.encode(x);
1726
+ v.Coder = k;
1727
+ var W = new k();
1728
+ function S(x) {
1729
+ return W.encode(x);
1728
1730
  }
1729
- v.encode = k;
1731
+ v.encode = S;
1730
1732
  function A(x) {
1731
- return I.decode(x);
1733
+ return W.decode(x);
1732
1734
  }
1733
1735
  v.decode = A;
1734
1736
  var B = (
1735
1737
  /** @class */
1736
1738
  (function(x) {
1737
- y(u, x);
1739
+ b(u, x);
1738
1740
  function u() {
1739
1741
  return x !== null && x.apply(this, arguments) || this;
1740
1742
  }
@@ -1745,77 +1747,77 @@ function Zi() {
1745
1747
  var C = E;
1746
1748
  return C += (44 - p & p - 46) >>> 8 & -E + p - 45 + 62, C += (94 - p & p - 96) >>> 8 & -E + p - 95 + 63, C += (47 - p & p - 58) >>> 8 & -E + p - 48 + 52, C += (64 - p & p - 91) >>> 8 & -E + p - 65 + 0, C += (96 - p & p - 123) >>> 8 & -E + p - 97 + 26, C;
1747
1749
  }, u;
1748
- })(S)
1750
+ })(k)
1749
1751
  );
1750
1752
  v.URLSafeCoder = B;
1751
- var H = new B();
1753
+ var I = new B();
1752
1754
  function D(x) {
1753
- return H.encode(x);
1755
+ return I.encode(x);
1754
1756
  }
1755
1757
  v.encodeURLSafe = D;
1756
1758
  function te(x) {
1757
- return H.decode(x);
1759
+ return I.decode(x);
1758
1760
  }
1759
1761
  v.decodeURLSafe = te, v.encodedLength = function(x) {
1760
- return I.encodedLength(x);
1762
+ return W.encodedLength(x);
1761
1763
  }, v.maxDecodedLength = function(x) {
1762
- return I.maxDecodedLength(x);
1764
+ return W.maxDecodedLength(x);
1763
1765
  }, v.decodedLength = function(x) {
1764
- return I.decodedLength(x);
1766
+ return W.decodedLength(x);
1765
1767
  };
1766
1768
  },
1767
1769
  /***/
1768
1770
  978(m, v) {
1769
- var y = "utf8: invalid source encoding";
1770
- function E(S) {
1771
- for (var I = [], k = 0; k < S.length; k++) {
1772
- var A = S[k];
1771
+ var b = "utf8: invalid source encoding";
1772
+ function E(k) {
1773
+ for (var W = [], S = 0; S < k.length; S++) {
1774
+ var A = k[S];
1773
1775
  if (A & 128) {
1774
1776
  var B = void 0;
1775
1777
  if (A < 224) {
1776
- if (k >= S.length)
1777
- throw new Error(y);
1778
- var H = S[++k];
1779
- if ((H & 192) !== 128)
1780
- throw new Error(y);
1781
- A = (A & 31) << 6 | H & 63, B = 128;
1778
+ if (S >= k.length)
1779
+ throw new Error(b);
1780
+ var I = k[++S];
1781
+ if ((I & 192) !== 128)
1782
+ throw new Error(b);
1783
+ A = (A & 31) << 6 | I & 63, B = 128;
1782
1784
  } else if (A < 240) {
1783
- if (k >= S.length - 1)
1784
- throw new Error(y);
1785
- var H = S[++k], D = S[++k];
1786
- if ((H & 192) !== 128 || (D & 192) !== 128)
1787
- throw new Error(y);
1788
- A = (A & 15) << 12 | (H & 63) << 6 | D & 63, B = 2048;
1785
+ if (S >= k.length - 1)
1786
+ throw new Error(b);
1787
+ var I = k[++S], D = k[++S];
1788
+ if ((I & 192) !== 128 || (D & 192) !== 128)
1789
+ throw new Error(b);
1790
+ A = (A & 15) << 12 | (I & 63) << 6 | D & 63, B = 2048;
1789
1791
  } else if (A < 248) {
1790
- if (k >= S.length - 2)
1791
- throw new Error(y);
1792
- var H = S[++k], D = S[++k], te = S[++k];
1793
- if ((H & 192) !== 128 || (D & 192) !== 128 || (te & 192) !== 128)
1794
- throw new Error(y);
1795
- A = (A & 15) << 18 | (H & 63) << 12 | (D & 63) << 6 | te & 63, B = 65536;
1792
+ if (S >= k.length - 2)
1793
+ throw new Error(b);
1794
+ var I = k[++S], D = k[++S], te = k[++S];
1795
+ if ((I & 192) !== 128 || (D & 192) !== 128 || (te & 192) !== 128)
1796
+ throw new Error(b);
1797
+ A = (A & 15) << 18 | (I & 63) << 12 | (D & 63) << 6 | te & 63, B = 65536;
1796
1798
  } else
1797
- throw new Error(y);
1799
+ throw new Error(b);
1798
1800
  if (A < B || A >= 55296 && A <= 57343)
1799
- throw new Error(y);
1801
+ throw new Error(b);
1800
1802
  if (A >= 65536) {
1801
1803
  if (A > 1114111)
1802
- throw new Error(y);
1803
- A -= 65536, I.push(String.fromCharCode(55296 | A >> 10)), A = 56320 | A & 1023;
1804
+ throw new Error(b);
1805
+ A -= 65536, W.push(String.fromCharCode(55296 | A >> 10)), A = 56320 | A & 1023;
1804
1806
  }
1805
1807
  }
1806
- I.push(String.fromCharCode(A));
1808
+ W.push(String.fromCharCode(A));
1807
1809
  }
1808
- return I.join("");
1810
+ return W.join("");
1809
1811
  }
1810
1812
  v.D4 = E;
1811
1813
  },
1812
1814
  /***/
1813
- 721(m, v, y) {
1814
- m.exports = y(207).default;
1815
+ 721(m, v, b) {
1816
+ m.exports = b(207).default;
1815
1817
  },
1816
1818
  /***/
1817
- 207(m, v, y) {
1818
- y.d(v, {
1819
+ 207(m, v, b) {
1820
+ b.d(v, {
1819
1821
  default: () => (
1820
1822
  /* binding */
1821
1823
  le
@@ -1836,7 +1838,7 @@ function Zi() {
1836
1838
  delete this[e.number];
1837
1839
  }
1838
1840
  }
1839
- var S = new E("_pusher_script_", "Pusher.ScriptReceivers"), I = {
1841
+ var k = new E("_pusher_script_", "Pusher.ScriptReceivers"), W = {
1840
1842
  VERSION: "8.5.0",
1841
1843
  PROTOCOL: 7,
1842
1844
  wsPort: 80,
@@ -1864,10 +1866,10 @@ function Zi() {
1864
1866
  cdn_https: "https://js.pusher.com",
1865
1867
  dependency_suffix: ""
1866
1868
  };
1867
- const k = I;
1869
+ const S = W;
1868
1870
  class A {
1869
1871
  constructor(e) {
1870
- this.options = e, this.receivers = e.receivers || S, this.loading = {};
1872
+ this.options = e, this.receivers = e.receivers || k, this.loading = {};
1871
1873
  }
1872
1874
  load(e, t, r) {
1873
1875
  var o = this;
@@ -1877,12 +1879,12 @@ function Zi() {
1877
1879
  o.loading[e] = [r];
1878
1880
  var c = w.createScriptRequest(o.getPath(e, t)), h = o.receivers.create(function(f) {
1879
1881
  if (o.receivers.remove(h), o.loading[e]) {
1880
- var b = o.loading[e];
1882
+ var y = o.loading[e];
1881
1883
  delete o.loading[e];
1882
- for (var T = function(R) {
1883
- R || c.cleanup();
1884
- }, _ = 0; _ < b.length; _++)
1885
- b[_](f, T);
1884
+ for (var T = function(L) {
1885
+ L || c.cleanup();
1886
+ }, _ = 0; _ < y.length; _++)
1887
+ y[_](f, T);
1886
1888
  }
1887
1889
  });
1888
1890
  c.send(h);
@@ -1896,11 +1898,11 @@ function Zi() {
1896
1898
  return this.getRoot(t) + "/" + e + this.options.suffix + ".js";
1897
1899
  }
1898
1900
  }
1899
- var B = new E("_pusher_dependencies", "Pusher.DependenciesReceivers"), H = new A({
1900
- cdn_http: k.cdn_http,
1901
- cdn_https: k.cdn_https,
1902
- version: k.VERSION,
1903
- suffix: k.dependency_suffix,
1901
+ var B = new E("_pusher_dependencies", "Pusher.DependenciesReceivers"), I = new A({
1902
+ cdn_http: S.cdn_http,
1903
+ cdn_https: S.cdn_https,
1904
+ version: S.VERSION,
1905
+ suffix: S.dependency_suffix,
1904
1906
  receivers: B
1905
1907
  });
1906
1908
  const D = {
@@ -1948,7 +1950,7 @@ function Zi() {
1948
1950
  super(e), Object.setPrototypeOf(this, new.target.prototype);
1949
1951
  }
1950
1952
  }
1951
- class W extends Error {
1953
+ class H extends Error {
1952
1954
  constructor(e) {
1953
1955
  super(e), Object.setPrototypeOf(this, new.target.prototype);
1954
1956
  }
@@ -1958,12 +1960,12 @@ function Zi() {
1958
1960
  super(e), Object.setPrototypeOf(this, new.target.prototype);
1959
1961
  }
1960
1962
  }
1961
- class U extends Error {
1963
+ class O extends Error {
1962
1964
  constructor(e) {
1963
1965
  super(e), Object.setPrototypeOf(this, new.target.prototype);
1964
1966
  }
1965
1967
  }
1966
- class K extends Error {
1968
+ class V extends Error {
1967
1969
  constructor(e) {
1968
1970
  super(e), Object.setPrototypeOf(this, new.target.prototype);
1969
1971
  }
@@ -1991,13 +1993,13 @@ function Zi() {
1991
1993
  return c.onreadystatechange = function() {
1992
1994
  if (c.readyState === 4)
1993
1995
  if (c.status === 200) {
1994
- let f, b = !1;
1996
+ let f, y = !1;
1995
1997
  try {
1996
- f = JSON.parse(c.responseText), b = !0;
1998
+ f = JSON.parse(c.responseText), y = !0;
1997
1999
  } catch {
1998
2000
  o(new q(200, `JSON returned from ${r.toString()} endpoint was invalid, yet status code was 200. Data was: ${c.responseText}`), null);
1999
2001
  }
2000
- b && o(null, f);
2002
+ y && o(null, f);
2001
2003
  } else {
2002
2004
  let f = "";
2003
2005
  switch (r) {
@@ -2012,15 +2014,15 @@ function Zi() {
2012
2014
  }
2013
2015
  }, c.send(e), c;
2014
2016
  };
2015
- function It(n) {
2017
+ function Wt(n) {
2016
2018
  return zt(Nt(n));
2017
2019
  }
2018
- var ne = String.fromCharCode, oe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Wt = function(n) {
2020
+ var ne = String.fromCharCode, oe = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ht = function(n) {
2019
2021
  var e = n.charCodeAt(0);
2020
2022
  return e < 128 ? n : e < 2048 ? ne(192 | e >>> 6) + ne(128 | e & 63) : ne(224 | e >>> 12 & 15) + ne(128 | e >>> 6 & 63) + ne(128 | e & 63);
2021
2023
  }, Nt = function(n) {
2022
- return n.replace(/[^\x00-\x7F]/g, Wt);
2023
- }, Ht = function(n) {
2024
+ return n.replace(/[^\x00-\x7F]/g, Ht);
2025
+ }, It = function(n) {
2024
2026
  var e = [0, 2, 1][n.length % 3], t = n.charCodeAt(0) << 16 | (n.length > 1 ? n.charCodeAt(1) : 0) << 8 | (n.length > 2 ? n.charCodeAt(2) : 0), r = [
2025
2027
  oe.charAt(t >>> 18),
2026
2028
  oe.charAt(t >>> 12 & 63),
@@ -2029,9 +2031,9 @@ function Zi() {
2029
2031
  ];
2030
2032
  return r.join("");
2031
2033
  }, zt = window.btoa || function(n) {
2032
- return n.replace(/[\s\S]{1,3}/g, Ht);
2034
+ return n.replace(/[\s\S]{1,3}/g, It);
2033
2035
  };
2034
- class Ot {
2036
+ class Ut {
2035
2037
  constructor(e, t, r, o) {
2036
2038
  this.clear = t, this.timer = e(() => {
2037
2039
  this.timer && (this.timer = o(this.timer));
@@ -2044,21 +2046,21 @@ function Zi() {
2044
2046
  this.timer && (this.clear(this.timer), this.timer = null);
2045
2047
  }
2046
2048
  }
2047
- const Ue = Ot;
2048
- function Ut(n) {
2049
+ const Oe = Ut;
2050
+ function Ot(n) {
2049
2051
  window.clearTimeout(n);
2050
2052
  }
2051
2053
  function qt(n) {
2052
2054
  window.clearInterval(n);
2053
2055
  }
2054
- class J extends Ue {
2056
+ class J extends Oe {
2055
2057
  constructor(e, t) {
2056
- super(setTimeout, Ut, e, function(r) {
2058
+ super(setTimeout, Ot, e, function(r) {
2057
2059
  return t(), null;
2058
2060
  });
2059
2061
  }
2060
2062
  }
2061
- class Mt extends Ue {
2063
+ class Mt extends Oe {
2062
2064
  constructor(e, t) {
2063
2065
  super(setInterval, qt, e, function(r) {
2064
2066
  return t(), r;
@@ -2080,11 +2082,11 @@ function Zi() {
2080
2082
  }
2081
2083
  };
2082
2084
  const N = Bt;
2083
- function O(n, ...e) {
2085
+ function U(n, ...e) {
2084
2086
  for (var t = 0; t < e.length; t++) {
2085
2087
  var r = e[t];
2086
2088
  for (var o in r)
2087
- r[o] && r[o].constructor && r[o].constructor === Object ? n[o] = O(n[o] || {}, r[o]) : n[o] = r[o];
2089
+ r[o] && r[o].constructor && r[o].constructor === Object ? n[o] = U(n[o] || {}, r[o]) : n[o] = r[o];
2088
2090
  }
2089
2091
  return n;
2090
2092
  }
@@ -2161,27 +2163,27 @@ function Zi() {
2161
2163
  return !0;
2162
2164
  return !1;
2163
2165
  }
2164
- function Vt(n, e) {
2166
+ function Kt(n, e) {
2165
2167
  for (var t = 0; t < n.length; t++)
2166
2168
  if (!e(n[t], t, n))
2167
2169
  return !1;
2168
2170
  return !0;
2169
2171
  }
2170
- function Kt(n) {
2172
+ function Vt(n) {
2171
2173
  return $t(n, function(e) {
2172
- return typeof e == "object" && (e = ae(e)), encodeURIComponent(It(e.toString()));
2174
+ return typeof e == "object" && (e = ae(e)), encodeURIComponent(Wt(e.toString()));
2173
2175
  });
2174
2176
  }
2175
2177
  function Xt(n) {
2176
2178
  var e = Fe(n, function(r) {
2177
2179
  return r !== void 0;
2178
- }), t = Be(Gt(Kt(e)), N.method("join", "=")).join("&");
2180
+ }), t = Be(Gt(Vt(e)), N.method("join", "=")).join("&");
2179
2181
  return t;
2180
2182
  }
2181
2183
  function Jt(n) {
2182
2184
  var e = [], t = [];
2183
2185
  return (function r(o, c) {
2184
- var h, f, b;
2186
+ var h, f, y;
2185
2187
  switch (typeof o) {
2186
2188
  case "object":
2187
2189
  if (!o)
@@ -2190,14 +2192,14 @@ function Zi() {
2190
2192
  if (e[h] === o)
2191
2193
  return { $ref: t[h] };
2192
2194
  if (e.push(o), t.push(c), Object.prototype.toString.apply(o) === "[object Array]")
2193
- for (b = [], h = 0; h < o.length; h += 1)
2194
- b[h] = r(o[h], c + "[" + h + "]");
2195
+ for (y = [], h = 0; h < o.length; h += 1)
2196
+ y[h] = r(o[h], c + "[" + h + "]");
2195
2197
  else {
2196
- b = {};
2198
+ y = {};
2197
2199
  for (f in o)
2198
- Object.prototype.hasOwnProperty.call(o, f) && (b[f] = r(o[f], c + "[" + JSON.stringify(f) + "]"));
2200
+ Object.prototype.hasOwnProperty.call(o, f) && (y[f] = r(o[f], c + "[" + JSON.stringify(f) + "]"));
2199
2201
  }
2200
- return b;
2202
+ return y;
2201
2203
  case "number":
2202
2204
  case "string":
2203
2205
  case "boolean":
@@ -2238,17 +2240,17 @@ function Zi() {
2238
2240
  le.log ? le.log(r) : le.logToConsole && e.bind(this)(r);
2239
2241
  }
2240
2242
  }
2241
- const L = new Yt();
2243
+ const R = new Yt();
2242
2244
  var Zt = function(n, e, t, r, o) {
2243
- (t.headers !== void 0 || t.headersProvider != null) && L.warn(`To send headers with the ${r.toString()} request, you must use AJAX, rather than JSONP.`);
2245
+ (t.headers !== void 0 || t.headersProvider != null) && R.warn(`To send headers with the ${r.toString()} request, you must use AJAX, rather than JSONP.`);
2244
2246
  var c = n.nextAuthCallbackID.toString();
2245
2247
  n.nextAuthCallbackID++;
2246
2248
  var h = n.getDocument(), f = h.createElement("script");
2247
2249
  n.auth_callbacks[c] = function(_) {
2248
2250
  o(null, _);
2249
2251
  };
2250
- var b = "Pusher.auth_callbacks['" + c + "']";
2251
- f.src = t.endpoint + "?callback=" + encodeURIComponent(b) + "&" + e;
2252
+ var y = "Pusher.auth_callbacks['" + c + "']";
2253
+ f.src = t.endpoint + "?callback=" + encodeURIComponent(y) + "&" + e;
2252
2254
  var T = h.getElementsByTagName("head")[0] || h.documentElement;
2253
2255
  T.insertBefore(f, T.firstChild);
2254
2256
  };
@@ -2289,8 +2291,8 @@ function Zi() {
2289
2291
  }
2290
2292
  var nn = function(n, e) {
2291
2293
  return function(t, r) {
2292
- var o = "http" + (e ? "s" : "") + "://", c = o + (n.host || n.options.host) + n.options.path, h = w.createJSONPRequest(c, t), f = w.ScriptReceivers.create(function(b, T) {
2293
- S.remove(f), h.cleanup(), T && T.host && (n.host = T.host), r && r(b, T);
2294
+ var o = "http" + (e ? "s" : "") + "://", c = o + (n.host || n.options.host) + n.options.path, h = w.createJSONPRequest(c, t), f = w.ScriptReceivers.create(function(y, T) {
2295
+ k.remove(f), h.cleanup(), T && T.host && (n.host = T.host), r && r(y, T);
2294
2296
  });
2295
2297
  h.send(f);
2296
2298
  };
@@ -2299,30 +2301,30 @@ function Zi() {
2299
2301
  getAgent: nn
2300
2302
  };
2301
2303
  const sn = rn;
2302
- function ye(n, e, t) {
2304
+ function be(n, e, t) {
2303
2305
  var r = n + (e.useTLS ? "s" : ""), o = e.useTLS ? e.hostTLS : e.hostNonTLS;
2304
2306
  return r + "://" + o + t;
2305
2307
  }
2306
- function be(n, e) {
2307
- var t = "/app/" + n, r = "?protocol=" + k.PROTOCOL + "&client=js&version=" + k.VERSION + (e ? "&" + e : "");
2308
+ function ye(n, e) {
2309
+ var t = "/app/" + n, r = "?protocol=" + S.PROTOCOL + "&client=js&version=" + S.VERSION + (e ? "&" + e : "");
2308
2310
  return t + r;
2309
2311
  }
2310
2312
  var on = {
2311
2313
  getInitial: function(n, e) {
2312
- var t = (e.httpPath || "") + be(n, "flash=false");
2313
- return ye("ws", e, t);
2314
+ var t = (e.httpPath || "") + ye(n, "flash=false");
2315
+ return be("ws", e, t);
2314
2316
  }
2315
2317
  }, an = {
2316
2318
  getInitial: function(n, e) {
2317
- var t = (e.httpPath || "/pusher") + be(n);
2318
- return ye("http", e, t);
2319
+ var t = (e.httpPath || "/pusher") + ye(n);
2320
+ return be("http", e, t);
2319
2321
  }
2320
2322
  }, cn = {
2321
2323
  getInitial: function(n, e) {
2322
- return ye("http", e, e.httpPath || "/pusher");
2324
+ return be("http", e, e.httpPath || "/pusher");
2323
2325
  },
2324
2326
  getPath: function(n, e) {
2325
- return be(n);
2327
+ return ye(n);
2326
2328
  }
2327
2329
  };
2328
2330
  class dn {
@@ -2414,7 +2416,7 @@ function Zi() {
2414
2416
  this.onError(t), this.changeState("closed");
2415
2417
  }), !1;
2416
2418
  }
2417
- return this.bindListeners(), L.debug("Connecting", { transport: this.name, url: e }), this.changeState("connecting"), !0;
2419
+ return this.bindListeners(), R.debug("Connecting", { transport: this.name, url: e }), this.changeState("connecting"), !0;
2418
2420
  }
2419
2421
  close() {
2420
2422
  return this.socket ? (this.socket.close(), !0) : !1;
@@ -2469,7 +2471,7 @@ function Zi() {
2469
2471
  })), this.emit(e, t);
2470
2472
  }
2471
2473
  buildTimelineMessage(e) {
2472
- return O({ cid: this.id }, e);
2474
+ return U({ cid: this.id }, e);
2473
2475
  }
2474
2476
  }
2475
2477
  class ee {
@@ -2503,11 +2505,11 @@ function Zi() {
2503
2505
  isInitialized: function() {
2504
2506
  return !0;
2505
2507
  }
2506
- }, Ve = O({
2508
+ }, Ke = U({
2507
2509
  getSocket: function(n) {
2508
2510
  return w.HTTPFactory.createStreamingSocket(n);
2509
2511
  }
2510
- }, Ge), Ke = O({
2512
+ }, Ge), Ve = U({
2511
2513
  getSocket: function(n) {
2512
2514
  return w.HTTPFactory.createPollingSocket(n);
2513
2515
  }
@@ -2515,7 +2517,7 @@ function Zi() {
2515
2517
  isSupported: function() {
2516
2518
  return w.isXHRSupported();
2517
2519
  }
2518
- }, un = new ee(O({}, Ve, Xe)), pn = new ee(O({}, Ke, Xe)), fn = {
2520
+ }, un = new ee(U({}, Ke, Xe)), pn = new ee(U({}, Ve, Xe)), fn = {
2519
2521
  ws: ln,
2520
2522
  xhr_streaming: un,
2521
2523
  xhr_polling: pn
@@ -2534,7 +2536,7 @@ function Zi() {
2534
2536
  },
2535
2537
  getSocket: function(n, e) {
2536
2538
  return new window.SockJS(n, null, {
2537
- js_path: H.getPath("sockjs", {
2539
+ js_path: I.getPath("sockjs", {
2538
2540
  useTLS: e.useTLS
2539
2541
  }),
2540
2542
  ignore_null_origin: e.ignoreNullOrigin
@@ -2550,10 +2552,10 @@ function Zi() {
2550
2552
  var e = w.isXDRSupported(n.useTLS);
2551
2553
  return e;
2552
2554
  }
2553
- }, gn = new ee(O({}, Ve, Je)), vn = new ee(O({}, Ke, Je));
2555
+ }, gn = new ee(U({}, Ke, Je)), vn = new ee(U({}, Ve, Je));
2554
2556
  ce.xdr_streaming = gn, ce.xdr_polling = vn, ce.sockjs = mn;
2555
- const yn = ce;
2556
- class bn extends G {
2557
+ const bn = ce;
2558
+ class yn extends G {
2557
2559
  constructor() {
2558
2560
  super();
2559
2561
  var e = this;
@@ -2567,19 +2569,19 @@ function Zi() {
2567
2569
  return window.navigator.onLine === void 0 ? !0 : window.navigator.onLine;
2568
2570
  }
2569
2571
  }
2570
- var wn = new bn();
2572
+ var wn = new yn();
2571
2573
  class Cn {
2572
2574
  constructor(e, t, r) {
2573
2575
  this.manager = e, this.transport = t, this.minPingDelay = r.minPingDelay, this.maxPingDelay = r.maxPingDelay, this.pingDelay = void 0;
2574
2576
  }
2575
2577
  createConnection(e, t, r, o) {
2576
- o = O({}, o, {
2578
+ o = U({}, o, {
2577
2579
  activityTimeout: this.pingDelay
2578
2580
  });
2579
2581
  var c = this.transport.createConnection(e, t, r, o), h = null, f = function() {
2580
- c.unbind("open", f), c.bind("closed", b), h = N.now();
2581
- }, b = (T) => {
2582
- if (c.unbind("closed", b), T.code === 1002 || T.code === 1003)
2582
+ c.unbind("open", f), c.bind("closed", y), h = N.now();
2583
+ }, y = (T) => {
2584
+ if (c.unbind("closed", y), T.code === 1002 || T.code === 1003)
2583
2585
  this.manager.reportDeath();
2584
2586
  else if (!T.wasClean && h) {
2585
2587
  var _ = N.now() - h;
@@ -2646,7 +2648,7 @@ function Zi() {
2646
2648
  } : null;
2647
2649
  }
2648
2650
  }, Y = Ye;
2649
- class Sn extends G {
2651
+ class kn extends G {
2650
2652
  constructor(e, t) {
2651
2653
  super(), this.id = e, this.transport = t, this.activityTimeout = t.activityTimeout, this.bindListeners();
2652
2654
  }
@@ -2658,7 +2660,7 @@ function Zi() {
2658
2660
  }
2659
2661
  send_event(e, t, r) {
2660
2662
  var o = { event: e, data: t };
2661
- return r && (o.channel = r), L.debug("Event sent", o), this.send(Y.encodeMessage(o));
2663
+ return r && (o.channel = r), R.debug("Event sent", o), this.send(Y.encodeMessage(o));
2662
2664
  }
2663
2665
  ping() {
2664
2666
  this.transport.supportsPing() ? this.transport.ping() : this.send_event("pusher:ping", {});
@@ -2680,7 +2682,7 @@ function Zi() {
2680
2682
  });
2681
2683
  }
2682
2684
  if (o !== void 0) {
2683
- switch (L.debug("Event recd", o), o.event) {
2685
+ switch (R.debug("Event recd", o), o.event) {
2684
2686
  case "pusher:error":
2685
2687
  this.emit("error", {
2686
2688
  type: "PusherError",
@@ -2720,7 +2722,7 @@ function Zi() {
2720
2722
  r && this.emit("error", r), t && this.emit(t, { action: t, error: r });
2721
2723
  }
2722
2724
  }
2723
- class kn {
2725
+ class Sn {
2724
2726
  constructor(e, t) {
2725
2727
  this.transport = e, this.callback = t, this.bindListeners();
2726
2728
  }
@@ -2738,7 +2740,7 @@ function Zi() {
2738
2740
  return;
2739
2741
  }
2740
2742
  t.action === "connected" ? this.finish("connected", {
2741
- connection: new Sn(t.id, this.transport),
2743
+ connection: new kn(t.id, this.transport),
2742
2744
  activityTimeout: t.activityTimeout
2743
2745
  }) : (this.finish(t.action, { error: t.error }), this.transport.close());
2744
2746
  }, this.onClosed = (e) => {
@@ -2751,7 +2753,7 @@ function Zi() {
2751
2753
  this.transport.unbind("message", this.onMessage), this.transport.unbind("closed", this.onClosed);
2752
2754
  }
2753
2755
  finish(e, t) {
2754
- this.callback(O({ transport: this.transport, action: e }, t));
2756
+ this.callback(U({ transport: this.transport, action: e }, t));
2755
2757
  }
2756
2758
  }
2757
2759
  class xn {
@@ -2765,7 +2767,7 @@ function Zi() {
2765
2767
  class Ce extends G {
2766
2768
  constructor(e, t) {
2767
2769
  super(function(r, o) {
2768
- L.debug("No callbacks on " + e + " for " + r);
2770
+ R.debug("No callbacks on " + e + " for " + r);
2769
2771
  }), this.name = e, this.pusher = t, this.subscribed = !1, this.subscriptionPending = !1, this.subscriptionCancelled = !1;
2770
2772
  }
2771
2773
  authorize(e, t) {
@@ -2776,7 +2778,7 @@ function Zi() {
2776
2778
  throw new p("Event '" + e + "' does not start with 'client-'");
2777
2779
  if (!this.subscribed) {
2778
2780
  var r = x.buildLogSuffix("triggeringClientEvents");
2779
- L.warn(`Client event triggered before channel 'subscription_succeeded' event . ${r}`);
2781
+ R.warn(`Client event triggered before channel 'subscription_succeeded' event . ${r}`);
2780
2782
  }
2781
2783
  return this.pusher.send_event(e, t, this.name);
2782
2784
  }
@@ -2802,7 +2804,7 @@ function Zi() {
2802
2804
  }
2803
2805
  subscribe() {
2804
2806
  this.subscribed || (this.subscriptionPending = !0, this.subscriptionCancelled = !1, this.authorize(this.pusher.connection.socket_id, (e, t) => {
2805
- e ? (this.subscriptionPending = !1, L.error(e.toString()), this.emit("pusher:subscription_error", Object.assign({}, {
2807
+ e ? (this.subscriptionPending = !1, R.error(e.toString()), this.emit("pusher:subscription_error", Object.assign({}, {
2806
2808
  type: "AuthError",
2807
2809
  error: e.message
2808
2810
  }, e instanceof q ? { status: e.status } : {}))) : this.pusher.send_event("pusher:subscribe", {
@@ -2824,7 +2826,7 @@ function Zi() {
2824
2826
  this.subscriptionCancelled = !1;
2825
2827
  }
2826
2828
  }
2827
- class Se extends Ce {
2829
+ class ke extends Ce {
2828
2830
  authorize(e, t) {
2829
2831
  return this.pusher.config.channelAuthorizer({
2830
2832
  channelName: this.name,
@@ -2874,24 +2876,24 @@ function Zi() {
2874
2876
  function f(_) {
2875
2877
  try {
2876
2878
  T(r.next(_));
2877
- } catch (R) {
2878
- h(R);
2879
+ } catch (L) {
2880
+ h(L);
2879
2881
  }
2880
2882
  }
2881
- function b(_) {
2883
+ function y(_) {
2882
2884
  try {
2883
2885
  T(r.throw(_));
2884
- } catch (R) {
2885
- h(R);
2886
+ } catch (L) {
2887
+ h(L);
2886
2888
  }
2887
2889
  }
2888
2890
  function T(_) {
2889
- _.done ? c(_.value) : o(_.value).then(f, b);
2891
+ _.done ? c(_.value) : o(_.value).then(f, y);
2890
2892
  }
2891
2893
  T((r = r.apply(n, e || [])).next());
2892
2894
  });
2893
2895
  };
2894
- class _n extends Se {
2896
+ class _n extends ke {
2895
2897
  constructor(e, t) {
2896
2898
  super(e, t), this.members = new En();
2897
2899
  }
@@ -2905,7 +2907,7 @@ function Zi() {
2905
2907
  this.members.setMyID(this.pusher.user.user_data.id);
2906
2908
  else {
2907
2909
  let h = x.buildLogSuffix("authorizationEndpoint");
2908
- L.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${h}, or the user should be signed in.`), t("Invalid auth response");
2910
+ R.error(`Invalid auth response for channel '${this.name}', expected 'channel_data' field. ${h}, or the user should be signed in.`), t("Invalid auth response");
2909
2911
  return;
2910
2912
  }
2911
2913
  t(r, o);
@@ -2946,8 +2948,8 @@ function Zi() {
2946
2948
  this.members.reset(), super.disconnect();
2947
2949
  }
2948
2950
  }
2949
- var An = y(978), ke = y(594);
2950
- class Pn extends Se {
2951
+ var An = b(978), Se = b(594);
2952
+ class Pn extends ke {
2951
2953
  constructor(e, t, r) {
2952
2954
  super(e, t), this.key = null, this.nacl = r;
2953
2955
  }
@@ -2962,11 +2964,11 @@ function Zi() {
2962
2964
  t(new Error(`No shared_secret key in auth payload for encrypted channel: ${this.name}`), null);
2963
2965
  return;
2964
2966
  }
2965
- this.key = (0, ke.decode)(c), delete o.shared_secret, t(null, o);
2967
+ this.key = (0, Se.decode)(c), delete o.shared_secret, t(null, o);
2966
2968
  });
2967
2969
  }
2968
2970
  trigger(e, t) {
2969
- throw new U("Client events are not currently supported for encrypted channels");
2971
+ throw new O("Client events are not currently supported for encrypted channels");
2970
2972
  }
2971
2973
  handleEvent(e) {
2972
2974
  var t = e.event, r = e.data;
@@ -2978,32 +2980,32 @@ function Zi() {
2978
2980
  }
2979
2981
  handleEncryptedEvent(e, t) {
2980
2982
  if (!this.key) {
2981
- L.debug("Received encrypted event before key has been retrieved from the authEndpoint");
2983
+ R.debug("Received encrypted event before key has been retrieved from the authEndpoint");
2982
2984
  return;
2983
2985
  }
2984
2986
  if (!t.ciphertext || !t.nonce) {
2985
- L.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: " + t);
2987
+ R.error("Unexpected format for encrypted event, expected object with `ciphertext` and `nonce` fields, got: " + t);
2986
2988
  return;
2987
2989
  }
2988
- let r = (0, ke.decode)(t.ciphertext);
2990
+ let r = (0, Se.decode)(t.ciphertext);
2989
2991
  if (r.length < this.nacl.secretbox.overheadLength) {
2990
- L.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${r.length}`);
2992
+ R.error(`Expected encrypted event ciphertext length to be ${this.nacl.secretbox.overheadLength}, got: ${r.length}`);
2991
2993
  return;
2992
2994
  }
2993
- let o = (0, ke.decode)(t.nonce);
2995
+ let o = (0, Se.decode)(t.nonce);
2994
2996
  if (o.length < this.nacl.secretbox.nonceLength) {
2995
- L.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${o.length}`);
2997
+ R.error(`Expected encrypted event nonce length to be ${this.nacl.secretbox.nonceLength}, got: ${o.length}`);
2996
2998
  return;
2997
2999
  }
2998
3000
  let c = this.nacl.secretbox.open(r, o, this.key);
2999
3001
  if (c === null) {
3000
- L.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."), this.authorize(this.pusher.connection.socket_id, (h, f) => {
3002
+ R.debug("Failed to decrypt an event, probably because it was encrypted with a different key. Fetching a new key from the authEndpoint..."), this.authorize(this.pusher.connection.socket_id, (h, f) => {
3001
3003
  if (h) {
3002
- L.error(`Failed to make a request to the authEndpoint: ${f}. Unable to fetch new key, so dropping encrypted event`);
3004
+ R.error(`Failed to make a request to the authEndpoint: ${f}. Unable to fetch new key, so dropping encrypted event`);
3003
3005
  return;
3004
3006
  }
3005
3007
  if (c = this.nacl.secretbox.open(r, o, this.key), c === null) {
3006
- L.error("Failed to decrypt event with new key. Dropping encrypted event");
3008
+ R.error("Failed to decrypt event with new key. Dropping encrypted event");
3007
3009
  return;
3008
3010
  }
3009
3011
  this.emit(e, this.getDataToEmit(c));
@@ -3021,7 +3023,7 @@ function Zi() {
3021
3023
  }
3022
3024
  }
3023
3025
  }
3024
- class Ln extends G {
3026
+ class Rn extends G {
3025
3027
  constructor(e, t) {
3026
3028
  super(), this.state = "initialized", this.connection = null, this.key = e, this.options = t, this.timeline = this.options.timeline, this.usingTLS = this.options.useTLS, this.errorCallbacks = this.buildErrorCallbacks(), this.connectionCallbacks = this.buildConnectionCallbacks(this.errorCallbacks), this.handshakeCallbacks = this.buildHandshakeCallbacks(this.errorCallbacks);
3027
3029
  var r = w.getNetwork();
@@ -3110,7 +3112,7 @@ function Zi() {
3110
3112
  this.activityTimer && this.activityTimer.ensureAborted();
3111
3113
  }
3112
3114
  buildConnectionCallbacks(e) {
3113
- return O({}, e, {
3115
+ return U({}, e, {
3114
3116
  message: (t) => {
3115
3117
  this.resetActivityCheck(), this.emit("message", t);
3116
3118
  },
@@ -3129,7 +3131,7 @@ function Zi() {
3129
3131
  });
3130
3132
  }
3131
3133
  buildHandshakeCallbacks(e) {
3132
- return O({}, e, {
3134
+ return U({}, e, {
3133
3135
  connected: (t) => {
3134
3136
  this.activityTimeout = Math.min(this.options.activityTimeout, t.activityTimeout, t.connection.activityTimeout || 1 / 0), this.clearUnavailableTimer(), this.setConnection(t.connection), this.socket_id = this.connection.id, this.updateState("connected", { socket_id: this.socket_id });
3135
3137
  }
@@ -3173,14 +3175,14 @@ function Zi() {
3173
3175
  var r = this.state;
3174
3176
  if (this.state = e, r !== e) {
3175
3177
  var o = e;
3176
- o === "connected" && (o += " with new socket ID " + t.socket_id), L.debug("State changed", r + " -> " + o), this.timeline.info({ state: e, params: t }), this.emit("state_change", { previous: r, current: e }), this.emit(e, t);
3178
+ o === "connected" && (o += " with new socket ID " + t.socket_id), R.debug("State changed", r + " -> " + o), this.timeline.info({ state: e, params: t }), this.emit("state_change", { previous: r, current: e }), this.emit(e, t);
3177
3179
  }
3178
3180
  }
3179
3181
  shouldRetry() {
3180
3182
  return this.state === "connecting" || this.state === "connected";
3181
3183
  }
3182
3184
  }
3183
- class Rn {
3185
+ class Ln {
3184
3186
  constructor() {
3185
3187
  this.channels = {};
3186
3188
  }
@@ -3206,31 +3208,31 @@ function Zi() {
3206
3208
  function jn(n, e) {
3207
3209
  if (n.indexOf("private-encrypted-") === 0) {
3208
3210
  if (e.config.nacl)
3209
- return V.createEncryptedChannel(n, e, e.config.nacl);
3211
+ return K.createEncryptedChannel(n, e, e.config.nacl);
3210
3212
  let t = "Tried to subscribe to a private-encrypted- channel but no nacl implementation available", r = x.buildLogSuffix("encryptedChannelSupport");
3211
- throw new U(`${t}. ${r}`);
3213
+ throw new O(`${t}. ${r}`);
3212
3214
  } else {
3213
3215
  if (n.indexOf("private-") === 0)
3214
- return V.createPrivateChannel(n, e);
3216
+ return K.createPrivateChannel(n, e);
3215
3217
  if (n.indexOf("presence-") === 0)
3216
- return V.createPresenceChannel(n, e);
3218
+ return K.createPresenceChannel(n, e);
3217
3219
  if (n.indexOf("#") === 0)
3218
3220
  throw new C('Cannot create a channel with name "' + n + '".');
3219
- return V.createChannel(n, e);
3221
+ return K.createChannel(n, e);
3220
3222
  }
3221
3223
  }
3222
- var In = {
3224
+ var Wn = {
3223
3225
  createChannels() {
3224
- return new Rn();
3226
+ return new Ln();
3225
3227
  },
3226
3228
  createConnectionManager(n, e) {
3227
- return new Ln(n, e);
3229
+ return new Rn(n, e);
3228
3230
  },
3229
3231
  createChannel(n, e) {
3230
3232
  return new Ce(n, e);
3231
3233
  },
3232
3234
  createPrivateChannel(n, e) {
3233
- return new Se(n, e);
3235
+ return new ke(n, e);
3234
3236
  },
3235
3237
  createPresenceChannel(n, e) {
3236
3238
  return new _n(n, e);
@@ -3242,19 +3244,19 @@ function Zi() {
3242
3244
  return new xn(n, e);
3243
3245
  },
3244
3246
  createHandshake(n, e) {
3245
- return new kn(n, e);
3247
+ return new Sn(n, e);
3246
3248
  },
3247
3249
  createAssistantToTheTransportManager(n, e, t) {
3248
3250
  return new Cn(n, e, t);
3249
3251
  }
3250
3252
  };
3251
- const V = In;
3253
+ const K = Wn;
3252
3254
  class Ze {
3253
3255
  constructor(e) {
3254
3256
  this.options = e || {}, this.livesLeft = this.options.lives || 1 / 0;
3255
3257
  }
3256
3258
  getAssistant(e) {
3257
- return V.createAssistantToTheTransportManager(this, e, {
3259
+ return K.createAssistantToTheTransportManager(this, e, {
3258
3260
  minPingDelay: this.options.minPingDelay,
3259
3261
  maxPingDelay: this.options.maxPingDelay
3260
3262
  });
@@ -3274,15 +3276,15 @@ function Zi() {
3274
3276
  return $e(this.strategies, N.method("isSupported"));
3275
3277
  }
3276
3278
  connect(e, t) {
3277
- var r = this.strategies, o = 0, c = this.timeout, h = null, f = (b, T) => {
3279
+ var r = this.strategies, o = 0, c = this.timeout, h = null, f = (y, T) => {
3278
3280
  T ? t(null, T) : (o = o + 1, this.loop && (o = o % r.length), o < r.length ? (c && (c = c * 2, this.timeoutLimit && (c = Math.min(c, this.timeoutLimit))), h = this.tryStrategy(r[o], e, { timeout: c, failFast: this.failFast }, f)) : t(!0));
3279
3281
  };
3280
3282
  return h = this.tryStrategy(r[o], e, { timeout: c, failFast: this.failFast }, f), {
3281
3283
  abort: function() {
3282
3284
  h.abort();
3283
3285
  },
3284
- forceMinPriority: function(b) {
3285
- e = b, h && h.forceMinPriority(b);
3286
+ forceMinPriority: function(y) {
3287
+ e = y, h && h.forceMinPriority(y);
3286
3288
  }
3287
3289
  };
3288
3290
  }
@@ -3290,8 +3292,8 @@ function Zi() {
3290
3292
  var c = null, h = null;
3291
3293
  return r.timeout > 0 && (c = new J(r.timeout, function() {
3292
3294
  h.abort(), o(!0);
3293
- })), h = e.connect(t, function(f, b) {
3294
- f && c && c.isRunning() && !r.failFast || (c && c.ensureAborted(), o(f, b));
3295
+ })), h = e.connect(t, function(f, y) {
3296
+ f && c && c.isRunning() && !r.failFast || (c && c.ensureAborted(), o(f, y));
3295
3297
  }), {
3296
3298
  abort: function() {
3297
3299
  c && c.ensureAborted(), h.abort();
@@ -3310,7 +3312,7 @@ function Zi() {
3310
3312
  return $e(this.strategies, N.method("isSupported"));
3311
3313
  }
3312
3314
  connect(e, t) {
3313
- return Wn(this.strategies, e, function(r, o) {
3315
+ return Hn(this.strategies, e, function(r, o) {
3314
3316
  return function(c, h) {
3315
3317
  if (o[r].error = c, c) {
3316
3318
  Nn(o) && t(!0);
@@ -3323,13 +3325,13 @@ function Zi() {
3323
3325
  });
3324
3326
  }
3325
3327
  }
3326
- function Wn(n, e, t) {
3328
+ function Hn(n, e, t) {
3327
3329
  var r = Be(n, function(o, c, h, f) {
3328
3330
  return o.connect(e, t(c, f));
3329
3331
  });
3330
3332
  return {
3331
3333
  abort: function() {
3332
- ie(r, Hn);
3334
+ ie(r, In);
3333
3335
  },
3334
3336
  forceMinPriority: function(o) {
3335
3337
  ie(r, function(c) {
@@ -3339,11 +3341,11 @@ function Zi() {
3339
3341
  };
3340
3342
  }
3341
3343
  function Nn(n) {
3342
- return Vt(n, function(e) {
3344
+ return Kt(n, function(e) {
3343
3345
  return !!e.error;
3344
3346
  });
3345
3347
  }
3346
- function Hn(n) {
3348
+ function In(n) {
3347
3349
  !n.error && !n.aborted && (n.abort(), n.aborted = !0);
3348
3350
  }
3349
3351
  class zn {
@@ -3354,7 +3356,7 @@ function Zi() {
3354
3356
  return this.strategy.isSupported();
3355
3357
  }
3356
3358
  connect(e, t) {
3357
- var r = this.usingTLS, o = On(r), c = o && o.cacheSkipCount ? o.cacheSkipCount : 0, h = [this.strategy];
3359
+ var r = this.usingTLS, o = Un(r), c = o && o.cacheSkipCount ? o.cacheSkipCount : 0, h = [this.strategy];
3358
3360
  if (o && o.timestamp + this.ttl >= N.now()) {
3359
3361
  var f = this.transports[o.transport];
3360
3362
  f && (["ws", "wss"].includes(o.transport) || c > 3 ? (this.timeline.info({
@@ -3366,8 +3368,8 @@ function Zi() {
3366
3368
  failFast: !0
3367
3369
  }))) : c++);
3368
3370
  }
3369
- var b = N.now(), T = h.pop().connect(e, function _(R, ue) {
3370
- R ? (Qe(r), h.length > 0 ? (b = N.now(), T = h.pop().connect(e, _)) : t(R)) : (Un(r, ue.transport.name, N.now() - b, c), t(null, ue));
3371
+ var y = N.now(), T = h.pop().connect(e, function _(L, ue) {
3372
+ L ? (Qe(r), h.length > 0 ? (y = N.now(), T = h.pop().connect(e, _)) : t(L)) : (On(r, ue.transport.name, N.now() - y, c), t(null, ue));
3371
3373
  });
3372
3374
  return {
3373
3375
  abort: function() {
@@ -3382,7 +3384,7 @@ function Zi() {
3382
3384
  function Ee(n) {
3383
3385
  return "pusherTransport" + (n ? "TLS" : "NonTLS");
3384
3386
  }
3385
- function On(n) {
3387
+ function Un(n) {
3386
3388
  var e = w.getLocalStorage();
3387
3389
  if (e)
3388
3390
  try {
@@ -3394,7 +3396,7 @@ function Zi() {
3394
3396
  }
3395
3397
  return null;
3396
3398
  }
3397
- function Un(n, e, t, r) {
3399
+ function On(n, e, t, r) {
3398
3400
  var o = w.getLocalStorage();
3399
3401
  if (o)
3400
3402
  try {
@@ -3470,8 +3472,8 @@ function Zi() {
3470
3472
  }
3471
3473
  var Mn = function(n, e, t) {
3472
3474
  var r = {};
3473
- function o(ut, Oi, Ui, qi, Mi) {
3474
- var pt = t(n, ut, Oi, Ui, qi, Mi);
3475
+ function o(ut, Ui, Oi, qi, Mi) {
3476
+ var pt = t(n, ut, Ui, Oi, qi, Mi);
3475
3477
  return r[ut] = pt, pt;
3476
3478
  }
3477
3479
  var c = Object.assign({}, e, {
@@ -3484,7 +3486,7 @@ function Zi() {
3484
3486
  hostNonTLS: n.httpHost + ":" + n.httpPort,
3485
3487
  hostTLS: n.httpHost + ":" + n.httpsPort,
3486
3488
  httpPath: n.httpPath
3487
- }), b = {
3489
+ }), y = {
3488
3490
  loop: !0,
3489
3491
  timeout: 15e3,
3490
3492
  timeoutLimit: 6e4
@@ -3495,24 +3497,24 @@ function Zi() {
3495
3497
  lives: 2,
3496
3498
  minPingDelay: 1e4,
3497
3499
  maxPingDelay: n.activityTimeout
3498
- }), R = o("ws", "ws", 3, c, T), ue = o("wss", "ws", 3, h, T), Ii = o("sockjs", "sockjs", 1, f), ot = o("xhr_streaming", "xhr_streaming", 1, f, _), Wi = o("xdr_streaming", "xdr_streaming", 1, f, _), at = o("xhr_polling", "xhr_polling", 1, f), Ni = o("xdr_polling", "xdr_polling", 1, f), ct = new Z([R], b), Hi = new Z([ue], b), zi = new Z([Ii], b), dt = new Z([
3499
- new re(se(ot), ot, Wi)
3500
- ], b), ht = new Z([
3500
+ }), L = o("ws", "ws", 3, c, T), ue = o("wss", "ws", 3, h, T), Wi = o("sockjs", "sockjs", 1, f), ot = o("xhr_streaming", "xhr_streaming", 1, f, _), Hi = o("xdr_streaming", "xdr_streaming", 1, f, _), at = o("xhr_polling", "xhr_polling", 1, f), Ni = o("xdr_polling", "xdr_polling", 1, f), ct = new Z([L], y), Ii = new Z([ue], y), zi = new Z([Wi], y), dt = new Z([
3501
+ new re(se(ot), ot, Hi)
3502
+ ], y), ht = new Z([
3501
3503
  new re(se(at), at, Ni)
3502
- ], b), lt = new Z([
3504
+ ], y), lt = new Z([
3503
3505
  new re(se(dt), new xe([
3504
3506
  dt,
3505
3507
  new de(ht, { delay: 4e3 })
3506
3508
  ]), ht)
3507
- ], b), Ae = new re(se(lt), lt, zi), Pe;
3509
+ ], y), Ae = new re(se(lt), lt, zi), Pe;
3508
3510
  return e.useTLS ? Pe = new xe([
3509
3511
  ct,
3510
3512
  new de(Ae, { delay: 2e3 })
3511
3513
  ]) : Pe = new xe([
3512
3514
  ct,
3513
- new de(Hi, { delay: 2e3 }),
3515
+ new de(Ii, { delay: 2e3 }),
3514
3516
  new de(Ae, { delay: 5e3 })
3515
- ]), new zn(new qn(new re(se(R), Pe, Ae)), r, {
3517
+ ]), new zn(new qn(new re(se(L), Pe, Ae)), r, {
3516
3518
  ttl: 18e5,
3517
3519
  timeline: e.timeline,
3518
3520
  useTLS: e.useTLS
@@ -3523,7 +3525,7 @@ function Zi() {
3523
3525
  var n = this;
3524
3526
  n.timeline.info(n.buildTimelineMessage({
3525
3527
  transport: n.name + (n.options.useTLS ? "s" : "")
3526
- })), n.hooks.isInitialized() ? n.changeState("initialized") : n.hooks.file ? (n.changeState("initializing"), H.load(n.hooks.file, { useTLS: n.options.useTLS }, function(e, t) {
3528
+ })), n.hooks.isInitialized() ? n.changeState("initialized") : n.hooks.file ? (n.changeState("initializing"), I.load(n.hooks.file, { useTLS: n.options.useTLS }, function(e, t) {
3527
3529
  n.hooks.isInitialized() ? (n.changeState("initialized"), t(!0)) : (e && n.onError(e), n.onClose(), t(!1));
3528
3530
  })) : n.onClose();
3529
3531
  }
@@ -3545,7 +3547,7 @@ function Zi() {
3545
3547
  }
3546
3548
  };
3547
3549
  const $n = Fn, Gn = 256 * 1024;
3548
- class Vn extends G {
3550
+ class Kn extends G {
3549
3551
  constructor(e, t, r) {
3550
3552
  super(), this.hooks = e, this.method = t, this.url = r;
3551
3553
  }
@@ -3581,7 +3583,7 @@ function Zi() {
3581
3583
  n[n.CONNECTING = 0] = "CONNECTING", n[n.OPEN = 1] = "OPEN", n[n.CLOSED = 3] = "CLOSED";
3582
3584
  })(Te || (Te = {}));
3583
3585
  const Q = Te;
3584
- var Kn = 1;
3586
+ var Vn = 1;
3585
3587
  class Xn {
3586
3588
  constructor(e, t) {
3587
3589
  this.hooks = e, this.session = tt(1e3) + "/" + Qn(8), this.location = Jn(t), this.readyState = Q.CONNECTING, this.openStream();
@@ -3684,7 +3686,7 @@ function Zi() {
3684
3686
  }
3685
3687
  function et(n) {
3686
3688
  var e = n.indexOf("?") === -1 ? "?" : "&";
3687
- return n + e + "t=" + +/* @__PURE__ */ new Date() + "&n=" + Kn++;
3689
+ return n + e + "t=" + +/* @__PURE__ */ new Date() + "&n=" + Vn++;
3688
3690
  }
3689
3691
  function Zn(n, e) {
3690
3692
  var t = /(https?:\/\/)([^\/:]+)((\/|:)?.*)/.exec(n);
@@ -3761,7 +3763,7 @@ function Zi() {
3761
3763
  return this.createRequest(oi, n, e);
3762
3764
  },
3763
3765
  createRequest(n, e, t) {
3764
- return new Vn(n, e, t);
3766
+ return new Kn(n, e, t);
3765
3767
  }
3766
3768
  };
3767
3769
  const nt = ai;
@@ -3771,10 +3773,10 @@ function Zi() {
3771
3773
  var ci = {
3772
3774
  nextAuthCallbackID: 1,
3773
3775
  auth_callbacks: {},
3774
- ScriptReceivers: S,
3776
+ ScriptReceivers: k,
3775
3777
  DependenciesReceivers: B,
3776
3778
  getDefaultStrategy: Bn,
3777
- Transports: yn,
3779
+ Transports: bn,
3778
3780
  transportConnectionInitializer: Dn,
3779
3781
  HTTPFactory: nt,
3780
3782
  TimelineTransport: sn,
@@ -3789,7 +3791,7 @@ function Zi() {
3789
3791
  var e = () => {
3790
3792
  this.onDocumentBody(n.ready);
3791
3793
  };
3792
- window.JSON ? e() : H.load("json2", {}, e);
3794
+ window.JSON ? e() : I.load("json2", {}, e);
3793
3795
  },
3794
3796
  getDocument() {
3795
3797
  return document;
@@ -3873,7 +3875,7 @@ function Zi() {
3873
3875
  this.key = e, this.session = t, this.events = [], this.options = r || {}, this.sent = 0, this.uniqueID = 0;
3874
3876
  }
3875
3877
  log(e, t) {
3876
- e <= this.options.level && (this.events.push(O({}, t, { timestamp: N.now() })), this.options.limit && this.events.length > this.options.limit && this.events.shift());
3878
+ e <= this.options.level && (this.events.push(U({}, t, { timestamp: N.now() })), this.options.limit && this.events.length > this.options.limit && this.events.shift());
3877
3879
  }
3878
3880
  error(e) {
3879
3881
  this.log(he.ERROR, e);
@@ -3888,7 +3890,7 @@ function Zi() {
3888
3890
  return this.events.length === 0;
3889
3891
  }
3890
3892
  send(e, t) {
3891
- var r = O({
3893
+ var r = U({
3892
3894
  session: this.session,
3893
3895
  bundle: this.sent + 1,
3894
3896
  key: this.key,
@@ -3918,29 +3920,29 @@ function Zi() {
3918
3920
  connect(e, t) {
3919
3921
  if (this.isSupported()) {
3920
3922
  if (this.priority < e)
3921
- return it(new W(), t);
3923
+ return it(new H(), t);
3922
3924
  } else return it(new M(), t);
3923
3925
  var r = !1, o = this.transport.createConnection(this.name, this.priority, this.options.key, this.options), c = null, h = function() {
3924
3926
  o.unbind("initialized", h), o.connect();
3925
3927
  }, f = function() {
3926
- c = V.createHandshake(o, function(R) {
3927
- r = !0, _(), t(null, R);
3928
+ c = K.createHandshake(o, function(L) {
3929
+ r = !0, _(), t(null, L);
3928
3930
  });
3929
- }, b = function(R) {
3930
- _(), t(R);
3931
+ }, y = function(L) {
3932
+ _(), t(L);
3931
3933
  }, T = function() {
3932
3934
  _();
3933
- var R;
3934
- R = ae(o), t(new z(R));
3935
+ var L;
3936
+ L = ae(o), t(new z(L));
3935
3937
  }, _ = function() {
3936
- o.unbind("initialized", h), o.unbind("open", f), o.unbind("error", b), o.unbind("closed", T);
3938
+ o.unbind("initialized", h), o.unbind("open", f), o.unbind("error", y), o.unbind("closed", T);
3937
3939
  };
3938
- return o.bind("initialized", h), o.bind("open", f), o.bind("error", b), o.bind("closed", T), o.initialize(), {
3940
+ return o.bind("initialized", h), o.bind("open", f), o.bind("error", y), o.bind("closed", T), o.initialize(), {
3939
3941
  abort: () => {
3940
3942
  r || (_(), c ? c.close() : o.close());
3941
3943
  },
3942
- forceMinPriority: (R) => {
3943
- r || this.priority < R && (c ? c.close() : o.close());
3944
+ forceMinPriority: (L) => {
3945
+ r || this.priority < L && (c ? c.close() : o.close());
3944
3946
  }
3945
3947
  };
3946
3948
  }
@@ -3959,9 +3961,9 @@ function Zi() {
3959
3961
  var ui = function(n, e, t, r, o, c) {
3960
3962
  var h = li[t];
3961
3963
  if (!h)
3962
- throw new K(t);
3963
- var f = (!n.enabledTransports || qe(n.enabledTransports, e) !== -1) && (!n.disabledTransports || qe(n.disabledTransports, e) === -1), b;
3964
- return f ? (o = Object.assign({ ignoreNullOrigin: n.ignoreNullOrigin }, o), b = new hi(e, r, c ? c.getAssistant(h) : h, o)) : b = pi, b;
3964
+ throw new V(t);
3965
+ var f = (!n.enabledTransports || qe(n.enabledTransports, e) !== -1) && (!n.disabledTransports || qe(n.disabledTransports, e) === -1), y;
3966
+ return f ? (o = Object.assign({ ignoreNullOrigin: n.ignoreNullOrigin }, o), y = new hi(e, r, c ? c.getAssistant(h) : h, o)) : y = pi, y;
3965
3967
  }, pi = {
3966
3968
  isSupported: function() {
3967
3969
  return !1;
@@ -3984,7 +3986,7 @@ function Zi() {
3984
3986
  throw "You must pass an options object";
3985
3987
  if (n.cluster == null)
3986
3988
  throw "Options object must provide a cluster";
3987
- "disableStats" in n && L.warn("The disableStats option is deprecated in favor of enableStats");
3989
+ "disableStats" in n && R.warn("The disableStats option is deprecated in favor of enableStats");
3988
3990
  }
3989
3991
  const mi = (n, e) => {
3990
3992
  var t = "socket_id=" + encodeURIComponent(n.socketId);
@@ -4014,14 +4016,14 @@ function Zi() {
4014
4016
  t += "&" + encodeURIComponent(r) + "=" + encodeURIComponent(o[r]);
4015
4017
  }
4016
4018
  return t;
4017
- }, yi = (n) => {
4019
+ }, bi = (n) => {
4018
4020
  if (typeof w.getAuthorizers()[n.transport] > "u")
4019
4021
  throw `'${n.transport}' is not a recognized auth transport`;
4020
4022
  return (e, t) => {
4021
4023
  const r = vi(e, n);
4022
4024
  w.getAuthorizers()[n.transport](w, r, n, u.ChannelAuthorization, t);
4023
4025
  };
4024
- }, bi = (n, e, t) => {
4026
+ }, yi = (n, e, t) => {
4025
4027
  const r = {
4026
4028
  authTransport: e.transport,
4027
4029
  authEndpoint: e.endpoint,
@@ -4037,20 +4039,20 @@ function Zi() {
4037
4039
  };
4038
4040
  function rt(n, e) {
4039
4041
  let t = {
4040
- activityTimeout: n.activityTimeout || k.activityTimeout,
4042
+ activityTimeout: n.activityTimeout || S.activityTimeout,
4041
4043
  cluster: n.cluster,
4042
- httpPath: n.httpPath || k.httpPath,
4043
- httpPort: n.httpPort || k.httpPort,
4044
- httpsPort: n.httpsPort || k.httpsPort,
4045
- pongTimeout: n.pongTimeout || k.pongTimeout,
4046
- statsHost: n.statsHost || k.stats_host,
4047
- unavailableTimeout: n.unavailableTimeout || k.unavailableTimeout,
4048
- wsPath: n.wsPath || k.wsPath,
4049
- wsPort: n.wsPort || k.wsPort,
4050
- wssPort: n.wssPort || k.wssPort,
4044
+ httpPath: n.httpPath || S.httpPath,
4045
+ httpPort: n.httpPort || S.httpPort,
4046
+ httpsPort: n.httpsPort || S.httpsPort,
4047
+ pongTimeout: n.pongTimeout || S.pongTimeout,
4048
+ statsHost: n.statsHost || S.stats_host,
4049
+ unavailableTimeout: n.unavailableTimeout || S.unavailableTimeout,
4050
+ wsPath: n.wsPath || S.wsPath,
4051
+ wsPort: n.wsPort || S.wsPort,
4052
+ wssPort: n.wssPort || S.wssPort,
4051
4053
  enableStats: xi(n),
4052
4054
  httpHost: wi(n),
4053
- useTLS: ki(n),
4055
+ useTLS: Si(n),
4054
4056
  wsHost: Ci(n),
4055
4057
  userAuthenticator: Ei(n),
4056
4058
  channelAuthorizer: _i(n, e)
@@ -4058,15 +4060,15 @@ function Zi() {
4058
4060
  return "disabledTransports" in n && (t.disabledTransports = n.disabledTransports), "enabledTransports" in n && (t.enabledTransports = n.enabledTransports), "ignoreNullOrigin" in n && (t.ignoreNullOrigin = n.ignoreNullOrigin), "timelineParams" in n && (t.timelineParams = n.timelineParams), "nacl" in n && (t.nacl = n.nacl), t;
4059
4061
  }
4060
4062
  function wi(n) {
4061
- return n.httpHost ? n.httpHost : n.cluster ? `sockjs-${n.cluster}.pusher.com` : k.httpHost;
4063
+ return n.httpHost ? n.httpHost : n.cluster ? `sockjs-${n.cluster}.pusher.com` : S.httpHost;
4062
4064
  }
4063
4065
  function Ci(n) {
4064
- return n.wsHost ? n.wsHost : Si(n.cluster);
4066
+ return n.wsHost ? n.wsHost : ki(n.cluster);
4065
4067
  }
4066
- function Si(n) {
4068
+ function ki(n) {
4067
4069
  return `ws-${n}.pusher.com`;
4068
4070
  }
4069
- function ki(n) {
4071
+ function Si(n) {
4070
4072
  return w.getProtocol() === "https:" ? !0 : n.forceTLS !== !1;
4071
4073
  }
4072
4074
  function xi(n) {
@@ -4074,30 +4076,30 @@ function Zi() {
4074
4076
  }
4075
4077
  const st = (n) => "customHandler" in n && n.customHandler != null;
4076
4078
  function Ei(n) {
4077
- const e = Object.assign(Object.assign({}, k.userAuthentication), n.userAuthentication);
4079
+ const e = Object.assign(Object.assign({}, S.userAuthentication), n.userAuthentication);
4078
4080
  return st(e) ? e.customHandler : gi(e);
4079
4081
  }
4080
4082
  function Ti(n, e) {
4081
4083
  let t;
4082
4084
  if ("channelAuthorization" in n)
4083
- t = Object.assign(Object.assign({}, k.channelAuthorization), n.channelAuthorization);
4085
+ t = Object.assign(Object.assign({}, S.channelAuthorization), n.channelAuthorization);
4084
4086
  else if (t = {
4085
- transport: n.authTransport || k.authTransport,
4086
- endpoint: n.authEndpoint || k.authEndpoint
4087
+ transport: n.authTransport || S.authTransport,
4088
+ endpoint: n.authEndpoint || S.authEndpoint
4087
4089
  }, "auth" in n && ("params" in n.auth && (t.params = n.auth.params), "headers" in n.auth && (t.headers = n.auth.headers)), "authorizer" in n)
4088
4090
  return {
4089
- customHandler: bi(e, t, n.authorizer)
4091
+ customHandler: yi(e, t, n.authorizer)
4090
4092
  };
4091
4093
  return t;
4092
4094
  }
4093
4095
  function _i(n, e) {
4094
4096
  const t = Ti(n, e);
4095
- return st(t) ? t.customHandler : yi(t);
4097
+ return st(t) ? t.customHandler : bi(t);
4096
4098
  }
4097
4099
  class Ai extends G {
4098
4100
  constructor(e) {
4099
4101
  super(function(t, r) {
4100
- L.debug(`No callbacks on watchlist events for ${t}`);
4102
+ R.debug(`No callbacks on watchlist events for ${t}`);
4101
4103
  }), this.pusher = e, this.bindWatchlistInternalEvent();
4102
4104
  }
4103
4105
  handleEvent(e) {
@@ -4118,14 +4120,14 @@ function Zi() {
4118
4120
  n = r, e = o;
4119
4121
  }), resolve: n, reject: e };
4120
4122
  }
4121
- const Li = Pi;
4122
- class Ri extends G {
4123
+ const Ri = Pi;
4124
+ class Li extends G {
4123
4125
  constructor(e) {
4124
4126
  super(function(t, r) {
4125
- L.debug("No callbacks on user for " + t);
4127
+ R.debug("No callbacks on user for " + t);
4126
4128
  }), this.signin_requested = !1, this.user_data = null, this.serverToUserChannel = null, this.signinDonePromise = null, this._signinDoneResolve = null, this._onAuthorize = (t, r) => {
4127
4129
  if (t) {
4128
- L.warn(`Error during signin: ${t}`), this._cleanup();
4130
+ R.warn(`Error during signin: ${t}`), this._cleanup();
4129
4131
  return;
4130
4132
  }
4131
4133
  this.pusher.send_event("pusher:signin", {
@@ -4151,11 +4153,11 @@ function Zi() {
4151
4153
  try {
4152
4154
  this.user_data = JSON.parse(e.user_data);
4153
4155
  } catch {
4154
- L.error(`Failed parsing user data after signin: ${e.user_data}`), this._cleanup();
4156
+ R.error(`Failed parsing user data after signin: ${e.user_data}`), this._cleanup();
4155
4157
  return;
4156
4158
  }
4157
4159
  if (typeof this.user_data.id != "string" || this.user_data.id === "") {
4158
- L.error(`user_data doesn't contain an id. user_data: ${this.user_data}`), this._cleanup();
4160
+ R.error(`user_data doesn't contain an id. user_data: ${this.user_data}`), this._cleanup();
4159
4161
  return;
4160
4162
  }
4161
4163
  this._signinDoneResolve(), this._subscribeChannels();
@@ -4174,7 +4176,7 @@ function Zi() {
4174
4176
  _newSigninPromiseIfNeeded() {
4175
4177
  if (!this.signin_requested || this.signinDonePromise && !this.signinDonePromise.done)
4176
4178
  return;
4177
- const { promise: e, resolve: t } = Li();
4179
+ const { promise: e, resolve: t } = Ri();
4178
4180
  e.done = !1;
4179
4181
  const r = () => {
4180
4182
  e.done = !0;
@@ -4194,19 +4196,19 @@ function Zi() {
4194
4196
  }));
4195
4197
  }
4196
4198
  constructor(e, t) {
4197
- ji(e), fi(t), this.key = e, this.options = t, this.config = rt(this.options, this), this.channels = V.createChannels(), this.global_emitter = new G(), this.sessionID = w.randomInt(1e9), this.timeline = new di(this.key, this.sessionID, {
4199
+ ji(e), fi(t), this.key = e, this.options = t, this.config = rt(this.options, this), this.channels = K.createChannels(), this.global_emitter = new G(), this.sessionID = w.randomInt(1e9), this.timeline = new di(this.key, this.sessionID, {
4198
4200
  cluster: this.config.cluster,
4199
4201
  features: j.getClientFeatures(),
4200
4202
  params: this.config.timelineParams || {},
4201
4203
  limit: 50,
4202
4204
  level: he.INFO,
4203
- version: k.VERSION
4204
- }), this.config.enableStats && (this.timelineSender = V.createTimelineSender(this.timeline, {
4205
+ version: S.VERSION
4206
+ }), this.config.enableStats && (this.timelineSender = K.createTimelineSender(this.timeline, {
4205
4207
  host: this.config.statsHost,
4206
4208
  path: "/timeline/v2/" + w.TimelineTransport.name
4207
4209
  }));
4208
4210
  var r = (o) => w.getDefaultStrategy(this.config, o, ui);
4209
- this.connection = V.createConnectionManager(this.key, {
4211
+ this.connection = K.createConnectionManager(this.key, {
4210
4212
  getStrategy: r,
4211
4213
  timeline: this.timeline,
4212
4214
  activityTimeout: this.config.activityTimeout,
@@ -4227,8 +4229,8 @@ function Zi() {
4227
4229
  }), this.connection.bind("disconnected", () => {
4228
4230
  this.channels.disconnect();
4229
4231
  }), this.connection.bind("error", (o) => {
4230
- L.warn(o);
4231
- }), j.instances.push(this), this.timeline.info({ instances: j.instances.length }), this.user = new Ri(this), j.isReady && this.connect();
4232
+ R.warn(o);
4233
+ }), j.instances.push(this), this.timeline.info({ instances: j.instances.length }), this.user = new Li(this), j.isReady && this.connect();
4232
4234
  }
4233
4235
  switchCluster(e) {
4234
4236
  const { appKey: t, cluster: r } = e;
@@ -4303,7 +4305,7 @@ function Zi() {
4303
4305
  var v = a[m];
4304
4306
  if (v !== void 0)
4305
4307
  return v.exports;
4306
- var y = a[m] = {
4308
+ var b = a[m] = {
4307
4309
  /******/
4308
4310
  // no module.id needed
4309
4311
  /******/
@@ -4312,20 +4314,20 @@ function Zi() {
4312
4314
  exports: {}
4313
4315
  /******/
4314
4316
  };
4315
- return s[m].call(y.exports, y, y.exports, d), y.exports;
4317
+ return s[m].call(b.exports, b, b.exports, d), b.exports;
4316
4318
  }
4317
4319
  d.d = (m, v) => {
4318
- for (var y in v)
4319
- d.o(v, y) && !d.o(m, y) && Object.defineProperty(m, y, { enumerable: !0, get: v[y] });
4320
+ for (var b in v)
4321
+ d.o(v, b) && !d.o(m, b) && Object.defineProperty(m, b, { enumerable: !0, get: v[b] });
4320
4322
  }, d.o = (m, v) => Object.prototype.hasOwnProperty.call(m, v);
4321
4323
  var l = d(721);
4322
4324
  return l;
4323
4325
  })()
4324
4326
  ));
4325
- })(Le)), Le.exports;
4327
+ })(Re)), Re.exports;
4326
4328
  }
4327
4329
  var Qi = Zi();
4328
- const er = /* @__PURE__ */ Yi(Qi), Re = "/vendor/sendity-client/tailwind.css", Lt = {
4330
+ const er = /* @__PURE__ */ Yi(Qi), Le = "/vendor/sendity-client/tailwind.css", Rt = {
4329
4331
  labels: {
4330
4332
  email: "Email",
4331
4333
  whatsapp: "WhatsApp"
@@ -4739,7 +4741,7 @@ Koda: (Code)`,
4739
4741
  Kód: (Code)`,
4740
4742
  whatsappText: "Prihlás ma do (Host) týmto kódom: (Code)"
4741
4743
  }
4742
- }, yr = {
4744
+ }, br = {
4743
4745
  labels: {
4744
4746
  email: "E-mail",
4745
4747
  whatsapp: "WhatsApp"
@@ -4762,7 +4764,7 @@ Kód: (Code)`,
4762
4764
  Kodi: (Code)`,
4763
4765
  whatsappText: "Më identifiko në (Host) me këtë kod: (Code)"
4764
4766
  }
4765
- }, br = {
4767
+ }, yr = {
4766
4768
  labels: {
4767
4769
  email: "Էլ. փոստ",
4768
4770
  whatsapp: "WhatsApp"
@@ -4831,7 +4833,7 @@ Kod: (Code)`,
4831
4833
  Kodas: (Code)`,
4832
4834
  whatsappText: "Prisijungti prie (Host) šiuo kodu: (Code)"
4833
4835
  }
4834
- }, Sr = {
4836
+ }, kr = {
4835
4837
  labels: {
4836
4838
  email: "E-pasts",
4837
4839
  whatsapp: "WhatsApp"
@@ -4854,7 +4856,7 @@ Kodas: (Code)`,
4854
4856
  Kods: (Code)`,
4855
4857
  whatsappText: "Pierakstīties (Host) ar šo kodu: (Code)"
4856
4858
  }
4857
- }, kr = {
4859
+ }, Sr = {
4858
4860
  labels: {
4859
4861
  email: "E-post",
4860
4862
  whatsapp: "WhatsApp"
@@ -4901,6 +4903,236 @@ Koodi: (Code)`,
4901
4903
  whatsappText: "Kirjaa minut palveluun (Host) tällä koodilla: (Code)"
4902
4904
  }
4903
4905
  }, Er = {
4906
+ labels: {
4907
+ email: "Email",
4908
+ whatsapp: "WhatsApp"
4909
+ },
4910
+ ui: {
4911
+ sendCodePrompt: "Trimite acest cod pentru a continua",
4912
+ successGreeting: "Salut, (Name)",
4913
+ by: "prin",
4914
+ toPrefix: "către",
4915
+ footerWaiting: "Gata să primească codul tău…",
4916
+ footerWaitingUntil: "Gata să primească codul tău…",
4917
+ footerReturnedWaiting: "Așteptăm să sosească mesajul tău…",
4918
+ codeExpired: "Codul a expirat, solicită unul nou.",
4919
+ getNewCode: "Obține un cod nou"
4920
+ },
4921
+ templates: {
4922
+ emailSubject: "Conectează-mă la (Host) cu acest cod: (Code)",
4923
+ emailBody: `Pentru a te autentifica la (Host), trimite acest email fără modificări.
4924
+
4925
+ Cod: (Code)`,
4926
+ whatsappText: "Conectează-mă la (Host) cu acest cod: (Code)"
4927
+ }
4928
+ }, Tr = {
4929
+ labels: {
4930
+ email: "Имейл",
4931
+ whatsapp: "WhatsApp"
4932
+ },
4933
+ ui: {
4934
+ sendCodePrompt: "Изпратете този код, за да продължите",
4935
+ successGreeting: "Здравейте, (Name)",
4936
+ by: "чрез",
4937
+ toPrefix: "до",
4938
+ footerWaiting: "Готово за получаване на вашия код…",
4939
+ footerWaitingUntil: "Готово за получаване на вашия код…",
4940
+ footerReturnedWaiting: "Изчакваме съобщението ви да пристигне…",
4941
+ codeExpired: "Кодът изтече, поискайте нов.",
4942
+ getNewCode: "Получете нов код"
4943
+ },
4944
+ templates: {
4945
+ emailSubject: "Впиши ме в (Host) с този код: (Code)",
4946
+ emailBody: `За да се удостоверите в (Host), изпратете този имейл без промени.
4947
+
4948
+ Код: (Code)`,
4949
+ whatsappText: "Впиши ме в (Host) с този код: (Code)"
4950
+ }
4951
+ }, _r = {
4952
+ labels: {
4953
+ email: "E-mail",
4954
+ whatsapp: "WhatsApp"
4955
+ },
4956
+ ui: {
4957
+ sendCodePrompt: "Küldd el ezt a kódot a folytatáshoz",
4958
+ successGreeting: "Szia, (Name)",
4959
+ by: "ezen keresztül",
4960
+ toPrefix: "ide",
4961
+ footerWaiting: "Készen áll a kód fogadására…",
4962
+ footerWaitingUntil: "Készen áll a kód fogadására…",
4963
+ footerReturnedWaiting: "Várjuk, hogy megérkezzen az üzeneted…",
4964
+ codeExpired: "A kód lejárt, kérj újat.",
4965
+ getNewCode: "Új kód kérése"
4966
+ },
4967
+ templates: {
4968
+ emailSubject: "Jelentkeztess be ide: (Host) ezzel a kóddal: (Code)",
4969
+ emailBody: `A (Host) hitelesítéséhez küldd el ezt az e-mailt módosítás nélkül.
4970
+
4971
+ Kód: (Code)`,
4972
+ whatsappText: "Jelentkeztess be ide: (Host) ezzel a kóddal: (Code)"
4973
+ }
4974
+ }, Ar = {
4975
+ labels: {
4976
+ email: "E-post",
4977
+ whatsapp: "WhatsApp"
4978
+ },
4979
+ ui: {
4980
+ sendCodePrompt: "Send denne koden for å fortsette",
4981
+ successGreeting: "Hei, (Name)",
4982
+ by: "via",
4983
+ toPrefix: "til",
4984
+ footerWaiting: "Klar til å motta koden din…",
4985
+ footerWaitingUntil: "Klar til å motta koden din…",
4986
+ footerReturnedWaiting: "Venter på at meldingen din skal komme fram…",
4987
+ codeExpired: "Koden er utløpt, be om en ny.",
4988
+ getNewCode: "Få ny kode"
4989
+ },
4990
+ templates: {
4991
+ emailSubject: "Logg meg inn på (Host) med denne koden: (Code)",
4992
+ emailBody: `For å autentisere deg hos (Host), send denne e-posten uten endringer.
4993
+
4994
+ Kode: (Code)`,
4995
+ whatsappText: "Logg meg inn på (Host) med denne koden: (Code)"
4996
+ }
4997
+ }, Pr = {
4998
+ labels: {
4999
+ email: "Електронна пошта",
5000
+ whatsapp: "WhatsApp"
5001
+ },
5002
+ ui: {
5003
+ sendCodePrompt: "Надішліть цей код, щоб продовжити",
5004
+ successGreeting: "Вітаємо, (Name)",
5005
+ by: "через",
5006
+ toPrefix: "на",
5007
+ footerWaiting: "Готово до отримання вашого коду…",
5008
+ footerWaitingUntil: "Готово до отримання вашого коду…",
5009
+ footerReturnedWaiting: "Очікуємо, доки ваше повідомлення надійде…",
5010
+ codeExpired: "Термін дії коду минув, запросіть новий.",
5011
+ getNewCode: "Отримати новий код"
5012
+ },
5013
+ templates: {
5014
+ emailSubject: "Увійти в (Host) з цим кодом: (Code)",
5015
+ emailBody: `Щоб автентифікуватися в (Host), надішліть цей лист без змін.
5016
+
5017
+ Код: (Code)`,
5018
+ whatsappText: "Увійти в (Host) з цим кодом: (Code)"
5019
+ }
5020
+ }, Rr = {
5021
+ labels: {
5022
+ email: "Email",
5023
+ whatsapp: "WhatsApp"
5024
+ },
5025
+ ui: {
5026
+ sendCodePrompt: "Pošalji ovaj kod za nastavak",
5027
+ successGreeting: "Zdravo, (Name)",
5028
+ by: "putem",
5029
+ toPrefix: "na",
5030
+ footerWaiting: "Spremno za prijem tvog koda…",
5031
+ footerWaitingUntil: "Spremno za prijem tvog koda…",
5032
+ footerReturnedWaiting: "Čekamo da tvoja poruka stigne…",
5033
+ codeExpired: "Kod je istekao, zatraži novi.",
5034
+ getNewCode: "Dobij novi kod"
5035
+ },
5036
+ templates: {
5037
+ emailSubject: "Prijavi me na (Host) ovim kodom: (Code)",
5038
+ emailBody: `Za autentifikaciju na (Host), pošalji ovaj email bez izmjena.
5039
+
5040
+ Kod: (Code)`,
5041
+ whatsappText: "Prijavi me na (Host) ovim kodom: (Code)"
5042
+ }
5043
+ }, Lr = {
5044
+ labels: {
5045
+ email: "Е-пошта",
5046
+ whatsapp: "WhatsApp"
5047
+ },
5048
+ ui: {
5049
+ sendCodePrompt: "Испратете го овој код за да продолжите",
5050
+ successGreeting: "Здраво, (Name)",
5051
+ by: "преку",
5052
+ toPrefix: "до",
5053
+ footerWaiting: "Подготвено за прием на вашиот код…",
5054
+ footerWaitingUntil: "Подготвено за прием на вашиот код…",
5055
+ footerReturnedWaiting: "Чекаме да пристигне вашата порака…",
5056
+ codeExpired: "Кодот истече, побарајте нов.",
5057
+ getNewCode: "Добиј нов код"
5058
+ },
5059
+ templates: {
5060
+ emailSubject: "Најави ме во (Host) со овој код: (Code)",
5061
+ emailBody: `За автентикација во (Host), испратете ја оваа е-пошта без измени.
5062
+
5063
+ Код: (Code)`,
5064
+ whatsappText: "Најави ме во (Host) со овој код: (Code)"
5065
+ }
5066
+ }, jr = {
5067
+ labels: {
5068
+ email: "Netfang",
5069
+ whatsapp: "WhatsApp"
5070
+ },
5071
+ ui: {
5072
+ sendCodePrompt: "Sendu þennan kóða til að halda áfram",
5073
+ successGreeting: "Halló, (Name)",
5074
+ by: "með",
5075
+ toPrefix: "til",
5076
+ footerWaiting: "Tilbúið að taka á móti kóðanum þínum…",
5077
+ footerWaitingUntil: "Tilbúið að taka á móti kóðanum þínum…",
5078
+ footerReturnedWaiting: "Bíðum eftir að skilaboðin þín berist…",
5079
+ codeExpired: "Kóðinn er útrunninn, fáðu nýjan.",
5080
+ getNewCode: "Fá nýjan kóða"
5081
+ },
5082
+ templates: {
5083
+ emailSubject: "Skráðu mig inn á (Host) með þessum kóða: (Code)",
5084
+ emailBody: `Til að auðkenna þig hjá (Host), sendu þennan tölvupóst án breytinga.
5085
+
5086
+ Kóði: (Code)`,
5087
+ whatsappText: "Skráðu mig inn á (Host) með þessum kóða: (Code)"
5088
+ }
5089
+ }, Wr = {
5090
+ labels: {
5091
+ email: "Ríomhphost",
5092
+ whatsapp: "WhatsApp"
5093
+ },
5094
+ ui: {
5095
+ sendCodePrompt: "Seol an cód seo chun leanúint ar aghaidh",
5096
+ successGreeting: "Dia dhuit, (Name)",
5097
+ by: "trí",
5098
+ toPrefix: "chuig",
5099
+ footerWaiting: "Réidh chun do chód a fháil…",
5100
+ footerWaitingUntil: "Réidh chun do chód a fháil…",
5101
+ footerReturnedWaiting: "Ag fanacht go dtiocfaidh do theachtaireacht…",
5102
+ codeExpired: "Tá an cód imithe in éag, iarr ceann nua.",
5103
+ getNewCode: "Faigh cód nua"
5104
+ },
5105
+ templates: {
5106
+ emailSubject: "Logáil isteach mé i (Host) leis an gcód seo: (Code)",
5107
+ emailBody: `Chun fíordheimhniú le (Host), seol an ríomhphost seo gan athruithe.
5108
+
5109
+ Cód: (Code)`,
5110
+ whatsappText: "Logáil isteach mé i (Host) leis an gcód seo: (Code)"
5111
+ }
5112
+ }, Hr = {
5113
+ labels: {
5114
+ email: "Email",
5115
+ whatsapp: "WhatsApp"
5116
+ },
5117
+ ui: {
5118
+ sendCodePrompt: "Ibgħat dan il-kodiċi biex tkompli",
5119
+ successGreeting: "Bonġu, (Name)",
5120
+ by: "permezz ta’",
5121
+ toPrefix: "lil",
5122
+ footerWaiting: "Lest biex jirċievi l-kodiċi tiegħek…",
5123
+ footerWaitingUntil: "Lest biex jirċievi l-kodiċi tiegħek…",
5124
+ footerReturnedWaiting: "Qed nistennew il-messaġġ tiegħek jasal…",
5125
+ codeExpired: "Il-kodiċi skada, itlob wieħed ġdid.",
5126
+ getNewCode: "Ikseb kodiċi ġdid"
5127
+ },
5128
+ templates: {
5129
+ emailSubject: "Daħħalni f’(Host) b’dan il-kodiċi: (Code)",
5130
+ emailBody: `Biex tawtentika ma’ (Host), ibgħat dan l-email mingħajr tibdil.
5131
+
5132
+ Kodiċi: (Code)`,
5133
+ whatsappText: "Daħħalni f’(Host) b’dan il-kodiċi: (Code)"
5134
+ }
5135
+ }, Nr = {
4904
5136
  labels: {
4905
5137
  email: "البريد الإلكتروني",
4906
5138
  whatsapp: "WhatsApp"
@@ -4923,7 +5155,7 @@ Koodi: (Code)`,
4923
5155
  الرمز: (Code)`,
4924
5156
  whatsappText: "سجّل دخولي إلى (Host) بهذا الرمز: (Code)"
4925
5157
  }
4926
- }, Tr = {
5158
+ }, Ir = {
4927
5159
  labels: {
4928
5160
  email: "אימייל",
4929
5161
  whatsapp: "WhatsApp"
@@ -4946,7 +5178,7 @@ Koodi: (Code)`,
4946
5178
  קוד: (Code)`,
4947
5179
  whatsappText: "היכנס אותי אל (Host) עם הקוד הזה: (Code)"
4948
5180
  }
4949
- }, _r = {
5181
+ }, zr = {
4950
5182
  labels: {
4951
5183
  email: "メール",
4952
5184
  whatsapp: "WhatsApp"
@@ -4969,7 +5201,7 @@ Koodi: (Code)`,
4969
5201
  コード: (Code)`,
4970
5202
  whatsappText: "このコードで (Host) にサインインします: (Code)"
4971
5203
  }
4972
- }, Ar = {
5204
+ }, Ur = {
4973
5205
  labels: {
4974
5206
  email: "이메일",
4975
5207
  whatsapp: "WhatsApp"
@@ -4992,7 +5224,7 @@ Koodi: (Code)`,
4992
5224
  코드: (Code)`,
4993
5225
  whatsappText: "이 코드로 (Host)에 로그인합니다: (Code)"
4994
5226
  }
4995
- }, Pr = {
5227
+ }, Or = {
4996
5228
  labels: {
4997
5229
  email: "电子邮件",
4998
5230
  whatsapp: "WhatsApp"
@@ -5015,7 +5247,145 @@ Koodi: (Code)`,
5015
5247
  代码:(Code)`,
5016
5248
  whatsappText: "使用此代码登录 (Host):(Code)"
5017
5249
  }
5018
- }, Lr = [
5250
+ }, qr = {
5251
+ labels: {
5252
+ email: "Email",
5253
+ whatsapp: "WhatsApp"
5254
+ },
5255
+ ui: {
5256
+ sendCodePrompt: "Gửi mã này để tiếp tục",
5257
+ successGreeting: "Xin chào, (Name)",
5258
+ by: "qua",
5259
+ toPrefix: "đến",
5260
+ footerWaiting: "Sẵn sàng nhận mã của bạn…",
5261
+ footerWaitingUntil: "Sẵn sàng nhận mã của bạn…",
5262
+ footerReturnedWaiting: "Đang chờ tin nhắn của bạn đến…",
5263
+ codeExpired: "Mã đã hết hạn, hãy yêu cầu mã mới.",
5264
+ getNewCode: "Lấy mã mới"
5265
+ },
5266
+ templates: {
5267
+ emailSubject: "Đăng nhập tôi vào (Host) bằng mã này: (Code)",
5268
+ emailBody: `Để xác thực với (Host), hãy gửi email này mà không thay đổi.
5269
+
5270
+ Mã: (Code)`,
5271
+ whatsappText: "Đăng nhập tôi vào (Host) bằng mã này: (Code)"
5272
+ }
5273
+ }, Mr = {
5274
+ labels: {
5275
+ email: "ईमेल",
5276
+ whatsapp: "WhatsApp"
5277
+ },
5278
+ ui: {
5279
+ sendCodePrompt: "जारी रखने के लिए यह कोड भेजें",
5280
+ successGreeting: "नमस्ते, (Name)",
5281
+ by: "के माध्यम से",
5282
+ toPrefix: "को",
5283
+ footerWaiting: "आपका कोड प्राप्त करने के लिए तैयार…",
5284
+ footerWaitingUntil: "आपका कोड प्राप्त करने के लिए तैयार…",
5285
+ footerReturnedWaiting: "आपके संदेश के पहुँचने की प्रतीक्षा कर रहे हैं…",
5286
+ codeExpired: "कोड समाप्त हो गया है, नया कोड माँगें।",
5287
+ getNewCode: "नया कोड प्राप्त करें"
5288
+ },
5289
+ templates: {
5290
+ emailSubject: "इस कोड से मुझे (Host) में साइन इन करें: (Code)",
5291
+ emailBody: `(Host) के साथ प्रमाणीकरण करने के लिए, यह ईमेल बिना किसी बदलाव के भेजें।
5292
+
5293
+ कोड: (Code)`,
5294
+ whatsappText: "इस कोड से मुझे (Host) में साइन इन करें: (Code)"
5295
+ }
5296
+ }, Br = {
5297
+ labels: {
5298
+ email: "Email",
5299
+ whatsapp: "WhatsApp"
5300
+ },
5301
+ ui: {
5302
+ sendCodePrompt: "Kirim kode ini untuk melanjutkan",
5303
+ successGreeting: "Halo, (Name)",
5304
+ by: "melalui",
5305
+ toPrefix: "ke",
5306
+ footerWaiting: "Siap menerima kode Anda…",
5307
+ footerWaitingUntil: "Siap menerima kode Anda…",
5308
+ footerReturnedWaiting: "Menunggu pesan Anda tiba…",
5309
+ codeExpired: "Kode kedaluwarsa, minta yang baru.",
5310
+ getNewCode: "Dapatkan kode baru"
5311
+ },
5312
+ templates: {
5313
+ emailSubject: "Masukkan saya ke (Host) dengan kode ini: (Code)",
5314
+ emailBody: `Untuk autentikasi dengan (Host), kirim email ini tanpa perubahan.
5315
+
5316
+ Kode: (Code)`,
5317
+ whatsappText: "Masukkan saya ke (Host) dengan kode ini: (Code)"
5318
+ }
5319
+ }, Dr = {
5320
+ labels: {
5321
+ email: "E-mel",
5322
+ whatsapp: "WhatsApp"
5323
+ },
5324
+ ui: {
5325
+ sendCodePrompt: "Hantar kod ini untuk meneruskan",
5326
+ successGreeting: "Hai, (Name)",
5327
+ by: "melalui",
5328
+ toPrefix: "kepada",
5329
+ footerWaiting: "Sedia menerima kod anda…",
5330
+ footerWaitingUntil: "Sedia menerima kod anda…",
5331
+ footerReturnedWaiting: "Menunggu mesej anda tiba…",
5332
+ codeExpired: "Kod telah tamat tempoh, minta yang baharu.",
5333
+ getNewCode: "Dapatkan kod baharu"
5334
+ },
5335
+ templates: {
5336
+ emailSubject: "Log masuk saya ke (Host) dengan kod ini: (Code)",
5337
+ emailBody: `Untuk mengesahkan dengan (Host), hantar e-mel ini tanpa sebarang perubahan.
5338
+
5339
+ Kod: (Code)`,
5340
+ whatsappText: "Log masuk saya ke (Host) dengan kod ini: (Code)"
5341
+ }
5342
+ }, Fr = {
5343
+ labels: {
5344
+ email: "ইমেইল",
5345
+ whatsapp: "WhatsApp"
5346
+ },
5347
+ ui: {
5348
+ sendCodePrompt: "চালিয়ে যেতে এই কোডটি পাঠান",
5349
+ successGreeting: "হ্যালো, (Name)",
5350
+ by: "এর মাধ্যমে",
5351
+ toPrefix: "প্রতি",
5352
+ footerWaiting: "আপনার কোড গ্রহণের জন্য প্রস্তুত…",
5353
+ footerWaitingUntil: "আপনার কোড গ্রহণের জন্য প্রস্তুত…",
5354
+ footerReturnedWaiting: "আপনার বার্তা পৌঁছানোর অপেক্ষায়…",
5355
+ codeExpired: "কোডের মেয়াদ শেষ, নতুন কোড নিন।",
5356
+ getNewCode: "নতুন কোড নিন"
5357
+ },
5358
+ templates: {
5359
+ emailSubject: "এই কোড দিয়ে আমাকে (Host)-এ সাইন ইন করুন: (Code)",
5360
+ emailBody: `(Host)-এর সঙ্গে প্রমাণীকরণের জন্য, কোনো পরিবর্তন ছাড়াই এই ইমেইলটি পাঠান।
5361
+
5362
+ কোড: (Code)`,
5363
+ whatsappText: "এই কোড দিয়ে আমাকে (Host)-এ সাইন ইন করুন: (Code)"
5364
+ }
5365
+ }, $r = {
5366
+ labels: {
5367
+ email: "อีเมล",
5368
+ whatsapp: "WhatsApp"
5369
+ },
5370
+ ui: {
5371
+ sendCodePrompt: "ส่งรหัสนี้เพื่อดำเนินการต่อ",
5372
+ successGreeting: "สวัสดี, (Name)",
5373
+ by: "ผ่าน",
5374
+ toPrefix: "ถึง",
5375
+ footerWaiting: "พร้อมรับรหัสของคุณ…",
5376
+ footerWaitingUntil: "พร้อมรับรหัสของคุณ…",
5377
+ footerReturnedWaiting: "กำลังรอให้ข้อความของคุณมาถึง…",
5378
+ codeExpired: "รหัสหมดอายุแล้ว โปรดขอรหัสใหม่",
5379
+ getNewCode: "รับรหัสใหม่"
5380
+ },
5381
+ templates: {
5382
+ emailSubject: "ลงชื่อเข้าใช้ (Host) ด้วยรหัสนี้: (Code)",
5383
+ emailBody: `เพื่อยืนยันตัวตนกับ (Host) ให้ส่งอีเมลนี้โดยไม่แก้ไขใด ๆ
5384
+
5385
+ รหัส: (Code)`,
5386
+ whatsappText: "ลงชื่อเข้าใช้ (Host) ด้วยรหัสนี้: (Code)"
5387
+ }
5388
+ }, Gr = [
5019
5389
  "en",
5020
5390
  "de",
5021
5391
  "fr",
@@ -5041,13 +5411,33 @@ Koodi: (Code)`,
5041
5411
  "lv",
5042
5412
  "et",
5043
5413
  "fi",
5414
+ "ro",
5415
+ "bg",
5416
+ "hu",
5417
+ "no",
5418
+ "uk",
5419
+ "bs",
5420
+ "mk",
5421
+ "is",
5422
+ "ga",
5423
+ "mt",
5044
5424
  "ar",
5045
5425
  "he",
5046
5426
  "ja",
5047
5427
  "ko",
5048
- "zh"
5049
- ], Rr = {
5050
- en: Lt,
5428
+ "zh",
5429
+ "vi",
5430
+ "hi",
5431
+ "id",
5432
+ "ms",
5433
+ "bn",
5434
+ "th"
5435
+ ], Kr = ["ar", "he"];
5436
+ function Vr(g) {
5437
+ return Kr.includes(g);
5438
+ }
5439
+ const Xr = {
5440
+ en: Rt,
5051
5441
  de: tr,
5052
5442
  fr: nr,
5053
5443
  es: ir,
@@ -5065,23 +5455,39 @@ Koodi: (Code)`,
5065
5455
  pt: mr,
5066
5456
  sl: gr,
5067
5457
  sk: vr,
5068
- sq: yr,
5069
- hy: br,
5458
+ sq: br,
5459
+ hy: yr,
5070
5460
  sr: wr,
5071
5461
  lt: Cr,
5072
- lv: Sr,
5073
- et: kr,
5462
+ lv: kr,
5463
+ et: Sr,
5074
5464
  fi: xr,
5075
- ar: Er,
5076
- he: Tr,
5077
- ja: _r,
5078
- ko: Ar,
5079
- zh: Pr
5465
+ ro: Er,
5466
+ bg: Tr,
5467
+ hu: _r,
5468
+ no: Ar,
5469
+ uk: Pr,
5470
+ bs: Rr,
5471
+ mk: Lr,
5472
+ is: jr,
5473
+ ga: Wr,
5474
+ mt: Hr,
5475
+ ar: Nr,
5476
+ he: Ir,
5477
+ ja: zr,
5478
+ ko: Ur,
5479
+ zh: Or,
5480
+ vi: qr,
5481
+ hi: Mr,
5482
+ id: Br,
5483
+ ms: Dr,
5484
+ bn: Fr,
5485
+ th: $r
5080
5486
  };
5081
5487
  function vt(g) {
5082
- return Lr.includes(g);
5488
+ return Gr.includes(g);
5083
5489
  }
5084
- function yt(g) {
5490
+ function bt(g) {
5085
5491
  if (!g) return null;
5086
5492
  const i = g.trim().toLowerCase().replace("_", "-");
5087
5493
  if (vt(i)) return i;
@@ -5089,39 +5495,39 @@ function yt(g) {
5089
5495
  return vt(s) ? s : null;
5090
5496
  }
5091
5497
  function F(g) {
5092
- return Rr[g] ?? Lt;
5498
+ return Xr[g] ?? Rt;
5093
5499
  }
5094
- const bt = `<svg role="img" viewBox="0 0 512 512" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><title>Email</title><path d="M64 112c-8.8 0-16 7.2-16 16l0 22.1L220.5 291.7c20.7 17 50.4 17 71.1 0L464 150.1l0-22.1c0-8.8-7.2-16-16-16L64 112zM48 212.2L48 384c0 8.8 7.2 16 16 16l384 0c8.8 0 16-7.2 16-16l0-171.8L322 328.8c-38.4 31.5-93.7 31.5-132 0L48 212.2zM0 128C0 92.7 28.7 64 64 64l384 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128z"/></svg>
5095
- `, wt = '<svg role="img" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><title>WhatsApp</title><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"/></svg>', jr = '<svg viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M4.998 9.332A5.002 5.002 0 0 1 13.2 5.5H11a1 1 0 1 0 0 2h4.5a1 1 0 0 0 1-1V2a1 1 0 1 0-2 0v1.74A7.002 7.002 0 0 0 3 9.332a1 1 0 1 0 1.998 0ZM15.002 10.668A5.002 5.002 0 0 1 6.8 14.5H9a1 1 0 1 0 0-2H4.5a1 1 0 0 0-1 1V18a1 1 0 1 0 2 0v-1.74a7.002 7.002 0 0 0 11.5-5.592 1 1 0 1 0-1.998 0Z" clip-rule="evenodd" /></svg>', Ir = '<svg viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM7.22 6.22a.75.75 0 0 0-1.06 1.06L8.88 10l-2.72 2.72a.75.75 0 1 0 1.06 1.06L9.94 11.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L11 10l2.72-2.72a.75.75 0 0 0-1.06-1.06L9.94 8.94 7.22 6.22Z" clip-rule="evenodd" /></svg>', ze = "sendityAuthRequest", Wr = "https://sendity.io/api/sendity", Nr = 600 * 1e3, Hr = 5e3, zr = 15e3, Or = 1e3, je = 2e3, fe = 220, Rt = 0;
5096
- function Oe(g, i) {
5500
+ const yt = `<svg role="img" viewBox="0 0 512 512" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><title>Email</title><path d="M64 112c-8.8 0-16 7.2-16 16l0 22.1L220.5 291.7c20.7 17 50.4 17 71.1 0L464 150.1l0-22.1c0-8.8-7.2-16-16-16L64 112zM48 212.2L48 384c0 8.8 7.2 16 16 16l384 0c8.8 0 16-7.2 16-16l0-171.8L322 328.8c-38.4 31.5-93.7 31.5-132 0L48 212.2zM0 128C0 92.7 28.7 64 64 64l384 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128z"/></svg>
5501
+ `, wt = '<svg role="img" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><title>WhatsApp</title><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"/></svg>', Jr = '<svg viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M4.998 9.332A5.002 5.002 0 0 1 13.2 5.5H11a1 1 0 1 0 0 2h4.5a1 1 0 0 0 1-1V2a1 1 0 1 0-2 0v1.74A7.002 7.002 0 0 0 3 9.332a1 1 0 1 0 1.998 0ZM15.002 10.668A5.002 5.002 0 0 1 6.8 14.5H9a1 1 0 1 0 0-2H4.5a1 1 0 0 0-1 1V18a1 1 0 1 0 2 0v-1.74a7.002 7.002 0 0 0 11.5-5.592 1 1 0 1 0-1.998 0Z" clip-rule="evenodd" /></svg>', Yr = '<svg viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM7.22 6.22a.75.75 0 0 0-1.06 1.06L8.88 10l-2.72 2.72a.75.75 0 1 0 1.06 1.06L9.94 11.06l2.72 2.72a.75.75 0 1 0 1.06-1.06L11 10l2.72-2.72a.75.75 0 0 0-1.06-1.06L9.94 8.94 7.22 6.22Z" clip-rule="evenodd" /></svg>', ze = "sendityAuthRequest", Zr = "https://sendity.io/api/sendity", Qr = 600 * 1e3, es = 5e3, ts = 15e3, ns = 1e3, je = 2e3, fe = 220, Lt = 0;
5502
+ function Ue(g, i) {
5097
5503
  return `sendity:auth-request:${encodeURIComponent(g)}:${encodeURIComponent(i)}`;
5098
5504
  }
5099
5505
  function Ct(g, i, s, a = Date.now()) {
5100
5506
  g.removeItem(ze);
5101
- const d = Oe(i, s), l = g.getItem(d);
5507
+ const d = Ue(i, s), l = g.getItem(d);
5102
5508
  if (!l) return null;
5103
5509
  try {
5104
5510
  const m = JSON.parse(l);
5105
5511
  if (typeof m.id != "string" || typeof m.clientSecret != "string" || typeof m.createdAt != "number")
5106
5512
  throw new Error("invalid stored auth request");
5107
- return a - m.createdAt >= Nr ? (g.removeItem(d), null) : { id: m.id, clientSecret: m.clientSecret };
5513
+ return a - m.createdAt >= Qr ? (g.removeItem(d), null) : { id: m.id, clientSecret: m.clientSecret };
5108
5514
  } catch {
5109
5515
  return g.removeItem(d), null;
5110
5516
  }
5111
5517
  }
5112
- function Ur(g, i, s, a, d = Date.now()) {
5113
- g.setItem(Oe(i, s), JSON.stringify({ ...a, createdAt: d }));
5518
+ function is(g, i, s, a, d = Date.now()) {
5519
+ g.setItem(Ue(i, s), JSON.stringify({ ...a, createdAt: d }));
5114
5520
  }
5115
- function St(g, i, s) {
5116
- g.removeItem(Oe(i, s)), g.removeItem(ze);
5521
+ function kt(g, i, s) {
5522
+ g.removeItem(Ue(i, s)), g.removeItem(ze);
5117
5523
  }
5118
5524
  function me() {
5119
5525
  return window.localStorage.removeItem(ze), window.sessionStorage;
5120
5526
  }
5121
- function qr(g, i = window.location.origin) {
5122
- return g.filter((s) => Mr(s, i));
5527
+ function rs(g, i = window.location.origin) {
5528
+ return g.filter((s) => ss(s, i));
5123
5529
  }
5124
- function Mr(g, i) {
5530
+ function ss(g, i) {
5125
5531
  try {
5126
5532
  const s = new URL(g, i);
5127
5533
  return ["http:", "https:", "mailto:", "whatsapp:"].includes(s.protocol);
@@ -5129,8 +5535,8 @@ function Mr(g, i) {
5129
5535
  return !1;
5130
5536
  }
5131
5537
  }
5132
- function Br(g, i, s) {
5133
- return g === "push" ? { start: !1, delayMs: 0 } : g === "polling" || !i || !s ? { start: !0, delayMs: 0 } : { start: !0, delayMs: Rt };
5538
+ function os(g, i, s) {
5539
+ return g === "push" ? { start: !1, delayMs: 0 } : g === "polling" || !i || !s ? { start: !0, delayMs: 0 } : { start: !0, delayMs: Lt };
5134
5540
  }
5135
5541
  const ve = class ve extends HTMLElement {
5136
5542
  constructor() {
@@ -5155,7 +5561,7 @@ const ve = class ve extends HTMLElement {
5155
5561
  this.handleInitialError(i);
5156
5562
  return;
5157
5563
  }
5158
- this.configureFooter(), this.bindBrowserReturnListeners(), this.dispatchPublicEvent("sendity:ready", {
5564
+ this.configureLanguageDirection(), this.configureFooter(), this.bindBrowserReturnListeners(), this.dispatchPublicEvent("sendity:ready", {
5159
5565
  transport: this.currentConfig.transport,
5160
5566
  channel: this.primaryChannel(this.activeVerifyUrls)
5161
5567
  }), this.showPlaceholderCode(), this.startWhenVisible();
@@ -5164,7 +5570,7 @@ const ve = class ve extends HTMLElement {
5164
5570
  this.stop(), this.destroyed = !0;
5165
5571
  }
5166
5572
  attributeChangedCallback() {
5167
- this.isConnected && (this.syncLayoutVariant(), this.currentConfig = this.resolveConfig(), this.configureFooter());
5573
+ this.isConnected && (this.syncLayoutVariant(), this.currentConfig = this.resolveConfig(), this.configureLanguageDirection(), this.configureFooter());
5168
5574
  }
5169
5575
  isNoCardVariant() {
5170
5576
  return this.getAttribute("variant") === "no-card" || this.hasAttribute("no-card");
@@ -5172,6 +5578,11 @@ const ve = class ve extends HTMLElement {
5172
5578
  syncLayoutVariant() {
5173
5579
  this.rootEl?.classList.toggle("sendity--no-card", this.isNoCardVariant());
5174
5580
  }
5581
+ configureLanguageDirection() {
5582
+ if (!this.currentConfig || !this.rootEl) return;
5583
+ const i = Vr(this.currentConfig.lang) ? "rtl" : "ltr";
5584
+ this.rootEl.setAttribute("lang", this.currentConfig.lang), this.rootEl.setAttribute("dir", i), this.codeContainerEl?.setAttribute("dir", "ltr"), this.codeEl?.setAttribute("dir", "ltr");
5585
+ }
5175
5586
  startWhenVisible() {
5176
5587
  if (!(this.authFlowStarted || this.destroyed)) {
5177
5588
  if (!("IntersectionObserver" in window)) {
@@ -5210,11 +5621,11 @@ const ve = class ve extends HTMLElement {
5210
5621
  s.textContent = a.tailwindCssText;
5211
5622
  else {
5212
5623
  const d = document.createElement("link");
5213
- d.rel = "stylesheet", d.href = Re, i.insertBefore(d, s);
5624
+ d.rel = "stylesheet", d.href = Le, i.insertBefore(d, s);
5214
5625
  }
5215
5626
  return;
5216
5627
  }
5217
- a.tailwindLoading || (a.tailwindLoading = fetch(Re).then((d) => d.ok ? d.text() : Promise.reject(new Error(`HTTP ${d.status}`))).then((d) => {
5628
+ a.tailwindLoading || (a.tailwindLoading = fetch(Le).then((d) => d.ok ? d.text() : Promise.reject(new Error(`HTTP ${d.status}`))).then((d) => {
5218
5629
  a.tailwindCssText = d;
5219
5630
  }).catch((d) => {
5220
5631
  console.warn("[sendity-auth] Failed to load Tailwind CSS for Shadow DOM", d), a.tailwindCssText = "";
@@ -5224,7 +5635,7 @@ const ve = class ve extends HTMLElement {
5224
5635
  s.textContent = a.tailwindCssText;
5225
5636
  else {
5226
5637
  const d = document.createElement("link");
5227
- d.rel = "stylesheet", d.href = Re, i.insertBefore(d, s);
5638
+ d.rel = "stylesheet", d.href = Le, i.insertBefore(d, s);
5228
5639
  }
5229
5640
  });
5230
5641
  }
@@ -5243,7 +5654,7 @@ const ve = class ve extends HTMLElement {
5243
5654
  scheduleBrowserReturnCheck() {
5244
5655
  this.destroyed || this.authenticated || !this.activeAuthRequestId || !this.activeAuthRequestSecret || document.visibilityState && document.visibilityState !== "visible" || (this.returnWaitTimer !== null && clearTimeout(this.returnWaitTimer), this.returnWaitTimer = window.setTimeout(() => {
5245
5656
  this.returnWaitTimer = null, !(this.destroyed || this.authenticated) && (this.showFooterWaitingState({ returnedFromClient: !0 }), this.step().catch((i) => console.warn("[sendity-auth] return check failed", i)));
5246
- }, Or));
5657
+ }, ns));
5247
5658
  }
5248
5659
  isFooterHidden() {
5249
5660
  const i = (this.getAttribute("footer") ?? "").trim().toLowerCase();
@@ -5257,13 +5668,13 @@ const ve = class ve extends HTMLElement {
5257
5668
  scheduleFooterWaitingState() {
5258
5669
  this.footerWaitTimer !== null || this.isFooterHidden() || (this.footerWaitTimer = window.setTimeout(() => {
5259
5670
  this.footerWaitTimer = null, this.showFooterWaitingState();
5260
- }, zr));
5671
+ }, ts));
5261
5672
  }
5262
5673
  setFooterIndicatorWaiting() {
5263
5674
  this.footerIndicatorEl && (this.footerIndicatorEl.classList.remove("footer-indicator--error"), this.footerIndicatorEl.innerHTML = "", this.footerIndicatorEl.removeAttribute("hidden"));
5264
5675
  }
5265
5676
  setFooterIndicatorError() {
5266
- this.footerIndicatorEl && (this.footerIndicatorEl.classList.add("footer-indicator--error"), this.footerIndicatorEl.innerHTML = Ir, this.footerIndicatorEl.removeAttribute("hidden"));
5677
+ this.footerIndicatorEl && (this.footerIndicatorEl.classList.add("footer-indicator--error"), this.footerIndicatorEl.innerHTML = Yr, this.footerIndicatorEl.removeAttribute("hidden"));
5267
5678
  }
5268
5679
  showFooterWaitingState(i = {}) {
5269
5680
  this.isFooterHidden() || (this.currentConfig && this.footerMessageEl && (this.footerMessageEl.textContent = i.returnedFromClient ? F(this.currentConfig.lang).ui.footerReturnedWaiting : this.waitingFooterMessage()), this.setFooterIndicatorWaiting(), this.footerEl?.classList.add("footer--waiting", "footer--transitioning"), this.footerBrandEl?.removeAttribute("hidden"), this.footerStatusEl?.removeAttribute("hidden"), this.footerTransitionTimer !== null && clearTimeout(this.footerTransitionTimer), this.footerTransitionTimer = window.setTimeout(() => {
@@ -5313,7 +5724,7 @@ const ve = class ve extends HTMLElement {
5313
5724
  });
5314
5725
  });
5315
5726
  const a = document.createElement("span");
5316
- a.className = "icon", a.setAttribute("aria-hidden", "true"), a.innerHTML = jr, s.appendChild(a);
5727
+ a.className = "icon", a.setAttribute("aria-hidden", "true"), a.innerHTML = Jr, s.appendChild(a);
5317
5728
  const d = document.createElement("span");
5318
5729
  d.className = "label", d.textContent = i.ui.getNewCode, s.appendChild(d), this.verifiersEl.appendChild(s);
5319
5730
  }
@@ -5335,13 +5746,13 @@ const ve = class ve extends HTMLElement {
5335
5746
  }
5336
5747
  resolveConfig() {
5337
5748
  const i = {
5338
- lang: yt(navigator.language) ?? "en",
5749
+ lang: bt(navigator.language) ?? "en",
5339
5750
  transport: "auto"
5340
- }, s = (E) => this.getAttribute(E) ?? void 0, a = s("server-url")?.trim() || Wr, d = s("public-key")?.trim();
5751
+ }, s = (E) => this.getAttribute(E) ?? void 0, a = s("server-url")?.trim() || Zr, d = s("public-key")?.trim();
5341
5752
  if (!d)
5342
5753
  throw new Error("Missing required sendity-auth attribute: public-key");
5343
- const l = yt(s("lang")) ?? i.lang, m = s("transport"), v = m === "push" || m === "polling" ? m : i.transport, y = this.parseAuthenticatedEventDelayMs(s("authenticated-event-delay-ms"));
5344
- return { serverUrl: a, publicKey: d, lang: l, transport: v, authenticatedEventDelayMs: y };
5754
+ const l = bt(s("lang")) ?? i.lang, m = s("transport"), v = m === "push" || m === "polling" ? m : i.transport, b = this.parseAuthenticatedEventDelayMs(s("authenticated-event-delay-ms"));
5755
+ return { serverUrl: a, publicKey: d, lang: l, transport: v, authenticatedEventDelayMs: b };
5345
5756
  }
5346
5757
  parseAuthenticatedEventDelayMs(i) {
5347
5758
  if (i === void 0 || i.trim() === "") return je;
@@ -5363,7 +5774,7 @@ const ve = class ve extends HTMLElement {
5363
5774
  if (!l.id) throw new Error("Missing id from server response");
5364
5775
  const m = this.extractClientSecret(l);
5365
5776
  if (!m) throw new Error("Missing client secret from server response");
5366
- return Ur(a, i, s, { id: String(l.id), clientSecret: m }), this.activeAuthRequestId = String(l.id), this.activeAuthRequestSecret = m, this.updateActiveAuthRequestExpiry(l), this.applyVerifyUrlsFromResponse(l), this.updateCode(l.formattedCode ?? l.code), this.dispatchPublicEvent("sendity:challenge-created", {
5777
+ return is(a, i, s, { id: String(l.id), clientSecret: m }), this.activeAuthRequestId = String(l.id), this.activeAuthRequestSecret = m, this.updateActiveAuthRequestExpiry(l), this.applyVerifyUrlsFromResponse(l), this.updateCode(l.formattedCode ?? l.code), this.dispatchPublicEvent("sendity:challenge-created", {
5367
5778
  verificationId: String(l.id),
5368
5779
  code: l.formattedCode ?? l.code ?? "",
5369
5780
  channel: this.primaryChannel(this.activeVerifyUrls)
@@ -5380,22 +5791,22 @@ const ve = class ve extends HTMLElement {
5380
5791
  this.authRequestStatusInit(d.clientSecret)
5381
5792
  );
5382
5793
  if (m.status !== 200)
5383
- return St(a, i, s), await this.step();
5794
+ return kt(a, i, s), await this.step();
5384
5795
  const v = await m.json();
5385
5796
  if (this.applyVerifyUrlsFromResponse(v), v.status === "verified")
5386
5797
  return this.handleAuthenticated(v), v;
5387
5798
  if (v.status === "expired")
5388
5799
  return this.updateActiveAuthRequestExpiry(v), this.updateCode(v.formattedCode ?? v.code), this.showExpiredState(), v;
5389
5800
  v.id && (this.activeAuthRequestId = String(v.id));
5390
- const y = this.extractClientSecret(v);
5391
- return y && (this.activeAuthRequestSecret = y), this.updateActiveAuthRequestExpiry(v), this.updateCode(v.formattedCode ?? v.code), v;
5801
+ const b = this.extractClientSecret(v);
5802
+ return b && (this.activeAuthRequestSecret = b), this.updateActiveAuthRequestExpiry(v), this.updateCode(v.formattedCode ?? v.code), v;
5392
5803
  }
5393
5804
  configureRealtime(i) {
5394
5805
  this.currentConfig || (this.currentConfig = this.resolveConfig());
5395
5806
  const { transport: s } = this.currentConfig, a = i?.broadcasting, d = !!(a?.key && a.channel && a.authEndpoint);
5396
5807
  let l = !1;
5397
5808
  s !== "polling" && d && a ? l = this.subscribeToBroadcasting(a) : s === "push" && console.warn("[sendity-auth] Push transport requested, but server response does not contain broadcasting metadata");
5398
- const m = Br(s, d, l);
5809
+ const m = os(s, d, l);
5399
5810
  m.start && this.startPolling(m.delayMs);
5400
5811
  }
5401
5812
  subscribeToBroadcasting(i) {
@@ -5422,11 +5833,13 @@ const ve = class ve extends HTMLElement {
5422
5833
  client_secret: this.activeAuthRequestSecret
5423
5834
  }
5424
5835
  }
5425
- }), this.echo.private(i.channel).listen(i.event ?? ".authenticated", (d) => {
5836
+ }), this.echo.private(i.channel).listen(".verification.received", (d) => {
5837
+ this.handleVerificationReceived(d);
5838
+ }).listen(i.event ?? ".authenticated", (d) => {
5426
5839
  this.handleAuthenticated(d);
5427
5840
  }), !0;
5428
5841
  } catch (s) {
5429
- return console.warn("[sendity-auth] realtime subscription failed, falling back to polling if enabled", s), this.currentConfig.transport === "auto" && this.startPolling(Rt), !1;
5842
+ return console.warn("[sendity-auth] realtime subscription failed, falling back to polling if enabled", s), this.currentConfig.transport === "auto" && this.startPolling(Lt), !1;
5430
5843
  }
5431
5844
  }
5432
5845
  startPolling(i) {
@@ -5434,12 +5847,17 @@ const ve = class ve extends HTMLElement {
5434
5847
  const s = () => {
5435
5848
  this.pollTimer !== null || this.authenticated || this.destroyed || (this.pollTimer = window.setInterval(() => {
5436
5849
  this.step().catch((a) => console.warn("[sendity-auth] poll failed", a));
5437
- }, Hr));
5850
+ }, es));
5438
5851
  };
5439
5852
  i > 0 ? this.fallbackPollTimer = window.setTimeout(() => {
5440
5853
  this.fallbackPollTimer = null, s();
5441
5854
  }, i) : s();
5442
5855
  }
5856
+ handleVerificationReceived(i) {
5857
+ if (this.authenticated) return;
5858
+ const s = i.auth_request_id ?? i.authRequestId;
5859
+ this.activeAuthRequestId && s && s !== this.activeAuthRequestId || this.showSuccess(i);
5860
+ }
5443
5861
  handleAuthenticated(i) {
5444
5862
  if (this.authenticated) return;
5445
5863
  if (!i.authorization) {
@@ -5448,7 +5866,7 @@ const ve = class ve extends HTMLElement {
5448
5866
  });
5449
5867
  return;
5450
5868
  }
5451
- this.authenticated = !0, this.currentConfig && St(me(), this.currentConfig.serverUrl, this.currentConfig.publicKey), this.stopAuthTransports(), this.showSuccess(i);
5869
+ this.authenticated = !0, this.currentConfig && kt(me(), this.currentConfig.serverUrl, this.currentConfig.publicKey), this.stopAuthTransports(), this.showSuccess(i);
5452
5870
  const s = this.toPublicAuthenticatedDetail(i), a = this.currentConfig?.authenticatedEventDelayMs ?? je;
5453
5871
  this.authenticatedEventTimer = window.setTimeout(() => {
5454
5872
  this.authenticatedEventTimer = null, !this.destroyed && this.dispatchPublicEvent("sendity:authenticated", s);
@@ -5476,7 +5894,7 @@ const ve = class ve extends HTMLElement {
5476
5894
  return s.startsWith("mailto:") ? "email" : s.startsWith("whatsapp:") || s.startsWith("whatsapp://") ? "whatsapp" : "unknown";
5477
5895
  }
5478
5896
  applyVerifyUrlsFromResponse(i) {
5479
- const s = Array.isArray(i.verify_urls) ? i.verify_urls : Array.isArray(i.verifyUrls) ? i.verifyUrls : [], a = Array.isArray(i.verification_endpoints) ? i.verification_endpoints.map((l) => typeof l.url == "string" ? l.url : typeof l.scheme == "string" && typeof l.recipient == "string" ? `${l.scheme}:${l.recipient}` : "") : [], d = qr([...s, ...a].map(String));
5897
+ const s = Array.isArray(i.verify_urls) ? i.verify_urls : Array.isArray(i.verifyUrls) ? i.verifyUrls : [], a = Array.isArray(i.verification_endpoints) ? i.verification_endpoints.map((l) => typeof l.url == "string" ? l.url : typeof l.scheme == "string" && typeof l.recipient == "string" ? `${l.scheme}:${l.recipient}` : "") : [], d = rs([...s, ...a].map(String));
5480
5898
  d.length !== 0 && (this.activeVerifyUrls = [...new Set(d)], this.renderVerifiers(this.activeVerifyUrls));
5481
5899
  }
5482
5900
  authRequestStatusUrl(i, s) {
@@ -5558,6 +5976,26 @@ const ve = class ve extends HTMLElement {
5558
5976
  return "et-EE";
5559
5977
  case "fi":
5560
5978
  return "fi-FI";
5979
+ case "ro":
5980
+ return "ro-RO";
5981
+ case "bg":
5982
+ return "bg-BG";
5983
+ case "hu":
5984
+ return "hu-HU";
5985
+ case "no":
5986
+ return "nb-NO";
5987
+ case "uk":
5988
+ return "uk-UA";
5989
+ case "bs":
5990
+ return "bs-BA";
5991
+ case "mk":
5992
+ return "mk-MK";
5993
+ case "is":
5994
+ return "is-IS";
5995
+ case "ga":
5996
+ return "ga-IE";
5997
+ case "mt":
5998
+ return "mt-MT";
5561
5999
  case "ar":
5562
6000
  return "ar-SA";
5563
6001
  case "he":
@@ -5568,6 +6006,18 @@ const ve = class ve extends HTMLElement {
5568
6006
  return "ko-KR";
5569
6007
  case "zh":
5570
6008
  return "zh-CN";
6009
+ case "vi":
6010
+ return "vi-VN";
6011
+ case "hi":
6012
+ return "hi-IN";
6013
+ case "id":
6014
+ return "id-ID";
6015
+ case "ms":
6016
+ return "ms-MY";
6017
+ case "bn":
6018
+ return "bn-BD";
6019
+ case "th":
6020
+ return "th-TH";
5571
6021
  default:
5572
6022
  return "en-US";
5573
6023
  }
@@ -5689,6 +6139,41 @@ const ve = class ve extends HTMLElement {
5689
6139
  return "ή";
5690
6140
  case "tr":
5691
6141
  return "veya";
6142
+ case "ro":
6143
+ return "sau";
6144
+ case "bg":
6145
+ return "или";
6146
+ case "hu":
6147
+ return "vagy";
6148
+ case "no":
6149
+ return "eller";
6150
+ case "uk":
6151
+ return "або";
6152
+ case "bs":
6153
+ return "ili";
6154
+ case "mk":
6155
+ return "или";
6156
+ case "is":
6157
+ return "eða";
6158
+ case "ga":
6159
+ return "nó";
6160
+ case "mt":
6161
+ return "jew";
6162
+ case "ar":
6163
+ return "أو";
6164
+ case "he":
6165
+ return "או";
6166
+ case "vi":
6167
+ return "hoặc";
6168
+ case "hi":
6169
+ return "या";
6170
+ case "id":
6171
+ case "ms":
6172
+ return "atau";
6173
+ case "bn":
6174
+ return "অথবা";
6175
+ case "th":
6176
+ return "หรือ";
5692
6177
  default:
5693
6178
  return "or";
5694
6179
  }
@@ -5699,10 +6184,10 @@ const ve = class ve extends HTMLElement {
5699
6184
  const s = this.currentConfig;
5700
6185
  i.forEach((a, d) => {
5701
6186
  if (d > 0 && i.length === 2) {
5702
- const S = document.createElement("div");
5703
- S.className = "divider", S.setAttribute("aria-hidden", "true");
5704
- const I = document.createElement("span");
5705
- I.textContent = this.orLabel(s.lang), S.appendChild(I), this.verifiersEl.appendChild(S);
6187
+ const k = document.createElement("div");
6188
+ k.className = "divider", k.setAttribute("aria-hidden", "true");
6189
+ const W = document.createElement("span");
6190
+ W.textContent = this.orLabel(s.lang), k.appendChild(W), this.verifiersEl.appendChild(k);
5706
6191
  }
5707
6192
  const l = document.createElement("div");
5708
6193
  l.className = "opt";
@@ -5712,15 +6197,15 @@ const ve = class ve extends HTMLElement {
5712
6197
  });
5713
6198
  const v = this.iconForUrl(a);
5714
6199
  if (v) {
5715
- const S = document.createElement("span");
5716
- S.className = "icon", S.setAttribute("aria-hidden", "true"), S.innerHTML = v, m.appendChild(S);
6200
+ const k = document.createElement("span");
6201
+ k.className = "icon", k.setAttribute("aria-hidden", "true"), k.innerHTML = v, m.appendChild(k);
5717
6202
  }
5718
- const y = document.createElement("span");
5719
- y.className = "label", y.textContent = this.channelLabel(a, s.lang), m.appendChild(y), l.appendChild(m);
6203
+ const b = document.createElement("span");
6204
+ b.className = "label", b.textContent = this.channelLabel(a, s.lang), m.appendChild(b), l.appendChild(m);
5720
6205
  const E = this.destinationText(a, s.lang);
5721
6206
  if (E) {
5722
- const S = document.createElement("a");
5723
- S.className = "dest", S.href = m.href, S.target = "_blank", S.rel = "noopener noreferrer", S.textContent = E, l.appendChild(S);
6207
+ const k = document.createElement("a");
6208
+ k.className = "dest", k.href = m.href, k.target = "_blank", k.rel = "noopener noreferrer", k.textContent = E, l.appendChild(k);
5724
6209
  }
5725
6210
  this.verifiersEl.appendChild(l);
5726
6211
  });
@@ -5770,10 +6255,10 @@ const ve = class ve extends HTMLElement {
5770
6255
  iconForUrl(i) {
5771
6256
  try {
5772
6257
  const s = new URL(i, window.location.origin);
5773
- if (s.protocol === "mailto:") return bt;
6258
+ if (s.protocol === "mailto:") return yt;
5774
6259
  if (s.protocol === "whatsapp:" || s.protocol === "whatsapp://") return wt;
5775
6260
  } catch {
5776
- if (i.startsWith("mailto:")) return bt;
6261
+ if (i.startsWith("mailto:")) return yt;
5777
6262
  if (i.startsWith("whatsapp:") || i.startsWith("whatsapp://")) return wt;
5778
6263
  }
5779
6264
  return null;
@@ -5791,16 +6276,16 @@ const ve = class ve extends HTMLElement {
5791
6276
  const a = this.lastCode, d = F(s), l = window.location.host;
5792
6277
  if (!a) return i;
5793
6278
  if (i.startsWith("mailto:")) {
5794
- const [m, v = ""] = i.split("?"), y = new URLSearchParams(v), E = this.applyTemplate(d.templates.emailSubject, l, a), S = this.applyTemplate(d.templates.emailBody, l, a);
5795
- y.set("subject", E), y.set("body", S);
5796
- const I = this.toQuery(y);
5797
- return `${m}?${I}`;
6279
+ const [m, v = ""] = i.split("?"), b = new URLSearchParams(v), E = this.applyTemplate(d.templates.emailSubject, l, a), k = this.applyTemplate(d.templates.emailBody, l, a);
6280
+ b.set("subject", E), b.set("body", k);
6281
+ const W = this.toQuery(b);
6282
+ return `${m}?${W}`;
5798
6283
  }
5799
6284
  if (i.startsWith("whatsapp:") || i.startsWith("whatsapp://")) {
5800
- const [m, v = ""] = i.split("?"), y = new URLSearchParams(v), E = this.applyTemplate(d.templates.whatsappText, l, a);
5801
- y.set("text", E);
5802
- const S = this.toQuery(y);
5803
- return `${m}?${S}`;
6285
+ const [m, v = ""] = i.split("?"), b = new URLSearchParams(v), E = this.applyTemplate(d.templates.whatsappText, l, a);
6286
+ b.set("text", E);
6287
+ const k = this.toQuery(b);
6288
+ return `${m}?${k}`;
5804
6289
  }
5805
6290
  return i;
5806
6291
  }
@@ -5822,8 +6307,8 @@ const ve = class ve extends HTMLElement {
5822
6307
  }
5823
6308
  };
5824
6309
  ve.tailwindCssText = null, ve.tailwindLoading = null;
5825
- let Ie = ve;
5826
- customElements.get("sendity-auth") || customElements.define("sendity-auth", Ie);
6310
+ let We = ve;
6311
+ customElements.get("sendity-auth") || customElements.define("sendity-auth", We);
5827
6312
  export {
5828
- Ie as Sendity
6313
+ We as Sendity
5829
6314
  };