@tempots/beatui 0.19.1 → 0.20.0
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/{2019-D0n7sHsB.js → 2019-B4Mw3glM.js} +2 -2
- package/dist/{2019-CfIF9XVA.cjs → 2019-u0Cs1ZdE.cjs} +1 -1
- package/dist/{2020-D1ziwonq.cjs → 2020-BcwEHv2O.cjs} +1 -1
- package/dist/{2020-BkXWq9F8.js → 2020-BvFyb4Gy.js} +2 -2
- package/dist/{ar-DYmDITuw.cjs → ar-DyhaQaJU.cjs} +1 -1
- package/dist/{ar-CMndb3tf.js → ar-RkpJ2n6w.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +646 -651
- package/dist/beatui.css +1 -1
- package/dist/{de-Cgy7XJBg.js → de-BdSVR4Zm.js} +1 -1
- package/dist/{de-ClQgQrXM.cjs → de-CnZ4Ik2a.cjs} +1 -1
- package/dist/{es-j0qszDAW.js → es-B_Qn5EUy.js} +1 -1
- package/dist/{es-BN5Mihv0.cjs → es-ZKraCneL.cjs} +1 -1
- package/dist/{fa-BUQvM0nj.cjs → fa-D2p_ch4Q.cjs} +1 -1
- package/dist/{fa-COUp2ofv.js → fa-jBaLjqfG.js} +1 -1
- package/dist/{fr-B5Ar6QcE.js → fr-B0KaMM2j.js} +1 -1
- package/dist/{fr-CwvsJDIZ.cjs → fr-CBeo42lQ.cjs} +1 -1
- package/dist/{he-HZvvmFUB.cjs → he-BmqEF3o-.cjs} +1 -1
- package/dist/{he-D5HTHvKh.js → he-DjeYjcW7.js} +1 -1
- package/dist/{hi-Cnr1RtgA.cjs → hi-BAfIFl1n.cjs} +1 -1
- package/dist/{hi-Bcc7iEXp.js → hi-DxBQV0uz.js} +1 -1
- package/dist/index-4NoQLiJo.cjs +2 -0
- package/dist/{index-DSvEBuy-.cjs → index-9UO7Pd64.cjs} +1 -1
- package/dist/{index-tuwLQMCb.js → index-B001qopB.js} +3 -3
- package/dist/{index-ykojBEwT.js → index-BIUeLQJ1.js} +4 -4
- package/dist/{index-FEy4Hwnx.cjs → index-BInDdLXi.cjs} +1 -1
- package/dist/{index-BUKtbimR.cjs → index-BWiQR9j3.cjs} +1 -1
- package/dist/{index-Dben4dbo.js → index-BX_AooS9.js} +2 -2
- package/dist/{index-CRfUh74G.cjs → index-Blq-MoAk.cjs} +1 -1
- package/dist/{index-rWglN8IQ.js → index-BnaafQ9o.js} +1 -1
- package/dist/{index-BJfVmi_X.js → index-BnbEC2zq.js} +2 -2
- package/dist/{index-CHgx0rFt.js → index-C4jYy0NW.js} +2 -2
- package/dist/{index-B-d5blto.js → index-C4xio93t.js} +3 -3
- package/dist/{index-CFo2nnaI.js → index-C5l1mFuD.js} +2 -2
- package/dist/{index-BYk56bqR.cjs → index-CDYYXcsk.cjs} +2 -2
- package/dist/{index-CIfx_bs7.cjs → index-CJM_lW9n.cjs} +1 -1
- package/dist/{index-D0-d-xdJ.js → index-CaNnYmEs.js} +6 -6
- package/dist/{index-BZHMnjr6.cjs → index-CaOzAsWD.cjs} +1 -1
- package/dist/{index-BF4pXHo-.js → index-CdvplJG6.js} +4 -4
- package/dist/{index-CUs1c8a9.js → index-ClvbjqJL.js} +8 -8
- package/dist/{index-DgUJYXoy.cjs → index-CpB78PPQ.cjs} +1 -1
- package/dist/{index-B16dbwxM.cjs → index-CpKAa22o.cjs} +1 -1
- package/dist/{index-DJ-avKHU.js → index-CpMCZBAl.js} +2 -2
- package/dist/{index-2DKUYRWr.js → index-Cs_PxtnZ.js} +1 -1
- package/dist/{index-DxG_avr8.cjs → index-CvRJPSEv.cjs} +1 -1
- package/dist/{index-DD-MOsCa.js → index-D5nWhHZv.js} +2 -2
- package/dist/{index-Cohec4rB.cjs → index-D7o5LhMm.cjs} +1 -1
- package/dist/{index-DYIv5X6N.js → index-DC5Cn-TM.js} +2 -2
- package/dist/{index-CKRuo2DB.js → index-DCpnqWRN.js} +3 -3
- package/dist/{index-BirEb-BA.js → index-DOlgncMG.js} +2178 -2193
- package/dist/{index-kk6qFeC5.cjs → index-DOyppfix.cjs} +1 -1
- package/dist/{index-DjNMMz5-.cjs → index-DXUQTPON.cjs} +1 -1
- package/dist/{index-C9XAXTDx.cjs → index-DdlxwtnE.cjs} +1 -1
- package/dist/{index-_OaxQJX1.js → index-DhJIuRg9.js} +4 -4
- package/dist/{index-Bg1QLlyj.js → index-DiV6JJiS.js} +3 -3
- package/dist/{index-DD8_efWr.cjs → index-Dl-wY6fc.cjs} +1 -1
- package/dist/{index-BguvTLHu.cjs → index-DlaVE6S2.cjs} +1 -1
- package/dist/index-JHbFZFZF.cjs +8 -0
- package/dist/{index-dsitEt8M.cjs → index-Jt6D3QJ7.cjs} +1 -1
- package/dist/{index-85k3bgcY.cjs → index-KcBlGDqr.cjs} +1 -1
- package/dist/{index-dV4F3c70.js → index-MyVoESdk.js} +3 -3
- package/dist/{index-DC4nzG_w.js → index-NysVuvZA.js} +5 -5
- package/dist/{index-D-Rzl363.cjs → index-RGCDszX8.cjs} +1 -1
- package/dist/{index-CoBM7UvE.js → index-c-O5R5i2.js} +2 -2
- package/dist/{index-C4UzgyIA.cjs → index-cjtIcxwt.cjs} +1 -1
- package/dist/{index-faGepKVA.js → index-fnMeddEM.js} +2 -2
- package/dist/{index-DV7tB1MN.cjs → index-uR3OZ_8K.cjs} +1 -1
- package/dist/index.cjs.js +25 -25
- package/dist/index.es.js +2248 -2264
- package/dist/index.esm-DJRz9AE-.cjs +1 -0
- package/dist/{index.esm-CSotgpVw.js → index.esm-DPNh6inz.js} +410 -420
- package/dist/{it-CTCKFU5g.js → it-B4qZsicu.js} +1 -1
- package/dist/{it-B7KeOLBm.cjs → it-CzKrFTFY.cjs} +1 -1
- package/dist/{ja-BGoETTZv.js → ja-BnCSmhkg.js} +1 -1
- package/dist/{ja-0ldomgID.cjs → ja-i_9MZ1j0.cjs} +1 -1
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +1 -1
- package/dist/{ko-C4WEkArz.cjs → ko-CF9il-Az.cjs} +1 -1
- package/dist/{ko-xHeRs9LU.js → ko-D_gGkjrC.js} +1 -1
- package/dist/milkdown/index.cjs.js +1 -1
- package/dist/milkdown/index.es.js +1 -1
- package/dist/{milkdown-input-BbbZJGDl.js → milkdown-input-CYme9OBn.js} +14757 -14822
- package/dist/milkdown-input-KjtVqDzi.cjs +941 -0
- package/dist/modal-B-f3LBKr.cjs +1 -0
- package/dist/modal-BItfEmu0.js +600 -0
- package/dist/monaco/index.cjs.js +2 -2
- package/dist/monaco/index.es.js +114 -116
- package/dist/{nl-ey2Li7DF.js → nl-CsLCWUFF.js} +1 -1
- package/dist/{nl-D-y231ZO.cjs → nl-DfWlqR6T.cjs} +1 -1
- package/dist/notice-B7JqE59s.cjs +1 -0
- package/dist/notice-CmmpobJd.js +2415 -0
- package/dist/{pl-Bf0QaCGx.js → pl-Bsmj1KbZ.js} +1 -1
- package/dist/{pl-G6e4Mybr.cjs → pl-wK2sgv7l.cjs} +1 -1
- package/dist/{pt-D-_KxA9g.js → pt-BR_NuRJS.js} +1 -1
- package/dist/{pt-CD2Eqazl.cjs → pt-DAQIuOPW.cjs} +1 -1
- package/dist/{ru-CKh2xgqC.cjs → ru-BnoiCxrw.cjs} +1 -1
- package/dist/{ru-Dzbl29K2.js → ru-CiQ_qKD_.js} +1 -1
- package/dist/timer-BdH4cK6a.cjs +1 -0
- package/dist/timer-CQlK5LhW.js +47 -0
- package/dist/{tr-BbpC5gzM.cjs → tr-Bme5PfaE.cjs} +1 -1
- package/dist/{tr-yMHT8n7z.js → tr-Q9xP1nE4.js} +1 -1
- package/dist/translations-ClgoCEFC.js +1969 -0
- package/dist/{translations-DbN-OSLv.js → translations-D4hFMU4P.js} +1 -1
- package/dist/translations-DRBh70w8.cjs +2 -0
- package/dist/{translations-CXE8Z_Ac.cjs → translations-lnK_6RdU.cjs} +1 -1
- package/dist/{ur-kkik6-_r.cjs → ur-B4b39hNV.cjs} +1 -1
- package/dist/{ur-CdQA0epV.js → ur-CGTjSoJt.js} +1 -1
- package/dist/{vi-A8UmZU3L.js → vi-BF3HTFU9.js} +1 -1
- package/dist/{vi-1xtFXJc0.cjs → vi-CSpW181L.cjs} +1 -1
- package/dist/{zh-D0nnvX8T.js → zh-BreM8U2w.js} +1 -1
- package/dist/{zh-DC_SsXdk.cjs → zh-PeL8FN2c.cjs} +1 -1
- package/package.json +5 -5
- package/dist/index-B66rNs5i.cjs +0 -2
- package/dist/index-DXFKCiah.cjs +0 -8
- package/dist/index.esm-8xolKogd.cjs +0 -1
- package/dist/milkdown-input-C-Muq7PQ.cjs +0 -941
- package/dist/modal-nbZW44XS.js +0 -614
- package/dist/modal-wbG_oGOr.cjs +0 -1
- package/dist/notice-CIPcSfD5.js +0 -2432
- package/dist/notice-Cq02YHoN.cjs +0 -1
- package/dist/timer-CcMCjYrq.cjs +0 -1
- package/dist/timer-CkgWORR9.js +0 -42
- package/dist/translations-DBtfTNnM.js +0 -2005
- package/dist/translations-EQ1qPZ0_.cjs +0 -2
package/dist/auth/index.es.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { localStorageProp as
|
|
2
|
-
import { t as
|
|
3
|
-
import { s as I, o as
|
|
4
|
-
import { AuthI18n as x } from "../translations-
|
|
5
|
-
import { classes as
|
|
6
|
-
const
|
|
1
|
+
import { localStorageProp as ae, prop as E, Use as P, html as u, OnDispose as U, attr as t, on as T, When as _, coalesce as g, computedOf as f, bind as ne, ForEach as re, Value as J, OneOfValue as ie, Fragment as A } from "@tempots/dom";
|
|
2
|
+
import { t as ce, b as K, u as G, S as q, c as oe, d as $, P as M, E as R, a as O, T as le, G as ue, I as me } from "../translations-ClgoCEFC.js";
|
|
3
|
+
import { s as I, o as W, b as D, M as de } from "../modal-BItfEmu0.js";
|
|
4
|
+
import { AuthI18n as x } from "../translations-D4hFMU4P.js";
|
|
5
|
+
import { classes as pe } from "@tempots/ui";
|
|
6
|
+
const N = {
|
|
7
7
|
google: { name: "Google", icon: "logos:google-icon", color: "#4285f4" },
|
|
8
8
|
github: { name: "GitHub", icon: "logos:github-icon", color: "#333" },
|
|
9
9
|
apple: { name: "Apple", icon: "logos:apple", color: "#000" },
|
|
@@ -49,20 +49,17 @@ const M = {
|
|
|
49
49
|
paypal: { name: "PayPal", icon: "logos:paypal", color: "#0070ba" },
|
|
50
50
|
x: { name: "X", icon: "simple-icons:x", color: "#000" }
|
|
51
51
|
};
|
|
52
|
-
function
|
|
53
|
-
|
|
54
|
-
return ((e = M[o]) == null ? void 0 : e.name) || o;
|
|
52
|
+
function he(e) {
|
|
53
|
+
return N[e]?.name || e;
|
|
55
54
|
}
|
|
56
|
-
function
|
|
57
|
-
|
|
58
|
-
return ((e = M[o]) == null ? void 0 : e.icon) || "mdi:account";
|
|
55
|
+
function qe(e) {
|
|
56
|
+
return N[e]?.icon || "mdi:account";
|
|
59
57
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
62
|
-
return ((e = M[o]) == null ? void 0 : e.color) || "#666";
|
|
58
|
+
function Be(e) {
|
|
59
|
+
return N[e]?.color || "#666";
|
|
63
60
|
}
|
|
64
|
-
function
|
|
65
|
-
return
|
|
61
|
+
function $e(e, o = "Continue with {provider}") {
|
|
62
|
+
return o.replace("{provider}", he(e));
|
|
66
63
|
}
|
|
67
64
|
const B = {
|
|
68
65
|
minLength: 8,
|
|
@@ -71,18 +68,18 @@ const B = {
|
|
|
71
68
|
requireNumbers: !0,
|
|
72
69
|
requireSymbols: !1
|
|
73
70
|
};
|
|
74
|
-
function
|
|
75
|
-
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(
|
|
71
|
+
function Ie(e) {
|
|
72
|
+
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
|
|
76
73
|
}
|
|
77
|
-
function
|
|
78
|
-
const
|
|
79
|
-
let
|
|
80
|
-
for (let
|
|
81
|
-
|
|
82
|
-
return
|
|
74
|
+
function ge(e = 32) {
|
|
75
|
+
const o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
76
|
+
let i = "";
|
|
77
|
+
for (let l = 0; l < e; l++)
|
|
78
|
+
i += o.charAt(Math.floor(Math.random() * o.length));
|
|
79
|
+
return i;
|
|
83
80
|
}
|
|
84
|
-
function
|
|
85
|
-
const
|
|
81
|
+
function Te(e, o, i, l = [], c = {}) {
|
|
82
|
+
const n = {
|
|
86
83
|
google: "https://accounts.google.com/oauth/authorize",
|
|
87
84
|
github: "https://github.com/login/oauth/authorize",
|
|
88
85
|
apple: "https://appleid.apple.com/auth/authorize",
|
|
@@ -107,7 +104,7 @@ function Ao(o, e, r, a = [], c = {}) {
|
|
|
107
104
|
yahoo: "https://api.login.yahoo.com/oauth2/request_auth",
|
|
108
105
|
paypal: "https://www.paypal.com/signin/authorize",
|
|
109
106
|
x: "https://api.twitter.com/oauth2/authorize"
|
|
110
|
-
},
|
|
107
|
+
}, s = {
|
|
111
108
|
google: ["openid", "email", "profile"],
|
|
112
109
|
github: ["user:email"],
|
|
113
110
|
apple: ["email", "name"],
|
|
@@ -132,224 +129,222 @@ function Ao(o, e, r, a = [], c = {}) {
|
|
|
132
129
|
yahoo: ["openid", "email", "profile"],
|
|
133
130
|
paypal: ["openid", "email", "profile"],
|
|
134
131
|
x: ["openid", "email", "profile"]
|
|
135
|
-
},
|
|
136
|
-
if (!
|
|
137
|
-
throw new Error(`Unsupported provider: ${
|
|
138
|
-
const
|
|
139
|
-
client_id:
|
|
140
|
-
redirect_uri:
|
|
141
|
-
scope:
|
|
142
|
-
state:
|
|
132
|
+
}, a = n[e];
|
|
133
|
+
if (!a)
|
|
134
|
+
throw new Error(`Unsupported provider: ${e}`);
|
|
135
|
+
const m = l.length > 0 ? l : s[e], r = ge(), b = new URLSearchParams({
|
|
136
|
+
client_id: o,
|
|
137
|
+
redirect_uri: i,
|
|
138
|
+
scope: m.join(" "),
|
|
139
|
+
state: r,
|
|
143
140
|
response_type: "code",
|
|
144
141
|
...c
|
|
145
142
|
});
|
|
146
|
-
return `${
|
|
143
|
+
return `${a}?${b.toString()}`;
|
|
147
144
|
}
|
|
148
|
-
function
|
|
145
|
+
function Ae(e, o, i, l) {
|
|
149
146
|
const c = window.open(
|
|
150
|
-
|
|
151
|
-
`${
|
|
147
|
+
e,
|
|
148
|
+
`${o}_login`,
|
|
152
149
|
"width=500,height=600,scrollbars=yes,resizable=yes"
|
|
153
150
|
);
|
|
154
151
|
if (!c) {
|
|
155
|
-
|
|
152
|
+
l?.(new Error("Failed to open popup window"));
|
|
156
153
|
return;
|
|
157
154
|
}
|
|
158
|
-
const
|
|
159
|
-
c.closed && (clearInterval(
|
|
160
|
-
}, 1e3),
|
|
161
|
-
|
|
155
|
+
const n = setInterval(() => {
|
|
156
|
+
c.closed && (clearInterval(n), l?.(new Error("Login cancelled")));
|
|
157
|
+
}, 1e3), s = (a) => {
|
|
158
|
+
a.origin === window.location.origin && (a.data.type === "SOCIAL_LOGIN_SUCCESS" ? (clearInterval(n), c.close(), window.removeEventListener("message", s), i?.(a.data.result)) : a.data.type === "SOCIAL_LOGIN_ERROR" && (clearInterval(n), c.close(), window.removeEventListener("message", s), l?.(new Error(a.data.error))));
|
|
162
159
|
};
|
|
163
|
-
window.addEventListener("message",
|
|
160
|
+
window.addEventListener("message", s);
|
|
164
161
|
}
|
|
165
|
-
function
|
|
166
|
-
return
|
|
162
|
+
function Ce(e) {
|
|
163
|
+
return e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e ? String(e.message) : "An unexpected error occurred";
|
|
167
164
|
}
|
|
168
|
-
function
|
|
165
|
+
function ze() {
|
|
169
166
|
return typeof window < "u" && typeof document < "u";
|
|
170
167
|
}
|
|
171
168
|
function H({
|
|
172
|
-
task:
|
|
173
|
-
message:
|
|
174
|
-
onStart:
|
|
175
|
-
onEnd:
|
|
169
|
+
task: e,
|
|
170
|
+
message: o,
|
|
171
|
+
onStart: i,
|
|
172
|
+
onEnd: l
|
|
176
173
|
}) {
|
|
177
174
|
return async (c) => {
|
|
178
|
-
|
|
179
|
-
const
|
|
180
|
-
task:
|
|
181
|
-
errorMessage:
|
|
175
|
+
i?.();
|
|
176
|
+
const n = await ce({
|
|
177
|
+
task: e != null ? () => e(c) : async () => null,
|
|
178
|
+
errorMessage: o,
|
|
182
179
|
errorPath: ["root"],
|
|
183
|
-
validation: (
|
|
180
|
+
validation: (s) => s != null ? K.invalid({ message: s }) : K.valid
|
|
184
181
|
});
|
|
185
|
-
return
|
|
182
|
+
return l?.(), n;
|
|
186
183
|
};
|
|
187
184
|
}
|
|
188
|
-
function j(
|
|
189
|
-
let
|
|
190
|
-
return
|
|
191
|
-
|
|
192
|
-
`Password must be at least ${
|
|
193
|
-
)),
|
|
185
|
+
function j(e = B) {
|
|
186
|
+
let o = I();
|
|
187
|
+
return e.minLength && (o = o.min(
|
|
188
|
+
e.minLength,
|
|
189
|
+
`Password must be at least ${e.minLength} characters`
|
|
190
|
+
)), e.requireUppercase && (o = o.regex(
|
|
194
191
|
/[A-Z]/,
|
|
195
192
|
"Password must contain at least one uppercase letter"
|
|
196
|
-
)),
|
|
193
|
+
)), e.requireLowercase && (o = o.regex(
|
|
197
194
|
/[a-z]/,
|
|
198
195
|
"Password must contain at least one lowercase letter"
|
|
199
|
-
)),
|
|
196
|
+
)), e.requireNumbers && (o = o.regex(
|
|
200
197
|
/[0-9]/,
|
|
201
198
|
"Password must contain at least one number"
|
|
202
|
-
)),
|
|
199
|
+
)), e.requireSymbols && (o = o.regex(
|
|
203
200
|
/[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/,
|
|
204
201
|
"Password must contain at least one special character"
|
|
205
|
-
)),
|
|
202
|
+
)), e.customValidation && (o = o.refine((i) => e.customValidation(i))), o;
|
|
206
203
|
}
|
|
207
|
-
const
|
|
208
|
-
function X(
|
|
209
|
-
const
|
|
210
|
-
(
|
|
204
|
+
const V = I().min(1, "Email is required").email("Please enter a valid email address");
|
|
205
|
+
function X(e) {
|
|
206
|
+
const o = e ? j(e) : I().refine(
|
|
207
|
+
(i) => i.length > 0 ? null : "Password is required"
|
|
211
208
|
);
|
|
212
|
-
return
|
|
213
|
-
email:
|
|
214
|
-
password:
|
|
215
|
-
rememberMe:
|
|
209
|
+
return W({
|
|
210
|
+
email: V,
|
|
211
|
+
password: o,
|
|
212
|
+
rememberMe: D().default(!1)
|
|
216
213
|
}).schema();
|
|
217
214
|
}
|
|
218
|
-
function Y(
|
|
219
|
-
const
|
|
220
|
-
name:
|
|
221
|
-
email:
|
|
222
|
-
password:
|
|
215
|
+
function Y(e = B, o) {
|
|
216
|
+
const i = j(e), l = o?.showNameField !== !1, c = o?.showConfirmPassword !== !1, n = o?.showAcceptTermsAndConditions !== !1, s = {
|
|
217
|
+
name: l ? I().min(1, "Name is required").optional() : I().optional(),
|
|
218
|
+
email: V,
|
|
219
|
+
password: i,
|
|
223
220
|
// Always require confirmPassword as string to match SignUpData interface
|
|
224
221
|
// When not shown, it should accept any value (including empty string)
|
|
225
222
|
confirmPassword: c ? I().min(1, "Please confirm your password") : I(),
|
|
226
223
|
// Accept any string value when not shown
|
|
227
|
-
acceptTerms:
|
|
228
|
-
(
|
|
224
|
+
acceptTerms: n ? D().refine(
|
|
225
|
+
(m) => m === !0,
|
|
229
226
|
"You must accept the terms and conditions"
|
|
230
|
-
) :
|
|
227
|
+
) : D().default(!0)
|
|
231
228
|
// Default to true when not shown
|
|
232
|
-
},
|
|
233
|
-
return c ?
|
|
234
|
-
(
|
|
229
|
+
}, a = W(s);
|
|
230
|
+
return c ? a.refine(
|
|
231
|
+
(m) => m.password === m.confirmPassword ? null : "Passwords don't match",
|
|
235
232
|
{ path: ["confirmPassword"] }
|
|
236
|
-
).schema() :
|
|
233
|
+
).schema() : a.schema();
|
|
237
234
|
}
|
|
238
|
-
const
|
|
239
|
-
email:
|
|
240
|
-
}).schema(),
|
|
235
|
+
const te = W({
|
|
236
|
+
email: V
|
|
237
|
+
}).schema(), Ee = X(), Ue = Y(), Oe = {
|
|
241
238
|
signIn: X,
|
|
242
239
|
signUp: Y,
|
|
243
|
-
resetPassword: () =>
|
|
240
|
+
resetPassword: () => te
|
|
244
241
|
};
|
|
245
|
-
function
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
return e.success ? null : ((r = e.errors[0]) == null ? void 0 : r.message) || "Invalid email";
|
|
242
|
+
function Ve(e) {
|
|
243
|
+
const o = V.validate(e);
|
|
244
|
+
return o.success ? null : o.errors[0]?.message || "Invalid email";
|
|
249
245
|
}
|
|
250
|
-
function
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
return a.success ? null : ((c = a.errors[0]) == null ? void 0 : c.message) || "Invalid password";
|
|
246
|
+
function Fe(e, o = B) {
|
|
247
|
+
const l = j(o).validate(e);
|
|
248
|
+
return l.success ? null : l.errors[0]?.message || "Invalid password";
|
|
254
249
|
}
|
|
255
|
-
function Z(
|
|
256
|
-
const
|
|
257
|
-
length:
|
|
258
|
-
uppercase: /[A-Z]/.test(
|
|
259
|
-
lowercase: /[a-z]/.test(
|
|
260
|
-
numbers: /[0-9]/.test(
|
|
261
|
-
symbols: /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(
|
|
262
|
-
custom:
|
|
250
|
+
function Z(e, o = B) {
|
|
251
|
+
const i = {
|
|
252
|
+
length: e.length >= (o.minLength || 8),
|
|
253
|
+
uppercase: /[A-Z]/.test(e),
|
|
254
|
+
lowercase: /[a-z]/.test(e),
|
|
255
|
+
numbers: /[0-9]/.test(e),
|
|
256
|
+
symbols: /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/.test(e),
|
|
257
|
+
custom: o.customValidation ? o.customValidation(e) === null : e.length > 0
|
|
263
258
|
// For consistency, fail if password is empty
|
|
264
|
-
},
|
|
259
|
+
}, l = [
|
|
265
260
|
!0,
|
|
266
261
|
// length is always enabled
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
!!
|
|
262
|
+
o.requireUppercase,
|
|
263
|
+
o.requireLowercase,
|
|
264
|
+
o.requireNumbers,
|
|
265
|
+
o.requireSymbols,
|
|
266
|
+
!!o.customValidation
|
|
272
267
|
].filter(Boolean).length, c = [
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
].filter((
|
|
280
|
-
let
|
|
281
|
-
return
|
|
268
|
+
i.length,
|
|
269
|
+
o.requireUppercase ? i.uppercase : null,
|
|
270
|
+
o.requireLowercase ? i.lowercase : null,
|
|
271
|
+
o.requireNumbers ? i.numbers : null,
|
|
272
|
+
o.requireSymbols ? i.symbols : null,
|
|
273
|
+
o.customValidation ? i.custom : null
|
|
274
|
+
].filter((a) => a === !0).length, n = l > 0 ? Math.round(c / l * 100) : 0;
|
|
275
|
+
let s;
|
|
276
|
+
return n < 40 ? s = "weak" : n < 60 ? s = "fair" : n < 80 ? s = "good" : s = "strong", { strength: s, score: n, checks: i };
|
|
282
277
|
}
|
|
283
|
-
const
|
|
278
|
+
const se = () => ae({
|
|
284
279
|
key: "bui_auth_email",
|
|
285
280
|
defaultValue: null
|
|
286
281
|
});
|
|
287
|
-
function
|
|
288
|
-
onSignIn:
|
|
289
|
-
passwordRules:
|
|
290
|
-
labels:
|
|
291
|
-
showRememberMe:
|
|
282
|
+
function fe({
|
|
283
|
+
onSignIn: e,
|
|
284
|
+
passwordRules: o,
|
|
285
|
+
labels: i,
|
|
286
|
+
showRememberMe: l
|
|
292
287
|
}) {
|
|
293
|
-
const c =
|
|
294
|
-
schema:
|
|
288
|
+
const c = E(!1), n = se(), s = X(o), a = G({
|
|
289
|
+
schema: s,
|
|
295
290
|
submit: H({
|
|
296
|
-
task:
|
|
291
|
+
task: e != null ? (h) => e({
|
|
297
292
|
email: h.email,
|
|
298
293
|
password: h.password
|
|
299
294
|
}) : void 0,
|
|
300
295
|
message: "Reset password failed",
|
|
301
296
|
onStart: () => {
|
|
302
|
-
c.set(!0),
|
|
297
|
+
c.set(!0), a.controller.disable();
|
|
303
298
|
},
|
|
304
299
|
onEnd: () => {
|
|
305
|
-
c.set(!1),
|
|
300
|
+
c.set(!1), a.controller.enable();
|
|
306
301
|
}
|
|
307
302
|
}),
|
|
308
303
|
initialValue: {
|
|
309
304
|
email: "",
|
|
310
305
|
password: ""
|
|
311
306
|
}
|
|
312
|
-
}), { controller:
|
|
313
|
-
c.on(
|
|
314
|
-
const
|
|
315
|
-
return
|
|
316
|
-
h != null &&
|
|
317
|
-
}),
|
|
318
|
-
|
|
319
|
-
}),
|
|
307
|
+
}), { controller: m, onSubmit: r } = a;
|
|
308
|
+
c.on(m.setDisabled);
|
|
309
|
+
const b = m.field("email"), w = m.field("password");
|
|
310
|
+
return n.on((h) => {
|
|
311
|
+
h != null && b.change(h);
|
|
312
|
+
}), b.value.on((h) => {
|
|
313
|
+
n.value != null && (n.value = h);
|
|
314
|
+
}), P(
|
|
320
315
|
x,
|
|
321
316
|
(h) => (
|
|
322
317
|
// Email/Password form
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
T.submit(
|
|
318
|
+
u.form(
|
|
319
|
+
U(m.dispose, n.dispose, c.dispose),
|
|
320
|
+
t.class("bc-auth-form__form"),
|
|
321
|
+
T.submit(r),
|
|
327
322
|
q(
|
|
328
|
-
|
|
323
|
+
t.class("bc-auth-form__fields"),
|
|
329
324
|
// Email field
|
|
330
|
-
$(
|
|
331
|
-
controller:
|
|
332
|
-
label: g(
|
|
325
|
+
$(R, {
|
|
326
|
+
controller: b,
|
|
327
|
+
label: g(i?.emailLabel, h.$.emailLabel)
|
|
333
328
|
}),
|
|
334
329
|
// Password field
|
|
335
|
-
$(
|
|
336
|
-
controller:
|
|
337
|
-
label: g(
|
|
330
|
+
$(M, {
|
|
331
|
+
controller: w,
|
|
332
|
+
label: g(i?.passwordLabel, h.$.passwordLabel)
|
|
338
333
|
}),
|
|
339
334
|
// Remember me checkbox
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
() =>
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
value:
|
|
348
|
-
after:
|
|
349
|
-
g(
|
|
335
|
+
_(
|
|
336
|
+
l ?? !0,
|
|
337
|
+
() => u.div(
|
|
338
|
+
t.class("bc-auth-form__remember-me"),
|
|
339
|
+
u.label(
|
|
340
|
+
t.class("bc-auth-form__checkbox-label"),
|
|
341
|
+
oe({
|
|
342
|
+
value: n.map((L) => L != null),
|
|
343
|
+
after: u.span(
|
|
344
|
+
g(i?.rememberMeLabel, h.$.rememberMeLabel)
|
|
350
345
|
),
|
|
351
|
-
onChange: (
|
|
352
|
-
|
|
346
|
+
onChange: (L) => {
|
|
347
|
+
L ? n.value = b.value.value ?? "" : n.value = null;
|
|
353
348
|
}
|
|
354
349
|
})
|
|
355
350
|
)
|
|
@@ -357,28 +352,28 @@ function wo({
|
|
|
357
352
|
)
|
|
358
353
|
),
|
|
359
354
|
// Submit button
|
|
360
|
-
|
|
355
|
+
O(
|
|
361
356
|
{
|
|
362
357
|
type: "submit",
|
|
363
358
|
variant: "filled",
|
|
364
359
|
color: "primary",
|
|
365
360
|
loading: c,
|
|
366
|
-
disabled:
|
|
361
|
+
disabled: m.disabledOrHasErrors
|
|
367
362
|
},
|
|
368
|
-
|
|
369
|
-
g(
|
|
363
|
+
t.class("bc-auth-form__submit"),
|
|
364
|
+
g(i?.signInButton, h.$.signInButton)
|
|
370
365
|
)
|
|
371
366
|
)
|
|
372
367
|
)
|
|
373
368
|
);
|
|
374
369
|
}
|
|
375
|
-
function
|
|
376
|
-
password:
|
|
377
|
-
rules:
|
|
378
|
-
showLabel:
|
|
379
|
-
className:
|
|
370
|
+
function be({
|
|
371
|
+
password: e,
|
|
372
|
+
rules: o = B,
|
|
373
|
+
showLabel: i = !0,
|
|
374
|
+
className: l
|
|
380
375
|
}) {
|
|
381
|
-
const c = f(
|
|
376
|
+
const c = f(e)((r) => !r || r.length === 0 ? {
|
|
382
377
|
strength: "weak",
|
|
383
378
|
score: 0,
|
|
384
379
|
checks: {
|
|
@@ -389,150 +384,150 @@ function _o({
|
|
|
389
384
|
symbols: !1,
|
|
390
385
|
custom: !1
|
|
391
386
|
}
|
|
392
|
-
} : Z(
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
)((
|
|
387
|
+
} : Z(r, o)), n = c.map((r) => r.strength), s = c.map((r) => r.score), a = c.map((r) => r.checks), m = f(
|
|
388
|
+
n,
|
|
389
|
+
l
|
|
390
|
+
)((r, b) => [
|
|
396
391
|
"bc-password-strength",
|
|
397
|
-
`bc-password-strength--${
|
|
398
|
-
|
|
392
|
+
`bc-password-strength--${r}`,
|
|
393
|
+
b
|
|
399
394
|
].filter(Boolean).join(" "));
|
|
400
|
-
return
|
|
401
|
-
|
|
395
|
+
return u.div(
|
|
396
|
+
t.class(m),
|
|
402
397
|
// Strength bar
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
398
|
+
u.div(
|
|
399
|
+
t.class("bc-password-strength__bar"),
|
|
400
|
+
u.div(
|
|
401
|
+
t.class("bc-password-strength__fill"),
|
|
402
|
+
t.style(s.map((r) => `width: ${r}%`))
|
|
408
403
|
)
|
|
409
404
|
),
|
|
410
405
|
// Strength label (optional)
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
() =>
|
|
406
|
+
_(
|
|
407
|
+
i,
|
|
408
|
+
() => P(
|
|
414
409
|
x,
|
|
415
|
-
(
|
|
416
|
-
|
|
410
|
+
(r) => u.div(
|
|
411
|
+
t.class("bc-password-strength__label"),
|
|
417
412
|
f(
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
)((
|
|
421
|
-
switch (
|
|
413
|
+
n,
|
|
414
|
+
r
|
|
415
|
+
)((b, w) => {
|
|
416
|
+
switch (b) {
|
|
422
417
|
case "weak":
|
|
423
|
-
return
|
|
418
|
+
return w.passwordStrengthWeak;
|
|
424
419
|
case "fair":
|
|
425
|
-
return
|
|
420
|
+
return w.passwordStrengthFair;
|
|
426
421
|
case "good":
|
|
427
|
-
return
|
|
422
|
+
return w.passwordStrengthGood;
|
|
428
423
|
case "strong":
|
|
429
|
-
return
|
|
424
|
+
return w.passwordStrengthStrong;
|
|
430
425
|
default:
|
|
431
|
-
return
|
|
426
|
+
return w.passwordStrengthWeak;
|
|
432
427
|
}
|
|
433
428
|
})
|
|
434
429
|
)
|
|
435
430
|
)
|
|
436
431
|
),
|
|
437
432
|
// Requirements checklist
|
|
438
|
-
|
|
439
|
-
|
|
433
|
+
u.div(
|
|
434
|
+
t.class("bc-password-strength__requirements"),
|
|
440
435
|
// Length requirement
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
() =>
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
f(
|
|
447
|
-
(
|
|
436
|
+
_(
|
|
437
|
+
o.minLength !== void 0,
|
|
438
|
+
() => u.div(
|
|
439
|
+
t.class("bc-password-strength__requirement"),
|
|
440
|
+
t.class(
|
|
441
|
+
f(a)(
|
|
442
|
+
(r) => r.length ? "bc-password-strength__requirement--met" : ""
|
|
448
443
|
)
|
|
449
444
|
),
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
f(
|
|
445
|
+
u.span(
|
|
446
|
+
t.class("bc-password-strength__requirement-icon"),
|
|
447
|
+
f(a)((r) => r.length ? "✓" : "○")
|
|
453
448
|
),
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
`At least ${
|
|
449
|
+
u.span(
|
|
450
|
+
t.class("bc-password-strength__requirement-text"),
|
|
451
|
+
`At least ${o.minLength} characters`
|
|
457
452
|
)
|
|
458
453
|
)
|
|
459
454
|
),
|
|
460
455
|
// Uppercase requirement
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
() =>
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
f(
|
|
467
|
-
(
|
|
456
|
+
_(
|
|
457
|
+
o.requireUppercase === !0,
|
|
458
|
+
() => u.div(
|
|
459
|
+
t.class("bc-password-strength__requirement"),
|
|
460
|
+
t.class(
|
|
461
|
+
f(a)(
|
|
462
|
+
(r) => r.uppercase ? "bc-password-strength__requirement--met" : ""
|
|
468
463
|
)
|
|
469
464
|
),
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
f(
|
|
465
|
+
u.span(
|
|
466
|
+
t.class("bc-password-strength__requirement-icon"),
|
|
467
|
+
f(a)((r) => r.uppercase ? "✓" : "○")
|
|
473
468
|
),
|
|
474
|
-
|
|
475
|
-
|
|
469
|
+
u.span(
|
|
470
|
+
t.class("bc-password-strength__requirement-text"),
|
|
476
471
|
"One uppercase letter"
|
|
477
472
|
)
|
|
478
473
|
)
|
|
479
474
|
),
|
|
480
475
|
// Lowercase requirement
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
() =>
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
f(
|
|
487
|
-
(
|
|
476
|
+
_(
|
|
477
|
+
o.requireLowercase === !0,
|
|
478
|
+
() => u.div(
|
|
479
|
+
t.class("bc-password-strength__requirement"),
|
|
480
|
+
t.class(
|
|
481
|
+
f(a)(
|
|
482
|
+
(r) => r.lowercase ? "bc-password-strength__requirement--met" : ""
|
|
488
483
|
)
|
|
489
484
|
),
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
f(
|
|
485
|
+
u.span(
|
|
486
|
+
t.class("bc-password-strength__requirement-icon"),
|
|
487
|
+
f(a)((r) => r.lowercase ? "✓" : "○")
|
|
493
488
|
),
|
|
494
|
-
|
|
495
|
-
|
|
489
|
+
u.span(
|
|
490
|
+
t.class("bc-password-strength__requirement-text"),
|
|
496
491
|
"One lowercase letter"
|
|
497
492
|
)
|
|
498
493
|
)
|
|
499
494
|
),
|
|
500
495
|
// Numbers requirement
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
() =>
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
f(
|
|
507
|
-
(
|
|
496
|
+
_(
|
|
497
|
+
o.requireNumbers === !0,
|
|
498
|
+
() => u.div(
|
|
499
|
+
t.class("bc-password-strength__requirement"),
|
|
500
|
+
t.class(
|
|
501
|
+
f(a)(
|
|
502
|
+
(r) => r.numbers ? "bc-password-strength__requirement--met" : ""
|
|
508
503
|
)
|
|
509
504
|
),
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
f(
|
|
505
|
+
u.span(
|
|
506
|
+
t.class("bc-password-strength__requirement-icon"),
|
|
507
|
+
f(a)((r) => r.numbers ? "✓" : "○")
|
|
513
508
|
),
|
|
514
|
-
|
|
515
|
-
|
|
509
|
+
u.span(
|
|
510
|
+
t.class("bc-password-strength__requirement-text"),
|
|
516
511
|
"One number"
|
|
517
512
|
)
|
|
518
513
|
)
|
|
519
514
|
),
|
|
520
515
|
// Symbols requirement
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
() =>
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
f(
|
|
527
|
-
(
|
|
516
|
+
_(
|
|
517
|
+
o.requireSymbols === !0,
|
|
518
|
+
() => u.div(
|
|
519
|
+
t.class("bc-password-strength__requirement"),
|
|
520
|
+
t.class(
|
|
521
|
+
f(a)(
|
|
522
|
+
(r) => r.symbols ? "bc-password-strength__requirement--met" : ""
|
|
528
523
|
)
|
|
529
524
|
),
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
f(
|
|
525
|
+
u.span(
|
|
526
|
+
t.class("bc-password-strength__requirement-icon"),
|
|
527
|
+
f(a)((r) => r.symbols ? "✓" : "○")
|
|
533
528
|
),
|
|
534
|
-
|
|
535
|
-
|
|
529
|
+
u.span(
|
|
530
|
+
t.class("bc-password-strength__requirement-text"),
|
|
536
531
|
"One special character"
|
|
537
532
|
)
|
|
538
533
|
)
|
|
@@ -540,92 +535,92 @@ function _o({
|
|
|
540
535
|
)
|
|
541
536
|
);
|
|
542
537
|
}
|
|
543
|
-
function
|
|
544
|
-
password:
|
|
545
|
-
rules:
|
|
546
|
-
className:
|
|
538
|
+
function Me({
|
|
539
|
+
password: e,
|
|
540
|
+
rules: o = B,
|
|
541
|
+
className: i
|
|
547
542
|
}) {
|
|
548
|
-
const
|
|
543
|
+
const l = f(e)((a) => !a || a.length === 0 ? { strength: "weak", score: 0 } : Z(a, o)), c = l.map((a) => a.strength), n = l.map((a) => a.score), s = f(
|
|
549
544
|
c,
|
|
550
|
-
|
|
551
|
-
)((
|
|
545
|
+
i
|
|
546
|
+
)((a, m) => [
|
|
552
547
|
"bc-password-strength-bar",
|
|
553
|
-
`bc-password-strength-bar--${
|
|
554
|
-
|
|
548
|
+
`bc-password-strength-bar--${a}`,
|
|
549
|
+
m
|
|
555
550
|
].filter(Boolean).join(" "));
|
|
556
|
-
return
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
551
|
+
return u.div(
|
|
552
|
+
t.class(s),
|
|
553
|
+
u.div(
|
|
554
|
+
t.class("bc-password-strength-bar__fill"),
|
|
555
|
+
t.style(n.map((a) => `width: ${a}%`))
|
|
561
556
|
)
|
|
562
557
|
);
|
|
563
558
|
}
|
|
564
|
-
function
|
|
565
|
-
password:
|
|
566
|
-
rules:
|
|
567
|
-
className:
|
|
559
|
+
function De({
|
|
560
|
+
password: e,
|
|
561
|
+
rules: o = B,
|
|
562
|
+
className: i
|
|
568
563
|
}) {
|
|
569
|
-
const
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
)((
|
|
564
|
+
const l = f(e)((n) => !n || n.length === 0 ? "weak" : Z(n, o).strength), c = f(
|
|
565
|
+
l,
|
|
566
|
+
i
|
|
567
|
+
)((n, s) => [
|
|
573
568
|
"bc-password-strength-text",
|
|
574
|
-
`bc-password-strength-text--${
|
|
575
|
-
|
|
569
|
+
`bc-password-strength-text--${n}`,
|
|
570
|
+
s
|
|
576
571
|
].filter(Boolean).join(" "));
|
|
577
|
-
return
|
|
572
|
+
return P(
|
|
578
573
|
x,
|
|
579
|
-
(
|
|
580
|
-
|
|
574
|
+
(n) => u.span(
|
|
575
|
+
t.class(c),
|
|
581
576
|
f(
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
)((
|
|
585
|
-
switch (
|
|
577
|
+
l,
|
|
578
|
+
n
|
|
579
|
+
)((s, a) => {
|
|
580
|
+
switch (s) {
|
|
586
581
|
case "weak":
|
|
587
|
-
return
|
|
582
|
+
return a.passwordStrengthWeak;
|
|
588
583
|
case "fair":
|
|
589
|
-
return
|
|
584
|
+
return a.passwordStrengthFair;
|
|
590
585
|
case "good":
|
|
591
|
-
return
|
|
586
|
+
return a.passwordStrengthGood;
|
|
592
587
|
case "strong":
|
|
593
|
-
return
|
|
588
|
+
return a.passwordStrengthStrong;
|
|
594
589
|
default:
|
|
595
|
-
return
|
|
590
|
+
return a.passwordStrengthWeak;
|
|
596
591
|
}
|
|
597
592
|
})
|
|
598
593
|
)
|
|
599
594
|
);
|
|
600
595
|
}
|
|
601
|
-
function
|
|
602
|
-
passwordRules:
|
|
603
|
-
labels:
|
|
604
|
-
showPasswordStrength:
|
|
605
|
-
onSignUp:
|
|
596
|
+
function we({
|
|
597
|
+
passwordRules: e,
|
|
598
|
+
labels: o,
|
|
599
|
+
showPasswordStrength: i,
|
|
600
|
+
onSignUp: l,
|
|
606
601
|
showNameField: c,
|
|
607
|
-
showConfirmPassword:
|
|
608
|
-
showAcceptTermsAndConditions:
|
|
609
|
-
termsAndConditions:
|
|
602
|
+
showConfirmPassword: n,
|
|
603
|
+
showAcceptTermsAndConditions: s,
|
|
604
|
+
termsAndConditions: a
|
|
610
605
|
}) {
|
|
611
|
-
const
|
|
606
|
+
const m = E(!1), r = e || B, b = Y(r, {
|
|
612
607
|
showNameField: c !== !1,
|
|
613
|
-
showConfirmPassword:
|
|
614
|
-
showAcceptTermsAndConditions:
|
|
615
|
-
}),
|
|
616
|
-
schema:
|
|
608
|
+
showConfirmPassword: n !== !1,
|
|
609
|
+
showAcceptTermsAndConditions: s !== !1
|
|
610
|
+
}), w = G({
|
|
611
|
+
schema: b,
|
|
617
612
|
submit: H({
|
|
618
|
-
task:
|
|
613
|
+
task: l != null ? (y) => l({
|
|
619
614
|
email: y.email,
|
|
620
615
|
password: y.password,
|
|
621
616
|
name: y.name
|
|
622
617
|
}) : void 0,
|
|
623
618
|
message: "Reset password failed",
|
|
624
619
|
onStart: () => {
|
|
625
|
-
|
|
620
|
+
m.set(!0), w.controller.disable();
|
|
626
621
|
},
|
|
627
622
|
onEnd: () => {
|
|
628
|
-
|
|
623
|
+
m.set(!1), w.controller.enable();
|
|
629
624
|
}
|
|
630
625
|
}),
|
|
631
626
|
initialValue: {
|
|
@@ -635,236 +630,236 @@ function Lo({
|
|
|
635
630
|
confirmPassword: "",
|
|
636
631
|
acceptTerms: !1
|
|
637
632
|
}
|
|
638
|
-
}), { controller: h, onSubmit:
|
|
639
|
-
|
|
640
|
-
const
|
|
641
|
-
return
|
|
633
|
+
}), { controller: h, onSubmit: L } = w;
|
|
634
|
+
m.on(h.setDisabled);
|
|
635
|
+
const k = h.field("name"), C = h.field("email"), z = h.field("password"), F = h.field("confirmPassword"), v = h.field("acceptTerms");
|
|
636
|
+
return P(
|
|
642
637
|
x,
|
|
643
638
|
(y) => (
|
|
644
639
|
// Registration form
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
T.submit(
|
|
640
|
+
u.form(
|
|
641
|
+
U(h.dispose, m.dispose),
|
|
642
|
+
t.class("bc-auth-form__form"),
|
|
643
|
+
T.submit(L),
|
|
649
644
|
q(
|
|
650
|
-
|
|
645
|
+
t.class("bc-auth-form__fields"),
|
|
651
646
|
// Name field (optional)
|
|
652
|
-
|
|
647
|
+
_(
|
|
653
648
|
c !== !1,
|
|
654
|
-
() => $(
|
|
655
|
-
controller:
|
|
656
|
-
(
|
|
657
|
-
(
|
|
649
|
+
() => $(le, {
|
|
650
|
+
controller: k.transform(
|
|
651
|
+
(S) => S ?? "",
|
|
652
|
+
(S) => S === "" ? void 0 : S
|
|
658
653
|
),
|
|
659
|
-
label: g(
|
|
654
|
+
label: g(o?.nameLabel, y.$.nameLabel)
|
|
660
655
|
})
|
|
661
656
|
),
|
|
662
657
|
// Email field
|
|
663
|
-
$(
|
|
664
|
-
controller:
|
|
665
|
-
label: g(
|
|
658
|
+
$(R, {
|
|
659
|
+
controller: C,
|
|
660
|
+
label: g(o?.emailLabel, y.$.emailLabel)
|
|
666
661
|
}),
|
|
667
662
|
// Password field
|
|
668
|
-
$(
|
|
669
|
-
controller:
|
|
670
|
-
label: g(
|
|
663
|
+
$(M, {
|
|
664
|
+
controller: z,
|
|
665
|
+
label: g(o?.passwordLabel, y.$.passwordLabel)
|
|
671
666
|
}),
|
|
672
667
|
// Password strength indicator
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
() =>
|
|
676
|
-
password:
|
|
677
|
-
rules:
|
|
668
|
+
_(
|
|
669
|
+
i ?? !1,
|
|
670
|
+
() => be({
|
|
671
|
+
password: z.value,
|
|
672
|
+
rules: r,
|
|
678
673
|
showLabel: !0
|
|
679
674
|
})
|
|
680
675
|
),
|
|
681
676
|
// Confirm password field
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
() => $(
|
|
685
|
-
controller:
|
|
677
|
+
_(
|
|
678
|
+
n ?? !1,
|
|
679
|
+
() => $(M, {
|
|
680
|
+
controller: F,
|
|
686
681
|
label: g(
|
|
687
|
-
|
|
682
|
+
o?.confirmPasswordLabel,
|
|
688
683
|
y.$.confirmPasswordLabel
|
|
689
684
|
)
|
|
690
685
|
})
|
|
691
686
|
),
|
|
692
687
|
// Terms acceptance checkbox
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
() =>
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
value:
|
|
701
|
-
onChange: (
|
|
688
|
+
_(
|
|
689
|
+
s ?? !1,
|
|
690
|
+
() => u.div(
|
|
691
|
+
t.class("bc-auth-form__terms"),
|
|
692
|
+
u.label(
|
|
693
|
+
t.class("bc-auth-form__checkbox-label"),
|
|
694
|
+
oe({
|
|
695
|
+
value: v.value.map((S) => S ?? !1),
|
|
696
|
+
onChange: (S) => v.change(S)
|
|
702
697
|
}),
|
|
703
|
-
|
|
704
|
-
|
|
698
|
+
u.span(
|
|
699
|
+
a || g(o?.acceptTermsLabel, y.$.acceptTermsLabel)
|
|
705
700
|
)
|
|
706
701
|
),
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
() =>
|
|
710
|
-
|
|
711
|
-
|
|
702
|
+
_(
|
|
703
|
+
v.errorVisible,
|
|
704
|
+
() => u.div(
|
|
705
|
+
t.class("bc-auth-form__field-error"),
|
|
706
|
+
v.error.map((S) => S || "")
|
|
712
707
|
)
|
|
713
708
|
)
|
|
714
709
|
)
|
|
715
710
|
)
|
|
716
711
|
),
|
|
717
712
|
// Submit button
|
|
718
|
-
|
|
713
|
+
O(
|
|
719
714
|
{
|
|
720
715
|
type: "submit",
|
|
721
716
|
variant: "filled",
|
|
722
717
|
color: "primary",
|
|
723
|
-
loading:
|
|
718
|
+
loading: m,
|
|
724
719
|
disabled: h.disabledOrHasErrors
|
|
725
720
|
},
|
|
726
|
-
|
|
727
|
-
g(
|
|
721
|
+
t.class("bc-auth-form__submit"),
|
|
722
|
+
g(o?.signUpButton, y.$.signUpButton)
|
|
728
723
|
)
|
|
729
724
|
)
|
|
730
725
|
)
|
|
731
726
|
);
|
|
732
727
|
}
|
|
733
|
-
function
|
|
734
|
-
onResetPassword:
|
|
735
|
-
labels:
|
|
728
|
+
function _e({
|
|
729
|
+
onResetPassword: e,
|
|
730
|
+
labels: o = {}
|
|
736
731
|
}) {
|
|
737
|
-
const
|
|
738
|
-
schema:
|
|
732
|
+
const i = se(), l = E(!1), c = G({
|
|
733
|
+
schema: te,
|
|
739
734
|
submit: H({
|
|
740
|
-
task:
|
|
735
|
+
task: e,
|
|
741
736
|
message: "Reset password failed",
|
|
742
737
|
onStart: () => {
|
|
743
|
-
|
|
738
|
+
l.set(!0), c.controller.disable();
|
|
744
739
|
},
|
|
745
740
|
onEnd: () => {
|
|
746
|
-
|
|
741
|
+
l.set(!1), c.controller.enable();
|
|
747
742
|
}
|
|
748
743
|
}),
|
|
749
744
|
initialValue: {
|
|
750
745
|
email: ""
|
|
751
746
|
}
|
|
752
|
-
}), { controller:
|
|
753
|
-
|
|
754
|
-
const
|
|
755
|
-
return
|
|
756
|
-
|
|
757
|
-
}),
|
|
747
|
+
}), { controller: n, onSubmit: s } = c;
|
|
748
|
+
l.on(n.setDisabled);
|
|
749
|
+
const a = n.field("email");
|
|
750
|
+
return i.on((m) => {
|
|
751
|
+
m != null && a.change(m);
|
|
752
|
+
}), P(
|
|
758
753
|
x,
|
|
759
|
-
(
|
|
754
|
+
(m) => (
|
|
760
755
|
// Reset password form
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
756
|
+
u.form(
|
|
757
|
+
U(n.dispose, i.dispose, l.dispose),
|
|
758
|
+
t.class("bc-auth-form__form"),
|
|
764
759
|
// Description
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
g(
|
|
760
|
+
u.p(
|
|
761
|
+
t.class("bc-auth-form__description"),
|
|
762
|
+
g(o?.resetPasswordDescription, m.$.resetPasswordDescription)
|
|
768
763
|
),
|
|
769
|
-
T.submit(
|
|
764
|
+
T.submit(s),
|
|
770
765
|
q(
|
|
771
|
-
|
|
766
|
+
t.class("bc-auth-form__fields"),
|
|
772
767
|
// Email field
|
|
773
|
-
$(
|
|
774
|
-
controller:
|
|
775
|
-
label: g(
|
|
768
|
+
$(R, {
|
|
769
|
+
controller: a,
|
|
770
|
+
label: g(o?.emailLabel, m.$.emailLabel)
|
|
776
771
|
})
|
|
777
772
|
),
|
|
778
773
|
// Submit button
|
|
779
|
-
|
|
774
|
+
O(
|
|
780
775
|
{
|
|
781
|
-
loading:
|
|
776
|
+
loading: l,
|
|
782
777
|
type: "submit",
|
|
783
778
|
variant: "filled",
|
|
784
779
|
color: "primary",
|
|
785
|
-
disabled:
|
|
780
|
+
disabled: n.disabledOrHasErrors
|
|
786
781
|
},
|
|
787
|
-
|
|
788
|
-
g(
|
|
782
|
+
t.class("bc-auth-form__submit"),
|
|
783
|
+
g(o?.resetPasswordButton, m.$.resetPasswordButton)
|
|
789
784
|
)
|
|
790
785
|
)
|
|
791
786
|
)
|
|
792
787
|
);
|
|
793
788
|
}
|
|
794
789
|
function p({
|
|
795
|
-
provider:
|
|
796
|
-
onClick:
|
|
797
|
-
size:
|
|
798
|
-
name:
|
|
790
|
+
provider: e,
|
|
791
|
+
onClick: o,
|
|
792
|
+
size: i = "md",
|
|
793
|
+
name: l,
|
|
799
794
|
icon: c,
|
|
800
|
-
color:
|
|
801
|
-
flow:
|
|
802
|
-
labels:
|
|
795
|
+
color: n,
|
|
796
|
+
flow: s,
|
|
797
|
+
labels: a
|
|
803
798
|
}) {
|
|
804
|
-
return
|
|
799
|
+
return O(
|
|
805
800
|
{
|
|
806
801
|
type: "button",
|
|
807
802
|
variant: "filled",
|
|
808
|
-
size:
|
|
809
|
-
color:
|
|
803
|
+
size: i,
|
|
804
|
+
color: n,
|
|
810
805
|
onClick: async () => {
|
|
811
|
-
if (
|
|
806
|
+
if (o)
|
|
812
807
|
try {
|
|
813
|
-
|
|
814
|
-
} catch (
|
|
808
|
+
s === "popup" ? await o() : await o();
|
|
809
|
+
} catch (r) {
|
|
815
810
|
console.error(
|
|
816
|
-
`Social login error for ${
|
|
817
|
-
|
|
811
|
+
`Social login error for ${e} (${s || "redirect"} flow):`,
|
|
812
|
+
r
|
|
818
813
|
);
|
|
819
814
|
}
|
|
820
815
|
},
|
|
821
816
|
roundedness: "full"
|
|
822
817
|
},
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
f(
|
|
818
|
+
t.class("bc-social-login-button"),
|
|
819
|
+
t.class(
|
|
820
|
+
f(e)((r) => `bc-social-login-button--${r}`)
|
|
826
821
|
),
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
822
|
+
ue(
|
|
823
|
+
t.class("bu-items-center bu-w-full"),
|
|
824
|
+
me({ icon: c, size: i }, t.class("bu-bg-white bu-rounded-full bu-p-2")),
|
|
830
825
|
// Button text or custom children
|
|
831
|
-
|
|
826
|
+
P(
|
|
832
827
|
x,
|
|
833
|
-
(
|
|
834
|
-
|
|
828
|
+
(r) => u.span(
|
|
829
|
+
t.class(
|
|
835
830
|
"bu-flex-grow bu-flex bu-items-center bu-align-center bu-text-center bu-px-4"
|
|
836
831
|
),
|
|
837
|
-
|
|
838
|
-
g(
|
|
839
|
-
)(
|
|
832
|
+
ne(
|
|
833
|
+
g(a?.continueWithProvider, r.$.continueWithProvider)
|
|
834
|
+
)(l)
|
|
840
835
|
)
|
|
841
836
|
)
|
|
842
837
|
)
|
|
843
838
|
);
|
|
844
839
|
}
|
|
845
|
-
function
|
|
846
|
-
providers:
|
|
847
|
-
onProviderClick:
|
|
848
|
-
size:
|
|
849
|
-
className:
|
|
840
|
+
function Le({
|
|
841
|
+
providers: e,
|
|
842
|
+
onProviderClick: o,
|
|
843
|
+
size: i = "md",
|
|
844
|
+
className: l
|
|
850
845
|
}) {
|
|
851
846
|
return q(
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
847
|
+
t.class("bc-social-login-buttons bu-gap-2 bu-px-8"),
|
|
848
|
+
t.class(l),
|
|
849
|
+
re(
|
|
850
|
+
e,
|
|
856
851
|
(c) => p({
|
|
857
852
|
provider: c.$.provider,
|
|
858
853
|
flow: c.$.flow,
|
|
859
854
|
color: c.map(
|
|
860
|
-
({ provider:
|
|
855
|
+
({ provider: n }) => d[n].color
|
|
861
856
|
),
|
|
862
|
-
name: c.map(({ provider:
|
|
863
|
-
icon: c.map(({ provider:
|
|
857
|
+
name: c.map(({ provider: n }) => d[n].name),
|
|
858
|
+
icon: c.map(({ provider: n }) => d[n].icon),
|
|
864
859
|
onClick: async () => {
|
|
865
|
-
|
|
860
|
+
o && await o(c.$.provider.value);
|
|
866
861
|
},
|
|
867
|
-
size:
|
|
862
|
+
size: i
|
|
868
863
|
})
|
|
869
864
|
)
|
|
870
865
|
);
|
|
@@ -1000,332 +995,332 @@ const d = {
|
|
|
1000
995
|
color: "blue"
|
|
1001
996
|
// distinct deep blue tone (not Facebook’s exact blue)
|
|
1002
997
|
}
|
|
1003
|
-
},
|
|
1004
|
-
...
|
|
998
|
+
}, Ge = (e) => p({
|
|
999
|
+
...e,
|
|
1005
1000
|
...d.google,
|
|
1006
1001
|
provider: "google"
|
|
1007
|
-
}),
|
|
1008
|
-
...
|
|
1002
|
+
}), Re = (e) => p({
|
|
1003
|
+
...e,
|
|
1009
1004
|
...d.github,
|
|
1010
1005
|
provider: "github"
|
|
1011
|
-
}),
|
|
1012
|
-
...
|
|
1006
|
+
}), We = (e) => p({
|
|
1007
|
+
...e,
|
|
1013
1008
|
...d.apple,
|
|
1014
1009
|
provider: "apple"
|
|
1015
|
-
}),
|
|
1016
|
-
...
|
|
1010
|
+
}), Ne = (e) => p({
|
|
1011
|
+
...e,
|
|
1017
1012
|
...d.facebook,
|
|
1018
1013
|
provider: "facebook"
|
|
1019
|
-
}),
|
|
1020
|
-
...
|
|
1014
|
+
}), He = (e) => p({
|
|
1015
|
+
...e,
|
|
1021
1016
|
...d.x,
|
|
1022
1017
|
provider: "x"
|
|
1023
|
-
}),
|
|
1024
|
-
...
|
|
1018
|
+
}), je = (e) => p({
|
|
1019
|
+
...e,
|
|
1025
1020
|
...d.twitter,
|
|
1026
1021
|
provider: "twitter"
|
|
1027
|
-
}),
|
|
1028
|
-
...
|
|
1022
|
+
}), Xe = (e) => p({
|
|
1023
|
+
...e,
|
|
1029
1024
|
...d.microsoft,
|
|
1030
1025
|
provider: "microsoft"
|
|
1031
|
-
}),
|
|
1032
|
-
...
|
|
1026
|
+
}), Ye = (e) => p({
|
|
1027
|
+
...e,
|
|
1033
1028
|
...d.discord,
|
|
1034
1029
|
provider: "discord"
|
|
1035
|
-
}),
|
|
1036
|
-
...
|
|
1030
|
+
}), Ze = (e) => p({
|
|
1031
|
+
...e,
|
|
1037
1032
|
...d.linkedin,
|
|
1038
1033
|
provider: "linkedin"
|
|
1039
|
-
}),
|
|
1040
|
-
...
|
|
1034
|
+
}), Je = (e) => p({
|
|
1035
|
+
...e,
|
|
1041
1036
|
...d.instagram,
|
|
1042
1037
|
provider: "instagram"
|
|
1043
|
-
}),
|
|
1044
|
-
...
|
|
1038
|
+
}), Ke = (e) => p({
|
|
1039
|
+
...e,
|
|
1045
1040
|
...d.tiktok,
|
|
1046
1041
|
provider: "tiktok"
|
|
1047
|
-
}),
|
|
1048
|
-
...
|
|
1042
|
+
}), Qe = (e) => p({
|
|
1043
|
+
...e,
|
|
1049
1044
|
...d.snapchat,
|
|
1050
1045
|
provider: "snapchat"
|
|
1051
|
-
}),
|
|
1052
|
-
...
|
|
1046
|
+
}), eo = (e) => p({
|
|
1047
|
+
...e,
|
|
1053
1048
|
...d.reddit,
|
|
1054
1049
|
provider: "reddit"
|
|
1055
|
-
}),
|
|
1056
|
-
...
|
|
1050
|
+
}), oo = (e) => p({
|
|
1051
|
+
...e,
|
|
1057
1052
|
...d.pinterest,
|
|
1058
1053
|
provider: "pinterest"
|
|
1059
|
-
}),
|
|
1060
|
-
...
|
|
1054
|
+
}), to = (e) => p({
|
|
1055
|
+
...e,
|
|
1061
1056
|
...d.twitch,
|
|
1062
1057
|
provider: "twitch"
|
|
1063
|
-
}),
|
|
1064
|
-
...
|
|
1058
|
+
}), so = (e) => p({
|
|
1059
|
+
...e,
|
|
1065
1060
|
...d.steam,
|
|
1066
1061
|
provider: "steam"
|
|
1067
|
-
}),
|
|
1068
|
-
...
|
|
1062
|
+
}), ao = (e) => p({
|
|
1063
|
+
...e,
|
|
1069
1064
|
...d.epic,
|
|
1070
1065
|
provider: "epic"
|
|
1071
|
-
}),
|
|
1072
|
-
...
|
|
1066
|
+
}), no = (e) => p({
|
|
1067
|
+
...e,
|
|
1073
1068
|
...d.playstation,
|
|
1074
1069
|
provider: "playstation"
|
|
1075
|
-
}),
|
|
1076
|
-
...
|
|
1070
|
+
}), ro = (e) => p({
|
|
1071
|
+
...e,
|
|
1077
1072
|
...d.xbox,
|
|
1078
1073
|
provider: "xbox"
|
|
1079
|
-
}),
|
|
1080
|
-
...
|
|
1074
|
+
}), io = (e) => p({
|
|
1075
|
+
...e,
|
|
1081
1076
|
...d.whatsapp,
|
|
1082
1077
|
provider: "whatsapp"
|
|
1083
|
-
}),
|
|
1084
|
-
...
|
|
1078
|
+
}), co = (e) => p({
|
|
1079
|
+
...e,
|
|
1085
1080
|
...d.wechat,
|
|
1086
1081
|
provider: "wechat"
|
|
1087
|
-
}),
|
|
1088
|
-
...
|
|
1082
|
+
}), lo = (e) => p({
|
|
1083
|
+
...e,
|
|
1089
1084
|
...d.amazon,
|
|
1090
1085
|
provider: "amazon"
|
|
1091
|
-
}),
|
|
1092
|
-
...
|
|
1086
|
+
}), uo = (e) => p({
|
|
1087
|
+
...e,
|
|
1093
1088
|
...d.yahoo,
|
|
1094
1089
|
provider: "yahoo"
|
|
1095
|
-
}),
|
|
1096
|
-
...
|
|
1090
|
+
}), mo = (e) => p({
|
|
1091
|
+
...e,
|
|
1097
1092
|
...d.paypal,
|
|
1098
1093
|
provider: "paypal"
|
|
1099
1094
|
});
|
|
1100
|
-
function Q({ providers:
|
|
1095
|
+
function Q({ providers: e }) {
|
|
1101
1096
|
return q(
|
|
1102
|
-
|
|
1103
|
-
providers:
|
|
1097
|
+
Le({
|
|
1098
|
+
providers: e
|
|
1104
1099
|
})
|
|
1105
1100
|
);
|
|
1106
1101
|
}
|
|
1107
|
-
function
|
|
1108
|
-
mode:
|
|
1109
|
-
socialProviders:
|
|
1110
|
-
passwordRules:
|
|
1111
|
-
showRememberMe:
|
|
1102
|
+
function ke({
|
|
1103
|
+
mode: e,
|
|
1104
|
+
socialProviders: o,
|
|
1105
|
+
passwordRules: i,
|
|
1106
|
+
showRememberMe: l,
|
|
1112
1107
|
showSocialDivider: c,
|
|
1113
|
-
showPasswordStrength:
|
|
1114
|
-
labels:
|
|
1115
|
-
onSignIn:
|
|
1116
|
-
onSignUp:
|
|
1117
|
-
onResetPassword:
|
|
1118
|
-
onModeChange:
|
|
1108
|
+
showPasswordStrength: n,
|
|
1109
|
+
labels: s,
|
|
1110
|
+
onSignIn: a,
|
|
1111
|
+
onSignUp: m,
|
|
1112
|
+
onResetPassword: r,
|
|
1113
|
+
onModeChange: b,
|
|
1119
1114
|
// onSocialLogin,
|
|
1120
|
-
showContainer:
|
|
1115
|
+
showContainer: w
|
|
1121
1116
|
}, ...h) {
|
|
1122
|
-
const
|
|
1123
|
-
return
|
|
1124
|
-
function
|
|
1125
|
-
const
|
|
1126
|
-
return
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
T.click(() =>
|
|
1130
|
-
|
|
1117
|
+
const L = e != null ? J.deriveProp(e) : E("signin");
|
|
1118
|
+
return L.on((k) => b?.(k)), P(x, (k) => {
|
|
1119
|
+
function C() {
|
|
1120
|
+
const v = g(s?.hasAccountLink, k.$.hasAccountLink);
|
|
1121
|
+
return u.button(
|
|
1122
|
+
t.type("button"),
|
|
1123
|
+
t.class("bc-auth-form__link"),
|
|
1124
|
+
T.click(() => L.set("signin")),
|
|
1125
|
+
v
|
|
1131
1126
|
);
|
|
1132
1127
|
}
|
|
1133
|
-
function
|
|
1134
|
-
return
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
T.click(() =>
|
|
1138
|
-
g(
|
|
1128
|
+
function z() {
|
|
1129
|
+
return u.button(
|
|
1130
|
+
t.type("button"),
|
|
1131
|
+
t.class("bc-auth-form__link"),
|
|
1132
|
+
T.click(() => L.set("signup")),
|
|
1133
|
+
g(s?.noAccountLink, k.$.noAccountLink)
|
|
1139
1134
|
);
|
|
1140
1135
|
}
|
|
1141
|
-
function
|
|
1142
|
-
return
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
T.click(() =>
|
|
1146
|
-
g(
|
|
1136
|
+
function F() {
|
|
1137
|
+
return u.button(
|
|
1138
|
+
t.type("button"),
|
|
1139
|
+
t.class("bc-auth-form__link"),
|
|
1140
|
+
T.click(() => L.set("reset-password")),
|
|
1141
|
+
g(s?.forgotPasswordLink, k.$.forgotPasswordLink)
|
|
1147
1142
|
);
|
|
1148
1143
|
}
|
|
1149
|
-
return
|
|
1150
|
-
|
|
1144
|
+
return u.div(
|
|
1145
|
+
pe({
|
|
1151
1146
|
"bc-auth-container": !0,
|
|
1152
|
-
"bc-auth-container--styled": J.map(
|
|
1147
|
+
"bc-auth-container--styled": J.map(w ?? !0, (v) => v)
|
|
1153
1148
|
}),
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1149
|
+
t.class(L.map((v) => `bc-auth-container--${v}`)),
|
|
1150
|
+
t.class("bc-auth-form"),
|
|
1151
|
+
U(L.dispose),
|
|
1152
|
+
ie(L, {
|
|
1158
1153
|
signin: () => A(
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
g(
|
|
1154
|
+
u.h2(
|
|
1155
|
+
t.class("bc-auth-form__title"),
|
|
1156
|
+
g(s?.signInTitle, k.$.signInTitle)
|
|
1162
1157
|
),
|
|
1163
|
-
|
|
1164
|
-
Q({ providers:
|
|
1165
|
-
|
|
1158
|
+
o != null ? A(
|
|
1159
|
+
Q({ providers: o }),
|
|
1160
|
+
_(c ?? !1, ee)
|
|
1166
1161
|
) : null,
|
|
1167
|
-
|
|
1168
|
-
onSignIn:
|
|
1169
|
-
showRememberMe:
|
|
1170
|
-
passwordRules:
|
|
1162
|
+
fe({
|
|
1163
|
+
onSignIn: a,
|
|
1164
|
+
showRememberMe: l,
|
|
1165
|
+
passwordRules: i,
|
|
1171
1166
|
labels: {
|
|
1172
|
-
emailLabel:
|
|
1173
|
-
passwordLabel:
|
|
1174
|
-
rememberMeLabel:
|
|
1175
|
-
signInButton:
|
|
1176
|
-
forgotPasswordLink:
|
|
1177
|
-
noAccountLink:
|
|
1167
|
+
emailLabel: s?.emailLabel,
|
|
1168
|
+
passwordLabel: s?.passwordLabel,
|
|
1169
|
+
rememberMeLabel: s?.rememberMeLabel,
|
|
1170
|
+
signInButton: s?.signInButton,
|
|
1171
|
+
forgotPasswordLink: s?.forgotPasswordLink,
|
|
1172
|
+
noAccountLink: s?.noAccountLink
|
|
1178
1173
|
}
|
|
1179
1174
|
}),
|
|
1180
1175
|
q(
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1176
|
+
t.class("bc-auth-form__footer"),
|
|
1177
|
+
z(),
|
|
1178
|
+
F()
|
|
1184
1179
|
)
|
|
1185
1180
|
),
|
|
1186
1181
|
signup: () => A(
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
g(
|
|
1182
|
+
u.h2(
|
|
1183
|
+
t.class("bc-auth-form__title"),
|
|
1184
|
+
g(s?.signUpTitle, k.$.signUpTitle)
|
|
1190
1185
|
),
|
|
1191
|
-
|
|
1192
|
-
Q({ providers:
|
|
1193
|
-
|
|
1186
|
+
o != null ? A(
|
|
1187
|
+
Q({ providers: o }),
|
|
1188
|
+
_(c ?? !1, ee)
|
|
1194
1189
|
) : null,
|
|
1195
|
-
|
|
1190
|
+
we({
|
|
1196
1191
|
labels: {
|
|
1197
|
-
nameLabel:
|
|
1198
|
-
emailLabel:
|
|
1199
|
-
passwordLabel:
|
|
1200
|
-
confirmPasswordLabel:
|
|
1201
|
-
acceptTermsLabel:
|
|
1202
|
-
signUpButton:
|
|
1203
|
-
hasAccountLink:
|
|
1192
|
+
nameLabel: s?.nameLabel,
|
|
1193
|
+
emailLabel: s?.emailLabel,
|
|
1194
|
+
passwordLabel: s?.passwordLabel,
|
|
1195
|
+
confirmPasswordLabel: s?.confirmPasswordLabel,
|
|
1196
|
+
acceptTermsLabel: s?.acceptTermsLabel,
|
|
1197
|
+
signUpButton: s?.signUpButton,
|
|
1198
|
+
hasAccountLink: s?.hasAccountLink
|
|
1204
1199
|
},
|
|
1205
|
-
onSignUp:
|
|
1206
|
-
passwordRules:
|
|
1207
|
-
showPasswordStrength:
|
|
1200
|
+
onSignUp: m,
|
|
1201
|
+
passwordRules: i,
|
|
1202
|
+
showPasswordStrength: n
|
|
1208
1203
|
}),
|
|
1209
|
-
q(
|
|
1204
|
+
q(t.class("bc-auth-form__footer"), C())
|
|
1210
1205
|
),
|
|
1211
1206
|
"reset-password": () => A(
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
g(
|
|
1207
|
+
u.h2(
|
|
1208
|
+
t.class("bc-auth-form__title"),
|
|
1209
|
+
g(s?.resetPasswordTitle, k.$.resetPasswordTitle)
|
|
1215
1210
|
),
|
|
1216
|
-
|
|
1211
|
+
_e({
|
|
1217
1212
|
labels: {
|
|
1218
|
-
backToSignInLink:
|
|
1219
|
-
emailLabel:
|
|
1220
|
-
resetPasswordButton:
|
|
1221
|
-
resetPasswordDescription:
|
|
1213
|
+
backToSignInLink: s?.backToSignInLink,
|
|
1214
|
+
emailLabel: s?.emailLabel,
|
|
1215
|
+
resetPasswordButton: s?.resetPasswordButton,
|
|
1216
|
+
resetPasswordDescription: s?.resetPasswordDescription
|
|
1222
1217
|
},
|
|
1223
|
-
onResetPassword:
|
|
1218
|
+
onResetPassword: r
|
|
1224
1219
|
}),
|
|
1225
|
-
q(
|
|
1220
|
+
q(t.class("bc-auth-form__footer"), C())
|
|
1226
1221
|
)
|
|
1227
1222
|
}),
|
|
1228
1223
|
...h
|
|
1229
1224
|
);
|
|
1230
1225
|
});
|
|
1231
1226
|
}
|
|
1232
|
-
function
|
|
1233
|
-
return
|
|
1227
|
+
function po(e) {
|
|
1228
|
+
return de(
|
|
1234
1229
|
{
|
|
1235
1230
|
size: "sm",
|
|
1236
1231
|
dismissable: !0,
|
|
1237
1232
|
showCloseButton: !0
|
|
1238
1233
|
},
|
|
1239
|
-
(
|
|
1240
|
-
(
|
|
1241
|
-
body:
|
|
1242
|
-
header:
|
|
1234
|
+
(o, i) => e(
|
|
1235
|
+
(l) => o({
|
|
1236
|
+
body: ke({ showContainer: !1, ...l }),
|
|
1237
|
+
header: P(
|
|
1243
1238
|
x,
|
|
1244
|
-
(c) => g(
|
|
1239
|
+
(c) => g(l.modalTitle, c.$.authenticationTitle)
|
|
1245
1240
|
)
|
|
1246
1241
|
})
|
|
1247
1242
|
)
|
|
1248
1243
|
);
|
|
1249
1244
|
}
|
|
1250
|
-
function
|
|
1251
|
-
labels:
|
|
1252
|
-
className:
|
|
1245
|
+
function ee({
|
|
1246
|
+
labels: e,
|
|
1247
|
+
className: o
|
|
1253
1248
|
} = {}) {
|
|
1254
|
-
return
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1249
|
+
return u.div(
|
|
1250
|
+
t.class("bc-auth-divider"),
|
|
1251
|
+
t.class(o),
|
|
1252
|
+
u.div(t.class("bc-auth-divider__line")),
|
|
1253
|
+
P(
|
|
1259
1254
|
x,
|
|
1260
|
-
(
|
|
1261
|
-
|
|
1262
|
-
g(
|
|
1255
|
+
(i) => u.span(
|
|
1256
|
+
t.class("bc-auth-divider__text"),
|
|
1257
|
+
g(e?.text, i.$.orDivider)
|
|
1263
1258
|
)
|
|
1264
1259
|
),
|
|
1265
|
-
|
|
1260
|
+
u.div(t.class("bc-auth-divider__line"))
|
|
1266
1261
|
);
|
|
1267
1262
|
}
|
|
1268
1263
|
export {
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1264
|
+
lo as AmazonLoginButton,
|
|
1265
|
+
We as AppleLoginButton,
|
|
1266
|
+
ke as AuthContainer,
|
|
1267
|
+
ee as AuthDivider,
|
|
1268
|
+
po as AuthModal,
|
|
1269
|
+
Ye as DiscordLoginButton,
|
|
1270
|
+
ao as EpicLoginButton,
|
|
1271
|
+
Ne as FacebookLoginButton,
|
|
1272
|
+
Re as GitHubLoginButton,
|
|
1273
|
+
Ge as GoogleLoginButton,
|
|
1274
|
+
Je as InstagramLoginButton,
|
|
1275
|
+
Ze as LinkedInLoginButton,
|
|
1276
|
+
Xe as MicrosoftLoginButton,
|
|
1277
|
+
Me as PasswordStrengthBar,
|
|
1278
|
+
be as PasswordStrengthIndicator,
|
|
1279
|
+
De as PasswordStrengthText,
|
|
1280
|
+
mo as PayPalLoginButton,
|
|
1281
|
+
oo as PinterestLoginButton,
|
|
1282
|
+
no as PlayStationLoginButton,
|
|
1283
|
+
eo as RedditLoginButton,
|
|
1284
|
+
_e as ResetPasswordForm,
|
|
1285
|
+
fe as SignInForm,
|
|
1286
|
+
we as SignUpForm,
|
|
1287
|
+
Qe as SnapchatLoginButton,
|
|
1293
1288
|
p as SocialLoginButton,
|
|
1294
|
-
|
|
1289
|
+
Le as SocialLoginButtons,
|
|
1295
1290
|
Q as SocialProviders,
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1291
|
+
so as SteamLoginButton,
|
|
1292
|
+
Ke as TiktokLoginButton,
|
|
1293
|
+
to as TwitchLoginButton,
|
|
1294
|
+
je as TwitterLoginButton,
|
|
1295
|
+
co as WeChatLoginButton,
|
|
1296
|
+
io as WhatsAppLoginButton,
|
|
1297
|
+
He as XLoginButtin,
|
|
1298
|
+
ro as XboxLoginButton,
|
|
1299
|
+
uo as YahooLoginButton,
|
|
1300
|
+
Oe as authSchemas,
|
|
1306
1301
|
Z as calculatePasswordStrength,
|
|
1307
1302
|
j as createPasswordSchema,
|
|
1308
1303
|
X as createSignInSchema,
|
|
1309
1304
|
Y as createSignUpSchema,
|
|
1310
|
-
|
|
1305
|
+
Te as createSocialLoginUrl,
|
|
1311
1306
|
B as defaultPasswordRules,
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1307
|
+
Ee as defaultSignInSchema,
|
|
1308
|
+
Ue as defaultSignUpSchema,
|
|
1309
|
+
V as emailSchema,
|
|
1310
|
+
Ce as formatAuthError,
|
|
1311
|
+
he as formatProviderName,
|
|
1312
|
+
$e as formatSocialLoginText,
|
|
1313
|
+
ge as generateRandomString,
|
|
1314
|
+
Be as getProviderColor,
|
|
1315
|
+
qe as getProviderIcon,
|
|
1316
|
+
ze as isBrowser,
|
|
1317
|
+
Ie as isValidEmail,
|
|
1318
|
+
Ae as openSocialLoginPopup,
|
|
1319
|
+
N as providerInfo,
|
|
1325
1320
|
H as requestToControllerValidation,
|
|
1326
|
-
|
|
1321
|
+
te as resetPasswordSchema,
|
|
1327
1322
|
d as socialProviderInfo,
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1323
|
+
se as useAuthEmailProp,
|
|
1324
|
+
Ve as validateEmail,
|
|
1325
|
+
Fe as validatePassword
|
|
1331
1326
|
};
|