@sesamy/sesamy-js 1.7.1 → 1.7.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.
- package/dist/sesamy-js.cjs +5 -5
- package/dist/sesamy-js.iife.js +5 -5
- package/dist/sesamy-js.mjs +376 -368
- package/package.json +1 -1
package/dist/sesamy-js.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var B = (t, e, n) => (
|
|
1
|
+
var Pr = Object.defineProperty;
|
|
2
|
+
var jr = (t, e, n) => e in t ? Pr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var B = (t, e, n) => (jr(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
4
4
|
function We(t, e) {
|
|
5
5
|
const n = new CustomEvent(t, {
|
|
6
6
|
detail: e,
|
|
@@ -27,7 +27,7 @@ function xt(t) {
|
|
|
27
27
|
function At(t, e) {
|
|
28
28
|
return t(e = { exports: {} }, e.exports), e.exports;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
30
|
+
var ue = At(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 ce = At(function(t, e) {
|
|
|
58
58
|
return n.getInstance();
|
|
59
59
|
};
|
|
60
60
|
});
|
|
61
|
-
xt(
|
|
62
|
-
var
|
|
61
|
+
xt(ue);
|
|
62
|
+
var Cr = xt(At(function(t, e) {
|
|
63
63
|
var n = le && le.__awaiter || function(u, c, f, d) {
|
|
64
64
|
return new (f || (f = Promise))(function(w, k) {
|
|
65
65
|
function v(g) {
|
|
@@ -239,9 +239,9 @@ var Pr = xt(At(function(t, e) {
|
|
|
239
239
|
return r(this, function(S) {
|
|
240
240
|
switch (S.label) {
|
|
241
241
|
case 0:
|
|
242
|
-
return [4,
|
|
242
|
+
return [4, ue.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 ? (
|
|
244
|
+
return S.sent(), this.acquiredIatSet.has(f) ? (k = this.storageHandler === void 0 ? a : this.storageHandler, (v = k.getItemSync(c)) === null ? (ue.default().unlock(f), [2]) : ((E = JSON.parse(v)).timeRefreshed = Date.now(), k.setItemSync(c, JSON.stringify(E)), ue.default().unlock(f), this.refreshLockWhileAcquired(c, f), [2])) : (ue.default().unlock(f), [2]);
|
|
245
245
|
}
|
|
246
246
|
});
|
|
247
247
|
});
|
|
@@ -297,9 +297,9 @@ var Pr = xt(At(function(t, e) {
|
|
|
297
297
|
return r(this, function(v) {
|
|
298
298
|
switch (v.label) {
|
|
299
299
|
case 0:
|
|
300
|
-
return f = this.storageHandler === void 0 ? a : this.storageHandler, d = o + "-" + c, (w = f.getItemSync(d)) === null ? [2] : (k = JSON.parse(w)).id !== this.id ? [3, 2] : [4,
|
|
300
|
+
return f = this.storageHandler === void 0 ? a : this.storageHandler, d = o + "-" + c, (w = f.getItemSync(d)) === null ? [2] : (k = JSON.parse(w)).id !== this.id ? [3, 2] : [4, ue.default().lock(k.iat)];
|
|
301
301
|
case 1:
|
|
302
|
-
v.sent(), this.acquiredIatSet.delete(k.iat), f.removeItemSync(d),
|
|
302
|
+
v.sent(), this.acquiredIatSet.delete(k.iat), f.removeItemSync(d), ue.default().unlock(k.iat), u.notifyWaiters(), v.label = 2;
|
|
303
303
|
case 2:
|
|
304
304
|
return [2];
|
|
305
305
|
}
|
|
@@ -327,7 +327,7 @@ var Pr = xt(At(function(t, e) {
|
|
|
327
327
|
}();
|
|
328
328
|
e.default = p;
|
|
329
329
|
}));
|
|
330
|
-
const
|
|
330
|
+
const xr = { timeoutInSeconds: 60 }, Dn = { name: "auth0-spa-js", version: "2.1.3" }, Ln = () => Date.now();
|
|
331
331
|
let Y = class kt extends Error {
|
|
332
332
|
constructor(e, n) {
|
|
333
333
|
super(n), this.error = e, this.error_description = n, Object.setPrototypeOf(this, kt.prototype);
|
|
@@ -335,29 +335,29 @@ let Y = class kt extends Error {
|
|
|
335
335
|
static fromPayload({ error: e, error_description: n }) {
|
|
336
336
|
return new kt(e, n);
|
|
337
337
|
}
|
|
338
|
-
},
|
|
338
|
+
}, Ar = class Un extends Y {
|
|
339
339
|
constructor(e, n, r, i = null) {
|
|
340
|
-
super(e, n), this.state = r, this.appState = i, Object.setPrototypeOf(this,
|
|
340
|
+
super(e, n), this.state = r, this.appState = i, Object.setPrototypeOf(this, Un.prototype);
|
|
341
341
|
}
|
|
342
|
-
}, It = class
|
|
342
|
+
}, It = class Rn extends Y {
|
|
343
343
|
constructor() {
|
|
344
|
-
super("timeout", "Timeout"), Object.setPrototypeOf(this,
|
|
344
|
+
super("timeout", "Timeout"), Object.setPrototypeOf(this, Rn.prototype);
|
|
345
345
|
}
|
|
346
|
-
},
|
|
346
|
+
}, $r = class Mn extends It {
|
|
347
347
|
constructor(e) {
|
|
348
|
-
super(), this.popup = e, Object.setPrototypeOf(this,
|
|
348
|
+
super(), this.popup = e, Object.setPrototypeOf(this, Mn.prototype);
|
|
349
349
|
}
|
|
350
|
-
},
|
|
350
|
+
}, zr = class Zn extends Y {
|
|
351
351
|
constructor(e) {
|
|
352
|
-
super("cancelled", "Popup closed"), this.popup = e, Object.setPrototypeOf(this,
|
|
352
|
+
super("cancelled", "Popup closed"), this.popup = e, Object.setPrototypeOf(this, Zn.prototype);
|
|
353
353
|
}
|
|
354
|
-
},
|
|
354
|
+
}, Nr = class Wn extends Y {
|
|
355
355
|
constructor(e, n, r) {
|
|
356
|
-
super(e, n), this.mfa_token = r, Object.setPrototypeOf(this,
|
|
356
|
+
super(e, n), this.mfa_token = r, Object.setPrototypeOf(this, Wn.prototype);
|
|
357
357
|
}
|
|
358
|
-
},
|
|
358
|
+
}, Kn = class Fn extends Y {
|
|
359
359
|
constructor(e, n) {
|
|
360
|
-
super("missing_refresh_token", `Missing Refresh Token (audience: '${Ht(e, ["default"])}', scope: '${Ht(n)}')`), this.audience = e, this.scope = n, Object.setPrototypeOf(this,
|
|
360
|
+
super("missing_refresh_token", `Missing Refresh Token (audience: '${Ht(e, ["default"])}', scope: '${Ht(n)}')`), this.audience = e, this.scope = n, Object.setPrototypeOf(this, Fn.prototype);
|
|
361
361
|
}
|
|
362
362
|
};
|
|
363
363
|
function Ht(t, e = []) {
|
|
@@ -370,20 +370,20 @@ const Qe = () => window.crypto, dt = () => {
|
|
|
370
370
|
}, Jt = (t) => btoa(t), St = (t) => {
|
|
371
371
|
var { clientId: e } = t, n = Q(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
|
-
}, Xt = (t) => ((e) => decodeURIComponent(atob(e).split("").map((n) => "%" + ("00" + n.charCodeAt(0).toString(16)).slice(-2)).join("")))(t.replace(/_/g, "/").replace(/-/g, "+")),
|
|
373
|
+
}, Xt = (t) => ((e) => decodeURIComponent(atob(e).split("").map((n) => "%" + ("00" + n.charCodeAt(0).toString(16)).slice(-2)).join("")))(t.replace(/_/g, "/").replace(/-/g, "+")), Dr = async (t, e) => {
|
|
374
374
|
const n = await fetch(t, e);
|
|
375
375
|
return { ok: n.ok, json: await n.json() };
|
|
376
|
-
},
|
|
376
|
+
}, Lr = async (t, e, n) => {
|
|
377
377
|
const r = new AbortController();
|
|
378
378
|
let i;
|
|
379
|
-
return e.signal = r.signal, Promise.race([
|
|
379
|
+
return e.signal = r.signal, Promise.race([Dr(t, e), new Promise((o, a) => {
|
|
380
380
|
i = setTimeout(() => {
|
|
381
381
|
r.abort(), a(new Error("Timeout when executing 'fetch'"));
|
|
382
382
|
}, n);
|
|
383
383
|
})]).finally(() => {
|
|
384
384
|
clearTimeout(i);
|
|
385
385
|
});
|
|
386
|
-
},
|
|
386
|
+
}, Ur = async (t, e, n, r, i, o, a) => {
|
|
387
387
|
return s = { auth: { audience: e, scope: n }, timeout: i, fetchUrl: t, fetchOptions: r, useFormData: a }, h = o, new Promise(function(p, u) {
|
|
388
388
|
const c = new MessageChannel();
|
|
389
389
|
c.port1.onmessage = function(f) {
|
|
@@ -391,15 +391,15 @@ const Qe = () => window.crypto, dt = () => {
|
|
|
391
391
|
}, h.postMessage(s, [c.port2]);
|
|
392
392
|
});
|
|
393
393
|
var s, h;
|
|
394
|
-
},
|
|
395
|
-
async function
|
|
394
|
+
}, Rr = async (t, e, n, r, i, o, a = 1e4) => i ? Ur(t, e, n, r, a, i, o) : Lr(t, r, a);
|
|
395
|
+
async function Mr(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 ? St(h) : JSON.stringify(h);
|
|
398
398
|
return await async function(u, c, f, d, w, k, v) {
|
|
399
399
|
let E, S = null;
|
|
400
400
|
for (let $ = 0; $ < 3; $++)
|
|
401
401
|
try {
|
|
402
|
-
E = await
|
|
402
|
+
E = await Rr(u, f, d, w, k, v, c), S = null;
|
|
403
403
|
break;
|
|
404
404
|
} catch (U) {
|
|
405
405
|
S = U;
|
|
@@ -409,10 +409,10 @@ async function Ur(t, e) {
|
|
|
409
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
|
|
412
|
+
throw l === "mfa_required" ? new Nr(l, $, P.mfa_token) : l === "missing_refresh_token" ? new Kn(f, d) : new Y(l || "request_error", $);
|
|
413
413
|
}
|
|
414
414
|
return P;
|
|
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 ||
|
|
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 || Dn)) } }, e, s);
|
|
416
416
|
}
|
|
417
417
|
const He = (...t) => {
|
|
418
418
|
return (e = t.filter(Boolean).join(" ").trim().split(/\s+/), Array.from(new Set(e))).join(" ");
|
|
@@ -433,7 +433,7 @@ let he = class _t {
|
|
|
433
433
|
const { scope: n, audience: r, client_id: i } = e;
|
|
434
434
|
return new _t({ scope: n, audience: r, clientId: i });
|
|
435
435
|
}
|
|
436
|
-
},
|
|
436
|
+
}, Zr = class {
|
|
437
437
|
set(e, n) {
|
|
438
438
|
localStorage.setItem(e, JSON.stringify(n));
|
|
439
439
|
}
|
|
@@ -452,7 +452,7 @@ let he = class _t {
|
|
|
452
452
|
allKeys() {
|
|
453
453
|
return Object.keys(window.localStorage).filter((e) => e.startsWith("@@auth0spajs@@"));
|
|
454
454
|
}
|
|
455
|
-
},
|
|
455
|
+
}, Hn = class {
|
|
456
456
|
constructor() {
|
|
457
457
|
this.enclosedCache = /* @__PURE__ */ function() {
|
|
458
458
|
let e = {};
|
|
@@ -467,9 +467,9 @@ let he = class _t {
|
|
|
467
467
|
}, allKeys: () => Object.keys(e) };
|
|
468
468
|
}();
|
|
469
469
|
}
|
|
470
|
-
},
|
|
470
|
+
}, Wr = class {
|
|
471
471
|
constructor(e, n, r) {
|
|
472
|
-
this.cache = e, this.keyManifest = n, this.nowProvider = r ||
|
|
472
|
+
this.cache = e, this.keyManifest = n, this.nowProvider = r || Ln;
|
|
473
473
|
}
|
|
474
474
|
async setIdToken(e, n, r) {
|
|
475
475
|
var i;
|
|
@@ -530,7 +530,7 @@ let he = class _t {
|
|
|
530
530
|
return o.prefix === "@@auth0spajs@@" && o.clientId === e.clientId && o.audience === e.audience && h;
|
|
531
531
|
})[0];
|
|
532
532
|
}
|
|
533
|
-
},
|
|
533
|
+
}, Kr = class {
|
|
534
534
|
constructor(e, n, r) {
|
|
535
535
|
this.storage = e, this.clientId = n, this.cookieDomain = r, this.storageKey = `a0.spajs.txs.${this.clientId}`;
|
|
536
536
|
}
|
|
@@ -544,7 +544,7 @@ let he = class _t {
|
|
|
544
544
|
this.storage.remove(this.storageKey, { cookieDomain: this.cookieDomain });
|
|
545
545
|
}
|
|
546
546
|
};
|
|
547
|
-
const ze = (t) => typeof t == "number",
|
|
547
|
+
const ze = (t) => typeof t == "number", Fr = ["iss", "aud", "exp", "nbf", "iat", "jti", "azp", "nonce", "auth_time", "at_hash", "c_hash", "acr", "amr", "sub_jwk", "cnf", "sip_from_tag", "sip_date", "sip_callid", "sip_cseq_num", "sip_via_branch", "orig", "dest", "mky", "events", "toe", "txn", "rph", "sid", "vot", "vtm"], Hr = (t) => {
|
|
548
548
|
if (!t.id_token)
|
|
549
549
|
throw new Error("ID token is required but missing");
|
|
550
550
|
const e = ((o) => {
|
|
@@ -553,7 +553,7 @@ const ze = (t) => typeof t == "number", Wr = ["iss", "aud", "exp", "nbf", "iat",
|
|
|
553
553
|
throw new Error("ID token could not be decoded");
|
|
554
554
|
const u = JSON.parse(Xt(h)), c = { __raw: o }, f = {};
|
|
555
555
|
return Object.keys(u).forEach((d) => {
|
|
556
|
-
c[d] = u[d],
|
|
556
|
+
c[d] = u[d], Fr.includes(d) || (f[d] = u[d]);
|
|
557
557
|
}), { encoded: { header: s, payload: h, signature: p }, header: JSON.parse(Xt(s)), claims: c, user: f };
|
|
558
558
|
})(t.id_token);
|
|
559
559
|
if (!e.claims.iss)
|
|
@@ -668,26 +668,26 @@ var fe = At(function(t, e) {
|
|
|
668
668
|
};
|
|
669
669
|
});
|
|
670
670
|
xt(fe), fe.encode, fe.parse, fe.getAll;
|
|
671
|
-
var
|
|
671
|
+
var Jr = fe.get, Jn = fe.set, Xn = fe.remove;
|
|
672
672
|
const be = { get(t) {
|
|
673
|
-
const e =
|
|
673
|
+
const e = Jr(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),
|
|
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), Jn(t, JSON.stringify(e), r);
|
|
679
679
|
}, remove(t, e) {
|
|
680
680
|
let n = {};
|
|
681
|
-
e != null && e.cookieDomain && (n.domain = e.cookieDomain),
|
|
682
|
-
} },
|
|
681
|
+
e != null && e.cookieDomain && (n.domain = e.cookieDomain), Xn(t, n);
|
|
682
|
+
} }, Xr = { get(t) {
|
|
683
683
|
return be.get(t) || be.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),
|
|
686
|
+
window.location.protocol === "https:" && (r = { secure: !0 }), n != null && n.daysUntilExpire && (r.expires = n.daysUntilExpire), n != null && n.cookieDomain && (r.domain = n.cookieDomain), Jn(`_legacy_${t}`, JSON.stringify(e), r), be.save(t, e, n);
|
|
687
687
|
}, remove(t, e) {
|
|
688
688
|
let n = {};
|
|
689
|
-
e != null && e.cookieDomain && (n.domain = e.cookieDomain),
|
|
690
|
-
} },
|
|
689
|
+
e != null && e.cookieDomain && (n.domain = e.cookieDomain), Xn(t, n), be.remove(t, e), be.remove(`_legacy_${t}`, e);
|
|
690
|
+
} }, Vr = { get(t) {
|
|
691
691
|
if (typeof sessionStorage > "u")
|
|
692
692
|
return;
|
|
693
693
|
const e = sessionStorage.getItem(t);
|
|
@@ -697,7 +697,7 @@ const be = { get(t) {
|
|
|
697
697
|
}, remove(t) {
|
|
698
698
|
sessionStorage.removeItem(t);
|
|
699
699
|
} };
|
|
700
|
-
function
|
|
700
|
+
function Yr(t, e, n) {
|
|
701
701
|
var r = e === void 0 ? null : e, i = function(h, p) {
|
|
702
702
|
var u = atob(h);
|
|
703
703
|
if (p) {
|
|
@@ -710,11 +710,11 @@ function Xr(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 Vt, Yt, Gt, ht,
|
|
714
|
-
return ht = ht ||
|
|
713
|
+
var Vt, Yt, Gt, ht, Gr = (Vt = "Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwohZnVuY3Rpb24oKXsidXNlIHN0cmljdCI7Y2xhc3MgZSBleHRlbmRzIEVycm9ye2NvbnN0cnVjdG9yKHQscil7c3VwZXIociksdGhpcy5lcnJvcj10LHRoaXMuZXJyb3JfZGVzY3JpcHRpb249cixPYmplY3Quc2V0UHJvdG90eXBlT2YodGhpcyxlLnByb3RvdHlwZSl9c3RhdGljIGZyb21QYXlsb2FkKHtlcnJvcjp0LGVycm9yX2Rlc2NyaXB0aW9uOnJ9KXtyZXR1cm4gbmV3IGUodCxyKX19Y2xhc3MgdCBleHRlbmRzIGV7Y29uc3RydWN0b3IoZSxzKXtzdXBlcigibWlzc2luZ19yZWZyZXNoX3Rva2VuIixgTWlzc2luZyBSZWZyZXNoIFRva2VuIChhdWRpZW5jZTogJyR7cihlLFsiZGVmYXVsdCJdKX0nLCBzY29wZTogJyR7cihzKX0nKWApLHRoaXMuYXVkaWVuY2U9ZSx0aGlzLnNjb3BlPXMsT2JqZWN0LnNldFByb3RvdHlwZU9mKHRoaXMsdC5wcm90b3R5cGUpfX1mdW5jdGlvbiByKGUsdD1bXSl7cmV0dXJuIGUmJiF0LmluY2x1ZGVzKGUpP2U6IiJ9ImZ1bmN0aW9uIj09dHlwZW9mIFN1cHByZXNzZWRFcnJvciYmU3VwcHJlc3NlZEVycm9yO2NvbnN0IHM9ZT0+e3ZhcntjbGllbnRJZDp0fT1lLHI9ZnVuY3Rpb24oZSx0KXt2YXIgcj17fTtmb3IodmFyIHMgaW4gZSlPYmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoZSxzKSYmdC5pbmRleE9mKHMpPDAmJihyW3NdPWVbc10pO2lmKG51bGwhPWUmJiJmdW5jdGlvbiI9PXR5cGVvZiBPYmplY3QuZ2V0T3duUHJvcGVydHlTeW1ib2xzKXt2YXIgbz0wO2ZvcihzPU9iamVjdC5nZXRPd25Qcm9wZXJ0eVN5bWJvbHMoZSk7bzxzLmxlbmd0aDtvKyspdC5pbmRleE9mKHNbb10pPDAmJk9iamVjdC5wcm90b3R5cGUucHJvcGVydHlJc0VudW1lcmFibGUuY2FsbChlLHNbb10pJiYocltzW29dXT1lW3Nbb11dKX1yZXR1cm4gcn0oZSxbImNsaWVudElkIl0pO3JldHVybiBuZXcgVVJMU2VhcmNoUGFyYW1zKChlPT5PYmplY3Qua2V5cyhlKS5maWx0ZXIoKHQ9PnZvaWQgMCE9PWVbdF0pKS5yZWR1Y2UoKCh0LHIpPT5PYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30sdCkse1tyXTplW3JdfSkpLHt9KSkoT2JqZWN0LmFzc2lnbih7Y2xpZW50X2lkOnR9LHIpKSkudG9TdHJpbmcoKX07bGV0IG89e307Y29uc3Qgbj0oZSx0KT0+YCR7ZX18JHt0fWA7YWRkRXZlbnRMaXN0ZW5lcigibWVzc2FnZSIsKGFzeW5jKHtkYXRhOnt0aW1lb3V0OmUsYXV0aDpyLGZldGNoVXJsOmksZmV0Y2hPcHRpb25zOmMsdXNlRm9ybURhdGE6YX0scG9ydHM6W3BdfSk9PntsZXQgZjtjb25zdHthdWRpZW5jZTp1LHNjb3BlOmx9PXJ8fHt9O3RyeXtjb25zdCByPWE/KGU9Pntjb25zdCB0PW5ldyBVUkxTZWFyY2hQYXJhbXMoZSkscj17fTtyZXR1cm4gdC5mb3JFYWNoKCgoZSx0KT0+e3JbdF09ZX0pKSxyfSkoYy5ib2R5KTpKU09OLnBhcnNlKGMuYm9keSk7aWYoIXIucmVmcmVzaF90b2tlbiYmInJlZnJlc2hfdG9rZW4iPT09ci5ncmFudF90eXBlKXtjb25zdCBlPSgoZSx0KT0+b1tuKGUsdCldKSh1LGwpO2lmKCFlKXRocm93IG5ldyB0KHUsbCk7Yy5ib2R5PWE/cyhPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKTpKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKE9iamVjdC5hc3NpZ24oe30scikse3JlZnJlc2hfdG9rZW46ZX0pKX1sZXQgaCxnOyJmdW5jdGlvbiI9PXR5cGVvZiBBYm9ydENvbnRyb2xsZXImJihoPW5ldyBBYm9ydENvbnRyb2xsZXIsYy5zaWduYWw9aC5zaWduYWwpO3RyeXtnPWF3YWl0IFByb21pc2UucmFjZShbKGQ9ZSxuZXcgUHJvbWlzZSgoZT0+c2V0VGltZW91dChlLGQpKSkpLGZldGNoKGksT2JqZWN0LmFzc2lnbih7fSxjKSldKX1jYXRjaChlKXtyZXR1cm4gdm9pZCBwLnBvc3RNZXNzYWdlKHtlcnJvcjplLm1lc3NhZ2V9KX1pZighZylyZXR1cm4gaCYmaC5hYm9ydCgpLHZvaWQgcC5wb3N0TWVzc2FnZSh7ZXJyb3I6IlRpbWVvdXQgd2hlbiBleGVjdXRpbmcgJ2ZldGNoJyJ9KTtmPWF3YWl0IGcuanNvbigpLGYucmVmcmVzaF90b2tlbj8oKChlLHQscik9PntvW24odCxyKV09ZX0pKGYucmVmcmVzaF90b2tlbix1LGwpLGRlbGV0ZSBmLnJlZnJlc2hfdG9rZW4pOigoZSx0KT0+e2RlbGV0ZSBvW24oZSx0KV19KSh1LGwpLHAucG9zdE1lc3NhZ2Uoe29rOmcub2ssanNvbjpmfSl9Y2F0Y2goZSl7cC5wb3N0TWVzc2FnZSh7b2s6ITEsanNvbjp7ZXJyb3I6ZS5lcnJvcixlcnJvcl9kZXNjcmlwdGlvbjplLm1lc3NhZ2V9fSl9dmFyIGR9KSl9KCk7Cgo=", Yt = null, Gt = !1, function(t) {
|
|
714
|
+
return ht = ht || Yr(Vt, Yt, Gt), new Worker(ht, t);
|
|
715
715
|
});
|
|
716
716
|
const ft = {};
|
|
717
|
-
let
|
|
717
|
+
let Br = class {
|
|
718
718
|
constructor(e, n) {
|
|
719
719
|
this.cache = e, this.clientId = n, this.manifestKey = this.createManifestKeyFrom(this.clientId);
|
|
720
720
|
}
|
|
@@ -740,14 +740,14 @@ let Yr = class {
|
|
|
740
740
|
return `@@auth0spajs@@::${e}`;
|
|
741
741
|
}
|
|
742
742
|
};
|
|
743
|
-
const
|
|
743
|
+
const qr = { memory: () => new Hn().enclosedCache, localstorage: () => new Zr() }, Bt = (t) => qr[t], qt = (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
|
-
}, pt = new
|
|
747
|
-
let
|
|
746
|
+
}, pt = new Cr();
|
|
747
|
+
let Qr = class {
|
|
748
748
|
constructor(e) {
|
|
749
749
|
let n, r;
|
|
750
|
-
if (this.userCache = new
|
|
750
|
+
if (this.userCache = new Hn().enclosedCache, this.defaultOptions = { authorizationParams: { scope: "openid profile email" }, useRefreshTokensFallback: !1, useFormData: !0 }, this._releaseLockOnPageHide = async () => {
|
|
751
751
|
await pt.releaseLock("auth0.lock.getTokenSilently"), window.removeEventListener("pagehide", this._releaseLockOnPageHide);
|
|
752
752
|
}, this.options = Object.assign(Object.assign(Object.assign({}, this.defaultOptions), e), { authorizationParams: Object.assign(Object.assign({}, this.defaultOptions.authorizationParams), e.authorizationParams) }), typeof window < "u" && (() => {
|
|
753
753
|
if (!Qe())
|
|
@@ -763,13 +763,13 @@ let Br = class {
|
|
|
763
763
|
throw new Error(`Invalid cache location "${n}"`);
|
|
764
764
|
r = Bt(n)();
|
|
765
765
|
}
|
|
766
|
-
this.httpTimeoutMs = e.httpTimeoutInSeconds ? 1e3 * e.httpTimeoutInSeconds : 1e4, this.cookieStorage = e.legacySameSiteCookie === !1 ? be :
|
|
767
|
-
const i = e.useCookiesForTransactions ? this.cookieStorage :
|
|
766
|
+
this.httpTimeoutMs = e.httpTimeoutInSeconds ? 1e3 * e.httpTimeoutInSeconds : 1e4, this.cookieStorage = e.legacySameSiteCookie === !1 ? be : Xr, this.orgHintCookieName = `auth0.${this.options.clientId}.organization_hint`, this.isAuthenticatedCookieName = ((a) => `auth0.${a}.is.authenticated`)(this.options.clientId), this.sessionCheckExpiryDays = e.sessionCheckExpiryDays || 1;
|
|
767
|
+
const i = e.useCookiesForTransactions ? this.cookieStorage : Vr;
|
|
768
768
|
var o;
|
|
769
|
-
this.scope = He("openid", this.options.authorizationParams.scope, this.options.useRefreshTokens ? "offline_access" : ""), this.transactionManager = new
|
|
769
|
+
this.scope = He("openid", this.options.authorizationParams.scope, this.options.useRefreshTokens ? "offline_access" : ""), this.transactionManager = new Kr(i, this.options.clientId, this.options.cookieDomain), this.nowProvider = this.options.nowProvider || Ln, this.cacheManager = new Wr(r, r.allKeys ? void 0 : new Br(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 Gr());
|
|
770
770
|
}
|
|
771
771
|
_url(e) {
|
|
772
|
-
const n = encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client ||
|
|
772
|
+
const n = encodeURIComponent(btoa(JSON.stringify(this.options.auth0Client || Dn)));
|
|
773
773
|
return `${this.domainUrl}${e}&auth0Client=${n}`;
|
|
774
774
|
}
|
|
775
775
|
_authorizeUrl(e) {
|
|
@@ -777,7 +777,7 @@ let Br = class {
|
|
|
777
777
|
}
|
|
778
778
|
async _verifyIdToken(e, n, r) {
|
|
779
779
|
const i = await this.nowProvider();
|
|
780
|
-
return
|
|
780
|
+
return Hr({ iss: this.tokenIssuer, aud: this.options.clientId, id_token: e, nonce: n, organization: r, leeway: this.options.leeway, max_age: (o = this.options.authorizationParams.max_age, typeof o != "string" ? o : parseInt(o, 10) || void 0), now: i });
|
|
781
781
|
var o;
|
|
782
782
|
}
|
|
783
783
|
_processOrgHint(e) {
|
|
@@ -805,9 +805,9 @@ let Br = class {
|
|
|
805
805
|
const o = await ((s) => new Promise((h, p) => {
|
|
806
806
|
let u;
|
|
807
807
|
const c = setInterval(() => {
|
|
808
|
-
s.popup && s.popup.closed && (clearInterval(c), clearTimeout(f), window.removeEventListener("message", u, !1), p(new
|
|
808
|
+
s.popup && s.popup.closed && (clearInterval(c), clearTimeout(f), window.removeEventListener("message", u, !1), p(new zr(s.popup)));
|
|
809
809
|
}, 1e3), f = setTimeout(() => {
|
|
810
|
-
clearInterval(c), p(new
|
|
810
|
+
clearInterval(c), p(new $r(s.popup)), window.removeEventListener("message", u, !1);
|
|
811
811
|
}, 1e3 * (s.timeoutInSeconds || 60));
|
|
812
812
|
u = function(d) {
|
|
813
813
|
if (d.data && d.data.type === "authorization_response") {
|
|
@@ -851,7 +851,7 @@ let Br = class {
|
|
|
851
851
|
if (!s)
|
|
852
852
|
throw new Y("missing_transaction", "Invalid state");
|
|
853
853
|
if (this.transactionManager.remove(), o)
|
|
854
|
-
throw new
|
|
854
|
+
throw new Ar(o, a || o, r, s.appState);
|
|
855
855
|
if (!s.code_verifier || s.state && s.state !== r)
|
|
856
856
|
throw new Y("state_mismatch", "Invalid state");
|
|
857
857
|
const h = s.organization, p = s.nonce, u = s.redirect_uri;
|
|
@@ -909,7 +909,7 @@ let Br = 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: He(this.scope, (r = e.authorizationParams) === null || r === void 0 ? void 0 : r.scope) }) });
|
|
912
|
-
return n = Object.assign(Object.assign({},
|
|
912
|
+
return n = Object.assign(Object.assign({}, xr), n), await this.loginWithPopup(i, n), (await this.cacheManager.get(new he({ 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();
|
|
@@ -962,7 +962,7 @@ let Br = 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
|
|
965
|
+
throw new Kn(e.authorizationParams.audience || "default", e.authorizationParams.scope);
|
|
966
966
|
}
|
|
967
967
|
const r = e.authorizationParams.redirect_uri || this.options.authorizationParams.redirect_uri || window.location.origin, i = typeof e.timeoutInSeconds == "number" ? 1e3 * e.timeoutInSeconds : null;
|
|
968
968
|
try {
|
|
@@ -990,16 +990,16 @@ let Br = class {
|
|
|
990
990
|
}
|
|
991
991
|
}
|
|
992
992
|
async _requestToken(e, n) {
|
|
993
|
-
const { nonceIn: r, organization: i } = n || {}, o = await
|
|
993
|
+
const { nonceIn: r, organization: i } = n || {}, o = await Mr(Object.assign({ baseUrl: this.domainUrl, client_id: this.options.clientId, auth0Client: this.options.auth0Client, useFormData: this.options.useFormData, timeout: this.httpTimeoutMs }, e), this.worker), a = await this._verifyIdToken(o.id_token, r, i);
|
|
994
994
|
return await this._saveEntryInCache(Object.assign(Object.assign(Object.assign(Object.assign({}, o), { decodedToken: a, scope: e.scope, audience: e.audience || "default" }), o.scope ? { oauthTokenScope: o.scope } : null), { client_id: this.options.clientId })), this.cookieStorage.save(this.isAuthenticatedCookieName, !0, { daysUntilExpire: this.sessionCheckExpiryDays, cookieDomain: this.options.cookieDomain }), this._processOrgHint(i || a.claims.org_id), Object.assign(Object.assign({}, o), { decodedToken: a });
|
|
995
995
|
}
|
|
996
996
|
};
|
|
997
|
-
async function
|
|
998
|
-
const e = new
|
|
997
|
+
async function ei(t) {
|
|
998
|
+
const e = new Qr(t);
|
|
999
999
|
return await e.checkSession(), e;
|
|
1000
1000
|
}
|
|
1001
|
-
const
|
|
1002
|
-
var
|
|
1001
|
+
const Vn = "sesamy.com", ti = "https://logs.sesamy.com/events", Et = "sesamyCacheTimestamp";
|
|
1002
|
+
var se = /* @__PURE__ */ ((t) => (t.READY = "sesamyJsReady", t.AUTHENTICATED = "sesamyJsAuthenticated", t.LOGOUT = "sesamyJsLogout", t.CLEAR_CACHE = "sesamyJsClearCache", t))(se || {});
|
|
1003
1003
|
let G;
|
|
1004
1004
|
const $t = "sesamyAccessToken", zt = "sesamyExpires";
|
|
1005
1005
|
function Nt() {
|
|
@@ -1007,28 +1007,28 @@ function Nt() {
|
|
|
1007
1007
|
if (!(!t || parseInt(t, 10) < (/* @__PURE__ */ new Date()).getTime()))
|
|
1008
1008
|
return localStorage.getItem($t);
|
|
1009
1009
|
}
|
|
1010
|
-
async function
|
|
1011
|
-
if (t.enabled !== !1 && (G = await
|
|
1012
|
-
domain: t.endpoint || `token.${
|
|
1010
|
+
async function ni(t) {
|
|
1011
|
+
if (t.enabled !== !1 && (G = await ei({
|
|
1012
|
+
domain: t.endpoint || `token.${Vn}`,
|
|
1013
1013
|
clientId: t.clientId
|
|
1014
1014
|
}), window.location.search.includes("code=")))
|
|
1015
1015
|
try {
|
|
1016
1016
|
await G.handleRedirectCallback();
|
|
1017
1017
|
const e = await G.getUser();
|
|
1018
|
-
We(
|
|
1018
|
+
We(se.AUTHENTICATED, e);
|
|
1019
1019
|
const n = new URL(location.href), r = n.searchParams;
|
|
1020
1020
|
r.delete("code"), r.delete("state"), n.search = r.toString(), window.history.replaceState({}, document.title, n.toString());
|
|
1021
1021
|
} catch {
|
|
1022
1022
|
}
|
|
1023
1023
|
}
|
|
1024
|
-
async function
|
|
1024
|
+
async function ri() {
|
|
1025
1025
|
if (Nt())
|
|
1026
1026
|
return !0;
|
|
1027
1027
|
if (!G)
|
|
1028
1028
|
throw new Error("Auth0 client not initialized");
|
|
1029
1029
|
return G.isAuthenticated();
|
|
1030
1030
|
}
|
|
1031
|
-
async function
|
|
1031
|
+
async function ii() {
|
|
1032
1032
|
if (Nt())
|
|
1033
1033
|
return {
|
|
1034
1034
|
sub: "local",
|
|
@@ -1038,7 +1038,7 @@ async function ni() {
|
|
|
1038
1038
|
throw new Error("Auth0 client not initialized");
|
|
1039
1039
|
return G.getUser();
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1041
|
+
function oi() {
|
|
1042
1042
|
if (!G)
|
|
1043
1043
|
throw new Error("Auth0 client not initialized");
|
|
1044
1044
|
return G.loginWithRedirect({
|
|
@@ -1047,7 +1047,7 @@ function ri() {
|
|
|
1047
1047
|
}
|
|
1048
1048
|
});
|
|
1049
1049
|
}
|
|
1050
|
-
async function
|
|
1050
|
+
async function ai(t = !0) {
|
|
1051
1051
|
const e = Nt();
|
|
1052
1052
|
if (e)
|
|
1053
1053
|
return e;
|
|
@@ -1061,16 +1061,16 @@ async function ii(t = !0) {
|
|
|
1061
1061
|
return null;
|
|
1062
1062
|
}
|
|
1063
1063
|
}
|
|
1064
|
-
async function
|
|
1064
|
+
async function si() {
|
|
1065
1065
|
if (localStorage.removeItem($t), localStorage.removeItem(zt), !G)
|
|
1066
1066
|
throw new Error("Auth0 client not initialized");
|
|
1067
|
-
return We(
|
|
1067
|
+
return We(se.LOGOUT, {}), G.logout({
|
|
1068
1068
|
logoutParams: {
|
|
1069
1069
|
returnTo: window.location.href
|
|
1070
1070
|
}
|
|
1071
1071
|
});
|
|
1072
1072
|
}
|
|
1073
|
-
function
|
|
1073
|
+
function ci(t) {
|
|
1074
1074
|
const e = t.split(".");
|
|
1075
1075
|
if (e.length !== 3)
|
|
1076
1076
|
throw new Error("Invalid JWT token format.");
|
|
@@ -1081,12 +1081,12 @@ function ai(t) {
|
|
|
1081
1081
|
);
|
|
1082
1082
|
return JSON.parse(i);
|
|
1083
1083
|
}
|
|
1084
|
-
async function
|
|
1084
|
+
async function Yn(t, e) {
|
|
1085
1085
|
localStorage.setItem($t, t), localStorage.setItem(zt, JSON.stringify(e * 1e3 + (/* @__PURE__ */ new Date()).getTime()));
|
|
1086
|
-
const n =
|
|
1087
|
-
We(
|
|
1086
|
+
const n = ci(t);
|
|
1087
|
+
We(se.AUTHENTICATED, n);
|
|
1088
1088
|
}
|
|
1089
|
-
const
|
|
1089
|
+
const ui = (t, e) => e.skipDedupe || e.method !== "GET", li = (t, e) => e.method + "@" + t, di = (t) => t.clone(), Qt = ({ skip: t = ui, key: e = li, resolver: n = di } = {}) => {
|
|
1090
1090
|
const r = /* @__PURE__ */ new Map();
|
|
1091
1091
|
return (i) => (o, a) => {
|
|
1092
1092
|
if (t(o, a))
|
|
@@ -1106,7 +1106,7 @@ const si = (t, e) => e.skipDedupe || e.method !== "GET", ci = (t, e) => e.method
|
|
|
1106
1106
|
return r.delete(s), Promise.reject(h);
|
|
1107
1107
|
}
|
|
1108
1108
|
};
|
|
1109
|
-
},
|
|
1109
|
+
}, hi = (t, e) => t * e, fi = (t) => t && t.ok, en = ({ delayTimer: t = 500, delayRamp: e = hi, maxAttempts: n = 10, until: r = fi, onRetry: i = null, retryOnNetworkError: o = !1, resolveWithLatestResponse: a = !1, skip: s } = {}) => (h) => (p, u) => {
|
|
1110
1110
|
let c = 0;
|
|
1111
1111
|
if (s && s(p, u))
|
|
1112
1112
|
return h(p, u);
|
|
@@ -1133,10 +1133,10 @@ const si = (t, e) => e.skipDedupe || e.method !== "GET", ci = (t, e) => e.method
|
|
|
1133
1133
|
throw d;
|
|
1134
1134
|
return f(null, d);
|
|
1135
1135
|
});
|
|
1136
|
-
},
|
|
1136
|
+
}, pi = "application/json", Gn = "Content-Type", we = Symbol(), Bn = Symbol();
|
|
1137
1137
|
function tn(t = {}) {
|
|
1138
1138
|
var e;
|
|
1139
|
-
return (e = Object.entries(t).find(([n]) => n.toLowerCase() ===
|
|
1139
|
+
return (e = Object.entries(t).find(([n]) => n.toLowerCase() === Gn.toLowerCase())) === null || e === void 0 ? void 0 : e[1];
|
|
1140
1140
|
}
|
|
1141
1141
|
function nn(t) {
|
|
1142
1142
|
return /^application\/.*json.*/.test(t);
|
|
@@ -1167,28 +1167,28 @@ const pe = function(t, e, n = !1) {
|
|
|
1167
1167
|
return n && i ? new i(...r) : i;
|
|
1168
1168
|
}
|
|
1169
1169
|
};
|
|
1170
|
-
function
|
|
1170
|
+
function mi(t, e = !1) {
|
|
1171
1171
|
Te.options = e ? t : pe(Te.options, t);
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1173
|
+
function gi(t, e = !1) {
|
|
1174
1174
|
Te.polyfills = e ? t : pe(Te.polyfills, t);
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function yi(t) {
|
|
1177
1177
|
Te.errorType = t;
|
|
1178
1178
|
}
|
|
1179
|
-
const
|
|
1180
|
-
class
|
|
1179
|
+
const vi = (t) => (e) => t.reduceRight((n, r) => r(n), e) || e;
|
|
1180
|
+
class qn extends Error {
|
|
1181
1181
|
}
|
|
1182
|
-
const
|
|
1182
|
+
const wi = (t) => {
|
|
1183
1183
|
const e = /* @__PURE__ */ Object.create(null);
|
|
1184
1184
|
t = t._addons.reduce((g, l) => l.beforeRequest && l.beforeRequest(g, t._options, e) || g, t);
|
|
1185
1185
|
const { _url: n, _options: r, _config: i, _catchers: o, _resolvers: a, _middlewares: s, _addons: h } = t, p = new Map(o), u = pe(i.options, r);
|
|
1186
1186
|
let c = n;
|
|
1187
|
-
const f =
|
|
1187
|
+
const f = vi(s)((g, l) => (c = g, i.polyfill("fetch")(g, l)))(n, u), d = new Error(), w = f.catch((g) => {
|
|
1188
1188
|
throw { [we]: g };
|
|
1189
1189
|
}).then((g) => {
|
|
1190
1190
|
if (!g.ok) {
|
|
1191
|
-
const l = new
|
|
1191
|
+
const l = new qn();
|
|
1192
1192
|
if (l.cause = d, l.stack = l.stack + `
|
|
1193
1193
|
CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
|
|
1194
1194
|
throw l;
|
|
@@ -1207,7 +1207,7 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
|
|
|
1207
1207
|
const b = l.hasOwnProperty(we), P = b ? l[we] : l, j = (P == null ? void 0 : P.status) && p.get(P.status) || p.get(P == null ? void 0 : P.name) || b && p.has(we) && p.get(we);
|
|
1208
1208
|
if (j)
|
|
1209
1209
|
return j(P, t);
|
|
1210
|
-
const $ = p.get(
|
|
1210
|
+
const $ = p.get(Bn);
|
|
1211
1211
|
if ($)
|
|
1212
1212
|
return $(P, t);
|
|
1213
1213
|
throw P;
|
|
@@ -1250,7 +1250,7 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
|
|
|
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
|
+
}, bi = {
|
|
1254
1254
|
_url: "",
|
|
1255
1255
|
_options: {},
|
|
1256
1256
|
_config: Te,
|
|
@@ -1300,7 +1300,7 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
|
|
|
1300
1300
|
return this.headers({ Accept: t });
|
|
1301
1301
|
},
|
|
1302
1302
|
content(t) {
|
|
1303
|
-
return this.headers({ [
|
|
1303
|
+
return this.headers({ [Gn]: t });
|
|
1304
1304
|
},
|
|
1305
1305
|
auth(t) {
|
|
1306
1306
|
return this.headers({ Authorization: t });
|
|
@@ -1310,7 +1310,7 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
|
|
|
1310
1310
|
return n.set(t, e), { ...this, _catchers: n };
|
|
1311
1311
|
},
|
|
1312
1312
|
catcherFallback(t) {
|
|
1313
|
-
return this.catcher(
|
|
1313
|
+
return this.catcher(Bn, t);
|
|
1314
1314
|
},
|
|
1315
1315
|
resolve(t, e = !1) {
|
|
1316
1316
|
return { ...this, _resolvers: e ? [t] : [...this._resolvers, t] };
|
|
@@ -1330,7 +1330,7 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
|
|
|
1330
1330
|
fetch(t = this._options.method, e = "", n = null) {
|
|
1331
1331
|
let r = this.url(e).options({ method: t });
|
|
1332
1332
|
const i = tn(r._options.headers), o = typeof n == "object" && (!r._options.headers || !i || nn(i));
|
|
1333
|
-
return r = n ? o ? r.json(n, i) : r.body(n) : r,
|
|
1333
|
+
return r = n ? o ? r.json(n, i) : r.body(n) : r, wi(r._deferred.reduce((a, s) => s(a, a._url, a._options), r));
|
|
1334
1334
|
},
|
|
1335
1335
|
get(t = "") {
|
|
1336
1336
|
return this.fetch("GET", t);
|
|
@@ -1358,22 +1358,22 @@ CAUSE: ` + d.stack, l.response = g, l.url = c, g.type === "opaque")
|
|
|
1358
1358
|
},
|
|
1359
1359
|
json(t, e) {
|
|
1360
1360
|
const n = tn(this._options.headers);
|
|
1361
|
-
return this.content(e || nn(n) && n ||
|
|
1361
|
+
return this.content(e || nn(n) && n || pi).body(JSON.stringify(t));
|
|
1362
1362
|
}
|
|
1363
1363
|
};
|
|
1364
|
-
function
|
|
1365
|
-
return { ...
|
|
1366
|
-
}
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
function
|
|
1373
|
-
sessionStorage.removeItem(Et), We(
|
|
1374
|
-
}
|
|
1375
|
-
function
|
|
1376
|
-
const e = t.endpoint || `https://api2.${
|
|
1364
|
+
function ce(t = "", e = {}) {
|
|
1365
|
+
return { ...bi, _url: t, _options: e };
|
|
1366
|
+
}
|
|
1367
|
+
ce.default = ce;
|
|
1368
|
+
ce.options = mi;
|
|
1369
|
+
ce.errorType = yi;
|
|
1370
|
+
ce.polyfills = gi;
|
|
1371
|
+
ce.WretchError = qn;
|
|
1372
|
+
function ne() {
|
|
1373
|
+
sessionStorage.removeItem(Et), We(se.CLEAR_CACHE, {});
|
|
1374
|
+
}
|
|
1375
|
+
function ki(t) {
|
|
1376
|
+
const e = t.endpoint || `https://api2.${Vn}`, n = (_) => async (I, C) => {
|
|
1377
1377
|
let D = sessionStorage.getItem(Et);
|
|
1378
1378
|
D || (D = Date.now().toString(), sessionStorage.setItem(Et, D));
|
|
1379
1379
|
const T = {
|
|
@@ -1386,7 +1386,7 @@ function wi(t) {
|
|
|
1386
1386
|
return _(I, T);
|
|
1387
1387
|
}, r = (_ = !0) => (I) => async (C, D) => {
|
|
1388
1388
|
let T = null;
|
|
1389
|
-
if (T = await
|
|
1389
|
+
if (T = await ai(_), !T) {
|
|
1390
1390
|
if (_)
|
|
1391
1391
|
throw new Error("No access token available");
|
|
1392
1392
|
return I(C, D);
|
|
@@ -1410,7 +1410,7 @@ function wi(t) {
|
|
|
1410
1410
|
}
|
|
1411
1411
|
};
|
|
1412
1412
|
return _(I, W);
|
|
1413
|
-
}, o =
|
|
1413
|
+
}, o = ce(e).headers({ "Content-Type": "application/json" }).middlewares([
|
|
1414
1414
|
n,
|
|
1415
1415
|
r(),
|
|
1416
1416
|
Qt(),
|
|
@@ -1421,7 +1421,7 @@ function wi(t) {
|
|
|
1421
1421
|
until: (_) => !!(_ && (_.ok || _.status >= 400 && _.status < 500)),
|
|
1422
1422
|
retryOnNetworkError: !1
|
|
1423
1423
|
})
|
|
1424
|
-
]), a =
|
|
1424
|
+
]), a = ce(e).headers({ "Content-Type": "application/json" }).middlewares([
|
|
1425
1425
|
n,
|
|
1426
1426
|
r(!1),
|
|
1427
1427
|
i,
|
|
@@ -1460,11 +1460,11 @@ function wi(t) {
|
|
|
1460
1460
|
}
|
|
1461
1461
|
async function w(_, I) {
|
|
1462
1462
|
const C = await o.url(`/user-metadata/${_}`).put(I).json();
|
|
1463
|
-
return
|
|
1463
|
+
return ne(), C;
|
|
1464
1464
|
}
|
|
1465
1465
|
async function k(_) {
|
|
1466
1466
|
const I = await o.url(`/user-metadata/${_}`).delete().res();
|
|
1467
|
-
return
|
|
1467
|
+
return ne(), I.ok;
|
|
1468
1468
|
}
|
|
1469
1469
|
async function v(_) {
|
|
1470
1470
|
return (await o.url(`/user-metadata/${_}`).get().json())[_];
|
|
@@ -1477,11 +1477,11 @@ function wi(t) {
|
|
|
1477
1477
|
}
|
|
1478
1478
|
async function g(_) {
|
|
1479
1479
|
const I = await o.url(`/tags/${_}`).delete().res();
|
|
1480
|
-
return
|
|
1480
|
+
return ne(), I.ok;
|
|
1481
1481
|
}
|
|
1482
1482
|
async function l(_) {
|
|
1483
1483
|
const I = await o.url("/tags").post(_).res();
|
|
1484
|
-
return
|
|
1484
|
+
return ne(), I.ok;
|
|
1485
1485
|
}
|
|
1486
1486
|
async function b(_) {
|
|
1487
1487
|
return (await a.url("/tallies").get().json())[_];
|
|
@@ -1491,7 +1491,7 @@ function wi(t) {
|
|
|
1491
1491
|
}
|
|
1492
1492
|
async function j(_) {
|
|
1493
1493
|
const I = await a.url(`/tallies/${_}`).delete().res();
|
|
1494
|
-
return
|
|
1494
|
+
return ne(), I.ok;
|
|
1495
1495
|
}
|
|
1496
1496
|
async function $(_, I) {
|
|
1497
1497
|
return await a.url(`/tallies/${_}/push`).post(I).json();
|
|
@@ -1501,7 +1501,7 @@ function wi(t) {
|
|
|
1501
1501
|
}
|
|
1502
1502
|
async function R(_) {
|
|
1503
1503
|
const I = await o.url(`/products/${_}/auto-onboard`).post().json();
|
|
1504
|
-
return I.length &&
|
|
1504
|
+
return I.length && ne(), I;
|
|
1505
1505
|
}
|
|
1506
1506
|
return {
|
|
1507
1507
|
getEntitlements: s,
|
|
@@ -1526,68 +1526,68 @@ function wi(t) {
|
|
|
1526
1526
|
autoOnboardProduct: R
|
|
1527
1527
|
};
|
|
1528
1528
|
}
|
|
1529
|
-
const
|
|
1529
|
+
const Qn = "@sesamy/sesamy-js", Dt = "1.3.2";
|
|
1530
1530
|
function rn(t, e, n, r, i) {
|
|
1531
1531
|
for (e = e.split ? e.split(".") : e, r = 0; r < e.length; r++)
|
|
1532
1532
|
t = t ? t[e[r]] : i;
|
|
1533
1533
|
return t === i ? n : t;
|
|
1534
1534
|
}
|
|
1535
1535
|
var Je = "undefined", on = "object", Tt = function() {
|
|
1536
|
-
},
|
|
1536
|
+
}, er = "any", tr = "*", ge = "__", tt = typeof process < "u" ? process : {};
|
|
1537
1537
|
tt.env && tt.env.NODE_ENV;
|
|
1538
1538
|
var H = typeof document < "u";
|
|
1539
1539
|
tt.versions != null && tt.versions.node != null;
|
|
1540
1540
|
typeof Deno < "u" && Deno.core;
|
|
1541
1541
|
H && window.name === "nodejs" || typeof navigator < "u" && navigator.userAgent !== void 0 && (navigator.userAgent.includes("Node.js") || navigator.userAgent.includes("jsdom"));
|
|
1542
|
-
function
|
|
1542
|
+
function nr(t, e) {
|
|
1543
1543
|
return e.charAt(0)[t]() + e.slice(1);
|
|
1544
1544
|
}
|
|
1545
|
-
var
|
|
1546
|
-
function
|
|
1547
|
-
return
|
|
1545
|
+
var Ii = nr.bind(null, "toUpperCase"), Si = nr.bind(null, "toLowerCase");
|
|
1546
|
+
function _i(t) {
|
|
1547
|
+
return rr(t) ? Ii("null") : typeof t == "object" ? Pi(t) : Object.prototype.toString.call(t).slice(8, -1);
|
|
1548
1548
|
}
|
|
1549
1549
|
function nt(t, e) {
|
|
1550
1550
|
e === void 0 && (e = !0);
|
|
1551
|
-
var n =
|
|
1552
|
-
return e ?
|
|
1551
|
+
var n = _i(t);
|
|
1552
|
+
return e ? Si(n) : n;
|
|
1553
1553
|
}
|
|
1554
1554
|
function Ke(t, e) {
|
|
1555
1555
|
return typeof e === t;
|
|
1556
1556
|
}
|
|
1557
|
-
var V = Ke.bind(null, "function"),
|
|
1557
|
+
var V = Ke.bind(null, "function"), oe = Ke.bind(null, "string"), ke = Ke.bind(null, "undefined"), Ei = Ke.bind(null, "boolean");
|
|
1558
1558
|
Ke.bind(null, "symbol");
|
|
1559
|
-
function
|
|
1559
|
+
function rr(t) {
|
|
1560
1560
|
return t === null;
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1562
|
+
function Ti(t) {
|
|
1563
1563
|
return nt(t) === "number" && !isNaN(t);
|
|
1564
1564
|
}
|
|
1565
|
-
function
|
|
1565
|
+
function ir(t) {
|
|
1566
1566
|
return nt(t) === "array";
|
|
1567
1567
|
}
|
|
1568
1568
|
function X(t) {
|
|
1569
|
-
if (!
|
|
1569
|
+
if (!Oi(t))
|
|
1570
1570
|
return !1;
|
|
1571
1571
|
for (var e = t; Object.getPrototypeOf(e) !== null; )
|
|
1572
1572
|
e = Object.getPrototypeOf(e);
|
|
1573
1573
|
return Object.getPrototypeOf(t) === e;
|
|
1574
1574
|
}
|
|
1575
|
-
function
|
|
1575
|
+
function Oi(t) {
|
|
1576
1576
|
return t && (typeof t == "object" || t !== null);
|
|
1577
1577
|
}
|
|
1578
|
-
function
|
|
1578
|
+
function Pi(t) {
|
|
1579
1579
|
return V(t.constructor) ? t.constructor.name : null;
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1582
|
-
return t instanceof Error ||
|
|
1581
|
+
function ji(t) {
|
|
1582
|
+
return t instanceof Error || oe(t.message) && t.constructor && Ti(t.constructor.stackTraceLimit);
|
|
1583
1583
|
}
|
|
1584
|
-
function
|
|
1585
|
-
if (typeof e != "object" ||
|
|
1584
|
+
function or(t, e) {
|
|
1585
|
+
if (typeof e != "object" || rr(e))
|
|
1586
1586
|
return !1;
|
|
1587
1587
|
if (e instanceof t)
|
|
1588
1588
|
return !0;
|
|
1589
1589
|
var n = nt(new t(""));
|
|
1590
|
-
if (
|
|
1590
|
+
if (ji(e))
|
|
1591
1591
|
for (; e; ) {
|
|
1592
1592
|
if (nt(e) === n)
|
|
1593
1593
|
return !0;
|
|
@@ -1595,13 +1595,13 @@ function rr(t, e) {
|
|
|
1595
1595
|
}
|
|
1596
1596
|
return !1;
|
|
1597
1597
|
}
|
|
1598
|
-
|
|
1599
|
-
|
|
1598
|
+
or.bind(null, TypeError);
|
|
1599
|
+
or.bind(null, SyntaxError);
|
|
1600
1600
|
function ot(t, e) {
|
|
1601
1601
|
var n = t instanceof Element || t instanceof HTMLDocument;
|
|
1602
|
-
return n && e ?
|
|
1602
|
+
return n && e ? Ci(t, e) : n;
|
|
1603
1603
|
}
|
|
1604
|
-
function
|
|
1604
|
+
function Ci(t, e) {
|
|
1605
1605
|
return e === void 0 && (e = ""), t && t.nodeName === e.toUpperCase();
|
|
1606
1606
|
}
|
|
1607
1607
|
function at(t) {
|
|
@@ -1614,8 +1614,8 @@ at(ot, "form");
|
|
|
1614
1614
|
at(ot, "button");
|
|
1615
1615
|
at(ot, "input");
|
|
1616
1616
|
at(ot, "select");
|
|
1617
|
-
function
|
|
1618
|
-
return t ?
|
|
1617
|
+
function xi(t) {
|
|
1618
|
+
return t ? ir(t) ? t : [t] : [];
|
|
1619
1619
|
}
|
|
1620
1620
|
function an(t) {
|
|
1621
1621
|
try {
|
|
@@ -1624,19 +1624,19 @@ function an(t) {
|
|
|
1624
1624
|
return null;
|
|
1625
1625
|
}
|
|
1626
1626
|
}
|
|
1627
|
-
function
|
|
1627
|
+
function Ai() {
|
|
1628
1628
|
if (H) {
|
|
1629
1629
|
var t = navigator, e = t.languages;
|
|
1630
1630
|
return t.userLanguage || (e && e.length ? e[0] : t.language);
|
|
1631
1631
|
}
|
|
1632
1632
|
}
|
|
1633
|
-
function
|
|
1633
|
+
function $i() {
|
|
1634
1634
|
try {
|
|
1635
1635
|
return Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
1636
1636
|
} catch {
|
|
1637
1637
|
}
|
|
1638
1638
|
}
|
|
1639
|
-
function
|
|
1639
|
+
function zi(t) {
|
|
1640
1640
|
return function(e) {
|
|
1641
1641
|
for (var n, r = /* @__PURE__ */ Object.create(null), i = /([^&=]+)=?([^&]*)/g; n = i.exec(e); ) {
|
|
1642
1642
|
var o = an(n[1]), a = an(n[2]);
|
|
@@ -1644,7 +1644,7 @@ function Ai(t) {
|
|
|
1644
1644
|
}
|
|
1645
1645
|
for (var s in r) {
|
|
1646
1646
|
var h = s.split("[");
|
|
1647
|
-
h.length > 1 && (
|
|
1647
|
+
h.length > 1 && (Ni(r, h.map(function(p) {
|
|
1648
1648
|
return p.replace(/[?[\]\\ ]/g, "");
|
|
1649
1649
|
}), r[s]), delete r[s]);
|
|
1650
1650
|
}
|
|
@@ -1657,7 +1657,7 @@ function Ai(t) {
|
|
|
1657
1657
|
return H && window.location.search.substring(1);
|
|
1658
1658
|
}(t));
|
|
1659
1659
|
}
|
|
1660
|
-
function
|
|
1660
|
+
function Ni(t, e, n) {
|
|
1661
1661
|
for (var r = e.length - 1, i = 0; i < r; ++i) {
|
|
1662
1662
|
var o = e[i];
|
|
1663
1663
|
if (o === "__proto__" || o === "constructor")
|
|
@@ -1673,7 +1673,7 @@ function st() {
|
|
|
1673
1673
|
}
|
|
1674
1674
|
return t;
|
|
1675
1675
|
}
|
|
1676
|
-
function
|
|
1676
|
+
function Di(t, e) {
|
|
1677
1677
|
var n, r, i, o = null, a = 0, s = function() {
|
|
1678
1678
|
a = /* @__PURE__ */ new Date(), o = null, i = t.apply(n, r);
|
|
1679
1679
|
};
|
|
@@ -1728,17 +1728,17 @@ function A() {
|
|
|
1728
1728
|
return t;
|
|
1729
1729
|
}, A.apply(this, arguments);
|
|
1730
1730
|
}
|
|
1731
|
-
var
|
|
1732
|
-
return typeof Symbol ===
|
|
1733
|
-
}(), Ve = " != " +
|
|
1734
|
-
function
|
|
1731
|
+
var ie = "function", te = "undefined", Li = "@@redux/" + Math.random().toString(36), sn = /* @__PURE__ */ function() {
|
|
1732
|
+
return typeof Symbol === ie && Symbol.observable || "@@observable";
|
|
1733
|
+
}(), Ve = " != " + ie;
|
|
1734
|
+
function ar(t, e, n) {
|
|
1735
1735
|
var r;
|
|
1736
|
-
if (typeof e ===
|
|
1737
|
-
if (typeof n !==
|
|
1736
|
+
if (typeof e === ie && typeof n === te && (n = e, e = void 0), typeof n !== te) {
|
|
1737
|
+
if (typeof n !== ie)
|
|
1738
1738
|
throw new Error("enhancer" + Ve);
|
|
1739
|
-
return n(
|
|
1739
|
+
return n(ar)(t, e);
|
|
1740
1740
|
}
|
|
1741
|
-
if (typeof t !==
|
|
1741
|
+
if (typeof t !== ie)
|
|
1742
1742
|
throw new Error("reducer" + Ve);
|
|
1743
1743
|
var i = t, o = e, a = [], s = a, h = !1;
|
|
1744
1744
|
function p() {
|
|
@@ -1748,7 +1748,7 @@ function ir(t, e, n) {
|
|
|
1748
1748
|
return o;
|
|
1749
1749
|
}
|
|
1750
1750
|
function c(d) {
|
|
1751
|
-
if (typeof d !==
|
|
1751
|
+
if (typeof d !== ie)
|
|
1752
1752
|
throw new Error("Listener" + Ve);
|
|
1753
1753
|
var w = !0;
|
|
1754
1754
|
return p(), s.push(d), function() {
|
|
@@ -1776,7 +1776,7 @@ function ir(t, e, n) {
|
|
|
1776
1776
|
return d;
|
|
1777
1777
|
}
|
|
1778
1778
|
return f({ type: "@@redux/INIT" }), (r = { dispatch: f, subscribe: c, getState: u, replaceReducer: function(d) {
|
|
1779
|
-
if (typeof d !==
|
|
1779
|
+
if (typeof d !== ie)
|
|
1780
1780
|
throw new Error("next reducer" + Ve);
|
|
1781
1781
|
i = d, f({ type: "@@redux/INIT" });
|
|
1782
1782
|
} })[sn] = function() {
|
|
@@ -1793,7 +1793,7 @@ function ir(t, e, n) {
|
|
|
1793
1793
|
}, d;
|
|
1794
1794
|
}, r;
|
|
1795
1795
|
}
|
|
1796
|
-
function
|
|
1796
|
+
function Ui(t, e) {
|
|
1797
1797
|
var n = e && e.type;
|
|
1798
1798
|
return "action " + (n && n.toString() || "?") + "reducer " + t + " returns " + te;
|
|
1799
1799
|
}
|
|
@@ -1807,7 +1807,7 @@ function je() {
|
|
|
1807
1807
|
};
|
|
1808
1808
|
});
|
|
1809
1809
|
}
|
|
1810
|
-
function
|
|
1810
|
+
function Ri() {
|
|
1811
1811
|
var t = arguments;
|
|
1812
1812
|
return function(e) {
|
|
1813
1813
|
return function(n, r, i) {
|
|
@@ -1820,21 +1820,21 @@ function Li() {
|
|
|
1820
1820
|
};
|
|
1821
1821
|
};
|
|
1822
1822
|
}
|
|
1823
|
-
var
|
|
1823
|
+
var ae = ge + "anon_id", me = ge + "user_id", Se = ge + "user_traits", re = "userId", Ie = "anonymousId", et = ["bootstrap", "params", "campaign", "initializeStart", "initialize", "initializeEnd", "ready", "resetStart", "reset", "resetEnd", "pageStart", "page", "pageEnd", "pageAborted", "trackStart", "track", "trackEnd", "trackAborted", "identifyStart", "identify", "identifyEnd", "identifyAborted", "userIdChanged", "registerPlugins", "enablePlugin", "disablePlugin", "online", "offline", "setItemStart", "setItem", "setItemEnd", "setItemAborted", "removeItemStart", "removeItem", "removeItemEnd", "removeItemAborted"], Ot = ["name", "EVENTS", "config", "loaded"], x = et.reduce(function(t, e) {
|
|
1824
1824
|
return t[e] = e, t;
|
|
1825
1825
|
}, { registerPluginType: function(t) {
|
|
1826
1826
|
return "registerPlugin:" + t;
|
|
1827
1827
|
}, pluginReadyType: function(t) {
|
|
1828
1828
|
return "ready:" + t;
|
|
1829
1829
|
} }), cn = /^utm_/, un = /^an_prop_/, ln = /^an_trait_/;
|
|
1830
|
-
function
|
|
1830
|
+
function Mi(t) {
|
|
1831
1831
|
var e = t.storage.setItem;
|
|
1832
1832
|
return function(n) {
|
|
1833
1833
|
return function(r) {
|
|
1834
1834
|
return function(i) {
|
|
1835
1835
|
if (i.type === x.bootstrap) {
|
|
1836
1836
|
var o = i.params, a = i.user, s = i.persistedUser, h = i.initialUser, p = s.userId === a.userId;
|
|
1837
|
-
s.anonymousId !== a.anonymousId && e(
|
|
1837
|
+
s.anonymousId !== a.anonymousId && e(ae, a.anonymousId), p || e(me, a.userId), h.traits && e(Se, A({}, p && s.traits ? s.traits : {}, h.traits));
|
|
1838
1838
|
var u = Object.keys(i.params);
|
|
1839
1839
|
if (u.length) {
|
|
1840
1840
|
var c = o.an_uid, f = o.an_event, d = u.reduce(function(w, k) {
|
|
@@ -1856,10 +1856,10 @@ function Ui(t) {
|
|
|
1856
1856
|
};
|
|
1857
1857
|
};
|
|
1858
1858
|
}
|
|
1859
|
-
function
|
|
1859
|
+
function Zi(t) {
|
|
1860
1860
|
return function(e, n) {
|
|
1861
1861
|
if (e === void 0 && (e = {}), n === void 0 && (n = {}), n.type === x.setItemEnd) {
|
|
1862
|
-
if (n.key ===
|
|
1862
|
+
if (n.key === ae)
|
|
1863
1863
|
return A({}, e, { anonymousId: n.value });
|
|
1864
1864
|
if (n.key === me)
|
|
1865
1865
|
return A({}, e, { userId: n.value });
|
|
@@ -1868,7 +1868,7 @@ function Ri(t) {
|
|
|
1868
1868
|
case x.identify:
|
|
1869
1869
|
return Object.assign({}, e, { userId: n.userId, traits: A({}, e.traits, n.traits) });
|
|
1870
1870
|
case x.reset:
|
|
1871
|
-
return [me,
|
|
1871
|
+
return [me, ae, Se].forEach(function(r) {
|
|
1872
1872
|
t.removeItem(r);
|
|
1873
1873
|
}), Object.assign({}, e, { userId: null, anonymousId: null, traits: {} });
|
|
1874
1874
|
default:
|
|
@@ -1877,23 +1877,23 @@ function Ri(t) {
|
|
|
1877
1877
|
};
|
|
1878
1878
|
}
|
|
1879
1879
|
function dn(t) {
|
|
1880
|
-
return { userId: t.getItem(me), anonymousId: t.getItem(
|
|
1880
|
+
return { userId: t.getItem(me), anonymousId: t.getItem(ae), traits: t.getItem(Se) };
|
|
1881
1881
|
}
|
|
1882
1882
|
var Pt = function(t) {
|
|
1883
1883
|
return ge + "TEMP" + ge + t;
|
|
1884
1884
|
};
|
|
1885
|
-
function
|
|
1885
|
+
function Wi(t) {
|
|
1886
1886
|
var e = t.storage, n = e.setItem, r = e.removeItem, i = e.getItem;
|
|
1887
1887
|
return function(o) {
|
|
1888
1888
|
return function(a) {
|
|
1889
1889
|
return function(s) {
|
|
1890
1890
|
var h = s.userId, p = s.traits, u = s.options;
|
|
1891
|
-
if (s.type === x.reset && ([me, Se,
|
|
1891
|
+
if (s.type === x.reset && ([me, Se, ae].forEach(function(d) {
|
|
1892
1892
|
r(d);
|
|
1893
|
-
}), [
|
|
1893
|
+
}), [re, Ie, "traits"].forEach(function(d) {
|
|
1894
1894
|
Ce(Pt(d));
|
|
1895
1895
|
})), s.type === x.identify) {
|
|
1896
|
-
i(
|
|
1896
|
+
i(ae) || n(ae, st());
|
|
1897
1897
|
var c = i(me), f = i(Se) || {};
|
|
1898
1898
|
c && c !== h && o.dispatch({ type: x.userIdChanged, old: { userId: c, traits: f }, new: { userId: h, traits: p }, options: u }), h && n(me, h), p && n(Se, A({}, f, p));
|
|
1899
1899
|
}
|
|
@@ -1906,19 +1906,19 @@ var De = {};
|
|
|
1906
1906
|
function hn(t, e) {
|
|
1907
1907
|
De[t] && V(De[t]) && (De[t](e), delete De[t]);
|
|
1908
1908
|
}
|
|
1909
|
-
function
|
|
1909
|
+
function sr(t, e, n) {
|
|
1910
1910
|
return new Promise(function(r, i) {
|
|
1911
1911
|
return e() ? r(t) : n < 1 ? i(A({}, t, { queue: !0 })) : new Promise(function(o) {
|
|
1912
1912
|
return setTimeout(o, 10);
|
|
1913
1913
|
}).then(function(o) {
|
|
1914
|
-
return
|
|
1914
|
+
return sr(t, e, n - 10).then(r, i);
|
|
1915
1915
|
});
|
|
1916
1916
|
});
|
|
1917
1917
|
}
|
|
1918
|
-
function
|
|
1918
|
+
function Ki(t) {
|
|
1919
1919
|
return { abort: t };
|
|
1920
1920
|
}
|
|
1921
|
-
function
|
|
1921
|
+
function cr(t, e, n) {
|
|
1922
1922
|
var r = {}, i = e(), o = t.getState(), a = o.plugins, s = o.queue, h = o.user;
|
|
1923
1923
|
if (!o.context.offline && s && s.actions && s.actions.length) {
|
|
1924
1924
|
var p = s.actions.reduce(function(c, f, d) {
|
|
@@ -1929,11 +1929,11 @@ function ar(t, e, n) {
|
|
|
1929
1929
|
var f = s.actions[c], d = f.plugin, w = f.payload.type, k = i[d][w];
|
|
1930
1930
|
if (k && V(k)) {
|
|
1931
1931
|
var v, E = function(l, b) {
|
|
1932
|
-
return l === void 0 && (l = {}), b === void 0 && (b = {}), [
|
|
1932
|
+
return l === void 0 && (l = {}), b === void 0 && (b = {}), [re, Ie].reduce(function(P, j) {
|
|
1933
1933
|
return l.hasOwnProperty(j) && b[j] && b[j] !== l[j] && (P[j] = b[j]), P;
|
|
1934
1934
|
}, l);
|
|
1935
1935
|
}(f.payload, h), S = r[E.meta.rid];
|
|
1936
|
-
if (!S && (v = k({ payload: E, config: a[d].config, instance: n, abort:
|
|
1936
|
+
if (!S && (v = k({ payload: E, config: a[d].config, instance: n, abort: Ki })) && X(v) && v.abort)
|
|
1937
1937
|
return void (r[E.meta.rid] = !0);
|
|
1938
1938
|
if (!S) {
|
|
1939
1939
|
var g = w + ":" + d;
|
|
@@ -1973,7 +1973,7 @@ var mt = function(t) {
|
|
|
1973
1973
|
throw new Error(U.type + " action not cancellable. Remove abort in " + R);
|
|
1974
1974
|
};
|
|
1975
1975
|
}(S, j);
|
|
1976
|
-
return { payload:
|
|
1976
|
+
return { payload: Fi(S), instance: v, config: b || {}, abort: $ };
|
|
1977
1977
|
};
|
|
1978
1978
|
}(r, d), k = e.exact.reduce(function(v, E) {
|
|
1979
1979
|
var S = E.pluginName, g = E.methodName, l = !1;
|
|
@@ -2051,7 +2051,7 @@ var mt = function(t) {
|
|
|
2051
2051
|
if (h.plugins.includes(c), E._ && E._.originalAction === c)
|
|
2052
2052
|
return E;
|
|
2053
2053
|
var S = A({}, E, { _: { originalAction: E.type, called: E.type, from: "engineEnd" } });
|
|
2054
|
-
|
|
2054
|
+
ur(E, e.exact.length) && !c.match(/End$/) && (S = A({}, S, { type: E.type + "Aborted" })), s.dispatch(S);
|
|
2055
2055
|
}
|
|
2056
2056
|
return E;
|
|
2057
2057
|
});
|
|
@@ -2081,11 +2081,11 @@ function yt(t, e) {
|
|
|
2081
2081
|
var n = t.abort;
|
|
2082
2082
|
return !!n && (n === !0 || vn(n, e) || n && vn(n.plugins, e));
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2084
|
+
function ur(t, e) {
|
|
2085
2085
|
var n = t.abort;
|
|
2086
2086
|
if (!n)
|
|
2087
2087
|
return !1;
|
|
2088
|
-
if (n === !0 ||
|
|
2088
|
+
if (n === !0 || oe(n))
|
|
2089
2089
|
return !0;
|
|
2090
2090
|
var r = n.plugins;
|
|
2091
2091
|
return Ze(n) && n.length === e || Ze(r) && r.length === e;
|
|
@@ -2100,12 +2100,12 @@ function wn(t) {
|
|
|
2100
2100
|
var e = t.match(/(.*):(.*)/);
|
|
2101
2101
|
return !!e && { method: e[1], name: e[2] };
|
|
2102
2102
|
}
|
|
2103
|
-
function
|
|
2103
|
+
function Fi(t) {
|
|
2104
2104
|
return Object.keys(t).reduce(function(e, n) {
|
|
2105
2105
|
return n === "type" || (e[n] = X(t[n]) ? Object.assign({}, t[n]) : t[n]), e;
|
|
2106
2106
|
}, {});
|
|
2107
2107
|
}
|
|
2108
|
-
function
|
|
2108
|
+
function Hi(t, e, n) {
|
|
2109
2109
|
var r = {};
|
|
2110
2110
|
return function(i) {
|
|
2111
2111
|
return function(o) {
|
|
@@ -2125,7 +2125,7 @@ function Ki(t, e, n) {
|
|
|
2125
2125
|
return f[l];
|
|
2126
2126
|
}), k = [], v = [], E = a.disabled, S = w.map(function(l) {
|
|
2127
2127
|
var b = l.loaded, P = l.name, j = l.config;
|
|
2128
|
-
return
|
|
2128
|
+
return sr(l, function() {
|
|
2129
2129
|
return b({ config: j });
|
|
2130
2130
|
}, 1e4).then(function($) {
|
|
2131
2131
|
return r[P] || (i.dispatch({ type: x.pluginReadyType(P), name: P, events: Object.keys(l).filter(function(U) {
|
|
@@ -2147,7 +2147,7 @@ function Ki(t, e, n) {
|
|
|
2147
2147
|
var g = function() {
|
|
2148
2148
|
if (p !== x.bootstrap)
|
|
2149
2149
|
return /^ready:([^:]*)$/.test(p) && setTimeout(function() {
|
|
2150
|
-
return
|
|
2150
|
+
return cr(i, e, t);
|
|
2151
2151
|
}, 0), Promise.resolve(function(l, b, P, j, $) {
|
|
2152
2152
|
try {
|
|
2153
2153
|
var U = V(b) ? b() : b, R = l.type, _ = R.replace(_e, "");
|
|
@@ -2155,7 +2155,7 @@ function Ki(t, e, n) {
|
|
|
2155
2155
|
return Promise.resolve(l);
|
|
2156
2156
|
var I = P.getState(), C = (W = U, (J = I.plugins) === void 0 && (J = {}), (Ae = l.options) === void 0 && (Ae = {}), Object.keys(W).filter(function(m) {
|
|
2157
2157
|
var y = Ae.plugins || {};
|
|
2158
|
-
return
|
|
2158
|
+
return Ei(y[m]) ? y[m] : y.all !== !1 && (!J[m] || J[m].enabled !== !1);
|
|
2159
2159
|
}).map(function(m) {
|
|
2160
2160
|
return W[m];
|
|
2161
2161
|
}));
|
|
@@ -2190,7 +2190,7 @@ function Ki(t, e, n) {
|
|
|
2190
2190
|
return m;
|
|
2191
2191
|
}) : m;
|
|
2192
2192
|
}
|
|
2193
|
-
if (
|
|
2193
|
+
if (ur(m, D.length))
|
|
2194
2194
|
return m;
|
|
2195
2195
|
var O, z = function() {
|
|
2196
2196
|
if (R !== _)
|
|
@@ -2217,7 +2217,7 @@ function Ki(t, e, n) {
|
|
|
2217
2217
|
};
|
|
2218
2218
|
};
|
|
2219
2219
|
}
|
|
2220
|
-
function
|
|
2220
|
+
function Ji(t) {
|
|
2221
2221
|
return function(e) {
|
|
2222
2222
|
return function(n) {
|
|
2223
2223
|
return function(r) {
|
|
@@ -2232,7 +2232,7 @@ function Fi(t) {
|
|
|
2232
2232
|
};
|
|
2233
2233
|
};
|
|
2234
2234
|
}
|
|
2235
|
-
var
|
|
2235
|
+
var Xi = function() {
|
|
2236
2236
|
var t = this;
|
|
2237
2237
|
this.before = [], this.after = [], this.addMiddleware = function(e, n) {
|
|
2238
2238
|
t[n] = t[n].concat(e);
|
|
@@ -2256,7 +2256,7 @@ var Hi = function() {
|
|
|
2256
2256
|
};
|
|
2257
2257
|
};
|
|
2258
2258
|
};
|
|
2259
|
-
function
|
|
2259
|
+
function Vi(t) {
|
|
2260
2260
|
return function(e, n) {
|
|
2261
2261
|
e === void 0 && (e = {});
|
|
2262
2262
|
var r = {};
|
|
@@ -2293,26 +2293,26 @@ function kn(t, e, n) {
|
|
|
2293
2293
|
return r[i] = A({}, n[i], { enabled: e }), r;
|
|
2294
2294
|
}, n);
|
|
2295
2295
|
}
|
|
2296
|
-
function
|
|
2296
|
+
function lr(t) {
|
|
2297
2297
|
try {
|
|
2298
2298
|
return JSON.parse(JSON.stringify(t));
|
|
2299
2299
|
} catch {
|
|
2300
2300
|
}
|
|
2301
2301
|
return t;
|
|
2302
2302
|
}
|
|
2303
|
-
var
|
|
2304
|
-
function
|
|
2305
|
-
t === void 0 && (t =
|
|
2303
|
+
var Yi = { last: {}, history: [] };
|
|
2304
|
+
function Gi(t, e) {
|
|
2305
|
+
t === void 0 && (t = Yi);
|
|
2306
2306
|
var n = e.options, r = e.meta;
|
|
2307
2307
|
if (e.type === x.track) {
|
|
2308
|
-
var i =
|
|
2308
|
+
var i = lr(A({ event: e.event, properties: e.properties }, Object.keys(n).length && { options: n }, { meta: r }));
|
|
2309
2309
|
return A({}, t, { last: i, history: t.history.concat(i) });
|
|
2310
2310
|
}
|
|
2311
2311
|
return t;
|
|
2312
2312
|
}
|
|
2313
|
-
var
|
|
2314
|
-
function
|
|
2315
|
-
t === void 0 && (t =
|
|
2313
|
+
var Bi = { actions: [] };
|
|
2314
|
+
function qi(t, e) {
|
|
2315
|
+
t === void 0 && (t = Bi);
|
|
2316
2316
|
var n = e.payload;
|
|
2317
2317
|
switch (e.type) {
|
|
2318
2318
|
case "queue":
|
|
@@ -2324,12 +2324,12 @@ function Gi(t, e) {
|
|
|
2324
2324
|
return t;
|
|
2325
2325
|
}
|
|
2326
2326
|
}
|
|
2327
|
-
var
|
|
2328
|
-
function
|
|
2327
|
+
var dr = /#.*$/;
|
|
2328
|
+
function Qi(t) {
|
|
2329
2329
|
var e = /(http[s]?:\/\/)?([^\/\s]+\/)(.*)/g.exec(t);
|
|
2330
|
-
return "/" + (e && e[3] ? e[3].split("?")[0].replace(
|
|
2330
|
+
return "/" + (e && e[3] ? e[3].split("?")[0].replace(dr, "") : "");
|
|
2331
2331
|
}
|
|
2332
|
-
var
|
|
2332
|
+
var hr, fr, pr, mr, eo = function(t) {
|
|
2333
2333
|
if (t === void 0 && (t = {}), !H)
|
|
2334
2334
|
return t;
|
|
2335
2335
|
var e = document, n = e.title, r = e.referrer, i = window, o = i.location, a = i.innerWidth, s = i.innerHeight, h = o.hash, p = o.search, u = function(f) {
|
|
@@ -2340,27 +2340,27 @@ var lr, dr, hr, fr, qi = function(t) {
|
|
|
2340
2340
|
return w.getAttribute("href");
|
|
2341
2341
|
}
|
|
2342
2342
|
}();
|
|
2343
|
-
return d ? d.match(/\?/) ? d : d + f : window.location.href.replace(
|
|
2344
|
-
}(p), c = { title: n, url: u, path:
|
|
2343
|
+
return d ? d.match(/\?/) ? d : d + f : window.location.href.replace(dr, "");
|
|
2344
|
+
}(p), c = { title: n, url: u, path: Qi(u), hash: h, search: p, width: a, height: s };
|
|
2345
2345
|
return r && r !== "" && (c.referrer = r), A({}, c, t);
|
|
2346
|
-
},
|
|
2347
|
-
function
|
|
2348
|
-
t === void 0 && (t =
|
|
2346
|
+
}, to = { last: {}, history: [] };
|
|
2347
|
+
function no(t, e) {
|
|
2348
|
+
t === void 0 && (t = to);
|
|
2349
2349
|
var n = e.options;
|
|
2350
2350
|
if (e.type === x.page) {
|
|
2351
|
-
var r =
|
|
2351
|
+
var r = lr(A({ properties: e.properties, meta: e.meta }, Object.keys(n).length && { options: n }));
|
|
2352
2352
|
return A({}, t, { last: r, history: t.history.concat(r) });
|
|
2353
2353
|
}
|
|
2354
2354
|
return t;
|
|
2355
2355
|
}
|
|
2356
|
-
|
|
2356
|
+
hr = function() {
|
|
2357
2357
|
if (!H)
|
|
2358
2358
|
return !1;
|
|
2359
2359
|
var t = navigator.appVersion;
|
|
2360
2360
|
return ~t.indexOf("Win") ? "Windows" : ~t.indexOf("Mac") ? "MacOS" : ~t.indexOf("X11") ? "UNIX" : ~t.indexOf("Linux") ? "Linux" : "Unknown OS";
|
|
2361
|
-
}(),
|
|
2362
|
-
var In = { initialized: !1, sessionId: st(), app: null, version: null, debug: !1, offline: !!H && !navigator.onLine, os: { name:
|
|
2363
|
-
function
|
|
2361
|
+
}(), fr = H ? document.referrer : null, pr = Ai(), mr = $i();
|
|
2362
|
+
var In = { initialized: !1, sessionId: st(), app: null, version: null, debug: !1, offline: !!H && !navigator.onLine, os: { name: hr }, userAgent: H ? navigator.userAgent : "node", library: { name: "analytics", version: "0.12.7" }, timezone: mr, locale: pr, campaign: {}, referrer: fr };
|
|
2363
|
+
function ro(t, e) {
|
|
2364
2364
|
t === void 0 && (t = In);
|
|
2365
2365
|
var n = t.initialized, r = e.campaign;
|
|
2366
2366
|
switch (e.type) {
|
|
@@ -2374,8 +2374,8 @@ function to(t, e) {
|
|
|
2374
2374
|
return n ? t : A({}, In, t, { initialized: !0 });
|
|
2375
2375
|
}
|
|
2376
2376
|
}
|
|
2377
|
-
var
|
|
2378
|
-
function
|
|
2377
|
+
var io = ["plugins", "reducers", "storage"];
|
|
2378
|
+
function oo(t, e, n) {
|
|
2379
2379
|
if (H) {
|
|
2380
2380
|
var r = window[(n ? "add" : "remove") + "EventListener"];
|
|
2381
2381
|
t.split(" ").forEach(function(i) {
|
|
@@ -2383,15 +2383,15 @@ function ro(t, e, n) {
|
|
|
2383
2383
|
});
|
|
2384
2384
|
}
|
|
2385
2385
|
}
|
|
2386
|
-
function
|
|
2387
|
-
var e =
|
|
2386
|
+
function ao(t) {
|
|
2387
|
+
var e = oo.bind(null, "online offline", function(n) {
|
|
2388
2388
|
return Promise.resolve(!navigator.onLine).then(t);
|
|
2389
2389
|
});
|
|
2390
2390
|
return e(!0), function(n) {
|
|
2391
2391
|
return e(!1);
|
|
2392
2392
|
};
|
|
2393
2393
|
}
|
|
2394
|
-
function
|
|
2394
|
+
function gr() {
|
|
2395
2395
|
return ve("analytics", []), function(t) {
|
|
2396
2396
|
return function(e, n, r) {
|
|
2397
2397
|
var i = t(e, n, r), o = i.dispatch;
|
|
@@ -2403,11 +2403,11 @@ function pr() {
|
|
|
2403
2403
|
}
|
|
2404
2404
|
function Sn(t) {
|
|
2405
2405
|
return function() {
|
|
2406
|
-
return je(je.apply(null, arguments),
|
|
2406
|
+
return je(je.apply(null, arguments), gr());
|
|
2407
2407
|
};
|
|
2408
2408
|
}
|
|
2409
2409
|
function vt(t) {
|
|
2410
|
-
return t ?
|
|
2410
|
+
return t ? ir(t) ? t : [t] : [];
|
|
2411
2411
|
}
|
|
2412
2412
|
function _n(t, e, n) {
|
|
2413
2413
|
t === void 0 && (t = {});
|
|
@@ -2423,7 +2423,7 @@ function _n(t, e, n) {
|
|
|
2423
2423
|
i && i(a), r(a);
|
|
2424
2424
|
})), A({}, t, { rid: o, ts: (/* @__PURE__ */ new Date()).getTime() }, e ? { hasCallback: !0 } : {});
|
|
2425
2425
|
}
|
|
2426
|
-
function
|
|
2426
|
+
function so(t) {
|
|
2427
2427
|
t === void 0 && (t = {});
|
|
2428
2428
|
var e = t.reducers || {}, n = t.initialUser || {}, r = (t.plugins || []).reduce(function(m, y) {
|
|
2429
2429
|
if (V(y))
|
|
@@ -2458,9 +2458,9 @@ function oo(t) {
|
|
|
2458
2458
|
return !Ot.includes(m);
|
|
2459
2459
|
})), p = Array.from(h).sort(), u = function() {
|
|
2460
2460
|
return a;
|
|
2461
|
-
}, c = new
|
|
2461
|
+
}, c = new Xi(), f = c.addMiddleware, d = c.removeMiddleware, w = c.dynamicMiddlewares, k = function() {
|
|
2462
2462
|
throw new Error("Abort disabled inListener");
|
|
2463
|
-
}, v =
|
|
2463
|
+
}, v = zi(), E = dn(i), S = A({}, E, n, v.an_uid ? { userId: v.an_uid } : {}, v.an_aid ? { anonymousId: v.an_aid } : {});
|
|
2464
2464
|
S.anonymousId || (S.anonymousId = st());
|
|
2465
2465
|
var g = A({ enable: function(m, y) {
|
|
2466
2466
|
return new Promise(function(O) {
|
|
@@ -2472,9 +2472,9 @@ function oo(t) {
|
|
|
2472
2472
|
});
|
|
2473
2473
|
} }, r.methods), l = !1, b = { identify: function(m, y, O, z) {
|
|
2474
2474
|
try {
|
|
2475
|
-
var N =
|
|
2476
|
-
ve(Pt(
|
|
2477
|
-
var K = N || L.userId || o(
|
|
2475
|
+
var N = oe(m) ? m : null, L = X(m) ? m : y, F = O || {}, Z = b.user();
|
|
2476
|
+
ve(Pt(re), N);
|
|
2477
|
+
var K = N || L.userId || o(re, b, L);
|
|
2478
2478
|
return Promise.resolve(new Promise(function(M) {
|
|
2479
2479
|
T.dispatch(A({ type: x.identifyStart, userId: K, traits: L || {}, options: F, anonymousId: Z.anonymousId }, Z.id && Z.id !== N && { previousId: Z.id }), M, [y, O, z]);
|
|
2480
2480
|
}));
|
|
@@ -2484,11 +2484,11 @@ function oo(t) {
|
|
|
2484
2484
|
}, track: function(m, y, O, z) {
|
|
2485
2485
|
try {
|
|
2486
2486
|
var N = X(m) ? m.event : m;
|
|
2487
|
-
if (!N || !
|
|
2487
|
+
if (!N || !oe(N))
|
|
2488
2488
|
throw new Error("EventMissing");
|
|
2489
2489
|
var L = X(m) ? m : y || {}, F = X(O) ? O : {};
|
|
2490
2490
|
return Promise.resolve(new Promise(function(Z) {
|
|
2491
|
-
T.dispatch({ type: x.trackStart, event: N, properties: L, options: F, userId: o(
|
|
2491
|
+
T.dispatch({ type: x.trackStart, event: N, properties: L, options: F, userId: o(re, b, y), anonymousId: o(Ie, b, y) }, Z, [y, O, z]);
|
|
2492
2492
|
}));
|
|
2493
2493
|
} catch (Z) {
|
|
2494
2494
|
return Promise.reject(Z);
|
|
@@ -2497,14 +2497,14 @@ function oo(t) {
|
|
|
2497
2497
|
try {
|
|
2498
2498
|
var z = X(m) ? m : {}, N = X(y) ? y : {};
|
|
2499
2499
|
return Promise.resolve(new Promise(function(L) {
|
|
2500
|
-
T.dispatch({ type: x.pageStart, properties:
|
|
2500
|
+
T.dispatch({ type: x.pageStart, properties: eo(z), options: N, userId: o(re, b, z), anonymousId: o(Ie, b, z) }, L, [m, y, O]);
|
|
2501
2501
|
}));
|
|
2502
2502
|
} catch (L) {
|
|
2503
2503
|
return Promise.reject(L);
|
|
2504
2504
|
}
|
|
2505
2505
|
}, user: function(m) {
|
|
2506
|
-
if (m ===
|
|
2507
|
-
return o(
|
|
2506
|
+
if (m === re || m === "id")
|
|
2507
|
+
return o(re, b);
|
|
2508
2508
|
if (m === Ie || m === "anonId")
|
|
2509
2509
|
return o(Ie, b);
|
|
2510
2510
|
var y = b.getState("user");
|
|
@@ -2564,7 +2564,7 @@ function oo(t) {
|
|
|
2564
2564
|
var y = T.getState();
|
|
2565
2565
|
return m ? rn(y, m) : Object.assign({}, y);
|
|
2566
2566
|
}, dispatch: function(m) {
|
|
2567
|
-
var y =
|
|
2567
|
+
var y = oe(m) ? { type: m } : m;
|
|
2568
2568
|
if (et.includes(y.type))
|
|
2569
2569
|
throw new Error("reserved action " + y.type);
|
|
2570
2570
|
var O = A({}, y, { _: A({ originalAction: y.type }, m._ || {}) });
|
|
@@ -2574,38 +2574,38 @@ function oo(t) {
|
|
|
2574
2574
|
}, removeItem: function(m, y) {
|
|
2575
2575
|
T.dispatch({ type: x.removeItemStart, key: m, options: y });
|
|
2576
2576
|
} }, setAnonymousId: function(m, y) {
|
|
2577
|
-
b.storage.setItem(
|
|
2577
|
+
b.storage.setItem(ae, m, y);
|
|
2578
2578
|
}, events: { core: et, plugins: s } }, P = r.middlewares.concat([function(m) {
|
|
2579
2579
|
return function(y) {
|
|
2580
2580
|
return function(O) {
|
|
2581
2581
|
return O.meta || (O.meta = _n()), y(O);
|
|
2582
2582
|
};
|
|
2583
2583
|
};
|
|
2584
|
-
}, w(Ye),
|
|
2584
|
+
}, w(Ye), Hi(b, u, { all: p, plugins: s }), Ji(i), Mi(b), Wi(b), w(Ge)]), j = { context: ro, user: Zi(i), page: no, track: Gi, plugins: Vi(u), queue: qi }, $ = je, U = je;
|
|
2585
2585
|
if (H && t.debug) {
|
|
2586
2586
|
var R = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__;
|
|
2587
2587
|
R && ($ = R({ trace: !0, traceLimit: 25 })), U = function() {
|
|
2588
|
-
return arguments.length === 0 ?
|
|
2588
|
+
return arguments.length === 0 ? gr() : X(typeof arguments[0]) ? Sn() : Sn().apply(null, arguments);
|
|
2589
2589
|
};
|
|
2590
2590
|
}
|
|
2591
2591
|
var _, I = function(m) {
|
|
2592
2592
|
return Object.keys(m).reduce(function(y, O) {
|
|
2593
|
-
return
|
|
2593
|
+
return io.includes(O) || (y[O] = m[O]), y;
|
|
2594
2594
|
}, {});
|
|
2595
2595
|
}(t), C = r.pluginsArray.reduce(function(m, y) {
|
|
2596
2596
|
var O = y.name, z = y.config, N = y.loaded, L = r.pluginEnabled[O];
|
|
2597
2597
|
return m[O] = { enabled: L, initialized: !!L && !y.initialize, loaded: !!N({ config: z }), config: z }, m;
|
|
2598
|
-
}, {}), D = { context: I, user: S, plugins: C }, T =
|
|
2598
|
+
}, {}), D = { context: I, user: S, plugins: C }, T = ar(function(m) {
|
|
2599
2599
|
for (var y = Object.keys(m), O = {}, z = 0; z < y.length; z++) {
|
|
2600
2600
|
var N = y[z];
|
|
2601
|
-
typeof m[N] ===
|
|
2601
|
+
typeof m[N] === ie && (O[N] = m[N]);
|
|
2602
2602
|
}
|
|
2603
2603
|
var L, F = Object.keys(O);
|
|
2604
2604
|
try {
|
|
2605
2605
|
(function(Z) {
|
|
2606
2606
|
Object.keys(Z).forEach(function(K) {
|
|
2607
2607
|
var M = Z[K];
|
|
2608
|
-
if (typeof M(void 0, { type: "@@redux/INIT" }) === te || typeof M(void 0, { type:
|
|
2608
|
+
if (typeof M(void 0, { type: "@@redux/INIT" }) === te || typeof M(void 0, { type: Li }) === te)
|
|
2609
2609
|
throw new Error("reducer " + K + " " + te);
|
|
2610
2610
|
});
|
|
2611
2611
|
})(O);
|
|
@@ -2618,14 +2618,14 @@ function oo(t) {
|
|
|
2618
2618
|
for (var M = !1, q = {}, $e = 0; $e < F.length; $e++) {
|
|
2619
2619
|
var Fe = F[$e], Ft = Z[Fe], lt = (0, O[Fe])(Ft, K);
|
|
2620
2620
|
if (typeof lt === te) {
|
|
2621
|
-
var
|
|
2622
|
-
throw new Error(
|
|
2621
|
+
var Or = Ui(Fe, K);
|
|
2622
|
+
throw new Error(Or);
|
|
2623
2623
|
}
|
|
2624
2624
|
q[Fe] = lt, M = M || lt !== Ft;
|
|
2625
2625
|
}
|
|
2626
2626
|
return M ? q : Z;
|
|
2627
2627
|
};
|
|
2628
|
-
}(A({}, j, e)), D, U($(
|
|
2628
|
+
}(A({}, j, e)), D, U($(Ri.apply(void 0, P))));
|
|
2629
2629
|
T.dispatch = (_ = T.dispatch, function(m, y, O) {
|
|
2630
2630
|
var z = A({}, m, { meta: _n(m.meta, y, vt(O)) });
|
|
2631
2631
|
return _.apply(null, [z]);
|
|
@@ -2640,24 +2640,24 @@ function oo(t) {
|
|
|
2640
2640
|
return T.dispatch({ type: x.registerPlugins, plugins: W, enabled: r.pluginEnabled }), r.pluginsArray.map(function(m, y) {
|
|
2641
2641
|
var O = m.bootstrap, z = m.config, N = m.name;
|
|
2642
2642
|
O && V(O) && O({ instance: b, config: z, payload: m }), T.dispatch({ type: x.registerPluginType(N), name: N, enabled: r.pluginEnabled[N], plugin: m }), r.pluginsArray.length === y + 1 && T.dispatch({ type: x.initializeStart, plugins: J, disabled: Ae });
|
|
2643
|
-
}),
|
|
2643
|
+
}), ao(function(m) {
|
|
2644
2644
|
T.dispatch({ type: m ? x.offline : x.online });
|
|
2645
2645
|
}), function(m, y, O) {
|
|
2646
2646
|
setInterval(function() {
|
|
2647
|
-
return
|
|
2647
|
+
return cr(m, y, O);
|
|
2648
2648
|
}, 3e3);
|
|
2649
2649
|
}(T, u, b), b;
|
|
2650
2650
|
}
|
|
2651
|
-
var Ye = "before", Ge = "after", Ue = "cookie", de =
|
|
2652
|
-
function
|
|
2651
|
+
var Ye = "before", Ge = "after", Ue = "cookie", de = wr(), yr = ct, co = ct;
|
|
2652
|
+
function vr(t) {
|
|
2653
2653
|
return de ? ct(t, "", -1) : Ce(t);
|
|
2654
2654
|
}
|
|
2655
|
-
function
|
|
2655
|
+
function wr() {
|
|
2656
2656
|
if (de !== void 0)
|
|
2657
2657
|
return de;
|
|
2658
2658
|
var t = "cookiecookie";
|
|
2659
2659
|
try {
|
|
2660
|
-
ct(t, t), de = document.cookie.indexOf(t) !== -1,
|
|
2660
|
+
ct(t, t), de = document.cookie.indexOf(t) !== -1, vr(t);
|
|
2661
2661
|
} catch {
|
|
2662
2662
|
de = !1;
|
|
2663
2663
|
}
|
|
@@ -2669,11 +2669,11 @@ function ct(t, e, n, r, i, o) {
|
|
|
2669
2669
|
return de === !1 && (a ? ve(t, e) : ye(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]);
|
|
2670
2670
|
}
|
|
2671
2671
|
}
|
|
2672
|
-
var Re = "localStorage",
|
|
2672
|
+
var Re = "localStorage", uo = Lt.bind(null, "localStorage");
|
|
2673
2673
|
xe("localStorage", "getItem", ye);
|
|
2674
2674
|
xe("localStorage", "setItem", ve);
|
|
2675
2675
|
xe("localStorage", "removeItem", Ce);
|
|
2676
|
-
var Me = "sessionStorage",
|
|
2676
|
+
var Me = "sessionStorage", lo = Lt.bind(null, "sessionStorage");
|
|
2677
2677
|
xe("sessionStorage", "getItem", ye);
|
|
2678
2678
|
xe("sessionStorage", "setItem", ve);
|
|
2679
2679
|
xe("sessionStorage", "removeItem", Ce);
|
|
@@ -2692,13 +2692,13 @@ function Ee(t) {
|
|
|
2692
2692
|
if (e !== null && e !== "")
|
|
2693
2693
|
return e;
|
|
2694
2694
|
}
|
|
2695
|
-
var
|
|
2696
|
-
function
|
|
2695
|
+
var ho = uo(), fo = lo(), po = wr();
|
|
2696
|
+
function br(t, e) {
|
|
2697
2697
|
if (t) {
|
|
2698
2698
|
var n = Ut(e), r = !Wt(n), i = Rt(n) ? Ee(localStorage.getItem(t)) : void 0;
|
|
2699
2699
|
if (r && !ke(i))
|
|
2700
2700
|
return i;
|
|
2701
|
-
var o = Mt(n) ? Ee(
|
|
2701
|
+
var o = Mt(n) ? Ee(yr(t)) : void 0;
|
|
2702
2702
|
if (r && o)
|
|
2703
2703
|
return o;
|
|
2704
2704
|
var a = Zt(n) ? Ee(sessionStorage.getItem(t)) : void 0;
|
|
@@ -2708,41 +2708,41 @@ function vr(t, e) {
|
|
|
2708
2708
|
return r ? s : { localStorage: i, sessionStorage: a, cookie: o, global: s };
|
|
2709
2709
|
}
|
|
2710
2710
|
}
|
|
2711
|
-
function
|
|
2711
|
+
function mo(t, e, n) {
|
|
2712
2712
|
if (t && !ke(e)) {
|
|
2713
2713
|
var r = {}, i = Ut(n), o = JSON.stringify(e), a = !Wt(i);
|
|
2714
|
-
return Rt(i) && (r[Re] = Be(Re, e, Ee(localStorage.getItem(t))), localStorage.setItem(t, o), a) ? r[Re] : Mt(i) && (r[Ue] = Be(Ue, e, Ee(
|
|
2714
|
+
return Rt(i) && (r[Re] = Be(Re, e, Ee(localStorage.getItem(t))), localStorage.setItem(t, o), a) ? r[Re] : Mt(i) && (r[Ue] = Be(Ue, e, Ee(yr(t))), co(t, o), a) ? r[Ue] : Zt(i) && (r[Me] = Be(Me, e, Ee(sessionStorage.getItem(t))), sessionStorage.setItem(t, o), a) ? r[Me] : (r[Le] = Be(Le, e, ye(t)), ve(t, e), a ? r[Le] : r);
|
|
2715
2715
|
}
|
|
2716
2716
|
}
|
|
2717
|
-
function
|
|
2717
|
+
function go(t, e) {
|
|
2718
2718
|
if (t) {
|
|
2719
|
-
var n = Ut(e), r =
|
|
2720
|
-
return !ke(r.localStorage) && Rt(n) && (localStorage.removeItem(t), i[Re] = r.localStorage), !ke(r.cookie) && Mt(n) && (
|
|
2719
|
+
var n = Ut(e), r = br(t, tr), i = {};
|
|
2720
|
+
return !ke(r.localStorage) && Rt(n) && (localStorage.removeItem(t), i[Re] = r.localStorage), !ke(r.cookie) && Mt(n) && (vr(t), i[Ue] = r.cookie), !ke(r.sessionStorage) && Zt(n) && (sessionStorage.removeItem(t), i[Me] = r.sessionStorage), !ke(r.global) && ut(n, Le) && (Ce(t), i[Le] = r.global), i;
|
|
2721
2721
|
}
|
|
2722
2722
|
}
|
|
2723
2723
|
function Ut(t) {
|
|
2724
|
-
return t ?
|
|
2724
|
+
return t ? oe(t) ? t : t.storage : er;
|
|
2725
2725
|
}
|
|
2726
2726
|
function Rt(t) {
|
|
2727
|
-
return
|
|
2727
|
+
return ho && ut(t, Re);
|
|
2728
2728
|
}
|
|
2729
2729
|
function Mt(t) {
|
|
2730
|
-
return
|
|
2730
|
+
return po && ut(t, Ue);
|
|
2731
2731
|
}
|
|
2732
2732
|
function Zt(t) {
|
|
2733
|
-
return
|
|
2733
|
+
return fo && ut(t, Me);
|
|
2734
2734
|
}
|
|
2735
2735
|
function Wt(t) {
|
|
2736
|
-
return t ===
|
|
2736
|
+
return t === tr || t === "all";
|
|
2737
2737
|
}
|
|
2738
2738
|
function ut(t, e) {
|
|
2739
|
-
return t ===
|
|
2739
|
+
return t === er || t === e || Wt(t);
|
|
2740
2740
|
}
|
|
2741
2741
|
function Be(t, e, n) {
|
|
2742
2742
|
return { location: t, current: e, previous: n };
|
|
2743
2743
|
}
|
|
2744
|
-
var
|
|
2745
|
-
function
|
|
2744
|
+
var yo = { setItem: mo, getItem: br, removeItem: go };
|
|
2745
|
+
function vo(t, e, n) {
|
|
2746
2746
|
return e in t ? Object.defineProperty(t, e, {
|
|
2747
2747
|
value: n,
|
|
2748
2748
|
enumerable: !0,
|
|
@@ -2764,20 +2764,20 @@ function Tn(t) {
|
|
|
2764
2764
|
for (var e = 1; e < arguments.length; e++) {
|
|
2765
2765
|
var n = arguments[e] != null ? arguments[e] : {};
|
|
2766
2766
|
e % 2 ? En(Object(n), !0).forEach(function(r) {
|
|
2767
|
-
|
|
2767
|
+
vo(t, r, n[r]);
|
|
2768
2768
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : En(Object(n)).forEach(function(r) {
|
|
2769
2769
|
Object.defineProperty(t, r, Object.getOwnPropertyDescriptor(n, r));
|
|
2770
2770
|
});
|
|
2771
2771
|
}
|
|
2772
2772
|
return t;
|
|
2773
2773
|
}
|
|
2774
|
-
function
|
|
2774
|
+
function wo() {
|
|
2775
2775
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, e = {
|
|
2776
|
-
storage:
|
|
2776
|
+
storage: yo
|
|
2777
2777
|
};
|
|
2778
|
-
return
|
|
2778
|
+
return so(Tn(Tn({}, e), t));
|
|
2779
2779
|
}
|
|
2780
|
-
function
|
|
2780
|
+
function bo(t, e) {
|
|
2781
2781
|
e = e || {};
|
|
2782
2782
|
var n, r, i = [], o = e.max || 1 / 0;
|
|
2783
2783
|
function a() {
|
|
@@ -2799,7 +2799,7 @@ function vo(t, e) {
|
|
|
2799
2799
|
}
|
|
2800
2800
|
};
|
|
2801
2801
|
}
|
|
2802
|
-
function
|
|
2802
|
+
function ko(t) {
|
|
2803
2803
|
if (typeof window > "u")
|
|
2804
2804
|
return;
|
|
2805
2805
|
const { addEventListener: e, history: n, location: r } = window;
|
|
@@ -2811,24 +2811,24 @@ function wo(t) {
|
|
|
2811
2811
|
const s = n[a];
|
|
2812
2812
|
n[a] = function(...h) {
|
|
2813
2813
|
var c;
|
|
2814
|
-
const p = ((c = h[2]) == null ? void 0 : c.toString()) || "", u =
|
|
2814
|
+
const p = ((c = h[2]) == null ? void 0 : c.toString()) || "", u = So(p);
|
|
2815
2815
|
return i !== u && (i = u, setTimeout(() => t(p), 0)), s.apply(n, h);
|
|
2816
2816
|
};
|
|
2817
2817
|
});
|
|
2818
2818
|
}
|
|
2819
|
-
function
|
|
2819
|
+
function Io(t, e) {
|
|
2820
2820
|
const n = t.indexOf(e);
|
|
2821
2821
|
return n > -1 ? t.slice(0, n) : t;
|
|
2822
2822
|
}
|
|
2823
|
-
function
|
|
2824
|
-
return ["#", "?"].forEach((e) => t =
|
|
2823
|
+
function So(t) {
|
|
2824
|
+
return ["#", "?"].forEach((e) => t = Io(t, e)), t;
|
|
2825
2825
|
}
|
|
2826
|
-
function
|
|
2827
|
-
|
|
2826
|
+
function _o() {
|
|
2827
|
+
ko(() => {
|
|
2828
2828
|
ee.page();
|
|
2829
2829
|
});
|
|
2830
2830
|
}
|
|
2831
|
-
function
|
|
2831
|
+
function Eo(t) {
|
|
2832
2832
|
if (t === void 0 && (t = {}), !H)
|
|
2833
2833
|
return Tt;
|
|
2834
2834
|
var e = Pn(), n = jt(), r = On(), i = qe(r, e), o = qe(n, e), a = [], s = [], h = [], p = r, u = i, c = o, f = Object.keys(t);
|
|
@@ -2836,7 +2836,7 @@ function So(t) {
|
|
|
2836
2836
|
return Tt;
|
|
2837
2837
|
var d = f.map(function(k) {
|
|
2838
2838
|
return Number(k);
|
|
2839
|
-
}), w =
|
|
2839
|
+
}), w = Di(function() {
|
|
2840
2840
|
var k = Pn(), v = function(I, C) {
|
|
2841
2841
|
return C.map(function(D) {
|
|
2842
2842
|
return D === 100 ? I - 5 : I * (D / 100);
|
|
@@ -2868,11 +2868,11 @@ function So(t) {
|
|
|
2868
2868
|
function jt() {
|
|
2869
2869
|
return H ? document.body.scrollTop || document.documentElement.scrollTop : 0;
|
|
2870
2870
|
}
|
|
2871
|
-
function
|
|
2871
|
+
function To() {
|
|
2872
2872
|
return H ? window.innerHeight || document.documentElement.clientHeight : 0;
|
|
2873
2873
|
}
|
|
2874
2874
|
function On() {
|
|
2875
|
-
return Math.round(jt() +
|
|
2875
|
+
return Math.round(jt() + To());
|
|
2876
2876
|
}
|
|
2877
2877
|
function Pn() {
|
|
2878
2878
|
if (!H)
|
|
@@ -2884,7 +2884,7 @@ function qe(t, e) {
|
|
|
2884
2884
|
return Math.round(t / e * 100);
|
|
2885
2885
|
}
|
|
2886
2886
|
var jn = "EventListener";
|
|
2887
|
-
function
|
|
2887
|
+
function Oo(t) {
|
|
2888
2888
|
return function(e, n, r, i) {
|
|
2889
2889
|
var o = r || Tt, a = i || !1;
|
|
2890
2890
|
if (!H)
|
|
@@ -2899,7 +2899,7 @@ function Eo(t) {
|
|
|
2899
2899
|
c && (p = []);
|
|
2900
2900
|
for (var f = c ? "add" + jn : "remove" + jn, d = 0; d < h.length; d++) {
|
|
2901
2901
|
var w = h[d];
|
|
2902
|
-
p[d] = c ? a && a.once ?
|
|
2902
|
+
p[d] = c ? a && a.once ? Po(o) : o : p[d] || o;
|
|
2903
2903
|
for (var k = 0; k < s.length; k++)
|
|
2904
2904
|
w[f] ? w["on" + s[k]] = c ? p[d] : null : w[f](s[k], p[d], a);
|
|
2905
2905
|
}
|
|
@@ -2908,7 +2908,7 @@ function Eo(t) {
|
|
|
2908
2908
|
};
|
|
2909
2909
|
}
|
|
2910
2910
|
function rt(t, e) {
|
|
2911
|
-
if (
|
|
2911
|
+
if (oe(t))
|
|
2912
2912
|
return e ? rt(document.querySelectorAll(t)) : (n = t).split(n.indexOf(",") > -1 ? "," : " ").map(function(a) {
|
|
2913
2913
|
return a.trim();
|
|
2914
2914
|
});
|
|
@@ -2918,31 +2918,31 @@ function rt(t, e) {
|
|
|
2918
2918
|
r[i] = t[i];
|
|
2919
2919
|
return r;
|
|
2920
2920
|
}
|
|
2921
|
-
var o =
|
|
2921
|
+
var o = xi(t);
|
|
2922
2922
|
return e ? o.map(function(a) {
|
|
2923
|
-
return
|
|
2923
|
+
return oe(a) ? rt(a, !0) : a;
|
|
2924
2924
|
}).flat() : o;
|
|
2925
2925
|
}
|
|
2926
|
-
function
|
|
2926
|
+
function Po(t, e) {
|
|
2927
2927
|
var n;
|
|
2928
2928
|
return function() {
|
|
2929
2929
|
return t && (n = t.apply(e || this, arguments), t = null), n;
|
|
2930
2930
|
};
|
|
2931
2931
|
}
|
|
2932
|
-
var wt =
|
|
2933
|
-
function
|
|
2932
|
+
var wt = Oo("Event");
|
|
2933
|
+
function kr(t, e) {
|
|
2934
2934
|
return H && V(window[t]) ? (n = window[t], r = e, (i = window) === void 0 && (i = null), V(n) ? function() {
|
|
2935
2935
|
n.apply(i, arguments), r.apply(i, arguments);
|
|
2936
2936
|
} : r) : window[t] = e;
|
|
2937
2937
|
var n, r, i;
|
|
2938
2938
|
}
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
var
|
|
2942
|
-
function
|
|
2943
|
-
if (
|
|
2939
|
+
kr.bind(null, "onerror");
|
|
2940
|
+
kr.bind(null, "onload");
|
|
2941
|
+
var Ir = typeof window > "u", Cn = "hidden";
|
|
2942
|
+
function jo(t) {
|
|
2943
|
+
if (Ir)
|
|
2944
2944
|
return !1;
|
|
2945
|
-
var e =
|
|
2945
|
+
var e = Co(), n = "".concat(e.replace(/[H|h]idden/, ""), "visibilitychange"), r = function() {
|
|
2946
2946
|
return t(!!document[e]);
|
|
2947
2947
|
}, i = function() {
|
|
2948
2948
|
return document.addEventListener(n, r);
|
|
@@ -2951,15 +2951,15 @@ function Oo(t) {
|
|
|
2951
2951
|
return document.removeEventListener(n, r), i;
|
|
2952
2952
|
};
|
|
2953
2953
|
}
|
|
2954
|
-
function
|
|
2954
|
+
function Co() {
|
|
2955
2955
|
var t = ["webkit", "moz", "ms", "o"];
|
|
2956
|
-
return
|
|
2956
|
+
return Ir || Cn in document ? Cn : t.reduce(function(e, n) {
|
|
2957
2957
|
var r = n + "Hidden";
|
|
2958
2958
|
return !e && r in document ? r : e;
|
|
2959
2959
|
}, null);
|
|
2960
2960
|
}
|
|
2961
|
-
var
|
|
2962
|
-
function
|
|
2961
|
+
var xo = ["mousemove", "mousedown", "touchmove", "touchstart", "touchend", "keydown"];
|
|
2962
|
+
function Ao(t, e) {
|
|
2963
2963
|
e === void 0 && (e = {});
|
|
2964
2964
|
var n = /* @__PURE__ */ function(a, s) {
|
|
2965
2965
|
var h = this, p = !1;
|
|
@@ -2970,10 +2970,10 @@ function Co(t, e) {
|
|
|
2970
2970
|
};
|
|
2971
2971
|
}(t, e.throttle || 1e4), r = [];
|
|
2972
2972
|
function i() {
|
|
2973
|
-
var a =
|
|
2973
|
+
var a = jo(function(s) {
|
|
2974
2974
|
s || n({ type: "tabVisible" });
|
|
2975
2975
|
});
|
|
2976
|
-
return r = [a].concat(
|
|
2976
|
+
return r = [a].concat(xo.map(function(s) {
|
|
2977
2977
|
return wt(document, s, n);
|
|
2978
2978
|
})).concat(wt(window, "load", n)).concat(wt(window, "scroll", n, { capture: !0, passive: !0 })), o;
|
|
2979
2979
|
}
|
|
@@ -2986,7 +2986,7 @@ function Co(t, e) {
|
|
|
2986
2986
|
return o(), i;
|
|
2987
2987
|
};
|
|
2988
2988
|
}
|
|
2989
|
-
function
|
|
2989
|
+
function $o(t) {
|
|
2990
2990
|
var e, n, r = t.onIdle, i = t.onWakeUp, o = t.onHeartbeat, a = t.timeout, s = a === void 0 ? 1e4 : a, h = t.throttle, p = h === void 0 ? 2e3 : h, u = !1, c = !1, f = /* @__PURE__ */ new Date(), d = function() {
|
|
2991
2991
|
return clearTimeout(e);
|
|
2992
2992
|
};
|
|
@@ -2995,7 +2995,7 @@ function xo(t) {
|
|
|
2995
2995
|
u = !0, r && (n = /* @__PURE__ */ new Date(), r(Ne(f), v));
|
|
2996
2996
|
}, s);
|
|
2997
2997
|
}
|
|
2998
|
-
var k =
|
|
2998
|
+
var k = Ao(w, { throttle: p });
|
|
2999
2999
|
return { disable: function() {
|
|
3000
3000
|
c = !0, u = !1, d();
|
|
3001
3001
|
var v = k();
|
|
@@ -3010,7 +3010,7 @@ function Ne(t, e) {
|
|
|
3010
3010
|
return e ? 0 : Math.round((/* @__PURE__ */ new Date() - t) / 1e3);
|
|
3011
3011
|
}
|
|
3012
3012
|
const xn = 5e3;
|
|
3013
|
-
class
|
|
3013
|
+
class zo {
|
|
3014
3014
|
constructor(e) {
|
|
3015
3015
|
B(this, "element");
|
|
3016
3016
|
B(this, "isInViewport", !1);
|
|
@@ -3032,11 +3032,11 @@ class Ao {
|
|
|
3032
3032
|
{
|
|
3033
3033
|
threshold: 0
|
|
3034
3034
|
}
|
|
3035
|
-
), this.observer.observe(this.element),
|
|
3035
|
+
), this.observer.observe(this.element), $o({
|
|
3036
3036
|
onIdle: (n) => this.handleAwake(!1, n),
|
|
3037
3037
|
onWakeUp: (n) => this.handleAwake(!0, n),
|
|
3038
3038
|
timeout: xn
|
|
3039
|
-
}),
|
|
3039
|
+
}), Eo({
|
|
3040
3040
|
25: this.handleScroll.bind(this),
|
|
3041
3041
|
50: this.handleScroll.bind(this),
|
|
3042
3042
|
75: this.handleScroll.bind(this),
|
|
@@ -3072,16 +3072,16 @@ class Ao {
|
|
|
3072
3072
|
}
|
|
3073
3073
|
}
|
|
3074
3074
|
const An = "sesamy_session_id";
|
|
3075
|
-
function
|
|
3075
|
+
function No() {
|
|
3076
3076
|
let t = sessionStorage.getItem(An);
|
|
3077
3077
|
return t || (t = Math.random().toString(36).slice(2, 9), sessionStorage.setItem(An, t)), t;
|
|
3078
3078
|
}
|
|
3079
|
-
let
|
|
3080
|
-
function
|
|
3079
|
+
let Sr = !1, Ct, $n, it;
|
|
3080
|
+
function Do({ clientId: t, enabled: e = !0, endpoint: n = ti }) {
|
|
3081
3081
|
if (Ct = t, $n = e, it = n, !$n)
|
|
3082
3082
|
return;
|
|
3083
|
-
|
|
3084
|
-
const r = new
|
|
3083
|
+
_o();
|
|
3084
|
+
const r = new zo({
|
|
3085
3085
|
element: document.body,
|
|
3086
3086
|
viewCallback: () => {
|
|
3087
3087
|
ee.page();
|
|
@@ -3106,24 +3106,24 @@ function zo({ clientId: t, enabled: e = !0, endpoint: n = Qr }) {
|
|
|
3106
3106
|
});
|
|
3107
3107
|
}
|
|
3108
3108
|
});
|
|
3109
|
-
|
|
3109
|
+
Ro(document.body, () => {
|
|
3110
3110
|
r.flush();
|
|
3111
|
-
}),
|
|
3111
|
+
}), Mo(document.body, () => {
|
|
3112
3112
|
r.handleVisibilityChange();
|
|
3113
|
-
}), window.addEventListener(
|
|
3113
|
+
}), window.addEventListener(se.AUTHENTICATED, async (i) => {
|
|
3114
3114
|
const o = i;
|
|
3115
3115
|
await ee.identify(o.detail.sub);
|
|
3116
|
-
}), window.addEventListener(
|
|
3116
|
+
}), window.addEventListener(se.LOGOUT, async () => {
|
|
3117
3117
|
await ee.track("logout", {}), Kt.flush(), await ee.reset();
|
|
3118
3118
|
});
|
|
3119
3119
|
}
|
|
3120
|
-
function
|
|
3120
|
+
function _r(t) {
|
|
3121
3121
|
return JSON.stringify(
|
|
3122
3122
|
t.map((e) => ({
|
|
3123
3123
|
...e,
|
|
3124
3124
|
clientId: Ct,
|
|
3125
3125
|
requestId: Math.random().toString(36).slice(2, 9),
|
|
3126
|
-
sessionId:
|
|
3126
|
+
sessionId: No(),
|
|
3127
3127
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
3128
3128
|
version: Dt,
|
|
3129
3129
|
event: e.event,
|
|
@@ -3136,18 +3136,18 @@ function Ir(t) {
|
|
|
3136
3136
|
referrer: document.referrer
|
|
3137
3137
|
},
|
|
3138
3138
|
locale: navigator.language,
|
|
3139
|
-
library:
|
|
3139
|
+
library: Qn,
|
|
3140
3140
|
userAgent: navigator.userAgent,
|
|
3141
3141
|
clientId: Ct
|
|
3142
3142
|
}
|
|
3143
3143
|
}))
|
|
3144
3144
|
);
|
|
3145
3145
|
}
|
|
3146
|
-
const Kt =
|
|
3146
|
+
const Kt = bo(
|
|
3147
3147
|
async (t) => {
|
|
3148
3148
|
if (t.length > 0) {
|
|
3149
|
-
const e =
|
|
3150
|
-
|
|
3149
|
+
const e = _r(t);
|
|
3150
|
+
Sr ? navigator.sendBeacon(it, e) : (await fetch(it, {
|
|
3151
3151
|
method: "POST",
|
|
3152
3152
|
body: e,
|
|
3153
3153
|
headers: {
|
|
@@ -3168,12 +3168,12 @@ function bt(t) {
|
|
|
3168
3168
|
if (t.anonymousId)
|
|
3169
3169
|
if ((e = t.properties) != null && e.flushing) {
|
|
3170
3170
|
const n = { ...t };
|
|
3171
|
-
delete n.properties.flushing, navigator.sendBeacon(it,
|
|
3171
|
+
delete n.properties.flushing, navigator.sendBeacon(it, _r([n]));
|
|
3172
3172
|
} else
|
|
3173
3173
|
Kt.push(t);
|
|
3174
3174
|
}
|
|
3175
|
-
const ee =
|
|
3176
|
-
app:
|
|
3175
|
+
const ee = wo({
|
|
3176
|
+
app: Qn,
|
|
3177
3177
|
version: Dt,
|
|
3178
3178
|
plugins: [
|
|
3179
3179
|
{
|
|
@@ -3210,36 +3210,36 @@ const ee = yo({
|
|
|
3210
3210
|
}
|
|
3211
3211
|
]
|
|
3212
3212
|
});
|
|
3213
|
-
function
|
|
3213
|
+
function Lo(t, e) {
|
|
3214
3214
|
ee.track(t, e);
|
|
3215
3215
|
}
|
|
3216
|
-
function
|
|
3217
|
-
return
|
|
3216
|
+
function Uo() {
|
|
3217
|
+
return Sr = !0, Kt.flush();
|
|
3218
3218
|
}
|
|
3219
|
-
const
|
|
3220
|
-
function
|
|
3221
|
-
|
|
3219
|
+
const Er = /* @__PURE__ */ new Map();
|
|
3220
|
+
function Ro(t, e) {
|
|
3221
|
+
Er.set(t, e);
|
|
3222
3222
|
}
|
|
3223
3223
|
window.addEventListener("beforeunload", () => {
|
|
3224
|
-
|
|
3224
|
+
Er.forEach((t, e) => {
|
|
3225
3225
|
t.bind(e)();
|
|
3226
|
-
}),
|
|
3226
|
+
}), Uo();
|
|
3227
3227
|
});
|
|
3228
|
-
const
|
|
3229
|
-
function
|
|
3230
|
-
|
|
3228
|
+
const Tr = /* @__PURE__ */ new Map();
|
|
3229
|
+
function Mo(t, e) {
|
|
3230
|
+
Tr.set(t, e);
|
|
3231
3231
|
}
|
|
3232
3232
|
window.addEventListener("visibilitychange", () => {
|
|
3233
|
-
document.visibilityState !== "visible" &&
|
|
3233
|
+
document.visibilityState !== "visible" && Tr.forEach((t, e) => {
|
|
3234
3234
|
t.bind(e)();
|
|
3235
3235
|
});
|
|
3236
3236
|
});
|
|
3237
|
-
const
|
|
3238
|
-
function
|
|
3239
|
-
const t = sessionStorage.getItem(
|
|
3237
|
+
const Zo = "sesamySignedURLs";
|
|
3238
|
+
function Wo() {
|
|
3239
|
+
const t = sessionStorage.getItem(Zo);
|
|
3240
3240
|
return t ? JSON.parse(t) : [];
|
|
3241
3241
|
}
|
|
3242
|
-
function
|
|
3242
|
+
function Ko(t) {
|
|
3243
3243
|
const {
|
|
3244
3244
|
getEntitlement: e,
|
|
3245
3245
|
getEntitlements: n,
|
|
@@ -3261,16 +3261,16 @@ function Zo(t) {
|
|
|
3261
3261
|
deleteTally: S,
|
|
3262
3262
|
getProduct: g,
|
|
3263
3263
|
autoOnboardProduct: l
|
|
3264
|
-
} =
|
|
3264
|
+
} = ki(t), b = {
|
|
3265
3265
|
auth: {
|
|
3266
|
-
getUser:
|
|
3267
|
-
isAuthenticated:
|
|
3268
|
-
loginWithRedirect:
|
|
3269
|
-
logout:
|
|
3270
|
-
setToken:
|
|
3266
|
+
getUser: ii,
|
|
3267
|
+
isAuthenticated: ri,
|
|
3268
|
+
loginWithRedirect: oi,
|
|
3269
|
+
logout: si,
|
|
3270
|
+
setToken: Yn
|
|
3271
3271
|
},
|
|
3272
3272
|
analytics: {
|
|
3273
|
-
track:
|
|
3273
|
+
track: Lo
|
|
3274
3274
|
},
|
|
3275
3275
|
tags: {
|
|
3276
3276
|
list: h,
|
|
@@ -3281,7 +3281,7 @@ function Zo(t) {
|
|
|
3281
3281
|
get: e,
|
|
3282
3282
|
list: n,
|
|
3283
3283
|
access: r,
|
|
3284
|
-
signedLinks:
|
|
3284
|
+
signedLinks: Wo
|
|
3285
3285
|
},
|
|
3286
3286
|
contracts: {
|
|
3287
3287
|
get: i,
|
|
@@ -3307,45 +3307,53 @@ function Zo(t) {
|
|
|
3307
3307
|
get: g,
|
|
3308
3308
|
autoOnboard: l
|
|
3309
3309
|
},
|
|
3310
|
-
getVersion:
|
|
3311
|
-
clearCache:
|
|
3310
|
+
getVersion: Fo,
|
|
3311
|
+
clearCache: ne
|
|
3312
3312
|
};
|
|
3313
3313
|
return t.namespace && (window[t.namespace] = b), b;
|
|
3314
3314
|
}
|
|
3315
|
-
function
|
|
3315
|
+
function Fo() {
|
|
3316
3316
|
return Dt;
|
|
3317
3317
|
}
|
|
3318
|
-
function
|
|
3318
|
+
function Ho() {
|
|
3319
3319
|
const t = new URLSearchParams(window.location.hash.substring(1)), e = t.get("access_token"), n = t.get("expires_in");
|
|
3320
3320
|
if (e && n) {
|
|
3321
|
-
|
|
3321
|
+
Yn(e, parseInt(n, 10));
|
|
3322
3322
|
const r = new URL(window.location.href);
|
|
3323
3323
|
t.delete("access_token"), t.delete("expires_in"), r.hash = t.toString(), window.history.replaceState(null, "", r);
|
|
3324
3324
|
}
|
|
3325
3325
|
}
|
|
3326
|
-
|
|
3327
|
-
|
|
3326
|
+
const zn = "sesamy-refresh", Nn = "force-refetch-entitlements";
|
|
3327
|
+
function Jo() {
|
|
3328
|
+
const t = new URLSearchParams(window.location.search), e = t.get(Nn), n = t.get(zn);
|
|
3329
|
+
if (e !== null || n !== null) {
|
|
3330
|
+
const r = new URL(window.location.href);
|
|
3331
|
+
t.delete(Nn), t.delete(zn), r.search = t.toString(), ne(), window.history.replaceState(null, "", r);
|
|
3332
|
+
}
|
|
3333
|
+
}
|
|
3334
|
+
async function Xo(t) {
|
|
3335
|
+
Do({
|
|
3328
3336
|
clientId: t.clientId,
|
|
3329
3337
|
// The default client id can be overridden by the config
|
|
3330
3338
|
...t.analytics
|
|
3331
|
-
}), await
|
|
3339
|
+
}), await ni({
|
|
3332
3340
|
clientId: t.clientId,
|
|
3333
3341
|
// The default client id can be overridden by the config
|
|
3334
3342
|
...t.auth
|
|
3335
3343
|
});
|
|
3336
|
-
const e =
|
|
3337
|
-
return We(
|
|
3344
|
+
const e = Ko(t.api || {});
|
|
3345
|
+
return We(se.READY, {}), Ho(), Jo(), e;
|
|
3338
3346
|
}
|
|
3339
3347
|
if (typeof document < "u") {
|
|
3340
3348
|
const t = document.getElementById("sesamy-js");
|
|
3341
3349
|
if (t != null && t.textContent)
|
|
3342
3350
|
try {
|
|
3343
3351
|
const e = JSON.parse(t.textContent);
|
|
3344
|
-
|
|
3352
|
+
Xo(e);
|
|
3345
3353
|
} catch (e) {
|
|
3346
3354
|
console.error("Failed to parse config", e);
|
|
3347
3355
|
}
|
|
3348
3356
|
}
|
|
3349
3357
|
export {
|
|
3350
|
-
|
|
3358
|
+
Xo as init
|
|
3351
3359
|
};
|