@hotosm/hanko-auth 0.4.7 → 0.4.8
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/hanko-auth.esm.js +618 -570
- package/dist/hanko-auth.iife.js +82 -39
- package/dist/hanko-auth.umd.js +81 -38
- package/package.json +1 -1
- package/src/hanko-auth.styles.ts +24 -2
- package/src/hanko-auth.ts +146 -116
package/dist/hanko-auth.esm.js
CHANGED
|
@@ -284,9 +284,9 @@ pt.elementStyles = [], pt.shadowRootOptions = { mode: "open" }, pt[Ut("elementPr
|
|
|
284
284
|
* Copyright 2017 Google LLC
|
|
285
285
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
286
286
|
*/
|
|
287
|
-
const Nt = globalThis, Oo = (n) => n, vn = Nt.trustedTypes, Po = vn ? vn.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, hi = "$lit$", rt = `lit$${Math.random().toFixed(9).slice(2)}$`, pi = "?" + rt, ta = `<${pi}>`, ht = document, Rt = () => ht.createComment(""), qt = (n) => n === null || typeof n != "object" && typeof n != "function", to = Array.isArray, na = (n) => to(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function",
|
|
288
|
-
\f\r]`, yt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Eo = /-->/g, Io = />/g, ct = RegExp(`>|${
|
|
289
|
-
\f\r"'\`<>=]|("|')|))|$)`, "g"), Do = /'/g,
|
|
287
|
+
const Nt = globalThis, Oo = (n) => n, vn = Nt.trustedTypes, Po = vn ? vn.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, hi = "$lit$", rt = `lit$${Math.random().toFixed(9).slice(2)}$`, pi = "?" + rt, ta = `<${pi}>`, ht = document, Rt = () => ht.createComment(""), qt = (n) => n === null || typeof n != "object" && typeof n != "function", to = Array.isArray, na = (n) => to(n) || typeof (n == null ? void 0 : n[Symbol.iterator]) == "function", $n = `[
|
|
288
|
+
\f\r]`, yt = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Eo = /-->/g, Io = />/g, ct = RegExp(`>|${$n}(?:([^\\s"'>=/]+)(${$n}*=${$n}*(?:[^
|
|
289
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), Do = /'/g, $o = /"/g, mi = /^(?:script|style|textarea|title)$/i, oa = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), ye = oa(1), ft = Symbol.for("lit-noChange"), Le = Symbol.for("lit-nothing"), jo = /* @__PURE__ */ new WeakMap(), dt = ht.createTreeWalker(ht, 129);
|
|
290
290
|
function gi(n, e) {
|
|
291
291
|
if (!to(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
292
292
|
return Po !== void 0 ? Po.createHTML(e) : e;
|
|
@@ -297,7 +297,7 @@ const ia = (n, e) => {
|
|
|
297
297
|
for (let c = 0; c < t; c++) {
|
|
298
298
|
const d = n[c];
|
|
299
299
|
let l, u, h = -1, f = 0;
|
|
300
|
-
for (; f < d.length && (s.lastIndex = f, u = s.exec(d), u !== null); ) f = s.lastIndex, s === yt ? u[1] === "!--" ? s = Eo : u[1] !== void 0 ? s = Io : u[2] !== void 0 ? (mi.test(u[2]) && (i = RegExp("</" + u[2], "g")), s = ct) : u[3] !== void 0 && (s = ct) : s === ct ? u[0] === ">" ? (s = i ?? yt, h = -1) : u[1] === void 0 ? h = -2 : (h = s.lastIndex - u[2].length, l = u[1], s = u[3] === void 0 ? ct : u[3] === '"' ?
|
|
300
|
+
for (; f < d.length && (s.lastIndex = f, u = s.exec(d), u !== null); ) f = s.lastIndex, s === yt ? u[1] === "!--" ? s = Eo : u[1] !== void 0 ? s = Io : u[2] !== void 0 ? (mi.test(u[2]) && (i = RegExp("</" + u[2], "g")), s = ct) : u[3] !== void 0 && (s = ct) : s === ct ? u[0] === ">" ? (s = i ?? yt, h = -1) : u[1] === void 0 ? h = -2 : (h = s.lastIndex - u[2].length, l = u[1], s = u[3] === void 0 ? ct : u[3] === '"' ? $o : Do) : s === $o || s === Do ? s = ct : s === Eo || s === Io ? s = yt : (s = ct, i = void 0);
|
|
301
301
|
const m = s === ct && n[c + 1].startsWith("/>") ? " " : "";
|
|
302
302
|
a += s === yt ? d + ta : h >= 0 ? (o.push(l), d.slice(0, h) + hi + d.slice(h) + rt + m) : d + rt + (h === -2 ? c : m);
|
|
303
303
|
}
|
|
@@ -380,7 +380,7 @@ let aa = class {
|
|
|
380
380
|
return ((e = this._$AM) == null ? void 0 : e._$AU) ?? this._$Cv;
|
|
381
381
|
}
|
|
382
382
|
constructor(e, t, o, i) {
|
|
383
|
-
this.type = 2, this._$AH =
|
|
383
|
+
this.type = 2, this._$AH = Le, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = o, this.options = i, this._$Cv = (i == null ? void 0 : i.isConnected) ?? !0;
|
|
384
384
|
}
|
|
385
385
|
get parentNode() {
|
|
386
386
|
let e = this._$AA.parentNode;
|
|
@@ -394,7 +394,7 @@ let aa = class {
|
|
|
394
394
|
return this._$AB;
|
|
395
395
|
}
|
|
396
396
|
_$AI(e, t = this) {
|
|
397
|
-
e = vt(this, e, t), qt(e) ? e ===
|
|
397
|
+
e = vt(this, e, t), qt(e) ? e === Le || e == null || e === "" ? (this._$AH !== Le && this._$AR(), this._$AH = Le) : e !== this._$AH && e !== ft && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : na(e) ? this.k(e) : this._(e);
|
|
398
398
|
}
|
|
399
399
|
O(e) {
|
|
400
400
|
return this._$AA.parentNode.insertBefore(e, this._$AB);
|
|
@@ -403,7 +403,7 @@ let aa = class {
|
|
|
403
403
|
this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
|
|
404
404
|
}
|
|
405
405
|
_(e) {
|
|
406
|
-
this._$AH !==
|
|
406
|
+
this._$AH !== Le && qt(this._$AH) ? this._$AA.nextSibling.data = e : this.T(ht.createTextNode(e)), this._$AH = e;
|
|
407
407
|
}
|
|
408
408
|
$(e) {
|
|
409
409
|
var a;
|
|
@@ -415,8 +415,8 @@ let aa = class {
|
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
_$AC(e) {
|
|
418
|
-
let t =
|
|
419
|
-
return t === void 0 &&
|
|
418
|
+
let t = jo.get(e.strings);
|
|
419
|
+
return t === void 0 && jo.set(e.strings, t = new Bn(e)), t;
|
|
420
420
|
}
|
|
421
421
|
k(e) {
|
|
422
422
|
to(this._$AH) || (this._$AH = [], this._$AR());
|
|
@@ -444,7 +444,7 @@ let aa = class {
|
|
|
444
444
|
return this._$AM._$AU;
|
|
445
445
|
}
|
|
446
446
|
constructor(e, t, o, i, a) {
|
|
447
|
-
this.type = 1, this._$AH =
|
|
447
|
+
this.type = 1, this._$AH = Le, this._$AN = void 0, this.element = e, this.name = t, this._$AM = i, this.options = a, o.length > 2 || o[0] !== "" || o[1] !== "" ? (this._$AH = Array(o.length - 1).fill(new String()), this.strings = o) : this._$AH = Le;
|
|
448
448
|
}
|
|
449
449
|
_$AI(e, t = this, o, i) {
|
|
450
450
|
const a = this.strings;
|
|
@@ -453,34 +453,34 @@ let aa = class {
|
|
|
453
453
|
else {
|
|
454
454
|
const c = e;
|
|
455
455
|
let d, l;
|
|
456
|
-
for (e = a[0], d = 0; d < a.length - 1; d++) l = vt(this, c[o + d], t, d), l === ft && (l = this._$AH[d]), s || (s = !qt(l) || l !== this._$AH[d]), l ===
|
|
456
|
+
for (e = a[0], d = 0; d < a.length - 1; d++) l = vt(this, c[o + d], t, d), l === ft && (l = this._$AH[d]), s || (s = !qt(l) || l !== this._$AH[d]), l === Le ? e = Le : e !== Le && (e += (l ?? "") + a[d + 1]), this._$AH[d] = l;
|
|
457
457
|
}
|
|
458
458
|
s && !i && this.j(e);
|
|
459
459
|
}
|
|
460
460
|
j(e) {
|
|
461
|
-
e ===
|
|
461
|
+
e === Le ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
|
|
462
462
|
}
|
|
463
463
|
}, ra = class extends kn {
|
|
464
464
|
constructor() {
|
|
465
465
|
super(...arguments), this.type = 3;
|
|
466
466
|
}
|
|
467
467
|
j(e) {
|
|
468
|
-
this.element[this.name] = e ===
|
|
468
|
+
this.element[this.name] = e === Le ? void 0 : e;
|
|
469
469
|
}
|
|
470
470
|
}, sa = class extends kn {
|
|
471
471
|
constructor() {
|
|
472
472
|
super(...arguments), this.type = 4;
|
|
473
473
|
}
|
|
474
474
|
j(e) {
|
|
475
|
-
this.element.toggleAttribute(this.name, !!e && e !==
|
|
475
|
+
this.element.toggleAttribute(this.name, !!e && e !== Le);
|
|
476
476
|
}
|
|
477
477
|
}, la = class extends kn {
|
|
478
478
|
constructor(e, t, o, i, a) {
|
|
479
479
|
super(e, t, o, i, a), this.type = 5;
|
|
480
480
|
}
|
|
481
481
|
_$AI(e, t = this) {
|
|
482
|
-
if ((e = vt(this, e, t, 0) ??
|
|
483
|
-
const o = this._$AH, i = e ===
|
|
482
|
+
if ((e = vt(this, e, t, 0) ?? Le) === ft) return;
|
|
483
|
+
const o = this._$AH, i = e === Le && o !== Le || e.capture !== o.capture || e.once !== o.once || e.passive !== o.passive, a = e !== Le && (o === Le || i);
|
|
484
484
|
i && this.element.removeEventListener(this.name, this, o), a && this.element.addEventListener(this.name, this, e), this._$AH = e;
|
|
485
485
|
}
|
|
486
486
|
handleEvent(e) {
|
|
@@ -498,8 +498,8 @@ let aa = class {
|
|
|
498
498
|
vt(this, e);
|
|
499
499
|
}
|
|
500
500
|
};
|
|
501
|
-
const
|
|
502
|
-
|
|
501
|
+
const jn = Nt.litHtmlPolyfillSupport;
|
|
502
|
+
jn == null || jn(Bn, no), (Nt.litHtmlVersions ?? (Nt.litHtmlVersions = [])).push("3.3.2");
|
|
503
503
|
const da = (n, e, t) => {
|
|
504
504
|
const o = (t == null ? void 0 : t.renderBefore) ?? e;
|
|
505
505
|
let i = o._$litPart$;
|
|
@@ -542,8 +542,8 @@ let Mt = class extends pt {
|
|
|
542
542
|
};
|
|
543
543
|
var di;
|
|
544
544
|
Mt._$litElement$ = !0, Mt.finalized = !0, (di = ut.litElementHydrateSupport) == null || di.call(ut, { LitElement: Mt });
|
|
545
|
-
const
|
|
546
|
-
|
|
545
|
+
const Ln = ut.litElementPolyfillSupport;
|
|
546
|
+
Ln == null || Ln({ LitElement: Mt });
|
|
547
547
|
(ut.litElementVersions ?? (ut.litElementVersions = [])).push("4.2.2");
|
|
548
548
|
/**
|
|
549
549
|
* @license
|
|
@@ -592,7 +592,7 @@ function Te(n) {
|
|
|
592
592
|
* Copyright 2017 Google LLC
|
|
593
593
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
594
594
|
*/
|
|
595
|
-
function
|
|
595
|
+
function Ze(n) {
|
|
596
596
|
return Te({ ...n, state: !0, attribute: !1 });
|
|
597
597
|
}
|
|
598
598
|
/**
|
|
@@ -630,7 +630,7 @@ const fa = {}, va = (n, e = fa) => n._$AH = e;
|
|
|
630
630
|
*/
|
|
631
631
|
const _a = ma(class extends ga {
|
|
632
632
|
constructor() {
|
|
633
|
-
super(...arguments), this.key =
|
|
633
|
+
super(...arguments), this.key = Le;
|
|
634
634
|
}
|
|
635
635
|
render(n, e) {
|
|
636
636
|
return this.key = n, e;
|
|
@@ -651,14 +651,14 @@ var ya = { 7: function(n, e, t) {
|
|
|
651
651
|
function c(x, O) {
|
|
652
652
|
var A = typeof Symbol == "function" && x[Symbol.iterator];
|
|
653
653
|
if (!A) return x;
|
|
654
|
-
var S, P,
|
|
654
|
+
var S, P, $ = A.call(x), U = [];
|
|
655
655
|
try {
|
|
656
|
-
for (; (O === void 0 || O-- > 0) && !(S =
|
|
656
|
+
for (; (O === void 0 || O-- > 0) && !(S = $.next()).done; ) U.push(S.value);
|
|
657
657
|
} catch (N) {
|
|
658
658
|
P = { error: N };
|
|
659
659
|
} finally {
|
|
660
660
|
try {
|
|
661
|
-
S && !S.done && (A =
|
|
661
|
+
S && !S.done && (A = $.return) && A.call($);
|
|
662
662
|
} finally {
|
|
663
663
|
if (P) throw P.error;
|
|
664
664
|
}
|
|
@@ -671,17 +671,17 @@ var ya = { 7: function(n, e, t) {
|
|
|
671
671
|
function l(x, O) {
|
|
672
672
|
var A = x;
|
|
673
673
|
return O && Object.keys(O).forEach(function(S) {
|
|
674
|
-
var P = O[S],
|
|
675
|
-
A = A.replace(
|
|
674
|
+
var P = O[S], $ = new RegExp("{".concat(S, "}"), "gm");
|
|
675
|
+
A = A.replace($, P.toString());
|
|
676
676
|
}), A;
|
|
677
677
|
}
|
|
678
678
|
function u(x, O, A) {
|
|
679
679
|
var S = x[O];
|
|
680
680
|
if (!S) return A;
|
|
681
|
-
var P = A.split("."),
|
|
681
|
+
var P = A.split("."), $ = "";
|
|
682
682
|
do {
|
|
683
|
-
var U = S[
|
|
684
|
-
U === void 0 || typeof U != "object" && P.length ? P.length ?
|
|
683
|
+
var U = S[$ += P.shift()];
|
|
684
|
+
U === void 0 || typeof U != "object" && P.length ? P.length ? $ += "." : S = A : (S = U, $ = "");
|
|
685
685
|
} while (P.length);
|
|
686
686
|
return S;
|
|
687
687
|
}
|
|
@@ -689,7 +689,7 @@ var ya = { 7: function(n, e, t) {
|
|
|
689
689
|
o.TranslateContext = m, o.TranslateProvider = function(x) {
|
|
690
690
|
var O = function(U, N) {
|
|
691
691
|
U = Object.assign({}, f, U), h = N || h;
|
|
692
|
-
var
|
|
692
|
+
var re = c(a.useState(U.lang), 2), ke = re[0], se = re[1], Se = c(a.useState(h), 2), M = Se[0], H = Se[1], _e = c(a.useState(!1), 2), Ue = _e[0], Ie = _e[1], Ne = function(le) {
|
|
693
693
|
if (!M.hasOwnProperty(le)) {
|
|
694
694
|
Ie(!1);
|
|
695
695
|
var ce = d(U.root, le);
|
|
@@ -703,14 +703,14 @@ var ya = { 7: function(n, e, t) {
|
|
|
703
703
|
}
|
|
704
704
|
};
|
|
705
705
|
return a.useEffect(function() {
|
|
706
|
-
Ne(U.fallbackLang), Ne(
|
|
707
|
-
}, [
|
|
708
|
-
if (!M.hasOwnProperty(
|
|
709
|
-
var me = u(M,
|
|
710
|
-
return me === le &&
|
|
706
|
+
Ne(U.fallbackLang), Ne(ke);
|
|
707
|
+
}, [ke]), { lang: ke, setLang: se, t: function(le, ce) {
|
|
708
|
+
if (!M.hasOwnProperty(ke)) return le;
|
|
709
|
+
var me = u(M, ke, le);
|
|
710
|
+
return me === le && ke !== U.fallbackLang && (me = u(M, U.fallbackLang, le)), l(me, ce);
|
|
711
711
|
}, isReady: Ue };
|
|
712
|
-
}({ root: x.root || "assets", lang: x.lang || "en", fallbackLang: x.fallbackLang || "en" }, x.translations), A = O.t, S = O.setLang, P = O.lang,
|
|
713
|
-
return i.h(m.Provider, { value: { t: A, setLang: S, lang: P, isReady:
|
|
712
|
+
}({ root: x.root || "assets", lang: x.lang || "en", fallbackLang: x.fallbackLang || "en" }, x.translations), A = O.t, S = O.setLang, P = O.lang, $ = O.isReady;
|
|
713
|
+
return i.h(m.Provider, { value: { t: A, setLang: S, lang: P, isReady: $ } }, x.children);
|
|
714
714
|
}, o.format = l, o.getResourceUrl = d, o.getValue = u, Object.defineProperty(o, "__esModule", { value: !0 });
|
|
715
715
|
})(e, t(616), t(78));
|
|
716
716
|
}, 633: (n, e) => {
|
|
@@ -819,7 +819,7 @@ var ya = { 7: function(n, e, t) {
|
|
|
819
819
|
return e[1];
|
|
820
820
|
};
|
|
821
821
|
}, 616: (n, e, t) => {
|
|
822
|
-
t.r(e), t.d(e, { Component: () => N, Fragment: () => U, cloneElement: () => We, createContext: () => Fe, createElement: () => S, createRef: () =>
|
|
822
|
+
t.r(e), t.d(e, { Component: () => N, Fragment: () => U, cloneElement: () => We, createContext: () => Fe, createElement: () => S, createRef: () => $, h: () => S, hydrate: () => He, isValidElement: () => s, options: () => i, render: () => ge, toChildArray: () => _e });
|
|
823
823
|
var o, i, a, s, c, d, l, u, h, f = {}, m = [], x = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;
|
|
824
824
|
function O(g, v) {
|
|
825
825
|
for (var b in v) g[b] = v[b];
|
|
@@ -839,7 +839,7 @@ var ya = { 7: function(n, e, t) {
|
|
|
839
839
|
var I = { type: g, props: v, key: b, ref: D, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: T ?? ++a };
|
|
840
840
|
return T == null && i.vnode != null && i.vnode(I), I;
|
|
841
841
|
}
|
|
842
|
-
function
|
|
842
|
+
function $() {
|
|
843
843
|
return { current: null };
|
|
844
844
|
}
|
|
845
845
|
function U(g) {
|
|
@@ -848,43 +848,43 @@ var ya = { 7: function(n, e, t) {
|
|
|
848
848
|
function N(g, v) {
|
|
849
849
|
this.props = g, this.context = v;
|
|
850
850
|
}
|
|
851
|
-
function
|
|
852
|
-
if (v == null) return g.__ ?
|
|
851
|
+
function re(g, v) {
|
|
852
|
+
if (v == null) return g.__ ? re(g.__, g.__.__k.indexOf(g) + 1) : null;
|
|
853
853
|
for (var b; v < g.__k.length; v++) if ((b = g.__k[v]) != null && b.__e != null) return b.__e;
|
|
854
|
-
return typeof g.type == "function" ?
|
|
854
|
+
return typeof g.type == "function" ? re(g) : null;
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function ke(g) {
|
|
857
857
|
var v, b;
|
|
858
858
|
if ((g = g.__) != null && g.__c != null) {
|
|
859
859
|
for (g.__e = g.__c.base = null, v = 0; v < g.__k.length; v++) if ((b = g.__k[v]) != null && b.__e != null) {
|
|
860
860
|
g.__e = g.__c.base = b.__e;
|
|
861
861
|
break;
|
|
862
862
|
}
|
|
863
|
-
return
|
|
863
|
+
return ke(g);
|
|
864
864
|
}
|
|
865
865
|
}
|
|
866
866
|
function se(g) {
|
|
867
|
-
(!g.__d && (g.__d = !0) && c.push(g) && !
|
|
867
|
+
(!g.__d && (g.__d = !0) && c.push(g) && !Se.__r++ || d !== i.debounceRendering) && ((d = i.debounceRendering) || l)(Se);
|
|
868
868
|
}
|
|
869
|
-
function
|
|
870
|
-
var g, v, b, D, T, I, z,
|
|
871
|
-
for (c.sort(u); g = c.shift(); ) g.__d && (v = c.length, D = void 0, T = void 0, z = (I = (b = g).__v).__e, (
|
|
872
|
-
|
|
869
|
+
function Se() {
|
|
870
|
+
var g, v, b, D, T, I, z, ee;
|
|
871
|
+
for (c.sort(u); g = c.shift(); ) g.__d && (v = c.length, D = void 0, T = void 0, z = (I = (b = g).__v).__e, (ee = b.__P) && (D = [], (T = O({}, I)).__v = I.__v + 1, De(ee, I, T, b.__n, ee.ownerSVGElement !== void 0, I.__h != null ? [z] : null, D, z ?? re(I), I.__h), k(D, I), I.__e != z && ke(I)), c.length > v && c.sort(u));
|
|
872
|
+
Se.__r = 0;
|
|
873
873
|
}
|
|
874
|
-
function M(g, v, b, D, T, I, z,
|
|
875
|
-
var w,
|
|
874
|
+
function M(g, v, b, D, T, I, z, ee, G, be) {
|
|
875
|
+
var w, we, J, R, E, xe, V, F = D && D.__k || m, qe = F.length;
|
|
876
876
|
for (b.__k = [], w = 0; w < v.length; w++) if ((R = b.__k[w] = (R = v[w]) == null || typeof R == "boolean" || typeof R == "function" ? null : typeof R == "string" || typeof R == "number" || typeof R == "bigint" ? P(null, R, null, null, R) : Array.isArray(R) ? P(U, { children: R }, null, null, null) : R.__b > 0 ? P(R.type, R.props, R.key, R.ref ? R.ref : null, R.__v) : R) != null) {
|
|
877
877
|
if (R.__ = b, R.__b = b.__b + 1, (J = F[w]) === null || J && R.key == J.key && R.type === J.type) F[w] = void 0;
|
|
878
|
-
else for (
|
|
879
|
-
if ((J = F[
|
|
880
|
-
F[
|
|
878
|
+
else for (we = 0; we < qe; we++) {
|
|
879
|
+
if ((J = F[we]) && R.key == J.key && R.type === J.type) {
|
|
880
|
+
F[we] = void 0;
|
|
881
881
|
break;
|
|
882
882
|
}
|
|
883
883
|
J = null;
|
|
884
884
|
}
|
|
885
|
-
De(g, R, J = J || f, T, I, z,
|
|
885
|
+
De(g, R, J = J || f, T, I, z, ee, G, be), E = R.__e, (we = R.ref) && J.ref != we && (V || (V = []), J.ref && V.push(J.ref, null, R), V.push(we, R.__c || E, R)), E != null ? (xe == null && (xe = E), typeof R.type == "function" && R.__k === J.__k ? R.__d = G = H(R, G, g) : G = Ue(g, R, J, F, E, G), typeof b.type == "function" && (b.__d = G)) : G && J.__e == G && G.parentNode != g && (G = re(J));
|
|
886
886
|
}
|
|
887
|
-
for (b.__e =
|
|
887
|
+
for (b.__e = xe, w = qe; w--; ) F[w] != null && (typeof b.type == "function" && F[w].__e != null && F[w].__e == b.__d && (b.__d = Ie(D).nextSibling), L(F[w], F[w]));
|
|
888
888
|
if (V) for (w = 0; w < V.length; w++) y(V[w], V[++w], V[++w]);
|
|
889
889
|
}
|
|
890
890
|
function H(g, v, b) {
|
|
@@ -897,11 +897,11 @@ var ya = { 7: function(n, e, t) {
|
|
|
897
897
|
}) : v.push(g)), v;
|
|
898
898
|
}
|
|
899
899
|
function Ue(g, v, b, D, T, I) {
|
|
900
|
-
var z,
|
|
900
|
+
var z, ee, G;
|
|
901
901
|
if (v.__d !== void 0) z = v.__d, v.__d = void 0;
|
|
902
902
|
else if (b == null || T != I || T.parentNode == null) e: if (I == null || I.parentNode !== g) g.appendChild(T), z = null;
|
|
903
903
|
else {
|
|
904
|
-
for (
|
|
904
|
+
for (ee = I, G = 0; (ee = ee.nextSibling) && G < D.length; G += 1) if (ee == T) break e;
|
|
905
905
|
g.insertBefore(T, I), z = I;
|
|
906
906
|
}
|
|
907
907
|
return z !== void 0 ? z : T.nextSibling;
|
|
@@ -941,13 +941,13 @@ var ya = { 7: function(n, e, t) {
|
|
|
941
941
|
function me(g) {
|
|
942
942
|
return this.l[g.type + !0](i.event ? i.event(g) : g);
|
|
943
943
|
}
|
|
944
|
-
function De(g, v, b, D, T, I, z,
|
|
945
|
-
var
|
|
944
|
+
function De(g, v, b, D, T, I, z, ee, G) {
|
|
945
|
+
var be, w, we, J, R, E, xe, V, F, qe, it, fe, Vt, at, q, B = v.type;
|
|
946
946
|
if (v.constructor !== void 0) return null;
|
|
947
|
-
b.__h != null && (
|
|
947
|
+
b.__h != null && (G = b.__h, ee = v.__e = b.__e, v.__h = null, I = [ee]), (be = i.__b) && be(v);
|
|
948
948
|
try {
|
|
949
949
|
e: if (typeof B == "function") {
|
|
950
|
-
if (V = v.props, F = (
|
|
950
|
+
if (V = v.props, F = (be = B.contextType) && D[be.__c], qe = be ? F ? F.props.value : be.__ : D, b.__c ? xe = (w = v.__c = b.__c).__ = w.__E : ("prototype" in B && B.prototype.render ? v.__c = w = new B(V, qe) : (v.__c = w = new N(V, qe), w.constructor = B, w.render = K), F && F.sub(w), w.props = V, w.state || (w.state = {}), w.context = qe, w.__n = D, we = w.__d = !0, w.__h = [], w._sb = []), w.__s == null && (w.__s = w.state), B.getDerivedStateFromProps != null && (w.__s == w.state && (w.__s = O({}, w.__s)), O(w.__s, B.getDerivedStateFromProps(V, w.__s))), J = w.props, R = w.state, w.__v = v, we) B.getDerivedStateFromProps == null && w.componentWillMount != null && w.componentWillMount(), w.componentDidMount != null && w.__h.push(w.componentDidMount);
|
|
951
951
|
else {
|
|
952
952
|
if (B.getDerivedStateFromProps == null && V !== J && w.componentWillReceiveProps != null && w.componentWillReceiveProps(V, qe), !w.__e && w.shouldComponentUpdate != null && w.shouldComponentUpdate(V, w.__s, qe) === !1 || v.__v === b.__v) {
|
|
953
953
|
for (v.__v !== b.__v && (w.props = V, w.state = w.__s, w.__d = !1), w.__e = !1, v.__e = b.__e, v.__k = b.__k, v.__k.forEach(function(Qe) {
|
|
@@ -961,16 +961,16 @@ var ya = { 7: function(n, e, t) {
|
|
|
961
961
|
});
|
|
962
962
|
}
|
|
963
963
|
if (w.context = qe, w.props = V, w.__P = g, fe = i.__r, Vt = 0, "prototype" in B && B.prototype.render) {
|
|
964
|
-
for (w.state = w.__s, w.__d = !1, fe && fe(v),
|
|
964
|
+
for (w.state = w.__s, w.__d = !1, fe && fe(v), be = w.render(w.props, w.state, w.context), at = 0; at < w._sb.length; at++) w.__h.push(w._sb[at]);
|
|
965
965
|
w._sb = [];
|
|
966
966
|
} else do
|
|
967
|
-
w.__d = !1, fe && fe(v),
|
|
967
|
+
w.__d = !1, fe && fe(v), be = w.render(w.props, w.state, w.context), w.state = w.__s;
|
|
968
968
|
while (w.__d && ++Vt < 25);
|
|
969
|
-
w.state = w.__s, w.getChildContext != null && (D = O(O({}, D), w.getChildContext())),
|
|
970
|
-
} else I == null && v.__v === b.__v ? (v.__k = b.__k, v.__e = b.__e) : v.__e = p(b.__e, v, b, D, T, I, z,
|
|
971
|
-
(
|
|
969
|
+
w.state = w.__s, w.getChildContext != null && (D = O(O({}, D), w.getChildContext())), we || w.getSnapshotBeforeUpdate == null || (E = w.getSnapshotBeforeUpdate(J, R)), q = be != null && be.type === U && be.key == null ? be.props.children : be, M(g, Array.isArray(q) ? q : [q], v, b, D, T, I, z, ee, G), w.base = v.__e, v.__h = null, w.__h.length && z.push(w), xe && (w.__E = w.__ = null), w.__e = !1;
|
|
970
|
+
} else I == null && v.__v === b.__v ? (v.__k = b.__k, v.__e = b.__e) : v.__e = p(b.__e, v, b, D, T, I, z, G);
|
|
971
|
+
(be = i.diffed) && be(v);
|
|
972
972
|
} catch (Qe) {
|
|
973
|
-
v.__v = null, (
|
|
973
|
+
v.__v = null, (G || I != null) && (v.__e = ee, v.__h = !!G, I[I.indexOf(ee)] = null), i.__e(Qe, v, b);
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
976
|
function k(g, v) {
|
|
@@ -984,31 +984,31 @@ var ya = { 7: function(n, e, t) {
|
|
|
984
984
|
}
|
|
985
985
|
});
|
|
986
986
|
}
|
|
987
|
-
function p(g, v, b, D, T, I, z,
|
|
988
|
-
var
|
|
987
|
+
function p(g, v, b, D, T, I, z, ee) {
|
|
988
|
+
var G, be, w, we = b.props, J = v.props, R = v.type, E = 0;
|
|
989
989
|
if (R === "svg" && (T = !0), I != null) {
|
|
990
|
-
for (; E < I.length; E++) if ((
|
|
991
|
-
g =
|
|
990
|
+
for (; E < I.length; E++) if ((G = I[E]) && "setAttribute" in G == !!R && (R ? G.localName === R : G.nodeType === 3)) {
|
|
991
|
+
g = G, I[E] = null;
|
|
992
992
|
break;
|
|
993
993
|
}
|
|
994
994
|
}
|
|
995
995
|
if (g == null) {
|
|
996
996
|
if (R === null) return document.createTextNode(J);
|
|
997
|
-
g = T ? document.createElementNS("http://www.w3.org/2000/svg", R) : document.createElement(R, J.is && J), I = null,
|
|
997
|
+
g = T ? document.createElementNS("http://www.w3.org/2000/svg", R) : document.createElement(R, J.is && J), I = null, ee = !1;
|
|
998
998
|
}
|
|
999
|
-
if (R === null)
|
|
999
|
+
if (R === null) we === J || ee && g.data === J || (g.data = J);
|
|
1000
1000
|
else {
|
|
1001
|
-
if (I = I && o.call(g.childNodes),
|
|
1002
|
-
if (I != null) for (
|
|
1003
|
-
(w ||
|
|
1001
|
+
if (I = I && o.call(g.childNodes), be = (we = b.props || f).dangerouslySetInnerHTML, w = J.dangerouslySetInnerHTML, !ee) {
|
|
1002
|
+
if (I != null) for (we = {}, E = 0; E < g.attributes.length; E++) we[g.attributes[E].name] = g.attributes[E].value;
|
|
1003
|
+
(w || be) && (w && (be && w.__html == be.__html || w.__html === g.innerHTML) || (g.innerHTML = w && w.__html || ""));
|
|
1004
1004
|
}
|
|
1005
|
-
if (function(
|
|
1005
|
+
if (function(xe, V, F, qe, it) {
|
|
1006
1006
|
var fe;
|
|
1007
|
-
for (fe in F) fe === "children" || fe === "key" || fe in V || le(
|
|
1008
|
-
for (fe in V) it && typeof V[fe] != "function" || fe === "children" || fe === "key" || fe === "value" || fe === "checked" || F[fe] === V[fe] || le(
|
|
1009
|
-
}(g, J,
|
|
1010
|
-
else if (E = v.props.children, M(g, Array.isArray(E) ? E : [E], v, b, D, T && R !== "foreignObject", I, z, I ? I[0] : b.__k &&
|
|
1011
|
-
|
|
1007
|
+
for (fe in F) fe === "children" || fe === "key" || fe in V || le(xe, fe, null, F[fe], qe);
|
|
1008
|
+
for (fe in V) it && typeof V[fe] != "function" || fe === "children" || fe === "key" || fe === "value" || fe === "checked" || F[fe] === V[fe] || le(xe, fe, V[fe], F[fe], qe);
|
|
1009
|
+
}(g, J, we, T, ee), w) v.__k = [];
|
|
1010
|
+
else if (E = v.props.children, M(g, Array.isArray(E) ? E : [E], v, b, D, T && R !== "foreignObject", I, z, I ? I[0] : b.__k && re(b, 0), ee), I != null) for (E = I.length; E--; ) I[E] != null && A(I[E]);
|
|
1011
|
+
ee || ("value" in J && (E = J.value) !== void 0 && (E !== g.value || R === "progress" && !E || R === "option" && E !== we.value) && le(g, "value", E, we.value, !1), "checked" in J && (E = J.checked) !== void 0 && E !== g.checked && le(g, "checked", E, we.checked, !1));
|
|
1012
1012
|
}
|
|
1013
1013
|
return g;
|
|
1014
1014
|
}
|
|
@@ -1019,7 +1019,7 @@ var ya = { 7: function(n, e, t) {
|
|
|
1019
1019
|
i.__e(D, b);
|
|
1020
1020
|
}
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function L(g, v, b) {
|
|
1023
1023
|
var D, T;
|
|
1024
1024
|
if (i.unmount && i.unmount(g), (D = g.ref) && (D.current && D.current !== g.__e || y(D, null, v)), (D = g.__c) != null) {
|
|
1025
1025
|
if (D.componentWillUnmount) try {
|
|
@@ -1029,7 +1029,7 @@ var ya = { 7: function(n, e, t) {
|
|
|
1029
1029
|
}
|
|
1030
1030
|
D.base = D.__P = null, g.__c = void 0;
|
|
1031
1031
|
}
|
|
1032
|
-
if (D = g.__k) for (T = 0; T < D.length; T++) D[T] &&
|
|
1032
|
+
if (D = g.__k) for (T = 0; T < D.length; T++) D[T] && L(D[T], v, b || typeof g.type != "function");
|
|
1033
1033
|
b || g.__e == null || A(g.__e), g.__ = g.__e = g.__d = void 0;
|
|
1034
1034
|
}
|
|
1035
1035
|
function K(g, v, b) {
|
|
@@ -1055,14 +1055,14 @@ var ya = { 7: function(n, e, t) {
|
|
|
1055
1055
|
return this.getChildContext || (T = [], (I = {})[v] = this, this.getChildContext = function() {
|
|
1056
1056
|
return I;
|
|
1057
1057
|
}, this.shouldComponentUpdate = function(z) {
|
|
1058
|
-
this.props.value !== z.value && T.some(function(
|
|
1059
|
-
|
|
1058
|
+
this.props.value !== z.value && T.some(function(ee) {
|
|
1059
|
+
ee.__e = !0, se(ee);
|
|
1060
1060
|
});
|
|
1061
1061
|
}, this.sub = function(z) {
|
|
1062
1062
|
T.push(z);
|
|
1063
|
-
var
|
|
1063
|
+
var ee = z.componentWillUnmount;
|
|
1064
1064
|
z.componentWillUnmount = function() {
|
|
1065
|
-
T.splice(T.indexOf(z), 1),
|
|
1065
|
+
T.splice(T.indexOf(z), 1), ee && ee.call(z);
|
|
1066
1066
|
};
|
|
1067
1067
|
}), D.children;
|
|
1068
1068
|
} };
|
|
@@ -1071,8 +1071,8 @@ var ya = { 7: function(n, e, t) {
|
|
|
1071
1071
|
o = m.slice, i = { __e: function(g, v, b, D) {
|
|
1072
1072
|
for (var T, I, z; v = v.__; ) if ((T = v.__c) && !T.__) try {
|
|
1073
1073
|
if ((I = T.constructor) && I.getDerivedStateFromError != null && (T.setState(I.getDerivedStateFromError(g)), z = T.__d), T.componentDidCatch != null && (T.componentDidCatch(g, D || {}), z = T.__d), z) return T.__E = T;
|
|
1074
|
-
} catch (
|
|
1075
|
-
g =
|
|
1074
|
+
} catch (ee) {
|
|
1075
|
+
g = ee;
|
|
1076
1076
|
}
|
|
1077
1077
|
throw g;
|
|
1078
1078
|
} }, a = 0, s = function(g) {
|
|
@@ -1084,9 +1084,9 @@ var ya = { 7: function(n, e, t) {
|
|
|
1084
1084
|
this.__v && (this.__e = !0, g && this.__h.push(g), se(this));
|
|
1085
1085
|
}, N.prototype.render = U, c = [], l = typeof Promise == "function" ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, u = function(g, v) {
|
|
1086
1086
|
return g.__v.__b - v.__v.__b;
|
|
1087
|
-
},
|
|
1087
|
+
}, Se.__r = 0, h = 0;
|
|
1088
1088
|
}, 78: (n, e, t) => {
|
|
1089
|
-
t.r(e), t.d(e, { useCallback: () => se, useContext: () =>
|
|
1089
|
+
t.r(e), t.d(e, { useCallback: () => se, useContext: () => Se, useDebugValue: () => M, useEffect: () => $, useErrorBoundary: () => H, useId: () => _e, useImperativeHandle: () => re, useLayoutEffect: () => U, useMemo: () => ke, useReducer: () => P, useRef: () => N, useState: () => S });
|
|
1090
1090
|
var o, i, a, s, c = t(616), d = 0, l = [], u = [], h = c.options.__b, f = c.options.__r, m = c.options.diffed, x = c.options.__c, O = c.options.unmount;
|
|
1091
1091
|
function A(k, p) {
|
|
1092
1092
|
c.options.__h && c.options.__h(i, k, d || p), d = 0;
|
|
@@ -1097,14 +1097,14 @@ var ya = { 7: function(n, e, t) {
|
|
|
1097
1097
|
return d = 1, P(De, k);
|
|
1098
1098
|
}
|
|
1099
1099
|
function P(k, p, y) {
|
|
1100
|
-
var
|
|
1101
|
-
if (
|
|
1102
|
-
var Fe =
|
|
1103
|
-
Fe !== g && (
|
|
1104
|
-
}],
|
|
1100
|
+
var L = A(o++, 2);
|
|
1101
|
+
if (L.t = k, !L.__c && (L.__ = [y ? y(p) : De(void 0, p), function(We) {
|
|
1102
|
+
var Fe = L.__N ? L.__N[0] : L.__[0], g = L.t(Fe, We);
|
|
1103
|
+
Fe !== g && (L.__N = [g, L.__[1]], L.__c.setState({}));
|
|
1104
|
+
}], L.__c = i, !i.u)) {
|
|
1105
1105
|
var K = function(We, Fe, g) {
|
|
1106
|
-
if (
|
|
1107
|
-
var v =
|
|
1106
|
+
if (!L.__c.__H) return !0;
|
|
1107
|
+
var v = L.__c.__H.__.filter(function(D) {
|
|
1108
1108
|
return D.__c;
|
|
1109
1109
|
});
|
|
1110
1110
|
if (v.every(function(D) {
|
|
@@ -1116,7 +1116,7 @@ var ya = { 7: function(n, e, t) {
|
|
|
1116
1116
|
var T = D.__[0];
|
|
1117
1117
|
D.__ = D.__N, D.__N = void 0, T !== D.__[0] && (b = !0);
|
|
1118
1118
|
}
|
|
1119
|
-
}), !(!b &&
|
|
1119
|
+
}), !(!b && L.__c.props === We) && (!ge || ge.call(this, We, Fe, g));
|
|
1120
1120
|
};
|
|
1121
1121
|
i.u = !0;
|
|
1122
1122
|
var ge = i.shouldComponentUpdate, He = i.componentWillUpdate;
|
|
@@ -1128,9 +1128,9 @@ var ya = { 7: function(n, e, t) {
|
|
|
1128
1128
|
He && He.call(this, We, Fe, g);
|
|
1129
1129
|
}, i.shouldComponentUpdate = K;
|
|
1130
1130
|
}
|
|
1131
|
-
return
|
|
1131
|
+
return L.__N || L.__;
|
|
1132
1132
|
}
|
|
1133
|
-
function
|
|
1133
|
+
function $(k, p) {
|
|
1134
1134
|
var y = A(o++, 3);
|
|
1135
1135
|
!c.options.__s && me(y.__H, p) && (y.__ = k, y.i = p, i.__H.__h.push(y));
|
|
1136
1136
|
}
|
|
@@ -1139,11 +1139,11 @@ var ya = { 7: function(n, e, t) {
|
|
|
1139
1139
|
!c.options.__s && me(y.__H, p) && (y.__ = k, y.i = p, i.__h.push(y));
|
|
1140
1140
|
}
|
|
1141
1141
|
function N(k) {
|
|
1142
|
-
return d = 5,
|
|
1142
|
+
return d = 5, ke(function() {
|
|
1143
1143
|
return { current: k };
|
|
1144
1144
|
}, []);
|
|
1145
1145
|
}
|
|
1146
|
-
function
|
|
1146
|
+
function re(k, p, y) {
|
|
1147
1147
|
d = 6, U(function() {
|
|
1148
1148
|
return typeof k == "function" ? (k(p()), function() {
|
|
1149
1149
|
return k(null);
|
|
@@ -1152,16 +1152,16 @@ var ya = { 7: function(n, e, t) {
|
|
|
1152
1152
|
}) : void 0;
|
|
1153
1153
|
}, y == null ? y : y.concat(k));
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function ke(k, p) {
|
|
1156
1156
|
var y = A(o++, 7);
|
|
1157
1157
|
return me(y.__H, p) ? (y.__V = k(), y.i = p, y.__h = k, y.__V) : y.__;
|
|
1158
1158
|
}
|
|
1159
1159
|
function se(k, p) {
|
|
1160
|
-
return d = 8,
|
|
1160
|
+
return d = 8, ke(function() {
|
|
1161
1161
|
return k;
|
|
1162
1162
|
}, p);
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1164
|
+
function Se(k) {
|
|
1165
1165
|
var p = i.context[k.__c], y = A(o++, 9);
|
|
1166
1166
|
return y.c = k, p ? (y.__ == null && (y.__ = !0, p.sub(i)), p.props.value) : k.__;
|
|
1167
1167
|
}
|
|
@@ -1170,8 +1170,8 @@ var ya = { 7: function(n, e, t) {
|
|
|
1170
1170
|
}
|
|
1171
1171
|
function H(k) {
|
|
1172
1172
|
var p = A(o++, 10), y = S();
|
|
1173
|
-
return p.__ = k, i.componentDidCatch || (i.componentDidCatch = function(
|
|
1174
|
-
p.__ && p.__(
|
|
1173
|
+
return p.__ = k, i.componentDidCatch || (i.componentDidCatch = function(L, K) {
|
|
1174
|
+
p.__ && p.__(L, K), y[1](L);
|
|
1175
1175
|
}), [y[0], function() {
|
|
1176
1176
|
y[1](void 0);
|
|
1177
1177
|
}];
|
|
@@ -1209,21 +1209,21 @@ var ya = { 7: function(n, e, t) {
|
|
|
1209
1209
|
}, c.options.__c = function(k, p) {
|
|
1210
1210
|
p.some(function(y) {
|
|
1211
1211
|
try {
|
|
1212
|
-
y.__h.forEach(le), y.__h = y.__h.filter(function(
|
|
1213
|
-
return
|
|
1212
|
+
y.__h.forEach(le), y.__h = y.__h.filter(function(L) {
|
|
1213
|
+
return !L.__ || ce(L);
|
|
1214
1214
|
});
|
|
1215
|
-
} catch (
|
|
1215
|
+
} catch (L) {
|
|
1216
1216
|
p.some(function(K) {
|
|
1217
1217
|
K.__h && (K.__h = []);
|
|
1218
|
-
}), p = [], c.options.__e(
|
|
1218
|
+
}), p = [], c.options.__e(L, y.__v);
|
|
1219
1219
|
}
|
|
1220
1220
|
}), x && x(k, p);
|
|
1221
1221
|
}, c.options.unmount = function(k) {
|
|
1222
1222
|
O && O(k);
|
|
1223
1223
|
var p, y = k.__c;
|
|
1224
|
-
y && y.__H && (y.__H.__.forEach(function(
|
|
1224
|
+
y && y.__H && (y.__H.__.forEach(function(L) {
|
|
1225
1225
|
try {
|
|
1226
|
-
le(
|
|
1226
|
+
le(L);
|
|
1227
1227
|
} catch (K) {
|
|
1228
1228
|
p = K;
|
|
1229
1229
|
}
|
|
@@ -1232,8 +1232,8 @@ var ya = { 7: function(n, e, t) {
|
|
|
1232
1232
|
var Ie = typeof requestAnimationFrame == "function";
|
|
1233
1233
|
function Ne(k) {
|
|
1234
1234
|
var p, y = function() {
|
|
1235
|
-
clearTimeout(
|
|
1236
|
-
},
|
|
1235
|
+
clearTimeout(L), Ie && cancelAnimationFrame(p), setTimeout(k);
|
|
1236
|
+
}, L = setTimeout(y, 100);
|
|
1237
1237
|
Ie && (p = requestAnimationFrame(y));
|
|
1238
1238
|
}
|
|
1239
1239
|
function le(k) {
|
|
@@ -1245,8 +1245,8 @@ var ya = { 7: function(n, e, t) {
|
|
|
1245
1245
|
k.__c = k.__(), i = p;
|
|
1246
1246
|
}
|
|
1247
1247
|
function me(k, p) {
|
|
1248
|
-
return !k || k.length !== p.length || p.some(function(y,
|
|
1249
|
-
return y !== k[
|
|
1248
|
+
return !k || k.length !== p.length || p.some(function(y, L) {
|
|
1249
|
+
return y !== k[L];
|
|
1250
1250
|
});
|
|
1251
1251
|
}
|
|
1252
1252
|
function De(k, p) {
|
|
@@ -1343,26 +1343,26 @@ var ya = { 7: function(n, e, t) {
|
|
|
1343
1343
|
}, 6: (n, e, t) => {
|
|
1344
1344
|
t.d(e, { en: () => o });
|
|
1345
1345
|
const o = { headlines: { error: "An error has occurred", loginEmail: "Sign in or create account", loginEmailNoSignup: "Sign in", loginFinished: "Login successful", loginPasscode: "Enter passcode", loginPassword: "Enter password", registerAuthenticator: "Create a passkey", registerConfirm: "Create account?", registerPassword: "Set new password", otpSetUp: "Set up authenticator app", profileEmails: "Emails", profilePassword: "Password", profilePasskeys: "Passkeys", isPrimaryEmail: "Primary email address", setPrimaryEmail: "Set primary email address", createEmail: "Enter a new email", createUsername: "Enter a new username", emailVerified: "Verified", emailUnverified: "Unverified", emailDelete: "Delete", renamePasskey: "Rename passkey", deletePasskey: "Delete passkey", lastUsedAt: "Last used at", createdAt: "Created at", connectedAccounts: "Connected accounts", deleteAccount: "Delete account", accountNotFound: "Account not found", signIn: "Sign in", signUp: "Create account", selectLoginMethod: "Select login method", setupLoginMethod: "Set up login method", lastUsed: "Last seen", ipAddress: "IP address", revokeSession: "Revoke session", profileSessions: "Sessions", mfaSetUp: "Set up MFA", securityKeySetUp: "Add security key", securityKeyLogin: "Security key", otpLogin: "Authentication code", renameSecurityKey: "Rename security key", deleteSecurityKey: "Delete security key", securityKeys: "Security keys", authenticatorApp: "Authenticator app", authenticatorAppAlreadySetUp: "Authenticator app is set up", authenticatorAppNotSetUp: "Set up authenticator app", trustDevice: "Trust this browser?" }, texts: { enterPasscode: 'Enter the passcode that was sent to "{emailAddress}".', enterPasscodeNoEmail: "Enter the passcode that was sent to your primary email address.", setupPasskey: "Sign in to your account easily and securely with a passkey. Note: Your biometric data is only stored on your devices and will never be shared with anyone.", createAccount: 'No account exists for "{emailAddress}". Do you want to create a new account?', otpEnterVerificationCode: "Enter the one-time password (OTP) obtained from your authenticator app below:", otpScanQRCode: "Scan the QR code using your authenticator app (such as Google Authenticator or any other TOTP app). Alternatively, you can manually enter the OTP secret key into the app.", otpSecretKey: "OTP secret key", passwordFormatHint: "Must be between {minLength} and {maxLength} characters long.", securityKeySetUp: "Use a dedicated security key via USB, Bluetooth, or NFC, or your mobile phone. Connect or activate your security key, then click the button below and follow the prompts to complete the registration.", setPrimaryEmail: "Set this email address to be used for contacting you.", isPrimaryEmail: "This email address will be used to contact you if necessary.", emailVerified: "This email address has been verified.", emailUnverified: "This email address has not been verified.", emailDelete: "If you delete this email address, it can no longer be used to sign in.", renamePasskey: "Set a name for the passkey.", deletePasskey: "Delete this passkey from your account.", deleteAccount: "Are you sure you want to delete this account? All data will be deleted immediately and cannot be recovered.", noAccountExists: 'No account exists for "{emailAddress}".', selectLoginMethodForFutureLogins: "Select one of the following login methods to use for future logins.", howDoYouWantToLogin: "How do you want to login?", mfaSetUp: "Protect your account with Multi-Factor Authentication (MFA). MFA adds an additional step to your login process, ensuring that even if your password or email account is compromised, your account stays secure.", securityKeyLogin: "Connect or activate your security key, then click the button below. Once ready, use it via USB, NFC, your mobile phone. Follow the prompts to complete the login process.", otpLogin: "Open your authenticator app to obtain the one-time password (OTP). Enter the code in the field below to complete your login.", renameSecurityKey: "Set a name for the security key.", deleteSecurityKey: "Delete this security key from your account.", authenticatorAppAlreadySetUp: "Your account is secured with an authenticator app that generates time-based one-time passwords (TOTP) for multi-factor authentication.", authenticatorAppNotSetUp: "Secure your account with an authenticator app that generates time-based one-time passwords (TOTP) for multi-factor authentication.", trustDevice: "If you trust this browser, you won’t need to enter your OTP (One-Time-Password) or use your security key for multi-factor authentication (MFA) the next time you log in." }, labels: { or: "or", no: "no", yes: "yes", email: "Email", continue: "Continue", copied: "copied", skip: "Skip", save: "Save", password: "Password", passkey: "Passkey", passcode: "Passcode", signInPassword: "Sign in with a password", signInPasscode: "Sign in with a passcode", forgotYourPassword: "Forgot your password?", back: "Back", signInPasskey: "Sign in with a passkey", registerAuthenticator: "Create a passkey", signIn: "Sign in", signUp: "Create account", sendNewPasscode: "Send new code", passwordRetryAfter: "Retry in {passwordRetryAfter}", passcodeResendAfter: "Request a new code in {passcodeResendAfter}", unverifiedEmail: "unverified", primaryEmail: "primary", setAsPrimaryEmail: "Set as primary", verify: "Verify", delete: "Delete", newEmailAddress: "New email address", newPassword: "New password", rename: "Rename", newPasskeyName: "New passkey name", addEmail: "Add email", createPasskey: "Create a passkey", webauthnUnsupported: "Passkeys are not supported by your browser", signInWith: "Sign in with {provider}", deleteAccount: "Yes, delete this account.", emailOrUsername: "Email or username", username: "Username", optional: "optional", dontHaveAnAccount: "Don't have an account?", alreadyHaveAnAccount: "Already have an account?", changeUsername: "Change username", setUsername: "Set username", changePassword: "Change password", setPassword: "Set password", revoke: "Revoke", currentSession: "Current session", authenticatorApp: "Authenticator app", securityKey: "Security key", securityKeyUse: "Use security key", newSecurityKeyName: "New security key name", createSecurityKey: "Add a security key", authenticatorAppManage: "Manage authenticator app", authenticatorAppAdd: "Set up", configured: "configured", useAnotherMethod: "Use another method", lastUsed: "Last used", trustDevice: "Trust this browser", staySignedIn: "Stay signed in" }, errors: { somethingWentWrong: "A technical error has occurred. Please try again later.", requestTimeout: "The request timed out.", invalidPassword: "Wrong email or password.", invalidPasscode: "The passcode provided was not correct.", passcodeAttemptsReached: "The passcode was entered incorrectly too many times. Please request a new code.", tooManyRequests: "Too many requests have been made. Please wait to repeat the requested operation.", unauthorized: "Your session has expired. Please log in again.", invalidWebauthnCredential: "This passkey cannot be used anymore.", passcodeExpired: "The passcode has expired. Please request a new one.", userVerification: "User verification required. Please ensure your authenticator device is protected with a PIN or biometric.", emailAddressAlreadyExistsError: "The email address already exists.", maxNumOfEmailAddressesReached: "No further email addresses can be added.", thirdPartyAccessDenied: "Access denied. The request was cancelled by the user or the provider has denied access for other reasons.", thirdPartyMultipleAccounts: "Cannot identify account. The email address is used by multiple accounts.", thirdPartyUnverifiedEmail: "Email verification required. Please verify the used email address with your provider.", signupDisabled: "Account registration is disabled.", handlerNotFoundError: "The current step in your process is not supported by this application version. Please try again later or contact support if the issue persists." }, flowErrors: { technical_error: "A technical error has occurred. Please try again later.", flow_expired_error: "The session has expired, please click the button to restart.", value_invalid_error: "The entered value is invalid.", passcode_invalid: "The passcode provided was not correct.", passkey_invalid: "This passkey cannot be used anymore", passcode_max_attempts_reached: "The passcode was entered incorrectly too many times. Please request a new code.", rate_limit_exceeded: "Too many requests have been made. Please wait to repeat the requested operation.", unknown_username_error: "The username is unknown.", unknown_email_error: "The email address is unknown.", username_already_exists: "The username is already taken.", invalid_username_error: "The username must contain only letters, numbers, and underscores.", email_already_exists: "The email is already taken.", not_found: "The requested resource was not found.", operation_not_permitted_error: "The operation is not permitted.", flow_discontinuity_error: "The process cannot be continued due to user settings or the provider's configuration.", form_data_invalid_error: "The submitted form data contains errors.", unauthorized: "Your session has expired. Please log in again.", value_missing_error: "The value is missing.", value_too_long_error: "Value is too long.", value_too_short_error: "The value is too short.", webauthn_credential_invalid_mfa_only: "This credential can be used as a second factor security key only.", webauthn_credential_already_exists: "The request either timed out, was canceled or the device is already registered. Please try again or try using another device.", platform_authenticator_required: "Your account is configured to use platform authenticators, but your current device or browser does not support this feature. Please try again with a compatible device or browser." } };
|
|
1346
|
-
} },
|
|
1347
|
-
function
|
|
1348
|
-
var e =
|
|
1346
|
+
} }, Lo = {};
|
|
1347
|
+
function X(n) {
|
|
1348
|
+
var e = Lo[n];
|
|
1349
1349
|
if (e !== void 0) return e.exports;
|
|
1350
|
-
var t =
|
|
1351
|
-
return ya[n].call(t.exports, t, t.exports,
|
|
1350
|
+
var t = Lo[n] = { id: n, exports: {} };
|
|
1351
|
+
return ya[n].call(t.exports, t, t.exports, X), t.exports;
|
|
1352
1352
|
}
|
|
1353
|
-
|
|
1353
|
+
X.n = (n) => {
|
|
1354
1354
|
var e = n && n.__esModule ? () => n.default : () => n;
|
|
1355
|
-
return
|
|
1356
|
-
},
|
|
1357
|
-
for (var t in e)
|
|
1358
|
-
},
|
|
1355
|
+
return X.d(e, { a: e }), e;
|
|
1356
|
+
}, X.d = (n, e) => {
|
|
1357
|
+
for (var t in e) X.o(e, t) && !X.o(n, t) && Object.defineProperty(n, t, { enumerable: !0, get: e[t] });
|
|
1358
|
+
}, X.o = (n, e) => Object.prototype.hasOwnProperty.call(n, e), X.r = (n) => {
|
|
1359
1359
|
typeof Symbol < "u" && Symbol.toStringTag && Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(n, "__esModule", { value: !0 });
|
|
1360
|
-
},
|
|
1361
|
-
var
|
|
1362
|
-
|
|
1360
|
+
}, X.nc = void 0;
|
|
1361
|
+
var ae = {};
|
|
1362
|
+
X.d(ae, { fK: () => wn, tJ: () => Ii, Z7: () => Cn, Q9: () => Li, Lv: () => $i, qQ: () => xn, I4: () => Mi, O8: () => Ce, ku: () => ao, ls: () => io, bO: () => ro, yv: () => An, AT: () => lo, m_: () => Wt, KG: () => so, DH: () => Sn, kf: () => fo, oY: () => je, xg: () => Ti, Wg: () => Ye, J: () => Ui, AC: () => co, D_: () => Xe, jx: () => ji, nX: () => uo, Nx: () => oo, Sd: () => gt, kz: () => us, fX: () => ho, qA: () => po, tz: () => go, gN: () => mo });
|
|
1363
1363
|
var Zn = {};
|
|
1364
|
-
|
|
1365
|
-
var C =
|
|
1364
|
+
X.r(Zn), X.d(Zn, { apple: () => cr, checkmark: () => dr, copy: () => ur, customProvider: () => hr, discord: () => pr, exclamation: () => mr, facebook: () => gr, github: () => fr, google: () => vr, linkedin: () => _r, mail: () => yr, microsoft: () => br, passkey: () => kr, password: () => wr, qrCodeScanner: () => Sr, securityKey: () => xr, spinner: () => Ar });
|
|
1365
|
+
var C = X(616), ba = 0;
|
|
1366
1366
|
function r(n, e, t, o, i, a) {
|
|
1367
1367
|
var s, c, d = {};
|
|
1368
1368
|
for (c in e) c == "ref" ? s = e[c] : d[c] = e[c];
|
|
@@ -1430,7 +1430,7 @@ function yi(n, e) {
|
|
|
1430
1430
|
var l = e ? (0, C.h)(To, null, t) : t;
|
|
1431
1431
|
return (0, C.h)(e || n.nodeName.toLowerCase(), o, l);
|
|
1432
1432
|
}
|
|
1433
|
-
var Z =
|
|
1433
|
+
var Z = X(7), _ = X(78);
|
|
1434
1434
|
function bi(n, e) {
|
|
1435
1435
|
for (var t in e) n[t] = e[t];
|
|
1436
1436
|
return n;
|
|
@@ -1541,7 +1541,7 @@ var qo = function(n, e, t) {
|
|
|
1541
1541
|
qo(n, t, e);
|
|
1542
1542
|
});
|
|
1543
1543
|
};
|
|
1544
|
-
var Pa = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Ea = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, Ia = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Da = /[A-Z0-9]/g,
|
|
1544
|
+
var Pa = typeof Symbol < "u" && Symbol.for && Symbol.for("react.element") || 60103, Ea = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, Ia = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, Da = /[A-Z0-9]/g, $a = typeof document < "u", ja = function(n) {
|
|
1545
1545
|
return (typeof Symbol < "u" && typeof Symbol() == "symbol" ? /fil|che|rad/ : /fil|che|ra/).test(n);
|
|
1546
1546
|
};
|
|
1547
1547
|
C.Component.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(n) {
|
|
@@ -1552,7 +1552,7 @@ C.Component.prototype.isReactComponent = {}, ["componentWillMount", "componentWi
|
|
|
1552
1552
|
} });
|
|
1553
1553
|
});
|
|
1554
1554
|
var zo = C.options.event;
|
|
1555
|
-
function
|
|
1555
|
+
function La() {
|
|
1556
1556
|
}
|
|
1557
1557
|
function Ta() {
|
|
1558
1558
|
return this.cancelBubble;
|
|
@@ -1561,7 +1561,7 @@ function Ua() {
|
|
|
1561
1561
|
return this.defaultPrevented;
|
|
1562
1562
|
}
|
|
1563
1563
|
C.options.event = function(n) {
|
|
1564
|
-
return zo && (n = zo(n)), n.persist =
|
|
1564
|
+
return zo && (n = zo(n)), n.persist = La, n.isPropagationStopped = Ta, n.isDefaultPrevented = Ua, n.nativeEvent = n;
|
|
1565
1565
|
};
|
|
1566
1566
|
var Ho = { configurable: !0, get: function() {
|
|
1567
1567
|
return this.class;
|
|
@@ -1571,9 +1571,9 @@ C.options.vnode = function(n) {
|
|
|
1571
1571
|
if (typeof e == "string") {
|
|
1572
1572
|
for (var i in o = {}, t) {
|
|
1573
1573
|
var a = t[i];
|
|
1574
|
-
if (!(i === "value" && "defaultValue" in t && a == null ||
|
|
1574
|
+
if (!(i === "value" && "defaultValue" in t && a == null || $a && i === "children" && e === "noscript")) {
|
|
1575
1575
|
var s = i.toLowerCase();
|
|
1576
|
-
i === "defaultValue" && "value" in t && t.value == null ? i = "value" : i === "download" && a === !0 ? a = "" : s === "ondoubleclick" ? i = "ondblclick" : s !== "onchange" || e !== "input" && e !== "textarea" ||
|
|
1576
|
+
i === "defaultValue" && "value" in t && t.value == null ? i = "value" : i === "download" && a === !0 ? a = "" : s === "ondoubleclick" ? i = "ondblclick" : s !== "onchange" || e !== "input" && e !== "textarea" || ja(t.type) ? s === "onfocus" ? i = "onfocusin" : s === "onblur" ? i = "onfocusout" : Ia.test(i) ? i = s : e.indexOf("-") === -1 && Ea.test(i) ? i = i.replace(Da, "-$&").toLowerCase() : a === null && (a = void 0) : s = i = "oninput", s === "oninput" && o[i = s] && (i = "oninputCapture"), o[i] = a;
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
|
1579
1579
|
e == "select" && o.multiple && Array.isArray(o.value) && (o.value = (0, C.toChildArray)(t.children).forEach(function(c) {
|
|
@@ -1674,9 +1674,9 @@ class Ce extends Error {
|
|
|
1674
1674
|
super(e), this.code = void 0, this.cause = void 0, this.code = t, this.cause = o, Object.setPrototypeOf(this, Ce.prototype);
|
|
1675
1675
|
}
|
|
1676
1676
|
}
|
|
1677
|
-
class
|
|
1677
|
+
class je extends Ce {
|
|
1678
1678
|
constructor(e) {
|
|
1679
|
-
super("Technical error", "somethingWentWrong", e), Object.setPrototypeOf(this,
|
|
1679
|
+
super("Technical error", "somethingWentWrong", e), Object.setPrototypeOf(this, je.prototype);
|
|
1680
1680
|
}
|
|
1681
1681
|
}
|
|
1682
1682
|
class wn extends Ce {
|
|
@@ -1754,9 +1754,9 @@ class Cn extends Ce {
|
|
|
1754
1754
|
super("The email address already exists", "emailAddressAlreadyExistsError", e), Object.setPrototypeOf(this, Cn.prototype);
|
|
1755
1755
|
}
|
|
1756
1756
|
}
|
|
1757
|
-
class
|
|
1757
|
+
class Ye extends Ce {
|
|
1758
1758
|
constructor(e, t) {
|
|
1759
|
-
super("An error occurred during third party sign up/sign in", e, t), Object.setPrototypeOf(this,
|
|
1759
|
+
super("An error occurred during third party sign up/sign in", e, t), Object.setPrototypeOf(this, Ye.prototype);
|
|
1760
1760
|
}
|
|
1761
1761
|
}
|
|
1762
1762
|
const ho = "hanko-session-created", po = "hanko-session-expired", mo = "hanko-user-logged-out", go = "hanko-user-deleted";
|
|
@@ -1837,7 +1837,7 @@ class Ha {
|
|
|
1837
1837
|
const o = { secure: !0, sameSite: this.authCookieSameSite };
|
|
1838
1838
|
this.authCookieDomain !== void 0 && (o.domain = this.authCookieDomain);
|
|
1839
1839
|
const i = yn({}, o, t);
|
|
1840
|
-
if ((i.sameSite === "none" || i.sameSite === "None") && i.secure === !1) throw new
|
|
1840
|
+
if ((i.sameSite === "none" || i.sameSite === "None") && i.secure === !1) throw new je(new Error("Secure attribute must be set when SameSite=None"));
|
|
1841
1841
|
Nn.set(this.authCookieName, e, i);
|
|
1842
1842
|
}
|
|
1843
1843
|
removeAuthCookie() {
|
|
@@ -1888,7 +1888,7 @@ class Va {
|
|
|
1888
1888
|
o.open(t.method, a, !0), o.setRequestHeader("Accept", "application/json"), o.setRequestHeader("Content-Type", "application/json"), o.setRequestHeader("X-Language", d), c && o.setRequestHeader("Authorization", `Bearer ${c}`), o.timeout = s, o.withCredentials = !0, o.onload = () => {
|
|
1889
1889
|
i.processHeaders(o), l(new Ka(o));
|
|
1890
1890
|
}, o.onerror = () => {
|
|
1891
|
-
u(new
|
|
1891
|
+
u(new je());
|
|
1892
1892
|
}, o.ontimeout = () => {
|
|
1893
1893
|
u(new Sn());
|
|
1894
1894
|
}, o.send(t.body ? t.body.toString() : null);
|
|
@@ -1949,26 +1949,26 @@ class lt {
|
|
|
1949
1949
|
this.client = void 0, this.client = new Va(e, t);
|
|
1950
1950
|
}
|
|
1951
1951
|
}
|
|
1952
|
-
class
|
|
1952
|
+
class $i extends lt {
|
|
1953
1953
|
getDomain(e) {
|
|
1954
|
-
if (!e) throw new
|
|
1954
|
+
if (!e) throw new Ye("somethingWentWrong", new Error("email missing from request"));
|
|
1955
1955
|
const t = e.split("@");
|
|
1956
|
-
if (t.length !== 2) throw new
|
|
1956
|
+
if (t.length !== 2) throw new Ye("somethingWentWrong", new Error("email is not in a valid email format."));
|
|
1957
1957
|
const o = t[1].trim();
|
|
1958
|
-
if (o === "") throw new
|
|
1958
|
+
if (o === "") throw new Ye("somethingWentWrong", new Error("email is not in a valid email format."));
|
|
1959
1959
|
return o;
|
|
1960
1960
|
}
|
|
1961
1961
|
async hasProvider(e) {
|
|
1962
1962
|
const t = this.getDomain(e);
|
|
1963
1963
|
return this.client.get(`/saml/provider?domain=${t}`).then((o) => {
|
|
1964
1964
|
if (o.status == 404) throw new Wt(new Error("provider not found"));
|
|
1965
|
-
if (!o.ok) throw new
|
|
1965
|
+
if (!o.ok) throw new je(new Error("unable to fetch provider"));
|
|
1966
1966
|
return o.ok;
|
|
1967
1967
|
});
|
|
1968
1968
|
}
|
|
1969
1969
|
auth(e, t) {
|
|
1970
1970
|
const o = new URL("/saml/auth", this.client.api), i = this.getDomain(e);
|
|
1971
|
-
if (!t) throw new
|
|
1971
|
+
if (!t) throw new Ye("somethingWentWrong", new Error("redirectTo missing from request"));
|
|
1972
1972
|
o.searchParams.append("domain", i), o.searchParams.append("redirect_to", t), window.location.assign(o.href);
|
|
1973
1973
|
}
|
|
1974
1974
|
getError() {
|
|
@@ -1994,71 +1994,71 @@ class ji extends lt {
|
|
|
1994
1994
|
default:
|
|
1995
1995
|
i = "somethingWentWrong";
|
|
1996
1996
|
}
|
|
1997
|
-
return new
|
|
1997
|
+
return new Ye(i, new Error(o));
|
|
1998
1998
|
}
|
|
1999
1999
|
}
|
|
2000
2000
|
}
|
|
2001
|
-
class
|
|
2001
|
+
class ji extends lt {
|
|
2002
2002
|
async getInfo(e) {
|
|
2003
2003
|
const t = await this.client.post("/user", { email: e });
|
|
2004
2004
|
if (t.status === 404) throw new Wt();
|
|
2005
|
-
if (!t.ok) throw new
|
|
2005
|
+
if (!t.ok) throw new je();
|
|
2006
2006
|
return t.json();
|
|
2007
2007
|
}
|
|
2008
2008
|
async create(e) {
|
|
2009
2009
|
const t = await this.client.post("/users", { email: e });
|
|
2010
2010
|
if (t.status === 409) throw new wn();
|
|
2011
2011
|
if (t.status === 403) throw new xn();
|
|
2012
|
-
if (!t.ok) throw new
|
|
2012
|
+
if (!t.ok) throw new je();
|
|
2013
2013
|
return t.json();
|
|
2014
2014
|
}
|
|
2015
2015
|
async getCurrent() {
|
|
2016
2016
|
const e = await this.client.get("/me");
|
|
2017
2017
|
if (e.status === 401) throw this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe();
|
|
2018
|
-
if (!e.ok) throw new
|
|
2018
|
+
if (!e.ok) throw new je();
|
|
2019
2019
|
const t = e.json(), o = await this.client.get(`/users/${t.id}`);
|
|
2020
2020
|
if (o.status === 401) throw this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe();
|
|
2021
|
-
if (!o.ok) throw new
|
|
2021
|
+
if (!o.ok) throw new je();
|
|
2022
2022
|
return o.json();
|
|
2023
2023
|
}
|
|
2024
2024
|
async delete() {
|
|
2025
2025
|
const e = await this.client.delete("/user");
|
|
2026
2026
|
if (e.ok) return this.client.sessionTokenStorage.removeSessionToken(), this.client.cookie.removeAuthCookie(), void this.client.dispatcher.dispatchUserDeletedEvent();
|
|
2027
|
-
throw e.status === 401 ? (this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe()) : new
|
|
2027
|
+
throw e.status === 401 ? (this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe()) : new je();
|
|
2028
2028
|
}
|
|
2029
2029
|
async logout() {
|
|
2030
2030
|
const e = await this.client.post("/logout");
|
|
2031
|
-
if (this.client.sessionTokenStorage.removeSessionToken(), this.client.cookie.removeAuthCookie(), this.client.dispatcher.dispatchUserLoggedOutEvent(), e.status !== 401 && !e.ok) throw new
|
|
2031
|
+
if (this.client.sessionTokenStorage.removeSessionToken(), this.client.cookie.removeAuthCookie(), this.client.dispatcher.dispatchUserLoggedOutEvent(), e.status !== 401 && !e.ok) throw new je();
|
|
2032
2032
|
}
|
|
2033
2033
|
}
|
|
2034
|
-
class
|
|
2034
|
+
class Li extends lt {
|
|
2035
2035
|
async list() {
|
|
2036
2036
|
const e = await this.client.get("/emails");
|
|
2037
2037
|
if (e.status === 401) throw this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe();
|
|
2038
|
-
if (!e.ok) throw new
|
|
2038
|
+
if (!e.ok) throw new je();
|
|
2039
2039
|
return e.json();
|
|
2040
2040
|
}
|
|
2041
2041
|
async create(e) {
|
|
2042
2042
|
const t = await this.client.post("/emails", { address: e });
|
|
2043
2043
|
if (t.ok) return t.json();
|
|
2044
|
-
throw t.status === 400 ? new Cn() : t.status === 401 ? (this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe()) : t.status === 409 ? new An() : new
|
|
2044
|
+
throw t.status === 400 ? new Cn() : t.status === 401 ? (this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe()) : t.status === 409 ? new An() : new je();
|
|
2045
2045
|
}
|
|
2046
2046
|
async setPrimaryEmail(e) {
|
|
2047
2047
|
const t = await this.client.post(`/emails/${e}/set_primary`);
|
|
2048
2048
|
if (t.status === 401) throw this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe();
|
|
2049
|
-
if (!t.ok) throw new
|
|
2049
|
+
if (!t.ok) throw new je();
|
|
2050
2050
|
}
|
|
2051
2051
|
async delete(e) {
|
|
2052
2052
|
const t = await this.client.delete(`/emails/${e}`);
|
|
2053
2053
|
if (t.status === 401) throw this.client.dispatcher.dispatchSessionExpiredEvent(), new Xe();
|
|
2054
|
-
if (!t.ok) throw new
|
|
2054
|
+
if (!t.ok) throw new je();
|
|
2055
2055
|
}
|
|
2056
2056
|
}
|
|
2057
2057
|
class Ti extends lt {
|
|
2058
2058
|
async auth(e, t) {
|
|
2059
2059
|
const o = new URL("/thirdparty/auth", this.client.api);
|
|
2060
|
-
if (!e) throw new
|
|
2061
|
-
if (!t) throw new
|
|
2060
|
+
if (!e) throw new Ye("somethingWentWrong", new Error("provider missing from request"));
|
|
2061
|
+
if (!t) throw new Ye("somethingWentWrong", new Error("redirectTo missing from request"));
|
|
2062
2062
|
o.searchParams.append("provider", e), o.searchParams.append("redirect_to", t), window.location.assign(o.href);
|
|
2063
2063
|
}
|
|
2064
2064
|
getError() {
|
|
@@ -2087,7 +2087,7 @@ class Ti extends lt {
|
|
|
2087
2087
|
default:
|
|
2088
2088
|
i = "somethingWentWrong";
|
|
2089
2089
|
}
|
|
2090
|
-
return new
|
|
2090
|
+
return new Ye(i, new Error(o));
|
|
2091
2091
|
}
|
|
2092
2092
|
}
|
|
2093
2093
|
}
|
|
@@ -2097,7 +2097,7 @@ class Ui extends lt {
|
|
|
2097
2097
|
if (!e) return;
|
|
2098
2098
|
window.history.replaceState(null, null, window.location.pathname);
|
|
2099
2099
|
const t = await this.client.post("/token", { value: e });
|
|
2100
|
-
if (!t.ok) throw new
|
|
2100
|
+
if (!t.ok) throw new je();
|
|
2101
2101
|
return t.json();
|
|
2102
2102
|
}
|
|
2103
2103
|
}
|
|
@@ -2152,7 +2152,7 @@ class On {
|
|
|
2152
2152
|
class fo extends lt {
|
|
2153
2153
|
async validate() {
|
|
2154
2154
|
const e = await this.client.get("/sessions/validate");
|
|
2155
|
-
if (!e.ok) throw new
|
|
2155
|
+
if (!e.ok) throw new je();
|
|
2156
2156
|
return await e.json();
|
|
2157
2157
|
}
|
|
2158
2158
|
}
|
|
@@ -2163,7 +2163,7 @@ class Za extends lt {
|
|
|
2163
2163
|
const t = this.client._fetch_blocking("/sessions/validate", { method: "GET" });
|
|
2164
2164
|
e = JSON.parse(t);
|
|
2165
2165
|
} catch (t) {
|
|
2166
|
-
throw new
|
|
2166
|
+
throw new je(t);
|
|
2167
2167
|
}
|
|
2168
2168
|
return !!e && e.is_valid;
|
|
2169
2169
|
}
|
|
@@ -2407,7 +2407,7 @@ class Mi extends On {
|
|
|
2407
2407
|
constructor(e, t) {
|
|
2408
2408
|
super(), this.api = void 0, this.user = void 0, this.email = void 0, this.thirdParty = void 0, this.enterprise = void 0, this.token = void 0, this.sessionClient = void 0, this.session = void 0, this.relay = void 0, this.flow = void 0;
|
|
2409
2409
|
const o = { timeout: 13e3, cookieName: "hanko", localStorageKey: "hanko", sessionCheckInterval: 3e4, sessionCheckChannelName: "hanko-session-check", sessionTokenLocation: "cookie" };
|
|
2410
|
-
(t == null ? void 0 : t.cookieName) !== void 0 && (o.cookieName = t.cookieName), (t == null ? void 0 : t.timeout) !== void 0 && (o.timeout = t.timeout), (t == null ? void 0 : t.localStorageKey) !== void 0 && (o.localStorageKey = t.localStorageKey), (t == null ? void 0 : t.cookieDomain) !== void 0 && (o.cookieDomain = t.cookieDomain), (t == null ? void 0 : t.cookieSameSite) !== void 0 && (o.cookieSameSite = t.cookieSameSite), (t == null ? void 0 : t.lang) !== void 0 && (o.lang = t.lang), (t == null ? void 0 : t.sessionCheckInterval) !== void 0 && (o.sessionCheckInterval = t.sessionCheckInterval < 3e3 ? 3e3 : t.sessionCheckInterval), (t == null ? void 0 : t.sessionCheckChannelName) !== void 0 && (o.sessionCheckChannelName = t.sessionCheckChannelName), (t == null ? void 0 : t.sessionTokenLocation) !== void 0 && (o.sessionTokenLocation = t.sessionTokenLocation), this.api = e, this.user = new
|
|
2410
|
+
(t == null ? void 0 : t.cookieName) !== void 0 && (o.cookieName = t.cookieName), (t == null ? void 0 : t.timeout) !== void 0 && (o.timeout = t.timeout), (t == null ? void 0 : t.localStorageKey) !== void 0 && (o.localStorageKey = t.localStorageKey), (t == null ? void 0 : t.cookieDomain) !== void 0 && (o.cookieDomain = t.cookieDomain), (t == null ? void 0 : t.cookieSameSite) !== void 0 && (o.cookieSameSite = t.cookieSameSite), (t == null ? void 0 : t.lang) !== void 0 && (o.lang = t.lang), (t == null ? void 0 : t.sessionCheckInterval) !== void 0 && (o.sessionCheckInterval = t.sessionCheckInterval < 3e3 ? 3e3 : t.sessionCheckInterval), (t == null ? void 0 : t.sessionCheckChannelName) !== void 0 && (o.sessionCheckChannelName = t.sessionCheckChannelName), (t == null ? void 0 : t.sessionTokenLocation) !== void 0 && (o.sessionTokenLocation = t.sessionTokenLocation), this.api = e, this.user = new ji(e, o), this.email = new Li(e, o), this.thirdParty = new Ti(e, o), this.enterprise = new $i(e, o), this.token = new Ui(e, o), this.sessionClient = new fo(e, o), this.session = new Za(e, o), this.relay = new Xa(e, o), this.flow = new tr(e, o);
|
|
2411
2411
|
}
|
|
2412
2412
|
setLang(e) {
|
|
2413
2413
|
this.flow.client.lang = e;
|
|
@@ -2427,7 +2427,7 @@ class gt {
|
|
|
2427
2427
|
return !(!window.PublicKeyCredential || !window.PublicKeyCredential.isConditionalMediationAvailable) && window.PublicKeyCredential.isConditionalMediationAvailable();
|
|
2428
2428
|
}
|
|
2429
2429
|
}
|
|
2430
|
-
var or =
|
|
2430
|
+
var or = X(292), et = X.n(or), ir = X(360), tt = X.n(ir), ar = X(884), nt = X.n(ar), rr = X(88), ot = X.n(rr), rn = X(914), kt = {};
|
|
2431
2431
|
kt.setAttributes = nt(), kt.insert = (n) => {
|
|
2432
2432
|
window._hankoStyle = n;
|
|
2433
2433
|
}, kt.domAPI = tt(), kt.insertStyleElement = ot(), et()(rn.A, kt);
|
|
@@ -2443,13 +2443,13 @@ const zt = rn.A && rn.A.locals ? rn.A.locals : void 0, sr = function(n) {
|
|
|
2443
2443
|
a(t.replace(/[-]/, "")), i((s) => (s.setLang(t), s));
|
|
2444
2444
|
}, [o, t, i, a]), r("section", Object.assign({ part: "container", className: zt.container, ref: e }, { children: n.children }));
|
|
2445
2445
|
});
|
|
2446
|
-
var sn =
|
|
2446
|
+
var sn = X(697), wt = {};
|
|
2447
2447
|
wt.setAttributes = nt(), wt.insert = (n) => {
|
|
2448
2448
|
window._hankoStyle = n;
|
|
2449
2449
|
}, wt.domAPI = tt(), wt.insertStyleElement = ot(), et()(sn.A, wt);
|
|
2450
|
-
const
|
|
2451
|
-
var lr =
|
|
2452
|
-
const cr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-apple", xmlns: "http://www.w3.org/2000/svg", width: n, height: n, viewBox: "20.5 16 15 19", className: Y()(L.icon, e && L.secondary, t && L.disabled) }, { children: r("path", { d: "M28.2226562,20.3846154 C29.0546875,20.3846154 30.0976562,19.8048315 30.71875,19.0317864 C31.28125,18.3312142 31.6914062,17.352829 31.6914062,16.3744437 C31.6914062,16.2415766 31.6796875,16.1087095 31.65625,16 C30.7304687,16.0362365 29.6171875,16.640178 28.9492187,17.4494596 C28.421875,18.06548 27.9414062,19.0317864 27.9414062,20.0222505 C27.9414062,20.1671964 27.9648438,20.3121424 27.9765625,20.3604577 C28.0351562,20.3725366 28.1289062,20.3846154 28.2226562,20.3846154 Z M25.2929688,35 C26.4296875,35 26.9335938,34.214876 28.3515625,34.214876 C29.7929688,34.214876 30.109375,34.9758423 31.375,34.9758423 C32.6171875,34.9758423 33.4492188,33.792117 34.234375,32.6325493 C35.1132812,31.3038779 35.4765625,29.9993643 35.5,29.9389701 C35.4179688,29.9148125 33.0390625,28.9122695 33.0390625,26.0979021 C33.0390625,23.6579784 34.9140625,22.5588048 35.0195312,22.474253 C33.7773438,20.6382708 31.890625,20.5899555 31.375,20.5899555 C29.9804688,20.5899555 28.84375,21.4596313 28.1289062,21.4596313 C27.3554688,21.4596313 26.3359375,20.6382708 25.1289062,20.6382708 C22.8320312,20.6382708 20.5,22.5950413 20.5,26.2911634 C20.5,28.5861411 21.3671875,31.013986 22.4335938,32.5842339 C23.3476562,33.9129053 24.1445312,35 25.2929688,35 Z" }) })), dr = ({ secondary: n, size: e, fadeOut: t, disabled: o }) => r("svg", Object.assign({ id: "icon-checkmark", xmlns: "http://www.w3.org/2000/svg", viewBox: "4 4 40 40", width: e, height: e, className: Y()(L.checkmark, n && L.secondary, t && L.fadeOut, o && L.disabled) }, { children: r("path", { d: "M21.05 33.1 35.2 18.95l-2.3-2.25-11.85 11.85-6-6-2.25 2.25ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 24q0-4.15 1.575-7.8 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24 4q4.15 0 7.8 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm0-3q7.1 0 12.05-4.975Q41 31.05 41 24q0-7.1-4.95-12.05Q31.1 7 24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24 41Zm0-17Z" }) })), ur = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", width: n, height: n, className: Y()(L.icon, e && L.secondary, t && L.disabled) }, { children: r("path", { d: "M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z" }) })), hr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-custom-provider", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: n, height: n, className: Y()(L.icon, e && L.secondary, t && L.disabled) }, { children: [r("path", { d: "M0 0h24v24H0z", fill: "none" }), r("path", { d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z" })] })), pr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-discord", fill: "#fff", xmlns: "http://www.w3.org/2000/svg", width: n, height: n, viewBox: "0 0 127.14 96.36", className: Y()(L.icon, e && L.secondary, t && L.disabled) }, { children: r("path", { d: "M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z" }) })), mr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-exclamation", xmlns: "http://www.w3.org/2000/svg", viewBox: "5 2 13 20", width: n, height: n, className: Y()(L.exclamationMark, e && L.secondary, t && L.disabled) }, { children: r("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" }) })), gr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ width: n, height: n, viewBox: "0 0 666.66668 666.66717", xmlns: "http://www.w3.org/2000/svg" }, { children: [r("defs", Object.assign({ id: "defs13" }, { children: r("clipPath", Object.assign({ clipPathUnits: "userSpaceOnUse", id: "clipPath25" }, { children: r("path", { d: "M 0,700 H 700 V 0 H 0 Z", id: "path23" }) })) })), r("g", Object.assign({ id: "g17", transform: "matrix(1.3333333,0,0,-1.3333333,-133.33333,799.99999)" }, { children: r("g", Object.assign({ id: "g19" }, { children: r("g", Object.assign({ id: "g21", clipPath: "url(#clipPath25)" }, { children: [r("g", Object.assign({ id: "g27", transform: "translate(600,350)" }, { children: r("path", { className: Y()(L.facebookIcon, t ? L.disabledOutline : L.outline), d: "m 0,0 c 0,138.071 -111.929,250 -250,250 -138.071,0 -250,-111.929 -250,-250 0,-117.245 80.715,-215.622 189.606,-242.638 v 166.242 h -51.552 V 0 h 51.552 v 32.919 c 0,85.092 38.508,124.532 122.048,124.532 15.838,0 43.167,-3.105 54.347,-6.211 V 81.986 c -5.901,0.621 -16.149,0.932 -28.882,0.932 -40.993,0 -56.832,-15.528 -56.832,-55.9 V 0 h 81.659 l -14.028,-76.396 h -67.631 V -248.169 C -95.927,-233.218 0,-127.818 0,0", id: "path29" }) })), r("g", Object.assign({ id: "g31", transform: "translate(447.9175,273.6036)" }, { children: r("path", { className: Y()(L.facebookIcon, t ? L.disabledLetter : L.letter), d: "M 0,0 14.029,76.396 H -67.63 v 27.019 c 0,40.372 15.838,55.899 56.831,55.899 12.733,0 22.981,-0.31 28.882,-0.931 v 69.253 c -11.18,3.106 -38.509,6.212 -54.347,6.212 -83.539,0 -122.048,-39.441 -122.048,-124.533 V 76.396 h -51.552 V 0 h 51.552 v -166.242 c 19.343,-4.798 39.568,-7.362 60.394,-7.362 10.254,0 20.358,0.632 30.288,1.831 L -67.63,0 Z", id: "path33" }) }))] })) })) }))] })), fr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-github", xmlns: "http://www.w3.org/2000/svg", fill: "#fff", viewBox: "0 0 97.63 96", width: n, height: n, className: Y()(L.icon, e && L.secondary, t && L.disabled) }, { children: [r("path", { d: "M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" }), " "] })), vr = ({ size: n, disabled: e }) => r("svg", Object.assign({ id: "icon-google", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: n, height: n, className: L.googleIcon }, { children: [r("path", { className: Y()(L.googleIcon, e ? L.disabled : L.blue), d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" }), r("path", { className: Y()(L.googleIcon, e ? L.disabled : L.green), d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" }), r("path", { className: Y()(L.googleIcon, e ? L.disabled : L.yellow), d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" }), r("path", { className: Y()(L.googleIcon, e ? L.disabled : L.red), d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" }), r("path", { d: "M1 1h22v22H1z", fill: "none" })] })), _r = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-linkedin", fill: "#fff", xmlns: "http://www.w3.org/2000/svg", width: n, viewBox: "0 0 24 24", height: n, className: Y()(L.icon, e && L.secondary, t && L.disabled) }, { children: r("path", { d: "M20.5 2h-17A1.5 1.5 0 002 3.5v17A1.5 1.5 0 003.5 22h17a1.5 1.5 0 001.5-1.5v-17A1.5 1.5 0 0020.5 2zM8 19H5v-9h3zM6.5 8.25A1.75 1.75 0 118.3 6.5a1.78 1.78 0 01-1.8 1.75zM19 19h-3v-4.74c0-1.42-.6-1.93-1.38-1.93A1.74 1.74 0 0013 14.19a.66.66 0 000 .14V19h-3v-9h2.9v1.3a3.11 3.11 0 012.7-1.4c1.55 0 3.36.86 3.36 3.66z" }) })), yr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-mail", xmlns: "http://www.w3.org/2000/svg", width: n, height: n, viewBox: "0 -960 960 960", className: Y()(L.icon, e && L.secondary, t && L.disabled) }, { children: r("path", { d: "M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm320-280L160-640v400h640v-400L480-440Zm0-80 320-200H160l320 200ZM160-640v-80 480-400Z" }) })), br = ({ size: n, disabled: e }) => r("svg", Object.assign({ id: "icon-microsoft", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: n, height: n, className: L.microsoftIcon }, { children: [r("rect", { className: Y()(L.microsoftIcon, e ? L.disabled : L.blue), x: "1", y: "1", width: "9", height: "9" }), r("rect", { className: Y()(L.microsoftIcon, e ? L.disabled : L.green), x: "1", y: "11", width: "9", height: "9" }), r("rect", { className: Y()(L.microsoftIcon, e ? L.disabled : L.yellow), x: "11", y: "1", width: "9", height: "9" }), r("rect", { className: Y()(L.microsoftIcon, e ? L.disabled : L.red), x: "11", y: "11", width: "9", height: "9" })] })), kr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-passkey", xmlns: "http://www.w3.org/2000/svg", viewBox: "3 1.5 19.5 19", width: n, height: n, className: Y()(L.icon, e && L.secondary, t && L.disabled) }, { children: r("g", Object.assign({ id: "icon-passkey-all" }, { children: [r("circle", { id: "icon-passkey-head", cx: "10.5", cy: "6", r: "4.5" }), r("path", { id: "icon-passkey-key", d: "M22.5,10.5a3.5,3.5,0,1,0-5,3.15V19L19,20.5,21.5,18,20,16.5,21.5,15l-1.24-1.24A3.5,3.5,0,0,0,22.5,10.5Zm-3.5,0a1,1,0,1,1,1-1A1,1,0,0,1,19,10.5Z" }), r("path", { id: "icon-passkey-body", d: "M14.44,12.52A6,6,0,0,0,12,12H9a6,6,0,0,0-6,6v2H16V14.49A5.16,5.16,0,0,1,14.44,12.52Z" })] })) })), wr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-password", xmlns: "http://www.w3.org/2000/svg", width: n, height: n, viewBox: "0 -960 960 960", className: Y()(L.icon, e && L.secondary, t && L.disabled) }, { children: r("path", { d: "M80-200v-80h800v80H80Zm46-242-52-30 34-60H40v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Zm320 0-52-30 34-60h-68v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Zm320 0-52-30 34-60h-68v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Z" }) })), Sr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", width: n, height: n, className: Y()(L.icon, e && L.secondary, t && L.disabled) }, { children: r("path", { d: "M80-680v-200h200v80H160v120H80Zm0 600v-200h80v120h120v80H80Zm600 0v-80h120v-120h80v200H680Zm120-600v-120H680v-80h200v200h-80ZM700-260h60v60h-60v-60Zm0-120h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60-60h60v60h-60v-60Zm120-120h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60-60h60v60h-60v-60Zm240-320v240H520v-240h240ZM440-440v240H200v-240h240Zm0-320v240H200v-240h240Zm-60 500v-120H260v120h120Zm0-320v-120H260v120h120Zm320 0v-120H580v120h120Z" }) })), xr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", width: n, height: n, className: Y()(L.icon, e && L.secondary, t && L.disabled) }, { children: r("path", { d: "M280-240q-100 0-170-70T40-480q0-100 70-170t170-70q66 0 121 33t87 87h432v240h-80v120H600v-120H488q-32 54-87 87t-121 33Zm0-80q66 0 106-40.5t48-79.5h246v120h80v-120h80v-80H434q-8-39-48-79.5T280-640q-66 0-113 47t-47 113q0 66 47 113t113 47Zm0-80q33 0 56.5-23.5T360-480q0-33-23.5-56.5T280-560q-33 0-56.5 23.5T200-480q0 33 23.5 56.5T280-400Zm0-80Z" }) })), Ar = ({ size: n, disabled: e }) => r("svg", Object.assign({ id: "icon-spinner", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: n, height: n, className: Y()(L.loadingSpinner, e && L.disabled) }, { children: [r("path", { d: "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z", opacity: ".25" }), r("path", { d: "M10.72,19.9a8,8,0,0,1-6.5-9.79A7.77,7.77,0,0,1,10.4,4.16a8,8,0,0,1,9.49,6.52A1.54,1.54,0,0,0,21.38,12h.13a1.37,1.37,0,0,0,1.38-1.54,11,11,0,1,0-12.7,12.39A1.54,1.54,0,0,0,12,21.34h0A1.47,1.47,0,0,0,10.72,19.9Z" })] })), Ht = ({ name: n, secondary: e, size: t = 18, fadeOut: o, disabled: i }) => r(Zn[n], { size: t, secondary: e, fadeOut: o, disabled: i }), _o = ({ children: n, isLoading: e, isSuccess: t, fadeOut: o, secondary: i, hasIcon: a, maxWidth: s }) => r(C.Fragment, { children: r("div", e ? Object.assign({ className: Y()(L.loadingSpinnerWrapper, L.centerContent, s && L.maxWidth) }, { children: r(Ht, { name: "spinner", secondary: i }) }) : t ? Object.assign({ className: Y()(L.loadingSpinnerWrapper, L.centerContent, s && L.maxWidth) }, { children: r(Ht, { name: "checkmark", secondary: i, fadeOut: o }) }) : Object.assign({ className: a ? L.loadingSpinnerWrapperIcon : L.loadingSpinnerWrapper }, { children: n })) }), Cr = () => {
|
|
2450
|
+
const j = sn.A && sn.A.locals ? sn.A.locals : void 0;
|
|
2451
|
+
var lr = X(633), Q = X.n(lr);
|
|
2452
|
+
const cr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-apple", xmlns: "http://www.w3.org/2000/svg", width: n, height: n, viewBox: "20.5 16 15 19", className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: r("path", { d: "M28.2226562,20.3846154 C29.0546875,20.3846154 30.0976562,19.8048315 30.71875,19.0317864 C31.28125,18.3312142 31.6914062,17.352829 31.6914062,16.3744437 C31.6914062,16.2415766 31.6796875,16.1087095 31.65625,16 C30.7304687,16.0362365 29.6171875,16.640178 28.9492187,17.4494596 C28.421875,18.06548 27.9414062,19.0317864 27.9414062,20.0222505 C27.9414062,20.1671964 27.9648438,20.3121424 27.9765625,20.3604577 C28.0351562,20.3725366 28.1289062,20.3846154 28.2226562,20.3846154 Z M25.2929688,35 C26.4296875,35 26.9335938,34.214876 28.3515625,34.214876 C29.7929688,34.214876 30.109375,34.9758423 31.375,34.9758423 C32.6171875,34.9758423 33.4492188,33.792117 34.234375,32.6325493 C35.1132812,31.3038779 35.4765625,29.9993643 35.5,29.9389701 C35.4179688,29.9148125 33.0390625,28.9122695 33.0390625,26.0979021 C33.0390625,23.6579784 34.9140625,22.5588048 35.0195312,22.474253 C33.7773438,20.6382708 31.890625,20.5899555 31.375,20.5899555 C29.9804688,20.5899555 28.84375,21.4596313 28.1289062,21.4596313 C27.3554688,21.4596313 26.3359375,20.6382708 25.1289062,20.6382708 C22.8320312,20.6382708 20.5,22.5950413 20.5,26.2911634 C20.5,28.5861411 21.3671875,31.013986 22.4335938,32.5842339 C23.3476562,33.9129053 24.1445312,35 25.2929688,35 Z" }) })), dr = ({ secondary: n, size: e, fadeOut: t, disabled: o }) => r("svg", Object.assign({ id: "icon-checkmark", xmlns: "http://www.w3.org/2000/svg", viewBox: "4 4 40 40", width: e, height: e, className: Q()(j.checkmark, n && j.secondary, t && j.fadeOut, o && j.disabled) }, { children: r("path", { d: "M21.05 33.1 35.2 18.95l-2.3-2.25-11.85 11.85-6-6-2.25 2.25ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 24q0-4.15 1.575-7.8 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24 4q4.15 0 7.8 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm0-3q7.1 0 12.05-4.975Q41 31.05 41 24q0-7.1-4.95-12.05Q31.1 7 24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24 41Zm0-17Z" }) })), ur = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", width: n, height: n, className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: r("path", { d: "M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z" }) })), hr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-custom-provider", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: n, height: n, className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: [r("path", { d: "M0 0h24v24H0z", fill: "none" }), r("path", { d: "M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z" })] })), pr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-discord", fill: "#fff", xmlns: "http://www.w3.org/2000/svg", width: n, height: n, viewBox: "0 0 127.14 96.36", className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: r("path", { d: "M107.7,8.07A105.15,105.15,0,0,0,81.47,0a72.06,72.06,0,0,0-3.36,6.83A97.68,97.68,0,0,0,49,6.83,72.37,72.37,0,0,0,45.64,0,105.89,105.89,0,0,0,19.39,8.09C2.79,32.65-1.71,56.6.54,80.21h0A105.73,105.73,0,0,0,32.71,96.36,77.7,77.7,0,0,0,39.6,85.25a68.42,68.42,0,0,1-10.85-5.18c.91-.66,1.8-1.34,2.66-2a75.57,75.57,0,0,0,64.32,0c.87.71,1.76,1.39,2.66,2a68.68,68.68,0,0,1-10.87,5.19,77,77,0,0,0,6.89,11.1A105.25,105.25,0,0,0,126.6,80.22h0C129.24,52.84,122.09,29.11,107.7,8.07ZM42.45,65.69C36.18,65.69,31,60,31,53s5-12.74,11.43-12.74S54,46,53.89,53,48.84,65.69,42.45,65.69Zm42.24,0C78.41,65.69,73.25,60,73.25,53s5-12.74,11.44-12.74S96.23,46,96.12,53,91.08,65.69,84.69,65.69Z" }) })), mr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-exclamation", xmlns: "http://www.w3.org/2000/svg", viewBox: "5 2 13 20", width: n, height: n, className: Q()(j.exclamationMark, e && j.secondary, t && j.disabled) }, { children: r("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z" }) })), gr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ width: n, height: n, viewBox: "0 0 666.66668 666.66717", xmlns: "http://www.w3.org/2000/svg" }, { children: [r("defs", Object.assign({ id: "defs13" }, { children: r("clipPath", Object.assign({ clipPathUnits: "userSpaceOnUse", id: "clipPath25" }, { children: r("path", { d: "M 0,700 H 700 V 0 H 0 Z", id: "path23" }) })) })), r("g", Object.assign({ id: "g17", transform: "matrix(1.3333333,0,0,-1.3333333,-133.33333,799.99999)" }, { children: r("g", Object.assign({ id: "g19" }, { children: r("g", Object.assign({ id: "g21", clipPath: "url(#clipPath25)" }, { children: [r("g", Object.assign({ id: "g27", transform: "translate(600,350)" }, { children: r("path", { className: Q()(j.facebookIcon, t ? j.disabledOutline : j.outline), d: "m 0,0 c 0,138.071 -111.929,250 -250,250 -138.071,0 -250,-111.929 -250,-250 0,-117.245 80.715,-215.622 189.606,-242.638 v 166.242 h -51.552 V 0 h 51.552 v 32.919 c 0,85.092 38.508,124.532 122.048,124.532 15.838,0 43.167,-3.105 54.347,-6.211 V 81.986 c -5.901,0.621 -16.149,0.932 -28.882,0.932 -40.993,0 -56.832,-15.528 -56.832,-55.9 V 0 h 81.659 l -14.028,-76.396 h -67.631 V -248.169 C -95.927,-233.218 0,-127.818 0,0", id: "path29" }) })), r("g", Object.assign({ id: "g31", transform: "translate(447.9175,273.6036)" }, { children: r("path", { className: Q()(j.facebookIcon, t ? j.disabledLetter : j.letter), d: "M 0,0 14.029,76.396 H -67.63 v 27.019 c 0,40.372 15.838,55.899 56.831,55.899 12.733,0 22.981,-0.31 28.882,-0.931 v 69.253 c -11.18,3.106 -38.509,6.212 -54.347,6.212 -83.539,0 -122.048,-39.441 -122.048,-124.533 V 76.396 h -51.552 V 0 h 51.552 v -166.242 c 19.343,-4.798 39.568,-7.362 60.394,-7.362 10.254,0 20.358,0.632 30.288,1.831 L -67.63,0 Z", id: "path33" }) }))] })) })) }))] })), fr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-github", xmlns: "http://www.w3.org/2000/svg", fill: "#fff", viewBox: "0 0 97.63 96", width: n, height: n, className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: [r("path", { d: "M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" }), " "] })), vr = ({ size: n, disabled: e }) => r("svg", Object.assign({ id: "icon-google", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: n, height: n, className: j.googleIcon }, { children: [r("path", { className: Q()(j.googleIcon, e ? j.disabled : j.blue), d: "M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" }), r("path", { className: Q()(j.googleIcon, e ? j.disabled : j.green), d: "M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" }), r("path", { className: Q()(j.googleIcon, e ? j.disabled : j.yellow), d: "M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z" }), r("path", { className: Q()(j.googleIcon, e ? j.disabled : j.red), d: "M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z" }), r("path", { d: "M1 1h22v22H1z", fill: "none" })] })), _r = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-linkedin", fill: "#fff", xmlns: "http://www.w3.org/2000/svg", width: n, viewBox: "0 0 24 24", height: n, className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: r("path", { d: "M20.5 2h-17A1.5 1.5 0 002 3.5v17A1.5 1.5 0 003.5 22h17a1.5 1.5 0 001.5-1.5v-17A1.5 1.5 0 0020.5 2zM8 19H5v-9h3zM6.5 8.25A1.75 1.75 0 118.3 6.5a1.78 1.78 0 01-1.8 1.75zM19 19h-3v-4.74c0-1.42-.6-1.93-1.38-1.93A1.74 1.74 0 0013 14.19a.66.66 0 000 .14V19h-3v-9h2.9v1.3a3.11 3.11 0 012.7-1.4c1.55 0 3.36.86 3.36 3.66z" }) })), yr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-mail", xmlns: "http://www.w3.org/2000/svg", width: n, height: n, viewBox: "0 -960 960 960", className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: r("path", { d: "M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm320-280L160-640v400h640v-400L480-440Zm0-80 320-200H160l320 200ZM160-640v-80 480-400Z" }) })), br = ({ size: n, disabled: e }) => r("svg", Object.assign({ id: "icon-microsoft", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: n, height: n, className: j.microsoftIcon }, { children: [r("rect", { className: Q()(j.microsoftIcon, e ? j.disabled : j.blue), x: "1", y: "1", width: "9", height: "9" }), r("rect", { className: Q()(j.microsoftIcon, e ? j.disabled : j.green), x: "1", y: "11", width: "9", height: "9" }), r("rect", { className: Q()(j.microsoftIcon, e ? j.disabled : j.yellow), x: "11", y: "1", width: "9", height: "9" }), r("rect", { className: Q()(j.microsoftIcon, e ? j.disabled : j.red), x: "11", y: "11", width: "9", height: "9" })] })), kr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-passkey", xmlns: "http://www.w3.org/2000/svg", viewBox: "3 1.5 19.5 19", width: n, height: n, className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: r("g", Object.assign({ id: "icon-passkey-all" }, { children: [r("circle", { id: "icon-passkey-head", cx: "10.5", cy: "6", r: "4.5" }), r("path", { id: "icon-passkey-key", d: "M22.5,10.5a3.5,3.5,0,1,0-5,3.15V19L19,20.5,21.5,18,20,16.5,21.5,15l-1.24-1.24A3.5,3.5,0,0,0,22.5,10.5Zm-3.5,0a1,1,0,1,1,1-1A1,1,0,0,1,19,10.5Z" }), r("path", { id: "icon-passkey-body", d: "M14.44,12.52A6,6,0,0,0,12,12H9a6,6,0,0,0-6,6v2H16V14.49A5.16,5.16,0,0,1,14.44,12.52Z" })] })) })), wr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ id: "icon-password", xmlns: "http://www.w3.org/2000/svg", width: n, height: n, viewBox: "0 -960 960 960", className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: r("path", { d: "M80-200v-80h800v80H80Zm46-242-52-30 34-60H40v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Zm320 0-52-30 34-60h-68v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Zm320 0-52-30 34-60h-68v-60h68l-34-58 52-30 34 58 34-58 52 30-34 58h68v60h-68l34 60-52 30-34-60-34 60Z" }) })), Sr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", width: n, height: n, className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: r("path", { d: "M80-680v-200h200v80H160v120H80Zm0 600v-200h80v120h120v80H80Zm600 0v-80h120v-120h80v200H680Zm120-600v-120H680v-80h200v200h-80ZM700-260h60v60h-60v-60Zm0-120h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60-60h60v60h-60v-60Zm120-120h60v60h-60v-60Zm-60 60h60v60h-60v-60Zm-60-60h60v60h-60v-60Zm240-320v240H520v-240h240ZM440-440v240H200v-240h240Zm0-320v240H200v-240h240Zm-60 500v-120H260v120h120Zm0-320v-120H260v120h120Zm320 0v-120H580v120h120Z" }) })), xr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 -960 960 960", width: n, height: n, className: Q()(j.icon, e && j.secondary, t && j.disabled) }, { children: r("path", { d: "M280-240q-100 0-170-70T40-480q0-100 70-170t170-70q66 0 121 33t87 87h432v240h-80v120H600v-120H488q-32 54-87 87t-121 33Zm0-80q66 0 106-40.5t48-79.5h246v120h80v-120h80v-80H434q-8-39-48-79.5T280-640q-66 0-113 47t-47 113q0 66 47 113t113 47Zm0-80q33 0 56.5-23.5T360-480q0-33-23.5-56.5T280-560q-33 0-56.5 23.5T200-480q0 33 23.5 56.5T280-400Zm0-80Z" }) })), Ar = ({ size: n, disabled: e }) => r("svg", Object.assign({ id: "icon-spinner", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: n, height: n, className: Q()(j.loadingSpinner, e && j.disabled) }, { children: [r("path", { d: "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z", opacity: ".25" }), r("path", { d: "M10.72,19.9a8,8,0,0,1-6.5-9.79A7.77,7.77,0,0,1,10.4,4.16a8,8,0,0,1,9.49,6.52A1.54,1.54,0,0,0,21.38,12h.13a1.37,1.37,0,0,0,1.38-1.54,11,11,0,1,0-12.7,12.39A1.54,1.54,0,0,0,12,21.34h0A1.47,1.47,0,0,0,10.72,19.9Z" })] })), Ht = ({ name: n, secondary: e, size: t = 18, fadeOut: o, disabled: i }) => r(Zn[n], { size: t, secondary: e, fadeOut: o, disabled: i }), _o = ({ children: n, isLoading: e, isSuccess: t, fadeOut: o, secondary: i, hasIcon: a, maxWidth: s }) => r(C.Fragment, { children: r("div", e ? Object.assign({ className: Q()(j.loadingSpinnerWrapper, j.centerContent, s && j.maxWidth) }, { children: r(Ht, { name: "spinner", secondary: i }) }) : t ? Object.assign({ className: Q()(j.loadingSpinnerWrapper, j.centerContent, s && j.maxWidth) }, { children: r(Ht, { name: "checkmark", secondary: i, fadeOut: o }) }) : Object.assign({ className: a ? j.loadingSpinnerWrapperIcon : j.loadingSpinnerWrapper }, { children: n })) }), Cr = () => {
|
|
2453
2453
|
const { setLoadingAction: n } = (0, _.useContext)(pe);
|
|
2454
2454
|
return (0, _.useEffect)(() => {
|
|
2455
2455
|
n(null);
|
|
@@ -2460,22 +2460,22 @@ const cr = ({ size: n, secondary: e, disabled: t }) => r("svg", Object.assign({
|
|
|
2460
2460
|
n && t(n);
|
|
2461
2461
|
}, [n]), { flowState: e };
|
|
2462
2462
|
};
|
|
2463
|
-
var ln =
|
|
2463
|
+
var ln = X(577), St = {};
|
|
2464
2464
|
St.setAttributes = nt(), St.insert = (n) => {
|
|
2465
2465
|
window._hankoStyle = n;
|
|
2466
2466
|
}, St.domAPI = tt(), St.insertStyleElement = ot(), et()(ln.A, St);
|
|
2467
2467
|
const Oe = ln.A && ln.A.locals ? ln.A.locals : void 0, Or = () => {
|
|
2468
2468
|
const { t: n } = (0, _.useContext)(Z.TranslateContext);
|
|
2469
|
-
return r("span", Object.assign({ className:
|
|
2469
|
+
return r("span", Object.assign({ className: Q()(Oe.lastUsed) }, { children: n("labels.lastUsed") }));
|
|
2470
2470
|
}, ne = (n) => {
|
|
2471
2471
|
var { uiAction: e, title: t, children: o, secondary: i, dangerous: a, autofocus: s, showLastUsed: c, onClick: d, icon: l } = n, u = function(S, P) {
|
|
2472
|
-
var
|
|
2473
|
-
for (var U in S) Object.prototype.hasOwnProperty.call(S, U) && P.indexOf(U) < 0 && (
|
|
2472
|
+
var $ = {};
|
|
2473
|
+
for (var U in S) Object.prototype.hasOwnProperty.call(S, U) && P.indexOf(U) < 0 && ($[U] = S[U]);
|
|
2474
2474
|
if (S != null && typeof Object.getOwnPropertySymbols == "function") {
|
|
2475
2475
|
var N = 0;
|
|
2476
|
-
for (U = Object.getOwnPropertySymbols(S); N < U.length; N++) P.indexOf(U[N]) < 0 && Object.prototype.propertyIsEnumerable.call(S, U[N]) && (
|
|
2476
|
+
for (U = Object.getOwnPropertySymbols(S); N < U.length; N++) P.indexOf(U[N]) < 0 && Object.prototype.propertyIsEnumerable.call(S, U[N]) && ($[U[N]] = S[U[N]]);
|
|
2477
2477
|
}
|
|
2478
|
-
return
|
|
2478
|
+
return $;
|
|
2479
2479
|
}(n, ["uiAction", "title", "children", "secondary", "dangerous", "autofocus", "showLastUsed", "onClick", "icon"]);
|
|
2480
2480
|
const h = (0, _.useRef)(null), { uiState: f, isDisabled: m } = (0, _.useContext)(pe);
|
|
2481
2481
|
(0, _.useEffect)(() => {
|
|
@@ -2483,7 +2483,7 @@ const Oe = ln.A && ln.A.locals ? ln.A.locals : void 0, Or = () => {
|
|
|
2483
2483
|
S && s && S.focus();
|
|
2484
2484
|
}, [s]);
|
|
2485
2485
|
const x = (0, _.useMemo)(() => e && f.loadingAction === e || u.isLoading, [u, e, f]), O = (0, _.useMemo)(() => e && f.succeededAction === e || u.isSuccess, [u, e, f]), A = (0, _.useMemo)(() => m || u.disabled, [u, m]);
|
|
2486
|
-
return r("button", Object.assign({ part: a ? "button dangerous-button" : i ? "button secondary-button" : "button primary-button", title: t, ref: h, type: "submit", disabled: A, onClick: d, className:
|
|
2486
|
+
return r("button", Object.assign({ part: a ? "button dangerous-button" : i ? "button secondary-button" : "button primary-button", title: t, ref: h, type: "submit", disabled: A, onClick: d, className: Q()(Oe.button, a ? Oe.dangerous : i ? Oe.secondary : Oe.primary) }, { children: r(_o, Object.assign({ isLoading: x, isSuccess: O, secondary: !0, hasIcon: !!l, maxWidth: !0 }, { children: [l ? r(Ht, { name: l, secondary: i, disabled: A }) : null, r("div", Object.assign({ className: Oe.caption }, { children: [r("span", { children: o }), c ? r(Or, {}) : null] }))] })) }));
|
|
2487
2487
|
}, Ve = (n) => {
|
|
2488
2488
|
var e, t, o, i, a, { label: s } = n, c = function(m, x) {
|
|
2489
2489
|
var O = {};
|
|
@@ -2503,14 +2503,14 @@ const Oe = ln.A && ln.A.locals ? ln.A.locals : void 0, Or = () => {
|
|
|
2503
2503
|
var m;
|
|
2504
2504
|
return c.markOptional && !(!((m = c.flowInput) === null || m === void 0) && m.required) ? `${c.placeholder} (${u("labels.optional")})` : c.placeholder;
|
|
2505
2505
|
}, [c.markOptional, c.placeholder, c.flowInput, u]);
|
|
2506
|
-
return r("div", Object.assign({ className: Oe.inputWrapper }, { children: r("input", Object.assign({ part: "input text-input", required: (e = c.flowInput) === null || e === void 0 ? void 0 : e.required, maxLength: (t = c.flowInput) === null || t === void 0 ? void 0 : t.max_length, minLength: (o = c.flowInput) === null || o === void 0 ? void 0 : o.min_length, hidden: (i = c.flowInput) === null || i === void 0 ? void 0 : i.hidden }, c, { ref: d, "aria-label": f, placeholder: f, className:
|
|
2507
|
-
}, Pe = ({ children: n }) => r("section", Object.assign({ className: zt.content }, { children: n })), oe = ({ onSubmit: n, children: e, hidden: t, maxWidth: o }) => t ? null : r("form", Object.assign({ onSubmit: n, className: Oe.form }, { children: r("ul", Object.assign({ className: Oe.ul }, { children: (0, C.toChildArray)(e).map((i, a) => r("li", Object.assign({ part: "form-item", className:
|
|
2508
|
-
var cn =
|
|
2506
|
+
return r("div", Object.assign({ className: Oe.inputWrapper }, { children: r("input", Object.assign({ part: "input text-input", required: (e = c.flowInput) === null || e === void 0 ? void 0 : e.required, maxLength: (t = c.flowInput) === null || t === void 0 ? void 0 : t.max_length, minLength: (o = c.flowInput) === null || o === void 0 ? void 0 : o.min_length, hidden: (i = c.flowInput) === null || i === void 0 ? void 0 : i.hidden }, c, { ref: d, "aria-label": f, placeholder: f, className: Q()(Oe.input, !!(!((a = c.flowInput) === null || a === void 0) && a.error) && c.markError && Oe.error), disabled: h })) }));
|
|
2507
|
+
}, Pe = ({ children: n }) => r("section", Object.assign({ className: zt.content }, { children: n })), oe = ({ onSubmit: n, children: e, hidden: t, maxWidth: o }) => t ? null : r("form", Object.assign({ onSubmit: n, className: Oe.form }, { children: r("ul", Object.assign({ className: Oe.ul }, { children: (0, C.toChildArray)(e).map((i, a) => r("li", Object.assign({ part: "form-item", className: Q()(Oe.li, o ? Oe.maxWidth : null) }, { children: i }), a)) })) }));
|
|
2508
|
+
var cn = X(111), xt = {};
|
|
2509
2509
|
xt.setAttributes = nt(), xt.insert = (n) => {
|
|
2510
2510
|
window._hankoStyle = n;
|
|
2511
2511
|
}, xt.domAPI = tt(), xt.insertStyleElement = ot(), et()(cn.A, xt);
|
|
2512
2512
|
const Tt = cn.A && cn.A.locals ? cn.A.locals : void 0, yo = ({ children: n, hidden: e }) => e ? null : r("section", Object.assign({ part: "divider", className: Tt.divider }, { children: [r("div", { part: "divider-line", className: Tt.line }), n ? r("div", Object.assign({ part: "divider-text", class: Tt.text }, { children: n })) : null, r("div", { part: "divider-line", className: Tt.line })] }));
|
|
2513
|
-
var dn =
|
|
2513
|
+
var dn = X(905), At = {};
|
|
2514
2514
|
At.setAttributes = nt(), At.insert = (n) => {
|
|
2515
2515
|
window._hankoStyle = n;
|
|
2516
2516
|
}, At.domAPI = tt(), At.insertStyleElement = ot(), et()(dn.A, At);
|
|
@@ -2528,22 +2528,22 @@ const Ri = dn.A && dn.A.locals ? dn.A.locals : void 0, Ee = ({ state: n, error:
|
|
|
2528
2528
|
else n != null && n.error && c(Object.assign(Object.assign({}, s), { error: n == null ? void 0 : n.error }));
|
|
2529
2529
|
}, [n]), r("section", Object.assign({ part: "error", className: Ri.errorBox, hidden: !(!((o = s.error) === null || o === void 0) && o.code) && !(t != null && t.code) && !e }, { children: [r("span", { children: r(Ht, { name: "exclamation", size: 15 }) }), r("span", Object.assign({ id: "errorMessage", part: "error-text" }, { children: a(e ? `errors.${e.code}` : `flowErrors.${((i = s.error) === null || i === void 0 ? void 0 : i.code) || (t == null ? void 0 : t.code)}`) }))] }));
|
|
2530
2530
|
};
|
|
2531
|
-
var un =
|
|
2531
|
+
var un = X(619), Ct = {};
|
|
2532
2532
|
Ct.setAttributes = nt(), Ct.insert = (n) => {
|
|
2533
2533
|
window._hankoStyle = n;
|
|
2534
2534
|
}, Ct.domAPI = tt(), Ct.insertStyleElement = ot(), et()(un.A, Ct);
|
|
2535
|
-
const bn = un.A && un.A.locals ? un.A.locals : void 0, he = ({ children: n }) => r("h1", Object.assign({ part: "headline1", className:
|
|
2536
|
-
var hn =
|
|
2535
|
+
const bn = un.A && un.A.locals ? un.A.locals : void 0, he = ({ children: n }) => r("h1", Object.assign({ part: "headline1", className: Q()(bn.headline, bn.grade1) }, { children: n }));
|
|
2536
|
+
var hn = X(995), Ot = {};
|
|
2537
2537
|
Ot.setAttributes = nt(), Ot.insert = (n) => {
|
|
2538
2538
|
window._hankoStyle = n;
|
|
2539
2539
|
}, Ot.domAPI = tt(), Ot.insertStyleElement = ot(), et()(hn.A, Ot);
|
|
2540
2540
|
const Jt = hn.A && hn.A.locals ? hn.A.locals : void 0, Yn = (n) => {
|
|
2541
|
-
var { loadingSpinnerPosition: e, dangerous: t = !1, onClick: o, uiAction: i } = n, a = function(P,
|
|
2541
|
+
var { loadingSpinnerPosition: e, dangerous: t = !1, onClick: o, uiAction: i } = n, a = function(P, $) {
|
|
2542
2542
|
var U = {};
|
|
2543
|
-
for (var N in P) Object.prototype.hasOwnProperty.call(P, N) &&
|
|
2543
|
+
for (var N in P) Object.prototype.hasOwnProperty.call(P, N) && $.indexOf(N) < 0 && (U[N] = P[N]);
|
|
2544
2544
|
if (P != null && typeof Object.getOwnPropertySymbols == "function") {
|
|
2545
|
-
var
|
|
2546
|
-
for (N = Object.getOwnPropertySymbols(P);
|
|
2545
|
+
var re = 0;
|
|
2546
|
+
for (N = Object.getOwnPropertySymbols(P); re < N.length; re++) $.indexOf(N[re]) < 0 && Object.prototype.propertyIsEnumerable.call(P, N[re]) && (U[N[re]] = P[N[re]]);
|
|
2547
2547
|
}
|
|
2548
2548
|
return U;
|
|
2549
2549
|
}(n, ["loadingSpinnerPosition", "dangerous", "onClick", "uiAction"]);
|
|
@@ -2555,15 +2555,15 @@ const Jt = hn.A && hn.A.locals ? hn.A.locals : void 0, Yn = (n) => {
|
|
|
2555
2555
|
P.preventDefault(), u(!1);
|
|
2556
2556
|
}, x = (0, _.useMemo)(() => i && c.loadingAction === i || a.isLoading, [a, i, c]), O = (0, _.useMemo)(() => i && c.succeededAction === i || a.isSuccess, [a, i, c]), A = (0, _.useCallback)((P) => {
|
|
2557
2557
|
P.preventDefault(), u(!1), o(P);
|
|
2558
|
-
}, [o]), S = (0, _.useCallback)(() => r(C.Fragment, { children: [l ? r(C.Fragment, { children: [r(Yn, Object.assign({ onClick: A }, { children: s("labels.yes") })), " / ", r(Yn, Object.assign({ onClick: m }, { children: s("labels.no") })), " "] }) : null, r("button", Object.assign({}, a, { onClick: t ? f : o, disabled: l || a.disabled || d, part: "link", className:
|
|
2559
|
-
return r(C.Fragment, { children: r("span", Object.assign({ className:
|
|
2558
|
+
}, [o]), S = (0, _.useCallback)(() => r(C.Fragment, { children: [l ? r(C.Fragment, { children: [r(Yn, Object.assign({ onClick: A }, { children: s("labels.yes") })), " / ", r(Yn, Object.assign({ onClick: m }, { children: s("labels.no") })), " "] }) : null, r("button", Object.assign({}, a, { onClick: t ? f : o, disabled: l || a.disabled || d, part: "link", className: Q()(Jt.link, t ? Jt.danger : null) }, { children: a.children }))] }), [l, t, o, A, a, s, d]);
|
|
2559
|
+
return r(C.Fragment, { children: r("span", Object.assign({ className: Q()(Jt.linkWrapper, e === "right" ? Jt.reverse : null), hidden: a.hidden, onMouseEnter: () => {
|
|
2560
2560
|
h && window.clearTimeout(h);
|
|
2561
2561
|
}, onMouseLeave: () => {
|
|
2562
2562
|
h = window.setTimeout(() => {
|
|
2563
2563
|
u(!1);
|
|
2564
2564
|
}, 1e3);
|
|
2565
2565
|
} }, { children: r(C.Fragment, e && (x || O) ? { children: [r(_o, { isLoading: x, isSuccess: O, secondary: a.secondary, fadeOut: !0 }), S()] } : { children: S() }) })) });
|
|
2566
|
-
},
|
|
2566
|
+
}, te = Yn, Re = ({ children: n, hidden: e = !1 }) => e ? null : r("section", Object.assign({ className: zt.footer }, { children: n })), bo = (n) => {
|
|
2567
2567
|
var { label: e } = n, t = function(o, i) {
|
|
2568
2568
|
var a = {};
|
|
2569
2569
|
for (var s in o) Object.prototype.hasOwnProperty.call(o, s) && i.indexOf(s) < 0 && (a[s] = o[s]);
|
|
@@ -2573,7 +2573,7 @@ const Jt = hn.A && hn.A.locals ? hn.A.locals : void 0, Yn = (n) => {
|
|
|
2573
2573
|
}
|
|
2574
2574
|
return a;
|
|
2575
2575
|
}(n, ["label"]);
|
|
2576
|
-
return r("div", Object.assign({ className: Oe.inputWrapper }, { children: r("label", Object.assign({ className: Oe.checkboxWrapper }, { children: [r("input", Object.assign({ part: "input checkbox-input", type: "checkbox", "aria-label": e, className: Oe.checkbox }, t)), r("span", Object.assign({ className:
|
|
2576
|
+
return r("div", Object.assign({ className: Oe.inputWrapper }, { children: r("label", Object.assign({ className: Oe.checkboxWrapper }, { children: [r("input", Object.assign({ part: "input checkbox-input", type: "checkbox", "aria-label": e, className: Oe.checkbox }, t)), r("span", Object.assign({ className: Q()(Oe.label, t.disabled ? Oe.disabled : null) }, { children: e }))] })) }));
|
|
2577
2577
|
}, Pn = () => r("section", { className: Tt.spacer });
|
|
2578
2578
|
var Pt = function(n, e, t, o) {
|
|
2579
2579
|
return new (t || (t = Promise))(function(i, a) {
|
|
@@ -2602,13 +2602,13 @@ var Pt = function(n, e, t, o) {
|
|
|
2602
2602
|
};
|
|
2603
2603
|
const Pr = (n) => {
|
|
2604
2604
|
var e, t, o, i, a, s, c, d, l;
|
|
2605
|
-
const { t: u } = (0, _.useContext)(Z.TranslateContext), { init: h, hanko: f, initialComponentName: m, setLoadingAction: x, uiState: O, setUIState: A, stateHandler: S, hidePasskeyButtonOnLogin: P, lastLogin:
|
|
2605
|
+
const { t: u } = (0, _.useContext)(Z.TranslateContext), { init: h, hanko: f, initialComponentName: m, setLoadingAction: x, uiState: O, setUIState: A, stateHandler: S, hidePasskeyButtonOnLogin: P, lastLogin: $ } = (0, _.useContext)(pe), [U, N] = (0, _.useState)(null), [re, ke] = (0, _.useState)(O.username || O.email), { flowState: se } = Me(n.state), Se = gt.supported(), [M, H] = (0, _.useState)(void 0), [_e, Ue] = (0, _.useState)(null), [Ie, Ne] = (0, _.useState)(!1), le = (k) => {
|
|
2606
2606
|
if (k.preventDefault(), k.target instanceof HTMLInputElement) {
|
|
2607
2607
|
const { value: p } = k.target;
|
|
2608
|
-
|
|
2608
|
+
ke(p), ce(p);
|
|
2609
2609
|
}
|
|
2610
2610
|
}, ce = (k) => {
|
|
2611
|
-
const p = () => A((
|
|
2611
|
+
const p = () => A((L) => Object.assign(Object.assign({}, L), { email: k, username: null })), y = () => A((L) => Object.assign(Object.assign({}, L), { email: null, username: k }));
|
|
2612
2612
|
switch (U) {
|
|
2613
2613
|
case "email":
|
|
2614
2614
|
p();
|
|
@@ -2620,8 +2620,8 @@ const Pr = (n) => {
|
|
|
2620
2620
|
k.match(/^[^@]+@[^@]+\.[^@]+$/) ? p() : y();
|
|
2621
2621
|
}
|
|
2622
2622
|
}, me = (0, _.useMemo)(() => {
|
|
2623
|
-
var k, p, y,
|
|
2624
|
-
return !!(!((p = (k = se.actions).webauthn_generate_request_options) === null || p === void 0) && p.call(k, null)) || !!(!((
|
|
2623
|
+
var k, p, y, L;
|
|
2624
|
+
return !!(!((p = (k = se.actions).webauthn_generate_request_options) === null || p === void 0) && p.call(k, null)) || !!(!((L = (y = se.actions).thirdparty_oauth) === null || L === void 0) && L.call(y, null));
|
|
2625
2625
|
}, [se.actions]), De = (t = (e = se.actions).continue_with_login_identifier) === null || t === void 0 ? void 0 : t.call(e, null).inputs;
|
|
2626
2626
|
return (0, _.useEffect)(() => {
|
|
2627
2627
|
var k, p;
|
|
@@ -2636,20 +2636,20 @@ const Pr = (n) => {
|
|
|
2636
2636
|
H(y), k.delete("error"), k.delete("error_description"), history.replaceState(null, null, window.location.pathname + (k.size < 1 ? "" : `?${k.toString()}`));
|
|
2637
2637
|
}, []), r(C.Fragment, { children: [r(Pe, { children: [r(he, { children: u("headlines.signIn") }), r(Ee, { state: se, error: M }), De ? r(C.Fragment, { children: [r(oe, Object.assign({ onSubmit: (k) => Pt(void 0, void 0, void 0, function* () {
|
|
2638
2638
|
k.preventDefault(), x("email-submit");
|
|
2639
|
-
const p = yield se.actions.continue_with_login_identifier({ [U]:
|
|
2640
|
-
ce(
|
|
2641
|
-
}), maxWidth: !0 }, { children: [De.email ? r(Ve, { type: "email", autoComplete: "username webauthn", autoCorrect: "off", flowInput: De.email, onInput: le, value:
|
|
2639
|
+
const p = yield se.actions.continue_with_login_identifier({ [U]: re }).run();
|
|
2640
|
+
ce(re), x(null), yield f.flow.run(p, S);
|
|
2641
|
+
}), maxWidth: !0 }, { children: [De.email ? r(Ve, { type: "email", autoComplete: "username webauthn", autoCorrect: "off", flowInput: De.email, onInput: le, value: re, placeholder: u("labels.email"), pattern: "^[^@]+@[^@]+\\.[^@]+$" }) : De.username ? r(Ve, { type: "text", autoComplete: "username webauthn", autoCorrect: "off", flowInput: De.username, onInput: le, value: re, placeholder: u("labels.username") }) : r(Ve, { type: "text", autoComplete: "username webauthn", autoCorrect: "off", flowInput: De.identifier, onInput: le, value: re, placeholder: u("labels.emailOrUsername") }), r(ne, Object.assign({ uiAction: "email-submit" }, { children: u("labels.continue") }))] })), r(yo, Object.assign({ hidden: !me }, { children: u("labels.or") }))] }) : null, !((i = (o = se.actions).webauthn_generate_request_options) === null || i === void 0) && i.call(o, null) && !P ? r(oe, Object.assign({ onSubmit: (k) => ((p) => Pt(void 0, void 0, void 0, function* () {
|
|
2642
2642
|
p.preventDefault(), x("passkey-submit");
|
|
2643
2643
|
const y = yield se.actions.webauthn_generate_request_options(null).run();
|
|
2644
2644
|
yield f.flow.run(y, S);
|
|
2645
|
-
}))(k) }, { children: r(ne, Object.assign({ uiAction: "passkey-submit", secondary: !0, title:
|
|
2646
|
-
y.preventDefault(), Ue(
|
|
2647
|
-
const K = yield se.actions.thirdparty_oauth({ provider:
|
|
2645
|
+
}))(k) }, { children: r(ne, Object.assign({ uiAction: "passkey-submit", secondary: !0, title: Se ? null : u("labels.webauthnUnsupported"), disabled: !Se, icon: "passkey" }, { children: u("labels.signInPasskey") })) })) : null, !((s = (a = se.actions).thirdparty_oauth) === null || s === void 0) && s.call(a, null) ? (c = se.actions.thirdparty_oauth(null).inputs.provider.allowed_values) === null || c === void 0 ? void 0 : c.map((k) => r(oe, Object.assign({ onSubmit: (p) => ((y, L) => Pt(void 0, void 0, void 0, function* () {
|
|
2646
|
+
y.preventDefault(), Ue(L);
|
|
2647
|
+
const K = yield se.actions.thirdparty_oauth({ provider: L, redirect_to: window.location.toString() }).run();
|
|
2648
2648
|
K.error && Ue(null), yield f.flow.run(K, S);
|
|
2649
|
-
}))(p, k.value) }, { children: r(ne, Object.assign({ isLoading: k.value == _e, secondary: !0, icon: k.value.startsWith("custom_") ? "customProvider" : k.value, showLastUsed: (
|
|
2649
|
+
}))(p, k.value) }, { children: r(ne, Object.assign({ isLoading: k.value == _e, secondary: !0, icon: k.value.startsWith("custom_") ? "customProvider" : k.value, showLastUsed: ($ == null ? void 0 : $.login_method) == "third_party" && ($ == null ? void 0 : $.third_party_provider) == k.value }, { children: u("labels.signInWith", { provider: k.name }) })) }), k.value)) : null, ((l = (d = se.actions).remember_me) === null || l === void 0 ? void 0 : l.call(d, null)) && r(C.Fragment, { children: [r(Pn, {}), r(bo, { required: !1, type: "checkbox", label: u("labels.staySignedIn"), checked: Ie, onChange: (k) => Pt(void 0, void 0, void 0, function* () {
|
|
2650
2650
|
const p = yield se.actions.remember_me({ remember_me: !Ie }).run();
|
|
2651
2651
|
Ne((y) => !y), yield f.flow.run(p, S);
|
|
2652
|
-
}) })] })] }), r(Re, Object.assign({ hidden: m !== "auth" }, { children: [r("span", { hidden: !0 }), r(
|
|
2652
|
+
}) })] })] }), r(Re, Object.assign({ hidden: m !== "auth" }, { children: [r("span", { hidden: !0 }), r(te, Object.assign({ uiAction: "switch-flow", onClick: (k) => Pt(void 0, void 0, void 0, function* () {
|
|
2653
2653
|
k.preventDefault(), h("registration");
|
|
2654
2654
|
}), loadingSpinnerPosition: "left" }, { children: u("labels.dontHaveAnAccount") }))] }))] });
|
|
2655
2655
|
}, Er = (n) => {
|
|
@@ -2696,7 +2696,7 @@ const Pr = (n) => {
|
|
|
2696
2696
|
a(O);
|
|
2697
2697
|
})(x), disabled: o }, x)) }));
|
|
2698
2698
|
};
|
|
2699
|
-
var pn =
|
|
2699
|
+
var pn = X(489), Et = {};
|
|
2700
2700
|
Et.setAttributes = nt(), Et.insert = (n) => {
|
|
2701
2701
|
window._hankoStyle = n;
|
|
2702
2702
|
}, Et.domAPI = tt(), Et.insertStyleElement = ot(), et()(pn.A, Et);
|
|
@@ -2729,11 +2729,11 @@ var Yt = function(n, e, t, o) {
|
|
|
2729
2729
|
const Dr = (n) => {
|
|
2730
2730
|
var e, t;
|
|
2731
2731
|
const { t: o } = (0, _.useContext)(Z.TranslateContext), { flowState: i } = Me(n.state), { hanko: a, uiState: s, setUIState: c, setLoadingAction: d, setSucceededAction: l, stateHandler: u } = (0, _.useContext)(pe), [h, f] = (0, _.useState)(), [m, x] = (0, _.useState)(i.payload.resend_after), [O, A] = (0, _.useState)([]), S = (0, _.useMemo)(() => {
|
|
2732
|
-
var
|
|
2733
|
-
return ((
|
|
2734
|
-
}, [i]), P = (0, _.useCallback)((
|
|
2732
|
+
var $;
|
|
2733
|
+
return (($ = i.error) === null || $ === void 0 ? void 0 : $.code) === "passcode_max_attempts_reached";
|
|
2734
|
+
}, [i]), P = (0, _.useCallback)(($) => Yt(void 0, void 0, void 0, function* () {
|
|
2735
2735
|
d("passcode-submit");
|
|
2736
|
-
const U = yield i.actions.verify_passcode({ code:
|
|
2736
|
+
const U = yield i.actions.verify_passcode({ code: $ }).run();
|
|
2737
2737
|
d(null), yield a.flow.run(U, u);
|
|
2738
2738
|
}), [a, i, d, u]);
|
|
2739
2739
|
return (0, _.useEffect)(() => {
|
|
@@ -2741,29 +2741,29 @@ const Dr = (n) => {
|
|
|
2741
2741
|
}, [i, l]), (0, _.useEffect)(() => {
|
|
2742
2742
|
h <= 0 && s.succeededAction;
|
|
2743
2743
|
}, [s, h]), (0, _.useEffect)(() => {
|
|
2744
|
-
const
|
|
2745
|
-
return () => clearInterval(
|
|
2744
|
+
const $ = h > 0 && setInterval(() => f(h - 1), 1e3);
|
|
2745
|
+
return () => clearInterval($);
|
|
2746
2746
|
}, [h]), (0, _.useEffect)(() => {
|
|
2747
|
-
const
|
|
2747
|
+
const $ = m > 0 && setInterval(() => {
|
|
2748
2748
|
x(m - 1);
|
|
2749
2749
|
}, 1e3);
|
|
2750
|
-
return () => clearInterval(
|
|
2750
|
+
return () => clearInterval($);
|
|
2751
2751
|
}, [m]), (0, _.useEffect)(() => {
|
|
2752
|
-
var
|
|
2753
|
-
m == 0 && ((
|
|
2752
|
+
var $;
|
|
2753
|
+
m == 0 && (($ = i.error) === null || $ === void 0 ? void 0 : $.code) == "rate_limit_exceeded" && c((U) => Object.assign(Object.assign({}, U), { error: null }));
|
|
2754
2754
|
}, [m]), (0, _.useEffect)(() => {
|
|
2755
|
-
var
|
|
2756
|
-
((
|
|
2757
|
-
}, [i]), r(C.Fragment, { children: [r(Pe, { children: [r(he, { children: o("headlines.loginPasscode") }), r(Ee, { state: i }), r(W, { children: s.email ? o("texts.enterPasscode", { emailAddress: s.email }) : o("texts.enterPasscodeNoEmail") }), r(oe, Object.assign({ onSubmit: (
|
|
2758
|
-
return
|
|
2759
|
-
}) }, { children: [r(ko, { onInput: (
|
|
2760
|
-
if (A(
|
|
2761
|
-
}, passcodeDigits: O, numberOfInputs: 6, disabled: h <= 0 || S }), r(ne, Object.assign({ disabled: h <= 0 || S, uiAction: "passcode-submit" }, { children: o("labels.continue") }))] }))] }), r(Re, { children: [r(
|
|
2762
|
-
|
|
2755
|
+
var $;
|
|
2756
|
+
(($ = i.error) === null || $ === void 0 ? void 0 : $.code) === "passcode_invalid" && A([]), i.payload.resend_after >= 0 && x(i.payload.resend_after);
|
|
2757
|
+
}, [i]), r(C.Fragment, { children: [r(Pe, { children: [r(he, { children: o("headlines.loginPasscode") }), r(Ee, { state: i }), r(W, { children: s.email ? o("texts.enterPasscode", { emailAddress: s.email }) : o("texts.enterPasscodeNoEmail") }), r(oe, Object.assign({ onSubmit: ($) => Yt(void 0, void 0, void 0, function* () {
|
|
2758
|
+
return $.preventDefault(), P(O.join(""));
|
|
2759
|
+
}) }, { children: [r(ko, { onInput: ($) => {
|
|
2760
|
+
if (A($), $.filter((U) => U !== "").length === 6) return P($.join(""));
|
|
2761
|
+
}, passcodeDigits: O, numberOfInputs: 6, disabled: h <= 0 || S }), r(ne, Object.assign({ disabled: h <= 0 || S, uiAction: "passcode-submit" }, { children: o("labels.continue") }))] }))] }), r(Re, { children: [r(te, Object.assign({ hidden: !(!((t = (e = i.actions).back) === null || t === void 0) && t.call(e, null)), onClick: ($) => Yt(void 0, void 0, void 0, function* () {
|
|
2762
|
+
$.preventDefault(), d("back");
|
|
2763
2763
|
const U = yield i.actions.back(null).run();
|
|
2764
2764
|
d(null), yield a.flow.run(U, u);
|
|
2765
|
-
}), loadingSpinnerPosition: "right", isLoading: s.loadingAction === "back" }, { children: o("labels.back") })), r(
|
|
2766
|
-
|
|
2765
|
+
}), loadingSpinnerPosition: "right", isLoading: s.loadingAction === "back" }, { children: o("labels.back") })), r(te, Object.assign({ uiAction: "passcode-resend", disabled: m > 0, onClick: ($) => Yt(void 0, void 0, void 0, function* () {
|
|
2766
|
+
$.preventDefault(), d("passcode-resend");
|
|
2767
2767
|
const U = yield i.actions.resend_passcode(null).run();
|
|
2768
2768
|
d(null), yield a.flow.run(U, u);
|
|
2769
2769
|
}), loadingSpinnerPosition: "left" }, { children: m > 0 ? o("labels.passcodeResendAfter", { passcodeResendAfter: m }) : o("labels.sendNewPasscode") }))] })] });
|
|
@@ -2793,18 +2793,18 @@ var qn = function(n, e, t, o) {
|
|
|
2793
2793
|
d((o = o.apply(n, [])).next());
|
|
2794
2794
|
});
|
|
2795
2795
|
};
|
|
2796
|
-
const
|
|
2796
|
+
const $r = (n) => {
|
|
2797
2797
|
var e, t, o, i, a, s, c, d;
|
|
2798
2798
|
const { t: l } = (0, _.useContext)(Z.TranslateContext), { hanko: u, setLoadingAction: h, stateHandler: f } = (0, _.useContext)(pe), { flowState: m } = Me(n.state);
|
|
2799
2799
|
return r(C.Fragment, { children: [r(Pe, { children: [r(he, { children: l("headlines.registerAuthenticator") }), r(Ee, { state: m }), r(W, { children: l("texts.setupPasskey") }), r(oe, Object.assign({ onSubmit: (x) => qn(void 0, void 0, void 0, function* () {
|
|
2800
2800
|
x.preventDefault(), h("passkey-submit");
|
|
2801
2801
|
const O = yield m.actions.webauthn_generate_creation_options(null).run();
|
|
2802
2802
|
yield u.flow.run(O, f);
|
|
2803
|
-
}) }, { children: r(ne, Object.assign({ uiAction: "passkey-submit", autofocus: !0, icon: "passkey" }, { children: l("labels.registerAuthenticator") })) }))] }), r(Re, Object.assign({ hidden: !(!((t = (e = m.actions).skip) === null || t === void 0) && t.call(e, null)) && !(!((i = (o = m.actions).back) === null || i === void 0) && i.call(o, null)) }, { children: [r(
|
|
2803
|
+
}) }, { children: r(ne, Object.assign({ uiAction: "passkey-submit", autofocus: !0, icon: "passkey" }, { children: l("labels.registerAuthenticator") })) }))] }), r(Re, Object.assign({ hidden: !(!((t = (e = m.actions).skip) === null || t === void 0) && t.call(e, null)) && !(!((i = (o = m.actions).back) === null || i === void 0) && i.call(o, null)) }, { children: [r(te, Object.assign({ uiAction: "back", onClick: (x) => qn(void 0, void 0, void 0, function* () {
|
|
2804
2804
|
x.preventDefault(), h("back");
|
|
2805
2805
|
const O = yield m.actions.back(null).run();
|
|
2806
2806
|
h(null), yield u.flow.run(O, f);
|
|
2807
|
-
}), loadingSpinnerPosition: "right", hidden: !(!((s = (a = m.actions).back) === null || s === void 0) && s.call(a, null)) }, { children: l("labels.back") })), r(
|
|
2807
|
+
}), loadingSpinnerPosition: "right", hidden: !(!((s = (a = m.actions).back) === null || s === void 0) && s.call(a, null)) }, { children: l("labels.back") })), r(te, Object.assign({ uiAction: "skip", onClick: (x) => qn(void 0, void 0, void 0, function* () {
|
|
2808
2808
|
x.preventDefault(), h("skip");
|
|
2809
2809
|
const O = yield m.actions.skip(null).run();
|
|
2810
2810
|
h(null), yield u.flow.run(O, f);
|
|
@@ -2835,33 +2835,33 @@ var It = function(n, e, t, o) {
|
|
|
2835
2835
|
d((o = o.apply(n, [])).next());
|
|
2836
2836
|
});
|
|
2837
2837
|
};
|
|
2838
|
-
const
|
|
2838
|
+
const jr = (n) => {
|
|
2839
2839
|
var e, t, o, i;
|
|
2840
2840
|
const { t: a } = (0, _.useContext)(Z.TranslateContext), { hanko: s, stateHandler: c, setLoadingAction: d } = (0, _.useContext)(pe), { flowState: l } = Me(n.state), [u, h] = (0, _.useState)(), [f, m] = (0, _.useState)(), x = (P) => It(void 0, void 0, void 0, function* () {
|
|
2841
2841
|
P.preventDefault(), d("password-recovery");
|
|
2842
|
-
const
|
|
2843
|
-
d(null), yield s.flow.run(
|
|
2842
|
+
const $ = yield l.actions.continue_to_passcode_confirmation_recovery(null).run();
|
|
2843
|
+
d(null), yield s.flow.run($, c);
|
|
2844
2844
|
}), O = (P) => It(void 0, void 0, void 0, function* () {
|
|
2845
2845
|
P.preventDefault(), d("choose-login-method");
|
|
2846
|
-
const
|
|
2847
|
-
d(null), yield s.flow.run(
|
|
2846
|
+
const $ = yield l.actions.continue_to_login_method_chooser(null).run();
|
|
2847
|
+
d(null), yield s.flow.run($, c);
|
|
2848
2848
|
}), A = (0, _.useMemo)(() => {
|
|
2849
|
-
var P,
|
|
2850
|
-
return r(
|
|
2851
|
-
}, [x, a]), S = (0, _.useMemo)(() => r(
|
|
2849
|
+
var P, $;
|
|
2850
|
+
return r(te, Object.assign({ hidden: !(!(($ = (P = l.actions).continue_to_passcode_confirmation_recovery) === null || $ === void 0) && $.call(P, null)), uiAction: "password-recovery", onClick: x, loadingSpinnerPosition: "left" }, { children: a("labels.forgotYourPassword") }));
|
|
2851
|
+
}, [x, a]), S = (0, _.useMemo)(() => r(te, Object.assign({ uiAction: "choose-login-method", onClick: O, loadingSpinnerPosition: "left" }, { children: "Choose another method" })), [O]);
|
|
2852
2852
|
return (0, _.useEffect)(() => {
|
|
2853
2853
|
const P = f > 0 && setInterval(() => m(f - 1), 1e3);
|
|
2854
2854
|
return () => clearInterval(P);
|
|
2855
2855
|
}, [f]), r(C.Fragment, { children: [r(Pe, { children: [r(he, { children: a("headlines.loginPassword") }), r(Ee, { state: l }), r(oe, Object.assign({ onSubmit: (P) => It(void 0, void 0, void 0, function* () {
|
|
2856
2856
|
P.preventDefault(), d("password-submit");
|
|
2857
|
-
const
|
|
2858
|
-
d(null), yield s.flow.run(
|
|
2857
|
+
const $ = yield l.actions.password_login({ password: u }).run();
|
|
2858
|
+
d(null), yield s.flow.run($, c);
|
|
2859
2859
|
}) }, { children: [r(Ve, { type: "password", flowInput: l.actions.password_login(null).inputs.password, autocomplete: "current-password", placeholder: a("labels.password"), onInput: (P) => It(void 0, void 0, void 0, function* () {
|
|
2860
2860
|
P.target instanceof HTMLInputElement && h(P.target.value);
|
|
2861
|
-
}), autofocus: !0 }), r(ne, Object.assign({ uiAction: "password-submit", disabled: f > 0 }, { children: f > 0 ? a("labels.passwordRetryAfter", { passwordRetryAfter: f }) : a("labels.signIn") }))] })), !((t = (e = l.actions).continue_to_login_method_chooser) === null || t === void 0) && t.call(e, null) ? A : null] }), r(Re, { children: [r(
|
|
2861
|
+
}), autofocus: !0 }), r(ne, Object.assign({ uiAction: "password-submit", disabled: f > 0 }, { children: f > 0 ? a("labels.passwordRetryAfter", { passwordRetryAfter: f }) : a("labels.signIn") }))] })), !((t = (e = l.actions).continue_to_login_method_chooser) === null || t === void 0) && t.call(e, null) ? A : null] }), r(Re, { children: [r(te, Object.assign({ uiAction: "back", onClick: (P) => It(void 0, void 0, void 0, function* () {
|
|
2862
2862
|
P.preventDefault(), d("back");
|
|
2863
|
-
const
|
|
2864
|
-
d(null), yield s.flow.run(
|
|
2863
|
+
const $ = yield l.actions.back(null).run();
|
|
2864
|
+
d(null), yield s.flow.run($, c);
|
|
2865
2865
|
}), loadingSpinnerPosition: "right" }, { children: a("labels.back") })), !((i = (o = l.actions).continue_to_login_method_chooser) === null || i === void 0) && i.call(o, null) ? S : A] })] });
|
|
2866
2866
|
};
|
|
2867
2867
|
var Jo = function(n, e, t, o) {
|
|
@@ -2889,7 +2889,7 @@ var Jo = function(n, e, t, o) {
|
|
|
2889
2889
|
d((o = o.apply(n, [])).next());
|
|
2890
2890
|
});
|
|
2891
2891
|
};
|
|
2892
|
-
const
|
|
2892
|
+
const Lr = (n) => {
|
|
2893
2893
|
const { t: e } = (0, _.useContext)(Z.TranslateContext), { hanko: t, stateHandler: o, setLoadingAction: i } = (0, _.useContext)(pe), { flowState: a } = Me(n.state), [s, c] = (0, _.useState)();
|
|
2894
2894
|
return r(Pe, { children: [r(he, { children: e("headlines.registerPassword") }), r(Ee, { state: a }), r(W, { children: e("texts.passwordFormatHint", { minLength: a.actions.password_recovery(null).inputs.new_password.min_length, maxLength: 72 }) }), r(oe, Object.assign({ onSubmit: (d) => Jo(void 0, void 0, void 0, function* () {
|
|
2895
2895
|
d.preventDefault(), i("password-submit");
|
|
@@ -2939,7 +2939,7 @@ const Tr = (n) => {
|
|
|
2939
2939
|
m.preventDefault(), l("passkey-submit");
|
|
2940
2940
|
const x = yield f.actions.webauthn_generate_request_options(null).run();
|
|
2941
2941
|
l(null), yield d.flow.run(x, u);
|
|
2942
|
-
}) }, { children: r(ne, Object.assign({ secondary: !0, uiAction: "passkey-submit", icon: "passkey" }, { children: c("labels.passkey") })) }))] }), r(Re, { children: r(
|
|
2942
|
+
}) }, { children: r(ne, Object.assign({ secondary: !0, uiAction: "passkey-submit", icon: "passkey" }, { children: c("labels.passkey") })) }))] }), r(Re, { children: r(te, Object.assign({ uiAction: "back", onClick: (m) => Qt(void 0, void 0, void 0, function* () {
|
|
2943
2943
|
m.preventDefault(), l("back");
|
|
2944
2944
|
const x = yield f.actions.back(null).run();
|
|
2945
2945
|
l(null), yield d.flow.run(x, u);
|
|
@@ -2972,7 +2972,7 @@ var Gt = function(n, e, t, o) {
|
|
|
2972
2972
|
};
|
|
2973
2973
|
const Ur = (n) => {
|
|
2974
2974
|
var e, t, o, i, a, s, c;
|
|
2975
|
-
const { t: d } = (0, _.useContext)(Z.TranslateContext), { init: l, hanko: u, uiState: h, setUIState: f, stateHandler: m, setLoadingAction: x, initialComponentName: O } = (0, _.useContext)(pe), { flowState: A } = Me(n.state), S = (t = (e = A.actions).register_login_identifier) === null || t === void 0 ? void 0 : t.call(e, null).inputs, P = !(!(S != null && S.email) || !(S != null && S.username)), [
|
|
2975
|
+
const { t: d } = (0, _.useContext)(Z.TranslateContext), { init: l, hanko: u, uiState: h, setUIState: f, stateHandler: m, setLoadingAction: x, initialComponentName: O } = (0, _.useContext)(pe), { flowState: A } = Me(n.state), S = (t = (e = A.actions).register_login_identifier) === null || t === void 0 ? void 0 : t.call(e, null).inputs, P = !(!(S != null && S.email) || !(S != null && S.username)), [$, U] = (0, _.useState)(void 0), [N, re] = (0, _.useState)(null), [ke, se] = (0, _.useState)(!1), Se = (0, _.useMemo)(() => {
|
|
2976
2976
|
var M, H;
|
|
2977
2977
|
return !!(!((H = (M = A.actions).thirdparty_oauth) === null || H === void 0) && H.call(M, null));
|
|
2978
2978
|
}, [A.actions]);
|
|
@@ -2983,7 +2983,7 @@ const Ur = (n) => {
|
|
|
2983
2983
|
H = M.get("error") === "access_denied" ? "thirdPartyAccessDenied" : "somethingWentWrong";
|
|
2984
2984
|
const _e = { name: H, code: H, message: M.get("error_description") };
|
|
2985
2985
|
U(_e), M.delete("error"), M.delete("error_description"), history.replaceState(null, null, window.location.pathname + (M.size < 1 ? "" : `?${M.toString()}`));
|
|
2986
|
-
}, []), r(C.Fragment, { children: [r(Pe, { children: [r(he, { children: d("headlines.signUp") }), r(Ee, { state: A, error:
|
|
2986
|
+
}, []), r(C.Fragment, { children: [r(Pe, { children: [r(he, { children: d("headlines.signUp") }), r(Ee, { state: A, error: $ }), S ? r(C.Fragment, { children: [r(oe, Object.assign({ onSubmit: (M) => Gt(void 0, void 0, void 0, function* () {
|
|
2987
2987
|
M.preventDefault(), x("email-submit");
|
|
2988
2988
|
const H = yield A.actions.register_login_identifier({ email: h.email, username: h.username }).run();
|
|
2989
2989
|
x(null), yield u.flow.run(H, m);
|
|
@@ -2997,14 +2997,14 @@ const Ur = (n) => {
|
|
|
2997
2997
|
const { value: H } = M.target;
|
|
2998
2998
|
f((_e) => Object.assign(Object.assign({}, _e), { email: H }));
|
|
2999
2999
|
}
|
|
3000
|
-
}, value: h.email, placeholder: d("labels.email"), pattern: "^.*[^0-9]+$" }) : null, r(ne, Object.assign({ uiAction: "email-submit", autofocus: !0 }, { children: d("labels.continue") }))] })), r(yo, Object.assign({ hidden: !
|
|
3001
|
-
_e.preventDefault(),
|
|
3000
|
+
}, value: h.email, placeholder: d("labels.email"), pattern: "^.*[^0-9]+$" }) : null, r(ne, Object.assign({ uiAction: "email-submit", autofocus: !0 }, { children: d("labels.continue") }))] })), r(yo, Object.assign({ hidden: !Se }, { children: d("labels.or") }))] }) : null, !((i = (o = A.actions).thirdparty_oauth) === null || i === void 0) && i.call(o, null) ? (a = A.actions.thirdparty_oauth(null).inputs.provider.allowed_values) === null || a === void 0 ? void 0 : a.map((M) => r(oe, Object.assign({ onSubmit: (H) => ((_e, Ue) => Gt(void 0, void 0, void 0, function* () {
|
|
3001
|
+
_e.preventDefault(), re(Ue);
|
|
3002
3002
|
const Ie = yield A.actions.thirdparty_oauth({ provider: Ue, redirect_to: window.location.toString() }).run();
|
|
3003
|
-
|
|
3004
|
-
}))(H, M.value) }, { children: r(ne, Object.assign({ isLoading: M.value == N, secondary: !0, icon: M.value.startsWith("custom_") ? "customProvider" : M.value }, { children: d("labels.signInWith", { provider: M.name }) })) }), M.value)) : null, ((c = (s = A.actions).remember_me) === null || c === void 0 ? void 0 : c.call(s, null)) && r(C.Fragment, { children: [r(Pn, {}), r(bo, { required: !1, type: "checkbox", label: d("labels.staySignedIn"), checked:
|
|
3005
|
-
const H = yield A.actions.remember_me({ remember_me: !
|
|
3003
|
+
re(null), yield u.flow.run(Ie, m);
|
|
3004
|
+
}))(H, M.value) }, { children: r(ne, Object.assign({ isLoading: M.value == N, secondary: !0, icon: M.value.startsWith("custom_") ? "customProvider" : M.value }, { children: d("labels.signInWith", { provider: M.name }) })) }), M.value)) : null, ((c = (s = A.actions).remember_me) === null || c === void 0 ? void 0 : c.call(s, null)) && r(C.Fragment, { children: [r(Pn, {}), r(bo, { required: !1, type: "checkbox", label: d("labels.staySignedIn"), checked: ke, onChange: (M) => Gt(void 0, void 0, void 0, function* () {
|
|
3005
|
+
const H = yield A.actions.remember_me({ remember_me: !ke }).run();
|
|
3006
3006
|
se((_e) => !_e), yield u.flow.run(H, m);
|
|
3007
|
-
}) })] })] }), r(Re, Object.assign({ hidden: O !== "auth" }, { children: [r("span", { hidden: !0 }), r(
|
|
3007
|
+
}) })] })] }), r(Re, Object.assign({ hidden: O !== "auth" }, { children: [r("span", { hidden: !0 }), r(te, Object.assign({ uiAction: "switch-flow", onClick: (M) => Gt(void 0, void 0, void 0, function* () {
|
|
3008
3008
|
M.preventDefault(), l("login");
|
|
3009
3009
|
}), loadingSpinnerPosition: "left" }, { children: d("labels.alreadyHaveAnAccount") }))] }))] });
|
|
3010
3010
|
};
|
|
@@ -3042,35 +3042,35 @@ const Nr = (n) => {
|
|
|
3042
3042
|
f(null), yield u.flow.run(S, h);
|
|
3043
3043
|
}) }, { children: [r(Ve, { type: "password", autocomplete: "new-password", flowInput: m.actions.register_password(null).inputs.new_password, placeholder: l("labels.newPassword"), onInput: (A) => Xt(void 0, void 0, void 0, function* () {
|
|
3044
3044
|
A.target instanceof HTMLInputElement && O(A.target.value);
|
|
3045
|
-
}), autofocus: !0 }), r(ne, Object.assign({ uiAction: "password-submit" }, { children: l("labels.continue") }))] }))] }), r(Re, Object.assign({ hidden: !(!((t = (e = m.actions).back) === null || t === void 0) && t.call(e, null)) && !(!((i = (o = m.actions).skip) === null || i === void 0) && i.call(o, null)) }, { children: [r(
|
|
3045
|
+
}), autofocus: !0 }), r(ne, Object.assign({ uiAction: "password-submit" }, { children: l("labels.continue") }))] }))] }), r(Re, Object.assign({ hidden: !(!((t = (e = m.actions).back) === null || t === void 0) && t.call(e, null)) && !(!((i = (o = m.actions).skip) === null || i === void 0) && i.call(o, null)) }, { children: [r(te, Object.assign({ uiAction: "back", onClick: (A) => Xt(void 0, void 0, void 0, function* () {
|
|
3046
3046
|
A.preventDefault(), f("back");
|
|
3047
3047
|
const S = yield m.actions.back(null).run();
|
|
3048
3048
|
f(null), yield u.flow.run(S, h);
|
|
3049
|
-
}), loadingSpinnerPosition: "right", hidden: !(!((s = (a = m.actions).back) === null || s === void 0) && s.call(a, null)) }, { children: l("labels.back") })), r(
|
|
3049
|
+
}), loadingSpinnerPosition: "right", hidden: !(!((s = (a = m.actions).back) === null || s === void 0) && s.call(a, null)) }, { children: l("labels.back") })), r(te, Object.assign({ uiAction: "skip", onClick: (A) => Xt(void 0, void 0, void 0, function* () {
|
|
3050
3050
|
A.preventDefault(), f("skip");
|
|
3051
3051
|
const S = yield m.actions.skip(null).run();
|
|
3052
3052
|
f(null), yield u.flow.run(S, h);
|
|
3053
3053
|
}), loadingSpinnerPosition: "left", hidden: !(!((d = (c = m.actions).skip) === null || d === void 0) && d.call(c, null)) }, { children: l("labels.skip") }))] }))] });
|
|
3054
3054
|
};
|
|
3055
|
-
var mn =
|
|
3055
|
+
var mn = X(21), Dt = {};
|
|
3056
3056
|
Dt.setAttributes = nt(), Dt.insert = (n) => {
|
|
3057
3057
|
window._hankoStyle = n;
|
|
3058
3058
|
}, Dt.domAPI = tt(), Dt.insertStyleElement = ot(), et()(mn.A, Dt);
|
|
3059
|
-
const
|
|
3059
|
+
const Je = mn.A && mn.A.locals ? mn.A.locals : void 0, En = function({ name: n, columnSelector: e, contentSelector: t, data: o, checkedItemID: i, setCheckedItemID: a, dropdown: s = !1 }) {
|
|
3060
3060
|
const c = (0, _.useCallback)((u) => `${n}-${u}`, [n]), d = (0, _.useCallback)((u) => c(u) === i, [i, c]), l = (u) => {
|
|
3061
3061
|
if (!(u.target instanceof HTMLInputElement)) return;
|
|
3062
3062
|
const h = parseInt(u.target.value, 10), f = c(h);
|
|
3063
3063
|
a(f === i ? null : f);
|
|
3064
3064
|
};
|
|
3065
|
-
return r("div", Object.assign({ className:
|
|
3066
|
-
}, ze = ({ children: n }) => r("h2", Object.assign({ part: "headline2", className:
|
|
3065
|
+
return r("div", Object.assign({ className: Je.accordion }, { children: o.map((u, h) => r("div", Object.assign({ className: Je.accordionItem }, { children: [r("input", { type: "radio", className: Je.accordionInput, id: `${n}-${h}`, name: n, onClick: l, value: h, checked: d(h) }), r("label", Object.assign({ className: Q()(Je.label, s && Je.dropdown), for: `${n}-${h}` }, { children: r("span", Object.assign({ className: Je.labelText }, { children: e(u, h) })) })), r("div", Object.assign({ className: Q()(Je.accordionContent, s && Je.dropdownContent) }, { children: t(u, h) }))] }), h)) }));
|
|
3066
|
+
}, ze = ({ children: n }) => r("h2", Object.assign({ part: "headline2", className: Q()(bn.headline, bn.grade2) }, { children: n })), Mr = ({ onEmailDelete: n, onEmailSetPrimary: e, onEmailVerify: t, checkedItemID: o, setCheckedItemID: i, emails: a = [], deletableEmailIDs: s = [] }) => {
|
|
3067
3067
|
const { t: c } = (0, _.useContext)(Z.TranslateContext), d = (0, _.useMemo)(() => !1, []);
|
|
3068
3068
|
return r(En, { name: "email-edit-dropdown", columnSelector: (l) => {
|
|
3069
|
-
const u = r("span", Object.assign({ className:
|
|
3069
|
+
const u = r("span", Object.assign({ className: Je.description }, { children: l.is_verified ? l.is_primary ? r(C.Fragment, { children: [" -", " ", c("labels.primaryEmail")] }) : null : r(C.Fragment, { children: [" -", " ", c("labels.unverifiedEmail")] }) }));
|
|
3070
3070
|
return l.is_primary ? r(C.Fragment, { children: [r("b", { children: l.address }), u] }) : r(C.Fragment, { children: [l.address, u] });
|
|
3071
3071
|
}, data: a, contentSelector: (l) => {
|
|
3072
3072
|
var u;
|
|
3073
|
-
return r(C.Fragment, { children: [l.is_primary ? r(C.Fragment, { children: r(W, { children: [r(ze, { children: c("headlines.isPrimaryEmail") }), c("texts.isPrimaryEmail")] }) }) : r(C.Fragment, { children: r(W, { children: [r(ze, { children: c("headlines.setPrimaryEmail") }), c("texts.setPrimaryEmail"), r("br", {}), r(
|
|
3073
|
+
return r(C.Fragment, { children: [l.is_primary ? r(C.Fragment, { children: r(W, { children: [r(ze, { children: c("headlines.isPrimaryEmail") }), c("texts.isPrimaryEmail")] }) }) : r(C.Fragment, { children: r(W, { children: [r(ze, { children: c("headlines.setPrimaryEmail") }), c("texts.setPrimaryEmail"), r("br", {}), r(te, Object.assign({ uiAction: "email-set-primary", onClick: (h) => e(h, l.id), loadingSpinnerPosition: "right" }, { children: c("labels.setAsPrimaryEmail") }))] }) }), l.is_verified ? r(C.Fragment, { children: r(W, { children: [r(ze, { children: c("headlines.emailVerified") }), c("texts.emailVerified")] }) }) : r(C.Fragment, { children: r(W, { children: [r(ze, { children: c("headlines.emailUnverified") }), c("texts.emailUnverified"), r("br", {}), r(te, Object.assign({ uiAction: "email-verify", onClick: (h) => t(h, l.id), loadingSpinnerPosition: "right" }, { children: c("labels.verify") }))] }) }), s.includes(l.id) ? r(C.Fragment, { children: r(W, { children: [r(ze, { children: c("headlines.emailDelete") }), c("texts.emailDelete"), r("br", {}), r(te, Object.assign({ uiAction: "email-delete", dangerous: !0, onClick: (h) => n(h, l.id), disabled: d, loadingSpinnerPosition: "right" }, { children: c("labels.delete") }))] }) }) : null, ((u = l.identities) === null || u === void 0 ? void 0 : u.length) > 0 ? r(C.Fragment, { children: r(W, { children: [r(ze, { children: c("headlines.connectedAccounts") }), l.identities.map((h) => h.provider).join(", ")] }) }) : null] });
|
|
3074
3074
|
}, checkedItemID: o, setCheckedItemID: i });
|
|
3075
3075
|
}, Rr = ({ onCredentialNameSubmit: n, oldName: e, onBack: t, credential: o, credentialType: i }) => {
|
|
3076
3076
|
const { t: a } = (0, _.useContext)(Z.TranslateContext), [s, c] = (0, _.useState)(e);
|
|
@@ -3081,36 +3081,36 @@ const Ze = mn.A && mn.A.locals ? mn.A.locals : void 0, En = function({ name: n,
|
|
|
3081
3081
|
function O(P) {
|
|
3082
3082
|
try {
|
|
3083
3083
|
S(f.next(P));
|
|
3084
|
-
} catch (
|
|
3085
|
-
x(
|
|
3084
|
+
} catch ($) {
|
|
3085
|
+
x($);
|
|
3086
3086
|
}
|
|
3087
3087
|
}
|
|
3088
3088
|
function A(P) {
|
|
3089
3089
|
try {
|
|
3090
3090
|
S(f.throw(P));
|
|
3091
|
-
} catch (
|
|
3092
|
-
x(
|
|
3091
|
+
} catch ($) {
|
|
3092
|
+
x($);
|
|
3093
3093
|
}
|
|
3094
3094
|
}
|
|
3095
3095
|
function S(P) {
|
|
3096
|
-
var
|
|
3097
|
-
P.done ? m(P.value) : (
|
|
3098
|
-
U(
|
|
3096
|
+
var $;
|
|
3097
|
+
P.done ? m(P.value) : ($ = P.value, $ instanceof h ? $ : new h(function(U) {
|
|
3098
|
+
U($);
|
|
3099
3099
|
})).then(O, A);
|
|
3100
3100
|
}
|
|
3101
3101
|
S((f = f.apply(l, u || [])).next());
|
|
3102
3102
|
});
|
|
3103
3103
|
var l, u, h, f;
|
|
3104
|
-
}, autofocus: !0 }), r(ne, Object.assign({ uiAction: "webauthn-credential-rename" }, { children: a("labels.save") }))] }))] }), r(Re, { children: r(
|
|
3104
|
+
}, autofocus: !0 }), r(ne, Object.assign({ uiAction: "webauthn-credential-rename" }, { children: a("labels.save") }))] }))] }), r(Re, { children: r(te, Object.assign({ onClick: t, loadingSpinnerPosition: "right" }, { children: a("labels.back") })) })] });
|
|
3105
3105
|
}, Yo = ({ credentials: n = [], checkedItemID: e, setCheckedItemID: t, onBack: o, onCredentialNameSubmit: i, onCredentialDelete: a, allowCredentialDeletion: s, credentialType: c }) => {
|
|
3106
3106
|
const { t: d } = (0, _.useContext)(Z.TranslateContext), { setPage: l } = (0, _.useContext)(pe), u = (f) => {
|
|
3107
3107
|
if (f.name) return f.name;
|
|
3108
3108
|
const m = f.public_key.replace(/[\W_]/g, "");
|
|
3109
3109
|
return `${c === "security-key" ? "SecurityKey" : "Passkey"}-${m.substring(m.length - 7, m.length)}`;
|
|
3110
3110
|
}, h = (f) => new Date(f).toLocaleString();
|
|
3111
|
-
return r(En, { name: c === "security-key" ? "security-key-edit-dropdown" : "passkey-edit-dropdown", columnSelector: (f) => u(f), data: n, contentSelector: (f) => r(C.Fragment, { children: [r(W, { children: [r(ze, { children: d(c === "security-key" ? "headlines.renameSecurityKey" : "headlines.renamePasskey") }), d(c === "security-key" ? "texts.renameSecurityKey" : "texts.renamePasskey"), r("br", {}), r(
|
|
3111
|
+
return r(En, { name: c === "security-key" ? "security-key-edit-dropdown" : "passkey-edit-dropdown", columnSelector: (f) => u(f), data: n, contentSelector: (f) => r(C.Fragment, { children: [r(W, { children: [r(ze, { children: d(c === "security-key" ? "headlines.renameSecurityKey" : "headlines.renamePasskey") }), d(c === "security-key" ? "texts.renameSecurityKey" : "texts.renamePasskey"), r("br", {}), r(te, Object.assign({ onClick: (m) => ((x, O, A) => {
|
|
3112
3112
|
x.preventDefault(), l(r(Rr, { oldName: u(O), credential: O, credentialType: A, onBack: o, onCredentialNameSubmit: i }));
|
|
3113
|
-
})(m, f, c), loadingSpinnerPosition: "right" }, { children: d("labels.rename") }))] }), r(W, Object.assign({ hidden: !s }, { children: [r(ze, { children: d(c === "security-key" ? "headlines.deleteSecurityKey" : "headlines.deletePasskey") }), d(c === "security-key" ? "texts.deleteSecurityKey" : "texts.deletePasskey"), r("br", {}), r(
|
|
3113
|
+
})(m, f, c), loadingSpinnerPosition: "right" }, { children: d("labels.rename") }))] }), r(W, Object.assign({ hidden: !s }, { children: [r(ze, { children: d(c === "security-key" ? "headlines.deleteSecurityKey" : "headlines.deletePasskey") }), d(c === "security-key" ? "texts.deleteSecurityKey" : "texts.deletePasskey"), r("br", {}), r(te, Object.assign({ uiAction: "password-delete", dangerous: !0, onClick: (m) => a(m, f.id), loadingSpinnerPosition: "right" }, { children: d("labels.delete") }))] })), r(W, { children: [r(ze, { children: d("headlines.lastUsedAt") }), f.last_used_at ? h(f.last_used_at) : "-"] }), r(W, { children: [r(ze, { children: d("headlines.createdAt") }), h(f.created_at)] })] }), checkedItemID: e, setCheckedItemID: t });
|
|
3114
3114
|
}, Ft = ({ name: n, title: e, children: t, checkedItemID: o, setCheckedItemID: i }) => r(En, { dropdown: !0, name: n, columnSelector: () => e, contentSelector: () => r(C.Fragment, { children: t }), setCheckedItemID: i, checkedItemID: o, data: [{}] }), wo = ({ flowError: n }) => {
|
|
3115
3115
|
const { t: e } = (0, _.useContext)(Z.TranslateContext);
|
|
3116
3116
|
return r(C.Fragment, { children: n ? r("div", Object.assign({ className: Ri.errorMessage }, { children: e(`flowErrors.${n == null ? void 0 : n.code}`) })) : null });
|
|
@@ -3125,7 +3125,7 @@ const Ze = mn.A && mn.A.locals ? mn.A.locals : void 0, En = function({ name: n,
|
|
|
3125
3125
|
const { t: u } = (0, _.useContext)(Z.TranslateContext), [h, f] = (0, _.useState)("");
|
|
3126
3126
|
return r(Ft, Object.assign({ name: "password-edit-dropdown", title: u(s ? "labels.changePassword" : "labels.setPassword"), checkedItemID: e, setCheckedItemID: t }, { children: [r(W, { children: u("texts.passwordFormatHint", { minLength: (c = n.password.min_length) === null || c === void 0 ? void 0 : c.toString(10), maxLength: (d = n.password.max_length) === null || d === void 0 ? void 0 : d.toString(10) }) }), r(wo, { flowError: (l = n.password) === null || l === void 0 ? void 0 : l.error }), r(oe, Object.assign({ onSubmit: (m) => o(m, h).then(() => f("")) }, { children: [r(Ve, { markError: !0, autoComplete: "new-password", placeholder: u("labels.newPassword"), type: "password", onInput: (m) => {
|
|
3127
3127
|
m.preventDefault(), m.target instanceof HTMLInputElement && f(m.target.value);
|
|
3128
|
-
}, value: h, flowInput: n.password }), r(ne, Object.assign({ uiAction: "password-submit" }, { children: u("labels.save") }))] })), r(
|
|
3128
|
+
}, value: h, flowInput: n.password }), r(ne, Object.assign({ uiAction: "password-submit" }, { children: u("labels.save") }))] })), r(te, Object.assign({ hidden: !a, uiAction: "password-delete", dangerous: !0, onClick: (m) => i(m).then(() => f("")), loadingSpinnerPosition: "right" }, { children: u("labels.delete") }))] }));
|
|
3129
3129
|
}, Go = ({ checkedItemID: n, setCheckedItemID: e, onCredentialSubmit: t, credentialType: o }) => {
|
|
3130
3130
|
const { t: i } = (0, _.useContext)(Z.TranslateContext), a = gt.supported();
|
|
3131
3131
|
return r(Ft, Object.assign({ name: o === "security-key" ? "security-key-create-dropdown" : "passkey-create-dropdown", title: i(o === "security-key" ? "labels.createSecurityKey" : "labels.createPasskey"), checkedItemID: n, setCheckedItemID: e }, { children: [r(W, { children: i(o === "security-key" ? "texts.securityKeySetUp" : "texts.setupPasskey") }), r(oe, Object.assign({ onSubmit: t }, { children: r(ne, Object.assign({ uiAction: o === "security-key" ? "security-key-submit" : "passkey-submit", title: a ? null : i("labels.webauthnUnsupported") }, { children: i(o === "security-key" ? "labels.createSecurityKey" : "labels.createPasskey") })) }))] }));
|
|
@@ -3134,21 +3134,21 @@ const Ze = mn.A && mn.A.locals ? mn.A.locals : void 0, En = function({ name: n,
|
|
|
3134
3134
|
const { t: d } = (0, _.useContext)(Z.TranslateContext), [l, u] = (0, _.useState)();
|
|
3135
3135
|
return r(Ft, Object.assign({ name: "username-edit-dropdown", title: d(a ? "labels.changeUsername" : "labels.setUsername"), checkedItemID: e, setCheckedItemID: t }, { children: [r(wo, { flowError: (c = n.username) === null || c === void 0 ? void 0 : c.error }), r(oe, Object.assign({ onSubmit: (h) => o(h, l).then(() => u("")) }, { children: [r(Ve, { markError: !0, placeholder: d("labels.username"), type: "text", onInput: (h) => {
|
|
3136
3136
|
h.preventDefault(), h.target instanceof HTMLInputElement && u(h.target.value);
|
|
3137
|
-
}, value: l, flowInput: n.username }), r(ne, Object.assign({ uiAction: "username-set" }, { children: d("labels.save") }))] })), r(
|
|
3137
|
+
}, value: l, flowInput: n.username }), r(ne, Object.assign({ uiAction: "username-set" }, { children: d("labels.save") }))] })), r(te, Object.assign({ hidden: !s, uiAction: "username-delete", dangerous: !0, onClick: (h) => i(h).then(() => u("")), loadingSpinnerPosition: "right" }, { children: d("labels.delete") }))] }));
|
|
3138
3138
|
}, zr = ({ onBack: n, onAccountDelete: e }) => {
|
|
3139
3139
|
const { t } = (0, _.useContext)(Z.TranslateContext);
|
|
3140
|
-
return r(C.Fragment, { children: [r(Pe, { children: [r(he, { children: t("headlines.deleteAccount") }), r(Ee, { flowError: null }), r(W, { children: t("texts.deleteAccount") }), r(oe, Object.assign({ onSubmit: e }, { children: [r(bo, { required: !0, type: "checkbox", label: t("labels.deleteAccount") }), r(ne, Object.assign({ uiAction: "account_delete" }, { children: t("labels.delete") }))] }))] }), r(Re, { children: r(
|
|
3140
|
+
return r(C.Fragment, { children: [r(Pe, { children: [r(he, { children: t("headlines.deleteAccount") }), r(Ee, { flowError: null }), r(W, { children: t("texts.deleteAccount") }), r(oe, Object.assign({ onSubmit: e }, { children: [r(bo, { required: !0, type: "checkbox", label: t("labels.deleteAccount") }), r(ne, Object.assign({ uiAction: "account_delete" }, { children: t("labels.delete") }))] }))] }), r(Re, { children: r(te, Object.assign({ onClick: n }, { children: t("labels.back") })) })] });
|
|
3141
3141
|
}, Hr = ({ sessions: n = [], checkedItemID: e, setCheckedItemID: t, onSessionDelete: o, deletableSessionIDs: i }) => {
|
|
3142
3142
|
const { t: a } = (0, _.useContext)(Z.TranslateContext), s = (c) => new Date(c).toLocaleString();
|
|
3143
3143
|
return r(En, { name: "session-edit-dropdown", columnSelector: (c) => {
|
|
3144
|
-
const d = r("b", { children: c.user_agent ? c.user_agent : c.id }), l = c.current ? r("span", Object.assign({ className:
|
|
3144
|
+
const d = r("b", { children: c.user_agent ? c.user_agent : c.id }), l = c.current ? r("span", Object.assign({ className: Je.description }, { children: r(C.Fragment, { children: [" -", " ", a("labels.currentSession")] }) })) : null;
|
|
3145
3145
|
return r(C.Fragment, { children: [d, l] });
|
|
3146
|
-
}, data: n, contentSelector: (c) => r(C.Fragment, { children: [r(W, Object.assign({ hidden: !c.ip_address }, { children: [r(ze, { children: a("headlines.ipAddress") }), c.ip_address] })), r(W, { children: [r(ze, { children: a("headlines.lastUsed") }), s(c.last_used)] }), r(W, { children: [r(ze, { children: a("headlines.createdAt") }), s(c.created_at)] }), i != null && i.includes(c.id) ? r(W, { children: [r(ze, { children: a("headlines.revokeSession") }), r(
|
|
3146
|
+
}, data: n, contentSelector: (c) => r(C.Fragment, { children: [r(W, Object.assign({ hidden: !c.ip_address }, { children: [r(ze, { children: a("headlines.ipAddress") }), c.ip_address] })), r(W, { children: [r(ze, { children: a("headlines.lastUsed") }), s(c.last_used)] }), r(W, { children: [r(ze, { children: a("headlines.createdAt") }), s(c.created_at)] }), i != null && i.includes(c.id) ? r(W, { children: [r(ze, { children: a("headlines.revokeSession") }), r(te, Object.assign({ uiAction: "session-delete", dangerous: !0, onClick: (d) => o(d, c.id), loadingSpinnerPosition: "right" }, { children: a("labels.revoke") }))] }) : null] }), checkedItemID: e, setCheckedItemID: t });
|
|
3147
3147
|
}, Wr = ({ checkedItemID: n, setCheckedItemID: e, onDelete: t, onConnect: o, authAppSetUp: i, allowDeletion: a }) => {
|
|
3148
|
-
const { t: s } = (0, _.useContext)(Z.TranslateContext), c = r("span", Object.assign({ className:
|
|
3149
|
-
return r(Ft, Object.assign({ name: "authenticator-app-manage-dropdown", title: d, checkedItemID: n, setCheckedItemID: e }, { children: [r(ze, { children: s(i ? "headlines.authenticatorAppAlreadySetUp" : "headlines.authenticatorAppNotSetUp") }), r(W, { children: [s(i ? "texts.authenticatorAppAlreadySetUp" : "texts.authenticatorAppNotSetUp"), r("br", {}), r(
|
|
3148
|
+
const { t: s } = (0, _.useContext)(Z.TranslateContext), c = r("span", Object.assign({ className: Je.description }, { children: i ? r(C.Fragment, { children: [" -", " ", s("labels.configured")] }) : null })), d = r(C.Fragment, { children: [s("labels.authenticatorAppManage"), " ", c] });
|
|
3149
|
+
return r(Ft, Object.assign({ name: "authenticator-app-manage-dropdown", title: d, checkedItemID: n, setCheckedItemID: e }, { children: [r(ze, { children: s(i ? "headlines.authenticatorAppAlreadySetUp" : "headlines.authenticatorAppNotSetUp") }), r(W, { children: [s(i ? "texts.authenticatorAppAlreadySetUp" : "texts.authenticatorAppNotSetUp"), r("br", {}), r(te, i ? Object.assign({ hidden: !a, uiAction: "auth-app-remove", onClick: (l) => t(l), loadingSpinnerPosition: "right", dangerous: !0 }, { children: s("labels.delete") }) : Object.assign({ uiAction: "auth-app-add", onClick: (l) => o(l), loadingSpinnerPosition: "right" }, { children: s("labels.authenticatorAppAdd") }))] })] }));
|
|
3150
3150
|
};
|
|
3151
|
-
var
|
|
3151
|
+
var $e = function(n, e, t, o) {
|
|
3152
3152
|
return new (t || (t = Promise))(function(i, a) {
|
|
3153
3153
|
function s(l) {
|
|
3154
3154
|
try {
|
|
@@ -3174,51 +3174,51 @@ var je = function(n, e, t, o) {
|
|
|
3174
3174
|
});
|
|
3175
3175
|
};
|
|
3176
3176
|
const qi = (n) => {
|
|
3177
|
-
var e, t, o, i, a, s, c, d, l, u, h, f, m, x, O, A, S, P,
|
|
3178
|
-
const { t:
|
|
3177
|
+
var e, t, o, i, a, s, c, d, l, u, h, f, m, x, O, A, S, P, $, U, N, re, ke, se, Se, M, H, _e, Ue, Ie, Ne, le, ce, me, De, k, p, y, L, K, ge, He, We, Fe, g, v, b, D, T, I, z, ee;
|
|
3178
|
+
const { t: G } = (0, _.useContext)(Z.TranslateContext), { hanko: be, setLoadingAction: w, stateHandler: we, setUIState: J, setPage: R } = (0, _.useContext)(pe), { flowState: E } = Me(n.state), [xe, V] = (0, _.useState)(""), F = (q, B, Qe) => $e(void 0, void 0, void 0, function* () {
|
|
3179
3179
|
q.preventDefault(), w(B);
|
|
3180
3180
|
const In = yield Qe();
|
|
3181
|
-
In != null && In.error || (V(null), yield new Promise((Fi) => setTimeout(Fi, 360))), w(null), yield
|
|
3182
|
-
}), qe = (q) =>
|
|
3181
|
+
In != null && In.error || (V(null), yield new Promise((Fi) => setTimeout(Fi, 360))), w(null), yield be.flow.run(In, we);
|
|
3182
|
+
}), qe = (q) => $e(void 0, void 0, void 0, function* () {
|
|
3183
3183
|
return F(q, "password-delete", E.actions.password_delete(null).run);
|
|
3184
|
-
}), it = (q) =>
|
|
3184
|
+
}), it = (q) => $e(void 0, void 0, void 0, function* () {
|
|
3185
3185
|
return F(q, "username-delete", E.actions.username_delete(null).run);
|
|
3186
|
-
}), fe = (q, B, Qe) =>
|
|
3186
|
+
}), fe = (q, B, Qe) => $e(void 0, void 0, void 0, function* () {
|
|
3187
3187
|
return F(q, "webauthn-credential-rename", E.actions.webauthn_credential_rename({ passkey_id: B, passkey_name: Qe }).run);
|
|
3188
|
-
}), Vt = (q) =>
|
|
3188
|
+
}), Vt = (q) => $e(void 0, void 0, void 0, function* () {
|
|
3189
3189
|
return F(q, "account_delete", E.actions.account_delete(null).run);
|
|
3190
3190
|
}), at = (q) => (q.preventDefault(), R(r(qi, { state: E, enablePasskeys: n.enablePasskeys })), Promise.resolve());
|
|
3191
|
-
return r(Pe, { children: [r(Ee, { state: ((e = E == null ? void 0 : E.error) === null || e === void 0 ? void 0 : e.code) !== "form_data_invalid_error" ? E : null }), !((o = (t = E.actions).username_create) === null || o === void 0) && o.call(t, null) || !((a = (i = E.actions).username_update) === null || a === void 0) && a.call(i, null) || !((c = (s = E.actions).username_delete) === null || c === void 0) && c.call(s, null) ? r(C.Fragment, { children: [r(he, { children:
|
|
3191
|
+
return r(Pe, { children: [r(Ee, { state: ((e = E == null ? void 0 : E.error) === null || e === void 0 ? void 0 : e.code) !== "form_data_invalid_error" ? E : null }), !((o = (t = E.actions).username_create) === null || o === void 0) && o.call(t, null) || !((a = (i = E.actions).username_update) === null || a === void 0) && a.call(i, null) || !((c = (s = E.actions).username_delete) === null || c === void 0) && c.call(s, null) ? r(C.Fragment, { children: [r(he, { children: G("labels.username") }), E.payload.user.username ? r(W, { children: r("b", { children: E.payload.user.username.username }) }) : null, r(W, { children: [!((l = (d = E.actions).username_create) === null || l === void 0) && l.call(d, null) ? r(Xo, { inputs: E.actions.username_create(null).inputs, hasUsername: !!E.payload.user.username, allowUsernameDeletion: !!(!((h = (u = E.actions).username_delete) === null || h === void 0) && h.call(u, null)), onUsernameSubmit: (q, B) => $e(void 0, void 0, void 0, function* () {
|
|
3192
3192
|
return F(q, "username-set", E.actions.username_create({ username: B }).run);
|
|
3193
|
-
}), onUsernameDelete: it, checkedItemID:
|
|
3193
|
+
}), onUsernameDelete: it, checkedItemID: xe, setCheckedItemID: V }) : null, !((m = (f = E.actions).username_update) === null || m === void 0) && m.call(f, null) ? r(Xo, { inputs: E.actions.username_update(null).inputs, hasUsername: !!E.payload.user.username, allowUsernameDeletion: !!(!((O = (x = E.actions).username_delete) === null || O === void 0) && O.call(x, null)), onUsernameSubmit: (q, B) => $e(void 0, void 0, void 0, function* () {
|
|
3194
3194
|
return F(q, "username-set", E.actions.username_update({ username: B }).run);
|
|
3195
|
-
}), onUsernameDelete: it, checkedItemID:
|
|
3195
|
+
}), onUsernameDelete: it, checkedItemID: xe, setCheckedItemID: V }) : null] })] }) : null, !((S = (A = E.payload) === null || A === void 0 ? void 0 : A.user) === null || S === void 0) && S.emails || !(($ = (P = E.actions).email_create) === null || $ === void 0) && $.call(P, null) ? r(C.Fragment, { children: [r(he, { children: G("headlines.profileEmails") }), r(W, { children: [r(Mr, { emails: E.payload.user.emails, onEmailDelete: (q, B) => $e(void 0, void 0, void 0, function* () {
|
|
3196
3196
|
return F(q, "email-delete", E.actions.email_delete({ email_id: B }).run);
|
|
3197
|
-
}), onEmailSetPrimary: (q, B) =>
|
|
3197
|
+
}), onEmailSetPrimary: (q, B) => $e(void 0, void 0, void 0, function* () {
|
|
3198
3198
|
return F(q, "email-set-primary", E.actions.email_set_primary({ email_id: B }).run);
|
|
3199
|
-
}), onEmailVerify: (q, B) =>
|
|
3199
|
+
}), onEmailVerify: (q, B) => $e(void 0, void 0, void 0, function* () {
|
|
3200
3200
|
return F(q, "email-verify", E.actions.email_verify({ email_id: B }).run);
|
|
3201
|
-
}), checkedItemID:
|
|
3201
|
+
}), checkedItemID: xe, setCheckedItemID: V, deletableEmailIDs: (re = (N = (U = E.actions).email_delete) === null || N === void 0 ? void 0 : N.call(U, null).inputs.email_id.allowed_values) === null || re === void 0 ? void 0 : re.map((q) => q.value) }), !((se = (ke = E.actions).email_create) === null || se === void 0) && se.call(ke, null) ? r(qr, { inputs: E.actions.email_create(null).inputs, onEmailSubmit: (q, B) => $e(void 0, void 0, void 0, function* () {
|
|
3202
3202
|
return J((Qe) => Object.assign(Object.assign({}, Qe), { email: B })), F(q, "email-submit", E.actions.email_create({ email: B }).run);
|
|
3203
|
-
}), checkedItemID:
|
|
3203
|
+
}), checkedItemID: xe, setCheckedItemID: V }) : null] })] }) : null, !((M = (Se = E.actions).password_create) === null || M === void 0) && M.call(Se, null) ? r(C.Fragment, { children: [r(he, { children: G("headlines.profilePassword") }), r(W, { children: r(Qo, { inputs: E.actions.password_create(null).inputs, onPasswordSubmit: (q, B) => $e(void 0, void 0, void 0, function* () {
|
|
3204
3204
|
return F(q, "password-submit", E.actions.password_create({ password: B }).run);
|
|
3205
|
-
}), onPasswordDelete: qe, checkedItemID:
|
|
3205
|
+
}), onPasswordDelete: qe, checkedItemID: xe, setCheckedItemID: V }) })] }) : null, !((_e = (H = E.actions).password_update) === null || _e === void 0) && _e.call(H, null) ? r(C.Fragment, { children: [r(he, { children: G("headlines.profilePassword") }), r(W, { children: r(Qo, { allowPasswordDelete: !!(!((Ie = (Ue = E.actions).password_delete) === null || Ie === void 0) && Ie.call(Ue, null)), inputs: E.actions.password_update(null).inputs, onPasswordSubmit: (q, B) => $e(void 0, void 0, void 0, function* () {
|
|
3206
3206
|
return F(q, "password-submit", E.actions.password_update({ password: B }).run);
|
|
3207
|
-
}), onPasswordDelete: qe, checkedItemID:
|
|
3207
|
+
}), onPasswordDelete: qe, checkedItemID: xe, setCheckedItemID: V, passwordExists: !0 }) })] }) : null, n.enablePasskeys && (!((le = (Ne = E.payload) === null || Ne === void 0 ? void 0 : Ne.user) === null || le === void 0) && le.passkeys || !((me = (ce = E.actions).webauthn_credential_create) === null || me === void 0) && me.call(ce, null)) ? r(C.Fragment, { children: [r(he, { children: G("headlines.profilePasskeys") }), r(W, { children: [r(Yo, { onBack: at, onCredentialNameSubmit: fe, onCredentialDelete: (q, B) => $e(void 0, void 0, void 0, function* () {
|
|
3208
3208
|
return F(q, "passkey-delete", E.actions.webauthn_credential_delete({ passkey_id: B }).run);
|
|
3209
|
-
}), credentials: E.payload.user.passkeys, setError: null, checkedItemID:
|
|
3209
|
+
}), credentials: E.payload.user.passkeys, setError: null, checkedItemID: xe, setCheckedItemID: V, allowCredentialDeletion: !!(!((k = (De = E.actions).webauthn_credential_delete) === null || k === void 0) && k.call(De, null)), credentialType: "passkey" }), !((y = (p = E.actions).webauthn_credential_create) === null || y === void 0) && y.call(p, null) ? r(Go, { credentialType: "passkey", onCredentialSubmit: (q) => $e(void 0, void 0, void 0, function* () {
|
|
3210
3210
|
return F(q, "passkey-submit", E.actions.webauthn_credential_create(null).run);
|
|
3211
|
-
}), setError: null, checkedItemID:
|
|
3211
|
+
}), setError: null, checkedItemID: xe, setCheckedItemID: V }) : null] })] }) : null, !((L = E.payload.user.mfa_config) === null || L === void 0) && L.security_keys_enabled ? r(C.Fragment, { children: [r(he, { children: G("headlines.securityKeys") }), r(W, { children: [r(Yo, { onBack: at, onCredentialNameSubmit: fe, onCredentialDelete: (q, B) => $e(void 0, void 0, void 0, function* () {
|
|
3212
3212
|
return F(q, "security-key-delete", E.actions.security_key_delete({ security_key_id: B }).run);
|
|
3213
|
-
}), credentials: E.payload.user.security_keys, setError: null, checkedItemID:
|
|
3213
|
+
}), credentials: E.payload.user.security_keys, setError: null, checkedItemID: xe, setCheckedItemID: V, allowCredentialDeletion: !!(!((ge = (K = E.actions).security_key_delete) === null || ge === void 0) && ge.call(K, null)), credentialType: "security-key" }), !((We = (He = E.actions).security_key_create) === null || We === void 0) && We.call(He, null) ? r(Go, { credentialType: "security-key", onCredentialSubmit: (q) => $e(void 0, void 0, void 0, function* () {
|
|
3214
3214
|
return F(q, "security-key-submit", E.actions.security_key_create(null).run);
|
|
3215
|
-
}), setError: null, checkedItemID:
|
|
3215
|
+
}), setError: null, checkedItemID: xe, setCheckedItemID: V }) : null] })] }) : null, !((Fe = E.payload.user.mfa_config) === null || Fe === void 0) && Fe.totp_enabled ? r(C.Fragment, { children: [r(he, { children: G("headlines.authenticatorApp") }), r(W, { children: r(Wr, { onConnect: (q) => $e(void 0, void 0, void 0, function* () {
|
|
3216
3216
|
return F(q, "auth-app-add", E.actions.continue_to_otp_secret_creation(null).run);
|
|
3217
|
-
}), onDelete: (q) =>
|
|
3217
|
+
}), onDelete: (q) => $e(void 0, void 0, void 0, function* () {
|
|
3218
3218
|
return F(q, "auth-app-remove", E.actions.otp_secret_delete(null).run);
|
|
3219
|
-
}), allowDeletion: !!(!((v = (g = E.actions).otp_secret_delete) === null || v === void 0) && v.call(g, null)), authAppSetUp: (b = E.payload.user.mfa_config) === null || b === void 0 ? void 0 : b.auth_app_set_up, checkedItemID:
|
|
3219
|
+
}), allowDeletion: !!(!((v = (g = E.actions).otp_secret_delete) === null || v === void 0) && v.call(g, null)), authAppSetUp: (b = E.payload.user.mfa_config) === null || b === void 0 ? void 0 : b.auth_app_set_up, checkedItemID: xe, setCheckedItemID: V }) })] }) : null, E.payload.sessions ? r(C.Fragment, { children: [r(he, { children: G("headlines.profileSessions") }), r(W, { children: r(Hr, { sessions: E.payload.sessions, setError: null, checkedItemID: xe, setCheckedItemID: V, onSessionDelete: (q, B) => $e(void 0, void 0, void 0, function* () {
|
|
3220
3220
|
return F(q, "session-delete", E.actions.session_delete({ session_id: B }).run);
|
|
3221
|
-
}), deletableSessionIDs: (I = (T = (D = E.actions).session_delete) === null || T === void 0 ? void 0 : T.call(D, null).inputs.session_id.allowed_values) === null || I === void 0 ? void 0 : I.map((q) => q.value) }) })] }) : null, !((
|
|
3221
|
+
}), deletableSessionIDs: (I = (T = (D = E.actions).session_delete) === null || T === void 0 ? void 0 : T.call(D, null).inputs.session_id.allowed_values) === null || I === void 0 ? void 0 : I.map((q) => q.value) }) })] }) : null, !((ee = (z = E.actions).account_delete) === null || ee === void 0) && ee.call(z, null) ? r(C.Fragment, { children: [r(Pn, {}), r(W, { children: r(yo, {}) }), r(W, { children: r(oe, Object.assign({ onSubmit: (q) => (q.preventDefault(), R(r(zr, { onBack: at, onAccountDelete: Vt })), Promise.resolve()) }, { children: r(ne, Object.assign({ dangerous: !0 }, { children: G("headlines.deleteAccount") })) })) })] }) : null] });
|
|
3222
3222
|
}, Fr = qi, ei = ({ state: n, error: e }) => {
|
|
3223
3223
|
const { t } = (0, _.useContext)(Z.TranslateContext), { init: o, componentName: i } = (0, _.useContext)(pe), a = (0, _.useCallback)(() => o(i), [i, o]);
|
|
3224
3224
|
return (0, _.useEffect)(() => (addEventListener("hankoAuthSuccess", a), () => {
|
|
@@ -3261,7 +3261,7 @@ const Kr = (n) => {
|
|
|
3261
3261
|
d(null), yield s.flow.run(m, c);
|
|
3262
3262
|
}) }, { children: [r(Ve, { type: "email", autoComplete: "email", autoCorrect: "off", flowInput: (t = (e = l.actions).email_address_set) === null || t === void 0 ? void 0 : t.call(e, null).inputs.email, onInput: (f) => zn(void 0, void 0, void 0, function* () {
|
|
3263
3263
|
f.target instanceof HTMLInputElement && h(f.target.value);
|
|
3264
|
-
}), placeholder: a("labels.email"), pattern: "^.*[^0-9]+$", value: u }), r(ne, Object.assign({ uiAction: "email-submit" }, { children: a("labels.continue") }))] }))] }), r(Re, Object.assign({ hidden: !(!((i = (o = l.actions).skip) === null || i === void 0) && i.call(o, null)) }, { children: [r("span", { hidden: !0 }), r(
|
|
3264
|
+
}), placeholder: a("labels.email"), pattern: "^.*[^0-9]+$", value: u }), r(ne, Object.assign({ uiAction: "email-submit" }, { children: a("labels.continue") }))] }))] }), r(Re, Object.assign({ hidden: !(!((i = (o = l.actions).skip) === null || i === void 0) && i.call(o, null)) }, { children: [r("span", { hidden: !0 }), r(te, Object.assign({ uiAction: "skip", onClick: (f) => zn(void 0, void 0, void 0, function* () {
|
|
3265
3265
|
f.preventDefault(), d("skip");
|
|
3266
3266
|
const m = yield l.actions.skip(null).run();
|
|
3267
3267
|
d(null), yield s.flow.run(m, c);
|
|
@@ -3301,7 +3301,7 @@ const Vr = (n) => {
|
|
|
3301
3301
|
d(null), yield s.flow.run(m, c);
|
|
3302
3302
|
}) }, { children: [r(Ve, { type: "text", autoComplete: "username", autoCorrect: "off", flowInput: (t = (e = l.actions).username_create) === null || t === void 0 ? void 0 : t.call(e, null).inputs.username, onInput: (f) => Hn(void 0, void 0, void 0, function* () {
|
|
3303
3303
|
f.target instanceof HTMLInputElement && h(f.target.value);
|
|
3304
|
-
}), value: u, placeholder: a("labels.username") }), r(ne, Object.assign({ uiAction: "username-set" }, { children: a("labels.continue") }))] }))] }), r(Re, Object.assign({ hidden: !(!((i = (o = l.actions).skip) === null || i === void 0) && i.call(o, null)) }, { children: [r("span", { hidden: !0 }), r(
|
|
3304
|
+
}), value: u, placeholder: a("labels.username") }), r(ne, Object.assign({ uiAction: "username-set" }, { children: a("labels.continue") }))] }))] }), r(Re, Object.assign({ hidden: !(!((i = (o = l.actions).skip) === null || i === void 0) && i.call(o, null)) }, { children: [r("span", { hidden: !0 }), r(te, Object.assign({ uiAction: "skip", onClick: (f) => Hn(void 0, void 0, void 0, function* () {
|
|
3305
3305
|
f.preventDefault(), d("skip");
|
|
3306
3306
|
const m = yield l.actions.skip(null).run();
|
|
3307
3307
|
d(null), yield s.flow.run(m, c);
|
|
@@ -3337,20 +3337,20 @@ const Br = (n) => {
|
|
|
3337
3337
|
const { t: m } = (0, _.useContext)(Z.TranslateContext), { hanko: x, setLoadingAction: O, stateHandler: A } = (0, _.useContext)(pe), { flowState: S } = Me(n.state);
|
|
3338
3338
|
return r(C.Fragment, { children: [r(Pe, { children: [r(he, { children: m("headlines.setupLoginMethod") }), r(Ee, { flowError: S == null ? void 0 : S.error }), r(W, { children: m("texts.selectLoginMethodForFutureLogins") }), r(oe, Object.assign({ hidden: !(!((t = (e = S.actions).continue_to_passkey_registration) === null || t === void 0) && t.call(e, null)), onSubmit: (P) => en(void 0, void 0, void 0, function* () {
|
|
3339
3339
|
P.preventDefault(), O("passkey-submit");
|
|
3340
|
-
const
|
|
3341
|
-
O(null), yield x.flow.run(
|
|
3340
|
+
const $ = yield S.actions.continue_to_passkey_registration(null).run();
|
|
3341
|
+
O(null), yield x.flow.run($, A);
|
|
3342
3342
|
}) }, { children: r(ne, Object.assign({ secondary: !0, uiAction: "passkey-submit", icon: "passkey" }, { children: m("labels.passkey") })) })), r(oe, Object.assign({ hidden: !(!((i = (o = S.actions).continue_to_password_registration) === null || i === void 0) && i.call(o, null)), onSubmit: (P) => en(void 0, void 0, void 0, function* () {
|
|
3343
3343
|
P.preventDefault(), O("password-submit");
|
|
3344
|
-
const
|
|
3345
|
-
O(null), yield x.flow.run(
|
|
3346
|
-
}) }, { children: r(ne, Object.assign({ secondary: !0, uiAction: "password-submit", icon: "password" }, { children: m("labels.password") })) }))] }), r(Re, Object.assign({ hidden: !(!((s = (a = S.actions).back) === null || s === void 0) && s.call(a, null)) && !(!((d = (c = S.actions).skip) === null || d === void 0) && d.call(c, null)) }, { children: [r(
|
|
3344
|
+
const $ = yield S.actions.continue_to_password_registration(null).run();
|
|
3345
|
+
O(null), yield x.flow.run($, A);
|
|
3346
|
+
}) }, { children: r(ne, Object.assign({ secondary: !0, uiAction: "password-submit", icon: "password" }, { children: m("labels.password") })) }))] }), r(Re, Object.assign({ hidden: !(!((s = (a = S.actions).back) === null || s === void 0) && s.call(a, null)) && !(!((d = (c = S.actions).skip) === null || d === void 0) && d.call(c, null)) }, { children: [r(te, Object.assign({ uiAction: "back", onClick: (P) => en(void 0, void 0, void 0, function* () {
|
|
3347
3347
|
P.preventDefault(), O("back");
|
|
3348
|
-
const
|
|
3349
|
-
O(null), yield x.flow.run(
|
|
3350
|
-
}), loadingSpinnerPosition: "right", hidden: !(!((u = (l = S.actions).back) === null || u === void 0) && u.call(l, null)) }, { children: m("labels.back") })), r(
|
|
3348
|
+
const $ = yield S.actions.back(null).run();
|
|
3349
|
+
O(null), yield x.flow.run($, A);
|
|
3350
|
+
}), loadingSpinnerPosition: "right", hidden: !(!((u = (l = S.actions).back) === null || u === void 0) && u.call(l, null)) }, { children: m("labels.back") })), r(te, Object.assign({ uiAction: "skip", onClick: (P) => en(void 0, void 0, void 0, function* () {
|
|
3351
3351
|
P.preventDefault(), O("skip");
|
|
3352
|
-
const
|
|
3353
|
-
O(null), yield x.flow.run(
|
|
3352
|
+
const $ = yield S.actions.skip(null).run();
|
|
3353
|
+
O(null), yield x.flow.run($, A);
|
|
3354
3354
|
}), loadingSpinnerPosition: "left", hidden: !(!((f = (h = S.actions).skip) === null || f === void 0) && f.call(h, null)) }, { children: m("labels.skip") }))] }))] });
|
|
3355
3355
|
};
|
|
3356
3356
|
var Wn = function(n, e, t, o) {
|
|
@@ -3392,7 +3392,7 @@ const Zr = (n) => {
|
|
|
3392
3392
|
return m.preventDefault(), f(u.join(""));
|
|
3393
3393
|
}) }, { children: [r(ko, { onInput: (m) => {
|
|
3394
3394
|
if (h(m), m.filter((x) => x !== "").length === 6) return f(m.join(""));
|
|
3395
|
-
}, passcodeDigits: u, numberOfInputs: 6 }), r(ne, Object.assign({ uiAction: "passcode-submit" }, { children: a("labels.continue") }))] }))] }), r(Re, Object.assign({ hidden: !(!((t = (e = s.actions).continue_to_login_security_key) === null || t === void 0) && t.call(e, null)) }, { children: r(
|
|
3395
|
+
}, passcodeDigits: u, numberOfInputs: 6 }), r(ne, Object.assign({ uiAction: "passcode-submit" }, { children: a("labels.continue") }))] }))] }), r(Re, Object.assign({ hidden: !(!((t = (e = s.actions).continue_to_login_security_key) === null || t === void 0) && t.call(e, null)) }, { children: r(te, Object.assign({ uiAction: "skip", onClick: (m) => Wn(void 0, void 0, void 0, function* () {
|
|
3396
3396
|
m.preventDefault(), d("skip");
|
|
3397
3397
|
const x = yield s.actions.continue_to_login_security_key(null).run();
|
|
3398
3398
|
d(null), yield c.flow.run(x, l);
|
|
@@ -3430,7 +3430,7 @@ const Jr = (n) => {
|
|
|
3430
3430
|
u.preventDefault(), c("passkey-submit");
|
|
3431
3431
|
const h = yield l.actions.webauthn_generate_request_options(null).run();
|
|
3432
3432
|
yield s.flow.run(h, d);
|
|
3433
|
-
}) }, { children: r(ne, Object.assign({ uiAction: "passkey-submit", autofocus: !0, icon: "securityKey" }, { children: a("labels.securityKeyUse") })) }))] }), r(Re, Object.assign({ hidden: !(!((t = (e = l.actions).continue_to_login_otp) === null || t === void 0) && t.call(e, null)) }, { children: r(
|
|
3433
|
+
}) }, { children: r(ne, Object.assign({ uiAction: "passkey-submit", autofocus: !0, icon: "securityKey" }, { children: a("labels.securityKeyUse") })) }))] }), r(Re, Object.assign({ hidden: !(!((t = (e = l.actions).continue_to_login_otp) === null || t === void 0) && t.call(e, null)) }, { children: r(te, Object.assign({ uiAction: "skip", onClick: (u) => ti(void 0, void 0, void 0, function* () {
|
|
3434
3434
|
u.preventDefault(), c("skip");
|
|
3435
3435
|
const h = yield l.actions.continue_to_login_otp(null).run();
|
|
3436
3436
|
c(null), yield s.flow.run(h, d);
|
|
@@ -3475,20 +3475,20 @@ const Yr = (n) => {
|
|
|
3475
3475
|
const { actions: S } = m;
|
|
3476
3476
|
return S.continue_to_security_key_creation && !S.continue_to_otp_secret_creation ? x : !S.continue_to_security_key_creation && S.continue_to_otp_secret_creation ? O : void 0;
|
|
3477
3477
|
}, [m, x, O]);
|
|
3478
|
-
return r(C.Fragment, { children: [r(Pe, { children: [r(he, { children: l("headlines.mfaSetUp") }), r(Ee, { flowError: m == null ? void 0 : m.error }), r(W, { children: l("texts.mfaSetUp") }), A ? r(oe, Object.assign({ onSubmit: A }, { children: r(ne, Object.assign({ uiAction: "passcode-submit" }, { children: l("labels.continue") })) })) : r(C.Fragment, { children: [r(oe, Object.assign({ hidden: !(!((t = (e = m.actions).continue_to_security_key_creation) === null || t === void 0) && t.call(e, null)), onSubmit: x }, { children: r(ne, Object.assign({ secondary: !0, uiAction: "passcode-submit", icon: "securityKey" }, { children: l("labels.securityKey") })) })), r(oe, Object.assign({ hidden: !(!((i = (o = m.actions).continue_to_otp_secret_creation) === null || i === void 0) && i.call(o, null)), onSubmit: O }, { children: r(ne, Object.assign({ secondary: !0, uiAction: "password-submit", icon: "qrCodeScanner" }, { children: l("labels.authenticatorApp") })) }))] })] }), r(Re, { children: [r(
|
|
3478
|
+
return r(C.Fragment, { children: [r(Pe, { children: [r(he, { children: l("headlines.mfaSetUp") }), r(Ee, { flowError: m == null ? void 0 : m.error }), r(W, { children: l("texts.mfaSetUp") }), A ? r(oe, Object.assign({ onSubmit: A }, { children: r(ne, Object.assign({ uiAction: "passcode-submit" }, { children: l("labels.continue") })) })) : r(C.Fragment, { children: [r(oe, Object.assign({ hidden: !(!((t = (e = m.actions).continue_to_security_key_creation) === null || t === void 0) && t.call(e, null)), onSubmit: x }, { children: r(ne, Object.assign({ secondary: !0, uiAction: "passcode-submit", icon: "securityKey" }, { children: l("labels.securityKey") })) })), r(oe, Object.assign({ hidden: !(!((i = (o = m.actions).continue_to_otp_secret_creation) === null || i === void 0) && i.call(o, null)), onSubmit: O }, { children: r(ne, Object.assign({ secondary: !0, uiAction: "password-submit", icon: "qrCodeScanner" }, { children: l("labels.authenticatorApp") })) }))] })] }), r(Re, { children: [r(te, Object.assign({ uiAction: "back", onClick: (S) => tn(void 0, void 0, void 0, function* () {
|
|
3479
3479
|
S.preventDefault(), h("back");
|
|
3480
3480
|
const P = yield m.actions.back(null).run();
|
|
3481
3481
|
h(null), yield u.flow.run(P, f);
|
|
3482
|
-
}), loadingSpinnerPosition: "right", hidden: !(!((s = (a = m.actions).back) === null || s === void 0) && s.call(a, null)) }, { children: l("labels.back") })), r(
|
|
3482
|
+
}), loadingSpinnerPosition: "right", hidden: !(!((s = (a = m.actions).back) === null || s === void 0) && s.call(a, null)) }, { children: l("labels.back") })), r(te, Object.assign({ uiAction: "skip", onClick: (S) => tn(void 0, void 0, void 0, function* () {
|
|
3483
3483
|
S.preventDefault(), h("skip");
|
|
3484
3484
|
const P = yield m.actions.skip(null).run();
|
|
3485
3485
|
h(null), yield u.flow.run(P, f);
|
|
3486
3486
|
}), loadingSpinnerPosition: "left", hidden: !(!((d = (c = m.actions).skip) === null || d === void 0) && d.call(c, null)) }, { children: l("labels.skip") }))] })] });
|
|
3487
3487
|
};
|
|
3488
|
-
var gn =
|
|
3489
|
-
|
|
3488
|
+
var gn = X(560), $t = {};
|
|
3489
|
+
$t.setAttributes = nt(), $t.insert = (n) => {
|
|
3490
3490
|
window._hankoStyle = n;
|
|
3491
|
-
},
|
|
3491
|
+
}, $t.domAPI = tt(), $t.insertStyleElement = ot(), et()(gn.A, $t);
|
|
3492
3492
|
const Qr = gn.A && gn.A.locals ? gn.A.locals : void 0, Gr = ({ children: n, text: e }) => {
|
|
3493
3493
|
const { t } = (0, _.useContext)(Z.TranslateContext), [o, i] = (0, _.useState)(!1);
|
|
3494
3494
|
return r("section", Object.assign({ className: zt.clipboardContainer }, { children: [r("div", { children: [n, " "] }), r("div", Object.assign({ className: zt.clipboardIcon, onClick: (a) => {
|
|
@@ -3566,7 +3566,7 @@ const es = (n) => {
|
|
|
3566
3566
|
return u.preventDefault(), l(c.join(""));
|
|
3567
3567
|
}) }, { children: [r(ko, { onInput: (u) => {
|
|
3568
3568
|
if (d(u), u.filter((h) => h !== "").length === 6) return l(u.join(""));
|
|
3569
|
-
}, passcodeDigits: c, numberOfInputs: 6 }), r(ne, Object.assign({ uiAction: "passcode-submit" }, { children: e("labels.continue") }))] }))] }), r(Re, { children: r(
|
|
3569
|
+
}, passcodeDigits: c, numberOfInputs: 6 }), r(ne, Object.assign({ uiAction: "passcode-submit" }, { children: e("labels.continue") }))] }))] }), r(Re, { children: r(te, Object.assign({ onClick: (u) => Fn(void 0, void 0, void 0, function* () {
|
|
3570
3570
|
u.preventDefault(), a("back");
|
|
3571
3571
|
const h = yield t.actions.back(null).run();
|
|
3572
3572
|
a(null), yield o.flow.run(h, s);
|
|
@@ -3604,7 +3604,7 @@ const ts = (n) => {
|
|
|
3604
3604
|
u.preventDefault(), c("passkey-submit");
|
|
3605
3605
|
const h = yield l.actions.webauthn_generate_creation_options(null).run();
|
|
3606
3606
|
yield s.flow.run(h, d);
|
|
3607
|
-
}) }, { children: r(ne, Object.assign({ uiAction: "passkey-submit", autofocus: !0, icon: "securityKey" }, { children: a("labels.createSecurityKey") })) }))] }), r(Re, Object.assign({ hidden: !(!((t = (e = l.actions).back) === null || t === void 0) && t.call(e, null)) }, { children: r(
|
|
3607
|
+
}) }, { children: r(ne, Object.assign({ uiAction: "passkey-submit", autofocus: !0, icon: "securityKey" }, { children: a("labels.createSecurityKey") })) }))] }), r(Re, Object.assign({ hidden: !(!((t = (e = l.actions).back) === null || t === void 0) && t.call(e, null)) }, { children: r(te, Object.assign({ uiAction: "back", onClick: (u) => ni(void 0, void 0, void 0, function* () {
|
|
3608
3608
|
u.preventDefault(), c("back");
|
|
3609
3609
|
const h = yield l.actions.back(null).run();
|
|
3610
3610
|
c(null), yield s.flow.run(h, d);
|
|
@@ -3642,11 +3642,11 @@ const ns = (n) => {
|
|
|
3642
3642
|
u.preventDefault(), c("trust-device-submit");
|
|
3643
3643
|
const h = yield l.actions.trust_device(null).run();
|
|
3644
3644
|
c(null), yield s.flow.run(h, d);
|
|
3645
|
-
}) }, { children: r(ne, Object.assign({ uiAction: "trust-device-submit" }, { children: a("labels.trustDevice") })) }))] }), r(Re, { children: [r(
|
|
3645
|
+
}) }, { children: r(ne, Object.assign({ uiAction: "trust-device-submit" }, { children: a("labels.trustDevice") })) }))] }), r(Re, { children: [r(te, Object.assign({ uiAction: "back", onClick: (u) => Kn(void 0, void 0, void 0, function* () {
|
|
3646
3646
|
u.preventDefault(), c("back");
|
|
3647
3647
|
const h = yield l.actions.back(null).run();
|
|
3648
3648
|
c(null), yield s.flow.run(h, d);
|
|
3649
|
-
}), loadingSpinnerPosition: "right", hidden: !(!((t = (e = l.actions).back) === null || t === void 0) && t.call(e, null)) }, { children: a("labels.back") })), r(
|
|
3649
|
+
}), loadingSpinnerPosition: "right", hidden: !(!((t = (e = l.actions).back) === null || t === void 0) && t.call(e, null)) }, { children: a("labels.back") })), r(te, Object.assign({ uiAction: "skip", onClick: (u) => Kn(void 0, void 0, void 0, function* () {
|
|
3650
3650
|
u.preventDefault(), c("skip");
|
|
3651
3651
|
const h = yield l.actions.skip(null).run();
|
|
3652
3652
|
c(null), yield s.flow.run(h, d);
|
|
@@ -3679,32 +3679,32 @@ var Ke = function(n, e, t, o) {
|
|
|
3679
3679
|
};
|
|
3680
3680
|
const nn = "flow-state", pe = (0, C.createContext)(null), os = (n) => {
|
|
3681
3681
|
var { lang: e, experimental: t = "", prefilledEmail: o, prefilledUsername: i, globalOptions: a, createWebauthnAbortSignal: s } = n, c = function(p, y) {
|
|
3682
|
-
var
|
|
3683
|
-
for (var K in p) Object.prototype.hasOwnProperty.call(p, K) && y.indexOf(K) < 0 && (
|
|
3682
|
+
var L = {};
|
|
3683
|
+
for (var K in p) Object.prototype.hasOwnProperty.call(p, K) && y.indexOf(K) < 0 && (L[K] = p[K]);
|
|
3684
3684
|
if (p != null && typeof Object.getOwnPropertySymbols == "function") {
|
|
3685
3685
|
var ge = 0;
|
|
3686
|
-
for (K = Object.getOwnPropertySymbols(p); ge < K.length; ge++) y.indexOf(K[ge]) < 0 && Object.prototype.propertyIsEnumerable.call(p, K[ge]) && (
|
|
3686
|
+
for (K = Object.getOwnPropertySymbols(p); ge < K.length; ge++) y.indexOf(K[ge]) < 0 && Object.prototype.propertyIsEnumerable.call(p, K[ge]) && (L[K[ge]] = p[K[ge]]);
|
|
3687
3687
|
}
|
|
3688
|
-
return
|
|
3688
|
+
return L;
|
|
3689
3689
|
}(n, ["lang", "experimental", "prefilledEmail", "prefilledUsername", "globalOptions", "createWebauthnAbortSignal"]);
|
|
3690
3690
|
const { hanko: d, injectStyles: l, hidePasskeyButtonOnLogin: u, translations: h, translationsLocation: f, fallbackLanguage: m } = a;
|
|
3691
3691
|
d.setLang((e == null ? void 0 : e.toString()) || m);
|
|
3692
|
-
const x = (0, _.useRef)(null), O = (0, _.useMemo)(() => `${a.storageKey}_last_login`, [a.storageKey]), [A, S] = (0, _.useState)(c.componentName), P = (0, _.useMemo)(() => t.split(" ").filter((p) => p.length).map((p) => p), [t]),
|
|
3692
|
+
const x = (0, _.useRef)(null), O = (0, _.useMemo)(() => `${a.storageKey}_last_login`, [a.storageKey]), [A, S] = (0, _.useState)(c.componentName), P = (0, _.useMemo)(() => t.split(" ").filter((p) => p.length).map((p) => p), [t]), $ = (0, _.useMemo)(() => r(Cr, {}), []), [U, N] = (0, _.useState)($), [, re] = (0, _.useState)(d), [ke, se] = (0, _.useState)(), [Se, M] = (0, _.useState)({ email: o, username: i }), H = (0, _.useCallback)((p) => {
|
|
3693
3693
|
M((y) => Object.assign(Object.assign({}, y), { loadingAction: p, succeededAction: null, error: null, lastAction: p || y.lastAction }));
|
|
3694
3694
|
}, []), _e = (0, _.useCallback)((p) => {
|
|
3695
3695
|
M((y) => Object.assign(Object.assign({}, y), { succeededAction: p, loadingAction: null }));
|
|
3696
3696
|
}, []), Ue = (0, _.useCallback)(() => {
|
|
3697
3697
|
M((p) => Object.assign(Object.assign({}, p), { succeededAction: p.lastAction, loadingAction: null, error: null }));
|
|
3698
|
-
}, []), Ie = (0, _.useMemo)(() => !!
|
|
3699
|
-
var
|
|
3700
|
-
(
|
|
3698
|
+
}, []), Ie = (0, _.useMemo)(() => !!Se.loadingAction || !!Se.succeededAction, [Se]), Ne = function(p, y) {
|
|
3699
|
+
var L;
|
|
3700
|
+
(L = x.current) === null || L === void 0 || L.dispatchEvent(new CustomEvent(p, { detail: y, bubbles: !1, composed: !0 }));
|
|
3701
3701
|
}, le = (p) => {
|
|
3702
|
-
H(null), N(r(ei, { error: p instanceof Ce ? p : new
|
|
3702
|
+
H(null), N(r(ei, { error: p instanceof Ce ? p : new je(p) }));
|
|
3703
3703
|
}, ce = (0, _.useMemo)(() => ({ onError: (p) => {
|
|
3704
3704
|
le(p);
|
|
3705
3705
|
}, preflight(p) {
|
|
3706
3706
|
return Ke(this, void 0, void 0, function* () {
|
|
3707
|
-
const y = yield gt.isConditionalMediationAvailable(),
|
|
3707
|
+
const y = yield gt.isConditionalMediationAvailable(), L = yield gt.isPlatformAuthenticatorAvailable(), K = yield p.actions.register_client_capabilities({ webauthn_available: k, webauthn_conditional_mediation_available: y, webauthn_platform_authenticator_available: L }).run();
|
|
3708
3708
|
return d.flow.run(K, ce);
|
|
3709
3709
|
});
|
|
3710
3710
|
}, login_init(p) {
|
|
@@ -3719,8 +3719,8 @@ const nn = "flow-state", pe = (0, C.createContext)(null), os = (n) => {
|
|
|
3719
3719
|
return;
|
|
3720
3720
|
}
|
|
3721
3721
|
H("passkey-submit");
|
|
3722
|
-
const
|
|
3723
|
-
H(null), yield d.flow.run(
|
|
3722
|
+
const L = yield p.actions.webauthn_verify_assertion_response({ assertion_response: y }).run();
|
|
3723
|
+
H(null), yield d.flow.run(L, ce);
|
|
3724
3724
|
}
|
|
3725
3725
|
});
|
|
3726
3726
|
}();
|
|
@@ -3741,11 +3741,11 @@ const nn = "flow-state", pe = (0, C.createContext)(null), os = (n) => {
|
|
|
3741
3741
|
const ge = yield p.actions.back(null).run();
|
|
3742
3742
|
return M((He) => Object.assign(Object.assign({}, He), { error: p.error, loadingAction: null })), d.flow.run(ge, ce);
|
|
3743
3743
|
}
|
|
3744
|
-
const
|
|
3745
|
-
H(null), yield d.flow.run(
|
|
3744
|
+
const L = yield p.actions.webauthn_verify_assertion_response({ assertion_response: y }).run();
|
|
3745
|
+
H(null), yield d.flow.run(L, ce);
|
|
3746
3746
|
});
|
|
3747
3747
|
}, onboarding_create_passkey(p) {
|
|
3748
|
-
N(r(
|
|
3748
|
+
N(r($r, { state: p }));
|
|
3749
3749
|
}, onboarding_verify_passkey_attestation(p) {
|
|
3750
3750
|
return Ke(this, void 0, void 0, function* () {
|
|
3751
3751
|
let y;
|
|
@@ -3755,8 +3755,8 @@ const nn = "flow-state", pe = (0, C.createContext)(null), os = (n) => {
|
|
|
3755
3755
|
const ge = yield p.actions.back(null).run();
|
|
3756
3756
|
return H(null), yield d.flow.run(ge, ce), void M((He) => Object.assign(Object.assign({}, He), { error: { code: "webauthn_credential_already_exists", message: "Webauthn credential already exists" } }));
|
|
3757
3757
|
}
|
|
3758
|
-
const
|
|
3759
|
-
H(null), yield d.flow.run(
|
|
3758
|
+
const L = yield p.actions.webauthn_verify_attestation_response({ public_key: y }).run();
|
|
3759
|
+
H(null), yield d.flow.run(L, ce);
|
|
3760
3760
|
});
|
|
3761
3761
|
}, webauthn_credential_verification(p) {
|
|
3762
3762
|
return Ke(this, void 0, void 0, function* () {
|
|
@@ -3767,13 +3767,13 @@ const nn = "flow-state", pe = (0, C.createContext)(null), os = (n) => {
|
|
|
3767
3767
|
const ge = yield p.actions.back(null).run();
|
|
3768
3768
|
return H(null), yield d.flow.run(ge, ce), void M((He) => Object.assign(Object.assign({}, He), { error: { code: "webauthn_credential_already_exists", message: "Webauthn credential already exists" } }));
|
|
3769
3769
|
}
|
|
3770
|
-
const
|
|
3771
|
-
yield d.flow.run(
|
|
3770
|
+
const L = yield p.actions.webauthn_verify_attestation_response({ public_key: y }).run();
|
|
3771
|
+
yield d.flow.run(L, ce);
|
|
3772
3772
|
});
|
|
3773
3773
|
}, login_password(p) {
|
|
3774
|
-
N(r(
|
|
3774
|
+
N(r(jr, { state: p }));
|
|
3775
3775
|
}, login_password_recovery(p) {
|
|
3776
|
-
N(r(
|
|
3776
|
+
N(r(Lr, { state: p }));
|
|
3777
3777
|
}, login_security_key(p) {
|
|
3778
3778
|
return Ke(this, void 0, void 0, function* () {
|
|
3779
3779
|
N(r(Jr, { state: p }));
|
|
@@ -3799,17 +3799,17 @@ const nn = "flow-state", pe = (0, C.createContext)(null), os = (n) => {
|
|
|
3799
3799
|
}, success(p) {
|
|
3800
3800
|
var y;
|
|
3801
3801
|
!((y = p.payload) === null || y === void 0) && y.last_login && localStorage.setItem(O, JSON.stringify(p.payload.last_login));
|
|
3802
|
-
const { claims:
|
|
3803
|
-
d.relay.dispatchSessionCreatedEvent({ claims:
|
|
3802
|
+
const { claims: L } = p.payload, K = Date.parse(L.expiration) - Date.now();
|
|
3803
|
+
d.relay.dispatchSessionCreatedEvent({ claims: L, expirationSeconds: K }), Ue();
|
|
3804
3804
|
}, profile_init(p) {
|
|
3805
3805
|
N(r(Fr, { state: p, enablePasskeys: a.enablePasskeys }));
|
|
3806
3806
|
}, thirdparty(p) {
|
|
3807
3807
|
return Ke(this, void 0, void 0, function* () {
|
|
3808
3808
|
const y = new URLSearchParams(window.location.search).get("hanko_token");
|
|
3809
3809
|
if (y && y.length > 0) {
|
|
3810
|
-
const
|
|
3811
|
-
|
|
3812
|
-
} else M((
|
|
3810
|
+
const L = new URLSearchParams(window.location.search), K = yield p.actions.exchange_token({ token: L.get("hanko_token") }).run();
|
|
3811
|
+
L.delete("hanko_token"), L.delete("saml_hint"), history.replaceState(null, null, window.location.pathname + (L.size < 1 ? "" : `?${L.toString()}`)), yield d.flow.run(K, ce);
|
|
3812
|
+
} else M((L) => Object.assign(Object.assign({}, L), { lastAction: null })), localStorage.setItem(nn, JSON.stringify(p.toJSON())), window.location.assign(p.payload.redirect_url);
|
|
3813
3813
|
});
|
|
3814
3814
|
}, error(p) {
|
|
3815
3815
|
H(null), N(r(ei, { state: p }));
|
|
@@ -3829,8 +3829,8 @@ const nn = "flow-state", pe = (0, C.createContext)(null), os = (n) => {
|
|
|
3829
3829
|
H("switch-flow");
|
|
3830
3830
|
const y = localStorage.getItem(O);
|
|
3831
3831
|
y && se(JSON.parse(y));
|
|
3832
|
-
const
|
|
3833
|
-
new URLSearchParams(window.location.search).get("saml_hint") === "idp_initiated" ? yield d.flow.init("/token_exchange", Object.assign({}, ce)) : K && K.length > 0 &&
|
|
3832
|
+
const L = new URLSearchParams(window.location.search).get("hanko_token"), K = localStorage.getItem(nn);
|
|
3833
|
+
new URLSearchParams(window.location.search).get("saml_hint") === "idp_initiated" ? yield d.flow.init("/token_exchange", Object.assign({}, ce)) : K && K.length > 0 && L && L.length > 0 ? (yield d.flow.fromString(localStorage.getItem(nn), Object.assign({}, ce)), localStorage.removeItem(nn)) : yield d.flow.init(p, Object.assign({}, ce)), H(null);
|
|
3834
3834
|
}), [ce]), De = (0, _.useCallback)((p) => {
|
|
3835
3835
|
switch (p) {
|
|
3836
3836
|
case "auth":
|
|
@@ -3861,8 +3861,8 @@ const nn = "flow-state", pe = (0, C.createContext)(null), os = (n) => {
|
|
|
3861
3861
|
["auth", "login", "registration"].includes(A) ? (d.onUserLoggedOut(p), d.onSessionExpired(p), d.onUserDeleted(p)) : A === "profile" && d.onSessionCreated(p);
|
|
3862
3862
|
}, []);
|
|
3863
3863
|
const k = gt.supported();
|
|
3864
|
-
return r(pe.Provider, Object.assign({ value: { init: De, initialComponentName: c.componentName, isDisabled: Ie, setUIState: M, setLoadingAction: H, setSucceededAction: _e, uiState:
|
|
3865
|
-
}, is = { en:
|
|
3864
|
+
return r(pe.Provider, Object.assign({ value: { init: De, initialComponentName: c.componentName, isDisabled: Ie, setUIState: M, setLoadingAction: H, setSucceededAction: _e, uiState: Se, hanko: d, setHanko: re, lang: (e == null ? void 0 : e.toString()) || m, prefilledEmail: o, prefilledUsername: i, componentName: A, setComponentName: S, experimentalFeatures: P, hidePasskeyButtonOnLogin: u, page: U, setPage: N, stateHandler: ce, lastLogin: ke } }, { children: r(Z.TranslateProvider, Object.assign({ translations: h, fallbackLang: m, root: f }, { children: r(sr, Object.assign({ ref: x }, { children: A !== "events" ? r(C.Fragment, { children: [l ? r("style", { dangerouslySetInnerHTML: { __html: window._hankoStyle.innerHTML } }) : null, U] }) : null })) })) }));
|
|
3865
|
+
}, is = { en: X(6).en };
|
|
3866
3866
|
var zi = function(n, e, t, o) {
|
|
3867
3867
|
return new (t || (t = Promise))(function(i, a) {
|
|
3868
3868
|
function s(l) {
|
|
@@ -3890,7 +3890,7 @@ var zi = function(n, e, t, o) {
|
|
|
3890
3890
|
};
|
|
3891
3891
|
const Ge = {}, Kt = (n, e) => r(os, Object.assign({ componentName: n, globalOptions: Ge, createWebauthnAbortSignal: ds }, e)), as = (n) => Kt("auth", n), rs = (n) => Kt("login", n), ss = (n) => Kt("registration", n), ls = (n) => Kt("profile", n), cs = (n) => Kt("events", n);
|
|
3892
3892
|
let on = new AbortController();
|
|
3893
|
-
const ds = () => (on && on.abort(), on = new AbortController(), on.signal),
|
|
3893
|
+
const ds = () => (on && on.abort(), on = new AbortController(), on.signal), jt = ({ tagName: n, entryComponent: e, shadow: t = !0, observedAttributes: o }) => zi(void 0, void 0, void 0, function* () {
|
|
3894
3894
|
customElements.get(n) || function(i, a, s, c) {
|
|
3895
3895
|
function d() {
|
|
3896
3896
|
var l = Reflect.construct(HTMLElement, [], d);
|
|
@@ -3909,40 +3909,40 @@ const ds = () => (on && on.abort(), on = new AbortController(), on.signal), Lt =
|
|
|
3909
3909
|
}(e, n, o, { shadow: t });
|
|
3910
3910
|
}), us = (n, e = {}) => zi(void 0, void 0, void 0, function* () {
|
|
3911
3911
|
const t = ["api", "lang", "experimental", "prefilled-email", "entry"];
|
|
3912
|
-
return e = Object.assign({ shadow: !0, injectStyles: !0, enablePasskeys: !0, hidePasskeyButtonOnLogin: !1, translations: null, translationsLocation: "/i18n", fallbackLanguage: "en", storageKey: "hanko", sessionCheckInterval: 3e4 }, e), Ge.hanko = new Mi(n, { cookieName: e.storageKey, cookieDomain: e.cookieDomain, cookieSameSite: e.cookieSameSite, localStorageKey: e.storageKey, sessionCheckInterval: e.sessionCheckInterval, sessionTokenLocation: e.sessionTokenLocation }), Ge.injectStyles = e.injectStyles, Ge.enablePasskeys = e.enablePasskeys, Ge.hidePasskeyButtonOnLogin = e.hidePasskeyButtonOnLogin, Ge.translations = e.translations || is, Ge.translationsLocation = e.translationsLocation, Ge.fallbackLanguage = e.fallbackLanguage, Ge.storageKey = e.storageKey, yield Promise.all([
|
|
3912
|
+
return e = Object.assign({ shadow: !0, injectStyles: !0, enablePasskeys: !0, hidePasskeyButtonOnLogin: !1, translations: null, translationsLocation: "/i18n", fallbackLanguage: "en", storageKey: "hanko", sessionCheckInterval: 3e4 }, e), Ge.hanko = new Mi(n, { cookieName: e.storageKey, cookieDomain: e.cookieDomain, cookieSameSite: e.cookieSameSite, localStorageKey: e.storageKey, sessionCheckInterval: e.sessionCheckInterval, sessionTokenLocation: e.sessionTokenLocation }), Ge.injectStyles = e.injectStyles, Ge.enablePasskeys = e.enablePasskeys, Ge.hidePasskeyButtonOnLogin = e.hidePasskeyButtonOnLogin, Ge.translations = e.translations || is, Ge.translationsLocation = e.translationsLocation, Ge.fallbackLanguage = e.fallbackLanguage, Ge.storageKey = e.storageKey, yield Promise.all([jt(Object.assign(Object.assign({}, e), { tagName: "hanko-auth", entryComponent: as, observedAttributes: t })), jt(Object.assign(Object.assign({}, e), { tagName: "hanko-login", entryComponent: rs, observedAttributes: t })), jt(Object.assign(Object.assign({}, e), { tagName: "hanko-registration", entryComponent: ss, observedAttributes: t })), jt(Object.assign(Object.assign({}, e), { tagName: "hanko-profile", entryComponent: ls, observedAttributes: t.filter((o) => ["api", "lang"].includes(o)) })), jt(Object.assign(Object.assign({}, e), { tagName: "hanko-events", entryComponent: cs, observedAttributes: [] }))]), { hanko: Ge.hanko };
|
|
3913
3913
|
});
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
var hs =
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
var Hi =
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3914
|
+
ae.fK;
|
|
3915
|
+
ae.tJ;
|
|
3916
|
+
ae.Z7;
|
|
3917
|
+
ae.Q9;
|
|
3918
|
+
ae.Lv;
|
|
3919
|
+
ae.qQ;
|
|
3920
|
+
var hs = ae.I4;
|
|
3921
|
+
ae.O8;
|
|
3922
|
+
ae.ku;
|
|
3923
|
+
ae.ls;
|
|
3924
|
+
ae.bO;
|
|
3925
|
+
ae.yv;
|
|
3926
|
+
ae.AT;
|
|
3927
|
+
ae.m_;
|
|
3928
|
+
ae.KG;
|
|
3929
|
+
ae.DH;
|
|
3930
|
+
ae.kf;
|
|
3931
|
+
ae.oY;
|
|
3932
|
+
ae.xg;
|
|
3933
|
+
ae.Wg;
|
|
3934
|
+
ae.J;
|
|
3935
|
+
ae.AC;
|
|
3936
|
+
ae.D_;
|
|
3937
|
+
ae.jx;
|
|
3938
|
+
ae.nX;
|
|
3939
|
+
ae.Nx;
|
|
3940
|
+
ae.Sd;
|
|
3941
|
+
var Hi = ae.kz;
|
|
3942
|
+
ae.fX;
|
|
3943
|
+
ae.qA;
|
|
3944
|
+
ae.tz;
|
|
3945
|
+
ae.gN;
|
|
3946
3946
|
const ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3947
3947
|
__proto__: null,
|
|
3948
3948
|
Hanko: hs,
|
|
@@ -4093,6 +4093,7 @@ const ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4093
4093
|
font-size: var(--hot-font-size-large);
|
|
4094
4094
|
font-weight: var(--hot-font-weight-bold);
|
|
4095
4095
|
color: var(--hot-color-gray-600);
|
|
4096
|
+
overflow: hidden;
|
|
4096
4097
|
}
|
|
4097
4098
|
|
|
4098
4099
|
.profile-info {
|
|
@@ -4185,6 +4186,15 @@ const ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4185
4186
|
.osm-status-badge.required {
|
|
4186
4187
|
background-color: var(--hot-color-warning-600);
|
|
4187
4188
|
}
|
|
4189
|
+
/* Avatar image — fills the circle, hides the initial letter */
|
|
4190
|
+
.avatar-img {
|
|
4191
|
+
width: 100%;
|
|
4192
|
+
height: 100%;
|
|
4193
|
+
border-radius: 50%;
|
|
4194
|
+
object-fit: cover;
|
|
4195
|
+
display: block;
|
|
4196
|
+
}
|
|
4197
|
+
|
|
4188
4198
|
.header-avatar {
|
|
4189
4199
|
width: var(--hot-spacing-2x-large);
|
|
4190
4200
|
height: var(--hot-spacing-2x-large);
|
|
@@ -4194,6 +4204,7 @@ const ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4194
4204
|
align-items: center;
|
|
4195
4205
|
justify-content: center;
|
|
4196
4206
|
font-size: var(--hot-font-size-small);
|
|
4207
|
+
overflow: hidden;
|
|
4197
4208
|
font-weight: var(--hot-font-weight-semibold);
|
|
4198
4209
|
color: white;
|
|
4199
4210
|
}
|
|
@@ -4214,8 +4225,14 @@ const ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4214
4225
|
display: inline-block;
|
|
4215
4226
|
cursor: pointer;
|
|
4216
4227
|
transition: all 0.2s;
|
|
4217
|
-
font-weight: var(
|
|
4218
|
-
|
|
4228
|
+
font-weight: var(
|
|
4229
|
+
--login-btn-font-weight,
|
|
4230
|
+
var(--font-weight, var(--hot-font-weight-medium))
|
|
4231
|
+
);
|
|
4232
|
+
font-family: var(
|
|
4233
|
+
--login-btn-font-family,
|
|
4234
|
+
var(--font-family, var(--hot-font-sans))
|
|
4235
|
+
);
|
|
4219
4236
|
}
|
|
4220
4237
|
|
|
4221
4238
|
/* Button variants - filled */
|
|
@@ -4440,6 +4457,11 @@ const ps = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4440
4457
|
box-sizing: border-box;
|
|
4441
4458
|
text-decoration: none;
|
|
4442
4459
|
}
|
|
4460
|
+
|
|
4461
|
+
/* Style Hanko's internal link button (e.g. "Create account") */
|
|
4462
|
+
hanko-auth::part(link) {
|
|
4463
|
+
font-weight: bold;
|
|
4464
|
+
}
|
|
4443
4465
|
`;
|
|
4444
4466
|
var Qn = { d: (n, e) => {
|
|
4445
4467
|
for (var t in e) Qn.o(e, t) && !Qn.o(n, t) && Object.defineProperty(n, t, { enumerable: !0, get: e[t] });
|
|
@@ -5073,10 +5095,10 @@ var ws = Object.defineProperty, Ss = Object.getOwnPropertyDescriptor, de = (n, e
|
|
|
5073
5095
|
(s = n[a]) && (i = (o ? s(e, t, i) : s(i)) || i);
|
|
5074
5096
|
return o && i && ws(e, t, i), i;
|
|
5075
5097
|
};
|
|
5076
|
-
let si = !1,
|
|
5098
|
+
let si = !1, Lt = null;
|
|
5077
5099
|
async function xs(n) {
|
|
5078
5100
|
if (!si)
|
|
5079
|
-
return
|
|
5101
|
+
return Lt || (Lt = (async () => {
|
|
5080
5102
|
console.log("[hanko-auth] Pre-registering Hanko translations...");
|
|
5081
5103
|
try {
|
|
5082
5104
|
await Hi(n, {
|
|
@@ -5086,11 +5108,11 @@ async function xs(n) {
|
|
|
5086
5108
|
fallbackLanguage: "en"
|
|
5087
5109
|
}), si = !0, console.log("[hanko-auth] Hanko registration complete");
|
|
5088
5110
|
} catch (e) {
|
|
5089
|
-
throw console.error("[hanko-auth] Hanko registration failed:", e),
|
|
5111
|
+
throw console.error("[hanko-auth] Hanko registration failed:", e), Lt = null, e;
|
|
5090
5112
|
}
|
|
5091
|
-
})(),
|
|
5113
|
+
})(), Lt);
|
|
5092
5114
|
}
|
|
5093
|
-
const
|
|
5115
|
+
const Y = {
|
|
5094
5116
|
primary: null,
|
|
5095
5117
|
// The primary instance that makes API calls
|
|
5096
5118
|
user: null,
|
|
@@ -5102,15 +5124,17 @@ const te = {
|
|
|
5102
5124
|
instances: /* @__PURE__ */ new Set(),
|
|
5103
5125
|
profileDisplayName: "",
|
|
5104
5126
|
// Shared profile display name
|
|
5127
|
+
profilePictureUrl: "",
|
|
5128
|
+
// Shared profile picture URL
|
|
5105
5129
|
hankoReady: !1
|
|
5106
5130
|
// used for translations
|
|
5107
5131
|
}, li = (n) => `hanko-verified-${n}`, ci = (n) => `hanko-onboarding-${n}`;
|
|
5108
|
-
let
|
|
5132
|
+
let ie = class extends Mt {
|
|
5109
5133
|
constructor() {
|
|
5110
|
-
super(...arguments), this.hankoUrlAttr = "", this.basePath = "", this.authPath = "/api/auth/osm", this.osmRequired = !1, this.osmScopes = "read_prefs", this.showProfile = !1, this.redirectAfterLogin = "", this.autoConnect = !1, this.verifySession = !1, this.redirectAfterLogout = "", this.displayNameAttr = "", this.mappingCheckUrl = "", this.appId = "", this.loginUrl = "", this.lang = "en", this.buttonVariant = "plain", this.buttonColor = "primary", this.display = "default", this.user = null, this.osmConnected = !1, this.osmData = null, this.osmLoading = !1, this.loading = !0, this.error = null, this.hankoReady = !1, this.profileDisplayName = "", this.hasAppMapping = !1, this.userProfileLanguage = null, this.isOpen = !1, this.handleOutsideClick = (n) => {
|
|
5134
|
+
super(...arguments), this.hankoUrlAttr = "", this.basePath = "", this.authPath = "/api/auth/osm", this.osmRequired = !1, this.osmScopes = "read_prefs", this.showProfile = !1, this.redirectAfterLogin = "", this.autoConnect = !1, this.verifySession = !1, this.redirectAfterLogout = "", this.displayNameAttr = "", this.mappingCheckUrl = "", this.appId = "", this.loginUrl = "", this.lang = "en", this.buttonVariant = "plain", this.buttonColor = "primary", this.display = "default", this.user = null, this.osmConnected = !1, this.osmData = null, this.osmLoading = !1, this.loading = !0, this.error = null, this.hankoReady = !1, this.profileDisplayName = "", this.profilePictureUrl = "", this.hasAppMapping = !1, this.userProfileLanguage = null, this.isOpen = !1, this.handleOutsideClick = (n) => {
|
|
5111
5135
|
this.contains(n.target) || this.closeDropdown();
|
|
5112
5136
|
}, this._trailingSlashCache = {}, this._debugMode = !1, this._lastSessionId = null, this._hanko = null, this._isPrimary = !1, this._handleVisibilityChange = () => {
|
|
5113
|
-
this._isPrimary && !document.hidden && !this.showProfile && !this.user && (this.log("
|
|
5137
|
+
this._isPrimary && !document.hidden && !this.showProfile && !this.user && (this.log("Page visible, re-checking session..."), this.checkSession());
|
|
5114
5138
|
}, this._handleWindowFocus = () => {
|
|
5115
5139
|
this._isPrimary && !this.showProfile && !this.user && (this.log("🎯 Window focused, re-checking session..."), this.checkSession());
|
|
5116
5140
|
}, this._handleExternalLogin = (n) => {
|
|
@@ -5131,18 +5155,18 @@ let re = class extends Mt {
|
|
|
5131
5155
|
/** Dropdown menu content for bar display mode (no email, only action links) */
|
|
5132
5156
|
renderBarDropdownContent() {
|
|
5133
5157
|
var n;
|
|
5134
|
-
return
|
|
5158
|
+
return ye`
|
|
5135
5159
|
<div class="dropdown-content ${this.isOpen ? "open" : ""}">
|
|
5136
5160
|
<button data-action="profile" @click=${this.handleDropdownSelect}>
|
|
5137
5161
|
<img src="${oi}" class="icon" alt="Account icon" />
|
|
5138
5162
|
${this.t("myHotAccount")}
|
|
5139
5163
|
</button>
|
|
5140
|
-
${this.osmRequired ? this.osmConnected ?
|
|
5164
|
+
${this.osmRequired ? this.osmConnected ? ye`
|
|
5141
5165
|
<button class="osm-connected" disabled>
|
|
5142
5166
|
<img src="${ri}" alt="Check icon" class="icon" />
|
|
5143
5167
|
${this.t("connectedToOsm")} (@${(n = this.osmData) == null ? void 0 : n.osm_username})
|
|
5144
5168
|
</button>
|
|
5145
|
-
` :
|
|
5169
|
+
` : ye`
|
|
5146
5170
|
<button
|
|
5147
5171
|
data-action="connect-osm"
|
|
5148
5172
|
@click=${this.handleDropdownSelect}
|
|
@@ -5178,29 +5202,29 @@ let re = class extends Mt {
|
|
|
5178
5202
|
return this.log("🔍 hanko-url auto-detected from window.location.origin:", e), e;
|
|
5179
5203
|
}
|
|
5180
5204
|
connectedCallback() {
|
|
5181
|
-
super.connectedCallback(), this._debugMode = this._checkDebugMode(), this.log("🔌 hanko-auth connectedCallback called"), this.injectHotStyles(),
|
|
5205
|
+
super.connectedCallback(), this._debugMode = this._checkDebugMode(), this.log("🔌 hanko-auth connectedCallback called"), this.injectHotStyles(), Y.instances.add(this), document.addEventListener("visibilitychange", this._handleVisibilityChange), window.addEventListener("focus", this._handleWindowFocus), document.addEventListener("hanko-login", this._handleExternalLogin);
|
|
5182
5206
|
}
|
|
5183
5207
|
// Use firstUpdated instead of connectedCallback to ensure React props are set
|
|
5184
5208
|
firstUpdated() {
|
|
5185
|
-
this.log("🔌 hanko-auth firstUpdated called"), this.log(" hankoUrl:", this.hankoUrl), this.log(" basePath:", this.basePath),
|
|
5209
|
+
this.log("🔌 hanko-auth firstUpdated called"), this.log(" hankoUrl:", this.hankoUrl), this.log(" basePath:", this.basePath), Y.initialized || Y.primary ? (this.log("Using shared state from primary instance"), this._syncFromShared(), this._isPrimary = !1) : (this.log("This is the primary instance"), this._isPrimary = !0, Y.primary = this, Y.initialized = !0, this.init());
|
|
5186
5210
|
}
|
|
5187
5211
|
disconnectedCallback() {
|
|
5188
5212
|
if (super.disconnectedCallback(), document.removeEventListener(
|
|
5189
5213
|
"visibilitychange",
|
|
5190
5214
|
this._handleVisibilityChange
|
|
5191
|
-
), window.removeEventListener("focus", this._handleWindowFocus), document.removeEventListener("hanko-login", this._handleExternalLogin), document.removeEventListener("click", this.handleOutsideClick),
|
|
5192
|
-
const n =
|
|
5193
|
-
n && (this.log("
|
|
5215
|
+
), window.removeEventListener("focus", this._handleWindowFocus), document.removeEventListener("hanko-login", this._handleExternalLogin), document.removeEventListener("click", this.handleOutsideClick), Y.instances.delete(this), this._isPrimary && Y.instances.size > 0) {
|
|
5216
|
+
const n = Y.instances.values().next().value;
|
|
5217
|
+
n && (this.log("Promoting new primary instance"), n._isPrimary = !0, Y.primary = n);
|
|
5194
5218
|
}
|
|
5195
|
-
|
|
5219
|
+
Y.instances.size === 0 && (Y.initialized = !1, Y.primary = null);
|
|
5196
5220
|
}
|
|
5197
5221
|
// Sync local state from shared state (only if values changed to prevent render loops)
|
|
5198
5222
|
_syncFromShared() {
|
|
5199
|
-
this.user !==
|
|
5223
|
+
this.user !== Y.user && (this.user = Y.user), this.osmConnected !== Y.osmConnected && (this.osmConnected = Y.osmConnected), this.osmData !== Y.osmData && (this.osmData = Y.osmData), this.loading !== Y.loading && (this.loading = Y.loading), this._hanko !== Y.hanko && (this._hanko = Y.hanko), this.profileDisplayName !== Y.profileDisplayName && (this.profileDisplayName = Y.profileDisplayName), this.profilePictureUrl !== Y.profilePictureUrl && (this.profilePictureUrl = Y.profilePictureUrl), this.hankoReady !== Y.hankoReady && (this.hankoReady = Y.hankoReady);
|
|
5200
5224
|
}
|
|
5201
5225
|
// Update shared state and broadcast to all instances
|
|
5202
5226
|
_broadcastState() {
|
|
5203
|
-
|
|
5227
|
+
Y.user = this.user, Y.osmConnected = this.osmConnected, Y.osmData = this.osmData, Y.loading = this.loading, Y.profileDisplayName = this.profileDisplayName, Y.profilePictureUrl = this.profilePictureUrl, Y.hankoReady = this.hankoReady, Y.instances.forEach((n) => {
|
|
5204
5228
|
n !== this && n._syncFromShared();
|
|
5205
5229
|
});
|
|
5206
5230
|
}
|
|
@@ -5216,11 +5240,7 @@ let re = class extends Mt {
|
|
|
5216
5240
|
log(...n) {
|
|
5217
5241
|
this._debugMode && console.log(...n);
|
|
5218
5242
|
}
|
|
5219
|
-
|
|
5220
|
-
* Get translated string for the current language
|
|
5221
|
-
* Falls back to English if translation not found
|
|
5222
|
-
* When user is logged in, uses their profile language instead of the lang prop
|
|
5223
|
-
*/
|
|
5243
|
+
/* Translations */
|
|
5224
5244
|
t(n) {
|
|
5225
5245
|
const e = this.user && this.userProfileLanguage ? this.userProfileLanguage : this.lang;
|
|
5226
5246
|
return (Vn[e] || Vn.en)[n] || Vn.en[n] || n;
|
|
@@ -5270,22 +5290,22 @@ let re = class extends Mt {
|
|
|
5270
5290
|
cookieName: "hanko",
|
|
5271
5291
|
cookieSameSite: "lax"
|
|
5272
5292
|
};
|
|
5273
|
-
this._hanko = new n(this.hankoUrl, a),
|
|
5293
|
+
this._hanko = new n(this.hankoUrl, a), Y.hanko = this._hanko, this._hanko.onSessionExpired(() => {
|
|
5274
5294
|
this.log("🕒 Hanko session expired event received"), this.handleSessionExpired();
|
|
5275
5295
|
}), this._hanko.onUserLoggedOut(() => {
|
|
5276
5296
|
this.log("🚪 Hanko user logged out event received"), this.handleUserLoggedOut();
|
|
5277
|
-
}), await this.checkSession(), this.user && (this.osmRequired && await this.checkOSMConnection(), await this.fetchProfileDisplayName()),
|
|
5297
|
+
}), await this.checkSession(), this.user && (this.osmRequired && await this.checkOSMConnection(), await this.fetchProfileDisplayName()), this.loading = !1, this._broadcastState(), this.setupEventListeners();
|
|
5278
5298
|
} catch (n) {
|
|
5279
5299
|
this.logError("Failed to initialize hanko-auth:", n), this.error = n.message, this.loading = !1, this._broadcastState();
|
|
5280
5300
|
}
|
|
5281
5301
|
}
|
|
5282
5302
|
async checkSession() {
|
|
5283
5303
|
if (this.log("🔍 Checking for existing Hanko session..."), !this._hanko) {
|
|
5284
|
-
this.log("
|
|
5304
|
+
this.log("Hanko instance not initialized yet");
|
|
5285
5305
|
return;
|
|
5286
5306
|
}
|
|
5287
5307
|
try {
|
|
5288
|
-
this.log("
|
|
5308
|
+
this.log("Checking session validity via cookie...");
|
|
5289
5309
|
try {
|
|
5290
5310
|
const n = await fetch(
|
|
5291
5311
|
`${this.hankoUrl}/sessions/validate`,
|
|
@@ -5302,11 +5322,11 @@ let re = class extends Mt {
|
|
|
5302
5322
|
const e = await n.json();
|
|
5303
5323
|
if (e.is_valid === !1) {
|
|
5304
5324
|
this.log(
|
|
5305
|
-
"
|
|
5325
|
+
"Session validation returned is_valid:false - no valid session"
|
|
5306
5326
|
);
|
|
5307
5327
|
return;
|
|
5308
5328
|
}
|
|
5309
|
-
this.log("
|
|
5329
|
+
this.log("Valid Hanko session found via cookie"), this.log("Session data:", e);
|
|
5310
5330
|
try {
|
|
5311
5331
|
const t = await fetch(`${this.hankoUrl}/me`, {
|
|
5312
5332
|
method: "GET",
|
|
@@ -5319,15 +5339,15 @@ let re = class extends Mt {
|
|
|
5319
5339
|
let o = !0;
|
|
5320
5340
|
if (t.ok) {
|
|
5321
5341
|
const i = await t.json();
|
|
5322
|
-
this.log("
|
|
5342
|
+
this.log("User data retrieved from /me:", i), i.email ? (this.user = {
|
|
5323
5343
|
id: i.user_id || i.id,
|
|
5324
5344
|
email: i.email,
|
|
5325
5345
|
username: i.username || null,
|
|
5326
5346
|
emailVerified: i.email_verified || i.verified || !1
|
|
5327
|
-
}, o = !1) : this.log("
|
|
5347
|
+
}, o = !1) : this.log("/me has no email, will use SDK fallback");
|
|
5328
5348
|
}
|
|
5329
5349
|
if (o) {
|
|
5330
|
-
this.log("
|
|
5350
|
+
this.log("Using SDK to get user with email");
|
|
5331
5351
|
const i = await this._hanko.user.getCurrent();
|
|
5332
5352
|
this.user = {
|
|
5333
5353
|
id: i.id,
|
|
@@ -5337,7 +5357,7 @@ let re = class extends Mt {
|
|
|
5337
5357
|
};
|
|
5338
5358
|
}
|
|
5339
5359
|
} catch (t) {
|
|
5340
|
-
this.log("
|
|
5360
|
+
this.log("Failed to get user data:", t), e.user_id && (this.user = {
|
|
5341
5361
|
id: e.user_id,
|
|
5342
5362
|
email: e.email || null,
|
|
5343
5363
|
username: null,
|
|
@@ -5348,7 +5368,7 @@ let re = class extends Mt {
|
|
|
5348
5368
|
const t = li(window.location.hostname), o = sessionStorage.getItem(t);
|
|
5349
5369
|
if (this.verifySession && this.redirectAfterLogin && !o) {
|
|
5350
5370
|
this.log(
|
|
5351
|
-
"
|
|
5371
|
+
"verify-session enabled, redirecting to callback for app verification..."
|
|
5352
5372
|
), sessionStorage.setItem(t, "true"), window.location.href = this.redirectAfterLogin;
|
|
5353
5373
|
return;
|
|
5354
5374
|
}
|
|
@@ -5365,40 +5385,40 @@ let re = class extends Mt {
|
|
|
5365
5385
|
bubbles: !0,
|
|
5366
5386
|
composed: !0
|
|
5367
5387
|
})
|
|
5368
|
-
), this.osmRequired && await this.checkOSMConnection(), await this.fetchProfileDisplayName(), this.osmRequired && this.autoConnect && !this.osmConnected && (this.log("
|
|
5388
|
+
), this.osmRequired && await this.checkOSMConnection(), await this.fetchProfileDisplayName(), this.osmRequired && this.autoConnect && !this.osmConnected && (this.log("Auto-connecting to OSM (from existing session)..."), this.handleOSMConnect());
|
|
5369
5389
|
}
|
|
5370
5390
|
} else
|
|
5371
|
-
this.log("
|
|
5391
|
+
this.log("No valid session cookie found - user needs to login");
|
|
5372
5392
|
} catch (n) {
|
|
5373
|
-
this.log("
|
|
5393
|
+
this.log("Session validation failed:", n), this.log("No valid session - user needs to login");
|
|
5374
5394
|
}
|
|
5375
5395
|
} catch (n) {
|
|
5376
|
-
this.log("
|
|
5396
|
+
this.log("Session check error:", n), this.log("No existing session - user needs to login");
|
|
5377
5397
|
} finally {
|
|
5378
5398
|
this._isPrimary && this._broadcastState();
|
|
5379
5399
|
}
|
|
5380
5400
|
}
|
|
5381
5401
|
async checkOSMConnection() {
|
|
5382
5402
|
if (!this.osmRequired) {
|
|
5383
|
-
this.log("
|
|
5403
|
+
this.log("OSM not required, skipping connection check");
|
|
5384
5404
|
return;
|
|
5385
5405
|
}
|
|
5386
5406
|
if (this.osmConnected) {
|
|
5387
|
-
this.log("
|
|
5407
|
+
this.log("Already connected to OSM, skipping check");
|
|
5388
5408
|
return;
|
|
5389
5409
|
}
|
|
5390
5410
|
const n = this.loading;
|
|
5391
5411
|
n || (this.osmLoading = !0);
|
|
5392
5412
|
try {
|
|
5393
5413
|
const e = this.getBasePath(), t = this.authPath, i = `${`${e}${t}/status`}`;
|
|
5394
|
-
this.log("
|
|
5414
|
+
this.log("Checking OSM connection at:", i), this.log(" basePath:", e), this.log(" authPath:", t), this.log("Current cookies:", document.cookie);
|
|
5395
5415
|
const a = await fetch(i, {
|
|
5396
5416
|
credentials: "include",
|
|
5397
5417
|
redirect: "follow"
|
|
5398
5418
|
});
|
|
5399
|
-
if (this.log("
|
|
5419
|
+
if (this.log("OSM status response:", a.status), this.log("Final URL after redirects:", a.url), this.log("Response headers:", [...a.headers.entries()]), a.ok) {
|
|
5400
5420
|
const s = await a.text();
|
|
5401
|
-
this.log("
|
|
5421
|
+
this.log("OSM raw response:", s.substring(0, 200));
|
|
5402
5422
|
let c;
|
|
5403
5423
|
try {
|
|
5404
5424
|
c = JSON.parse(s);
|
|
@@ -5408,13 +5428,13 @@ let re = class extends Mt {
|
|
|
5408
5428
|
s.substring(0, 500)
|
|
5409
5429
|
), new Error("Invalid JSON response from OSM status endpoint");
|
|
5410
5430
|
}
|
|
5411
|
-
this.log("
|
|
5431
|
+
this.log("OSM status data:", c), c.connected ? (this.log("OSM is connected:", c.osm_username), this.osmConnected = !0, this.osmData = c, this.dispatchEvent(
|
|
5412
5432
|
new CustomEvent("osm-connected", {
|
|
5413
5433
|
detail: { osmData: c },
|
|
5414
5434
|
bubbles: !0,
|
|
5415
5435
|
composed: !0
|
|
5416
5436
|
})
|
|
5417
|
-
)) : (this.log("
|
|
5437
|
+
)) : (this.log("OSM is NOT connected"), this.osmConnected = !1, this.osmData = null);
|
|
5418
5438
|
}
|
|
5419
5439
|
} catch (e) {
|
|
5420
5440
|
this.logError("OSM connection check failed:", e);
|
|
@@ -5429,44 +5449,46 @@ let re = class extends Mt {
|
|
|
5429
5449
|
return !0;
|
|
5430
5450
|
const n = ci(window.location.hostname);
|
|
5431
5451
|
if (sessionStorage.getItem(n))
|
|
5432
|
-
return this.log("
|
|
5433
|
-
this.log("
|
|
5452
|
+
return this.log("Onboarding already completed this session, skipping check"), this.hasAppMapping = !0, !0;
|
|
5453
|
+
this.log("Checking app mapping at:", this.mappingCheckUrl);
|
|
5434
5454
|
try {
|
|
5435
5455
|
const t = await fetch(this.mappingCheckUrl, {
|
|
5436
5456
|
credentials: "include"
|
|
5437
5457
|
});
|
|
5438
5458
|
if (t.ok) {
|
|
5439
5459
|
const o = await t.json();
|
|
5440
|
-
if (this.log("
|
|
5441
|
-
this.log("
|
|
5460
|
+
if (this.log("Mapping check response:", o), o.needs_onboarding) {
|
|
5461
|
+
this.log("User needs onboarding, redirecting...");
|
|
5442
5462
|
const i = encodeURIComponent(window.location.origin), a = this.appId ? `onboarding=${this.appId}` : "";
|
|
5443
5463
|
return window.location.href = `${this.hankoUrl}/app?${a}&return_to=${i}`, !1;
|
|
5444
5464
|
}
|
|
5445
|
-
return sessionStorage.setItem(n, "true"), this.hasAppMapping = !0, this.log("
|
|
5465
|
+
return sessionStorage.setItem(n, "true"), this.hasAppMapping = !0, this.log("User has app mapping, onboarding marked complete"), !0;
|
|
5446
5466
|
} else if (t.status === 401 || t.status === 403) {
|
|
5447
|
-
this.log("
|
|
5467
|
+
this.log("401/403 - User needs onboarding, redirecting...");
|
|
5448
5468
|
const o = encodeURIComponent(window.location.origin), i = this.appId ? `onboarding=${this.appId}` : "";
|
|
5449
5469
|
return window.location.href = `${this.hankoUrl}/app?${i}&return_to=${o}`, !1;
|
|
5450
5470
|
}
|
|
5451
|
-
return this.log("
|
|
5471
|
+
return this.log("Unexpected status from mapping check:", t.status), !0;
|
|
5452
5472
|
} catch (t) {
|
|
5453
|
-
return this.log("
|
|
5473
|
+
return this.log("App mapping check failed:", t), !0;
|
|
5454
5474
|
}
|
|
5455
5475
|
}
|
|
5456
5476
|
// Fetch profile display name and language from login backend
|
|
5457
5477
|
async fetchProfileDisplayName() {
|
|
5458
5478
|
try {
|
|
5459
5479
|
const n = `${this.hankoUrl}/api/profile/me`;
|
|
5460
|
-
this.log("
|
|
5480
|
+
this.log("Fetching profile from:", n);
|
|
5461
5481
|
const e = await fetch(n, {
|
|
5462
5482
|
credentials: "include"
|
|
5463
5483
|
});
|
|
5464
5484
|
if (e.ok) {
|
|
5465
5485
|
const t = await e.json();
|
|
5466
|
-
this.log("
|
|
5486
|
+
this.log("Profile data:", t), (t.first_name || t.last_name) && (this.profileDisplayName = `${t.first_name || ""} ${t.last_name || ""}`.trim(), this.log("Display name set to:", this.profileDisplayName));
|
|
5487
|
+
const o = t.picture_url || t.osm_avatar_url;
|
|
5488
|
+
o && (this.profilePictureUrl = o, this.log("Profile picture set to:", this.profilePictureUrl)), t.language && (this.userProfileLanguage = t.language, this.log("Language set from profile:", this.userProfileLanguage));
|
|
5467
5489
|
}
|
|
5468
5490
|
} catch (n) {
|
|
5469
|
-
this.log("
|
|
5491
|
+
this.log("Could not fetch profile:", n);
|
|
5470
5492
|
}
|
|
5471
5493
|
}
|
|
5472
5494
|
updated(n) {
|
|
@@ -5477,15 +5499,15 @@ let re = class extends Mt {
|
|
|
5477
5499
|
var e;
|
|
5478
5500
|
const n = (e = this.shadowRoot) == null ? void 0 : e.querySelector("hanko-auth");
|
|
5479
5501
|
if (n && n === this._currentHankoAuthElement) {
|
|
5480
|
-
this.log("
|
|
5502
|
+
this.log("Event listeners already attached to this element");
|
|
5481
5503
|
return;
|
|
5482
5504
|
}
|
|
5483
5505
|
n && (this._currentHankoAuthElement = n, this.log("🎯 Attaching event listeners to hanko-auth element"), n.addEventListener("onSessionCreated", (t) => {
|
|
5484
5506
|
var i, a;
|
|
5485
|
-
this.log("
|
|
5507
|
+
this.log("Hanko event: onSessionCreated", t.detail);
|
|
5486
5508
|
const o = (a = (i = t.detail) == null ? void 0 : i.claims) == null ? void 0 : a.session_id;
|
|
5487
5509
|
if (o && this._lastSessionId === o) {
|
|
5488
|
-
this.log("
|
|
5510
|
+
this.log("Skipping duplicate session event");
|
|
5489
5511
|
return;
|
|
5490
5512
|
}
|
|
5491
5513
|
this._lastSessionId = o, this.handleHankoSuccess(t);
|
|
@@ -5514,25 +5536,23 @@ let re = class extends Mt {
|
|
|
5514
5536
|
});
|
|
5515
5537
|
if (clearTimeout(a), s.ok) {
|
|
5516
5538
|
const c = await s.json();
|
|
5517
|
-
this.log("
|
|
5539
|
+
this.log("User data retrieved from /me:", c), c.email ? (this.user = {
|
|
5518
5540
|
id: c.user_id || c.id,
|
|
5519
5541
|
email: c.email,
|
|
5520
5542
|
username: c.username || null,
|
|
5521
5543
|
emailVerified: c.email_verified || c.verified || !1
|
|
5522
|
-
}, e = !0) : this.log("
|
|
5544
|
+
}, e = !0) : this.log("/me has no email, will try SDK fallback");
|
|
5523
5545
|
} else
|
|
5524
|
-
this.log(
|
|
5525
|
-
"⚠️ /me endpoint returned non-OK status, will try SDK fallback"
|
|
5526
|
-
);
|
|
5546
|
+
this.log("/me endpoint returned non-OK status, will try SDK fallback");
|
|
5527
5547
|
} catch (i) {
|
|
5528
5548
|
this.log(
|
|
5529
|
-
"
|
|
5549
|
+
"/me endpoint fetch failed (timeout or cross-origin TLS issue):",
|
|
5530
5550
|
i
|
|
5531
5551
|
);
|
|
5532
5552
|
}
|
|
5533
5553
|
if (!e)
|
|
5534
5554
|
try {
|
|
5535
|
-
this.log("
|
|
5555
|
+
this.log("Trying SDK fallback for user info...");
|
|
5536
5556
|
const i = new Promise(
|
|
5537
5557
|
(s, c) => setTimeout(() => c(new Error("SDK timeout")), 5e3)
|
|
5538
5558
|
), a = await Promise.race([
|
|
@@ -5544,9 +5564,9 @@ let re = class extends Mt {
|
|
|
5544
5564
|
email: a.email,
|
|
5545
5565
|
username: a.username,
|
|
5546
5566
|
emailVerified: a.email_verified || !1
|
|
5547
|
-
}, e = !0, this.log("
|
|
5567
|
+
}, e = !0, this.log("User info retrieved via SDK fallback");
|
|
5548
5568
|
} catch (i) {
|
|
5549
|
-
this.log("
|
|
5569
|
+
this.log("SDK fallback failed, trying JWT claims:", i);
|
|
5550
5570
|
try {
|
|
5551
5571
|
const a = (o = n.detail) == null ? void 0 : o.claims;
|
|
5552
5572
|
if (a != null && a.sub)
|
|
@@ -5555,7 +5575,7 @@ let re = class extends Mt {
|
|
|
5555
5575
|
email: a.email || null,
|
|
5556
5576
|
username: null,
|
|
5557
5577
|
emailVerified: a.email_verified || !1
|
|
5558
|
-
}, e = !0, this.log("
|
|
5578
|
+
}, e = !0, this.log("User info extracted from JWT claims");
|
|
5559
5579
|
else {
|
|
5560
5580
|
this.logError("No user claims available in event"), this.user = null;
|
|
5561
5581
|
return;
|
|
@@ -5568,19 +5588,19 @@ let re = class extends Mt {
|
|
|
5568
5588
|
return;
|
|
5569
5589
|
}
|
|
5570
5590
|
}
|
|
5571
|
-
if (this.log("
|
|
5591
|
+
if (this.log("User state updated:", this.user), this._isPrimary && this._broadcastState(), this.dispatchEvent(
|
|
5572
5592
|
new CustomEvent("hanko-login", {
|
|
5573
5593
|
detail: { user: this.user },
|
|
5574
5594
|
bubbles: !0,
|
|
5575
5595
|
composed: !0
|
|
5576
5596
|
})
|
|
5577
5597
|
), this.osmRequired && await this.checkOSMConnection(), await this.fetchProfileDisplayName(), this.osmRequired && this.autoConnect && !this.osmConnected) {
|
|
5578
|
-
this.log("
|
|
5598
|
+
this.log("Auto-connecting to OSM..."), this.handleOSMConnect();
|
|
5579
5599
|
return;
|
|
5580
5600
|
}
|
|
5581
5601
|
const t = !this.osmRequired || this.osmConnected;
|
|
5582
5602
|
this.log(
|
|
5583
|
-
"
|
|
5603
|
+
"Checking redirect-after-login:",
|
|
5584
5604
|
this.redirectAfterLogin,
|
|
5585
5605
|
"showProfile:",
|
|
5586
5606
|
this.showProfile,
|
|
@@ -5591,11 +5611,11 @@ let re = class extends Mt {
|
|
|
5591
5611
|
bubbles: !0,
|
|
5592
5612
|
composed: !0
|
|
5593
5613
|
})
|
|
5594
|
-
), this.redirectAfterLogin ? (this.log("
|
|
5614
|
+
), this.redirectAfterLogin ? (this.log("Redirecting to:", this.redirectAfterLogin), window.location.href = this.redirectAfterLogin) : this.log("No redirect (redirectAfterLogin not set)")) : this.log("Waiting for OSM connection before redirect");
|
|
5595
5615
|
}
|
|
5596
5616
|
async handleOSMConnect() {
|
|
5597
5617
|
const n = this.osmScopes.split(" ").join("+"), e = this.getBasePath(), t = this.authPath, i = `${`${e}${t}/login`}?scopes=${n}`;
|
|
5598
|
-
this.log("
|
|
5618
|
+
this.log("OSM Connect clicked!"), this.log(" basePath:", e), this.log(" authPath:", t), this.log(" Login path:", i), this.log(" Fetching redirect URL from backend...");
|
|
5599
5619
|
try {
|
|
5600
5620
|
const a = await fetch(i, {
|
|
5601
5621
|
method: "GET",
|
|
@@ -5605,49 +5625,47 @@ let re = class extends Mt {
|
|
|
5605
5625
|
});
|
|
5606
5626
|
if (this.log(" Response status:", a.status), this.log(" Response type:", a.type), a.status === 0 || a.type === "opaqueredirect") {
|
|
5607
5627
|
const s = a.headers.get("Location") || a.url;
|
|
5608
|
-
this.log("
|
|
5628
|
+
this.log("Got redirect URL:", s), window.location.href = s;
|
|
5609
5629
|
} else if (a.status >= 300 && a.status < 400) {
|
|
5610
5630
|
const s = a.headers.get("Location");
|
|
5611
|
-
this.log("
|
|
5631
|
+
this.log("Got redirect URL from header:", s), s && (window.location.href = s);
|
|
5612
5632
|
} else {
|
|
5613
|
-
this.logError("
|
|
5633
|
+
this.logError("Unexpected response:", a.status);
|
|
5614
5634
|
const s = await a.text();
|
|
5615
5635
|
this.logError(" Response body:", s.substring(0, 200));
|
|
5616
5636
|
}
|
|
5617
5637
|
} catch (a) {
|
|
5618
|
-
this.logError("
|
|
5638
|
+
this.logError("Failed to fetch redirect URL:", a);
|
|
5619
5639
|
}
|
|
5620
5640
|
}
|
|
5621
5641
|
async handleLogout() {
|
|
5622
|
-
this.log("
|
|
5642
|
+
this.log("Logout initiated"), this.log("Current state before logout:", {
|
|
5623
5643
|
user: this.user,
|
|
5624
5644
|
osmConnected: this.osmConnected,
|
|
5625
5645
|
osmData: this.osmData
|
|
5626
|
-
}), this.log("
|
|
5646
|
+
}), this.log("Cookies before logout:", document.cookie);
|
|
5627
5647
|
try {
|
|
5628
5648
|
const n = this.getBasePath(), e = this.authPath, t = `${n}${e}/disconnect`, o = t.startsWith("http") ? t : `${window.location.origin}${t}`;
|
|
5629
|
-
this.log("
|
|
5649
|
+
this.log("Calling OSM disconnect:", o);
|
|
5630
5650
|
const i = await fetch(o, {
|
|
5631
5651
|
method: "POST",
|
|
5632
5652
|
credentials: "include"
|
|
5633
5653
|
});
|
|
5634
|
-
this.log("
|
|
5654
|
+
this.log("Disconnect response status:", i.status);
|
|
5635
5655
|
const a = await i.json();
|
|
5636
|
-
this.log("
|
|
5656
|
+
this.log("Disconnect response data:", a), this.log("OSM disconnected");
|
|
5637
5657
|
} catch (n) {
|
|
5638
|
-
this.logError("
|
|
5658
|
+
this.logError("OSM disconnect failed:", n);
|
|
5639
5659
|
}
|
|
5640
5660
|
if (this._hanko)
|
|
5641
5661
|
try {
|
|
5642
|
-
await this._hanko.user.logout(), this.log("
|
|
5662
|
+
await this._hanko.user.logout(), this.log("Hanko logout successful");
|
|
5643
5663
|
} catch (n) {
|
|
5644
5664
|
this.logError("Hanko logout failed:", n);
|
|
5645
5665
|
}
|
|
5646
|
-
if (this._clearAuthState(), this.log(
|
|
5647
|
-
"✅ Logout complete - component will re-render with updated state"
|
|
5648
|
-
), this.redirectAfterLogout) {
|
|
5666
|
+
if (this._clearAuthState(), this.log("Logout complete - component will re-render with updated state"), this.redirectAfterLogout) {
|
|
5649
5667
|
const n = window.location.href.replace(/\/$/, ""), e = this.redirectAfterLogout.replace(/\/$/, "");
|
|
5650
|
-
n !== e && !n.startsWith(e + "#") ? (this.log("
|
|
5668
|
+
n !== e && !n.startsWith(e + "#") ? (this.log("Redirecting after logout to:", this.redirectAfterLogout), window.location.href = this.redirectAfterLogout) : this.log("Already on logout target, skipping redirect");
|
|
5651
5669
|
}
|
|
5652
5670
|
}
|
|
5653
5671
|
/**
|
|
@@ -5655,9 +5673,9 @@ let re = class extends Mt {
|
|
|
5655
5673
|
*/
|
|
5656
5674
|
_clearAuthState() {
|
|
5657
5675
|
const n = window.location.hostname;
|
|
5658
|
-
document.cookie = `hanko=; path=/; domain=${n}; max-age=0`, document.cookie = "hanko=; path=/; max-age=0", document.cookie = `osm_connection=; path=/; domain=${n}; max-age=0`, document.cookie = "osm_connection=; path=/; max-age=0", this.log("
|
|
5676
|
+
document.cookie = `hanko=; path=/; domain=${n}; max-age=0`, document.cookie = "hanko=; path=/; max-age=0", document.cookie = `osm_connection=; path=/; domain=${n}; max-age=0`, document.cookie = "osm_connection=; path=/; max-age=0", this.log("Cookies cleared");
|
|
5659
5677
|
const e = li(n), t = ci(n);
|
|
5660
|
-
sessionStorage.removeItem(e), sessionStorage.removeItem(t), this.log("
|
|
5678
|
+
sessionStorage.removeItem(e), sessionStorage.removeItem(t), this.log("Session flags cleared"), this.user = null, this.osmConnected = !1, this.osmData = null, this.hasAppMapping = !1, this.userProfileLanguage = null, this.profilePictureUrl = "", this._isPrimary && this._broadcastState(), this.dispatchEvent(
|
|
5661
5679
|
new CustomEvent("logout", {
|
|
5662
5680
|
bubbles: !0,
|
|
5663
5681
|
composed: !0
|
|
@@ -5665,46 +5683,46 @@ let re = class extends Mt {
|
|
|
5665
5683
|
);
|
|
5666
5684
|
}
|
|
5667
5685
|
async handleSessionExpired() {
|
|
5668
|
-
if (this.log("
|
|
5686
|
+
if (this.log("Session expired event received"), this.log("Current state:", {
|
|
5669
5687
|
user: this.user,
|
|
5670
5688
|
osmConnected: this.osmConnected,
|
|
5671
5689
|
loading: this.loading
|
|
5672
5690
|
}), this.loading) {
|
|
5673
|
-
this.log("
|
|
5691
|
+
this.log("Still loading, ignoring session expired event during init");
|
|
5674
5692
|
return;
|
|
5675
5693
|
}
|
|
5676
5694
|
if (this.user) {
|
|
5677
|
-
this.log("
|
|
5695
|
+
this.log("User is logged in, ignoring stale session expired event");
|
|
5678
5696
|
return;
|
|
5679
5697
|
}
|
|
5680
|
-
this.log("
|
|
5698
|
+
this.log("No active user - cleaning up state");
|
|
5681
5699
|
try {
|
|
5682
5700
|
const n = this.getBasePath(), e = this.authPath, t = `${n}${e}/disconnect`, o = t.startsWith("http") ? t : `${window.location.origin}${t}`;
|
|
5683
|
-
this.log("
|
|
5701
|
+
this.log("Calling OSM disconnect (session expired):", o);
|
|
5684
5702
|
const i = await fetch(o, {
|
|
5685
5703
|
method: "POST",
|
|
5686
5704
|
credentials: "include"
|
|
5687
5705
|
});
|
|
5688
|
-
this.log("
|
|
5706
|
+
this.log("Disconnect response status:", i.status);
|
|
5689
5707
|
const a = await i.json();
|
|
5690
|
-
this.log("
|
|
5708
|
+
this.log("Disconnect response data:", a), this.log("OSM disconnected");
|
|
5691
5709
|
} catch (n) {
|
|
5692
|
-
this.logError("
|
|
5710
|
+
this.logError("OSM disconnect failed:", n);
|
|
5693
5711
|
}
|
|
5694
|
-
if (this._clearAuthState(), this.log("
|
|
5712
|
+
if (this._clearAuthState(), this.log("Session cleanup complete"), this.redirectAfterLogout) {
|
|
5695
5713
|
const n = window.location.href.replace(/\/$/, ""), e = this.redirectAfterLogout.replace(/\/$/, "");
|
|
5696
5714
|
n !== e && !n.startsWith(e + "#") ? (this.log(
|
|
5697
|
-
"
|
|
5715
|
+
"Redirecting after session expired to:",
|
|
5698
5716
|
this.redirectAfterLogout
|
|
5699
|
-
), window.location.href = this.redirectAfterLogout) : this.log("
|
|
5717
|
+
), window.location.href = this.redirectAfterLogout) : this.log("Already on logout target, skipping redirect");
|
|
5700
5718
|
}
|
|
5701
5719
|
}
|
|
5702
5720
|
handleUserLoggedOut() {
|
|
5703
|
-
this.log("
|
|
5721
|
+
this.log("User logged out in another window/tab"), this.handleSessionExpired();
|
|
5704
5722
|
}
|
|
5705
5723
|
handleDropdownSelect(n) {
|
|
5706
5724
|
const t = n.currentTarget.dataset.action;
|
|
5707
|
-
if (this.log("
|
|
5725
|
+
if (this.log("Dropdown item selected:", t), t === "profile") {
|
|
5708
5726
|
const o = this.hankoUrl, i = this.redirectAfterLogin || window.location.origin;
|
|
5709
5727
|
window.location.href = `${o}/app/profile?return_to=${encodeURIComponent(i)}`;
|
|
5710
5728
|
} else if (t === "connect-osm") {
|
|
@@ -5740,23 +5758,32 @@ let re = class extends Mt {
|
|
|
5740
5758
|
"lang:",
|
|
5741
5759
|
this.lang
|
|
5742
5760
|
), this.loading)
|
|
5743
|
-
return
|
|
5761
|
+
return ye`<span class="loading-placeholder"
|
|
5744
5762
|
><span class="loading-placeholder-text">${this.t("logIn")}</span
|
|
5745
5763
|
><span class="spinner-small"></span
|
|
5746
5764
|
></span>`;
|
|
5747
5765
|
if (this.error)
|
|
5748
|
-
return
|
|
5766
|
+
return ye`
|
|
5749
5767
|
<div class="container">
|
|
5750
5768
|
<div class="error">${this.error}</div>
|
|
5751
5769
|
</div>
|
|
5752
5770
|
`;
|
|
5753
5771
|
if (this.user) {
|
|
5754
5772
|
const o = this.osmRequired && !this.osmConnected && !this.osmLoading, i = this.displayNameAttr || this.profileDisplayName || this.user.username || this.user.email || this.user.id, a = i ? i[0].toUpperCase() : "U";
|
|
5755
|
-
return this.showProfile ?
|
|
5773
|
+
return this.showProfile ? ye`
|
|
5756
5774
|
<div class="container">
|
|
5757
5775
|
<div class="profile">
|
|
5758
5776
|
<div class="profile-header">
|
|
5759
|
-
<div class="profile-avatar"
|
|
5777
|
+
<div class="profile-avatar">
|
|
5778
|
+
${this.profilePictureUrl ? ye`<img
|
|
5779
|
+
class="avatar-img"
|
|
5780
|
+
src="${this.profilePictureUrl}"
|
|
5781
|
+
alt="${a}"
|
|
5782
|
+
@error=${(s) => {
|
|
5783
|
+
s.target.style.display = "none";
|
|
5784
|
+
}}
|
|
5785
|
+
/>` : a}
|
|
5786
|
+
</div>
|
|
5760
5787
|
<div class="profile-info">
|
|
5761
5788
|
<div class="profile-email">
|
|
5762
5789
|
${this.user.email || this.user.id}
|
|
@@ -5764,20 +5791,20 @@ let re = class extends Mt {
|
|
|
5764
5791
|
</div>
|
|
5765
5792
|
</div>
|
|
5766
5793
|
|
|
5767
|
-
${this.osmRequired && this.osmLoading ?
|
|
5794
|
+
${this.osmRequired && this.osmLoading ? ye`
|
|
5768
5795
|
<div class="osm-section">
|
|
5769
5796
|
<div class="loading">
|
|
5770
5797
|
${this.t("checkingOsmConnection")}
|
|
5771
5798
|
</div>
|
|
5772
5799
|
</div>
|
|
5773
|
-
` : this.osmRequired && this.osmConnected ?
|
|
5800
|
+
` : this.osmRequired && this.osmConnected ? ye`
|
|
5774
5801
|
<div class="osm-section">
|
|
5775
5802
|
<div class="osm-connected">
|
|
5776
5803
|
<div class="osm-badge">
|
|
5777
5804
|
<span class="osm-badge-icon">🗺️</span>
|
|
5778
5805
|
<div>
|
|
5779
5806
|
<div>${this.t("connectedToOpenStreetMap")}</div>
|
|
5780
|
-
${(n = this.osmData) != null && n.osm_username ?
|
|
5807
|
+
${(n = this.osmData) != null && n.osm_username ? ye`
|
|
5781
5808
|
<div class="osm-username">
|
|
5782
5809
|
@${this.osmData.osm_username}
|
|
5783
5810
|
</div>
|
|
@@ -5787,16 +5814,16 @@ let re = class extends Mt {
|
|
|
5787
5814
|
</div>
|
|
5788
5815
|
</div>
|
|
5789
5816
|
` : ""}
|
|
5790
|
-
${o ?
|
|
5817
|
+
${o ? ye`
|
|
5791
5818
|
<div class="osm-section">
|
|
5792
|
-
${this.autoConnect ?
|
|
5819
|
+
${this.autoConnect ? ye`
|
|
5793
5820
|
<div class="osm-connecting">
|
|
5794
5821
|
<div class="spinner"></div>
|
|
5795
5822
|
<div class="connecting-text">
|
|
5796
5823
|
🗺️ ${this.t("connectingToOpenStreetMap")}
|
|
5797
5824
|
</div>
|
|
5798
5825
|
</div>
|
|
5799
|
-
` :
|
|
5826
|
+
` : ye`
|
|
5800
5827
|
<div class="osm-prompt-title">
|
|
5801
5828
|
🌍 ${this.t("osmRequired")}
|
|
5802
5829
|
</div>
|
|
@@ -5818,7 +5845,7 @@ let re = class extends Mt {
|
|
|
5818
5845
|
</button>
|
|
5819
5846
|
</div>
|
|
5820
5847
|
</div>
|
|
5821
|
-
` : this.display === "bar" ?
|
|
5848
|
+
` : this.display === "bar" ? ye`
|
|
5822
5849
|
<div class="dropdown">
|
|
5823
5850
|
<button
|
|
5824
5851
|
@click=${this.toggleDropdown}
|
|
@@ -5828,7 +5855,16 @@ let re = class extends Mt {
|
|
|
5828
5855
|
class="bar-trigger"
|
|
5829
5856
|
>
|
|
5830
5857
|
<div class="bar-info">
|
|
5831
|
-
<span class="header-avatar"
|
|
5858
|
+
<span class="header-avatar">
|
|
5859
|
+
${this.profilePictureUrl ? ye`<img
|
|
5860
|
+
class="avatar-img"
|
|
5861
|
+
src="${this.profilePictureUrl}"
|
|
5862
|
+
alt="${a}"
|
|
5863
|
+
@error=${(s) => {
|
|
5864
|
+
s.target.style.display = "none";
|
|
5865
|
+
}}
|
|
5866
|
+
/>` : a}
|
|
5867
|
+
</span>
|
|
5832
5868
|
<span class="bar-email"
|
|
5833
5869
|
>${this.user.email || this.user.id}</span
|
|
5834
5870
|
>
|
|
@@ -5841,7 +5877,7 @@ let re = class extends Mt {
|
|
|
5841
5877
|
</button>
|
|
5842
5878
|
${this.renderBarDropdownContent()}
|
|
5843
5879
|
</div>
|
|
5844
|
-
` :
|
|
5880
|
+
` : ye`
|
|
5845
5881
|
<div class="dropdown">
|
|
5846
5882
|
<button
|
|
5847
5883
|
@click=${this.toggleDropdown}
|
|
@@ -5850,15 +5886,24 @@ let re = class extends Mt {
|
|
|
5850
5886
|
aria-haspopup="true"
|
|
5851
5887
|
class="dropdown-trigger"
|
|
5852
5888
|
>
|
|
5853
|
-
<span class="header-avatar"
|
|
5889
|
+
<span class="header-avatar">
|
|
5890
|
+
${this.profilePictureUrl ? ye`<img
|
|
5891
|
+
class="avatar-img"
|
|
5892
|
+
src="${this.profilePictureUrl}"
|
|
5893
|
+
alt="${a}"
|
|
5894
|
+
@error=${(s) => {
|
|
5895
|
+
s.target.style.display = "none";
|
|
5896
|
+
}}
|
|
5897
|
+
/>` : a}
|
|
5898
|
+
</span>
|
|
5854
5899
|
|
|
5855
|
-
${this.osmConnected ?
|
|
5900
|
+
${this.osmConnected ? ye`
|
|
5856
5901
|
<span
|
|
5857
5902
|
class="osm-status-badge connected"
|
|
5858
5903
|
title="${this.t("connectedToOsmAs")} @${(e = this.osmData) == null ? void 0 : e.osm_username}"
|
|
5859
5904
|
>✓</span
|
|
5860
5905
|
>
|
|
5861
|
-
` : this.osmRequired ?
|
|
5906
|
+
` : this.osmRequired ? ye`
|
|
5862
5907
|
<span
|
|
5863
5908
|
class="osm-status-badge required"
|
|
5864
5909
|
title="${this.t("osmConnectionRequired")}"
|
|
@@ -5876,13 +5921,13 @@ let re = class extends Mt {
|
|
|
5876
5921
|
<img src="${oi}" class="icon" alt="Account icon" />
|
|
5877
5922
|
${this.t("myHotAccount")}
|
|
5878
5923
|
</button>
|
|
5879
|
-
${this.osmRequired ? this.osmConnected ?
|
|
5924
|
+
${this.osmRequired ? this.osmConnected ? ye`
|
|
5880
5925
|
<button class="osm-connected" disabled>
|
|
5881
5926
|
<img src="${ri}" alt="Check icon" class="icon" />
|
|
5882
5927
|
${this.t("connectedToOsm")}
|
|
5883
5928
|
(@${(t = this.osmData) == null ? void 0 : t.osm_username})
|
|
5884
5929
|
</button>
|
|
5885
|
-
` :
|
|
5930
|
+
` : ye`
|
|
5886
5931
|
<button
|
|
5887
5932
|
data-action="connect-osm"
|
|
5888
5933
|
@click=${this.handleDropdownSelect}
|
|
@@ -5900,7 +5945,7 @@ let re = class extends Mt {
|
|
|
5900
5945
|
`;
|
|
5901
5946
|
} else {
|
|
5902
5947
|
if (this.showProfile)
|
|
5903
|
-
return this.hankoReady ?
|
|
5948
|
+
return this.hankoReady ? ye`
|
|
5904
5949
|
<div
|
|
5905
5950
|
class="container"
|
|
5906
5951
|
style="
|
|
@@ -5927,12 +5972,12 @@ let re = class extends Mt {
|
|
|
5927
5972
|
>
|
|
5928
5973
|
${_a(
|
|
5929
5974
|
this.lang,
|
|
5930
|
-
|
|
5975
|
+
ye`<hanko-auth lang="${this.lang}"></hanko-auth>`
|
|
5931
5976
|
)}
|
|
5932
5977
|
</div>
|
|
5933
5978
|
` : (this.log(
|
|
5934
5979
|
"⏳ Waiting for Hanko registration before rendering form..."
|
|
5935
|
-
),
|
|
5980
|
+
), ye`<span class="loading-placeholder"
|
|
5936
5981
|
><span class="loading-placeholder-text">${this.t("logIn")}</span
|
|
5937
5982
|
><span class="spinner-small"></span
|
|
5938
5983
|
></span>`);
|
|
@@ -5942,7 +5987,7 @@ let re = class extends Mt {
|
|
|
5942
5987
|
const u = `${this.loginUrl || `${d}/app`}?return_to=${encodeURIComponent(
|
|
5943
5988
|
a
|
|
5944
5989
|
)}${this.osmRequired ? "&osm_required=true" : ""}${c}&lang=${this.lang}`;
|
|
5945
|
-
return
|
|
5990
|
+
return ye`<a
|
|
5946
5991
|
class="login-link ${this.buttonVariant} ${this.buttonColor}"
|
|
5947
5992
|
href="${u}"
|
|
5948
5993
|
@click=${(h) => {
|
|
@@ -5954,99 +5999,102 @@ let re = class extends Mt {
|
|
|
5954
5999
|
}
|
|
5955
6000
|
}
|
|
5956
6001
|
};
|
|
5957
|
-
|
|
6002
|
+
ie.styles = ms;
|
|
5958
6003
|
de([
|
|
5959
6004
|
Te({ type: String, attribute: "hanko-url" })
|
|
5960
|
-
],
|
|
6005
|
+
], ie.prototype, "hankoUrlAttr", 2);
|
|
5961
6006
|
de([
|
|
5962
6007
|
Te({ type: String, attribute: "base-path" })
|
|
5963
|
-
],
|
|
6008
|
+
], ie.prototype, "basePath", 2);
|
|
5964
6009
|
de([
|
|
5965
6010
|
Te({ type: String, attribute: "auth-path" })
|
|
5966
|
-
],
|
|
6011
|
+
], ie.prototype, "authPath", 2);
|
|
5967
6012
|
de([
|
|
5968
6013
|
Te({ type: Boolean, attribute: "osm-required" })
|
|
5969
|
-
],
|
|
6014
|
+
], ie.prototype, "osmRequired", 2);
|
|
5970
6015
|
de([
|
|
5971
6016
|
Te({ type: String, attribute: "osm-scopes" })
|
|
5972
|
-
],
|
|
6017
|
+
], ie.prototype, "osmScopes", 2);
|
|
5973
6018
|
de([
|
|
5974
6019
|
Te({ type: Boolean, attribute: "show-profile" })
|
|
5975
|
-
],
|
|
6020
|
+
], ie.prototype, "showProfile", 2);
|
|
5976
6021
|
de([
|
|
5977
6022
|
Te({ type: String, attribute: "redirect-after-login" })
|
|
5978
|
-
],
|
|
6023
|
+
], ie.prototype, "redirectAfterLogin", 2);
|
|
5979
6024
|
de([
|
|
5980
6025
|
Te({ type: Boolean, attribute: "auto-connect" })
|
|
5981
|
-
],
|
|
6026
|
+
], ie.prototype, "autoConnect", 2);
|
|
5982
6027
|
de([
|
|
5983
6028
|
Te({ type: Boolean, attribute: "verify-session" })
|
|
5984
|
-
],
|
|
6029
|
+
], ie.prototype, "verifySession", 2);
|
|
5985
6030
|
de([
|
|
5986
6031
|
Te({ type: String, attribute: "redirect-after-logout" })
|
|
5987
|
-
],
|
|
6032
|
+
], ie.prototype, "redirectAfterLogout", 2);
|
|
5988
6033
|
de([
|
|
5989
6034
|
Te({ type: String, attribute: "display-name" })
|
|
5990
|
-
],
|
|
6035
|
+
], ie.prototype, "displayNameAttr", 2);
|
|
5991
6036
|
de([
|
|
5992
6037
|
Te({ type: String, attribute: "mapping-check-url" })
|
|
5993
|
-
],
|
|
6038
|
+
], ie.prototype, "mappingCheckUrl", 2);
|
|
5994
6039
|
de([
|
|
5995
6040
|
Te({ type: String, attribute: "app-id" })
|
|
5996
|
-
],
|
|
6041
|
+
], ie.prototype, "appId", 2);
|
|
5997
6042
|
de([
|
|
5998
6043
|
Te({ type: String, attribute: "login-url" })
|
|
5999
|
-
],
|
|
6044
|
+
], ie.prototype, "loginUrl", 2);
|
|
6000
6045
|
de([
|
|
6001
6046
|
Te({ type: String, reflect: !0 })
|
|
6002
|
-
],
|
|
6047
|
+
], ie.prototype, "lang", 2);
|
|
6003
6048
|
de([
|
|
6004
6049
|
Te({ type: String, attribute: "button-variant" })
|
|
6005
|
-
],
|
|
6050
|
+
], ie.prototype, "buttonVariant", 2);
|
|
6006
6051
|
de([
|
|
6007
6052
|
Te({ type: String, attribute: "button-color" })
|
|
6008
|
-
],
|
|
6053
|
+
], ie.prototype, "buttonColor", 2);
|
|
6009
6054
|
de([
|
|
6010
6055
|
Te({ type: String, reflect: !0 })
|
|
6011
|
-
],
|
|
6056
|
+
], ie.prototype, "display", 2);
|
|
6057
|
+
de([
|
|
6058
|
+
Ze()
|
|
6059
|
+
], ie.prototype, "user", 2);
|
|
6012
6060
|
de([
|
|
6013
|
-
|
|
6014
|
-
],
|
|
6061
|
+
Ze()
|
|
6062
|
+
], ie.prototype, "osmConnected", 2);
|
|
6015
6063
|
de([
|
|
6016
|
-
|
|
6017
|
-
],
|
|
6064
|
+
Ze()
|
|
6065
|
+
], ie.prototype, "osmData", 2);
|
|
6018
6066
|
de([
|
|
6019
|
-
|
|
6020
|
-
],
|
|
6067
|
+
Ze()
|
|
6068
|
+
], ie.prototype, "osmLoading", 2);
|
|
6021
6069
|
de([
|
|
6022
|
-
|
|
6023
|
-
],
|
|
6070
|
+
Ze()
|
|
6071
|
+
], ie.prototype, "loading", 2);
|
|
6024
6072
|
de([
|
|
6025
|
-
|
|
6026
|
-
],
|
|
6073
|
+
Ze()
|
|
6074
|
+
], ie.prototype, "error", 2);
|
|
6027
6075
|
de([
|
|
6028
|
-
|
|
6029
|
-
],
|
|
6076
|
+
Ze()
|
|
6077
|
+
], ie.prototype, "hankoReady", 2);
|
|
6030
6078
|
de([
|
|
6031
|
-
|
|
6032
|
-
],
|
|
6079
|
+
Ze()
|
|
6080
|
+
], ie.prototype, "profileDisplayName", 2);
|
|
6033
6081
|
de([
|
|
6034
|
-
|
|
6035
|
-
],
|
|
6082
|
+
Ze()
|
|
6083
|
+
], ie.prototype, "profilePictureUrl", 2);
|
|
6036
6084
|
de([
|
|
6037
|
-
|
|
6038
|
-
],
|
|
6085
|
+
Ze()
|
|
6086
|
+
], ie.prototype, "hasAppMapping", 2);
|
|
6039
6087
|
de([
|
|
6040
|
-
|
|
6041
|
-
],
|
|
6088
|
+
Ze()
|
|
6089
|
+
], ie.prototype, "userProfileLanguage", 2);
|
|
6042
6090
|
de([
|
|
6043
|
-
|
|
6044
|
-
],
|
|
6045
|
-
|
|
6091
|
+
Ze()
|
|
6092
|
+
], ie.prototype, "isOpen", 2);
|
|
6093
|
+
ie = de([
|
|
6046
6094
|
ua("hotosm-auth")
|
|
6047
|
-
],
|
|
6095
|
+
], ie);
|
|
6048
6096
|
export {
|
|
6049
|
-
|
|
6097
|
+
ie as HankoAuth,
|
|
6050
6098
|
fs as en,
|
|
6051
6099
|
vs as es,
|
|
6052
6100
|
_s as fr,
|