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