@tempots/beatui 1.6.1 → 1.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/auth/index.cjs.js +1 -1
  2. package/dist/auth/index.es.js +1 -1
  3. package/dist/auth-divider-CjcrgXmq.cjs +1 -0
  4. package/dist/{auth-divider-qnJuYK-x.js → auth-divider-D9KnNeyF.js} +239 -230
  5. package/dist/beatui.css +14 -0
  6. package/dist/beatui.tailwind.css +14 -0
  7. package/dist/better-auth/index.cjs.js +1 -1
  8. package/dist/better-auth/index.es.js +396 -347
  9. package/dist/{custom-validation-BetUqAEz.js → custom-validation-7por5nJN.js} +1 -1
  10. package/dist/{deep-merge-ZVigk5Qf.js → deep-merge-DT2H9AGq.js} +1 -1
  11. package/dist/{duration-input-GMBmT1BE.js → duration-input-D4V_PHIg.js} +1 -1
  12. package/dist/index.cjs.js +4 -4
  13. package/dist/index.es.js +2325 -2263
  14. package/dist/json-schema/index.es.js +5 -5
  15. package/dist/json-structure/index.es.js +3 -3
  16. package/dist/{notice-B6ojfenv.js → notice-CQGJyZ8o.js} +1 -1
  17. package/dist/types/better-auth/callbacks.d.ts +4 -4
  18. package/dist/types/better-auth/components/authenticated.d.ts +27 -2
  19. package/dist/types/better-auth/components/better-auth-container.d.ts +6 -0
  20. package/dist/types/better-auth/index.d.ts +2 -1
  21. package/dist/types/better-auth/provider.d.ts +1 -1
  22. package/dist/types/better-auth/types.d.ts +22 -0
  23. package/dist/types/components/auth/auth-email-prop.d.ts +6 -12
  24. package/dist/types/components/auth/types.d.ts +7 -6
  25. package/dist/types/components/auth/utils.d.ts +4 -2
  26. package/dist/types/components/query/index.d.ts +2 -0
  27. package/dist/types/components/query/query-data-source.d.ts +73 -0
  28. package/dist/types/components/query/query-data-table.d.ts +62 -0
  29. package/dist/types/index.d.ts +1 -0
  30. package/dist/{use-form-NfobsGNl.js → use-form-8NnZ-KHk.js} +9 -9
  31. package/dist/{widget-customization-BtkexHgm.js → widget-customization-BIBva3f-.js} +2 -2
  32. package/package.json +3 -3
  33. package/dist/auth-divider-DewHpITQ.cjs +0 -1
@@ -1,14 +1,14 @@
1
- import { localStorageProp as pe, prop as M, Use as x, html as m, attr as t, on as C, When as _, coalesce as g, Ensure as j, computedOf as b, bind as de, ForEach as he, Value as se, OneOfValue as ge, Fragment as U } from "@tempots/dom";
1
+ import { localStorageProp as pe, prop as M, Use as x, html as m, attr as t, on as A, When as _, coalesce as g, Ensure as j, computedOf as b, bind as de, ForEach as he, Value as se, OneOfValue as ge, Fragment as U } from "@tempots/dom";
2
2
  import { S as $ } from "./stack-BLMteGTn.js";
3
- import { t as fe, u as X, a as ce, b as z } from "./use-form-NfobsGNl.js";
4
- import { o as Y, b as G, s as A, M as be } from "./custom-validation-BetUqAEz.js";
3
+ import { t as fe, a as be, u as X, b as ce, c as z } from "./use-form-8NnZ-KHk.js";
4
+ import { o as Y, b as G, s as C, M as we } from "./custom-validation-7por5nJN.js";
5
5
  import { Validation as ne } from "@tempots/std";
6
6
  import { d as f, A as B } from "./translations-5cXBrENb.js";
