@sesamy/sesamy-js 1.10.2 → 1.10.3

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.
@@ -1,6 +1,6 @@
1
- var Ur = Object.defineProperty;
2
- var zr = (t, e, n) => e in t ? Ur(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var q = (t, e, n) => (zr(t, typeof e != "symbol" ? e + "" : e, n), n);
1
+ var Rr = Object.defineProperty;
2
+ var Lr = (t, e, n) => e in t ? Rr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var q = (t, e, n) => (Lr(t, typeof e != "symbol" ? e + "" : e, n), n);
4
4
  function ue(t, e) {
5
5
  const n = new CustomEvent(t, {
6
6
  detail: e,
@@ -21,13 +21,13 @@ function ne(t, e) {
21
21
  return n;
22
22
  }
23
23
  var he = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
24
- function At(t) {
24
+ function $t(t) {
25
25
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
26
26
  }
27
- function $t(t, e) {
27
+ function Nt(t, e) {
28
28
  return t(e = { exports: {} }, e.exports), e.exports;
29
29
  }
30
- var de = $t(function(t, e) {
30
+ var de = Nt(function(t, e) {
31
31
  Object.defineProperty(e, "__esModule", { value: !0 });
32
32
  var n = function() {
33
33
  function r() {
@@ -58,8 +58,8 @@ var de = $t(function(t, e) {
58
58
  return n.getInstance();
59
59
  };
60
60
  });
61
- At(de);
62
- var Rr = At($t(function(t, e) {
61
+ $t(de);
62
+ var Dr = $t(Nt(function(t, e) {
63
63
  var n = he && he.__awaiter || function(u, c, m, d) {
64
64
  return new (m || (m = Promise))(function(w, k) {
65
65
  function v(y) {
@@ -327,7 +327,7 @@ var Rr = At($t(function(t, e) {
327
327
  }();
328
328
  e.default = p;
329
329
  }));
330
- const Dr = { timeoutInSeconds: 60 }, Mn = { name: "auth0-spa-js", version: "2.1.3" }, Zn = () => Date.now();
330
+ const Mr = { timeoutInSeconds: 60 }, Fn = { name: "auth0-spa-js", version: "2.1.3" }, Hn = () => Date.now();
331
331
  let G = class kt extends Error {
332
332
  constructor(e, n) {
333
333
  super(n), this.error = e, this.error_description = n, Object.setPrototypeOf(this, kt.prototype);
@@ -335,55 +335,55 @@ let G = class kt extends Error {
335
335
  static fromPayload({ error: e, error_description: n }) {
336
336
  return new kt(e, n);
337
337
  }
338
- }, Lr = class Kn extends G {
338
+ }, Zr = class Jn extends G {
339
339
  constructor(e, n, r, i = null) {
340
- super(e, n), this.state = r, this.appState = i, Object.setPrototypeOf(this, Kn.prototype);
340
+ super(e, n), this.state = r, this.appState = i, Object.setPrototypeOf(this, Jn.prototype);
341
341
  }
342
- }, It = class Wn extends G {
342
+ }, It = class Xn extends G {
343
343
  constructor() {
344
- super("timeout", "Timeout"), Object.setPrototypeOf(this, Wn.prototype);
344
+ super("timeout", "Timeout"), Object.setPrototypeOf(this, Xn.prototype);
345
345
  }
346
- }, Mr = class Hn extends It {
346
+ }, Kr = class Vn extends It {
347
347
  constructor(e) {
348
- super(), this.popup = e, Object.setPrototypeOf(this, Hn.prototype);
348
+ super(), this.popup = e, Object.setPrototypeOf(this, Vn.prototype);
349
349
  }
350
- }, Zr = class Fn extends G {
350
+ }, Wr = class Yn extends G {
351
351
  constructor(e) {
352
- super("cancelled", "Popup closed"), this.popup = e, Object.setPrototypeOf(this, Fn.prototype);
352
+ super("cancelled", "Popup closed"), this.popup = e, Object.setPrototypeOf(this, Yn.prototype);
353
353
  }
354
- }, Kr = class Jn extends G {
354
+ }, Fr = class Gn extends G {
355
355
  constructor(e, n, r) {
356
- super(e, n), this.mfa_token = r, Object.setPrototypeOf(this, Jn.prototype);
356
+ super(e, n), this.mfa_token = r, Object.setPrototypeOf(this, Gn.prototype);
357
357
  }
358
- }, Xn = class Vn extends G {
358
+ }, Bn = class qn extends G {
359
359
  constructor(e, n) {
360
- super("missing_refresh_token", `Missing Refresh Token (audience: '${Jt(e, ["default"])}', scope: '${Jt(n)}')`), this.audience = e, this.scope = n, Object.setPrototypeOf(this, Vn.prototype);
360
+ super("missing_refresh_token", `Missing Refresh Token (audience: '${Yt(e, ["default"])}', scope: '${Yt(n)}')`), this.audience = e, this.scope = n, Object.setPrototypeOf(this, qn.prototype);
361
361
  }
362
362
  };
363
- function Jt(t, e = []) {
363
+ function Yt(t, e = []) {
364
364
  return t && !e.includes(t) ? t : "";
365
365
  }
366
366
  const Qe = () => window.crypto, dt = () => {
367
367
  const t = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";
368
368
  let e = "";
369
369
  return Array.from(Qe().getRandomValues(new Uint8Array(43))).forEach((n) => e += t[n % t.length]), e;
370
- }, Xt = (t) => btoa(t), St = (t) => {
370
+ }, Gt = (t) => btoa(t), St = (t) => {
371
371
  var { clientId: e } = t, n = ne(t, ["clientId"]);
372
372
  return new URLSearchParams(((r) => Object.keys(r).filter((i) => r[i] !== void 0).reduce((i, o) => Object.assign(Object.assign({}, i), { [o]: r[o] }), {}))(Object.assign({ client_id: e }, n))).toString();
373
- }, Vt = (t) => ((e) => decodeURIComponent(atob(e).split("").map((n) => "%" + ("00" + n.charCodeAt(0).toString(16)).slice(-2)).join("")))(t.replace(/_/g, "/").replace(/-/g, "+")), Wr = async (t, e) => {
373
+ }, Bt = (t) => ((e) => decodeURIComponent(atob(e).split("").map((n) => "%" + ("00" + n.charCodeAt(0).toString(16)).slice(-2)).join("")))(t.replace(/_/g, "/").replace(/-/g, "+")), Hr = async (t, e) => {
374
374
  const n = await fetch(t, e);
375
375
  return { ok: n.ok, json: await n.json() };
376
- }, Hr = async (t, e, n) => {
376
+ }, Jr = async (t, e, n) => {
377
377
  const r = new AbortController();
378
378
  let i;
379
- return e.signal = r.signal, Promise.race([Wr(t, e), new Promise((o, a) => {
379
+ return e.signal = r.signal, Promise.race([Hr(t, e), new Promise((o, a) => {
380
380
  i = setTimeout(() => {
381
381
  r.abort(), a(new Error("Timeout when executing 'fetch'"));
382
382
  }, n);
383
383
  })]).finally(() => {
384
384
  clearTimeout(i);
385
385
  });
386
- }, Fr = async (t, e, n, r, i, o, a) => {
386
+ }, Xr = async (t, e, n, r, i, o, a) => {
387
387
  return s = { auth: { audience: e, scope: n }, timeout: i, fetchUrl: t, fetchOptions: r, useFormData: a }, f = o, new Promise(function(p, u) {
388
388
  const c = new MessageChannel();
389
389
  c.port1.onmessage = function(m) {
@@ -391,30 +391,30 @@ const Qe = () => window.crypto, dt = () => {
391
391
  }, f.postMessage(s, [c.port2]);
392
392
  });
393
393
  var s, f;
394
- }, Jr = async (t, e, n, r, i, o, a = 1e4) => i ? Fr(t, e, n, r, a, i, o) : Hr(t, r, a);
395
- async function Xr(t, e) {
394
+ }, Vr = async (t, e, n, r, i, o, a = 1e4) => i ? Xr(t, e, n, r, a, i, o) : Jr(t, r, a);
395
+ async function Yr(t, e) {
396
396
  var { baseUrl: n, timeout: r, audience: i, scope: o, auth0Client: a, useFormData: s } = t, f = ne(t, ["baseUrl", "timeout", "audience", "scope", "auth0Client", "useFormData"]);
397
397
  const p = s ? St(f) : JSON.stringify(f);
398
398
  return await async function(u, c, m, d, w, k, v) {
399
399
  let _, S = null;
400
400
  for (let C = 0; C < 3; C++)
401
401
  try {
402
- _ = await Jr(u, m, d, w, k, v, c), S = null;
402
+ _ = await Vr(u, m, d, w, k, v, c), S = null;
403
403
  break;
404
- } catch (D) {
405
- S = D;
404
+ } catch (L) {
405
+ S = L;
406
406
  }
407
407
  if (S)
408
408
  throw S;
409
409
  const y = _.json, { error: l, error_description: b } = y, T = ne(y, ["error", "error_description"]), { ok: O } = _;
410
410
  if (!O) {
411
411
  const C = b || `HTTP error. Unable to fetch ${u}`;
412
- throw l === "mfa_required" ? new Kr(l, C, T.mfa_token) : l === "missing_refresh_token" ? new Xn(m, d) : new G(l || "request_error", C);
412
+ throw l === "mfa_required" ? new Fr(l, C, T.mfa_token) : l === "missing_refresh_token" ? new Bn(m, d) : new G(l || "request_error", C);
413
413
  }
414
414
  return T;
415
- }(`${n}/oauth/token`, r, i || "default", o, { method: "POST", body: p, headers: { "Content-Type": s ? "application/x-www-form-urlencoded" : "application/json", "Auth0-Client": btoa(JSON.stringify(a || Mn)) } }, e, s);
415
+ }(`${n}/oauth/token`, r, i || "default", o, { method: "POST", body: p, headers: { "Content-Type": s ? "application/x-www-form-urlencoded" : "application/json", "Auth0-Client": btoa(JSON.stringify(a || Fn)) } }, e, s);
416
416
  }
417
- const Fe = (...t) => {
417
+ const He = (...t) => {
418
418
  return (e = t.filter(Boolean).join(" ").trim().split(/\s+/), Array.from(new Set(e))).join(" ");
419
419
  var e;
420
420
  };
@@ -433,7 +433,7 @@ let pe = class _t {
433
433
  const { scope: n, audience: r, client_id: i } = e;
434
434
  return new _t({ scope: n, audience: r, clientId: i });
435
435
  }
436
- }, Vr = class {
436
+ }, Gr = class {
437
437
  set(e, n) {
438
438
  localStorage.setItem(e, JSON.stringify(n));
439
439
  }
@@ -452,7 +452,7 @@ let pe = class _t {
452
452
  allKeys() {
453
453
  return Object.keys(window.localStorage).filter((e) => e.startsWith("@@auth0spajs@@"));
454
454
  }
455
- }, Yn = class {
455
+ }, Qn = class {
456
456
  constructor() {
457
457
  this.enclosedCache = /* @__PURE__ */ function() {
458
458
  let e = {};
@@ -467,9 +467,9 @@ let pe = class _t {
467
467
  }, allKeys: () => Object.keys(e) };
468
468
  }();
469
469
  }
470
- }, Yr = class {
470
+ }, Br = class {
471
471
  constructor(e, n, r) {
472
- this.cache = e, this.keyManifest = n, this.nowProvider = r || Zn;
472
+ this.cache = e, this.keyManifest = n, this.nowProvider = r || Hn;
473
473
  }
474
474
  async setIdToken(e, n, r) {
475
475
  var i;
@@ -530,7 +530,7 @@ let pe = class _t {
530
530
  return o.prefix === "@@auth0spajs@@" && o.clientId === e.clientId && o.audience === e.audience && f;
531
531
  })[0];
532
532
  }
533
- }, Gr = class {
533
+ }, qr = class {
534
534
  constructor(e, n, r) {
535
535
  this.storage = e, this.clientId = n, this.cookieDomain = r, this.storageKey = `a0.spajs.txs.${this.clientId}`;
536
536
  }
@@ -544,17 +544,17 @@ let pe = class _t {
544
544
  this.storage.remove(this.storageKey, { cookieDomain: this.cookieDomain });
545
545
  }
546
546
  };
547
- const Ue = (t) => typeof t == "number", Br = ["iss", "aud", "exp", "nbf", "iat", "jti", "azp", "nonce", "auth_time", "at_hash", "c_hash", "acr", "amr", "sub_jwk", "cnf", "sip_from_tag", "sip_date", "sip_callid", "sip_cseq_num", "sip_via_branch", "orig", "dest", "mky", "events", "toe", "txn", "rph", "sid", "vot", "vtm"], qr = (t) => {
547
+ const Ue = (t) => typeof t == "number", Qr = ["iss", "aud", "exp", "nbf", "iat", "jti", "azp", "nonce", "auth_time", "at_hash", "c_hash", "acr", "amr", "sub_jwk", "cnf", "sip_from_tag", "sip_date", "sip_callid", "sip_cseq_num", "sip_via_branch", "orig", "dest", "mky", "events", "toe", "txn", "rph", "sid", "vot", "vtm"], ei = (t) => {
548
548
  if (!t.id_token)
549
549
  throw new Error("ID token is required but missing");
550
550
  const e = ((o) => {
551
551
  const a = o.split("."), [s, f, p] = a;
552
552
  if (a.length !== 3 || !s || !f || !p)
553
553
  throw new Error("ID token could not be decoded");
554
- const u = JSON.parse(Vt(f)), c = { __raw: o }, m = {};
554
+ const u = JSON.parse(Bt(f)), c = { __raw: o }, m = {};
555
555
  return Object.keys(u).forEach((d) => {
556
- c[d] = u[d], Br.includes(d) || (m[d] = u[d]);
557
- }), { encoded: { header: s, payload: f, signature: p }, header: JSON.parse(Vt(s)), claims: c, user: m };
556
+ c[d] = u[d], Qr.includes(d) || (m[d] = u[d]);
557
+ }), { encoded: { header: s, payload: f, signature: p }, header: JSON.parse(Bt(s)), claims: c, user: m };
558
558
  })(t.id_token);
559
559
  if (!e.claims.iss)
560
560
  throw new Error("Issuer (iss) claim must be a string present in the ID token");
@@ -620,7 +620,7 @@ const Ue = (t) => typeof t == "number", Br = ["iss", "aud", "exp", "nbf", "iat",
620
620
  }
621
621
  return e;
622
622
  };
623
- var me = $t(function(t, e) {
623
+ var me = Nt(function(t, e) {
624
624
  var n = he && he.__assign || function() {
625
625
  return n = Object.assign || function(f) {
626
626
  for (var p, u = 1, c = arguments.length; u < c; u++)
@@ -667,27 +667,27 @@ var me = $t(function(t, e) {
667
667
  s(f, "", n(n({}, p), { expires: -1 }));
668
668
  };
669
669
  });
670
- At(me), me.encode, me.parse, me.getAll;
671
- var Qr = me.get, Gn = me.set, Bn = me.remove;
670
+ $t(me), me.encode, me.parse, me.getAll;
671
+ var ti = me.get, er = me.set, tr = me.remove;
672
672
  const Ie = { get(t) {
673
- const e = Qr(t);
673
+ const e = ti(t);
674
674
  if (e !== void 0)
675
675
  return JSON.parse(e);
676
676
  }, save(t, e, n) {
677
677
  let r = {};
678
- window.location.protocol === "https:" && (r = { secure: !0, sameSite: "none" }), n != null && n.daysUntilExpire && (r.expires = n.daysUntilExpire), n != null && n.cookieDomain && (r.domain = n.cookieDomain), Gn(t, JSON.stringify(e), r);
678
+ window.location.protocol === "https:" && (r = { secure: !0, sameSite: "none" }), n != null && n.daysUntilExpire && (r.expires = n.daysUntilExpire), n != null && n.cookieDomain && (r.domain = n.cookieDomain), er(t, JSON.stringify(e), r);
679
679
  }, remove(t, e) {
680
680
  let n = {};
681
- e != null && e.cookieDomain && (n.domain = e.cookieDomain), Bn(t, n);
682
- } }, ei = { get(t) {
681
+ e != null && e.cookieDomain && (n.domain = e.cookieDomain), tr(t, n);
682
+ } }, ni = { get(t) {
683
683
  return Ie.get(t) || Ie.get(`_legacy_${t}`);
684
684
  }, save(t, e, n) {
685
685
  let r = {};
686
- window.location.protocol === "https:" && (r = { secure: !0 }), n != null && n.daysUntilExpire && (r.expires = n.daysUntilExpire), n != null && n.cookieDomain && (r.domain = n.cookieDomain), Gn(`_legacy_${t}`, JSON.stringify(e), r), Ie.save(t, e, n);
686
+ window.location.protocol === "https:" && (r = { secure: !0 }), n != null && n.daysUntilExpire && (r.expires = n.daysUntilExpire), n != null && n.cookieDomain && (r.domain = n.cookieDomain), er(`_legacy_${t}`, JSON.stringify(e), r), Ie.save(t, e, n);
687
687
  }, remove(t, e) {
688
688
  let n = {};
689
- e != null && e.cookieDomain && (n.domain = e.cookieDomain), Bn(t, n), Ie.remove(t, e), Ie.remove(`_legacy_${t}`, e);
690
- } }, ti = { get(t) {
689
+ e != null && e.cookieDomain && (n.domain = e.cookieDomain), tr(t, n), Ie.remove(t, e), Ie.remove(`_legacy_${t}`, e);
690
+ } }, ri = { get(t) {
691
691
  if (typeof sessionStorage > "u")
692
692
  return;
693
693
  const e = sessionStorage.getItem(t);
@@ -697,7 +697,7 @@ const Ie = { get(t) {
697
697
  }, remove(t) {
698
698
  sessionStorage.removeItem(t);
699
699
  } };
700
- function ni(t, e, n) {
700
+ function ii(t, e, n) {
701
701
  var r = e === void 0 ? null : e, i = function(f, p) {
702
702
  var u = atob(f);
703
703
  if (p) {
@@ -710,11 +710,11 @@ function ni(t, e, n) {
710
710
  `, 10) + 1, a = i.substring(o) + (r ? "//# sourceMappingURL=" + r : ""), s = new Blob([a], { type: "application/javascript" });
711
711
  return URL.createObjectURL(s);
712
712
  }
713
- var Yt, Gt, Bt, ht, ri = (Yt = "Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=", Gt = null, Bt = !1, function(t) {
714
- return ht = ht || ni(Yt, Gt, Bt), new Worker(ht, t);
713
+ var qt, Qt, en, ht, oi = (qt = "Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=", Qt = null, en = !1, function(t) {
714
+ return ht = ht || ii(qt, Qt, en), new Worker(ht, t);
715
715
  });
716
716
  const ft = {};
717
- let ii = class {
717
+ let ai = class {
718
718
  constructor(e, n) {
719
719
  this.cache = e, this.clientId = n, this.manifestKey = this.createManifestKeyFrom(this.clientId);
720
720
  }
@@ -740,14 +740,14 @@ let ii = class {
740
740
  return `@@auth0spajs@@::${e}`;
741
741
  }
742
742
  };
743
- const oi = { memory: () => new Yn().enclosedCache, localstorage: () => new Vr() }, qt = (t) => oi[t], Qt = (t) => {
743
+ const si = { memory: () => new Qn().enclosedCache, localstorage: () => new Gr() }, tn = (t) => si[t], nn = (t) => {
744
744
  const { openUrl: e, onRedirect: n } = t, r = ne(t, ["openUrl", "onRedirect"]);
745
745
  return Object.assign(Object.assign({}, r), { openUrl: e === !1 || e ? e : n });
746
- }, pt = new Rr();
747
- let ai = class {
746
+ }, pt = new Dr();
747
+ let ci = class {
748
748
  constructor(e) {
749
749
  let n, r;
750
- if (this.userCache = new Yn().enclosedCache, this.defaultOptions = { authorizationParams: { scope: "openid profile email" }, useRefreshTokensFallback: !1, useFormData: !0 }, this._releaseLockOnPageHide = async () => {
750
+ if (this.userCache = new Qn().enclosedCache, this.defaultOptions = { authorizationParams: { scope: "openid profile email" }, useRefreshTokensFallback: !1, useFormData: !0 }, this._releaseLockOnPageHide = async () => {
751
751
  await pt.releaseLock("auth0.lock.getTokenSilently"), window.removeEventListener("pagehide", this._releaseLockOnPageHide);
752
752
  }, this.options = Object.assign(Object.assign(Object.assign({}, this.defaultOptions), e), { authorizationParams: Object.assign(Object.assign({}, this.defaultOptions.authorizationParams), e.authorizationParams) }), typeof window < "u" && (() => {
753
753
  if (!Qe())
@@ -759,17 +759,17 @@ let ai = class {
759
759
  })(), e.cache && e.cacheLocation && console.warn("Both `cache` and `cacheLocation` options have been specified in the Auth0Client configuration; ignoring `cacheLocation` and using `cache`."), e.cache)
760
760
  r = e.cache;
761
761
  else {
762
- if (n = e.cacheLocation || "memory", !qt(n))
762
+ if (n = e.cacheLocation || "memory", !tn(n))
763
763
  throw new Error(`Invalid cache location "${n}"`);
764
- r = qt(n)();
764
+ r = tn(n)();
765
765
  }
766
- this.httpTimeoutMs = e.httpTimeoutInSeconds ? 1e3 * e.httpTimeoutInSeconds : 1e4, this.cookieStorage = e.legacySameSiteCookie === !1 ? Ie : ei, this.orgHintCookieName = `auth0.${this.options.clientId}.organization_hint`, this.isAuthenticatedCookieName = ((a) => `auth0.${a}.is.authenticated`)(this.options.clientId), this.sessionCheckExpiryDays = e.sessionCheckExpiryDays || 1;
767
- const i = e.useCookiesForTransactions ? this.cookieStorage : ti;
766
+ this.httpTimeoutMs = e.httpTimeoutInSeconds ? 1e3 * e.httpTimeoutInSeconds : 1e4, this.cookieStorage = e.legacySameSiteCookie === !1 ? Ie : ni, this.orgHintCookieName = `auth0.${this.options.clientId}.organization_hint`, this.isAuthenticatedCookieName = ((a) => `auth0.${a}.is.authenticated`)(this.options.clientId), this.sessionCheckExpiryDays = e.sessionCheckExpiryDays || 1;
767
+ const i = e.useCookiesForTransactions ? this.cookieStorage : ri;
768
768
  var o;
769
- this.scope = Fe("openid", this.options.authorizationParams.scope, this.options.useRefreshTokens ? "offline_access" : ""), this.transactionManager = new Gr(i, this.options.clientId, this.options.cookieDomain), this.nowProvider = this.options.nowProvider || Zn, this.cacheManager = new Yr(r, r.allKeys ? void 0 : new ii(r, this.options.clientId), this.nowProvider), this.domainUrl = (o = this.options.domain, /^https?:\/\//.test(o) ? o : `https://${o}`), this.tokenIssuer = ((a, s) => a ? a.startsWith("https://") ? a : `https://${a}/` : `${s}/`)(this.options.issuer, this.domainUrl), typeof window < "u" && window.Worker && this.options.useRefreshTokens && n === "memory" && (this.options.workerUrl ? this.worker = new Worker(this.options.workerUrl) : this.worker = new ri());
769
+ this.scope = He("openid", this.options.authorizationParams.scope, this.options.useRefreshTokens ? "offline_access" : ""), this.transactionManager = new qr(i, this.options.clientId, this.options.cookieDomain), this.nowProvider = this.options.nowProvider || Hn, this.cacheManager = new Br(r, r.allKeys ? void 0 : new ai(r, this.options.clientId), this.nowProvider), this.domainUrl = (o = this.options.domain, /^https?:\/\//.test(o) ? o : `https://${o}`), this.tokenIssuer = ((a, s) => a ? a.startsWith("https://") ? a : `https://${a}/` : `${s}/`)(this.options.issuer, this.domainUrl), typeof window < "u" && window.Worker && this.options.useRefreshTokens && n === "memory" && (this.options.workerUrl ? this.worker = new Worker(this.options.workerUrl) : this.worker = new oi());
770
770
  }
771
771
  _url(e) {
772
- const n = encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client || Mn)));
772
+ const n = encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client || Fn)));
773
773
  return `${this.domainUrl}${e}&auth0Client=${n}`;
774
774
  }
775
775
  _authorizeUrl(e) {
@@ -777,20 +777,20 @@ let ai = class {
777
777
  }
778
778
  async _verifyIdToken(e, n, r) {
779
779
  const i = await this.nowProvider();
780
- return qr({ iss: this.tokenIssuer, aud: this.options.clientId, id_token: e, nonce: n, organization: r, leeway: this.options.leeway, max_age: (o = this.options.authorizationParams.max_age, typeof o != "string" ? o : parseInt(o, 10) || void 0), now: i });
780
+ return ei({ iss: this.tokenIssuer, aud: this.options.clientId, id_token: e, nonce: n, organization: r, leeway: this.options.leeway, max_age: (o = this.options.authorizationParams.max_age, typeof o != "string" ? o : parseInt(o, 10) || void 0), now: i });
781
781
  var o;
782
782
  }
783
783
  _processOrgHint(e) {
784
784
  e ? this.cookieStorage.save(this.orgHintCookieName, e, { daysUntilExpire: this.sessionCheckExpiryDays, cookieDomain: this.options.cookieDomain }) : this.cookieStorage.remove(this.orgHintCookieName, { cookieDomain: this.options.cookieDomain });
785
785
  }
786
786
  async _prepareAuthorizeUrl(e, n, r) {
787
- const i = Xt(dt()), o = Xt(dt()), a = dt(), s = ((u) => {
787
+ const i = Gt(dt()), o = Gt(dt()), a = dt(), s = ((u) => {
788
788
  const c = new Uint8Array(u);
789
789
  return ((m) => {
790
790
  const d = { "+": "-", "/": "_", "=": "" };
791
791
  return m.replace(/[+/=]/g, (w) => d[w]);
792
792
  })(window.btoa(String.fromCharCode(...Array.from(c))));
793
- })(await (async (u) => await Qe().subtle.digest({ name: "SHA-256" }, new TextEncoder().encode(u)))(a)), f = ((u, c, m, d, w, k, v, _) => Object.assign(Object.assign(Object.assign({ client_id: u.clientId }, u.authorizationParams), m), { scope: Fe(c, m.scope), response_type: "code", response_mode: _ || "query", state: d, nonce: w, redirect_uri: v || u.authorizationParams.redirect_uri, code_challenge: k, code_challenge_method: "S256" }))(this.options, this.scope, e, i, o, s, e.redirect_uri || this.options.authorizationParams.redirect_uri || r, n == null ? void 0 : n.response_mode), p = this._authorizeUrl(f);
793
+ })(await (async (u) => await Qe().subtle.digest({ name: "SHA-256" }, new TextEncoder().encode(u)))(a)), f = ((u, c, m, d, w, k, v, _) => Object.assign(Object.assign(Object.assign({ client_id: u.clientId }, u.authorizationParams), m), { scope: He(c, m.scope), response_type: "code", response_mode: _ || "query", state: d, nonce: w, redirect_uri: v || u.authorizationParams.redirect_uri, code_challenge: k, code_challenge_method: "S256" }))(this.options, this.scope, e, i, o, s, e.redirect_uri || this.options.authorizationParams.redirect_uri || r, n == null ? void 0 : n.response_mode), p = this._authorizeUrl(f);
794
794
  return { nonce: o, code_verifier: a, scope: f.scope, audience: f.audience || "default", redirect_uri: f.redirect_uri, state: i, url: p };
795
795
  }
796
796
  async loginWithPopup(e, n) {
@@ -805,9 +805,9 @@ let ai = class {
805
805
  const o = await ((s) => new Promise((f, p) => {
806
806
  let u;
807
807
  const c = setInterval(() => {
808
- s.popup && s.popup.closed && (clearInterval(c), clearTimeout(m), window.removeEventListener("message", u, !1), p(new Zr(s.popup)));
808
+ s.popup && s.popup.closed && (clearInterval(c), clearTimeout(m), window.removeEventListener("message", u, !1), p(new Wr(s.popup)));
809
809
  }, 1e3), m = setTimeout(() => {
810
- clearInterval(c), p(new Mr(s.popup)), window.removeEventListener("message", u, !1);
810
+ clearInterval(c), p(new Kr(s.popup)), window.removeEventListener("message", u, !1);
811
811
  }, 1e3 * (s.timeoutInSeconds || 60));
812
812
  u = function(d) {
813
813
  if (d.data && d.data.type === "authorization_response") {
@@ -834,7 +834,7 @@ let ai = class {
834
834
  }
835
835
  async loginWithRedirect(e = {}) {
836
836
  var n;
837
- const r = Qt(e), { openUrl: i, fragment: o, appState: a } = r, s = ne(r, ["openUrl", "fragment", "appState"]), f = ((n = s.authorizationParams) === null || n === void 0 ? void 0 : n.organization) || this.options.authorizationParams.organization, p = await this._prepareAuthorizeUrl(s.authorizationParams || {}), { url: u } = p, c = ne(p, ["url"]);
837
+ const r = nn(e), { openUrl: i, fragment: o, appState: a } = r, s = ne(r, ["openUrl", "fragment", "appState"]), f = ((n = s.authorizationParams) === null || n === void 0 ? void 0 : n.organization) || this.options.authorizationParams.organization, p = await this._prepareAuthorizeUrl(s.authorizationParams || {}), { url: u } = p, c = ne(p, ["url"]);
838
838
  this.transactionManager.create(Object.assign(Object.assign(Object.assign({}, c), { appState: a }), f && { organization: f }));
839
839
  const m = o ? `${u}#${o}` : u;
840
840
  i ? await i(m) : window.location.assign(m);
@@ -851,7 +851,7 @@ let ai = class {
851
851
  if (!s)
852
852
  throw new G("missing_transaction", "Invalid state");
853
853
  if (this.transactionManager.remove(), o)
854
- throw new Lr(o, a || o, r, s.appState);
854
+ throw new Zr(o, a || o, r, s.appState);
855
855
  if (!s.code_verifier || s.state && s.state !== r)
856
856
  throw new G("state_mismatch", "Invalid state");
857
857
  const f = s.organization, p = s.nonce, u = s.redirect_uri;
@@ -870,7 +870,7 @@ let ai = class {
870
870
  }
871
871
  async getTokenSilently(e = {}) {
872
872
  var n;
873
- const r = Object.assign(Object.assign({ cacheMode: "on" }, e), { authorizationParams: Object.assign(Object.assign(Object.assign({}, this.options.authorizationParams), e.authorizationParams), { scope: Fe(this.scope, (n = e.authorizationParams) === null || n === void 0 ? void 0 : n.scope) }) }), i = await ((o, a) => {
873
+ const r = Object.assign(Object.assign({ cacheMode: "on" }, e), { authorizationParams: Object.assign(Object.assign(Object.assign({}, this.options.authorizationParams), e.authorizationParams), { scope: He(this.scope, (n = e.authorizationParams) === null || n === void 0 ? void 0 : n.scope) }) }), i = await ((o, a) => {
874
874
  let s = ft[a];
875
875
  return s || (s = o().finally(() => {
876
876
  delete ft[a], s = null;
@@ -908,8 +908,8 @@ let ai = class {
908
908
  }
909
909
  async getTokenWithPopup(e = {}, n = {}) {
910
910
  var r;
911
- const i = Object.assign(Object.assign({}, e), { authorizationParams: Object.assign(Object.assign(Object.assign({}, this.options.authorizationParams), e.authorizationParams), { scope: Fe(this.scope, (r = e.authorizationParams) === null || r === void 0 ? void 0 : r.scope) }) });
912
- return n = Object.assign(Object.assign({}, Dr), n), await this.loginWithPopup(i, n), (await this.cacheManager.get(new pe({ scope: i.authorizationParams.scope, audience: i.authorizationParams.audience || "default", clientId: this.options.clientId }))).access_token;
911
+ const i = Object.assign(Object.assign({}, e), { authorizationParams: Object.assign(Object.assign(Object.assign({}, this.options.authorizationParams), e.authorizationParams), { scope: He(this.scope, (r = e.authorizationParams) === null || r === void 0 ? void 0 : r.scope) }) });
912
+ return n = Object.assign(Object.assign({}, Mr), n), await this.loginWithPopup(i, n), (await this.cacheManager.get(new pe({ scope: i.authorizationParams.scope, audience: i.authorizationParams.audience || "default", clientId: this.options.clientId }))).access_token;
913
913
  }
914
914
  async isAuthenticated() {
915
915
  return !!await this.getUser();
@@ -920,7 +920,7 @@ let ai = class {
920
920
  return this._url(`/v2/logout?${St(Object.assign({ clientId: e.clientId }, i))}`) + o;
921
921
  }
922
922
  async logout(e = {}) {
923
- const n = Qt(e), { openUrl: r } = n, i = ne(n, ["openUrl"]);
923
+ const n = nn(e), { openUrl: r } = n, i = ne(n, ["openUrl"]);
924
924
  e.clientId === null ? await this.cacheManager.clear() : await this.cacheManager.clear(e.clientId || this.options.clientId), this.cookieStorage.remove(this.orgHintCookieName, { cookieDomain: this.options.cookieDomain }), this.cookieStorage.remove(this.isAuthenticatedCookieName, { cookieDomain: this.options.cookieDomain }), this.userCache.remove("@@user@@");
925
925
  const o = this._buildLogoutUrl(i);
926
926
  r ? await r(o) : r !== !1 && window.location.assign(o);
@@ -962,7 +962,7 @@ let ai = class {
962
962
  if (!(n && n.refresh_token || this.worker)) {
963
963
  if (this.options.useRefreshTokensFallback)
964
964
  return await this._getTokenFromIFrame(e);
965
- throw new Xn(e.authorizationParams.audience || "default", e.authorizationParams.scope);
965
+ throw new Bn(e.authorizationParams.audience || "default", e.authorizationParams.scope);
966
966
  }
967
967
  const r = e.authorizationParams.redirect_uri || this.options.authorizationParams.redirect_uri || window.location.origin, i = typeof e.timeoutInSeconds == "number" ? 1e3 * e.timeoutInSeconds : null;
968
968
  try {
@@ -990,25 +990,25 @@ let ai = class {
990
990
  }
991
991
  }
992
992
  async _requestToken(e, n) {
993
- const { nonceIn: r, organization: i } = n || {}, o = await Xr(Object.assign({ baseUrl: this.domainUrl, client_id: this.options.clientId, auth0Client: this.options.auth0Client, useFormData: this.options.useFormData, timeout: this.httpTimeoutMs }, e), this.worker), a = await this._verifyIdToken(o.id_token, r, i);
993
+ const { nonceIn: r, organization: i } = n || {}, o = await Yr(Object.assign({ baseUrl: this.domainUrl, client_id: this.options.clientId, auth0Client: this.options.auth0Client, useFormData: this.options.useFormData, timeout: this.httpTimeoutMs }, e), this.worker), a = await this._verifyIdToken(o.id_token, r, i);
994
994
  return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({}, o), { decodedToken: a, scope: e.scope, audience: e.audience || "default" }), o.scope ? { oauthTokenScope: o.scope } : null), { client_id: this.options.clientId })), this.cookieStorage.save(this.isAuthenticatedCookieName, !0, { daysUntilExpire: this.sessionCheckExpiryDays, cookieDomain: this.options.cookieDomain }), this._processOrgHint(i || a.claims.org_id), Object.assign(Object.assign({}, o), { decodedToken: a });
995
995
  }
996
996
  };
997
- async function si(t) {
998
- const e = new ai(t);
997
+ async function ui(t) {
998
+ const e = new ci(t);
999
999
  return await e.checkSession(), e;
1000
1000
  }
1001
- const Et = "sesamy.com", ci = "https://logs.sesamy.com/events", Pt = "sesamyCacheTimestamp";
1001
+ const Et = "sesamy.com", li = "https://logs.sesamy.com/events", Pt = "sesamyCacheTimestamp";
1002
1002
  var Q = /* @__PURE__ */ ((t) => (t.READY = "sesamyJsReady", t.AUTHENTICATED = "sesamyJsAuthenticated", t.LOGOUT = "sesamyJsLogout", t.CLEAR_CACHE = "sesamyJsClearCache", t.USER_ATTRIBUTE_CHANGED = "sesamyUserAttributeChanged", t.PURCHASE = "sesamyJsPurchase", t))(Q || {});
1003
- let B;
1004
- const Nt = "sesamyAccessToken", Ut = "sesamyExpires";
1005
- function zt() {
1006
- const t = localStorage.getItem(Ut);
1003
+ let B, Tt;
1004
+ const Ut = "sesamyAccessToken", zt = "sesamyExpires";
1005
+ function Rt() {
1006
+ const t = localStorage.getItem(zt);
1007
1007
  if (!(t && parseInt(t, 10) < (/* @__PURE__ */ new Date()).getTime()))
1008
- return localStorage.getItem(Nt);
1008
+ return localStorage.getItem(Ut);
1009
1009
  }
1010
- async function ui(t) {
1011
- if (t.enabled !== !1 && (B = await si({
1010
+ async function di(t) {
1011
+ if (t.enabled !== !1 && (Tt = t.organization, B = await ui({
1012
1012
  domain: t.endpoint || `token.${Et}`,
1013
1013
  clientId: t.clientId
1014
1014
  }), window.location.search.includes("code=")))
@@ -1021,15 +1021,15 @@ async function ui(t) {
1021
1021
  } catch {
1022
1022
  }
1023
1023
  }
1024
- async function qn() {
1025
- if (zt())
1024
+ async function Lt() {
1025
+ if (Rt())
1026
1026
  return !0;
1027
1027
  if (!B)
1028
1028
  throw new Error("Auth0 client not initialized");
1029
1029
  return B.isAuthenticated();
1030
1030
  }
1031
- async function li() {
1032
- if (zt())
1031
+ async function hi() {
1032
+ if (Rt())
1033
1033
  return {
1034
1034
  sub: "local",
1035
1035
  name: "Local User"
@@ -1038,17 +1038,16 @@ async function li() {
1038
1038
  throw new Error("Auth0 client not initialized");
1039
1039
  return B.getUser();
1040
1040
  }
1041
- function Qn() {
1041
+ function Dt(t) {
1042
1042
  if (!B)
1043
1043
  throw new Error("Auth0 client not initialized");
1044
- return B.loginWithRedirect({
1045
- authorizationParams: {
1046
- redirect_uri: window.location.href
1047
- }
1048
- });
1044
+ const e = {
1045
+ redirect_uri: window.location.href
1046
+ };
1047
+ return t != null && t.email && (e.login_hint = t.email), Tt && (e.organization = Tt), B.loginWithRedirect({ authorizationParams: e });
1049
1048
  }
1050
- async function en(t = !0) {
1051
- const e = zt();
1049
+ async function rn(t = !0) {
1050
+ const e = Rt();
1052
1051
  if (e)
1053
1052
  return e;
1054
1053
  try {
@@ -1061,8 +1060,8 @@ async function en(t = !0) {
1061
1060
  return null;
1062
1061
  }
1063
1062
  }
1064
- async function di() {
1065
- if (localStorage.removeItem(Nt), localStorage.removeItem(Ut), !B)
1063
+ async function fi() {
1064
+ if (localStorage.removeItem(Ut), localStorage.removeItem(zt), !B)
1066
1065
  throw new Error("Auth0 client not initialized");
1067
1066
  return ue(Q.LOGOUT, {}), B.logout({
1068
1067
  logoutParams: {
@@ -1070,7 +1069,7 @@ async function di() {
1070
1069
  }
1071
1070
  });
1072
1071
  }
1073
- function hi(t) {
1072
+ function pi(t) {
1074
1073
  const e = t.split(".");
1075
1074
  if (e.length !== 3)
1076
1075
  throw new Error("Invalid JWT token format.");
@@ -1081,12 +1080,12 @@ function hi(t) {
1081
1080
  );
1082
1081
  return JSON.parse(i);
1083
1082
  }
1084
- async function er(t, e) {
1085
- localStorage.setItem(Nt, t), e && localStorage.setItem(Ut, JSON.stringify(e * 1e3 + (/* @__PURE__ */ new Date()).getTime()));
1086
- const n = hi(t);
1083
+ async function nr(t, e) {
1084
+ localStorage.setItem(Ut, t), e && localStorage.setItem(zt, JSON.stringify(e * 1e3 + (/* @__PURE__ */ new Date()).getTime()));
1085
+ const n = pi(t);
1087
1086
  ue(Q.AUTHENTICATED, n);
1088
1087
  }
1089
- const fi = (t, e) => e.skipDedupe || e.method !== "GET", pi = (t, e) => e.method + "@" + t, mi = (t) => t.clone(), tn = ({ skip: t = fi, key: e = pi, resolver: n = mi } = {}) => {
1088
+ const mi = (t, e) => e.skipDedupe || e.method !== "GET", gi = (t, e) => e.method + "@" + t, yi = (t) => t.clone(), on = ({ skip: t = mi, key: e = gi, resolver: n = yi } = {}) => {
1090
1089
  const r = /* @__PURE__ */ new Map();
1091
1090
  return (i) => (o, a) => {
1092
1091
  if (t(o, a))
@@ -1106,7 +1105,7 @@ const fi = (t, e) => e.skipDedupe || e.method !== "GET", pi = (t, e) => e.method
1106
1105
  return r.delete(s), Promise.reject(f);
1107
1106
  }
1108
1107
  };
1109
- }, gi = (t, e) => t * e, yi = (t) => t && t.ok, nn = ({ delayTimer: t = 500, delayRamp: e = gi, maxAttempts: n = 10, until: r = yi, onRetry: i = null, retryOnNetworkError: o = !1, resolveWithLatestResponse: a = !1, skip: s } = {}) => (f) => (p, u) => {
1108
+ }, vi = (t, e) => t * e, wi = (t) => t && t.ok, an = ({ delayTimer: t = 500, delayRamp: e = vi, maxAttempts: n = 10, until: r = wi, onRetry: i = null, retryOnNetworkError: o = !1, resolveWithLatestResponse: a = !1, skip: s } = {}) => (f) => (p, u) => {
1110
1109
  let c = 0;
1111
1110
  if (s && s(p, u))
1112
1111
  return f(p, u);
@@ -1133,12 +1132,12 @@ const fi = (t, e) => e.skipDedupe || e.method !== "GET", pi = (t, e) => e.method
1133
1132
  throw d;
1134
1133
  return m(null, d);
1135
1134
  });
1136
- }, vi = "application/json", tr = "Content-Type", ke = Symbol(), nr = Symbol();
1137
- function rn(t = {}) {
1135
+ }, bi = "application/json", rr = "Content-Type", ke = Symbol(), ir = Symbol();
1136
+ function sn(t = {}) {
1138
1137
  var e;
1139
- return (e = Object.entries(t).find(([n]) => n.toLowerCase() === tr.toLowerCase())) === null || e === void 0 ? void 0 : e[1];
1138
+ return (e = Object.entries(t).find(([n]) => n.toLowerCase() === rr.toLowerCase())) === null || e === void 0 ? void 0 : e[1];
1140
1139
  }
1141
- function on(t) {
1140
+ function cn(t) {
1142
1141
  return /^application\/.*json.*/.test(t);
1143
1142
  }
1144
1143
  const ge = function(t, e, n = !1) {
@@ -1167,28 +1166,28 @@ const ge = function(t, e, n = !1) {
1167
1166
  return n && i ? new i(...r) : i;
1168
1167
  }
1169
1168
  };
1170
- function wi(t, e = !1) {
1169
+ function ki(t, e = !1) {
1171
1170
  Oe.options = e ? t : ge(Oe.options, t);
1172
1171
  }
1173
- function bi(t, e = !1) {
1172
+ function Ii(t, e = !1) {
1174
1173
  Oe.polyfills = e ? t : ge(Oe.polyfills, t);
1175
1174
  }
1176
- function ki(t) {
1175
+ function Si(t) {
1177
1176
  Oe.errorType = t;
1178
1177
  }
1179
- const Ii = (t) => (e) => t.reduceRight((n, r) => r(n), e) || e;
1180
- class rr extends Error {
1178
+ const _i = (t) => (e) => t.reduceRight((n, r) => r(n), e) || e;
1179
+ class or extends Error {
1181
1180
  }
1182
- const Si = (t) => {
1181
+ const Ei = (t) => {
1183
1182
  const e = /* @__PURE__ */ Object.create(null);
1184
1183
  t = t._addons.reduce((y, l) => l.beforeRequest && l.beforeRequest(y, t._options, e) || y, t);
1185
1184
  const { _url: n, _options: r, _config: i, _catchers: o, _resolvers: a, _middlewares: s, _addons: f } = t, p = new Map(o), u = ge(i.options, r);
1186
1185
  let c = n;
1187
- const m = Ii(s)((y, l) => (c = y, i.polyfill("fetch")(y, l)))(n, u), d = new Error(), w = m.catch((y) => {
1186
+ const m = _i(s)((y, l) => (c = y, i.polyfill("fetch")(y, l)))(n, u), d = new Error(), w = m.catch((y) => {
1188
1187
  throw { [ke]: y };
1189
1188
  }).then((y) => {
1190
1189
  if (!y.ok) {
1191
- const l = new rr();
1190
+ const l = new or();
1192
1191
  if (l.cause = d, l.stack = l.stack + `
1193
1192
  CAUSE: ` + d.stack, l.response = y, l.url = c, y.type === "opaque")
1194
1193
  throw l;
@@ -1207,7 +1206,7 @@ CAUSE: ` + d.stack, l.response = y, l.url = c, y.type === "opaque")
1207
1206
  const b = l.hasOwnProperty(ke), T = b ? l[ke] : l, O = (T == null ? void 0 : T.status) && p.get(T.status) || p.get(T == null ? void 0 : T.name) || b && p.has(ke) && p.get(ke);
1208
1207
  if (O)
1209
1208
  return O(T, t);
1210
- const C = p.get(nr);
1209
+ const C = p.get(ir);
1211
1210
  if (C)
1212
1211
  return C(T, t);
1213
1212
  throw T;
@@ -1250,7 +1249,7 @@ CAUSE: ` + d.stack, l.response = y, l.url = c, y.type === "opaque")
1250
1249
  ...typeof l.resolver == "function" ? l.resolver(y) : l.resolver
1251
1250
  }), _);
1252
1251
  return a.reduce((y, l) => l(y, t), S);
1253
- }, _i = {
1252
+ }, Pi = {
1254
1253
  _url: "",
1255
1254
  _options: {},
1256
1255
  _config: Oe,
@@ -1300,7 +1299,7 @@ CAUSE: ` + d.stack, l.response = y, l.url = c, y.type === "opaque")
1300
1299
  return this.headers({ Accept: t });
1301
1300
  },
1302
1301
  content(t) {
1303
- return this.headers({ [tr]: t });
1302
+ return this.headers({ [rr]: t });
1304
1303
  },
1305
1304
  auth(t) {
1306
1305
  return this.headers({ Authorization: t });
@@ -1310,7 +1309,7 @@ CAUSE: ` + d.stack, l.response = y, l.url = c, y.type === "opaque")
1310
1309
  return n.set(t, e), { ...this, _catchers: n };
1311
1310
  },
1312
1311
  catcherFallback(t) {
1313
- return this.catcher(nr, t);
1312
+ return this.catcher(ir, t);
1314
1313
  },
1315
1314
  resolve(t, e = !1) {
1316
1315
  return { ...this, _resolvers: e ? [t] : [...this._resolvers, t] };
@@ -1329,8 +1328,8 @@ CAUSE: ` + d.stack, l.response = y, l.url = c, y.type === "opaque")
1329
1328
  },
1330
1329
  fetch(t = this._options.method, e = "", n = null) {
1331
1330
  let r = this.url(e).options({ method: t });
1332
- const i = rn(r._options.headers), o = typeof n == "object" && (!r._options.headers || !i || on(i));
1333
- return r = n ? o ? r.json(n, i) : r.body(n) : r, Si(r._deferred.reduce((a, s) => s(a, a._url, a._options), r));
1331
+ const i = sn(r._options.headers), o = typeof n == "object" && (!r._options.headers || !i || cn(i));
1332
+ return r = n ? o ? r.json(n, i) : r.body(n) : r, Ei(r._deferred.reduce((a, s) => s(a, a._url, a._options), r));
1334
1333
  },
1335
1334
  get(t = "") {
1336
1335
  return this.fetch("GET", t);
@@ -1357,22 +1356,22 @@ CAUSE: ` + d.stack, l.response = y, l.url = c, y.type === "opaque")
1357
1356
  return { ...this, _options: { ...this._options, body: t } };
1358
1357
  },
1359
1358
  json(t, e) {
1360
- const n = rn(this._options.headers);
1361
- return this.content(e || on(n) && n || vi).body(JSON.stringify(t));
1359
+ const n = sn(this._options.headers);
1360
+ return this.content(e || cn(n) && n || bi).body(JSON.stringify(t));
1362
1361
  }
1363
1362
  };
1364
1363
  function le(t = "", e = {}) {
1365
- return { ..._i, _url: t, _options: e };
1364
+ return { ...Pi, _url: t, _options: e };
1366
1365
  }
1367
1366
  le.default = le;
1368
- le.options = wi;
1369
- le.errorType = ki;
1370
- le.polyfills = bi;
1371
- le.WretchError = rr;
1367
+ le.options = ki;
1368
+ le.errorType = Si;
1369
+ le.polyfills = Ii;
1370
+ le.WretchError = or;
1372
1371
  function te() {
1373
1372
  sessionStorage.removeItem(Pt), ue(Q.CLEAR_CACHE, {});
1374
1373
  }
1375
- function Ei(t) {
1374
+ function Ti(t) {
1376
1375
  const e = t.endpoint || `https://api2.${Et}`, n = (I) => async (E, W) => {
1377
1376
  let h = sessionStorage.getItem(Pt);
1378
1377
  h || (h = Date.now().toString(), sessionStorage.setItem(Pt, h));
@@ -1386,7 +1385,7 @@ function Ei(t) {
1386
1385
  return I(E, g);
1387
1386
  }, r = (I = !0) => (E) => async (W, h) => {
1388
1387
  let g = null;
1389
- if (g = await en(I), !g) {
1388
+ if (g = await rn(I), !g) {
1390
1389
  if (I)
1391
1390
  throw new Error("No access token available");
1392
1391
  return E(W, h);
@@ -1413,8 +1412,8 @@ function Ei(t) {
1413
1412
  }, o = le(e).headers({ "Content-Type": "application/json" }).middlewares([
1414
1413
  n,
1415
1414
  r(),
1416
- tn(),
1417
- nn({
1415
+ on(),
1416
+ an({
1418
1417
  delayTimer: 1e3,
1419
1418
  delayRamp: (I, E) => I * E,
1420
1419
  maxAttempts: 3,
@@ -1425,8 +1424,8 @@ function Ei(t) {
1425
1424
  n,
1426
1425
  r(!1),
1427
1426
  i,
1428
- tn(),
1429
- nn({
1427
+ on(),
1428
+ an({
1430
1429
  delayTimer: 1e3,
1431
1430
  delayRamp: (I, E) => I * E,
1432
1431
  maxAttempts: 3,
@@ -1496,14 +1495,14 @@ function Ei(t) {
1496
1495
  const E = await a.url(`/tallies/${I}`).delete().res();
1497
1496
  return te(), E.ok;
1498
1497
  }
1499
- async function D(I, E) {
1498
+ async function L(I, E) {
1500
1499
  return await a.url(`/tallies/${I}/push`).post(E).json();
1501
1500
  }
1502
1501
  async function z(I) {
1503
1502
  return await o.url(`/products/${I}`).get().json();
1504
1503
  }
1505
- async function F() {
1506
- return await qn() ? await o.url("/profile").get().json() : null;
1504
+ async function H() {
1505
+ return await Lt() ? await o.url("/profile").get().json() : null;
1507
1506
  }
1508
1507
  async function $(I) {
1509
1508
  const E = await o.url("/profile").patch(I).res();
@@ -1517,7 +1516,7 @@ function Ei(t) {
1517
1516
  return E.length && te(), E;
1518
1517
  }
1519
1518
  async function j() {
1520
- const I = await en(!1), E = new URL(`https://account.${Et}/subscriptions/${t.clientId}`);
1519
+ const I = await rn(!1), E = new URL(`https://account.${Et}/subscriptions/${t.clientId}`);
1521
1520
  I && (E.hash = `#access_token=${I}`), window.location.href = E.toString();
1522
1521
  }
1523
1522
  return {
@@ -1526,7 +1525,7 @@ function Ei(t) {
1526
1525
  getEntitlementAccess: p,
1527
1526
  getContracts: u,
1528
1527
  getContract: c,
1529
- getProfile: F,
1528
+ getProfile: H,
1530
1529
  updateProfile: $,
1531
1530
  getSubscriptions: m,
1532
1531
  getBills: d,
@@ -1541,75 +1540,75 @@ function Ei(t) {
1541
1540
  getTally: T,
1542
1541
  getTallies: O,
1543
1542
  deleteTally: C,
1544
- pushTally: D,
1543
+ pushTally: L,
1545
1544
  getProduct: z,
1546
1545
  getPaymentIssues: R,
1547
1546
  autoOnboardProduct: K,
1548
1547
  openHostedAccountPage: j
1549
1548
  };
1550
1549
  }
1551
- const ir = "@sesamy/sesamy-js", Rt = "1.3.2";
1552
- function an(t, e, n, r, i) {
1550
+ const ar = "@sesamy/sesamy-js", Mt = "1.3.2";
1551
+ function un(t, e, n, r, i) {
1553
1552
  for (e = e.split ? e.split(".") : e, r = 0; r < e.length; r++)
1554
1553
  t = t ? t[e[r]] : i;
1555
1554
  return t === i ? n : t;
1556
1555
  }
1557
- var Je = "undefined", sn = "object", Tt = function() {
1558
- }, or = "any", ar = "*", ve = "__", tt = typeof process < "u" ? process : {};
1556
+ var Je = "undefined", ln = "object", Ot = function() {
1557
+ }, sr = "any", cr = "*", ve = "__", tt = typeof process < "u" ? process : {};
1559
1558
  tt.env && tt.env.NODE_ENV;
1560
1559
  var X = typeof document < "u";
1561
1560
  tt.versions != null && tt.versions.node != null;
1562
1561
  typeof Deno < "u" && Deno.core;
1563
1562
  X && window.name === "nodejs" || typeof navigator < "u" && navigator.userAgent !== void 0 && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom"));
1564
- function sr(t, e) {
1563
+ function ur(t, e) {
1565
1564
  return e.charAt(0)[t]() + e.slice(1);
1566
1565
  }
1567
- var Pi = sr.bind(null, "toUpperCase"), Ti = sr.bind(null, "toLowerCase");
1568
- function Oi(t) {
1569
- return cr(t) ? Pi("null") : typeof t == "object" ? Ai(t) : Object.prototype.toString.call(t).slice(8, -1);
1566
+ var Oi = ur.bind(null, "toUpperCase"), ji = ur.bind(null, "toLowerCase");
1567
+ function Ci(t) {
1568
+ return lr(t) ? Oi("null") : typeof t == "object" ? Ni(t) : Object.prototype.toString.call(t).slice(8, -1);
1570
1569
  }
1571
1570
  function nt(t, e) {
1572
1571
  e === void 0 && (e = !0);
1573
- var n = Oi(t);
1574
- return e ? Ti(n) : n;
1572
+ var n = Ci(t);
1573
+ return e ? ji(n) : n;
1575
1574
  }
1576
1575
  function We(t, e) {
1577
1576
  return typeof e === t;
1578
1577
  }
1579
- var Y = We.bind(null, "function"), se = We.bind(null, "string"), Se = We.bind(null, "undefined"), ji = We.bind(null, "boolean");
1578
+ var Y = We.bind(null, "function"), se = We.bind(null, "string"), Se = We.bind(null, "undefined"), xi = We.bind(null, "boolean");
1580
1579
  We.bind(null, "symbol");
1581
- function cr(t) {
1580
+ function lr(t) {
1582
1581
  return t === null;
1583
1582
  }
1584
- function Ci(t) {
1583
+ function Ai(t) {
1585
1584
  return nt(t) === "number" && !isNaN(t);
1586
1585
  }
1587
- function ur(t) {
1586
+ function dr(t) {
1588
1587
  return nt(t) === "array";
1589
1588
  }
1590
1589
  function V(t) {
1591
- if (!xi(t))
1590
+ if (!$i(t))
1592
1591
  return !1;
1593
1592
  for (var e = t; Object.getPrototypeOf(e) !== null; )
1594
1593
  e = Object.getPrototypeOf(e);
1595
1594
  return Object.getPrototypeOf(t) === e;
1596
1595
  }
1597
- function xi(t) {
1596
+ function $i(t) {
1598
1597
  return t && (typeof t == "object" || t !== null);
1599
1598
  }
1600
- function Ai(t) {
1599
+ function Ni(t) {
1601
1600
  return Y(t.constructor) ? t.constructor.name : null;
1602
1601
  }
1603
- function $i(t) {
1604
- return t instanceof Error || se(t.message) && t.constructor && Ci(t.constructor.stackTraceLimit);
1602
+ function Ui(t) {
1603
+ return t instanceof Error || se(t.message) && t.constructor && Ai(t.constructor.stackTraceLimit);
1605
1604
  }
1606
- function lr(t, e) {
1607
- if (typeof e != "object" || cr(e))
1605
+ function hr(t, e) {
1606
+ if (typeof e != "object" || lr(e))
1608
1607
  return !1;
1609
1608
  if (e instanceof t)
1610
1609
  return !0;
1611
1610
  var n = nt(new t(""));
1612
- if ($i(e))
1611
+ if (Ui(e))
1613
1612
  for (; e; ) {
1614
1613
  if (nt(e) === n)
1615
1614
  return !0;
@@ -1617,13 +1616,13 @@ function lr(t, e) {
1617
1616
  }
1618
1617
  return !1;
1619
1618
  }
1620
- lr.bind(null, TypeError);
1621
- lr.bind(null, SyntaxError);
1619
+ hr.bind(null, TypeError);
1620
+ hr.bind(null, SyntaxError);
1622
1621
  function ot(t, e) {
1623
1622
  var n = t instanceof Element || t instanceof HTMLDocument;
1624
- return n && e ? Ni(t, e) : n;
1623
+ return n && e ? zi(t, e) : n;
1625
1624
  }
1626
- function Ni(t, e) {
1625
+ function zi(t, e) {
1627
1626
  return e === void 0 && (e = ""), t && t.nodeName === e.toUpperCase();
1628
1627
  }
1629
1628
  function at(t) {
@@ -1636,37 +1635,37 @@ at(ot, "form");
1636
1635
  at(ot, "button");
1637
1636
  at(ot, "input");
1638
1637
  at(ot, "select");
1639
- function Ui(t) {
1640
- return t ? ur(t) ? t : [t] : [];
1638
+ function Ri(t) {
1639
+ return t ? dr(t) ? t : [t] : [];
1641
1640
  }
1642
- function cn(t) {
1641
+ function dn(t) {
1643
1642
  try {
1644
1643
  return decodeURIComponent(t.replace(/\+/g, " "));
1645
1644
  } catch {
1646
1645
  return null;
1647
1646
  }
1648
1647
  }
1649
- function zi() {
1648
+ function Li() {
1650
1649
  if (X) {
1651
1650
  var t = navigator, e = t.languages;
1652
1651
  return t.userLanguage || (e && e.length ? e[0] : t.language);
1653
1652
  }
1654
1653
  }
1655
- function Ri() {
1654
+ function Di() {
1656
1655
  try {
1657
1656
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
1658
1657
  } catch {
1659
1658
  }
1660
1659
  }
1661
- function Di(t) {
1660
+ function Mi(t) {
1662
1661
  return function(e) {
1663
1662
  for (var n, r = /* @__PURE__ */ Object.create(null), i = /([^&=]+)=?([^&]*)/g; n = i.exec(e); ) {
1664
- var o = cn(n[1]), a = cn(n[2]);
1663
+ var o = dn(n[1]), a = dn(n[2]);
1665
1664
  o.substring(o.length - 2) === "[]" ? (r[o = o.substring(0, o.length - 2)] || (r[o] = [])).push(a) : r[o] = a === "" || a;
1666
1665
  }
1667
1666
  for (var s in r) {
1668
1667
  var f = s.split("[");
1669
- f.length > 1 && (Li(r, f.map(function(p) {
1668
+ f.length > 1 && (Zi(r, f.map(function(p) {
1670
1669
  return p.replace(/[?[\]\\ ]/g, "");
1671
1670
  }), r[s]), delete r[s]);
1672
1671
  }
@@ -1679,7 +1678,7 @@ function Di(t) {
1679
1678
  return X && window.location.search.substring(1);
1680
1679
  }(t));
1681
1680
  }
1682
- function Li(t, e, n) {
1681
+ function Zi(t, e, n) {
1683
1682
  for (var r = e.length - 1, i = 0; i < r; ++i) {
1684
1683
  var o = e[i];
1685
1684
  if (o === "__proto__" || o === "constructor")
@@ -1695,7 +1694,7 @@ function st() {
1695
1694
  }
1696
1695
  return t;
1697
1696
  }
1698
- function Mi(t, e) {
1697
+ function Ki(t, e) {
1699
1698
  var n, r, i, o = null, a = 0, s = function() {
1700
1699
  a = /* @__PURE__ */ new Date(), o = null, i = t.apply(n, r);
1701
1700
  };
@@ -1706,7 +1705,7 @@ function Mi(t, e) {
1706
1705
  return n = this, r = arguments, p <= 0 ? (clearTimeout(o), o = null, a = f, i = t.apply(n, r)) : o || (o = setTimeout(s, p)), i;
1707
1706
  };
1708
1707
  }
1709
- var De = "global", je = ve + "global" + ve, Ce = typeof self === sn && self.self === self && self || typeof global === sn && global.global === global && global || void 0;
1708
+ var Le = "global", je = ve + "global" + ve, Ce = typeof self === ln && self.self === self && self || typeof global === ln && global.global === global && global || void 0;
1710
1709
  function we(t) {
1711
1710
  return Ce[je][t];
1712
1711
  }
@@ -1719,7 +1718,7 @@ function Ae(t) {
1719
1718
  function $e(t, e, n) {
1720
1719
  var r;
1721
1720
  try {
1722
- if (Dt(t)) {
1721
+ if (Zt(t)) {
1723
1722
  var i = window[t];
1724
1723
  r = i[e].bind(i);
1725
1724
  }
@@ -1729,7 +1728,7 @@ function $e(t, e, n) {
1729
1728
  }
1730
1729
  Ce[je] || (Ce[je] = {});
1731
1730
  var Xe = {};
1732
- function Dt(t) {
1731
+ function Zt(t) {
1733
1732
  if (typeof Xe[t] !== Je)
1734
1733
  return Xe[t];
1735
1734
  try {
@@ -1750,15 +1749,15 @@ function A() {
1750
1749
  return t;
1751
1750
  }, A.apply(this, arguments);
1752
1751
  }
1753
- var ae = "function", ie = "undefined", Zi = "@@redux/" + Math.random().toString(36), un = /* @__PURE__ */ function() {
1752
+ var ae = "function", ie = "undefined", Wi = "@@redux/" + Math.random().toString(36), hn = /* @__PURE__ */ function() {
1754
1753
  return typeof Symbol === ae && Symbol.observable || "@@observable";
1755
1754
  }(), Ve = " != " + ae;
1756
- function dr(t, e, n) {
1755
+ function fr(t, e, n) {
1757
1756
  var r;
1758
1757
  if (typeof e === ae && typeof n === ie && (n = e, e = void 0), typeof n !== ie) {
1759
1758
  if (typeof n !== ae)
1760
1759
  throw new Error("enhancer" + Ve);
1761
- return n(dr)(t, e);
1760
+ return n(fr)(t, e);
1762
1761
  }
1763
1762
  if (typeof t !== ae)
1764
1763
  throw new Error("reducer" + Ve);
@@ -1801,7 +1800,7 @@ function dr(t, e, n) {
1801
1800
  if (typeof d !== ae)
1802
1801
  throw new Error("next reducer" + Ve);
1803
1802
  i = d, m({ type: "@@redux/INIT" });
1804
- } })[un] = function() {
1803
+ } })[hn] = function() {
1805
1804
  var d, w = c;
1806
1805
  return (d = { subscribe: function(k) {
1807
1806
  if (typeof k != "object")
@@ -1810,12 +1809,12 @@ function dr(t, e, n) {
1810
1809
  k.next && k.next(u());
1811
1810
  }
1812
1811
  return v(), { unsubscribe: w(v) };
1813
- } })[un] = function() {
1812
+ } })[hn] = function() {
1814
1813
  return this;
1815
1814
  }, d;
1816
1815
  }, r;
1817
1816
  }
1818
- function Ki(t, e) {
1817
+ function Fi(t, e) {
1819
1818
  var n = e && e.type;
1820
1819
  return "action " + (n && n.toString() || "?") + "reducer " + t + " returns " + ie;
1821
1820
  }
@@ -1829,7 +1828,7 @@ function xe() {
1829
1828
  };
1830
1829
  });
1831
1830
  }
1832
- function Wi() {
1831
+ function Hi() {
1833
1832
  var t = arguments;
1834
1833
  return function(e) {
1835
1834
  return function(n, r, i) {
@@ -1842,14 +1841,14 @@ function Wi() {
1842
1841
  };
1843
1842
  };
1844
1843
  }
1845
- var ce = ve + "anon_id", ye = ve + "user_id", Ee = ve + "user_traits", oe = "userId", _e = "anonymousId", et = ["bootstrap", "params", "campaign", "initializeStart", "initialize", "initializeEnd", "ready", "resetStart", "reset", "resetEnd", "pageStart", "page", "pageEnd", "pageAborted", "trackStart", "track", "trackEnd", "trackAborted", "identifyStart", "identify", "identifyEnd", "identifyAborted", "userIdChanged", "registerPlugins", "enablePlugin", "disablePlugin", "online", "offline", "setItemStart", "setItem", "setItemEnd", "setItemAborted", "removeItemStart", "removeItem", "removeItemEnd", "removeItemAborted"], Ot = ["name", "EVENTS", "config", "loaded"], x = et.reduce(function(t, e) {
1844
+ var ce = ve + "anon_id", ye = ve + "user_id", Ee = ve + "user_traits", oe = "userId", _e = "anonymousId", et = ["bootstrap", "params", "campaign", "initializeStart", "initialize", "initializeEnd", "ready", "resetStart", "reset", "resetEnd", "pageStart", "page", "pageEnd", "pageAborted", "trackStart", "track", "trackEnd", "trackAborted", "identifyStart", "identify", "identifyEnd", "identifyAborted", "userIdChanged", "registerPlugins", "enablePlugin", "disablePlugin", "online", "offline", "setItemStart", "setItem", "setItemEnd", "setItemAborted", "removeItemStart", "removeItem", "removeItemEnd", "removeItemAborted"], jt = ["name", "EVENTS", "config", "loaded"], x = et.reduce(function(t, e) {
1846
1845
  return t[e] = e, t;
1847
1846
  }, { registerPluginType: function(t) {
1848
1847
  return "registerPlugin:" + t;
1849
1848
  }, pluginReadyType: function(t) {
1850
1849
  return "ready:" + t;
1851
- } }), ln = /^utm_/, dn = /^an_prop_/, hn = /^an_trait_/;
1852
- function Hi(t) {
1850
+ } }), fn = /^utm_/, pn = /^an_prop_/, mn = /^an_trait_/;
1851
+ function Ji(t) {
1853
1852
  var e = t.storage.setItem;
1854
1853
  return function(n) {
1855
1854
  return function(r) {
@@ -1860,11 +1859,11 @@ function Hi(t) {
1860
1859
  var u = Object.keys(i.params);
1861
1860
  if (u.length) {
1862
1861
  var c = o.an_uid, m = o.an_event, d = u.reduce(function(w, k) {
1863
- if (k.match(ln) || k.match(/^(d|g)clid/)) {
1864
- var v = k.replace(ln, "");
1862
+ if (k.match(fn) || k.match(/^(d|g)clid/)) {
1863
+ var v = k.replace(fn, "");
1865
1864
  w.campaign[v === "campaign" ? "name" : v] = o[k];
1866
1865
  }
1867
- return k.match(dn) && (w.props[k.replace(dn, "")] = o[k]), k.match(hn) && (w.traits[k.replace(hn, "")] = o[k]), w;
1866
+ return k.match(pn) && (w.props[k.replace(pn, "")] = o[k]), k.match(mn) && (w.traits[k.replace(mn, "")] = o[k]), w;
1868
1867
  }, { campaign: {}, props: {}, traits: {} });
1869
1868
  n.dispatch(A({ type: x.params, raw: o }, d, c ? { userId: c } : {})), c && setTimeout(function() {
1870
1869
  return t.identify(c, d.traits);
@@ -1878,7 +1877,7 @@ function Hi(t) {
1878
1877
  };
1879
1878
  };
1880
1879
  }
1881
- function Fi(t) {
1880
+ function Xi(t) {
1882
1881
  return function(e, n) {
1883
1882
  if (e === void 0 && (e = {}), n === void 0 && (n = {}), n.type === x.setItemEnd) {
1884
1883
  if (n.key === ce)
@@ -1898,13 +1897,13 @@ function Fi(t) {
1898
1897
  }
1899
1898
  };
1900
1899
  }
1901
- function fn(t) {
1900
+ function gn(t) {
1902
1901
  return { userId: t.getItem(ye), anonymousId: t.getItem(ce), traits: t.getItem(Ee) };
1903
1902
  }
1904
- var jt = function(t) {
1903
+ var Ct = function(t) {
1905
1904
  return ve + "TEMP" + ve + t;
1906
1905
  };
1907
- function Ji(t) {
1906
+ function Vi(t) {
1908
1907
  var e = t.storage, n = e.setItem, r = e.removeItem, i = e.getItem;
1909
1908
  return function(o) {
1910
1909
  return function(a) {
@@ -1913,7 +1912,7 @@ function Ji(t) {
1913
1912
  if (s.type === x.reset && ([ye, Ee, ce].forEach(function(d) {
1914
1913
  r(d);
1915
1914
  }), [oe, _e, "traits"].forEach(function(d) {
1916
- Ae(jt(d));
1915
+ Ae(Ct(d));
1917
1916
  })), s.type === x.identify) {
1918
1917
  i(ce) || n(ce, st());
1919
1918
  var c = i(ye), m = i(Ee) || {};
@@ -1925,22 +1924,22 @@ function Ji(t) {
1925
1924
  };
1926
1925
  }
1927
1926
  var Re = {};
1928
- function pn(t, e) {
1927
+ function yn(t, e) {
1929
1928
  Re[t] && Y(Re[t]) && (Re[t](e), delete Re[t]);
1930
1929
  }
1931
- function hr(t, e, n) {
1930
+ function pr(t, e, n) {
1932
1931
  return new Promise(function(r, i) {
1933
1932
  return e() ? r(t) : n < 1 ? i(A({}, t, { queue: !0 })) : new Promise(function(o) {
1934
1933
  return setTimeout(o, 10);
1935
1934
  }).then(function(o) {
1936
- return hr(t, e, n - 10).then(r, i);
1935
+ return pr(t, e, n - 10).then(r, i);
1937
1936
  });
1938
1937
  });
1939
1938
  }
1940
- function Xi(t) {
1939
+ function Yi(t) {
1941
1940
  return { abort: t };
1942
1941
  }
1943
- function fr(t, e, n) {
1942
+ function mr(t, e, n) {
1944
1943
  var r = {}, i = e(), o = t.getState(), a = o.plugins, s = o.queue, f = o.user;
1945
1944
  if (!o.context.offline && s && s.actions && s.actions.length) {
1946
1945
  var p = s.actions.reduce(function(c, m, d) {
@@ -1955,7 +1954,7 @@ function fr(t, e, n) {
1955
1954
  return l.hasOwnProperty(O) && b[O] && b[O] !== l[O] && (T[O] = b[O]), T;
1956
1955
  }, l);
1957
1956
  }(m.payload, f), S = r[_.meta.rid];
1958
- if (!S && (v = k({ payload: _, config: a[d].config, instance: n, abort: Xi })) && V(v) && v.abort)
1957
+ if (!S && (v = k({ payload: _, config: a[d].config, instance: n, abort: Yi })) && V(v) && v.abort)
1959
1958
  return void (r[_.meta.rid] = !0);
1960
1959
  if (!S) {
1961
1960
  var y = w + ":" + d;
@@ -1983,19 +1982,19 @@ var mt = function(t) {
1983
1982
  return function(S, y, l) {
1984
1983
  var b = y.config, T = y.name, O = T + "." + S.type;
1985
1984
  l && (O = l.event);
1986
- var C = S.type.match(Pe) ? /* @__PURE__ */ function(D, z, F, $, R) {
1985
+ var C = S.type.match(Pe) ? /* @__PURE__ */ function(L, z, H, $, R) {
1987
1986
  return function(K, j) {
1988
- var I = $ ? $.name : D, E = j && Ke(j) ? j : F;
1989
- if ($ && (!(E = j && Ke(j) ? j : [D]).includes(D) || E.length !== 1))
1990
- throw new Error("Method " + z + " can only abort " + D + " plugin. " + JSON.stringify(E) + " input valid");
1987
+ var I = $ ? $.name : L, E = j && Ke(j) ? j : H;
1988
+ if ($ && (!(E = j && Ke(j) ? j : [L]).includes(L) || E.length !== 1))
1989
+ throw new Error("Method " + z + " can only abort " + L + " plugin. " + JSON.stringify(E) + " input valid");
1991
1990
  return A({}, R, { abort: { reason: K, plugins: E, caller: z, _: I } });
1992
1991
  };
1993
- }(T, O, _, l, S) : /* @__PURE__ */ function(D, z) {
1992
+ }(T, O, _, l, S) : /* @__PURE__ */ function(L, z) {
1994
1993
  return function() {
1995
- throw new Error(D.type + " action not cancellable. Remove abort in " + z);
1994
+ throw new Error(L.type + " action not cancellable. Remove abort in " + z);
1996
1995
  };
1997
1996
  }(S, O);
1998
- return { payload: Vi(S), instance: v, config: b || {}, abort: C };
1997
+ return { payload: Gi(S), instance: v, config: b || {}, abort: C };
1999
1998
  };
2000
1999
  }(r, d), k = e.exact.reduce(function(v, _) {
2001
2000
  var S = _.pluginName, y = _.methodName, l = !1;
@@ -2010,23 +2009,23 @@ var mt = function(t) {
2010
2009
  }
2011
2010
  var T = function() {
2012
2011
  if (e.namespaced && e.namespaced[y])
2013
- return Promise.resolve(e.namespaced[y].reduce(function(O, C, D) {
2012
+ return Promise.resolve(e.namespaced[y].reduce(function(O, C, L) {
2014
2013
  try {
2015
2014
  return Promise.resolve(O).then(function(z) {
2016
2015
  return C.method && Y(C.method) ? (function(K, j) {
2017
- var I = kn(K);
2016
+ var I = _n(K);
2018
2017
  if (I && I.name === j) {
2019
- var E = kn(I.method);
2018
+ var E = _n(I.method);
2020
2019
  throw new Error([j + " plugin is calling method " + K, "Plugins cant call self", "Use " + I.method + " " + (E ? "or " + E.method : "") + " in " + j + " plugin insteadof " + K].join(`
2021
2020
  `));
2022
2021
  }
2023
- }(C.methodName, C.pluginName), Promise.resolve(C.method({ payload: z, instance: r, abort: (F = z, $ = y, R = C.pluginName, function(K, j) {
2024
- return A({}, F, { abort: { reason: K, plugins: j || [$], caller: c, from: R || $ } });
2025
- }), config: yn(C.pluginName, p, o), plugins: p })).then(function(K) {
2022
+ }(C.methodName, C.pluginName), Promise.resolve(C.method({ payload: z, instance: r, abort: (H = z, $ = y, R = C.pluginName, function(K, j) {
2023
+ return A({}, H, { abort: { reason: K, plugins: j || [$], caller: c, from: R || $ } });
2024
+ }), config: bn(C.pluginName, p, o), plugins: p })).then(function(K) {
2026
2025
  var j = V(K) ? K : {};
2027
2026
  return Promise.resolve(A({}, z, j));
2028
2027
  })) : z;
2029
- var F, $, R;
2028
+ var H, $, R;
2030
2029
  });
2031
2030
  } catch (z) {
2032
2031
  return Promise.reject(z);
@@ -2053,14 +2052,14 @@ var mt = function(t) {
2053
2052
  return l && gt({ data: O, method: c, instance: r, store: s }), Promise.resolve(O);
2054
2053
  if (k.hasOwnProperty(b) && k[b] === !0)
2055
2054
  return s.dispatch({ type: "queue", plugin: b, payload: C, _: { called: "queue", from: "queueMechanism" } }), Promise.resolve(O);
2056
- var D = w(v[b], o[b]);
2057
- return Promise.resolve(T[c]({ abort: D.abort, payload: C, instance: r, config: yn(b, p, o), plugins: p })).then(function(z) {
2058
- var F = V(z) ? z : {}, $ = A({}, O, F), R = v[b];
2055
+ var L = w(v[b], o[b]);
2056
+ return Promise.resolve(T[c]({ abort: L.abort, payload: C, instance: r, config: bn(b, p, o), plugins: p })).then(function(z) {
2057
+ var H = V(z) ? z : {}, $ = A({}, O, H), R = v[b];
2059
2058
  if (yt(R, b))
2060
2059
  gt({ data: R, method: c, instance: r, pluginName: b, store: s });
2061
2060
  else {
2062
2061
  var K = c + ":" + b;
2063
- (K.match(/:/g) || []).length < 2 && !c.match(mn) && !c.match(gn) && r.dispatch(A({}, m ? $ : C, { type: K, _: { called: K, from: "submethod" } }));
2062
+ (K.match(/:/g) || []).length < 2 && !c.match(vn) && !c.match(wn) && r.dispatch(A({}, m ? $ : C, { type: K, _: { called: K, from: "submethod" } }));
2064
2063
  }
2065
2064
  return Promise.resolve($);
2066
2065
  });
@@ -2069,11 +2068,11 @@ var mt = function(t) {
2069
2068
  return Promise.reject(O);
2070
2069
  }
2071
2070
  }, Promise.resolve(n))).then(function(_) {
2072
- if (!(c.match(Pe) || c.match(/^registerPlugin/) || c.match(gn) || c.match(mn) || c.match(/^params/) || c.match(/^userIdChanged/))) {
2071
+ if (!(c.match(Pe) || c.match(/^registerPlugin/) || c.match(wn) || c.match(vn) || c.match(/^params/) || c.match(/^userIdChanged/))) {
2073
2072
  if (f.plugins.includes(c), _._ && _._.originalAction === c)
2074
2073
  return _;
2075
2074
  var S = A({}, _, { _: { originalAction: _.type, called: _.type, from: "engineEnd" } });
2076
- pr(_, e.exact.length) && !c.match(/End$/) && (S = A({}, S, { type: _.type + "Aborted" })), s.dispatch(S);
2075
+ gr(_, e.exact.length) && !c.match(/End$/) && (S = A({}, S, { type: _.type + "Aborted" })), s.dispatch(S);
2077
2076
  }
2078
2077
  return _;
2079
2078
  });
@@ -2081,29 +2080,29 @@ var mt = function(t) {
2081
2080
  } catch (v) {
2082
2081
  return Promise.reject(v);
2083
2082
  }
2084
- }, Pe = /Start$/, mn = /^bootstrap/, gn = /^ready/;
2083
+ }, Pe = /Start$/, vn = /^bootstrap/, wn = /^ready/;
2085
2084
  function gt(t) {
2086
2085
  var e = t.pluginName, n = t.method + "Aborted" + (e ? ":" + e : "");
2087
2086
  t.store.dispatch(A({}, t.data, { type: n, _: { called: n, from: "abort" } }));
2088
2087
  }
2089
- function yn(t, e, n) {
2088
+ function bn(t, e, n) {
2090
2089
  var r = e[t] || n[t];
2091
2090
  return r && r.config ? r.config : {};
2092
2091
  }
2093
- function vn(t, e) {
2092
+ function kn(t, e) {
2094
2093
  return e.reduce(function(n, r) {
2095
2094
  return r[t] ? n.concat({ methodName: t, pluginName: r.name, method: r[t] }) : n;
2096
2095
  }, []);
2097
2096
  }
2098
- function wn(t, e) {
2097
+ function In(t, e) {
2099
2098
  var n = t.replace(Pe, ""), r = e ? ":" + e : "";
2100
2099
  return ["" + t + r, "" + n + r, n + "End" + r];
2101
2100
  }
2102
2101
  function yt(t, e) {
2103
2102
  var n = t.abort;
2104
- return !!n && (n === !0 || bn(n, e) || n && bn(n.plugins, e));
2103
+ return !!n && (n === !0 || Sn(n, e) || n && Sn(n.plugins, e));
2105
2104
  }
2106
- function pr(t, e) {
2105
+ function gr(t, e) {
2107
2106
  var n = t.abort;
2108
2107
  if (!n)
2109
2108
  return !1;
@@ -2115,19 +2114,19 @@ function pr(t, e) {
2115
2114
  function Ke(t) {
2116
2115
  return Array.isArray(t);
2117
2116
  }
2118
- function bn(t, e) {
2117
+ function Sn(t, e) {
2119
2118
  return !(!t || !Ke(t)) && t.includes(e);
2120
2119
  }
2121
- function kn(t) {
2120
+ function _n(t) {
2122
2121
  var e = t.match(/(.*):(.*)/);
2123
2122
  return !!e && { method: e[1], name: e[2] };
2124
2123
  }
2125
- function Vi(t) {
2124
+ function Gi(t) {
2126
2125
  return Object.keys(t).reduce(function(e, n) {
2127
2126
  return n === "type" || (e[n] = V(t[n]) ? Object.assign({}, t[n]) : t[n]), e;
2128
2127
  }, {});
2129
2128
  }
2130
- function Yi(t, e, n) {
2129
+ function Bi(t, e, n) {
2131
2130
  var r = {};
2132
2131
  return function(i) {
2133
2132
  return function(o) {
@@ -2139,7 +2138,7 @@ function Yi(t, e, n) {
2139
2138
  if (a.abort)
2140
2139
  return Promise.resolve(o(a));
2141
2140
  if (p === x.enablePlugin && i.dispatch({ type: x.initializeStart, plugins: u, disabled: [], fromEnable: !0, meta: a.meta }), p === x.disablePlugin && setTimeout(function() {
2142
- return pn(a.meta.rid, { payload: a });
2141
+ return yn(a.meta.rid, { payload: a });
2143
2142
  }, 0), p === x.initializeEnd) {
2144
2143
  var m = e(), d = Object.keys(m), w = d.filter(function(l) {
2145
2144
  return u.includes(l);
@@ -2147,11 +2146,11 @@ function Yi(t, e, n) {
2147
2146
  return m[l];
2148
2147
  }), k = [], v = [], _ = a.disabled, S = w.map(function(l) {
2149
2148
  var b = l.loaded, T = l.name, O = l.config;
2150
- return hr(l, function() {
2149
+ return pr(l, function() {
2151
2150
  return b({ config: O });
2152
2151
  }, 1e4).then(function(C) {
2153
- return r[T] || (i.dispatch({ type: x.pluginReadyType(T), name: T, events: Object.keys(l).filter(function(D) {
2154
- return !Ot.includes(D);
2152
+ return r[T] || (i.dispatch({ type: x.pluginReadyType(T), name: T, events: Object.keys(l).filter(function(L) {
2153
+ return !jt.includes(L);
2155
2154
  }) }), r[T] = !0), k = k.concat(T), l;
2156
2155
  }).catch(function(C) {
2157
2156
  if (C instanceof Error)
@@ -2169,15 +2168,15 @@ function Yi(t, e, n) {
2169
2168
  var y = function() {
2170
2169
  if (p !== x.bootstrap)
2171
2170
  return /^ready:([^:]*)$/.test(p) && setTimeout(function() {
2172
- return fr(i, e, t);
2171
+ return mr(i, e, t);
2173
2172
  }, 0), Promise.resolve(function(l, b, T, O, C) {
2174
2173
  try {
2175
- var D = Y(b) ? b() : b, z = l.type, F = z.replace(Pe, "");
2174
+ var L = Y(b) ? b() : b, z = l.type, H = z.replace(Pe, "");
2176
2175
  if (l._ && l._.called)
2177
2176
  return Promise.resolve(l);
2178
- var $ = T.getState(), R = (I = D, (E = $.plugins) === void 0 && (E = {}), (W = l.options) === void 0 && (W = {}), Object.keys(I).filter(function(h) {
2177
+ var $ = T.getState(), R = (I = L, (E = $.plugins) === void 0 && (E = {}), (W = l.options) === void 0 && (W = {}), Object.keys(I).filter(function(h) {
2179
2178
  var g = W.plugins || {};
2180
- return ji(g[h]) ? g[h] : g.all !== !1 && (!E[h] || E[h].enabled !== !1);
2179
+ return xi(g[h]) ? g[h] : g.all !== !1 && (!E[h] || E[h].enabled !== !1);
2181
2180
  }).map(function(h) {
2182
2181
  return I[h];
2183
2182
  }));
@@ -2185,38 +2184,38 @@ function Yi(t, e, n) {
2185
2184
  var g = $.plugins[h];
2186
2185
  return l.plugins.includes(h) && !g.initialized;
2187
2186
  }).map(function(h) {
2188
- return D[h];
2187
+ return L[h];
2189
2188
  }));
2190
2189
  var K = R.map(function(h) {
2191
2190
  return h.name;
2192
2191
  }), j = function(h, g, P) {
2193
- var N = wn(h).map(function(U) {
2194
- return vn(U, g);
2192
+ var N = In(h).map(function(U) {
2193
+ return kn(U, g);
2195
2194
  });
2196
- return g.reduce(function(U, L) {
2197
- var J = L.name, Z = wn(h, J).map(function(Ne) {
2198
- return vn(Ne, g);
2199
- }), H = Z[0], M = Z[1], ee = Z[2];
2200
- return H.length && (U.beforeNS[J] = H), M.length && (U.duringNS[J] = M), ee.length && (U.afterNS[J] = ee), U;
2195
+ return g.reduce(function(U, D) {
2196
+ var J = D.name, Z = In(h, J).map(function(Ne) {
2197
+ return kn(Ne, g);
2198
+ }), F = Z[0], M = Z[1], ee = Z[2];
2199
+ return F.length && (U.beforeNS[J] = F), M.length && (U.duringNS[J] = M), ee.length && (U.afterNS[J] = ee), U;
2201
2200
  }, { before: N[0], beforeNS: {}, during: N[1], duringNS: {}, after: N[2], afterNS: {} });
2202
2201
  }(z, R);
2203
- return Promise.resolve(mt({ action: l, data: { exact: j.before, namespaced: j.beforeNS }, state: $, allPlugins: D, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(h) {
2202
+ return Promise.resolve(mt({ action: l, data: { exact: j.before, namespaced: j.beforeNS }, state: $, allPlugins: L, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(h) {
2204
2203
  function g() {
2205
2204
  var U = function() {
2206
2205
  if (z.match(Pe))
2207
- return Promise.resolve(mt({ action: A({}, P, { type: F + "End" }), data: { exact: j.after, namespaced: j.afterNS }, state: $, allPlugins: D, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(L) {
2208
- L.meta && L.meta.hasCallback && pn(L.meta.rid, { payload: L });
2206
+ return Promise.resolve(mt({ action: A({}, P, { type: H + "End" }), data: { exact: j.after, namespaced: j.afterNS }, state: $, allPlugins: L, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(D) {
2207
+ D.meta && D.meta.hasCallback && yn(D.meta.rid, { payload: D });
2209
2208
  });
2210
2209
  }();
2211
2210
  return U && U.then ? U.then(function() {
2212
2211
  return h;
2213
2212
  }) : h;
2214
2213
  }
2215
- if (pr(h, K.length))
2214
+ if (gr(h, K.length))
2216
2215
  return h;
2217
2216
  var P, N = function() {
2218
- if (z !== F)
2219
- return Promise.resolve(mt({ action: A({}, h, { type: F }), data: { exact: j.during, namespaced: j.duringNS }, state: $, allPlugins: D, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(U) {
2217
+ if (z !== H)
2218
+ return Promise.resolve(mt({ action: A({}, h, { type: H }), data: { exact: j.during, namespaced: j.duringNS }, state: $, allPlugins: L, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(U) {
2220
2219
  P = U;
2221
2220
  });
2222
2221
  P = h;
@@ -2239,7 +2238,7 @@ function Yi(t, e, n) {
2239
2238
  };
2240
2239
  };
2241
2240
  }
2242
- function Gi(t) {
2241
+ function qi(t) {
2243
2242
  return function(e) {
2244
2243
  return function(n) {
2245
2244
  return function(r) {
@@ -2254,7 +2253,7 @@ function Gi(t) {
2254
2253
  };
2255
2254
  };
2256
2255
  }
2257
- var Bi = function() {
2256
+ var Qi = function() {
2258
2257
  var t = this;
2259
2258
  this.before = [], this.after = [], this.addMiddleware = function(e, n) {
2260
2259
  t[n] = t[n].concat(e);
@@ -2278,63 +2277,63 @@ var Bi = function() {
2278
2277
  };
2279
2278
  };
2280
2279
  };
2281
- function qi(t) {
2280
+ function eo(t) {
2282
2281
  return function(e, n) {
2283
2282
  e === void 0 && (e = {});
2284
2283
  var r = {};
2285
2284
  if (n.type === "initialize:aborted")
2286
2285
  return e;
2287
2286
  if (/^registerPlugin:([^:]*)$/.test(n.type)) {
2288
- var i = In(n.type, "registerPlugin"), o = t()[i];
2287
+ var i = En(n.type, "registerPlugin"), o = t()[i];
2289
2288
  if (!o || !i)
2290
2289
  return e;
2291
2290
  var a = n.enabled, s = o.config;
2292
2291
  return r[i] = { enabled: a, initialized: !!a && !o.initialize, loaded: !!a && !!o.loaded({ config: s }), config: s }, A({}, e, r);
2293
2292
  }
2294
2293
  if (/^initialize:([^:]*)$/.test(n.type)) {
2295
- var f = In(n.type, x.initialize), p = t()[f];
2294
+ var f = En(n.type, x.initialize), p = t()[f];
2296
2295
  return p && f ? (r[f] = A({}, e[f], { initialized: !0, loaded: !!p.loaded({ config: p.config }) }), A({}, e, r)) : e;
2297
2296
  }
2298
2297
  if (/^ready:([^:]*)$/.test(n.type))
2299
2298
  return r[n.name] = A({}, e[n.name], { loaded: !0 }), A({}, e, r);
2300
2299
  switch (n.type) {
2301
2300
  case x.disablePlugin:
2302
- return A({}, e, Sn(n.plugins, !1, e));
2301
+ return A({}, e, Pn(n.plugins, !1, e));
2303
2302
  case x.enablePlugin:
2304
- return A({}, e, Sn(n.plugins, !0, e));
2303
+ return A({}, e, Pn(n.plugins, !0, e));
2305
2304
  default:
2306
2305
  return e;
2307
2306
  }
2308
2307
  };
2309
2308
  }
2310
- function In(t, e) {
2309
+ function En(t, e) {
2311
2310
  return t.substring(e.length + 1, t.length);
2312
2311
  }
2313
- function Sn(t, e, n) {
2312
+ function Pn(t, e, n) {
2314
2313
  return t.reduce(function(r, i) {
2315
2314
  return r[i] = A({}, n[i], { enabled: e }), r;
2316
2315
  }, n);
2317
2316
  }
2318
- function mr(t) {
2317
+ function yr(t) {
2319
2318
  try {
2320
2319
  return JSON.parse(JSON.stringify(t));
2321
2320
  } catch {
2322
2321
  }
2323
2322
  return t;
2324
2323
  }
2325
- var Qi = { last: {}, history: [] };
2326
- function eo(t, e) {
2327
- t === void 0 && (t = Qi);
2324
+ var to = { last: {}, history: [] };
2325
+ function no(t, e) {
2326
+ t === void 0 && (t = to);
2328
2327
  var n = e.options, r = e.meta;
2329
2328
  if (e.type === x.track) {
2330
- var i = mr(A({ event: e.event, properties: e.properties }, Object.keys(n).length && { options: n }, { meta: r }));
2329
+ var i = yr(A({ event: e.event, properties: e.properties }, Object.keys(n).length && { options: n }, { meta: r }));
2331
2330
  return A({}, t, { last: i, history: t.history.concat(i) });
2332
2331
  }
2333
2332
  return t;
2334
2333
  }
2335
- var to = { actions: [] };
2336
- function no(t, e) {
2337
- t === void 0 && (t = to);
2334
+ var ro = { actions: [] };
2335
+ function io(t, e) {
2336
+ t === void 0 && (t = ro);
2338
2337
  var n = e.payload;
2339
2338
  switch (e.type) {
2340
2339
  case "queue":
@@ -2346,12 +2345,12 @@ function no(t, e) {
2346
2345
  return t;
2347
2346
  }
2348
2347
  }
2349
- var gr = /#.*$/;
2350
- function ro(t) {
2348
+ var vr = /#.*$/;
2349
+ function oo(t) {
2351
2350
  var e = /(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(t);
2352
- return "/" + (e && e[3] ? e[3].split("?")[0].replace(gr, "") : "");
2351
+ return "/" + (e && e[3] ? e[3].split("?")[0].replace(vr, "") : "");
2353
2352
  }
2354
- var yr, vr, wr, br, io = function(t) {
2353
+ var wr, br, kr, Ir, ao = function(t) {
2355
2354
  if (t === void 0 && (t = {}), !X)
2356
2355
  return t;
2357
2356
  var e = document, n = e.title, r = e.referrer, i = window, o = i.location, a = i.innerWidth, s = i.innerHeight, f = o.hash, p = o.search, u = function(m) {
@@ -2362,28 +2361,28 @@ var yr, vr, wr, br, io = function(t) {
2362
2361
  return w.getAttribute("href");
2363
2362
  }
2364
2363
  }();
2365
- return d ? d.match(/\?/) ? d : d + m : window.location.href.replace(gr, "");
2366
- }(p), c = { title: n, url: u, path: ro(u), hash: f, search: p, width: a, height: s };
2364
+ return d ? d.match(/\?/) ? d : d + m : window.location.href.replace(vr, "");
2365
+ }(p), c = { title: n, url: u, path: oo(u), hash: f, search: p, width: a, height: s };
2367
2366
  return r && r !== "" && (c.referrer = r), A({}, c, t);
2368
- }, oo = { last: {}, history: [] };
2369
- function ao(t, e) {
2370
- t === void 0 && (t = oo);
2367
+ }, so = { last: {}, history: [] };
2368
+ function co(t, e) {
2369
+ t === void 0 && (t = so);
2371
2370
  var n = e.options;
2372
2371
  if (e.type === x.page) {
2373
- var r = mr(A({ properties: e.properties, meta: e.meta }, Object.keys(n).length && { options: n }));
2372
+ var r = yr(A({ properties: e.properties, meta: e.meta }, Object.keys(n).length && { options: n }));
2374
2373
  return A({}, t, { last: r, history: t.history.concat(r) });
2375
2374
  }
2376
2375
  return t;
2377
2376
  }
2378
- yr = function() {
2377
+ wr = function() {
2379
2378
  if (!X)
2380
2379
  return !1;
2381
2380
  var t = navigator.appVersion;
2382
2381
  return ~t.indexOf("Win") ? "Windows" : ~t.indexOf("Mac") ? "MacOS" : ~t.indexOf("X11") ? "UNIX" : ~t.indexOf("Linux") ? "Linux" : "Unknown OS";
2383
- }(), vr = X ? document.referrer : null, wr = zi(), br = Ri();
2384
- var _n = { initialized: !1, sessionId: st(), app: null, version: null, debug: !1, offline: !!X && !navigator.onLine, os: { name: yr }, userAgent: X ? navigator.userAgent : "node", library: { name: "analytics", version: "0.12.7" }, timezone: br, locale: wr, campaign: {}, referrer: vr };
2385
- function so(t, e) {
2386
- t === void 0 && (t = _n);
2382
+ }(), br = X ? document.referrer : null, kr = Li(), Ir = Di();
2383
+ var Tn = { initialized: !1, sessionId: st(), app: null, version: null, debug: !1, offline: !!X && !navigator.onLine, os: { name: wr }, userAgent: X ? navigator.userAgent : "node", library: { name: "analytics", version: "0.12.7" }, timezone: Ir, locale: kr, campaign: {}, referrer: br };
2384
+ function uo(t, e) {
2385
+ t === void 0 && (t = Tn);
2387
2386
  var n = t.initialized, r = e.campaign;
2388
2387
  switch (e.type) {
2389
2388
  case x.campaign:
@@ -2393,11 +2392,11 @@ function so(t, e) {
2393
2392
  case x.online:
2394
2393
  return A({}, t, { offline: !1 });
2395
2394
  default:
2396
- return n ? t : A({}, _n, t, { initialized: !0 });
2395
+ return n ? t : A({}, Tn, t, { initialized: !0 });
2397
2396
  }
2398
2397
  }
2399
- var co = ["plugins", "reducers", "storage"];
2400
- function uo(t, e, n) {
2398
+ var lo = ["plugins", "reducers", "storage"];
2399
+ function ho(t, e, n) {
2401
2400
  if (X) {
2402
2401
  var r = window[(n ? "add" : "remove") + "EventListener"];
2403
2402
  t.split(" ").forEach(function(i) {
@@ -2405,15 +2404,15 @@ function uo(t, e, n) {
2405
2404
  });
2406
2405
  }
2407
2406
  }
2408
- function lo(t) {
2409
- var e = uo.bind(null, "online offline", function(n) {
2407
+ function fo(t) {
2408
+ var e = ho.bind(null, "online offline", function(n) {
2410
2409
  return Promise.resolve(!navigator.onLine).then(t);
2411
2410
  });
2412
2411
  return e(!0), function(n) {
2413
2412
  return e(!1);
2414
2413
  };
2415
2414
  }
2416
- function kr() {
2415
+ function Sr() {
2417
2416
  return be("analytics", []), function(t) {
2418
2417
  return function(e, n, r) {
2419
2418
  var i = t(e, n, r), o = i.dispatch;
@@ -2423,15 +2422,15 @@ function kr() {
2423
2422
  };
2424
2423
  };
2425
2424
  }
2426
- function En(t) {
2425
+ function On(t) {
2427
2426
  return function() {
2428
- return xe(xe.apply(null, arguments), kr());
2427
+ return xe(xe.apply(null, arguments), Sr());
2429
2428
  };
2430
2429
  }
2431
2430
  function vt(t) {
2432
- return t ? ur(t) ? t : [t] : [];
2431
+ return t ? dr(t) ? t : [t] : [];
2433
2432
  }
2434
- function Pn(t, e, n) {
2433
+ function jn(t, e, n) {
2435
2434
  t === void 0 && (t = {});
2436
2435
  var r, i, o = st();
2437
2436
  return e && (Re[o] = (r = e, i = function(a) {
@@ -2445,7 +2444,7 @@ function Pn(t, e, n) {
2445
2444
  i && i(a), r(a);
2446
2445
  })), A({}, t, { rid: o, ts: (/* @__PURE__ */ new Date()).getTime() }, e ? { hasCallback: !0 } : {});
2447
2446
  }
2448
- function ho(t) {
2447
+ function po(t) {
2449
2448
  t === void 0 && (t = {});
2450
2449
  var e = t.reducers || {}, n = t.initialUser || {}, r = (t.plugins || []).reduce(function(h, g) {
2451
2450
  if (Y(g))
@@ -2453,16 +2452,16 @@ function ho(t) {
2453
2452
  if (g.NAMESPACE && (g.name = g.NAMESPACE), !g.name)
2454
2453
  throw new Error("https://lytics.dev/errors/1");
2455
2454
  g.config || (g.config = {});
2456
- var P = g.EVENTS ? Object.keys(g.EVENTS).map(function(L) {
2457
- return g.EVENTS[L];
2455
+ var P = g.EVENTS ? Object.keys(g.EVENTS).map(function(D) {
2456
+ return g.EVENTS[D];
2458
2457
  }) : [];
2459
- h.pluginEnabled[g.name] = !(g.enabled === !1 || g.config.enabled === !1), delete g.enabled, g.methods && (h.methods[g.name] = Object.keys(g.methods).reduce(function(L, J) {
2458
+ h.pluginEnabled[g.name] = !(g.enabled === !1 || g.config.enabled === !1), delete g.enabled, g.methods && (h.methods[g.name] = Object.keys(g.methods).reduce(function(D, J) {
2460
2459
  var Z;
2461
- return L[J] = (Z = g.methods[J], function() {
2462
- for (var H = Array.prototype.slice.call(arguments), M = new Array(Z.length), ee = 0; ee < H.length; ee++)
2463
- M[ee] = H[ee];
2460
+ return D[J] = (Z = g.methods[J], function() {
2461
+ for (var F = Array.prototype.slice.call(arguments), M = new Array(Z.length), ee = 0; ee < F.length; ee++)
2462
+ M[ee] = F[ee];
2464
2463
  return M[M.length] = b, Z.apply({ instance: b }, M);
2465
- }), L;
2464
+ }), D;
2466
2465
  }, {}), delete g.methods);
2467
2466
  var N = Object.keys(g).concat(P), U = new Set(h.events.concat(N));
2468
2467
  if (h.events = Array.from(U), h.pluginsArray = h.pluginsArray.concat(g), h.plugins[g.name])
@@ -2472,17 +2471,17 @@ function ho(t) {
2472
2471
  }), h;
2473
2472
  }, { plugins: {}, pluginEnabled: {}, methods: {}, pluginsArray: [], middlewares: [], events: [] }), i = t.storage ? t.storage : { getItem: we, setItem: be, removeItem: Ae }, o = /* @__PURE__ */ function(h) {
2474
2473
  return function(g, P, N) {
2475
- return P.getState("user")[g] || (N && V(N) && N[g] ? N[g] : fn(h)[g] || we(jt(g)) || null);
2474
+ return P.getState("user")[g] || (N && V(N) && N[g] ? N[g] : gn(h)[g] || we(Ct(g)) || null);
2476
2475
  };
2477
2476
  }(i), a = r.plugins, s = r.events.filter(function(h) {
2478
- return !Ot.includes(h);
2477
+ return !jt.includes(h);
2479
2478
  }).sort(), f = new Set(s.concat(et).filter(function(h) {
2480
- return !Ot.includes(h);
2479
+ return !jt.includes(h);
2481
2480
  })), p = Array.from(f).sort(), u = function() {
2482
2481
  return a;
2483
- }, c = new Bi(), m = c.addMiddleware, d = c.removeMiddleware, w = c.dynamicMiddlewares, k = function() {
2482
+ }, c = new Qi(), m = c.addMiddleware, d = c.removeMiddleware, w = c.dynamicMiddlewares, k = function() {
2484
2483
  throw new Error("Abort disabled inListener");
2485
- }, v = Di(), _ = fn(i), S = A({}, _, n, v.an_uid ? { userId: v.an_uid } : {}, v.an_aid ? { anonymousId: v.an_aid } : {});
2484
+ }, v = Mi(), _ = gn(i), S = A({}, _, n, v.an_uid ? { userId: v.an_uid } : {}, v.an_aid ? { anonymousId: v.an_aid } : {});
2486
2485
  S.anonymousId || (S.anonymousId = st());
2487
2486
  var y = A({ enable: function(h, g) {
2488
2487
  return new Promise(function(P) {
@@ -2494,11 +2493,11 @@ function ho(t) {
2494
2493
  });
2495
2494
  } }, r.methods), l = !1, b = { identify: function(h, g, P, N) {
2496
2495
  try {
2497
- var U = se(h) ? h : null, L = V(h) ? h : g, J = P || {}, Z = b.user();
2498
- be(jt(oe), U);
2499
- var H = U || L.userId || o(oe, b, L);
2496
+ var U = se(h) ? h : null, D = V(h) ? h : g, J = P || {}, Z = b.user();
2497
+ be(Ct(oe), U);
2498
+ var F = U || D.userId || o(oe, b, D);
2500
2499
  return Promise.resolve(new Promise(function(M) {
2501
- j.dispatch(A({ type: x.identifyStart, userId: H, traits: L || {}, options: J, anonymousId: Z.anonymousId }, Z.id && Z.id !== U && { previousId: Z.id }), M, [g, P, N]);
2500
+ j.dispatch(A({ type: x.identifyStart, userId: F, traits: D || {}, options: J, anonymousId: Z.anonymousId }, Z.id && Z.id !== U && { previousId: Z.id }), M, [g, P, N]);
2502
2501
  }));
2503
2502
  } catch (M) {
2504
2503
  return Promise.reject(M);
@@ -2508,9 +2507,9 @@ function ho(t) {
2508
2507
  var U = V(h) ? h.event : h;
2509
2508
  if (!U || !se(U))
2510
2509
  throw new Error("EventMissing");
2511
- var L = V(h) ? h : g || {}, J = V(P) ? P : {};
2510
+ var D = V(h) ? h : g || {}, J = V(P) ? P : {};
2512
2511
  return Promise.resolve(new Promise(function(Z) {
2513
- j.dispatch({ type: x.trackStart, event: U, properties: L, options: J, userId: o(oe, b, g), anonymousId: o(_e, b, g) }, Z, [g, P, N]);
2512
+ j.dispatch({ type: x.trackStart, event: U, properties: D, options: J, userId: o(oe, b, g), anonymousId: o(_e, b, g) }, Z, [g, P, N]);
2514
2513
  }));
2515
2514
  } catch (Z) {
2516
2515
  return Promise.reject(Z);
@@ -2518,11 +2517,11 @@ function ho(t) {
2518
2517
  }, page: function(h, g, P) {
2519
2518
  try {
2520
2519
  var N = V(h) ? h : {}, U = V(g) ? g : {};
2521
- return Promise.resolve(new Promise(function(L) {
2522
- j.dispatch({ type: x.pageStart, properties: io(N), options: U, userId: o(oe, b, N), anonymousId: o(_e, b, N) }, L, [h, g, P]);
2520
+ return Promise.resolve(new Promise(function(D) {
2521
+ j.dispatch({ type: x.pageStart, properties: ao(N), options: U, userId: o(oe, b, N), anonymousId: o(_e, b, N) }, D, [h, g, P]);
2523
2522
  }));
2524
- } catch (L) {
2525
- return Promise.reject(L);
2523
+ } catch (D) {
2524
+ return Promise.reject(D);
2526
2525
  }
2527
2526
  }, user: function(h) {
2528
2527
  if (h === oe || h === "id")
@@ -2530,7 +2529,7 @@ function ho(t) {
2530
2529
  if (h === _e || h === "anonId")
2531
2530
  return o(_e, b);
2532
2531
  var g = b.getState("user");
2533
- return h ? an(g, h) : g;
2532
+ return h ? un(g, h) : g;
2534
2533
  }, reset: function(h) {
2535
2534
  return new Promise(function(g) {
2536
2535
  j.dispatch({ type: x.resetStart }, g, h);
@@ -2547,15 +2546,15 @@ function ho(t) {
2547
2546
  var P = /Start$|Start:/;
2548
2547
  if (h === "*") {
2549
2548
  var N = function(Z) {
2550
- return function(H) {
2549
+ return function(F) {
2551
2550
  return function(M) {
2552
- return M.type.match(P) && g({ payload: M, instance: b, plugins: a }), H(M);
2551
+ return M.type.match(P) && g({ payload: M, instance: b, plugins: a }), F(M);
2553
2552
  };
2554
2553
  };
2555
2554
  }, U = function(Z) {
2556
- return function(H) {
2555
+ return function(F) {
2557
2556
  return function(M) {
2558
- return M.type.match(P) || g({ payload: M, instance: b, plugins: a }), H(M);
2557
+ return M.type.match(P) || g({ payload: M, instance: b, plugins: a }), F(M);
2559
2558
  };
2560
2559
  };
2561
2560
  };
@@ -2563,15 +2562,15 @@ function ho(t) {
2563
2562
  d(N, Ye), d(U, Ge);
2564
2563
  };
2565
2564
  }
2566
- var L = h.match(P) ? Ye : Ge, J = function(Z) {
2567
- return function(H) {
2565
+ var D = h.match(P) ? Ye : Ge, J = function(Z) {
2566
+ return function(F) {
2568
2567
  return function(M) {
2569
- return M.type === h && g({ payload: M, instance: b, plugins: a, abort: k }), H(M);
2568
+ return M.type === h && g({ payload: M, instance: b, plugins: a, abort: k }), F(M);
2570
2569
  };
2571
2570
  };
2572
2571
  };
2573
- return m(J, L), function() {
2574
- return d(J, L);
2572
+ return m(J, D), function() {
2573
+ return d(J, D);
2575
2574
  };
2576
2575
  }, once: function(h, g) {
2577
2576
  if (!h || !Y(g))
@@ -2584,7 +2583,7 @@ function ho(t) {
2584
2583
  return P;
2585
2584
  }, getState: function(h) {
2586
2585
  var g = j.getState();
2587
- return h ? an(g, h) : Object.assign({}, g);
2586
+ return h ? un(g, h) : Object.assign({}, g);
2588
2587
  }, dispatch: function(h) {
2589
2588
  var g = se(h) ? { type: h } : h;
2590
2589
  if (et.includes(g.type))
@@ -2600,57 +2599,57 @@ function ho(t) {
2600
2599
  }, events: { core: et, plugins: s } }, T = r.middlewares.concat([function(h) {
2601
2600
  return function(g) {
2602
2601
  return function(P) {
2603
- return P.meta || (P.meta = Pn()), g(P);
2602
+ return P.meta || (P.meta = jn()), g(P);
2604
2603
  };
2605
2604
  };
2606
- }, w(Ye), Yi(b, u, { all: p, plugins: s }), Gi(i), Hi(b), Ji(b), w(Ge)]), O = { context: so, user: Fi(i), page: ao, track: eo, plugins: qi(u), queue: no }, C = xe, D = xe;
2605
+ }, w(Ye), Bi(b, u, { all: p, plugins: s }), qi(i), Ji(b), Vi(b), w(Ge)]), O = { context: uo, user: Xi(i), page: co, track: no, plugins: eo(u), queue: io }, C = xe, L = xe;
2607
2606
  if (X && t.debug) {
2608
2607
  var z = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
2609
- z && (C = z({ trace: !0, traceLimit: 25 })), D = function() {
2610
- return arguments.length === 0 ? kr() : V(typeof arguments[0]) ? En() : En().apply(null, arguments);
2608
+ z && (C = z({ trace: !0, traceLimit: 25 })), L = function() {
2609
+ return arguments.length === 0 ? Sr() : V(typeof arguments[0]) ? On() : On().apply(null, arguments);
2611
2610
  };
2612
2611
  }
2613
- var F, $ = function(h) {
2612
+ var H, $ = function(h) {
2614
2613
  return Object.keys(h).reduce(function(g, P) {
2615
- return co.includes(P) || (g[P] = h[P]), g;
2614
+ return lo.includes(P) || (g[P] = h[P]), g;
2616
2615
  }, {});
2617
2616
  }(t), R = r.pluginsArray.reduce(function(h, g) {
2618
- var P = g.name, N = g.config, U = g.loaded, L = r.pluginEnabled[P];
2619
- return h[P] = { enabled: L, initialized: !!L && !g.initialize, loaded: !!U({ config: N }), config: N }, h;
2620
- }, {}), K = { context: $, user: S, plugins: R }, j = dr(function(h) {
2617
+ var P = g.name, N = g.config, U = g.loaded, D = r.pluginEnabled[P];
2618
+ return h[P] = { enabled: D, initialized: !!D && !g.initialize, loaded: !!U({ config: N }), config: N }, h;
2619
+ }, {}), K = { context: $, user: S, plugins: R }, j = fr(function(h) {
2621
2620
  for (var g = Object.keys(h), P = {}, N = 0; N < g.length; N++) {
2622
2621
  var U = g[N];
2623
2622
  typeof h[U] === ae && (P[U] = h[U]);
2624
2623
  }
2625
- var L, J = Object.keys(P);
2624
+ var D, J = Object.keys(P);
2626
2625
  try {
2627
2626
  (function(Z) {
2628
- Object.keys(Z).forEach(function(H) {
2629
- var M = Z[H];
2630
- if (typeof M(void 0, { type: "@@redux/INIT" }) === ie || typeof M(void 0, { type: Zi }) === ie)
2631
- throw new Error("reducer " + H + " " + ie);
2627
+ Object.keys(Z).forEach(function(F) {
2628
+ var M = Z[F];
2629
+ if (typeof M(void 0, { type: "@@redux/INIT" }) === ie || typeof M(void 0, { type: Wi }) === ie)
2630
+ throw new Error("reducer " + F + " " + ie);
2632
2631
  });
2633
2632
  })(P);
2634
2633
  } catch (Z) {
2635
- L = Z;
2634
+ D = Z;
2636
2635
  }
2637
- return function(Z, H) {
2638
- if (Z === void 0 && (Z = {}), L)
2639
- throw L;
2636
+ return function(Z, F) {
2637
+ if (Z === void 0 && (Z = {}), D)
2638
+ throw D;
2640
2639
  for (var M = !1, ee = {}, Ne = 0; Ne < J.length; Ne++) {
2641
- var He = J[Ne], Ft = Z[He], lt = (0, P[He])(Ft, H);
2640
+ var Fe = J[Ne], Vt = Z[Fe], lt = (0, P[Fe])(Vt, F);
2642
2641
  if (typeof lt === ie) {
2643
- var Nr = Ki(He, H);
2644
- throw new Error(Nr);
2642
+ var zr = Fi(Fe, F);
2643
+ throw new Error(zr);
2645
2644
  }
2646
- ee[He] = lt, M = M || lt !== Ft;
2645
+ ee[Fe] = lt, M = M || lt !== Vt;
2647
2646
  }
2648
2647
  return M ? ee : Z;
2649
2648
  };
2650
- }(A({}, O, e)), K, D(C(Wi.apply(void 0, T))));
2651
- j.dispatch = (F = j.dispatch, function(h, g, P) {
2652
- var N = A({}, h, { meta: Pn(h.meta, g, vt(P)) });
2653
- return F.apply(null, [N]);
2649
+ }(A({}, O, e)), K, L(C(Hi.apply(void 0, T))));
2650
+ j.dispatch = (H = j.dispatch, function(h, g, P) {
2651
+ var N = A({}, h, { meta: jn(h.meta, g, vt(P)) });
2652
+ return H.apply(null, [N]);
2654
2653
  });
2655
2654
  var I = Object.keys(a);
2656
2655
  j.dispatch({ type: x.bootstrap, plugins: I, config: $, params: v, user: S, initialUser: n, persistedUser: _ });
@@ -2662,24 +2661,24 @@ function ho(t) {
2662
2661
  return j.dispatch({ type: x.registerPlugins, plugins: I, enabled: r.pluginEnabled }), r.pluginsArray.map(function(h, g) {
2663
2662
  var P = h.bootstrap, N = h.config, U = h.name;
2664
2663
  P && Y(P) && P({ instance: b, config: N, payload: h }), j.dispatch({ type: x.registerPluginType(U), name: U, enabled: r.pluginEnabled[U], plugin: h }), r.pluginsArray.length === g + 1 && j.dispatch({ type: x.initializeStart, plugins: E, disabled: W });
2665
- }), lo(function(h) {
2664
+ }), fo(function(h) {
2666
2665
  j.dispatch({ type: h ? x.offline : x.online });
2667
2666
  }), function(h, g, P) {
2668
2667
  setInterval(function() {
2669
- return fr(h, g, P);
2668
+ return mr(h, g, P);
2670
2669
  }, 3e3);
2671
2670
  }(j, u, b), b;
2672
2671
  }
2673
- var Ye = "before", Ge = "after", Le = "cookie", fe = _r(), Ir = ct, fo = ct;
2674
- function Sr(t) {
2672
+ var Ye = "before", Ge = "after", De = "cookie", fe = Pr(), _r = ct, mo = ct;
2673
+ function Er(t) {
2675
2674
  return fe ? ct(t, "", -1) : Ae(t);
2676
2675
  }
2677
- function _r() {
2676
+ function Pr() {
2678
2677
  if (fe !== void 0)
2679
2678
  return fe;
2680
2679
  var t = "cookiecookie";
2681
2680
  try {
2682
- ct(t, t), fe = document.cookie.indexOf(t) !== -1, Sr(t);
2681
+ ct(t, t), fe = document.cookie.indexOf(t) !== -1, Er(t);
2683
2682
  } catch {
2684
2683
  fe = !1;
2685
2684
  }
@@ -2691,11 +2690,11 @@ function ct(t, e, n, r, i, o) {
2691
2690
  return fe === !1 && (a ? be(t, e) : we(t)), a ? document.cookie = t + "=" + encodeURIComponent(e) + (n ? "; expires=" + new Date(+/* @__PURE__ */ new Date() + 1e3 * n).toUTCString() + (r ? "; path=" + r : "") + (i ? "; domain=" + i : "") + (o ? "; secure" : "") : "") : decodeURIComponent((("; " + document.cookie).split("; " + t + "=")[1] || "").split(";")[0]);
2692
2691
  }
2693
2692
  }
2694
- var Me = "localStorage", po = Dt.bind(null, "localStorage");
2693
+ var Me = "localStorage", go = Zt.bind(null, "localStorage");
2695
2694
  $e("localStorage", "getItem", we);
2696
2695
  $e("localStorage", "setItem", be);
2697
2696
  $e("localStorage", "removeItem", Ae);
2698
- var Ze = "sessionStorage", mo = Dt.bind(null, "sessionStorage");
2697
+ var Ze = "sessionStorage", yo = Zt.bind(null, "sessionStorage");
2699
2698
  $e("sessionStorage", "getItem", we);
2700
2699
  $e("sessionStorage", "setItem", be);
2701
2700
  $e("sessionStorage", "removeItem", Ae);
@@ -2714,57 +2713,57 @@ function Te(t) {
2714
2713
  if (e !== null && e !== "")
2715
2714
  return e;
2716
2715
  }
2717
- var go = po(), yo = mo(), vo = _r();
2718
- function Er(t, e) {
2716
+ var vo = go(), wo = yo(), bo = Pr();
2717
+ function Tr(t, e) {
2719
2718
  if (t) {
2720
- var n = Lt(e), r = !Wt(n), i = Mt(n) ? Te(localStorage.getItem(t)) : void 0;
2719
+ var n = Kt(e), r = !Jt(n), i = Wt(n) ? Te(localStorage.getItem(t)) : void 0;
2721
2720
  if (r && !Se(i))
2722
2721
  return i;
2723
- var o = Zt(n) ? Te(Ir(t)) : void 0;
2722
+ var o = Ft(n) ? Te(_r(t)) : void 0;
2724
2723
  if (r && o)
2725
2724
  return o;
2726
- var a = Kt(n) ? Te(sessionStorage.getItem(t)) : void 0;
2725
+ var a = Ht(n) ? Te(sessionStorage.getItem(t)) : void 0;
2727
2726
  if (r && a)
2728
2727
  return a;
2729
2728
  var s = we(t);
2730
2729
  return r ? s : { localStorage: i, sessionStorage: a, cookie: o, global: s };
2731
2730
  }
2732
2731
  }
2733
- function wo(t, e, n) {
2732
+ function ko(t, e, n) {
2734
2733
  if (t && !Se(e)) {
2735
- var r = {}, i = Lt(n), o = JSON.stringify(e), a = !Wt(i);
2736
- return Mt(i) && (r[Me] = Be(Me, e, Te(localStorage.getItem(t))), localStorage.setItem(t, o), a) ? r[Me] : Zt(i) && (r[Le] = Be(Le, e, Te(Ir(t))), fo(t, o), a) ? r[Le] : Kt(i) && (r[Ze] = Be(Ze, e, Te(sessionStorage.getItem(t))), sessionStorage.setItem(t, o), a) ? r[Ze] : (r[De] = Be(De, e, we(t)), be(t, e), a ? r[De] : r);
2734
+ var r = {}, i = Kt(n), o = JSON.stringify(e), a = !Jt(i);
2735
+ return Wt(i) && (r[Me] = Be(Me, e, Te(localStorage.getItem(t))), localStorage.setItem(t, o), a) ? r[Me] : Ft(i) && (r[De] = Be(De, e, Te(_r(t))), mo(t, o), a) ? r[De] : Ht(i) && (r[Ze] = Be(Ze, e, Te(sessionStorage.getItem(t))), sessionStorage.setItem(t, o), a) ? r[Ze] : (r[Le] = Be(Le, e, we(t)), be(t, e), a ? r[Le] : r);
2737
2736
  }
2738
2737
  }
2739
- function bo(t, e) {
2738
+ function Io(t, e) {
2740
2739
  if (t) {
2741
- var n = Lt(e), r = Er(t, ar), i = {};
2742
- return !Se(r.localStorage) && Mt(n) && (localStorage.removeItem(t), i[Me] = r.localStorage), !Se(r.cookie) && Zt(n) && (Sr(t), i[Le] = r.cookie), !Se(r.sessionStorage) && Kt(n) && (sessionStorage.removeItem(t), i[Ze] = r.sessionStorage), !Se(r.global) && ut(n, De) && (Ae(t), i[De] = r.global), i;
2740
+ var n = Kt(e), r = Tr(t, cr), i = {};
2741
+ return !Se(r.localStorage) && Wt(n) && (localStorage.removeItem(t), i[Me] = r.localStorage), !Se(r.cookie) && Ft(n) && (Er(t), i[De] = r.cookie), !Se(r.sessionStorage) && Ht(n) && (sessionStorage.removeItem(t), i[Ze] = r.sessionStorage), !Se(r.global) && ut(n, Le) && (Ae(t), i[Le] = r.global), i;
2743
2742
  }
2744
2743
  }
2745
- function Lt(t) {
2746
- return t ? se(t) ? t : t.storage : or;
2744
+ function Kt(t) {
2745
+ return t ? se(t) ? t : t.storage : sr;
2747
2746
  }
2748
- function Mt(t) {
2749
- return go && ut(t, Me);
2747
+ function Wt(t) {
2748
+ return vo && ut(t, Me);
2750
2749
  }
2751
- function Zt(t) {
2752
- return vo && ut(t, Le);
2750
+ function Ft(t) {
2751
+ return bo && ut(t, De);
2753
2752
  }
2754
- function Kt(t) {
2755
- return yo && ut(t, Ze);
2753
+ function Ht(t) {
2754
+ return wo && ut(t, Ze);
2756
2755
  }
2757
- function Wt(t) {
2758
- return t === ar || t === "all";
2756
+ function Jt(t) {
2757
+ return t === cr || t === "all";
2759
2758
  }
2760
2759
  function ut(t, e) {
2761
- return t === or || t === e || Wt(t);
2760
+ return t === sr || t === e || Jt(t);
2762
2761
  }
2763
2762
  function Be(t, e, n) {
2764
2763
  return { location: t, current: e, previous: n };
2765
2764
  }
2766
- var ko = { setItem: wo, getItem: Er, removeItem: bo };
2767
- function Io(t, e, n) {
2765
+ var So = { setItem: ko, getItem: Tr, removeItem: Io };
2766
+ function _o(t, e, n) {
2768
2767
  return e in t ? Object.defineProperty(t, e, {
2769
2768
  value: n,
2770
2769
  enumerable: !0,
@@ -2772,7 +2771,7 @@ function Io(t, e, n) {
2772
2771
  writable: !0
2773
2772
  }) : t[e] = n, t;
2774
2773
  }
2775
- function Tn(t, e) {
2774
+ function Cn(t, e) {
2776
2775
  var n = Object.keys(t);
2777
2776
  if (Object.getOwnPropertySymbols) {
2778
2777
  var r = Object.getOwnPropertySymbols(t);
@@ -2782,24 +2781,24 @@ function Tn(t, e) {
2782
2781
  }
2783
2782
  return n;
2784
2783
  }
2785
- function On(t) {
2784
+ function xn(t) {
2786
2785
  for (var e = 1; e < arguments.length; e++) {
2787
2786
  var n = arguments[e] != null ? arguments[e] : {};
2788
- e % 2 ? Tn(Object(n), !0).forEach(function(r) {
2789
- Io(t, r, n[r]);
2790
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Tn(Object(n)).forEach(function(r) {
2787
+ e % 2 ? Cn(Object(n), !0).forEach(function(r) {
2788
+ _o(t, r, n[r]);
2789
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Cn(Object(n)).forEach(function(r) {
2791
2790
  Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
2792
2791
  });
2793
2792
  }
2794
2793
  return t;
2795
2794
  }
2796
- function So() {
2795
+ function Eo() {
2797
2796
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = {
2798
- storage: ko
2797
+ storage: So
2799
2798
  };
2800
- return ho(On(On({}, e), t));
2799
+ return po(xn(xn({}, e), t));
2801
2800
  }
2802
- function _o(t, e) {
2801
+ function Po(t, e) {
2803
2802
  e = e || {};
2804
2803
  var n, r, i = [], o = e.max || 1 / 0;
2805
2804
  function a() {
@@ -2821,7 +2820,7 @@ function _o(t, e) {
2821
2820
  }
2822
2821
  };
2823
2822
  }
2824
- function Eo(t) {
2823
+ function To(t) {
2825
2824
  if (typeof window > "u")
2826
2825
  return;
2827
2826
  const { addEventListener: e, history: n, location: r } = window;
@@ -2833,53 +2832,53 @@ function Eo(t) {
2833
2832
  const s = n[a];
2834
2833
  n[a] = function(...f) {
2835
2834
  var c;
2836
- const p = ((c = f[2]) == null ? void 0 : c.toString()) || "", u = To(p);
2835
+ const p = ((c = f[2]) == null ? void 0 : c.toString()) || "", u = jo(p);
2837
2836
  return i !== u && (i = u, setTimeout(() => t(p), 0)), s.apply(n, f);
2838
2837
  };
2839
2838
  });
2840
2839
  }
2841
- function Po(t, e) {
2840
+ function Oo(t, e) {
2842
2841
  const n = t.indexOf(e);
2843
2842
  return n > -1 ? t.slice(0, n) : t;
2844
2843
  }
2845
- function To(t) {
2846
- return ["#", "?"].forEach((e) => t = Po(t, e)), t;
2844
+ function jo(t) {
2845
+ return ["#", "?"].forEach((e) => t = Oo(t, e)), t;
2847
2846
  }
2848
- function Oo() {
2849
- Eo(() => {
2847
+ function Co() {
2848
+ To(() => {
2850
2849
  re.page();
2851
2850
  });
2852
2851
  }
2853
- function jo(t) {
2852
+ function xo(t) {
2854
2853
  if (t === void 0 && (t = {}), !X)
2855
- return Tt;
2856
- var e = Cn(), n = Ct(), r = jn(), i = qe(r, e), o = qe(n, e), a = [], s = [], f = [], p = r, u = i, c = o, m = Object.keys(t);
2854
+ return Ot;
2855
+ var e = $n(), n = xt(), r = An(), i = qe(r, e), o = qe(n, e), a = [], s = [], f = [], p = r, u = i, c = o, m = Object.keys(t);
2857
2856
  if (!m.length)
2858
- return Tt;
2857
+ return Ot;
2859
2858
  var d = m.map(function(k) {
2860
2859
  return Number(k);
2861
- }), w = Mi(function() {
2862
- var k = Cn(), v = function($, R) {
2860
+ }), w = Ki(function() {
2861
+ var k = $n(), v = function($, R) {
2863
2862
  return R.map(function(K) {
2864
2863
  return K === 100 ? $ - 5 : $ * (K / 100);
2865
2864
  });
2866
- }(k, d), _ = Ct(), S = jn(), y = qe(S, k), l = qe(_, k);
2865
+ }(k, d), _ = xt(), S = An(), y = qe(S, k), l = qe(_, k);
2867
2866
  if (u = y > u ? y : u, c = l < c ? l : c, !(a.length >= d.length)) {
2868
2867
  var b = p === S, T = "up";
2869
2868
  b ? T = "initial" : p <= S && (T = "down");
2870
2869
  var O = v, C = d;
2871
2870
  (T === "up" || b) && (O = v.slice().reverse(), C = d.slice().reverse());
2872
- var D = C.reduce(function($, R, K) {
2871
+ var L = C.reduce(function($, R, K) {
2873
2872
  var j = O[K];
2874
2873
  return f.includes(R) && S <= j && (f = f.filter(function(I) {
2875
2874
  return I !== R;
2876
2875
  }), $.singleFunction = R), T === "down" && !a.includes(R) && S >= j && R > o ? (s.push(R), $.callbacks = $.callbacks.concat(R), $) : T === "up" && !a.includes(R) && S <= j && R <= y ? ($.foundFunc = [R], $) : (b && S >= j && $.foundFunc.length === 0 && ($.foundFunc = [R]), !s.includes(R) && S >= j && (s.push(R), $.singleFunction ? f.push(R) : $.singleFunction = R), $);
2877
2876
  }, { foundFunc: [], singleFunction: null, callbacks: [], direction: T });
2878
- if (p = S, T === "down" && D.callbacks && D.callbacks.forEach(function($) {
2877
+ if (p = S, T === "down" && L.callbacks && L.callbacks.forEach(function($) {
2879
2878
  Y(t[$]) && (t[$]({ trigger: $, direction: T, scrollMin: c, scrollMax: u, range: [c, u] }), a.push($));
2880
- }), D.singleFunction) {
2881
- var z = D.singleFunction, F = D.direction;
2882
- Y(t[z]) && t[z]({ trigger: z, direction: F, scrollMin: c, scrollMax: u, range: [c, u] }), a.push(z);
2879
+ }), L.singleFunction) {
2880
+ var z = L.singleFunction, H = L.direction;
2881
+ Y(t[z]) && t[z]({ trigger: z, direction: H, scrollMin: c, scrollMax: u, range: [c, u] }), a.push(z);
2883
2882
  }
2884
2883
  }
2885
2884
  }, 500);
@@ -2887,16 +2886,16 @@ function jo(t) {
2887
2886
  return window.removeEventListener("scroll", w);
2888
2887
  };
2889
2888
  }
2890
- function Ct() {
2889
+ function xt() {
2891
2890
  return X ? document.body.scrollTop || document.documentElement.scrollTop : 0;
2892
2891
  }
2893
- function Co() {
2892
+ function Ao() {
2894
2893
  return X ? window.innerHeight || document.documentElement.clientHeight : 0;
2895
2894
  }
2896
- function jn() {
2897
- return Math.round(Ct() + Co());
2895
+ function An() {
2896
+ return Math.round(xt() + Ao());
2898
2897
  }
2899
- function Cn() {
2898
+ function $n() {
2900
2899
  if (!X)
2901
2900
  return 0;
2902
2901
  var t = document.body, e = document.documentElement;
@@ -2905,10 +2904,10 @@ function Cn() {
2905
2904
  function qe(t, e) {
2906
2905
  return Math.round(t / e * 100);
2907
2906
  }
2908
- var xn = "EventListener";
2909
- function xo(t) {
2907
+ var Nn = "EventListener";
2908
+ function $o(t) {
2910
2909
  return function(e, n, r, i) {
2911
- var o = r || Tt, a = i || !1;
2910
+ var o = r || Ot, a = i || !1;
2912
2911
  if (!X)
2913
2912
  return o;
2914
2913
  var s = rt(n), f = rt(e, !0);
@@ -2919,9 +2918,9 @@ function xo(t) {
2919
2918
  var p = [];
2920
2919
  return function u(c) {
2921
2920
  c && (p = []);
2922
- for (var m = c ? "add" + xn : "remove" + xn, d = 0; d < f.length; d++) {
2921
+ for (var m = c ? "add" + Nn : "remove" + Nn, d = 0; d < f.length; d++) {
2923
2922
  var w = f[d];
2924
- p[d] = c ? a && a.once ? Ao(o) : o : p[d] || o;
2923
+ p[d] = c ? a && a.once ? No(o) : o : p[d] || o;
2925
2924
  for (var k = 0; k < s.length; k++)
2926
2925
  w[m] ? w["on" + s[k]] = c ? p[d] : null : w[m](s[k], p[d], a);
2927
2926
  }
@@ -2940,31 +2939,31 @@ function rt(t, e) {
2940
2939
  r[i] = t[i];
2941
2940
  return r;
2942
2941
  }
2943
- var o = Ui(t);
2942
+ var o = Ri(t);
2944
2943
  return e ? o.map(function(a) {
2945
2944
  return se(a) ? rt(a, !0) : a;
2946
2945
  }).flat() : o;
2947
2946
  }
2948
- function Ao(t, e) {
2947
+ function No(t, e) {
2949
2948
  var n;
2950
2949
  return function() {
2951
2950
  return t && (n = t.apply(e || this, arguments), t = null), n;
2952
2951
  };
2953
2952
  }
2954
- var wt = xo("Event");
2955
- function Pr(t, e) {
2953
+ var wt = $o("Event");
2954
+ function Or(t, e) {
2956
2955
  return X && Y(window[t]) ? (n = window[t], r = e, (i = window) === void 0 && (i = null), Y(n) ? function() {
2957
2956
  n.apply(i, arguments), r.apply(i, arguments);
2958
2957
  } : r) : window[t] = e;
2959
2958
  var n, r, i;
2960
2959
  }
2961
- Pr.bind(null, "onerror");
2962
- Pr.bind(null, "onload");
2963
- var Tr = typeof window > "u", An = "hidden";
2964
- function $o(t) {
2965
- if (Tr)
2960
+ Or.bind(null, "onerror");
2961
+ Or.bind(null, "onload");
2962
+ var jr = typeof window > "u", Un = "hidden";
2963
+ function Uo(t) {
2964
+ if (jr)
2966
2965
  return !1;
2967
- var e = No(), n = "".concat(e.replace(/[H|h]idden/, ""), "visibilitychange"), r = function() {
2966
+ var e = zo(), n = "".concat(e.replace(/[H|h]idden/, ""), "visibilitychange"), r = function() {
2968
2967
  return t(!!document[e]);
2969
2968
  }, i = function() {
2970
2969
  return document.addEventListener(n, r);
@@ -2973,15 +2972,15 @@ function $o(t) {
2973
2972
  return document.removeEventListener(n, r), i;
2974
2973
  };
2975
2974
  }
2976
- function No() {
2975
+ function zo() {
2977
2976
  var t = ["webkit", "moz", "ms", "o"];
2978
- return Tr || An in document ? An : t.reduce(function(e, n) {
2977
+ return jr || Un in document ? Un : t.reduce(function(e, n) {
2979
2978
  var r = n + "Hidden";
2980
2979
  return !e && r in document ? r : e;
2981
2980
  }, null);
2982
2981
  }
2983
- var Uo = ["mousemove", "mousedown", "touchmove", "touchstart", "touchend", "keydown"];
2984
- function zo(t, e) {
2982
+ var Ro = ["mousemove", "mousedown", "touchmove", "touchstart", "touchend", "keydown"];
2983
+ function Lo(t, e) {
2985
2984
  e === void 0 && (e = {});
2986
2985
  var n = /* @__PURE__ */ function(a, s) {
2987
2986
  var f = this, p = !1;
@@ -2992,10 +2991,10 @@ function zo(t, e) {
2992
2991
  };
2993
2992
  }(t, e.throttle || 1e4), r = [];
2994
2993
  function i() {
2995
- var a = $o(function(s) {
2994
+ var a = Uo(function(s) {
2996
2995
  s || n({ type: "tabVisible" });
2997
2996
  });
2998
- return r = [a].concat(Uo.map(function(s) {
2997
+ return r = [a].concat(Ro.map(function(s) {
2999
2998
  return wt(document, s, n);
3000
2999
  })).concat(wt(window, "load", n)).concat(wt(window, "scroll", n, { capture: !0, passive: !0 })), o;
3001
3000
  }
@@ -3008,7 +3007,7 @@ function zo(t, e) {
3008
3007
  return o(), i;
3009
3008
  };
3010
3009
  }
3011
- function Ro(t) {
3010
+ function Do(t) {
3012
3011
  var e, n, r = t.onIdle, i = t.onWakeUp, o = t.onHeartbeat, a = t.timeout, s = a === void 0 ? 1e4 : a, f = t.throttle, p = f === void 0 ? 2e3 : f, u = !1, c = !1, m = /* @__PURE__ */ new Date(), d = function() {
3013
3012
  return clearTimeout(e);
3014
3013
  };
@@ -3017,7 +3016,7 @@ function Ro(t) {
3017
3016
  u = !0, r && (n = /* @__PURE__ */ new Date(), r(ze(m), v));
3018
3017
  }, s);
3019
3018
  }
3020
- var k = zo(w, { throttle: p });
3019
+ var k = Lo(w, { throttle: p });
3021
3020
  return { disable: function() {
3022
3021
  c = !0, u = !1, d();
3023
3022
  var v = k();
@@ -3031,8 +3030,8 @@ function Ro(t) {
3031
3030
  function ze(t, e) {
3032
3031
  return e ? 0 : Math.round((/* @__PURE__ */ new Date() - t) / 1e3);
3033
3032
  }
3034
- const $n = 5e3;
3035
- class Do {
3033
+ const zn = 5e3;
3034
+ class Mo {
3036
3035
  constructor(e) {
3037
3036
  q(this, "element");
3038
3037
  q(this, "isInViewport", !1);
@@ -3054,11 +3053,11 @@ class Do {
3054
3053
  {
3055
3054
  threshold: 0
3056
3055
  }
3057
- ), this.observer.observe(this.element), Ro({
3056
+ ), this.observer.observe(this.element), Do({
3058
3057
  onIdle: (n) => this.handleAwake(!1, n),
3059
3058
  onWakeUp: (n) => this.handleAwake(!0, n),
3060
- timeout: $n
3061
- }), jo({
3059
+ timeout: zn
3060
+ }), xo({
3062
3061
  25: this.handleScroll.bind(this),
3063
3062
  50: this.handleScroll.bind(this),
3064
3063
  75: this.handleScroll.bind(this),
@@ -3076,7 +3075,7 @@ class Do {
3076
3075
  e ? (this.isAwake = !0, this.trackInViewport()) : this.handleAwake(!1), this.isInViewport = e;
3077
3076
  }
3078
3077
  handleAwake(e, n = Math.round((Date.now() - this.lastEventAt) / 1e3)) {
3079
- this.isAwake = e, this.lastEventAt = e ? Date.now() - n * $n : Date.now(), this.isInViewport && this.trackAwake(e, n);
3078
+ this.isAwake = e, this.lastEventAt = e ? Date.now() - n * zn : Date.now(), this.isInViewport && this.trackAwake(e, n);
3080
3079
  }
3081
3080
  handleScroll(e) {
3082
3081
  this.scrollCallback && this.scrollCallback(e);
@@ -3093,17 +3092,17 @@ class Do {
3093
3092
  this.registeredView || (this.registeredView = !0, this.viewCallback && this.viewCallback());
3094
3093
  }
3095
3094
  }
3096
- const Nn = "sesamy_session_id";
3097
- function Lo() {
3098
- let t = sessionStorage.getItem(Nn);
3099
- return t || (t = Math.random().toString(36).slice(2, 9), sessionStorage.setItem(Nn, t)), t;
3095
+ const Rn = "sesamy_session_id";
3096
+ function Zo() {
3097
+ let t = sessionStorage.getItem(Rn);
3098
+ return t || (t = Math.random().toString(36).slice(2, 9), sessionStorage.setItem(Rn, t)), t;
3100
3099
  }
3101
- let Or = !1, xt, Un, it;
3102
- function Mo({ clientId: t, enabled: e = !0, endpoint: n = ci }) {
3103
- if (xt = t, Un = e, it = n, !Un)
3100
+ let Cr = !1, At, Ln, it;
3101
+ function Ko({ clientId: t, enabled: e = !0, endpoint: n = li }) {
3102
+ if (At = t, Ln = e, it = n, !Ln)
3104
3103
  return;
3105
- Oo();
3106
- const r = new Do({
3104
+ Co();
3105
+ const r = new Mo({
3107
3106
  element: document.body,
3108
3107
  viewCallback: () => {
3109
3108
  re.page();
@@ -3128,26 +3127,26 @@ function Mo({ clientId: t, enabled: e = !0, endpoint: n = ci }) {
3128
3127
  });
3129
3128
  }
3130
3129
  });
3131
- Wo(document.body, () => {
3130
+ Ho(document.body, () => {
3132
3131
  r.flush();
3133
- }), Ho(document.body, () => {
3132
+ }), Jo(document.body, () => {
3134
3133
  r.handleVisibilityChange();
3135
3134
  }), window.addEventListener(Q.AUTHENTICATED, async (i) => {
3136
3135
  const o = i;
3137
3136
  await re.identify(o.detail.sub);
3138
3137
  }), window.addEventListener(Q.LOGOUT, async () => {
3139
- await re.track("logout", {}), Ht.flush(), await re.reset();
3138
+ await re.track("logout", {}), Xt.flush(), await re.reset();
3140
3139
  });
3141
3140
  }
3142
- function jr(t) {
3141
+ function xr(t) {
3143
3142
  return JSON.stringify(
3144
3143
  t.map((e) => ({
3145
3144
  ...e,
3146
- clientId: xt,
3145
+ clientId: At,
3147
3146
  requestId: Math.random().toString(36).slice(2, 9),
3148
- sessionId: Lo(),
3147
+ sessionId: Zo(),
3149
3148
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
3150
- version: Rt,
3149
+ version: Mt,
3151
3150
  event: e.event,
3152
3151
  context: {
3153
3152
  page: {
@@ -3158,18 +3157,18 @@ function jr(t) {
3158
3157
  referrer: document.referrer
3159
3158
  },
3160
3159
  locale: navigator.language,
3161
- library: ir,
3160
+ library: ar,
3162
3161
  userAgent: navigator.userAgent,
3163
- clientId: xt
3162
+ clientId: At
3164
3163
  }
3165
3164
  }))
3166
3165
  );
3167
3166
  }
3168
- const Ht = _o(
3167
+ const Xt = Po(
3169
3168
  async (t) => {
3170
3169
  if (t.length > 0) {
3171
- const e = jr(t);
3172
- Or ? navigator.sendBeacon(it, e) : (await fetch(it, {
3170
+ const e = xr(t);
3171
+ Cr ? navigator.sendBeacon(it, e) : (await fetch(it, {
3173
3172
  method: "POST",
3174
3173
  body: e,
3175
3174
  headers: {
@@ -3190,13 +3189,13 @@ function bt(t) {
3190
3189
  if (t.anonymousId)
3191
3190
  if ((e = t.properties) != null && e.flushing) {
3192
3191
  const n = { ...t };
3193
- delete n.properties.flushing, navigator.sendBeacon(it, jr([n]));
3192
+ delete n.properties.flushing, navigator.sendBeacon(it, xr([n]));
3194
3193
  } else
3195
- Ht.push(t);
3194
+ Xt.push(t);
3196
3195
  }
3197
- const re = So({
3198
- app: ir,
3199
- version: Rt,
3196
+ const re = Eo({
3197
+ app: ar,
3198
+ version: Mt,
3200
3199
  plugins: [
3201
3200
  {
3202
3201
  name: "custom-analytics-plugin",
@@ -3232,40 +3231,40 @@ const re = So({
3232
3231
  }
3233
3232
  ]
3234
3233
  });
3235
- function Zo(t, e) {
3234
+ function Wo(t, e) {
3236
3235
  re.track(t, e);
3237
3236
  }
3238
- function Ko() {
3239
- return Or = !0, Ht.flush();
3237
+ function Fo() {
3238
+ return Cr = !0, Xt.flush();
3240
3239
  }
3241
- const Cr = /* @__PURE__ */ new Map();
3242
- function Wo(t, e) {
3243
- Cr.set(t, e);
3240
+ const Ar = /* @__PURE__ */ new Map();
3241
+ function Ho(t, e) {
3242
+ Ar.set(t, e);
3244
3243
  }
3245
3244
  window.addEventListener("beforeunload", () => {
3246
- Cr.forEach((t, e) => {
3245
+ Ar.forEach((t, e) => {
3247
3246
  t.bind(e)();
3248
- }), Ko();
3247
+ }), Fo();
3249
3248
  });
3250
- const xr = /* @__PURE__ */ new Map();
3251
- function Ho(t, e) {
3252
- xr.set(t, e);
3249
+ const $r = /* @__PURE__ */ new Map();
3250
+ function Jo(t, e) {
3251
+ $r.set(t, e);
3253
3252
  }
3254
3253
  window.addEventListener("visibilitychange", () => {
3255
- document.visibilityState !== "visible" && xr.forEach((t, e) => {
3254
+ document.visibilityState !== "visible" && $r.forEach((t, e) => {
3256
3255
  t.bind(e)();
3257
3256
  });
3258
3257
  });
3259
- const Ar = "sesamySignedURLs";
3260
- function $r() {
3261
- const t = sessionStorage.getItem(Ar);
3258
+ const Nr = "sesamySignedURLs";
3259
+ function Ur() {
3260
+ const t = sessionStorage.getItem(Nr);
3262
3261
  return t ? JSON.parse(t) : [];
3263
3262
  }
3264
- function Fo(t) {
3265
- const e = $r();
3266
- e.push(t), sessionStorage.setItem(Ar, JSON.stringify(e));
3263
+ function Xo(t) {
3264
+ const e = Ur();
3265
+ e.push(t), sessionStorage.setItem(Nr, JSON.stringify(e));
3267
3266
  }
3268
- function Jo(t) {
3267
+ function Vo(t) {
3269
3268
  const {
3270
3269
  getEntitlement: e,
3271
3270
  getEntitlements: n,
@@ -3291,22 +3290,22 @@ function Jo(t) {
3291
3290
  getProduct: T,
3292
3291
  getPaymentIssues: O,
3293
3292
  autoOnboardProduct: C,
3294
- openHostedAccountPage: D
3295
- } = Ei(t), z = {
3293
+ openHostedAccountPage: L
3294
+ } = Ti(t), z = {
3296
3295
  auth: {
3297
3296
  getUser: p,
3298
- isAuthenticated: qn,
3299
- loginWithRedirect: Qn,
3300
- logout: di,
3301
- setToken: er
3297
+ isAuthenticated: Lt,
3298
+ loginWithRedirect: Dt,
3299
+ logout: fi,
3300
+ setToken: nr
3302
3301
  },
3303
3302
  profile: {
3304
3303
  get: p,
3305
3304
  update: u,
3306
- openHostedAccountPage: D
3305
+ openHostedAccountPage: L
3307
3306
  },
3308
3307
  analytics: {
3309
- track: Zo
3308
+ track: Wo
3310
3309
  },
3311
3310
  tags: {
3312
3311
  list: c,
@@ -3317,7 +3316,7 @@ function Jo(t) {
3317
3316
  get: e,
3318
3317
  list: n,
3319
3318
  access: r,
3320
- signedLinks: $r
3319
+ signedLinks: Ur
3321
3320
  },
3322
3321
  contracts: {
3323
3322
  get: o,
@@ -3346,39 +3345,39 @@ function Jo(t) {
3346
3345
  get: T,
3347
3346
  autoOnboard: C
3348
3347
  },
3349
- getVersion: Xo,
3348
+ getVersion: Yo,
3350
3349
  getPaymentIssues: O,
3351
3350
  clearCache: te
3352
3351
  };
3353
3352
  return t.namespace && (window[t.namespace] = z), z;
3354
3353
  }
3355
- function Xo() {
3356
- return Rt;
3354
+ function Yo() {
3355
+ return Mt;
3357
3356
  }
3358
- function Vo() {
3357
+ function Go() {
3359
3358
  const t = new URLSearchParams(window.location.hash.substring(1)), e = t.get("access_token"), n = t.get("expires_in");
3360
3359
  if (e) {
3361
- er(e, n ? parseInt(n, 10) : void 0);
3360
+ nr(e, n ? parseInt(n, 10) : void 0);
3362
3361
  const r = new URL(window.location.href);
3363
3362
  t.delete("access_token"), t.delete("expires_in"), r.hash = t.toString(), window.history.replaceState(null, "", r);
3364
3363
  }
3365
3364
  }
3366
- const zn = "sesamy-refresh", Rn = "force-refetch-entitlements";
3367
- function Yo() {
3368
- const t = new URLSearchParams(window.location.search), e = t.get(Rn), n = t.get(zn);
3365
+ const Dn = "sesamy-refresh", Mn = "force-refetch-entitlements";
3366
+ function Bo() {
3367
+ const t = new URLSearchParams(window.location.search), e = t.get(Mn), n = t.get(Dn);
3369
3368
  if (e !== null || n !== null) {
3370
3369
  const r = new URL(window.location.href);
3371
- t.delete(Rn), t.delete(zn), r.search = t.toString(), te(), window.history.replaceState(null, "", r);
3370
+ t.delete(Mn), t.delete(Dn), r.search = t.toString(), te(), window.history.replaceState(null, "", r);
3372
3371
  }
3373
3372
  }
3374
- function Go() {
3373
+ function qo() {
3375
3374
  const t = new URLSearchParams(window.location.search), e = t.get("token"), n = t.get("se");
3376
3375
  if (!n || !e)
3377
3376
  return;
3378
3377
  const r = parseInt(n, 10);
3379
3378
  if (Number.isNaN(r) || r < Date.now())
3380
3379
  return;
3381
- Fo({
3380
+ Xo({
3382
3381
  url: window.location.href.split("?")[0],
3383
3382
  token: e,
3384
3383
  expiresAt: r,
@@ -3387,47 +3386,56 @@ function Go() {
3387
3386
  const i = new URL(window.location.href);
3388
3387
  i.searchParams.delete("ss"), i.searchParams.delete("se"), i.searchParams.delete("sp"), i.searchParams.delete("so"), i.searchParams.delete("token"), window.history.replaceState(null, "", i);
3389
3388
  }
3390
- const Dn = "sesamy-user";
3391
- async function Bo() {
3392
- const e = new URLSearchParams(window.location.search).get(Dn);
3389
+ const Zn = "sesamy-user";
3390
+ async function Qo() {
3391
+ const e = new URLSearchParams(window.location.search).get(Zn);
3393
3392
  if (!e)
3394
3393
  return;
3395
- const n = await li();
3396
- (n == null ? void 0 : n.email) !== e && Qn();
3394
+ const n = await hi();
3395
+ (n == null ? void 0 : n.email) !== e && Dt();
3397
3396
  const r = new URL(window.location.href);
3398
- r.searchParams.delete(Dn), window.history.replaceState(null, "", r);
3397
+ r.searchParams.delete(Zn), window.history.replaceState(null, "", r);
3399
3398
  }
3400
- const Ln = "sesamy-purchase";
3401
- function qo() {
3402
- const t = new URLSearchParams(window.location.search), e = t.get(Ln);
3399
+ const Kn = "sesamy-purchase";
3400
+ function ea() {
3401
+ const t = new URLSearchParams(window.location.search), e = t.get(Kn);
3403
3402
  if (e !== null) {
3404
3403
  const n = new URL(window.location.href);
3405
- t.delete(Ln), n.search = t.toString(), ue(Q.PURCHASE, { itemSrc: e }), te(), window.history.replaceState(null, "", n);
3404
+ t.delete(Kn), n.search = t.toString(), ue(Q.PURCHASE, { itemSrc: e }), te(), window.history.replaceState(null, "", n);
3406
3405
  }
3407
3406
  }
3408
- async function Qo(t) {
3409
- Mo({
3407
+ const Wn = "sesamy-login";
3408
+ async function ta() {
3409
+ if (!new URLSearchParams(window.location.search).get(Wn))
3410
+ return;
3411
+ await Lt() || Dt();
3412
+ const r = new URL(window.location.href);
3413
+ r.searchParams.delete(Wn), window.history.replaceState(null, "", r);
3414
+ }
3415
+ async function na(t) {
3416
+ Ko({
3410
3417
  clientId: t.clientId,
3411
3418
  // The default client id can be overridden by the config
3412
3419
  ...t.analytics
3413
- }), await ui({
3420
+ }), await di({
3414
3421
  clientId: t.clientId,
3422
+ organization: t.organization,
3415
3423
  // The default client id can be overridden by the config
3416
3424
  ...t.auth
3417
3425
  });
3418
- const e = Jo({ clientId: t.clientId, ...t.api });
3419
- return ue(Q.READY, {}), Vo(), Yo(), Go(), await Bo(), qo(), e;
3426
+ const e = Vo({ clientId: t.clientId, ...t.api });
3427
+ return ue(Q.READY, {}), Go(), Bo(), qo(), await ta(), await Qo(), ea(), e;
3420
3428
  }
3421
3429
  if (typeof document < "u") {
3422
3430
  const t = document.getElementById("sesamy-js");
3423
3431
  if (t != null && t.textContent)
3424
3432
  try {
3425
3433
  const e = JSON.parse(t.textContent);
3426
- Qo(e);
3434
+ na(e);
3427
3435
  } catch (e) {
3428
3436
  console.error("Failed to parse config", e);
3429
3437
  }
3430
3438
  }
3431
3439
  export {
3432
- Qo as init
3440
+ na as init
3433
3441
  };