your-ai-workflow-firebase-os 1.13.4 → 1.13.5

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.
@@ -1,11 +1,11 @@
1
- import { $ as e, $n as t, A as n, Ct as r, Dt as i, Er as a, Et as o, G as s, Gn as c, I as l, J as u, K as d, N as f, O as p, Ot as m, P as h, Pt as g, R as _, S as v, Sr as y, St as b, Tr as x, U as ee, W as S, X as te, Xn as ne, Zn as re, _t as C, br as ie, bt as w, dn as T, dt as E, er as ae, gt as D, ht as O, ir as oe, kt as k, lt as se, mr as ce, mt as le, nr as A, nt as j, q as M, rt as ue, t as N, ut as P, v as F, xr as I, xt as de, yn as L, yt as fe } from "./TimeZoneField-Be0bHExY.js";
2
- import R, { Suspense as pe, createContext as me, useContext as he, useEffect as z, useLayoutEffect as ge, useMemo as _e, useRef as ve, useState as B } from "react";
3
- import { addDoc as ye, collection as V, deleteDoc as H, doc as U, getDoc as be, onSnapshot as W, query as xe, runTransaction as Se, serverTimestamp as Ce, setDoc as we, where as Te } from "firebase/firestore";
4
- import { Fragment as G, jsx as K, jsxs as q } from "react/jsx-runtime";
5
- import { useNavigate as Ee } from "react-router-dom";
6
- import { createPortal as De } from "react-dom";
1
+ import { $ as e, $n as t, A as n, Ct as r, Dt as i, Er as a, Et as o, G as s, Gn as c, I as l, J as u, K as d, N as f, O as p, Ot as m, P as h, Pt as g, R as _, S as v, Sr as y, St as b, Tr as x, U as ee, W as S, X as te, Xn as ne, Zn as re, _t as C, br as ie, bt as w, dn as T, dt as E, er as ae, gt as D, ht as O, ir as oe, kt as k, lt as se, mr as ce, mt as le, nr as A, nt as j, q as M, rt as ue, t as de, ut as N, v as P, xr as F, xt as fe, yn as I, yt as pe } from "./TimeZoneField-Be0bHExY.js";
2
+ import me, { Suspense as he, createContext as ge, useContext as _e, useEffect as L, useLayoutEffect as ve, useMemo as ye, useRef as be, useState as R } from "react";
3
+ import { addDoc as xe, collection as z, deleteDoc as B, doc as V, getDoc as Se, onSnapshot as H, query as Ce, runTransaction as we, serverTimestamp as Te, setDoc as Ee, where as De } from "firebase/firestore";
4
+ import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
5
+ import { useNavigate as Oe } from "react-router-dom";
6
+ import { createPortal as ke } from "react-dom";
7
7
  //#region src/configs/forms/contactForm.config.ts
8
- var Oe = /* @__PURE__ */ a({ contactFormConfig: () => J }), J = {
8
+ var Ae = /* @__PURE__ */ a({ contactFormConfig: () => K }), K = {
9
9
  systemName: "contact",
10
10
  formType: "public",
11
11
  redirectTo: "/",
@@ -42,7 +42,7 @@ var Oe = /* @__PURE__ */ a({ contactFormConfig: () => J }), J = {
42
42
  required: !0
43
43
  }
44
44
  ]
45
- }, ke = /* @__PURE__ */ a({ supportFormConfig: () => Y }), Y = {
45
+ }, je = /* @__PURE__ */ a({ supportFormConfig: () => q }), q = {
46
46
  systemName: "support",
47
47
  formType: "private",
48
48
  redirectTo: "/dashboard",
@@ -72,129 +72,160 @@ var Oe = /* @__PURE__ */ a({ contactFormConfig: () => J }), J = {
72
72
  required: !0
73
73
  }
74
74
  ]
