@levo-so/site-runtime 0.3.15 → 0.3.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,16 +1,16 @@
1
1
  "use client";
2
- import { i as e, n as t } from "./dist-CEdznbFW.js";
3
- import { i as n, n as r, r as i } from "./LevoProvider-Bsjkcwc8.js";
2
+ import { i as e, n as t } from "./dist-CXoCodlj.js";
3
+ import { i as n, n as r, r as i } from "./LevoProvider-BkbKrvrI.js";
4
4
  import { t as a } from "./inlineCollectionTheme-CWcMCUti.js";
5
5
  import { t as o } from "./inlineBaseTheme-BB9e6h5f.js";
6
6
  import { a as s, c, d as l, f as u, i as d, l as f, n as p, o as m, r as h, s as g, t as _, u as v } from "./routes-CyKmkoRM.js";
7
7
  import { createLevoClient as y, getLevoError as b } from "@levo-so/core";
8
- import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
9
- import * as w from "react";
10
- import { Suspense as T, createContext as E, lazy as D, useCallback as O, useContext as k, useEffect as A, useLayoutEffect as j, useMemo as M, useRef as N, useState as P, useSyncExternalStore as F } from "react";
11
- import { Dialog as I } from "@base-ui/react/dialog";
12
- import { keepPreviousData as L, useMutation as R, useQuery as z, useQueryClient as B } from "@tanstack/react-query";
13
- import { ScriptOnce as V, redirect as ee, useRouterState as H } from "@tanstack/react-router";
8
+ import * as ee from "react";
9
+ import { Suspense as x, createContext as S, lazy as C, useCallback as w, useContext as T, useEffect as E, useLayoutEffect as D, useMemo as O, useRef as k, useState as A, useSyncExternalStore as j } from "react";
10
+ import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
11
+ import { Dialog as F } from "@base-ui/react/dialog";
12
+ import { keepPreviousData as I, useMutation as L, useQuery as R, useQueryClient as z } from "@tanstack/react-query";
13
+ import { ScriptOnce as B, redirect as V, useRouterState as H } from "@tanstack/react-router";
14
14
  import { createLevoInsights as te } from "@levo-so/insights";
15
15
  import { CheckIcon as ne, ChevronLeftIcon as U, ChevronRightIcon as re, LoaderCircle as ie, Tag as ae, X as oe, XIcon as se } from "lucide-react";
16
16
  import { useRazorpay as ce } from "react-razorpay";
@@ -169,7 +169,7 @@ var ue = [
169
169
  slug: n
170
170
  }) : t.module === "blog" ? await e.blog.getSingleBlog(t.identifier, n, { workspace_id: e.workspace ?? "" }) : await e.event.getSingleEvent(n, { workspace_id: e.workspace ?? "" })).content.data ?? null;
