@tempots/beatui 0.81.0 → 0.82.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.
- package/dist/_commonjsHelpers-DKOUU3wS.cjs +1 -0
- package/dist/_commonjsHelpers-DaMA6jEr.js +8 -0
- package/dist/{ar-DwHLVgKj.cjs → ar-D7CXDmVZ.cjs} +1 -1
- package/dist/{ar-Bo_FZZi7.js → ar-nOSKXpIW.js} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +63 -1349
- package/dist/auth-divider-BqZPH1-z.cjs +1 -0
- package/dist/auth-divider-Wr-S16kF.js +1355 -0
- package/dist/beatui.css +2035 -295
- package/dist/beatui.tailwind.css +2036 -296
- package/dist/better-auth/index.cjs.js +1 -0
- package/dist/better-auth/index.es.js +754 -0
- package/dist/{de-zI5mdV4M.cjs → de-WzsOu9Gn.cjs} +1 -1
- package/dist/{de-CCqwOkqN.js → de-f2xcEb34.js} +1 -1
- package/dist/{deep-merge-1uN6CG6K.js → deep-merge-BYm0y62g.js} +271 -285
- package/dist/deep-merge-d7sf0xmN.cjs +1 -0
- package/dist/duration-input-B9UNmUCh.cjs +1 -0
- package/dist/{duration-input-C9kpsw-t.js → duration-input-DqcJbxKD.js} +31 -29
- package/dist/editor-toolbar-group--a-xgsJw.cjs +1 -0
- package/dist/editor-toolbar-group-CVpl5mxF.js +31 -0
- package/dist/{es-BF02UrPL.js → es-CDqqzpCw.js} +1 -1
- package/dist/{es-Cw90CAbu.cjs → es-Ds2Xf3wV.cjs} +1 -1
- package/dist/{fa-DPQV4YB8.js → fa-C7tE_hR3.js} +1 -1
- package/dist/{fa-B4lssnzR.cjs → fa-Ct1UtDB7.cjs} +1 -1
- package/dist/{fr-1Kd6z1F-.cjs → fr-CzAkRFed.cjs} +1 -1
- package/dist/{fr-dmxPhwkD.js → fr-yOW_68YY.js} +1 -1
- package/dist/{he-BtQbrVt3.js → he-D2oUloCJ.js} +1 -1
- package/dist/{he-CJ3XnuPm.cjs → he-DlXALrK7.cjs} +1 -1
- package/dist/{hi-BpfnFKHp.cjs → hi-3dBhLwDs.cjs} +1 -1
- package/dist/{hi-D_Le4Yka.js → hi-D5ZlZoQq.js} +1 -1
- package/dist/{hls.light.min-Bhrf47iR.cjs → hls.light.min-C6xKDzRR.cjs} +1 -1
- package/dist/{hls.light.min-C6VwviEa.js → hls.light.min-hEMf_E8u.js} +1 -1
- package/dist/{index-CfaWytS2.cjs → index-05UbKOYe.cjs} +1 -1
- package/dist/{index-K6u33-GC.cjs → index-Bt7FYl80.cjs} +19 -19
- package/dist/{index-YtW7SCWB.js → index-C2Lq1m45.js} +1434 -1463
- package/dist/{index-CGEzILlC.js → index-lYhXnu6I.js} +1 -1
- package/dist/index.cjs.js +4 -4
- package/dist/index.es.js +2389 -2738
- package/dist/input-container-C6qEIjcA.cjs +1 -0
- package/dist/input-container-DiCjOzR2.js +247 -0
- package/dist/{it-DyHjSuHN.js → it-6e6X-4BB.js} +1 -1
- package/dist/{it-COCZ9NyB.cjs → it-DohtcWi9.cjs} +1 -1
- package/dist/{ja-X43lABza.js → ja-BxNuNo2H.js} +1 -1
- package/dist/{ja--NdggLU9.cjs → ja-eyTArrgS.cjs} +1 -1
- package/dist/json-schema/index.cjs.js +1 -8
- package/dist/json-schema/index.es.js +1359 -7608
- package/dist/json-schema-display/index.cjs.js +1 -0
- package/dist/json-schema-display/index.es.js +846 -0
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +542 -698
- package/dist/{ko-BUvb0ggK.cjs → ko-BFLCDMMs.cjs} +1 -1
- package/dist/{ko-B9g9iw99.js → ko-Ch0jFsBV.js} +1 -1
- package/dist/lexical/index.cjs.js +46 -0
- package/dist/lexical/index.es.js +21370 -0
- package/dist/lexical.css +1124 -0
- package/dist/menu-CZzRsQP_.js +372 -0
- package/dist/menu-ClrU72xH.cjs +1 -0
- package/dist/modal-I5srcntN.cjs +1 -0
- package/dist/modal-v3u2Fpnd.js +488 -0
- package/dist/{nl-0S25Gsld.cjs → nl-Bx2ACvr4.cjs} +1 -1
- package/dist/{nl-Ew5jnSsT.js → nl-NuTdZO1s.js} +1 -1
- package/dist/{notice-C-964yaY.js → notice-BuZvdvZh.js} +84 -82
- package/dist/notice-CLDdy1MW.cjs +1 -0
- package/dist/oneof-branch-detection-DsM1K5xc.cjs +8 -0
- package/dist/oneof-branch-detection-Dt8ss9lc.js +6281 -0
- package/dist/{pl-C9f6UBSe.js → pl-Bs4nLJ__.js} +1 -1
- package/dist/{pl-B3k-K3S4.cjs → pl-QHl6sl8f.cjs} +1 -1
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-DYtAvbrw.js → pt-BETjHZrL.js} +1 -1
- package/dist/{pt-CKoikRO5.cjs → pt-DZGw2Z-1.cjs} +1 -1
- package/dist/{ru-ZexN-b8V.js → ru-Bi1_DEKM.js} +1 -1
- package/dist/{ru-COb7RSDt.cjs → ru-D03IuLqh.cjs} +1 -1
- package/dist/session-id-3KiilioY.js +8 -0
- package/dist/session-id-B5lJMzbB.cjs +1 -0
- package/dist/stack-BJgsPJ9A.js +873 -0
- package/dist/stack-DcZ_u50f.cjs +1 -0
- package/dist/string-B9vVyfq3.cjs +1 -0
- package/dist/string-DYyMxBl-.js +19 -0
- package/dist/styles-url-B2dzXrYt.cjs +1 -0
- package/dist/styles-url-Cw_mxshe.js +4 -0
- package/dist/text-input-B3VBat1k.js +44 -0
- package/dist/text-input-Ds8e7Z1G.cjs +1 -0
- package/dist/{toolbar-DNpBIoJo.js → toolbar-D994_E_s.js} +4 -4
- package/dist/toolbar-x0_8lmKu.cjs +1 -0
- package/dist/{tr-tO_EH-Y2.cjs → tr-B_-_1wua.cjs} +1 -1
- package/dist/{tr-BDvn05-H.js → tr-DiYB-FwX.js} +1 -1
- package/dist/translations-B4-Zd2LM.cjs +1 -0
- package/dist/translations-Cq8bUKJP.js +584 -0
- package/dist/{translations-DwGC_94w.cjs → translations-D62qqNV9.cjs} +1 -1
- package/dist/{translations-CfWR4loD.js → translations-DPr6c05Z.js} +1 -1
- package/dist/types/better-auth/bridge.d.ts +2 -0
- package/dist/types/better-auth/callbacks.d.ts +6 -0
- package/dist/types/better-auth/components/authenticated.d.ts +4 -0
- package/dist/types/better-auth/components/better-auth-container.d.ts +4 -0
- package/dist/types/better-auth/components/better-auth-modal.d.ts +4 -0
- package/dist/types/better-auth/components/magic-link-form.d.ts +7 -0
- package/dist/types/better-auth/components/passkey-management.d.ts +6 -0
- package/dist/types/better-auth/components/passkey-signin.d.ts +12 -0
- package/dist/types/better-auth/components/two-factor-setup.d.ts +8 -0
- package/dist/types/better-auth/components/two-factor-verify.d.ts +10 -0
- package/dist/types/better-auth/i18n/default.d.ts +29 -0
- package/dist/types/better-auth/i18n/locales/en.d.ts +28 -0
- package/dist/types/better-auth/i18n/translations.d.ts +27 -0
- package/dist/types/better-auth/index.d.ts +22 -0
- package/dist/types/better-auth/provider.d.ts +6 -0
- package/dist/types/better-auth/session.d.ts +14 -0
- package/dist/types/better-auth/social-mapping.d.ts +2 -0
- package/dist/types/better-auth/types.d.ts +164 -0
- package/dist/types/components/auth/auth-container.d.ts +1 -1
- package/dist/types/components/auth/social-providers.d.ts +1 -1
- package/dist/types/components/auth/types.d.ts +2 -0
- package/dist/types/components/editor-toolbar/editor-toolbar-button.d.ts +16 -0
- package/dist/types/components/editor-toolbar/editor-toolbar-group.d.ts +9 -0
- package/dist/types/components/editor-toolbar/index.d.ts +2 -0
- package/dist/types/components/json-schema-display/display-widget-customization.d.ts +61 -0
- package/dist/types/components/json-schema-display/display-wrapper.d.ts +14 -0
- package/dist/types/components/json-schema-display/displays/any-display.d.ts +14 -0
- package/dist/types/components/json-schema-display/displays/array-display.d.ts +13 -0
- package/dist/types/components/json-schema-display/displays/boolean-display.d.ts +13 -0
- package/dist/types/components/json-schema-display/displays/composition-display.d.ts +14 -0
- package/dist/types/components/json-schema-display/displays/enum-const-display.d.ts +13 -0
- package/dist/types/components/json-schema-display/displays/generic-display.d.ts +18 -0
- package/dist/types/components/json-schema-display/displays/null-display.d.ts +13 -0
- package/dist/types/components/json-schema-display/displays/number-display.d.ts +13 -0
- package/dist/types/components/json-schema-display/displays/object-display.d.ts +13 -0
- package/dist/types/components/json-schema-display/displays/string-display.d.ts +14 -0
- package/dist/types/components/json-schema-display/index.d.ts +14 -0
- package/dist/types/components/json-schema-display/json-schema-display.d.ts +25 -0
- package/dist/types/components/json-schema-display/mismatch.d.ts +14 -0
- package/dist/types/components/json-structure/controls/control-utils.d.ts +19 -0
- package/dist/types/components/json-structure/controls/index.d.ts +1 -0
- package/dist/types/components/lexical/bare-editor.d.ts +29 -0
- package/dist/types/components/lexical/code/index.d.ts +1 -0
- package/dist/types/components/lexical/code/language-selector.d.ts +13 -0
- package/dist/types/components/lexical/contextual-editor.d.ts +22 -0
- package/dist/types/components/lexical/docked-editor.d.ts +23 -0
- package/dist/types/components/lexical/floating/block-handle.d.ts +16 -0
- package/dist/types/components/lexical/floating/floating-toolbar.d.ts +12 -0
- package/dist/types/components/lexical/floating/index.d.ts +6 -0
- package/dist/types/components/lexical/floating/slash-command-palette.d.ts +20 -0
- package/dist/types/components/lexical/index.d.ts +8 -0
- package/dist/types/components/lexical/lexical-editor-input.d.ts +30 -0
- package/dist/types/components/lexical/table/index.d.ts +1 -0
- package/dist/types/components/lexical/table/table-controls.d.ts +12 -0
- package/dist/types/components/lexical/toolbar/index.d.ts +6 -0
- package/dist/types/components/lexical/toolbar/lexical-toolbar.d.ts +12 -0
- package/dist/types/components/lexical/toolbar/toolbar-button.d.ts +1 -0
- package/dist/types/components/lexical/toolbar/toolbar-group.d.ts +1 -0
- package/dist/types/components/lexical/toolbar/toolbar-helpers.d.ts +30 -0
- package/dist/types/components/prosemirror/etoolbar-button.d.ts +1 -11
- package/dist/types/components/prosemirror/etoolbar-group.d.ts +1 -4
- package/dist/types/json-schema-display/index.d.ts +1 -0
- package/dist/types/lexical/commands/index.d.ts +17 -0
- package/dist/types/lexical/headless.d.ts +39 -0
- package/dist/types/lexical/horizontal-rule-node.d.ts +20 -0
- package/dist/types/lexical/index.d.ts +20 -0
- package/dist/types/lexical/lazy-loader.d.ts +35 -0
- package/dist/types/lexical/nodes.d.ts +29 -0
- package/dist/types/lexical/plugins/auto-link.d.ts +7 -0
- package/dist/types/lexical/plugins/clipboard.d.ts +11 -0
- package/dist/types/lexical/plugins/code-shiki.d.ts +11 -0
- package/dist/types/lexical/plugins/code.d.ts +7 -0
- package/dist/types/lexical/plugins/dragon.d.ts +6 -0
- package/dist/types/lexical/plugins/file-io.d.ts +10 -0
- package/dist/types/lexical/plugins/hashtag.d.ts +7 -0
- package/dist/types/lexical/plugins/history.d.ts +7 -0
- package/dist/types/lexical/plugins/horizontal-rule.d.ts +12 -0
- package/dist/types/lexical/plugins/html-io.d.ts +9 -0
- package/dist/types/lexical/plugins/index.d.ts +24 -0
- package/dist/types/lexical/plugins/link.d.ts +6 -0
- package/dist/types/lexical/plugins/list.d.ts +6 -0
- package/dist/types/lexical/plugins/mark.d.ts +15 -0
- package/dist/types/lexical/plugins/markdown-io.d.ts +13 -0
- package/dist/types/lexical/plugins/offset.d.ts +6 -0
- package/dist/types/lexical/plugins/overflow.d.ts +7 -0
- package/dist/types/lexical/plugins/plain-text.d.ts +6 -0
- package/dist/types/lexical/plugins/rich-text.d.ts +6 -0
- package/dist/types/lexical/plugins/selection.d.ts +6 -0
- package/dist/types/lexical/plugins/slash-commands.d.ts +26 -0
- package/dist/types/lexical/plugins/table.d.ts +11 -0
- package/dist/types/lexical/plugins/text.d.ts +13 -0
- package/dist/types/lexical/plugins/yjs.d.ts +9 -0
- package/dist/types/lexical/styles-url.d.ts +2 -0
- package/dist/types/lexical/styles.d.ts +2 -0
- package/dist/types/lexical/types.d.ts +634 -0
- package/dist/types/lexical-i18n/default.d.ts +92 -0
- package/dist/types/lexical-i18n/index.d.ts +21 -0
- package/dist/types/lexical-i18n/locales/ar.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/de.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/en.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/es.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/fa.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/fr.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/he.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/hi.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/it.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/ja.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/ko.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/nl.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/pl.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/pt.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/ru.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/tr.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/ur.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/vi.d.ts +91 -0
- package/dist/types/lexical-i18n/locales/zh.d.ts +91 -0
- package/dist/types/lexical-i18n/translations.d.ts +21 -0
- package/dist/{ur-DbEqQgS6.js → ur-B69X-xNs.js} +1 -1
- package/dist/{ur-BbnYJ3HS.cjs → ur-DyUSmIbo.cjs} +1 -1
- package/dist/use-animated-toggle-ChycsEoj.js +175 -0
- package/dist/use-animated-toggle-DR6CyMac.cjs +1 -0
- package/dist/use-form-B56E_x5Y.js +859 -0
- package/dist/use-form-Cnp3XQ5X.cjs +2 -0
- package/dist/utils-DEbsp9Q9.js +129 -0
- package/dist/utils-DIUEhA-Z.cjs +1 -0
- package/dist/{vi-CpZUeuSj.js → vi-BdzxA60L.js} +1 -1
- package/dist/{vi-ByBwvGQY.cjs → vi-CBmPaHxg.cjs} +1 -1
- package/dist/widget-customization-Dk7XcVly.cjs +1 -0
- package/dist/widget-customization-Ds9sicAg.js +1073 -0
- package/dist/{zh-DnxK0ieB.cjs → zh-Cb1b8uik.cjs} +1 -1
- package/dist/{zh-DJyhKO0I.js → zh-Dn1UJiZa.js} +1 -1
- package/package.json +59 -8
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/_commonjsHelpers-DwGv2jUC.cjs +0 -1
- package/dist/deep-merge-CBIkQM4E.cjs +0 -1
- package/dist/duration-input-DHWhQJnn.cjs +0 -1
- package/dist/modal-CSHIhHvI.js +0 -654
- package/dist/modal-cc8Ehngz.cjs +0 -1
- package/dist/notice-C_BWqu2K.cjs +0 -1
- package/dist/toolbar-D5FcnRju.cjs +0 -1
- package/dist/translations-0tLX4x7M.js +0 -866
- package/dist/translations-WPN3ibDg.cjs +0 -1
- package/dist/use-form-D4JFOcjo.cjs +0 -2
- package/dist/use-form-D4rqJkvG.js +0 -1731
- package/dist/widget-customization-BSjJz3_Y.js +0 -1195
- package/dist/widget-customization-CrFVrt4V.cjs +0 -1
|
@@ -0,0 +1,1355 @@
|
|
|
1
|
+
import { localStorageProp as ie, prop as U, Use as P, html as i, attr as t, on as z, When as w, coalesce as h, Ensure as D, computedOf as g, Fragment as A, bind as ce, ForEach as le, Value as ee, OneOfValue as me } from "@tempots/dom";
|
|
2
|
+
import { i as oe, S as B } from "./stack-BJgsPJ9A.js";
|
|
3
|
+
import { t as ue, u as W, a as se, b as I } from "./use-form-B56E_x5Y.js";
|
|
4
|
+
import { s as T, o as G, b as N, M as pe } from "./modal-v3u2Fpnd.js";
|
|
5
|
+
import { AuthI18n as x } from "./translations-DPr6c05Z.js";
|
|
6
|
+
import { P as R, E as H, N as j } from "./notice-BuZvdvZh.js";
|
|
7
|
+
import { B as V } from "./input-container-DiCjOzR2.js";
|
|
8
|
+
import { T as de } from "./text-input-B3VBat1k.js";
|
|
9
|
+
import { I as he } from "./translations-Cq8bUKJP.js";
|
|
10
|
+
import { classes as ge } from "@tempots/ui";
|
|
11
|
+
const X = {
|
|
12
|
+
google: { name: "Google", icon: "logos:google-icon", color: "#4285f4" },
|
|
13
|
+
github: { name: "GitHub", icon: "logos:github-icon", color: "#333" },
|
|
14
|
+
apple: { name: "Apple", icon: "logos:apple", color: "#000" },
|
|
15
|
+
facebook: { name: "Facebook", icon: "logos:facebook", color: "#1877f2" },
|
|
16
|
+
twitter: { name: "Twitter", icon: "logos:twitter", color: "#1da1f2" },
|
|
17
|
+
microsoft: {
|
|
18
|
+
name: "Microsoft",
|
|
19
|
+
icon: "logos:microsoft-icon",
|
|
20
|
+
color: "#00a4ef"
|
|
21
|
+
},
|
|
22
|
+
discord: { name: "Discord", icon: "logos:discord-icon", color: "#5865f2" },
|
|
23
|
+
linkedin: { name: "LinkedIn", icon: "logos:linkedin-icon", color: "#0077b5" },
|
|
24
|
+
instagram: {
|
|
25
|
+
name: "Instagram",
|
|
26
|
+
icon: "logos:instagram-icon",
|
|
27
|
+
color: "#e4405f"
|
|
28
|
+
},
|
|
29
|
+
tiktok: { name: "TikTok", icon: "logos:tiktok-icon", color: "#000" },
|
|
30
|
+
snapchat: { name: "Snapchat", icon: "logos:snapchat-icon", color: "#fffc00" },
|
|
31
|
+
reddit: { name: "Reddit", icon: "logos:reddit-icon", color: "#ff4500" },
|
|
32
|
+
pinterest: {
|
|
33
|
+
name: "Pinterest",
|
|
34
|
+
icon: "logos:pinterest-icon",
|
|
35
|
+
color: "#bd081c"
|
|
36
|
+
},
|
|
37
|
+
twitch: { name: "Twitch", icon: "logos:twitch", color: "#9146ff" },
|
|
38
|
+
steam: { name: "Steam", icon: "logos:steam-icon", color: "#000" },
|
|
39
|
+
epic: {
|
|
40
|
+
name: "Epic Games",
|
|
41
|
+
icon: "simple-icons:epicgames",
|
|
42
|
+
color: "#313131"
|
|
43
|
+
},
|
|
44
|
+
playstation: {
|
|
45
|
+
name: "PlayStation",
|
|
46
|
+
icon: "logos:playstation-icon",
|
|
47
|
+
color: "#003791"
|
|
48
|
+
},
|
|
49
|
+
xbox: { name: "Xbox", icon: "logos:xbox-icon", color: "#107c10" },
|
|
50
|
+
whatsapp: { name: "WhatsApp", icon: "logos:whatsapp-icon", color: "#25d366" },
|
|
51
|
+
wechat: { name: "WeChat", icon: "logos:wechat-icon", color: "#1aad19" },
|
|
52
|
+
amazon: { name: "Amazon", icon: "logos:amazon-icon", color: "#ff9900" },
|
|
53
|
+
yahoo: { name: "Yahoo", icon: "logos:yahoo-icon", color: "#720e9e" },
|
|
54
|
+
paypal: { name: "PayPal", icon: "logos:paypal", color: "#0070ba" },
|
|
55
|
+
x: { name: "X", icon: "simple-icons:x", color: "#000" }
|
|
56
|
+
};
|
|
57
|
+
function fe(e) {
|
|
58
|
+
return X[e]?.name || e;
|
|
59
|
+
}
|
|
60
|
+
function ze(e) {
|
|
61
|
+
return X[e]?.icon || "mdi:account";
|
|
62
|
+
}
|
|
63
|
+
function Ee(e) {
|
|
64
|
+
return X[e]?.color || "#666";
|
|
65
|
+
}
|
|
66
|
+
function Ue(e, o = "Continue with {provider}") {
|
|
67
|
+
return o.replace("{provider}", fe(e));
|
|
68
|
+
}
|
|
69
|
+
const $ = {
|
|
70
|
+
minLength: 8,
|
|
71
|
+
requireUppercase: !0,
|
|
72
|
+
requireLowercase: !0,
|
|
73
|
+
requireNumbers: !0,
|
|
74
|
+
requireSymbols: !1
|
|
75
|
+
};
|
|
76
|
+
function Ve(e) {
|
|
77
|
+
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
|
|
78
|
+
}
|
|
79
|
+
function be(e = 32) {
|
|
80
|
+
const o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
81
|
+
let c = "";
|
|
82
|
+
for (let m = 0; m < e; m++)
|
|
83
|
+
c += o.charAt(Math.floor(Math.random() * o.length));
|
|
84
|
+
return c;
|
|
85
|
+
}
|
|
86
|
+
function Fe(e, o, c, m = [], l = {}) {
|
|
87
|
+
const s = {
|
|
88
|
+
google: "https://accounts.google.com/oauth/authorize",
|
|
89
|
+
github: "https://github.com/login/oauth/authorize",
|
|
90
|
+
apple: "https://appleid.apple.com/auth/authorize",
|
|
91
|
+
facebook: "https://www.facebook.com/v18.0/dialog/oauth",
|
|
92
|
+
twitter: "https://twitter.com/i/oauth2/authorize",
|
|
93
|
+
microsoft: "https://login.microsoftonline.com/common/oauth2/v2.0/authorize",
|
|
94
|
+
discord: "https://discord.com/api/oauth2/authorize",
|
|
95
|
+
linkedin: "https://www.linkedin.com/oauth/v2/authorization",
|
|
96
|
+
instagram: "https://api.instagram.com/oauth/authorize",
|
|
97
|
+
tiktok: "https://www.tiktok.com/v2/auth/authorize",
|
|
98
|
+
snapchat: "https://accounts.snapchat.com/accounts/oauth2/authorize",
|
|
99
|
+
reddit: "https://www.reddit.com/api/v1/authorize",
|
|
100
|
+
pinterest: "https://api.pinterest.com/oauth/",
|
|
101
|
+
twitch: "https://id.twitch.tv/oauth2/authorize",
|
|
102
|
+
steam: "https://steamcommunity.com/oauth/authorize",
|
|
103
|
+
epic: "https://auth.epicgames.com/authorize",
|
|
104
|
+
playstation: "https://auth.api.sonyentertainmentnetwork.com/oauth/authorize",
|
|
105
|
+
xbox: "https://login.live.com/oauth20_authorize.srf",
|
|
106
|
+
whatsapp: "https://web.whatsapp.com/oauth/authorize",
|
|
107
|
+
wechat: "https://open.weixin.qq.com/connect/qrconnect",
|
|
108
|
+
amazon: "https://www.amazon.com/ap/oa",
|
|
109
|
+
yahoo: "https://api.login.yahoo.com/oauth2/request_auth",
|
|
110
|
+
paypal: "https://www.paypal.com/signin/authorize",
|
|
111
|
+
x: "https://api.twitter.com/oauth2/authorize"
|
|
112
|
+
}, u = {
|
|
113
|
+
google: ["openid", "email", "profile"],
|
|
114
|
+
github: ["user:email"],
|
|
115
|
+
apple: ["email", "name"],
|
|
116
|
+
facebook: ["email"],
|
|
117
|
+
twitter: ["users.read"],
|
|
118
|
+
microsoft: ["openid", "email", "profile"],
|
|
119
|
+
discord: ["identify", "email"],
|
|
120
|
+
linkedin: ["r_liteprofile", "r_emailaddress"],
|
|
121
|
+
instagram: ["user_profile", "user_media"],
|
|
122
|
+
tiktok: ["user.info.basic", "user.external.id"],
|
|
123
|
+
snapchat: ["user.info.basic", "user.external.id"],
|
|
124
|
+
reddit: ["identity", "email"],
|
|
125
|
+
pinterest: ["read_public", "read_relationships"],
|
|
126
|
+
twitch: ["openid", "email", "profile"],
|
|
127
|
+
steam: ["openid", "email", "profile"],
|
|
128
|
+
epic: ["openid", "email", "profile"],
|
|
129
|
+
playstation: ["openid", "email", "profile"],
|
|
130
|
+
xbox: ["openid", "email", "profile"],
|
|
131
|
+
whatsapp: ["openid", "email", "profile"],
|
|
132
|
+
wechat: ["openid", "email", "profile"],
|
|
133
|
+
amazon: ["openid", "email", "profile"],
|
|
134
|
+
yahoo: ["openid", "email", "profile"],
|
|
135
|
+
paypal: ["openid", "email", "profile"],
|
|
136
|
+
x: ["openid", "email", "profile"]
|
|
137
|
+
}, a = s[e];
|
|
138
|
+
if (!a)
|
|
139
|
+
throw new Error(`Unsupported provider: ${e}`);
|
|
140
|
+
const r = m.length > 0 ? m : u[e], n = be(), f = new URLSearchParams({
|
|
141
|
+
client_id: o,
|
|
142
|
+
redirect_uri: c,
|
|
143
|
+
scope: r.join(" "),
|
|
144
|
+
state: n,
|
|
145
|
+
response_type: "code",
|
|
146
|
+
...l
|
|
147
|
+
});
|
|
148
|
+
return `${a}?${f.toString()}`;
|
|
149
|
+
}
|
|
150
|
+
function Me(e, o, c, m) {
|
|
151
|
+
const l = window.open(
|
|
152
|
+
e,
|
|
153
|
+
`${o}_login`,
|
|
154
|
+
"width=500,height=600,scrollbars=yes,resizable=yes"
|
|
155
|
+
);
|
|
156
|
+
if (!l) {
|
|
157
|
+
m?.(new Error("Failed to open popup window"));
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
const s = setInterval(() => {
|
|
161
|
+
l.closed && (clearInterval(s), m?.(new Error("Login cancelled")));
|
|
162
|
+
}, 1e3), u = (a) => {
|
|
163
|
+
a.origin === window.location.origin && (a.data.type === "SOCIAL_LOGIN_SUCCESS" ? (clearInterval(s), l.close(), window.removeEventListener("message", u), c?.(a.data.result)) : a.data.type === "SOCIAL_LOGIN_ERROR" && (clearInterval(s), l.close(), window.removeEventListener("message", u), m?.(new Error(a.data.error))));
|
|
164
|
+
};
|
|
165
|
+
window.addEventListener("message", u);
|
|
166
|
+
}
|
|
167
|
+
function Oe(e) {
|
|
168
|
+
return e instanceof Error ? e.message : typeof e == "string" ? e : e && typeof e == "object" && "message" in e ? String(e.message) : "An unexpected error occurred";
|
|
169
|
+
}
|
|
170
|
+
function Ne() {
|
|
171
|
+
return typeof window < "u" && typeof document < "u";
|
|
172
|
+
}
|
|
173
|
+
function Y({
|
|
174
|
+
task: e,
|
|
175
|
+
message: o,
|
|
176
|
+
onStart: c,
|
|
177
|
+
onEnd: m
|
|
178
|
+
}) {
|
|
179
|
+
return async (l) => {
|
|
180
|
+
c?.();
|
|
181
|
+
const s = await ue({
|
|
182
|
+
task: e != null ? () => e(l) : async () => null,
|
|
183
|
+
errorMessage: o,
|
|
184
|
+
errorPath: ["root"],
|
|
185
|
+
validation: (u) => u != null ? oe.invalid({ message: u }) : oe.valid
|
|
186
|
+
});
|
|
187
|
+
return m?.(), s;
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
function Z(e = $) {
|
|
191
|
+
let o = T();
|
|
192
|
+
return e.minLength && (o = o.min(
|
|
193
|
+
e.minLength,
|
|
194
|
+
`Password must be at least ${e.minLength} characters`
|
|
195
|
+
)), e.requireUppercase && (o = o.regex(
|
|
196
|
+
/[A-Z]/,
|
|
197
|
+
"Password must contain at least one uppercase letter"
|
|
198
|
+
)), e.requireLowercase && (o = o.regex(
|
|
199
|
+
/[a-z]/,
|
|
200
|
+
"Password must contain at least one lowercase letter"
|
|
201
|
+
)), e.requireNumbers && (o = o.regex(
|
|
202
|
+
/[0-9]/,
|
|
203
|
+
"Password must contain at least one number"
|
|
204
|
+
)), e.requireSymbols && (o = o.regex(
|
|
205
|
+
/[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/,
|
|
206
|
+
"Password must contain at least one special character"
|
|
207
|
+
)), e.customValidation && (o = o.refine((c) => e.customValidation(c))), o;
|
|
208
|
+
}
|
|
209
|
+
const F = T().min(1, "Email is required").email("Please enter a valid email address");
|
|
210
|
+
function J(e) {
|
|
211
|
+
const o = e ? Z(e) : T().refine(
|
|
212
|
+
(c) => c.length > 0 ? null : "Password is required"
|
|
213
|
+
);
|
|
214
|
+
return G({
|
|
215
|
+
email: F,
|
|
216
|
+
password: o,
|
|
217
|
+
rememberMe: N().default(!1)
|
|
218
|
+
}).schema();
|
|
219
|
+
}
|
|
220
|
+
function K(e = $, o) {
|
|
221
|
+
const c = Z(e), m = o?.showNameField !== !1, l = o?.showConfirmPassword !== !1, s = o?.showAcceptTermsAndConditions !== !1, u = {
|
|
222
|
+
name: m ? T().min(1, "Name is required").optional() : T().optional(),
|
|
223
|
+
email: F,
|
|
224
|
+
password: c,
|
|
225
|
+
// Always require confirmPassword as string to match SignUpData interface
|
|
226
|
+
// When not shown, it should accept any value (including empty string)
|
|
227
|
+
confirmPassword: l ? T().min(1, "Please confirm your password") : T(),
|
|
228
|
+
// Accept any string value when not shown
|
|
229
|
+
acceptTerms: s ? N().refine(
|
|
230
|
+
(r) => r === !0,
|
|
231
|
+
"You must accept the terms and conditions"
|
|
232
|
+
) : N().default(!0)
|
|
233
|
+
// Default to true when not shown
|
|
234
|
+
}, a = G(u);
|
|
235
|
+
return l ? a.refine(
|
|
236
|
+
(r) => r.password === r.confirmPassword ? null : "Passwords don't match",
|
|
237
|
+
{ path: ["confirmPassword"] }
|
|
238
|
+
).schema() : a.schema();
|
|
239
|
+
}
|
|
240
|
+
const ne = G({
|
|
241
|
+
email: F
|
|
242
|
+
}).schema(), Re = J(), De = K(), We = {
|
|
243
|
+
signIn: J,
|
|
244
|
+
signUp: K,
|
|
245
|
+
resetPassword: () => ne
|
|
246
|
+
};
|
|
247
|
+
function Ge(e) {
|
|
248
|
+
const o = F.validate(e);
|
|
249
|
+
return o.success ? null : o.errors[0]?.message || "Invalid email";
|
|
250
|
+
}
|
|
251
|
+
function He(e, o = $) {
|
|
252
|
+
const m = Z(o).validate(e);
|
|
253
|
+
return m.success ? null : m.errors[0]?.message || "Invalid password";
|
|
254
|
+
}
|
|
255
|
+
function Q(e, o = $) {
|
|
256
|
+
const c = {
|
|
257
|
+
length: e.length >= (o.minLength || 8),
|
|
258
|
+
uppercase: /[A-Z]/.test(e),
|
|
259
|
+
lowercase: /[a-z]/.test(e),
|
|
260
|
+
numbers: /[0-9]/.test(e),
|
|
261
|
+
symbols: /[!@#$%^&*()_+\-=[\]{};':"\\|,.<>/?]/.test(e),
|
|
262
|
+
custom: o.customValidation ? o.customValidation(e) === null : e.length > 0
|
|
263
|
+
// For consistency, fail if password is empty
|
|
264
|
+
}, m = [
|
|
265
|
+
!0,
|
|
266
|
+
// length is always enabled
|
|
267
|
+
o.requireUppercase,
|
|
268
|
+
o.requireLowercase,
|
|
269
|
+
o.requireNumbers,
|
|
270
|
+
o.requireSymbols,
|
|
271
|
+
!!o.customValidation
|
|
272
|
+
].filter(Boolean).length, l = [
|
|
273
|
+
c.length,
|
|
274
|
+
o.requireUppercase ? c.uppercase : null,
|
|
275
|
+
o.requireLowercase ? c.lowercase : null,
|
|
276
|
+
o.requireNumbers ? c.numbers : null,
|
|
277
|
+
o.requireSymbols ? c.symbols : null,
|
|
278
|
+
o.customValidation ? c.custom : null
|
|
279
|
+
].filter((a) => a === !0).length, s = m > 0 ? Math.round(l / m * 100) : 0;
|
|
280
|
+
let u;
|
|
281
|
+
return s < 40 ? u = "weak" : s < 60 ? u = "fair" : s < 80 ? u = "good" : u = "strong", { strength: u, score: s, checks: c };
|
|
282
|
+
}
|
|
283
|
+
const re = () => ie({
|
|
284
|
+
key: "bui_auth_email",
|
|
285
|
+
defaultValue: null
|
|
286
|
+
});
|
|
287
|
+
function we({
|
|
288
|
+
onSignIn: e,
|
|
289
|
+
passwordRules: o,
|
|
290
|
+
labels: c,
|
|
291
|
+
showRememberMe: m
|
|
292
|
+
}) {
|
|
293
|
+
const l = U(!1), s = re(), u = J(o), a = W({
|
|
294
|
+
schema: u,
|
|
295
|
+
onSubmit: Y({
|
|
296
|
+
task: e,
|
|
297
|
+
message: "Reset password failed",
|
|
298
|
+
onStart: () => {
|
|
299
|
+
l.set(!0), a.controller.disable();
|
|
300
|
+
},
|
|
301
|
+
onEnd: () => {
|
|
302
|
+
l.set(!1), a.controller.enable();
|
|
303
|
+
}
|
|
304
|
+
}),
|
|
305
|
+
initialValue: {
|
|
306
|
+
email: "",
|
|
307
|
+
password: ""
|
|
308
|
+
}
|
|
309
|
+
}), { controller: r, submit: n } = a;
|
|
310
|
+
l.on(r.setDisabled);
|
|
311
|
+
const f = r.field("email"), _ = r.field("password");
|
|
312
|
+
return s.on((L) => {
|
|
313
|
+
L != null && f.change(L);
|
|
314
|
+
}), f.signal.on((L) => {
|
|
315
|
+
s.value != null && (s.value = L);
|
|
316
|
+
}), P(
|
|
317
|
+
x,
|
|
318
|
+
(L) => (
|
|
319
|
+
// Email/Password form
|
|
320
|
+
i.form(
|
|
321
|
+
t.class("bc-auth-form__form"),
|
|
322
|
+
z.submit(n),
|
|
323
|
+
B(
|
|
324
|
+
t.class("bc-auth-form__fields"),
|
|
325
|
+
D(
|
|
326
|
+
r.error,
|
|
327
|
+
(k) => j(
|
|
328
|
+
{ variant: "danger", tone: "prominent", role: "alert" },
|
|
329
|
+
i.div(k)
|
|
330
|
+
)
|
|
331
|
+
),
|
|
332
|
+
// Email field
|
|
333
|
+
I(H, {
|
|
334
|
+
controller: f,
|
|
335
|
+
label: h(c?.emailLabel, L.$.emailLabel)
|
|
336
|
+
}),
|
|
337
|
+
// Password field
|
|
338
|
+
I(R, {
|
|
339
|
+
controller: _,
|
|
340
|
+
label: h(c?.passwordLabel, L.$.passwordLabel)
|
|
341
|
+
}),
|
|
342
|
+
// Remember me checkbox
|
|
343
|
+
w(
|
|
344
|
+
m ?? !0,
|
|
345
|
+
() => i.div(
|
|
346
|
+
t.class("bc-auth-form__remember-me"),
|
|
347
|
+
i.label(
|
|
348
|
+
t.class("bc-auth-form__checkbox-label"),
|
|
349
|
+
se({
|
|
350
|
+
value: s.map((k) => k != null),
|
|
351
|
+
after: i.span(
|
|
352
|
+
h(c?.rememberMeLabel, L.$.rememberMeLabel)
|
|
353
|
+
),
|
|
354
|
+
onChange: (k) => {
|
|
355
|
+
k ? s.value = f.signal.value ?? "" : s.value = null;
|
|
356
|
+
}
|
|
357
|
+
})
|
|
358
|
+
)
|
|
359
|
+
)
|
|
360
|
+
)
|
|
361
|
+
),
|
|
362
|
+
// Submit button
|
|
363
|
+
V(
|
|
364
|
+
{
|
|
365
|
+
type: "submit",
|
|
366
|
+
variant: "filled",
|
|
367
|
+
color: "primary",
|
|
368
|
+
loading: l,
|
|
369
|
+
disabled: r.disabledOrHasErrors
|
|
370
|
+
},
|
|
371
|
+
t.class("bc-auth-form__submit"),
|
|
372
|
+
h(c?.signInButton, L.$.signInButton)
|
|
373
|
+
)
|
|
374
|
+
)
|
|
375
|
+
)
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
function _e({
|
|
379
|
+
password: e,
|
|
380
|
+
rules: o = $,
|
|
381
|
+
showLabel: c = !0,
|
|
382
|
+
className: m
|
|
383
|
+
}) {
|
|
384
|
+
const l = g(e)((n) => !n || n.length === 0 ? {
|
|
385
|
+
strength: "weak",
|
|
386
|
+
score: 0,
|
|
387
|
+
checks: {
|
|
388
|
+
length: !1,
|
|
389
|
+
uppercase: !1,
|
|
390
|
+
lowercase: !1,
|
|
391
|
+
numbers: !1,
|
|
392
|
+
symbols: !1,
|
|
393
|
+
custom: !1
|
|
394
|
+
}
|
|
395
|
+
} : Q(n, o)), s = l.map((n) => n.strength), u = l.map((n) => n.score), a = l.map((n) => n.checks), r = g(
|
|
396
|
+
s,
|
|
397
|
+
m
|
|
398
|
+
)((n, f) => [
|
|
399
|
+
"bc-password-strength",
|
|
400
|
+
`bc-password-strength--${n}`,
|
|
401
|
+
f
|
|
402
|
+
].filter(Boolean).join(" "));
|
|
403
|
+
return i.div(
|
|
404
|
+
t.class(r),
|
|
405
|
+
// Strength bar
|
|
406
|
+
i.div(
|
|
407
|
+
t.class("bc-password-strength__bar"),
|
|
408
|
+
i.div(
|
|
409
|
+
t.class("bc-password-strength__fill"),
|
|
410
|
+
t.style(u.map((n) => `width: ${n}%`))
|
|
411
|
+
)
|
|
412
|
+
),
|
|
413
|
+
// Strength label (optional)
|
|
414
|
+
w(
|
|
415
|
+
c,
|
|
416
|
+
() => P(
|
|
417
|
+
x,
|
|
418
|
+
(n) => i.div(
|
|
419
|
+
t.class("bc-password-strength__label"),
|
|
420
|
+
g(
|
|
421
|
+
s,
|
|
422
|
+
n
|
|
423
|
+
)((f, _) => {
|
|
424
|
+
switch (f) {
|
|
425
|
+
case "weak":
|
|
426
|
+
return _.passwordStrengthWeak;
|
|
427
|
+
case "fair":
|
|
428
|
+
return _.passwordStrengthFair;
|
|
429
|
+
case "good":
|
|
430
|
+
return _.passwordStrengthGood;
|
|
431
|
+
case "strong":
|
|
432
|
+
return _.passwordStrengthStrong;
|
|
433
|
+
default:
|
|
434
|
+
return _.passwordStrengthWeak;
|
|
435
|
+
}
|
|
436
|
+
})
|
|
437
|
+
)
|
|
438
|
+
)
|
|
439
|
+
),
|
|
440
|
+
// Requirements checklist
|
|
441
|
+
i.div(
|
|
442
|
+
t.class("bc-password-strength__requirements"),
|
|
443
|
+
// Length requirement
|
|
444
|
+
w(
|
|
445
|
+
o.minLength !== void 0,
|
|
446
|
+
() => i.div(
|
|
447
|
+
t.class("bc-password-strength__requirement"),
|
|
448
|
+
t.class(
|
|
449
|
+
g(a)(
|
|
450
|
+
(n) => n.length ? "bc-password-strength__requirement--met" : ""
|
|
451
|
+
)
|
|
452
|
+
),
|
|
453
|
+
i.span(
|
|
454
|
+
t.class("bc-password-strength__requirement-icon"),
|
|
455
|
+
g(a)((n) => n.length ? "✓" : "○")
|
|
456
|
+
),
|
|
457
|
+
i.span(
|
|
458
|
+
t.class("bc-password-strength__requirement-text"),
|
|
459
|
+
`At least ${o.minLength} characters`
|
|
460
|
+
)
|
|
461
|
+
)
|
|
462
|
+
),
|
|
463
|
+
// Uppercase requirement
|
|
464
|
+
w(
|
|
465
|
+
o.requireUppercase === !0,
|
|
466
|
+
() => i.div(
|
|
467
|
+
t.class("bc-password-strength__requirement"),
|
|
468
|
+
t.class(
|
|
469
|
+
g(a)(
|
|
470
|
+
(n) => n.uppercase ? "bc-password-strength__requirement--met" : ""
|
|
471
|
+
)
|
|
472
|
+
),
|
|
473
|
+
i.span(
|
|
474
|
+
t.class("bc-password-strength__requirement-icon"),
|
|
475
|
+
g(a)((n) => n.uppercase ? "✓" : "○")
|
|
476
|
+
),
|
|
477
|
+
i.span(
|
|
478
|
+
t.class("bc-password-strength__requirement-text"),
|
|
479
|
+
"One uppercase letter"
|
|
480
|
+
)
|
|
481
|
+
)
|
|
482
|
+
),
|
|
483
|
+
// Lowercase requirement
|
|
484
|
+
w(
|
|
485
|
+
o.requireLowercase === !0,
|
|
486
|
+
() => i.div(
|
|
487
|
+
t.class("bc-password-strength__requirement"),
|
|
488
|
+
t.class(
|
|
489
|
+
g(a)(
|
|
490
|
+
(n) => n.lowercase ? "bc-password-strength__requirement--met" : ""
|
|
491
|
+
)
|
|
492
|
+
),
|
|
493
|
+
i.span(
|
|
494
|
+
t.class("bc-password-strength__requirement-icon"),
|
|
495
|
+
g(a)((n) => n.lowercase ? "✓" : "○")
|
|
496
|
+
),
|
|
497
|
+
i.span(
|
|
498
|
+
t.class("bc-password-strength__requirement-text"),
|
|
499
|
+
"One lowercase letter"
|
|
500
|
+
)
|
|
501
|
+
)
|
|
502
|
+
),
|
|
503
|
+
// Numbers requirement
|
|
504
|
+
w(
|
|
505
|
+
o.requireNumbers === !0,
|
|
506
|
+
() => i.div(
|
|
507
|
+
t.class("bc-password-strength__requirement"),
|
|
508
|
+
t.class(
|
|
509
|
+
g(a)(
|
|
510
|
+
(n) => n.numbers ? "bc-password-strength__requirement--met" : ""
|
|
511
|
+
)
|
|
512
|
+
),
|
|
513
|
+
i.span(
|
|
514
|
+
t.class("bc-password-strength__requirement-icon"),
|
|
515
|
+
g(a)((n) => n.numbers ? "✓" : "○")
|
|
516
|
+
),
|
|
517
|
+
i.span(
|
|
518
|
+
t.class("bc-password-strength__requirement-text"),
|
|
519
|
+
"One number"
|
|
520
|
+
)
|
|
521
|
+
)
|
|
522
|
+
),
|
|
523
|
+
// Symbols requirement
|
|
524
|
+
w(
|
|
525
|
+
o.requireSymbols === !0,
|
|
526
|
+
() => i.div(
|
|
527
|
+
t.class("bc-password-strength__requirement"),
|
|
528
|
+
t.class(
|
|
529
|
+
g(a)(
|
|
530
|
+
(n) => n.symbols ? "bc-password-strength__requirement--met" : ""
|
|
531
|
+
)
|
|
532
|
+
),
|
|
533
|
+
i.span(
|
|
534
|
+
t.class("bc-password-strength__requirement-icon"),
|
|
535
|
+
g(a)((n) => n.symbols ? "✓" : "○")
|
|
536
|
+
),
|
|
537
|
+
i.span(
|
|
538
|
+
t.class("bc-password-strength__requirement-text"),
|
|
539
|
+
"One special character"
|
|
540
|
+
)
|
|
541
|
+
)
|
|
542
|
+
)
|
|
543
|
+
)
|
|
544
|
+
);
|
|
545
|
+
}
|
|
546
|
+
function je({
|
|
547
|
+
password: e,
|
|
548
|
+
rules: o = $,
|
|
549
|
+
className: c
|
|
550
|
+
}) {
|
|
551
|
+
const m = g(e)((a) => !a || a.length === 0 ? { strength: "weak", score: 0 } : Q(a, o)), l = m.map((a) => a.strength), s = m.map((a) => a.score), u = g(
|
|
552
|
+
l,
|
|
553
|
+
c
|
|
554
|
+
)((a, r) => [
|
|
555
|
+
"bc-password-strength-bar",
|
|
556
|
+
`bc-password-strength-bar--${a}`,
|
|
557
|
+
r
|
|
558
|
+
].filter(Boolean).join(" "));
|
|
559
|
+
return i.div(
|
|
560
|
+
t.class(u),
|
|
561
|
+
i.div(
|
|
562
|
+
t.class("bc-password-strength-bar__fill"),
|
|
563
|
+
t.style(s.map((a) => `width: ${a}%`))
|
|
564
|
+
)
|
|
565
|
+
);
|
|
566
|
+
}
|
|
567
|
+
function Xe({
|
|
568
|
+
password: e,
|
|
569
|
+
rules: o = $,
|
|
570
|
+
className: c
|
|
571
|
+
}) {
|
|
572
|
+
const m = g(e)((s) => !s || s.length === 0 ? "weak" : Q(s, o).strength), l = g(
|
|
573
|
+
m,
|
|
574
|
+
c
|
|
575
|
+
)((s, u) => [
|
|
576
|
+
"bc-password-strength-text",
|
|
577
|
+
`bc-password-strength-text--${s}`,
|
|
578
|
+
u
|
|
579
|
+
].filter(Boolean).join(" "));
|
|
580
|
+
return A(
|
|
581
|
+
P(
|
|
582
|
+
x,
|
|
583
|
+
(s) => i.span(
|
|
584
|
+
t.class(l),
|
|
585
|
+
g(
|
|
586
|
+
m,
|
|
587
|
+
s
|
|
588
|
+
)((u, a) => {
|
|
589
|
+
switch (u) {
|
|
590
|
+
case "weak":
|
|
591
|
+
return a.passwordStrengthWeak;
|
|
592
|
+
case "fair":
|
|
593
|
+
return a.passwordStrengthFair;
|
|
594
|
+
case "good":
|
|
595
|
+
return a.passwordStrengthGood;
|
|
596
|
+
case "strong":
|
|
597
|
+
return a.passwordStrengthStrong;
|
|
598
|
+
default:
|
|
599
|
+
return a.passwordStrengthWeak;
|
|
600
|
+
}
|
|
601
|
+
})
|
|
602
|
+
)
|
|
603
|
+
)
|
|
604
|
+
);
|
|
605
|
+
}
|
|
606
|
+
function Le({
|
|
607
|
+
passwordRules: e,
|
|
608
|
+
labels: o,
|
|
609
|
+
initialEmail: c,
|
|
610
|
+
initialName: m,
|
|
611
|
+
showPasswordStrength: l,
|
|
612
|
+
onSignUp: s,
|
|
613
|
+
showNameField: u,
|
|
614
|
+
showConfirmPassword: a,
|
|
615
|
+
showAcceptTermsAndConditions: r,
|
|
616
|
+
termsAndConditions: n
|
|
617
|
+
}) {
|
|
618
|
+
const f = U(!1), _ = e || $, L = K(_, {
|
|
619
|
+
showNameField: u !== !1,
|
|
620
|
+
showConfirmPassword: a !== !1,
|
|
621
|
+
showAcceptTermsAndConditions: r !== !1
|
|
622
|
+
}), k = W({
|
|
623
|
+
schema: L,
|
|
624
|
+
onSubmit: Y({
|
|
625
|
+
task: s != null ? (b) => s({
|
|
626
|
+
email: b.email,
|
|
627
|
+
password: b.password,
|
|
628
|
+
name: b.name,
|
|
629
|
+
acceptTerms: b.acceptTerms
|
|
630
|
+
}) : void 0,
|
|
631
|
+
message: "Reset password failed",
|
|
632
|
+
onStart: () => {
|
|
633
|
+
f.set(!0), k.controller.disable();
|
|
634
|
+
},
|
|
635
|
+
onEnd: () => {
|
|
636
|
+
f.set(!1), k.controller.enable();
|
|
637
|
+
}
|
|
638
|
+
}),
|
|
639
|
+
initialValue: {
|
|
640
|
+
name: m ?? "",
|
|
641
|
+
email: c ?? "",
|
|
642
|
+
password: "",
|
|
643
|
+
confirmPassword: "",
|
|
644
|
+
acceptTerms: !1
|
|
645
|
+
}
|
|
646
|
+
}), { controller: y, submit: M } = k;
|
|
647
|
+
f.on(y.setDisabled);
|
|
648
|
+
const q = y.field("name"), S = y.field("email"), E = y.field("password"), O = y.field("confirmPassword"), C = y.field("acceptTerms");
|
|
649
|
+
return P(
|
|
650
|
+
x,
|
|
651
|
+
(b) => (
|
|
652
|
+
// Registration form
|
|
653
|
+
i.form(
|
|
654
|
+
t.class("bc-auth-form__form"),
|
|
655
|
+
z.submit(M),
|
|
656
|
+
B(
|
|
657
|
+
t.class("bc-auth-form__fields"),
|
|
658
|
+
D(
|
|
659
|
+
y.error,
|
|
660
|
+
(v) => j(
|
|
661
|
+
{ variant: "danger", tone: "prominent", role: "alert" },
|
|
662
|
+
i.div(v)
|
|
663
|
+
)
|
|
664
|
+
),
|
|
665
|
+
// Name field (optional)
|
|
666
|
+
w(
|
|
667
|
+
u !== !1,
|
|
668
|
+
() => I(de, {
|
|
669
|
+
controller: q.transform(
|
|
670
|
+
(v) => v ?? "",
|
|
671
|
+
(v) => v === "" ? void 0 : v
|
|
672
|
+
),
|
|
673
|
+
label: h(o?.nameLabel, b.$.nameLabel)
|
|
674
|
+
})
|
|
675
|
+
),
|
|
676
|
+
// Email field
|
|
677
|
+
I(H, {
|
|
678
|
+
controller: S,
|
|
679
|
+
label: h(o?.emailLabel, b.$.emailLabel)
|
|
680
|
+
}),
|
|
681
|
+
// Password field
|
|
682
|
+
I(R, {
|
|
683
|
+
controller: E,
|
|
684
|
+
label: h(o?.passwordLabel, b.$.passwordLabel)
|
|
685
|
+
}),
|
|
686
|
+
// Password strength indicator
|
|
687
|
+
w(
|
|
688
|
+
l ?? !1,
|
|
689
|
+
() => _e({
|
|
690
|
+
password: E.signal,
|
|
691
|
+
rules: _,
|
|
692
|
+
showLabel: !0
|
|
693
|
+
})
|
|
694
|
+
),
|
|
695
|
+
// Confirm password field
|
|
696
|
+
w(
|
|
697
|
+
a ?? !1,
|
|
698
|
+
() => I(R, {
|
|
699
|
+
controller: O,
|
|
700
|
+
label: h(
|
|
701
|
+
o?.confirmPasswordLabel,
|
|
702
|
+
b.$.confirmPasswordLabel
|
|
703
|
+
)
|
|
704
|
+
})
|
|
705
|
+
),
|
|
706
|
+
// Terms acceptance checkbox
|
|
707
|
+
w(
|
|
708
|
+
r ?? !1,
|
|
709
|
+
() => i.div(
|
|
710
|
+
t.class("bc-auth-form__terms"),
|
|
711
|
+
i.label(
|
|
712
|
+
t.class("bc-auth-form__checkbox-label"),
|
|
713
|
+
se({
|
|
714
|
+
value: C.signal.map((v) => v ?? !1),
|
|
715
|
+
onChange: (v) => C.change(v)
|
|
716
|
+
}),
|
|
717
|
+
i.span(
|
|
718
|
+
n || h(o?.acceptTermsLabel, b.$.acceptTermsLabel)
|
|
719
|
+
)
|
|
720
|
+
),
|
|
721
|
+
w(
|
|
722
|
+
C.errorVisible,
|
|
723
|
+
() => i.div(
|
|
724
|
+
t.class("bc-auth-form__field-error"),
|
|
725
|
+
C.error.map((v) => v || "")
|
|
726
|
+
)
|
|
727
|
+
)
|
|
728
|
+
)
|
|
729
|
+
)
|
|
730
|
+
),
|
|
731
|
+
// Submit button
|
|
732
|
+
V(
|
|
733
|
+
{
|
|
734
|
+
type: "submit",
|
|
735
|
+
variant: "filled",
|
|
736
|
+
color: "primary",
|
|
737
|
+
loading: f,
|
|
738
|
+
disabled: y.disabledOrHasErrors
|
|
739
|
+
},
|
|
740
|
+
t.class("bc-auth-form__submit"),
|
|
741
|
+
h(o?.signUpButton, b.$.signUpButton)
|
|
742
|
+
)
|
|
743
|
+
)
|
|
744
|
+
)
|
|
745
|
+
);
|
|
746
|
+
}
|
|
747
|
+
function ke({
|
|
748
|
+
onResetPassword: e,
|
|
749
|
+
labels: o = {}
|
|
750
|
+
}) {
|
|
751
|
+
const c = re(), m = U(!1), l = W({
|
|
752
|
+
schema: ne,
|
|
753
|
+
onSubmit: Y({
|
|
754
|
+
task: e,
|
|
755
|
+
message: "Reset password failed",
|
|
756
|
+
onStart: () => {
|
|
757
|
+
m.set(!0), l.controller.disable();
|
|
758
|
+
},
|
|
759
|
+
onEnd: () => {
|
|
760
|
+
m.set(!1), l.controller.enable();
|
|
761
|
+
}
|
|
762
|
+
}),
|
|
763
|
+
initialValue: {
|
|
764
|
+
email: ""
|
|
765
|
+
}
|
|
766
|
+
}), { controller: s, submit: u } = l;
|
|
767
|
+
m.on(s.setDisabled);
|
|
768
|
+
const a = s.field("email");
|
|
769
|
+
return c.on((r) => {
|
|
770
|
+
r != null && a.change(r);
|
|
771
|
+
}), P(
|
|
772
|
+
x,
|
|
773
|
+
(r) => (
|
|
774
|
+
// Reset password form
|
|
775
|
+
i.form(
|
|
776
|
+
t.class("bc-auth-form__form"),
|
|
777
|
+
D(
|
|
778
|
+
s.error,
|
|
779
|
+
(n) => j(
|
|
780
|
+
{ variant: "danger", tone: "prominent", role: "alert" },
|
|
781
|
+
i.div(n)
|
|
782
|
+
)
|
|
783
|
+
),
|
|
784
|
+
// Description
|
|
785
|
+
i.p(
|
|
786
|
+
t.class("bc-auth-form__description"),
|
|
787
|
+
h(o?.resetPasswordDescription, r.$.resetPasswordDescription)
|
|
788
|
+
),
|
|
789
|
+
z.submit(u),
|
|
790
|
+
B(
|
|
791
|
+
t.class("bc-auth-form__fields"),
|
|
792
|
+
// Email field
|
|
793
|
+
I(H, {
|
|
794
|
+
controller: a,
|
|
795
|
+
label: h(o?.emailLabel, r.$.emailLabel)
|
|
796
|
+
})
|
|
797
|
+
),
|
|
798
|
+
// Submit button
|
|
799
|
+
V(
|
|
800
|
+
{
|
|
801
|
+
loading: m,
|
|
802
|
+
type: "submit",
|
|
803
|
+
variant: "filled",
|
|
804
|
+
color: "primary",
|
|
805
|
+
disabled: s.disabledOrHasErrors
|
|
806
|
+
},
|
|
807
|
+
t.class("bc-auth-form__submit"),
|
|
808
|
+
h(o?.resetPasswordButton, r.$.resetPasswordButton)
|
|
809
|
+
)
|
|
810
|
+
)
|
|
811
|
+
)
|
|
812
|
+
);
|
|
813
|
+
}
|
|
814
|
+
function d({
|
|
815
|
+
provider: e,
|
|
816
|
+
onClick: o,
|
|
817
|
+
size: c = "md",
|
|
818
|
+
name: m,
|
|
819
|
+
icon: l,
|
|
820
|
+
color: s,
|
|
821
|
+
flow: u,
|
|
822
|
+
labels: a
|
|
823
|
+
}) {
|
|
824
|
+
return V(
|
|
825
|
+
{
|
|
826
|
+
type: "button",
|
|
827
|
+
variant: "filled",
|
|
828
|
+
size: c,
|
|
829
|
+
color: s,
|
|
830
|
+
onClick: async () => {
|
|
831
|
+
if (o)
|
|
832
|
+
try {
|
|
833
|
+
u === "popup" ? await o() : await o();
|
|
834
|
+
} catch (n) {
|
|
835
|
+
console.error(
|
|
836
|
+
`Social login error for ${e} (${u || "redirect"} flow):`,
|
|
837
|
+
n
|
|
838
|
+
);
|
|
839
|
+
}
|
|
840
|
+
},
|
|
841
|
+
roundedness: "full"
|
|
842
|
+
},
|
|
843
|
+
t.class("bc-social-login-button"),
|
|
844
|
+
t.class(
|
|
845
|
+
g(e)((n) => `bc-social-login-button--${n}`)
|
|
846
|
+
),
|
|
847
|
+
i.span(
|
|
848
|
+
t.class("bc-social-login-button__inner"),
|
|
849
|
+
i.span(
|
|
850
|
+
t.class("bc-social-login-button__icon"),
|
|
851
|
+
he({ icon: l, size: c }, t.class("bc-social-login-button__icon-inner"))
|
|
852
|
+
),
|
|
853
|
+
P(
|
|
854
|
+
x,
|
|
855
|
+
(n) => i.span(
|
|
856
|
+
t.class("bc-social-login-button__label"),
|
|
857
|
+
ce(
|
|
858
|
+
h(a?.continueWithProvider, n.$.continueWithProvider)
|
|
859
|
+
)(m)
|
|
860
|
+
)
|
|
861
|
+
)
|
|
862
|
+
)
|
|
863
|
+
);
|
|
864
|
+
}
|
|
865
|
+
function ve({
|
|
866
|
+
providers: e,
|
|
867
|
+
onProviderClick: o,
|
|
868
|
+
size: c = "md",
|
|
869
|
+
className: m
|
|
870
|
+
}) {
|
|
871
|
+
return B(
|
|
872
|
+
t.class("bc-social-login-buttons"),
|
|
873
|
+
t.class(m),
|
|
874
|
+
le(
|
|
875
|
+
e,
|
|
876
|
+
(l) => d({
|
|
877
|
+
provider: l.$.provider,
|
|
878
|
+
flow: l.$.flow,
|
|
879
|
+
color: l.map(
|
|
880
|
+
({ provider: s }) => p[s].color
|
|
881
|
+
),
|
|
882
|
+
name: l.map(({ provider: s }) => p[s].name),
|
|
883
|
+
icon: l.map(({ provider: s }) => p[s].icon),
|
|
884
|
+
onClick: async () => {
|
|
885
|
+
o && await o(l.$.provider.value);
|
|
886
|
+
},
|
|
887
|
+
size: c
|
|
888
|
+
})
|
|
889
|
+
)
|
|
890
|
+
);
|
|
891
|
+
}
|
|
892
|
+
const p = {
|
|
893
|
+
// Core
|
|
894
|
+
google: {
|
|
895
|
+
name: "Google",
|
|
896
|
+
icon: "logos:google-icon",
|
|
897
|
+
color: "red"
|
|
898
|
+
},
|
|
899
|
+
github: {
|
|
900
|
+
name: "GitHub",
|
|
901
|
+
icon: "logos:github-icon",
|
|
902
|
+
color: "black"
|
|
903
|
+
},
|
|
904
|
+
apple: {
|
|
905
|
+
name: "Apple",
|
|
906
|
+
icon: "logos:apple",
|
|
907
|
+
color: "stone"
|
|
908
|
+
// using stone to differentiate from GitHub/X
|
|
909
|
+
},
|
|
910
|
+
facebook: {
|
|
911
|
+
name: "Facebook",
|
|
912
|
+
icon: "logos:facebook",
|
|
913
|
+
color: "blue"
|
|
914
|
+
},
|
|
915
|
+
twitter: {
|
|
916
|
+
name: "Twitter",
|
|
917
|
+
icon: "logos:twitter",
|
|
918
|
+
color: "sky"
|
|
919
|
+
},
|
|
920
|
+
x: {
|
|
921
|
+
name: "X",
|
|
922
|
+
icon: "logos:x",
|
|
923
|
+
color: "zinc"
|
|
924
|
+
// avoids duplicate black
|
|
925
|
+
},
|
|
926
|
+
microsoft: {
|
|
927
|
+
name: "Microsoft",
|
|
928
|
+
icon: "logos:microsoft-icon",
|
|
929
|
+
color: "amber"
|
|
930
|
+
},
|
|
931
|
+
discord: {
|
|
932
|
+
name: "Discord",
|
|
933
|
+
icon: "logos:discord-icon",
|
|
934
|
+
color: "indigo"
|
|
935
|
+
},
|
|
936
|
+
linkedin: {
|
|
937
|
+
name: "LinkedIn",
|
|
938
|
+
icon: "logos:linkedin-icon",
|
|
939
|
+
color: "cyan"
|
|
940
|
+
},
|
|
941
|
+
// Social / Media
|
|
942
|
+
instagram: {
|
|
943
|
+
name: "Instagram",
|
|
944
|
+
icon: "logos:instagram-icon",
|
|
945
|
+
color: "fuchsia"
|
|
946
|
+
},
|
|
947
|
+
tiktok: {
|
|
948
|
+
name: "TikTok",
|
|
949
|
+
icon: "logos:tiktok-icon",
|
|
950
|
+
color: "teal"
|
|
951
|
+
},
|
|
952
|
+
snapchat: {
|
|
953
|
+
name: "Snapchat",
|
|
954
|
+
icon: "simple-icons:snapchat",
|
|
955
|
+
color: "yellow"
|
|
956
|
+
},
|
|
957
|
+
reddit: {
|
|
958
|
+
name: "Reddit",
|
|
959
|
+
icon: "logos:reddit-icon",
|
|
960
|
+
color: "orange"
|
|
961
|
+
},
|
|
962
|
+
pinterest: {
|
|
963
|
+
name: "Pinterest",
|
|
964
|
+
icon: "logos:pinterest",
|
|
965
|
+
color: "rose"
|
|
966
|
+
},
|
|
967
|
+
// Gaming / Entertainment
|
|
968
|
+
twitch: {
|
|
969
|
+
name: "Twitch",
|
|
970
|
+
icon: "logos:twitch",
|
|
971
|
+
color: "purple"
|
|
972
|
+
},
|
|
973
|
+
steam: {
|
|
974
|
+
name: "Steam",
|
|
975
|
+
icon: "logos:steam",
|
|
976
|
+
color: "slate"
|
|
977
|
+
},
|
|
978
|
+
epic: {
|
|
979
|
+
name: "Epic Games",
|
|
980
|
+
icon: "simple-icons:epicgames",
|
|
981
|
+
color: "neutral"
|
|
982
|
+
},
|
|
983
|
+
playstation: {
|
|
984
|
+
name: "PlayStation",
|
|
985
|
+
icon: "simple-icons:playstation",
|
|
986
|
+
color: "violet"
|
|
987
|
+
},
|
|
988
|
+
xbox: {
|
|
989
|
+
name: "Xbox",
|
|
990
|
+
icon: "simple-icons:xbox",
|
|
991
|
+
color: "green"
|
|
992
|
+
},
|
|
993
|
+
// Messaging
|
|
994
|
+
whatsapp: {
|
|
995
|
+
name: "WhatsApp",
|
|
996
|
+
icon: "logos:whatsapp-icon",
|
|
997
|
+
color: "emerald"
|
|
998
|
+
},
|
|
999
|
+
wechat: {
|
|
1000
|
+
name: "WeChat",
|
|
1001
|
+
icon: "simple-icons:wechat",
|
|
1002
|
+
color: "lime"
|
|
1003
|
+
},
|
|
1004
|
+
// Other Identity
|
|
1005
|
+
amazon: {
|
|
1006
|
+
name: "Amazon",
|
|
1007
|
+
icon: "simple-icons:amazon",
|
|
1008
|
+
color: "red"
|
|
1009
|
+
// distinct warm tone (not used elsewhere here)
|
|
1010
|
+
},
|
|
1011
|
+
yahoo: {
|
|
1012
|
+
name: "Yahoo",
|
|
1013
|
+
icon: "logos:yahoo",
|
|
1014
|
+
color: "rose"
|
|
1015
|
+
// unique variation for Yahoo
|
|
1016
|
+
},
|
|
1017
|
+
paypal: {
|
|
1018
|
+
name: "PayPal",
|
|
1019
|
+
icon: "logos:paypal",
|
|
1020
|
+
color: "blue"
|
|
1021
|
+
// distinct deep blue tone (not Facebook’s exact blue)
|
|
1022
|
+
}
|
|
1023
|
+
}, Ye = (e) => d({
|
|
1024
|
+
...e,
|
|
1025
|
+
...p.google,
|
|
1026
|
+
provider: "google"
|
|
1027
|
+
}), Ze = (e) => d({
|
|
1028
|
+
...e,
|
|
1029
|
+
...p.github,
|
|
1030
|
+
provider: "github"
|
|
1031
|
+
}), Je = (e) => d({
|
|
1032
|
+
...e,
|
|
1033
|
+
...p.apple,
|
|
1034
|
+
provider: "apple"
|
|
1035
|
+
}), Ke = (e) => d({
|
|
1036
|
+
...e,
|
|
1037
|
+
...p.facebook,
|
|
1038
|
+
provider: "facebook"
|
|
1039
|
+
}), Qe = (e) => d({
|
|
1040
|
+
...e,
|
|
1041
|
+
...p.x,
|
|
1042
|
+
provider: "x"
|
|
1043
|
+
}), eo = (e) => d({
|
|
1044
|
+
...e,
|
|
1045
|
+
...p.twitter,
|
|
1046
|
+
provider: "twitter"
|
|
1047
|
+
}), oo = (e) => d({
|
|
1048
|
+
...e,
|
|
1049
|
+
...p.microsoft,
|
|
1050
|
+
provider: "microsoft"
|
|
1051
|
+
}), to = (e) => d({
|
|
1052
|
+
...e,
|
|
1053
|
+
...p.discord,
|
|
1054
|
+
provider: "discord"
|
|
1055
|
+
}), ao = (e) => d({
|
|
1056
|
+
...e,
|
|
1057
|
+
...p.linkedin,
|
|
1058
|
+
provider: "linkedin"
|
|
1059
|
+
}), so = (e) => d({
|
|
1060
|
+
...e,
|
|
1061
|
+
...p.instagram,
|
|
1062
|
+
provider: "instagram"
|
|
1063
|
+
}), no = (e) => d({
|
|
1064
|
+
...e,
|
|
1065
|
+
...p.tiktok,
|
|
1066
|
+
provider: "tiktok"
|
|
1067
|
+
}), ro = (e) => d({
|
|
1068
|
+
...e,
|
|
1069
|
+
...p.snapchat,
|
|
1070
|
+
provider: "snapchat"
|
|
1071
|
+
}), io = (e) => d({
|
|
1072
|
+
...e,
|
|
1073
|
+
...p.reddit,
|
|
1074
|
+
provider: "reddit"
|
|
1075
|
+
}), co = (e) => d({
|
|
1076
|
+
...e,
|
|
1077
|
+
...p.pinterest,
|
|
1078
|
+
provider: "pinterest"
|
|
1079
|
+
}), lo = (e) => d({
|
|
1080
|
+
...e,
|
|
1081
|
+
...p.twitch,
|
|
1082
|
+
provider: "twitch"
|
|
1083
|
+
}), mo = (e) => d({
|
|
1084
|
+
...e,
|
|
1085
|
+
...p.steam,
|
|
1086
|
+
provider: "steam"
|
|
1087
|
+
}), uo = (e) => d({
|
|
1088
|
+
...e,
|
|
1089
|
+
...p.epic,
|
|
1090
|
+
provider: "epic"
|
|
1091
|
+
}), po = (e) => d({
|
|
1092
|
+
...e,
|
|
1093
|
+
...p.playstation,
|
|
1094
|
+
provider: "playstation"
|
|
1095
|
+
}), ho = (e) => d({
|
|
1096
|
+
...e,
|
|
1097
|
+
...p.xbox,
|
|
1098
|
+
provider: "xbox"
|
|
1099
|
+
}), go = (e) => d({
|
|
1100
|
+
...e,
|
|
1101
|
+
...p.whatsapp,
|
|
1102
|
+
provider: "whatsapp"
|
|
1103
|
+
}), fo = (e) => d({
|
|
1104
|
+
...e,
|
|
1105
|
+
...p.wechat,
|
|
1106
|
+
provider: "wechat"
|
|
1107
|
+
}), bo = (e) => d({
|
|
1108
|
+
...e,
|
|
1109
|
+
...p.amazon,
|
|
1110
|
+
provider: "amazon"
|
|
1111
|
+
}), wo = (e) => d({
|
|
1112
|
+
...e,
|
|
1113
|
+
...p.yahoo,
|
|
1114
|
+
provider: "yahoo"
|
|
1115
|
+
}), _o = (e) => d({
|
|
1116
|
+
...e,
|
|
1117
|
+
...p.paypal,
|
|
1118
|
+
provider: "paypal"
|
|
1119
|
+
});
|
|
1120
|
+
function te({ providers: e, onSocialLogin: o }) {
|
|
1121
|
+
return B(
|
|
1122
|
+
ve({
|
|
1123
|
+
providers: e,
|
|
1124
|
+
onProviderClick: o
|
|
1125
|
+
})
|
|
1126
|
+
);
|
|
1127
|
+
}
|
|
1128
|
+
function ye({
|
|
1129
|
+
mode: e,
|
|
1130
|
+
socialProviders: o,
|
|
1131
|
+
initialName: c,
|
|
1132
|
+
initialEmail: m,
|
|
1133
|
+
passwordRules: l,
|
|
1134
|
+
showRememberMe: s,
|
|
1135
|
+
showSocialDivider: u,
|
|
1136
|
+
showPasswordStrength: a,
|
|
1137
|
+
labels: r,
|
|
1138
|
+
onSignIn: n,
|
|
1139
|
+
onSignUp: f,
|
|
1140
|
+
onResetPassword: _,
|
|
1141
|
+
onModeChange: L,
|
|
1142
|
+
onSocialLogin: k,
|
|
1143
|
+
showContainer: y
|
|
1144
|
+
}, ...M) {
|
|
1145
|
+
const q = e != null ? ee.deriveProp(e) : U("signin");
|
|
1146
|
+
return q.on((S) => L?.(S)), P(x, (S) => {
|
|
1147
|
+
function E() {
|
|
1148
|
+
const b = h(r?.hasAccountLink, S.$.hasAccountLink);
|
|
1149
|
+
return i.button(
|
|
1150
|
+
t.type("button"),
|
|
1151
|
+
t.class("bc-auth-form__link"),
|
|
1152
|
+
z.click(() => q.set("signin")),
|
|
1153
|
+
b
|
|
1154
|
+
);
|
|
1155
|
+
}
|
|
1156
|
+
function O() {
|
|
1157
|
+
return i.button(
|
|
1158
|
+
t.type("button"),
|
|
1159
|
+
t.class("bc-auth-form__link"),
|
|
1160
|
+
z.click(() => q.set("signup")),
|
|
1161
|
+
h(r?.noAccountLink, S.$.noAccountLink)
|
|
1162
|
+
);
|
|
1163
|
+
}
|
|
1164
|
+
function C() {
|
|
1165
|
+
return i.button(
|
|
1166
|
+
t.type("button"),
|
|
1167
|
+
t.class("bc-auth-form__link"),
|
|
1168
|
+
z.click(() => q.set("reset-password")),
|
|
1169
|
+
h(r?.forgotPasswordLink, S.$.forgotPasswordLink)
|
|
1170
|
+
);
|
|
1171
|
+
}
|
|
1172
|
+
return i.div(
|
|
1173
|
+
ge({
|
|
1174
|
+
"bc-auth-container": !0,
|
|
1175
|
+
"bc-auth-container--styled": ee.map(y ?? !0, (b) => b)
|
|
1176
|
+
}),
|
|
1177
|
+
t.class(q.map((b) => `bc-auth-container--${b}`)),
|
|
1178
|
+
t.class("bc-auth-form"),
|
|
1179
|
+
me(q, {
|
|
1180
|
+
signin: () => A(
|
|
1181
|
+
i.h2(
|
|
1182
|
+
t.class("bc-auth-form__title"),
|
|
1183
|
+
h(r?.signInTitle, S.$.signInTitle)
|
|
1184
|
+
),
|
|
1185
|
+
o != null ? A(
|
|
1186
|
+
te({ providers: o, onSocialLogin: k }),
|
|
1187
|
+
w(u ?? !1, ae)
|
|
1188
|
+
) : null,
|
|
1189
|
+
we({
|
|
1190
|
+
onSignIn: n,
|
|
1191
|
+
showRememberMe: s,
|
|
1192
|
+
passwordRules: l,
|
|
1193
|
+
labels: {
|
|
1194
|
+
emailLabel: r?.emailLabel,
|
|
1195
|
+
passwordLabel: r?.passwordLabel,
|
|
1196
|
+
rememberMeLabel: r?.rememberMeLabel,
|
|
1197
|
+
signInButton: r?.signInButton,
|
|
1198
|
+
forgotPasswordLink: r?.forgotPasswordLink,
|
|
1199
|
+
noAccountLink: r?.noAccountLink
|
|
1200
|
+
}
|
|
1201
|
+
}),
|
|
1202
|
+
B(
|
|
1203
|
+
t.class("bc-auth-form__footer"),
|
|
1204
|
+
O(),
|
|
1205
|
+
C()
|
|
1206
|
+
)
|
|
1207
|
+
),
|
|
1208
|
+
signup: () => A(
|
|
1209
|
+
i.h2(
|
|
1210
|
+
t.class("bc-auth-form__title"),
|
|
1211
|
+
h(r?.signUpTitle, S.$.signUpTitle)
|
|
1212
|
+
),
|
|
1213
|
+
o != null ? A(
|
|
1214
|
+
te({ providers: o, onSocialLogin: k }),
|
|
1215
|
+
w(u ?? !1, ae)
|
|
1216
|
+
) : null,
|
|
1217
|
+
Le({
|
|
1218
|
+
labels: {
|
|
1219
|
+
nameLabel: r?.nameLabel,
|
|
1220
|
+
emailLabel: r?.emailLabel,
|
|
1221
|
+
passwordLabel: r?.passwordLabel,
|
|
1222
|
+
confirmPasswordLabel: r?.confirmPasswordLabel,
|
|
1223
|
+
acceptTermsLabel: r?.acceptTermsLabel,
|
|
1224
|
+
signUpButton: r?.signUpButton,
|
|
1225
|
+
hasAccountLink: r?.hasAccountLink
|
|
1226
|
+
},
|
|
1227
|
+
initialEmail: m,
|
|
1228
|
+
initialName: c,
|
|
1229
|
+
onSignUp: f,
|
|
1230
|
+
passwordRules: l,
|
|
1231
|
+
showPasswordStrength: a
|
|
1232
|
+
}),
|
|
1233
|
+
B(t.class("bc-auth-form__footer"), E())
|
|
1234
|
+
),
|
|
1235
|
+
"reset-password": () => A(
|
|
1236
|
+
i.h2(
|
|
1237
|
+
t.class("bc-auth-form__title"),
|
|
1238
|
+
h(r?.resetPasswordTitle, S.$.resetPasswordTitle)
|
|
1239
|
+
),
|
|
1240
|
+
ke({
|
|
1241
|
+
labels: {
|
|
1242
|
+
backToSignInLink: r?.backToSignInLink,
|
|
1243
|
+
emailLabel: r?.emailLabel,
|
|
1244
|
+
resetPasswordButton: r?.resetPasswordButton,
|
|
1245
|
+
resetPasswordDescription: r?.resetPasswordDescription
|
|
1246
|
+
},
|
|
1247
|
+
onResetPassword: _
|
|
1248
|
+
}),
|
|
1249
|
+
B(t.class("bc-auth-form__footer"), E())
|
|
1250
|
+
)
|
|
1251
|
+
}),
|
|
1252
|
+
...M
|
|
1253
|
+
);
|
|
1254
|
+
});
|
|
1255
|
+
}
|
|
1256
|
+
function Lo(e) {
|
|
1257
|
+
return pe(
|
|
1258
|
+
{
|
|
1259
|
+
size: "sm",
|
|
1260
|
+
dismissable: !0,
|
|
1261
|
+
showCloseButton: !0
|
|
1262
|
+
},
|
|
1263
|
+
(o, c) => e(
|
|
1264
|
+
(m) => o({
|
|
1265
|
+
body: ye({ showContainer: !1, ...m }),
|
|
1266
|
+
header: P(
|
|
1267
|
+
x,
|
|
1268
|
+
(l) => h(m.modalTitle, l.$.authenticationTitle)
|
|
1269
|
+
)
|
|
1270
|
+
})
|
|
1271
|
+
)
|
|
1272
|
+
);
|
|
1273
|
+
}
|
|
1274
|
+
function ae({
|
|
1275
|
+
labels: e,
|
|
1276
|
+
className: o
|
|
1277
|
+
} = {}) {
|
|
1278
|
+
return i.div(
|
|
1279
|
+
t.class("bc-auth-divider"),
|
|
1280
|
+
t.class(o),
|
|
1281
|
+
i.div(t.class("bc-auth-divider__line")),
|
|
1282
|
+
P(
|
|
1283
|
+
x,
|
|
1284
|
+
(c) => i.span(
|
|
1285
|
+
t.class("bc-auth-divider__text"),
|
|
1286
|
+
h(e?.text, c.$.orDivider)
|
|
1287
|
+
)
|
|
1288
|
+
),
|
|
1289
|
+
i.div(t.class("bc-auth-divider__line"))
|
|
1290
|
+
);
|
|
1291
|
+
}
|
|
1292
|
+
export {
|
|
1293
|
+
Ue as $,
|
|
1294
|
+
ye as A,
|
|
1295
|
+
lo as B,
|
|
1296
|
+
mo as C,
|
|
1297
|
+
to as D,
|
|
1298
|
+
uo as E,
|
|
1299
|
+
Ke as F,
|
|
1300
|
+
Ye as G,
|
|
1301
|
+
po as H,
|
|
1302
|
+
so as I,
|
|
1303
|
+
ho as J,
|
|
1304
|
+
fo as K,
|
|
1305
|
+
ao as L,
|
|
1306
|
+
oo as M,
|
|
1307
|
+
bo as N,
|
|
1308
|
+
_o as O,
|
|
1309
|
+
_e as P,
|
|
1310
|
+
te as Q,
|
|
1311
|
+
ke as R,
|
|
1312
|
+
we as S,
|
|
1313
|
+
eo as T,
|
|
1314
|
+
X as U,
|
|
1315
|
+
fe as V,
|
|
1316
|
+
go as W,
|
|
1317
|
+
Qe as X,
|
|
1318
|
+
wo as Y,
|
|
1319
|
+
ze as Z,
|
|
1320
|
+
Ee as _,
|
|
1321
|
+
Lo as a,
|
|
1322
|
+
$ as a0,
|
|
1323
|
+
Ve as a1,
|
|
1324
|
+
be as a2,
|
|
1325
|
+
Fe as a3,
|
|
1326
|
+
Me as a4,
|
|
1327
|
+
Oe as a5,
|
|
1328
|
+
Ne as a6,
|
|
1329
|
+
Y as a7,
|
|
1330
|
+
ae as b,
|
|
1331
|
+
je as c,
|
|
1332
|
+
Xe as d,
|
|
1333
|
+
Z as e,
|
|
1334
|
+
F as f,
|
|
1335
|
+
J as g,
|
|
1336
|
+
K as h,
|
|
1337
|
+
Re as i,
|
|
1338
|
+
De as j,
|
|
1339
|
+
We as k,
|
|
1340
|
+
He as l,
|
|
1341
|
+
Q as m,
|
|
1342
|
+
Le as n,
|
|
1343
|
+
d as o,
|
|
1344
|
+
ve as p,
|
|
1345
|
+
Ze as q,
|
|
1346
|
+
ne as r,
|
|
1347
|
+
p as s,
|
|
1348
|
+
Je as t,
|
|
1349
|
+
re as u,
|
|
1350
|
+
Ge as v,
|
|
1351
|
+
no as w,
|
|
1352
|
+
ro as x,
|
|
1353
|
+
io as y,
|
|
1354
|
+
co as z
|
|
1355
|
+
};
|