your-ai-workflow-firebase-os 2.0.1 → 2.0.3

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 (183) hide show
  1. package/dist/AccessNotice-BZ5Gt1nP.js +40 -0
  2. package/dist/AccessNotice-CN7kc70o.cjs +1 -0
  3. package/dist/{AddressField-R-HvndkG.js → AddressField-9Sqn8TvC.js} +3 -3
  4. package/dist/{AddressField-BkzFOo2t.cjs → AddressField-B7wtV8yA.cjs} +1 -1
  5. package/dist/Assets-DBMwZ3bN.cjs +1 -0
  6. package/dist/Assets-DT-NU_WO.js +296 -0
  7. package/dist/Attachments-Bl9_dfsu.js +46 -0
  8. package/dist/Attachments-UVK9SRXf.cjs +1 -0
  9. package/dist/Billing-0RIHayHy.cjs +1 -0
  10. package/dist/Billing-FNE2r3_d.js +379 -0
  11. package/dist/BookingCalendar-BP5kiv3d.cjs +1 -0
  12. package/dist/BookingCalendar-DZ2fEFja.js +309 -0
  13. package/dist/Button-4lzOE31p.js +48 -0
  14. package/dist/Button-5DlB2MCi.cjs +1 -0
  15. package/dist/CalendarView-BimoXy_k.cjs +1 -0
  16. package/dist/CalendarView-D-ykjpvI.js +664 -0
  17. package/dist/ConfirmModal-Di9GR-vV.cjs +1 -0
  18. package/dist/ConfirmModal-gKQEpd4d.js +113 -0
  19. package/dist/ContactPopup-BXnHrRwl.js +1114 -0
  20. package/dist/ContactPopup-lxmRMoIa.cjs +1 -0
  21. package/dist/CopyLink-BpEQWmfI.cjs +1 -0
  22. package/dist/CopyLink-CBAVfcm1.js +43 -0
  23. package/dist/DashboardNav-CXa_ci-_.cjs +1 -0
  24. package/dist/DashboardNav-Dmn7PVSp.js +886 -0
  25. package/dist/EmailAdmin-CjN_rvxT.js +318 -0
  26. package/dist/EmailAdmin-lAEBdY1s.cjs +1 -0
  27. package/dist/EventCard-46EquygT.cjs +1 -0
  28. package/dist/EventCard-B6xD-mk3.js +97 -0
  29. package/dist/FileViewerPopup-CX-J75TM.js +1283 -0
  30. package/dist/FileViewerPopup-D8-MmIoS.cjs +3 -0
  31. package/dist/FormNote-BivRNA3J.js +50 -0
  32. package/dist/FormNote-BtdTGpml.cjs +1 -0
  33. package/dist/FormsAdmin-B5PBCG2W.js +812 -0
  34. package/dist/FormsAdmin-BQCULvi5.cjs +1 -0
  35. package/dist/Inbox-BPk2ZkE5.js +779 -0
  36. package/dist/Inbox-DNrcBx0o.cjs +3 -0
  37. package/dist/Loader-Bu89fsbB.cjs +1 -0
  38. package/dist/Loader-D4gwgBOq.js +32 -0
  39. package/dist/ManagePlanButton-B0dwqZBd.cjs +1 -0
  40. package/dist/ManagePlanButton-BSrOHYze.js +29 -0
  41. package/dist/MyBookings-6qr0GgzO.cjs +1 -0
  42. package/dist/MyBookings-BQjGM2LQ.js +113 -0
  43. package/dist/PageTitle-CZhgmmDT.cjs +3 -0
  44. package/dist/PageTitle-D93YCiN8.js +1606 -0
  45. package/dist/PagesAdmin-BcHIcqM5.cjs +34 -0
  46. package/dist/PagesAdmin-D69P9nRb.js +5802 -0
  47. package/dist/PagesAdmin-DNwZOKjA.cjs +1 -0
  48. package/dist/PagesAdmin-HUITEcHx.js +3 -0
  49. package/dist/PaymentsAdmin-C2iCI9qC.js +1291 -0
  50. package/dist/PaymentsAdmin-CoXi2vCm.cjs +2 -0
  51. package/dist/{PhoneInputField-B3P_vUDW.cjs → PhoneInputField-BEwYZMB7.cjs} +1 -1
  52. package/dist/{PhoneInputField-BlYHb5e0.js → PhoneInputField-BG0L2djE.js} +2 -2
  53. package/dist/PhoneInputField-DfOtCIH_.js +2 -0
  54. package/dist/{PhoneInputField-CdNTvWXQ.cjs → PhoneInputField-jhWvto8C.cjs} +1 -1
  55. package/dist/Popup-DHYGFl2-.cjs +1 -0
  56. package/dist/Popup-xROLytgr.js +142 -0
  57. package/dist/ProviderMark-BBfaM5Yl.js +52 -0
  58. package/dist/ProviderMark-xLkUN3Fx.cjs +1 -0
  59. package/dist/PublishApp-Bm-6r3Td.js +595 -0
  60. package/dist/PublishApp-D4XJUkJa.cjs +2 -0
  61. package/dist/Said-CoC15awL.js +94 -0
  62. package/dist/Said-IqCNofdh.cjs +1 -0
  63. package/dist/ScheduleAdmin-BKfQkrR8.js +1853 -0
  64. package/dist/ScheduleAdmin-DwK36GAZ.cjs +1 -0
  65. package/dist/SchedulePicker--urIH2Eb.js +112 -0
  66. package/dist/SchedulePicker-nmqzUnUH.cjs +1 -0
  67. package/dist/Setup-CHLgd-ag.js +849 -0
  68. package/dist/Setup-CaDranTm.cjs +1374 -0
  69. package/dist/SetupPayments-CVIwh1eQ.js +411 -0
  70. package/dist/SetupPayments-HNXWA25X.cjs +1 -0
  71. package/dist/SignInAdmin-C94-A-0w.cjs +4 -0
  72. package/dist/SignInAdmin-Yxgv_8U4.js +766 -0
  73. package/dist/SupportBar-CDT0HwdP.cjs +1 -0
  74. package/dist/SupportBar-CN_JGC-9.js +117 -0
  75. package/dist/SystemTabContent-L3vGGF3P.cjs +1 -0
  76. package/dist/SystemTabContent-QdxxLILE.js +35 -0
  77. package/dist/TemplateDrive-DV8zNjYe.cjs +1 -0
  78. package/dist/TemplateDrive-NJY_AAvV.js +1197 -0
  79. package/dist/ThemeAdmin-BzFjJkLg.js +269 -0
  80. package/dist/ThemeAdmin-DVnPNxe7.cjs +1 -0
  81. package/dist/ThemeAdmin-DY7Vc4Sj.cjs +3 -0
  82. package/dist/ThemeAdmin-DnC-D2N3.js +2 -0
  83. package/dist/{ContactPopup-9J_YeJrb.js → TimeZoneField-DkI1Bkcz.js} +3382 -5513
  84. package/dist/TimeZoneField-qs7NPR30.cjs +12 -0
  85. package/dist/TransactionsAdmin-BsZ-oQWi.js +582 -0
  86. package/dist/TransactionsAdmin-CTSTiPld.cjs +1 -0
  87. package/dist/Trouble-9es_AI4F.cjs +1 -0
  88. package/dist/Trouble-oWt9fMsm.js +164 -0
  89. package/dist/Users-CTitWXyd.cjs +1 -0
  90. package/dist/Users-DJjQTWJF.js +1207 -0
  91. package/dist/aiModels-DIP9fn8T.cjs +1 -0
  92. package/dist/{aiModels-BHlEfuRJ.js → aiModels-DnDhNGup.js} +29 -61
  93. package/dist/arrivalRoads-BJ-35vkk.js +228 -0
  94. package/dist/arrivalRoads-qoU-B4jt.cjs +4 -0
  95. package/dist/{bake-D0gLVNTL.cjs → bake-n2wyFw0B.cjs} +1 -1
  96. package/dist/{bake-OErV2MLy.js → bake-naZeMu98.js} +14 -14
  97. package/dist/bookingPages-C7a3srPG.js +102 -0
  98. package/dist/bookingPages-DvbFbD9X.cjs +1 -0
  99. package/dist/components/CustomSelect.d.ts +7 -1
  100. package/dist/components/RegistrationFields.d.ts +6 -1
  101. package/dist/components/Reveal.d.ts +12 -0
  102. package/dist/components/ScrollToTop.d.ts +4 -0
  103. package/dist/contentFallback-C9MZjdq7.cjs +1 -0
  104. package/dist/contentFallback-CEDY0Pwp.js +96 -0
  105. package/dist/contentKey-Bwry4lDa.js +13 -0
  106. package/dist/contentKey-DJGYYnAE.cjs +1 -0
  107. package/dist/{dist-_zWHDDrc.js → dist-DUPvBnOA.js} +1 -1
  108. package/dist/email-BfnZnMwD.cjs +1 -0
  109. package/dist/email-Ddj8Dlu6.js +58 -0
  110. package/dist/{fileBytes-B0qxHYQL.cjs → fileBytes-BJPaiX9Y.cjs} +1 -1
  111. package/dist/{fileBytes-uhq3pGCS.js → fileBytes-bjgvCfWu.js} +2 -2
  112. package/dist/forms-Bvx9HTM6.js +75 -0
  113. package/dist/forms-CmNeTETW.cjs +1 -0
  114. package/dist/lib/ThemeContext.d.ts +0 -14
  115. package/dist/lib/bareImgWatch.d.ts +6 -1
  116. package/dist/lib/localEdits.d.ts +2 -0
  117. package/dist/lib/pageDesignLines.d.ts +1 -1
  118. package/dist/lib/paymentProducts.d.ts +8 -0
  119. package/dist/lib/payments.d.ts +11 -1
  120. package/dist/lib/people.d.ts +9 -0
  121. package/dist/lib/recordsKey.d.ts +24 -0
  122. package/dist/{lucide-react-DiyP8FA_.js → lucide-react-CA7GD7Nv.js} +8 -8
  123. package/dist/notices-B7iIrIEg.js +29 -0
  124. package/dist/notices-upMg8UVh.cjs +1 -0
  125. package/dist/openOnArrival-Buwqb86D.cjs +1 -0
  126. package/dist/openOnArrival-S2K6v-lB.js +35 -0
  127. package/dist/pageFiles--Ih60ITP.js +45 -0
  128. package/dist/pageFiles-UtBmlOcD.cjs +1 -0
  129. package/dist/pages/PagesAdmin.d.ts +69 -7
  130. package/dist/{pdf-DLuvpvHg.js → pdf-DRXcPGkr.js} +1 -1
  131. package/dist/{pdf.worker.min-C0gkd2Ec.js → pdf.worker.min-CfKZezeM.js} +1 -1
  132. package/dist/people-2jZE_pdI.js +102 -0
  133. package/dist/people-BpVvIr9-.cjs +1 -0
  134. package/dist/personName-CFw3pxuu.js +18 -0
  135. package/dist/personName-CbzN_i57.cjs +1 -0
  136. package/dist/publishSteps-C1cDFzzB.js +88 -0
  137. package/dist/publishSteps-SSm8afDw.cjs +1 -0
  138. package/dist/recordLock-DHVvI9bP.js +61 -0
  139. package/dist/recordLock-DWeIxiwh.cjs +1 -0
  140. package/dist/recordsKey-B7QrxdeU.cjs +1 -0
  141. package/dist/recordsKey-D5-wC0Aw.js +141 -0
  142. package/dist/registrationFields-CLeR2lQJ.js +181 -0
  143. package/dist/registrationFields-v4pOoRdn.cjs +1 -0
  144. package/dist/renderer.cjs.js +1 -1
  145. package/dist/renderer.es.js +1 -1
  146. package/dist/roles-D6VaHWfV.js +147 -0
  147. package/dist/roles-DQUFFBQe.cjs +1 -0
  148. package/dist/scheduleData-ATN8w5hI.js +727 -0
  149. package/dist/scheduleData-Cltj0ABZ.cjs +1 -0
  150. package/dist/server.cjs.js +6 -6
  151. package/dist/server.es.js +716 -715
  152. package/dist/serviceStatus-TQyZO_Y_.cjs +1 -0
  153. package/dist/serviceStatus-vS8AI7SZ.js +125 -0
  154. package/dist/tabAudience-BqpN6dsR.cjs +1 -0
  155. package/dist/tabAudience-CRyMvv0v.js +34 -0
  156. package/dist/transactions-BqMQDRx3.js +343 -0
  157. package/dist/transactions-CufFrdAM.cjs +1 -0
  158. package/dist/useIsPhone-BVGx_X3e.js +13 -0
  159. package/dist/useIsPhone-o63tNneA.cjs +1 -0
  160. package/dist/{validate-DzSJWuyL.js → validate-CmC_tLK-.js} +433 -351
  161. package/dist/validate-DZMwqSrb.cjs +103 -0
  162. package/dist/vite/validate.d.ts +14 -0
  163. package/dist/vite.cjs.js +1 -1
  164. package/dist/vite.es.js +1 -1
  165. package/dist/your-ai-workflow-firebase-os.cjs.js +15 -1431
  166. package/dist/your-ai-workflow-firebase-os.css +1 -1
  167. package/dist/your-ai-workflow-firebase-os.es.js +11695 -35911
  168. package/package.json +1 -1
  169. package/src/index.css +122 -2
  170. package/dist/ContactPopup-DF8qQCoY.cjs +0 -12
  171. package/dist/PhoneInputField-Btx07xvM.js +0 -2
  172. package/dist/aiModels-BIhoTNH0.cjs +0 -1
  173. package/dist/validate-e48WXJdP.cjs +0 -103
  174. /package/dist/{address-DI1YaCI4.cjs → address-Bsb8COq2.cjs} +0 -0
  175. /package/dist/{address-Ca1h_UZX.js → address-C2bHNxJU.js} +0 -0
  176. /package/dist/{dist-BLGlDv1e.cjs → dist-E4jTFPs7.cjs} +0 -0
  177. /package/dist/{lucide-react-BYniZ3lQ.cjs → lucide-react-BwV6L6Is.cjs} +0 -0
  178. /package/dist/{mediaKind-dk396a03.cjs → mediaKind-D0MWyv6b.cjs} +0 -0
  179. /package/dist/{mediaKind-De2Cx_kB.js → mediaKind-DmKMsjeY.js} +0 -0
  180. /package/dist/{pdf-CC5g01eC.cjs → pdf-jLjjhvjp.cjs} +0 -0
  181. /package/dist/{pdf.worker.min-pI_P-OCl.cjs → pdf.worker.min-bLgNWd7w.cjs} +0 -0
  182. /package/dist/{verifiedAccount-C1iCxopN.js → verifiedAccount-DRbRFJ6H.js} +0 -0
  183. /package/dist/{verifiedAccount-D3OeaOBo.cjs → verifiedAccount-DScyKk96.cjs} +0 -0