171
171
  }, Pe = async (e, t) => (await e.collection.getCollectionByIDExpanded(t.identifier)).content.data ?? null, Fe = (e) => {
172
- let t = i(), n = z({
172
+ let t = i(), n = R({
173
173
  queryKey: De(e),
174
174
  queryFn: () => Me(t, e),
175
175
  enabled: !!t
@@ -185,7 +185,7 @@ var ue = [
185
185
  }) }
186
186
  };
187
187
  }, Ie = (e, t) => {
188
- let n = i(), r = z({
188
+ let n = i(), r = R({
189
189
  queryKey: Oe(e, t),
190
190
  queryFn: () => Ne(n, e, t),
191
191
  enabled: !!n && !!t
@@ -200,7 +200,7 @@ var ue = [
200
200
  }) }
201
201
  };
202
202
  }, Le = (e) => {
203
- let t = i(), n = z({
203
+ let t = i(), n = R({
204
204
  queryKey: ke(e),
205
205
  queryFn: () => Pe(t, e),
206
206
  enabled: !!t
@@ -259,7 +259,7 @@ var ue = [
259
259
  input: "var(--color-background1)",
260
260
  inputForeground: "var(--color-ink)",
261
261
  ring: "var(--color-brand)"
262
- }, Ve = (e) => M(() => ({
262
+ }, Ve = (e) => O(() => ({
263
263
  ...o({
264
264
  colors: {
265
265
  ...Be,
@@ -276,13 +276,13 @@ var ue = [
276
276
  //#endregion
277
277
  //#region src/hooks/useMounted.ts
278
278
  function J() {
279
- let [e, t] = P(!1);
280
- return A(() => t(!0), []), e;
279
+ let [e, t] = A(!1);
280
+ return E(() => t(!0), []), e;
281
281
  }
282
282
  //#endregion
283
283
  //#region src/access/useLevoAuth.ts
284
284
  var Y = ["levo-auth", "session"], He = () => {
285
- let e = i(), t = B(), n = J(), r = z({
285
+ let e = i(), t = z(), n = J(), r = R({
286
286
  queryKey: Y,
287
287
  queryFn: async () => {
288
288
  try {
@@ -294,7 +294,7 @@ var Y = ["levo-auth", "session"], He = () => {
294
294
  enabled: n && !!e,
295
295
  staleTime: 3e4,
296
296
  retry: !1
297
- }), a = R({
297
+ }), a = L({
298
298
  mutationFn: async () => {
299
299
  await e?.membership?.signOut();
300
300
  },
@@ -302,9 +302,9 @@ var Y = ["levo-auth", "session"], He = () => {
302
302
  onError: (t) => {
303
303
  e?.logger?.error("Sign out failed", { exception: b(t) });
304
304
  }
305
- }), o = O(async () => {
305
+ }), o = w(async () => {
306
306
  await t.invalidateQueries({ queryKey: Y });
307
- }, [t]), s = O(async () => {
307
+ }, [t]), s = w(async () => {
308
308
  await a.mutateAsync().catch(() => void 0);
309
309
  }, [a]), c = r.data ?? null;
310
310
  return {
@@ -321,9 +321,9 @@ var Y = ["levo-auth", "session"], He = () => {
321
321
  module: "collection",
322
322
  identifier: e
323
323
  }), f = Ve(o);
324
- return c ? /* @__PURE__ */ S("div", {
324
+ return c ? /* @__PURE__ */ N("div", {
325
325
  className: s,
326
- children: /* @__PURE__ */ S(t, {
326
+ children: /* @__PURE__ */ N(t, {
327
327
  fetchedSchema: u,
328
328
  isLoading: d,
329
329
  submitButtonConfig: {
@@ -352,13 +352,13 @@ var Y = ["levo-auth", "session"], He = () => {
352
352
  "username",
353
353
  "socials"
354
354
  ], Ke = ["email", "username"], qe = (e) => Ge.includes(e.key) || e.editable === !0, Je = ({ hidden: t, submitLabel: n = "Save and continue", onSuccess: r, errorClassName: a = "text-sm text-[var(--color-danger)]", theme: o, className: s }) => {
355
- let c = i(), l = J(), { account: u } = He(), d = Ve(o), [f, p] = P(""), m = z({
355
+ let c = i(), l = J(), { account: u } = He(), d = Ve(o), [f, p] = A(""), m = R({
356
356
  queryKey: ["levo-access", "profile-schema"],
357
357
  queryFn: async () => (await c?.collection?.getCollectionByIDExpanded(We))?.content?.data ?? null,
358
358
  enabled: l && !!c,
359
359
  staleTime: 5 * 6e4,
360
360
  retry: 1
361
- }), h = t?.join("|") ?? "", g = M(() => {
361
+ }), h = t?.join("|") ?? "", g = O(() => {
362
362
  let e = m.data;
363
363
  return e ? {
364
364
  ...e,
@@ -371,7 +371,7 @@ var Y = ["levo-auth", "session"], He = () => {
371
371
  }))
372
372
  }))
373
373
  } : null;
374
- }, [m.data, h]), _ = R({
374
+ }, [m.data, h]), _ = L({
375
375
  mutationFn: async (e) => {
376
376
  let n = g?.sections?.flatMap((e) => e?.fields ?? [])?.filter((e) => qe(e) && !Ke.includes(e.key) && !t?.includes(e.key))?.map((e) => e?.key) ?? [];
377
377
  await c?.membership?.updateMe(Object.fromEntries(Object.entries(e).filter(([e]) => n.includes(e))));
@@ -383,12 +383,12 @@ var Y = ["levo-auth", "session"], He = () => {
383
383
  c?.logger?.error("Failed to update profile", { exception: t }), p(t?.message || "Something went wrong. Please try again.");
384
384
  }
385
385
  });
386
- return c ? /* @__PURE__ */ C("div", {
386
+ return c ? /* @__PURE__ */ P("div", {
387
387
  className: s,
388
- children: [f ? /* @__PURE__ */ S("p", {
388
+ children: [f ? /* @__PURE__ */ N("p", {
389
389
  className: a,
390
390
  children: f
391
- }) : null, g ? /* @__PURE__ */ S(e, {
391
+ }) : null, g ? /* @__PURE__ */ N(e, {
392
392
  schema: g,
393
393
  initialValues: u ?? {},
394
394
  uiConfig: {
@@ -411,22 +411,22 @@ var Y = ["levo-auth", "session"], He = () => {
411
411
  }
412
412
  }, Qe = (e) => (Xe.add(e), () => {
413
413
  Xe.delete(e);
414
- }), $e = () => F(Qe, () => Ye, () => null), et = (e) => {
415
- let t = i(), n = B(), r = J(), { isLoggedIn: a, isLoaded: o } = He(), s = $e(), c = e.id?.trim() || "", { rules: l, invalid: u } = M(() => ve(e.access), [e.access]), d = M(() => ye(l), [l]), f = r && !!t && l.length > 0 && !u && !!c && a && !s, p = z({
414
+ }), $e = () => j(Qe, () => Ye, () => null), et = (e) => {
415
+ let t = i(), n = z(), r = J(), { isLoggedIn: a, isLoaded: o } = He(), s = $e(), c = e.id?.trim() || "", { rules: l, invalid: u } = O(() => ve(e.access), [e.access]), d = O(() => ye(l), [l]), f = r && !!t && l.length > 0 && !u && !!c && a && !s, p = R({
416
416
  queryKey: ["levo-access", c],
417
417
  queryFn: async () => (await t?.fetch.url(`/v1/builder/page/${c}/check-access`).post().json())?.content?.data ?? null,
418
418
  enabled: f,
419
419
  staleTime: 0,
420
420
  retry: 1
421
421
  });
422
- A(() => {
422
+ E(() => {
423
423
  p.isError && t?.logger?.error("Page access check failed", { exception: b(p.error) });
424
424
  }, [
425
425
  p.isError,
426
426
  p.error,
427
427
  t
428
428
  ]);
429
- let m = O(() => {
429
+ let m = w(() => {
430
430
  n.invalidateQueries({ queryKey: Y }), n.invalidateQueries({ queryKey: ["levo-access", c] });
431
431
  }, [n, c]);
432
432
  return {
@@ -464,7 +464,7 @@ var Y = ["levo-auth", "session"], He = () => {
464
464
  fieldErrors: {},
465
465
  isPendingApproval: !1
466
466
  }, at = () => {
467
- let e = i(), t = B(), n = O(async (t, n) => {
467
+ let e = i(), t = z(), n = w(async (t, n) => {
468
468
  if (!e?.membership) return {
469
469
  ok: !1,
470
470
  error: it
@@ -481,18 +481,18 @@ var Y = ["levo-auth", "session"], He = () => {
481
481
  error: rt(r)
482
482
  };
483
483
  }
484
- }, [e]), r = O(async ({ identifier: t, medium: n }) => {
484
+ }, [e]), r = w(async ({ identifier: t, medium: n }) => {
485
485
  await e?.membership?.requestOtp({
486
486
  content: t,
487
487
  ...n === "whatsapp" ? { medium: "whatsapp" } : {}
488
488
  });
489
- }, [e]), a = R({ mutationFn: (e) => n("Failed to send verification code", () => r(e)) }), o = R({ mutationFn: (e) => n("Failed to resend verification code", () => r(e)) }), s = R({ mutationFn: ({ identifier: r, code: i }) => n("Verification failed", async () => {
489
+ }, [e]), a = L({ mutationFn: (e) => n("Failed to send verification code", () => r(e)) }), o = L({ mutationFn: (e) => n("Failed to resend verification code", () => r(e)) }), s = L({ mutationFn: ({ identifier: r, code: i }) => n("Verification failed", async () => {
490
490
  let n = await e?.membership?.signInWithOtp({
491
491
  content: r,
492
492
  code: i
493
493
  }) ?? null;
494
494
  return t.setQueryData(Y, n), t.invalidateQueries({ queryKey: Y }), n;
495
- }) }), c = R({ mutationFn: (t) => n("Failed to send magic link", async () => {
495
+ }) }), c = L({ mutationFn: (t) => n("Failed to send magic link", async () => {
496
496
  await e?.membership?.requestMagicLink({ content: t });
497
497
  }) });
498
498
  return {
@@ -509,7 +509,7 @@ var Y = ["levo-auth", "session"], He = () => {
509
509
  let n = window.screenX + (window.outerWidth - st) / 2, r = window.screenY + (window.outerHeight - ct) / 2.5;
510
510
  return window.open(e, t, `width=${st},height=${ct},left=${n},top=${r}`);
511
511
  }, ut = ({ methods: e, title: t = "Sign in", onSuccess: n, onError: r }) => {
512
- let a = i(), o = B(), s = J(), [c, l] = P(null), [u, d] = P(null), f = N(null), p = N(void 0), m = N({
512
+ let a = i(), o = z(), s = J(), [c, l] = A(null), [u, d] = A(null), f = k(null), p = k(void 0), m = k({
513
513
  onSuccess: n,
514
514
  onError: r
515
515
  });
@@ -517,14 +517,14 @@ var Y = ["levo-auth", "session"], He = () => {
517
517
  onSuccess: n,
518
518
  onError: r
519
519
  };
520
- let h = z({
520
+ let h = R({
521
521
  queryKey: ["levo-auth", "oauth-urls"],
522
522
  queryFn: async () => await a?.membership?.getOAuthURL() ?? null,
523
523
  enabled: s && !!a && e.length > 0,
524
524
  staleTime: 5 * 6e4,
525
525
  retry: !1
526
526
  });
527
- A(() => {
527
+ E(() => {
528
528
  if (!h.error) return;
529
529
  let e = b(h.error);
530
530
  a?.logger?.error("Failed to load OAuth URLs", { exception: e }), d({
@@ -535,13 +535,13 @@ var Y = ["levo-auth", "session"], He = () => {
535
535
  isPendingApproval: !1
536
536
  });
537
537
  }, [h.error, a]);
538
- let g = O(() => {
538
+ let g = w(() => {
539
539
  window.clearInterval(p.current), p.current = void 0, f.current?.close(), f.current = null, l(null);
540
540
  }, []);
541
- A(() => () => {
541
+ E(() => () => {
542
542
  window.clearInterval(p.current), f.current?.close();
543
543
  }, []);
544
- let _ = O(() => {
544
+ let _ = w(() => {
545
545
  window.clearInterval(p.current), p.current = window.setInterval(() => {
546
546
  let e = f.current;
547
547
  if (!e || e.closed) {
@@ -569,7 +569,7 @@ var Y = ["levo-auth", "session"], He = () => {
569
569
  };
570
570
  r.isPendingApproval || d(r), m.current.onError?.(r);
571
571
  }, ot);
572
- }, [o, g]), v = M(() => {
572
+ }, [o, g]), v = O(() => {
573
573
  let e = h.data;
574
574
  if (!e || typeof window > "u") return {};
575
575
  let t = window.location.href, n = a?.pageContext;
@@ -584,7 +584,7 @@ var Y = ["levo-auth", "session"], He = () => {
584
584
  }));
585
585
  }, [h.data, a]);
586
586
  return {
587
- providers: M(() => e.filter((e) => !!v[e]).map((e) => ({
587
+ providers: O(() => e.filter((e) => !!v[e]).map((e) => ({
588
588
  provider: e,
589
589
  signIn: () => {
590
590
  let n = v[e];
@@ -611,26 +611,26 @@ var Y = ["levo-auth", "session"], He = () => {
611
611
  isLoading: h.isFetching,
612
612
  pendingProvider: c,
613
613
  error: u,
614
- clearError: O(() => d(null), [])
614
+ clearError: w(() => d(null), [])
615
615
  };
616
616
  }, dt = 4, ft = (e) => /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(e.trim()), pt = (e) => RegExp("^\\d{4}$").test(e.trim()), mt = (e) => {
617
617
  let t = e.replace(/\D/g, "").replace(/^0+/, "");
618
618
  return t ? `+${t}` : "";
619
619
  }, ht = (e) => /^\+[1-9]\d{7,14}$/.test(mt(e)), gt = ({ value: e, onChange: t, length: n = 4, onComplete: r, autoFocus: i, disabled: a }) => {
620
- let o = N([]), [s, c] = P(null), l = N(r);
620
+ let o = k([]), [s, c] = A(null), l = k(r);
621
621
  l.current = r;
622
- let u = Array.from({ length: n }, (t, n) => e[n] ?? ""), d = O((e) => {
622
+ let u = Array.from({ length: n }, (t, n) => e[n] ?? ""), d = w((e) => {
623
623
  let t = Math.max(0, Math.min(n - 1, e)), r = o.current[t];
624
624
  r?.focus(), r?.select();
625
625
  }, [n]);
626
- A(() => {
626
+ E(() => {
627
627
  i && !a && d(0);
628
628
  }, [
629
629
  i,
630
630
  a,
631
631
  d
632
632
  ]);
633
- let f = O((e, r) => {
633
+ let f = w((e, r) => {
634
634
  let i = e.slice(0, n);
635
635
  t(i), d(r), i.length === n && l.current?.(i);
636
636
  }, [
@@ -698,13 +698,13 @@ var Y = ["levo-auth", "session"], He = () => {
698
698
  role: "group",
699
699
  "aria-label": `${n}-digit verification code`
700
700
  },
701
- clear: O(() => f("", 0), [f])
701
+ clear: w(() => f("", 0), [f])
702
702
  };
703
- }, _t = D(() => import("./kbChat-a2dXSeRc.js")), vt = ({ site: e, path: t }) => {
703
+ }, _t = C(() => import("./kbChat-DtZ4vuCZ.js")), vt = ({ site: e, path: t }) => {
704
704
  let n = J(), r = e.workspace_id || void 0;
705
- return !n || !r ? null : /* @__PURE__ */ S(T, {
705
+ return !n || !r ? null : /* @__PURE__ */ N(x, {
706
706
  fallback: null,
707
- children: /* @__PURE__ */ S(_t, {
707
+ children: /* @__PURE__ */ N(_t, {
708
708
  workspaceId: r,
709
709
  siteName: e.name || void 0,
710
710
  siteLogo: void 0,
@@ -729,27 +729,27 @@ var Y = ["levo-auth", "session"], He = () => {
729
729
  function St(e, t) {
730
730
  return `(function(){try{var t=localStorage.getItem(${JSON.stringify(e)});if(t!=='light'&&t!=='dark'&&t!=='system'){t=${JSON.stringify(t)}}var d=matchMedia('${yt}').matches;var r=t==='system'?(d?'dark':'light'):t;var e=document.documentElement;e.classList.remove('light','dark');e.classList.add(r);e.style.colorScheme=r}catch(e){}})();`;
731
731
  }
732
- var Ct = E(void 0), wt = (e) => e === "system" ? window.matchMedia(yt).matches ? "dark" : "light" : e;
732
+ var Ct = S(void 0), wt = (e) => e === "system" ? window.matchMedia(yt).matches ? "dark" : "light" : e;
733
733
  function Tt(e) {
734
734
  let t = document.documentElement;
735
735
  t.classList.remove("light", "dark"), t.classList.add(e), t.style.colorScheme = e;
736
736
  }
737
737
  var Et = ({ children: e, defaultMode: t = "system", storageKey: n = "color-mode" }) => {
738
- let [r, i] = P(t), [a, o] = P(t === "dark" ? "dark" : "light"), s = J();
739
- return A(() => {
738
+ let [r, i] = A(t), [a, o] = A(t === "dark" ? "dark" : "light"), s = J();
739
+ return E(() => {
740
740
  i(bt(n) ?? t);
741
- }, [t, n]), A(() => {
741
+ }, [t, n]), E(() => {
742
742
  if (!s) return;
743
743
  let e = wt(r);
744
744
  Tt(e), o(e);
745
- }, [r, s]), A(() => {
745
+ }, [r, s]), E(() => {
746
746
  if (!s || r !== "system") return;
747
747
  let e = window.matchMedia(yt), t = () => {
748
748
  let t = e.matches ? "dark" : "light";
749
749
  Tt(t), o(t);
750
750
  };
751
751
  return e.addEventListener("change", t), () => e.removeEventListener("change", t);
752
- }, [r, s]), /* @__PURE__ */ C(Ct.Provider, {
752
+ }, [r, s]), /* @__PURE__ */ P(Ct.Provider, {
753
753
  value: {
754
754
  mode: r,
755
755
  resolvedMode: a,
@@ -757,11 +757,11 @@ var Et = ({ children: e, defaultMode: t = "system", storageKey: n = "color-mode"
757
757
  xt(n, e), i(e);
758
758
  }
759
759
  },
760
- children: [/* @__PURE__ */ S(V, { children: St(n, t) }), e]
760
+ children: [/* @__PURE__ */ N(B, { children: St(n, t) }), e]
761
761
  });
762
762
  };
763
763
  function Dt() {
764
- let e = k(Ct);
764
+ let e = T(Ct);
765
765
  if (e === void 0) throw Error("useColorMode must be used within a ColorModeProvider");
766
766
  return e;
767
767
  }
@@ -769,10 +769,10 @@ function Dt() {
769
769
  //#region src/form/LevoForm.tsx
770
770
  var Ot = ({ source: e, submitLabel: n = "Submit", hiddenFields: r, formVariant: a = "default", successConfig: o, theme: s, className: c, defaultValues: l, disabled: u, showSuccessScreen: d = !0, onSuccess: f, onError: p }) => {
771
771
  let m = i(), { schema: h, isLoading: g, bind: _ } = Le(e), v = Ve(s);
772
- return m ? /* @__PURE__ */ S("div", {
772
+ return m ? /* @__PURE__ */ N("div", {
773
773
  ..._,
774
774
  className: c,
775
- children: /* @__PURE__ */ S(t, {
775
+ children: /* @__PURE__ */ N(t, {
776
776
  fetchedSchema: h,
777
777
  isLoading: g,
778
778
  submitButtonConfig: {
@@ -1121,7 +1121,7 @@ var Ot = ({ source: e, submitLabel: n = "Submit", hiddenFields: r, formVariant:
1121
1121
  }
1122
1122
  }, bn = (e) => (vn.add(e), () => {
1123
1123
  vn.delete(e);
1124
- }), xn = () => F(bn, () => _n, () => !1), Sn = (e) => {
1124
+ }), xn = () => j(bn, () => _n, () => !1), Sn = (e) => {
1125
1125
  let { channel: t, originals: n, staged: r } = e, i = t.send, a = null;
1126
1126
  return { onMessage: (o) => {
1127
1127
  let s = o.data;
@@ -1499,7 +1499,7 @@ var Ot = ({ source: e, submitLabel: n = "Submit", hiddenFields: r, formVariant:
1499
1499
  };
1500
1500
  }, Pn = "2026-07-24g · element-capture + region-drag + region-highlights (stale-region guard)";
1501
1501
  function Fn() {
1502
- return A(() => In(), []), null;
1502
+ return E(() => In(), []), null;
1503
1503
  }
1504
1504
  function In() {
1505
1505
  let e = !1, t = null, n = null, r = !1, i = null, a = Cn(), o = hn(), { overlay: s, label: c, ring: l, ringLabel: u } = Zt();
@@ -1531,95 +1531,95 @@ function In() {
1531
1531
  m = e, _();
1532
1532
  }, y = () => {
1533
1533
  m.length !== 0 && (m = [], _());
1534
- }, b = null, x = (e) => {
1534
+ }, b = null, ee = (e) => {
1535
1535
  e && !b ? (b = document.createElement("style"), b.id = "studio-pick-cursor", b.textContent = "*,*::before,*::after{cursor:crosshair !important}", document.head.appendChild(b)) : !e && b && (b.remove(), b = null);
1536
- }, S = (e) => !e || p.includes(e) || e === document.body || e === document.documentElement, C = (e) => {
1537
- if (!e || S(e)) return null;
1536
+ }, x = (e) => !e || p.includes(e) || e === document.body || e === document.documentElement, S = (e) => {
1537
+ if (!e || x(e)) return null;
1538
1538
  let t = Z(e) ? e : e.closest("[data-tsd-source]");
1539
- return !t || S(t) || !tn(t) ? null : t;
1540
- }, w = (e) => Qt(s, c, e), T = () => {
1539
+ return !t || x(t) || !tn(t) ? null : t;
1540
+ }, C = (e) => Qt(s, c, e), w = () => {
1541
1541
  if (n) {
1542
1542
  if (!n.isConnected) {
1543
- P();
1543
+ N();
1544
1544
  return;
1545
1545
  }
1546
1546
  Qt(l, u, n);
1547
1547
  }
1548
- }, E = 0, D = () => {
1549
- E || !n || r || (E = requestAnimationFrame(() => {
1550
- E = 0, T();
1548
+ }, T = 0, E = () => {
1549
+ T || !n || r || (T = requestAnimationFrame(() => {
1550
+ T = 0, w();
1551
1551
  }));
1552
- }, O = new ResizeObserver(D), k = new MutationObserver((e) => {
1552
+ }, D = new ResizeObserver(E), O = new MutationObserver((e) => {
1553
1553
  for (let t of e) {
1554
1554
  let e = t.target;
1555
1555
  if (!p.some((t) => t === e) && !(t.type === "attributes" && t.attributeName === "data-staged-key")) {
1556
- D(), R.scheduleReapply();
1556
+ E(), L.scheduleReapply();
1557
1557
  return;
1558
1558
  }
1559
1559
  }
1560
- }), A = !1, j = () => {
1561
- A ||= (k.observe(document.documentElement, {
1560
+ }), k = !1, A = () => {
1561
+ k ||= (O.observe(document.documentElement, {
1562
1562
  attributes: !0,
1563
1563
  childList: !0,
1564
1564
  characterData: !0,
1565
1565
  subtree: !0
1566
1566
  }), !0);
1567
+ }, j = () => {
1568
+ k &&= (O.disconnect(), !1);
1567
1569
  }, M = () => {
1568
- A &&= (k.disconnect(), !1);
1570
+ D.disconnect(), n?.isConnected && (D.observe(n), A());
1569
1571
  }, N = () => {
1570
- O.disconnect(), n?.isConnected && (O.observe(n), j());
1571
- }, P = () => {
1572
- n = null, O.disconnect(), z(), E &&= (cancelAnimationFrame(E), 0), l.style.display = "none", u.style.display = "none", y(), g();
1573
- }, F = (e) => w(e), I = () => {
1572
+ n = null, D.disconnect(), R(), T &&= (cancelAnimationFrame(T), 0), l.style.display = "none", u.style.display = "none", y(), g();
1573
+ }, P = (e) => C(e), F = () => {
1574
1574
  s.style.display = "none", c.style.display = "none";
1575
- }, L = Nn({
1575
+ }, I = Nn({
1576
1576
  channel: o,
1577
1577
  originals: a,
1578
1578
  clearTextHover: () => {
1579
- i = null, I();
1579
+ i = null, F();
1580
1580
  }
1581
- }), R = Mn({
1581
+ }), L = Mn({
1582
1582
  originals: a,
1583
- editingNode: L.editingNode
1584
- }), z = () => {
1585
- n?.isConnected || R.count() ? j() : M();
1586
- }, B = (n) => {
1587
- n && r && V(!1), e = !!n, x(e), e || (t = null, s.style.display = "none", c.style.display = "none", W()), o.send({
1583
+ editingNode: I.editingNode
1584
+ }), R = () => {
1585
+ n?.isConnected || L.count() ? A() : j();
1586
+ }, z = (n) => {
1587
+ n && r && B(!1), e = !!n, ee(e), e || (t = null, s.style.display = "none", c.style.display = "none", W()), o.send({
1588
1588
  type: "inspect-state",
1589
1589
  enabled: e
1590
1590
  });
1591
- }, V = (t) => {
1591
+ }, B = (t) => {
1592
1592
  if (r = !!t, r) {
1593
- e && B(!1), l.style.display = "none", u.style.display = "none";
1593
+ e && z(!1), l.style.display = "none", u.style.display = "none";
1594
1594
  for (let e of f) e.style.display = "none";
1595
- } else L.commitIfEditing(), I(), document.documentElement.style.cursor = "", n && T(), m.length > 0 && _();
1595
+ } else I.commitIfEditing(), F(), document.documentElement.style.cursor = "", n && w(), m.length > 0 && _();
1596
1596
  o.send({
1597
1597
  type: "text-edit-state",
1598
1598
  enabled: r
1599
1599
  });
1600
- }, ee = 0, H = 0, te = 0, ne = () => {
1601
- ee = 0;
1600
+ }, V = 0, H = 0, te = 0, ne = () => {
1601
+ V = 0;
1602
1602
  let n = document.elementFromPoint(H, te);
1603
- if (!S(n)) {
1603
+ if (!x(n)) {
1604
1604
  if (r) {
1605
- let e = C(n);
1606
- if (e && e === L.editingNode()) {
1607
- i = null, I(), document.documentElement.style.cursor = "";
1605
+ let e = S(n);
1606
+ if (e && e === I.editingNode()) {
1607
+ i = null, F(), document.documentElement.style.cursor = "";
1608
1608
  return;
1609
1609
  }
1610
- i = e, document.documentElement.style.cursor = e ? "text" : "", e ? F(e) : I();
1610
+ i = e, document.documentElement.style.cursor = e ? "text" : "", e ? P(e) : F();
1611
1611
  return;
1612
1612
  }
1613
- e && (d.isDragging() || (t = n, n && w(n)));
1613
+ e && (d.isDragging() || (t = n, n && C(n)));
1614
1614
  }
1615
1615
  }, U = (t) => {
1616
- !e && !r || (H = t.clientX, te = t.clientY, ee ||= requestAnimationFrame(ne));
1616
+ !e && !r || (H = t.clientX, te = t.clientY, V ||= requestAnimationFrame(ne));
1617
1617
  }, re = 0, ie = () => {
1618
- re = 0, e && t && w(t), r && !L.editingNode() && i?.isConnected && F(i), n && !r && T(), m.length > 0 && !r && _();
1618
+ re = 0, e && t && C(t), r && !I.editingNode() && i?.isConnected && P(i), n && !r && w(), m.length > 0 && !r && _();
1619
1619
  }, ae = () => {
1620
1620
  re ||= requestAnimationFrame(ie);
1621
1621
  }, oe = (n) => {
1622
- n.relatedTarget || (e ? (t = null, s.style.display = "none", c.style.display = "none") : r && !L.editingNode() && (i = null, I(), document.documentElement.style.cursor = ""));
1622
+ n.relatedTarget || (e ? (t = null, s.style.display = "none", c.style.display = "none") : r && !I.editingNode() && (i = null, F(), document.documentElement.style.cursor = ""));
1623
1623
  }, se = !1, ce = null, le = () => {
1624
1624
  if (ce != null) {
1625
1625
  try {
@@ -1648,7 +1648,7 @@ function In() {
1648
1648
  le();
1649
1649
  let n = d.pointerUp();
1650
1650
  if (!n) return;
1651
- se = !0, P();
1651
+ se = !0, N();
1652
1652
  let { elements: r, nodes: i, truncated: a } = kn(n, p);
1653
1653
  console.info(`[levo-inspector] region drag: ${Math.round(n.width)}×${Math.round(n.height)} — ${r.length} element(s)${a ? " (truncated)" : ""}`), v(i);
1654
1654
  let s = ++h;
@@ -1678,12 +1678,12 @@ function In() {
1678
1678
  return;
1679
1679
  }
1680
1680
  if (r) {
1681
- let e = C(document.elementFromPoint(i.clientX, i.clientY) || i.target);
1682
- if (!e || e === L.editingNode()) {
1681
+ let e = S(document.elementFromPoint(i.clientX, i.clientY) || i.target);
1682
+ if (!e || e === I.editingNode()) {
1683
1683
  K(i);
1684
1684
  return;
1685
1685
  }
1686
- i.preventDefault(), i.stopPropagation(), i.stopImmediatePropagation(), L.startEdit(e);
1686
+ i.preventDefault(), i.stopPropagation(), i.stopImmediatePropagation(), I.startEdit(e);
1687
1687
  return;
1688
1688
  }
1689
1689
  if (!e) {
@@ -1692,32 +1692,32 @@ function In() {
1692
1692
  }
1693
1693
  i.preventDefault(), i.stopPropagation(), i.stopImmediatePropagation();
1694
1694
  let a = t || i.target;
1695
- if (S(a)) return;
1695
+ if (x(a)) return;
1696
1696
  let s = a.closest("[data-tsd-source]") || a;
1697
- y(), g(), n = s, T(), N(), o.send({
1697
+ y(), g(), n = s, w(), M(), o.send({
1698
1698
  type: "element-selected",
1699
1699
  element: an(s)
1700
1700
  });
1701
1701
  }, me = Sn({
1702
1702
  channel: o,
1703
1703
  originals: a,
1704
- staged: R,
1705
- setInspect: B,
1706
- setTextEdit: V,
1704
+ staged: L,
1705
+ setInspect: z,
1706
+ setTextEdit: B,
1707
1707
  isInspecting: () => e,
1708
1708
  isTextEditing: () => r,
1709
- editingNode: L.editingNode,
1709
+ editingNode: I.editingNode,
1710
1710
  setSelected: (e) => {
1711
- y(), g(), n = e, N();
1711
+ y(), g(), n = e, M();
1712
1712
  },
1713
1713
  selectedNode: () => n,
1714
- positionSelected: T,
1715
- clearSelection: P,
1716
- syncDomObserver: z,
1717
- positionHover: w,
1718
- hideTextHover: I,
1719
- startEditAtEnd: (e) => L.startEdit(e, !0),
1720
- editableTarget: C,
1714
+ positionSelected: w,
1715
+ clearSelection: N,
1716
+ syncDomObserver: R,
1717
+ positionHover: C,
1718
+ hideTextHover: F,
1719
+ startEditAtEnd: (e) => I.startEdit(e, !0),
1720
+ editableTarget: S,
1721
1721
  ownNodes: p
1722
1722
  }), he = [
1723
1723
  "mousedown",
@@ -1740,7 +1740,7 @@ function In() {
1740
1740
  ], ge = (t) => {
1741
1741
  e && (t.cancelable && t.preventDefault(), t.stopPropagation(), t.stopImmediatePropagation());
1742
1742
  }, _e = () => {
1743
- n && !r && T(), m.length > 0 && !r && _();
1743
+ n && !r && w(), m.length > 0 && !r && _();
1744
1744
  }, ve = () => {
1745
1745
  let e = location.pathname.replace(/\/$/, "") || "/";
1746
1746
  o.send({
@@ -1748,27 +1748,27 @@ function In() {
1748
1748
  route: e
1749
1749
  });
1750
1750
  }, ye = gn({ onPathChange: () => {
1751
- P(), ve();
1751
+ N(), ve();
1752
1752
  } }), be = (t) => {
1753
- if (L.editingNode()) return;
1753
+ if (I.editingNode()) return;
1754
1754
  if (t.key === "Escape") {
1755
1755
  if (e && d.isDragging()) {
1756
1756
  t.stopPropagation(), W();
1757
1757
  return;
1758
1758
  }
1759
- r ? (t.stopPropagation(), V(!1)) : e && (t.stopPropagation(), B(!1));
1759
+ r ? (t.stopPropagation(), B(!1)) : e && (t.stopPropagation(), z(!1));
1760
1760
  return;
1761
1761
  }
1762
1762
  if (t.metaKey || t.ctrlKey || t.altKey || t.shiftKey || t.repeat || en(document.activeElement)) return;
1763
1763
  let n = t.key.toLowerCase();
1764
- n === "s" ? (t.preventDefault(), t.stopPropagation(), B(!e)) : n === "t" && (t.preventDefault(), t.stopPropagation(), V(!r));
1764
+ n === "s" ? (t.preventDefault(), t.stopPropagation(), z(!e)) : n === "t" && (t.preventDefault(), t.stopPropagation(), B(!r));
1765
1765
  };
1766
1766
  window.addEventListener("mousemove", U, !0), window.addEventListener("scroll", ae, !0), window.addEventListener("resize", _e), window.addEventListener("click", pe, !0), window.addEventListener("keydown", be, !0), window.addEventListener("message", me.onMessage), window.addEventListener("mouseout", oe, !0), window.addEventListener("pointerdown", ue, !0), window.addEventListener("pointermove", G, !0), window.addEventListener("pointerup", de, !0), window.addEventListener("pointercancel", fe, !0);
1767
1767
  for (let e of he) window.addEventListener(e, ge, !0);
1768
1768
  return console.info(`[levo-inspector] build ${Pn} — runtime mounted`), ve(), o.send({ type: "ready" }), () => {
1769
1769
  window.removeEventListener("mousemove", U, !0), window.removeEventListener("keydown", be, !0), window.removeEventListener("scroll", ae, !0), window.removeEventListener("resize", _e), window.removeEventListener("mouseout", oe, !0), window.removeEventListener("pointerdown", ue, !0), window.removeEventListener("pointermove", G, !0), window.removeEventListener("pointerup", de, !0), window.removeEventListener("pointercancel", fe, !0), window.removeEventListener("click", pe, !0), window.removeEventListener("message", me.onMessage);
1770
1770
  for (let e of he) window.removeEventListener(e, ge, !0);
1771
- O.disconnect(), k.disconnect(), E && cancelAnimationFrame(E), ee && cancelAnimationFrame(ee), re && cancelAnimationFrame(re), R.teardown(), ye.teardown(), L.teardown(), document.documentElement.style.cursor = "", b?.remove(), s.remove(), c.remove(), l.remove(), u.remove(), W(), d.node.remove();
1771
+ D.disconnect(), O.disconnect(), T && cancelAnimationFrame(T), V && cancelAnimationFrame(V), re && cancelAnimationFrame(re), L.teardown(), ye.teardown(), I.teardown(), document.documentElement.style.cursor = "", b?.remove(), s.remove(), c.remove(), l.remove(), u.remove(), W(), d.node.remove();
1772
1772
  for (let e of f) e.remove();
1773
1773
  };
1774
1774
  }
@@ -1777,11 +1777,11 @@ function In() {
1777
1777
  var Ln = "levo-made-with", Rn = `.${Ln}{opacity:.2;transition:opacity 150ms,transform 150ms}
1778
1778
  .${Ln}:hover,.${Ln}:focus-visible{opacity:1;transform:translateY(-2px)}`, zn = ({ slug: e }) => {
1779
1779
  let t = `utm_source=${encodeURIComponent(e || "website")}&utm_term=Made%20With%20Levo&utm_campaign=footer_branding&utm_medium=organic_footer_branding`;
1780
- return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S("style", {
1780
+ return /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("style", {
1781
1781
  href: "levo-made-with",
1782
1782
  precedence: "default",
1783
1783
  children: Rn
1784
- }), /* @__PURE__ */ C("a", {
1784
+ }), /* @__PURE__ */ P("a", {
1785
1785
  className: Ln,
1786
1786
  href: `https://levo.so/?${t}`,
1787
1787
  target: "_blank",
@@ -1802,7 +1802,7 @@ var Ln = "levo-made-with", Rn = `.${Ln}{opacity:.2;transition:opacity 150ms,tran
1802
1802
  textDecoration: "none",
1803
1803
  boxShadow: "0 4px 12px rgb(0 0 0 / 0.25)"
1804
1804
  },
1805
- children: [/* @__PURE__ */ S("img", {
1805
+ children: [/* @__PURE__ */ N("img", {
1806
1806
  alt: "",
1807
1807
  src: "https://static.levocdn.com/WLZ1TXTD/Levo-Logo-moxa93IxlVi0W.webp",
1808
1808
  width: 20,
@@ -1817,17 +1817,17 @@ var Ln = "levo-made-with", Rn = `.${Ln}{opacity:.2;transition:opacity 150ms,tran
1817
1817
  if (typeof document > "u") return null;
1818
1818
  let e = document.querySelectorAll(`meta[name="${Bn}"]`);
1819
1819
  return e[e.length - 1]?.getAttribute("content")?.trim() || null;
1820
- }, Hn = D(() => import("./dist-6AIgW_iB.js").then((e) => e.n).then((e) => ({ default: e.PopupLoader }))), Un = ({ siteId: e, pageId: t }) => {
1820
+ }, Hn = C(() => import("./dist-C6-eVcUB.js").then((e) => e.n).then((e) => ({ default: e.PopupLoader }))), Un = ({ siteId: e, pageId: t }) => {
1821
1821
  let n = J(), r = i();
1822
- return !n || !r ? null : /* @__PURE__ */ S(T, {
1822
+ return !n || !r ? null : /* @__PURE__ */ N(x, {
1823
1823
  fallback: null,
1824
- children: /* @__PURE__ */ S(Hn, {
1824
+ children: /* @__PURE__ */ N(Hn, {
1825
1825
  pageId: t,
1826
1826
  siteId: e
1827
1827
  })
1828
1828
  });
1829
- }, Wn = E(null), Gn = Wn.Provider, Kn = () => k(Wn), qn = () => i(), Jn = () => n(), Yn = ({ site: e, analytics: t = !0, children: n }) => {
1830
- let [i] = P(() => {
1829
+ }, Wn = S(null), Gn = Wn.Provider, Kn = () => T(Wn), qn = () => i(), Jn = () => n(), Yn = ({ site: e, analytics: t = !0, children: n }) => {
1830
+ let [i] = A(() => {
1831
1831
  if (!e) return null;
1832
1832
  let n = Ee(e), r = Te(n);
1833
1833
  return r ? {
@@ -1838,32 +1838,32 @@ var Ln = "levo-made-with", Rn = `.${Ln}{opacity:.2;transition:opacity 150ms,tran
1838
1838
  }),
1839
1839
  site: e
1840
1840
  } : null;
1841
- }), [a, o] = P(null), s = H({ select: (e) => e.location.pathname }), c = xn();
1842
- return A(() => {
1841
+ }), [a, o] = A(null), s = H({ select: (e) => e.location.pathname }), c = xn();
1842
+ return E(() => {
1843
1843
  i && (window.levo_client = i.client, window.levo_insights = i.insights);
1844
- }, [i]), j(() => {
1844
+ }, [i]), D(() => {
1845
1845
  if (!i) return;
1846
1846
  let e = Vn();
1847
1847
  o(e), i.insights.init({ pageId: e });
1848
- }, [i, s]), i ? /* @__PURE__ */ C(r, {
1848
+ }, [i, s]), i ? /* @__PURE__ */ P(r, {
1849
1849
  client: i.client,
1850
1850
  insights: i.insights,
1851
1851
  children: [
1852
- /* @__PURE__ */ S(Gn, {
1852
+ /* @__PURE__ */ N(Gn, {
1853
1853
  value: i.site,
1854
1854
  children: n
1855
1855
  }),
1856
- !c && /* @__PURE__ */ S(vt, {
1856
+ !c && /* @__PURE__ */ N(vt, {
1857
1857
  site: i.site,
1858
1858
  path: s
1859
1859
  }),
1860
- /* @__PURE__ */ S(Un, {
1860
+ /* @__PURE__ */ N(Un, {
1861
1861
  pageId: a ?? void 0,
1862
1862
  siteId: i.site.id
1863
1863
  }),
1864
- !c && !!i.site.feature_flag?.branding && /* @__PURE__ */ S(zn, { slug: i.site.slug })
1864
+ !c && !!i.site.feature_flag?.branding && /* @__PURE__ */ N(zn, { slug: i.site.slug })
1865
1865
  ]
1866
- }) : /* @__PURE__ */ S(x, { children: n });
1866
+ }) : /* @__PURE__ */ N(M, { children: n });
1867
1867
  }, Xn = (e, t) => {
1868
1868
  let n = h(t);
1869
1869
  return ({ location: t }) => {
@@ -1875,7 +1875,7 @@ var Ln = "levo-made-with", Rn = `.${Ln}{opacity:.2;transition:opacity 150ms,tran
1875
1875
  cookie: typeof document > "u" ? null : document.cookie,
1876
1876
  hasRoute: n
1877
1877
  });
1878
- if (r.kind === "redirect" && r.path !== t.pathname) throw ee({
1878
+ if (r.kind === "redirect" && r.path !== t.pathname) throw V({
1879
1879
  search: !0,
1880
1880
  to: r.path
1881
1881
  });
@@ -1915,18 +1915,18 @@ var Ln = "levo-made-with", Rn = `.${Ln}{opacity:.2;transition:opacity 150ms,tran
1915
1915
  let n = H({ select: (e) => e.location.pathname });
1916
1916
  if (!e.isLocalized || !e.origin) return null;
1917
1917
  let { neutralPath: r } = f(n, e.locales);
1918
- return /* @__PURE__ */ S(x, { children: $n({
1918
+ return /* @__PURE__ */ N(M, { children: $n({
1919
1919
  neutralPath: r,
1920
1920
  origin: e.origin,
1921
1921
  locales: e.locales,
1922
1922
  hasRoute: t ? h(t) : void 0
1923
- }).filter((e) => e.rel === "alternate").map((e) => /* @__PURE__ */ S("link", {
1923
+ }).filter((e) => e.rel === "alternate").map((e) => /* @__PURE__ */ N("link", {
1924
1924
  href: e.href,
1925
1925
  hrefLang: e.hrefLang,
1926
1926
  rel: e.rel
1927
1927
  }, e.hrefLang ?? e.href)) });
1928
- }, tr = E(void 0), nr = ({ children: e, locale: t, locales: n, defaultLocale: r, source: i = "default", hasRoute: a }) => {
1929
- let o = M(() => {
1928
+ }, tr = S(void 0), nr = ({ children: e, locale: t, locales: n, defaultLocale: r, source: i = "default", hasRoute: a }) => {
1929
+ let o = O(() => {
1930
1930
  let e = n?.length ? n : [t];
1931
1931
  return {
1932
1932
  locale: t,
@@ -1949,13 +1949,13 @@ var Ln = "levo-made-with", Rn = `.${Ln}{opacity:.2;transition:opacity 150ms,tran
1949
1949
  i,
1950
1950
  a
1951
1951
  ]);
1952
- return /* @__PURE__ */ S(tr.Provider, {
1952
+ return /* @__PURE__ */ N(tr.Provider, {
1953
1953
  value: o,
1954
1954
  children: e
1955
1955
  });
1956
1956
  };
1957
1957
  function rr() {
1958
- return k(tr) || {
1958
+ return T(tr) || {
1959
1959
  locale: "en",
1960
1960
  locales: ["en"],
1961
1961
  defaultLocale: "en",
@@ -1971,7 +1971,7 @@ function ir(e) {
1971
1971
  }
1972
1972
  var ar = ({ config: e, children: t, routeTree: n }) => {
1973
1973
  let { prefix: r } = f(H({ select: (e) => e.location.pathname }), e.locales);
1974
- return /* @__PURE__ */ S(nr, {
1974
+ return /* @__PURE__ */ N(nr, {
1975
1975
  defaultLocale: e.defaultLocale,
1976
1976
  hasRoute: n ? h(n) : void 0,
1977
1977
  locale: r ?? e.defaultLocale,
@@ -1982,7 +1982,7 @@ var ar = ({ config: e, children: t, routeTree: n }) => {
1982
1982
  };
1983
1983
  function or() {
1984
1984
  let { locale: e, locales: t, isMultiLocale: n, setLocale: r, pathFor: i, hasRoute: a } = rr(), o = H({ select: (e) => e.location.pathname });
1985
- return M(() => {
1985
+ return O(() => {
1986
1986
  if (!n) return [];
1987
1987
  let { neutralPath: s } = f(o, t), c = t.filter((e) => !a || a(i(s, e)));
1988
1988
  return c.length < 2 ? [] : c.map((t) => ({
@@ -2103,10 +2103,10 @@ var sr = (e) => JSON.stringify(e).replace(/<\//g, "<\\/"), cr = (e) => {
2103
2103
  };
2104
2104
  function dr({ meta: e, site: t }) {
2105
2105
  let n = ur(e, t);
2106
- return /* @__PURE__ */ C(x, { children: [
2107
- n.meta.map((e, t) => e.title === void 0 ? /* @__PURE__ */ S("meta", { ...e }, `m${t}`) : /* @__PURE__ */ S("title", { children: e.title }, `t${t}`)),
2108
- n.links.map((e, t) => /* @__PURE__ */ S("link", { ...e }, `l${t}`)),
2109
- n.scripts.map(({ children: e, ...t }, n) => e === void 0 ? /* @__PURE__ */ S("script", { ...t }, `s${n}`) : /* @__PURE__ */ S("script", {
2106
+ return /* @__PURE__ */ P(M, { children: [
2107
+ n.meta.map((e, t) => e.title === void 0 ? /* @__PURE__ */ N("meta", { ...e }, `m${t}`) : /* @__PURE__ */ N("title", { children: e.title }, `t${t}`)),
2108
+ n.links.map((e, t) => /* @__PURE__ */ N("link", { ...e }, `l${t}`)),
2109
+ n.scripts.map(({ children: e, ...t }, n) => e === void 0 ? /* @__PURE__ */ N("script", { ...t }, `s${n}`) : /* @__PURE__ */ N("script", {
2110
2110
  ...t,
2111
2111
  dangerouslySetInnerHTML: { __html: e }
2112
2112
  }, `s${n}`))
@@ -2114,25 +2114,25 @@ function dr({ meta: e, site: t }) {
2114
2114
  }
2115
2115
  //#endregion
2116
2116
  //#region src/registration/ui.tsx
2117
- var fr = (...e) => e.filter(Boolean).join(" "), Q = w.forwardRef(({ className: e, isLoading: t, loadingText: n, children: r, type: i = "button", ...a }, o) => /* @__PURE__ */ S("button", {
2117
+ var fr = (...e) => e.filter(Boolean).join(" "), Q = ee.forwardRef(({ className: e, isLoading: t, loadingText: n, children: r, type: i = "button", ...a }, o) => /* @__PURE__ */ N("button", {
2118
2118
  ref: o,
2119
2119
  type: i,
2120
2120
  className: fr("inline-flex items-center justify-center", e),
2121
2121
  ...a,
2122
- children: t ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(ie, { className: fr("h-4 w-4 animate-spin", n ? "mr-2" : "") }), n] }) : r
2122
+ children: t ? /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N(ie, { className: fr("h-4 w-4 animate-spin", n ? "mr-2" : "") }), n] }) : r
2123
2123
  }));
2124
2124
  Q.displayName = "Btn";
2125
2125
  //#endregion
2126
2126
  //#region src/registration/AttendeeForm.tsx
2127
- var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, registerLoading: i, onBack: a, submitLabel: o, showBusinessBilling: s = !0 }) => /* @__PURE__ */ C("form", {
2127
+ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, registerLoading: i, onBack: a, submitLabel: o, showBusinessBilling: s = !0 }) => /* @__PURE__ */ P("form", {
2128
2128
  onSubmit: r,
2129
2129
  className: "flex flex-col gap-4",
2130
2130
  children: [
2131
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
2131
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
2132
2132
  htmlFor: "name",
2133
2133
  className: "font-medium text-sm",
2134
2134
  children: "Name"
2135
- }), /* @__PURE__ */ S("input", {
2135
+ }), /* @__PURE__ */ N("input", {
2136
2136
  className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
2137
2137
  placeholder: "Name",
2138
2138
  name: "name",
@@ -2141,11 +2141,11 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2141
2141
  onBlur: n,
2142
2142
  required: !0
2143
2143
  })] }),
2144
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
2144
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("label", {
2145
2145
  htmlFor: "email",
2146
2146
  className: "font-medium text-sm",
2147
2147
  children: "Email"
2148
- }), /* @__PURE__ */ S("input", {
2148
+ }), /* @__PURE__ */ N("input", {
2149
2149
  className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
2150
2150
  placeholder: "Email",
2151
2151
  name: "email",
@@ -2155,32 +2155,32 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2155
2155
  type: "email",
2156
2156
  required: !0
2157
2157
  })] }),
2158
- s && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
2158
+ s && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ P("label", {
2159
2159
  htmlFor: "is_business_purchase",
2160
2160
  className: "flex items-center gap-2 text-sm",
2161
- children: [/* @__PURE__ */ S("input", {
2161
+ children: [/* @__PURE__ */ N("input", {
2162
2162
  type: "checkbox",
2163
2163
  name: "is_business_purchase",
2164
2164
  checked: e.is_business_purchase || !1,
2165
2165
  onChange: t,
2166
2166
  className: "rounded border-gray-300"
2167
- }), /* @__PURE__ */ S("span", {
2167
+ }), /* @__PURE__ */ N("span", {
2168
2168
  className: "font-medium",
2169
2169
  children: "Tax for Business"
2170
2170
  })]
2171
- }), /* @__PURE__ */ S("p", {
2171
+ }), /* @__PURE__ */ N("p", {
2172
2172
  className: "mt-1 text-gray-500 text-xs",
2173
2173
  children: "Check this if you're purchasing for a business and need a tax-compliant invoice"
2174
2174
  })] }),
2175
- s && e.is_business_purchase && /* @__PURE__ */ C(x, { children: [
2176
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
2175
+ s && e.is_business_purchase && /* @__PURE__ */ P(M, { children: [
2176
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ P("label", {
2177
2177
  htmlFor: "business_name",
2178
2178
  className: "font-medium text-sm",
2179
- children: ["Company Name ", /* @__PURE__ */ S("span", {
2179
+ children: ["Company Name ", /* @__PURE__ */ N("span", {
2180
2180
  className: "text-red-500",
2181
2181
  children: "*"
2182
2182
  })]
2183
- }), /* @__PURE__ */ S("input", {
2183
+ }), /* @__PURE__ */ N("input", {
2184
2184
  className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
2185
2185
  placeholder: "Acme Corporation",
2186
2186
  name: "billing_details.name",
@@ -2189,14 +2189,14 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2189
2189
  onBlur: n,
2190
2190
  required: e.is_business_purchase
2191
2191
  })] }),
2192
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
2192
+ /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ P("label", {
2193
2193
  htmlFor: "business_tax_id",
2194
2194
  className: "font-medium text-sm",
2195
- children: ["Tax ID / GST Number ", /* @__PURE__ */ S("span", {
2195
+ children: ["Tax ID / GST Number ", /* @__PURE__ */ N("span", {
2196
2196
  className: "text-red-500",
2197
2197
  children: "*"
2198
2198
  })]
2199
- }), /* @__PURE__ */ S("input", {
2199
+ }), /* @__PURE__ */ N("input", {
2200
2200
  className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
2201
2201
  placeholder: "GST123456789",
2202
2202
  name: "billing_details.tax_id",
@@ -2205,15 +2205,15 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2205
2205
  onBlur: n,
2206
2206
  required: e.is_business_purchase
2207
2207
  })] }),
2208
- /* @__PURE__ */ C("div", { children: [
2209
- /* @__PURE__ */ C("p", {
2208
+ /* @__PURE__ */ P("div", { children: [
2209
+ /* @__PURE__ */ P("p", {
2210
2210
  className: "mb-1 font-medium text-sm",
2211
- children: ["Business Address ", /* @__PURE__ */ S("span", {
2211
+ children: ["Business Address ", /* @__PURE__ */ N("span", {
2212
2212
  className: "text-red-500",
2213
2213
  children: "*"
2214
2214
  })]
2215
2215
  }),
2216
- /* @__PURE__ */ S("input", {
2216
+ /* @__PURE__ */ N("input", {
2217
2217
  className: "mb-2 w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
2218
2218
  placeholder: "Street Address Line 1",
2219
2219
  name: "billing_details.address.line1",
@@ -2222,7 +2222,7 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2222
2222
  onBlur: n,
2223
2223
  required: e.is_business_purchase
2224
2224
  }),
2225
- /* @__PURE__ */ S("input", {
2225
+ /* @__PURE__ */ N("input", {
2226
2226
  className: "mb-2 w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
2227
2227
  placeholder: "Street Address Line 2 (Optional)",
2228
2228
  name: "billing_details.address.line2",
@@ -2230,9 +2230,9 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2230
2230
  onChange: t,
2231
2231
  onBlur: n
2232
2232
  }),
2233
- /* @__PURE__ */ C("div", {
2233
+ /* @__PURE__ */ P("div", {
2234
2234
  className: "grid grid-cols-2 gap-2",
2235
- children: [/* @__PURE__ */ S("input", {
2235
+ children: [/* @__PURE__ */ N("input", {
2236
2236
  className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
2237
2237
  placeholder: "City",
2238
2238
  name: "billing_details.address.city",
@@ -2240,7 +2240,7 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2240
2240
  onChange: t,
2241
2241
  onBlur: n,
2242
2242
  required: e.is_business_purchase
2243
- }), /* @__PURE__ */ S("input", {
2243
+ }), /* @__PURE__ */ N("input", {
2244
2244
  className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
2245
2245
  placeholder: "State/Province",
2246
2246
  name: "billing_details.address.state",
@@ -2250,9 +2250,9 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2250
2250
  required: e.is_business_purchase
2251
2251
  })]
2252
2252
  }),
2253
- /* @__PURE__ */ C("div", {
2253
+ /* @__PURE__ */ P("div", {
2254
2254
  className: "mt-2 grid grid-cols-2 gap-2",
2255
- children: [/* @__PURE__ */ S("input", {
2255
+ children: [/* @__PURE__ */ N("input", {
2256
2256
  className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
2257
2257
  placeholder: "Postal Code",
2258
2258
  name: "billing_details.address.postal_code",
@@ -2260,7 +2260,7 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2260
2260
  onChange: t,
2261
2261
  onBlur: n,
2262
2262
  required: e.is_business_purchase
2263
- }), /* @__PURE__ */ S("input", {
2263
+ }), /* @__PURE__ */ N("input", {
2264
2264
  className: "w-full rounded-lg border border-gray-300 px-3 py-2 focus:outline-none",
2265
2265
  placeholder: "Country",
2266
2266
  name: "billing_details.address.country",
@@ -2272,15 +2272,15 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2272
2272
  })
2273
2273
  ] })
2274
2274
  ] }),
2275
- /* @__PURE__ */ C("div", {
2275
+ /* @__PURE__ */ P("div", {
2276
2276
  className: "flex flex-col-reverse justify-end gap-4 md:flex-row",
2277
- children: [/* @__PURE__ */ S(Q, {
2277
+ children: [/* @__PURE__ */ N(Q, {
2278
2278
  className: "rounded-lg bg-gray-100 px-6 py-2 font-semibold text-black hover:bg-gray-200",
2279
2279
  type: "button",
2280
2280
  onClick: a,
2281
2281
  disabled: i,
2282
2282
  children: "Back"
2283
- }), /* @__PURE__ */ S(Q, {
2283
+ }), /* @__PURE__ */ N(Q, {
2284
2284
  className: "rounded-lg bg-brand px-6 py-2 font-semibold text-brand-foreground hover:opacity-90",
2285
2285
  type: "submit",
2286
2286
  isLoading: i,
@@ -2307,39 +2307,39 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2307
2307
  let n = yr(e, s?._id), r = yr(t, s?._id);
2308
2308
  return n && !r ? -1 : !n && r ? 1 : 0;
2309
2309
  });
2310
- return /* @__PURE__ */ C("div", { children: [
2311
- /* @__PURE__ */ C("div", {
2310
+ return /* @__PURE__ */ P("div", { children: [
2311
+ /* @__PURE__ */ P("div", {
2312
2312
  className: "flex items-center justify-between text-center",
2313
2313
  children: [
2314
- /* @__PURE__ */ S("button", {
2314
+ /* @__PURE__ */ N("button", {
2315
2315
  type: "button",
2316
2316
  className: "rounded-md p-2 hover:bg-gray-50 focus:outline-none",
2317
2317
  "aria-label": "Back",
2318
2318
  onClick: o,
2319
- children: /* @__PURE__ */ S(U, { className: "size-4" })
2319
+ children: /* @__PURE__ */ N(U, { className: "size-4" })
2320
2320
  }),
2321
- /* @__PURE__ */ C("p", {
2321
+ /* @__PURE__ */ P("p", {
2322
2322
  className: "font-semibold text-md",
2323
2323
  children: ["Apply Coupon for ", s?.title]
2324
2324
  }),
2325
- /* @__PURE__ */ S("div", { className: "w-4" })
2325
+ /* @__PURE__ */ N("div", { className: "w-4" })
2326
2326
  ]
2327
2327
  }),
2328
- /* @__PURE__ */ C("div", {
2328
+ /* @__PURE__ */ P("div", {
2329
2329
  className: "mt-2 flex gap-4",
2330
- children: [/* @__PURE__ */ C("div", {
2330
+ children: [/* @__PURE__ */ P("div", {
2331
2331
  className: "w-full",
2332
- children: [/* @__PURE__ */ S("input", {
2332
+ children: [/* @__PURE__ */ N("input", {
2333
2333
  className: "w-full rounded border border-gray-300 px-3 py-2 focus:border-brand focus:outline-none",
2334
2334
  type: "text",
2335
2335
  placeholder: "Enter Coupon Code",
2336
2336
  value: e,
2337
2337
  onChange: (e) => t(e.target.value)
2338
- }), n && /* @__PURE__ */ S("p", {
2338
+ }), n && /* @__PURE__ */ N("p", {
2339
2339
  className: "mt-1 text-red-400 text-xs",
2340
2340
  children: n
2341
2341
  })]
2342
- }), /* @__PURE__ */ S(Q, {
2342
+ }), /* @__PURE__ */ N(Q, {
2343
2343
  "aria-label": "Apply Coupon",
2344
2344
  onClick: () => i(),
2345
2345
  className: "rounded-lg bg-brand px-3 text-brand-foreground hover:opacity-90",
@@ -2348,55 +2348,55 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2348
2348
  zIndex: e ? 1 : -1
2349
2349
  },
2350
2350
  isLoading: r,
2351
- children: /* @__PURE__ */ S(ne, { className: "h-fit" })
2351
+ children: /* @__PURE__ */ N(ne, { className: "h-fit" })
2352
2352
  })]
2353
2353
  }),
2354
- c.length > 0 && /* @__PURE__ */ C("div", {
2354
+ c.length > 0 && /* @__PURE__ */ P("div", {
2355
2355
  className: "mt-4 flex flex-col gap-4",
2356
- children: [c.filter((e) => yr(e, s?._id)).length > 0 && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
2356
+ children: [c.filter((e) => yr(e, s?._id)).length > 0 && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
2357
2357
  className: "mb-2 text-gray-600 text-sm",
2358
2358
  children: "Available Coupons"
2359
- }), /* @__PURE__ */ S("div", {
2359
+ }), /* @__PURE__ */ N("div", {
2360
2360
  className: "flex flex-col gap-2",
2361
- children: c.filter((e) => yr(e, s?._id)).map((e) => /* @__PURE__ */ C("button", {
2361
+ children: c.filter((e) => yr(e, s?._id)).map((e) => /* @__PURE__ */ P("button", {
2362
2362
  type: "button",
2363
2363
  className: "flex flex-col gap-1 rounded-md border border-gray-300 border-dashed px-3 py-2 text-left transition hover:border-gray-400 hover:bg-gray-50",
2364
2364
  onClick: () => {
2365
2365
  i(e.code), t(e.code);
2366
2366
  },
2367
- children: [/* @__PURE__ */ C("div", {
2367
+ children: [/* @__PURE__ */ P("div", {
2368
2368
  className: "flex w-full items-center justify-between",
2369
- children: [/* @__PURE__ */ S("span", {
2369
+ children: [/* @__PURE__ */ N("span", {
2370
2370
  className: "font-medium",
2371
2371
  children: e.code
2372
- }), /* @__PURE__ */ S("span", {
2372
+ }), /* @__PURE__ */ N("span", {
2373
2373
  className: "text-gray-500 text-sm",
2374
2374
  children: e.kind === "percent" ? `${e.percent_off}% off` : `${mr[e.currency ?? "INR"]} ${(e.amount_off ?? 0) / 100} off`
2375
2375
  })]
2376
- }), e.description && /* @__PURE__ */ S("span", {
2376
+ }), e.description && /* @__PURE__ */ N("span", {
2377
2377
  className: "text-gray-500 text-xs",
2378
2378
  children: e.description
2379
2379
  })]
2380
2380
  }, e._id))
2381
- })] }), c.filter((e) => !yr(e, s?._id)).length > 0 && /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
2381
+ })] }), c.filter((e) => !yr(e, s?._id)).length > 0 && /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
2382
2382
  className: "mb-2 text-gray-400 text-sm",
2383
2383
  children: "Not Applicable"
2384
- }), /* @__PURE__ */ S("div", {
2384
+ }), /* @__PURE__ */ N("div", {
2385
2385
  className: "flex flex-col gap-2",
2386
- children: c.filter((e) => !yr(e, s?._id)).map((e) => /* @__PURE__ */ C("button", {
2386
+ children: c.filter((e) => !yr(e, s?._id)).map((e) => /* @__PURE__ */ P("button", {
2387
2387
  type: "button",
2388
2388
  disabled: !0,
2389
2389
  className: "flex cursor-not-allowed flex-col gap-1 rounded-md border border-gray-200 border-dashed px-3 py-2 text-left opacity-50",
2390
- children: [/* @__PURE__ */ C("div", {
2390
+ children: [/* @__PURE__ */ P("div", {
2391
2391
  className: "flex w-full items-center justify-between",
2392
- children: [/* @__PURE__ */ S("span", {
2392
+ children: [/* @__PURE__ */ N("span", {
2393
2393
  className: "font-medium",
2394
2394
  children: e.code
2395
- }), /* @__PURE__ */ S("span", {
2395
+ }), /* @__PURE__ */ N("span", {
2396
2396
  className: "text-gray-500 text-sm",
2397
2397
  children: e.kind === "percent" ? `${e.percent_off}% off` : `${mr[e.currency ?? "INR"]} ${(e.amount_off ?? 0) / 100} off`
2398
2398
  })]
2399
- }), e.description && /* @__PURE__ */ S("span", {
2399
+ }), e.description && /* @__PURE__ */ N("span", {
2400
2400
  className: "text-gray-500 text-xs",
2401
2401
  children: e.description
2402
2402
  })]
@@ -2416,23 +2416,23 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2416
2416
  hour12: !0
2417
2417
  }).format(t)}`;
2418
2418
  }, Sr = ({ ticketData: e, paymentData: t, type: n }) => {
2419
- let [r, i] = P(!0), a = (t.total_amount || t.unit_amount) / 100, o = t.unit_amount === 0, s = (e) => new Intl.NumberFormat("en-IN", {
2419
+ let [r, i] = A(!0), a = (t.total_amount || t.unit_amount) / 100, o = t.unit_amount === 0, s = (e) => new Intl.NumberFormat("en-IN", {
2420
2420
  style: "currency",
2421
2421
  currency: t.currency || "INR",
2422
2422
  minimumFractionDigits: 0
2423
2423
  }).format(e);
2424
- return /* @__PURE__ */ S(I.Root, {
2424
+ return /* @__PURE__ */ N(F.Root, {
2425
2425
  open: r,
2426
2426
  onOpenChange: (e) => i(e),
2427
- children: /* @__PURE__ */ C(I.Portal, { children: [/* @__PURE__ */ S(I.Backdrop, { className: "fixed inset-0 z-50 bg-black/50" }), /* @__PURE__ */ C(I.Popup, {
2427
+ children: /* @__PURE__ */ P(F.Portal, { children: [/* @__PURE__ */ N(F.Backdrop, { className: "fixed inset-0 z-50 bg-black/50" }), /* @__PURE__ */ P(F.Popup, {
2428
2428
  className: "fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100vh-2rem)] w-full max-w-md -translate-x-1/2 -translate-y-1/2 flex-col overflow-y-auto rounded-2xl bg-white shadow-2xl",
2429
2429
  children: [
2430
- /* @__PURE__ */ C("div", {
2430
+ /* @__PURE__ */ P("div", {
2431
2431
  className: "bg-gradient-to-br from-green-50 to-emerald-50 px-6 py-6 text-center",
2432
2432
  children: [
2433
- /* @__PURE__ */ S("div", {
2433
+ /* @__PURE__ */ N("div", {
2434
2434
  className: "mx-auto mb-3 flex size-14 items-center justify-center rounded-full bg-green-100 ring-4 ring-green-50",
2435
- children: /* @__PURE__ */ C("svg", {
2435
+ children: /* @__PURE__ */ P("svg", {
2436
2436
  xmlns: "http://www.w3.org/2000/svg",
2437
2437
  width: "28",
2438
2438
  height: "28",
@@ -2444,72 +2444,72 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2444
2444
  strokeLinejoin: "round",
2445
2445
  className: "text-green-600",
2446
2446
  "aria-hidden": "true",
2447
- children: [/* @__PURE__ */ S("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }), /* @__PURE__ */ S("polyline", { points: "22 4 12 14.01 9 11.01" })]
2447
+ children: [/* @__PURE__ */ N("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }), /* @__PURE__ */ N("polyline", { points: "22 4 12 14.01 9 11.01" })]
2448
2448
  })
2449
2449
  }),
2450
- /* @__PURE__ */ S(I.Title, {
2450
+ /* @__PURE__ */ N(F.Title, {
2451
2451
  className: "font-bold text-gray-900 text-lg",
2452
2452
  children: n === "view" ? "Booking Details" : "Tickets Confirmed!"
2453
2453
  }),
2454
- /* @__PURE__ */ S(I.Description, {
2454
+ /* @__PURE__ */ N(F.Description, {
2455
2455
  className: "mt-1 text-gray-600 text-sm",
2456
2456
  children: n === "confirm" ? "Your tickets have been confirmed. A confirmation email is on its way." : "Here are the details about your booking."
2457
2457
  })
2458
2458
  ]
2459
2459
  }),
2460
- /* @__PURE__ */ C("div", {
2460
+ /* @__PURE__ */ P("div", {
2461
2461
  className: "px-6 py-5",
2462
- children: [/* @__PURE__ */ C("div", {
2462
+ children: [/* @__PURE__ */ P("div", {
2463
2463
  className: "relative overflow-hidden rounded-xl border border-gray-200 bg-white",
2464
2464
  children: [
2465
- /* @__PURE__ */ S("div", { className: "absolute top-1/2 -left-3 size-6 -translate-y-1/2 rounded-full bg-gray-100" }),
2466
- /* @__PURE__ */ S("div", { className: "absolute top-1/2 -right-3 size-6 -translate-y-1/2 rounded-full bg-gray-100" }),
2467
- /* @__PURE__ */ C("div", {
2465
+ /* @__PURE__ */ N("div", { className: "absolute top-1/2 -left-3 size-6 -translate-y-1/2 rounded-full bg-gray-100" }),
2466
+ /* @__PURE__ */ N("div", { className: "absolute top-1/2 -right-3 size-6 -translate-y-1/2 rounded-full bg-gray-100" }),
2467
+ /* @__PURE__ */ P("div", {
2468
2468
  className: "px-5 py-4",
2469
2469
  children: [
2470
- t.qr_image && /* @__PURE__ */ S("div", {
2470
+ t.qr_image && /* @__PURE__ */ N("div", {
2471
2471
  className: "mb-4 flex flex-col items-center",
2472
- children: /* @__PURE__ */ S("div", {
2472
+ children: /* @__PURE__ */ N("div", {
2473
2473
  className: "rounded-lg border border-gray-200 bg-white p-2",
2474
- children: /* @__PURE__ */ S("img", {
2474
+ children: /* @__PURE__ */ N("img", {
2475
2475
  src: t.qr_image.location,
2476
2476
  alt: "Booking QR Code",
2477
2477
  className: "size-24"
2478
2478
  })
2479
2479
  })
2480
2480
  }),
2481
- /* @__PURE__ */ C("div", {
2481
+ /* @__PURE__ */ P("div", {
2482
2482
  className: "mb-4 flex items-center justify-between rounded-lg bg-gray-50 px-3 py-2.5",
2483
- children: [/* @__PURE__ */ S("span", {
2483
+ children: [/* @__PURE__ */ N("span", {
2484
2484
  className: "font-medium text-gray-500 text-xs uppercase tracking-wide",
2485
2485
  children: "Booking ID"
2486
- }), /* @__PURE__ */ S("span", {
2486
+ }), /* @__PURE__ */ N("span", {
2487
2487
  className: "font-mono font-semibold text-gray-900 text-sm",
2488
2488
  children: t._id
2489
2489
  })]
2490
2490
  }),
2491
- /* @__PURE__ */ S("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
2492
- /* @__PURE__ */ S("div", {
2491
+ /* @__PURE__ */ N("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
2492
+ /* @__PURE__ */ N("div", {
2493
2493
  className: "space-y-3",
2494
2494
  children: t.attendees.map((t) => {
2495
2495
  let n = e.find((e) => e._id === t.ticket._id);
2496
- return n ? /* @__PURE__ */ C("div", {
2496
+ return n ? /* @__PURE__ */ P("div", {
2497
2497
  className: "flex items-center justify-between",
2498
- children: [/* @__PURE__ */ C("div", {
2498
+ children: [/* @__PURE__ */ P("div", {
2499
2499
  className: "min-w-0 flex-1",
2500
- children: [/* @__PURE__ */ S("p", {
2500
+ children: [/* @__PURE__ */ N("p", {
2501
2501
  className: "truncate font-medium text-gray-900 text-sm",
2502
2502
  children: t.name
2503
- }), /* @__PURE__ */ S("p", {
2503
+ }), /* @__PURE__ */ N("p", {
2504
2504
  className: "truncate text-gray-500 text-xs",
2505
2505
  children: t.email
2506
2506
  })]
2507
- }), /* @__PURE__ */ C("div", {
2507
+ }), /* @__PURE__ */ P("div", {
2508
2508
  className: "ml-3 shrink-0 text-right",
2509
- children: [/* @__PURE__ */ S("p", {
2509
+ children: [/* @__PURE__ */ N("p", {
2510
2510
  className: "font-medium text-gray-900 text-sm",
2511
2511
  children: n.title
2512
- }), /* @__PURE__ */ S("p", {
2512
+ }), /* @__PURE__ */ N("p", {
2513
2513
  className: "text-gray-500 text-xs",
2514
2514
  children: s(t.ticket.unit_amount / 100)
2515
2515
  })]
@@ -2517,63 +2517,63 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2517
2517
  }, t._id) : null;
2518
2518
  })
2519
2519
  }),
2520
- /* @__PURE__ */ S("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
2521
- !o && /* @__PURE__ */ C("div", {
2520
+ /* @__PURE__ */ N("div", { className: "my-4 border-gray-200 border-t border-dashed" }),
2521
+ !o && /* @__PURE__ */ P("div", {
2522
2522
  className: "space-y-1.5 text-sm",
2523
2523
  children: [
2524
- /* @__PURE__ */ C("div", {
2524
+ /* @__PURE__ */ P("div", {
2525
2525
  className: "flex justify-between",
2526
- children: [/* @__PURE__ */ S("span", {
2526
+ children: [/* @__PURE__ */ N("span", {
2527
2527
  className: "text-gray-500",
2528
2528
  children: "Base Amount"
2529
- }), /* @__PURE__ */ S("span", {
2529
+ }), /* @__PURE__ */ N("span", {
2530
2530
  className: "font-medium text-gray-700",
2531
2531
  children: s(t.unit_amount / 100)
2532
2532
  })]
2533
2533
  }),
2534
- t.discount > 0 && /* @__PURE__ */ C("div", {
2534
+ t.discount > 0 && /* @__PURE__ */ P("div", {
2535
2535
  className: "flex justify-between text-green-600",
2536
- children: [/* @__PURE__ */ S("span", { children: "Discount" }), /* @__PURE__ */ C("span", {
2536
+ children: [/* @__PURE__ */ N("span", { children: "Discount" }), /* @__PURE__ */ P("span", {
2537
2537
  className: "font-medium",
2538
2538
  children: ["- ", s(t.discount / 100)]
2539
2539
  })]
2540
2540
  }),
2541
- t.taxes && Array.isArray(t.taxes) && t.taxes.length > 0 && t.taxes.map((e, t) => /* @__PURE__ */ C("div", {
2541
+ t.taxes && Array.isArray(t.taxes) && t.taxes.length > 0 && t.taxes.map((e, t) => /* @__PURE__ */ P("div", {
2542
2542
  className: "flex justify-between",
2543
- children: [/* @__PURE__ */ S("span", {
2543
+ children: [/* @__PURE__ */ N("span", {
2544
2544
  className: "text-gray-500",
2545
2545
  children: e.label
2546
- }), /* @__PURE__ */ S("span", {
2546
+ }), /* @__PURE__ */ N("span", {
2547
2547
  className: "font-medium text-gray-700",
2548
2548
  children: s(e.amount / 100)
2549
2549
  })]
2550
2550
  }, t)),
2551
- /* @__PURE__ */ C("div", {
2551
+ /* @__PURE__ */ P("div", {
2552
2552
  className: "flex justify-between border-gray-200 border-t pt-2 font-semibold text-gray-900",
2553
- children: [/* @__PURE__ */ S("span", { children: "Total Paid" }), /* @__PURE__ */ S("span", { children: s(a) })]
2553
+ children: [/* @__PURE__ */ N("span", { children: "Total Paid" }), /* @__PURE__ */ N("span", { children: s(a) })]
2554
2554
  })
2555
2555
  ]
2556
2556
  }),
2557
- o && /* @__PURE__ */ C("div", {
2557
+ o && /* @__PURE__ */ P("div", {
2558
2558
  className: "flex items-center justify-between font-semibold text-gray-900",
2559
- children: [/* @__PURE__ */ S("span", { children: "Total" }), /* @__PURE__ */ S("span", { children: "Free" })]
2559
+ children: [/* @__PURE__ */ N("span", { children: "Total" }), /* @__PURE__ */ N("span", { children: "Free" })]
2560
2560
  })
2561
2561
  ]
2562
2562
  })
2563
2563
  ]
2564
- }), /* @__PURE__ */ S("p", {
2564
+ }), /* @__PURE__ */ N("p", {
2565
2565
  className: "mt-3 text-center text-gray-400 text-xs",
2566
2566
  children: xr(t.created_at)
2567
2567
  })]
2568
2568
  }),
2569
- /* @__PURE__ */ C("div", {
2569
+ /* @__PURE__ */ P("div", {
2570
2570
  className: "flex flex-col gap-2 px-6 pb-5",
2571
- children: [t.invoice?.location && /* @__PURE__ */ C("a", {
2571
+ children: [t.invoice?.location && /* @__PURE__ */ P("a", {
2572
2572
  href: t.invoice.location,
2573
2573
  target: "_blank",
2574
2574
  rel: "noopener noreferrer",
2575
2575
  className: "flex w-full items-center justify-center gap-2 rounded-lg border border-gray-200 px-4 py-2.5 font-medium text-gray-700 text-sm transition-colors hover:bg-gray-50",
2576
- children: [/* @__PURE__ */ C("svg", {
2576
+ children: [/* @__PURE__ */ P("svg", {
2577
2577
  xmlns: "http://www.w3.org/2000/svg",
2578
2578
  width: "16",
2579
2579
  height: "16",
@@ -2585,9 +2585,9 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2585
2585
  strokeLinejoin: "round",
2586
2586
  "aria-hidden": "true",
2587
2587
  children: [
2588
- /* @__PURE__ */ S("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
2589
- /* @__PURE__ */ S("polyline", { points: "7 10 12 15 17 10" }),
2590
- /* @__PURE__ */ S("line", {
2588
+ /* @__PURE__ */ N("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
2589
+ /* @__PURE__ */ N("polyline", { points: "7 10 12 15 17 10" }),
2590
+ /* @__PURE__ */ N("line", {
2591
2591
  x1: "12",
2592
2592
  x2: "12",
2593
2593
  y1: "15",
@@ -2595,7 +2595,7 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2595
2595
  })
2596
2596
  ]
2597
2597
  }), "Download Invoice"]
2598
- }), /* @__PURE__ */ S(I.Close, {
2598
+ }), /* @__PURE__ */ N(F.Close, {
2599
2599
  className: "w-full rounded-lg bg-gray-900 px-4 py-2.5 font-medium text-sm text-white transition-colors hover:bg-gray-800",
2600
2600
  children: "Done"
2601
2601
  })]
@@ -2603,83 +2603,83 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2603
2603
  ]
2604
2604
  })] })
2605
2605
  });
2606
- }, Cr = ({ isOpen: e, onClose: t, stripePromise: n, clientSecret: r, onComplete: i }) => !n || !r ? null : /* @__PURE__ */ S(I.Root, {
2606
+ }, Cr = ({ isOpen: e, onClose: t, stripePromise: n, clientSecret: r, onComplete: i }) => !n || !r ? null : /* @__PURE__ */ N(F.Root, {
2607
2607
  open: e,
2608
2608
  onOpenChange: (e) => {
2609
2609
  e || t();
2610
2610
  },
2611
- children: /* @__PURE__ */ C(I.Portal, { children: [/* @__PURE__ */ S(I.Backdrop, { className: "fixed inset-0 z-[100] bg-black/50" }), /* @__PURE__ */ C(I.Popup, {
2611
+ children: /* @__PURE__ */ P(F.Portal, { children: [/* @__PURE__ */ N(F.Backdrop, { className: "fixed inset-0 z-[100] bg-black/50" }), /* @__PURE__ */ P(F.Popup, {
2612
2612
  className: "fixed top-8 left-1/2 z-[100] flex max-h-[calc(100vh-4rem)] min-h-[500px] w-[98vw] -translate-x-1/2 flex-col overflow-hidden rounded-2xl bg-white shadow-2xl md:top-10 md:w-auto md:max-w-[1000px] lg:max-w-[1100px]",
2613
- children: [/* @__PURE__ */ S(I.Close, {
2613
+ children: [/* @__PURE__ */ N(F.Close, {
2614
2614
  className: "absolute top-4 right-4 z-10 rounded-full bg-white/90 p-2.5 text-gray-500 shadow-md backdrop-blur-sm transition-all hover:bg-white hover:text-gray-700",
2615
- children: /* @__PURE__ */ S(se, { className: "size-5" })
2616
- }), /* @__PURE__ */ S("div", {
2615
+ children: /* @__PURE__ */ N(se, { className: "size-5" })
2616
+ }), /* @__PURE__ */ N("div", {
2617
2617
  className: "flex-1 overflow-y-auto rounded-2xl py-6",
2618
- children: /* @__PURE__ */ S(W, {
2618
+ children: /* @__PURE__ */ N(W, {
2619
2619
  stripe: n,
2620
2620
  options: {
2621
2621
  clientSecret: r,
2622
2622
  onComplete: i
2623
2623
  },
2624
- children: /* @__PURE__ */ S(le, { className: "stripe-embedded-checkout h-full" })
2624
+ children: /* @__PURE__ */ N(le, { className: "stripe-embedded-checkout h-full" })
2625
2625
  })
2626
2626
  })]
2627
2627
  })] })
2628
2628
  }), wr = ({ tickets: e, selectedTicket: t, onSelectTicket: n, discount: r, couponCode: i, publicCouponsCount: a, onApplyCouponClick: o, onRemoveCoupon: s, onNext: c }) => {
2629
2629
  let l = _r(t), u = gr(r);
2630
- return /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("div", {
2630
+ return /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ P("div", {
2631
2631
  className: "flex max-h-[64dvh] w-full flex-col justify-between gap-6 overflow-y-auto md:max-h-[unset] md:flex-row",
2632
- children: [/* @__PURE__ */ S("div", {
2632
+ children: [/* @__PURE__ */ N("div", {
2633
2633
  className: "flex w-full flex-col gap-3 md:w-[55%]",
2634
- children: e.map((e) => /* @__PURE__ */ S("div", {
2634
+ children: e.map((e) => /* @__PURE__ */ N("div", {
2635
2635
  className: fr("flex cursor-pointer items-center justify-between rounded-md border border-gray-300 px-3 py-2 transition duration-300 hover:bg-gray-50", e._id === t?._id ? "border-brand bg-brand/10 hover:bg-brand/20" : ""),
2636
2636
  onClick: () => n(e),
2637
- children: /* @__PURE__ */ C("div", { children: [
2638
- /* @__PURE__ */ S("p", {
2637
+ children: /* @__PURE__ */ P("div", { children: [
2638
+ /* @__PURE__ */ N("p", {
2639
2639
  className: "text-md",
2640
2640
  children: e.title
2641
2641
  }),
2642
- /* @__PURE__ */ S("p", {
2642
+ /* @__PURE__ */ N("p", {
2643
2643
  className: "-mt-[2px] mb-1 text-gray-600 text-xs",
2644
2644
  children: e.description
2645
2645
  }),
2646
- /* @__PURE__ */ C("p", {
2646
+ /* @__PURE__ */ P("p", {
2647
2647
  className: "text-md",
2648
- children: [$(e), hr(e) && /* @__PURE__ */ C("span", {
2648
+ children: [$(e), hr(e) && /* @__PURE__ */ P("span", {
2649
2649
  className: "text-gray-500 text-sm",
2650
2650
  children: [" ", hr(e)]
2651
2651
  })]
2652
2652
  })
2653
2653
  ] })
2654
2654
  }, e._id))
2655
- }), /* @__PURE__ */ C("div", {
2655
+ }), /* @__PURE__ */ P("div", {
2656
2656
  className: "w-full md:w-[45%]",
2657
- children: [/* @__PURE__ */ C("div", {
2657
+ children: [/* @__PURE__ */ P("div", {
2658
2658
  className: "mt-4 flex min-h-[250px] flex-col justify-between rounded-md border border-gray-300 p-4 md:mt-0",
2659
- children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
2659
+ children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
2660
2660
  className: "border-b border-b-gray-200 pb-1 text-md",
2661
2661
  children: "Confirm Details"
2662
- }), /* @__PURE__ */ S("div", {
2662
+ }), /* @__PURE__ */ N("div", {
2663
2663
  className: "mt-2 flex flex-col gap-2",
2664
- children: t && /* @__PURE__ */ C("div", {
2664
+ children: t && /* @__PURE__ */ P("div", {
2665
2665
  className: "flex justify-between",
2666
- children: [/* @__PURE__ */ S("span", {
2666
+ children: [/* @__PURE__ */ N("span", {
2667
2667
  className: "text-md",
2668
2668
  children: t.title
2669
- }), /* @__PURE__ */ S("span", { children: $({
2669
+ }), /* @__PURE__ */ N("span", { children: $({
2670
2670
  unit_amount: l ? t.subtotal : t.unit_amount,
2671
2671
  currency: t.currency
2672
2672
  }) })]
2673
2673
  })
2674
- })] }), r && u ? /* @__PURE__ */ C("div", {
2674
+ })] }), r && u ? /* @__PURE__ */ P("div", {
2675
2675
  className: "mt-2",
2676
2676
  children: [
2677
- /* @__PURE__ */ C("div", {
2677
+ /* @__PURE__ */ P("div", {
2678
2678
  className: "flex items-center justify-between",
2679
- children: [/* @__PURE__ */ S("span", {
2679
+ children: [/* @__PURE__ */ N("span", {
2680
2680
  className: "text-md",
2681
2681
  children: "Subtotal"
2682
- }), /* @__PURE__ */ S("span", {
2682
+ }), /* @__PURE__ */ N("span", {
2683
2683
  className: "text-md",
2684
2684
  children: $({
2685
2685
  unit_amount: r.base_amount,
@@ -2687,12 +2687,12 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2687
2687
  })
2688
2688
  })]
2689
2689
  }),
2690
- /* @__PURE__ */ C("div", {
2690
+ /* @__PURE__ */ P("div", {
2691
2691
  className: "flex items-center justify-between text-green-600",
2692
- children: [/* @__PURE__ */ S("span", {
2692
+ children: [/* @__PURE__ */ N("span", {
2693
2693
  className: "text-md",
2694
2694
  children: "Discount"
2695
- }), /* @__PURE__ */ C("span", {
2695
+ }), /* @__PURE__ */ P("span", {
2696
2696
  className: "text-md",
2697
2697
  children: [
2698
2698
  "-",
@@ -2704,12 +2704,12 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2704
2704
  ]
2705
2705
  })]
2706
2706
  }),
2707
- /* @__PURE__ */ C("div", {
2707
+ /* @__PURE__ */ P("div", {
2708
2708
  className: "flex items-center justify-between border-t border-t-gray-200 pt-1",
2709
- children: [/* @__PURE__ */ S("span", {
2709
+ children: [/* @__PURE__ */ N("span", {
2710
2710
  className: "text-md",
2711
2711
  children: "Taxable Amount"
2712
- }), /* @__PURE__ */ S("span", {
2712
+ }), /* @__PURE__ */ N("span", {
2713
2713
  className: "text-md",
2714
2714
  children: $({
2715
2715
  unit_amount: r.taxable_amount,
@@ -2717,9 +2717,9 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2717
2717
  })
2718
2718
  })]
2719
2719
  }),
2720
- r.taxes?.map((e, n) => /* @__PURE__ */ C("div", {
2720
+ r.taxes?.map((e, n) => /* @__PURE__ */ P("div", {
2721
2721
  className: "flex items-center justify-between text-gray-600",
2722
- children: [/* @__PURE__ */ C("span", {
2722
+ children: [/* @__PURE__ */ P("span", {
2723
2723
  className: "text-sm",
2724
2724
  children: [
2725
2725
  e.label,
@@ -2727,7 +2727,7 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2727
2727
  e.percentage,
2728
2728
  "%)"
2729
2729
  ]
2730
- }), /* @__PURE__ */ S("span", {
2730
+ }), /* @__PURE__ */ N("span", {
2731
2731
  className: "text-sm",
2732
2732
  children: $({
2733
2733
  unit_amount: e.amount,
@@ -2735,12 +2735,12 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2735
2735
  })
2736
2736
  })]
2737
2737
  }, e.id || e._id || n)),
2738
- /* @__PURE__ */ C("div", {
2738
+ /* @__PURE__ */ P("div", {
2739
2739
  className: "mt-1 flex items-center justify-between border-t border-t-gray-200 pt-1 font-medium",
2740
- children: [/* @__PURE__ */ S("span", {
2740
+ children: [/* @__PURE__ */ N("span", {
2741
2741
  className: "text-md",
2742
2742
  children: "Payable"
2743
- }), /* @__PURE__ */ S("span", {
2743
+ }), /* @__PURE__ */ N("span", {
2744
2744
  className: "text-md",
2745
2745
  children: $({
2746
2746
  unit_amount: r.total_amount,
@@ -2749,15 +2749,15 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2749
2749
  })]
2750
2750
  })
2751
2751
  ]
2752
- }) : r ? /* @__PURE__ */ C("div", {
2752
+ }) : r ? /* @__PURE__ */ P("div", {
2753
2753
  className: "mt-2",
2754
2754
  children: [
2755
- /* @__PURE__ */ C("div", {
2755
+ /* @__PURE__ */ P("div", {
2756
2756
  className: "flex items-center justify-between",
2757
- children: [/* @__PURE__ */ S("span", {
2757
+ children: [/* @__PURE__ */ N("span", {
2758
2758
  className: "text-md",
2759
2759
  children: "Subtotal"
2760
- }), /* @__PURE__ */ S("span", {
2760
+ }), /* @__PURE__ */ N("span", {
2761
2761
  className: "text-md",
2762
2762
  children: $({
2763
2763
  unit_amount: r.base_amount,
@@ -2765,12 +2765,12 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2765
2765
  })
2766
2766
  })]
2767
2767
  }),
2768
- /* @__PURE__ */ C("div", {
2768
+ /* @__PURE__ */ P("div", {
2769
2769
  className: "flex items-center justify-between text-green-600",
2770
- children: [/* @__PURE__ */ S("span", {
2770
+ children: [/* @__PURE__ */ N("span", {
2771
2771
  className: "text-md",
2772
2772
  children: "Discount"
2773
- }), /* @__PURE__ */ C("span", {
2773
+ }), /* @__PURE__ */ P("span", {
2774
2774
  className: "text-md",
2775
2775
  children: [
2776
2776
  "-",
@@ -2782,12 +2782,12 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2782
2782
  ]
2783
2783
  })]
2784
2784
  }),
2785
- /* @__PURE__ */ C("div", {
2785
+ /* @__PURE__ */ P("div", {
2786
2786
  className: "mt-1 flex items-center justify-between border-t border-t-gray-200 pt-1 font-medium",
2787
- children: [/* @__PURE__ */ S("span", {
2787
+ children: [/* @__PURE__ */ N("span", {
2788
2788
  className: "text-md",
2789
2789
  children: "Payable"
2790
- }), /* @__PURE__ */ S("span", {
2790
+ }), /* @__PURE__ */ N("span", {
2791
2791
  className: "text-md",
2792
2792
  children: $({
2793
2793
  unit_amount: r.sale_amount,
@@ -2796,15 +2796,15 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2796
2796
  })]
2797
2797
  })
2798
2798
  ]
2799
- }) : l ? /* @__PURE__ */ C("div", {
2799
+ }) : l ? /* @__PURE__ */ P("div", {
2800
2800
  className: "mt-2",
2801
2801
  children: [
2802
- /* @__PURE__ */ C("div", {
2802
+ /* @__PURE__ */ P("div", {
2803
2803
  className: "flex items-center justify-between",
2804
- children: [/* @__PURE__ */ S("span", {
2804
+ children: [/* @__PURE__ */ N("span", {
2805
2805
  className: "text-md",
2806
2806
  children: "Subtotal"
2807
- }), /* @__PURE__ */ S("span", {
2807
+ }), /* @__PURE__ */ N("span", {
2808
2808
  className: "text-md",
2809
2809
  children: $({
2810
2810
  unit_amount: t.subtotal,
@@ -2812,9 +2812,9 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2812
2812
  })
2813
2813
  })]
2814
2814
  }),
2815
- t.taxes.map((e, n) => /* @__PURE__ */ C("div", {
2815
+ t.taxes.map((e, n) => /* @__PURE__ */ P("div", {
2816
2816
  className: "flex items-center justify-between text-gray-600",
2817
- children: [/* @__PURE__ */ C("span", {
2817
+ children: [/* @__PURE__ */ P("span", {
2818
2818
  className: "text-sm",
2819
2819
  children: [
2820
2820
  e.label,
@@ -2822,7 +2822,7 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2822
2822
  e.percentage,
2823
2823
  "%)"
2824
2824
  ]
2825
- }), /* @__PURE__ */ S("span", {
2825
+ }), /* @__PURE__ */ N("span", {
2826
2826
  className: "text-sm",
2827
2827
  children: $({
2828
2828
  unit_amount: e.amount,
@@ -2830,12 +2830,12 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2830
2830
  })
2831
2831
  })]
2832
2832
  }, e.id || e._id || n)),
2833
- /* @__PURE__ */ C("div", {
2833
+ /* @__PURE__ */ P("div", {
2834
2834
  className: "mt-1 flex items-center justify-between border-t border-t-gray-200 pt-1 font-medium",
2835
- children: [/* @__PURE__ */ S("span", {
2835
+ children: [/* @__PURE__ */ N("span", {
2836
2836
  className: "text-md",
2837
2837
  children: "Payable"
2838
- }), /* @__PURE__ */ S("span", {
2838
+ }), /* @__PURE__ */ N("span", {
2839
2839
  className: "text-md",
2840
2840
  children: $({
2841
2841
  unit_amount: t.total,
@@ -2843,58 +2843,58 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2843
2843
  })
2844
2844
  })]
2845
2845
  }),
2846
- t.tax_inclusive && /* @__PURE__ */ S("p", {
2846
+ t.tax_inclusive && /* @__PURE__ */ N("p", {
2847
2847
  className: "mt-1 text-gray-500 text-xs",
2848
2848
  children: "* Price is inclusive of taxes"
2849
2849
  })
2850
2850
  ]
2851
- }) : /* @__PURE__ */ S("div", {
2851
+ }) : /* @__PURE__ */ N("div", {
2852
2852
  className: "mt-2",
2853
- children: /* @__PURE__ */ C("div", {
2853
+ children: /* @__PURE__ */ P("div", {
2854
2854
  className: "flex items-center justify-between font-medium",
2855
- children: [/* @__PURE__ */ S("span", {
2855
+ children: [/* @__PURE__ */ N("span", {
2856
2856
  className: "text-md",
2857
2857
  children: "Payable"
2858
- }), /* @__PURE__ */ S("span", {
2858
+ }), /* @__PURE__ */ N("span", {
2859
2859
  className: "text-md",
2860
2860
  children: $(t)
2861
2861
  })]
2862
2862
  })
2863
2863
  })]
2864
- }), r ? /* @__PURE__ */ S("div", {
2864
+ }), r ? /* @__PURE__ */ N("div", {
2865
2865
  className: "flex flex-col justify-between gap-1 py-2",
2866
- children: /* @__PURE__ */ C("div", {
2866
+ children: /* @__PURE__ */ P("div", {
2867
2867
  className: "mt-2 mb-1 space-y-1 rounded-lg border border-green-200 bg-green-50 px-3 py-3",
2868
- children: [/* @__PURE__ */ C("div", {
2868
+ children: [/* @__PURE__ */ P("div", {
2869
2869
  className: "flex items-start justify-between gap-2",
2870
- children: [/* @__PURE__ */ C("div", {
2870
+ children: [/* @__PURE__ */ P("div", {
2871
2871
  className: "flex max-w-16 items-center gap-2",
2872
- children: [/* @__PURE__ */ S("div", {
2872
+ children: [/* @__PURE__ */ N("div", {
2873
2873
  className: "rounded bg-green-500 p-2",
2874
- children: /* @__PURE__ */ S(ae, {
2874
+ children: /* @__PURE__ */ N(ae, {
2875
2875
  size: 16,
2876
2876
  className: "text-white"
2877
2877
  })
2878
- }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("div", {
2878
+ }), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("div", {
2879
2879
  className: "font-medium text-green-700 text-xs uppercase opacity-60",
2880
2880
  children: "Coupon Applied"
2881
- }), /* @__PURE__ */ S("div", {
2881
+ }), /* @__PURE__ */ N("div", {
2882
2882
  className: "-mt-0.5 max-w-32 truncate font-bold text-green-900 text-sm tracking-wide",
2883
2883
  children: i
2884
2884
  })] })]
2885
- }), /* @__PURE__ */ S("button", {
2885
+ }), /* @__PURE__ */ N("button", {
2886
2886
  type: "button",
2887
2887
  onClick: s,
2888
2888
  className: "rounded-md p-1 text-green-600 transition-colors hover:bg-green-100 hover:text-green-800",
2889
2889
  "aria-label": "Remove coupon",
2890
- children: /* @__PURE__ */ S(oe, { size: 18 })
2890
+ children: /* @__PURE__ */ N(oe, { size: 18 })
2891
2891
  })]
2892
- }), /* @__PURE__ */ C("div", {
2892
+ }), /* @__PURE__ */ P("div", {
2893
2893
  className: "text-green-700 text-xs",
2894
2894
  children: [
2895
2895
  "You are saving",
2896
2896
  " ",
2897
- /* @__PURE__ */ S("span", {
2897
+ /* @__PURE__ */ N("span", {
2898
2898
  className: "font-semibold",
2899
2899
  children: $({
2900
2900
  unit_amount: r.discount,
@@ -2904,33 +2904,33 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2904
2904
  ]
2905
2905
  })]
2906
2906
  })
2907
- }) : /* @__PURE__ */ C("div", {
2907
+ }) : /* @__PURE__ */ P("div", {
2908
2908
  className: fr("flex cursor-pointer items-center justify-between border-b border-b-gray-300 pr-1 pl-4 transition-all duration-200 hover:bg-gray-50", t ? "h-[50px] py-3" : "py-3"),
2909
2909
  onClick: () => t ? o() : null,
2910
- children: [/* @__PURE__ */ C("span", {
2910
+ children: [/* @__PURE__ */ P("span", {
2911
2911
  className: "flex items-center gap-2",
2912
- children: ["Apply Coupon", a > 0 && /* @__PURE__ */ S("span", {
2912
+ children: ["Apply Coupon", a > 0 && /* @__PURE__ */ N("span", {
2913
2913
  className: "rounded-full bg-gray-200 px-2 py-0.5 text-gray-600 text-xs",
2914
2914
  children: a
2915
2915
  })]
2916
- }), /* @__PURE__ */ S("span", { children: /* @__PURE__ */ S(re, {}) })]
2916
+ }), /* @__PURE__ */ N("span", { children: /* @__PURE__ */ N(re, {}) })]
2917
2917
  })]
2918
2918
  })]
2919
- }), /* @__PURE__ */ S("div", {
2919
+ }), /* @__PURE__ */ N("div", {
2920
2920
  className: "mt-3 flex justify-start",
2921
- children: /* @__PURE__ */ S(Q, {
2921
+ children: /* @__PURE__ */ N(Q, {
2922
2922
  onClick: c,
2923
2923
  className: "rounded-lg bg-brand px-6 py-2 font-semibold text-brand-foreground hover:opacity-90",
2924
2924
  children: "Continue for Payment"
2925
2925
  })
2926
2926
  })] });
2927
2927
  }, Tr = () => {
2928
- let [e, t] = P(null), [n, r] = P(null), [i, a] = P(!1), [o, s] = P(null);
2928
+ let [e, t] = A(null), [n, r] = A(null), [i, a] = A(!1), [o, s] = A(null);
2929
2929
  return {
2930
2930
  stripePromise: e,
2931
2931
  config: n,
2932
2932
  isOpen: i,
2933
- openStripeCheckout: O(async (e) => {
2933
+ openStripeCheckout: w(async (e) => {
2934
2934
  try {
2935
2935
  let { loadStripe: n } = await import("@stripe/stripe-js");
2936
2936
  t(n(e.key)), r({ clientSecret: e.client_secret }), a(!0);
@@ -2938,13 +2938,13 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2938
2938
  console.error("Failed to initialize Stripe checkout:", e);
2939
2939
  }
2940
2940
  }, []),
2941
- closeStripeCheckout: O(() => {
2941
+ closeStripeCheckout: w(() => {
2942
2942
  a(!1), setTimeout(() => {
2943
2943
  r(null), t(null);
2944
2944
  }, 300);
2945
2945
  }, []),
2946
2946
  onComplete: o,
2947
- setOnComplete: O((e) => {
2947
+ setOnComplete: w((e) => {
2948
2948
  s(() => e);
2949
2949
  }, [])
2950
2950
  };
@@ -2977,8 +2977,8 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2977
2977
  e.logger?.error("Failed to fetch event tickets", { exception: b(t) });
2978
2978
  }
2979
2979
  }, kr = ({ eventID: e, title: t, external: n, buttonText: r = "Register Now" }) => {
2980
- let a = i(), [o, s] = P([]), [c, l] = P(!0), [u, d] = P(!1), [f, p] = P(!1), [m, h] = P(null), [g, _] = P(void 0), [v, y] = P(""), [w, T] = P(null), [E, D] = P(!1), [k, j] = P(null), [M, F] = P(!1), [L, R] = P(1), [z, B] = P(null), [V, ee] = P([]), [H, te] = P(Er), ne = vr(m, w) === 0, U = N(null), re = () => te(Er), ie = () => {
2981
- T(null), _(void 0), j(null), D(!1), y(""), B(null), d(!1), R(1), re();
2980
+ let a = i(), [o, s] = A([]), [c, l] = A(!0), [u, d] = A(!1), [f, p] = A(!1), [m, h] = A(null), [g, _] = A(void 0), [v, y] = A(""), [ee, x] = A(null), [S, C] = A(!1), [T, D] = A(null), [O, j] = A(!1), [I, L] = A(1), [R, z] = A(null), [B, V] = A([]), [H, te] = A(Er), ne = vr(m, ee) === 0, U = k(null), re = () => te(Er), ie = () => {
2981
+ x(null), _(void 0), D(null), C(!1), y(""), z(null), d(!1), L(1), re();
2982
2982
  }, { Razorpay: ae } = ce(), { stripePromise: oe, config: le, isOpen: W, openStripeCheckout: ue, closeStripeCheckout: G, setOnComplete: de } = Tr(), fe = () => {
2983
2983
  let e = U.current;
2984
2984
  !e || !a || a.fetch?.url(`/v1/event/booking/${e.bookingId}/confirm-booking`)?.post({ session_id: e.sessionId })?.json().then((e) => {
@@ -2988,7 +2988,7 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
2988
2988
  });
2989
2989
  }, K = async () => {
2990
2990
  if (!a) return;
2991
- p(!0), B(null);
2991
+ p(!0), z(null);
2992
2992
  let { name: t, email: n, is_business_purchase: r, billing_details: i } = H;
2993
2993
  try {
2994
2994
  let o = {
@@ -3003,7 +3003,7 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
3003
3003
  };
3004
3004
  r && !ne && (o.is_business_purchase = !0, o.billing_details = i);
3005
3005
  let s = await a.fetch?.url(`/v1/event/event/${e}/booking/create-new-booking`)?.post(o).json();
3006
- if (!s?.status) B("Booking failed. Please try again.");
3006
+ if (!s?.status) z("Booking failed. Please try again.");
3007
3007
  else {
3008
3008
  ie();
3009
3009
  let e = s?.content?.meta;
@@ -3029,7 +3029,7 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
3029
3029
  } else _(s?.content.data);
3030
3030
  }
3031
3031
  } catch (e) {
3032
- B(b(e).message || "Something went wrong. Please try again.");
3032
+ z(b(e).message || "Something went wrong. Please try again.");
3033
3033
  }
3034
3034
  p(!1);
3035
3035
  }, pe = async (e) => {
@@ -3062,17 +3062,17 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
3062
3062
  n.on("payment.failed", (e) => {
3063
3063
  a.logger?.error("Razorpay payment failed", { exception: b(e.error) });
3064
3064
  }), n.open();
3065
- }, me = O(async () => {
3065
+ }, me = w(async () => {
3066
3066
  if (a) try {
3067
3067
  let t = await a.fetch?.url(`/v1/event/event/${e}/coupon/list-public-coupons`)?.get().json();
3068
- t?.status && t?.content?.data && ee(t.content.data);
3068
+ t?.status && t?.content?.data && V(t.content.data);
3069
3069
  } catch (e) {
3070
3070
  a.logger?.error("Failed to fetch public coupons", { exception: b(e) });
3071
3071
  }
3072
3072
  }, [a, e]), he = async (t) => {
3073
3073
  if (!a) return;
3074
3074
  let n = t ?? v;
3075
- D(!0), j(null);
3075
+ C(!0), D(null);
3076
3076
  try {
3077
3077
  let t = await a.fetch?.url(`/v1/event/event/${e}/coupon/validate-coupon-code`)?.post({
3078
3078
  coupon: n,
@@ -3083,23 +3083,23 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
3083
3083
  ticket: m?._id
3084
3084
  }]
3085
3085
  }).json();
3086
- t?.status && (T(t.content.data), y(n)), F(!1), D(!1);
3086
+ t?.status && (x(t.content.data), y(n)), j(!1), C(!1);
3087
3087
  } catch (e) {
3088
- j(b(e).message), D(!1);
3088
+ D(b(e).message), C(!1);
3089
3089
  }
3090
3090
  }, ge = (e) => {
3091
- y(""), T(null), j(null), D(!1), B(null), h(e);
3091
+ y(""), x(null), D(null), C(!1), z(null), h(e);
3092
3092
  }, _e = () => {
3093
- T(null), j(null), y("");
3093
+ x(null), D(null), y("");
3094
3094
  }, ve = () => {
3095
- j(null), D(!1), y(""), F(!1);
3095
+ D(null), C(!1), y(""), j(!1);
3096
3096
  }, ye = (e) => {
3097
3097
  let { name: t, value: n, type: r, checked: i } = e.target;
3098
3098
  te((e) => Dr(e, t, r === "checkbox" ? i : n));
3099
3099
  }, be = () => {}, xe = (e) => {
3100
3100
  e?.preventDefault(), K();
3101
3101
  };
3102
- if (A(() => {
3102
+ if (E(() => {
3103
3103
  if (n) {
3104
3104
  l(!1);
3105
3105
  return;
@@ -3111,102 +3111,102 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
3111
3111
  e,
3112
3112
  n,
3113
3113
  a
3114
- ]), A(() => {
3115
- m?.unit_amount === 0 && o?.length === 1 && R(2);
3116
- }, [m, o]), A(() => {
3114
+ ]), E(() => {
3115
+ m?.unit_amount === 0 && o?.length === 1 && L(2);
3116
+ }, [m, o]), E(() => {
3117
3117
  u && e && me();
3118
3118
  }, [
3119
3119
  u,
3120
3120
  e,
3121
3121
  me
3122
- ]), n) return /* @__PURE__ */ S("div", {
3122
+ ]), n) return /* @__PURE__ */ N("div", {
3123
3123
  className: "my-2",
3124
- children: /* @__PURE__ */ S(Q, {
3124
+ children: /* @__PURE__ */ N(Q, {
3125
3125
  className: "rounded-lg bg-brand px-4 py-3 font-semibold text-brand-foreground hover:opacity-90",
3126
3126
  onClick: () => window.open(n, "_blank", "noopener,noreferrer"),
3127
3127
  children: r
3128
3128
  })
3129
3129
  });
3130
- if (c) return /* @__PURE__ */ S("div", {
3130
+ if (c) return /* @__PURE__ */ N("div", {
3131
3131
  className: "my-2",
3132
- children: /* @__PURE__ */ S(Q, {
3132
+ children: /* @__PURE__ */ N(Q, {
3133
3133
  className: "rounded-lg bg-brand px-4 py-2 font-bold text-brand-foreground",
3134
3134
  children: "Loading..."
3135
3135
  })
3136
3136
  });
3137
3137
  let q = ne ? "Complete Registration" : "Pay";
3138
- return /* @__PURE__ */ C(x, { children: [
3139
- /* @__PURE__ */ S("div", {
3138
+ return /* @__PURE__ */ P(M, { children: [
3139
+ /* @__PURE__ */ N("div", {
3140
3140
  className: "my-2",
3141
- children: o?.length ? /* @__PURE__ */ S(Q, {
3141
+ children: o?.length ? /* @__PURE__ */ N(Q, {
3142
3142
  onClick: () => d(!0),
3143
3143
  className: "rounded-lg bg-brand px-4 py-3 font-semibold text-brand-foreground hover:opacity-90",
3144
3144
  children: r
3145
- }) : /* @__PURE__ */ S("p", {
3145
+ }) : /* @__PURE__ */ N("p", {
3146
3146
  className: "text-red-500",
3147
3147
  children: "No tickets available for this event."
3148
3148
  })
3149
3149
  }),
3150
- /* @__PURE__ */ S(I.Root, {
3150
+ /* @__PURE__ */ N(F.Root, {
3151
3151
  open: u,
3152
3152
  onOpenChange: (e) => {
3153
3153
  e || ie();
3154
3154
  },
3155
- children: /* @__PURE__ */ C(I.Portal, { children: [/* @__PURE__ */ S(I.Backdrop, { className: "fixed inset-0 z-[100] bg-black/50" }), /* @__PURE__ */ C(I.Popup, {
3156
- className: fr("fixed top-24 left-1/2 z-[100] flex max-h-[calc(100dvh-12rem)] w-[90%] -translate-x-1/2 flex-col overflow-y-auto rounded-lg bg-white p-4", M ? "md:w-[30%]" : "md:w-[40%]"),
3157
- children: [/* @__PURE__ */ C("div", {
3158
- className: `mb-4 flex w-full items-start justify-between ${M ? "" : "pb-[6px]"} `,
3159
- children: [/* @__PURE__ */ C(I.Title, {
3155
+ children: /* @__PURE__ */ P(F.Portal, { children: [/* @__PURE__ */ N(F.Backdrop, { className: "fixed inset-0 z-[100] bg-black/50" }), /* @__PURE__ */ P(F.Popup, {
3156
+ className: fr("fixed top-24 left-1/2 z-[100] flex max-h-[calc(100dvh-12rem)] w-[90%] -translate-x-1/2 flex-col overflow-y-auto rounded-lg bg-white p-4", O ? "md:w-[30%]" : "md:w-[40%]"),
3157
+ children: [/* @__PURE__ */ P("div", {
3158
+ className: `mb-4 flex w-full items-start justify-between ${O ? "" : "pb-[6px]"} `,
3159
+ children: [/* @__PURE__ */ P(F.Title, {
3160
3160
  className: "font-semibold text-lg",
3161
3161
  children: [
3162
3162
  "Register for ",
3163
3163
  t,
3164
3164
  "!"
3165
3165
  ]
3166
- }), /* @__PURE__ */ S(I.Close, {
3166
+ }), /* @__PURE__ */ N(F.Close, {
3167
3167
  className: "rounded-md p-2 hover:bg-gray-100 focus:outline-none",
3168
- children: /* @__PURE__ */ S(se, { className: "size-4" })
3168
+ children: /* @__PURE__ */ N(se, { className: "size-4" })
3169
3169
  })]
3170
- }), /* @__PURE__ */ C("div", { children: [z && /* @__PURE__ */ S("div", {
3170
+ }), /* @__PURE__ */ P("div", { children: [R && /* @__PURE__ */ N("div", {
3171
3171
  className: "mb-4 rounded-md bg-red-50 p-3 text-red-600 text-sm",
3172
- children: z
3173
- }), L === 1 ? /* @__PURE__ */ S("div", { children: M ? /* @__PURE__ */ S(br, {
3172
+ children: R
3173
+ }), I === 1 ? /* @__PURE__ */ N("div", { children: O ? /* @__PURE__ */ N(br, {
3174
3174
  couponCode: v,
3175
3175
  onCouponCodeChange: y,
3176
- couponError: k,
3177
- couponLoading: E,
3176
+ couponError: T,
3177
+ couponLoading: S,
3178
3178
  onValidateCoupon: he,
3179
- publicCoupons: V,
3179
+ publicCoupons: B,
3180
3180
  onBack: ve,
3181
3181
  selectedTicket: m
3182
- }) : /* @__PURE__ */ S(wr, {
3182
+ }) : /* @__PURE__ */ N(wr, {
3183
3183
  tickets: o,
3184
3184
  selectedTicket: m,
3185
3185
  onSelectTicket: ge,
3186
- discount: w,
3186
+ discount: ee,
3187
3187
  couponCode: v,
3188
- publicCouponsCount: V.length,
3189
- onApplyCouponClick: () => F(!0),
3188
+ publicCouponsCount: B.length,
3189
+ onApplyCouponClick: () => j(!0),
3190
3190
  onRemoveCoupon: _e,
3191
- onNext: () => R(2)
3192
- }) }) : /* @__PURE__ */ S(pr, {
3191
+ onNext: () => L(2)
3192
+ }) }) : /* @__PURE__ */ N(pr, {
3193
3193
  values: H,
3194
3194
  handleChange: ye,
3195
3195
  handleBlur: be,
3196
3196
  handleSubmit: xe,
3197
3197
  registerLoading: f,
3198
- onBack: () => R(1),
3198
+ onBack: () => L(1),
3199
3199
  submitLabel: q,
3200
3200
  showBusinessBilling: !ne
3201
3201
  })] })]
3202
3202
  })] })
3203
3203
  }),
3204
- g && /* @__PURE__ */ S(Sr, {
3204
+ g && /* @__PURE__ */ N(Sr, {
3205
3205
  paymentData: g,
3206
3206
  ticketData: o,
3207
3207
  type: "confirm"
3208
3208
  }),
3209
- W && le && /* @__PURE__ */ S(Cr, {
3209
+ W && le && /* @__PURE__ */ N(Cr, {
3210
3210
  isOpen: W,
3211
3211
  onClose: G,
3212
3212
  stripePromise: oe,
@@ -3278,12 +3278,12 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
3278
3278
  });
3279
3279
  };
3280
3280
  }, Lr = 2, Rr = (e) => {
3281
- let { limit: t = 20, debounceMs: n = 300, hotkey: r = !0 } = e ?? {}, a = i(), o = Kn(), s = J(), [c, l] = P(""), [u, d] = P(!1), [f, p] = P("");
3282
- A(() => {
3281
+ let { limit: t = 20, debounceMs: n = 300, hotkey: r = !0 } = e ?? {}, a = i(), o = Kn(), s = J(), [c, l] = A(""), [u, d] = A(!1), [f, p] = A("");
3282
+ E(() => {
3283
3283
  let e = setTimeout(() => p(c.trim()), n);
3284
3284
  return () => clearTimeout(e);
3285
3285
  }, [c, n]);
3286
- let m = f.length >= Lr, h = z({
3286
+ let m = f.length >= Lr, h = R({
3287
3287
  queryKey: [
3288
3288
  "levo-search",
3289
3289
  o?.id ?? null,
@@ -3303,12 +3303,12 @@ var pr = ({ values: e, handleChange: t, handleBlur: n, handleSubmit: r, register
3303
3303
  }
3304
3304
  },
3305
3305
  enabled: s && !!a && !!o?.id && m,
3306
- placeholderData: L,
3306
+ placeholderData: I,
3307
3307
  staleTime: 3e4
3308
- }), g = O(() => {
3308
+ }), g = w(() => {
3309
3309
  l(""), p("");
3310
- }, []), _ = O(() => d(!0), []), v = O(() => d(!1), []);
3311
- A(() => {
3310
+ }, []), _ = w(() => d(!0), []), v = w(() => d(!1), []);
3311
+ E(() => {
3312
3312
  if (!r) return;
3313
3313
  let e = (e) => {
3314
3314
  e.key !== "k" || !(e.metaKey || e.ctrlKey) || (e.preventDefault(), d((e) => !e));