@sesamy/sesamy-js 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -59,7 +59,7 @@ var se = xt(function(t, e) {
59
59
  };
60
60
  });
61
61
  jt(se);
62
- var Or = jt(xt(function(t, e) {
62
+ var Tr = jt(xt(function(t, e) {
63
63
  var n = ce && ce.__awaiter || function(u, c, f, d) {
64
64
  return new (f || (f = Promise))(function(w, k) {
65
65
  function v(g) {
@@ -69,7 +69,7 @@ var Or = jt(xt(function(t, e) {
69
69
  k(l);
70
70
  }
71
71
  }
72
- function _(g) {
72
+ function E(g) {
73
73
  try {
74
74
  S(d.throw(g));
75
75
  } catch (l) {
@@ -79,7 +79,7 @@ var Or = jt(xt(function(t, e) {
79
79
  function S(g) {
80
80
  g.done ? w(g.value) : new f(function(l) {
81
81
  l(g.value);
82
- }).then(v, _);
82
+ }).then(v, E);
83
83
  }
84
84
  S((d = d.apply(u, c || [])).next());
85
85
  });
@@ -89,10 +89,10 @@ var Or = jt(xt(function(t, e) {
89
89
  throw w[1];
90
90
  return w[1];
91
91
  }, trys: [], ops: [] };
92
- return k = { next: _(0), throw: _(1), return: _(2) }, typeof Symbol == "function" && (k[Symbol.iterator] = function() {
92
+ return k = { next: E(0), throw: E(1), return: E(2) }, typeof Symbol == "function" && (k[Symbol.iterator] = function() {
93
93
  return this;
94
94
  }), k;
95
- function _(S) {
95
+ function E(S) {
96
96
  return function(g) {
97
97
  return function(l) {
98
98
  if (f)
@@ -205,7 +205,7 @@ var Or = jt(xt(function(t, e) {
205
205
  }
206
206
  return u.prototype.acquireLock = function(c, f) {
207
207
  return f === void 0 && (f = 5e3), n(this, void 0, void 0, function() {
208
- var d, w, k, v, _, S, g;
208
+ var d, w, k, v, E, S, g;
209
209
  return r(this, function(l) {
210
210
  switch (l.label) {
211
211
  case 0:
@@ -213,9 +213,9 @@ var Or = jt(xt(function(t, e) {
213
213
  case 1:
214
214
  return Date.now() < w ? [4, s(30)] : [3, 8];
215
215
  case 2:
216
- return l.sent(), v.getItemSync(k) !== null ? [3, 5] : (_ = this.id + "-" + c + "-" + d, [4, s(Math.floor(25 * Math.random()))]);
216
+ return l.sent(), v.getItemSync(k) !== null ? [3, 5] : (E = this.id + "-" + c + "-" + d, [4, s(Math.floor(25 * Math.random()))]);
217
217
  case 3:
218
- return l.sent(), v.setItemSync(k, JSON.stringify({ id: this.id, iat: d, timeoutKey: _, timeAcquired: Date.now(), timeRefreshed: Date.now() })), [4, s(30)];
218
+ return l.sent(), v.setItemSync(k, JSON.stringify({ id: this.id, iat: d, timeoutKey: E, timeAcquired: Date.now(), timeRefreshed: Date.now() })), [4, s(30)];
219
219
  case 4:
220
220
  return l.sent(), (S = v.getItemSync(k)) !== null && (g = JSON.parse(S)).id === this.id && g.iat === d ? (this.acquiredIatSet.add(d), this.refreshLockWhileAcquired(k, d), [2, !0]) : [3, 7];
221
221
  case 5:
@@ -235,13 +235,13 @@ var Or = jt(xt(function(t, e) {
235
235
  return r(this, function(w) {
236
236
  return setTimeout(function() {
237
237
  return n(d, void 0, void 0, function() {
238
- var k, v, _;
238
+ var k, v, E;
239
239
  return r(this, function(S) {
240
240
  switch (S.label) {
241
241
  case 0:
242
242
  return [4, se.default().lock(f)];
243
243
  case 1:
244
- return S.sent(), this.acquiredIatSet.has(f) ? (k = this.storageHandler === void 0 ? a : this.storageHandler, (v = k.getItemSync(c)) === null ? (se.default().unlock(f), [2]) : ((_ = JSON.parse(v)).timeRefreshed = Date.now(), k.setItemSync(c, JSON.stringify(_)), se.default().unlock(f), this.refreshLockWhileAcquired(c, f), [2])) : (se.default().unlock(f), [2]);
244
+ return S.sent(), this.acquiredIatSet.has(f) ? (k = this.storageHandler === void 0 ? a : this.storageHandler, (v = k.getItemSync(c)) === null ? (se.default().unlock(f), [2]) : ((E = JSON.parse(v)).timeRefreshed = Date.now(), k.setItemSync(c, JSON.stringify(E)), se.default().unlock(f), this.refreshLockWhileAcquired(c, f), [2])) : (se.default().unlock(f), [2]);
245
245
  }
246
246
  });
247
247
  });
@@ -255,15 +255,15 @@ var Or = jt(xt(function(t, e) {
255
255
  case 0:
256
256
  return [4, new Promise(function(d) {
257
257
  var w = !1, k = Date.now(), v = !1;
258
- function _() {
259
- if (v || (window.removeEventListener("storage", _), u.removeFromWaiting(_), clearTimeout(S), v = !0), !w) {
258
+ function E() {
259
+ if (v || (window.removeEventListener("storage", E), u.removeFromWaiting(E), clearTimeout(S), v = !0), !w) {
260
260
  w = !0;
261
261
  var g = 50 - (Date.now() - k);
262
262
  g > 0 ? setTimeout(d, g) : d(null);
263
263
  }
264
264
  }
265
- window.addEventListener("storage", _), u.addToWaiting(_);
266
- var S = setTimeout(_, Math.max(0, c - Date.now()));
265
+ window.addEventListener("storage", E), u.addToWaiting(E);
266
+ var S = setTimeout(E, Math.max(0, c - Date.now()));
267
267
  })];
268
268
  case 1:
269
269
  return f.sent(), [2];
@@ -312,22 +312,22 @@ var Or = jt(xt(function(t, e) {
312
312
  break;
313
313
  w.push(v), k++;
314
314
  }
315
- for (var _ = !1, S = 0; S < w.length; S++) {
315
+ for (var E = !1, S = 0; S < w.length; S++) {
316
316
  var g = w[S];
317
317
  if (g.includes(o)) {
318
318
  var l = d.getItemSync(g);
319
319
  if (l !== null) {
320
320
  var b = JSON.parse(l);
321
- (b.timeRefreshed === void 0 && b.timeAcquired < f || b.timeRefreshed !== void 0 && b.timeRefreshed < f) && (d.removeItemSync(g), _ = !0);
321
+ (b.timeRefreshed === void 0 && b.timeAcquired < f || b.timeRefreshed !== void 0 && b.timeRefreshed < f) && (d.removeItemSync(g), E = !0);
322
322
  }
323
323
  }
324
324
  }
325
- _ && u.notifyWaiters();
325
+ E && u.notifyWaiters();
326
326
  }, u.waiters = void 0, u;
327
327
  }();
328
328
  e.default = p;
329
329
  }));
330
- const Tr = { timeoutInSeconds: 60 }, An = { name: "auth0-spa-js", version: "2.1.3" }, $n = () => Date.now();
330
+ const Or = { timeoutInSeconds: 60 }, An = { name: "auth0-spa-js", version: "2.1.3" }, $n = () => Date.now();
331
331
  let Y = class bt extends Error {
332
332
  constructor(e, n) {
333
333
  super(n), this.error = e, this.error_description = n, Object.setPrototypeOf(this, bt.prototype);
@@ -396,22 +396,22 @@ async function Dr(t, e) {
396
396
  var { baseUrl: n, timeout: r, audience: i, scope: o, auth0Client: a, useFormData: s } = t, h = Q(t, ["baseUrl", "timeout", "audience", "scope", "auth0Client", "useFormData"]);
397
397
  const p = s ? It(h) : JSON.stringify(h);
398
398
  return await async function(u, c, f, d, w, k, v) {
399
- let _, S = null;
399
+ let E, S = null;
400
400
  for (let $ = 0; $ < 3; $++)
401
401
  try {
402
- _ = await Nr(u, f, d, w, k, v, c), S = null;
402
+ E = await Nr(u, f, d, w, k, v, c), S = null;
403
403
  break;
404
404
  } catch (L) {
405
405
  S = L;
406
406
  }
407
407
  if (S)
408
408
  throw S;
409
- const g = _.json, { error: l, error_description: b } = g, T = Q(g, ["error", "error_description"]), { ok: j } = _;
409
+ const g = E.json, { error: l, error_description: b } = g, P = Q(g, ["error", "error_description"]), { ok: j } = E;
410
410
  if (!j) {
411
411
  const $ = b || `HTTP error. Unable to fetch ${u}`;
412
- throw l === "mfa_required" ? new Cr(l, $, T.mfa_token) : l === "missing_refresh_token" ? new Rn(f, d) : new Y(l || "request_error", $);
412
+ throw l === "mfa_required" ? new Cr(l, $, P.mfa_token) : l === "missing_refresh_token" ? new Rn(f, d) : new Y(l || "request_error", $);
413
413
  }
414
- return T;
414
+ return P;
415
415
  }(`${n}/oauth/token`, r, i || "default", o, { method: "POST", body: p, headers: { "Content-Type": s ? "application/x-www-form-urlencoded" : "application/json", "Auth0-Client": btoa(JSON.stringify(a || An)) } }, e, s);
416
416
  }
417
417
  const Ke = (...t) => {
@@ -743,7 +743,7 @@ let Xr = class {
743
743
  const Vr = { memory: () => new Zn().enclosedCache, localstorage: () => new Ur() }, Yt = (t) => Vr[t], Gt = (t) => {
744
744
  const { openUrl: e, onRedirect: n } = t, r = Q(t, ["openUrl", "onRedirect"]);
745
745
  return Object.assign(Object.assign({}, r), { openUrl: e === !1 || e ? e : n });
746
- }, ft = new Or();
746
+ }, ft = new Tr();
747
747
  let Yr = class {
748
748
  constructor(e) {
749
749
  let n, r;
@@ -790,7 +790,7 @@ let Yr = class {
790
790
  const d = { "+": "-", "/": "_", "=": "" };
791
791
  return f.replace(/[+/=]/g, (w) => d[w]);
792
792
  })(window.btoa(String.fromCharCode(...Array.from(c))));
793
- })(await (async (u) => await Be().subtle.digest({ name: "SHA-256" }, new TextEncoder().encode(u)))(a)), h = ((u, c, f, d, w, k, v, _) => Object.assign(Object.assign(Object.assign({ client_id: u.clientId }, u.authorizationParams), f), { scope: Ke(c, f.scope), response_type: "code", response_mode: _ || "query", state: d, nonce: w, redirect_uri: v || u.authorizationParams.redirect_uri, code_challenge: k, code_challenge_method: "S256" }))(this.options, this.scope, e, i, o, s, e.redirect_uri || this.options.authorizationParams.redirect_uri || r, n == null ? void 0 : n.response_mode), p = this._authorizeUrl(h);
793
+ })(await (async (u) => await Be().subtle.digest({ name: "SHA-256" }, new TextEncoder().encode(u)))(a)), h = ((u, c, f, d, w, k, v, E) => Object.assign(Object.assign(Object.assign({ client_id: u.clientId }, u.authorizationParams), f), { scope: Ke(c, f.scope), response_type: "code", response_mode: E || "query", state: d, nonce: w, redirect_uri: v || u.authorizationParams.redirect_uri, code_challenge: k, code_challenge_method: "S256" }))(this.options, this.scope, e, i, o, s, e.redirect_uri || this.options.authorizationParams.redirect_uri || r, n == null ? void 0 : n.response_mode), p = this._authorizeUrl(h);
794
794
  return { nonce: o, code_verifier: a, scope: h.scope, audience: h.audience || "default", redirect_uri: h.redirect_uri, state: i, url: p };
795
795
  }
796
796
  async loginWithPopup(e, n) {
@@ -909,7 +909,7 @@ let Yr = class {
909
909
  async getTokenWithPopup(e = {}, n = {}) {
910
910
  var r;
911
911
  const i = Object.assign(Object.assign({}, e), { authorizationParams: Object.assign(Object.assign(Object.assign({}, this.options.authorizationParams), e.authorizationParams), { scope: Ke(this.scope, (r = e.authorizationParams) === null || r === void 0 ? void 0 : r.scope) }) });
912
- return n = Object.assign(Object.assign({}, Tr), n), await this.loginWithPopup(i, n), (await this.cacheManager.get(new le({ scope: i.authorizationParams.scope, audience: i.authorizationParams.audience || "default", clientId: this.options.clientId }))).access_token;
912
+ return n = Object.assign(Object.assign({}, Or), n), await this.loginWithPopup(i, n), (await this.cacheManager.get(new le({ scope: i.authorizationParams.scope, audience: i.authorizationParams.audience || "default", clientId: this.options.clientId }))).access_token;
913
913
  }
914
914
  async isAuthenticated() {
915
915
  return !!await this.getUser();
@@ -932,21 +932,21 @@ let Yr = class {
932
932
  try {
933
933
  if (window.crossOriginIsolated)
934
934
  throw new Y("login_required", "The application is running in a Cross-Origin Isolated context, silently retrieving a token without refresh token is not possible.");
935
- const c = e.timeoutInSeconds || this.options.authorizeTimeoutInSeconds, f = await ((w, k, v = 60) => new Promise((_, S) => {
935
+ const c = e.timeoutInSeconds || this.options.authorizeTimeoutInSeconds, f = await ((w, k, v = 60) => new Promise((E, S) => {
936
936
  const g = window.document.createElement("iframe");
937
937
  g.setAttribute("width", "0"), g.setAttribute("height", "0"), g.style.display = "none";
938
938
  const l = () => {
939
939
  window.document.body.contains(g) && (window.document.body.removeChild(g), window.removeEventListener("message", b, !1));
940
940
  };
941
941
  let b;
942
- const T = setTimeout(() => {
942
+ const P = setTimeout(() => {
943
943
  S(new kt()), l();
944
944
  }, 1e3 * v);
945
945
  b = function(j) {
946
946
  if (j.origin != k || !j.data || j.data.type !== "authorization_response")
947
947
  return;
948
948
  const $ = j.source;
949
- $ && $.close(), j.data.response.error ? S(Y.fromPayload(j.data.response)) : _(j.data.response), clearTimeout(T), window.removeEventListener("message", b, !1), setTimeout(l, 2e3);
949
+ $ && $.close(), j.data.response.error ? S(Y.fromPayload(j.data.response)) : E(j.data.response), clearTimeout(P), window.removeEventListener("message", b, !1), setTimeout(l, 2e3);
950
950
  }, window.addEventListener("message", b, !1), window.document.body.appendChild(g), g.setAttribute("src", w);
951
951
  }))(i, this.domainUrl, c);
952
952
  if (o !== f.state)
@@ -1111,7 +1111,7 @@ const oi = (t, e) => e.skipDedupe || e.method !== "GET", ai = (t, e) => e.method
1111
1111
  if (s && s(p, u))
1112
1112
  return h(p, u);
1113
1113
  const f = (d, w) => Promise.resolve(r(d, w)).then((k) => k ? d && a ? d : w ? Promise.reject(w) : d : (c++, !n || c <= n ? new Promise((v) => {
1114
- const _ = e(t, c);
1114
+ const E = e(t, c);
1115
1115
  setTimeout(() => {
1116
1116
  typeof i == "function" ? Promise.resolve(i({
1117
1117
  response: d,
@@ -1122,7 +1122,7 @@ const oi = (t, e) => e.skipDedupe || e.method !== "GET", ai = (t, e) => e.method
1122
1122
  var g, l;
1123
1123
  v(h((g = S && S.url) !== null && g !== void 0 ? g : p, (l = S && S.options) !== null && l !== void 0 ? l : u));
1124
1124
  }) : v(h(p, u));
1125
- }, _);
1125
+ }, E);
1126
1126
  }).then(f).catch((v) => {
1127
1127
  if (!o)
1128
1128
  throw v;
@@ -1193,8 +1193,8 @@ const mi = (t) => {
1193
1193
  CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
1194
1194
  throw l;
1195
1195
  return g.text().then((b) => {
1196
- var T;
1197
- if (l.message = b, i.errorType === "json" || ((T = g.headers.get("Content-Type")) === null || T === void 0 ? void 0 : T.split(";")[0]) === "application/json")
1196
+ var P;
1197
+ if (l.message = b, i.errorType === "json" || ((P = g.headers.get("Content-Type")) === null || P === void 0 ? void 0 : P.split(";")[0]) === "application/json")
1198
1198
  try {
1199
1199
  l.json = JSON.parse(b);
1200
1200
  } catch {
@@ -1204,14 +1204,14 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
1204
1204
  }
1205
1205
  return g;
1206
1206
  }), k = (g) => g.catch((l) => {
1207
- const b = l.hasOwnProperty(ve), T = b ? l[ve] : l, j = (T == null ? void 0 : T.status) && p.get(T.status) || p.get(T == null ? void 0 : T.name) || b && p.has(ve) && p.get(ve);
1207
+ const b = l.hasOwnProperty(ve), P = b ? l[ve] : l, j = (P == null ? void 0 : P.status) && p.get(P.status) || p.get(P == null ? void 0 : P.name) || b && p.has(ve) && p.get(ve);
1208
1208
  if (j)
1209
- return j(T, t);
1209
+ return j(P, t);
1210
1210
  const $ = p.get(Xn);
1211
1211
  if ($)
1212
- return $(T, t);
1213
- throw T;
1214
- }), v = (g) => (l) => /* If a callback is provided, then callback with the body result otherwise return the parsed body itself. */ k(g ? w.then((b) => b && b[g]()).then((b) => l ? l(b) : b) : w.then((b) => l ? l(b) : b)), _ = {
1212
+ return $(P, t);
1213
+ throw P;
1214
+ }), v = (g) => (l) => /* If a callback is provided, then callback with the body result otherwise return the parsed body itself. */ k(g ? w.then((b) => b && b[g]()).then((b) => l ? l(b) : b) : w.then((b) => l ? l(b) : b)), E = {
1215
1215
  _wretchReq: t,
1216
1216
  _fetchReq: f,
1217
1217
  _sharedState: e,
@@ -1248,7 +1248,7 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
1248
1248
  }, S = h.reduce((g, l) => ({
1249
1249
  ...g,
1250
1250
  ...typeof l.resolver == "function" ? l.resolver(g) : l.resolver
1251
- }), _);
1251
+ }), E);
1252
1252
  return a.reduce((g, l) => l(g, t), S);
1253
1253
  }, gi = {
1254
1254
  _url: "",
@@ -1370,138 +1370,151 @@ ae.errorType = fi;
1370
1370
  ae.polyfills = hi;
1371
1371
  ae.WretchError = Vn;
1372
1372
  function yi(t) {
1373
- const e = t.endpoint || `https://api2.${Fn}`, n = (I = !0) => (x) => async (E, N) => {
1374
- let R = null;
1375
- if (R = await ni(I), !R) {
1376
- if (I)
1373
+ const e = t.endpoint || `https://api2.${Fn}`, n = (_) => async (I, x) => {
1374
+ let D = sessionStorage.getItem("sesamyCacheTimestamp");
1375
+ D || (D = Date.now().toString(), sessionStorage.setItem("sesamyCacheTimestamp", D));
1376
+ const T = {
1377
+ ...x,
1378
+ headers: {
1379
+ ...x.headers,
1380
+ "Cache-Timestamp": D
1381
+ }
1382
+ };
1383
+ return _(I, T);
1384
+ }, r = (_ = !0) => (I) => async (x, D) => {
1385
+ let T = null;
1386
+ if (T = await ni(_), !T) {
1387
+ if (_)
1377
1388
  throw new Error("No access token available");
1378
- return x(E, N);
1389
+ return I(x, D);
1379
1390
  }
1380
- const P = {
1381
- ...N,
1391
+ const W = {
1392
+ ...D,
1382
1393
  headers: {
1383
- ...N.headers,
1384
- ...R ? { Authorization: `Bearer ${R}` } : {}
1394
+ ...D.headers,
1395
+ ...T ? { Authorization: `Bearer ${T}` } : {}
1385
1396
  }
1386
1397
  };
1387
- return x(E, P);
1388
- }, r = (I) => (x, E) => {
1389
- if (E.headers.Authorization)
1390
- return I(x, E);
1391
- const N = localStorage.getItem("__anon_id"), R = btoa(`${N}:`), P = {
1392
- ...E,
1398
+ return I(x, W);
1399
+ }, i = (_) => (I, x) => {
1400
+ if (x.headers.Authorization)
1401
+ return _(I, x);
1402
+ const D = localStorage.getItem("__anon_id"), T = btoa(`${D}:`), W = {
1403
+ ...x,
1393
1404
  headers: {
1394
- ...E.headers,
1395
- Authorization: `Basic ${R}`
1405
+ ...x.headers,
1406
+ Authorization: `Basic ${T}`
1396
1407
  }
1397
1408
  };
1398
- return I(x, P);
1399
- }, i = ae(e).headers({ "Content-Type": "application/json" }).middlewares([
1400
- n(),
1409
+ return _(I, W);
1410
+ }, o = ae(e).headers({ "Content-Type": "application/json" }).middlewares([
1411
+ n,
1412
+ r(),
1401
1413
  Bt(),
1402
1414
  qt({
1403
1415
  delayTimer: 1e3,
1404
- delayRamp: (I, x) => I * x,
1416
+ delayRamp: (_, I) => _ * I,
1405
1417
  maxAttempts: 3,
1406
- until: (I) => !!(I && (I.ok || I.status >= 400 && I.status < 500)),
1418
+ until: (_) => !!(_ && (_.ok || _.status >= 400 && _.status < 500)),
1407
1419
  retryOnNetworkError: !1
1408
1420
  })
1409
- ]), o = ae(e).headers({ "Content-Type": "application/json" }).middlewares([
1410
- n(!1),
1411
- r,
1421
+ ]), a = ae(e).headers({ "Content-Type": "application/json" }).middlewares([
1422
+ n,
1423
+ r(!1),
1424
+ i,
1412
1425
  Bt(),
1413
1426
  qt({
1414
1427
  delayTimer: 1e3,
1415
- delayRamp: (I, x) => I * x,
1428
+ delayRamp: (_, I) => _ * I,
1416
1429
  maxAttempts: 3,
1417
- until: (I) => !!(I && (I.ok || I.status >= 400 && I.status < 500)),
1430
+ until: (_) => !!(_ && (_.ok || _.status >= 400 && _.status < 500)),
1418
1431
  retryOnNetworkError: !1
1419
1432
  })
1420
1433
  ]);
1421
- async function a() {
1422
- return i.get("/entitlements").json();
1434
+ async function s() {
1435
+ return o.get("/entitlements").json();
1423
1436
  }
1424
- async function s(I) {
1425
- const x = await i.get("/entitlements").json();
1426
- return x == null ? void 0 : x.find((E) => E.id === I);
1437
+ async function h(_) {
1438
+ const I = await o.get("/entitlements").json();
1439
+ return I == null ? void 0 : I.find((x) => x.id === _);
1427
1440
  }
1428
- async function h(I) {
1429
- return i.get(`/entitlements/${I}/access`).json();
1441
+ async function p(_) {
1442
+ return o.get(`/entitlements/${_}/access`).json();
1430
1443
  }
1431
- async function p() {
1432
- return i.get("/contracts").json();
1444
+ async function u() {
1445
+ return o.get("/contracts").json();
1433
1446
  }
1434
- async function u(I) {
1435
- const x = await i.get("/contracts").json();
1436
- return x == null ? void 0 : x.find((E) => E.id === I);
1447
+ async function c(_) {
1448
+ const I = await o.get("/contracts").json();
1449
+ return I == null ? void 0 : I.find((x) => x.id === _);
1437
1450
  }
1438
- async function c() {
1439
- return i.get("/bills").json();
1451
+ async function f() {
1452
+ return o.get("/bills").json();
1440
1453
  }
1441
- async function f(I) {
1442
- const x = await i.get("/bills").json();
1443
- return x == null ? void 0 : x.find((E) => E.id === I);
1454
+ async function d(_) {
1455
+ const I = await o.get("/bills").json();
1456
+ return I == null ? void 0 : I.find((x) => x.id === _);
1444
1457
  }
1445
- async function d(I, x) {
1446
- return await i.url(`/user-metadata/${I}`).put(x).json();
1458
+ async function w(_, I) {
1459
+ return await o.url(`/user-metadata/${_}`).put(I).json();
1447
1460
  }
1448
- async function w(I) {
1449
- return (await i.url(`/user-metadata/${I}`).delete().res()).ok;
1461
+ async function k(_) {
1462
+ return (await o.url(`/user-metadata/${_}`).delete().res()).ok;
1450
1463
  }
1451
- async function k(I) {
1452
- return (await i.url(`/user-metadata/${I}`).get().json())[I];
1464
+ async function v(_) {
1465
+ return (await o.url(`/user-metadata/${_}`).get().json())[_];
1453
1466
  }
1454
- async function v() {
1455
- return await i.url("/user-metadata").get().json();
1467
+ async function E() {
1468
+ return await o.url("/user-metadata").get().json();
1456
1469
  }
1457
- async function _() {
1458
- return await i.url("/tags").get().json();
1470
+ async function S() {
1471
+ return await o.url("/tags").get().json();
1459
1472
  }
1460
- async function S(I) {
1461
- return (await i.url(`/tags/${I}`).delete().res()).ok;
1473
+ async function g(_) {
1474
+ return (await o.url(`/tags/${_}`).delete().res()).ok;
1462
1475
  }
1463
- async function g(I) {
1464
- return (await i.url("/tags").post(I).res()).ok;
1476
+ async function l(_) {
1477
+ return (await o.url("/tags").post(_).res()).ok;
1465
1478
  }
1466
- async function l(I) {
1467
- return (await o.url("/tallies").get().json())[I];
1479
+ async function b(_) {
1480
+ return (await a.url("/tallies").get().json())[_];
1468
1481
  }
1469
- async function b() {
1470
- return await o.url("/tallies").get().json();
1482
+ async function P() {
1483
+ return await a.url("/tallies").get().json();
1471
1484
  }
1472
- async function T(I) {
1473
- return (await o.url(`/tallies/${I}`).delete().res()).ok;
1485
+ async function j(_) {
1486
+ return (await a.url(`/tallies/${_}`).delete().res()).ok;
1474
1487
  }
1475
- async function j(I, x) {
1476
- return await o.url(`/tallies/${I}/push`).post(x).json();
1488
+ async function $(_, I) {
1489
+ return await a.url(`/tallies/${_}/push`).post(I).json();
1477
1490
  }
1478
- async function $(I) {
1479
- return await i.url(`/products/${I}`).get().json();
1491
+ async function L(_) {
1492
+ return await o.url(`/products/${_}`).get().json();
1480
1493
  }
1481
- async function L(I) {
1482
- return i.url(`/products/${I}/auto-onboard`).post().json();
1494
+ async function R(_) {
1495
+ return o.url(`/products/${_}/auto-onboard`).post().json();
1483
1496
  }
1484
1497
  return {
1485
- getEntitlements: a,
1486
- getEntitlement: s,
1487
- getEntitlementAccess: h,
1488
- getContracts: p,
1489
- getContract: u,
1490
- getBills: c,
1491
- getBill: f,
1492
- setUserMetadata: d,
1493
- deleteUserMetadata: w,
1494
- getUserMetadata: k,
1495
- listUserMetadata: v,
1496
- getTags: _,
1497
- deleteTag: S,
1498
- setTag: g,
1499
- getTally: l,
1500
- getTallies: b,
1501
- deleteTally: T,
1502
- pushTally: j,
1503
- getProduct: $,
1504
- autoOnboardProduct: L
1498
+ getEntitlements: s,
1499
+ getEntitlement: h,
1500
+ getEntitlementAccess: p,
1501
+ getContracts: u,
1502
+ getContract: c,
1503
+ getBills: f,
1504
+ getBill: d,
1505
+ setUserMetadata: w,
1506
+ deleteUserMetadata: k,
1507
+ getUserMetadata: v,
1508
+ listUserMetadata: E,
1509
+ getTags: S,
1510
+ deleteTag: g,
1511
+ setTag: l,
1512
+ getTally: b,
1513
+ getTallies: P,
1514
+ deleteTally: j,
1515
+ pushTally: $,
1516
+ getProduct: L,
1517
+ autoOnboardProduct: R
1505
1518
  };
1506
1519
  }
1507
1520
  const Yn = "@sesamy/sesamy-js", zt = "1.3.2";
@@ -1577,9 +1590,9 @@ tr.bind(null, TypeError);
1577
1590
  tr.bind(null, SyntaxError);
1578
1591
  function it(t, e) {
1579
1592
  var n = t instanceof Element || t instanceof HTMLDocument;
1580
- return n && e ? Oi(t, e) : n;
1593
+ return n && e ? Ti(t, e) : n;
1581
1594
  }
1582
- function Oi(t, e) {
1595
+ function Ti(t, e) {
1583
1596
  return e === void 0 && (e = ""), t && t.nodeName === e.toUpperCase();
1584
1597
  }
1585
1598
  function ot(t) {
@@ -1592,7 +1605,7 @@ ot(it, "form");
1592
1605
  ot(it, "button");
1593
1606
  ot(it, "input");
1594
1607
  ot(it, "select");
1595
- function Ti(t) {
1608
+ function Oi(t) {
1596
1609
  return t ? er(t) ? t : [t] : [];
1597
1610
  }
1598
1611
  function rn(t) {
@@ -1662,15 +1675,15 @@ function Ai(t, e) {
1662
1675
  return n = this, r = arguments, p <= 0 ? (clearTimeout(o), o = null, a = h, i = t.apply(n, r)) : o || (o = setTimeout(s, p)), i;
1663
1676
  };
1664
1677
  }
1665
- var De = "global", Oe = me + "global" + me, Te = typeof self === nn && self.self === self && self || typeof global === nn && global.global === global && global || void 0;
1678
+ var De = "global", Te = me + "global" + me, Oe = typeof self === nn && self.self === self && self || typeof global === nn && global.global === global && global || void 0;
1666
1679
  function ge(t) {
1667
- return Te[Oe][t];
1680
+ return Oe[Te][t];
1668
1681
  }
1669
1682
  function ye(t, e) {
1670
- return Te[Oe][t] = e;
1683
+ return Oe[Te][t] = e;
1671
1684
  }
1672
1685
  function je(t) {
1673
- delete Te[Oe][t];
1686
+ delete Oe[Te][t];
1674
1687
  }
1675
1688
  function xe(t, e, n) {
1676
1689
  var r;
@@ -1683,7 +1696,7 @@ function xe(t, e, n) {
1683
1696
  }
1684
1697
  return r || n;
1685
1698
  }
1686
- Te[Oe] || (Te[Oe] = {});
1699
+ Oe[Te] || (Oe[Te] = {});
1687
1700
  var Je = {};
1688
1701
  function Nt(t) {
1689
1702
  if (typeof Je[t] !== Fe)
@@ -1857,7 +1870,7 @@ function Ui(t) {
1857
1870
  function un(t) {
1858
1871
  return { userId: t.getItem(fe), anonymousId: t.getItem(oe), traits: t.getItem(Ie) };
1859
1872
  }
1860
- var Ot = function(t) {
1873
+ var Tt = function(t) {
1861
1874
  return me + "TEMP" + me + t;
1862
1875
  };
1863
1876
  function Li(t) {
@@ -1869,7 +1882,7 @@ function Li(t) {
1869
1882
  if (s.type === C.reset && ([fe, Ie, oe].forEach(function(d) {
1870
1883
  r(d);
1871
1884
  }), [ne, ke, "traits"].forEach(function(d) {
1872
- je(Ot(d));
1885
+ je(Tt(d));
1873
1886
  })), s.type === C.identify) {
1874
1887
  i(oe) || n(oe, at());
1875
1888
  var c = i(fe), f = i(Ie) || {};
@@ -1906,16 +1919,16 @@ function ir(t, e, n) {
1906
1919
  p.processIndex.forEach(function(c) {
1907
1920
  var f = s.actions[c], d = f.plugin, w = f.payload.type, k = i[d][w];
1908
1921
  if (k && V(k)) {
1909
- var v, _ = function(l, b) {
1910
- return l === void 0 && (l = {}), b === void 0 && (b = {}), [ne, ke].reduce(function(T, j) {
1911
- return l.hasOwnProperty(j) && b[j] && b[j] !== l[j] && (T[j] = b[j]), T;
1922
+ var v, E = function(l, b) {
1923
+ return l === void 0 && (l = {}), b === void 0 && (b = {}), [ne, ke].reduce(function(P, j) {
1924
+ return l.hasOwnProperty(j) && b[j] && b[j] !== l[j] && (P[j] = b[j]), P;
1912
1925
  }, l);
1913
- }(f.payload, h), S = r[_.meta.rid];
1914
- if (!S && (v = k({ payload: _, config: a[d].config, instance: n, abort: Ri })) && X(v) && v.abort)
1915
- return void (r[_.meta.rid] = !0);
1926
+ }(f.payload, h), S = r[E.meta.rid];
1927
+ if (!S && (v = k({ payload: E, config: a[d].config, instance: n, abort: Ri })) && X(v) && v.abort)
1928
+ return void (r[E.meta.rid] = !0);
1916
1929
  if (!S) {
1917
1930
  var g = w + ":" + d;
1918
- t.dispatch(A({}, _, { type: g, _: { called: g, from: "queueDrain" } }));
1931
+ t.dispatch(A({}, E, { type: g, _: { called: g, from: "queueDrain" } }));
1919
1932
  }
1920
1933
  }
1921
1934
  });
@@ -1935,73 +1948,73 @@ var pt = function(t) {
1935
1948
  f && (d = a.during.map(function(v) {
1936
1949
  return v.pluginName;
1937
1950
  }));
1938
- var w = /* @__PURE__ */ function(v, _) {
1951
+ var w = /* @__PURE__ */ function(v, E) {
1939
1952
  return function(S, g, l) {
1940
- var b = g.config, T = g.name, j = T + "." + S.type;
1953
+ var b = g.config, P = g.name, j = P + "." + S.type;
1941
1954
  l && (j = l.event);
1942
- var $ = S.type.match(Se) ? /* @__PURE__ */ function(L, I, x, E, N) {
1943
- return function(R, P) {
1944
- var K = E ? E.name : L, H = P && Me(P) ? P : x;
1945
- if (E && (!(H = P && Me(P) ? P : [L]).includes(L) || H.length !== 1))
1946
- throw new Error("Method " + I + " can only abort " + L + " plugin. " + JSON.stringify(H) + " input valid");
1947
- return A({}, N, { abort: { reason: R, plugins: H, caller: I, _: K } });
1955
+ var $ = S.type.match(Se) ? /* @__PURE__ */ function(L, R, _, I, x) {
1956
+ return function(D, T) {
1957
+ var W = I ? I.name : L, H = T && Me(T) ? T : _;
1958
+ if (I && (!(H = T && Me(T) ? T : [L]).includes(L) || H.length !== 1))
1959
+ throw new Error("Method " + R + " can only abort " + L + " plugin. " + JSON.stringify(H) + " input valid");
1960
+ return A({}, x, { abort: { reason: D, plugins: H, caller: R, _: W } });
1948
1961
  };
1949
- }(T, j, _, l, S) : /* @__PURE__ */ function(L, I) {
1962
+ }(P, j, E, l, S) : /* @__PURE__ */ function(L, R) {
1950
1963
  return function() {
1951
- throw new Error(L.type + " action not cancellable. Remove abort in " + I);
1964
+ throw new Error(L.type + " action not cancellable. Remove abort in " + R);
1952
1965
  };
1953
1966
  }(S, j);
1954
1967
  return { payload: Mi(S), instance: v, config: b || {}, abort: $ };
1955
1968
  };
1956
- }(r, d), k = e.exact.reduce(function(v, _) {
1957
- var S = _.pluginName, g = _.methodName, l = !1;
1969
+ }(r, d), k = e.exact.reduce(function(v, E) {
1970
+ var S = E.pluginName, g = E.methodName, l = !1;
1958
1971
  return g.match(/^initialize/) || g.match(/^reset/) || (l = !p[S].loaded), u.offline && g.match(/^(page|track|identify)/) && (l = !0), v["" + S] = l, v;
1959
1972
  }, {});
1960
- return Promise.resolve(e.exact.reduce(function(v, _, S) {
1973
+ return Promise.resolve(e.exact.reduce(function(v, E, S) {
1961
1974
  try {
1962
- var g = _.pluginName;
1975
+ var g = E.pluginName;
1963
1976
  return Promise.resolve(v).then(function(l) {
1964
1977
  function b() {
1965
1978
  return Promise.resolve(l);
1966
1979
  }
1967
- var T = function() {
1980
+ var P = function() {
1968
1981
  if (e.namespaced && e.namespaced[g])
1969
1982
  return Promise.resolve(e.namespaced[g].reduce(function(j, $, L) {
1970
1983
  try {
1971
- return Promise.resolve(j).then(function(I) {
1972
- return $.method && V($.method) ? (function(R, P) {
1973
- var K = yn(R);
1974
- if (K && K.name === P) {
1975
- var H = yn(K.method);
1976
- throw new Error([P + " plugin is calling method " + R, "Plugins cant call self", "Use " + K.method + " " + (H ? "or " + H.method : "") + " in " + P + " plugin insteadof " + R].join(`
1984
+ return Promise.resolve(j).then(function(R) {
1985
+ return $.method && V($.method) ? (function(D, T) {
1986
+ var W = yn(D);
1987
+ if (W && W.name === T) {
1988
+ var H = yn(W.method);
1989
+ throw new Error([T + " plugin is calling method " + D, "Plugins cant call self", "Use " + W.method + " " + (H ? "or " + H.method : "") + " in " + T + " plugin insteadof " + D].join(`
1977
1990
  `));
1978
1991
  }
1979
- }($.methodName, $.pluginName), Promise.resolve($.method({ payload: I, instance: r, abort: (x = I, E = g, N = $.pluginName, function(R, P) {
1980
- return A({}, x, { abort: { reason: R, plugins: P || [E], caller: c, from: N || E } });
1981
- }), config: fn($.pluginName, p, o), plugins: p })).then(function(R) {
1982
- var P = X(R) ? R : {};
1983
- return Promise.resolve(A({}, I, P));
1984
- })) : I;
1985
- var x, E, N;
1992
+ }($.methodName, $.pluginName), Promise.resolve($.method({ payload: R, instance: r, abort: (_ = R, I = g, x = $.pluginName, function(D, T) {
1993
+ return A({}, _, { abort: { reason: D, plugins: T || [I], caller: c, from: x || I } });
1994
+ }), config: fn($.pluginName, p, o), plugins: p })).then(function(D) {
1995
+ var T = X(D) ? D : {};
1996
+ return Promise.resolve(A({}, R, T));
1997
+ })) : R;
1998
+ var _, I, x;
1986
1999
  });
1987
- } catch (I) {
1988
- return Promise.reject(I);
2000
+ } catch (R) {
2001
+ return Promise.reject(R);
1989
2002
  }
1990
2003
  }, Promise.resolve(n))).then(function(j) {
1991
2004
  l[g] = j;
1992
2005
  });
1993
2006
  l[g] = n;
1994
2007
  }();
1995
- return T && T.then ? T.then(b) : b();
2008
+ return P && P.then ? P.then(b) : b();
1996
2009
  });
1997
2010
  } catch (l) {
1998
2011
  return Promise.reject(l);
1999
2012
  }
2000
2013
  }, Promise.resolve({}))).then(function(v) {
2001
- return Promise.resolve(e.exact.reduce(function(_, S, g) {
2014
+ return Promise.resolve(e.exact.reduce(function(E, S, g) {
2002
2015
  try {
2003
- var l = e.exact.length === g + 1, b = S.pluginName, T = o[b];
2004
- return Promise.resolve(_).then(function(j) {
2016
+ var l = e.exact.length === g + 1, b = S.pluginName, P = o[b];
2017
+ return Promise.resolve(E).then(function(j) {
2005
2018
  var $ = v[b] ? v[b] : {};
2006
2019
  if (f && ($ = j), gt($, b))
2007
2020
  return mt({ data: $, method: c, instance: r, pluginName: b, store: s }), Promise.resolve(j);
@@ -2010,28 +2023,28 @@ var pt = function(t) {
2010
2023
  if (k.hasOwnProperty(b) && k[b] === !0)
2011
2024
  return s.dispatch({ type: "queue", plugin: b, payload: $, _: { called: "queue", from: "queueMechanism" } }), Promise.resolve(j);
2012
2025
  var L = w(v[b], o[b]);
2013
- return Promise.resolve(T[c]({ abort: L.abort, payload: $, instance: r, config: fn(b, p, o), plugins: p })).then(function(I) {
2014
- var x = X(I) ? I : {}, E = A({}, j, x), N = v[b];
2015
- if (gt(N, b))
2016
- mt({ data: N, method: c, instance: r, pluginName: b, store: s });
2026
+ return Promise.resolve(P[c]({ abort: L.abort, payload: $, instance: r, config: fn(b, p, o), plugins: p })).then(function(R) {
2027
+ var _ = X(R) ? R : {}, I = A({}, j, _), x = v[b];
2028
+ if (gt(x, b))
2029
+ mt({ data: x, method: c, instance: r, pluginName: b, store: s });
2017
2030
  else {
2018
- var R = c + ":" + b;
2019
- (R.match(/:/g) || []).length < 2 && !c.match(dn) && !c.match(hn) && r.dispatch(A({}, f ? E : $, { type: R, _: { called: R, from: "submethod" } }));
2031
+ var D = c + ":" + b;
2032
+ (D.match(/:/g) || []).length < 2 && !c.match(dn) && !c.match(hn) && r.dispatch(A({}, f ? I : $, { type: D, _: { called: D, from: "submethod" } }));
2020
2033
  }
2021
- return Promise.resolve(E);
2034
+ return Promise.resolve(I);
2022
2035
  });
2023
2036
  });
2024
2037
  } catch (j) {
2025
2038
  return Promise.reject(j);
2026
2039
  }
2027
- }, Promise.resolve(n))).then(function(_) {
2040
+ }, Promise.resolve(n))).then(function(E) {
2028
2041
  if (!(c.match(Se) || c.match(/^registerPlugin/) || c.match(hn) || c.match(dn) || c.match(/^params/) || c.match(/^userIdChanged/))) {
2029
- if (h.plugins.includes(c), _._ && _._.originalAction === c)
2030
- return _;
2031
- var S = A({}, _, { _: { originalAction: _.type, called: _.type, from: "engineEnd" } });
2032
- or(_, e.exact.length) && !c.match(/End$/) && (S = A({}, S, { type: _.type + "Aborted" })), s.dispatch(S);
2042
+ if (h.plugins.includes(c), E._ && E._.originalAction === c)
2043
+ return E;
2044
+ var S = A({}, E, { _: { originalAction: E.type, called: E.type, from: "engineEnd" } });
2045
+ or(E, e.exact.length) && !c.match(/End$/) && (S = A({}, S, { type: E.type + "Aborted" })), s.dispatch(S);
2033
2046
  }
2034
- return _;
2047
+ return E;
2035
2048
  });
2036
2049
  });
2037
2050
  } catch (v) {
@@ -2101,14 +2114,14 @@ function Zi(t, e, n) {
2101
2114
  return u.includes(l);
2102
2115
  }).map(function(l) {
2103
2116
  return f[l];
2104
- }), k = [], v = [], _ = a.disabled, S = w.map(function(l) {
2105
- var b = l.loaded, T = l.name, j = l.config;
2117
+ }), k = [], v = [], E = a.disabled, S = w.map(function(l) {
2118
+ var b = l.loaded, P = l.name, j = l.config;
2106
2119
  return rr(l, function() {
2107
2120
  return b({ config: j });
2108
2121
  }, 1e4).then(function($) {
2109
- return r[T] || (i.dispatch({ type: C.pluginReadyType(T), name: T, events: Object.keys(l).filter(function(L) {
2122
+ return r[P] || (i.dispatch({ type: C.pluginReadyType(P), name: P, events: Object.keys(l).filter(function(L) {
2110
2123
  return !Et.includes(L);
2111
- }) }), r[T] = !0), k = k.concat(T), l;
2124
+ }) }), r[P] = !0), k = k.concat(P), l;
2112
2125
  }).catch(function($) {
2113
2126
  if ($ instanceof Error)
2114
2127
  throw new Error($);
@@ -2116,9 +2129,9 @@ function Zi(t, e, n) {
2116
2129
  });
2117
2130
  });
2118
2131
  Promise.all(S).then(function(l) {
2119
- var b = { plugins: k, failed: v, disabled: _ };
2132
+ var b = { plugins: k, failed: v, disabled: E };
2120
2133
  setTimeout(function() {
2121
- d.length === S.length + _.length && i.dispatch(A({}, { type: C.ready }, b));
2134
+ d.length === S.length + E.length && i.dispatch(A({}, { type: C.ready }, b));
2122
2135
  }, 0);
2123
2136
  });
2124
2137
  }
@@ -2126,54 +2139,54 @@ function Zi(t, e, n) {
2126
2139
  if (p !== C.bootstrap)
2127
2140
  return /^ready:([^:]*)$/.test(p) && setTimeout(function() {
2128
2141
  return ir(i, e, t);
2129
- }, 0), Promise.resolve(function(l, b, T, j, $) {
2142
+ }, 0), Promise.resolve(function(l, b, P, j, $) {
2130
2143
  try {
2131
- var L = V(b) ? b() : b, I = l.type, x = I.replace(Se, "");
2144
+ var L = V(b) ? b() : b, R = l.type, _ = R.replace(Se, "");
2132
2145
  if (l._ && l._.called)
2133
2146
  return Promise.resolve(l);
2134
- var E = T.getState(), N = (K = L, (H = E.plugins) === void 0 && (H = {}), (Ce = l.options) === void 0 && (Ce = {}), Object.keys(K).filter(function(m) {
2147
+ var I = P.getState(), x = (W = L, (H = I.plugins) === void 0 && (H = {}), (Ce = l.options) === void 0 && (Ce = {}), Object.keys(W).filter(function(m) {
2135
2148
  var y = Ce.plugins || {};
2136
2149
  return ki(y[m]) ? y[m] : y.all !== !1 && (!H[m] || H[m].enabled !== !1);
2137
2150
  }).map(function(m) {
2138
- return K[m];
2151
+ return W[m];
2139
2152
  }));
2140
- I === C.initializeStart && l.fromEnable && (N = Object.keys(E.plugins).filter(function(m) {
2141
- var y = E.plugins[m];
2153
+ R === C.initializeStart && l.fromEnable && (x = Object.keys(I.plugins).filter(function(m) {
2154
+ var y = I.plugins[m];
2142
2155
  return l.plugins.includes(m) && !y.initialized;
2143
2156
  }).map(function(m) {
2144
2157
  return L[m];
2145
2158
  }));
2146
- var R = N.map(function(m) {
2159
+ var D = x.map(function(m) {
2147
2160
  return m.name;
2148
- }), P = function(m, y, O) {
2149
- var z = mn(m).map(function(D) {
2150
- return pn(D, y);
2161
+ }), T = function(m, y, O) {
2162
+ var z = mn(m).map(function(N) {
2163
+ return pn(N, y);
2151
2164
  });
2152
- return y.reduce(function(D, U) {
2165
+ return y.reduce(function(N, U) {
2153
2166
  var F = U.name, Z = mn(m, F).map(function(Ae) {
2154
2167
  return pn(Ae, y);
2155
- }), W = Z[0], M = Z[1], q = Z[2];
2156
- return W.length && (D.beforeNS[F] = W), M.length && (D.duringNS[F] = M), q.length && (D.afterNS[F] = q), D;
2168
+ }), K = Z[0], M = Z[1], q = Z[2];
2169
+ return K.length && (N.beforeNS[F] = K), M.length && (N.duringNS[F] = M), q.length && (N.afterNS[F] = q), N;
2157
2170
  }, { before: z[0], beforeNS: {}, during: z[1], duringNS: {}, after: z[2], afterNS: {} });
2158
- }(I, N);
2159
- return Promise.resolve(pt({ action: l, data: { exact: P.before, namespaced: P.beforeNS }, state: E, allPlugins: L, allMatches: P, instance: T, store: j, EVENTS: $ })).then(function(m) {
2171
+ }(R, x);
2172
+ return Promise.resolve(pt({ action: l, data: { exact: T.before, namespaced: T.beforeNS }, state: I, allPlugins: L, allMatches: T, instance: P, store: j, EVENTS: $ })).then(function(m) {
2160
2173
  function y() {
2161
- var D = function() {
2162
- if (I.match(Se))
2163
- return Promise.resolve(pt({ action: A({}, O, { type: x + "End" }), data: { exact: P.after, namespaced: P.afterNS }, state: E, allPlugins: L, allMatches: P, instance: T, store: j, EVENTS: $ })).then(function(U) {
2174
+ var N = function() {
2175
+ if (R.match(Se))
2176
+ return Promise.resolve(pt({ action: A({}, O, { type: _ + "End" }), data: { exact: T.after, namespaced: T.afterNS }, state: I, allPlugins: L, allMatches: T, instance: P, store: j, EVENTS: $ })).then(function(U) {
2164
2177
  U.meta && U.meta.hasCallback && ln(U.meta.rid, { payload: U });
2165
2178
  });
2166
2179
  }();
2167
- return D && D.then ? D.then(function() {
2180
+ return N && N.then ? N.then(function() {
2168
2181
  return m;
2169
2182
  }) : m;
2170
2183
  }
2171
- if (or(m, R.length))
2184
+ if (or(m, D.length))
2172
2185
  return m;
2173
2186
  var O, z = function() {
2174
- if (I !== x)
2175
- return Promise.resolve(pt({ action: A({}, m, { type: x }), data: { exact: P.during, namespaced: P.duringNS }, state: E, allPlugins: L, allMatches: P, instance: T, store: j, EVENTS: $ })).then(function(D) {
2176
- O = D;
2187
+ if (R !== _)
2188
+ return Promise.resolve(pt({ action: A({}, m, { type: _ }), data: { exact: T.during, namespaced: T.duringNS }, state: I, allPlugins: L, allMatches: T, instance: P, store: j, EVENTS: $ })).then(function(N) {
2189
+ O = N;
2177
2190
  });
2178
2191
  O = m;
2179
2192
  }();
@@ -2182,7 +2195,7 @@ function Zi(t, e, n) {
2182
2195
  } catch (m) {
2183
2196
  return Promise.reject(m);
2184
2197
  }
2185
- var K, H, Ce;
2198
+ var W, H, Ce;
2186
2199
  }(a, e, t, i, n)).then(function(l) {
2187
2200
  return s = 1, o(l);
2188
2201
  });
@@ -2374,7 +2387,7 @@ function hr() {
2374
2387
  return function(e, n, r) {
2375
2388
  var i = t(e, n, r), o = i.dispatch;
2376
2389
  return Object.assign(i, { dispatch: function(a) {
2377
- return Te[Oe].analytics.push(a.action || a), o(a);
2390
+ return Oe[Te].analytics.push(a.action || a), o(a);
2378
2391
  } });
2379
2392
  };
2380
2393
  };
@@ -2415,20 +2428,20 @@ function ro(t) {
2415
2428
  m.pluginEnabled[y.name] = !(y.enabled === !1 || y.config.enabled === !1), delete y.enabled, y.methods && (m.methods[y.name] = Object.keys(y.methods).reduce(function(U, F) {
2416
2429
  var Z;
2417
2430
  return U[F] = (Z = y.methods[F], function() {
2418
- for (var W = Array.prototype.slice.call(arguments), M = new Array(Z.length), q = 0; q < W.length; q++)
2419
- M[q] = W[q];
2431
+ for (var K = Array.prototype.slice.call(arguments), M = new Array(Z.length), q = 0; q < K.length; q++)
2432
+ M[q] = K[q];
2420
2433
  return M[M.length] = b, Z.apply({ instance: b }, M);
2421
2434
  }), U;
2422
2435
  }, {}), delete y.methods);
2423
- var z = Object.keys(y).concat(O), D = new Set(m.events.concat(z));
2424
- if (m.events = Array.from(D), m.pluginsArray = m.pluginsArray.concat(y), m.plugins[y.name])
2436
+ var z = Object.keys(y).concat(O), N = new Set(m.events.concat(z));
2437
+ if (m.events = Array.from(N), m.pluginsArray = m.pluginsArray.concat(y), m.plugins[y.name])
2425
2438
  throw new Error(y.name + "AlreadyLoaded");
2426
2439
  return m.plugins[y.name] = y, m.plugins[y.name].loaded || (m.plugins[y.name].loaded = function() {
2427
2440
  return !0;
2428
2441
  }), m;
2429
2442
  }, { plugins: {}, pluginEnabled: {}, methods: {}, pluginsArray: [], middlewares: [], events: [] }), i = t.storage ? t.storage : { getItem: ge, setItem: ye, removeItem: je }, o = /* @__PURE__ */ function(m) {
2430
2443
  return function(y, O, z) {
2431
- return O.getState("user")[y] || (z && X(z) && z[y] ? z[y] : un(m)[y] || ge(Ot(y)) || null);
2444
+ return O.getState("user")[y] || (z && X(z) && z[y] ? z[y] : un(m)[y] || ge(Tt(y)) || null);
2432
2445
  };
2433
2446
  }(i), a = r.plugins, s = r.events.filter(function(m) {
2434
2447
  return !Et.includes(m);
@@ -2438,44 +2451,44 @@ function ro(t) {
2438
2451
  return a;
2439
2452
  }, c = new Ki(), f = c.addMiddleware, d = c.removeMiddleware, w = c.dynamicMiddlewares, k = function() {
2440
2453
  throw new Error("Abort disabled inListener");
2441
- }, v = xi(), _ = un(i), S = A({}, _, n, v.an_uid ? { userId: v.an_uid } : {}, v.an_aid ? { anonymousId: v.an_aid } : {});
2454
+ }, v = xi(), E = un(i), S = A({}, E, n, v.an_uid ? { userId: v.an_uid } : {}, v.an_aid ? { anonymousId: v.an_aid } : {});
2442
2455
  S.anonymousId || (S.anonymousId = at());
2443
2456
  var g = A({ enable: function(m, y) {
2444
2457
  return new Promise(function(O) {
2445
- P.dispatch({ type: C.enablePlugin, plugins: yt(m), _: { originalAction: C.enablePlugin } }, O, [y]);
2458
+ T.dispatch({ type: C.enablePlugin, plugins: yt(m), _: { originalAction: C.enablePlugin } }, O, [y]);
2446
2459
  });
2447
2460
  }, disable: function(m, y) {
2448
2461
  return new Promise(function(O) {
2449
- P.dispatch({ type: C.disablePlugin, plugins: yt(m), _: { originalAction: C.disablePlugin } }, O, [y]);
2462
+ T.dispatch({ type: C.disablePlugin, plugins: yt(m), _: { originalAction: C.disablePlugin } }, O, [y]);
2450
2463
  });
2451
2464
  } }, r.methods), l = !1, b = { identify: function(m, y, O, z) {
2452
2465
  try {
2453
- var D = ie(m) ? m : null, U = X(m) ? m : y, F = O || {}, Z = b.user();
2454
- ye(Ot(ne), D);
2455
- var W = D || U.userId || o(ne, b, U);
2466
+ var N = ie(m) ? m : null, U = X(m) ? m : y, F = O || {}, Z = b.user();
2467
+ ye(Tt(ne), N);
2468
+ var K = N || U.userId || o(ne, b, U);
2456
2469
  return Promise.resolve(new Promise(function(M) {
2457
- P.dispatch(A({ type: C.identifyStart, userId: W, traits: U || {}, options: F, anonymousId: Z.anonymousId }, Z.id && Z.id !== D && { previousId: Z.id }), M, [y, O, z]);
2470
+ T.dispatch(A({ type: C.identifyStart, userId: K, traits: U || {}, options: F, anonymousId: Z.anonymousId }, Z.id && Z.id !== N && { previousId: Z.id }), M, [y, O, z]);
2458
2471
  }));
2459
2472
  } catch (M) {
2460
2473
  return Promise.reject(M);
2461
2474
  }
2462
2475
  }, track: function(m, y, O, z) {
2463
2476
  try {
2464
- var D = X(m) ? m.event : m;
2465
- if (!D || !ie(D))
2477
+ var N = X(m) ? m.event : m;
2478
+ if (!N || !ie(N))
2466
2479
  throw new Error("EventMissing");
2467
2480
  var U = X(m) ? m : y || {}, F = X(O) ? O : {};
2468
2481
  return Promise.resolve(new Promise(function(Z) {
2469
- P.dispatch({ type: C.trackStart, event: D, properties: U, options: F, userId: o(ne, b, y), anonymousId: o(ke, b, y) }, Z, [y, O, z]);
2482
+ T.dispatch({ type: C.trackStart, event: N, properties: U, options: F, userId: o(ne, b, y), anonymousId: o(ke, b, y) }, Z, [y, O, z]);
2470
2483
  }));
2471
2484
  } catch (Z) {
2472
2485
  return Promise.reject(Z);
2473
2486
  }
2474
2487
  }, page: function(m, y, O) {
2475
2488
  try {
2476
- var z = X(m) ? m : {}, D = X(y) ? y : {};
2489
+ var z = X(m) ? m : {}, N = X(y) ? y : {};
2477
2490
  return Promise.resolve(new Promise(function(U) {
2478
- P.dispatch({ type: C.pageStart, properties: Gi(z), options: D, userId: o(ne, b, z), anonymousId: o(ke, b, z) }, U, [m, y, O]);
2491
+ T.dispatch({ type: C.pageStart, properties: Gi(z), options: N, userId: o(ne, b, z), anonymousId: o(ke, b, z) }, U, [m, y, O]);
2479
2492
  }));
2480
2493
  } catch (U) {
2481
2494
  return Promise.reject(U);
@@ -2489,7 +2502,7 @@ function ro(t) {
2489
2502
  return m ? tn(y, m) : y;
2490
2503
  }, reset: function(m) {
2491
2504
  return new Promise(function(y) {
2492
- P.dispatch({ type: C.resetStart }, y, m);
2505
+ T.dispatch({ type: C.resetStart }, y, m);
2493
2506
  });
2494
2507
  }, ready: function(m) {
2495
2508
  return l && m({ plugins: g, instance: b }), b.on(C.ready, function(y) {
@@ -2503,26 +2516,26 @@ function ro(t) {
2503
2516
  var O = /Start$|Start:/;
2504
2517
  if (m === "*") {
2505
2518
  var z = function(Z) {
2506
- return function(W) {
2519
+ return function(K) {
2507
2520
  return function(M) {
2508
- return M.type.match(O) && y({ payload: M, instance: b, plugins: a }), W(M);
2521
+ return M.type.match(O) && y({ payload: M, instance: b, plugins: a }), K(M);
2509
2522
  };
2510
2523
  };
2511
- }, D = function(Z) {
2512
- return function(W) {
2524
+ }, N = function(Z) {
2525
+ return function(K) {
2513
2526
  return function(M) {
2514
- return M.type.match(O) || y({ payload: M, instance: b, plugins: a }), W(M);
2527
+ return M.type.match(O) || y({ payload: M, instance: b, plugins: a }), K(M);
2515
2528
  };
2516
2529
  };
2517
2530
  };
2518
- return f(z, Xe), f(D, Ve), function() {
2519
- d(z, Xe), d(D, Ve);
2531
+ return f(z, Xe), f(N, Ve), function() {
2532
+ d(z, Xe), d(N, Ve);
2520
2533
  };
2521
2534
  }
2522
2535
  var U = m.match(O) ? Xe : Ve, F = function(Z) {
2523
- return function(W) {
2536
+ return function(K) {
2524
2537
  return function(M) {
2525
- return M.type === m && y({ payload: M, instance: b, plugins: a, abort: k }), W(M);
2538
+ return M.type === m && y({ payload: M, instance: b, plugins: a, abort: k }), K(M);
2526
2539
  };
2527
2540
  };
2528
2541
  };
@@ -2539,21 +2552,21 @@ function ro(t) {
2539
2552
  });
2540
2553
  return O;
2541
2554
  }, getState: function(m) {
2542
- var y = P.getState();
2555
+ var y = T.getState();
2543
2556
  return m ? tn(y, m) : Object.assign({}, y);
2544
2557
  }, dispatch: function(m) {
2545
2558
  var y = ie(m) ? { type: m } : m;
2546
2559
  if (qe.includes(y.type))
2547
2560
  throw new Error("reserved action " + y.type);
2548
2561
  var O = A({}, y, { _: A({ originalAction: y.type }, m._ || {}) });
2549
- P.dispatch(O);
2562
+ T.dispatch(O);
2550
2563
  }, enablePlugin: g.enable, disablePlugin: g.disable, plugins: g, storage: { getItem: i.getItem, setItem: function(m, y, O) {
2551
- P.dispatch({ type: C.setItemStart, key: m, value: y, options: O });
2564
+ T.dispatch({ type: C.setItemStart, key: m, value: y, options: O });
2552
2565
  }, removeItem: function(m, y) {
2553
- P.dispatch({ type: C.removeItemStart, key: m, options: y });
2566
+ T.dispatch({ type: C.removeItemStart, key: m, options: y });
2554
2567
  } }, setAnonymousId: function(m, y) {
2555
2568
  b.storage.setItem(oe, m, y);
2556
- }, events: { core: qe, plugins: s } }, T = r.middlewares.concat([function(m) {
2569
+ }, events: { core: qe, plugins: s } }, P = r.middlewares.concat([function(m) {
2557
2570
  return function(y) {
2558
2571
  return function(O) {
2559
2572
  return O.meta || (O.meta = In()), y(O);
@@ -2561,70 +2574,70 @@ function ro(t) {
2561
2574
  };
2562
2575
  }, w(Xe), Zi(b, u, { all: p, plugins: s }), Wi(i), Di(b), Li(b), w(Ve)]), j = { context: Qi, user: Ui(i), page: qi, track: Hi, plugins: Fi(u), queue: Vi }, $ = Pe, L = Pe;
2563
2576
  if (J && t.debug) {
2564
- var I = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
2565
- I && ($ = I({ trace: !0, traceLimit: 25 })), L = function() {
2577
+ var R = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
2578
+ R && ($ = R({ trace: !0, traceLimit: 25 })), L = function() {
2566
2579
  return arguments.length === 0 ? hr() : X(typeof arguments[0]) ? kn() : kn().apply(null, arguments);
2567
2580
  };
2568
2581
  }
2569
- var x, E = function(m) {
2582
+ var _, I = function(m) {
2570
2583
  return Object.keys(m).reduce(function(y, O) {
2571
2584
  return eo.includes(O) || (y[O] = m[O]), y;
2572
2585
  }, {});
2573
- }(t), N = r.pluginsArray.reduce(function(m, y) {
2574
- var O = y.name, z = y.config, D = y.loaded, U = r.pluginEnabled[O];
2575
- return m[O] = { enabled: U, initialized: !!U && !y.initialize, loaded: !!D({ config: z }), config: z }, m;
2576
- }, {}), R = { context: E, user: S, plugins: N }, P = nr(function(m) {
2586
+ }(t), x = r.pluginsArray.reduce(function(m, y) {
2587
+ var O = y.name, z = y.config, N = y.loaded, U = r.pluginEnabled[O];
2588
+ return m[O] = { enabled: U, initialized: !!U && !y.initialize, loaded: !!N({ config: z }), config: z }, m;
2589
+ }, {}), D = { context: I, user: S, plugins: x }, T = nr(function(m) {
2577
2590
  for (var y = Object.keys(m), O = {}, z = 0; z < y.length; z++) {
2578
- var D = y[z];
2579
- typeof m[D] === re && (O[D] = m[D]);
2591
+ var N = y[z];
2592
+ typeof m[N] === re && (O[N] = m[N]);
2580
2593
  }
2581
2594
  var U, F = Object.keys(O);
2582
2595
  try {
2583
2596
  (function(Z) {
2584
- Object.keys(Z).forEach(function(W) {
2585
- var M = Z[W];
2597
+ Object.keys(Z).forEach(function(K) {
2598
+ var M = Z[K];
2586
2599
  if (typeof M(void 0, { type: "@@redux/INIT" }) === te || typeof M(void 0, { type: $i }) === te)
2587
- throw new Error("reducer " + W + " " + te);
2600
+ throw new Error("reducer " + K + " " + te);
2588
2601
  });
2589
2602
  })(O);
2590
2603
  } catch (Z) {
2591
2604
  U = Z;
2592
2605
  }
2593
- return function(Z, W) {
2606
+ return function(Z, K) {
2594
2607
  if (Z === void 0 && (Z = {}), U)
2595
2608
  throw U;
2596
2609
  for (var M = !1, q = {}, Ae = 0; Ae < F.length; Ae++) {
2597
- var We = F[Ae], Wt = Z[We], ut = (0, O[We])(Wt, W);
2610
+ var We = F[Ae], Wt = Z[We], ut = (0, O[We])(Wt, K);
2598
2611
  if (typeof ut === te) {
2599
- var Sr = zi(We, W);
2612
+ var Sr = zi(We, K);
2600
2613
  throw new Error(Sr);
2601
2614
  }
2602
2615
  q[We] = ut, M = M || ut !== Wt;
2603
2616
  }
2604
2617
  return M ? q : Z;
2605
2618
  };
2606
- }(A({}, j, e)), R, L($(Ni.apply(void 0, T))));
2607
- P.dispatch = (x = P.dispatch, function(m, y, O) {
2619
+ }(A({}, j, e)), D, L($(Ni.apply(void 0, P))));
2620
+ T.dispatch = (_ = T.dispatch, function(m, y, O) {
2608
2621
  var z = A({}, m, { meta: In(m.meta, y, yt(O)) });
2609
- return x.apply(null, [z]);
2622
+ return _.apply(null, [z]);
2610
2623
  });
2611
- var K = Object.keys(a);
2612
- P.dispatch({ type: C.bootstrap, plugins: K, config: E, params: v, user: S, initialUser: n, persistedUser: _ });
2613
- var H = K.filter(function(m) {
2624
+ var W = Object.keys(a);
2625
+ T.dispatch({ type: C.bootstrap, plugins: W, config: I, params: v, user: S, initialUser: n, persistedUser: E });
2626
+ var H = W.filter(function(m) {
2614
2627
  return r.pluginEnabled[m];
2615
- }), Ce = K.filter(function(m) {
2628
+ }), Ce = W.filter(function(m) {
2616
2629
  return !r.pluginEnabled[m];
2617
2630
  });
2618
- return P.dispatch({ type: C.registerPlugins, plugins: K, enabled: r.pluginEnabled }), r.pluginsArray.map(function(m, y) {
2619
- var O = m.bootstrap, z = m.config, D = m.name;
2620
- O && V(O) && O({ instance: b, config: z, payload: m }), P.dispatch({ type: C.registerPluginType(D), name: D, enabled: r.pluginEnabled[D], plugin: m }), r.pluginsArray.length === y + 1 && P.dispatch({ type: C.initializeStart, plugins: H, disabled: Ce });
2631
+ return T.dispatch({ type: C.registerPlugins, plugins: W, enabled: r.pluginEnabled }), r.pluginsArray.map(function(m, y) {
2632
+ var O = m.bootstrap, z = m.config, N = m.name;
2633
+ O && V(O) && O({ instance: b, config: z, payload: m }), T.dispatch({ type: C.registerPluginType(N), name: N, enabled: r.pluginEnabled[N], plugin: m }), r.pluginsArray.length === y + 1 && T.dispatch({ type: C.initializeStart, plugins: H, disabled: Ce });
2621
2634
  }), no(function(m) {
2622
- P.dispatch({ type: m ? C.offline : C.online });
2635
+ T.dispatch({ type: m ? C.offline : C.online });
2623
2636
  }), function(m, y, O) {
2624
2637
  setInterval(function() {
2625
2638
  return ir(m, y, O);
2626
2639
  }, 3e3);
2627
- }(P, u, b), b;
2640
+ }(T, u, b), b;
2628
2641
  }
2629
2642
  var Xe = "before", Ve = "after", Ue = "cookie", ue = mr(), fr = st, io = st;
2630
2643
  function pr(t) {
@@ -2809,33 +2822,33 @@ function bo() {
2809
2822
  function ko(t) {
2810
2823
  if (t === void 0 && (t = {}), !J)
2811
2824
  return _t;
2812
- var e = On(), n = Tt(), r = En(), i = Ge(r, e), o = Ge(n, e), a = [], s = [], h = [], p = r, u = i, c = o, f = Object.keys(t);
2825
+ var e = Tn(), n = Ot(), r = En(), i = Ge(r, e), o = Ge(n, e), a = [], s = [], h = [], p = r, u = i, c = o, f = Object.keys(t);
2813
2826
  if (!f.length)
2814
2827
  return _t;
2815
2828
  var d = f.map(function(k) {
2816
2829
  return Number(k);
2817
2830
  }), w = Ai(function() {
2818
- var k = On(), v = function(E, N) {
2819
- return N.map(function(R) {
2820
- return R === 100 ? E - 5 : E * (R / 100);
2831
+ var k = Tn(), v = function(I, x) {
2832
+ return x.map(function(D) {
2833
+ return D === 100 ? I - 5 : I * (D / 100);
2821
2834
  });
2822
- }(k, d), _ = Tt(), S = En(), g = Ge(S, k), l = Ge(_, k);
2835
+ }(k, d), E = Ot(), S = En(), g = Ge(S, k), l = Ge(E, k);
2823
2836
  if (u = g > u ? g : u, c = l < c ? l : c, !(a.length >= d.length)) {
2824
- var b = p === S, T = "up";
2825
- b ? T = "initial" : p <= S && (T = "down");
2837
+ var b = p === S, P = "up";
2838
+ b ? P = "initial" : p <= S && (P = "down");
2826
2839
  var j = v, $ = d;
2827
- (T === "up" || b) && (j = v.slice().reverse(), $ = d.slice().reverse());
2828
- var L = $.reduce(function(E, N, R) {
2829
- var P = j[R];
2830
- return h.includes(N) && S <= P && (h = h.filter(function(K) {
2831
- return K !== N;
2832
- }), E.singleFunction = N), T === "down" && !a.includes(N) && S >= P && N > o ? (s.push(N), E.callbacks = E.callbacks.concat(N), E) : T === "up" && !a.includes(N) && S <= P && N <= g ? (E.foundFunc = [N], E) : (b && S >= P && E.foundFunc.length === 0 && (E.foundFunc = [N]), !s.includes(N) && S >= P && (s.push(N), E.singleFunction ? h.push(N) : E.singleFunction = N), E);
2833
- }, { foundFunc: [], singleFunction: null, callbacks: [], direction: T });
2834
- if (p = S, T === "down" && L.callbacks && L.callbacks.forEach(function(E) {
2835
- V(t[E]) && (t[E]({ trigger: E, direction: T, scrollMin: c, scrollMax: u, range: [c, u] }), a.push(E));
2840
+ (P === "up" || b) && (j = v.slice().reverse(), $ = d.slice().reverse());
2841
+ var L = $.reduce(function(I, x, D) {
2842
+ var T = j[D];
2843
+ return h.includes(x) && S <= T && (h = h.filter(function(W) {
2844
+ return W !== x;
2845
+ }), I.singleFunction = x), P === "down" && !a.includes(x) && S >= T && x > o ? (s.push(x), I.callbacks = I.callbacks.concat(x), I) : P === "up" && !a.includes(x) && S <= T && x <= g ? (I.foundFunc = [x], I) : (b && S >= T && I.foundFunc.length === 0 && (I.foundFunc = [x]), !s.includes(x) && S >= T && (s.push(x), I.singleFunction ? h.push(x) : I.singleFunction = x), I);
2846
+ }, { foundFunc: [], singleFunction: null, callbacks: [], direction: P });
2847
+ if (p = S, P === "down" && L.callbacks && L.callbacks.forEach(function(I) {
2848
+ V(t[I]) && (t[I]({ trigger: I, direction: P, scrollMin: c, scrollMax: u, range: [c, u] }), a.push(I));
2836
2849
  }), L.singleFunction) {
2837
- var I = L.singleFunction, x = L.direction;
2838
- V(t[I]) && t[I]({ trigger: I, direction: x, scrollMin: c, scrollMax: u, range: [c, u] }), a.push(I);
2850
+ var R = L.singleFunction, _ = L.direction;
2851
+ V(t[R]) && t[R]({ trigger: R, direction: _, scrollMin: c, scrollMax: u, range: [c, u] }), a.push(R);
2839
2852
  }
2840
2853
  }
2841
2854
  }, 500);
@@ -2843,16 +2856,16 @@ function ko(t) {
2843
2856
  return window.removeEventListener("scroll", w);
2844
2857
  };
2845
2858
  }
2846
- function Tt() {
2859
+ function Ot() {
2847
2860
  return J ? document.body.scrollTop || document.documentElement.scrollTop : 0;
2848
2861
  }
2849
2862
  function Io() {
2850
2863
  return J ? window.innerHeight || document.documentElement.clientHeight : 0;
2851
2864
  }
2852
2865
  function En() {
2853
- return Math.round(Tt() + Io());
2866
+ return Math.round(Ot() + Io());
2854
2867
  }
2855
- function On() {
2868
+ function Tn() {
2856
2869
  if (!J)
2857
2870
  return 0;
2858
2871
  var t = document.body, e = document.documentElement;
@@ -2861,7 +2874,7 @@ function On() {
2861
2874
  function Ge(t, e) {
2862
2875
  return Math.round(t / e * 100);
2863
2876
  }
2864
- var Tn = "EventListener";
2877
+ var On = "EventListener";
2865
2878
  function So(t) {
2866
2879
  return function(e, n, r, i) {
2867
2880
  var o = r || _t, a = i || !1;
@@ -2875,7 +2888,7 @@ function So(t) {
2875
2888
  var p = [];
2876
2889
  return function u(c) {
2877
2890
  c && (p = []);
2878
- for (var f = c ? "add" + Tn : "remove" + Tn, d = 0; d < h.length; d++) {
2891
+ for (var f = c ? "add" + On : "remove" + On, d = 0; d < h.length; d++) {
2879
2892
  var w = h[d];
2880
2893
  p[d] = c ? a && a.once ? _o(o) : o : p[d] || o;
2881
2894
  for (var k = 0; k < s.length; k++)
@@ -2896,7 +2909,7 @@ function tt(t, e) {
2896
2909
  r[i] = t[i];
2897
2910
  return r;
2898
2911
  }
2899
- var o = Ti(t);
2912
+ var o = Oi(t);
2900
2913
  return e ? o.map(function(a) {
2901
2914
  return ie(a) ? tt(a, !0) : a;
2902
2915
  }).flat() : o;
@@ -2920,7 +2933,7 @@ var vr = typeof window > "u", Pn = "hidden";
2920
2933
  function Eo(t) {
2921
2934
  if (vr)
2922
2935
  return !1;
2923
- var e = Oo(), n = "".concat(e.replace(/[H|h]idden/, ""), "visibilitychange"), r = function() {
2936
+ var e = To(), n = "".concat(e.replace(/[H|h]idden/, ""), "visibilitychange"), r = function() {
2924
2937
  return t(!!document[e]);
2925
2938
  }, i = function() {
2926
2939
  return document.addEventListener(n, r);
@@ -2929,14 +2942,14 @@ function Eo(t) {
2929
2942
  return document.removeEventListener(n, r), i;
2930
2943
  };
2931
2944
  }
2932
- function Oo() {
2945
+ function To() {
2933
2946
  var t = ["webkit", "moz", "ms", "o"];
2934
2947
  return vr || Pn in document ? Pn : t.reduce(function(e, n) {
2935
2948
  var r = n + "Hidden";
2936
2949
  return !e && r in document ? r : e;
2937
2950
  }, null);
2938
2951
  }
2939
- var To = ["mousemove", "mousedown", "touchmove", "touchstart", "touchend", "keydown"];
2952
+ var Oo = ["mousemove", "mousedown", "touchmove", "touchstart", "touchend", "keydown"];
2940
2953
  function Po(t, e) {
2941
2954
  e === void 0 && (e = {});
2942
2955
  var n = /* @__PURE__ */ function(a, s) {
@@ -2951,7 +2964,7 @@ function Po(t, e) {
2951
2964
  var a = Eo(function(s) {
2952
2965
  s || n({ type: "tabVisible" });
2953
2966
  });
2954
- return r = [a].concat(To.map(function(s) {
2967
+ return r = [a].concat(Oo.map(function(s) {
2955
2968
  return vt(document, s, n);
2956
2969
  })).concat(vt(window, "load", n)).concat(vt(window, "scroll", n, { capture: !0, passive: !0 })), o;
2957
2970
  }
@@ -3230,7 +3243,7 @@ function Uo(t) {
3230
3243
  deleteUserMetadata: w,
3231
3244
  getTally: k,
3232
3245
  getTallies: v,
3233
- pushTally: _,
3246
+ pushTally: E,
3234
3247
  deleteTally: S,
3235
3248
  getProduct: g,
3236
3249
  autoOnboardProduct: l
@@ -3272,7 +3285,7 @@ function Uo(t) {
3272
3285
  tallies: {
3273
3286
  get: k,
3274
3287
  list: v,
3275
- push: _,
3288
+ push: E,
3276
3289
  delete: S
3277
3290
  },
3278
3291
  products: {