7
- import { P as H, E as Z, N as J } from "./notice-B6ojfenv.js";
8
- import { B as N } from "./input-container-8JFB11xN.js";
9
- import { T as we } from "./text-input-NJypZSnE.js";
10
- import { I as _e } from "./translations-BCMP-h52.js";
11
- import { classes as Le } from "@tempots/ui";
7
+ import { P as H, E as Z, N as J } from "./notice-CQGJyZ8o.js";
8
+ import { B as V } from "./input-container-8JFB11xN.js";
9
+ import { T as _e } from "./text-input-NJypZSnE.js";
10
+ import { I as Le } from "./translations-BCMP-h52.js";
11
+ import { classes as ve } from "@tempots/ui";
12
12
  const K = {
13
13
  google: { name: "Google", icon: "logos:google-icon", color: "#4285f4" },
14
14
  github: { name: "GitHub", icon: "logos:github-icon", color: "#333" },
@@ -55,17 +55,17 @@ const K = {
55
55
  paypal: { name: "PayPal", icon: "logos:paypal", color: "#0070ba" },
56
56
  x: { name: "X", icon: "simple-icons:x", color: "#000" }
57
57
  };
58
- function ve(e) {
58
+ function ke(e) {
59
59
  return K[e]?.name || e;
60
60
  }
61
- function Ve(e) {
61
+ function De(e) {
62
62
  return K[e]?.icon || "mdi:account";
63
63
  }
64
- function De(e) {
64
+ function Oe(e) {
65
65
  return K[e]?.color || "#666";
66
66
  }
67
- function Fe(e, o = "Continue with {provider}") {
68
- return o.replace("{provider}", ve(e));
67
+ function We(e, o = "Continue with {provider}") {
68
+ return o.replace("{provider}", ke(e));
69
69
  }
70
70
  const T = {
71
71
  minLength: 8,
@@ -74,17 +74,17 @@ const T = {
74
74
  requireNumbers: !0,
75
75
  requireSymbols: !1
76
76
  };
77
- function Oe(e) {
77
+ function Ge(e) {
78
78
  return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
79
79
  }
80
- function ke(e = 32) {
80
+ function ye(e = 32) {
81
81
  const o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
82
82
  let n = "";
83
83
  for (let a = 0; a < e; a++)
84
84
  n += o.charAt(Math.floor(Math.random() * o.length));
85
85
  return n;
86
86
  }
87
- function We(e, o, n, a = [], c = {}) {
87
+ function He(e, o, n, a = [], l = {}) {
88
88
  const r = {
89
89
  google: "https://accounts.google.com/oauth/authorize",
90
90
  github: "https://github.com/login/oauth/authorize",
@@ -138,37 +138,37 @@ function We(e, o, n, a = [], c = {}) {
138
138
  }, s = r[e];
139
139
  if (!s)
140
140
  throw new Error(`Unsupported provider: ${e}`);
141
- const l = a.length > 0 ? a : u[e], i = ke(), h = new URLSearchParams({
141
+ const c = a.length > 0 ? a : u[e], i = ye(), h = new URLSearchParams({
142
142
  client_id: o,
143
143
  redirect_uri: n,
144
- scope: l.join(" "),
144
+ scope: c.join(" "),
145
145
  state: i,
146
146
  response_type: "code",
147
- ...c
147
+ ...l
148
148
  });
149
149
  return `${s}?${h.toString()}`;
150
150
  }
151
- function Ge(e, o, n, a) {
152
- const c = window.open(
151
+ function je(e, o, n, a) {
152
+ const l = window.open(
153
153
  e,
154
154
  `${o}_login`,
155
155
  "width=500,height=600,scrollbars=yes,resizable=yes"
156
156
  );
157
- if (!c) {
157
+ if (!l) {
158
158
  a?.(new Error("Failed to open popup window"));
159
159
  return;
160
160
  }
161
161
  const r = setInterval(() => {
162
- c.closed && (clearInterval(r), a?.(new Error("Login cancelled")));
162
+ l.closed && (clearInterval(r), a?.(new Error("Login cancelled")));
163
163
  }, 1e3), u = (s) => {
164
- s.origin === window.location.origin && (s.data.type === "SOCIAL_LOGIN_SUCCESS" ? (clearInterval(r), c.close(), window.removeEventListener("message", u), n?.(s.data.result)) : s.data.type === "SOCIAL_LOGIN_ERROR" && (clearInterval(r), c.close(), window.removeEventListener("message", u), a?.(new Error(s.data.error))));
164
+ s.origin === window.location.origin && (s.data.type === "SOCIAL_LOGIN_SUCCESS" ? (clearInterval(r), l.close(), window.removeEventListener("message", u), n?.(s.data.result)) : s.data.type === "SOCIAL_LOGIN_ERROR" && (clearInterval(r), l.close(), window.removeEventListener("message", u), a?.(new Error(s.data.error))));
165
165
  };
166
166
  window.addEventListener("message", u);
167
167
  }
168
- function He(e) {
168
+ function Xe(e) {
169
169
  return e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e ? String(e.message) : "An unexpected error occurred";
170
170
  }
171
- function je() {
171
+ function Se() {
172
172
  return typeof window < "u" && typeof document < "u";
173
173
  }
174
174
  function Q({
@@ -177,20 +177,29 @@ function Q({
177
177
  onStart: n,
178
178
  onEnd: a
179
179
  }) {
180
- return async (c) => {
180
+ return async (l) => {
181
181
  n?.();
182
182
  const r = await fe({
183
- task: e != null ? () => e(c) : async () => null,
183
+ task: e != null ? () => e(l) : async () => null,
184
184
  errorMessage: o,
185
185
  errorPath: ["root"],
186
- validation: (u) => u != null ? ne.invalid({ message: u }) : ne.valid
186
+ validation: (u) => {
187
+ if (u == null)
188
+ return ne.valid;
189
+ if (typeof u == "string")
190
+ return ne.invalid({ message: u });
191
+ const s = {};
192
+ for (const c of u)
193
+ s[c.field] = c.message;
194
+ return be.invalidFields(s);
195
+ }
187
196
  });
188
197
  return a?.(), r;
189
198
  };
190
199
  }
191
200
  function ee(e = T, o) {
192
201
  const n = o ?? f;
193
- let a = A();
202
+ let a = C();
194
203
  return e.minLength && (a = a.min(
195
204
  e.minLength,
196
205
  (n.passwordMinLength ?? f.passwordMinLength)(
@@ -208,41 +217,41 @@ function ee(e = T, o) {
208
217
  )), e.requireSymbols && (a = a.regex(
209
218
  /[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/,
210
219
  n.passwordRequireSpecialChar ?? f.passwordRequireSpecialChar
211
- )), e.customValidation && (a = a.refine((c) => e.customValidation(c))), a;
220
+ )), e.customValidation && (a = a.refine((l) => e.customValidation(l))), a;
212
221
  }
213
- function V(e) {
222
+ function N(e) {
214
223
  const o = e ?? f;
215
- return A().min(1, o.emailRequired ?? f.emailRequired).email(o.invalidEmail ?? f.invalidEmail);
224
+ return C().min(1, o.emailRequired ?? f.emailRequired).email(o.invalidEmail ?? f.invalidEmail);
216
225
  }
217
- const le = V();
226
+ const le = N();
218
227
  function oe(e, o) {
219
- const n = o ?? f, a = e ? ee(e, o) : A().refine(
220
- (c) => c.length > 0 ? null : n.passwordRequired ?? f.passwordRequired
228
+ const n = o ?? f, a = e ? ee(e, o) : C().refine(
229
+ (l) => l.length > 0 ? null : n.passwordRequired ?? f.passwordRequired
221
230
  );
222
231
  return Y({
223
- email: V(o),
232
+ email: N(o),
224
233
  password: a,
225
234
  rememberMe: G().default(!1)
226
235
  }).schema();
227
236
  }
228
237
  function te(e = T, o, n) {
229
- const a = n ?? f, c = ee(e, n), r = o?.showNameField !== !1, u = o?.showConfirmPassword !== !1, s = o?.showAcceptTermsAndConditions !== !1, l = {
230
- name: r ? A().min(1, a.nameRequired ?? f.nameRequired).optional() : A().optional(),
231
- email: V(n),
232
- password: c,
238
+ const a = n ?? f, l = ee(e, n), r = o?.showNameField !== !1, u = o?.showConfirmPassword !== !1, s = o?.showAcceptTermsAndConditions !== !1, c = {
239
+ name: r ? C().min(1, a.nameRequired ?? f.nameRequired).optional() : C().optional(),
240
+ email: N(n),
241
+ password: l,
233
242
  // Always require confirmPassword as string to match SignUpData interface
234
243
  // When not shown, it should accept any value (including empty string)
235
- confirmPassword: u ? A().min(
244
+ confirmPassword: u ? C().min(
236
245
  1,
237
246
  a.confirmPasswordRequired ?? f.confirmPasswordRequired
238
- ) : A(),
247
+ ) : C(),
239
248
  // Accept any string value when not shown
240
249
  acceptTerms: s ? G().refine(
241
250
  (h) => h === !0,
242
251
  a.acceptTermsRequired ?? f.acceptTermsRequired
243
252
  ) : G().default(!0)
244
253
  // Default to true when not shown
245
- }, i = Y(l);
254
+ }, i = Y(c);
246
255
  return u ? i.refine(
247
256
  (h) => h.password === h.confirmPassword ? null : a.passwordsDoNotMatch ?? f.passwordsDoNotMatch,
248
257
  { path: ["confirmPassword"] }
@@ -250,16 +259,16 @@ function te(e = T, o, n) {
250
259
  }
251
260
  const me = Y({
252
261
  email: le
253
- }).schema(), Xe = oe(), Ye = te(), Ze = {
262
+ }).schema(), Ye = oe(), Ze = te(), Je = {
254
263
  signIn: oe,
255
264
  signUp: te,
256
265
  resetPassword: () => me
257
266
  };
258
- function Je(e, o) {
259
- const n = o ?? f, c = (o ? V(o) : le).validate(e);
260
- return c.success ? null : c.errors[0]?.message || (n.invalidEmailAddress ?? f.invalidEmailAddress);
267
+ function Ke(e, o) {
268
+ const n = o ?? f, l = (o ? N(o) : le).validate(e);
269
+ return l.success ? null : l.errors[0]?.message || (n.invalidEmailAddress ?? f.invalidEmailAddress);
261
270
  }
262
- function Ke(e, o = T, n) {
271
+ function Qe(e, o = T, n) {
263
272
  const a = n ?? f, r = ee(o, n).validate(e);
264
273
  return r.success ? null : r.errors[0]?.message || (a.invalidPassword ?? f.invalidPassword);
265
274
  }
@@ -280,46 +289,46 @@ function ae(e, o = T) {
280
289
  o.requireNumbers,
281
290
  o.requireSymbols,
282
291
  !!o.customValidation
283
- ].filter(Boolean).length, c = [
292
+ ].filter(Boolean).length, l = [
284
293
  n.length,
285
294
  o.requireUppercase ? n.uppercase : null,
286
295
  o.requireLowercase ? n.lowercase : null,
287
296
  o.requireNumbers ? n.numbers : null,
288
297
  o.requireSymbols ? n.symbols : null,
289
298
  o.customValidation ? n.custom : null
290
- ].filter((s) => s === !0).length, r = a > 0 ? Math.round(c / a * 100) : 0;
299
+ ].filter((s) => s === !0).length, r = a > 0 ? Math.round(l / a * 100) : 0;
291
300
  let u;
292
301
  return r < 40 ? u = "weak" : r < 60 ? u = "fair" : r < 80 ? u = "good" : u = "strong", { strength: u, score: r, checks: n };
293
302
  }
294
- const ue = () => pe({
303
+ const ue = () => Se() ? pe({
295
304
  key: "bui_auth_email",
296
305
  defaultValue: null
297
- });
298
- function ye({
306
+ }) : M(null);
307
+ function qe({
299
308
  onSignIn: e,
300
309
  passwordRules: o,
301
310
  labels: n,
302
311
  showRememberMe: a
303
312
  }) {
304
- const c = M(!1), r = ue(), u = oe(o), s = X({
313
+ const l = M(!1), r = ue(), u = oe(o), s = X({
305
314
  schema: u,
306
315
  onSubmit: Q({
307
316
  task: e,
308
317
  message: "Sign in failed",
309
318
  onStart: () => {
310
- c.set(!0), s.controller.disable();
319
+ l.set(!0), s.controller.disable();
311
320
  },
312
321
  onEnd: () => {
313
- c.set(!1), s.controller.enable();
322
+ l.set(!1), s.controller.enable();
314
323
  }
315
324
  }),
316
325
  initialValue: {
317
326
  email: "",
318
327
  password: ""
319
328
  }
320
- }), { controller: l, submit: i } = s;
321
- c.on(l.setDisabled);
322
- const h = l.field("email"), L = l.field("password");
329
+ }), { controller: c, submit: i } = s;
330
+ l.on(c.setDisabled);
331
+ const h = c.field("email"), L = c.field("password");
323
332
  return r.on((v) => {
324
333
  v != null && h.change(v);
325
334
  }), h.signal.on((v) => {
@@ -330,11 +339,11 @@ function ye({
330
339
  // Email/Password form
331
340
  m.form(
332
341
  t.class("bc-auth-form__form"),
333
- C.submit(i),
342
+ A.submit(i),
334
343
  $(
335
344
  t.class("bc-auth-form__fields"),
336
345
  j(
337
- l.error,
346
+ c.error,
338
347
  (y) => J(
339
348
  { variant: "danger", tone: "prominent", role: "alert" },
340
349
  m.div(y)
@@ -371,13 +380,13 @@ function ye({
371
380
  )
372
381
  ),
373
382
  // Submit button
374
- N(
383
+ V(
375
384
  {
376
385
  type: "submit",
377
386
  variant: "filled",
378
387
  color: "primary",
379
- loading: c,
380
- disabled: l.disabledOrHasErrors
388
+ loading: l,
389
+ disabled: c.disabledOrHasErrors
381
390
  },
382
391
  t.class("bc-auth-form__submit"),
383
392
  g(n?.signInButton, v.$.signInButton)
@@ -386,13 +395,13 @@ function ye({
386
395
  )
387
396
  );
388
397
  }
389
- function Se({
398
+ function Pe({
390
399
  password: e,
391
400
  rules: o = T,
392
401
  showLabel: n = !0,
393
402
  className: a
394
403
  }) {
395
- const c = b(e)((i) => !i || i.length === 0 ? {
404
+ const l = b(e)((i) => !i || i.length === 0 ? {
396
405
  strength: "weak",
397
406
  score: 0,
398
407
  checks: {
@@ -403,7 +412,7 @@ function Se({
403
412
  symbols: !1,
404
413
  custom: !1
405
414
  }
406
- } : ae(i, o)), r = c.map((i) => i.strength), u = c.map((i) => i.score), s = c.map((i) => i.checks), l = b(
415
+ } : ae(i, o)), r = l.map((i) => i.strength), u = l.map((i) => i.score), s = l.map((i) => i.checks), c = b(
407
416
  r,
408
417
  a
409
418
  )((i, h) => [
@@ -412,7 +421,7 @@ function Se({
412
421
  h
413
422
  ].filter(Boolean).join(" "));
414
423
  return m.div(
415
- t.class(l),
424
+ t.class(c),
416
425
  // Strength bar
417
426
  m.div(
418
427
  t.class("bc-password-strength__bar"),
@@ -554,18 +563,18 @@ function Se({
554
563
  )
555
564
  );
556
565
  }
557
- function Qe({
566
+ function eo({
558
567
  password: e,
559
568
  rules: o = T,
560
569
  className: n
561
570
  }) {
562
- const a = b(e)((s) => !s || s.length === 0 ? { strength: "weak", score: 0 } : ae(s, o)), c = a.map((s) => s.strength), r = a.map((s) => s.score), u = b(
563
- c,
571
+ const a = b(e)((s) => !s || s.length === 0 ? { strength: "weak", score: 0 } : ae(s, o)), l = a.map((s) => s.strength), r = a.map((s) => s.score), u = b(
572
+ l,
564
573
  n
565
- )((s, l) => [
574
+ )((s, c) => [
566
575
  "bc-password-strength-bar",
567
576
  `bc-password-strength-bar--${s}`,
568
- l
577
+ c
569
578
  ].filter(Boolean).join(" "));
570
579
  return m.div(
571
580
  t.class(u),
@@ -575,12 +584,12 @@ function Qe({
575
584
  )
576
585
  );
577
586
  }
578
- function eo({
587
+ function oo({
579
588
  password: e,
580
589
  rules: o = T,
581
590
  className: n
582
591
  }) {
583
- const a = b(e)((r) => !r || r.length === 0 ? "weak" : ae(r, o).strength), c = b(
592
+ const a = b(e)((r) => !r || r.length === 0 ? "weak" : ae(r, o).strength), l = b(
584
593
  a,
585
594
  n
586
595
  )((r, u) => [
@@ -591,7 +600,7 @@ function eo({
591
600
  return x(
592
601
  B,
593
602
  (r) => m.span(
594
- t.class(c),
603
+ t.class(l),
595
604
  b(
596
605
  a,
597
606
  r
@@ -612,24 +621,24 @@ function eo({
612
621
  )
613
622
  );
614
623
  }
615
- function qe({
624
+ function xe({
616
625
  passwordRules: e,
617
626
  labels: o,
618
627
  initialEmail: n,
619
628
  initialName: a,
620
- showPasswordStrength: c,
629
+ showPasswordStrength: l,
621
630
  onSignUp: r,
622
631
  showNameField: u,
623
632
  showConfirmPassword: s,
624
- showAcceptTermsAndConditions: l,
633
+ showAcceptTermsAndConditions: c,
625
634
  termsAndConditions: i
626
635
  }) {
627
- const h = M(!1), L = e || T, v = typeof s == "boolean" ? s : s != null ? s.value : !1, y = typeof l == "boolean" ? l : l != null ? l.value : !1, D = te(L, {
636
+ const h = M(!1), L = e || T, v = typeof s == "boolean" ? s : s != null ? s.value : !1, y = typeof c == "boolean" ? c : c != null ? c.value : !1, F = te(L, {
628
637
  showNameField: u !== !1,
629
638
  showConfirmPassword: v,
630
639
  showAcceptTermsAndConditions: y
631
640
  }), E = X({
632
- schema: D,
641
+ schema: F,
633
642
  onSubmit: Q({
634
643
  task: r != null ? (k) => r({
635
644
  email: k.email,
@@ -652,7 +661,7 @@ function qe({
652
661
  confirmPassword: "",
653
662
  acceptTerms: !1
654
663
  }
655
- }), { controller: S, submit: F } = E;
664
+ }), { controller: S, submit: D } = E;
656
665
  h.on(S.setDisabled);
657
666
  const O = S.field("name"), W = S.field("email"), P = S.field("password"), q = S.field("confirmPassword"), I = S.field("acceptTerms");
658
667
  return x(
@@ -661,7 +670,7 @@ function qe({
661
670
  // Registration form
662
671
  m.form(
663
672
  t.class("bc-auth-form__form"),
664
- C.submit(F),
673
+ A.submit(D),
665
674
  $(
666
675
  t.class("bc-auth-form__fields"),
667
676
  j(
@@ -674,7 +683,7 @@ function qe({
674
683
  // Name field (optional)
675
684
  _(
676
685
  u !== !1,
677
- () => z(we, {
686
+ () => z(_e, {
678
687
  controller: O.transform(
679
688
  (w) => w ?? "",
680
689
  (w) => w === "" ? void 0 : w
@@ -694,8 +703,8 @@ function qe({
694
703
  }),
695
704
  // Password strength indicator
696
705
  _(
697
- c ?? !1,
698
- () => Se({
706
+ l ?? !1,
707
+ () => Pe({
699
708
  password: P.signal,
700
709
  rules: L,
701
710
  showLabel: !0
@@ -714,7 +723,7 @@ function qe({
714
723
  ),
715
724
  // Terms acceptance checkbox
716
725
  _(
717
- l ?? !1,
726
+ c ?? !1,
718
727
  () => m.div(
719
728
  t.class("bc-auth-form__terms"),
720
729
  m.label(
@@ -738,7 +747,7 @@ function qe({
738
747
  )
739
748
  ),
740
749
  // Submit button
741
- N(
750
+ V(
742
751
  {
743
752
  type: "submit",
744
753
  variant: "filled",
@@ -753,33 +762,33 @@ function qe({
753
762
  )
754
763
  );
755
764
  }
756
- function Pe({
765
+ function Be({
757
766
  onResetPassword: e,
758
767
  labels: o = {}
759
768
  }) {
760
- const n = ue(), a = M(!1), c = X({
769
+ const n = ue(), a = M(!1), l = X({
761
770
  schema: me,
762
771
  onSubmit: Q({
763
772
  task: e,
764
773
  message: "Reset password failed",
765
774
  onStart: () => {
766
- a.set(!0), c.controller.disable();
775
+ a.set(!0), l.controller.disable();
767
776
  },
768
777
  onEnd: () => {
769
- a.set(!1), c.controller.enable();
778
+ a.set(!1), l.controller.enable();
770
779
  }
771
780
  }),
772
781
  initialValue: {
773
782
  email: ""
774
783
  }
775
- }), { controller: r, submit: u } = c;
784
+ }), { controller: r, submit: u } = l;
776
785
  a.on(r.setDisabled);
777
786
  const s = r.field("email");
778
- return n.on((l) => {
779
- l != null && s.change(l);
787
+ return n.on((c) => {
788
+ c != null && s.change(c);
780
789
  }), x(
781
790
  B,
782
- (l) => (
791
+ (c) => (
783
792
  // Reset password form
784
793
  m.form(
785
794
  t.class("bc-auth-form__form"),
@@ -793,19 +802,19 @@ function Pe({
793
802
  // Description
794
803
  m.p(
795
804
  t.class("bc-auth-form__description"),
796
- g(o?.resetPasswordDescription, l.$.resetPasswordDescription)
805
+ g(o?.resetPasswordDescription, c.$.resetPasswordDescription)
797
806
  ),
798
- C.submit(u),
807
+ A.submit(u),
799
808
  $(
800
809
  t.class("bc-auth-form__fields"),
801
810
  // Email field
802
811
  z(Z, {
803
812
  controller: s,
804
- label: g(o?.emailLabel, l.$.emailLabel)
813
+ label: g(o?.emailLabel, c.$.emailLabel)
805
814
  })
806
815
  ),
807
816
  // Submit button
808
- N(
817
+ V(
809
818
  {
810
819
  loading: a,
811
820
  type: "submit",
@@ -814,7 +823,7 @@ function Pe({
814
823
  disabled: r.disabledOrHasErrors
815
824
  },
816
825
  t.class("bc-auth-form__submit"),
817
- g(o?.resetPasswordButton, l.$.resetPasswordButton)
826
+ g(o?.resetPasswordButton, c.$.resetPasswordButton)
818
827
  )
819
828
  )
820
829
  )
@@ -825,12 +834,12 @@ function d({
825
834
  onClick: o,
826
835
  size: n = "md",
827
836
  name: a,
828
- icon: c,
837
+ icon: l,
829
838
  color: r,
830
839
  flow: u,
831
840
  labels: s
832
841
  }) {
833
- return N(
842
+ return V(
834
843
  {
835
844
  type: "button",
836
845
  variant: "filled",
@@ -857,7 +866,7 @@ function d({
857
866
  t.class("bc-social-login-button__inner"),
858
867
  m.span(
859
868
  t.class("bc-social-login-button__icon"),
860
- _e({ icon: c, size: n }, t.class("bc-social-login-button__icon-inner"))
869
+ Le({ icon: l, size: n }, t.class("bc-social-login-button__icon-inner"))
861
870
  ),
862
871
  x(
863
872
  B,
@@ -871,7 +880,7 @@ function d({
871
880
  )
872
881
  );
873
882
  }
874
- function xe({
883
+ function $e({
875
884
  providers: e,
876
885
  onProviderClick: o,
877
886
  size: n = "md",
@@ -882,16 +891,16 @@ function xe({
882
891
  t.class(a),
883
892
  he(
884
893
  e,
885
- (c) => d({
886
- provider: c.$.provider,
887
- flow: c.$.flow,
888
- color: c.map(
894
+ (l) => d({
895
+ provider: l.$.provider,
896
+ flow: l.$.flow,
897
+ color: l.map(
889
898
  ({ provider: r }) => p[r].color
890
899
  ),
891
- name: c.map(({ provider: r }) => p[r].name),
892
- icon: c.map(({ provider: r }) => p[r].icon),
900
+ name: l.map(({ provider: r }) => p[r].name),
901
+ icon: l.map(({ provider: r }) => p[r].icon),
893
902
  onClick: async () => {
894
- o && await o(c.$.provider.value);
903
+ o && await o(l.$.provider.value);
895
904
  },
896
905
  size: n
897
906
  })
@@ -1029,99 +1038,99 @@ const p = {
1029
1038
  color: "blue"
1030
1039
  // distinct deep blue tone (not Facebook’s exact blue)
1031
1040
  }
1032
- }, oo = (e) => d({
1041
+ }, to = (e) => d({
1033
1042
  ...e,
1034
1043
  ...p.google,
1035
1044
  provider: "google"
1036
- }), to = (e) => d({
1045
+ }), ao = (e) => d({
1037
1046
  ...e,
1038
1047
  ...p.github,
1039
1048
  provider: "github"
1040
- }), ao = (e) => d({
1049
+ }), so = (e) => d({
1041
1050
  ...e,
1042
1051
  ...p.apple,
1043
1052
  provider: "apple"
1044
- }), so = (e) => d({
1053
+ }), no = (e) => d({
1045
1054
  ...e,
1046
1055
  ...p.facebook,
1047
1056
  provider: "facebook"
1048
- }), no = (e) => d({
1057
+ }), ro = (e) => d({
1049
1058
  ...e,
1050
1059
  ...p.x,
1051
1060
  provider: "x"
1052
- }), ro = (e) => d({
1061
+ }), io = (e) => d({
1053
1062
  ...e,
1054
1063
  ...p.twitter,
1055
1064
  provider: "twitter"
1056
- }), io = (e) => d({
1065
+ }), co = (e) => d({
1057
1066
  ...e,
1058
1067
  ...p.microsoft,
1059
1068
  provider: "microsoft"
1060
- }), co = (e) => d({
1069
+ }), lo = (e) => d({
1061
1070
  ...e,
1062
1071
  ...p.discord,
1063
1072
  provider: "discord"
1064
- }), lo = (e) => d({
1073
+ }), mo = (e) => d({
1065
1074
  ...e,
1066
1075
  ...p.linkedin,
1067
1076
  provider: "linkedin"
1068
- }), mo = (e) => d({
1077
+ }), uo = (e) => d({
1069
1078
  ...e,
1070
1079
  ...p.instagram,
1071
1080
  provider: "instagram"
1072
- }), uo = (e) => d({
1081
+ }), po = (e) => d({
1073
1082
  ...e,
1074
1083
  ...p.tiktok,
1075
1084
  provider: "tiktok"
1076
- }), po = (e) => d({
1085
+ }), ho = (e) => d({
1077
1086
  ...e,
1078
1087
  ...p.snapchat,
1079
1088
  provider: "snapchat"
1080
- }), ho = (e) => d({
1089
+ }), go = (e) => d({
1081
1090
  ...e,
1082
1091
  ...p.reddit,
1083
1092
  provider: "reddit"
1084
- }), go = (e) => d({
1093
+ }), fo = (e) => d({
1085
1094
  ...e,
1086
1095
  ...p.pinterest,
1087
1096
  provider: "pinterest"
1088
- }), fo = (e) => d({
1097
+ }), bo = (e) => d({
1089
1098
  ...e,
1090
1099
  ...p.twitch,
1091
1100
  provider: "twitch"
1092
- }), bo = (e) => d({
1101
+ }), wo = (e) => d({
1093
1102
  ...e,
1094
1103
  ...p.steam,
1095
1104
  provider: "steam"
1096
- }), wo = (e) => d({
1105
+ }), _o = (e) => d({
1097
1106
  ...e,
1098
1107
  ...p.epic,
1099
1108
  provider: "epic"
1100
- }), _o = (e) => d({
1109
+ }), Lo = (e) => d({
1101
1110
  ...e,
1102
1111
  ...p.playstation,
1103
1112
  provider: "playstation"
1104
- }), Lo = (e) => d({
1113
+ }), vo = (e) => d({
1105
1114
  ...e,
1106
1115
  ...p.xbox,
1107
1116
  provider: "xbox"
1108
- }), vo = (e) => d({
1117
+ }), ko = (e) => d({
1109
1118
  ...e,
1110
1119
  ...p.whatsapp,
1111
1120
  provider: "whatsapp"
1112
- }), ko = (e) => d({
1121
+ }), yo = (e) => d({
1113
1122
  ...e,
1114
1123
  ...p.wechat,
1115
1124
  provider: "wechat"
1116
- }), yo = (e) => d({
1125
+ }), So = (e) => d({
1117
1126
  ...e,
1118
1127
  ...p.amazon,
1119
1128
  provider: "amazon"
1120
- }), So = (e) => d({
1129
+ }), qo = (e) => d({
1121
1130
  ...e,
1122
1131
  ...p.yahoo,
1123
1132
  provider: "yahoo"
1124
- }), qo = (e) => d({
1133
+ }), Po = (e) => d({
1125
1134
  ...e,
1126
1135
  ...p.paypal,
1127
1136
  provider: "paypal"
@@ -1131,41 +1140,41 @@ function re({
1131
1140
  onSocialLogin: o
1132
1141
  }) {
1133
1142
  return $(
1134
- xe({
1143
+ $e({
1135
1144
  providers: e,
1136
1145
  onProviderClick: o
1137
1146
  })
1138
1147
  );
1139
1148
  }
1140
- function Be({
1149
+ function Te({
1141
1150
  mode: e,
1142
1151
  socialProviders: o,
1143
1152
  initialName: n,
1144
1153
  initialEmail: a,
1145
- passwordRules: c,
1154
+ passwordRules: l,
1146
1155
  showRememberMe: r,
1147
1156
  showSocialDivider: u,
1148
1157
  showPasswordStrength: s,
1149
- labels: l,
1158
+ labels: c,
1150
1159
  onSignIn: i,
1151
1160
  onSignUp: h,
1152
1161
  onResetPassword: L,
1153
1162
  onModeChange: v,
1154
1163
  onSocialLogin: y,
1155
- showContainer: D,
1164
+ showContainer: F,
1156
1165
  showNameField: E,
1157
1166
  showConfirmPassword: S,
1158
- showAcceptTermsAndConditions: F,
1167
+ showAcceptTermsAndConditions: D,
1159
1168
  termsAndConditions: O
1160
1169
  }, ...W) {
1161
1170
  const P = e != null ? se.deriveProp(e) : M("signin");
1162
1171
  return P.on((q) => v?.(q)), x(B, (q) => {
1163
1172
  function I() {
1164
- const R = g(l?.hasAccountLink, q.$.hasAccountLink);
1173
+ const R = g(c?.hasAccountLink, q.$.hasAccountLink);
1165
1174
  return m.button(
1166
1175
  t.type("button"),
1167
1176
  t.class("bc-auth-form__link"),
1168
- C.click(() => P.set("signin")),
1177
+ A.click(() => P.set("signin")),
1169
1178
  R
1170
1179
  );
1171
1180
  }
@@ -1173,22 +1182,22 @@ function Be({
1173
1182
  return m.button(
1174
1183
  t.type("button"),
1175
1184
  t.class("bc-auth-form__link"),
1176
- C.click(() => P.set("signup")),
1177
- g(l?.noAccountLink, q.$.noAccountLink)
1185
+ A.click(() => P.set("signup")),
1186
+ g(c?.noAccountLink, q.$.noAccountLink)
1178
1187
  );
1179
1188
  }
1180
1189
  function w() {
1181
1190
  return m.button(
1182
1191
  t.type("button"),
1183
1192
  t.class("bc-auth-form__link"),
1184
- C.click(() => P.set("reset-password")),
1185
- g(l?.forgotPasswordLink, q.$.forgotPasswordLink)
1193
+ A.click(() => P.set("reset-password")),
1194
+ g(c?.forgotPasswordLink, q.$.forgotPasswordLink)
1186
1195
  );
1187
1196
  }
1188
1197
  return m.div(
1189
- Le({
1198
+ ve({
1190
1199
  "bc-auth-container": !0,
1191
- "bc-auth-container--styled": se.map(D ?? !0, (R) => R)
1200
+ "bc-auth-container--styled": se.map(F ?? !0, (R) => R)
1192
1201
  }),
1193
1202
  t.class(P.map((R) => `bc-auth-container--${R}`)),
1194
1203
  t.class("bc-auth-form"),
@@ -1196,7 +1205,7 @@ function Be({
1196
1205
  signin: () => U(
1197
1206
  m.h2(
1198
1207
  t.class("bc-auth-form__title"),
1199
- g(l?.signInTitle, q.$.signInTitle)
1208
+ g(c?.signInTitle, q.$.signInTitle)
1200
1209
  ),
1201
1210
  o != null ? U(
1202
1211
  re({
@@ -1205,17 +1214,17 @@ function Be({
1205
1214
  }),
1206
1215
  _(u ?? !1, ie)
1207
1216
  ) : null,
1208
- ye({
1217
+ qe({
1209
1218
  onSignIn: i,
1210
1219
  showRememberMe: r,
1211
- passwordRules: c,
1220
+ passwordRules: l,
1212
1221
  labels: {
1213
- emailLabel: l?.emailLabel,
1214
- passwordLabel: l?.passwordLabel,
1215
- rememberMeLabel: l?.rememberMeLabel,
1216
- signInButton: l?.signInButton,
1217
- forgotPasswordLink: l?.forgotPasswordLink,
1218
- noAccountLink: l?.noAccountLink
1222
+ emailLabel: c?.emailLabel,
1223
+ passwordLabel: c?.passwordLabel,
1224
+ rememberMeLabel: c?.rememberMeLabel,
1225
+ signInButton: c?.signInButton,
1226
+ forgotPasswordLink: c?.forgotPasswordLink,
1227
+ noAccountLink: c?.noAccountLink
1219
1228
  }
1220
1229
  }),
1221
1230
  $(
@@ -1227,7 +1236,7 @@ function Be({
1227
1236
  signup: () => U(
1228
1237
  m.h2(
1229
1238
  t.class("bc-auth-form__title"),
1230
- g(l?.signUpTitle, q.$.signUpTitle)
1239
+ g(c?.signUpTitle, q.$.signUpTitle)
1231
1240
  ),
1232
1241
  o != null ? U(
1233
1242
  re({
@@ -1236,24 +1245,24 @@ function Be({
1236
1245
  }),
1237
1246
  _(u ?? !1, ie)
1238
1247
  ) : null,
1239
- qe({
1248
+ xe({
1240
1249
  labels: {
1241
- nameLabel: l?.nameLabel,
1242
- emailLabel: l?.emailLabel,
1243
- passwordLabel: l?.passwordLabel,
1244
- confirmPasswordLabel: l?.confirmPasswordLabel,
1245
- acceptTermsLabel: l?.acceptTermsLabel,
1246
- signUpButton: l?.signUpButton,
1247
- hasAccountLink: l?.hasAccountLink
1250
+ nameLabel: c?.nameLabel,
1251
+ emailLabel: c?.emailLabel,
1252
+ passwordLabel: c?.passwordLabel,
1253
+ confirmPasswordLabel: c?.confirmPasswordLabel,
1254
+ acceptTermsLabel: c?.acceptTermsLabel,
1255
+ signUpButton: c?.signUpButton,
1256
+ hasAccountLink: c?.hasAccountLink
1248
1257
  },
1249
1258
  initialEmail: a,
1250
1259
  initialName: n,
1251
1260
  onSignUp: h,
1252
- passwordRules: c,
1261
+ passwordRules: l,
1253
1262
  showPasswordStrength: s,
1254
1263
  showNameField: E,
1255
1264
  showConfirmPassword: S,
1256
- showAcceptTermsAndConditions: F,
1265
+ showAcceptTermsAndConditions: D,
1257
1266
  termsAndConditions: O
1258
1267
  }),
1259
1268
  $(t.class("bc-auth-form__footer"), I())
@@ -1261,14 +1270,14 @@ function Be({
1261
1270
  "reset-password": () => U(
1262
1271
  m.h2(
1263
1272
  t.class("bc-auth-form__title"),
1264
- g(l?.resetPasswordTitle, q.$.resetPasswordTitle)
1273
+ g(c?.resetPasswordTitle, q.$.resetPasswordTitle)
1265
1274
  ),
1266
- Pe({
1275
+ Be({
1267
1276
  labels: {
1268
- backToSignInLink: l?.backToSignInLink,
1269
- emailLabel: l?.emailLabel,
1270
- resetPasswordButton: l?.resetPasswordButton,
1271
- resetPasswordDescription: l?.resetPasswordDescription
1277
+ backToSignInLink: c?.backToSignInLink,
1278
+ emailLabel: c?.emailLabel,
1279
+ resetPasswordButton: c?.resetPasswordButton,
1280
+ resetPasswordDescription: c?.resetPasswordDescription
1272
1281
  },
1273
1282
  onResetPassword: L
1274
1283
  }),
@@ -1279,8 +1288,8 @@ function Be({
1279
1288
  );
1280
1289
  });
1281
1290
  }
1282
- function Po(e) {
1283
- return be(
1291
+ function xo(e) {
1292
+ return we(
1284
1293
  {
1285
1294
  size: "sm",
1286
1295
  dismissable: !0,
@@ -1288,10 +1297,10 @@ function Po(e) {
1288
1297
  },
1289
1298
  (o, n) => e(
1290
1299
  (a) => o({
1291
- body: Be({ showContainer: !1, ...a }),
1300
+ body: Te({ showContainer: !1, ...a }),
1292
1301
  header: x(
1293
1302
  B,
1294
- (c) => g(a.modalTitle, c.$.authenticationTitle)
1303
+ (l) => g(a.modalTitle, l.$.authenticationTitle)
1295
1304
  )
1296
1305
  })
1297
1306
  )
@@ -1316,67 +1325,67 @@ function ie({
1316
1325
  );
1317
1326
  }
1318
1327
  export {
1319
- je as $,
1320
- yo as A,
1328
+ Se as $,
1329
+ So as A,
1321
1330
  te as B,
1322
- We as C,
1323
- co as D,
1324
- wo as E,
1325
- so as F,
1326
- to as G,
1331
+ He as C,
1332
+ lo as D,
1333
+ _o as E,
1334
+ no as F,
1335
+ ao as G,
1327
1336
  T as H,
1328
- mo as I,
1329
- Xe as J,
1330
- Ye as K,
1331
- lo as L,
1332
- io as M,
1337
+ uo as I,
1338
+ Ye as J,
1339
+ Ze as K,
1340
+ mo as L,
1341
+ co as M,
1333
1342
  le as N,
1334
- He as O,
1335
- Qe as P,
1336
- ve as Q,
1337
- ho as R,
1338
- ye as S,
1339
- uo as T,
1340
- Fe as U,
1341
- ke as V,
1342
- ko as W,
1343
- no as X,
1344
- So as Y,
1345
- De as Z,
1346
- Ve as _,
1347
- ao as a,
1348
- Oe as a0,
1349
- Ge as a1,
1343
+ Xe as O,
1344
+ eo as P,
1345
+ ke as Q,
1346
+ go as R,
1347
+ qe as S,
1348
+ po as T,
1349
+ We as U,
1350
+ ye as V,
1351
+ yo as W,
1352
+ ro as X,
1353
+ qo as Y,
1354
+ Oe as Z,
1355
+ De as _,
1356
+ so as a,
1357
+ Ge as a0,
1358
+ je as a1,
1350
1359
  K as a2,
1351
1360
  Q as a3,
1352
1361
  me as a4,
1353
1362
  p as a5,
1354
1363
  ue as a6,
1355
- Je as a7,
1356
- Ke as a8,
1357
- Be as b,
1364
+ Ke as a7,
1365
+ Qe as a8,
1366
+ Te as b,
1358
1367
  ie as c,
1359
- Po as d,
1360
- oo as e,
1361
- Se as f,
1362
- eo as g,
1363
- qo as h,
1364
- go as i,
1365
- _o as j,
1366
- Pe as k,
1367
- qe as l,
1368
- po as m,
1368
+ xo as d,
1369
+ to as e,
1370
+ Pe as f,
1371
+ oo as g,
1372
+ Po as h,
1373
+ fo as i,
1374
+ Lo as j,
1375
+ Be as k,
1376
+ xe as l,
1377
+ ho as m,
1369
1378
  d as n,
1370
- xe as o,
1379
+ $e as o,
1371
1380
  re as p,
1372
- bo as q,
1373
- fo as r,
1374
- ro as s,
1375
- vo as t,
1376
- Lo as u,
1377
- Ze as v,
1381
+ wo as q,
1382
+ bo as r,
1383
+ io as s,
1384
+ ko as t,
1385
+ vo as u,
1386
+ Je as v,
1378
1387
  ae as w,
1379
- V as x,
1388
+ N as x,
1380
1389
  ee as y,
1381
1390
  oe as z
1382
1391
  };