@@ -0,0 +1,766 @@
1
+ import { o as e, t } from "./PageTitle-D93YCiN8.js";
2
+ import { $r as n, Br as r, C as i, Jr as a, Kr as o, Lr as s, Qr as c, Rr as l, S as u, T as d, Ta as f, Ur as p, Vr as m, Xr as h, Zr as g, b as _, cr as v, g as y, h as b, ha as x, i as S, ka as C, nr as w, o as T, s as E, sr as D, v as O, w as k } from "./TimeZoneField-DkI1Bkcz.js";
3
+ import { t as A } from "./DashboardNav-Dmn7PVSp.js";
4
+ import { D as j, Dt as ee, G as te, Ht as M, Jt as ne, Nt as re, ht as ie, j as ae, o as oe, on as se, pt as ce, sn as N, v as le } from "./lucide-react-CA7GD7Nv.js";
5
+ import { t as ue } from "./Button-4lzOE31p.js";
6
+ import { C as P, b as F, t as de, y as I } from "./registrationFields-CLeR2lQJ.js";
7
+ import { l as L, n as fe, o as pe } from "./roles-D6VaHWfV.js";
8
+ import { t as R } from "./ProviderMark-BBfaM5Yl.js";
9
+ import { t as me } from "./SupportBar-CN_JGC-9.js";
10
+ import { useCallback as z, useEffect as he, useState as B } from "react";
11
+ import { Fragment as V, jsx as H, jsxs as U } from "react/jsx-runtime";
12
+ import { doc as W, onSnapshot as ge, setDoc as _e } from "firebase/firestore";
13
+ //#region src/components/AddRoleFooter.tsx
14
+ function ve({ roles: e, onCreated: t, placeholder: n = "Client", onPending: r }) {
15
+ let [i, a] = B(!1), [o, s] = B(""), [c, l] = B(""), [u, d] = B(!1), p = () => {
16
+ a(!1), s(""), l("");
17
+ }, m = async () => {
18
+ let n = pe(o, e);
19
+ if (n) {
20
+ l(n);
21
+ return;
22
+ }
23
+ let i = o.trim();
24
+ d(!0), r?.(i);
25
+ try {
26
+ t(await fe(i)), p();
27
+ } catch (e) {
28
+ l(f(e, "The role could not be saved. Try again."));
29
+ }
30
+ d(!1), r?.("");
31
+ }, h = "flex items-center gap-2 px-3 py-2.5 text-[13px]", g = { borderRadius: "calc(var(--input-radius, 0.75rem) - 0.25rem)" }, _ = "shrink-0 w-7 h-7 flex items-center justify-center rounded-md transition-colors cursor-pointer hover:bg-foreground/[0.07]";
32
+ return /* @__PURE__ */ H("div", {
33
+ className: "mt-1 pt-1 border-t border-[var(--panel-border)]/60",
34
+ children: u ? /* @__PURE__ */ U("div", {
35
+ className: `${h} justify-between font-medium text-foreground/55`,
36
+ style: g,
37
+ children: [/* @__PURE__ */ U("span", {
38
+ className: "truncate",
39
+ children: [
40
+ "Adding ",
41
+ o.trim(),
42
+ "…"
43
+ ]
44
+ }), /* @__PURE__ */ H(ie, { className: "w-3.5 h-3.5 shrink-0 animate-spin text-accent" })]
45
+ }) : i ? /* @__PURE__ */ U("div", {
46
+ className: "flex flex-col gap-1 p-1",
47
+ children: [/* @__PURE__ */ U("div", {
48
+ className: "flex items-center gap-1",
49
+ children: [
50
+ /* @__PURE__ */ H("input", {
51
+ autoFocus: !0,
52
+ value: o,
53
+ placeholder: n,
54
+ "aria-label": "Name the role",
55
+ onChange: (e) => {
56
+ s(e.target.value), c && l("");
57
+ },
58
+ onKeyDown: (e) => {
59
+ e.key === "Enter" && (e.preventDefault(), m()), e.key === "Escape" && (e.preventDefault(), p());
60
+ },
61
+ className: "flex-1 min-w-0 h-8 px-2.5 rounded-md border border-[var(--panel-border)] bg-[var(--panel-bg)] text-[13px] font-medium text-foreground placeholder:text-foreground/35 outline-none focus:border-accent transition-colors"
62
+ }),
63
+ /* @__PURE__ */ H("button", {
64
+ type: "button",
65
+ onClick: m,
66
+ title: "Add role",
67
+ "aria-label": "Add role",
68
+ className: `${_} text-accent`,
69
+ children: /* @__PURE__ */ H(N, { className: "w-3.5 h-3.5" })
70
+ }),
71
+ /* @__PURE__ */ H("button", {
72
+ type: "button",
73
+ onClick: p,
74
+ title: "Cancel",
75
+ "aria-label": "Cancel the new role",
76
+ className: `${_} text-foreground/45 hover:text-foreground`,
77
+ children: /* @__PURE__ */ H(oe, { className: "w-3.5 h-3.5" })
78
+ })
79
+ ]
80
+ }), c && /* @__PURE__ */ H("span", {
81
+ className: "text-[11.5px] font-semibold text-red-500 leading-snug px-1.5",
82
+ children: c
83
+ })]
84
+ }) : /* @__PURE__ */ U("div", {
85
+ role: "option",
86
+ "aria-selected": !1,
87
+ onClick: () => a(!0),
88
+ className: `${h} font-semibold text-accent hover:bg-foreground/5 cursor-pointer`,
89
+ style: g,
90
+ children: [/* @__PURE__ */ H(te, { className: "w-3.5 h-3.5 shrink-0" }), "Custom role…"]
91
+ })
92
+ });
93
+ }
94
+ //#endregion
95
+ //#region src/pages/RegistrationQuestions.tsx
96
+ var G = {
97
+ collection: "sys_configs",
98
+ doc: "registration_briefs"
99
+ }, K = "What do you want to ask people after they register?", ye = (e, t) => e === "member" ? K : `${K.slice(0, -1)} as ${g(e, t).replace("one of our team", "one of your team")}?`, be = "What would you like changed about these questions?", xe = "Their company name, and for business customers a VAT number — the VAT number must not be editable afterwards.", Se = "Which office they work from, and their job title.", Ce = "Make the VAT number optional, and ask which country they are in.", q = "Anything I have not decided — how a question is worded, what kind of box it is, what order they come in — decide yourself and write it finished; do not stop to ask me.", J = "Each question is { key, label, type, required, editable } — editable: false for an answer that must never be changed after it is first given.";
100
+ function we(e, t, n) {
101
+ let r = `src/your-ai-workflow-firebase-os/configs/${F(e)}`, i = String(n?.words || "").trim();
102
+ return n?.sent ? [
103
+ `The questions my app asks ${P(e, t)} on its Finish registration screen are one file: ${r}.`,
104
+ `Change that file, and leave the questions I have not mentioned exactly as they are; decide anything I have not said yourself. If it is not there, write it: one const named ${I(e)} with a fields list.`,
105
+ J,
106
+ `Here is what I would like changed: ${i || "___"}`
107
+ ].join("\n") : [
108
+ `My app shows people a Finish registration screen after they register — a few questions on top of a name and an email address, kept on the person's own profile. This is what I ask ${P(e, t)}.`,
109
+ `Write one file: ${r}, exporting one const named ${I(e)} with a fields list. Do not build a registration page or a form of your own, do not touch any other file, and do not add a question I have not asked for.`,
110
+ J,
111
+ q,
112
+ `Here is what I want to know: ${i || "___"}`
113
+ ].join("\n");
114
+ }
115
+ function Te(e, t) {
116
+ return [
117
+ "My app shows people a Finish registration screen after they register — a few questions on top of a name and an email address, kept on the person's own profile. It asks different questions depending on how somebody registers, one file per role below. Do not build a registration page or a form of your own, do not touch a file I have not named here, and do not add a question I have not asked for.",
118
+ ...e.filter((e) => String(t[e.id]?.words || "").trim()).map((e) => {
119
+ let n = `src/your-ai-workflow-firebase-os/configs/${F(e.id)}`, r = String(t[e.id]?.words || "").trim(), i = !!t[e.id]?.sent;
120
+ return [
121
+ `For ${P(e.id, e.name)}:`,
122
+ i ? `change ${n}, leaving any question I have not mentioned exactly as it is — if it is not there, write it, one const named ${I(e.id)} with a fields list.` : `write ${n}, exporting one const named ${I(e.id)} with a fields list.`,
123
+ `Here is what I ${i ? "would like changed" : "want to know"}: ${r}`
124
+ ].join(" ");
125
+ }),
126
+ J,
127
+ q
128
+ ].join("\n");
129
+ }
130
+ var Y = "fbos_swr_registration_briefs", Ee = () => {
131
+ try {
132
+ let e = localStorage.getItem(Y);
133
+ return e ? JSON.parse(e) : {};
134
+ } catch {
135
+ return {};
136
+ }
137
+ };
138
+ function De(e, t) {
139
+ let n = {
140
+ id: de,
141
+ name: x("user", t)
142
+ };
143
+ return e.finishRegistration.perRole ? [n, ...h(e, t).map((e) => ({
144
+ id: e.id,
145
+ name: e.name
146
+ }))] : [n];
147
+ }
148
+ function X({ list: t, answer: n, words: r, onType: i, onSave: a, onCopied: o, showPrompt: s = !0 }) {
149
+ let c = !!n?.sent;
150
+ return /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(_, {
151
+ label: c ? be : ye(t.id, t.name),
152
+ value: r,
153
+ placeholder: c ? Ce : t.id === "internal" ? Se : xe,
154
+ onChange: i,
155
+ onBlur: a
156
+ }), s && /* @__PURE__ */ H(e, {
157
+ compact: !0,
158
+ title: c ? "Change what you ask" : "Ask for these details",
159
+ prompt: we(t.id, t.name, {
160
+ ...n,
161
+ words: r
162
+ }),
163
+ locked: !r.trim(),
164
+ onCopied: o
165
+ })] });
166
+ }
167
+ function Oe({ settings: t }) {
168
+ let n = L(), [r, a] = B(Ee), [o, s] = B({}), [c, l] = B(null), [u, f] = B("");
169
+ he(() => ge(W(C, G.collection, G.doc), (e) => {
170
+ let t = e.exists() ? e.data() : {};
171
+ a(t);
172
+ try {
173
+ localStorage.setItem(Y, JSON.stringify(t));
174
+ } catch {}
175
+ }, (e) => {
176
+ console.warn("registration_briefs snapshot error:", e);
177
+ }), []);
178
+ let p = (e, t) => {
179
+ let n = {
180
+ ...r[e],
181
+ ...t
182
+ };
183
+ a((t) => ({
184
+ ...t,
185
+ [e]: n
186
+ })), _e(W(C, G.collection, G.doc), { [e]: n }, { merge: !0 }).catch((e) => console.warn("registration_briefs write failed:", e));
187
+ }, m = z((e) => {
188
+ s((t) => ({
189
+ ...t,
190
+ [e]: ""
191
+ })), p(e, {
192
+ words: "",
193
+ sent: Date.now()
194
+ });
195
+ }, [r]), g = z((e) => {
196
+ s((t) => {
197
+ let n = { ...t };
198
+ for (let t of e) n[t] = "";
199
+ return n;
200
+ });
201
+ let t = Date.now();
202
+ for (let n of e) p(n, {
203
+ words: "",
204
+ sent: t
205
+ });
206
+ }, [r]), { skippable: _, perRole: x } = t.finishRegistration, S = h(t, n).length > 0, w = async (e) => f(await t.setFinishRegistration(e) || ""), T = De(t, n), E = (e) => o[e] ?? r[e]?.words ?? "", O = (e) => ({
207
+ list: e,
208
+ answer: r[e.id],
209
+ words: E(e.id),
210
+ onType: (t) => s((n) => ({
211
+ ...n,
212
+ [e.id]: t
213
+ })),
214
+ onSave: () => {
215
+ E(e.id) !== (r[e.id]?.words ?? "") && p(e.id, { words: E(e.id) });
216
+ }
217
+ }), k = T.filter((e) => E(e.id).trim()).map((e) => e.id), A = {};
218
+ for (let e of T) A[e.id] = {
219
+ ...r[e.id],
220
+ words: E(e.id)
221
+ };
222
+ let j = k.some((e) => r[e]?.sent);
223
+ return /* @__PURE__ */ U(b, {
224
+ title: "Finish registration",
225
+ description: "A screen people see once, after they register, for anything you want to know on top of a name and an email address. It only appears when you have asked for something.",
226
+ children: [
227
+ /* @__PURE__ */ H(y, { children: "Some of it is there already: somebody who came in with a phone number or an emailed link is asked for a name or an email address first, and then for your questions. People can change their own answers on their Profile, and you can read them on the Users screen." }),
228
+ /* @__PURE__ */ H(i, {
229
+ label: "People can skip it",
230
+ hint: _ ? "Skippable — the screen has a Skip for now, and anything you marked as needed is asked again next time they sign in." : "Required — nobody goes on until it is filled in. You and your admins are never held.",
231
+ hintWideOnly: !0,
232
+ enabled: _,
233
+ onChange: (e) => w({ skippable: e }),
234
+ disabled: t.loading
235
+ }),
236
+ S && /* @__PURE__ */ H(i, {
237
+ label: "Different questions for different roles",
238
+ hint: x ? "One set of questions per role below. A role with none of its own is asked everybody's." : "One set of questions, asked of everybody whatever they registered as.",
239
+ hintWideOnly: !0,
240
+ enabled: x,
241
+ onChange: (e) => w({ perRole: e }),
242
+ disabled: t.loading
243
+ }),
244
+ u ? /* @__PURE__ */ H(y, {
245
+ tone: "error",
246
+ children: u
247
+ }) : null,
248
+ T.length === 1 ? /* @__PURE__ */ H("div", {
249
+ className: "flex flex-col gap-4",
250
+ children: /* @__PURE__ */ H(X, {
251
+ ...O(T[0]),
252
+ onCopied: () => m(T[0].id)
253
+ })
254
+ }) : /* @__PURE__ */ H("div", {
255
+ className: "flex flex-col gap-3",
256
+ children: T.map((e) => {
257
+ let t = c === e.id, n = !!r[e.id]?.sent;
258
+ return /* @__PURE__ */ U("div", {
259
+ onClick: () => l(t ? null : e.id),
260
+ className: "group flex flex-col p-3.5 sm:py-4 sm:px-5 glass-panel border border-transparent hover:border-accent/40 transition-all rounded-2xl hover:shadow-sm cursor-pointer",
261
+ children: [/* @__PURE__ */ U("div", {
262
+ className: "flex items-center justify-between w-full gap-2 sm:gap-3",
263
+ children: [/* @__PURE__ */ U("div", {
264
+ className: "flex items-center gap-2.5 flex-1 min-w-0",
265
+ children: [/* @__PURE__ */ H("h3", {
266
+ className: "text-[14.5px] font-semibold text-foreground tracking-tight truncate",
267
+ children: e.id === "member" ? `${e.name} — everybody else` : e.name
268
+ }), /* @__PURE__ */ H("span", {
269
+ className: "max-sm:hidden text-[12px] font-medium text-foreground/45 truncate",
270
+ children: n ? "Asked for" : "Nothing asked yet"
271
+ })]
272
+ }), /* @__PURE__ */ H("div", {
273
+ className: `p-1.5 transition-transform duration-300 text-foreground/40 shrink-0 ${t ? "rotate-180" : ""}`,
274
+ children: /* @__PURE__ */ H(se, { className: "w-3.5 h-3.5" })
275
+ })]
276
+ }), /* @__PURE__ */ H(v, { children: t && /* @__PURE__ */ H(D.div, {
277
+ initial: {
278
+ height: 0,
279
+ opacity: 0
280
+ },
281
+ animate: {
282
+ height: "auto",
283
+ opacity: 1
284
+ },
285
+ exit: {
286
+ height: 0,
287
+ opacity: 0
288
+ },
289
+ transition: d,
290
+ className: "overflow-hidden mt-4 pt-4 border-t border-[var(--panel-border)]/50 pb-1 flex flex-col gap-4",
291
+ onClick: (e) => e.stopPropagation(),
292
+ children: /* @__PURE__ */ H(X, {
293
+ ...O(e),
294
+ showPrompt: !1
295
+ })
296
+ }) })]
297
+ }, e.id);
298
+ })
299
+ }),
300
+ T.length > 1 && /* @__PURE__ */ H(e, {
301
+ compact: !0,
302
+ title: j ? "Change what you ask" : "Ask for these details",
303
+ prompt: Te(T, A),
304
+ locked: !k.length,
305
+ onCopied: () => g(k)
306
+ })
307
+ ]
308
+ });
309
+ }
310
+ //#endregion
311
+ //#region src/pages/SignInAdmin.tsx
312
+ var ke = [{
313
+ id: "login",
314
+ title: "The sign-in page",
315
+ description: "Where somebody who already has an account comes back in.",
316
+ to: "/login?preview=1",
317
+ icon: ce
318
+ }, {
319
+ id: "register",
320
+ title: "The registration page",
321
+ description: "Where somebody new makes an account for the first time.",
322
+ to: "/register?preview=1",
323
+ icon: le
324
+ }], Z = /\b((?:[a-z0-9-]+\.)+(?:com|org|net|io|dev|app|ai))(\/[a-z0-9\-._~:/?#@!$&'()*+,;=%]*)?/gi;
325
+ function Ae({ text: e }) {
326
+ let t = [], n = 0;
327
+ for (let r of e.matchAll(Z)) {
328
+ let i = r[0], a = r.index ?? 0;
329
+ a > n && t.push(e.slice(n, a)), t.push(/* @__PURE__ */ H("a", {
330
+ href: `https://${i}`,
331
+ target: "_blank",
332
+ rel: "noreferrer",
333
+ className: "font-bold text-accent hover:underline break-all",
334
+ children: i
335
+ }, `${i}-${a}`)), n = a + i.length;
336
+ }
337
+ return n === 0 ? /* @__PURE__ */ H(V, { children: e }) : (n < e.length && t.push(e.slice(n)), /* @__PURE__ */ H(V, { children: t }));
338
+ }
339
+ function Q({ title: e, steps: t, addresses: n, missing: r, children: i }) {
340
+ return /* @__PURE__ */ U("div", {
341
+ className: "rounded-2xl border border-[var(--panel-border)]/60 bg-foreground/[0.02] p-4",
342
+ children: [
343
+ /* @__PURE__ */ H("p", {
344
+ className: "text-[11px] font-bold uppercase tracking-[0.16em] text-foreground/40 mb-2.5",
345
+ children: e
346
+ }),
347
+ /* @__PURE__ */ H("ol", {
348
+ className: "space-y-2.5 list-decimal pl-[1.15rem] text-[13px] text-foreground/75 font-medium leading-relaxed marker:font-bold marker:text-foreground/35",
349
+ children: t.map((e) => {
350
+ let { text: t, copy: i } = typeof e == "string" ? {
351
+ text: e,
352
+ copy: void 0
353
+ } : e, a = i && n ? n[i.address] : "";
354
+ return /* @__PURE__ */ U("li", { children: [/* @__PURE__ */ H(Ae, { text: t }), i && (a ? /* @__PURE__ */ H(je, {
355
+ label: i.label,
356
+ value: a,
357
+ note: i.note
358
+ }) : r?.(i))] }, t);
359
+ })
360
+ }),
361
+ i
362
+ ]
363
+ });
364
+ }
365
+ function je({ label: e, value: t, note: n }) {
366
+ let [r, i] = B(!1);
367
+ return /* @__PURE__ */ U("div", {
368
+ className: "mt-2 mb-1 rounded-xl border border-accent/25 bg-accent/[0.06] p-3",
369
+ children: [
370
+ /* @__PURE__ */ U("div", {
371
+ className: "flex items-center justify-between gap-2 mb-1.5",
372
+ children: [/* @__PURE__ */ U("span", {
373
+ className: "text-[11.5px] font-bold text-foreground/60 leading-tight",
374
+ children: [
375
+ "Paste into “",
376
+ e,
377
+ "”"
378
+ ]
379
+ }), /* @__PURE__ */ H(T, {
380
+ icon: r ? N : ne,
381
+ title: `Copy ${t}`,
382
+ onClick: () => {
383
+ try {
384
+ navigator.clipboard?.writeText(t)?.catch(() => {});
385
+ } catch {}
386
+ i(!0), setTimeout(() => i(!1), 1500);
387
+ },
388
+ children: r ? "Copied" : "Copy"
389
+ })]
390
+ }),
391
+ /* @__PURE__ */ H("code", {
392
+ className: "block text-[12px] font-mono text-foreground/80 break-all leading-relaxed",
393
+ children: t
394
+ }),
395
+ n && /* @__PURE__ */ H("p", {
396
+ className: "mt-2 text-[11.5px] font-medium text-foreground/50 leading-relaxed",
397
+ children: n
398
+ })
399
+ ]
400
+ });
401
+ }
402
+ function Me({ method: e, onClose: t }) {
403
+ let n = e ? R[e.id] : null, r = e?.setup, i = {
404
+ callback: p(o()),
405
+ home: m()
406
+ };
407
+ return /* @__PURE__ */ H(v, { children: e && /* @__PURE__ */ U("div", {
408
+ className: "fixed inset-0 z-50 flex items-center justify-center p-4",
409
+ children: [/* @__PURE__ */ H(D.div, {
410
+ onClick: t,
411
+ initial: { opacity: 0 },
412
+ animate: { opacity: 1 },
413
+ exit: { opacity: 0 },
414
+ className: "absolute inset-0 bg-background/80 backdrop-blur-xl cursor-pointer"
415
+ }), /* @__PURE__ */ U(D.div, {
416
+ role: "dialog",
417
+ "aria-modal": "true",
418
+ "aria-label": `Set up ${e.label} in Firebase`,
419
+ initial: {
420
+ opacity: 0,
421
+ scale: .95,
422
+ y: 10
423
+ },
424
+ animate: {
425
+ opacity: 1,
426
+ scale: 1,
427
+ y: 0
428
+ },
429
+ exit: {
430
+ opacity: 0,
431
+ scale: .95,
432
+ y: 10
433
+ },
434
+ className: "w-full max-w-[520px] max-h-[86vh] flex flex-col rounded-3xl glass-popover border border-[var(--panel-border)] shadow-2xl relative z-10",
435
+ children: [/* @__PURE__ */ U("div", {
436
+ className: "flex-1 min-h-0 overflow-y-auto p-6 pb-2",
437
+ children: [
438
+ /* @__PURE__ */ U("div", {
439
+ className: "grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-1 mb-4",
440
+ children: [
441
+ /* @__PURE__ */ H("div", {
442
+ className: "row-start-1 col-start-1 w-10 h-10 rounded-2xl flex items-center justify-center shrink-0 border border-[var(--panel-border)]/50 bg-accent/10 text-accent",
443
+ children: n && /* @__PURE__ */ H(n, { className: "w-5 h-5" })
444
+ }),
445
+ /* @__PURE__ */ H("h3", {
446
+ className: "row-start-1 col-start-2 self-center min-w-0 text-[17px] font-bold text-foreground tracking-tight leading-tight",
447
+ children: e.setupTitle || `Set up ${e.label} in Firebase first`
448
+ }),
449
+ /* @__PURE__ */ H("p", {
450
+ className: "row-start-2 col-start-2 min-w-0 text-[13.5px] font-medium text-foreground/60 leading-relaxed",
451
+ children: r ? /* @__PURE__ */ U(V, { children: [
452
+ "This one takes two consoles. Firebase asks ",
453
+ e.label,
454
+ " who you are, and ",
455
+ r.where,
456
+ " wants an address back. Both halves are below — it is about five minutes."
457
+ ] }) : /* @__PURE__ */ H(V, { children: "This one is switched on in your Firebase project, not here. Firebase walks you through it — these are the clicks that get you to the right screen." })
458
+ })
459
+ ]
460
+ }),
461
+ /* @__PURE__ */ U("div", {
462
+ className: "flex flex-col gap-3 mb-4",
463
+ children: [
464
+ /* @__PURE__ */ H(Q, {
465
+ title: "In Firebase",
466
+ steps: [...l, ...e.steps],
467
+ addresses: i,
468
+ children: r && /* @__PURE__ */ U("div", {
469
+ className: "mt-3 flex flex-wrap items-center gap-1.5",
470
+ children: [/* @__PURE__ */ H("span", {
471
+ className: "text-[11.5px] font-semibold text-foreground/45",
472
+ children: "It asks you for"
473
+ }), r.asksFor.map((e) => /* @__PURE__ */ H("span", {
474
+ className: "px-2 py-0.5 rounded-lg border border-[var(--panel-border)] bg-foreground/[0.04] text-[11.5px] font-bold text-foreground/70",
475
+ children: e
476
+ }, e))]
477
+ })
478
+ }),
479
+ r && /* @__PURE__ */ H(Q, {
480
+ title: `In ${r.where} — where those come from`,
481
+ steps: r.steps,
482
+ addresses: i,
483
+ missing: (t) => t.address === "home" ? null : /* @__PURE__ */ U("p", {
484
+ className: "mt-2 mb-1 text-[12.5px] font-medium text-foreground/55 leading-relaxed",
485
+ children: [
486
+ "The address for “",
487
+ t.label,
488
+ "” is the one Firebase prints at the bottom of its own ",
489
+ e.label,
490
+ " panel. Copy it from there."
491
+ ]
492
+ })
493
+ }),
494
+ r?.warning && /* @__PURE__ */ H("p", {
495
+ className: "text-[12.5px] font-medium text-amber-600 dark:text-amber-400 leading-relaxed px-1",
496
+ children: r.warning
497
+ })
498
+ ]
499
+ }),
500
+ /* @__PURE__ */ U("div", {
501
+ className: "flex flex-wrap items-center gap-x-5 gap-y-2 mb-5",
502
+ children: [/* @__PURE__ */ U("a", {
503
+ href: "https://console.firebase.google.com/",
504
+ target: "_blank",
505
+ rel: "noreferrer",
506
+ className: "inline-flex items-center gap-1.5 text-[13px] font-bold text-accent hover:underline",
507
+ children: ["Open the Firebase console", /* @__PURE__ */ H(M, { className: "w-3.5 h-3.5" })]
508
+ }), r && /* @__PURE__ */ U("a", {
509
+ href: r.url,
510
+ target: "_blank",
511
+ rel: "noreferrer",
512
+ className: "inline-flex items-center gap-1.5 text-[13px] font-bold text-accent hover:underline",
513
+ children: [
514
+ "Open ",
515
+ r.where,
516
+ /* @__PURE__ */ H(M, { className: "w-3.5 h-3.5" })
517
+ ]
518
+ })]
519
+ })
520
+ ]
521
+ }), /* @__PURE__ */ H("div", {
522
+ className: "shrink-0 px-6 pb-6 pt-4 border-t border-[var(--panel-border)]/50 flex items-center gap-3 w-full",
523
+ children: /* @__PURE__ */ H(ue, {
524
+ type: "button",
525
+ variant: "secondary",
526
+ onClick: t,
527
+ className: "flex-1 py-2.5 text-[13px] font-bold rounded-xl",
528
+ children: "Close"
529
+ })
530
+ })]
531
+ })]
532
+ }) });
533
+ }
534
+ function $({ method: e, settings: t, problem: n, onFlip: r, onSteps: i }) {
535
+ let a = R[e.id], o = t.on[e.id];
536
+ return /* @__PURE__ */ U("div", {
537
+ className: "grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-x-3 sm:gap-x-3.5 gap-y-0.5 px-4 py-3",
538
+ children: [
539
+ /* @__PURE__ */ H("div", {
540
+ className: "row-start-1 row-span-2 col-start-1 self-center w-9 h-9 rounded-xl flex items-center justify-center shrink-0 border border-[var(--panel-border)]/50 bg-accent/10 text-accent",
541
+ children: /* @__PURE__ */ H(a, { className: "w-4 h-4" })
542
+ }),
543
+ /* @__PURE__ */ H("span", {
544
+ className: "row-start-1 col-start-2 min-w-0 text-[13px] font-bold text-foreground leading-tight self-end truncate",
545
+ children: e.label
546
+ }),
547
+ /* @__PURE__ */ H("span", {
548
+ className: `${n ? "" : "max-sm:hidden "}row-start-2 col-start-2 min-w-0 text-[12px] leading-snug self-start truncate ${n ? "text-red-500 font-medium" : "text-foreground/50 font-normal"}`,
549
+ children: n || e.description
550
+ }),
551
+ /* @__PURE__ */ U("div", {
552
+ className: "row-start-1 row-span-2 col-start-3 self-center justify-self-end flex items-center gap-2 sm:gap-3 shrink-0",
553
+ children: [e.needsSetup && /* @__PURE__ */ H("button", {
554
+ type: "button",
555
+ onClick: i,
556
+ className: "max-sm:hidden text-[11.5px] font-semibold text-foreground/45 hover:text-accent transition-colors cursor-pointer",
557
+ children: "How to set it up"
558
+ }), t.loading ? /* @__PURE__ */ H("span", {
559
+ "aria-hidden": !0,
560
+ className: "w-10 h-6 rounded-full bg-foreground/10 animate-pulse shrink-0"
561
+ }) : /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H("span", {
562
+ className: "max-sm:hidden",
563
+ children: /* @__PURE__ */ H(O, {
564
+ state: o ? "saved" : "off",
565
+ label: o ? "On" : "Off"
566
+ })
567
+ }), /* @__PURE__ */ H(u, {
568
+ enabled: o,
569
+ onChange: r,
570
+ label: e.label
571
+ })] })]
572
+ })
573
+ ]
574
+ });
575
+ }
576
+ function Ne({ settings: e }) {
577
+ let t = L(), [n, r] = B(""), [o, s] = B(""), { on: c, roles: l } = e.registerAs, u = [{
578
+ value: "internal",
579
+ label: x("internal", t)
580
+ }, ...t.filter((e) => !o || e.name.trim().toLowerCase() !== o.trim().toLowerCase()).map((e) => ({
581
+ value: e.id,
582
+ label: e.name
583
+ }))], d = h(e, t), f = async (t) => r(await e.setRegisterAs({ on: t }) || ""), p = async (t) => {
584
+ let n = l.includes(t) ? l.filter((e) => e !== t) : [...l, t];
585
+ r(await e.setRegisterAs({ roles: n }) || "");
586
+ }, m = d.length ? a(d) : "Tick at least one, or the registration page stays the one form it is.";
587
+ return /* @__PURE__ */ U(b, {
588
+ icon: ee,
589
+ title: "Registering as a role",
590
+ description: "Let people say what they are when they sign up. You approve each one on the Users screen.",
591
+ children: [
592
+ /* @__PURE__ */ H(i, {
593
+ label: "Let people register as…",
594
+ hint: c ? "On — the registration page opens on a choice: the roles below, or an ordinary account." : "Off — the registration page is one form, and everybody who signs up is a member.",
595
+ hintWideOnly: !0,
596
+ enabled: c,
597
+ onChange: f,
598
+ disabled: e.loading
599
+ }),
600
+ c && /* @__PURE__ */ U(V, { children: [/* @__PURE__ */ H(S, {
601
+ label: "Which roles",
602
+ hint: m,
603
+ children: /* @__PURE__ */ H(w, {
604
+ multiple: !0,
605
+ dense: !0,
606
+ portal: !0,
607
+ direction: "auto",
608
+ className: "console-select",
609
+ ariaLabel: "Roles people can register as",
610
+ placeholder: "Pick the roles",
611
+ values: l.filter((e) => u.some((t) => t.value === e)),
612
+ options: u,
613
+ onChange: p,
614
+ footer: /* @__PURE__ */ H(ve, {
615
+ roles: t,
616
+ onPending: s,
617
+ onCreated: (e) => {
618
+ p(e.id);
619
+ }
620
+ }),
621
+ disabled: e.loading
622
+ })
623
+ }), /* @__PURE__ */ H(y, { children: "Registering as a role makes an ordinary account with a request on it — nobody becomes anything by asking. You approve or decline each request on the Users screen, and until you do they are a member like anybody else. Admins are never offered here: an admin is made on the Users screen only. Signing in does not change." })] }),
624
+ n ? /* @__PURE__ */ H(y, {
625
+ tone: "error",
626
+ children: n
627
+ }) : null
628
+ ]
629
+ });
630
+ }
631
+ function Pe() {
632
+ let e = n(), [a, o] = B(""), [l, u] = B({}), [d, f] = B(null), p = async (t, n) => {
633
+ o(""), u((e) => ({
634
+ ...e,
635
+ [t.id]: ""
636
+ }));
637
+ let r = await e.set(t.id, n);
638
+ r && u((e) => ({
639
+ ...e,
640
+ [t.id]: r
641
+ }));
642
+ }, m = s.filter((e) => e.kind === "security");
643
+ return /* @__PURE__ */ U("main", {
644
+ className: "flex-1 w-full max-w-7xl mx-auto p-4 pt-2 md:p-8 md:pt-4 z-10 flex flex-col min-h-screen",
645
+ children: [
646
+ /* @__PURE__ */ U(D.div, {
647
+ initial: {
648
+ opacity: 0,
649
+ y: 20
650
+ },
651
+ animate: {
652
+ opacity: 1,
653
+ y: 0
654
+ },
655
+ className: "mb-6",
656
+ children: [/* @__PURE__ */ H(t, { children: "Sign in" }), /* @__PURE__ */ U("div", {
657
+ className: "flex items-center gap-2 text-foreground/40 font-bold uppercase tracking-[0.2em] text-[11px]",
658
+ children: [/* @__PURE__ */ H("span", { className: "w-8 h-[1px] bg-foreground/10" }), "/sign-in"]
659
+ })]
660
+ }),
661
+ /* @__PURE__ */ U("div", {
662
+ className: "flex flex-col gap-6 flex-1 pb-16",
663
+ children: [/* @__PURE__ */ H(A, {}), /* @__PURE__ */ U("div", {
664
+ className: "glass-panel border border-[var(--panel-border)] rounded-3xl p-4 sm:p-5 md:p-8 shadow-2xl relative bg-background flex flex-col fbos-tab-fill gap-4 min-h-[600px]",
665
+ children: [
666
+ /* @__PURE__ */ U(b, {
667
+ icon: j,
668
+ title: "Your two pages",
669
+ description: `Right now people can sign in with ${c(e)}.`,
670
+ children: [/* @__PURE__ */ H("div", {
671
+ className: "flex flex-col divide-y divide-[var(--panel-border)]/60 rounded-2xl border border-[var(--panel-border)]/60",
672
+ children: ke.map((e) => {
673
+ let t = e.icon;
674
+ return /* @__PURE__ */ U("div", {
675
+ className: "grid grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-x-3 sm:gap-x-3.5 gap-y-0.5 px-4 py-3",
676
+ children: [
677
+ /* @__PURE__ */ H("div", {
678
+ className: "row-start-1 row-span-2 col-start-1 self-center w-9 h-9 rounded-xl flex items-center justify-center shrink-0 border border-[var(--panel-border)]/50 bg-accent/10 text-accent",
679
+ children: /* @__PURE__ */ H(t, { className: "w-4 h-4" })
680
+ }),
681
+ /* @__PURE__ */ H("span", {
682
+ className: "row-start-1 col-start-2 min-w-0 text-[13px] font-bold text-foreground leading-tight self-end truncate",
683
+ children: e.title
684
+ }),
685
+ /* @__PURE__ */ H("span", {
686
+ className: "max-sm:hidden row-start-2 col-start-2 min-w-0 text-[12px] text-foreground/50 font-normal leading-snug self-start truncate",
687
+ children: e.description
688
+ }),
689
+ /* @__PURE__ */ H(k, {
690
+ to: e.to,
691
+ title: `View ${e.title.charAt(0).toLowerCase()}${e.title.slice(1)}`,
692
+ className: "row-start-1 row-span-2 col-start-3 self-center justify-self-end",
693
+ children: "View page"
694
+ })
695
+ ]
696
+ }, e.id);
697
+ })
698
+ }), /* @__PURE__ */ H("p", {
699
+ className: E,
700
+ children: "Both pages draw themselves from the switches below: every way you switch on appears on them, and every way you switch off leaves. There is nothing to rebuild in between."
701
+ })]
702
+ }),
703
+ /* @__PURE__ */ U(b, {
704
+ icon: re,
705
+ title: "Ways in",
706
+ description: "What people can use to sign in and to register.",
707
+ children: [
708
+ /* @__PURE__ */ H(y, { children: "A way of signing in also has to be switched on in your Firebase project before it works, and most of them already are. Switch one on here and it appears on both pages straight away; if Firebase has not got it, the person who presses that button is told so in plain words, and “How to set it up” on the row shows you exactly where to go." }),
709
+ /* @__PURE__ */ H("div", {
710
+ className: "flex flex-col divide-y divide-[var(--panel-border)]/60 rounded-2xl border border-[var(--panel-border)]/60",
711
+ children: r.map((t) => /* @__PURE__ */ H($, {
712
+ method: t,
713
+ settings: e,
714
+ problem: l[t.id] || "",
715
+ onFlip: (e) => p(t, e),
716
+ onSteps: () => f(t)
717
+ }, t.id))
718
+ }),
719
+ a ? /* @__PURE__ */ H(y, {
720
+ tone: "error",
721
+ children: a
722
+ }) : null
723
+ ]
724
+ }),
725
+ /* @__PURE__ */ U(b, {
726
+ icon: ae,
727
+ title: "One more step",
728
+ description: "A code by text after the password, for an app that holds something worth protecting.",
729
+ children: [
730
+ /* @__PURE__ */ H(y, { children: "With this on, everybody with a password is asked for a phone number the first time they sign in, and for a texted code every time after. People who sign in with Google, GitHub or X are already covered by that company's own checks." }),
731
+ /* @__PURE__ */ H("div", {
732
+ className: "flex flex-col divide-y divide-[var(--panel-border)]/60 rounded-2xl border border-[var(--panel-border)]/60",
733
+ children: m.map((t) => /* @__PURE__ */ H($, {
734
+ method: t,
735
+ settings: e,
736
+ problem: l[t.id] || "",
737
+ onFlip: (e) => p(t, e),
738
+ onSteps: () => f(t)
739
+ }, t.id))
740
+ }),
741
+ e.on.sms2fa && /* @__PURE__ */ H(i, {
742
+ label: "People can skip it",
743
+ hint: e.twoStepOptional ? "Optional — the setup screen has a \"Not now\" on it, and they are asked again the next time they sign in." : "Required — nobody gets past the setup screen until they have given a number.",
744
+ hintWideOnly: !0,
745
+ enabled: e.twoStepOptional,
746
+ onChange: async (t) => o(await e.setTwoStepOptional(t) || ""),
747
+ disabled: e.loading
748
+ }),
749
+ /* @__PURE__ */ H(y, { children: "A phone number can only be set up on one account. Somebody typing a number that is already somebody else's two-step code is told so before the text is sent — so the code really does say which person is signing in, which is the whole reason to ask for one. Signing in WITH a phone number is one account per number too; that part is Firebase's own doing." })
750
+ ]
751
+ }),
752
+ /* @__PURE__ */ H(Ne, { settings: e }),
753
+ /* @__PURE__ */ H(Oe, { settings: e })
754
+ ]
755
+ })]
756
+ }),
757
+ /* @__PURE__ */ H(me, {}),
758
+ /* @__PURE__ */ H(Me, {
759
+ method: d,
760
+ onClose: () => f(null)
761
+ })
762
+ ]
763
+ });
764
+ }
765
+ //#endregion
766
+ export { Pe as SignInAdmin };