@sesamy/sesamy-js 1.13.1 → 1.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,13 +21,13 @@ function te(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 $t(t) {
24
+ function Ut(t) {
25
25
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
26
26
  }
27
- function Ut(t, e) {
27
+ function Lt(t, e) {
28
28
  return t(e = { exports: {} }, e.exports), e.exports;
29
29
  }
30
- var de = Ut(function(t, e) {
30
+ var de = Lt(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 = Ut(function(t, e) {
58
58
  return n.getInstance();
59
59
  };
60
60
  });
61
- $t(de);
62
- var Dr = $t(Ut(function(t, e) {
61
+ Ut(de);
62
+ var Dr = Ut(Lt(function(t, e) {
63
63
  var n = he && he.__awaiter || function(u, c, p, d) {
64
64
  return new (p || (p = Promise))(function(b, S) {
65
65
  function w(v) {
@@ -327,50 +327,50 @@ var Dr = $t(Ut(function(t, e) {
327
327
  }();
328
328
  e.default = f;
329
329
  }));
330
- const Mr = { timeoutInSeconds: 60 }, Wn = { name: "auth0-spa-js", version: "2.1.3" }, Fn = () => Date.now();
331
- let Y = class St extends Error {
330
+ const Mr = { timeoutInSeconds: 60 }, Kn = { name: "auth0-spa-js", version: "2.1.3" }, Wn = () => Date.now();
331
+ let Y = class _t extends Error {
332
332
  constructor(e, n) {
333
- super(n), this.error = e, this.error_description = n, Object.setPrototypeOf(this, St.prototype);
333
+ super(n), this.error = e, this.error_description = n, Object.setPrototypeOf(this, _t.prototype);
334
334
  }
335
335
  static fromPayload({ error: e, error_description: n }) {
336
- return new St(e, n);
336
+ return new _t(e, n);
337
337
  }
338
- }, Zr = class Hn extends Y {
338
+ }, Zr = class Fn extends Y {
339
339
  constructor(e, n, r, i = null) {
340
- super(e, n), this.state = r, this.appState = i, Object.setPrototypeOf(this, Hn.prototype);
340
+ super(e, n), this.state = r, this.appState = i, Object.setPrototypeOf(this, Fn.prototype);
341
341
  }
342
- }, _t = class Jn extends Y {
342
+ }, Et = class Hn extends Y {
343
343
  constructor() {
344
- super("timeout", "Timeout"), Object.setPrototypeOf(this, Jn.prototype);
344
+ super("timeout", "Timeout"), Object.setPrototypeOf(this, Hn.prototype);
345
345
  }
346
- }, Kr = class Xn extends _t {
346
+ }, Kr = class Jn extends Et {
347
347
  constructor(e) {
348
- super(), this.popup = e, Object.setPrototypeOf(this, Xn.prototype);
348
+ super(), this.popup = e, Object.setPrototypeOf(this, Jn.prototype);
349
349
  }
350
- }, Wr = class Vn extends Y {
350
+ }, Wr = class Xn extends Y {
351
351
  constructor(e) {
352
- super("cancelled", "Popup closed"), this.popup = e, Object.setPrototypeOf(this, Vn.prototype);
352
+ super("cancelled", "Popup closed"), this.popup = e, Object.setPrototypeOf(this, Xn.prototype);
353
353
  }
354
- }, Fr = class Yn extends Y {
354
+ }, Fr = class Vn extends Y {
355
355
  constructor(e, n, r) {
356
- super(e, n), this.mfa_token = r, Object.setPrototypeOf(this, Yn.prototype);
356
+ super(e, n), this.mfa_token = r, Object.setPrototypeOf(this, Vn.prototype);
357
357
  }
358
- }, Gn = class Bn extends Y {
358
+ }, Yn = class Gn extends Y {
359
359
  constructor(e, n) {
360
- super("missing_refresh_token", `Missing Refresh Token (audience: '${Yt(e, ["default"])}', scope: '${Yt(n)}')`), this.audience = e, this.scope = n, Object.setPrototypeOf(this, Bn.prototype);
360
+ super("missing_refresh_token", `Missing Refresh Token (audience: '${Vt(e, ["default"])}', scope: '${Vt(n)}')`), this.audience = e, this.scope = n, Object.setPrototypeOf(this, Gn.prototype);
361
361
  }
362
362
  };
363
- function Yt(t, e = []) {
363
+ function Vt(t, e = []) {
364
364
  return t && !e.includes(t) ? t : "";
365
365
  }
366
- const tt = () => window.crypto, ft = () => {
366
+ const nt = () => window.crypto, pt = () => {
367
367
  const t = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_~.";
368
368
  let e = "";
369
- return Array.from(tt().getRandomValues(new Uint8Array(43))).forEach((n) => e += t[n % t.length]), e;
370
- }, Gt = (t) => btoa(t), Et = (t) => {
369
+ return Array.from(nt().getRandomValues(new Uint8Array(43))).forEach((n) => e += t[n % t.length]), e;
370
+ }, Yt = (t) => btoa(t), Pt = (t) => {
371
371
  var { clientId: e } = t, n = te(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
- }, 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) => {
373
+ }, Gt = (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
376
  }, Jr = async (t, e, n) => {
@@ -394,7 +394,7 @@ const tt = () => window.crypto, ft = () => {
394
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
395
  async function Yr(t, e) {
396
396
  var { baseUrl: n, timeout: r, audience: i, scope: o, auth0Client: a, useFormData: s } = t, h = te(t, ["baseUrl", "timeout", "audience", "scope", "auth0Client", "useFormData"]);
397
- const f = s ? Et(h) : JSON.stringify(h);
397
+ const f = s ? Pt(h) : JSON.stringify(h);
398
398
  return await async function(u, c, p, d, b, S, w) {
399
399
  let P, _ = null;
400
400
  for (let C = 0; C < 3; C++)
@@ -409,16 +409,16 @@ async function Yr(t, e) {
409
409
  const v = P.json, { error: l, error_description: k } = v, T = te(v, ["error", "error_description"]), { ok: O } = P;
410
410
  if (!O) {
411
411
  const C = k || `HTTP error. Unable to fetch ${u}`;
412
- throw l === "mfa_required" ? new Fr(l, C, T.mfa_token) : l === "missing_refresh_token" ? new Gn(p, d) : new Y(l || "request_error", C);
412
+ throw l === "mfa_required" ? new Fr(l, C, T.mfa_token) : l === "missing_refresh_token" ? new Yn(p, d) : new Y(l || "request_error", C);
413
413
  }
414
414
  return T;
415
- }(`${n}/oauth/token`, r, i || "default", o, { method: "POST", body: f, headers: { "Content-Type": s ? "application/x-www-form-urlencoded" : "application/json", "Auth0-Client": btoa(JSON.stringify(a || Wn)) } }, e, s);
415
+ }(`${n}/oauth/token`, r, i || "default", o, { method: "POST", body: f, headers: { "Content-Type": s ? "application/x-www-form-urlencoded" : "application/json", "Auth0-Client": btoa(JSON.stringify(a || Kn)) } }, e, s);
416
416
  }
417
- const Je = (...t) => {
417
+ const Xe = (...t) => {
418
418
  return (e = t.filter(Boolean).join(" ").trim().split(/\s+/), Array.from(new Set(e))).join(" ");
419
419
  var e;
420
420
  };
421
- let pe = class Pt {
421
+ let pe = class Tt {
422
422
  constructor(e, n = "@@auth0spajs@@", r) {
423
423
  this.prefix = n, this.suffix = r, this.clientId = e.clientId, this.scope = e.scope, this.audience = e.audience;
424
424
  }
@@ -427,11 +427,11 @@ let pe = class Pt {
427
427
  }
428
428
  static fromKey(e) {
429
429
  const [n, r, i, o] = e.split("::");
430
- return new Pt({ clientId: r, scope: o, audience: i }, n);
430
+ return new Tt({ clientId: r, scope: o, audience: i }, n);
431
431
  }
432
432
  static fromCacheEntry(e) {
433
433
  const { scope: n, audience: r, client_id: i } = e;
434
- return new Pt({ scope: n, audience: r, clientId: i });
434
+ return new Tt({ scope: n, audience: r, clientId: i });
435
435
  }
436
436
  }, Gr = class {
437
437
  set(e, n) {
@@ -452,7 +452,7 @@ let pe = class Pt {
452
452
  allKeys() {
453
453
  return Object.keys(window.localStorage).filter((e) => e.startsWith("@@auth0spajs@@"));
454
454
  }
455
- }, qn = class {
455
+ }, Bn = class {
456
456
  constructor() {
457
457
  this.enclosedCache = /* @__PURE__ */ function() {
458
458
  let e = {};
@@ -469,7 +469,7 @@ let pe = class Pt {
469
469
  }
470
470
  }, Br = class {
471
471
  constructor(e, n, r) {
472
- this.cache = e, this.keyManifest = n, this.nowProvider = r || Fn;
472
+ this.cache = e, this.keyManifest = n, this.nowProvider = r || Wn;
473
473
  }
474
474
  async setIdToken(e, n, r) {
475
475
  var i;
@@ -551,10 +551,10 @@ const Ne = (t) => typeof t == "number", Qr = ["iss", "aud", "exp", "nbf", "iat",
551
551
  const a = o.split("."), [s, h, f] = a;
552
552
  if (a.length !== 3 || !s || !h || !f)
553
553
  throw new Error("ID token could not be decoded");
554
- const u = JSON.parse(Bt(h)), c = { __raw: o }, p = {};
554
+ const u = JSON.parse(Gt(h)), c = { __raw: o }, p = {};
555
555
  return Object.keys(u).forEach((d) => {
556
556
  c[d] = u[d], Qr.includes(d) || (p[d] = u[d]);
557
- }), { encoded: { header: s, payload: h, signature: f }, header: JSON.parse(Bt(s)), claims: c, user: p };
557
+ }), { encoded: { header: s, payload: h, signature: f }, header: JSON.parse(Gt(s)), claims: c, user: p };
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 Ne = (t) => typeof t == "number", Qr = ["iss", "aud", "exp", "nbf", "iat",
620
620
  }
621
621
  return e;
622
622
  };
623
- var me = Ut(function(t, e) {
623
+ var me = Lt(function(t, e) {
624
624
  var n = he && he.__assign || function() {
625
625
  return n = Object.assign || function(h) {
626
626
  for (var f, u = 1, c = arguments.length; u < c; u++)
@@ -667,26 +667,26 @@ var me = Ut(function(t, e) {
667
667
  s(h, "", n(n({}, f), { expires: -1 }));
668
668
  };
669
669
  });
670
- $t(me), me.encode, me.parse, me.getAll;
671
- var ti = me.get, Qn = me.set, er = me.remove;
670
+ Ut(me), me.encode, me.parse, me.getAll;
671
+ var ti = me.get, qn = me.set, Qn = me.remove;
672
672
  const Ie = { get(t) {
673
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), Qn(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), qn(t, JSON.stringify(e), r);
679
679
  }, remove(t, e) {
680
680
  let n = {};
681
- e != null && e.cookieDomain && (n.domain = e.cookieDomain), er(t, n);
681
+ e != null && e.cookieDomain && (n.domain = e.cookieDomain), Qn(t, n);
682
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), Qn(`_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), qn(`_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), er(t, n), Ie.remove(t, e), Ie.remove(`_legacy_${t}`, e);
689
+ e != null && e.cookieDomain && (n.domain = e.cookieDomain), Qn(t, n), Ie.remove(t, e), Ie.remove(`_legacy_${t}`, e);
690
690
  } }, ri = { get(t) {
691
691
  if (typeof sessionStorage > "u")
692
692
  return;
@@ -710,10 +710,10 @@ function ii(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 qt, Qt, en, pt, oi = (qt = "Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=", Qt = null, en = !1, function(t) {
714
- return pt = pt || ii(qt, Qt, en), new Worker(pt, t);
713
+ var Bt, qt, Qt, mt, oi = (Bt = "Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=", qt = null, Qt = !1, function(t) {
714
+ return mt = mt || ii(Bt, qt, Qt), new Worker(mt, t);
715
715
  });
716
- const mt = {};
716
+ const gt = {};
717
717
  let ai = class {
718
718
  constructor(e, n) {
719
719
  this.cache = e, this.clientId = n, this.manifestKey = this.createManifestKeyFrom(this.clientId);
@@ -740,40 +740,40 @@ let ai = class {
740
740
  return `@@auth0spajs@@::${e}`;
741
741
  }
742
742
  };
743
- const si = { memory: () => new qn().enclosedCache, localstorage: () => new Gr() }, tn = (t) => si[t], nn = (t) => {
743
+ const si = { memory: () => new Bn().enclosedCache, localstorage: () => new Gr() }, en = (t) => si[t], tn = (t) => {
744
744
  const { openUrl: e, onRedirect: n } = t, r = te(t, ["openUrl", "onRedirect"]);
745
745
  return Object.assign(Object.assign({}, r), { openUrl: e === !1 || e ? e : n });
746
- }, gt = new Dr();
746
+ }, yt = new Dr();
747
747
  let ci = class {
748
748
  constructor(e) {
749
749
  let n, r;
750
- if (this.userCache = new qn().enclosedCache, this.defaultOptions = { authorizationParams: { scope: "openid profile email" }, useRefreshTokensFallback: !1, useFormData: !0 }, this._releaseLockOnPageHide = async () => {
751
- await gt.releaseLock("auth0.lock.getTokenSilently"), window.removeEventListener("pagehide", this._releaseLockOnPageHide);
750
+ if (this.userCache = new Bn().enclosedCache, this.defaultOptions = { authorizationParams: { scope: "openid profile email" }, useRefreshTokensFallback: !1, useFormData: !0 }, this._releaseLockOnPageHide = async () => {
751
+ await yt.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
- if (!tt())
753
+ if (!nt())
754
754
  throw new Error("For security reasons, `window.crypto` is required to run `auth0-spa-js`.");
755
- if (tt().subtle === void 0)
755
+ if (nt().subtle === void 0)
756
756
  throw new Error(`
757
757
  auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.
758
758
  `);
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", !tn(n))
762
+ if (n = e.cacheLocation || "memory", !en(n))
763
763
  throw new Error(`Invalid cache location "${n}"`);
764
- r = tn(n)();
764
+ r = en(n)();
765
765
  }
766
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
767
  const i = e.useCookiesForTransactions ? this.cookieStorage : ri;
768
768
  var o;
769
- this.scope = Je("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 || Fn, 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());
769
+ this.scope = Xe("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 || Wn, 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 || Wn)));
772
+ const n = encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client || Kn)));
773
773
  return `${this.domainUrl}${e}&auth0Client=${n}`;
774
774
  }
775
775
  _authorizeUrl(e) {
776
- return this._url(`/authorize?${Et(e)}`);
776
+ return this._url(`/authorize?${Pt(e)}`);
777
777
  }
778
778
  async _verifyIdToken(e, n, r) {
779
779
  const i = await this.nowProvider();
@@ -784,13 +784,13 @@ let ci = class {
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 = Gt(ft()), o = Gt(ft()), a = ft(), s = ((u) => {
787
+ const i = Yt(pt()), o = Yt(pt()), a = pt(), s = ((u) => {
788
788
  const c = new Uint8Array(u);
789
789
  return ((p) => {
790
790
  const d = { "+": "-", "/": "_", "=": "" };
791
791
  return p.replace(/[+/=]/g, (b) => d[b]);
792
792
  })(window.btoa(String.fromCharCode(...Array.from(c))));
793
- })(await (async (u) => await tt().subtle.digest({ name: "SHA-256" }, new TextEncoder().encode(u)))(a)), h = ((u, c, p, d, b, S, w, P) => Object.assign(Object.assign(Object.assign({ client_id: u.clientId }, u.authorizationParams), p), { scope: Je(c, p.scope), response_type: "code", response_mode: P || "query", state: d, nonce: b, redirect_uri: w || u.authorizationParams.redirect_uri, code_challenge: S, 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), f = this._authorizeUrl(h);
793
+ })(await (async (u) => await nt().subtle.digest({ name: "SHA-256" }, new TextEncoder().encode(u)))(a)), h = ((u, c, p, d, b, S, w, P) => Object.assign(Object.assign(Object.assign({ client_id: u.clientId }, u.authorizationParams), p), { scope: Xe(c, p.scope), response_type: "code", response_mode: P || "query", state: d, nonce: b, redirect_uri: w || u.authorizationParams.redirect_uri, code_challenge: S, 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), f = this._authorizeUrl(h);
794
794
  return { nonce: o, code_verifier: a, scope: h.scope, audience: h.audience || "default", redirect_uri: h.redirect_uri, state: i, url: f };
795
795
  }
796
796
  async loginWithPopup(e, n) {
@@ -834,7 +834,7 @@ let ci = class {
834
834
  }
835
835
  async loginWithRedirect(e = {}) {
836
836
  var n;
837
- const r = nn(e), { openUrl: i, fragment: o, appState: a } = r, s = te(r, ["openUrl", "fragment", "appState"]), h = ((n = s.authorizationParams) === null || n === void 0 ? void 0 : n.organization) || this.options.authorizationParams.organization, f = await this._prepareAuthorizeUrl(s.authorizationParams || {}), { url: u } = f, c = te(f, ["url"]);
837
+ const r = tn(e), { openUrl: i, fragment: o, appState: a } = r, s = te(r, ["openUrl", "fragment", "appState"]), h = ((n = s.authorizationParams) === null || n === void 0 ? void 0 : n.organization) || this.options.authorizationParams.organization, f = await this._prepareAuthorizeUrl(s.authorizationParams || {}), { url: u } = f, c = te(f, ["url"]);
838
838
  this.transactionManager.create(Object.assign(Object.assign(Object.assign({}, c), { appState: a }), h && { organization: h }));
839
839
  const p = o ? `${u}#${o}` : u;
840
840
  i ? await i(p) : window.location.assign(p);
@@ -870,11 +870,11 @@ let ci = 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: Je(this.scope, (n = e.authorizationParams) === null || n === void 0 ? void 0 : n.scope) }) }), i = await ((o, a) => {
874
- let s = mt[a];
873
+ const r = Object.assign(Object.assign({ cacheMode: "on" }, e), { authorizationParams: Object.assign(Object.assign(Object.assign({}, this.options.authorizationParams), e.authorizationParams), { scope: Xe(this.scope, (n = e.authorizationParams) === null || n === void 0 ? void 0 : n.scope) }) }), i = await ((o, a) => {
874
+ let s = gt[a];
875
875
  return s || (s = o().finally(() => {
876
- delete mt[a], s = null;
877
- }), mt[a] = s), s;
876
+ delete gt[a], s = null;
877
+ }), gt[a] = s), s;
878
878
  })(() => this._getTokenSilently(r), `${this.options.clientId}::${r.authorizationParams.audience}::${r.authorizationParams.scope}`);
879
879
  return e.detailedResponse ? i : i == null ? void 0 : i.access_token;
880
880
  }
@@ -891,8 +891,8 @@ let ci = class {
891
891
  if (await i())
892
892
  return !0;
893
893
  return !1;
894
- })(() => gt.acquireLock("auth0.lock.getTokenSilently", 5e3), 10))
895
- throw new _t();
894
+ })(() => yt.acquireLock("auth0.lock.getTokenSilently", 5e3), 10))
895
+ throw new Et();
896
896
  try {
897
897
  if (window.addEventListener("pagehide", this._releaseLockOnPageHide), n !== "off") {
898
898
  const f = await this._getEntryFromCache({ scope: r.authorizationParams.scope, audience: r.authorizationParams.audience || "default", clientId: this.options.clientId });
@@ -902,13 +902,13 @@ let ci = class {
902
902
  const i = this.options.useRefreshTokens ? await this._getTokenUsingRefreshToken(r) : await this._getTokenFromIFrame(r), { id_token: o, access_token: a, oauthTokenScope: s, expires_in: h } = i;
903
903
  return Object.assign(Object.assign({ id_token: o, access_token: a }, s ? { scope: s } : null), { expires_in: h });
904
904
  } finally {
905
- await gt.releaseLock("auth0.lock.getTokenSilently"), window.removeEventListener("pagehide", this._releaseLockOnPageHide);
905
+ await yt.releaseLock("auth0.lock.getTokenSilently"), window.removeEventListener("pagehide", this._releaseLockOnPageHide);
906
906
  }
907
907
  }
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: Je(this.scope, (r = e.authorizationParams) === null || r === void 0 ? void 0 : r.scope) }) });
911
+ const i = Object.assign(Object.assign({}, e), { authorizationParams: Object.assign(Object.assign(Object.assign({}, this.options.authorizationParams), e.authorizationParams), { scope: Xe(this.scope, (r = e.authorizationParams) === null || r === void 0 ? void 0 : r.scope) }) });
912
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() {
@@ -917,10 +917,10 @@ let ci = class {
917
917
  _buildLogoutUrl(e) {
918
918
  e.clientId !== null ? e.clientId = e.clientId || this.options.clientId : delete e.clientId;
919
919
  const n = e.logoutParams || {}, { federated: r } = n, i = te(n, ["federated"]), o = r ? "&federated" : "";
920
- return this._url(`/v2/logout?${Et(Object.assign({ clientId: e.clientId }, i))}`) + o;
920
+ return this._url(`/v2/logout?${Pt(Object.assign({ clientId: e.clientId }, i))}`) + o;
921
921
  }
922
922
  async logout(e = {}) {
923
- const n = nn(e), { openUrl: r } = n, i = te(n, ["openUrl"]);
923
+ const n = tn(e), { openUrl: r } = n, i = te(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);
@@ -940,7 +940,7 @@ let ci = class {
940
940
  };
941
941
  let k;
942
942
  const T = setTimeout(() => {
943
- _(new _t()), l();
943
+ _(new Et()), l();
944
944
  }, 1e3 * w);
945
945
  k = function(O) {
946
946
  if (O.origin != S || !O.data || O.data.type !== "authorization_response")
@@ -962,7 +962,7 @@ let ci = 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 Gn(e.authorizationParams.audience || "default", e.authorizationParams.scope);
965
+ throw new Yn(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 {
@@ -998,17 +998,15 @@ async function ui(t) {
998
998
  const e = new ci(t);
999
999
  return await e.checkSession(), e;
1000
1000
  }
1001
- const Se = "sesamy.com", li = "https://sesa.my", di = "https://logs.sesamy.com/events", Tt = "sesamyCacheTimestamp";
1001
+ const Se = "sesamy.com", li = "https://sesa.my", di = "https://logs.sesamy.com/events", Ot = "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 G, tr;
1004
- const Lt = "sesamyAccessToken", Nt = "sesamyExpires";
1005
- function Rt() {
1006
- const t = localStorage.getItem(Nt);
1007
- if (!(t && parseInt(t, 10) < (/* @__PURE__ */ new Date()).getTime()))
1008
- return localStorage.getItem(Lt);
1003
+ let G, er;
1004
+ const Fe = "sesamyAccessToken";
1005
+ function Nt() {
1006
+ return localStorage.getItem(Fe);
1009
1007
  }
1010
1008
  async function hi(t) {
1011
- if (t.enabled !== !1 && (tr = t.organization, G = await ui({
1009
+ if (t.enabled !== !1 && (er = t.organization, G = await ui({
1012
1010
  domain: t.endpoint || `token.${Se}`,
1013
1011
  clientId: t.clientId
1014
1012
  }), window.location.search.includes("code=")))
@@ -1022,28 +1020,33 @@ async function hi(t) {
1022
1020
  console.error(e);
1023
1021
  }
1024
1022
  }
1025
- async function zt() {
1026
- return Rt() ? !0 : G ? G.isAuthenticated() : !1;
1023
+ async function Rt() {
1024
+ return Nt() ? !0 : G ? G.isAuthenticated() : !1;
1027
1025
  }
1028
1026
  async function fi() {
1029
- return Rt() ? {
1027
+ return Nt() ? {
1030
1028
  sub: "local",
1031
1029
  name: "Local User"
1032
1030
  } : G ? G.getUser() : null;
1033
1031
  }
1034
- function Dt(t) {
1035
- if (!G)
1032
+ function zt(t) {
1033
+ if (localStorage.removeItem(Fe), !G)
1036
1034
  throw new Error("Auth0 client not initialized");
1037
1035
  const e = (t == null ? void 0 : t.authorizationParams) || {};
1038
1036
  return G.loginWithRedirect({
1039
1037
  ...t,
1040
- authorizationParams: { organization: tr, redirect_uri: window.location.href, ...e }
1038
+ authorizationParams: { organization: er, redirect_uri: window.location.href, ...e }
1041
1039
  });
1042
1040
  }
1043
- async function Xe(t = !0) {
1044
- const e = Rt();
1045
- if (e)
1046
- return e;
1041
+ async function Ve(t = !0) {
1042
+ const e = Nt();
1043
+ if (e) {
1044
+ const n = tr(e);
1045
+ if (!n || !n.exp || n.exp < (/* @__PURE__ */ new Date()).getTime() / 1e3)
1046
+ localStorage.removeItem(Fe);
1047
+ else
1048
+ return e;
1049
+ }
1047
1050
  try {
1048
1051
  return G ? await G.getTokenSilently() : null;
1049
1052
  } catch (n) {
@@ -1053,13 +1056,13 @@ async function Xe(t = !0) {
1053
1056
  }
1054
1057
  }
1055
1058
  async function pi(t) {
1056
- if (localStorage.removeItem(Lt), localStorage.removeItem(Nt), ue(q.LOGOUT, {}), !!G)
1059
+ if (localStorage.removeItem(Fe), ue(q.LOGOUT, {}), !!G)
1057
1060
  return G.logout(t);
1058
1061
  }
1059
- function mi(t) {
1062
+ function tr(t) {
1060
1063
  const e = t.split(".");
1061
1064
  if (e.length !== 3)
1062
- throw new Error("Invalid JWT token format.");
1065
+ return null;
1063
1066
  const r = e[1].replace(/-/g, "+").replace(/_/g, "/"), i = decodeURIComponent(
1064
1067
  atob(r).split("").map(function(o) {
1065
1068
  return "%" + ("00" + o.charCodeAt(0).toString(16)).slice(-2);
@@ -1067,12 +1070,12 @@ function mi(t) {
1067
1070
  );
1068
1071
  return JSON.parse(i);
1069
1072
  }
1070
- async function nr(t, e) {
1071
- localStorage.setItem(Lt, t), e && localStorage.setItem(Nt, JSON.stringify(e * 1e3 + (/* @__PURE__ */ new Date()).getTime()));
1072
- const n = mi(t);
1073
- ue(q.AUTHENTICATED, n);
1073
+ async function nr(t) {
1074
+ localStorage.setItem(Fe, t);
1075
+ const e = tr(t);
1076
+ ue(q.AUTHENTICATED, e);
1074
1077
  }
1075
- const gi = (t, e) => e.skipDedupe || e.method !== "GET", yi = (t, e) => e.method + "@" + t, vi = (t) => t.clone(), rn = ({ skip: t = gi, key: e = yi, resolver: n = vi } = {}) => {
1078
+ const mi = (t, e) => e.skipDedupe || e.method !== "GET", gi = (t, e) => e.method + "@" + t, yi = (t) => t.clone(), nn = ({ skip: t = mi, key: e = gi, resolver: n = yi } = {}) => {
1076
1079
  const r = /* @__PURE__ */ new Map();
1077
1080
  return (i) => (o, a) => {
1078
1081
  if (t(o, a))
@@ -1092,7 +1095,7 @@ const gi = (t, e) => e.skipDedupe || e.method !== "GET", yi = (t, e) => e.method
1092
1095
  return r.delete(s), Promise.reject(h);
1093
1096
  }
1094
1097
  };
1095
- }, wi = (t, e) => t * e, bi = (t) => t && t.ok, on = ({ delayTimer: t = 500, delayRamp: e = wi, maxAttempts: n = 10, until: r = bi, onRetry: i = null, retryOnNetworkError: o = !1, resolveWithLatestResponse: a = !1, skip: s } = {}) => (h) => (f, u) => {
1098
+ }, vi = (t, e) => t * e, wi = (t) => t && t.ok, rn = ({ delayTimer: t = 500, delayRamp: e = vi, maxAttempts: n = 10, until: r = wi, onRetry: i = null, retryOnNetworkError: o = !1, resolveWithLatestResponse: a = !1, skip: s } = {}) => (h) => (f, u) => {
1096
1099
  let c = 0;
1097
1100
  if (s && s(f, u))
1098
1101
  return h(f, u);
@@ -1119,12 +1122,12 @@ const gi = (t, e) => e.skipDedupe || e.method !== "GET", yi = (t, e) => e.method
1119
1122
  throw d;
1120
1123
  return p(null, d);
1121
1124
  });
1122
- }, ki = "application/json", rr = "Content-Type", ke = Symbol(), ir = Symbol();
1123
- function an(t = {}) {
1125
+ }, bi = "application/json", rr = "Content-Type", ke = Symbol(), ir = Symbol();
1126
+ function on(t = {}) {
1124
1127
  var e;
1125
1128
  return (e = Object.entries(t).find(([n]) => n.toLowerCase() === rr.toLowerCase())) === null || e === void 0 ? void 0 : e[1];
1126
1129
  }
1127
- function sn(t) {
1130
+ function an(t) {
1128
1131
  return /^application\/.*json.*/.test(t);
1129
1132
  }
1130
1133
  const ge = function(t, e, n = !1) {
@@ -1153,24 +1156,24 @@ const ge = function(t, e, n = !1) {
1153
1156
  return n && i ? new i(...r) : i;
1154
1157
  }
1155
1158
  };
1156
- function Ii(t, e = !1) {
1159
+ function ki(t, e = !1) {
1157
1160
  je.options = e ? t : ge(je.options, t);
1158
1161
  }
1159
- function Si(t, e = !1) {
1162
+ function Ii(t, e = !1) {
1160
1163
  je.polyfills = e ? t : ge(je.polyfills, t);
1161
1164
  }
1162
- function _i(t) {
1165
+ function Si(t) {
1163
1166
  je.errorType = t;
1164
1167
  }
1165
- const Ei = (t) => (e) => t.reduceRight((n, r) => r(n), e) || e;
1168
+ const _i = (t) => (e) => t.reduceRight((n, r) => r(n), e) || e;
1166
1169
  class or extends Error {
1167
1170
  }
1168
- const Pi = (t) => {
1171
+ const Ei = (t) => {
1169
1172
  const e = /* @__PURE__ */ Object.create(null);
1170
1173
  t = t._addons.reduce((v, l) => l.beforeRequest && l.beforeRequest(v, t._options, e) || v, t);
1171
1174
  const { _url: n, _options: r, _config: i, _catchers: o, _resolvers: a, _middlewares: s, _addons: h } = t, f = new Map(o), u = ge(i.options, r);
1172
1175
  let c = n;
1173
- const p = Ei(s)((v, l) => (c = v, i.polyfill("fetch")(v, l)))(n, u), d = new Error(), b = p.catch((v) => {
1176
+ const p = _i(s)((v, l) => (c = v, i.polyfill("fetch")(v, l)))(n, u), d = new Error(), b = p.catch((v) => {
1174
1177
  throw { [ke]: v };
1175
1178
  }).then((v) => {
1176
1179
  if (!v.ok) {
@@ -1236,7 +1239,7 @@ CAUSE: ` + d.stack, l.response = v, l.url = c, v.type === "opaque")
1236
1239
  ...typeof l.resolver == "function" ? l.resolver(v) : l.resolver
1237
1240
  }), P);
1238
1241
  return a.reduce((v, l) => l(v, t), _);
1239
- }, Ti = {
1242
+ }, Pi = {
1240
1243
  _url: "",
1241
1244
  _options: {},
1242
1245
  _config: je,
@@ -1315,8 +1318,8 @@ CAUSE: ` + d.stack, l.response = v, l.url = c, v.type === "opaque")
1315
1318
  },
1316
1319
  fetch(t = this._options.method, e = "", n = null) {
1317
1320
  let r = this.url(e).options({ method: t });
1318
- const i = an(r._options.headers), o = typeof n == "object" && (!r._options.headers || !i || sn(i));
1319
- return r = n ? o ? r.json(n, i) : r.body(n) : r, Pi(r._deferred.reduce((a, s) => s(a, a._url, a._options), r));
1321
+ const i = on(r._options.headers), o = typeof n == "object" && (!r._options.headers || !i || an(i));
1322
+ 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));
1320
1323
  },
1321
1324
  get(t = "") {
1322
1325
  return this.fetch("GET", t);
@@ -1343,25 +1346,25 @@ CAUSE: ` + d.stack, l.response = v, l.url = c, v.type === "opaque")
1343
1346
  return { ...this, _options: { ...this._options, body: t } };
1344
1347
  },
1345
1348
  json(t, e) {
1346
- const n = an(this._options.headers);
1347
- return this.content(e || sn(n) && n || ki).body(JSON.stringify(t));
1349
+ const n = on(this._options.headers);
1350
+ return this.content(e || an(n) && n || bi).body(JSON.stringify(t));
1348
1351
  }
1349
1352
  };
1350
1353
  function ie(t = "", e = {}) {
1351
- return { ...Ti, _url: t, _options: e };
1354
+ return { ...Pi, _url: t, _options: e };
1352
1355
  }
1353
1356
  ie.default = ie;
1354
- ie.options = Ii;
1355
- ie.errorType = _i;
1356
- ie.polyfills = Si;
1357
+ ie.options = ki;
1358
+ ie.errorType = Si;
1359
+ ie.polyfills = Ii;
1357
1360
  ie.WretchError = or;
1358
1361
  function ee() {
1359
- sessionStorage.removeItem(Tt), ue(q.CLEAR_CACHE, {});
1362
+ sessionStorage.removeItem(Ot), ue(q.CLEAR_CACHE, {});
1360
1363
  }
1361
- function Oi(t) {
1364
+ function Ti(t) {
1362
1365
  const e = t.endpoint || `https://api2.${Se}`, n = (g) => async (I, E) => {
1363
- let U = sessionStorage.getItem(Tt);
1364
- U || (U = Date.now().toString(), sessionStorage.setItem(Tt, U));
1366
+ let U = sessionStorage.getItem(Ot);
1367
+ U || (U = Date.now().toString(), sessionStorage.setItem(Ot, U));
1365
1368
  const Z = {
1366
1369
  ...E,
1367
1370
  headers: {
@@ -1372,7 +1375,7 @@ function Oi(t) {
1372
1375
  return g(I, Z);
1373
1376
  }, r = (g = !0) => (I) => async (E, U) => {
1374
1377
  let Z = null;
1375
- if (Z = await Xe(g), !Z) {
1378
+ if (Z = await Ve(g), !Z) {
1376
1379
  if (g)
1377
1380
  throw new Error("No access token available");
1378
1381
  return I(E, U);
@@ -1399,8 +1402,8 @@ function Oi(t) {
1399
1402
  }, o = ie(e).headers({ "Content-Type": "application/json" }).middlewares([
1400
1403
  n,
1401
1404
  r(),
1402
- rn(),
1403
- on({
1405
+ nn(),
1406
+ rn({
1404
1407
  delayTimer: 1e3,
1405
1408
  delayRamp: (g, I) => g * I,
1406
1409
  maxAttempts: 3,
@@ -1411,8 +1414,8 @@ function Oi(t) {
1411
1414
  n,
1412
1415
  r(!1),
1413
1416
  i,
1414
- rn(),
1415
- on({
1417
+ nn(),
1418
+ rn({
1416
1419
  delayTimer: 1e3,
1417
1420
  delayRamp: (g, I) => g * I,
1418
1421
  maxAttempts: 3,
@@ -1489,7 +1492,7 @@ function Oi(t) {
1489
1492
  return await o.url(`/products/${g}`).get().json();
1490
1493
  }
1491
1494
  async function K() {
1492
- return await zt() ? await o.url("/profile").get().json() : null;
1495
+ return await Rt() ? await o.url("/profile").get().json() : null;
1493
1496
  }
1494
1497
  async function $(g) {
1495
1498
  const I = await o.url("/profile").patch(g).res();
@@ -1505,7 +1508,7 @@ function Oi(t) {
1505
1508
  return (await o.url("/profile/unlink-spotify").post().res()).ok;
1506
1509
  }
1507
1510
  async function W(g) {
1508
- const I = await Xe(!1);
1511
+ const I = await Ve(!1);
1509
1512
  if (!I)
1510
1513
  throw new Error("No access token available");
1511
1514
  const E = new URL(`https://spotify-oas.${Se}/sesamy-callback`);
@@ -1520,7 +1523,7 @@ function Oi(t) {
1520
1523
  return E;
1521
1524
  }
1522
1525
  async function m(g) {
1523
- const I = await Xe(!1);
1526
+ const I = await Ve(!1);
1524
1527
  let E;
1525
1528
  switch (g.target) {
1526
1529
  case "account":
@@ -1535,7 +1538,7 @@ function Oi(t) {
1535
1538
  return I && (E.hash = `#access_token=${I}`), g.shorten ? le(E.href, g.ttl) : E.href;
1536
1539
  }
1537
1540
  async function y() {
1538
- const g = await Xe(!1), I = new URL(`https://account.${Se}/subscriptions/${t.clientId}`);
1541
+ const g = await Ve(!1), I = new URL(`https://account.${Se}/subscriptions/${t.clientId}`);
1539
1542
  g && (I.hash = `#access_token=${g}`), window.location.href = I.toString();
1540
1543
  }
1541
1544
  return {
@@ -1570,70 +1573,70 @@ function Oi(t) {
1570
1573
  openHostedAccountPage: y
1571
1574
  };
1572
1575
  }
1573
- const ar = "@sesamy/sesamy-js", Mt = "1.3.2";
1574
- function cn(t, e, n, r, i) {
1576
+ const ar = "@sesamy/sesamy-js", Dt = "1.3.2";
1577
+ function sn(t, e, n, r, i) {
1575
1578
  for (e = e.split ? e.split(".") : e, r = 0; r < e.length; r++)
1576
1579
  t = t ? t[e[r]] : i;
1577
1580
  return t === i ? n : t;
1578
1581
  }
1579
- var Ve = "undefined", un = "object", Ot = function() {
1580
- }, sr = "any", cr = "*", ve = "__", rt = typeof process < "u" ? process : {};
1581
- rt.env && rt.env.NODE_ENV;
1582
+ var Ye = "undefined", cn = "object", jt = function() {
1583
+ }, sr = "any", cr = "*", ve = "__", it = typeof process < "u" ? process : {};
1584
+ it.env && it.env.NODE_ENV;
1582
1585
  var H = typeof document < "u";
1583
- rt.versions != null && rt.versions.node != null;
1586
+ it.versions != null && it.versions.node != null;
1584
1587
  typeof Deno < "u" && Deno.core;
1585
1588
  H && window.name === "nodejs" || typeof navigator < "u" && navigator.userAgent !== void 0 && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom"));
1586
1589
  function ur(t, e) {
1587
1590
  return e.charAt(0)[t]() + e.slice(1);
1588
1591
  }
1589
- var ji = ur.bind(null, "toUpperCase"), Ci = ur.bind(null, "toLowerCase");
1590
- function xi(t) {
1591
- return lr(t) ? ji("null") : typeof t == "object" ? Li(t) : Object.prototype.toString.call(t).slice(8, -1);
1592
+ var Oi = ur.bind(null, "toUpperCase"), ji = ur.bind(null, "toLowerCase");
1593
+ function Ci(t) {
1594
+ return lr(t) ? Oi("null") : typeof t == "object" ? Ui(t) : Object.prototype.toString.call(t).slice(8, -1);
1592
1595
  }
1593
- function it(t, e) {
1596
+ function ot(t, e) {
1594
1597
  e === void 0 && (e = !0);
1595
- var n = xi(t);
1596
- return e ? Ci(n) : n;
1598
+ var n = Ci(t);
1599
+ return e ? ji(n) : n;
1597
1600
  }
1598
- function Fe(t, e) {
1601
+ function He(t, e) {
1599
1602
  return typeof e === t;
1600
1603
  }
1601
- var V = Fe.bind(null, "function"), se = Fe.bind(null, "string"), _e = Fe.bind(null, "undefined"), Ai = Fe.bind(null, "boolean");
1602
- Fe.bind(null, "symbol");
1604
+ var V = He.bind(null, "function"), se = He.bind(null, "string"), _e = He.bind(null, "undefined"), xi = He.bind(null, "boolean");
1605
+ He.bind(null, "symbol");
1603
1606
  function lr(t) {
1604
1607
  return t === null;
1605
1608
  }
1606
- function $i(t) {
1607
- return it(t) === "number" && !isNaN(t);
1609
+ function Ai(t) {
1610
+ return ot(t) === "number" && !isNaN(t);
1608
1611
  }
1609
1612
  function dr(t) {
1610
- return it(t) === "array";
1613
+ return ot(t) === "array";
1611
1614
  }
1612
1615
  function X(t) {
1613
- if (!Ui(t))
1616
+ if (!$i(t))
1614
1617
  return !1;
1615
1618
  for (var e = t; Object.getPrototypeOf(e) !== null; )
1616
1619
  e = Object.getPrototypeOf(e);
1617
1620
  return Object.getPrototypeOf(t) === e;
1618
1621
  }
1619
- function Ui(t) {
1622
+ function $i(t) {
1620
1623
  return t && (typeof t == "object" || t !== null);
1621
1624
  }
1622
- function Li(t) {
1625
+ function Ui(t) {
1623
1626
  return V(t.constructor) ? t.constructor.name : null;
1624
1627
  }
1625
- function Ni(t) {
1626
- return t instanceof Error || se(t.message) && t.constructor && $i(t.constructor.stackTraceLimit);
1628
+ function Li(t) {
1629
+ return t instanceof Error || se(t.message) && t.constructor && Ai(t.constructor.stackTraceLimit);
1627
1630
  }
1628
1631
  function hr(t, e) {
1629
1632
  if (typeof e != "object" || lr(e))
1630
1633
  return !1;
1631
1634
  if (e instanceof t)
1632
1635
  return !0;
1633
- var n = it(new t(""));
1634
- if (Ni(e))
1636
+ var n = ot(new t(""));
1637
+ if (Li(e))
1635
1638
  for (; e; ) {
1636
- if (it(e) === n)
1639
+ if (ot(e) === n)
1637
1640
  return !0;
1638
1641
  e = Object.getPrototypeOf(e);
1639
1642
  }
@@ -1641,54 +1644,54 @@ function hr(t, e) {
1641
1644
  }
1642
1645
  hr.bind(null, TypeError);
1643
1646
  hr.bind(null, SyntaxError);
1644
- function st(t, e) {
1647
+ function ct(t, e) {
1645
1648
  var n = t instanceof Element || t instanceof HTMLDocument;
1646
- return n && e ? Ri(t, e) : n;
1649
+ return n && e ? Ni(t, e) : n;
1647
1650
  }
1648
- function Ri(t, e) {
1651
+ function Ni(t, e) {
1649
1652
  return e === void 0 && (e = ""), t && t.nodeName === e.toUpperCase();
1650
1653
  }
1651
- function ct(t) {
1654
+ function ut(t) {
1652
1655
  var e = [].slice.call(arguments, 1);
1653
1656
  return function() {
1654
1657
  return t.apply(void 0, [].slice.call(arguments).concat(e));
1655
1658
  };
1656
1659
  }
1657
- ct(st, "form");
1658
- ct(st, "button");
1659
- ct(st, "input");
1660
- ct(st, "select");
1661
- function zi(t) {
1660
+ ut(ct, "form");
1661
+ ut(ct, "button");
1662
+ ut(ct, "input");
1663
+ ut(ct, "select");
1664
+ function Ri(t) {
1662
1665
  return t ? dr(t) ? t : [t] : [];
1663
1666
  }
1664
- function ln(t) {
1667
+ function un(t) {
1665
1668
  try {
1666
1669
  return decodeURIComponent(t.replace(/\+/g, " "));
1667
1670
  } catch {
1668
1671
  return null;
1669
1672
  }
1670
1673
  }
1671
- function Di() {
1674
+ function zi() {
1672
1675
  if (H) {
1673
1676
  var t = navigator, e = t.languages;
1674
1677
  return t.userLanguage || (e && e.length ? e[0] : t.language);
1675
1678
  }
1676
1679
  }
1677
- function Mi() {
1680
+ function Di() {
1678
1681
  try {
1679
1682
  return Intl.DateTimeFormat().resolvedOptions().timeZone;
1680
1683
  } catch {
1681
1684
  }
1682
1685
  }
1683
- function Zi(t) {
1686
+ function Mi(t) {
1684
1687
  return function(e) {
1685
1688
  for (var n, r = /* @__PURE__ */ Object.create(null), i = /([^&=]+)=?([^&]*)/g; n = i.exec(e); ) {
1686
- var o = ln(n[1]), a = ln(n[2]);
1689
+ var o = un(n[1]), a = un(n[2]);
1687
1690
  o.substring(o.length - 2) === "[]" ? (r[o = o.substring(0, o.length - 2)] || (r[o] = [])).push(a) : r[o] = a === "" || a;
1688
1691
  }
1689
1692
  for (var s in r) {
1690
1693
  var h = s.split("[");
1691
- h.length > 1 && (Ki(r, h.map(function(f) {
1694
+ h.length > 1 && (Zi(r, h.map(function(f) {
1692
1695
  return f.replace(/[?[\]\\ ]/g, "");
1693
1696
  }), r[s]), delete r[s]);
1694
1697
  }
@@ -1701,7 +1704,7 @@ function Zi(t) {
1701
1704
  return H && window.location.search.substring(1);
1702
1705
  }(t));
1703
1706
  }
1704
- function Ki(t, e, n) {
1707
+ function Zi(t, e, n) {
1705
1708
  for (var r = e.length - 1, i = 0; i < r; ++i) {
1706
1709
  var o = e[i];
1707
1710
  if (o === "__proto__" || o === "constructor")
@@ -1710,14 +1713,14 @@ function Ki(t, e, n) {
1710
1713
  }
1711
1714
  t[e[r]] = n;
1712
1715
  }
1713
- function ut() {
1716
+ function lt() {
1714
1717
  for (var t = "", e = 0, n = 4294967295 * Math.random() | 0; e++ < 36; ) {
1715
1718
  var r = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx"[e - 1], i = 15 & n;
1716
1719
  t += r == "-" || r == "4" ? r : (r == "x" ? i : 3 & i | 8).toString(16), n = e % 8 == 0 ? 4294967295 * Math.random() | 0 : n >> 4;
1717
1720
  }
1718
1721
  return t;
1719
1722
  }
1720
- function Wi(t, e) {
1723
+ function Ki(t, e) {
1721
1724
  var n, r, i, o = null, a = 0, s = function() {
1722
1725
  a = /* @__PURE__ */ new Date(), o = null, i = t.apply(n, r);
1723
1726
  };
@@ -1728,7 +1731,7 @@ function Wi(t, e) {
1728
1731
  return n = this, r = arguments, f <= 0 ? (clearTimeout(o), o = null, a = h, i = t.apply(n, r)) : o || (o = setTimeout(s, f)), i;
1729
1732
  };
1730
1733
  }
1731
- var De = "global", Ce = ve + "global" + ve, xe = typeof self === un && self.self === self && self || typeof global === un && global.global === global && global || void 0;
1734
+ var De = "global", Ce = ve + "global" + ve, xe = typeof self === cn && self.self === self && self || typeof global === cn && global.global === global && global || void 0;
1732
1735
  function we(t) {
1733
1736
  return xe[Ce][t];
1734
1737
  }
@@ -1741,7 +1744,7 @@ function $e(t) {
1741
1744
  function Ue(t, e, n) {
1742
1745
  var r;
1743
1746
  try {
1744
- if (Zt(t)) {
1747
+ if (Mt(t)) {
1745
1748
  var i = window[t];
1746
1749
  r = i[e].bind(i);
1747
1750
  }
@@ -1750,17 +1753,17 @@ function Ue(t, e, n) {
1750
1753
  return r || n;
1751
1754
  }
1752
1755
  xe[Ce] || (xe[Ce] = {});
1753
- var Ye = {};
1754
- function Zt(t) {
1755
- if (typeof Ye[t] !== Ve)
1756
- return Ye[t];
1756
+ var Ge = {};
1757
+ function Mt(t) {
1758
+ if (typeof Ge[t] !== Ye)
1759
+ return Ge[t];
1757
1760
  try {
1758
1761
  var e = window[t];
1759
- e.setItem(Ve, Ve), e.removeItem(Ve);
1762
+ e.setItem(Ye, Ye), e.removeItem(Ye);
1760
1763
  } catch {
1761
- return Ye[t] = !1;
1764
+ return Ge[t] = !1;
1762
1765
  }
1763
- return Ye[t] = !0;
1766
+ return Ge[t] = !0;
1764
1767
  }
1765
1768
  function A() {
1766
1769
  return A = Object.assign || function(t) {
@@ -1772,18 +1775,18 @@ function A() {
1772
1775
  return t;
1773
1776
  }, A.apply(this, arguments);
1774
1777
  }
1775
- var ae = "function", re = "undefined", Fi = "@@redux/" + Math.random().toString(36), dn = /* @__PURE__ */ function() {
1778
+ var ae = "function", re = "undefined", Wi = "@@redux/" + Math.random().toString(36), ln = /* @__PURE__ */ function() {
1776
1779
  return typeof Symbol === ae && Symbol.observable || "@@observable";
1777
- }(), Ge = " != " + ae;
1780
+ }(), Be = " != " + ae;
1778
1781
  function fr(t, e, n) {
1779
1782
  var r;
1780
1783
  if (typeof e === ae && typeof n === re && (n = e, e = void 0), typeof n !== re) {
1781
1784
  if (typeof n !== ae)
1782
- throw new Error("enhancer" + Ge);
1785
+ throw new Error("enhancer" + Be);
1783
1786
  return n(fr)(t, e);
1784
1787
  }
1785
1788
  if (typeof t !== ae)
1786
- throw new Error("reducer" + Ge);
1789
+ throw new Error("reducer" + Be);
1787
1790
  var i = t, o = e, a = [], s = a, h = !1;
1788
1791
  function f() {
1789
1792
  s === a && (s = a.slice());
@@ -1793,7 +1796,7 @@ function fr(t, e, n) {
1793
1796
  }
1794
1797
  function c(d) {
1795
1798
  if (typeof d !== ae)
1796
- throw new Error("Listener" + Ge);
1799
+ throw new Error("Listener" + Be);
1797
1800
  var b = !0;
1798
1801
  return f(), s.push(d), function() {
1799
1802
  if (b) {
@@ -1821,9 +1824,9 @@ function fr(t, e, n) {
1821
1824
  }
1822
1825
  return p({ type: "@@redux/INIT" }), (r = { dispatch: p, subscribe: c, getState: u, replaceReducer: function(d) {
1823
1826
  if (typeof d !== ae)
1824
- throw new Error("next reducer" + Ge);
1827
+ throw new Error("next reducer" + Be);
1825
1828
  i = d, p({ type: "@@redux/INIT" });
1826
- } })[dn] = function() {
1829
+ } })[ln] = function() {
1827
1830
  var d, b = c;
1828
1831
  return (d = { subscribe: function(S) {
1829
1832
  if (typeof S != "object")
@@ -1832,12 +1835,12 @@ function fr(t, e, n) {
1832
1835
  S.next && S.next(u());
1833
1836
  }
1834
1837
  return w(), { unsubscribe: b(w) };
1835
- } })[dn] = function() {
1838
+ } })[ln] = function() {
1836
1839
  return this;
1837
1840
  }, d;
1838
1841
  }, r;
1839
1842
  }
1840
- function Hi(t, e) {
1843
+ function Fi(t, e) {
1841
1844
  var n = e && e.type;
1842
1845
  return "action " + (n && n.toString() || "?") + "reducer " + t + " returns " + re;
1843
1846
  }
@@ -1851,7 +1854,7 @@ function Ae() {
1851
1854
  };
1852
1855
  });
1853
1856
  }
1854
- function Ji() {
1857
+ function Hi() {
1855
1858
  var t = arguments;
1856
1859
  return function(e) {
1857
1860
  return function(n, r, i) {
@@ -1864,14 +1867,14 @@ function Ji() {
1864
1867
  };
1865
1868
  };
1866
1869
  }
1867
- var ce = ve + "anon_id", ye = ve + "user_id", Pe = ve + "user_traits", oe = "userId", Ee = "anonymousId", nt = ["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 = nt.reduce(function(t, e) {
1870
+ var ce = ve + "anon_id", ye = ve + "user_id", Pe = ve + "user_traits", oe = "userId", Ee = "anonymousId", rt = ["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"], Ct = ["name", "EVENTS", "config", "loaded"], x = rt.reduce(function(t, e) {
1868
1871
  return t[e] = e, t;
1869
1872
  }, { registerPluginType: function(t) {
1870
1873
  return "registerPlugin:" + t;
1871
1874
  }, pluginReadyType: function(t) {
1872
1875
  return "ready:" + t;
1873
- } }), hn = /^utm_/, fn = /^an_prop_/, pn = /^an_trait_/;
1874
- function Xi(t) {
1876
+ } }), dn = /^utm_/, hn = /^an_prop_/, fn = /^an_trait_/;
1877
+ function Ji(t) {
1875
1878
  var e = t.storage.setItem;
1876
1879
  return function(n) {
1877
1880
  return function(r) {
@@ -1882,11 +1885,11 @@ function Xi(t) {
1882
1885
  var u = Object.keys(i.params);
1883
1886
  if (u.length) {
1884
1887
  var c = o.an_uid, p = o.an_event, d = u.reduce(function(b, S) {
1885
- if (S.match(hn) || S.match(/^(d|g)clid/)) {
1886
- var w = S.replace(hn, "");
1888
+ if (S.match(dn) || S.match(/^(d|g)clid/)) {
1889
+ var w = S.replace(dn, "");
1887
1890
  b.campaign[w === "campaign" ? "name" : w] = o[S];
1888
1891
  }
1889
- return S.match(fn) && (b.props[S.replace(fn, "")] = o[S]), S.match(pn) && (b.traits[S.replace(pn, "")] = o[S]), b;
1892
+ return S.match(hn) && (b.props[S.replace(hn, "")] = o[S]), S.match(fn) && (b.traits[S.replace(fn, "")] = o[S]), b;
1890
1893
  }, { campaign: {}, props: {}, traits: {} });
1891
1894
  n.dispatch(A({ type: x.params, raw: o }, d, c ? { userId: c } : {})), c && setTimeout(function() {
1892
1895
  return t.identify(c, d.traits);
@@ -1900,7 +1903,7 @@ function Xi(t) {
1900
1903
  };
1901
1904
  };
1902
1905
  }
1903
- function Vi(t) {
1906
+ function Xi(t) {
1904
1907
  return function(e, n) {
1905
1908
  if (e === void 0 && (e = {}), n === void 0 && (n = {}), n.type === x.setItemEnd) {
1906
1909
  if (n.key === ce)
@@ -1920,13 +1923,13 @@ function Vi(t) {
1920
1923
  }
1921
1924
  };
1922
1925
  }
1923
- function mn(t) {
1926
+ function pn(t) {
1924
1927
  return { userId: t.getItem(ye), anonymousId: t.getItem(ce), traits: t.getItem(Pe) };
1925
1928
  }
1926
- var Ct = function(t) {
1929
+ var xt = function(t) {
1927
1930
  return ve + "TEMP" + ve + t;
1928
1931
  };
1929
- function Yi(t) {
1932
+ function Vi(t) {
1930
1933
  var e = t.storage, n = e.setItem, r = e.removeItem, i = e.getItem;
1931
1934
  return function(o) {
1932
1935
  return function(a) {
@@ -1935,9 +1938,9 @@ function Yi(t) {
1935
1938
  if (s.type === x.reset && ([ye, Pe, ce].forEach(function(d) {
1936
1939
  r(d);
1937
1940
  }), [oe, Ee, "traits"].forEach(function(d) {
1938
- $e(Ct(d));
1941
+ $e(xt(d));
1939
1942
  })), s.type === x.identify) {
1940
- i(ce) || n(ce, ut());
1943
+ i(ce) || n(ce, lt());
1941
1944
  var c = i(ye), p = i(Pe) || {};
1942
1945
  c && c !== h && o.dispatch({ type: x.userIdChanged, old: { userId: c, traits: p }, new: { userId: h, traits: f }, options: u }), h && n(ye, h), f && n(Pe, A({}, p, f));
1943
1946
  }
@@ -1947,7 +1950,7 @@ function Yi(t) {
1947
1950
  };
1948
1951
  }
1949
1952
  var ze = {};
1950
- function gn(t, e) {
1953
+ function mn(t, e) {
1951
1954
  ze[t] && V(ze[t]) && (ze[t](e), delete ze[t]);
1952
1955
  }
1953
1956
  function pr(t, e, n) {
@@ -1959,7 +1962,7 @@ function pr(t, e, n) {
1959
1962
  });
1960
1963
  });
1961
1964
  }
1962
- function Gi(t) {
1965
+ function Yi(t) {
1963
1966
  return { abort: t };
1964
1967
  }
1965
1968
  function mr(t, e, n) {
@@ -1977,7 +1980,7 @@ function mr(t, e, n) {
1977
1980
  return l.hasOwnProperty(O) && k[O] && k[O] !== l[O] && (T[O] = k[O]), T;
1978
1981
  }, l);
1979
1982
  }(p.payload, h), _ = r[P.meta.rid];
1980
- if (!_ && (w = S({ payload: P, config: a[d].config, instance: n, abort: Gi })) && X(w) && w.abort)
1983
+ if (!_ && (w = S({ payload: P, config: a[d].config, instance: n, abort: Yi })) && X(w) && w.abort)
1981
1984
  return void (r[P.meta.rid] = !0);
1982
1985
  if (!_) {
1983
1986
  var v = b + ":" + d;
@@ -1992,7 +1995,7 @@ function mr(t, e, n) {
1992
1995
  }
1993
1996
  }
1994
1997
  }
1995
- var yt = function(t) {
1998
+ var vt = function(t) {
1996
1999
  var e = t.data, n = t.action, r = t.instance, i = t.state, o = t.allPlugins, a = t.allMatches, s = t.store, h = t.EVENTS;
1997
2000
  try {
1998
2001
  var f = i.plugins, u = i.context, c = n.type, p = c.match(Te), d = e.exact.map(function(w) {
@@ -2017,7 +2020,7 @@ var yt = function(t) {
2017
2020
  throw new Error(R.type + " action not cancellable. Remove abort in " + z);
2018
2021
  };
2019
2022
  }(_, O);
2020
- return { payload: Bi(_), instance: w, config: k || {}, abort: C };
2023
+ return { payload: Gi(_), instance: w, config: k || {}, abort: C };
2021
2024
  };
2022
2025
  }(r, d), S = e.exact.reduce(function(w, P) {
2023
2026
  var _ = P.pluginName, v = P.methodName, l = !1;
@@ -2036,15 +2039,15 @@ var yt = function(t) {
2036
2039
  try {
2037
2040
  return Promise.resolve(O).then(function(z) {
2038
2041
  return C.method && V(C.method) ? (function(M, j) {
2039
- var W = Sn(M);
2042
+ var W = In(M);
2040
2043
  if (W && W.name === j) {
2041
- var J = Sn(W.method);
2044
+ var J = In(W.method);
2042
2045
  throw new Error([j + " plugin is calling method " + M, "Plugins cant call self", "Use " + W.method + " " + (J ? "or " + J.method : "") + " in " + j + " plugin insteadof " + M].join(`
2043
2046
  `));
2044
2047
  }
2045
2048
  }(C.methodName, C.pluginName), Promise.resolve(C.method({ payload: z, instance: r, abort: (K = z, $ = v, L = C.pluginName, function(M, j) {
2046
2049
  return A({}, K, { abort: { reason: M, plugins: j || [$], caller: c, from: L || $ } });
2047
- }), config: wn(C.pluginName, f, o), plugins: f })).then(function(M) {
2050
+ }), config: vn(C.pluginName, f, o), plugins: f })).then(function(M) {
2048
2051
  var j = X(M) ? M : {};
2049
2052
  return Promise.resolve(A({}, z, j));
2050
2053
  })) : z;
@@ -2069,20 +2072,20 @@ var yt = function(t) {
2069
2072
  var l = e.exact.length === v + 1, k = _.pluginName, T = o[k];
2070
2073
  return Promise.resolve(P).then(function(O) {
2071
2074
  var C = w[k] ? w[k] : {};
2072
- if (p && (C = O), wt(C, k))
2073
- return vt({ data: C, method: c, instance: r, pluginName: k, store: s }), Promise.resolve(O);
2074
- if (wt(O, k))
2075
- return l && vt({ data: O, method: c, instance: r, store: s }), Promise.resolve(O);
2075
+ if (p && (C = O), bt(C, k))
2076
+ return wt({ data: C, method: c, instance: r, pluginName: k, store: s }), Promise.resolve(O);
2077
+ if (bt(O, k))
2078
+ return l && wt({ data: O, method: c, instance: r, store: s }), Promise.resolve(O);
2076
2079
  if (S.hasOwnProperty(k) && S[k] === !0)
2077
2080
  return s.dispatch({ type: "queue", plugin: k, payload: C, _: { called: "queue", from: "queueMechanism" } }), Promise.resolve(O);
2078
2081
  var R = b(w[k], o[k]);
2079
- return Promise.resolve(T[c]({ abort: R.abort, payload: C, instance: r, config: wn(k, f, o), plugins: f })).then(function(z) {
2082
+ return Promise.resolve(T[c]({ abort: R.abort, payload: C, instance: r, config: vn(k, f, o), plugins: f })).then(function(z) {
2080
2083
  var K = X(z) ? z : {}, $ = A({}, O, K), L = w[k];
2081
- if (wt(L, k))
2082
- vt({ data: L, method: c, instance: r, pluginName: k, store: s });
2084
+ if (bt(L, k))
2085
+ wt({ data: L, method: c, instance: r, pluginName: k, store: s });
2083
2086
  else {
2084
2087
  var M = c + ":" + k;
2085
- (M.match(/:/g) || []).length < 2 && !c.match(yn) && !c.match(vn) && r.dispatch(A({}, p ? $ : C, { type: M, _: { called: M, from: "submethod" } }));
2088
+ (M.match(/:/g) || []).length < 2 && !c.match(gn) && !c.match(yn) && r.dispatch(A({}, p ? $ : C, { type: M, _: { called: M, from: "submethod" } }));
2086
2089
  }
2087
2090
  return Promise.resolve($);
2088
2091
  });
@@ -2091,7 +2094,7 @@ var yt = function(t) {
2091
2094
  return Promise.reject(O);
2092
2095
  }
2093
2096
  }, Promise.resolve(n))).then(function(P) {
2094
- if (!(c.match(Te) || c.match(/^registerPlugin/) || c.match(vn) || c.match(yn) || c.match(/^params/) || c.match(/^userIdChanged/))) {
2097
+ if (!(c.match(Te) || c.match(/^registerPlugin/) || c.match(yn) || c.match(gn) || c.match(/^params/) || c.match(/^userIdChanged/))) {
2095
2098
  if (h.plugins.includes(c), P._ && P._.originalAction === c)
2096
2099
  return P;
2097
2100
  var _ = A({}, P, { _: { originalAction: P.type, called: P.type, from: "engineEnd" } });
@@ -2103,27 +2106,27 @@ var yt = function(t) {
2103
2106
  } catch (w) {
2104
2107
  return Promise.reject(w);
2105
2108
  }
2106
- }, Te = /Start$/, yn = /^bootstrap/, vn = /^ready/;
2107
- function vt(t) {
2109
+ }, Te = /Start$/, gn = /^bootstrap/, yn = /^ready/;
2110
+ function wt(t) {
2108
2111
  var e = t.pluginName, n = t.method + "Aborted" + (e ? ":" + e : "");
2109
2112
  t.store.dispatch(A({}, t.data, { type: n, _: { called: n, from: "abort" } }));
2110
2113
  }
2111
- function wn(t, e, n) {
2114
+ function vn(t, e, n) {
2112
2115
  var r = e[t] || n[t];
2113
2116
  return r && r.config ? r.config : {};
2114
2117
  }
2115
- function bn(t, e) {
2118
+ function wn(t, e) {
2116
2119
  return e.reduce(function(n, r) {
2117
2120
  return r[t] ? n.concat({ methodName: t, pluginName: r.name, method: r[t] }) : n;
2118
2121
  }, []);
2119
2122
  }
2120
- function kn(t, e) {
2123
+ function bn(t, e) {
2121
2124
  var n = t.replace(Te, ""), r = e ? ":" + e : "";
2122
2125
  return ["" + t + r, "" + n + r, n + "End" + r];
2123
2126
  }
2124
- function wt(t, e) {
2127
+ function bt(t, e) {
2125
2128
  var n = t.abort;
2126
- return !!n && (n === !0 || In(n, e) || n && In(n.plugins, e));
2129
+ return !!n && (n === !0 || kn(n, e) || n && kn(n.plugins, e));
2127
2130
  }
2128
2131
  function gr(t, e) {
2129
2132
  var n = t.abort;
@@ -2137,19 +2140,19 @@ function gr(t, e) {
2137
2140
  function We(t) {
2138
2141
  return Array.isArray(t);
2139
2142
  }
2140
- function In(t, e) {
2143
+ function kn(t, e) {
2141
2144
  return !(!t || !We(t)) && t.includes(e);
2142
2145
  }
2143
- function Sn(t) {
2146
+ function In(t) {
2144
2147
  var e = t.match(/(.*):(.*)/);
2145
2148
  return !!e && { method: e[1], name: e[2] };
2146
2149
  }
2147
- function Bi(t) {
2150
+ function Gi(t) {
2148
2151
  return Object.keys(t).reduce(function(e, n) {
2149
2152
  return n === "type" || (e[n] = X(t[n]) ? Object.assign({}, t[n]) : t[n]), e;
2150
2153
  }, {});
2151
2154
  }
2152
- function qi(t, e, n) {
2155
+ function Bi(t, e, n) {
2153
2156
  var r = {};
2154
2157
  return function(i) {
2155
2158
  return function(o) {
@@ -2161,7 +2164,7 @@ function qi(t, e, n) {
2161
2164
  if (a.abort)
2162
2165
  return Promise.resolve(o(a));
2163
2166
  if (f === x.enablePlugin && i.dispatch({ type: x.initializeStart, plugins: u, disabled: [], fromEnable: !0, meta: a.meta }), f === x.disablePlugin && setTimeout(function() {
2164
- return gn(a.meta.rid, { payload: a });
2167
+ return mn(a.meta.rid, { payload: a });
2165
2168
  }, 0), f === x.initializeEnd) {
2166
2169
  var p = e(), d = Object.keys(p), b = d.filter(function(l) {
2167
2170
  return u.includes(l);
@@ -2173,7 +2176,7 @@ function qi(t, e, n) {
2173
2176
  return k({ config: O });
2174
2177
  }, 1e4).then(function(C) {
2175
2178
  return r[T] || (i.dispatch({ type: x.pluginReadyType(T), name: T, events: Object.keys(l).filter(function(R) {
2176
- return !jt.includes(R);
2179
+ return !Ct.includes(R);
2177
2180
  }) }), r[T] = !0), S = S.concat(T), l;
2178
2181
  }).catch(function(C) {
2179
2182
  if (C instanceof Error)
@@ -2199,7 +2202,7 @@ function qi(t, e, n) {
2199
2202
  return Promise.resolve(l);
2200
2203
  var $ = T.getState(), L = (W = R, (J = $.plugins) === void 0 && (J = {}), (le = l.options) === void 0 && (le = {}), Object.keys(W).filter(function(m) {
2201
2204
  var y = le.plugins || {};
2202
- return Ai(y[m]) ? y[m] : y.all !== !1 && (!J[m] || J[m].enabled !== !1);
2205
+ return xi(y[m]) ? y[m] : y.all !== !1 && (!J[m] || J[m].enabled !== !1);
2203
2206
  }).map(function(m) {
2204
2207
  return W[m];
2205
2208
  }));
@@ -2212,22 +2215,22 @@ function qi(t, e, n) {
2212
2215
  var M = L.map(function(m) {
2213
2216
  return m.name;
2214
2217
  }), j = function(m, y, g) {
2215
- var I = kn(m).map(function(E) {
2216
- return bn(E, y);
2218
+ var I = bn(m).map(function(E) {
2219
+ return wn(E, y);
2217
2220
  });
2218
2221
  return y.reduce(function(E, U) {
2219
- var Z = U.name, N = kn(m, Z).map(function(Le) {
2220
- return bn(Le, y);
2222
+ var Z = U.name, N = bn(m, Z).map(function(Le) {
2223
+ return wn(Le, y);
2221
2224
  }), F = N[0], D = N[1], Q = N[2];
2222
2225
  return F.length && (E.beforeNS[Z] = F), D.length && (E.duringNS[Z] = D), Q.length && (E.afterNS[Z] = Q), E;
2223
2226
  }, { before: I[0], beforeNS: {}, during: I[1], duringNS: {}, after: I[2], afterNS: {} });
2224
2227
  }(z, L);
2225
- return Promise.resolve(yt({ action: l, data: { exact: j.before, namespaced: j.beforeNS }, state: $, allPlugins: R, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(m) {
2228
+ return Promise.resolve(vt({ action: l, data: { exact: j.before, namespaced: j.beforeNS }, state: $, allPlugins: R, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(m) {
2226
2229
  function y() {
2227
2230
  var E = function() {
2228
2231
  if (z.match(Te))
2229
- return Promise.resolve(yt({ action: A({}, g, { type: K + "End" }), data: { exact: j.after, namespaced: j.afterNS }, state: $, allPlugins: R, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(U) {
2230
- U.meta && U.meta.hasCallback && gn(U.meta.rid, { payload: U });
2232
+ return Promise.resolve(vt({ action: A({}, g, { type: K + "End" }), data: { exact: j.after, namespaced: j.afterNS }, state: $, allPlugins: R, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(U) {
2233
+ U.meta && U.meta.hasCallback && mn(U.meta.rid, { payload: U });
2231
2234
  });
2232
2235
  }();
2233
2236
  return E && E.then ? E.then(function() {
@@ -2238,7 +2241,7 @@ function qi(t, e, n) {
2238
2241
  return m;
2239
2242
  var g, I = function() {
2240
2243
  if (z !== K)
2241
- return Promise.resolve(yt({ action: A({}, m, { type: K }), data: { exact: j.during, namespaced: j.duringNS }, state: $, allPlugins: R, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(E) {
2244
+ return Promise.resolve(vt({ action: A({}, m, { type: K }), data: { exact: j.during, namespaced: j.duringNS }, state: $, allPlugins: R, allMatches: j, instance: T, store: O, EVENTS: C })).then(function(E) {
2242
2245
  g = E;
2243
2246
  });
2244
2247
  g = m;
@@ -2261,7 +2264,7 @@ function qi(t, e, n) {
2261
2264
  };
2262
2265
  };
2263
2266
  }
2264
- function Qi(t) {
2267
+ function qi(t) {
2265
2268
  return function(e) {
2266
2269
  return function(n) {
2267
2270
  return function(r) {
@@ -2276,7 +2279,7 @@ function Qi(t) {
2276
2279
  };
2277
2280
  };
2278
2281
  }
2279
- var eo = function() {
2282
+ var Qi = function() {
2280
2283
  var t = this;
2281
2284
  this.before = [], this.after = [], this.addMiddleware = function(e, n) {
2282
2285
  t[n] = t[n].concat(e);
@@ -2300,39 +2303,39 @@ var eo = function() {
2300
2303
  };
2301
2304
  };
2302
2305
  };
2303
- function to(t) {
2306
+ function eo(t) {
2304
2307
  return function(e, n) {
2305
2308
  e === void 0 && (e = {});
2306
2309
  var r = {};
2307
2310
  if (n.type === "initialize:aborted")
2308
2311
  return e;
2309
2312
  if (/^registerPlugin:([^:]*)$/.test(n.type)) {
2310
- var i = _n(n.type, "registerPlugin"), o = t()[i];
2313
+ var i = Sn(n.type, "registerPlugin"), o = t()[i];
2311
2314
  if (!o || !i)
2312
2315
  return e;
2313
2316
  var a = n.enabled, s = o.config;
2314
2317
  return r[i] = { enabled: a, initialized: !!a && !o.initialize, loaded: !!a && !!o.loaded({ config: s }), config: s }, A({}, e, r);
2315
2318
  }
2316
2319
  if (/^initialize:([^:]*)$/.test(n.type)) {
2317
- var h = _n(n.type, x.initialize), f = t()[h];
2320
+ var h = Sn(n.type, x.initialize), f = t()[h];
2318
2321
  return f && h ? (r[h] = A({}, e[h], { initialized: !0, loaded: !!f.loaded({ config: f.config }) }), A({}, e, r)) : e;
2319
2322
  }
2320
2323
  if (/^ready:([^:]*)$/.test(n.type))
2321
2324
  return r[n.name] = A({}, e[n.name], { loaded: !0 }), A({}, e, r);
2322
2325
  switch (n.type) {
2323
2326
  case x.disablePlugin:
2324
- return A({}, e, En(n.plugins, !1, e));
2327
+ return A({}, e, _n(n.plugins, !1, e));
2325
2328
  case x.enablePlugin:
2326
- return A({}, e, En(n.plugins, !0, e));
2329
+ return A({}, e, _n(n.plugins, !0, e));
2327
2330
  default:
2328
2331
  return e;
2329
2332
  }
2330
2333
  };
2331
2334
  }
2332
- function _n(t, e) {
2335
+ function Sn(t, e) {
2333
2336
  return t.substring(e.length + 1, t.length);
2334
2337
  }
2335
- function En(t, e, n) {
2338
+ function _n(t, e, n) {
2336
2339
  return t.reduce(function(r, i) {
2337
2340
  return r[i] = A({}, n[i], { enabled: e }), r;
2338
2341
  }, n);
@@ -2344,9 +2347,9 @@ function yr(t) {
2344
2347
  }
2345
2348
  return t;
2346
2349
  }
2347
- var no = { last: {}, history: [] };
2348
- function ro(t, e) {
2349
- t === void 0 && (t = no);
2350
+ var to = { last: {}, history: [] };
2351
+ function no(t, e) {
2352
+ t === void 0 && (t = to);
2350
2353
  var n = e.options, r = e.meta;
2351
2354
  if (e.type === x.track) {
2352
2355
  var i = yr(A({ event: e.event, properties: e.properties }, Object.keys(n).length && { options: n }, { meta: r }));
@@ -2354,9 +2357,9 @@ function ro(t, e) {
2354
2357
  }
2355
2358
  return t;
2356
2359
  }
2357
- var io = { actions: [] };
2358
- function oo(t, e) {
2359
- t === void 0 && (t = io);
2360
+ var ro = { actions: [] };
2361
+ function io(t, e) {
2362
+ t === void 0 && (t = ro);
2360
2363
  var n = e.payload;
2361
2364
  switch (e.type) {
2362
2365
  case "queue":
@@ -2369,11 +2372,11 @@ function oo(t, e) {
2369
2372
  }
2370
2373
  }
2371
2374
  var vr = /#.*$/;
2372
- function ao(t) {
2375
+ function oo(t) {
2373
2376
  var e = /(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(t);
2374
2377
  return "/" + (e && e[3] ? e[3].split("?")[0].replace(vr, "") : "");
2375
2378
  }
2376
- var wr, br, kr, Ir, so = function(t) {
2379
+ var wr, br, kr, Ir, ao = function(t) {
2377
2380
  if (t === void 0 && (t = {}), !H)
2378
2381
  return t;
2379
2382
  var e = document, n = e.title, r = e.referrer, i = window, o = i.location, a = i.innerWidth, s = i.innerHeight, h = o.hash, f = o.search, u = function(p) {
@@ -2385,11 +2388,11 @@ var wr, br, kr, Ir, so = function(t) {
2385
2388
  }
2386
2389
  }();
2387
2390
  return d ? d.match(/\?/) ? d : d + p : window.location.href.replace(vr, "");
2388
- }(f), c = { title: n, url: u, path: ao(u), hash: h, search: f, width: a, height: s };
2391
+ }(f), c = { title: n, url: u, path: oo(u), hash: h, search: f, width: a, height: s };
2389
2392
  return r && r !== "" && (c.referrer = r), A({}, c, t);
2390
- }, co = { last: {}, history: [] };
2391
- function uo(t, e) {
2392
- t === void 0 && (t = co);
2393
+ }, so = { last: {}, history: [] };
2394
+ function co(t, e) {
2395
+ t === void 0 && (t = so);
2393
2396
  var n = e.options;
2394
2397
  if (e.type === x.page) {
2395
2398
  var r = yr(A({ properties: e.properties, meta: e.meta }, Object.keys(n).length && { options: n }));
@@ -2402,10 +2405,10 @@ wr = function() {
2402
2405
  return !1;
2403
2406
  var t = navigator.appVersion;
2404
2407
  return ~t.indexOf("Win") ? "Windows" : ~t.indexOf("Mac") ? "MacOS" : ~t.indexOf("X11") ? "UNIX" : ~t.indexOf("Linux") ? "Linux" : "Unknown OS";
2405
- }(), br = H ? document.referrer : null, kr = Di(), Ir = Mi();
2406
- var Pn = { initialized: !1, sessionId: ut(), app: null, version: null, debug: !1, offline: !!H && !navigator.onLine, os: { name: wr }, userAgent: H ? navigator.userAgent : "node", library: { name: "analytics", version: "0.12.7" }, timezone: Ir, locale: kr, campaign: {}, referrer: br };
2407
- function lo(t, e) {
2408
- t === void 0 && (t = Pn);
2408
+ }(), br = H ? document.referrer : null, kr = zi(), Ir = Di();
2409
+ var En = { initialized: !1, sessionId: lt(), app: null, version: null, debug: !1, offline: !!H && !navigator.onLine, os: { name: wr }, userAgent: H ? navigator.userAgent : "node", library: { name: "analytics", version: "0.12.7" }, timezone: Ir, locale: kr, campaign: {}, referrer: br };
2410
+ function uo(t, e) {
2411
+ t === void 0 && (t = En);
2409
2412
  var n = t.initialized, r = e.campaign;
2410
2413
  switch (e.type) {
2411
2414
  case x.campaign:
@@ -2415,11 +2418,11 @@ function lo(t, e) {
2415
2418
  case x.online:
2416
2419
  return A({}, t, { offline: !1 });
2417
2420
  default:
2418
- return n ? t : A({}, Pn, t, { initialized: !0 });
2421
+ return n ? t : A({}, En, t, { initialized: !0 });
2419
2422
  }
2420
2423
  }
2421
- var ho = ["plugins", "reducers", "storage"];
2422
- function fo(t, e, n) {
2424
+ var lo = ["plugins", "reducers", "storage"];
2425
+ function ho(t, e, n) {
2423
2426
  if (H) {
2424
2427
  var r = window[(n ? "add" : "remove") + "EventListener"];
2425
2428
  t.split(" ").forEach(function(i) {
@@ -2427,8 +2430,8 @@ function fo(t, e, n) {
2427
2430
  });
2428
2431
  }
2429
2432
  }
2430
- function po(t) {
2431
- var e = fo.bind(null, "online offline", function(n) {
2433
+ function fo(t) {
2434
+ var e = ho.bind(null, "online offline", function(n) {
2432
2435
  return Promise.resolve(!navigator.onLine).then(t);
2433
2436
  });
2434
2437
  return e(!0), function(n) {
@@ -2445,17 +2448,17 @@ function Sr() {
2445
2448
  };
2446
2449
  };
2447
2450
  }
2448
- function Tn(t) {
2451
+ function Pn(t) {
2449
2452
  return function() {
2450
2453
  return Ae(Ae.apply(null, arguments), Sr());
2451
2454
  };
2452
2455
  }
2453
- function bt(t) {
2456
+ function kt(t) {
2454
2457
  return t ? dr(t) ? t : [t] : [];
2455
2458
  }
2456
- function On(t, e, n) {
2459
+ function Tn(t, e, n) {
2457
2460
  t === void 0 && (t = {});
2458
- var r, i, o = ut();
2461
+ var r, i, o = lt();
2459
2462
  return e && (ze[o] = (r = e, i = function(a) {
2460
2463
  for (var s, h = a || Array.prototype.slice.call(arguments), f = 0; f < h.length; f++)
2461
2464
  if (V(h[f])) {
@@ -2467,7 +2470,7 @@ function On(t, e, n) {
2467
2470
  i && i(a), r(a);
2468
2471
  })), A({}, t, { rid: o, ts: (/* @__PURE__ */ new Date()).getTime() }, e ? { hasCallback: !0 } : {});
2469
2472
  }
2470
- function mo(t) {
2473
+ function po(t) {
2471
2474
  t === void 0 && (t = {});
2472
2475
  var e = t.reducers || {}, n = t.initialUser || {}, r = (t.plugins || []).reduce(function(m, y) {
2473
2476
  if (V(y))
@@ -2494,30 +2497,30 @@ function mo(t) {
2494
2497
  }), m;
2495
2498
  }, { plugins: {}, pluginEnabled: {}, methods: {}, pluginsArray: [], middlewares: [], events: [] }), i = t.storage ? t.storage : { getItem: we, setItem: be, removeItem: $e }, o = /* @__PURE__ */ function(m) {
2496
2499
  return function(y, g, I) {
2497
- return g.getState("user")[y] || (I && X(I) && I[y] ? I[y] : mn(m)[y] || we(Ct(y)) || null);
2500
+ return g.getState("user")[y] || (I && X(I) && I[y] ? I[y] : pn(m)[y] || we(xt(y)) || null);
2498
2501
  };
2499
2502
  }(i), a = r.plugins, s = r.events.filter(function(m) {
2500
- return !jt.includes(m);
2501
- }).sort(), h = new Set(s.concat(nt).filter(function(m) {
2502
- return !jt.includes(m);
2503
+ return !Ct.includes(m);
2504
+ }).sort(), h = new Set(s.concat(rt).filter(function(m) {
2505
+ return !Ct.includes(m);
2503
2506
  })), f = Array.from(h).sort(), u = function() {
2504
2507
  return a;
2505
- }, c = new eo(), p = c.addMiddleware, d = c.removeMiddleware, b = c.dynamicMiddlewares, S = function() {
2508
+ }, c = new Qi(), p = c.addMiddleware, d = c.removeMiddleware, b = c.dynamicMiddlewares, S = function() {
2506
2509
  throw new Error("Abort disabled inListener");
2507
- }, w = Zi(), P = mn(i), _ = A({}, P, n, w.an_uid ? { userId: w.an_uid } : {}, w.an_aid ? { anonymousId: w.an_aid } : {});
2508
- _.anonymousId || (_.anonymousId = ut());
2510
+ }, w = Mi(), P = pn(i), _ = A({}, P, n, w.an_uid ? { userId: w.an_uid } : {}, w.an_aid ? { anonymousId: w.an_aid } : {});
2511
+ _.anonymousId || (_.anonymousId = lt());
2509
2512
  var v = A({ enable: function(m, y) {
2510
2513
  return new Promise(function(g) {
2511
- j.dispatch({ type: x.enablePlugin, plugins: bt(m), _: { originalAction: x.enablePlugin } }, g, [y]);
2514
+ j.dispatch({ type: x.enablePlugin, plugins: kt(m), _: { originalAction: x.enablePlugin } }, g, [y]);
2512
2515
  });
2513
2516
  }, disable: function(m, y) {
2514
2517
  return new Promise(function(g) {
2515
- j.dispatch({ type: x.disablePlugin, plugins: bt(m), _: { originalAction: x.disablePlugin } }, g, [y]);
2518
+ j.dispatch({ type: x.disablePlugin, plugins: kt(m), _: { originalAction: x.disablePlugin } }, g, [y]);
2516
2519
  });
2517
2520
  } }, r.methods), l = !1, k = { identify: function(m, y, g, I) {
2518
2521
  try {
2519
2522
  var E = se(m) ? m : null, U = X(m) ? m : y, Z = g || {}, N = k.user();
2520
- be(Ct(oe), E);
2523
+ be(xt(oe), E);
2521
2524
  var F = E || U.userId || o(oe, k, U);
2522
2525
  return Promise.resolve(new Promise(function(D) {
2523
2526
  j.dispatch(A({ type: x.identifyStart, userId: F, traits: U || {}, options: Z, anonymousId: N.anonymousId }, N.id && N.id !== E && { previousId: N.id }), D, [y, g, I]);
@@ -2541,7 +2544,7 @@ function mo(t) {
2541
2544
  try {
2542
2545
  var I = X(m) ? m : {}, E = X(y) ? y : {};
2543
2546
  return Promise.resolve(new Promise(function(U) {
2544
- j.dispatch({ type: x.pageStart, properties: so(I), options: E, userId: o(oe, k, I), anonymousId: o(Ee, k, I) }, U, [m, y, g]);
2547
+ j.dispatch({ type: x.pageStart, properties: ao(I), options: E, userId: o(oe, k, I), anonymousId: o(Ee, k, I) }, U, [m, y, g]);
2545
2548
  }));
2546
2549
  } catch (U) {
2547
2550
  return Promise.reject(U);
@@ -2552,7 +2555,7 @@ function mo(t) {
2552
2555
  if (m === Ee || m === "anonId")
2553
2556
  return o(Ee, k);
2554
2557
  var y = k.getState("user");
2555
- return m ? cn(y, m) : y;
2558
+ return m ? sn(y, m) : y;
2556
2559
  }, reset: function(m) {
2557
2560
  return new Promise(function(y) {
2558
2561
  j.dispatch({ type: x.resetStart }, y, m);
@@ -2581,11 +2584,11 @@ function mo(t) {
2581
2584
  };
2582
2585
  };
2583
2586
  };
2584
- return p(I, Be), p(E, qe), function() {
2585
- d(I, Be), d(E, qe);
2587
+ return p(I, qe), p(E, Qe), function() {
2588
+ d(I, qe), d(E, Qe);
2586
2589
  };
2587
2590
  }
2588
- var U = m.match(g) ? Be : qe, Z = function(N) {
2591
+ var U = m.match(g) ? qe : Qe, Z = function(N) {
2589
2592
  return function(F) {
2590
2593
  return function(D) {
2591
2594
  return D.type === m && y({ payload: D, instance: k, plugins: a, abort: S }), F(D);
@@ -2606,10 +2609,10 @@ function mo(t) {
2606
2609
  return g;
2607
2610
  }, getState: function(m) {
2608
2611
  var y = j.getState();
2609
- return m ? cn(y, m) : Object.assign({}, y);
2612
+ return m ? sn(y, m) : Object.assign({}, y);
2610
2613
  }, dispatch: function(m) {
2611
2614
  var y = se(m) ? { type: m } : m;
2612
- if (nt.includes(y.type))
2615
+ if (rt.includes(y.type))
2613
2616
  throw new Error("reserved action " + y.type);
2614
2617
  var g = A({}, y, { _: A({ originalAction: y.type }, m._ || {}) });
2615
2618
  j.dispatch(g);
@@ -2619,22 +2622,22 @@ function mo(t) {
2619
2622
  j.dispatch({ type: x.removeItemStart, key: m, options: y });
2620
2623
  } }, setAnonymousId: function(m, y) {
2621
2624
  k.storage.setItem(ce, m, y);
2622
- }, events: { core: nt, plugins: s } }, T = r.middlewares.concat([function(m) {
2625
+ }, events: { core: rt, plugins: s } }, T = r.middlewares.concat([function(m) {
2623
2626
  return function(y) {
2624
2627
  return function(g) {
2625
- return g.meta || (g.meta = On()), y(g);
2628
+ return g.meta || (g.meta = Tn()), y(g);
2626
2629
  };
2627
2630
  };
2628
- }, b(Be), qi(k, u, { all: f, plugins: s }), Qi(i), Xi(k), Yi(k), b(qe)]), O = { context: lo, user: Vi(i), page: uo, track: ro, plugins: to(u), queue: oo }, C = Ae, R = Ae;
2631
+ }, b(qe), Bi(k, u, { all: f, plugins: s }), qi(i), Ji(k), Vi(k), b(Qe)]), O = { context: uo, user: Xi(i), page: co, track: no, plugins: eo(u), queue: io }, C = Ae, R = Ae;
2629
2632
  if (H && t.debug) {
2630
2633
  var z = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
2631
2634
  z && (C = z({ trace: !0, traceLimit: 25 })), R = function() {
2632
- return arguments.length === 0 ? Sr() : X(typeof arguments[0]) ? Tn() : Tn().apply(null, arguments);
2635
+ return arguments.length === 0 ? Sr() : X(typeof arguments[0]) ? Pn() : Pn().apply(null, arguments);
2633
2636
  };
2634
2637
  }
2635
2638
  var K, $ = function(m) {
2636
2639
  return Object.keys(m).reduce(function(y, g) {
2637
- return ho.includes(g) || (y[g] = m[g]), y;
2640
+ return lo.includes(g) || (y[g] = m[g]), y;
2638
2641
  }, {});
2639
2642
  }(t), L = r.pluginsArray.reduce(function(m, y) {
2640
2643
  var g = y.name, I = y.config, E = y.loaded, U = r.pluginEnabled[g];
@@ -2649,7 +2652,7 @@ function mo(t) {
2649
2652
  (function(N) {
2650
2653
  Object.keys(N).forEach(function(F) {
2651
2654
  var D = N[F];
2652
- if (typeof D(void 0, { type: "@@redux/INIT" }) === re || typeof D(void 0, { type: Fi }) === re)
2655
+ if (typeof D(void 0, { type: "@@redux/INIT" }) === re || typeof D(void 0, { type: Wi }) === re)
2653
2656
  throw new Error("reducer " + F + " " + re);
2654
2657
  });
2655
2658
  })(g);
@@ -2660,18 +2663,18 @@ function mo(t) {
2660
2663
  if (N === void 0 && (N = {}), U)
2661
2664
  throw U;
2662
2665
  for (var D = !1, Q = {}, Le = 0; Le < Z.length; Le++) {
2663
- var He = Z[Le], Vt = N[He], ht = (0, g[He])(Vt, F);
2664
- if (typeof ht === re) {
2665
- var Nr = Hi(He, F);
2666
+ var Je = Z[Le], Xt = N[Je], ft = (0, g[Je])(Xt, F);
2667
+ if (typeof ft === re) {
2668
+ var Nr = Fi(Je, F);
2666
2669
  throw new Error(Nr);
2667
2670
  }
2668
- Q[He] = ht, D = D || ht !== Vt;
2671
+ Q[Je] = ft, D = D || ft !== Xt;
2669
2672
  }
2670
2673
  return D ? Q : N;
2671
2674
  };
2672
- }(A({}, O, e)), M, R(C(Ji.apply(void 0, T))));
2675
+ }(A({}, O, e)), M, R(C(Hi.apply(void 0, T))));
2673
2676
  j.dispatch = (K = j.dispatch, function(m, y, g) {
2674
- var I = A({}, m, { meta: On(m.meta, y, bt(g)) });
2677
+ var I = A({}, m, { meta: Tn(m.meta, y, kt(g)) });
2675
2678
  return K.apply(null, [I]);
2676
2679
  });
2677
2680
  var W = Object.keys(a);
@@ -2684,7 +2687,7 @@ function mo(t) {
2684
2687
  return j.dispatch({ type: x.registerPlugins, plugins: W, enabled: r.pluginEnabled }), r.pluginsArray.map(function(m, y) {
2685
2688
  var g = m.bootstrap, I = m.config, E = m.name;
2686
2689
  g && V(g) && g({ instance: k, config: I, payload: m }), j.dispatch({ type: x.registerPluginType(E), name: E, enabled: r.pluginEnabled[E], plugin: m }), r.pluginsArray.length === y + 1 && j.dispatch({ type: x.initializeStart, plugins: J, disabled: le });
2687
- }), po(function(m) {
2690
+ }), fo(function(m) {
2688
2691
  j.dispatch({ type: m ? x.offline : x.online });
2689
2692
  }), function(m, y, g) {
2690
2693
  setInterval(function() {
@@ -2692,32 +2695,32 @@ function mo(t) {
2692
2695
  }, 3e3);
2693
2696
  }(j, u, k), k;
2694
2697
  }
2695
- var Be = "before", qe = "after", Me = "cookie", fe = Pr(), _r = lt, go = lt;
2698
+ var qe = "before", Qe = "after", Me = "cookie", fe = Pr(), _r = dt, mo = dt;
2696
2699
  function Er(t) {
2697
- return fe ? lt(t, "", -1) : $e(t);
2700
+ return fe ? dt(t, "", -1) : $e(t);
2698
2701
  }
2699
2702
  function Pr() {
2700
2703
  if (fe !== void 0)
2701
2704
  return fe;
2702
2705
  var t = "cookiecookie";
2703
2706
  try {
2704
- lt(t, t), fe = document.cookie.indexOf(t) !== -1, Er(t);
2707
+ dt(t, t), fe = document.cookie.indexOf(t) !== -1, Er(t);
2705
2708
  } catch {
2706
2709
  fe = !1;
2707
2710
  }
2708
2711
  return fe;
2709
2712
  }
2710
- function lt(t, e, n, r, i, o) {
2713
+ function dt(t, e, n, r, i, o) {
2711
2714
  if (typeof window < "u") {
2712
2715
  var a = arguments.length > 1;
2713
2716
  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]);
2714
2717
  }
2715
2718
  }
2716
- var Ze = "localStorage", yo = Zt.bind(null, "localStorage");
2719
+ var Ze = "localStorage", go = Mt.bind(null, "localStorage");
2717
2720
  Ue("localStorage", "getItem", we);
2718
2721
  Ue("localStorage", "setItem", be);
2719
2722
  Ue("localStorage", "removeItem", $e);
2720
- var Ke = "sessionStorage", vo = Zt.bind(null, "sessionStorage");
2723
+ var Ke = "sessionStorage", yo = Mt.bind(null, "sessionStorage");
2721
2724
  Ue("sessionStorage", "getItem", we);
2722
2725
  Ue("sessionStorage", "setItem", be);
2723
2726
  Ue("sessionStorage", "removeItem", $e);
@@ -2736,57 +2739,57 @@ function Oe(t) {
2736
2739
  if (e !== null && e !== "")
2737
2740
  return e;
2738
2741
  }
2739
- var wo = yo(), bo = vo(), ko = Pr();
2742
+ var vo = go(), wo = yo(), bo = Pr();
2740
2743
  function Tr(t, e) {
2741
2744
  if (t) {
2742
- var n = Kt(e), r = !Jt(n), i = Wt(n) ? Oe(localStorage.getItem(t)) : void 0;
2745
+ var n = Zt(e), r = !Ht(n), i = Kt(n) ? Oe(localStorage.getItem(t)) : void 0;
2743
2746
  if (r && !_e(i))
2744
2747
  return i;
2745
- var o = Ft(n) ? Oe(_r(t)) : void 0;
2748
+ var o = Wt(n) ? Oe(_r(t)) : void 0;
2746
2749
  if (r && o)
2747
2750
  return o;
2748
- var a = Ht(n) ? Oe(sessionStorage.getItem(t)) : void 0;
2751
+ var a = Ft(n) ? Oe(sessionStorage.getItem(t)) : void 0;
2749
2752
  if (r && a)
2750
2753
  return a;
2751
2754
  var s = we(t);
2752
2755
  return r ? s : { localStorage: i, sessionStorage: a, cookie: o, global: s };
2753
2756
  }
2754
2757
  }
2755
- function Io(t, e, n) {
2758
+ function ko(t, e, n) {
2756
2759
  if (t && !_e(e)) {
2757
- var r = {}, i = Kt(n), o = JSON.stringify(e), a = !Jt(i);
2758
- return Wt(i) && (r[Ze] = Qe(Ze, e, Oe(localStorage.getItem(t))), localStorage.setItem(t, o), a) ? r[Ze] : Ft(i) && (r[Me] = Qe(Me, e, Oe(_r(t))), go(t, o), a) ? r[Me] : Ht(i) && (r[Ke] = Qe(Ke, e, Oe(sessionStorage.getItem(t))), sessionStorage.setItem(t, o), a) ? r[Ke] : (r[De] = Qe(De, e, we(t)), be(t, e), a ? r[De] : r);
2760
+ var r = {}, i = Zt(n), o = JSON.stringify(e), a = !Ht(i);
2761
+ return Kt(i) && (r[Ze] = et(Ze, e, Oe(localStorage.getItem(t))), localStorage.setItem(t, o), a) ? r[Ze] : Wt(i) && (r[Me] = et(Me, e, Oe(_r(t))), mo(t, o), a) ? r[Me] : Ft(i) && (r[Ke] = et(Ke, e, Oe(sessionStorage.getItem(t))), sessionStorage.setItem(t, o), a) ? r[Ke] : (r[De] = et(De, e, we(t)), be(t, e), a ? r[De] : r);
2759
2762
  }
2760
2763
  }
2761
- function So(t, e) {
2764
+ function Io(t, e) {
2762
2765
  if (t) {
2763
- var n = Kt(e), r = Tr(t, cr), i = {};
2764
- return !_e(r.localStorage) && Wt(n) && (localStorage.removeItem(t), i[Ze] = r.localStorage), !_e(r.cookie) && Ft(n) && (Er(t), i[Me] = r.cookie), !_e(r.sessionStorage) && Ht(n) && (sessionStorage.removeItem(t), i[Ke] = r.sessionStorage), !_e(r.global) && dt(n, De) && ($e(t), i[De] = r.global), i;
2766
+ var n = Zt(e), r = Tr(t, cr), i = {};
2767
+ return !_e(r.localStorage) && Kt(n) && (localStorage.removeItem(t), i[Ze] = r.localStorage), !_e(r.cookie) && Wt(n) && (Er(t), i[Me] = r.cookie), !_e(r.sessionStorage) && Ft(n) && (sessionStorage.removeItem(t), i[Ke] = r.sessionStorage), !_e(r.global) && ht(n, De) && ($e(t), i[De] = r.global), i;
2765
2768
  }
2766
2769
  }
2767
- function Kt(t) {
2770
+ function Zt(t) {
2768
2771
  return t ? se(t) ? t : t.storage : sr;
2769
2772
  }
2773
+ function Kt(t) {
2774
+ return vo && ht(t, Ze);
2775
+ }
2770
2776
  function Wt(t) {
2771
- return wo && dt(t, Ze);
2777
+ return bo && ht(t, Me);
2772
2778
  }
2773
2779
  function Ft(t) {
2774
- return ko && dt(t, Me);
2780
+ return wo && ht(t, Ke);
2775
2781
  }
2776
2782
  function Ht(t) {
2777
- return bo && dt(t, Ke);
2778
- }
2779
- function Jt(t) {
2780
2783
  return t === cr || t === "all";
2781
2784
  }
2782
- function dt(t, e) {
2783
- return t === sr || t === e || Jt(t);
2785
+ function ht(t, e) {
2786
+ return t === sr || t === e || Ht(t);
2784
2787
  }
2785
- function Qe(t, e, n) {
2788
+ function et(t, e, n) {
2786
2789
  return { location: t, current: e, previous: n };
2787
2790
  }
2788
- var _o = { setItem: Io, getItem: Tr, removeItem: So };
2789
- function Eo(t, e, n) {
2791
+ var So = { setItem: ko, getItem: Tr, removeItem: Io };
2792
+ function _o(t, e, n) {
2790
2793
  return e in t ? Object.defineProperty(t, e, {
2791
2794
  value: n,
2792
2795
  enumerable: !0,
@@ -2794,7 +2797,7 @@ function Eo(t, e, n) {
2794
2797
  writable: !0
2795
2798
  }) : t[e] = n, t;
2796
2799
  }
2797
- function jn(t, e) {
2800
+ function On(t, e) {
2798
2801
  var n = Object.keys(t);
2799
2802
  if (Object.getOwnPropertySymbols) {
2800
2803
  var r = Object.getOwnPropertySymbols(t);
@@ -2804,24 +2807,24 @@ function jn(t, e) {
2804
2807
  }
2805
2808
  return n;
2806
2809
  }
2807
- function Cn(t) {
2810
+ function jn(t) {
2808
2811
  for (var e = 1; e < arguments.length; e++) {
2809
2812
  var n = arguments[e] != null ? arguments[e] : {};
2810
- e % 2 ? jn(Object(n), !0).forEach(function(r) {
2811
- Eo(t, r, n[r]);
2812
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : jn(Object(n)).forEach(function(r) {
2813
+ e % 2 ? On(Object(n), !0).forEach(function(r) {
2814
+ _o(t, r, n[r]);
2815
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : On(Object(n)).forEach(function(r) {
2813
2816
  Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
2814
2817
  });
2815
2818
  }
2816
2819
  return t;
2817
2820
  }
2818
- function Po() {
2821
+ function Eo() {
2819
2822
  var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = {
2820
- storage: _o
2823
+ storage: So
2821
2824
  };
2822
- return mo(Cn(Cn({}, e), t));
2825
+ return po(jn(jn({}, e), t));
2823
2826
  }
2824
- function To(t, e) {
2827
+ function Po(t, e) {
2825
2828
  e = e || {};
2826
2829
  var n, r, i = [], o = e.max || 1 / 0;
2827
2830
  function a() {
@@ -2843,7 +2846,7 @@ function To(t, e) {
2843
2846
  }
2844
2847
  };
2845
2848
  }
2846
- function Oo(t) {
2849
+ function To(t) {
2847
2850
  if (typeof window > "u")
2848
2851
  return;
2849
2852
  const { addEventListener: e, history: n, location: r } = window;
@@ -2855,37 +2858,37 @@ function Oo(t) {
2855
2858
  const s = n[a];
2856
2859
  n[a] = function(...h) {
2857
2860
  var c;
2858
- const f = ((c = h[2]) == null ? void 0 : c.toString()) || "", u = Co(f);
2861
+ const f = ((c = h[2]) == null ? void 0 : c.toString()) || "", u = jo(f);
2859
2862
  return i !== u && (i = u, setTimeout(() => t(f), 0)), s.apply(n, h);
2860
2863
  };
2861
2864
  });
2862
2865
  }
2863
- function jo(t, e) {
2866
+ function Oo(t, e) {
2864
2867
  const n = t.indexOf(e);
2865
2868
  return n > -1 ? t.slice(0, n) : t;
2866
2869
  }
2867
- function Co(t) {
2868
- return ["#", "?"].forEach((e) => t = jo(t, e)), t;
2870
+ function jo(t) {
2871
+ return ["#", "?"].forEach((e) => t = Oo(t, e)), t;
2869
2872
  }
2870
- function xo() {
2871
- Oo(() => {
2873
+ function Co() {
2874
+ To(() => {
2872
2875
  ne.page();
2873
2876
  });
2874
2877
  }
2875
- function Ao(t) {
2878
+ function xo(t) {
2876
2879
  if (t === void 0 && (t = {}), !H)
2877
- return Ot;
2878
- var e = An(), n = xt(), r = xn(), i = et(r, e), o = et(n, e), a = [], s = [], h = [], f = r, u = i, c = o, p = Object.keys(t);
2880
+ return jt;
2881
+ var e = xn(), n = At(), r = Cn(), i = tt(r, e), o = tt(n, e), a = [], s = [], h = [], f = r, u = i, c = o, p = Object.keys(t);
2879
2882
  if (!p.length)
2880
- return Ot;
2883
+ return jt;
2881
2884
  var d = p.map(function(S) {
2882
2885
  return Number(S);
2883
- }), b = Wi(function() {
2884
- var S = An(), w = function($, L) {
2886
+ }), b = Ki(function() {
2887
+ var S = xn(), w = function($, L) {
2885
2888
  return L.map(function(M) {
2886
2889
  return M === 100 ? $ - 5 : $ * (M / 100);
2887
2890
  });
2888
- }(S, d), P = xt(), _ = xn(), v = et(_, S), l = et(P, S);
2891
+ }(S, d), P = At(), _ = Cn(), v = tt(_, S), l = tt(P, S);
2889
2892
  if (u = v > u ? v : u, c = l < c ? l : c, !(a.length >= d.length)) {
2890
2893
  var k = f === _, T = "up";
2891
2894
  k ? T = "initial" : f <= _ && (T = "down");
@@ -2909,31 +2912,31 @@ function Ao(t) {
2909
2912
  return window.removeEventListener("scroll", b);
2910
2913
  };
2911
2914
  }
2912
- function xt() {
2915
+ function At() {
2913
2916
  return H ? document.body.scrollTop || document.documentElement.scrollTop : 0;
2914
2917
  }
2915
- function $o() {
2918
+ function Ao() {
2916
2919
  return H ? window.innerHeight || document.documentElement.clientHeight : 0;
2917
2920
  }
2918
- function xn() {
2919
- return Math.round(xt() + $o());
2921
+ function Cn() {
2922
+ return Math.round(At() + Ao());
2920
2923
  }
2921
- function An() {
2924
+ function xn() {
2922
2925
  if (!H)
2923
2926
  return 0;
2924
2927
  var t = document.body, e = document.documentElement;
2925
2928
  return Math.max(t.scrollHeight, t.offsetHeight, e.clientHeight, e.scrollHeight, e.offsetHeight);
2926
2929
  }
2927
- function et(t, e) {
2930
+ function tt(t, e) {
2928
2931
  return Math.round(t / e * 100);
2929
2932
  }
2930
- var $n = "EventListener";
2931
- function Uo(t) {
2933
+ var An = "EventListener";
2934
+ function $o(t) {
2932
2935
  return function(e, n, r, i) {
2933
- var o = r || Ot, a = i || !1;
2936
+ var o = r || jt, a = i || !1;
2934
2937
  if (!H)
2935
2938
  return o;
2936
- var s = ot(n), h = ot(e, !0);
2939
+ var s = at(n), h = at(e, !0);
2937
2940
  if (!h.length)
2938
2941
  throw new Error("noElements");
2939
2942
  if (!s.length)
@@ -2941,9 +2944,9 @@ function Uo(t) {
2941
2944
  var f = [];
2942
2945
  return function u(c) {
2943
2946
  c && (f = []);
2944
- for (var p = c ? "add" + $n : "remove" + $n, d = 0; d < h.length; d++) {
2947
+ for (var p = c ? "add" + An : "remove" + An, d = 0; d < h.length; d++) {
2945
2948
  var b = h[d];
2946
- f[d] = c ? a && a.once ? Lo(o) : o : f[d] || o;
2949
+ f[d] = c ? a && a.once ? Uo(o) : o : f[d] || o;
2947
2950
  for (var S = 0; S < s.length; S++)
2948
2951
  b[p] ? b["on" + s[S]] = c ? f[d] : null : b[p](s[S], f[d], a);
2949
2952
  }
@@ -2951,9 +2954,9 @@ function Uo(t) {
2951
2954
  }(t);
2952
2955
  };
2953
2956
  }
2954
- function ot(t, e) {
2957
+ function at(t, e) {
2955
2958
  if (se(t))
2956
- return e ? ot(document.querySelectorAll(t)) : (n = t).split(n.indexOf(",") > -1 ? "," : " ").map(function(a) {
2959
+ return e ? at(document.querySelectorAll(t)) : (n = t).split(n.indexOf(",") > -1 ? "," : " ").map(function(a) {
2957
2960
  return a.trim();
2958
2961
  });
2959
2962
  var n;
@@ -2962,18 +2965,18 @@ function ot(t, e) {
2962
2965
  r[i] = t[i];
2963
2966
  return r;
2964
2967
  }
2965
- var o = zi(t);
2968
+ var o = Ri(t);
2966
2969
  return e ? o.map(function(a) {
2967
- return se(a) ? ot(a, !0) : a;
2970
+ return se(a) ? at(a, !0) : a;
2968
2971
  }).flat() : o;
2969
2972
  }
2970
- function Lo(t, e) {
2973
+ function Uo(t, e) {
2971
2974
  var n;
2972
2975
  return function() {
2973
2976
  return t && (n = t.apply(e || this, arguments), t = null), n;
2974
2977
  };
2975
2978
  }
2976
- var kt = Uo("Event");
2979
+ var It = $o("Event");
2977
2980
  function Or(t, e) {
2978
2981
  return H && V(window[t]) ? (n = window[t], r = e, (i = window) === void 0 && (i = null), V(n) ? function() {
2979
2982
  n.apply(i, arguments), r.apply(i, arguments);
@@ -2982,11 +2985,11 @@ function Or(t, e) {
2982
2985
  }
2983
2986
  Or.bind(null, "onerror");
2984
2987
  Or.bind(null, "onload");
2985
- var jr = typeof window > "u", Un = "hidden";
2986
- function No(t) {
2988
+ var jr = typeof window > "u", $n = "hidden";
2989
+ function Lo(t) {
2987
2990
  if (jr)
2988
2991
  return !1;
2989
- var e = Ro(), n = "".concat(e.replace(/[H|h]idden/, ""), "visibilitychange"), r = function() {
2992
+ var e = No(), n = "".concat(e.replace(/[H|h]idden/, ""), "visibilitychange"), r = function() {
2990
2993
  return t(!!document[e]);
2991
2994
  }, i = function() {
2992
2995
  return document.addEventListener(n, r);
@@ -2995,15 +2998,15 @@ function No(t) {
2995
2998
  return document.removeEventListener(n, r), i;
2996
2999
  };
2997
3000
  }
2998
- function Ro() {
3001
+ function No() {
2999
3002
  var t = ["webkit", "moz", "ms", "o"];
3000
- return jr || Un in document ? Un : t.reduce(function(e, n) {
3003
+ return jr || $n in document ? $n : t.reduce(function(e, n) {
3001
3004
  var r = n + "Hidden";
3002
3005
  return !e && r in document ? r : e;
3003
3006
  }, null);
3004
3007
  }
3005
- var zo = ["mousemove", "mousedown", "touchmove", "touchstart", "touchend", "keydown"];
3006
- function Do(t, e) {
3008
+ var Ro = ["mousemove", "mousedown", "touchmove", "touchstart", "touchend", "keydown"];
3009
+ function zo(t, e) {
3007
3010
  e === void 0 && (e = {});
3008
3011
  var n = /* @__PURE__ */ function(a, s) {
3009
3012
  var h = this, f = !1;
@@ -3014,12 +3017,12 @@ function Do(t, e) {
3014
3017
  };
3015
3018
  }(t, e.throttle || 1e4), r = [];
3016
3019
  function i() {
3017
- var a = No(function(s) {
3020
+ var a = Lo(function(s) {
3018
3021
  s || n({ type: "tabVisible" });
3019
3022
  });
3020
- return r = [a].concat(zo.map(function(s) {
3021
- return kt(document, s, n);
3022
- })).concat(kt(window, "load", n)).concat(kt(window, "scroll", n, { capture: !0, passive: !0 })), o;
3023
+ return r = [a].concat(Ro.map(function(s) {
3024
+ return It(document, s, n);
3025
+ })).concat(It(window, "load", n)).concat(It(window, "scroll", n, { capture: !0, passive: !0 })), o;
3023
3026
  }
3024
3027
  function o() {
3025
3028
  r.map(function(a) {
@@ -3030,7 +3033,7 @@ function Do(t, e) {
3030
3033
  return o(), i;
3031
3034
  };
3032
3035
  }
3033
- function Mo(t) {
3036
+ function Do(t) {
3034
3037
  var e, n, r = t.onIdle, i = t.onWakeUp, o = t.onHeartbeat, a = t.timeout, s = a === void 0 ? 1e4 : a, h = t.throttle, f = h === void 0 ? 2e3 : h, u = !1, c = !1, p = /* @__PURE__ */ new Date(), d = function() {
3035
3038
  return clearTimeout(e);
3036
3039
  };
@@ -3039,7 +3042,7 @@ function Mo(t) {
3039
3042
  u = !0, r && (n = /* @__PURE__ */ new Date(), r(Re(p), w));
3040
3043
  }, s);
3041
3044
  }
3042
- var S = Do(b, { throttle: f });
3045
+ var S = zo(b, { throttle: f });
3043
3046
  return { disable: function() {
3044
3047
  c = !0, u = !1, d();
3045
3048
  var w = S();
@@ -3053,8 +3056,8 @@ function Mo(t) {
3053
3056
  function Re(t, e) {
3054
3057
  return e ? 0 : Math.round((/* @__PURE__ */ new Date() - t) / 1e3);
3055
3058
  }
3056
- const Ln = 5e3;
3057
- class Zo {
3059
+ const Un = 5e3;
3060
+ class Mo {
3058
3061
  constructor(e) {
3059
3062
  B(this, "element");
3060
3063
  B(this, "isInViewport", !1);
@@ -3076,11 +3079,11 @@ class Zo {
3076
3079
  {
3077
3080
  threshold: 0
3078
3081
  }
3079
- ), this.observer.observe(this.element), Mo({
3082
+ ), this.observer.observe(this.element), Do({
3080
3083
  onIdle: (n) => this.handleAwake(!1, n),
3081
3084
  onWakeUp: (n) => this.handleAwake(!0, n),
3082
- timeout: Ln
3083
- }), Ao({
3085
+ timeout: Un
3086
+ }), xo({
3084
3087
  25: this.handleScroll.bind(this),
3085
3088
  50: this.handleScroll.bind(this),
3086
3089
  75: this.handleScroll.bind(this),
@@ -3098,7 +3101,7 @@ class Zo {
3098
3101
  e ? (this.isAwake = !0, this.trackInViewport()) : this.handleAwake(!1), this.isInViewport = e;
3099
3102
  }
3100
3103
  handleAwake(e, n = Math.round((Date.now() - this.lastEventAt) / 1e3)) {
3101
- this.isAwake = e, this.lastEventAt = e ? Date.now() - n * Ln : Date.now(), this.isInViewport && this.trackAwake(e, n);
3104
+ this.isAwake = e, this.lastEventAt = e ? Date.now() - n * Un : Date.now(), this.isInViewport && this.trackAwake(e, n);
3102
3105
  }
3103
3106
  handleScroll(e) {
3104
3107
  this.scrollCallback && this.scrollCallback(e);
@@ -3115,17 +3118,17 @@ class Zo {
3115
3118
  this.registeredView || (this.registeredView = !0, this.viewCallback && this.viewCallback());
3116
3119
  }
3117
3120
  }
3118
- const Nn = "sesamy_session_id";
3119
- function Ko() {
3120
- let t = sessionStorage.getItem(Nn);
3121
- return t || (t = Math.random().toString(36).slice(2, 9), sessionStorage.setItem(Nn, t)), t;
3121
+ const Ln = "sesamy_session_id";
3122
+ function Zo() {
3123
+ let t = sessionStorage.getItem(Ln);
3124
+ return t || (t = Math.random().toString(36).slice(2, 9), sessionStorage.setItem(Ln, t)), t;
3122
3125
  }
3123
- let Cr = !1, At, Rn, at;
3124
- function Wo({ clientId: t, enabled: e = !0, endpoint: n = di }) {
3125
- if (At = t, Rn = e, at = n, !Rn)
3126
+ let Cr = !1, $t, Nn, st;
3127
+ function Ko({ clientId: t, enabled: e = !0, endpoint: n = di }) {
3128
+ if ($t = t, Nn = e, st = n, !Nn)
3126
3129
  return;
3127
- xo();
3128
- const r = new Zo({
3130
+ Co();
3131
+ const r = new Mo({
3129
3132
  element: document.body,
3130
3133
  viewCallback: () => {
3131
3134
  ne.page();
@@ -3150,26 +3153,26 @@ function Wo({ clientId: t, enabled: e = !0, endpoint: n = di }) {
3150
3153
  });
3151
3154
  }
3152
3155
  });
3153
- Jo(document.body, () => {
3156
+ Ho(document.body, () => {
3154
3157
  r.flush();
3155
- }), Xo(document.body, () => {
3158
+ }), Jo(document.body, () => {
3156
3159
  r.handleVisibilityChange();
3157
3160
  }), window.addEventListener(q.AUTHENTICATED, async (i) => {
3158
3161
  const o = i;
3159
3162
  await ne.identify(o.detail.sub);
3160
3163
  }), window.addEventListener(q.LOGOUT, async () => {
3161
- await ne.track("logout", {}), Xt.flush(), await ne.reset();
3164
+ await ne.track("logout", {}), Jt.flush(), await ne.reset();
3162
3165
  });
3163
3166
  }
3164
3167
  function xr(t) {
3165
3168
  return JSON.stringify(
3166
3169
  t.map((e) => ({
3167
3170
  ...e,
3168
- clientId: At,
3171
+ clientId: $t,
3169
3172
  requestId: Math.random().toString(36).slice(2, 9),
3170
- sessionId: Ko(),
3173
+ sessionId: Zo(),
3171
3174
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
3172
- version: Mt,
3175
+ version: Dt,
3173
3176
  event: e.event,
3174
3177
  context: {
3175
3178
  page: {
@@ -3182,16 +3185,16 @@ function xr(t) {
3182
3185
  locale: navigator.language,
3183
3186
  library: ar,
3184
3187
  userAgent: navigator.userAgent,
3185
- clientId: At
3188
+ clientId: $t
3186
3189
  }
3187
3190
  }))
3188
3191
  );
3189
3192
  }
3190
- const Xt = To(
3193
+ const Jt = Po(
3191
3194
  async (t) => {
3192
3195
  if (t.length > 0) {
3193
3196
  const e = xr(t);
3194
- Cr ? navigator.sendBeacon(at, e) : (await fetch(at, {
3197
+ Cr ? navigator.sendBeacon(st, e) : (await fetch(st, {
3195
3198
  method: "POST",
3196
3199
  body: e,
3197
3200
  headers: {
@@ -3207,24 +3210,24 @@ const Xt = To(
3207
3210
  // 3s
3208
3211
  }
3209
3212
  );
3210
- function It(t) {
3213
+ function St(t) {
3211
3214
  var e;
3212
3215
  if (t.anonymousId)
3213
3216
  if ((e = t.properties) != null && e.flushing) {
3214
3217
  const n = { ...t };
3215
- delete n.properties.flushing, navigator.sendBeacon(at, xr([n]));
3218
+ delete n.properties.flushing, navigator.sendBeacon(st, xr([n]));
3216
3219
  } else
3217
- Xt.push(t);
3220
+ Jt.push(t);
3218
3221
  }
3219
- const ne = Po({
3222
+ const ne = Eo({
3220
3223
  app: ar,
3221
- version: Mt,
3224
+ version: Dt,
3222
3225
  plugins: [
3223
3226
  {
3224
3227
  name: "custom-analytics-plugin",
3225
3228
  page: ({ payload: t }) => {
3226
3229
  const { properties: e, anonymousId: n, userId: r, event: i } = t;
3227
- It({
3230
+ St({
3228
3231
  anonymousId: n,
3229
3232
  userId: r,
3230
3233
  properties: e,
@@ -3234,7 +3237,7 @@ const ne = Po({
3234
3237
  },
3235
3238
  track: ({ payload: t }) => {
3236
3239
  const { properties: e, anonymousId: n, userId: r, event: i } = t;
3237
- It({
3240
+ St({
3238
3241
  anonymousId: n,
3239
3242
  userId: r,
3240
3243
  properties: e,
@@ -3244,7 +3247,7 @@ const ne = Po({
3244
3247
  },
3245
3248
  identify: ({ payload: t }) => {
3246
3249
  const { properties: e, anonymousId: n, userId: r } = t;
3247
- It({
3250
+ St({
3248
3251
  anonymousId: n,
3249
3252
  userId: r,
3250
3253
  properties: e,
@@ -3254,23 +3257,23 @@ const ne = Po({
3254
3257
  }
3255
3258
  ]
3256
3259
  });
3257
- function Fo(t, e) {
3260
+ function Wo(t, e) {
3258
3261
  ne.track(t, e);
3259
3262
  }
3260
- function Ho() {
3261
- return Cr = !0, Xt.flush();
3263
+ function Fo() {
3264
+ return Cr = !0, Jt.flush();
3262
3265
  }
3263
3266
  const Ar = /* @__PURE__ */ new Map();
3264
- function Jo(t, e) {
3267
+ function Ho(t, e) {
3265
3268
  Ar.set(t, e);
3266
3269
  }
3267
3270
  window.addEventListener("beforeunload", () => {
3268
3271
  Ar.forEach((t, e) => {
3269
3272
  t.bind(e)();
3270
- }), Ho();
3273
+ }), Fo();
3271
3274
  });
3272
3275
  const $r = /* @__PURE__ */ new Map();
3273
- function Xo(t, e) {
3276
+ function Jo(t, e) {
3274
3277
  $r.set(t, e);
3275
3278
  }
3276
3279
  window.addEventListener("visibilitychange", () => {
@@ -3283,11 +3286,11 @@ function Lr() {
3283
3286
  const t = sessionStorage.getItem(Ur);
3284
3287
  return t ? JSON.parse(t) : [];
3285
3288
  }
3286
- function Vo(t) {
3289
+ function Xo(t) {
3287
3290
  const e = Lr();
3288
3291
  e.push(t), sessionStorage.setItem(Ur, JSON.stringify(e));
3289
3292
  }
3290
- function Yo(t) {
3293
+ function Vo(t) {
3291
3294
  const {
3292
3295
  getEntitlement: e,
3293
3296
  getEntitlements: n,
@@ -3318,11 +3321,11 @@ function Yo(t) {
3318
3321
  autoOnboardProduct: K,
3319
3322
  openHostedAccountPage: $,
3320
3323
  generateLink: L
3321
- } = Oi(t), M = {
3324
+ } = Ti(t), M = {
3322
3325
  auth: {
3323
3326
  getUser: f,
3324
- isAuthenticated: zt,
3325
- loginWithRedirect: Dt,
3327
+ isAuthenticated: Rt,
3328
+ loginWithRedirect: zt,
3326
3329
  logout: pi,
3327
3330
  setToken: nr
3328
3331
  },
@@ -3334,7 +3337,7 @@ function Yo(t) {
3334
3337
  unlinkSpotify: R
3335
3338
  },
3336
3339
  analytics: {
3337
- track: Fo
3340
+ track: Wo
3338
3341
  },
3339
3342
  tags: {
3340
3343
  list: c,
@@ -3375,40 +3378,40 @@ function Yo(t) {
3375
3378
  autoOnboard: K,
3376
3379
  linkSpotify: z
3377
3380
  },
3378
- getVersion: Go,
3381
+ getVersion: Yo,
3379
3382
  getPaymentIssues: O,
3380
3383
  generateLink: L,
3381
3384
  clearCache: ee
3382
3385
  };
3383
3386
  return t.namespace && (window[t.namespace] = M), M;
3384
3387
  }
3385
- function Go() {
3386
- return Mt;
3388
+ function Yo() {
3389
+ return Dt;
3387
3390
  }
3388
- function Bo() {
3389
- const t = new URLSearchParams(window.location.hash.substring(1)), e = t.get("access_token"), n = t.get("expires_in");
3391
+ function Go() {
3392
+ const t = new URLSearchParams(window.location.hash.substring(1)), e = t.get("access_token");
3390
3393
  if (e) {
3391
- nr(e, n ? parseInt(n, 10) : void 0);
3392
- const r = new URL(window.location.href);
3393
- t.delete("access_token"), t.delete("expires_in"), r.hash = t.toString(), window.history.replaceState(null, "", r);
3394
+ nr(e);
3395
+ const n = new URL(window.location.href);
3396
+ t.delete("access_token"), n.hash = t.toString(), window.history.replaceState(null, "", n);
3394
3397
  }
3395
3398
  }
3396
- const zn = "sesamy-refresh", Dn = "force-refetch-entitlements";
3397
- function qo() {
3398
- const t = new URLSearchParams(window.location.search), e = t.get(Dn), n = t.get(zn);
3399
+ const Rn = "sesamy-refresh", zn = "force-refetch-entitlements";
3400
+ function Bo() {
3401
+ const t = new URLSearchParams(window.location.search), e = t.get(zn), n = t.get(Rn);
3399
3402
  if (e !== null || n !== null) {
3400
3403
  const r = new URL(window.location.href);
3401
- t.delete(Dn), t.delete(zn), r.search = t.toString(), ee(), window.history.replaceState(null, "", r);
3404
+ t.delete(zn), t.delete(Rn), r.search = t.toString(), ee(), window.history.replaceState(null, "", r);
3402
3405
  }
3403
3406
  }
3404
- function Qo() {
3407
+ function qo() {
3405
3408
  const t = new URLSearchParams(window.location.search), e = t.get("token"), n = t.get("se");
3406
3409
  if (!n || !e)
3407
3410
  return;
3408
3411
  const r = parseInt(n, 10);
3409
3412
  if (Number.isNaN(r) || r < Date.now())
3410
3413
  return;
3411
- Vo({
3414
+ Xo({
3412
3415
  url: window.location.href.split("?")[0],
3413
3416
  token: e,
3414
3417
  expiresAt: r,
@@ -3417,34 +3420,34 @@ function Qo() {
3417
3420
  const i = new URL(window.location.href);
3418
3421
  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);
3419
3422
  }
3420
- const Mn = "sesamy-user";
3421
- async function ea() {
3422
- const e = new URLSearchParams(window.location.search).get(Mn);
3423
+ const Dn = "sesamy-user";
3424
+ async function Qo() {
3425
+ const e = new URLSearchParams(window.location.search).get(Dn);
3423
3426
  if (!e)
3424
3427
  return;
3425
3428
  const n = await fi();
3426
- (n == null ? void 0 : n.email) !== e && Dt({ authorizationParams: { email_hint: e } });
3429
+ (n == null ? void 0 : n.email) !== e && zt({ authorizationParams: { email_hint: e } });
3427
3430
  const r = new URL(window.location.href);
3428
- r.searchParams.delete(Mn), window.history.replaceState(null, "", r);
3431
+ r.searchParams.delete(Dn), window.history.replaceState(null, "", r);
3429
3432
  }
3430
- const Zn = "sesamy-purchase";
3431
- function ta() {
3432
- const t = new URLSearchParams(window.location.search), e = t.get(Zn);
3433
+ const Mn = "sesamy-purchase";
3434
+ function ea() {
3435
+ const t = new URLSearchParams(window.location.search), e = t.get(Mn);
3433
3436
  if (e !== null) {
3434
3437
  const n = new URL(window.location.href);
3435
- t.delete(Zn), n.search = t.toString(), ue(q.PURCHASE, { itemSrc: e }), ee(), window.history.replaceState(null, "", n);
3438
+ t.delete(Mn), n.search = t.toString(), ue(q.PURCHASE, { itemSrc: e }), ee(), window.history.replaceState(null, "", n);
3436
3439
  }
3437
3440
  }
3438
- const Kn = "sesamy-login";
3439
- async function na() {
3440
- if (!new URLSearchParams(window.location.search).get(Kn))
3441
+ const Zn = "sesamy-login";
3442
+ async function ta() {
3443
+ if (!new URLSearchParams(window.location.search).get(Zn))
3441
3444
  return;
3442
- await zt() || Dt();
3445
+ await Rt() || zt();
3443
3446
  const r = new URL(window.location.href);
3444
- r.searchParams.delete(Kn), window.history.replaceState(null, "", r);
3447
+ r.searchParams.delete(Zn), window.history.replaceState(null, "", r);
3445
3448
  }
3446
- async function ra(t) {
3447
- Wo({
3449
+ async function na(t) {
3450
+ Ko({
3448
3451
  clientId: t.clientId,
3449
3452
  // The default client id can be overridden by the config
3450
3453
  ...t.analytics
@@ -3454,19 +3457,19 @@ async function ra(t) {
3454
3457
  // The default client id can be overridden by the config
3455
3458
  ...t.auth
3456
3459
  });
3457
- const e = Yo({ clientId: t.clientId, ...t.api });
3458
- return ue(q.READY, {}), Bo(), qo(), Qo(), await na(), await ea(), ta(), e;
3460
+ const e = Vo({ clientId: t.clientId, ...t.api });
3461
+ return ue(q.READY, {}), Go(), Bo(), qo(), await ta(), await Qo(), ea(), e;
3459
3462
  }
3460
3463
  if (typeof document < "u") {
3461
3464
  const t = document.getElementById("sesamy-js");
3462
3465
  if (t != null && t.textContent)
3463
3466
  try {
3464
3467
  const e = JSON.parse(t.textContent);
3465
- ra(e);
3468
+ na(e);
3466
3469
  } catch (e) {
3467
3470
  console.error("Failed to parse config", e);
3468
3471
  }
3469
3472
  }
3470
3473
  export {
3471
- ra as init
3474
+ na as init
3472
3475
  };