75
- };
76
- //#endregion
77
- //#region src/lib/ThemeContext.tsx
78
- function Ae(e, t) {
75
+ }, J = "theme_saved_cache", Me = "base", Ne = ["logoUrl", "faviconUrl"], Pe = [
76
+ "fontStyles",
77
+ "fontCustomization",
78
+ "fontFamily"
79
+ ], Y = (e) => typeof e == "object" && !!e && !Array.isArray(e), Fe = (e) => JSON.stringify(e, (e, t) => Y(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t), Ie = (e, t) => Fe(e ?? null) === Fe(t ?? null);
80
+ function Le(e, t) {
79
81
  if (typeof t != "object" || !t) return t;
80
82
  let n = { ...e };
81
- for (let r of Object.keys(t)) t[r] instanceof Object && r in e && e[r] instanceof Object && !Array.isArray(t[r]) ? n[r] = Ae(e[r], t[r]) : n[r] = t[r];
83
+ for (let r of Object.keys(t)) Y(t[r]) && r in e && Y(e[r]) ? n[r] = Le(e[r], t[r]) : n[r] = t[r];
82
84
  return n;
83
85
  }
84
- var je = typeof window < "u" ? ge : z, Me = me(void 0);
85
- function Ne({ children: e, scopeSelector: t }) {
86
- let n = ie(), r = _e(() => n?.themeConfig || x, [n?.themeConfig]), [i, a] = B(() => {
87
- if (typeof window > "u") return r.defaultTheme || "system";
86
+ function Re(e, t) {
87
+ if (!Y(t)) return {};
88
+ let n = { ...t };
89
+ for (let e of Pe) delete n[e];
90
+ let r = n[Me];
91
+ if (delete n[Me], !Y(r)) {
92
+ let e = {};
93
+ for (let t of Ne) typeof n[t] == "string" && n[t].trim() && (e[t] = n[t]);
94
+ return e;
95
+ }
96
+ let i = {};
97
+ for (let t of Object.keys(n)) if (t === "colors") {
98
+ if (!Y(n.colors)) continue;
99
+ let t = {};
100
+ for (let i of Object.keys(n.colors)) Ie(e?.colors?.[i], r?.colors?.[i]) && (t[i] = n.colors[i]);
101
+ Object.keys(t).length && (i.colors = t);
102
+ } else Ie(e?.[t], r?.[t]) && (i[t] = n[t]);
103
+ return i;
104
+ }
105
+ function ze(e, t) {
106
+ let n = Re(e, t);
107
+ return Object.keys(n).length ? Le(e, n) : e;
108
+ }
109
+ function Be(e, t) {
110
+ return !Y(e) || !Object.keys(e).length ? null : {
111
+ ...e,
112
+ [Me]: JSON.parse(JSON.stringify(t))
113
+ };
114
+ }
115
+ function Ve() {
116
+ try {
117
+ let e = localStorage.getItem(J);
118
+ if (e === null) return;
119
+ let t = JSON.parse(e);
120
+ return Y(t) ? t : null;
121
+ } catch {
122
+ return;
123
+ }
124
+ }
125
+ function He(e) {
126
+ try {
127
+ e ? localStorage.setItem(J, JSON.stringify(e)) : localStorage.removeItem(J);
128
+ } catch {}
129
+ }
130
+ //#endregion
131
+ //#region src/lib/ThemeContext.tsx
132
+ var Ue = typeof window < "u" ? ve : L, We = ge(void 0);
133
+ function Ge({ children: e, scopeSelector: t }) {
134
+ let n = ie(), r = ye(() => n?.themeConfig || x, [n?.themeConfig]), [i, a] = R(Ve), o = ye(() => ze(r, i ?? null), [r, i]), [s, c] = R(() => {
135
+ if (typeof window > "u") return o.defaultTheme || "system";
88
136
  let e = localStorage.getItem("theme-mode"), t = localStorage.getItem("last-seen-default-theme");
89
- return r.defaultTheme && r.defaultTheme !== t ? (localStorage.setItem("last-seen-default-theme", r.defaultTheme), localStorage.removeItem("theme-mode"), r.defaultTheme) : e || r.defaultTheme || "system";
90
- }), [o, s] = B(() => {
91
- if (typeof window > "u") return r.defaultTheme === "light" ? "light" : "dark";
92
- let e = localStorage.getItem("theme-mode"), t = localStorage.getItem("last-seen-default-theme"), n = e || r.defaultTheme || "system";
93
- return r.defaultTheme && r.defaultTheme !== t && (n = r.defaultTheme), n === "system" ? window.matchMedia("(prefers-color-scheme: light)").matches ? "light" : "dark" : n;
94
- }), [c, l] = B(() => {
95
- try {
96
- let e = localStorage.getItem("theme_config_cache");
97
- if (e) return JSON.parse(e);
98
- } catch {}
99
- return r;
100
- }), [u, d] = B(!0);
101
- return z(() => {
102
- if (!localStorage.getItem("theme_config_cache")) {
103
- l(r);
104
- let e = localStorage.getItem("last-seen-default-theme");
105
- r.defaultTheme && r.defaultTheme !== e && (localStorage.setItem("last-seen-default-theme", r.defaultTheme), localStorage.removeItem("theme-mode"), a(r.defaultTheme));
106
- }
107
- }, [r]), z(() => {
108
- if (!y) {
109
- l(r);
110
- return;
111
- }
112
- let e = W(U(y, "sys_configs", "theme"), (e) => {
113
- if (e.exists()) {
114
- let t = e.data();
115
- delete t.fontStyles, delete t.fontCustomization, delete t.fontFamily;
116
- let n = Ae(r, t);
117
- l(n), localStorage.setItem("theme_config_cache", JSON.stringify(n));
118
- let i = localStorage.getItem("last-seen-default-theme");
119
- n.defaultTheme && n.defaultTheme !== i && (localStorage.setItem("last-seen-default-theme", n.defaultTheme), a(n.defaultTheme));
120
- } else l(r), localStorage.removeItem("theme_config_cache"), localStorage.removeItem("theme-mode"), r.defaultTheme && (localStorage.setItem("last-seen-default-theme", r.defaultTheme), a(r.defaultTheme));
121
- });
137
+ return o.defaultTheme && o.defaultTheme !== t ? (localStorage.setItem("last-seen-default-theme", o.defaultTheme), localStorage.removeItem("theme-mode"), o.defaultTheme) : e || o.defaultTheme || "system";
138
+ }), [l, u] = R(() => {
139
+ if (typeof window > "u") return o.defaultTheme === "light" ? "light" : "dark";
140
+ let e = localStorage.getItem("theme-mode"), t = localStorage.getItem("last-seen-default-theme"), n = e || o.defaultTheme || "system";
141
+ return o.defaultTheme && o.defaultTheme !== t && (n = o.defaultTheme), n === "system" ? window.matchMedia("(prefers-color-scheme: light)").matches ? "light" : "dark" : n;
142
+ }), [d] = R(!0);
143
+ return L(() => {
144
+ let e = o.defaultTheme;
145
+ e && e !== localStorage.getItem("last-seen-default-theme") && (localStorage.setItem("last-seen-default-theme", e), localStorage.removeItem("theme-mode"), c(e));
146
+ }, [o.defaultTheme]), L(() => {
147
+ if (!y) return;
148
+ let e = H(V(y, "sys_configs", "theme"), (e) => {
149
+ let t = e.exists() ? e.data() : null;
150
+ a(t), He(t), t || localStorage.removeItem("theme-mode");
151
+ }, () => {});
122
152
  return () => e();
123
- }, [r]), z(() => {
153
+ }, []), L(() => {
124
154
  let e = (e) => {
125
- i === "system" && s(e.matches ? "light" : "dark");
155
+ s === "system" && u(e.matches ? "light" : "dark");
126
156
  }, t = window.matchMedia("(prefers-color-scheme: light)");
127
- return i === "system" ? (s(t.matches ? "light" : "dark"), t.addEventListener("change", e)) : s(i), () => t.removeEventListener("change", e);
128
- }, [i]), je(() => {
129
- let e = (t ? document.querySelector(t) : document.documentElement) || document.documentElement, n = o === "dark" ? c.colors.dark : c.colors.light;
157
+ return s === "system" ? (u(t.matches ? "light" : "dark"), t.addEventListener("change", e)) : u(s), () => t.removeEventListener("change", e);
158
+ }, [s]), Ue(() => {
159
+ let e = (t ? document.querySelector(t) : document.documentElement) || document.documentElement, n = l === "dark" ? o.colors.dark : o.colors.light;
130
160
  e.style.setProperty("--bg-color", n.background), e.style.setProperty("--bg-secondary-color", n.backgroundSecondary || n.background), e.style.setProperty("--fg-color", n.foreground), e.style.setProperty("--accent-color", n.accent);
131
- let r = o === "dark";
161
+ let r = l === "dark";
132
162
  e.style.setProperty("--panel-bg", n.panelBg || `color-mix(in srgb, ${n.accent} ${r ? "5%" : "4%"}, transparent)`), e.style.setProperty("--panel-border", n.panelBorder || `color-mix(in srgb, ${n.accent} 15%, transparent)`);
133
- let a = (e, t) => !e || e.length === 0 ? t || "transparent" : e.length === 1 ? e[0] : `linear-gradient(135deg, ${e.map((t, n) => `${t} ${Math.round(n / (e.length - 1) * 100)}%`).join(", ")})`, s = `linear-gradient(135deg, color-mix(in oklab, ${n.accent} ${r ? "70%" : "78%"}, black) 0%, ${n.accent} 100%)`, l = `linear-gradient(135deg, color-mix(in oklab, ${n.accent} ${r ? "80%" : "85%"}, black) 0%, color-mix(in oklab, ${n.accent} 72%, white) 100%)`;
134
- e.style.setProperty("--button-bg", a(n.buttonGradient, s)), e.style.setProperty("--button-fg", n.buttonText || "#ffffff"), e.style.setProperty("--button-hover-bg", a(n.buttonHoverGradient || n.buttonGradient, l)), e.style.setProperty("--text-gradient", a(n.textGradient, `linear-gradient(135deg, ${n.foreground} 0%, ${n.accent} 100%)`)), e.style.setProperty("--glow-color", n.glowColor || `color-mix(in srgb, ${n.accent} ${r ? "40%" : "30%"}, transparent)`), e.style.setProperty("--notification-icon-color", n.notificationIconColor || n.accent);
135
- let u = n.secondaryButton?.bg || (o === "dark" ? "rgba(255, 255, 255, 0.05)" : "rgba(0, 0, 0, 0.03)"), d = n.secondaryButton?.border || (o === "dark" ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.06)"), f = n.secondaryButton?.text || n.foreground;
136
- if (e.style.setProperty("--btn-sec-bg", u), e.style.setProperty("--btn-sec-border", d), e.style.setProperty("--btn-sec-text", f), e.style.setProperty("--selection-bg", n.selectionBg || "color-mix(in srgb, var(--accent-color) 40%, transparent)"), e.style.setProperty("--selection-text", n.selectionText || "#ffffff"), e.setAttribute("data-theme", o), localStorage.setItem("theme-mode", i), c.cornerRounding === "custom" && c.cornerRadii ? (e.style.setProperty("--btn-radius", `${parseFloat(String(c.cornerRadii.buttonRadius)) || 0}rem`), e.style.setProperty("--card-radius", `${parseFloat(String(c.cornerRadii.cardRadius)) || 0}rem`), e.style.setProperty("--input-radius", `${parseFloat(String(c.cornerRadii.inputRadius)) || 0}rem`), e.style.setProperty("--modal-radius", `${parseFloat(String(c.cornerRadii.modalRadius)) || 0}rem`)) : (e.style.setProperty("--btn-radius", "0.75rem"), e.style.setProperty("--card-radius", "1.5rem"), e.style.setProperty("--input-radius", "0.75rem"), e.style.setProperty("--modal-radius", "1.5rem")), !document.getElementById("inter-font")) {
163
+ let i = (e, t) => !e || e.length === 0 ? t || "transparent" : e.length === 1 ? e[0] : `linear-gradient(135deg, ${e.map((t, n) => `${t} ${Math.round(n / (e.length - 1) * 100)}%`).join(", ")})`, a = `linear-gradient(135deg, color-mix(in oklab, ${n.accent} ${r ? "70%" : "78%"}, black) 0%, ${n.accent} 100%)`, c = `linear-gradient(135deg, color-mix(in oklab, ${n.accent} ${r ? "80%" : "85%"}, black) 0%, color-mix(in oklab, ${n.accent} 72%, white) 100%)`;
164
+ e.style.setProperty("--button-bg", i(n.buttonGradient, a)), e.style.setProperty("--button-fg", n.buttonText || "#ffffff"), e.style.setProperty("--button-hover-bg", i(n.buttonHoverGradient || n.buttonGradient, c)), e.style.setProperty("--text-gradient", i(n.textGradient, `linear-gradient(135deg, ${n.foreground} 0%, ${n.accent} 100%)`)), e.style.setProperty("--glow-color", n.glowColor || `color-mix(in srgb, ${n.accent} ${r ? "40%" : "30%"}, transparent)`), e.style.setProperty("--notification-icon-color", n.notificationIconColor || n.accent);
165
+ let u = n.secondaryButton?.bg || (l === "dark" ? "rgba(255, 255, 255, 0.05)" : "rgba(0, 0, 0, 0.03)"), d = n.secondaryButton?.border || (l === "dark" ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.06)"), f = n.secondaryButton?.text || n.foreground;
166
+ if (e.style.setProperty("--btn-sec-bg", u), e.style.setProperty("--btn-sec-border", d), e.style.setProperty("--btn-sec-text", f), e.style.setProperty("--selection-bg", n.selectionBg || "color-mix(in srgb, var(--accent-color) 40%, transparent)"), e.style.setProperty("--selection-text", n.selectionText || "#ffffff"), e.setAttribute("data-theme", l), localStorage.setItem("theme-mode", s), o.cornerRounding === "custom" && o.cornerRadii ? (e.style.setProperty("--btn-radius", `${parseFloat(String(o.cornerRadii.buttonRadius)) || 0}rem`), e.style.setProperty("--card-radius", `${parseFloat(String(o.cornerRadii.cardRadius)) || 0}rem`), e.style.setProperty("--input-radius", `${parseFloat(String(o.cornerRadii.inputRadius)) || 0}rem`), e.style.setProperty("--modal-radius", `${parseFloat(String(o.cornerRadii.modalRadius)) || 0}rem`)) : (e.style.setProperty("--btn-radius", "0.75rem"), e.style.setProperty("--card-radius", "1.5rem"), e.style.setProperty("--input-radius", "0.75rem"), e.style.setProperty("--modal-radius", "1.5rem")), !document.getElementById("inter-font")) {
137
167
  let e = document.createElement("link");
138
168
  e.id = "inter-font", e.rel = "stylesheet", e.href = "https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap", document.head.appendChild(e);
139
169
  }
140
170
  e.style.fontSize = "16px", e.style.setProperty("--weight-h1", "800"), e.style.setProperty("--weight-h2", "700"), e.style.setProperty("--weight-h3", "700"), e.style.setProperty("--leading-normal", "1.5");
141
171
  let p = document.querySelector("link[rel*='icon']");
142
- p || (p = document.createElement("link"), p.rel = "icon", document.head.appendChild(p)), c.faviconUrl && (p.href = c.faviconUrl), c.appName && (document.title = c.appName);
172
+ p || (p = document.createElement("link"), p.rel = "icon", document.head.appendChild(p)), o.faviconUrl && (p.href = o.faviconUrl), o.appName && (document.title = o.appName);
143
173
  }, [
144
- o,
145
- i,
146
- c
147
- ]), /* @__PURE__ */ K(Me.Provider, {
174
+ l,
175
+ s,
176
+ o
177
+ ]), /* @__PURE__ */ W(We.Provider, {
148
178
  value: {
149
- theme: o,
150
- setTheme: (e) => a(e),
179
+ theme: l,
180
+ setTheme: (e) => c(e),
151
181
  toggleTheme: () => {
152
- a(o === "light" ? "dark" : "light");
182
+ c(l === "light" ? "dark" : "light");
153
183
  },
154
- isSystem: i === "system",
155
- setIsSystem: (e) => a(e ? "system" : o),
156
- config: c,
157
- activeConfig: c
184
+ isSystem: s === "system",
185
+ setIsSystem: (e) => c(e ? "system" : l),
186
+ config: o,
187
+ activeConfig: o,
188
+ savedTheme: i
158
189
  },
159
- children: u ? e : null
190
+ children: d ? e : null
160
191
  });
161
192
  }
162
- var Pe = () => {
163
- let e = he(Me);
193
+ var Ke = () => {
194
+ let e = _e(We);
164
195
  if (!e) throw Error("useTheme must be used within ThemeProvider");
165
196
  return e;
166
- }, Fe = (e) => e?.formType === "private" || e?.submitPage === "requests" ? "user_requests" : "user_submissions", Ie = {
167
- contact: J,
168
- support: Y
197
+ }, qe = (e) => e?.formType === "private" || e?.submitPage === "requests" ? "user_requests" : "user_submissions", Je = {
198
+ contact: K,
199
+ support: q
169
200
  };
170
201
  //#endregion
171
202
  //#region src/components/Input.tsx
172
- function Le(...e) {
203
+ function Ye(...e) {
173
204
  return i(m(e));
174
205
  }
175
- var X = R.forwardRef(({ className: e, label: t, error: n, currencySymbol: r, type: i, ...a }, o) => {
206
+ var X = me.forwardRef(({ className: e, label: t, error: n, currencySymbol: r, type: i, ...a }, o) => {
176
207
  let s = i === "currency";
177
- return /* @__PURE__ */ q("div", {
208
+ return /* @__PURE__ */ G("div", {
178
209
  className: "flex flex-col w-full relative",
179
210
  children: [
180
- t && /* @__PURE__ */ K("label", {
211
+ t && /* @__PURE__ */ W("label", {
181
212
  className: "text-[13px] font-medium text-foreground/50 select-none mb-1.5 ml-1",
182
213
  children: t
183
214
  }),
184
- /* @__PURE__ */ q("div", {
215
+ /* @__PURE__ */ G("div", {
185
216
  className: "relative flex items-center",
186
- children: [s && r && /* @__PURE__ */ K("span", {
217
+ children: [s && r && /* @__PURE__ */ W("span", {
187
218
  className: "absolute left-4 font-bold text-foreground/70 z-10 pointer-events-none text-[15px]",
188
219
  children: r
189
- }), /* @__PURE__ */ K("input", {
220
+ }), /* @__PURE__ */ W("input", {
190
221
  ref: o,
191
222
  type: s ? "number" : i,
192
- className: Le("block h-12 w-full text-[15px] text-foreground py-2", s && r ? "pl-8 pr-4" : "px-4", "transition-all duration-300 placeholder:text-foreground/40", "focus:outline-none focus:border-accent glow-focus", "disabled:cursor-not-allowed disabled:opacity-50 glass-panel", n && "border-red-500/50 focus:border-red-500/50", e),
223
+ className: Ye("block h-12 w-full text-[15px] text-foreground py-2", s && r ? "pl-8 pr-4" : "px-4", "transition-all duration-300 placeholder:text-foreground/40", "focus:outline-none focus:border-accent glow-focus", "disabled:cursor-not-allowed disabled:opacity-50 glass-panel", n && "border-red-500/50 focus:border-red-500/50", e),
193
224
  style: { borderRadius: "var(--input-radius, 0.75rem)" },
194
225
  ...a
195
226
  })]
196
227
  }),
197
- n && /* @__PURE__ */ K(k.p, {
228
+ n && /* @__PURE__ */ W(k.p, {
198
229
  initial: {
199
230
  opacity: 0,
200
231
  y: -5
@@ -212,17 +243,17 @@ var X = R.forwardRef(({ className: e, label: t, error: n, currencySymbol: r, typ
212
243
  X.displayName = "Input";
213
244
  //#endregion
214
245
  //#region src/components/Button.tsx
215
- function Re(...e) {
246
+ function Xe(...e) {
216
247
  return i(m(e));
217
248
  }
218
- var Z = R.forwardRef(({ className: e, variant: t = "primary", isLoading: n, children: r, ...i }, a) => /* @__PURE__ */ q(k.button, {
249
+ var Ze = me.forwardRef(({ className: e, variant: t = "primary", isLoading: n, children: r, ...i }, a) => /* @__PURE__ */ G(k.button, {
219
250
  ref: a,
220
251
  whileHover: {
221
252
  scale: 1.02,
222
253
  y: -2
223
254
  },
224
255
  whileTap: { scale: .98 },
225
- className: Re("relative inline-flex items-center justify-center px-5 py-2 text-sm font-medium transition-all duration-300 overflow-hidden group", {
256
+ className: Xe("relative inline-flex items-center justify-center px-5 py-2 text-sm font-medium transition-all duration-300 overflow-hidden group", {
226
257
  primary: "btn-primary !border-none",
227
258
  secondary: "btn-secondary !border-none",
228
259
  ghost: "bg-transparent hover:bg-black/5 dark:hover:bg-white/5 text-foreground/60 hover:text-foreground transition-all duration-300 !border-none"
@@ -230,52 +261,52 @@ var Z = R.forwardRef(({ className: e, variant: t = "primary", isLoading: n, chil
230
261
  style: { borderRadius: "var(--btn-radius, 0.75rem)" },
231
262
  disabled: n || i.disabled,
232
263
  ...i,
233
- children: [n ? /* @__PURE__ */ K("span", {
264
+ children: [n ? /* @__PURE__ */ W("span", {
234
265
  className: "absolute inset-0 flex items-center justify-center",
235
- children: /* @__PURE__ */ q("svg", {
266
+ children: /* @__PURE__ */ G("svg", {
236
267
  className: "w-5 h-5 animate-spin text-current",
237
268
  xmlns: "http://www.w3.org/2000/svg",
238
269
  fill: "none",
239
270
  viewBox: "0 0 24 24",
240
- children: [/* @__PURE__ */ K("circle", {
271
+ children: [/* @__PURE__ */ W("circle", {
241
272
  className: "opacity-25",
242
273
  cx: "12",
243
274
  cy: "12",
244
275
  r: "10",
245
276
  stroke: "currentColor",
246
277
  strokeWidth: "4"
247
- }), /* @__PURE__ */ K("path", {
278
+ }), /* @__PURE__ */ W("path", {
248
279
  className: "opacity-75",
249
280
  fill: "currentColor",
250
281
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
251
282
  })]
252
283
  })
253
- }) : null, /* @__PURE__ */ K("span", {
254
- className: Re("inline-flex items-center justify-center gap-2", n && "opacity-0"),
284
+ }) : null, /* @__PURE__ */ W("span", {
285
+ className: Xe("inline-flex items-center justify-center gap-2", n && "opacity-0"),
255
286
  children: r
256
287
  })]
257
288
  }));
258
- Z.displayName = "Button";
289
+ Ze.displayName = "Button";
259
290
  //#endregion
260
291
  //#region src/components/schedule/TimeChips.tsx
261
- function ze({ timeZone: e, onTimeZone: t }) {
262
- let [n, r] = B(!1);
263
- return /* @__PURE__ */ q("div", {
292
+ function Qe({ timeZone: e, onTimeZone: t }) {
293
+ let [n, r] = R(!1);
294
+ return /* @__PURE__ */ G("div", {
264
295
  className: "flex flex-col gap-2",
265
- children: [/* @__PURE__ */ q("p", {
296
+ children: [/* @__PURE__ */ G("p", {
266
297
  className: "text-[12px] font-medium text-foreground/50",
267
298
  children: [
268
299
  "Times in ",
269
300
  O(e),
270
301
  " · ",
271
- /* @__PURE__ */ K("button", {
302
+ /* @__PURE__ */ W("button", {
272
303
  type: "button",
273
304
  onClick: () => r((e) => !e),
274
305
  className: "text-accent font-semibold hover:underline cursor-pointer",
275
306
  children: n ? "Done" : "Change"
276
307
  })
277
308
  ]
278
- }), n && /* @__PURE__ */ K(N, {
309
+ }), n && /* @__PURE__ */ W(de, {
279
310
  compact: !0,
280
311
  value: e,
281
312
  onChange: (e) => {
@@ -284,16 +315,16 @@ function ze({ timeZone: e, onTimeZone: t }) {
284
315
  })]
285
316
  });
286
317
  }
287
- var Be = (e, t) => !!e && e.memberId === t.memberId && e.start === t.start && e.scheduleId === t.scheduleId;
288
- function Ve({ slots: e, value: t, onChange: n, timeZone: r, members: i }) {
318
+ var $e = (e, t) => !!e && e.memberId === t.memberId && e.start === t.start && e.scheduleId === t.scheduleId;
319
+ function et({ slots: e, value: t, onChange: n, timeZone: r, members: i }) {
289
320
  let a = new Set(i.map((e) => e.memberId)).size > 1, o = (e) => (i.find((t) => t.id === e.scheduleId) || i.find((t) => t.memberId === e.memberId))?.memberName.trim() || "";
290
- return e.length ? /* @__PURE__ */ K("div", {
321
+ return e.length ? /* @__PURE__ */ W("div", {
291
322
  className: "flex flex-wrap gap-2",
292
323
  role: "listbox",
293
324
  "aria-label": "Free times",
294
325
  children: e.map((e) => {
295
- let i = Be(t, e), s = M(new Date(e.start), r), c = a ? o(e) : "";
296
- return /* @__PURE__ */ q("button", {
326
+ let i = $e(t, e), s = M(new Date(e.start), r), c = a ? o(e) : "";
327
+ return /* @__PURE__ */ G("button", {
297
328
  type: "button",
298
329
  role: "option",
299
330
  "aria-selected": i,
@@ -301,10 +332,10 @@ function Ve({ slots: e, value: t, onChange: n, timeZone: r, members: i }) {
301
332
  onClick: () => n(i ? null : e),
302
333
  className: `flex flex-col items-center justify-center min-w-[76px] px-3 py-2 rounded-xl text-[14px] font-semibold transition-all cursor-pointer glass-panel ${i ? "bg-accent text-[var(--button-fg,#fff)] border-accent shadow-lg shadow-accent/20" : "text-foreground/80 hover:border-accent hover:text-foreground"}`,
303
334
  style: { borderRadius: "var(--input-radius, 0.75rem)" },
304
- children: [/* @__PURE__ */ q("span", {
335
+ children: [/* @__PURE__ */ G("span", {
305
336
  className: "flex items-center gap-1.5",
306
- children: [i && /* @__PURE__ */ K(A, { className: "w-3.5 h-3.5" }), s]
307
- }), c && /* @__PURE__ */ K("span", {
337
+ children: [i && /* @__PURE__ */ W(A, { className: "w-3.5 h-3.5" }), s]
338
+ }), c && /* @__PURE__ */ W("span", {
308
339
  className: `text-[11px] font-medium leading-tight ${i ? "opacity-90" : "text-foreground/50"}`,
309
340
  children: c
310
341
  })]
@@ -314,9 +345,9 @@ function Ve({ slots: e, value: t, onChange: n, timeZone: r, members: i }) {
314
345
  }
315
346
  //#endregion
316
347
  //#region src/components/schedule/SlotPicker.tsx
317
- function He(e, t, n, r) {
348
+ function tt(e, t, n, r) {
318
349
  return {
319
- days: _e(() => u(h(e, {
350
+ days: ye(() => u(h(e, {
320
351
  now: r ? r() : /* @__PURE__ */ new Date(),
321
352
  taken: t
322
353
  }), n), [
@@ -328,27 +359,27 @@ function He(e, t, n, r) {
328
359
  horizon: e.reduce((e, t) => Math.max(e, t.horizonDays), 0)
329
360
  };
330
361
  }
331
- var Ue = (e, t) => e ? C(new Date(e.start), t).dateKey : "";
332
- function We({ horizon: e }) {
333
- return /* @__PURE__ */ K("p", {
362
+ var nt = (e, t) => e ? C(new Date(e.start), t).dateKey : "";
363
+ function rt({ horizon: e }) {
364
+ return /* @__PURE__ */ W("p", {
334
365
  className: "text-[13px] font-medium text-foreground/50 py-2",
335
366
  children: e ? `No free times in the next ${e} days.` : "No free times at the moment."
336
367
  });
337
368
  }
338
- function Ge({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZone: a, now: o }) {
339
- let { days: s, horizon: c } = He(e, r, i, o), [l, u] = B({
369
+ function it({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZone: a, now: o }) {
370
+ let { days: s, horizon: c } = tt(e, r, i, o), [l, u] = R({
340
371
  tz: i,
341
372
  day: ""
342
- }), d = l.tz === i ? l.day : "", f = (s.some((e) => e.dateKey === d) ? d : "") || Ue(t, i) || s[0]?.dateKey || "", p = s.find((e) => e.dateKey === f) || s[0];
343
- return /* @__PURE__ */ q("div", {
373
+ }), d = l.tz === i ? l.day : "", f = (s.some((e) => e.dateKey === d) ? d : "") || nt(t, i) || s[0]?.dateKey || "", p = s.find((e) => e.dateKey === f) || s[0];
374
+ return /* @__PURE__ */ G("div", {
344
375
  className: "flex flex-col gap-3 w-full",
345
- children: [s.length === 0 ? /* @__PURE__ */ K(We, { horizon: c }) : /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K("div", {
376
+ children: [s.length === 0 ? /* @__PURE__ */ W(rt, { horizon: c }) : /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
346
377
  className: "flex gap-2 overflow-x-auto no-scrollbar pb-1 -mx-1 px-1",
347
378
  role: "tablist",
348
379
  "aria-label": "Days with free times",
349
380
  children: s.map((e) => {
350
381
  let t = e.dateKey === p?.dateKey;
351
- return /* @__PURE__ */ K("button", {
382
+ return /* @__PURE__ */ W("button", {
352
383
  type: "button",
353
384
  role: "tab",
354
385
  "aria-selected": t,
@@ -361,13 +392,13 @@ function Ge({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZo
361
392
  children: e.label
362
393
  }, e.dateKey);
363
394
  })
364
- }), p && /* @__PURE__ */ K(Ve, {
395
+ }), p && /* @__PURE__ */ W(et, {
365
396
  slots: p.slots,
366
397
  value: t,
367
398
  onChange: n,
368
399
  timeZone: i,
369
400
  members: e
370
- })] }), /* @__PURE__ */ K(ze, {
401
+ })] }), /* @__PURE__ */ W(Qe, {
371
402
  timeZone: i,
372
403
  onTimeZone: a
373
404
  })]
@@ -375,7 +406,7 @@ function Ge({ members: e, value: t, onChange: n, taken: r, timeZone: i, onTimeZo
375
406
  }
376
407
  //#endregion
377
408
  //#region src/components/schedule/BookingCalendar.tsx
378
- var Ke = [
409
+ var at = [
379
410
  "M",
380
411
  "T",
381
412
  "W",
@@ -383,32 +414,32 @@ var Ke = [
383
414
  "F",
384
415
  "S",
385
416
  "S"
386
- ], Q = (e) => e.slice(0, 7), qe = (e, t) => {
417
+ ], Z = (e) => e.slice(0, 7), ot = (e, t) => {
387
418
  let [n, r] = e.split("-").map(Number);
388
419
  return new Intl.DateTimeFormat(t, {
389
420
  month: "long",
390
421
  year: "numeric",
391
422
  timeZone: "UTC"
392
423
  }).format(new Date(Date.UTC(n, r - 1, 1)));
393
- }, Je = (e, t) => {
424
+ }, st = (e, t) => {
394
425
  let [n, r] = e.split("-").map(Number), i = new Date(Date.UTC(n, r - 1 + t, 1));
395
426
  return `${i.getUTCFullYear()}-${String(i.getUTCMonth() + 1).padStart(2, "0")}`;
396
427
  };
397
- function Ye(e) {
428
+ function ct(e) {
398
429
  let t = `${e}-01`, n = v.indexOf(D(t)), r = Array.from({ length: n }, () => null);
399
430
  for (let n = 0;; n++) {
400
431
  let i = f(t, n);
401
- if (Q(i) !== e) break;
432
+ if (Z(i) !== e) break;
402
433
  r.push(i);
403
434
  }
404
435
  return r;
405
436
  }
406
- function Xe({ members: e, value: n, onChange: r, taken: i, timeZone: a, onTimeZone: o, now: s }) {
407
- let { days: c, horizon: l } = He(e, i, a, s), u = C(s ? s() : /* @__PURE__ */ new Date(), a).dateKey, d = new Map(c.map((e) => [e.dateKey, e])), f = Ue(n, a), [p, m] = B(() => ({
437
+ function lt({ members: e, value: n, onChange: r, taken: i, timeZone: a, onTimeZone: o, now: s }) {
438
+ let { days: c, horizon: l } = tt(e, i, a, s), u = C(s ? s() : /* @__PURE__ */ new Date(), a).dateKey, d = new Map(c.map((e) => [e.dateKey, e])), f = nt(n, a), [p, m] = R(() => ({
408
439
  tz: a,
409
440
  day: f,
410
- month: Q(f || c[0]?.dateKey || u)
411
- })), h = p.tz === a, g = h ? p.day : f, _ = h ? p.month : Q(f || c[0]?.dateKey || u), v = (e) => m({
441
+ month: Z(f || c[0]?.dateKey || u)
442
+ })), h = p.tz === a, g = h ? p.day : f, _ = h ? p.month : Z(f || c[0]?.dateKey || u), v = (e) => m({
412
443
  tz: a,
413
444
  day: g,
414
445
  month: e(_)
@@ -416,56 +447,56 @@ function Xe({ members: e, value: n, onChange: r, taken: i, timeZone: a, onTimeZo
416
447
  tz: a,
417
448
  day: e,
418
449
  month: _
419
- }), b = g ? d.get(g) : void 0, x = Ye(_);
420
- return /* @__PURE__ */ q("div", {
450
+ }), b = g ? d.get(g) : void 0, x = ct(_);
451
+ return /* @__PURE__ */ G("div", {
421
452
  className: "flex flex-col gap-4 w-full",
422
453
  children: [
423
- c.length === 0 && /* @__PURE__ */ K(We, { horizon: l }),
424
- /* @__PURE__ */ q("div", {
454
+ c.length === 0 && /* @__PURE__ */ W(rt, { horizon: l }),
455
+ /* @__PURE__ */ G("div", {
425
456
  className: "flex flex-col md:flex-row gap-4 md:gap-6 w-full",
426
- children: [/* @__PURE__ */ q("div", {
457
+ children: [/* @__PURE__ */ G("div", {
427
458
  className: "flex-1 min-w-0 flex flex-col gap-3",
428
- children: [/* @__PURE__ */ q("div", {
459
+ children: [/* @__PURE__ */ G("div", {
429
460
  className: "flex items-center justify-between gap-2",
430
- children: [/* @__PURE__ */ K("h4", {
461
+ children: [/* @__PURE__ */ W("h4", {
431
462
  className: "text-[15px] sm:text-[17px] font-bold text-foreground tracking-tight truncate",
432
- children: qe(_)
433
- }), /* @__PURE__ */ q("div", {
463
+ children: ot(_)
464
+ }), /* @__PURE__ */ G("div", {
434
465
  className: "flex items-center gap-1 shrink-0",
435
466
  children: [
436
- /* @__PURE__ */ K("button", {
467
+ /* @__PURE__ */ W("button", {
437
468
  type: "button",
438
- onClick: () => v(() => Q(u)),
469
+ onClick: () => v(() => Z(u)),
439
470
  className: "px-3 py-1.5 text-[12.5px] font-bold border border-[var(--panel-border)] rounded-xl mr-1 hover:bg-foreground/5 transition-colors cursor-pointer",
440
471
  children: "Today"
441
472
  }),
442
- /* @__PURE__ */ K("button", {
473
+ /* @__PURE__ */ W("button", {
443
474
  type: "button",
444
475
  "aria-label": "Previous month",
445
- onClick: () => v((e) => Je(e, -1)),
476
+ onClick: () => v((e) => st(e, -1)),
446
477
  className: "p-1.5 rounded-xl text-foreground/50 hover:text-foreground hover:bg-foreground/5 transition-colors border border-transparent hover:border-[var(--panel-border)] cursor-pointer",
447
- children: /* @__PURE__ */ K(ae, { className: "w-4 h-4" })
478
+ children: /* @__PURE__ */ W(ae, { className: "w-4 h-4" })
448
479
  }),
449
- /* @__PURE__ */ K("button", {
480
+ /* @__PURE__ */ W("button", {
450
481
  type: "button",
451
482
  "aria-label": "Next month",
452
- onClick: () => v((e) => Je(e, 1)),
483
+ onClick: () => v((e) => st(e, 1)),
453
484
  className: "p-1.5 rounded-xl text-foreground/50 hover:text-foreground hover:bg-foreground/5 transition-colors border border-transparent hover:border-[var(--panel-border)] cursor-pointer",
454
- children: /* @__PURE__ */ K(t, { className: "w-4 h-4" })
485
+ children: /* @__PURE__ */ W(t, { className: "w-4 h-4" })
455
486
  })
456
487
  ]
457
488
  })]
458
- }), /* @__PURE__ */ q("div", {
489
+ }), /* @__PURE__ */ G("div", {
459
490
  className: "grid grid-cols-7 gap-1",
460
491
  role: "grid",
461
- "aria-label": qe(_),
462
- children: [Ke.map((e, t) => /* @__PURE__ */ K("div", {
492
+ "aria-label": ot(_),
493
+ children: [at.map((e, t) => /* @__PURE__ */ W("div", {
463
494
  className: "text-center text-[11px] font-bold uppercase tracking-wider text-foreground/40 py-1",
464
495
  children: e
465
496
  }, t)), x.map((e, t) => {
466
- if (!e) return /* @__PURE__ */ K("div", { "aria-hidden": !0 }, `blank-${t}`);
497
+ if (!e) return /* @__PURE__ */ W("div", { "aria-hidden": !0 }, `blank-${t}`);
467
498
  let n = d.has(e), r = e === g, i = e === u, a = Number(e.slice(8, 10));
468
- return /* @__PURE__ */ q("button", {
499
+ return /* @__PURE__ */ G("button", {
469
500
  type: "button",
470
501
  role: "gridcell",
471
502
  "aria-label": d.get(e)?.label || e,
@@ -474,31 +505,31 @@ function Xe({ members: e, value: n, onChange: r, taken: i, timeZone: a, onTimeZo
474
505
  disabled: !n,
475
506
  onClick: () => y(e),
476
507
  className: `relative flex flex-col items-center justify-center aspect-square rounded-xl text-[14px] font-semibold transition-all ${r ? "bg-accent text-[var(--button-fg,#fff)] shadow-lg shadow-accent/20 cursor-pointer" : n ? "text-foreground hover:bg-foreground/[0.06] cursor-pointer" : "text-foreground/25 cursor-default"} ${i && !r ? "ring-1 ring-accent/50" : ""}`,
477
- children: [a, n && /* @__PURE__ */ K("span", {
508
+ children: [a, n && /* @__PURE__ */ W("span", {
478
509
  "aria-hidden": !0,
479
510
  className: `absolute bottom-1.5 w-1.5 h-1.5 rounded-full ${r ? "bg-[var(--button-fg,#fff)]" : "bg-accent"}`
480
511
  })]
481
512
  }, e);
482
513
  })]
483
514
  })]
484
- }), /* @__PURE__ */ K("div", {
515
+ }), /* @__PURE__ */ W("div", {
485
516
  className: "md:w-[260px] shrink-0 flex flex-col gap-2",
486
- children: b ? /* @__PURE__ */ q(G, { children: [/* @__PURE__ */ K("p", {
517
+ children: b ? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("p", {
487
518
  className: "text-[13px] font-bold text-foreground",
488
519
  children: b.label
489
- }), /* @__PURE__ */ K(Ve, {
520
+ }), /* @__PURE__ */ W(et, {
490
521
  slots: b.slots,
491
522
  value: n,
492
523
  onChange: r,
493
524
  timeZone: a,
494
525
  members: e
495
- })] }) : c.length > 0 ? /* @__PURE__ */ K("p", {
526
+ })] }) : c.length > 0 ? /* @__PURE__ */ W("p", {
496
527
  className: "text-[13px] font-medium text-foreground/50",
497
528
  children: "Pick a day with a dot to see its times."
498
529
  }) : null
499
530
  })]
500
531
  }),
501
- /* @__PURE__ */ K(ze, {
532
+ /* @__PURE__ */ W(Qe, {
502
533
  timeZone: a,
503
534
  onTimeZone: o
504
535
  })
@@ -507,15 +538,15 @@ function Xe({ members: e, value: n, onChange: r, taken: i, timeZone: a, onTimeZo
507
538
  }
508
539
  //#endregion
509
540
  //#region src/lib/scheduleData.ts
510
- function Ze() {
511
- let [e, t] = B({
541
+ function Q() {
542
+ let [e, t] = R({
512
543
  loading: !0,
513
544
  schedules: []
514
545
  });
515
- return z(() => {
516
- let e = W(V(y, p), (e) => {
546
+ return L(() => {
547
+ let e = H(z(y, p), (e) => {
517
548
  let n = [];
518
- e.forEach((e) => n.push(j(e.id, e.data()))), n.sort((e, t) => (e.createdAt || 0) - (t.createdAt || 0) || e.id.localeCompare(t.id)), P(n), t({
549
+ e.forEach((e) => n.push(j(e.id, e.data()))), n.sort((e, t) => (e.createdAt || 0) - (t.createdAt || 0) || e.id.localeCompare(t.id)), N(n), t({
519
550
  loading: !1,
520
551
  schedules: n
521
552
  });
@@ -526,21 +557,21 @@ function Ze() {
526
557
  return () => e();
527
558
  }, []), e;
528
559
  }
529
- function Qe(e) {
530
- let t = Ze();
560
+ function ut(e) {
561
+ let t = Q();
531
562
  return e ? {
532
563
  loading: t.loading,
533
564
  schedules: se(t.schedules, e)
534
- } : $e;
565
+ } : dt;
535
566
  }
536
- var $e = {
567
+ var dt = {
537
568
  loading: !1,
538
569
  schedules: []
539
570
  };
540
- async function et(e) {
571
+ async function ft(e) {
541
572
  try {
542
573
  let { id: t, ...n } = e;
543
- return await we(U(y, p, t), {
574
+ return await Ee(V(y, p, t), {
544
575
  ...n,
545
576
  updatedAt: Date.now()
546
577
  }), null;
@@ -548,20 +579,20 @@ async function et(e) {
548
579
  return console.error("Could not save the schedule", e), "The hours could not be saved — make sure you are signed in as an admin and try again.";
549
580
  }
550
581
  }
551
- async function tt(e) {
582
+ async function pt(e) {
552
583
  try {
553
- return await H(U(y, p, e)), null;
584
+ return await B(V(y, p, e)), null;
554
585
  } catch (e) {
555
586
  return console.error("Could not remove the schedule", e), "It could not be removed — make sure you are signed in as an admin and try again.";
556
587
  }
557
588
  }
558
- function nt() {
559
- let [e, t] = B({
589
+ function mt() {
590
+ let [e, t] = R({
560
591
  loading: !0,
561
592
  members: []
562
593
  });
563
- return z(() => {
564
- let e = W(V(y, "user_profiles"), (e) => {
594
+ return L(() => {
595
+ let e = H(z(y, "user_profiles"), (e) => {
565
596
  let n = [];
566
597
  e.forEach((e) => {
567
598
  let t = e.data() || {}, r = t.role === "admin" || t.role === "internal" ? t.role : null;
@@ -582,11 +613,11 @@ function nt() {
582
613
  return () => e();
583
614
  }, []), e;
584
615
  }
585
- function rt(e, t) {
586
- let [r, i] = B([]), a = e.slice().sort().join(","), o = t.toISOString();
587
- return z(() => {
616
+ function ht(e, t) {
617
+ let [r, i] = R([]), a = e.slice().sort().join(","), o = t.toISOString();
618
+ return L(() => {
588
619
  if (!a) return;
589
- let e = new Set(a.split(",")), r = new Date(t.getTime() - at).toISOString(), s = W(xe(V(y, n), Te("start", ">=", r)), (t) => {
620
+ let e = new Set(a.split(",")), r = new Date(t.getTime() - _t).toISOString(), s = H(Ce(z(y, n), De("start", ">=", r)), (t) => {
590
621
  let n = [];
591
622
  t.forEach((t) => {
592
623
  let r = t.data() || {}, i = String(r.memberId || "");
@@ -600,29 +631,29 @@ function rt(e, t) {
600
631
  }), i(n);
601
632
  }, () => i([]));
602
633
  return () => s();
603
- }, [a, o]), a ? r : it;
634
+ }, [a, o]), a ? r : gt;
604
635
  }
605
- var it = [], at = 4 * 36e5, ot = 15 * 6e4, st = "taken", ct = "That time was just taken — pick another.";
606
- function lt(e) {
607
- let t = Date.parse(e.start), n = Date.parse(e.end), r = Math.ceil((t - at) / ot) * ot, i = [];
608
- for (let t = r; t < n; t += ot) i.push(E(e.memberId, new Date(t).toISOString()));
636
+ var gt = [], _t = 4 * 36e5, vt = 15 * 6e4, yt = "taken", bt = "That time was just taken — pick another.";
637
+ function xt(e) {
638
+ let t = Date.parse(e.start), n = Date.parse(e.end), r = Math.ceil((t - _t) / vt) * vt, i = [];
639
+ for (let t = r; t < n; t += vt) i.push(E(e.memberId, new Date(t).toISOString()));
609
640
  return i;
610
641
  }
611
- async function ut(t) {
642
+ async function St(t) {
612
643
  let r = E(t.memberId, t.start);
613
644
  try {
614
- return await Se(y, async (i) => {
615
- let a = U(y, n, r);
616
- if ((await i.get(a)).exists()) throw Error(st);
617
- for (let a of lt(t)) {
645
+ return await we(y, async (i) => {
646
+ let a = V(y, n, r);
647
+ if ((await i.get(a)).exists()) throw Error(yt);
648
+ for (let a of xt(t)) {
618
649
  if (a === r) continue;
619
- let o = await i.get(U(y, n, a));
650
+ let o = await i.get(V(y, n, a));
620
651
  if (!o.exists()) continue;
621
652
  let s = o.data() || {};
622
653
  if (e({
623
654
  start: String(s.start || ""),
624
655
  end: String(s.end || "")
625
- }, t)) throw Error(st);
656
+ }, t)) throw Error(yt);
626
657
  }
627
658
  i.set(a, {
628
659
  memberId: t.memberId,
@@ -632,17 +663,17 @@ async function ut(t) {
632
663
  });
633
664
  }), null;
634
665
  } catch (e) {
635
- return e?.message === st ? ct : (console.error("Could not claim the time", e), "The time could not be saved — check your connection and try again.");
666
+ return e?.message === yt ? bt : (console.error("Could not claim the time", e), "The time could not be saved — check your connection and try again.");
636
667
  }
637
668
  }
638
669
  async function $(e) {
639
670
  try {
640
- await H(U(y, n, E(e.memberId, e.start)));
671
+ await B(V(y, n, E(e.memberId, e.start)));
641
672
  } catch {}
642
673
  }
643
- async function dt(e, t) {
674
+ async function Ct(e, t) {
644
675
  try {
645
- return await we(U(y, F, E(e.memberId, e.start)), {
676
+ return await Ee(V(y, P, E(e.memberId, e.start)), {
646
677
  memberId: e.memberId,
647
678
  memberName: t.memberName,
648
679
  scheduleId: t.scheduleId,
@@ -657,14 +688,14 @@ async function dt(e, t) {
657
688
  answers: t.answers,
658
689
  formId: t.formId,
659
690
  entryId: t.entryId,
660
- uid: I.currentUser?.uid || "guest",
691
+ uid: F.currentUser?.uid || "guest",
661
692
  createdAt: Date.now()
662
693
  }), null;
663
694
  } catch (e) {
664
695
  return console.error("Could not write the booking for the team", e), "The booking was taken but its details could not be saved.";
665
696
  }
666
697
  }
667
- var ft = (e, t) => ({
698
+ var wt = (e, t) => ({
668
699
  id: e,
669
700
  memberId: String(t?.memberId || ""),
670
701
  scheduleId: String(t?.scheduleId || ""),
@@ -683,17 +714,17 @@ var ft = (e, t) => ({
683
714
  uid: String(t?.uid || ""),
684
715
  createdAt: typeof t?.createdAt == "number" ? t.createdAt : 0
685
716
  });
686
- function pt(e = {}) {
687
- let [t, n] = B({
717
+ function Tt(e = {}) {
718
+ let [t, n] = R({
688
719
  loading: !0,
689
720
  bookings: [],
690
721
  error: null
691
722
  }), r = (e.members || []).slice().sort().join(","), i = !!e.includePast, a = e.now;
692
- return z(() => {
693
- let e = r ? new Set(r.split(",")) : null, t = W(V(y, F), (t) => {
723
+ return L(() => {
724
+ let e = r ? new Set(r.split(",")) : null, t = H(z(y, P), (t) => {
694
725
  let r = (a ? a() : /* @__PURE__ */ new Date()).toISOString(), o = [];
695
726
  t.forEach((t) => {
696
- let n = ft(t.id, t.data());
727
+ let n = wt(t.id, t.data());
697
728
  e && !e.has(n.memberId) || o.push(n);
698
729
  });
699
730
  let s = o.filter((e) => e.end >= r).sort((e, t) => e.start.localeCompare(t.start)), c = i ? o.filter((e) => e.end < r).sort((e, t) => t.start.localeCompare(e.start)) : [];
@@ -716,26 +747,26 @@ function pt(e = {}) {
716
747
  a
717
748
  ]), t;
718
749
  }
719
- async function mt(e) {
750
+ async function Et(e) {
720
751
  try {
721
- return await H(U(y, F, e)), await H(U(y, n, e)), null;
752
+ return await B(V(y, P, e)), await B(V(y, n, e)), null;
722
753
  } catch (e) {
723
754
  return console.error("Could not cancel the booking", e), "It could not be cancelled — make sure you are signed in as a team member and try again.";
724
755
  }
725
756
  }
726
757
  //#endregion
727
758
  //#region src/components/ContactPopup.tsx
728
- var ht = R.lazy(() => import("./PhoneInputField-B0Sgjg71.js").then((e) => e.n)), gt = /^[^\s@,;]+@[^\s@,;.]+(\.[^\s@,;.]+)*\.[a-z]{2,}$/i;
729
- function _t({ field: e, value: t, error: n, timeZone: r, onTimeZone: i, onChange: a }) {
730
- let { schedules: o } = Ze(), s = le(e), c = o.filter((e) => s.includes(e.id) && l(e)), [u] = B(() => /* @__PURE__ */ new Date()), f = rt(c.map((e) => e.memberId), u), p = S(t), m = e.look === "calendar" ? Xe : Ge;
731
- return /* @__PURE__ */ q("div", {
759
+ var Dt = me.lazy(() => import("./PhoneInputField-B0Sgjg71.js").then((e) => e.n)), Ot = /^[^\s@,;]+@[^\s@,;.]+(\.[^\s@,;.]+)*\.[a-z]{2,}$/i;
760
+ function kt({ field: e, value: t, error: n, timeZone: r, onTimeZone: i, onChange: a }) {
761
+ let { schedules: o } = Q(), s = le(e), c = o.filter((e) => s.includes(e.id) && l(e)), [u] = R(() => /* @__PURE__ */ new Date()), f = ht(c.map((e) => e.memberId), u), p = S(t), m = e.look === "calendar" ? lt : it;
762
+ return /* @__PURE__ */ G("div", {
732
763
  className: "flex flex-col w-full",
733
764
  children: [
734
- /* @__PURE__ */ K("label", {
765
+ /* @__PURE__ */ W("label", {
735
766
  className: "text-[13px] font-medium text-foreground/50 select-none mb-1.5 ml-1",
736
767
  children: e.label
737
768
  }),
738
- /* @__PURE__ */ K(m, {
769
+ /* @__PURE__ */ W(m, {
739
770
  members: c,
740
771
  value: p,
741
772
  onChange: (e) => a(e ? d(e) : ""),
@@ -743,27 +774,27 @@ function _t({ field: e, value: t, error: n, timeZone: r, onTimeZone: i, onChange
743
774
  timeZone: r,
744
775
  onTimeZone: i
745
776
  }),
746
- n && /* @__PURE__ */ K("span", {
777
+ n && /* @__PURE__ */ W("span", {
747
778
  className: "text-xs text-red-500 font-medium mt-1.5 ml-1",
748
779
  children: n
749
780
  })
750
781
  ]
751
782
  });
752
783
  }
753
- var vt = (e, t) => {
784
+ var At = (e, t) => {
754
785
  let n = e.find((e) => e.type === "text" && /name/i.test(String(e.name || ""))) || e.find((e) => e.type === "text");
755
- return String(n && t[n.name] || I.currentUser?.displayName || "").trim();
756
- }, yt = (e, t) => {
786
+ return String(n && t[n.name] || F.currentUser?.displayName || "").trim();
787
+ }, jt = (e, t) => {
757
788
  let n = e.find((e) => e.type === "email");
758
- return String(n && t[n.name] || I.currentUser?.email || "").trim();
759
- }, bt = (e, t) => Object.fromEntries(e.filter((e) => e.type !== "schedule" && e.name && t[e.name] !== void 0 && t[e.name] !== "").map((e) => [e.name, String(t[e.name])]));
760
- function xt({ field: e, value: t, error: n, onChange: i }) {
761
- let [a, o] = B(0), [s, l] = B(""), u = ve(null), d = a > 0, f = w(t), p = async (e) => {
789
+ return String(n && t[n.name] || F.currentUser?.email || "").trim();
790
+ }, Mt = (e, t) => Object.fromEntries(e.filter((e) => e.type !== "schedule" && e.name && t[e.name] !== void 0 && t[e.name] !== "").map((e) => [e.name, String(t[e.name])]));
791
+ function Nt({ field: e, value: t, error: n, onChange: i }) {
792
+ let [a, o] = R(0), [s, l] = R(""), u = be(null), d = a > 0, f = w(t), p = async (e) => {
762
793
  let t = Array.from(e || []);
763
794
  u.current && (u.current.value = ""), t.length && (l(""), o((e) => e + t.length), await Promise.all(t.map(async (e) => {
764
795
  try {
765
- let t = await r(e, I.currentUser);
766
- i((e) => de([...w(e), t]));
796
+ let t = await r(e, F.currentUser);
797
+ i((e) => fe([...w(e), t]));
767
798
  } catch (e) {
768
799
  l(e?.code === "storage/unauthorized" ? "That kind of file is not accepted. Try a PDF, a document or a picture." : b(e));
769
800
  } finally {
@@ -771,54 +802,54 @@ function xt({ field: e, value: t, error: n, onChange: i }) {
771
802
  }
772
803
  })));
773
804
  }, m = (e) => {
774
- l(""), i((t) => de(w(t).filter((t) => t !== e)));
805
+ l(""), i((t) => fe(w(t).filter((t) => t !== e)));
775
806
  }, h = n || s;
776
- return /* @__PURE__ */ q("div", {
807
+ return /* @__PURE__ */ G("div", {
777
808
  className: "flex flex-col w-full relative",
778
809
  children: [
779
- /* @__PURE__ */ K("label", {
810
+ /* @__PURE__ */ W("label", {
780
811
  className: "text-[13px] font-medium text-foreground/50 select-none mb-1.5 ml-1",
781
812
  children: e.label
782
813
  }),
783
- f.length > 0 && /* @__PURE__ */ K("ul", {
814
+ f.length > 0 && /* @__PURE__ */ W("ul", {
784
815
  className: "flex flex-col gap-1.5 mb-2",
785
- children: f.map((e) => /* @__PURE__ */ q("li", {
816
+ children: f.map((e) => /* @__PURE__ */ G("li", {
786
817
  className: "flex items-center gap-3 w-full rounded-xl px-4 py-2.5 glass-panel",
787
818
  style: { borderRadius: "var(--input-radius, 0.75rem)" },
788
819
  children: [
789
- /* @__PURE__ */ K(T, { className: "w-4 h-4 shrink-0 text-accent" }),
790
- /* @__PURE__ */ K("span", {
820
+ /* @__PURE__ */ W(T, { className: "w-4 h-4 shrink-0 text-accent" }),
821
+ /* @__PURE__ */ W("span", {
791
822
  className: "flex-1 min-w-0 truncate text-[15px] text-foreground",
792
- children: fe(e)
823
+ children: pe(e)
793
824
  }),
794
- /* @__PURE__ */ K("button", {
825
+ /* @__PURE__ */ W("button", {
795
826
  type: "button",
796
827
  onClick: () => m(e),
797
- "aria-label": `Remove ${fe(e)}`,
828
+ "aria-label": `Remove ${pe(e)}`,
798
829
  title: "Remove",
799
830
  className: "p-1 rounded-lg text-foreground/40 hover:text-red-500 hover:bg-red-500/10 transition-colors cursor-pointer shrink-0",
800
- children: /* @__PURE__ */ K(g, { className: "w-3.5 h-3.5" })
831
+ children: /* @__PURE__ */ W(g, { className: "w-3.5 h-3.5" })
801
832
  })
802
833
  ]
803
834
  }, e))
804
835
  }),
805
- /* @__PURE__ */ q("label", {
836
+ /* @__PURE__ */ G("label", {
806
837
  className: `flex items-center gap-3 w-full rounded-xl px-4 py-3 glass-panel transition-all duration-300 cursor-pointer hover:border-accent ${d ? "opacity-60 pointer-events-none" : ""}`,
807
838
  style: { borderRadius: "var(--input-radius, 0.75rem)" },
808
839
  children: [
809
- d ? /* @__PURE__ */ K(L, { className: "w-4 h-4 animate-spin text-accent shrink-0" }) : /* @__PURE__ */ K(c, { className: "w-4 h-4 shrink-0 text-foreground/40" }),
810
- /* @__PURE__ */ K("span", {
840
+ d ? /* @__PURE__ */ W(I, { className: "w-4 h-4 animate-spin text-accent shrink-0" }) : /* @__PURE__ */ W(c, { className: "w-4 h-4 shrink-0 text-foreground/40" }),
841
+ /* @__PURE__ */ W("span", {
811
842
  className: "flex-1 min-w-0 truncate text-[15px] text-foreground/40",
812
843
  children: d ? a > 1 ? `Uploading ${a} files...` : "Uploading..." : f.length ? "Add another file" : e.placeholder || "Attach files"
813
844
  }),
814
- !d && /* @__PURE__ */ q("span", {
845
+ !d && /* @__PURE__ */ G("span", {
815
846
  className: "inline-flex items-center gap-1.5 text-[12.5px] font-bold text-foreground/60 shrink-0",
816
- children: [/* @__PURE__ */ K(c, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ K("span", {
847
+ children: [/* @__PURE__ */ W(c, { className: "w-3.5 h-3.5" }), /* @__PURE__ */ W("span", {
817
848
  className: "max-sm:hidden",
818
849
  children: "Upload"
819
850
  })]
820
851
  }),
821
- /* @__PURE__ */ K("input", {
852
+ /* @__PURE__ */ W("input", {
822
853
  ref: u,
823
854
  type: "file",
824
855
  multiple: !0,
@@ -830,19 +861,19 @@ function xt({ field: e, value: t, error: n, onChange: i }) {
830
861
  })
831
862
  ]
832
863
  }),
833
- h && /* @__PURE__ */ K("span", {
864
+ h && /* @__PURE__ */ W("span", {
834
865
  className: "text-xs text-red-500 font-medium mt-1.5 ml-1",
835
866
  children: h
836
867
  })
837
868
  ]
838
869
  });
839
870
  }
840
- function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i }) {
841
- let [a, c] = B({}), [l, u] = B("idle"), [d, f] = B(""), [p, m] = B({}), [h, g] = B(() => s()), [v, b] = B(""), x = ve(null), [C, w] = B(n || null), [T, E] = B(!n), ae = Ee(), D = ie(), O = (e) => {
871
+ function Pt({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i }) {
872
+ let [a, c] = R({}), [l, u] = R("idle"), [d, f] = R(""), [p, m] = R({}), [h, g] = R(() => s()), [v, b] = R(""), x = be(null), [C, w] = R(n || null), [T, E] = R(!n), ae = Oe(), D = ie(), O = (e) => {
842
873
  let t = (typeof window < "u" ? window.__FBOS_FORMS__ : null) || {};
843
- return D?.defaultConfigs?.[e] || D?.defaultConfigs?.[`${e}Form`] || t[e] || (e === "contact" ? J : e === "support" ? Y : null);
874
+ return D?.defaultConfigs?.[e] || D?.defaultConfigs?.[`${e}Form`] || t[e] || (e === "contact" ? K : e === "support" ? q : null);
844
875
  };
845
- z(() => {
876
+ L(() => {
846
877
  if (n) {
847
878
  w(n), E(!1);
848
879
  return;
@@ -864,7 +895,7 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
864
895
  } catch {}
865
896
  (async () => {
866
897
  try {
867
- let e = await be(U(y, "sys_forms", t));
898
+ let e = await Se(V(y, "sys_forms", t));
868
899
  if (e.exists()) {
869
900
  let n = {
870
901
  ...e.data(),
@@ -883,25 +914,25 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
883
914
  E(!1);
884
915
  }
885
916
  })();
886
- }, [t, n]), z(() => {
917
+ }, [t, n]), L(() => {
887
918
  C && C.fields && c((e) => {
888
919
  let t = { ...e }, n = !1;
889
920
  return C.fields.forEach((e) => {
890
- (e.name === "contactEmail" || e.type === "email") && !t[e.name] && I.currentUser?.email && (t[e.name] = I.currentUser.email, n = !0);
921
+ (e.name === "contactEmail" || e.type === "email") && !t[e.name] && F.currentUser?.email && (t[e.name] = F.currentUser.email, n = !0);
891
922
  }), n ? t : e;
892
923
  });
893
- }, [C]), z(() => {
924
+ }, [C]), L(() => {
894
925
  function t(t) {
895
926
  x.current && !x.current.contains(t.target) && e?.();
896
927
  }
897
928
  return document.addEventListener("mousedown", t), () => document.removeEventListener("mousedown", t);
898
- }, [e]), z(() => {
929
+ }, [e]), L(() => {
899
930
  if (r) return;
900
931
  let t = (t) => {
901
932
  t.key === "Escape" && e?.();
902
933
  };
903
934
  return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
904
- }, [e, r]), z(() => {
935
+ }, [e, r]), L(() => {
905
936
  if (!r) return document.body.style.overflow = "hidden", () => {
906
937
  document.body.style.overflow = "unset";
907
938
  };
@@ -911,7 +942,7 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
911
942
  let o = (C?.fields || []).filter((e) => e.type === "email"), s = {}, l = {};
912
943
  o.forEach((e) => {
913
944
  let t = String(a[e.name] ?? "").trim();
914
- t && (l[e.name] = t, gt.test(t) || (s[e.name] = "That does not look like an email address — check for a typo, e.g. jane@example.com"));
945
+ t && (l[e.name] = t, Ot.test(t) || (s[e.name] = "That does not look like an email address — check for a typo, e.g. jane@example.com"));
915
946
  }), (C?.fields || []).filter((e) => e.type === "file" && e.required && !a[e.name]).forEach((e) => {
916
947
  s[e.name] = "Please attach a file before sending.";
917
948
  });
@@ -924,11 +955,11 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
924
955
  }
925
956
  m({}), u("loading"), f("");
926
957
  try {
927
- let r = Fe(C), o = t || C?.systemName || C?.title || "unknown", s = [];
958
+ let r = qe(C), o = t || C?.systemName || C?.title || "unknown", s = [];
928
959
  for (let e of d) {
929
960
  let t = S(a[e.name]);
930
961
  if (!t) continue;
931
- let n = await ut(t);
962
+ let n = await St(t);
932
963
  if (n) {
933
964
  for (let e of s) await $(e.slot);
934
965
  m({ [e.name]: n }), u("idle");
@@ -948,32 +979,32 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
948
979
  ...l
949
980
  };
950
981
  for (let e of s) delete f[e.field.name], Object.assign(f, _(e.field.name, e.slot, e.memberName, h));
951
- let p = I.currentUser ? {
952
- uid: I.currentUser.uid,
953
- submitterName: I.currentUser.displayName || "",
954
- submitterEmail: I.currentUser.email || "",
955
- submitterAvatar: I.currentUser.photoURL || ""
982
+ let p = F.currentUser ? {
983
+ uid: F.currentUser.uid,
984
+ submitterName: F.currentUser.displayName || "",
985
+ submitterEmail: F.currentUser.email || "",
986
+ submitterAvatar: F.currentUser.photoURL || ""
956
987
  } : { uid: "guest" }, g;
957
988
  try {
958
- g = await ye(V(y, r), {
989
+ g = await xe(z(y, r), {
959
990
  ...f,
960
991
  ...p,
961
992
  formId: o,
962
- submittedAt: Ce()
993
+ submittedAt: Te()
963
994
  });
964
995
  } catch (e) {
965
996
  for (let e of s) await $(e.slot);
966
997
  throw e;
967
998
  }
968
999
  let v = C?.fields || [];
969
- for (let e of s) await dt(e.slot, {
1000
+ for (let e of s) await Ct(e.slot, {
970
1001
  memberName: e.memberName,
971
1002
  scheduleId: e.scheduleId,
972
1003
  scheduleName: e.scheduleName,
973
1004
  timeZone: h,
974
- name: vt(v, f),
975
- email: yt(v, f),
976
- answers: bt(v, f),
1005
+ name: At(v, f),
1006
+ email: jt(v, f),
1007
+ answers: Mt(v, f),
977
1008
  formId: o,
978
1009
  entryId: g.id
979
1010
  });
@@ -990,36 +1021,36 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
990
1021
  } catch (e) {
991
1022
  console.error("Submission error:", e), u("error"), f("We could not send your message right now. Please try again.");
992
1023
  }
993
- }, [le, A] = B(!1);
994
- if (z(() => {
1024
+ }, [le, A] = R(!1);
1025
+ if (L(() => {
995
1026
  let e;
996
1027
  return T || !C && !n ? e = setTimeout(() => A(!0), 150) : A(!1), () => clearTimeout(e);
997
1028
  }, [
998
1029
  T,
999
1030
  C,
1000
1031
  n
1001
- ]), T || !C) return le ? r ? /* @__PURE__ */ K("div", {
1032
+ ]), T || !C) return le ? r ? /* @__PURE__ */ W("div", {
1002
1033
  className: "w-full flex items-center justify-center py-[10vh]",
1003
- children: /* @__PURE__ */ q("div", {
1034
+ children: /* @__PURE__ */ G("div", {
1004
1035
  className: "p-4 rounded-2xl glass-panel border border-[var(--panel-border)]/40 bg-background/80 shadow-md flex items-center gap-3",
1005
- children: [/* @__PURE__ */ K(L, { className: "w-4 h-4 animate-spin text-accent" }), /* @__PURE__ */ K("span", {
1036
+ children: [/* @__PURE__ */ W(I, { className: "w-4 h-4 animate-spin text-accent" }), /* @__PURE__ */ W("span", {
1006
1037
  className: "text-[12px] font-medium text-foreground/60 tracking-wide",
1007
1038
  children: "Loading form..."
1008
1039
  })]
1009
1040
  })
1010
- }) : De(/* @__PURE__ */ K("div", {
1041
+ }) : ke(/* @__PURE__ */ W("div", {
1011
1042
  className: "fixed inset-0 z-[100] flex items-center justify-center bg-background/10 backdrop-blur-sm",
1012
- children: /* @__PURE__ */ q("div", {
1043
+ children: /* @__PURE__ */ G("div", {
1013
1044
  className: "p-4 rounded-2xl glass-panel border border-[var(--panel-border)]/40 bg-background/80 shadow-xl flex items-center gap-3",
1014
- children: [/* @__PURE__ */ K(L, { className: "w-4 h-4 animate-spin text-accent" }), /* @__PURE__ */ K("span", {
1045
+ children: [/* @__PURE__ */ W(I, { className: "w-4 h-4 animate-spin text-accent" }), /* @__PURE__ */ W("span", {
1015
1046
  className: "text-[12px] font-medium text-foreground/60 tracking-wide",
1016
1047
  children: "Loading form..."
1017
1048
  })]
1018
1049
  })
1019
1050
  }), document.body) : null;
1020
- let j = (C.fields || []).find((e) => e.type === "schedule" && e.look === "calendar"), M = j ? S(a[j.name]) : null, N = !!j && !M, P = j ? "max-w-[880px]" : "max-w-[500px]", F = /* @__PURE__ */ K("div", {
1051
+ let j = (C.fields || []).find((e) => e.type === "schedule" && e.look === "calendar"), M = j ? S(a[j.name]) : null, de = !!j && !M, N = j ? "max-w-[880px]" : "max-w-[500px]", P = /* @__PURE__ */ W("div", {
1021
1052
  className: "relative z-10 w-full",
1022
- children: l === "success" ? /* @__PURE__ */ q(k.div, {
1053
+ children: l === "success" ? /* @__PURE__ */ G(k.div, {
1023
1054
  initial: {
1024
1055
  opacity: 0,
1025
1056
  y: 10
@@ -1030,24 +1061,24 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1030
1061
  },
1031
1062
  className: "flex flex-col items-center justify-center py-8 text-center",
1032
1063
  children: [
1033
- /* @__PURE__ */ K("div", {
1064
+ /* @__PURE__ */ W("div", {
1034
1065
  className: "w-16 h-16 rounded-full bg-green-500/10 border border-green-500/20 flex items-center justify-center text-green-500 mb-4",
1035
- children: /* @__PURE__ */ K(ne, { className: "w-8 h-8" })
1066
+ children: /* @__PURE__ */ W(ne, { className: "w-8 h-8" })
1036
1067
  }),
1037
- /* @__PURE__ */ K("h4", {
1068
+ /* @__PURE__ */ W("h4", {
1038
1069
  className: "text-lg font-bold text-foreground mb-2",
1039
1070
  children: "Message Sent!"
1040
1071
  }),
1041
- /* @__PURE__ */ K("p", {
1072
+ /* @__PURE__ */ W("p", {
1042
1073
  className: "text-[14px] text-foreground/60 leading-relaxed",
1043
1074
  children: "Thank you for your interest. We'll get back to you shortly."
1044
1075
  }),
1045
- v && /* @__PURE__ */ q("p", {
1076
+ v && /* @__PURE__ */ G("p", {
1046
1077
  className: "text-[14px] font-semibold text-foreground mt-3",
1047
1078
  children: ["Booked: ", v]
1048
1079
  })
1049
1080
  ]
1050
- }) : l === "loading" ? /* @__PURE__ */ q(k.div, {
1081
+ }) : l === "loading" ? /* @__PURE__ */ G(k.div, {
1051
1082
  initial: {
1052
1083
  opacity: 0,
1053
1084
  scale: .95
@@ -1058,28 +1089,28 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1058
1089
  },
1059
1090
  className: "flex flex-col items-center justify-center py-16 text-center",
1060
1091
  children: [
1061
- /* @__PURE__ */ K(L, { className: "w-10 h-10 animate-spin text-accent mb-4" }),
1062
- /* @__PURE__ */ K("h4", {
1092
+ /* @__PURE__ */ W(I, { className: "w-10 h-10 animate-spin text-accent mb-4" }),
1093
+ /* @__PURE__ */ W("h4", {
1063
1094
  className: "text-lg font-bold text-foreground tracking-tight",
1064
1095
  children: "Processing"
1065
1096
  }),
1066
- /* @__PURE__ */ K("p", {
1097
+ /* @__PURE__ */ W("p", {
1067
1098
  className: "text-[13px] text-foreground/50 mt-1",
1068
1099
  children: "Please wait a moment..."
1069
1100
  })
1070
1101
  ]
1071
- }) : /* @__PURE__ */ q(G, { children: [
1072
- /* @__PURE__ */ q("div", {
1102
+ }) : /* @__PURE__ */ G(U, { children: [
1103
+ /* @__PURE__ */ G("div", {
1073
1104
  className: "mb-6 text-center",
1074
- children: [/* @__PURE__ */ K("h3", {
1105
+ children: [/* @__PURE__ */ W("h3", {
1075
1106
  className: "text-2xl sm:text-3xl font-extrabold mb-2 text-foreground tracking-tight break-words",
1076
1107
  children: C.title
1077
- }), C.description && /* @__PURE__ */ K("p", {
1108
+ }), C.description && /* @__PURE__ */ W("p", {
1078
1109
  className: "text-[14px] md:text-[15px] font-medium text-foreground/60 tracking-wide leading-relaxed",
1079
1110
  children: C.description
1080
1111
  })]
1081
1112
  }),
1082
- l === "error" && /* @__PURE__ */ q(k.div, {
1113
+ l === "error" && /* @__PURE__ */ G(k.div, {
1083
1114
  initial: {
1084
1115
  opacity: 0,
1085
1116
  y: -10
@@ -1089,22 +1120,22 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1089
1120
  y: 0
1090
1121
  },
1091
1122
  className: "mb-4 p-3 sm:p-4 rounded-xl bg-red-500/10 border border-red-500/20 flex items-start gap-3",
1092
- children: [/* @__PURE__ */ K(re, { className: "w-5 h-5 text-red-500 shrink-0 mt-0.5" }), /* @__PURE__ */ K("p", {
1123
+ children: [/* @__PURE__ */ W(re, { className: "w-5 h-5 text-red-500 shrink-0 mt-0.5" }), /* @__PURE__ */ W("p", {
1093
1124
  className: "text-[14px] font-medium text-red-500/90",
1094
1125
  children: d
1095
1126
  })]
1096
1127
  }),
1097
- /* @__PURE__ */ q("form", {
1128
+ /* @__PURE__ */ G("form", {
1098
1129
  onSubmit: se,
1099
1130
  className: "flex flex-col gap-4 sm:gap-5 w-full",
1100
1131
  children: [
1101
- j && (M ? /* @__PURE__ */ q("div", {
1132
+ j && (M ? /* @__PURE__ */ G("div", {
1102
1133
  className: "flex items-center justify-between gap-3 rounded-xl px-4 py-3 glass-panel",
1103
1134
  style: { borderRadius: "var(--input-radius, 0.75rem)" },
1104
- children: [/* @__PURE__ */ K("span", {
1135
+ children: [/* @__PURE__ */ W("span", {
1105
1136
  className: "text-[14px] font-semibold text-foreground truncate",
1106
1137
  children: ee(M, ue(M, te())?.memberName || "", h)
1107
- }), /* @__PURE__ */ K("button", {
1138
+ }), /* @__PURE__ */ W("button", {
1108
1139
  type: "button",
1109
1140
  onClick: () => c((e) => ({
1110
1141
  ...e,
@@ -1113,7 +1144,7 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1113
1144
  className: "text-[12.5px] font-bold text-accent hover:underline shrink-0 cursor-pointer",
1114
1145
  children: "Change"
1115
1146
  })]
1116
- }) : /* @__PURE__ */ K(_t, {
1147
+ }) : /* @__PURE__ */ W(kt, {
1117
1148
  field: j,
1118
1149
  value: a[j.name] || "",
1119
1150
  error: p[j.name],
@@ -1124,11 +1155,11 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1124
1155
  [j.name]: e
1125
1156
  }))
1126
1157
  })),
1127
- !N && [...C.fields || []].filter((e) => e !== j).sort((e, t) => {
1158
+ !de && [...C.fields || []].filter((e) => e !== j).sort((e, t) => {
1128
1159
  let n = e.type === "checkbox", r = t.type === "checkbox";
1129
1160
  return n && !r ? 1 : !n && r ? -1 : 0;
1130
1161
  }).map((e, t) => {
1131
- if (e.type === "schedule") return /* @__PURE__ */ K(_t, {
1162
+ if (e.type === "schedule") return /* @__PURE__ */ W(kt, {
1132
1163
  field: e,
1133
1164
  value: a[e.name] || "",
1134
1165
  error: p[e.name],
@@ -1144,9 +1175,9 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1144
1175
  });
1145
1176
  }
1146
1177
  }, t);
1147
- if (e.type === "tel") return /* @__PURE__ */ K(pe, {
1148
- fallback: /* @__PURE__ */ K("div", { className: "h-12 w-full glass-panel animate-pulse rounded-xl" }),
1149
- children: /* @__PURE__ */ K(ht, {
1178
+ if (e.type === "tel") return /* @__PURE__ */ W(he, {
1179
+ fallback: /* @__PURE__ */ W("div", { className: "h-12 w-full glass-panel animate-pulse rounded-xl" }),
1180
+ children: /* @__PURE__ */ W(Dt, {
1150
1181
  field: e,
1151
1182
  value: a[e.name] || "",
1152
1183
  onChange: (t) => c((n) => ({
@@ -1155,7 +1186,7 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1155
1186
  }))
1156
1187
  })
1157
1188
  }, t);
1158
- if (e.type === "file") return /* @__PURE__ */ K(xt, {
1189
+ if (e.type === "file") return /* @__PURE__ */ W(Nt, {
1159
1190
  field: e,
1160
1191
  value: a[e.name] || "",
1161
1192
  error: p[e.name],
@@ -1169,12 +1200,12 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1169
1200
  });
1170
1201
  }
1171
1202
  }, t);
1172
- if (e.type === "textarea") return /* @__PURE__ */ q("div", {
1203
+ if (e.type === "textarea") return /* @__PURE__ */ G("div", {
1173
1204
  className: "flex flex-col w-full relative",
1174
- children: [/* @__PURE__ */ K("label", {
1205
+ children: [/* @__PURE__ */ W("label", {
1175
1206
  className: "text-[13px] font-medium text-foreground/50 select-none mb-1.5 ml-1",
1176
1207
  children: e.label
1177
- }), /* @__PURE__ */ K("textarea", {
1208
+ }), /* @__PURE__ */ W("textarea", {
1178
1209
  required: e.required,
1179
1210
  rows: 3,
1180
1211
  placeholder: e.placeholder,
@@ -1186,15 +1217,15 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1186
1217
  className: "flex w-full rounded-xl text-[15px] text-foreground px-4 py-3 transition-all duration-300 placeholder:text-foreground/40 focus:outline-none focus:border-accent glow-focus disabled:cursor-not-allowed disabled:opacity-50 glass-panel min-h-[100px] resize-none"
1187
1218
  })]
1188
1219
  }, t);
1189
- if (e.type === "select") return /* @__PURE__ */ K("div", {
1220
+ if (e.type === "select") return /* @__PURE__ */ W("div", {
1190
1221
  className: "w-full",
1191
- children: /* @__PURE__ */ K(o, {
1222
+ children: /* @__PURE__ */ W(o, {
1192
1223
  label: e.label,
1193
1224
  direction: "auto",
1194
1225
  value: a[e.name] || "",
1195
1226
  options: [{
1196
1227
  value: "",
1197
- label: /* @__PURE__ */ K("span", {
1228
+ label: /* @__PURE__ */ W("span", {
1198
1229
  className: "text-foreground/40",
1199
1230
  children: "Select an option..."
1200
1231
  })
@@ -1208,11 +1239,11 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1208
1239
  }))
1209
1240
  })
1210
1241
  }, t);
1211
- if (e.type === "checkbox") return /* @__PURE__ */ q("label", {
1242
+ if (e.type === "checkbox") return /* @__PURE__ */ G("label", {
1212
1243
  className: "flex items-center gap-3 w-full cursor-pointer group py-2",
1213
- children: [/* @__PURE__ */ q("div", {
1244
+ children: [/* @__PURE__ */ G("div", {
1214
1245
  className: "relative flex items-center justify-center w-5 h-5 rounded border border-foreground/20 bg-background/50 group-hover:border-accent transition-colors",
1215
- children: [/* @__PURE__ */ K("input", {
1246
+ children: [/* @__PURE__ */ W("input", {
1216
1247
  type: "checkbox",
1217
1248
  required: e.required,
1218
1249
  checked: !!a[e.name],
@@ -1221,22 +1252,22 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1221
1252
  [e.name]: t.target.checked
1222
1253
  })),
1223
1254
  className: "absolute opacity-0 w-full h-full cursor-pointer"
1224
- }), a[e.name] && /* @__PURE__ */ K("span", { className: "w-2.5 h-2.5 bg-accent rounded-sm shrink-0" })]
1225
- }), /* @__PURE__ */ K("span", {
1255
+ }), a[e.name] && /* @__PURE__ */ W("span", { className: "w-2.5 h-2.5 bg-accent rounded-sm shrink-0" })]
1256
+ }), /* @__PURE__ */ W("span", {
1226
1257
  className: "text-[14px] font-medium text-foreground/80 leading-snug group-hover:text-foreground transition-colors",
1227
1258
  children: e.label
1228
1259
  })]
1229
1260
  }, t);
1230
1261
  if (e.type === "date") {
1231
1262
  let n = a[e.name] || "";
1232
- return /* @__PURE__ */ q("div", {
1263
+ return /* @__PURE__ */ G("div", {
1233
1264
  className: "flex flex-col w-full relative",
1234
- children: [/* @__PURE__ */ K("label", {
1265
+ children: [/* @__PURE__ */ W("label", {
1235
1266
  className: "text-[13px] font-medium text-foreground/50 select-none mb-1.5 ml-1",
1236
1267
  children: e.label
1237
- }), /* @__PURE__ */ q("div", {
1268
+ }), /* @__PURE__ */ G("div", {
1238
1269
  className: "relative flex items-center",
1239
- children: [/* @__PURE__ */ K("input", {
1270
+ children: [/* @__PURE__ */ W("input", {
1240
1271
  type: "date",
1241
1272
  required: e.required,
1242
1273
  value: n,
@@ -1246,11 +1277,11 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1246
1277
  })),
1247
1278
  className: `date-field block h-12 w-full text-[15px] pl-4 pr-11 py-2 transition-all duration-300 focus:outline-none focus:border-accent glow-focus disabled:cursor-not-allowed disabled:opacity-50 glass-panel ${n ? "text-foreground" : "text-foreground/40"}`,
1248
1279
  style: { borderRadius: "var(--input-radius, 0.75rem)" }
1249
- }), /* @__PURE__ */ K(oe, { className: "w-4 h-4 text-foreground/50 absolute right-4 pointer-events-none" })]
1280
+ }), /* @__PURE__ */ W(oe, { className: "w-4 h-4 text-foreground/50 absolute right-4 pointer-events-none" })]
1250
1281
  })]
1251
1282
  }, t);
1252
1283
  }
1253
- return e.type === "age" ? /* @__PURE__ */ K(X, {
1284
+ return e.type === "age" ? /* @__PURE__ */ W(X, {
1254
1285
  label: e.label,
1255
1286
  required: e.required,
1256
1287
  type: "number",
@@ -1272,17 +1303,17 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1272
1303
  }));
1273
1304
  }
1274
1305
  }
1275
- }, t) : e.type === "currency" || e.type === "number" && e.name === "budget" ? /* @__PURE__ */ q("div", {
1306
+ }, t) : e.type === "currency" || e.type === "number" && e.name === "budget" ? /* @__PURE__ */ G("div", {
1276
1307
  className: "flex flex-col w-full relative",
1277
- children: [/* @__PURE__ */ K("label", {
1308
+ children: [/* @__PURE__ */ W("label", {
1278
1309
  className: "text-[13px] font-medium text-foreground/50 select-none mb-1.5 ml-1",
1279
1310
  children: e.label
1280
- }), /* @__PURE__ */ q("div", {
1311
+ }), /* @__PURE__ */ G("div", {
1281
1312
  className: "relative flex items-center justify-center",
1282
- children: [/* @__PURE__ */ K("span", {
1313
+ children: [/* @__PURE__ */ W("span", {
1283
1314
  className: "absolute left-4 text-foreground/70 font-bold flex items-center h-full z-10 pointer-events-none text-[15px]",
1284
1315
  children: e.currencySymbol || "$"
1285
- }), /* @__PURE__ */ K("input", {
1316
+ }), /* @__PURE__ */ W("input", {
1286
1317
  required: e.required,
1287
1318
  type: "number",
1288
1319
  placeholder: e.placeholder,
@@ -1295,7 +1326,7 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1295
1326
  style: { borderRadius: "var(--input-radius, 0.75rem)" }
1296
1327
  })]
1297
1328
  })]
1298
- }, t) : /* @__PURE__ */ K(X, {
1329
+ }, t) : /* @__PURE__ */ W(X, {
1299
1330
  label: e.label,
1300
1331
  required: e.required,
1301
1332
  type: e.type,
@@ -1314,9 +1345,9 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1314
1345
  }
1315
1346
  }, t);
1316
1347
  }),
1317
- !N && /* @__PURE__ */ K("div", {
1348
+ !de && /* @__PURE__ */ W("div", {
1318
1349
  className: "pt-2",
1319
- children: /* @__PURE__ */ K(Z, {
1350
+ children: /* @__PURE__ */ W(Ze, {
1320
1351
  type: "submit",
1321
1352
  className: "w-full px-6 md:px-8 py-3 md:py-3.5 rounded-xl font-semibold tracking-wide btn-primary text-[15px] shadow-xl transition-all duration-300 hover:-translate-y-1 active:scale-95 flex items-center justify-center",
1322
1353
  isLoading: !1,
@@ -1327,16 +1358,16 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1327
1358
  })
1328
1359
  ] })
1329
1360
  });
1330
- return r ? /* @__PURE__ */ q("div", {
1361
+ return r ? /* @__PURE__ */ G("div", {
1331
1362
  className: "w-full flex justify-center flex-col items-center",
1332
- children: [/* @__PURE__ */ K("div", {
1333
- className: `w-full ${P} mb-6 px-2`,
1334
- children: /* @__PURE__ */ q("button", {
1363
+ children: [/* @__PURE__ */ W("div", {
1364
+ className: `w-full ${N} mb-6 px-2`,
1365
+ children: /* @__PURE__ */ G("button", {
1335
1366
  onClick: () => window.history.back(),
1336
1367
  className: "flex items-center gap-2 text-foreground/40 hover:text-foreground font-medium transition-colors w-fit group",
1337
- children: [/* @__PURE__ */ K(ce, { className: "w-4 h-4 group-hover:-translate-x-1 transition-transform" }), "Go Back"]
1368
+ children: [/* @__PURE__ */ W(ce, { className: "w-4 h-4 group-hover:-translate-x-1 transition-transform" }), "Go Back"]
1338
1369
  })
1339
- }), /* @__PURE__ */ q(k.div, {
1370
+ }), /* @__PURE__ */ G(k.div, {
1340
1371
  initial: {
1341
1372
  opacity: 0,
1342
1373
  y: 10
@@ -1345,18 +1376,18 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1345
1376
  opacity: 1,
1346
1377
  y: 0
1347
1378
  },
1348
- className: `w-full ${P} p-6 sm:p-8 lg:p-10 rounded-3xl md:rounded-3xl glass-form relative glow-hover shadow-[0_8px_32px_rgba(0,0,0,0.08)] z-10 mx-auto`,
1349
- children: [/* @__PURE__ */ K("div", { className: "absolute -inset-[1px] bg-gradient-to-br from-[var(--primary-glow)] to-transparent opacity-30 blur-[20px] rounded-3xl md:rounded-3xl -z-10" }), F]
1379
+ className: `w-full ${N} p-6 sm:p-8 lg:p-10 rounded-3xl md:rounded-3xl glass-form relative glow-hover shadow-[0_8px_32px_rgba(0,0,0,0.08)] z-10 mx-auto`,
1380
+ children: [/* @__PURE__ */ W("div", { className: "absolute -inset-[1px] bg-gradient-to-br from-[var(--primary-glow)] to-transparent opacity-30 blur-[20px] rounded-3xl md:rounded-3xl -z-10" }), P]
1350
1381
  })]
1351
- }) : De(/* @__PURE__ */ q("div", {
1382
+ }) : ke(/* @__PURE__ */ G("div", {
1352
1383
  className: "fixed inset-0 z-[100] flex items-start justify-center p-4 py-20 md:py-10 h-[-webkit-fill-available] md:h-screen w-screen overflow-y-auto no-scrollbar",
1353
- children: [/* @__PURE__ */ K(k.div, {
1384
+ children: [/* @__PURE__ */ W(k.div, {
1354
1385
  onClick: e,
1355
1386
  initial: { opacity: 0 },
1356
1387
  animate: { opacity: 1 },
1357
1388
  exit: { opacity: 0 },
1358
1389
  className: "fixed inset-0 bg-background/60 backdrop-blur-xl cursor-pointer"
1359
- }), /* @__PURE__ */ q(k.div, {
1390
+ }), /* @__PURE__ */ G(k.div, {
1360
1391
  initial: {
1361
1392
  opacity: 0,
1362
1393
  scale: .95,
@@ -1373,10 +1404,10 @@ function St({ onClose: e, formId: t, formConfig: n, isInline: r, onSubmitted: i
1373
1404
  y: 10
1374
1405
  },
1375
1406
  ref: x,
1376
- className: `w-full ${P} p-6 sm:p-8 lg:p-10 rounded-3xl md:rounded-3xl glass-popover relative shadow-[0_8px_32px_rgba(0,0,0,0.08)] z-10 mx-auto my-auto border border-[var(--panel-border)] shrink-0`,
1377
- children: [/* @__PURE__ */ K("div", { className: "absolute -inset-[1px] bg-gradient-to-br from-[var(--primary-glow)] to-transparent opacity-30 blur-[20px] rounded-3xl md:rounded-3xl -z-10" }), F]
1407
+ className: `w-full ${N} p-6 sm:p-8 lg:p-10 rounded-3xl md:rounded-3xl glass-popover relative shadow-[0_8px_32px_rgba(0,0,0,0.08)] z-10 mx-auto my-auto border border-[var(--panel-border)] shrink-0`,
1408
+ children: [/* @__PURE__ */ W("div", { className: "absolute -inset-[1px] bg-gradient-to-br from-[var(--primary-glow)] to-transparent opacity-30 blur-[20px] rounded-3xl md:rounded-3xl -z-10" }), P]
1378
1409
  })]
1379
1410
  }), document.body);
1380
1411
  }
1381
1412
  //#endregion
1382
- export { Oe as C, J as S, Ie as _, tt as a, Y as b, Ze as c, nt as d, dt as f, X as g, Z as h, $ as i, Qe as l, Ye as m, mt as n, et as o, Xe as p, ut as r, pt as s, St as t, rt as u, Ne as v, ke as x, Pe as y };
1413
+ export { Fe as C, Ae as D, K as E, Be as S, je as T, Je as _, pt as a, J as b, Q as c, mt as d, Ct as f, X as g, Ze as h, $ as i, ut as l, ct as m, Et as n, ft as o, lt as p, St as r, Tt as s, Pt as t, ht as u, Ge as v, q as w, Ie as x, Ke as y };