@chaibuilder/pages 0.5.4 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,14 +10,14 @@ import Hn, { useCallback as be, useState as A, useEffect as Ee, useRef as lt, us
10
10
  import { useAtom as gn, atom as Wn } from "jotai";
11
11
  import { useQueryClient as Se, useMutation as xe, useQuery as _e, onlineManager as Sa, QueryClient as Ei, QueryClientProvider as Ni } from "@tanstack/react-query";
12
12
  import { toast as W } from "sonner";
13
- import { useLanguages as ct, useUpdateBlocksPropsRealtime as xa, PERMISSIONS as wi, usePartailBlocksStore as Si, usePermissions as Ft, useLibraryBlocks as xi, useTheme as Ai, useSidebarActivePanel as Aa, useSavePage as Ss, mergeClasses as xs, useRightPanel as Ti, useBlocksStore as Ci, registerChaiLibrary as Pi, getBlocksFromHTML as _i, useTranslation as Ii, registerChaiSidebarPanel as ss, registerChaiTopBar as ki, registerChaiMediaManager as Li, registerChaiSaveToLibrary as Di, ChaiBuilderEditor as Gi } from "@chaibuilder/sdk";
14
- import { Card as As, CardHeader as Ts, CardTitle as Cs, CardContent as Ps, CardFooter as _s, Button as T, AlertDialog as Ta, AlertDialogTrigger as Ca, AlertDialogContent as Pa, AlertDialogHeader as _a, AlertDialogTitle as Ia, AlertDialogDescription as ka, AlertDialogFooter as La, AlertDialogCancel as Da, AlertDialogAction as Ga, Popover as Ua, PopoverTrigger as Oa, PopoverContent as Ra, Input as Ae, Label as te, Dialog as qe, DialogContent as ze, DialogHeader as $e, DialogTitle as Ke, DialogDescription as Ye, Alert as Is, DialogFooter as tt, DropdownMenu as pn, DropdownMenuTrigger as yn, DropdownMenuContent as vn, DropdownMenuItem as Be, Textarea as wt, Tooltip as bn, TooltipTrigger as En, TooltipContent as Nn, Select as Ui, SelectTrigger as Oi, SelectValue as Ri, SelectContent as Bi, SelectItem as as, Badge as rs, Sheet as Ba, SheetContent as Ma, SheetHeader as Fa, SheetTitle as ja, SheetDescription as Mi, Separator as Fi, TooltipProvider as ks, SheetTrigger as ji, ScrollArea as qi, Skeleton as Cn, DropdownMenuSeparator as zi, CardDescription as $i, Command as Ki, CommandInput as Vi, CommandList as Hi, CommandEmpty as Wi, CommandGroup as Yi, CommandItem as Zs, Switch as Qi, AlertDescription as Xi, Accordion as Zi, AccordionItem as Pn, AccordionTrigger as _n, AccordionContent as In, HoverCard as Ji, HoverCardTrigger as el, HoverCardContent as tl } from "@chaibuilder/sdk/ui";
15
- import { LockIcon as Ls, UserIcon as nl, AlertTriangleIcon as sl, Trash2 as Yn, Plus as Ds, ImageIcon as Xt, X as Gs, AlertCircle as Qn, StarIcon as al, MoreHorizontal as Us, PencilIcon as rl, Power as qa, TrashIcon as il, Tag as ll, File as wn, Search as za, StarsIcon as ol, Globe as cl, CopyPlusIcon as ul, Pencil as $a, Trash as Os, SquareLibrary as Js, Logs as dl, Loader as gt, Languages as hl, ChevronDown as Ka, Star as ml, History as ea, ArrowUpRight as fl, Clock as gl, Undo2 as Va, CloudOff as pl, Edit as Ha, Save as Wa, GlobeIcon as yl, Eye as Ya, Palette as vl, CheckCircle as bl, Send as ta, Rocket as na, Settings as El, ExternalLink as Nl, EyeOff as wl, Loader2 as Qa, LanguagesIcon as Sl, DatabaseIcon as xl, ChevronLeft as Xa, ChevronRight as Al, Archive as Tl, Film as Cl, Check as Pl, Upload as _l, AlertTriangle as Il, User as kl } from "lucide-react";
16
- import { format as Xn, formatDistanceToNow as Ll } from "date-fns";
17
- import { useRegisteredChaiBlocks as Dl, getDefaultBlockProps as Gl } from "@chaibuilder/runtime";
13
+ import { useLanguages as ct, useUpdateBlocksPropsRealtime as xa, PERMISSIONS as wi, usePartailBlocksStore as Si, usePermissions as Ft, useLibraryBlocks as xi, useTheme as Ai, useSidebarActivePanel as Aa, useSavePage as Ss, mergeClasses as xs, useRightPanel as Ti, registerChaiLibrary as Ci, getBlocksFromHTML as Pi, useTranslation as _i, registerChaiSidebarPanel as ss, registerChaiTopBar as Ii, registerChaiMediaManager as ki, registerChaiSaveToLibrary as Li, ChaiBuilderEditor as Di } from "@chaibuilder/sdk";
14
+ import { Card as As, CardHeader as Ts, CardTitle as Cs, CardContent as Ps, CardFooter as _s, Button as T, AlertDialog as Ta, AlertDialogTrigger as Ca, AlertDialogContent as Pa, AlertDialogHeader as _a, AlertDialogTitle as Ia, AlertDialogDescription as ka, AlertDialogFooter as La, AlertDialogCancel as Da, AlertDialogAction as Ga, Popover as Ua, PopoverTrigger as Oa, PopoverContent as Ra, Input as Ae, Label as te, Dialog as qe, DialogContent as ze, DialogHeader as $e, DialogTitle as Ke, DialogDescription as Ye, Alert as Is, DialogFooter as tt, DropdownMenu as pn, DropdownMenuTrigger as yn, DropdownMenuContent as vn, DropdownMenuItem as Be, Textarea as wt, Tooltip as bn, TooltipTrigger as En, TooltipContent as Nn, Select as Gi, SelectTrigger as Ui, SelectValue as Oi, SelectContent as Ri, SelectItem as as, Badge as rs, Sheet as Ba, SheetContent as Ma, SheetHeader as Fa, SheetTitle as ja, SheetDescription as Bi, Separator as Mi, TooltipProvider as ks, SheetTrigger as Fi, ScrollArea as ji, Skeleton as Cn, DropdownMenuSeparator as qi, CardDescription as zi, Command as $i, CommandInput as Ki, CommandList as Vi, CommandEmpty as Hi, CommandGroup as Wi, CommandItem as Zs, Switch as Yi, AlertDescription as Qi, Accordion as Xi, AccordionItem as Pn, AccordionTrigger as _n, AccordionContent as In, HoverCard as Zi, HoverCardTrigger as Ji, HoverCardContent as el } from "@chaibuilder/sdk/ui";
15
+ import { LockIcon as Ls, UserIcon as tl, AlertTriangleIcon as nl, Trash2 as Yn, Plus as Ds, ImageIcon as Xt, X as Gs, AlertCircle as Qn, StarIcon as sl, MoreHorizontal as Us, PencilIcon as al, Power as qa, TrashIcon as rl, Tag as il, File as wn, Search as za, StarsIcon as ll, Globe as ol, CopyPlusIcon as cl, Pencil as $a, Trash as Os, SquareLibrary as Js, Logs as ul, Loader as gt, Languages as dl, ChevronDown as Ka, Star as hl, History as ea, ArrowUpRight as ml, Clock as fl, Undo2 as Va, CloudOff as gl, Edit as Ha, Save as Wa, GlobeIcon as pl, Eye as Ya, Palette as yl, CheckCircle as vl, Send as ta, Rocket as na, Settings as bl, ExternalLink as El, EyeOff as Nl, Loader2 as Qa, LanguagesIcon as wl, DatabaseIcon as Sl, ChevronLeft as Xa, ChevronRight as xl, Archive as Al, Film as Tl, Check as Cl, Upload as Pl, AlertTriangle as _l, User as Il } from "lucide-react";
16
+ import { format as Xn, formatDistanceToNow as kl } from "date-fns";
17
+ import { useRegisteredChaiBlocks as Ll, getDefaultBlockProps as Dl } from "@chaibuilder/runtime";
18
18
  import { z as Rn } from "zod";
19
- import { useDropzone as Ul } from "react-dropzone";
20
- import { loadWebBlocks as Ol } from "@chaibuilder/sdk/web-blocks";
19
+ import { useDropzone as Gl } from "react-dropzone";
20
+ import { loadWebBlocks as Ul } from "@chaibuilder/sdk/web-blocks";
21
21
  const Xe = {
22
22
  ab: "Abkhazian",
23
23
  aa: "Afar",
@@ -258,28 +258,28 @@ const Xe = {
258
258
  GET_ASSETS: "GET_ASSETS",
259
259
  GET_ASSET: "GET_ASSET"
260
260
  }, j = "chaibuilder";
261
- let Rl = 0;
261
+ let Ol = 0;
262
262
  function sa(e, t) {
263
- const n = `atom${++Rl}`, s = {
263
+ const n = `atom${++Ol}`, s = {
264
264
  toString() {
265
265
  return n;
266
266
  }
267
267
  };
268
- return typeof e == "function" ? s.read = e : (s.init = e, s.read = Bl, s.write = Ml), t && (s.write = t), s;
268
+ return typeof e == "function" ? s.read = e : (s.init = e, s.read = Rl, s.write = Bl), t && (s.write = t), s;
269
269
  }
270
- function Bl(e) {
270
+ function Rl(e) {
271
271
  return e(this);
272
272
  }
273
- function Ml(e, t, n) {
273
+ function Bl(e, t, n) {
274
274
  return t(
275
275
  this,
276
276
  typeof n == "function" ? n(e(this)) : n
277
277
  );
278
278
  }
279
- const Fl = Symbol(
279
+ const Ml = Symbol(
280
280
  ""
281
- ), jl = (e) => typeof (e == null ? void 0 : e.then) == "function";
282
- function ql(e = () => {
281
+ ), Fl = (e) => typeof (e == null ? void 0 : e.then) == "function";
282
+ function jl(e = () => {
283
283
  try {
284
284
  return window.localStorage;
285
285
  } catch {
@@ -302,7 +302,7 @@ function ql(e = () => {
302
302
  }
303
303
  return r;
304
304
  }, p = (f = (h = e()) == null ? void 0 : h.getItem(u)) != null ? f : null;
305
- return jl(p) ? p.then(y) : y(p);
305
+ return Fl(p) ? p.then(y) : y(p);
306
306
  },
307
307
  setItem: (u, d) => {
308
308
  var h;
@@ -341,8 +341,8 @@ function ql(e = () => {
341
341
  };
342
342
  }), o && (i.subscribe = l(o)), i;
343
343
  }
344
- const zl = ql();
345
- function $l(e, t, n = zl, s) {
344
+ const ql = jl();
345
+ function zl(e, t, n = ql, s) {
346
346
  const r = sa(
347
347
  t
348
348
  );
@@ -354,17 +354,17 @@ function $l(e, t, n = zl, s) {
354
354
  (l) => l(r),
355
355
  (l, o, u) => {
356
356
  const d = typeof u == "function" ? u(l(r)) : u;
357
- return d === Fl ? (o(r, t), n.removeItem(e)) : d instanceof Promise ? d.then((h) => (o(r, h), n.setItem(e, h))) : (o(r, d), n.setItem(e, d));
357
+ return d === Ml ? (o(r, t), n.removeItem(e)) : d instanceof Promise ? d.then((h) => (o(r, h), n.setItem(e, h))) : (o(r, d), n.setItem(e, d));
358
358
  }
359
359
  );
360
360
  }
361
361
  localStorage.removeItem("_chai_user");
362
362
  localStorage.removeItem("__chai__user");
363
- const Za = "__logged_in_user", Kl = $l(
363
+ const Za = "__logged_in_user", $l = zl(
364
364
  Za,
365
365
  null
366
366
  ), ut = () => {
367
- const [e, t] = gn(Kl), n = be(() => {
367
+ const [e, t] = gn($l), n = be(() => {
368
368
  t(null), localStorage.removeItem(Za);
369
369
  }, [t]);
370
370
  return {
@@ -451,7 +451,7 @@ const z = () => {
451
451
  });
452
452
  }
453
453
  });
454
- }, Vl = () => {
454
+ }, Kl = () => {
455
455
  const e = se(), t = Se(), n = z();
456
456
  return xe({
457
457
  mutationFn: async (s) => n(e, { action: P.UPDATE_WEBSITE_DATA, data: s }),
@@ -480,7 +480,7 @@ function Me() {
480
480
  };
481
481
  }, []), [e, t];
482
482
  }
483
- const Hl = Wn({}), tr = () => gn(Hl), Wl = () => {
483
+ const Vl = Wn({}), tr = () => gn(Vl), Hl = () => {
484
484
  const [e] = Me(), t = e.get("page"), n = lt(""), { mutate: s } = Ja();
485
485
  Ee(() => {
486
486
  !ue(n.current) && t !== n.current && s({ id: n.current }), n.current = t;
@@ -550,19 +550,19 @@ const Hl = Wn({}), tr = () => gn(Hl), Wl = () => {
550
550
  queryFn: async () => e(t, { action: P.GET_WEBSITE_PAGES }) || [],
551
551
  placeholderData: (n) => n
552
552
  });
553
- }, Yl = Wn({ lastSaved: void 0 }), Fs = () => gn(Yl), Ve = () => {
553
+ }, Wl = Wn({ lastSaved: void 0 }), Fs = () => gn(Wl), Ve = () => {
554
554
  const [e] = Me(), t = e.get("page"), [n] = sr(), { data: s, isFetching: r } = Zn();
555
555
  return { data: ne(
556
556
  () => ({ ...we(s, { id: t }) || {}, metadata: n }),
557
557
  [s, t, n]
558
558
  ), isFetching: r };
559
- }, Ql = () => {
559
+ }, Yl = () => {
560
560
  const [e] = Me(), t = e.get("lang") ?? "", { data: n, isFetching: s } = jt();
561
561
  return { data: ne(
562
562
  () => we(n, { lang: t }) || {},
563
563
  [n, t]
564
564
  ), isFetching: s };
565
- }, Xl = Wn({}), sr = () => gn(Xl), qt = (e) => {
565
+ }, Ql = Wn({}), sr = () => gn(Ql), qt = (e) => {
566
566
  const t = Bs(), n = z();
567
567
  return _e({
568
568
  queryKey: [j, "chaiUserInfo", e],
@@ -572,8 +572,8 @@ const Hl = Wn({}), tr = () => gn(Hl), Wl = () => {
572
572
  }),
573
573
  enabled: !ue(e)
574
574
  });
575
- }, Zl = Wn(void 0), xn = () => {
576
- const [e] = Me(), t = e.get("page"), { user: n } = ut(), [s, r] = gn(Zl);
575
+ }, Xl = Wn(void 0), xn = () => {
576
+ const [e] = Me(), t = e.get("page"), { user: n } = ut(), [s, r] = gn(Xl);
577
577
  return ne(() => ({
578
578
  isLocked: t && (n == null ? void 0 : n.id) !== s,
579
579
  currentEditor: s,
@@ -627,7 +627,7 @@ const Hl = Wn({}), tr = () => gn(Hl), Wl = () => {
627
627
  enabled: !!(e != null && e.pageType)
628
628
  });
629
629
  };
630
- function Jl({
630
+ function Zl({
631
631
  avatar: e,
632
632
  name: t,
633
633
  email: n,
@@ -648,7 +648,7 @@ function Jl({
648
648
  alt: t,
649
649
  className: "w-12 h-12 border border-gray-300 rounded-full"
650
650
  }
651
- ) : /* @__PURE__ */ a(nl, { className: "w-12 h-12 p-2 border border-gray-300 rounded-full" }),
651
+ ) : /* @__PURE__ */ a(tl, { className: "w-12 h-12 p-2 border border-gray-300 rounded-full" }),
652
652
  /* @__PURE__ */ c("div", { className: "space-y-1", children: [
653
653
  /* @__PURE__ */ a("h3", { className: "font-semibold", children: t }),
654
654
  n && /* @__PURE__ */ a("p", { className: "text-sm text-muted-foreground", children: n })
@@ -666,7 +666,7 @@ function Jl({
666
666
  /* @__PURE__ */ a(Ia, { children: "Are you sure you want to take over?" }),
667
667
  /* @__PURE__ */ c(ka, { children: [
668
668
  /* @__PURE__ */ c("span", { className: "flex items-center space-x-2 text-yellow-500", children: [
669
- /* @__PURE__ */ a(sl, { className: "w-5 h-5" }),
669
+ /* @__PURE__ */ a(nl, { className: "w-5 h-5" }),
670
670
  /* @__PURE__ */ a("span", { children: "This action might cause the other user to lose unsaved changes." })
671
671
  ] }),
672
672
  /* @__PURE__ */ a("br", {}),
@@ -687,12 +687,12 @@ function Jl({
687
687
  ] }) })
688
688
  ] }) });
689
689
  }
690
- const eo = () => {
690
+ const Jl = () => {
691
691
  const { isLocked: e, currentEditor: t } = xn(), { data: n } = qt(t), [s] = Me(), r = s.get("page"), { mutate: i } = Ja(), { isFetching: l } = rr(), o = be(() => {
692
692
  i({ id: r });
693
693
  }, [r, i]);
694
694
  return !e || l ? /* @__PURE__ */ a("div", { className: "" }) : /* @__PURE__ */ a(
695
- Jl,
695
+ Zl,
696
696
  {
697
697
  ...n,
698
698
  name: (n == null ? void 0 : n.name) || "Unknown User",
@@ -700,7 +700,7 @@ const eo = () => {
700
700
  onTakeOver: o
701
701
  }
702
702
  );
703
- }, to = () => {
703
+ }, eo = () => {
704
704
  const [e, t] = Me(), n = e.get("lang"), s = nr(n), { setSelectedLang: r } = ct(), i = () => {
705
705
  const o = new URLSearchParams(window.location.search);
706
706
  o.delete("lang");
@@ -733,7 +733,7 @@ const eo = () => {
733
733
  }
734
734
  ) })
735
735
  ] }) });
736
- }, no = (e) => {
736
+ }, to = (e) => {
737
737
  const t = se(), n = z();
738
738
  return xe({
739
739
  mutationFn: async (s) => n(t, {
@@ -749,7 +749,7 @@ const eo = () => {
749
749
  });
750
750
  }
751
751
  });
752
- }, so = (e) => {
752
+ }, no = (e) => {
753
753
  const t = se(), n = z();
754
754
  return _e({
755
755
  queryKey: [j, "uiBlockDetails", e],
@@ -770,7 +770,7 @@ const eo = () => {
770
770
  },
771
771
  retry: !1
772
772
  });
773
- }, ao = (e) => {
773
+ }, so = (e) => {
774
774
  const t = se(), n = z();
775
775
  return xe({
776
776
  mutationFn: async (s) => n(t, {
@@ -786,7 +786,7 @@ const eo = () => {
786
786
  });
787
787
  }
788
788
  });
789
- }, ro = ({
789
+ }, ao = ({
790
790
  blockId: e,
791
791
  libBlockId: t,
792
792
  isOpen: n,
@@ -794,7 +794,7 @@ const eo = () => {
794
794
  blockName: r,
795
795
  trigger: i
796
796
  }) => {
797
- const [l, o] = A(!1), u = xa(), d = ao(() => {
797
+ const [l, o] = A(!1), u = xa(), d = so(() => {
798
798
  u([e], { _libBlockId: void 0 }), W.success("Block deleted successfully"), o(!1), s();
799
799
  });
800
800
  return /* @__PURE__ */ c(Ua, { open: n, onOpenChange: (y) => !y && s(), children: [
@@ -860,7 +860,7 @@ const eo = () => {
860
860
  }
861
861
  )
862
862
  ] });
863
- }, io = ({
863
+ }, ro = ({
864
864
  blockId: e,
865
865
  libBlockId: t,
866
866
  blockName: n,
@@ -870,7 +870,7 @@ const eo = () => {
870
870
  }) => {
871
871
  const [l, o] = A(!1);
872
872
  return /* @__PURE__ */ a(
873
- ro,
873
+ ao,
874
874
  {
875
875
  blockId: e,
876
876
  libBlockId: t,
@@ -895,7 +895,7 @@ const eo = () => {
895
895
  )
896
896
  }
897
897
  );
898
- }, lo = () => {
898
+ }, io = () => {
899
899
  const e = se(), t = z(), n = Se(), {
900
900
  data: s = [],
901
901
  isLoading: r,
@@ -939,8 +939,8 @@ const eo = () => {
939
939
  createGroup: l,
940
940
  isCreating: o
941
941
  };
942
- }, oo = ({ value: e, onChange: t }) => {
943
- const [n, s] = A(!1), [r, i] = A(""), l = lt(null), { groups: o } = lo(), [u, d] = A([
942
+ }, lo = ({ value: e, onChange: t }) => {
943
+ const [n, s] = A(!1), [r, i] = A(""), l = lt(null), { groups: o } = io(), [u, d] = A([
944
944
  { id: "hero", name: "Hero" },
945
945
  { id: "feature", name: "Feature" },
946
946
  { id: "footer", name: "Footer" },
@@ -980,7 +980,7 @@ const eo = () => {
980
980
  const p = r.trim();
981
981
  if (!p) return;
982
982
  const g = { id: p, name: p };
983
- d((N) => [...N, g]), t(g.id), i(""), s(!1);
983
+ d((w) => [...w, g]), t(g.id), i(""), s(!1);
984
984
  };
985
985
  Ee(() => {
986
986
  n && l.current && l.current.focus();
@@ -1042,13 +1042,13 @@ const eo = () => {
1042
1042
  }
1043
1043
  )
1044
1044
  ] });
1045
- }, co = 10 * 1024 * 1024, uo = ({ value: e, onChange: t }) => {
1045
+ }, oo = 10 * 1024 * 1024, co = ({ value: e, onChange: t }) => {
1046
1046
  const [n, s] = A(!1), r = lt(null), i = be(
1047
1047
  (u) => {
1048
1048
  var h;
1049
1049
  const d = (h = u.target.files) == null ? void 0 : h[0];
1050
1050
  if (d) {
1051
- if (d.size > co) {
1051
+ if (d.size > oo) {
1052
1052
  W.error("File too large", {
1053
1053
  description: `Maximum file size is 10mb. Selected file is ${(d.size / 1024 / 1024).toFixed(2)}MB.`
1054
1054
  }), r.current && (r.current.value = "");
@@ -1160,7 +1160,7 @@ const eo = () => {
1160
1160
  ADD_MEDIA: "add_media",
1161
1161
  EDIT_MEDIA: "edit_media",
1162
1162
  DELETE_MEDIA: "delete_media"
1163
- }, ho = (e) => {
1163
+ }, uo = (e) => {
1164
1164
  const { blocks: t, close: n, blockId: s } = e, { getPartailBlocks: r } = Si(), i = t.find((S) => S._id === s), l = i == null ? void 0 : i._libBlockId, o = !!l, u = ne(() => t.some(
1165
1165
  (S) => S._type === "PartialBlock" || S._type === "GlobalBlock"
1166
1166
  ), [t]), d = ne(() => {
@@ -1172,25 +1172,25 @@ const eo = () => {
1172
1172
  } else
1173
1173
  S.push(G);
1174
1174
  return S;
1175
- }, [t, r]), [h, f] = A(""), [y, p] = A(""), [g, N] = A(""), [E, I] = A(""), [w, k] = A({}), [b, D] = A(!1), [M, J] = A(o), [B, $] = A(!1), { hasPermission: U } = Ft(), Y = U(ge.DELETE_LIBRARY_BLOCK), R = xa(), Ie = () => {
1175
+ }, [t, r]), [h, f] = A(""), [y, p] = A(""), [g, w] = A(""), [E, D] = A(""), [N, I] = A({}), [b, L] = A(!1), [M, J] = A(o), [B, $] = A(!1), { hasPermission: U } = Ft(), Y = U(ge.DELETE_LIBRARY_BLOCK), R = xa(), Ie = () => {
1176
1176
  R([s], { _libBlockId: void 0 }), W.success("Block delinked from library"), n();
1177
1177
  }, {
1178
1178
  data: K,
1179
1179
  isLoading: _,
1180
1180
  isError: ae
1181
- } = so(l);
1181
+ } = no(l);
1182
1182
  Ee(() => {
1183
1183
  ae && o && ($(!0), J(!1));
1184
1184
  }, [ae, o]), Ee(() => {
1185
- K && !_ && (f(K.name || ""), p(K.group || ""), N(K.description || ""), I(K.preview || ""), J(!1));
1185
+ K && !_ && (f(K.name || ""), p(K.group || ""), w(K.description || ""), D(K.preview || ""), J(!1));
1186
1186
  }, [K, _]), Ee(() => {
1187
1187
  const S = h.trim().length >= 2, G = y.trim() !== "";
1188
- D(S && G);
1188
+ L(S && G);
1189
1189
  }, [h, y]);
1190
1190
  const ke = () => {
1191
1191
  const S = {};
1192
- return h.trim() ? h.length < 2 && (S.name = "Name must be at least 2 characters") : S.name = "Name is required", y || (S.group = "Group is required"), k(S), Object.keys(S).length === 0;
1193
- }, { resetLibrary: De } = xi({ id: "" }), Ze = no(
1192
+ return h.trim() ? h.length < 2 && (S.name = "Name must be at least 2 characters") : S.name = "Name is required", y || (S.group = "Group is required"), I(S), Object.keys(S).length === 0;
1193
+ }, { resetLibrary: De } = xi({ id: "" }), Ze = to(
1194
1194
  (S) => {
1195
1195
  o || R([s], { _libBlockId: S.id }), W.success(`Block ${o ? "updated" : "saved"} successfully`), De(S.library), n();
1196
1196
  }
@@ -1229,7 +1229,7 @@ const eo = () => {
1229
1229
  te,
1230
1230
  {
1231
1231
  htmlFor: "name",
1232
- className: w.name ? "text-destructive" : "",
1232
+ className: N.name ? "text-destructive" : "",
1233
1233
  children: "Name"
1234
1234
  }
1235
1235
  ),
@@ -1240,22 +1240,22 @@ const eo = () => {
1240
1240
  placeholder: "Enter block name",
1241
1241
  value: h,
1242
1242
  onChange: (S) => f(S.target.value),
1243
- className: w.name ? "border-destructive" : ""
1243
+ className: N.name ? "border-destructive" : ""
1244
1244
  }
1245
1245
  ),
1246
- w.name && /* @__PURE__ */ a("p", { className: "text-xs text-destructive", children: w.name })
1246
+ N.name && /* @__PURE__ */ a("p", { className: "text-xs text-destructive", children: N.name })
1247
1247
  ] }),
1248
1248
  /* @__PURE__ */ c("div", { className: "space-y-2", children: [
1249
1249
  /* @__PURE__ */ a(
1250
1250
  te,
1251
1251
  {
1252
1252
  htmlFor: "group",
1253
- className: w.group ? "text-destructive" : "",
1253
+ className: N.group ? "text-destructive" : "",
1254
1254
  children: "Group"
1255
1255
  }
1256
1256
  ),
1257
- /* @__PURE__ */ a(oo, { value: y, onChange: p }),
1258
- w.group && /* @__PURE__ */ a("p", { className: "text-xs text-destructive", children: w.group })
1257
+ /* @__PURE__ */ a(lo, { value: y, onChange: p }),
1258
+ N.group && /* @__PURE__ */ a("p", { className: "text-xs text-destructive", children: N.group })
1259
1259
  ] }),
1260
1260
  /* @__PURE__ */ c("div", { className: "space-y-2", children: [
1261
1261
  /* @__PURE__ */ a(te, { htmlFor: "description", children: "Description (optional)" }),
@@ -1266,17 +1266,17 @@ const eo = () => {
1266
1266
  placeholder: "Enter a brief description",
1267
1267
  className: "resize-none",
1268
1268
  value: g,
1269
- onChange: (S) => N(S.target.value)
1269
+ onChange: (S) => w(S.target.value)
1270
1270
  }
1271
1271
  )
1272
1272
  ] }),
1273
1273
  /* @__PURE__ */ c("div", { className: "space-y-2", children: [
1274
1274
  /* @__PURE__ */ a(te, { htmlFor: "previewImage", children: "Preview Image (optional)" }),
1275
- /* @__PURE__ */ a(uo, { value: E, onChange: I })
1275
+ /* @__PURE__ */ a(co, { value: E, onChange: D })
1276
1276
  ] }),
1277
1277
  /* @__PURE__ */ c("div", { className: "flex justify-end gap-2 pt-2", children: [
1278
1278
  o && Y && /* @__PURE__ */ a(
1279
- io,
1279
+ ro,
1280
1280
  {
1281
1281
  blockId: s,
1282
1282
  libBlockId: l,
@@ -1348,7 +1348,7 @@ const eo = () => {
1348
1348
  GLOBAL_BLOCK_PUBLISH_SUCCESS: "Global block published successfully.",
1349
1349
  PAGES_PUBLISH_SUCCESS: "Your changes have been published successfully.",
1350
1350
  SLUG_CHANGE_SUCCESS: "Slug changed successfully."
1351
- }, mo = {
1351
+ }, ho = {
1352
1352
  SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
1353
1353
  }, Re = () => {
1354
1354
  const e = se(), t = z();
@@ -1357,13 +1357,13 @@ const eo = () => {
1357
1357
  initialData: [],
1358
1358
  queryFn: async () => t(e, { action: P.GET_PAGE_TYPES })
1359
1359
  });
1360
- }, fo = (e) => {
1360
+ }, mo = (e) => {
1361
1361
  const { data: t } = Re();
1362
1362
  return ne(
1363
1363
  () => t == null ? void 0 : t.find((n) => n.key === e),
1364
1364
  [t, e]
1365
1365
  );
1366
- }, go = () => {
1366
+ }, fo = () => {
1367
1367
  const e = se(), t = z();
1368
1368
  return xe({
1369
1369
  mutationFn: async ({ pageType: n, query: s }) => {
@@ -1406,7 +1406,7 @@ const eo = () => {
1406
1406
  W.error(
1407
1407
  `Failed to add new ${l != null && l.hasSlug ? "page" : l.name}.`,
1408
1408
  {
1409
- description: Z(mo, r.message, r.message)
1409
+ description: Z(ho, r.message, r.message)
1410
1410
  }
1411
1411
  );
1412
1412
  }
@@ -1439,7 +1439,7 @@ const eo = () => {
1439
1439
  );
1440
1440
  }
1441
1441
  });
1442
- }, po = () => {
1442
+ }, go = () => {
1443
1443
  const e = se(), t = Se(), n = z(), { data: s } = Re();
1444
1444
  return xe({
1445
1445
  mutationFn: async (r) => n(e, {
@@ -1473,7 +1473,7 @@ const eo = () => {
1473
1473
  );
1474
1474
  }
1475
1475
  });
1476
- }, yo = () => {
1476
+ }, po = () => {
1477
1477
  const e = se(), t = Se(), n = z(), { data: s } = Re();
1478
1478
  return xe({
1479
1479
  mutationFn: async (r) => n(e, {
@@ -1525,7 +1525,7 @@ const eo = () => {
1525
1525
  W.error("Failed to publish pages.");
1526
1526
  }
1527
1527
  });
1528
- }, vo = () => {
1528
+ }, yo = () => {
1529
1529
  const e = se(), t = z(), n = Se();
1530
1530
  return xe({
1531
1531
  mutationFn: async (s) => {
@@ -1550,7 +1550,7 @@ const eo = () => {
1550
1550
  W.error("Failed to mark page as template.");
1551
1551
  }
1552
1552
  });
1553
- }, bo = () => {
1553
+ }, vo = () => {
1554
1554
  const e = se(), t = z(), n = Se();
1555
1555
  return xe({
1556
1556
  mutationFn: async (s) => t(e, {
@@ -1566,7 +1566,7 @@ const eo = () => {
1566
1566
  W.error("Failed to unmark page as template.");
1567
1567
  }
1568
1568
  });
1569
- }, Eo = () => {
1569
+ }, bo = () => {
1570
1570
  const e = se(), t = z(), n = Se();
1571
1571
  return xe({
1572
1572
  mutationFn: async ({ id: s, slug: r }) => t(e, {
@@ -1724,33 +1724,33 @@ var zs = {};
1724
1724
  function g(v, m) {
1725
1725
  return m ? m(v) : v;
1726
1726
  }
1727
- function N(v) {
1727
+ function w(v) {
1728
1728
  return v != null;
1729
1729
  }
1730
1730
  function E(v, m, S) {
1731
1731
  return g(
1732
- v && N(v[m]) ? v[m] : p[m],
1732
+ v && w(v[m]) ? v[m] : p[m],
1733
1733
  S
1734
1734
  );
1735
1735
  }
1736
- function I(v) {
1736
+ function D(v) {
1737
1737
  return v < 0 ? 0 : Math.floor(v);
1738
1738
  }
1739
- function w(v, m) {
1739
+ function N(v, m) {
1740
1740
  return Math.floor(Math.random() * (m - v)) + v;
1741
1741
  }
1742
- function k(v) {
1742
+ function I(v) {
1743
1743
  return parseInt(v, 16);
1744
1744
  }
1745
1745
  function b(v) {
1746
- return v.map(D);
1746
+ return v.map(L);
1747
1747
  }
1748
- function D(v) {
1748
+ function L(v) {
1749
1749
  var m = String(v).replace(/[^0-9a-f]/gi, "");
1750
1750
  return m.length < 6 && (m = m[0] + m[0] + m[1] + m[1] + m[2] + m[2]), {
1751
- r: k(m.substring(0, 2)),
1752
- g: k(m.substring(2, 4)),
1753
- b: k(m.substring(4, 6))
1751
+ r: I(m.substring(0, 2)),
1752
+ g: I(m.substring(2, 4)),
1753
+ b: I(m.substring(4, 6))
1754
1754
  };
1755
1755
  }
1756
1756
  function M(v) {
@@ -1831,8 +1831,8 @@ var zs = {};
1831
1831
  } else if (m.shape === "circle")
1832
1832
  v.ellipse ? v.ellipse(m.x, m.y, Math.abs(C - G) * m.ovalScalar, Math.abs(Q - O) * m.ovalScalar, Math.PI / 10 * m.wobble, 0, 2 * Math.PI) : U(v, m.x, m.y, Math.abs(C - G) * m.ovalScalar, Math.abs(Q - O) * m.ovalScalar, Math.PI / 10 * m.wobble, 0, 2 * Math.PI);
1833
1833
  else if (m.shape === "star")
1834
- for (var ee = Math.PI / 2 * 3, Le = 4 * m.scalar, Ue = 8 * m.scalar, L = m.x, re = m.y, x = 5, fe = Math.PI / x; x--; )
1835
- L = m.x + Math.cos(ee) * Ue, re = m.y + Math.sin(ee) * Ue, v.lineTo(L, re), ee += fe, L = m.x + Math.cos(ee) * Le, re = m.y + Math.sin(ee) * Le, v.lineTo(L, re), ee += fe;
1834
+ for (var ee = Math.PI / 2 * 3, Le = 4 * m.scalar, Ue = 8 * m.scalar, k = m.x, re = m.y, x = 5, fe = Math.PI / x; x--; )
1835
+ k = m.x + Math.cos(ee) * Ue, re = m.y + Math.sin(ee) * Ue, v.lineTo(k, re), ee += fe, k = m.x + Math.cos(ee) * Le, re = m.y + Math.sin(ee) * Le, v.lineTo(k, re), ee += fe;
1836
1836
  else
1837
1837
  v.moveTo(Math.floor(m.x), Math.floor(m.y)), v.lineTo(Math.floor(m.wobbleX), Math.floor(O)), v.lineTo(Math.floor(C), Math.floor(Q)), v.lineTo(Math.floor(G), Math.floor(m.wobbleY));
1838
1838
  return v.closePath(), v.fill(), m.tick < m.totalTicks;
@@ -1863,7 +1863,7 @@ var zs = {};
1863
1863
  function K(v, m) {
1864
1864
  var S = !v, G = !!E(m || {}, "resize"), O = !1, C = E(m, "disableForReducedMotion", Boolean), Q = i && !!E(m || {}, "useWorker"), F = Q ? y() : null, X = S ? J : B, le = v && F ? !!v.__confetti_initialized : !1, ye = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion)").matches, ce;
1865
1865
  function ve(ee, Le, Ue) {
1866
- for (var L = E(ee, "particleCount", I), re = E(ee, "angle", Number), x = E(ee, "spread", Number), fe = E(ee, "startVelocity", Number), Qe = E(ee, "decay", Number), Fe = E(ee, "gravity", Number), bt = E(ee, "drift", Number), Et = E(ee, "colors", b), An = E(ee, "ticks", Number), Vs = E(ee, "shapes"), Zr = E(ee, "scalar"), Jr = !!E(ee, "flat"), Hs = M(ee), Ws = L, ns = [], ei = v.width * Hs.x, ti = v.height * Hs.y; Ws--; )
1866
+ for (var k = E(ee, "particleCount", D), re = E(ee, "angle", Number), x = E(ee, "spread", Number), fe = E(ee, "startVelocity", Number), Qe = E(ee, "decay", Number), Fe = E(ee, "gravity", Number), bt = E(ee, "drift", Number), Et = E(ee, "colors", b), An = E(ee, "ticks", Number), Vs = E(ee, "shapes"), Zr = E(ee, "scalar"), Jr = !!E(ee, "flat"), Hs = M(ee), Ws = k, ns = [], ei = v.width * Hs.x, ti = v.height * Hs.y; Ws--; )
1867
1867
  ns.push(
1868
1868
  Y({
1869
1869
  x: ei,
@@ -1872,7 +1872,7 @@ var zs = {};
1872
1872
  spread: x,
1873
1873
  startVelocity: fe,
1874
1874
  color: Et[Ws % Et.length],
1875
- shape: Vs[w(0, Vs.length)],
1875
+ shape: Vs[N(0, Vs.length)],
1876
1876
  ticks: An,
1877
1877
  decay: Qe,
1878
1878
  gravity: Fe,
@@ -1890,7 +1890,7 @@ var zs = {};
1890
1890
  fe();
1891
1891
  });
1892
1892
  S && ce ? v = ce.canvas : S && !v && (v = $(Ue), document.body.appendChild(v)), G && !le && X(v);
1893
- var L = {
1893
+ var k = {
1894
1894
  width: v.width,
1895
1895
  height: v.height
1896
1896
  };
@@ -1911,12 +1911,12 @@ var zs = {};
1911
1911
  });
1912
1912
  return;
1913
1913
  }
1914
- L.width = L.height = null;
1914
+ k.width = k.height = null;
1915
1915
  }
1916
1916
  function x() {
1917
1917
  ce = null, G && (O = !1, t.removeEventListener("resize", re)), S && v && (document.body.contains(v) && document.body.removeChild(v), v = null, le = !1);
1918
1918
  }
1919
- return G && !O && (O = !0, t.addEventListener("resize", re, !1)), F ? F.fire(ee, L, x) : ve(ee, L, x);
1919
+ return G && !O && (O = !0, t.addEventListener("resize", re, !1)), F ? F.fire(ee, k, x) : ve(ee, k, x);
1920
1920
  }
1921
1921
  return Te.reset = function() {
1922
1922
  F && F.reset(), ce && ce.reset();
@@ -1989,14 +1989,14 @@ var zs = {};
1989
1989
  })(/* @__PURE__ */ function() {
1990
1990
  return typeof window < "u" ? window : typeof self < "u" ? self : this || {};
1991
1991
  }(), zs, !1);
1992
- const No = zs.exports;
1992
+ const Eo = zs.exports;
1993
1993
  zs.exports.create;
1994
- const wo = {
1994
+ const No = {
1995
1995
  particleCount: 350,
1996
1996
  spread: 120,
1997
1997
  origin: { y: 0.6 },
1998
1998
  angle: 90
1999
- }, So = {
1999
+ }, wo = {
2000
2000
  TOP_RIGHT: {
2001
2001
  angle: 225,
2002
2002
  origin: { x: 0.9, y: 0 }
@@ -2006,11 +2006,11 @@ const wo = {
2006
2006
  origin: { x: 0.9, y: 0.9 }
2007
2007
  }
2008
2008
  }, Mn = (e) => {
2009
- let t = So[e];
2009
+ let t = wo[e];
2010
2010
  t || (t = {});
2011
- const n = { ...wo, ...t };
2012
- No(n);
2013
- }, xo = () => {
2011
+ const n = { ...No, ...t };
2012
+ Eo(n);
2013
+ }, So = () => {
2014
2014
  const [e] = Ai(), { mutate: t, isPending: n } = qs(), { mutateAsync: s, isPending: r } = er();
2015
2015
  return /* @__PURE__ */ c("div", { className: "bg-white py-3 flex items-center justify-center gap-x-3 border-t", children: [
2016
2016
  /* @__PURE__ */ a(
@@ -2044,11 +2044,11 @@ const wo = {
2044
2044
  }
2045
2045
  )
2046
2046
  ] });
2047
- }, Ao = ({
2047
+ }, xo = ({
2048
2048
  page: e,
2049
2049
  onClose: t
2050
2050
  }) => {
2051
- const [n, s] = A(e.slug || ""), { mutate: r, isPending: i } = Eo(), { data: l } = Re(), o = we(l, { key: e == null ? void 0 : e.pageType }), u = (h) => {
2051
+ const [n, s] = A(e.slug || ""), { mutate: r, isPending: i } = bo(), { data: l } = Re(), o = we(l, { key: e == null ? void 0 : e.pageType }), u = (h) => {
2052
2052
  if (h.preventDefault(), !(e != null && e.primaryPage) && Object.keys(Xe).some((p) => n === `/${p}` || Vt(n, `/${p}/`))) {
2053
2053
  W.error("Error", {
2054
2054
  description: "Slugs cannot start with a language code for primary page"
@@ -2125,7 +2125,7 @@ function or({
2125
2125
  page: e,
2126
2126
  onClose: t
2127
2127
  }) {
2128
- const [, n] = Me(), { mutate: s, isPending: r } = po(), { data: i } = Re(), l = () => {
2128
+ const [, n] = Me(), { mutate: s, isPending: r } = go(), { data: i } = Re(), l = () => {
2129
2129
  s(e, {
2130
2130
  onSuccess: () => {
2131
2131
  e != null && e.primaryPage || (window.history.replaceState(null, "", "/"), n(new URLSearchParams({})), window.dispatchEvent(new PopStateEvent("popstate"))), t();
@@ -2177,7 +2177,7 @@ const He = ({
2177
2177
  page: e,
2178
2178
  onClose: t
2179
2179
  }) => {
2180
- const { mutate: n, isPending: s } = yo(), r = async () => {
2180
+ const { mutate: n, isPending: s } = po(), r = async () => {
2181
2181
  n(e, { onSuccess: t });
2182
2182
  };
2183
2183
  return /* @__PURE__ */ a(qe, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ c(ze, { children: [
@@ -2208,13 +2208,13 @@ const He = ({
2208
2208
  onClose: t,
2209
2209
  languages: n
2210
2210
  }) => {
2211
- const { data: s } = Ve(), { data: r } = Re(), [i, l] = A(e.name || ""), [o, u] = A(e.edit ? e.lang : ""), [d, h] = A(e.edit ? e.slug : ""), { mutate: f, isPending: y } = lr(), { mutate: p, isPending: g } = js(), N = ne(
2211
+ const { data: s } = Ve(), { data: r } = Re(), [i, l] = A(e.name || ""), [o, u] = A(e.edit ? e.lang : ""), [d, h] = A(e.edit ? e.slug : ""), { mutate: f, isPending: y } = lr(), { mutate: p, isPending: g } = js(), w = ne(
2212
2212
  () => r == null ? void 0 : r.find(
2213
- (k) => k.key === e.pageType
2213
+ (I) => I.key === e.pageType
2214
2214
  ),
2215
2215
  [r, e.pageType]
2216
- ), E = !(N != null && N.hasSlug), I = y || g, w = (k) => {
2217
- k.preventDefault();
2216
+ ), E = !(w != null && w.hasSlug), D = y || g, N = (I) => {
2217
+ I.preventDefault();
2218
2218
  const b = {
2219
2219
  name: i,
2220
2220
  lang: o,
@@ -2229,7 +2229,7 @@ const He = ({
2229
2229
  /* @__PURE__ */ a(Ke, { children: e.edit ? H.EDIT_LANGUAGE : H.ADD_NEW_LANGUAGE }),
2230
2230
  /* @__PURE__ */ a(Ye, { className: "font-light", children: H.ENTER_LANGUAGE_DETAILS })
2231
2231
  ] }),
2232
- /* @__PURE__ */ c("form", { onSubmit: w, children: [
2232
+ /* @__PURE__ */ c("form", { onSubmit: N, children: [
2233
2233
  /* @__PURE__ */ c("div", { className: "grid gap-4 py-4", children: [
2234
2234
  /* @__PURE__ */ c("div", { className: "space-y-1", children: [
2235
2235
  /* @__PURE__ */ a(te, { htmlFor: "lang", className: "text-right", children: H.LANGUAGE }),
@@ -2238,14 +2238,14 @@ const He = ({
2238
2238
  {
2239
2239
  value: o,
2240
2240
  disabled: e.edit || ue(n),
2241
- onChange: (k) => {
2242
- const b = k.target.value;
2241
+ onChange: (I) => {
2242
+ const b = I.target.value;
2243
2243
  u(b), !E && h(`/${b}`);
2244
2244
  },
2245
2245
  className: "flex h-9 w-full rounded-md border border-border bg-background px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 col-span-3",
2246
2246
  children: [
2247
2247
  /* @__PURE__ */ a("option", { value: "", disabled: !0, selected: !0, children: e.edit ? Z(Xe, e.lang, e.lang) : ue(n) ? H.ALL_AVAILABLE_LANGUAGE_PAGE : H.CHOOSE_LANGUAGE }),
2248
- We(n, (k) => /* @__PURE__ */ a("option", { value: k, children: Z(Xe, k, k) }, k))
2248
+ We(n, (I) => /* @__PURE__ */ a("option", { value: I, children: Z(Xe, I, I) }, I))
2249
2249
  ]
2250
2250
  }
2251
2251
  )
@@ -2257,7 +2257,7 @@ const He = ({
2257
2257
  {
2258
2258
  id: "name",
2259
2259
  value: i,
2260
- onChange: (k) => l(k.target.value),
2260
+ onChange: (I) => l(I.target.value),
2261
2261
  className: "col-span-3",
2262
2262
  required: !0,
2263
2263
  placeholder: H.ENTER_PAGE_NAME
@@ -2275,8 +2275,8 @@ const He = ({
2275
2275
  {
2276
2276
  id: "slug",
2277
2277
  value: d,
2278
- onChange: (k) => {
2279
- const b = k.target.value;
2278
+ onChange: (I) => {
2279
+ const b = I.target.value;
2280
2280
  Vt(b, `/${o}`) && h($t(ii(b)));
2281
2281
  },
2282
2282
  className: "col-span-3",
@@ -2293,14 +2293,14 @@ const He = ({
2293
2293
  T,
2294
2294
  {
2295
2295
  type: "submit",
2296
- disabled: I || !i || !o || !E && !Vt(d, `/${o}`),
2297
- children: I ? e.edit ? H.UPDATING : H.ADDING : e.edit ? H.UPDATE : H.ADD_NEW_LANGUAGE
2296
+ disabled: D || !i || !o || !E && !Vt(d, `/${o}`),
2297
+ children: D ? e.edit ? H.UPDATING : H.ADDING : e.edit ? H.UPDATE : H.ADD_NEW_LANGUAGE
2298
2298
  }
2299
2299
  ) })
2300
2300
  ] })
2301
2301
  ] }) });
2302
- }, To = () => {
2303
- const [e, t] = A(null), { selectedLang: n, fallbackLang: s, setSelectedLang: r } = ct(), { data: i, isFetching: l } = jt(), { data: o } = Ve(), [u, d] = A(null), [h, f] = A(null), [y, p] = A(null), { data: g } = yt(), N = Ce(
2302
+ }, Ao = () => {
2303
+ const [e, t] = A(null), { selectedLang: n, fallbackLang: s, setSelectedLang: r } = ct(), { data: i, isFetching: l } = jt(), { data: o } = Ve(), [u, d] = A(null), [h, f] = A(null), [y, p] = A(null), { data: g } = yt(), w = Ce(
2304
2304
  Z(g, "languages") || ["en"],
2305
2305
  (E) => !we(i, { lang: E }) && E !== Z(g, "fallbackLang")
2306
2306
  );
@@ -2310,13 +2310,13 @@ const He = ({
2310
2310
  /* @__PURE__ */ a("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
2311
2311
  /* @__PURE__ */ a("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" })
2312
2312
  ] }) : We(i, (E) => {
2313
- const I = E.lang, w = E.slug, k = !E.primaryPage;
2313
+ const D = E.lang, N = E.slug, I = !E.primaryPage;
2314
2314
  return /* @__PURE__ */ c(pe, { children: [
2315
2315
  /* @__PURE__ */ c(
2316
2316
  "li",
2317
2317
  {
2318
- className: `text-slate-500 w-full p-2 rounded cursor-pointer flex items-center justify-between ${I === n ? "bg-gray-200" : "hover:bg-gray-100"}`,
2319
- onClick: () => r(I),
2318
+ className: `text-slate-500 w-full p-2 rounded cursor-pointer flex items-center justify-between ${D === n ? "bg-gray-200" : "hover:bg-gray-100"}`,
2319
+ onClick: () => r(D),
2320
2320
  children: [
2321
2321
  /* @__PURE__ */ c("div", { className: " flex-1 gap-x-3", children: [
2322
2322
  /* @__PURE__ */ c(
@@ -2330,14 +2330,14 @@ const He = ({
2330
2330
  className: `w-2.5 h-2.5 rounded-full ${E.online ? "bg-green-300" : "bg-gray-300"}`
2331
2331
  }
2332
2332
  ),
2333
- Z(Xe, k ? s : I, I)
2333
+ Z(Xe, I ? s : D, D)
2334
2334
  ]
2335
2335
  }
2336
2336
  ),
2337
2337
  /* @__PURE__ */ c("div", { children: [
2338
- w && /* @__PURE__ */ c("div", { className: "text-[11px] text-slate-600 font-light", children: [
2338
+ N && /* @__PURE__ */ c("div", { className: "text-[11px] text-slate-600 font-light", children: [
2339
2339
  "Slug: ",
2340
- /* @__PURE__ */ a("b", { className: "font-medium", children: w })
2340
+ /* @__PURE__ */ a("b", { className: "font-medium", children: N })
2341
2341
  ] }),
2342
2342
  /* @__PURE__ */ c("div", { className: "text-[11px] text-slate-600 font-light", children: [
2343
2343
  "Name:",
@@ -2349,8 +2349,8 @@ const He = ({
2349
2349
  ] })
2350
2350
  ] })
2351
2351
  ] }),
2352
- k ? /* @__PURE__ */ c("div", { className: "flex items-center text-[11px] text-orange-500 gap-x-1", children: [
2353
- /* @__PURE__ */ a(al, { fill: "orange", className: "w-3 h-3" }),
2352
+ I ? /* @__PURE__ */ c("div", { className: "flex items-center text-[11px] text-orange-500 gap-x-1", children: [
2353
+ /* @__PURE__ */ a(sl, { fill: "orange", className: "w-3 h-3" }),
2354
2354
  /* @__PURE__ */ a("b", { children: " Primary" })
2355
2355
  ] }) : /* @__PURE__ */ a("div", { className: "flex items-center gap-x-3", children: /* @__PURE__ */ a(
2356
2356
  He,
@@ -2365,7 +2365,7 @@ const He = ({
2365
2365
  yn,
2366
2366
  {
2367
2367
  asChild: !0,
2368
- onClick: (D) => D.stopPropagation(),
2368
+ onClick: (L) => L.stopPropagation(),
2369
2369
  children: /* @__PURE__ */ a(
2370
2370
  T,
2371
2371
  {
@@ -2391,11 +2391,11 @@ const He = ({
2391
2391
  Be,
2392
2392
  {
2393
2393
  className: "flex items-center gap-2 cursor-pointer",
2394
- onClick: (D) => {
2395
- D.stopPropagation(), t({ ...E, edit: !0 });
2394
+ onClick: (L) => {
2395
+ L.stopPropagation(), t({ ...E, edit: !0 });
2396
2396
  },
2397
2397
  children: [
2398
- /* @__PURE__ */ a(rl, { className: "size-3" }),
2398
+ /* @__PURE__ */ a(al, { className: "size-3" }),
2399
2399
  H.EDIT
2400
2400
  ]
2401
2401
  }
@@ -2410,8 +2410,8 @@ const He = ({
2410
2410
  Be,
2411
2411
  {
2412
2412
  className: "flex items-center gap-2 cursor-pointer",
2413
- onClick: (D) => {
2414
- D.stopPropagation(), f(E);
2413
+ onClick: (L) => {
2414
+ L.stopPropagation(), f(E);
2415
2415
  },
2416
2416
  children: [
2417
2417
  /* @__PURE__ */ a(qa, { className: "size-3" }),
@@ -2429,11 +2429,11 @@ const He = ({
2429
2429
  Be,
2430
2430
  {
2431
2431
  className: "flex items-center gap-2 cursor-pointer",
2432
- onClick: (D) => {
2433
- D.stopPropagation(), d(E);
2432
+ onClick: (L) => {
2433
+ L.stopPropagation(), d(E);
2434
2434
  },
2435
2435
  children: [
2436
- /* @__PURE__ */ a(il, { className: "size-3" }),
2436
+ /* @__PURE__ */ a(rl, { className: "size-3" }),
2437
2437
  H.DELETE
2438
2438
  ]
2439
2439
  }
@@ -2458,7 +2458,7 @@ const He = ({
2458
2458
  {
2459
2459
  variant: "default",
2460
2460
  size: "sm",
2461
- disabled: ue(N),
2461
+ disabled: ue(w),
2462
2462
  onClick: () => {
2463
2463
  t({
2464
2464
  name: o == null ? void 0 : o.name,
@@ -2474,7 +2474,7 @@ const He = ({
2474
2474
  e && /* @__PURE__ */ a(
2475
2475
  cr,
2476
2476
  {
2477
- languages: N,
2477
+ languages: w,
2478
2478
  langProps: e,
2479
2479
  onClose: () => t(null)
2480
2480
  }
@@ -2488,7 +2488,7 @@ const He = ({
2488
2488
  }
2489
2489
  ),
2490
2490
  y && /* @__PURE__ */ a(
2491
- Ao,
2491
+ xo,
2492
2492
  {
2493
2493
  page: y,
2494
2494
  onClose: () => p(null)
@@ -2496,7 +2496,7 @@ const He = ({
2496
2496
  )
2497
2497
  ] });
2498
2498
  };
2499
- function Co({
2499
+ function To({
2500
2500
  value: e,
2501
2501
  onChange: t,
2502
2502
  placeholder: n = "Enter custom slug part",
@@ -2510,14 +2510,14 @@ function Co({
2510
2510
  const h = (p) => {
2511
2511
  const g = p.target.value;
2512
2512
  if (!g.startsWith(s)) {
2513
- const b = g.replace(s, ""), D = s + b;
2514
- d(D), t(b);
2513
+ const b = g.replace(s, ""), L = s + b;
2514
+ d(L), t(b);
2515
2515
  return;
2516
2516
  }
2517
- const E = g.substring(s.length).replace(/\//g, "").replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-_.]/g, "-").replace(/-+/g, "-").replace(/^-+/, "").toLowerCase(), I = (E.match(/\./g) || []).length, w = I <= 1;
2518
- I > 1 ? l("Invalid slug. Only one dot (.) is allowed in the slug") : l(null), r && r(w);
2519
- const k = s + E;
2520
- d(k), t(E);
2517
+ const E = g.substring(s.length).replace(/\//g, "").replace(/\s+/g, "-").replace(/[^a-zA-Z0-9-_.]/g, "-").replace(/-+/g, "-").replace(/^-+/, "").toLowerCase(), D = (E.match(/\./g) || []).length, N = D <= 1;
2518
+ D > 1 ? l("Invalid slug. Only one dot (.) is allowed in the slug") : l(null), r && r(N);
2519
+ const I = s + E;
2520
+ d(I), t(E);
2521
2521
  }, f = () => {
2522
2522
  if (o.current) {
2523
2523
  const p = o.current;
@@ -2553,7 +2553,7 @@ function Co({
2553
2553
  i && /* @__PURE__ */ a("div", { className: "text-red-500 text-xs mt-1", children: i })
2554
2554
  ] }) });
2555
2555
  }
2556
- const Po = (e) => {
2556
+ const Co = (e) => {
2557
2557
  if (!e) return { base: e, extension: null };
2558
2558
  const t = e.lastIndexOf(".");
2559
2559
  if (t <= 0) return { base: e, extension: null };
@@ -2561,13 +2561,13 @@ const Po = (e) => {
2561
2561
  return { base: e.substring(0, t), extension: n };
2562
2562
  }, pt = (e) => {
2563
2563
  if (!e) return e;
2564
- const { base: t } = Po(e);
2564
+ const { base: t } = Co(e);
2565
2565
  return t;
2566
- }, _o = (e) => e && pt(e), aa = (e, t) => {
2566
+ }, Po = (e) => e && pt(e), aa = (e, t) => {
2567
2567
  const n = pt(e || "");
2568
2568
  return !n || n === "/" ? `/${t}` : `${n}/${t}`;
2569
2569
  };
2570
- function Io({
2570
+ function _o({
2571
2571
  pages: e,
2572
2572
  selectedParentId: t,
2573
2573
  onChange: n,
@@ -2629,7 +2629,7 @@ function ur({
2629
2629
  return /* @__PURE__ */ c("div", { children: [
2630
2630
  s && /* @__PURE__ */ a("div", { className: "flex items-center mb-1", children: /* @__PURE__ */ c("span", { className: "text-xs text-gray-500", children: [
2631
2631
  "Parent: ",
2632
- _o(s)
2632
+ Po(s)
2633
2633
  ] }) }),
2634
2634
  /* @__PURE__ */ c("div", { className: "relative", children: [
2635
2635
  /* @__PURE__ */ a(
@@ -2645,7 +2645,7 @@ function ur({
2645
2645
  ] })
2646
2646
  ] });
2647
2647
  }
2648
- const ko = ({
2648
+ const Io = ({
2649
2649
  templates: e,
2650
2650
  selectedTemplateId: t,
2651
2651
  onSelectTemplate: n,
@@ -2693,13 +2693,13 @@ const ko = ({
2693
2693
  /* @__PURE__ */ a("div", { className: "p-2 text-xs text-gray-500 bg-gray-50 border-t", children: "Template preview" })
2694
2694
  ] })
2695
2695
  ] });
2696
- }, Lo = () => {
2696
+ }, ko = () => {
2697
2697
  const e = se(), t = z();
2698
2698
  return _e({
2699
2699
  queryKey: [j, P.GET_LIBRARIES],
2700
2700
  queryFn: async () => await t(e, { action: P.GET_LIBRARIES }) || []
2701
2701
  });
2702
- }, Do = (e) => {
2702
+ }, Lo = (e) => {
2703
2703
  const t = se(), n = z();
2704
2704
  return _e({
2705
2705
  queryKey: [j, P.GET_TEMPLATES_BY_TYPE, e],
@@ -2712,8 +2712,8 @@ const ko = ({
2712
2712
  return (e ? Ce(s, { pageType: e }) : s) || [];
2713
2713
  }
2714
2714
  });
2715
- }, Go = (e) => {
2716
- const { data: t = [], isLoading: n } = Do(e), { data: s = [], isLoading: r } = Lo(), i = ne(() => n || r ? [] : t.map((o) => {
2715
+ }, Do = (e) => {
2716
+ const { data: t = [], isLoading: n } = Lo(e), { data: s = [], isLoading: r } = ko(), i = ne(() => n || r ? [] : t.map((o) => {
2717
2717
  const u = we(s, { id: o.library });
2718
2718
  return {
2719
2719
  ...o,
@@ -2736,21 +2736,21 @@ const ko = ({
2736
2736
  [e]
2737
2737
  );
2738
2738
  };
2739
- function Uo({
2739
+ function Go({
2740
2740
  addEditPage: e,
2741
2741
  additionalPageTypes: t = [],
2742
2742
  close: n,
2743
2743
  closePanel: s
2744
2744
  }) {
2745
- var L, re;
2746
- const r = dr(), i = !!(e != null && e.id), { data: l } = Zn(), { mutate: o, isPending: u } = lr(), { mutate: d, isPending: h } = js(), [f, y] = A(null), [p, g] = A(!0), [N, E] = A(
2745
+ var k, re;
2746
+ const r = dr(), i = !!(e != null && e.id), { data: l } = Zn(), { mutate: o, isPending: u } = lr(), { mutate: d, isPending: h } = js(), [f, y] = A(null), [p, g] = A(!0), [w, E] = A(
2747
2747
  (e == null ? void 0 : e.pageType) ?? "page"
2748
- ), { hasPermission: I } = Ft(), w = I(ge.CHANGE_PAGE_TYPE), [k, b] = A(!1), [D, M] = A(""), J = ne(() => {
2748
+ ), { hasPermission: D } = Ft(), N = D(ge.CHANGE_PAGE_TYPE), [I, b] = A(!1), [L, M] = A(""), J = ne(() => {
2749
2749
  const x = t.find(
2750
- (fe) => fe.key === N
2750
+ (fe) => fe.key === w
2751
2751
  );
2752
2752
  return (x == null ? void 0 : x.hasSlug) === !1;
2753
- }, [N, t]), [B, $] = A(
2753
+ }, [w, t]), [B, $] = A(
2754
2754
  (e == null ? void 0 : e.parent) ?? ""
2755
2755
  ), [U, Y] = A((e == null ? void 0 : e.name) ?? ""), [R, Ie] = A(
2756
2756
  (e == null ? void 0 : e.dynamic) ?? !1
@@ -2758,16 +2758,16 @@ function Uo({
2758
2758
  R ? "" : ((e == null ? void 0 : e.slug) ?? "").split("/").pop() || ""
2759
2759
  ), [ae, ke] = A(
2760
2760
  (e == null ? void 0 : e.dynamicSlugCustom) ?? ""
2761
- ), [De, Ze] = A(!0), [v, m] = A(""), { data: S, isLoading: G } = Go(N), O = u || h, C = t.find(
2762
- (x) => x.key === N
2761
+ ), [De, Ze] = A(!0), [v, m] = A(""), { data: S, isLoading: G } = Do(w), O = u || h, C = t.find(
2762
+ (x) => x.key === w
2763
2763
  ), Q = (x) => {
2764
- if (i && N !== x) {
2764
+ if (i && w !== x) {
2765
2765
  M(x), b(!0);
2766
2766
  return;
2767
2767
  }
2768
2768
  E(x);
2769
2769
  }, F = () => {
2770
- E(D), b(!1), Ie(!1);
2770
+ E(L), b(!1), Ie(!1);
2771
2771
  }, X = (x) => {
2772
2772
  Ie(x), x ? _("") : ke("");
2773
2773
  }, le = (x) => {
@@ -2812,7 +2812,7 @@ function Uo({
2812
2812
  ), !1) : !0;
2813
2813
  }, ee = (x, fe) => {
2814
2814
  const Qe = pt(fe), Fe = aa(Qe, x), bt = {
2815
- pageType: N,
2815
+ pageType: w,
2816
2816
  name: U,
2817
2817
  slug: Fe.replace(/\/$/, ""),
2818
2818
  // remove trailing slashes
@@ -2835,7 +2835,7 @@ function Uo({
2835
2835
  });
2836
2836
  }, Le = () => {
2837
2837
  const x = {
2838
- pageType: N,
2838
+ pageType: w,
2839
2839
  name: U,
2840
2840
  slug: K === "" ? "/" : `/${K.replace(/\/$/, "")}`,
2841
2841
  template: v || void 0,
@@ -2877,17 +2877,17 @@ function Uo({
2877
2877
  "select",
2878
2878
  {
2879
2879
  id: "pageType",
2880
- value: N,
2881
- disabled: i && !w,
2880
+ value: w,
2881
+ disabled: i && !N,
2882
2882
  onChange: (x) => Q(x.target.value),
2883
- className: `w-full rounded-md border border-gray-300 px-3 py-2 ${i && !w ? "cursor-not-allowed text-gray-500" : ""}`,
2883
+ className: `w-full rounded-md border border-gray-300 px-3 py-2 ${i && !N ? "cursor-not-allowed text-gray-500" : ""}`,
2884
2884
  children: i ? J ? /* @__PURE__ */ a("optgroup", { label: "Partials", children: t.filter((x) => x.hasSlug === !1).map((x) => /* @__PURE__ */ a("option", { value: x.key, children: x.name }, x.key)) }) : /* @__PURE__ */ a("optgroup", { label: "Pages", children: t.filter((x) => x.hasSlug !== !1).map((x) => /* @__PURE__ */ a("option", { value: x.key, children: x.name }, x.key)) }) : /* @__PURE__ */ c(pe, { children: [
2885
2885
  /* @__PURE__ */ a("optgroup", { label: "Pages", children: t.filter((x) => x.hasSlug !== !1).map((x) => /* @__PURE__ */ a("option", { value: x.key, children: x.name }, x.key)) }),
2886
2886
  /* @__PURE__ */ a("optgroup", { label: "Partials", children: t.filter((x) => x.hasSlug === !1).map((x) => /* @__PURE__ */ a("option", { value: x.key, children: x.name }, x.key)) })
2887
2887
  ] })
2888
2888
  }
2889
2889
  ),
2890
- k && /* @__PURE__ */ c("div", { className: "mt-2 p-3 bg-yellow-50 border border-yellow-200 rounded-md", children: [
2890
+ I && /* @__PURE__ */ c("div", { className: "mt-2 p-3 bg-yellow-50 border border-yellow-200 rounded-md", children: [
2891
2891
  /* @__PURE__ */ a("p", { className: "text-sm text-yellow-800", children: "Changing the page type may impact the page data. Are you sure you want to proceed?" }),
2892
2892
  /* @__PURE__ */ c("div", { className: "mt-2 flex gap-2", children: [
2893
2893
  /* @__PURE__ */ a(
@@ -2914,7 +2914,7 @@ function Uo({
2914
2914
  !i && (C == null ? void 0 : C.hasSlug) && S.length > 0 && /* @__PURE__ */ c("div", { className: "space-y-1", children: [
2915
2915
  /* @__PURE__ */ a(te, { className: "text-sm mb-1 block", children: "Template" }),
2916
2916
  /* @__PURE__ */ a(
2917
- ko,
2917
+ Io,
2918
2918
  {
2919
2919
  templates: S,
2920
2920
  selectedTemplateId: v,
@@ -2924,7 +2924,7 @@ function Uo({
2924
2924
  )
2925
2925
  ] }),
2926
2926
  /* @__PURE__ */ a(
2927
- Io,
2927
+ _o,
2928
2928
  {
2929
2929
  pages: l,
2930
2930
  selectedParentId: B,
@@ -2959,7 +2959,7 @@ function Uo({
2959
2959
  /* @__PURE__ */ a(te, { htmlFor: "useDynamicSlug", className: "text-sm", children: "Use Dynamic Slug" })
2960
2960
  ] }),
2961
2961
  R && /* @__PURE__ */ a("div", { className: "space-y-2", children: /* @__PURE__ */ a("div", { className: "space-y-0.5", children: /* @__PURE__ */ a(
2962
- Co,
2962
+ To,
2963
2963
  {
2964
2964
  value: ae,
2965
2965
  onChange: ke,
@@ -2976,7 +2976,7 @@ function Uo({
2976
2976
  {
2977
2977
  value: K,
2978
2978
  onChange: _,
2979
- placeholder: B && B !== "none" ? "Enter page slug" : N === "page" ? "Leave empty for home page" : "Required - e.g. your-slug",
2979
+ placeholder: B && B !== "none" ? "Enter page slug" : w === "page" ? "Leave empty for home page" : "Required - e.g. your-slug",
2980
2980
  parentSlug: B && B !== "none" ? (re = l == null ? void 0 : l.find((x) => x.id === B)) == null ? void 0 : re.slug : void 0,
2981
2981
  onValidationChange: g
2982
2982
  }
@@ -3006,14 +3006,14 @@ function Uo({
3006
3006
  "select",
3007
3007
  {
3008
3008
  id: "pageType",
3009
- value: N,
3010
- disabled: i && !w,
3009
+ value: w,
3010
+ disabled: i && !N,
3011
3011
  onChange: (x) => Q(x.target.value),
3012
- className: `w-full rounded-md border border-gray-300 px-3 py-2 ${i && !w ? "cursor-not-allowed text-gray-500" : ""}`,
3012
+ className: `w-full rounded-md border border-gray-300 px-3 py-2 ${i && !N ? "cursor-not-allowed text-gray-500" : ""}`,
3013
3013
  children: /* @__PURE__ */ a("optgroup", { label: "Partials", children: t.filter((x) => x.hasSlug === !1).map((x) => /* @__PURE__ */ a("option", { value: x.key, children: x.name }, x.key)) })
3014
3014
  }
3015
3015
  ),
3016
- k && /* @__PURE__ */ c("div", { className: "mt-2 p-3 bg-yellow-50 border border-yellow-200 rounded-md", children: [
3016
+ I && /* @__PURE__ */ c("div", { className: "mt-2 p-3 bg-yellow-50 border border-yellow-200 rounded-md", children: [
3017
3017
  /* @__PURE__ */ a("p", { className: "text-sm text-yellow-800", children: "Changing the page type may impact the page data. Are you sure you want to proceed?" }),
3018
3018
  /* @__PURE__ */ c("div", { className: "mt-2 flex gap-2", children: [
3019
3019
  /* @__PURE__ */ a(
@@ -3036,7 +3036,7 @@ function Uo({
3036
3036
  )
3037
3037
  ] })
3038
3038
  ] }),
3039
- /* @__PURE__ */ a("p", { className: "text-xs text-gray-500", children: (L = t.find((x) => x.key === N)) == null ? void 0 : L.helpText })
3039
+ /* @__PURE__ */ a("p", { className: "text-xs text-gray-500", children: (k = t.find((x) => x.key === w)) == null ? void 0 : k.helpText })
3040
3040
  ] }),
3041
3041
  /* @__PURE__ */ c("div", { className: "space-y-0.5", children: [
3042
3042
  /* @__PURE__ */ a(te, { htmlFor: "name", className: "text-sm", children: "Name" }),
@@ -3056,7 +3056,7 @@ function Uo({
3056
3056
  }
3057
3057
  );
3058
3058
  }
3059
- const Oo = ({
3059
+ const Uo = ({
3060
3060
  addEditPage: e,
3061
3061
  setAddEditPage: t,
3062
3062
  closePanel: n
@@ -3071,7 +3071,7 @@ const Oo = ({
3071
3071
  /* @__PURE__ */ a(Ye, { children: r ? "Update your page name" : "Enter details to create a new page" })
3072
3072
  ] }),
3073
3073
  /* @__PURE__ */ a(
3074
- Uo,
3074
+ Go,
3075
3075
  {
3076
3076
  closePanel: n,
3077
3077
  addEditPage: e,
@@ -3080,7 +3080,7 @@ const Oo = ({
3080
3080
  }
3081
3081
  )
3082
3082
  ] }) });
3083
- }, Ro = () => {
3083
+ }, Oo = () => {
3084
3084
  const e = se(), t = Se(), n = z();
3085
3085
  return xe({
3086
3086
  mutationFn: async ({
@@ -3108,14 +3108,14 @@ const Oo = ({
3108
3108
  });
3109
3109
  }
3110
3110
  });
3111
- }, Bo = ({
3111
+ }, Ro = ({
3112
3112
  page: e,
3113
3113
  onClose: t
3114
3114
  }) => {
3115
- const { mutate: n, isPending: s } = Ro(), [r, i] = A(null), [l, o] = A(`${e.name} (Copy)`), u = ue(e.slug), [d, h] = A(
3115
+ const { mutate: n, isPending: s } = Oo(), [r, i] = A(null), [l, o] = A(`${e.name} (Copy)`), u = ue(e.slug), [d, h] = A(
3116
3116
  u ? "" : `${e.slug.split("/").pop()}-copy`
3117
- ), f = u ? "" : oi(e.slug.split("/")).join("/"), [y, p] = A(!1), g = (N) => {
3118
- if (N.preventDefault(), !l.trim()) {
3117
+ ), f = u ? "" : oi(e.slug.split("/")).join("/"), [y, p] = A(!1), g = (w) => {
3118
+ if (w.preventDefault(), !l.trim()) {
3119
3119
  i("Name is required");
3120
3120
  return;
3121
3121
  }
@@ -3134,13 +3134,13 @@ const Oo = ({
3134
3134
  onSuccess: () => {
3135
3135
  p(!1), t();
3136
3136
  },
3137
- onError: (I) => {
3138
- p(!1), I.code === "SLUG_EXISTS" ? i(
3137
+ onError: (D) => {
3138
+ p(!1), D.code === "SLUG_EXISTS" ? i(
3139
3139
  "A page with this slug already exists. Please choose a different slug."
3140
- ) : I.code === "INVALID_SLUG" ? i(
3140
+ ) : D.code === "INVALID_SLUG" ? i(
3141
3141
  "The slug format is invalid. Please use only lowercase letters, numbers, and hyphens."
3142
- ) : I.code === "PERMISSION_DENIED" ? i("You don't have permission to duplicate this page.") : i(
3143
- I.message || "Failed to duplicate page. Please try again later."
3142
+ ) : D.code === "PERMISSION_DENIED" ? i("You don't have permission to duplicate this page.") : i(
3143
+ D.message || "Failed to duplicate page. Please try again later."
3144
3144
  );
3145
3145
  }
3146
3146
  }
@@ -3179,7 +3179,7 @@ const Oo = ({
3179
3179
  {
3180
3180
  id: "name",
3181
3181
  value: l,
3182
- onChange: (N) => o(N.target.value),
3182
+ onChange: (w) => o(w.target.value),
3183
3183
  required: !0
3184
3184
  }
3185
3185
  )
@@ -3190,10 +3190,10 @@ const Oo = ({
3190
3190
  ur,
3191
3191
  {
3192
3192
  value: d,
3193
- onChange: (N) => h(N),
3193
+ onChange: (w) => h(w),
3194
3194
  parentSlug: f,
3195
- onValidationChange: (N) => {
3196
- i(N ? null : "Invalid slug");
3195
+ onValidationChange: (w) => {
3196
+ i(w ? null : "Invalid slug");
3197
3197
  }
3198
3198
  }
3199
3199
  )
@@ -3224,18 +3224,18 @@ const Oo = ({
3224
3224
  ] })
3225
3225
  ] })
3226
3226
  ] }) });
3227
- }, Mo = 1 * 1024 * 1024, Fo = ({
3227
+ }, Bo = 1 * 1024 * 1024, Mo = ({
3228
3228
  page: e,
3229
3229
  onClose: t
3230
3230
  }) => {
3231
- const [n, s] = A(!1), [r, i] = A(""), [l, o] = A(""), [u, d] = A(!1), h = lt(null), f = vo(), { data: y } = Re(), p = y == null ? void 0 : y.find(
3232
- (k) => k.key === e.pageType
3233
- ), g = (p == null ? void 0 : p.name) || Yt(e.pageType), N = be(
3234
- (k) => {
3235
- var D;
3236
- const b = (D = k.target.files) == null ? void 0 : D[0];
3231
+ const [n, s] = A(!1), [r, i] = A(""), [l, o] = A(""), [u, d] = A(!1), h = lt(null), f = yo(), { data: y } = Re(), p = y == null ? void 0 : y.find(
3232
+ (I) => I.key === e.pageType
3233
+ ), g = (p == null ? void 0 : p.name) || Yt(e.pageType), w = be(
3234
+ (I) => {
3235
+ var L;
3236
+ const b = (L = I.target.files) == null ? void 0 : L[0];
3237
3237
  if (b) {
3238
- if (b.size > Mo) {
3238
+ if (b.size > Bo) {
3239
3239
  W.error("File too large", {
3240
3240
  description: `Maximum file size is 1MB. Selected file is ${(b.size / 1024).toFixed(2)}KB.`
3241
3241
  }), h.current && (h.current.value = "");
@@ -3257,10 +3257,10 @@ const Oo = ({
3257
3257
  []
3258
3258
  ), E = () => {
3259
3259
  o(""), h.current && (h.current.value = "");
3260
- }, I = () => {
3261
- var k;
3262
- (k = h.current) == null || k.click();
3263
- }, w = () => {
3260
+ }, D = () => {
3261
+ var I;
3262
+ (I = h.current) == null || I.click();
3263
+ }, N = () => {
3264
3264
  s(!0), f.mutate(
3265
3265
  {
3266
3266
  page: e,
@@ -3291,7 +3291,7 @@ const Oo = ({
3291
3291
  /* @__PURE__ */ c("div", { className: "space-y-4 mb-4 text-xs", children: [
3292
3292
  /* @__PURE__ */ c("div", { className: "p-4 border rounded bg-slate-50 space-y-3", children: [
3293
3293
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
3294
- /* @__PURE__ */ a(ll, { className: "w-4 h-4 text-slate-500" }),
3294
+ /* @__PURE__ */ a(il, { className: "w-4 h-4 text-slate-500" }),
3295
3295
  /* @__PURE__ */ a("span", { className: "font-medium text-slate-500", children: "Page Name:" }),
3296
3296
  /* @__PURE__ */ a("span", { className: "font-semibold", children: Yt(e.name) })
3297
3297
  ] }),
@@ -3310,7 +3310,7 @@ const Oo = ({
3310
3310
  placeholder: "Describe this template's purpose",
3311
3311
  className: "text-xs resize-none h-24 mt-1",
3312
3312
  value: r,
3313
- onChange: (k) => i(k.target.value)
3313
+ onChange: (I) => i(I.target.value)
3314
3314
  }
3315
3315
  )
3316
3316
  ] }),
@@ -3324,7 +3324,7 @@ const Oo = ({
3324
3324
  type: "file",
3325
3325
  id: "previewImage",
3326
3326
  ref: h,
3327
- onChange: N,
3327
+ onChange: w,
3328
3328
  accept: "image/*",
3329
3329
  className: "hidden"
3330
3330
  }
@@ -3334,7 +3334,7 @@ const Oo = ({
3334
3334
  {
3335
3335
  type: "button",
3336
3336
  variant: "outline",
3337
- onClick: I,
3337
+ onClick: D,
3338
3338
  disabled: u,
3339
3339
  className: "w-full",
3340
3340
  children: u ? /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
@@ -3378,22 +3378,22 @@ const Oo = ({
3378
3378
  T,
3379
3379
  {
3380
3380
  variant: "outline",
3381
- onClick: (k) => {
3382
- k.stopPropagation(), t();
3381
+ onClick: (I) => {
3382
+ I.stopPropagation(), t();
3383
3383
  },
3384
3384
  children: "Cancel"
3385
3385
  }
3386
3386
  ),
3387
- /* @__PURE__ */ a(T, { variant: "default", disabled: n, onClick: w, children: "Mark as template" })
3387
+ /* @__PURE__ */ a(T, { variant: "default", disabled: n, onClick: N, children: "Mark as template" })
3388
3388
  ]
3389
3389
  }
3390
3390
  )
3391
3391
  ] }) });
3392
- }, jo = ({
3392
+ }, Fo = ({
3393
3393
  page: e,
3394
3394
  onClose: t
3395
3395
  }) => {
3396
- const [n, s] = A(!1), r = bo();
3396
+ const [n, s] = A(!1), r = vo();
3397
3397
  return /* @__PURE__ */ a(qe, { open: !0, onOpenChange: t, children: /* @__PURE__ */ c(ze, { children: [
3398
3398
  /* @__PURE__ */ c($e, { children: [
3399
3399
  /* @__PURE__ */ a(Ke, { children: "Unmark as template" }),
@@ -3428,7 +3428,7 @@ const Oo = ({
3428
3428
  }
3429
3429
  )
3430
3430
  ] }) });
3431
- }, qo = ({ currentEditor: e }) => {
3431
+ }, jo = ({ currentEditor: e }) => {
3432
3432
  const { user: t } = ut(), { data: n } = qt(e);
3433
3433
  return !n || !e || e === (t == null ? void 0 : t.id) ? null : /* @__PURE__ */ a("span", { className: "ml-2 text-xs font-light text-gray-500 flex items-center gap-1", children: /* @__PURE__ */ c(bn, { children: [
3434
3434
  /* @__PURE__ */ a(En, { children: /* @__PURE__ */ a(Ls, { className: "w-3 h-3" }) }),
@@ -3437,7 +3437,7 @@ const Oo = ({
3437
3437
  " is editing"
3438
3438
  ] }) })
3439
3439
  ] }) });
3440
- }, zo = ({
3440
+ }, qo = ({
3441
3441
  parentSlug: e,
3442
3442
  page: t,
3443
3443
  active: n,
@@ -3452,29 +3452,29 @@ const Oo = ({
3452
3452
  const h = dr(), { data: f } = Re(), { hasPermission: y } = Ft(), [, p] = Aa(), g = ne(
3453
3453
  () => we(f, { key: t.pageType }),
3454
3454
  [f, t.pageType]
3455
- ), N = ne(() => {
3456
- const b = Z(t, "slug", ""), D = e ? pt(e) : "", M = D ? b.replace(D, "") : b;
3455
+ ), w = ne(() => {
3456
+ const b = Z(t, "slug", ""), L = e ? pt(e) : "", M = L ? b.replace(L, "") : b;
3457
3457
  return M || "/";
3458
- }, [t, e]), E = !y(ge.EDIT_PAGE) && !y(ge.DELETE_PAGE) && !y(ge.UNPUBLISH_PAGE), I = ne(() => !!t.isTemplate, [t.isTemplate]), w = ne(
3458
+ }, [t, e]), E = !y(ge.EDIT_PAGE) && !y(ge.DELETE_PAGE) && !y(ge.UNPUBLISH_PAGE), D = ne(() => !!t.isTemplate, [t.isTemplate]), N = ne(
3459
3459
  () => !!(g != null && g.hasSlug),
3460
3460
  [g == null ? void 0 : g.hasSlug]
3461
- ), k = be(() => {
3461
+ ), I = be(() => {
3462
3462
  p("outline"), h(Z(t, "id"), s);
3463
3463
  }, [h, s, t, p]);
3464
3464
  return /* @__PURE__ */ c(
3465
3465
  "div",
3466
3466
  {
3467
- onClick: k,
3467
+ onClick: I,
3468
3468
  className: `rounded flex p-1.5 items-center justify-between leading-none duration-300 cursor-pointer px-3 py-1.5 ${n ? "bg-gray-200" : "hover:bg-gray-100"}`,
3469
3469
  children: [
3470
3470
  /* @__PURE__ */ c("div", { className: "flex items-center gap-x-2", children: [
3471
- t.dynamic ? /* @__PURE__ */ a("div", { className: "w-4 h-4 text-slate-500 stroke-[1]", children: /* @__PURE__ */ a(ol, { className: "w-4 h-4 text-yellow-400" }) }) : g != null && g.icon ? /* @__PURE__ */ a(
3471
+ t.dynamic ? /* @__PURE__ */ a("div", { className: "w-4 h-4 text-slate-500 stroke-[1]", children: /* @__PURE__ */ a(ll, { className: "w-4 h-4 text-yellow-400" }) }) : g != null && g.icon ? /* @__PURE__ */ a(
3472
3472
  "div",
3473
3473
  {
3474
3474
  className: "w-4 h-4 text-slate-500 stroke-[1]",
3475
3475
  dangerouslySetInnerHTML: { __html: g.icon }
3476
3476
  }
3477
- ) : g != null && g.hasSlug ? /* @__PURE__ */ a(wn, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ a(cl, { className: "w-4 h-4 text-slate-500 stroke-[1]" }),
3477
+ ) : g != null && g.hasSlug ? /* @__PURE__ */ a(wn, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ a(ol, { className: "w-4 h-4 text-slate-500 stroke-[1]" }),
3478
3478
  /* @__PURE__ */ a(
3479
3479
  "div",
3480
3480
  {
@@ -3488,9 +3488,9 @@ const Oo = ({
3488
3488
  variant: "outline",
3489
3489
  className: `ml-2 text-xs max-w-full leading-tight py-px font-normal rounded-full text-gray-400 border ${n ? "border-gray-300" : "border-gray-200"}`,
3490
3490
  children: [
3491
- N,
3491
+ w,
3492
3492
  t.dynamic && /* @__PURE__ */ c("span", { className: "text-xs font-light leading-none text-slate-500", children: [
3493
- Ea(N, "/") ? `${g == null ? void 0 : g.dynamicSlug}` : `/${g == null ? void 0 : g.dynamicSlug}`,
3493
+ Ea(w, "/") ? `${g == null ? void 0 : g.dynamicSlug}` : `/${g == null ? void 0 : g.dynamicSlug}`,
3494
3494
  t.dynamicSlugCustom
3495
3495
  ] })
3496
3496
  ]
@@ -3503,7 +3503,7 @@ const Oo = ({
3503
3503
  children: g == null ? void 0 : g.name
3504
3504
  }
3505
3505
  ),
3506
- I && /* @__PURE__ */ a(
3506
+ D && /* @__PURE__ */ a(
3507
3507
  rs,
3508
3508
  {
3509
3509
  variant: "outline",
@@ -3513,7 +3513,7 @@ const Oo = ({
3513
3513
  )
3514
3514
  ] }),
3515
3515
  /* @__PURE__ */ c("div", { className: "flex items-center space-x-4", children: [
3516
- /* @__PURE__ */ a(qo, { currentEditor: t.currentEditor }),
3516
+ /* @__PURE__ */ a(jo, { currentEditor: t.currentEditor }),
3517
3517
  !E && /* @__PURE__ */ c(pn, { children: [
3518
3518
  /* @__PURE__ */ a(yn, { asChild: !0, onClick: (b) => b.stopPropagation(), children: /* @__PURE__ */ a(Us, { className: "h-4 w-4 hover:stroke-[3]" }) }),
3519
3519
  /* @__PURE__ */ c(vn, { align: "end", className: "text-sm", children: [
@@ -3525,7 +3525,7 @@ const Oo = ({
3525
3525
  b.stopPropagation(), d(t);
3526
3526
  },
3527
3527
  children: [
3528
- /* @__PURE__ */ a(ul, { className: "size-3" }),
3528
+ /* @__PURE__ */ a(cl, { className: "size-3" }),
3529
3529
  "Duplicate page"
3530
3530
  ]
3531
3531
  }
@@ -3572,7 +3572,7 @@ const Oo = ({
3572
3572
  ]
3573
3573
  }
3574
3574
  ),
3575
- y(ge.MARK_AS_TEMPLATE) && w && /* @__PURE__ */ a(pe, { children: I ? /* @__PURE__ */ c(
3575
+ y(ge.MARK_AS_TEMPLATE) && N && /* @__PURE__ */ a(pe, { children: D ? /* @__PURE__ */ c(
3576
3576
  Be,
3577
3577
  {
3578
3578
  className: "flex items-center gap-2 cursor-pointer",
@@ -3603,11 +3603,11 @@ const Oo = ({
3603
3603
  ]
3604
3604
  }
3605
3605
  );
3606
- }, $o = ({
3606
+ }, zo = ({
3607
3607
  close: e,
3608
3608
  isOpen: t
3609
3609
  }) => {
3610
- const [, n] = A([]), [s, r] = A(null), [i, l] = A(""), [o, u] = A(null), [d, h] = A(null), [f, y] = A(null), [p, g] = A(null), [N, E] = A(null), { data: I, isFetching: w, refetch: k } = Zn(), [b, D] = A(""), { hasPermission: M } = Ft(), [J, B] = Me(), $ = J.get("page"), { data: U } = Re(), Y = be(
3610
+ const [, n] = A([]), [s, r] = A(null), [i, l] = A(""), [o, u] = A(null), [d, h] = A(null), [f, y] = A(null), [p, g] = A(null), [w, E] = A(null), { data: D, isFetching: N, refetch: I } = Zn(), [b, L] = A(""), { hasPermission: M } = Ft(), [J, B] = Me(), $ = J.get("page"), { data: U } = Re(), Y = be(
3611
3611
  (_) => {
3612
3612
  var ae;
3613
3613
  return (ae = we(U, { key: _ })) == null ? void 0 : ae.hasSlug;
@@ -3615,14 +3615,14 @@ const Oo = ({
3615
3615
  [U]
3616
3616
  );
3617
3617
  Ee(() => {
3618
- t && k();
3619
- }, [t, k]), Ee(() => {
3618
+ t && I();
3619
+ }, [t, I]), Ee(() => {
3620
3620
  if (!ue(b)) return;
3621
3621
  const _ = sessionStorage.getItem("pageTypeFilter") || "all";
3622
- !ue(U) && _ && (we(U, { key: _ }) ? D(_) : D("all"));
3622
+ !ue(U) && _ && (we(U, { key: _ }) ? L(_) : L("all"));
3623
3623
  }, [U, b]);
3624
3624
  const R = (_) => {
3625
- D(_), sessionStorage.setItem("pageTypeFilter", _);
3625
+ L(_), sessionStorage.setItem("pageTypeFilter", _);
3626
3626
  }, Ie = be(
3627
3627
  (_) => {
3628
3628
  const ke = new URLSearchParams(window.location.search).get("lang"), De = new URLSearchParams({ page: _ });
@@ -3631,14 +3631,14 @@ const Oo = ({
3631
3631
  [B, e]
3632
3632
  );
3633
3633
  Ee(() => {
3634
- if ($ && !w) {
3635
- const _ = we(I, { id: $ });
3634
+ if ($ && !N) {
3635
+ const _ = we(D, { id: $ });
3636
3636
  _ && (_ != null && _.pageType) ? n((ae) => [...ae, _ == null ? void 0 : _.pageType]) : (window.history.replaceState(null, "", "/"), B(new URLSearchParams({})), window.dispatchEvent(new PopStateEvent("popstate")));
3637
3637
  }
3638
- }, [I, $, w, B]);
3638
+ }, [D, $, N, B]);
3639
3639
  const K = ne(() => {
3640
3640
  const _ = On(
3641
- Ce(I, (m) => ue(i) ? !0 : Qt($t(m == null ? void 0 : m.name), $t(i)) || Qt($t(m == null ? void 0 : m.slug), $t(i)))
3641
+ Ce(D, (m) => ue(i) ? !0 : Qt($t(m == null ? void 0 : m.name), $t(i)) || Qt($t(m == null ? void 0 : m.slug), $t(i)))
3642
3642
  );
3643
3643
  if (b !== "all")
3644
3644
  return On(Ce(_, { pageType: b }));
@@ -3663,7 +3663,7 @@ const Oo = ({
3663
3663
  (m) => Y(m.pageType)
3664
3664
  ).sort((m, S) => m.name.localeCompare(S.name)), v = Ce(ke, (m) => !Y(m.pageType));
3665
3665
  return On([...Ze, ...v]);
3666
- }, [I, Y, i, b]);
3666
+ }, [D, Y, i, b]);
3667
3667
  return /* @__PURE__ */ c("div", { className: "flex flex-col justify-between h-full", children: [
3668
3668
  /* @__PURE__ */ c("div", { className: "flex flex-col h-full space-y-6", children: [
3669
3669
  /* @__PURE__ */ c("div", { className: "relative flex item-center gap-x-4", children: [
@@ -3683,15 +3683,15 @@ const Oo = ({
3683
3683
  onChange: (_) => l(_.target.value)
3684
3684
  }
3685
3685
  ),
3686
- !ue(b) && /* @__PURE__ */ c(Ui, { value: b, onValueChange: R, children: [
3686
+ !ue(b) && /* @__PURE__ */ c(Gi, { value: b, onValueChange: R, children: [
3687
3687
  /* @__PURE__ */ a(
3688
- Oi,
3688
+ Ui,
3689
3689
  {
3690
3690
  className: `${b === "all" ? "bg-gray-50 hover:bg-gray-100" : "bg-gray-100 hover:bg-gray-50"} min-w-[120px] h-max p-0 py-1 pl-2 pr-1 top-1.5 -mt-px absolute text-gray-600 right-1.5 w-max text-xs whitespace-nowrap ring-0 focus:ring-0 shadow-none`,
3691
- children: /* @__PURE__ */ a(Ri, { placeholder: "Select page type" })
3691
+ children: /* @__PURE__ */ a(Oi, { placeholder: "Select page type" })
3692
3692
  }
3693
3693
  ),
3694
- /* @__PURE__ */ c(Bi, { align: "end", children: [
3694
+ /* @__PURE__ */ c(Ri, { align: "end", children: [
3695
3695
  /* @__PURE__ */ a(as, { value: "all", children: "All" }, "all"),
3696
3696
  !ue(
3697
3697
  Ce(U, (_) => _.hasSlug)
@@ -3736,7 +3736,7 @@ const Oo = ({
3736
3736
  ] })
3737
3737
  ] })
3738
3738
  ] }),
3739
- w ? /* @__PURE__ */ a("div", { className: "space-y-2", children: We([...Array(5).keys()], (_) => /* @__PURE__ */ a(
3739
+ N ? /* @__PURE__ */ a("div", { className: "space-y-2", children: We([...Array(5).keys()], (_) => /* @__PURE__ */ a(
3740
3740
  "div",
3741
3741
  {
3742
3742
  className: "w-full bg-gray-200 rounded h-9 animate-pulse"
@@ -3781,7 +3781,7 @@ const Oo = ({
3781
3781
  }
3782
3782
  ),
3783
3783
  f && /* @__PURE__ */ a(
3784
- Oo,
3784
+ Uo,
3785
3785
  {
3786
3786
  closePanel: e,
3787
3787
  editPage: Ie,
@@ -3798,21 +3798,21 @@ const Oo = ({
3798
3798
  }
3799
3799
  ),
3800
3800
  p && /* @__PURE__ */ a(
3801
- Fo,
3801
+ Mo,
3802
3802
  {
3803
3803
  page: p,
3804
3804
  onClose: () => g(null)
3805
3805
  }
3806
3806
  ),
3807
- N && /* @__PURE__ */ a(
3808
- jo,
3807
+ w && /* @__PURE__ */ a(
3808
+ Fo,
3809
3809
  {
3810
- page: N,
3810
+ page: w,
3811
3811
  onClose: () => E(null)
3812
3812
  }
3813
3813
  ),
3814
3814
  s && /* @__PURE__ */ a(
3815
- Bo,
3815
+ Ro,
3816
3816
  {
3817
3817
  page: s,
3818
3818
  onClose: () => r(null)
@@ -3835,7 +3835,7 @@ const Oo = ({
3835
3835
  const f = !ue(e == null ? void 0 : e.children);
3836
3836
  return /* @__PURE__ */ c("div", { className: "border-0", children: [
3837
3837
  /* @__PURE__ */ a(
3838
- zo,
3838
+ qo,
3839
3839
  {
3840
3840
  closePanel: n,
3841
3841
  setUnpublishPage: s,
@@ -3867,10 +3867,10 @@ const Oo = ({
3867
3867
  y.id || `child-${h}-${y.key}`
3868
3868
  )) })
3869
3869
  ] }, e.id || `level-${h}-${e.key}`);
3870
- }, Ko = () => {
3870
+ }, $o = () => {
3871
3871
  const e = at("logo", null);
3872
3872
  return e ? /* @__PURE__ */ a("div", { className: "w-full max-h-9 overflow-hidden pr-2", children: Hn.createElement(e, {}) }) : null;
3873
- }, Vo = () => {
3873
+ }, Ko = () => {
3874
3874
  const [e] = Me(), t = e.get("page"), { data: n, isFetching: s } = Ve(), [r, i] = A(!1), { savePage: l } = Ss(), o = !!t && !ue(n), u = !t || !s && ue(n) || r;
3875
3875
  return /* @__PURE__ */ c(pe, { children: [
3876
3876
  /* @__PURE__ */ c(
@@ -3882,7 +3882,7 @@ const Oo = ({
3882
3882
  l(), i(!0);
3883
3883
  },
3884
3884
  children: [
3885
- /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(dl, { className: "h-4 w-4" }) }),
3885
+ /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a(ul, { className: "h-4 w-4" }) }),
3886
3886
  /* @__PURE__ */ c("span", { className: "truncate leading-tight flex items-center max-w-[200px]", children: [
3887
3887
  /* @__PURE__ */ a("span", { className: "text-slate-600 pr-1 font-light", children: "Editing:" }),
3888
3888
  s ? /* @__PURE__ */ a(gt, { className: "h-4 w-4 animate-spin text-slate-400 ml-2" }) : Yt(Z(n, "name")) ?? ""
@@ -3918,28 +3918,28 @@ const Oo = ({
3918
3918
  )
3919
3919
  ] })
3920
3920
  ] }),
3921
- /* @__PURE__ */ a(Mi, { className: "sr-only", children: "Manage your site structure" })
3921
+ /* @__PURE__ */ a(Bi, { className: "sr-only", children: "Manage your site structure" })
3922
3922
  ] }),
3923
- /* @__PURE__ */ a("div", { className: "h-[calc(100vh-100px)] overflow-y-auto", children: /* @__PURE__ */ a($o, { isOpen: u, close: () => i(!1) }) })
3923
+ /* @__PURE__ */ a("div", { className: "h-[calc(100vh-100px)] overflow-y-auto", children: /* @__PURE__ */ a(zo, { isOpen: u, close: () => i(!1) }) })
3924
3924
  ]
3925
3925
  }
3926
3926
  )
3927
3927
  }
3928
3928
  )
3929
3929
  ] });
3930
- }, Ho = () => {
3930
+ }, Vo = () => {
3931
3931
  const { fallbackLang: e, languages: t, selectedLang: n, setSelectedLang: s } = ct(), r = ue(n) ? e : n, [, i] = Me();
3932
3932
  Ee(() => {
3933
- const g = new URLSearchParams(window.location.search), N = g.get("lang");
3934
- N && (t.includes(N) ? s(N) : (g.delete("lang"), i(g), s("")));
3933
+ const g = new URLSearchParams(window.location.search), w = g.get("lang");
3934
+ w && (t.includes(w) ? s(w) : (g.delete("lang"), i(g), s("")));
3935
3935
  }, [t, i, s]);
3936
3936
  const [l, o] = A(null), { data: u } = Ve(), { data: d } = yt(), { data: h, isFetching: f } = jt(), y = ne(() => {
3937
3937
  const g = On(
3938
- We(Z(d, "languages"), (N) => {
3939
- const E = we(h, { lang: N });
3938
+ We(Z(d, "languages"), (w) => {
3939
+ const E = we(h, { lang: w });
3940
3940
  return {
3941
- key: N,
3942
- value: Z(Xe, N, N),
3941
+ key: w,
3942
+ value: Z(Xe, w, w),
3943
3943
  isLangPageAdded: !!E
3944
3944
  };
3945
3945
  })
@@ -3954,15 +3954,15 @@ const Oo = ({
3954
3954
  ];
3955
3955
  }, [e, h, d]), p = (g) => {
3956
3956
  s(g);
3957
- const N = new URLSearchParams(window.location.search);
3958
- g === e ? N.delete("lang") : N.set("lang", g);
3959
- const E = N.toString(), I = `${window.location.pathname}${E ? `?${E}` : ""}`;
3960
- window.history.pushState({}, "", I), i(N), window.dispatchEvent(new PopStateEvent("popstate"));
3957
+ const w = new URLSearchParams(window.location.search);
3958
+ g === e ? w.delete("lang") : w.set("lang", g);
3959
+ const E = w.toString(), D = `${window.location.pathname}${E ? `?${E}` : ""}`;
3960
+ window.history.pushState({}, "", D), i(w), window.dispatchEvent(new PopStateEvent("popstate"));
3961
3961
  };
3962
3962
  return ue(t) || f ? null : /* @__PURE__ */ c(pe, { children: [
3963
3963
  /* @__PURE__ */ c(pn, { children: [
3964
3964
  /* @__PURE__ */ a(yn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ c(T, { variant: "ghost", size: "sm", className: "gap-2", children: [
3965
- /* @__PURE__ */ a(hl, { className: "w-4 h-4" }),
3965
+ /* @__PURE__ */ a(dl, { className: "w-4 h-4" }),
3966
3966
  Z(Xe, r, r),
3967
3967
  /* @__PURE__ */ a(Ka, { className: "w-4 h-4" })
3968
3968
  ] }) }),
@@ -3984,7 +3984,7 @@ const Oo = ({
3984
3984
  {
3985
3985
  className: "text-[9px] flex items-center gap-x-1 text-orange-500 leading-none",
3986
3986
  children: [
3987
- /* @__PURE__ */ a(ml, { fill: "orange", className: "w-2 h-2" }),
3987
+ /* @__PURE__ */ a(hl, { fill: "orange", className: "w-2 h-2" }),
3988
3988
  "Primary"
3989
3989
  ]
3990
3990
  }
@@ -3995,7 +3995,7 @@ const Oo = ({
3995
3995
  )
3996
3996
  ),
3997
3997
  !ue(y.filter((g) => !g.isLangPageAdded)) && /* @__PURE__ */ c(pe, { children: [
3998
- /* @__PURE__ */ a(Fi, {}),
3998
+ /* @__PURE__ */ a(Mi, {}),
3999
3999
  /* @__PURE__ */ c(
4000
4000
  T,
4001
4001
  {
@@ -4030,14 +4030,14 @@ const Oo = ({
4030
4030
  )
4031
4031
  ] });
4032
4032
  };
4033
- function Wo() {
4033
+ function Ho() {
4034
4034
  return /* @__PURE__ */ c("div", { className: "flex relative z-10 items-center justify-end gap-1", children: [
4035
+ /* @__PURE__ */ a($o, {}),
4035
4036
  /* @__PURE__ */ a(Ko, {}),
4036
- /* @__PURE__ */ a(Vo, {}),
4037
- /* @__PURE__ */ a(Ho, {})
4037
+ /* @__PURE__ */ a(Vo, {})
4038
4038
  ] });
4039
4039
  }
4040
- function Yo(e) {
4040
+ function Wo(e) {
4041
4041
  const t = se(), n = z();
4042
4042
  return _e({
4043
4043
  queryKey: [j, "revisions", e],
@@ -4050,7 +4050,7 @@ function Yo(e) {
4050
4050
  staleTime: 0
4051
4051
  });
4052
4052
  }
4053
- const Qo = () => {
4053
+ const Yo = () => {
4054
4054
  const e = se(), t = z(), n = Se();
4055
4055
  return xe({
4056
4056
  mutationFn: async (s) => await t(e, {
@@ -4063,7 +4063,7 @@ const Qo = () => {
4063
4063
  });
4064
4064
  }
4065
4065
  });
4066
- }, Xo = () => {
4066
+ }, Qo = () => {
4067
4067
  const e = se(), t = z(), n = Se();
4068
4068
  return xe({
4069
4069
  mutationFn: async ({
@@ -4080,14 +4080,14 @@ const Qo = () => {
4080
4080
  }
4081
4081
  });
4082
4082
  };
4083
- function Zo() {
4083
+ function Xo() {
4084
4084
  const { data: e } = Ve(), { saveState: t } = Ss(), [n] = Fs();
4085
4085
  return e ? /* @__PURE__ */ a("div", { className: "flex items-start gap-3 rounded-md border p-2 hover:bg-accent/50 bg-primary/5 mb-4", children: /* @__PURE__ */ c("div", { className: "flex-1 space-y-1", children: [
4086
4086
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ a("p", { className: "text-sm flex items-center gap-1 font-medium leading-none", children: /* @__PURE__ */ a("span", { className: "font-bold", children: "Currently editing" }) }) }),
4087
4087
  /* @__PURE__ */ a("div", { className: "flex items-center text-xs text-muted-foreground", children: !ue(n.lastSaved) && /* @__PURE__ */ c("span", { children: [
4088
4088
  "Last updated",
4089
4089
  " ",
4090
- Ll(new Date(n.lastSaved), {
4090
+ kl(new Date(n.lastSaved), {
4091
4091
  addSuffix: !0
4092
4092
  })
4093
4093
  ] }) }),
@@ -4103,28 +4103,28 @@ function Zo() {
4103
4103
  ] })
4104
4104
  ] }) }) : null;
4105
4105
  }
4106
- function Jo() {
4106
+ function Zo() {
4107
4107
  const [e, t] = Ne.useState(!1), [n, s] = Ne.useState(null), [r, i] = Ne.useState(!1), [l, o] = Ne.useState(!1), { data: u } = Ve(), {
4108
4108
  data: d,
4109
4109
  isFetching: h,
4110
4110
  error: f,
4111
4111
  refetch: y
4112
- } = Yo(u == null ? void 0 : u.id), { mutate: p, isPending: g } = Qo(), { mutate: N, isPending: E } = Xo(), I = Se(), w = (M) => {
4113
- n && N(
4112
+ } = Wo(u == null ? void 0 : u.id), { mutate: p, isPending: g } = Yo(), { mutate: w, isPending: E } = Qo(), D = Se(), N = (M) => {
4113
+ n && w(
4114
4114
  { revisionId: n.uid, discardCurrent: M },
4115
4115
  {
4116
4116
  onSuccess: () => {
4117
- i(!1), s(null), I.invalidateQueries({
4117
+ i(!1), s(null), D.invalidateQueries({
4118
4118
  queryKey: [j, P.GET_DRAFT_PAGE]
4119
4119
  });
4120
4120
  }
4121
4121
  }
4122
4122
  );
4123
- }, k = (M) => {
4123
+ }, I = (M) => {
4124
4124
  s(M), i(!0);
4125
4125
  }, b = (M) => {
4126
4126
  s(M), o(!0);
4127
- }, D = () => {
4127
+ }, L = () => {
4128
4128
  n && p(n.uid, {
4129
4129
  onSuccess: () => {
4130
4130
  o(!1), s(null);
@@ -4136,7 +4136,7 @@ function Jo() {
4136
4136
  }, [e, y]), /* @__PURE__ */ c(pe, { children: [
4137
4137
  /* @__PURE__ */ a(ks, { children: /* @__PURE__ */ c(bn, { children: [
4138
4138
  /* @__PURE__ */ c(Ba, { open: e, onOpenChange: t, children: [
4139
- /* @__PURE__ */ a(ji, { asChild: !0, children: /* @__PURE__ */ a(En, { asChild: !0, children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
4139
+ /* @__PURE__ */ a(Fi, { asChild: !0, children: /* @__PURE__ */ a(En, { asChild: !0, children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
4140
4140
  /* @__PURE__ */ c(T, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
4141
4141
  /* @__PURE__ */ a(ea, { className: "h-4 w-4" }),
4142
4142
  /* @__PURE__ */ a("span", { className: "sr-only", children: "View revision history" })
@@ -4158,14 +4158,14 @@ function Jo() {
4158
4158
  )
4159
4159
  ] })
4160
4160
  ] }),
4161
- /* @__PURE__ */ a(qi, { className: "h-[calc(100vh-6rem)] pr-2", children: h ? /* @__PURE__ */ a(ec, {}) : f ? /* @__PURE__ */ a("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "Failed to load revisions. Please try again." }) : /* @__PURE__ */ c("div", { className: "mt-2 space-y-2", children: [
4162
- /* @__PURE__ */ a(Zo, {}),
4161
+ /* @__PURE__ */ a(ji, { className: "h-[calc(100vh-6rem)] pr-2", children: h ? /* @__PURE__ */ a(Jo, {}) : f ? /* @__PURE__ */ a("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "Failed to load revisions. Please try again." }) : /* @__PURE__ */ c("div", { className: "mt-2 space-y-2", children: [
4162
+ /* @__PURE__ */ a(Xo, {}),
4163
4163
  d == null ? void 0 : d.map((M) => /* @__PURE__ */ a(
4164
- tc,
4164
+ ec,
4165
4165
  {
4166
4166
  revision: M,
4167
4167
  isLatest: M.uid === "current",
4168
- onRestore: () => k(M),
4168
+ onRestore: () => I(M),
4169
4169
  onDelete: () => b(M)
4170
4170
  },
4171
4171
  M.uid
@@ -4176,28 +4176,28 @@ function Jo() {
4176
4176
  /* @__PURE__ */ a(Nn, { side: "bottom", children: /* @__PURE__ */ a("p", { children: "Revision history" }) })
4177
4177
  ] }) }),
4178
4178
  /* @__PURE__ */ a(
4179
- sc,
4179
+ nc,
4180
4180
  {
4181
4181
  open: r,
4182
4182
  onOpenChange: i,
4183
4183
  revision: n,
4184
- onRestore: w,
4184
+ onRestore: N,
4185
4185
  isRestoring: E
4186
4186
  }
4187
4187
  ),
4188
4188
  /* @__PURE__ */ a(
4189
- ac,
4189
+ sc,
4190
4190
  {
4191
4191
  open: l,
4192
4192
  onOpenChange: o,
4193
4193
  revision: n,
4194
- onDelete: D,
4194
+ onDelete: L,
4195
4195
  isDeleting: g
4196
4196
  }
4197
4197
  )
4198
4198
  ] });
4199
4199
  }
4200
- function ec() {
4200
+ function Jo() {
4201
4201
  return /* @__PURE__ */ a("div", { className: "space-y-2 mt-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ c("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
4202
4202
  /* @__PURE__ */ c("div", { className: "flex-1 space-y-1", children: [
4203
4203
  /* @__PURE__ */ a(Cn, { className: "h-4 w-3/4" }),
@@ -4207,7 +4207,7 @@ function ec() {
4207
4207
  /* @__PURE__ */ a(Cn, { className: "h-8 w-8 rounded-full" })
4208
4208
  ] }, t)) });
4209
4209
  }
4210
- function tc({
4210
+ function ec({
4211
4211
  revision: e,
4212
4212
  isLatest: t,
4213
4213
  onRestore: n,
@@ -4230,10 +4230,10 @@ function tc({
4230
4230
  ] }) }),
4231
4231
  /* @__PURE__ */ a("div", { className: "flex items-center text-xs text-muted-foreground", children: /* @__PURE__ */ a("span", { children: Xn(e.createdAt, "MMM d, h:mm a") }) }),
4232
4232
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2 pt-0.5", children: e.type === "published" ? /* @__PURE__ */ c("div", { className: "flex items-center gap-1 rounded-full bg-green-500/10 px-1.5 py-0.5 text-xs text-green-600", children: [
4233
- /* @__PURE__ */ a(fl, { className: "h-3 w-3" }),
4233
+ /* @__PURE__ */ a(ml, { className: "h-3 w-3" }),
4234
4234
  /* @__PURE__ */ a("span", { children: "Published" })
4235
4235
  ] }) : /* @__PURE__ */ c("div", { className: "flex items-center gap-1 rounded-full bg-amber-500/10 px-1.5 py-0.5 text-xs text-amber-600", children: [
4236
- /* @__PURE__ */ a(gl, { className: "h-3 w-3" }),
4236
+ /* @__PURE__ */ a(fl, { className: "h-3 w-3" }),
4237
4237
  /* @__PURE__ */ a("span", { children: "Draft" })
4238
4238
  ] }) })
4239
4239
  ] }),
@@ -4245,7 +4245,7 @@ function tc({
4245
4245
  ge.DELETE_REVISION
4246
4246
  ],
4247
4247
  children: /* @__PURE__ */ a(
4248
- nc,
4248
+ tc,
4249
4249
  {
4250
4250
  revision: e,
4251
4251
  onRestore: n,
@@ -4256,7 +4256,7 @@ function tc({
4256
4256
  )
4257
4257
  ] });
4258
4258
  }
4259
- function nc({
4259
+ function tc({
4260
4260
  revision: e,
4261
4261
  onRestore: t,
4262
4262
  onDelete: n
@@ -4272,7 +4272,7 @@ function nc({
4272
4272
  /* @__PURE__ */ a("span", { children: "Restore this version" })
4273
4273
  ] }) }),
4274
4274
  /* @__PURE__ */ a(He, { permission: ge.DELETE_REVISION, children: e.uid !== "current" && /* @__PURE__ */ c(pe, { children: [
4275
- /* @__PURE__ */ a(zi, {}),
4275
+ /* @__PURE__ */ a(qi, {}),
4276
4276
  /* @__PURE__ */ c(
4277
4277
  Be,
4278
4278
  {
@@ -4288,7 +4288,7 @@ function nc({
4288
4288
  ] })
4289
4289
  ] });
4290
4290
  }
4291
- function sc({
4291
+ function nc({
4292
4292
  open: e,
4293
4293
  onOpenChange: t,
4294
4294
  revision: n,
@@ -4330,7 +4330,7 @@ function sc({
4330
4330
  /* @__PURE__ */ a("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
4331
4331
  "Saving as draft..."
4332
4332
  ] }) : /* @__PURE__ */ c(pe, { children: [
4333
- /* @__PURE__ */ a(pl, { className: "mr-2 h-4 w-4" }),
4333
+ /* @__PURE__ */ a(gl, { className: "mr-2 h-4 w-4" }),
4334
4334
  "Save as draft"
4335
4335
  ] })
4336
4336
  }
@@ -4356,7 +4356,7 @@ function sc({
4356
4356
  }
4357
4357
  ) : null;
4358
4358
  }
4359
- function ac({
4359
+ function sc({
4360
4360
  open: e,
4361
4361
  onOpenChange: t,
4362
4362
  revision: n,
@@ -4418,24 +4418,24 @@ function ac({
4418
4418
  }
4419
4419
  ) : null;
4420
4420
  }
4421
- const rc = () => {
4421
+ const ac = () => {
4422
4422
  const e = se(), t = z();
4423
4423
  return _e({
4424
4424
  queryKey: [j, P.GET_CHANGES],
4425
4425
  queryFn: async () => t(e, { action: P.GET_CHANGES })
4426
4426
  });
4427
- }, ic = ({ currentEditor: e }) => {
4427
+ }, rc = ({ currentEditor: e }) => {
4428
4428
  const { data: t } = qt(e);
4429
4429
  return t == null ? void 0 : t.name;
4430
4430
  };
4431
- function lc({
4431
+ function ic({
4432
4432
  showModal: e = !1,
4433
4433
  onClose: t = () => console.log("Cancelled")
4434
4434
  }) {
4435
- const [n, s] = A([]), { data: r, isFetching: i } = rc(), { data: l } = Re(), o = be(
4435
+ const [n, s] = A([]), { data: r, isFetching: i } = ac(), { data: l } = Re(), o = be(
4436
4436
  (b) => {
4437
- var D;
4438
- return (D = we(l, { key: b })) == null ? void 0 : D.hasSlug;
4437
+ var L;
4438
+ return (L = we(l, { key: b })) == null ? void 0 : L.hasSlug;
4439
4439
  },
4440
4440
  [l]
4441
4441
  ), u = ne(
@@ -4457,13 +4457,13 @@ function lc({
4457
4457
  const b = We(Ce(r, { online: !0 }), "id");
4458
4458
  f && b.push(f == null ? void 0 : f.id), s(b);
4459
4459
  }, [r, f]);
4460
- const g = n.length === (r == null ? void 0 : r.length), N = (b) => {
4460
+ const g = n.length === (r == null ? void 0 : r.length), w = (b) => {
4461
4461
  s(
4462
- (D) => Qt(D, b) ? Ce(D, (M) => M !== b) : ci(D, b)
4462
+ (L) => Qt(L, b) ? Ce(L, (M) => M !== b) : ci(L, b)
4463
4463
  );
4464
4464
  }, E = () => {
4465
4465
  s(g ? [] : We(r, "id"));
4466
- }, I = () => {
4466
+ }, D = () => {
4467
4467
  y(
4468
4468
  { ids: ui(n) },
4469
4469
  {
@@ -4472,21 +4472,21 @@ function lc({
4472
4472
  }
4473
4473
  }
4474
4474
  );
4475
- }, w = (b) => {
4475
+ }, N = (b) => {
4476
4476
  if (b === "theme") return "Theme";
4477
- const D = we(l, { key: b });
4478
- return D ? D == null ? void 0 : D.name : b;
4479
- }, k = ne(() => {
4477
+ const L = we(l, { key: b });
4478
+ return L ? L == null ? void 0 : L.name : b;
4479
+ }, I = ne(() => {
4480
4480
  const b = [
4481
4481
  { label: "Updated", top: "pt-2" },
4482
4482
  ...Tn(Ce(d, { online: !0 }), "pageType"),
4483
4483
  ...Tn(Ce(h, { online: !0 }), "pageType")
4484
- ].filter((J) => J.pageType !== "theme"), D = [
4484
+ ].filter((J) => J.pageType !== "theme"), L = [
4485
4485
  { label: "Offline", top: "pt-6" },
4486
4486
  ...Tn(Ce(d, { online: !1 }), "pageType"),
4487
4487
  ...Tn(Ce(h, { online: !1 }), "pageType")
4488
4488
  ], M = f ? [{ label: "Theme", top: "pt-6" }, f] : [];
4489
- return [...b, ...M, ...D];
4489
+ return [...b, ...M, ...L];
4490
4490
  }, [d, h, f]);
4491
4491
  return /* @__PURE__ */ a(qe, { open: e, onOpenChange: p ? () => {
4492
4492
  } : t, children: /* @__PURE__ */ c(ze, { className: "max-w-4xl max-h-[80%] flex flex-col", children: [
@@ -4527,7 +4527,7 @@ function lc({
4527
4527
  /* @__PURE__ */ a("th", { scope: "col", className: "px-4 py-3 w-[150px] text-right", children: "Status" })
4528
4528
  ] }) }),
4529
4529
  /* @__PURE__ */ a("tbody", { children: We(
4530
- k,
4530
+ I,
4531
4531
  (b) => b.label ? /* @__PURE__ */ a("tr", { children: /* @__PURE__ */ c(
4532
4532
  "td",
4533
4533
  {
@@ -4553,15 +4553,15 @@ function lc({
4553
4553
  "input",
4554
4554
  {
4555
4555
  checked: Qt(n, b == null ? void 0 : b.id),
4556
- onClick: (D) => {
4557
- D.stopPropagation(), N(b == null ? void 0 : b.id);
4556
+ onClick: (L) => {
4557
+ L.stopPropagation(), w(b == null ? void 0 : b.id);
4558
4558
  },
4559
4559
  type: "checkbox",
4560
4560
  className: "rounded cursor-pointer focus:outline-none focus:ring-0"
4561
4561
  }
4562
4562
  ),
4563
4563
  " ",
4564
- o(b.pageType) ? /* @__PURE__ */ a(wn, { className: "w-4 h-4" }) : /* @__PURE__ */ a(yl, { className: "w-4 h-4" }),
4564
+ o(b.pageType) ? /* @__PURE__ */ a(wn, { className: "w-4 h-4" }) : /* @__PURE__ */ a(pl, { className: "w-4 h-4" }),
4565
4565
  b.name,
4566
4566
  b.slug && /* @__PURE__ */ c("span", { className: "text-xs text-gray-500", children: [
4567
4567
  "(",
@@ -4573,7 +4573,7 @@ function lc({
4573
4573
  "-",
4574
4574
  " ",
4575
4575
  /* @__PURE__ */ a(
4576
- ic,
4576
+ rc,
4577
4577
  {
4578
4578
  currentEditor: b.currentEditor
4579
4579
  }
@@ -4585,7 +4585,7 @@ function lc({
4585
4585
  }
4586
4586
  ),
4587
4587
  /* @__PURE__ */ a("td", { className: "px-2", children: b.lang }),
4588
- /* @__PURE__ */ a("td", { className: "px-2", children: w(b == null ? void 0 : b.pageType) }),
4588
+ /* @__PURE__ */ a("td", { className: "px-2", children: N(b == null ? void 0 : b.pageType) }),
4589
4589
  /* @__PURE__ */ a("td", { className: "px-4 text-right", children: Na(b.changes) || "" })
4590
4590
  ]
4591
4591
  },
@@ -4599,14 +4599,14 @@ function lc({
4599
4599
  T,
4600
4600
  {
4601
4601
  disabled: p || i || ue(r),
4602
- onClick: I,
4602
+ onClick: D,
4603
4603
  children: p ? "Publishing..." : "Publish"
4604
4604
  }
4605
4605
  )
4606
4606
  ] })
4607
4607
  ] }) });
4608
4608
  }
4609
- const oc = () => {
4609
+ const lc = () => {
4610
4610
  const e = z(), t = se();
4611
4611
  return _e({
4612
4612
  queryKey: [P.GET_WEBSITE_DATA],
@@ -4617,8 +4617,8 @@ const oc = () => {
4617
4617
  })
4618
4618
  });
4619
4619
  };
4620
- function cc({ onClose: e }) {
4621
- const { data: t, isFetching: n } = oc(), { mutateAsync: s, isPending: r } = Vl(), i = at("settingComponent", null), l = di(async (o) => (await s({ data: o }), !0), 300);
4620
+ function oc({ onClose: e }) {
4621
+ const { data: t, isFetching: n } = lc(), { mutateAsync: s, isPending: r } = Kl(), i = at("settingComponent", null), l = di(async (o) => (await s({ data: o }), !0), 300);
4622
4622
  return i ? /* @__PURE__ */ a(qe, { open: !0, onOpenChange: e, children: /* @__PURE__ */ c(ze, { className: "w-full", children: [
4623
4623
  /* @__PURE__ */ a($e, { children: /* @__PURE__ */ a(Ke, { children: "Website Settings" }) }),
4624
4624
  n ? /* @__PURE__ */ c("div", { className: "w-full space-y-3 py-4", children: [
@@ -4646,7 +4646,7 @@ function mr({
4646
4646
  /* @__PURE__ */ a(Nn, { side: "bottom", sideOffset: 10, children: /* @__PURE__ */ a("p", { children: t }) })
4647
4647
  ] }) });
4648
4648
  }
4649
- const uc = () => {
4649
+ const cc = () => {
4650
4650
  const { selectedLang: e, fallbackLang: t } = ct(), n = at(
4651
4651
  "getPreviewUrl",
4652
4652
  async (f) => f
@@ -4685,7 +4685,7 @@ const uc = () => {
4685
4685
  " ",
4686
4686
  H.PREVIEW
4687
4687
  ] }) }) });
4688
- }, dc = () => {
4688
+ }, uc = () => {
4689
4689
  const [e, t] = Ti();
4690
4690
  return /* @__PURE__ */ c(pe, { children: [
4691
4691
  /* @__PURE__ */ a(mr, { content: H.THEME, children: /* @__PURE__ */ a(
@@ -4695,12 +4695,12 @@ const uc = () => {
4695
4695
  size: "icon",
4696
4696
  className: "gap-2",
4697
4697
  onClick: () => t(e === "theme" ? "block" : "theme"),
4698
- children: /* @__PURE__ */ a(vl, { className: "w-4 h-4" })
4698
+ children: /* @__PURE__ */ a(yl, { className: "w-4 h-4" })
4699
4699
  }
4700
4700
  ) }),
4701
4701
  /* @__PURE__ */ a("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
4702
4702
  ] });
4703
- }, hc = () => {
4703
+ }, dc = () => {
4704
4704
  const [e, t] = A(!1), { isLocked: n } = xn(), { savePage: s, saveState: r } = Ss();
4705
4705
  Ee(() => {
4706
4706
  const h = (f) => {
@@ -4736,7 +4736,7 @@ const uc = () => {
4736
4736
  case "SAVED":
4737
4737
  return {
4738
4738
  tooltipContent: H.SAVED,
4739
- buttonIcon: /* @__PURE__ */ a(bl, { className: "w-4 h-4" }),
4739
+ buttonIcon: /* @__PURE__ */ a(vl, { className: "w-4 h-4" }),
4740
4740
  buttonClass: "text-green-500 flex items-center gap-x-1 leading-tight"
4741
4741
  };
4742
4742
  }
@@ -4755,13 +4755,13 @@ const uc = () => {
4755
4755
  ]
4756
4756
  }
4757
4757
  );
4758
- }, mc = () => {
4759
- const [e, t] = A(!1), [n, s] = A(!1), [r, i] = A(null), { data: l } = Ve(), { mutate: o, isPending: u } = qs(), [d] = Ci(), { buttonText: h, buttonClassName: f, isPublished: y } = ne(() => {
4760
- const g = l && (l == null ? void 0 : l.online);
4758
+ }, hc = () => {
4759
+ const [e, t] = A(!1), [n, s] = A(!1), [r, i] = A(null), { data: l } = Ve(), { mutate: o, isPending: u } = qs(), { buttonText: d, buttonClassName: h, isPublished: f } = ne(() => {
4760
+ const p = l && (l == null ? void 0 : l.online);
4761
4761
  return {
4762
- buttonClassName: g ? "hover:bg-green-600 bg-green-500" : "",
4763
- isPublished: g,
4764
- buttonText: g ? H.PUBLISHED : H.PUBLISH
4762
+ buttonClassName: p ? "hover:bg-green-600 bg-green-500" : "",
4763
+ isPublished: p,
4764
+ buttonText: p ? H.PUBLISHED : H.PUBLISH
4765
4765
  };
4766
4766
  }, [l]);
4767
4767
  return /* @__PURE__ */ c(pe, { children: [
@@ -4771,15 +4771,13 @@ const uc = () => {
4771
4771
  {
4772
4772
  size: "sm",
4773
4773
  onClick: async () => {
4774
- var N, E;
4775
- const g = ((E = (N = d == null ? void 0 : d.filter((I) => (I == null ? void 0 : I._type) === "PartialBlock")) == null ? void 0 : N.map((I) => I == null ? void 0 : I.partialBlockId)) == null ? void 0 : E.filter((I) => typeof I == "string" && I !== "")) || [];
4776
4774
  o(
4777
- { ids: [l == null ? void 0 : l.id, ...g] },
4775
+ { ids: [l == null ? void 0 : l.id] },
4778
4776
  { onSuccess: () => Mn("TOP_RIGHT") }
4779
4777
  );
4780
4778
  },
4781
4779
  disabled: u || !(l != null && l.id),
4782
- className: `relative overflow-hidden transition-all duration-300 ease-in-out text-white flex items-center gap-1 rounded-r-none ${f}`,
4780
+ className: `relative overflow-hidden transition-all duration-300 ease-in-out text-white flex items-center gap-1 rounded-r-none ${h}`,
4783
4781
  onMouseEnter: () => s(!0),
4784
4782
  onMouseLeave: () => s(!1),
4785
4783
  children: [
@@ -4787,17 +4785,17 @@ const uc = () => {
4787
4785
  "span",
4788
4786
  {
4789
4787
  className: `flex items-center transition-transform duration-300 ease-in-out ${n ? "-translate-y-10" : ""}`,
4790
- children: y ? /* @__PURE__ */ a(ta, { className: "w-4 h-4" }) : /* @__PURE__ */ a(na, { className: "w-4 h-4" })
4788
+ children: f ? /* @__PURE__ */ a(ta, { className: "w-4 h-4" }) : /* @__PURE__ */ a(na, { className: "w-4 h-4" })
4791
4789
  }
4792
4790
  ),
4793
4791
  /* @__PURE__ */ a(
4794
4792
  "span",
4795
4793
  {
4796
4794
  className: `absolute inset-0 flex items-center left-3 transition-transform duration-300 ease-in-out ${n ? "" : "translate-y-10"}`,
4797
- children: y ? /* @__PURE__ */ a(na, { className: "w-4 h-4" }) : /* @__PURE__ */ a(ta, { className: "w-4 h-4" })
4795
+ children: f ? /* @__PURE__ */ a(na, { className: "w-4 h-4" }) : /* @__PURE__ */ a(ta, { className: "w-4 h-4" })
4798
4796
  }
4799
4797
  ),
4800
- /* @__PURE__ */ a("span", { children: h })
4798
+ /* @__PURE__ */ a("span", { children: d })
4801
4799
  ]
4802
4800
  }
4803
4801
  ),
@@ -4807,12 +4805,12 @@ const uc = () => {
4807
4805
  {
4808
4806
  size: "sm",
4809
4807
  disabled: u || !(l != null && l.id),
4810
- className: `px-2 text-white border-l border-white/50 rounded-l-none ${f}`,
4808
+ className: `px-2 text-white border-l border-white/50 rounded-l-none ${h}`,
4811
4809
  children: /* @__PURE__ */ a(Ka, { className: "w-4 h-4" })
4812
4810
  }
4813
4811
  ) }),
4814
4812
  /* @__PURE__ */ c(vn, { align: "end", className: "w-36", children: [
4815
- !y && /* @__PURE__ */ c(
4813
+ !f && /* @__PURE__ */ c(
4816
4814
  Be,
4817
4815
  {
4818
4816
  disabled: u,
@@ -4838,7 +4836,7 @@ const uc = () => {
4838
4836
  ]
4839
4837
  }
4840
4838
  ),
4841
- y && /* @__PURE__ */ c(
4839
+ f && /* @__PURE__ */ c(
4842
4840
  Be,
4843
4841
  {
4844
4842
  onClick: () => i(l),
@@ -4852,7 +4850,7 @@ const uc = () => {
4852
4850
  ] })
4853
4851
  ] })
4854
4852
  ] }),
4855
- /* @__PURE__ */ a(lc, { showModal: e, onClose: () => t(!1) }),
4853
+ /* @__PURE__ */ a(ic, { showModal: e, onClose: () => t(!1) }),
4856
4854
  r && /* @__PURE__ */ a(
4857
4855
  $s,
4858
4856
  {
@@ -4861,7 +4859,7 @@ const uc = () => {
4861
4859
  }
4862
4860
  )
4863
4861
  ] });
4864
- }, fc = () => {
4862
+ }, mc = () => {
4865
4863
  const e = at("settingComponent", null), [t, n] = A(!1);
4866
4864
  return e ? /* @__PURE__ */ c(pe, { children: [
4867
4865
  /* @__PURE__ */ a(mr, { content: H.WEBSITEDATA, children: /* @__PURE__ */ a(
@@ -4871,13 +4869,13 @@ const uc = () => {
4871
4869
  size: "icon",
4872
4870
  className: "gap-2",
4873
4871
  onClick: () => n(!0),
4874
- children: /* @__PURE__ */ a(El, { className: "w-4 h-4" })
4872
+ children: /* @__PURE__ */ a(bl, { className: "w-4 h-4" })
4875
4873
  }
4876
4874
  ) }),
4877
- t && /* @__PURE__ */ a(cc, { onClose: () => n(!1) }),
4875
+ t && /* @__PURE__ */ a(oc, { onClose: () => n(!1) }),
4878
4876
  /* @__PURE__ */ a("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
4879
4877
  ] }) : null;
4880
- }, gc = () => {
4878
+ }, fc = () => {
4881
4879
  const { data: e } = Ve(), [t, n] = A(""), s = e && (e == null ? void 0 : e.online), { data: r } = Re(), i = at("getLiveUrl", async (y) => y), l = be(
4882
4880
  (y) => {
4883
4881
  var p;
@@ -4911,28 +4909,28 @@ const uc = () => {
4911
4909
  size: "sm",
4912
4910
  className: "flex items-center gap-1",
4913
4911
  children: [
4914
- /* @__PURE__ */ a(Nl, { className: "w-4 h-4" }),
4912
+ /* @__PURE__ */ a(El, { className: "w-4 h-4" }),
4915
4913
  /* @__PURE__ */ a("span", { className: "hidden sm:inline", children: H.OPEN })
4916
4914
  ]
4917
4915
  }
4918
4916
  );
4919
4917
  };
4920
- function pc() {
4918
+ function gc() {
4921
4919
  const { isLocked: e } = xn(), [t] = Me(), n = t.get("lang"), s = nr(n);
4922
4920
  return e || !s ? null : /* @__PURE__ */ c("div", { className: "flex items-center justify-end gap-1", children: [
4923
- /* @__PURE__ */ a(Jo, {}),
4924
- /* @__PURE__ */ a(He, { permission: ge.EDIT_THEME, children: /* @__PURE__ */ a(dc, {}) }),
4925
- /* @__PURE__ */ a(He, { permission: ge.EDIT_SETTINGS, children: /* @__PURE__ */ a(fc, {}) }),
4926
- /* @__PURE__ */ a(uc, {}),
4927
- /* @__PURE__ */ a(He, { permission: ge.SAVE_PAGE, children: /* @__PURE__ */ a(hc, {}) }),
4928
- /* @__PURE__ */ a(He, { permission: ge.PUBLISH_PAGE, children: /* @__PURE__ */ a(mc, {}) }),
4929
- /* @__PURE__ */ a(gc, {})
4921
+ /* @__PURE__ */ a(Zo, {}),
4922
+ /* @__PURE__ */ a(He, { permission: ge.EDIT_THEME, children: /* @__PURE__ */ a(uc, {}) }),
4923
+ /* @__PURE__ */ a(He, { permission: ge.EDIT_SETTINGS, children: /* @__PURE__ */ a(mc, {}) }),
4924
+ /* @__PURE__ */ a(cc, {}),
4925
+ /* @__PURE__ */ a(He, { permission: ge.SAVE_PAGE, children: /* @__PURE__ */ a(dc, {}) }),
4926
+ /* @__PURE__ */ a(He, { permission: ge.PUBLISH_PAGE, children: /* @__PURE__ */ a(hc, {}) }),
4927
+ /* @__PURE__ */ a(fc, {})
4930
4928
  ] });
4931
4929
  }
4932
- const yc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-center justify-between w-full", children: [
4933
- /* @__PURE__ */ a(Wo, {}),
4934
- /* @__PURE__ */ a(pc, {})
4935
- ] }), vc = () => {
4930
+ const pc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-center justify-between w-full", children: [
4931
+ /* @__PURE__ */ a(Ho, {}),
4932
+ /* @__PURE__ */ a(gc, {})
4933
+ ] }), yc = () => {
4936
4934
  const e = se(), { aiContext: t } = Ms(), n = z();
4937
4935
  return be(
4938
4936
  async (s, r, i, l) => n(e, {
@@ -4941,9 +4939,9 @@ const yc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
4941
4939
  }),
4942
4940
  [e, t, n]
4943
4941
  );
4944
- }, bc = (e, t) => t.map((n) => {
4942
+ }, vc = (e, t) => t.map((n) => {
4945
4943
  if (nt(e, n._type)) {
4946
- const s = Gl(n._type);
4944
+ const s = Dl(n._type);
4947
4945
  return {
4948
4946
  ...s,
4949
4947
  ...Vn(n, [
@@ -4959,15 +4957,15 @@ const yc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
4959
4957
  };
4960
4958
  }
4961
4959
  return n;
4962
- }), Ec = (e) => {
4963
- const t = Dl();
4960
+ }), bc = (e) => {
4961
+ const t = Ll();
4964
4962
  return ne(() => {
4965
4963
  if (!e || ue(e)) return { blocks: [] };
4966
4964
  const n = Ce(
4967
4965
  e,
4968
4966
  (s) => !Qt(s == null ? void 0 : s._type, "@chai/")
4969
4967
  );
4970
- return { blocks: bc(t, n) };
4968
+ return { blocks: vc(t, n) };
4971
4969
  }, [e, t]);
4972
4970
  }, ra = {
4973
4971
  async getUILibraryBlock(e, t, n) {
@@ -4975,7 +4973,7 @@ const yc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
4975
4973
  action: "GET_LIBRARY_ITEM",
4976
4974
  data: { id: e.id }
4977
4975
  }), r = Z(s, "html", ""), i = Z(s, "blocks", []);
4978
- return fi(i) ? i : _i(r);
4976
+ return fi(i) ? i : Pi(r);
4979
4977
  },
4980
4978
  async getUILibraryBlocks(e, t, n) {
4981
4979
  try {
@@ -4989,7 +4987,7 @@ const yc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
4989
4987
  return console.error(s), [];
4990
4988
  }
4991
4989
  }
4992
- }, Nc = () => {
4990
+ }, Ec = () => {
4993
4991
  const e = se(), t = z();
4994
4992
  return _e({
4995
4993
  queryKey: [j, "uiLibraries"],
@@ -4999,7 +4997,7 @@ const yc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
4999
4997
  ...r
5000
4998
  }));
5001
4999
  return s.forEach((r) => {
5002
- Pi(r.id, {
5000
+ Ci(r.id, {
5003
5001
  name: r.name,
5004
5002
  description: r.description,
5005
5003
  getBlocksList: (i) => ra.getUILibraryBlocks(
@@ -5016,7 +5014,7 @@ const yc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5016
5014
  }), s;
5017
5015
  }
5018
5016
  });
5019
- }, wc = () => {
5017
+ }, Nc = () => {
5020
5018
  const e = Bs(), t = z(), { user: n } = ut(), s = n == null ? void 0 : n.id;
5021
5019
  return _e({
5022
5020
  queryKey: [j, "permissions", s],
@@ -5026,7 +5024,7 @@ const yc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5026
5024
  }),
5027
5025
  enabled: !!s
5028
5026
  });
5029
- }, Sc = () => {
5027
+ }, wc = () => {
5030
5028
  const e = se(), t = z(), { setCurrentEditor: n } = xn(), [, s] = Fs();
5031
5029
  return { onSave: async ({
5032
5030
  page: i,
@@ -5045,7 +5043,7 @@ const yc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5045
5043
  return console.error(o), new Error("Failed to save blocks");
5046
5044
  }
5047
5045
  } };
5048
- }, xc = () => {
5046
+ }, Sc = () => {
5049
5047
  const { data: e } = Zn(), t = se(), n = z();
5050
5048
  return {
5051
5049
  getPartialBlocks: be(async () => {
@@ -5077,24 +5075,24 @@ const yc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5077
5075
  }, ia = Rn.object({
5078
5076
  email: Rn.string().email({ message: "Please enter a valid email address" }),
5079
5077
  password: Rn.string().min(6, { message: "Password must be at least 6 characters" })
5080
- }), Ac = () => {
5078
+ }), xc = () => {
5081
5079
  const { setUser: e, logout: t } = ut(), n = Bs(), [s, r] = A(""), [i, l] = A(""), [o, u] = A({}), [d, h] = A(!1), [f, y] = A(""), p = xe({
5082
5080
  mutationFn: async (E) => {
5083
5081
  y("");
5084
- const I = await Rs(n, {
5082
+ const D = await Rs(n, {
5085
5083
  action: "LOGIN",
5086
5084
  data: E
5087
5085
  });
5088
- if (!I.ok) {
5089
- const k = await I.json();
5090
- throw new Error(k.error || "Login failed");
5086
+ if (!D.ok) {
5087
+ const I = await D.json();
5088
+ throw new Error(I.error || "Login failed");
5091
5089
  }
5092
- const w = await I.json();
5093
- if (nt(w, "id") && nt(w, "email") && nt(w, "accessToken") && nt(w, "refreshToken"))
5094
- e(w);
5090
+ const N = await D.json();
5091
+ if (nt(N, "id") && nt(N, "email") && nt(N, "accessToken") && nt(N, "refreshToken"))
5092
+ e(N);
5095
5093
  else
5096
5094
  throw t(), new Error("Something went wrong. Please try again.");
5097
- return w;
5095
+ return N;
5098
5096
  },
5099
5097
  onSuccess: () => {
5100
5098
  u({}), y("");
@@ -5107,24 +5105,24 @@ const yc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5107
5105
  }
5108
5106
  }), g = async (E) => {
5109
5107
  E.preventDefault(), u({});
5110
- const I = { email: s, password: i };
5108
+ const D = { email: s, password: i };
5111
5109
  try {
5112
- const w = ia.parse(I);
5113
- p.mutate(w);
5114
- } catch (w) {
5115
- if (w instanceof Rn.ZodError) {
5116
- const k = w.errors.reduce((b, D) => {
5117
- const M = D.path[0];
5118
- return b[M] = D.message, b;
5110
+ const N = ia.parse(D);
5111
+ p.mutate(N);
5112
+ } catch (N) {
5113
+ if (N instanceof Rn.ZodError) {
5114
+ const I = N.errors.reduce((b, L) => {
5115
+ const M = L.path[0];
5116
+ return b[M] = L.message, b;
5119
5117
  }, {});
5120
- u(k);
5118
+ u(I);
5121
5119
  }
5122
5120
  }
5123
- }, N = ia.safeParse({ email: s, password: i }).success;
5121
+ }, w = ia.safeParse({ email: s, password: i }).success;
5124
5122
  return /* @__PURE__ */ a("div", { className: "flex justify-center items-center min-h-screen bg-slate-50", children: /* @__PURE__ */ c(As, { className: "w-full max-w-md", children: [
5125
5123
  /* @__PURE__ */ c(Ts, { children: [
5126
5124
  /* @__PURE__ */ a(Cs, { className: "text-2xl", children: "Sign in" }),
5127
- /* @__PURE__ */ a($i, { children: "Enter your credentials to sign in to visual builder" })
5125
+ /* @__PURE__ */ a(zi, { children: "Enter your credentials to sign in to visual builder" })
5128
5126
  ] }),
5129
5127
  /* @__PURE__ */ a(Ps, { children: /* @__PURE__ */ c("form", { onSubmit: g, className: "space-y-4", children: [
5130
5128
  /* @__PURE__ */ c("div", { className: "space-y-1", children: [
@@ -5162,7 +5160,7 @@ const yc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5162
5160
  type: "button",
5163
5161
  className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",
5164
5162
  onClick: () => h(!d),
5165
- children: d ? /* @__PURE__ */ a(wl, { className: "h-4 w-4" }) : /* @__PURE__ */ a(Ya, { className: "h-4 w-4" })
5163
+ children: d ? /* @__PURE__ */ a(Nl, { className: "h-4 w-4" }) : /* @__PURE__ */ a(Ya, { className: "h-4 w-4" })
5166
5164
  }
5167
5165
  )
5168
5166
  ] }),
@@ -5174,7 +5172,7 @@ const yc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5174
5172
  {
5175
5173
  type: "submit",
5176
5174
  className: "w-full",
5177
- disabled: !N || p.isPending,
5175
+ disabled: !w || p.isPending,
5178
5176
  children: p.isPending ? /* @__PURE__ */ c(pe, { children: [
5179
5177
  /* @__PURE__ */ a(Qa, { className: "mr-2 h-4 w-4 animate-spin" }),
5180
5178
  "Logging in..."
@@ -5224,24 +5222,24 @@ const yc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5224
5222
  ] })
5225
5223
  ] }) });
5226
5224
  };
5227
- let us = Ac;
5228
- const Tc = () => ne(() => us, [us]), zd = (e) => {
5225
+ let us = xc;
5226
+ const Ac = () => ne(() => us, [us]), qd = (e) => {
5229
5227
  us = e;
5230
- }, Cc = () => {
5231
- const e = Tc();
5228
+ }, Tc = () => {
5229
+ const e = Ac();
5232
5230
  return /* @__PURE__ */ a(wa, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: /* @__PURE__ */ a(e, {}) });
5233
- }, Pc = ({
5231
+ }, Cc = ({
5234
5232
  isActive: e,
5235
5233
  show: t
5236
5234
  }) => {
5237
5235
  const { data: n } = yt();
5238
- return !nt(n, "languages") || !Z(n, "languages", []).length ? null : /* @__PURE__ */ a(T, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ a(Sl, { className: "w-4 h-4" }) });
5239
- }, fr = "lang", _c = {
5236
+ return !nt(n, "languages") || !Z(n, "languages", []).length ? null : /* @__PURE__ */ a(T, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ a(wl, { className: "w-4 h-4" }) });
5237
+ }, fr = "lang", Pc = {
5240
5238
  id: fr,
5241
5239
  label: "Languages",
5242
5240
  position: "top",
5243
- panel: To,
5244
- button: Pc,
5241
+ panel: Ao,
5242
+ button: Cc,
5245
5243
  view: "modal",
5246
5244
  width: 400
5247
5245
  };
@@ -5257,19 +5255,19 @@ function it({
5257
5255
  }, [e, r]);
5258
5256
  const h = (g) => Array.isArray(g) ? "array" : typeof g == "object" && g !== null ? "object" : "value", f = Ne.useCallback(
5259
5257
  (g) => {
5260
- const N = (E) => n === "value" ? E === "value" || E === "object" : n === "array" ? E === "array" : E === n;
5261
- g.type === "object" ? (o((E) => [...E, g.key]), d(g.value)) : N(g.type) && (t([...l, g.key].join(".")), i(!1));
5258
+ const w = (E) => n === "value" ? E === "value" || E === "object" : n === "array" ? E === "array" : E === n;
5259
+ g.type === "object" ? (o((E) => [...E, g.key]), d(g.value)) : w(g.type) && (t([...l, g.key].join(".")), i(!1));
5262
5260
  },
5263
5261
  [l, t, n]
5264
5262
  ), y = Ne.useCallback(() => {
5265
5263
  if (l.length > 0) {
5266
5264
  const g = l.slice(0, -1);
5267
- o(g), d(g.reduce((N, E) => N[E], e));
5265
+ o(g), d(g.reduce((w, E) => w[E], e));
5268
5266
  }
5269
- }, [l, e]), p = Ne.useMemo(() => Object.entries(u).map(([g, N]) => ({
5267
+ }, [l, e]), p = Ne.useMemo(() => Object.entries(u).map(([g, w]) => ({
5270
5268
  key: g,
5271
- value: N,
5272
- type: h(N)
5269
+ value: w,
5270
+ type: h(w)
5273
5271
  })).filter((g) => n === "value" ? g.type === "value" || g.type === "object" : n === "array" ? g.type === "array" || g.type === "object" : n === "object" ? g.type === "object" : !0), [u, n]);
5274
5272
  return /* @__PURE__ */ c(Ua, { open: r, onOpenChange: i, children: [
5275
5273
  /* @__PURE__ */ c(bn, { children: [
@@ -5282,16 +5280,16 @@ function it({
5282
5280
  role: "combobox",
5283
5281
  "aria-expanded": r,
5284
5282
  disabled: s,
5285
- children: /* @__PURE__ */ a(xl, { className: "h-3 w-3" })
5283
+ children: /* @__PURE__ */ a(Sl, { className: "h-3 w-3" })
5286
5284
  }
5287
5285
  ) }) }),
5288
5286
  /* @__PURE__ */ a(Nn, { children: "Add field" })
5289
5287
  ] }),
5290
- /* @__PURE__ */ a(Ra, { className: "w-[200px] z-[9999] p-0", children: /* @__PURE__ */ c(Ki, { children: [
5291
- /* @__PURE__ */ a(Vi, { className: "border-none", placeholder: "Search..." }),
5292
- /* @__PURE__ */ c(Hi, { children: [
5293
- /* @__PURE__ */ a(Wi, { children: "No option found." }),
5294
- /* @__PURE__ */ c(Yi, { children: [
5288
+ /* @__PURE__ */ a(Ra, { className: "w-[200px] z-[9999] p-0", children: /* @__PURE__ */ c($i, { children: [
5289
+ /* @__PURE__ */ a(Ki, { className: "border-none", placeholder: "Search..." }),
5290
+ /* @__PURE__ */ c(Vi, { children: [
5291
+ /* @__PURE__ */ a(Hi, { children: "No option found." }),
5292
+ /* @__PURE__ */ c(Wi, { children: [
5295
5293
  l.length > 0 && /* @__PURE__ */ c(
5296
5294
  Zs,
5297
5295
  {
@@ -5317,13 +5315,13 @@ function it({
5317
5315
  size: "sm",
5318
5316
  variant: "ghost",
5319
5317
  className: "h-6 px-2 hover:bg-primary hover:text-primary-foreground",
5320
- onClick: (N) => {
5321
- N.stopPropagation(), t([...l, g.key].join(".")), i(!1);
5318
+ onClick: (w) => {
5319
+ w.stopPropagation(), t([...l, g.key].join(".")), i(!1);
5322
5320
  },
5323
5321
  children: "Select"
5324
5322
  }
5325
5323
  ),
5326
- (g.type === "object" || g.type === "array") && /* @__PURE__ */ a("div", { className: "p-1 rounded hover:bg-muted cursor-pointer", children: /* @__PURE__ */ a(Al, { className: "w-4 h-4 opacity-50" }) })
5324
+ (g.type === "object" || g.type === "array") && /* @__PURE__ */ a("div", { className: "p-1 rounded hover:bg-muted cursor-pointer", children: /* @__PURE__ */ a(xl, { className: "w-4 h-4 opacity-50" }) })
5327
5325
  ] })
5328
5326
  ]
5329
5327
  },
@@ -5334,7 +5332,7 @@ function it({
5334
5332
  ] }) })
5335
5333
  ] });
5336
5334
  }
5337
- const Ic = () => {
5335
+ const _c = () => {
5338
5336
  const e = Sn(), t = Se(), n = z();
5339
5337
  return xe({
5340
5338
  mutationFn: async ({
@@ -5357,7 +5355,7 @@ const Ic = () => {
5357
5355
  W.error("Failed to upload asset");
5358
5356
  }
5359
5357
  });
5360
- }, kc = () => {
5358
+ }, Ic = () => {
5361
5359
  const e = Sn(), t = Se(), n = z();
5362
5360
  return xe({
5363
5361
  mutationFn: async (s) => n(e, {
@@ -5375,7 +5373,7 @@ const Ic = () => {
5375
5373
  W.error("Failed to delete asset");
5376
5374
  }
5377
5375
  });
5378
- }, Lc = () => {
5376
+ }, kc = () => {
5379
5377
  const e = Sn(), t = Se(), n = z();
5380
5378
  return xe({
5381
5379
  mutationFn: async (s) => n(e, {
@@ -5393,7 +5391,7 @@ const Ic = () => {
5393
5391
  W.error("Failed to update asset");
5394
5392
  }
5395
5393
  });
5396
- }, Dc = (e = {}) => {
5394
+ }, Lc = (e = {}) => {
5397
5395
  const t = Sn(), n = z(), { search: s, page: r = 1, limit: i = 30 } = e;
5398
5396
  return _e({
5399
5397
  queryKey: [j, P.GET_ASSETS, s, r, i],
@@ -5411,7 +5409,7 @@ const Ic = () => {
5411
5409
  staleTime: 1e3 * 60 * 5,
5412
5410
  retry: 1
5413
5411
  });
5414
- }, Gc = (e) => {
5412
+ }, Dc = (e) => {
5415
5413
  const t = Sn(), n = z();
5416
5414
  return _e({
5417
5415
  queryKey: [j, P.GET_ASSET, e],
@@ -5423,7 +5421,7 @@ const Ic = () => {
5423
5421
  retry: 1
5424
5422
  });
5425
5423
  };
5426
- function Uc(e) {
5424
+ function Gc(e) {
5427
5425
  const t = isNaN(e) ? 0 : typeof e == "number" ? e : parseInt(e);
5428
5426
  return t ? t < 1024 ? `${t.toFixed(2)} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(2)} KB` : `${(t / (1024 * 1024)).toFixed(2)} MB` : "0 B";
5429
5427
  }
@@ -5442,7 +5440,7 @@ function oa(e, t) {
5442
5440
  let n = e, s = t == null ? void 0 : t.description;
5443
5441
  return (!s || typeof s != "string") && (s = ""), (!n || typeof n != "string") && (n = ""), n !== s;
5444
5442
  }
5445
- const Oc = ({
5443
+ const Uc = ({
5446
5444
  assetId: e,
5447
5445
  onBack: t,
5448
5446
  onEdit: n,
@@ -5450,7 +5448,7 @@ const Oc = ({
5450
5448
  isSaving: r
5451
5449
  }) => {
5452
5450
  var h, f, y;
5453
- const { data: i, isLoading: l, isError: o } = Gc(e || ""), [u, d] = A("");
5451
+ const { data: i, isLoading: l, isError: o } = Dc(e || ""), [u, d] = A("");
5454
5452
  return Hn.useEffect(() => {
5455
5453
  i != null && i.description && d(i.description);
5456
5454
  }, [i]), l ? /* @__PURE__ */ a("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ a(gt, { className: "h-8 w-8 animate-spin" }) }) : o || !(i != null && i.id) ? /* @__PURE__ */ a("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ c("div", { className: "text-center max-w-md mx-auto p-6", children: [
@@ -5521,7 +5519,7 @@ const Oc = ({
5521
5519
  },
5522
5520
  {
5523
5521
  label: "Size",
5524
- value: Uc(i.size)
5522
+ value: Gc(i.size)
5525
5523
  },
5526
5524
  {
5527
5525
  label: "Dimensions",
@@ -5591,12 +5589,12 @@ const Oc = ({
5591
5589
  ] })
5592
5590
  ] })
5593
5591
  ] });
5594
- }, Rc = Hn.lazy(() => import("./image-editor-CzFST20j.js"));
5595
- function Bc(e) {
5592
+ }, Oc = Hn.lazy(() => import("./image-editor-CzFST20j.js"));
5593
+ function Rc(e) {
5596
5594
  const t = isNaN(e) ? 0 : typeof e == "number" ? e : parseInt(e);
5597
5595
  return t ? t < 1024 ? `${t.toFixed(2)} B` : t < 1024 * 1024 ? `${(t / 1024).toFixed(2)} KB` : `${(t / (1024 * 1024)).toFixed(2)} MB` : "0 B";
5598
5596
  }
5599
- const Mc = ({
5597
+ const Bc = ({
5600
5598
  isUpdatingAsset: e,
5601
5599
  allowedTypes: t,
5602
5600
  maxFileSize: n,
@@ -5612,29 +5610,29 @@ const Mc = ({
5612
5610
  localStorage.setItem("chai_optimize_images", l.toString());
5613
5611
  }, [l]);
5614
5612
  const u = e || r, d = be(
5615
- async (p) => new Promise((g, N) => {
5616
- const E = p[0], I = new FileReader();
5617
- I.readAsDataURL(E), I.onload = async () => {
5613
+ async (p) => new Promise((g, w) => {
5614
+ const E = p[0], D = new FileReader();
5615
+ D.readAsDataURL(E), D.onload = async () => {
5618
5616
  s(
5619
5617
  {
5620
- file: I.result,
5618
+ file: D.result,
5621
5619
  folderId: void 0,
5622
5620
  name: E.name,
5623
5621
  optimize: l
5624
5622
  },
5625
5623
  {
5626
- onSuccess: (w) => {
5627
- i && i(w), g(w);
5624
+ onSuccess: (N) => {
5625
+ i && i(N), g(N);
5628
5626
  },
5629
- onError: (w) => {
5630
- N(w);
5627
+ onError: (N) => {
5628
+ w(N);
5631
5629
  }
5632
5630
  }
5633
5631
  );
5634
- }, I.onerror = (w) => N(w);
5632
+ }, D.onerror = (N) => w(N);
5635
5633
  }),
5636
5634
  [s, l, i]
5637
- ), { getRootProps: h, getInputProps: f, isDragActive: y } = Ul({
5635
+ ), { getRootProps: h, getInputProps: f, isDragActive: y } = Gl({
5638
5636
  onDrop: d,
5639
5637
  accept: {
5640
5638
  "image/*": t.includes("image") ? [] : []
@@ -5690,7 +5688,7 @@ const Mc = ({
5690
5688
  "div",
5691
5689
  {
5692
5690
  className: "flex items-center justify-center rounded-full bg-indigo-100 p-2 border border-indigo-500",
5693
- children: /* @__PURE__ */ a(_l, { className: "h-4 w-4 text-indigo-500" })
5691
+ children: /* @__PURE__ */ a(Pl, { className: "h-4 w-4 text-indigo-500" })
5694
5692
  }
5695
5693
  ),
5696
5694
  /* @__PURE__ */ c("div", { className: "text-left", children: [
@@ -5733,7 +5731,7 @@ const Mc = ({
5733
5731
  )
5734
5732
  ] }),
5735
5733
  /* @__PURE__ */ a(
5736
- Qi,
5734
+ Yi,
5737
5735
  {
5738
5736
  checked: l,
5739
5737
  onCheckedChange: (p) => {
@@ -5751,7 +5749,7 @@ const Mc = ({
5751
5749
  "span",
5752
5750
  {
5753
5751
  className: `text-amber-500 flex items-center cursor-help ${l ? "invisible" : ""}`,
5754
- children: /* @__PURE__ */ a(Il, { className: "h-4 w-4 mr-1" })
5752
+ children: /* @__PURE__ */ a(_l, { className: "h-4 w-4 mr-1" })
5755
5753
  }
5756
5754
  ) }),
5757
5755
  /* @__PURE__ */ a(Nn, { side: "top", children: /* @__PURE__ */ c("p", { className: "text-white text-xs", children: [
@@ -5774,35 +5772,35 @@ function gr({
5774
5772
  mode: n = "image",
5775
5773
  assetId: s
5776
5774
  }) {
5777
- const l = ne(() => [n], [n]), [o, u] = A(null), [d, h] = A(null), [f, y] = A(null), [p, g] = A({ show: !1, file: "" }), [N, E] = A(!1), [I, w] = A(
5775
+ const l = ne(() => [n], [n]), [o, u] = A(null), [d, h] = A(null), [f, y] = A(null), [p, g] = A({ show: !1, file: "" }), [w, E] = A(!1), [D, N] = A(
5778
5776
  s ? "details" : "grid"
5779
- ), [k, b] = A(""), [D, M] = A(""), [J, B] = A(1), [$] = A(30), [U, Y] = A([]);
5777
+ ), [I, b] = A(""), [L, M] = A(""), [J, B] = A(1), [$] = A(30), [U, Y] = A([]);
5780
5778
  Ee(() => {
5781
- s && (u(s), w("details"));
5779
+ s && (u(s), N("details"));
5782
5780
  }, [s]), Ee(() => {
5783
- const L = setTimeout(() => {
5784
- b(D), B(1);
5781
+ const k = setTimeout(() => {
5782
+ b(L), B(1);
5785
5783
  }, 300);
5786
- return () => clearTimeout(L);
5787
- }, [D]);
5788
- const { data: R, isLoading: Ie } = Dc({
5789
- search: k.toLowerCase().trim(),
5784
+ return () => clearTimeout(k);
5785
+ }, [L]);
5786
+ const { data: R, isLoading: Ie } = Lc({
5787
+ search: I.toLowerCase().trim(),
5790
5788
  page: J,
5791
5789
  limit: $
5792
- }), K = (R == null ? void 0 : R.assets) || [], _ = (R == null ? void 0 : R.total) || 0, ae = Math.ceil(_ / $), ke = J < ae, De = J > 1, Ze = (K == null ? void 0 : K.length) > 0, { mutate: v } = kc(), { mutate: m, isPending: S } = Ic(), { mutate: G, isPending: O } = Lc(), C = be(
5793
- (L) => {
5794
- L >= 1 && L <= ae && B(L);
5790
+ }), K = (R == null ? void 0 : R.assets) || [], _ = (R == null ? void 0 : R.total) || 0, ae = Math.ceil(_ / $), ke = J < ae, De = J > 1, Ze = (K == null ? void 0 : K.length) > 0, { mutate: v } = Ic(), { mutate: m, isPending: S } = _c(), { mutate: G, isPending: O } = kc(), C = be(
5791
+ (k) => {
5792
+ k >= 1 && k <= ae && B(k);
5795
5793
  },
5796
5794
  [ae]
5797
5795
  ), Q = be(() => {
5798
5796
  ke && C(J + 1);
5799
5797
  }, [J, ke, C]), F = be(() => {
5800
5798
  De && C(J - 1);
5801
- }, [J, De, C]), X = (L) => {
5802
- M(L.target.value);
5799
+ }, [J, De, C]), X = (k) => {
5800
+ M(k.target.value);
5803
5801
  }, le = be(
5804
- (L) => {
5805
- Y((re) => we(re, { id: L.id }) ? [] : [L]);
5802
+ (k) => {
5803
+ Y((re) => we(re, { id: k.id }) ? [] : [k]);
5806
5804
  },
5807
5805
  [!1]
5808
5806
  ), ye = be(() => {
@@ -5817,8 +5815,8 @@ function gr({
5817
5815
  "description"
5818
5816
  ])
5819
5817
  ), e());
5820
- }, ve = async (L) => {
5821
- h(L);
5818
+ }, ve = async (k) => {
5819
+ h(k);
5822
5820
  }, Te = async () => {
5823
5821
  d && (y(d == null ? void 0 : d.id), await v(d.id, {
5824
5822
  onSuccess: () => {
@@ -5828,32 +5826,32 @@ function gr({
5828
5826
  y(null);
5829
5827
  }
5830
5828
  }), h(null));
5831
- }, ee = (L) => {
5832
- u(L.id), w("details");
5833
- }, Le = async (L, re) => {
5829
+ }, ee = (k) => {
5830
+ u(k.id), N("details");
5831
+ }, Le = async (k, re) => {
5834
5832
  try {
5835
5833
  const x = localStorage.getItem("chai_optimize_images") !== "false";
5836
5834
  re ? (await m({
5837
- file: L,
5835
+ file: k,
5838
5836
  folderId: void 0,
5839
5837
  name: p.name || "",
5840
5838
  optimize: x
5841
5839
  }), g({ show: !1, file: "" })) : (await G({
5842
5840
  id: p.id || "",
5843
- file: L
5841
+ file: k
5844
5842
  }), g({ show: !1, file: "" }));
5845
5843
  } catch (x) {
5846
5844
  console.error("Error saving edited image:", x);
5847
5845
  }
5848
- }, Ue = be((L) => {
5849
- Y([L]);
5846
+ }, Ue = be((k) => {
5847
+ Y([k]);
5850
5848
  }, []);
5851
5849
  return /* @__PURE__ */ c(pe, { children: [
5852
5850
  /* @__PURE__ */ c("div", { className: "max-w-[1232px] max-h-[1232px] w-[80vw] h-[80vh] space-y-4 flex flex-col", children: [
5853
5851
  /* @__PURE__ */ a("h1", { className: "text-lg font-medium", children: "Digital Asset Manager" }),
5854
- I === "grid" ? /* @__PURE__ */ c(pe, { children: [
5852
+ D === "grid" ? /* @__PURE__ */ c(pe, { children: [
5855
5853
  /* @__PURE__ */ a(
5856
- Mc,
5854
+ Bc,
5857
5855
  {
5858
5856
  maxFileSize: 10,
5859
5857
  allowedTypes: l,
@@ -5870,7 +5868,7 @@ function gr({
5870
5868
  za,
5871
5869
  {
5872
5870
  strokeWidth: 3,
5873
- className: `absolute left-2 top-2.5 h-4 w-4 text-muted-foreground ${D.length > 0 ? "text-indigo-800" : ""}`
5871
+ className: `absolute left-2 top-2.5 h-4 w-4 text-muted-foreground ${L.length > 0 ? "text-indigo-800" : ""}`
5874
5872
  }
5875
5873
  ),
5876
5874
  /* @__PURE__ */ a(
@@ -5878,7 +5876,7 @@ function gr({
5878
5876
  {
5879
5877
  placeholder: "Search assets...",
5880
5878
  onChange: X,
5881
- value: D,
5879
+ value: L,
5882
5880
  className: "pl-8"
5883
5881
  }
5884
5882
  )
@@ -5917,37 +5915,37 @@ function gr({
5917
5915
  /* @__PURE__ */ a("div", { className: "bg-gray-200 h-64 w-full animate-pulse rounded" }),
5918
5916
  /* @__PURE__ */ a("div", { className: "bg-gray-200 h-64 w-full animate-pulse rounded" })
5919
5917
  ] }) : !Ie && !Ze ? /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center h-full border rounded-lg", children: [
5920
- /* @__PURE__ */ a("div", { className: "text-muted-foreground", children: /* @__PURE__ */ a(Tl, { className: "h-9 w-9 text-indigo-500" }) }),
5918
+ /* @__PURE__ */ a("div", { className: "text-muted-foreground", children: /* @__PURE__ */ a(Al, { className: "h-9 w-9 text-indigo-500" }) }),
5921
5919
  /* @__PURE__ */ a("div", { className: "text-muted-foreground text-lg", children: "No assets found" }),
5922
- /* @__PURE__ */ a("div", { className: "text-muted-foreground text-sm", children: k.length > 0 ? "No assets found for your search: " + k : "Start uploading assets to get started" }),
5920
+ /* @__PURE__ */ a("div", { className: "text-muted-foreground text-sm", children: I.length > 0 ? "No assets found for your search: " + I : "Start uploading assets to get started" }),
5923
5921
  /* @__PURE__ */ a("br", {})
5924
- ] }) : /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-3 p-1", children: K == null ? void 0 : K.map((L) => /* @__PURE__ */ c(
5922
+ ] }) : /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-3 p-1", children: K == null ? void 0 : K.map((k) => /* @__PURE__ */ c(
5925
5923
  "div",
5926
5924
  {
5927
5925
  className: xs(
5928
5926
  "relative cursor-pointer overflow-hidden transition-all rounded-lg border-2 group max-w-[180px] max-h-[180px] flex flex-col justify-between",
5929
- U.some((re) => re.id === L.id) ? "border-blue-500" : "hover:border-black/90",
5930
- f && (d == null ? void 0 : d.id) === L.id ? "opacity-50 pointer-events-none" : "",
5931
- f === L.id ? "opacity-50 pointer-events-none" : ""
5927
+ U.some((re) => re.id === k.id) ? "border-blue-500" : "hover:border-black/90",
5928
+ f && (d == null ? void 0 : d.id) === k.id ? "opacity-50 pointer-events-none" : "",
5929
+ f === k.id ? "opacity-50 pointer-events-none" : ""
5932
5930
  ),
5933
- onClick: () => le(L),
5931
+ onClick: () => le(k),
5934
5932
  children: [
5935
5933
  /* @__PURE__ */ c("div", { className: "aspect-square relative overflow-hidden", children: [
5936
- f === L.id ? /* @__PURE__ */ a("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ a(gt, { className: "h-8 w-8 animate-spin text-white" }) }) : null,
5937
- L.type === "image" ? /* @__PURE__ */ a(
5934
+ f === k.id ? /* @__PURE__ */ a("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ a(gt, { className: "h-8 w-8 animate-spin text-white" }) }) : null,
5935
+ k.type === "image" ? /* @__PURE__ */ a(
5938
5936
  "img",
5939
5937
  {
5940
- src: `${L.thumbnailUrl || "/placeholder.svg"}?v=${(L == null ? void 0 : L.updatedAt) || L.createdAt}`,
5941
- alt: L.name,
5942
- className: `object-contain w-full h-full min-h-[80px] ${U.some((re) => re.id === L.id) ? "" : "group-hover:blur group-hover:contrast-50"}`
5938
+ src: `${k.thumbnailUrl || "/placeholder.svg"}?v=${(k == null ? void 0 : k.updatedAt) || k.createdAt}`,
5939
+ alt: k.name,
5940
+ className: `object-contain w-full h-full min-h-[80px] ${U.some((re) => re.id === k.id) ? "" : "group-hover:blur group-hover:contrast-50"}`
5943
5941
  }
5944
5942
  ) : /* @__PURE__ */ c("div", { className: "flex items-center justify-center h-full", children: [
5945
- /* @__PURE__ */ a(Cl, { className: "h-12 w-12 text-muted-foreground" }),
5946
- L.thumbnailUrl && /* @__PURE__ */ a(
5943
+ /* @__PURE__ */ a(Tl, { className: "h-12 w-12 text-muted-foreground" }),
5944
+ k.thumbnailUrl && /* @__PURE__ */ a(
5947
5945
  "img",
5948
5946
  {
5949
- src: `${L.thumbnailUrl || "/placeholder.svg"}?v=${(L == null ? void 0 : L.updatedAt) || L.createdAt}`,
5950
- alt: L.name,
5947
+ src: `${k.thumbnailUrl || "/placeholder.svg"}?v=${(k == null ? void 0 : k.updatedAt) || k.createdAt}`,
5948
+ alt: k.name,
5951
5949
  className: "absolute inset-0 object-cover w-full h-full"
5952
5950
  }
5953
5951
  )
@@ -5958,13 +5956,13 @@ function gr({
5958
5956
  "div",
5959
5957
  {
5960
5958
  className: "text-xs truncate leading-tight",
5961
- title: L.name,
5962
- children: L.name
5959
+ title: k.name,
5960
+ children: k.name
5963
5961
  }
5964
5962
  ),
5965
- /* @__PURE__ */ a("div", { className: "text-[9px] whitespace-nowrap font-light text-muted-foreground flex items-center justify-between", children: /* @__PURE__ */ a("span", { children: Bc((L == null ? void 0 : L.size) || 0) }) })
5963
+ /* @__PURE__ */ a("div", { className: "text-[9px] whitespace-nowrap font-light text-muted-foreground flex items-center justify-between", children: /* @__PURE__ */ a("span", { children: Rc((k == null ? void 0 : k.size) || 0) }) })
5966
5964
  ] }),
5967
- !U.some((re) => re.id === L.id) && /* @__PURE__ */ c("div", { className: "absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-2", children: [
5965
+ !U.some((re) => re.id === k.id) && /* @__PURE__ */ c("div", { className: "absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center gap-2", children: [
5968
5966
  /* @__PURE__ */ a(
5969
5967
  T,
5970
5968
  {
@@ -5972,7 +5970,7 @@ function gr({
5972
5970
  size: "icon",
5973
5971
  className: "h-8 w-8 rounded-full",
5974
5972
  onClick: (re) => {
5975
- re.stopPropagation(), ee(L);
5973
+ re.stopPropagation(), ee(k);
5976
5974
  },
5977
5975
  children: /* @__PURE__ */ a(Xt, { className: "h-4 w-4" })
5978
5976
  }
@@ -5985,10 +5983,10 @@ function gr({
5985
5983
  className: "h-8 w-8 rounded-full",
5986
5984
  onClick: (re) => {
5987
5985
  re.stopPropagation(), g({
5988
- id: L.id,
5986
+ id: k.id,
5989
5987
  show: !0,
5990
- file: L.url,
5991
- name: L.name
5988
+ file: k.url,
5989
+ name: k.name
5992
5990
  });
5993
5991
  },
5994
5992
  children: /* @__PURE__ */ a(Ha, { className: "h-4 w-4" })
@@ -6001,14 +5999,14 @@ function gr({
6001
5999
  size: "icon",
6002
6000
  className: "h-8 w-8 rounded-full",
6003
6001
  onClick: (re) => {
6004
- re.stopPropagation(), ve(L);
6002
+ re.stopPropagation(), ve(k);
6005
6003
  },
6006
6004
  children: /* @__PURE__ */ a(Yn, { className: "h-4 w-4" })
6007
6005
  }
6008
6006
  )
6009
6007
  ] }),
6010
- U.some((re) => re.id === L.id) && /* @__PURE__ */ a("div", { className: "absolute top-1 right-1 border border-white h-max rounded-full bg-blue-500 p-1", children: /* @__PURE__ */ a(
6011
- Pl,
6008
+ U.some((re) => re.id === k.id) && /* @__PURE__ */ a("div", { className: "absolute top-1 right-1 border border-white h-max rounded-full bg-blue-500 p-1", children: /* @__PURE__ */ a(
6009
+ Cl,
6012
6010
  {
6013
6011
  className: "w-3 h-3 text-white",
6014
6012
  strokeWidth: 5
@@ -6016,7 +6014,7 @@ function gr({
6016
6014
  ) })
6017
6015
  ]
6018
6016
  },
6019
- L.id
6017
+ k.id
6020
6018
  )) }) }),
6021
6019
  ae > 1 && /* @__PURE__ */ a("div", { className: "absolute bottom-0 left-0 right-0 bg-white border-t p-4", children: /* @__PURE__ */ c("div", { className: "flex items-center justify-center space-x-2", children: [
6022
6020
  /* @__PURE__ */ a(
@@ -6029,7 +6027,7 @@ function gr({
6029
6027
  children: "Previous"
6030
6028
  }
6031
6029
  ),
6032
- Array.from({ length: Math.min(5, ae) }, (L, re) => {
6030
+ Array.from({ length: Math.min(5, ae) }, (k, re) => {
6033
6031
  const x = re + 1;
6034
6032
  return /* @__PURE__ */ a(
6035
6033
  T,
@@ -6067,32 +6065,32 @@ function gr({
6067
6065
  ] }) })
6068
6066
  ] })
6069
6067
  ] }) : /* @__PURE__ */ a(
6070
- Oc,
6068
+ Uc,
6071
6069
  {
6072
6070
  assetId: o || s || "",
6073
6071
  onBack: () => {
6074
- w("grid"), u(null);
6072
+ N("grid"), u(null);
6075
6073
  },
6076
- onEdit: (L) => {
6074
+ onEdit: (k) => {
6077
6075
  g({
6078
- id: L.id,
6076
+ id: k.id,
6079
6077
  show: !0,
6080
- file: L.url,
6081
- name: L.name
6078
+ file: k.url,
6079
+ name: k.name
6082
6080
  });
6083
6081
  },
6084
- onSave: async (L) => {
6082
+ onSave: async (k) => {
6085
6083
  if (o) {
6086
6084
  E(!0);
6087
6085
  try {
6088
6086
  const re = K.find((x) => x.id === o);
6089
- re && await G(gi(re, { description: L }));
6087
+ re && await G(gi(re, { description: k }));
6090
6088
  } finally {
6091
6089
  E(!1);
6092
6090
  }
6093
6091
  }
6094
6092
  },
6095
- isSaving: N
6093
+ isSaving: w
6096
6094
  }
6097
6095
  )
6098
6096
  ] }),
@@ -6101,7 +6099,7 @@ function gr({
6101
6099
  {
6102
6100
  fallback: /* @__PURE__ */ a("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ a(gt, { className: "h-8 w-8 animate-spin" }) }),
6103
6101
  children: /* @__PURE__ */ a(
6104
- Rc,
6102
+ Oc,
6105
6103
  {
6106
6104
  imageUrl: p.file,
6107
6105
  onSave: Le,
@@ -6135,10 +6133,10 @@ function gr({
6135
6133
  )
6136
6134
  ] });
6137
6135
  }
6138
- const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6136
+ const Mc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6139
6137
  __proto__: null,
6140
6138
  default: gr
6141
- }, Symbol.toStringTag, { value: "Module" })), jc = ({
6139
+ }, Symbol.toStringTag, { value: "Module" })), Fc = ({
6142
6140
  assetId: e,
6143
6141
  assetUrl: t,
6144
6142
  onChange: n,
@@ -6232,10 +6230,10 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6232
6230
  ) })
6233
6231
  ] }) })
6234
6232
  ] });
6235
- }, qc = () => {
6233
+ }, jc = () => {
6236
6234
  const { selectedLang: e } = ct(), { data: t, isFetching: n } = jt();
6237
6235
  return { data: ne(() => we(t, { lang: e || "" }) || {}, [t, e]), isFetching: n };
6238
- }, zc = (e, t) => {
6236
+ }, qc = (e, t) => {
6239
6237
  const n = e.selectionStart || 0, s = e.selectionEnd || 0, r = e.value, i = r.substring(0, n), l = r.substring(s);
6240
6238
  let o = !1;
6241
6239
  if (n > 0 && i.length > 0) {
@@ -6254,7 +6252,7 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6254
6252
  newCursorPos: p
6255
6253
  };
6256
6254
  }, pr = () => {
6257
- const { t: e } = Ii(), { selectedLang: t, fallbackLang: n, languages: s } = ct(), [, r] = Aa(), { data: i } = ir(), { data: l, isFetching: o } = qc(), u = l == null ? void 0 : l.seo, d = lt(
6255
+ const { t: e } = _i(), { selectedLang: t, fallbackLang: n, languages: s } = ct(), [, r] = Aa(), { data: i } = ir(), { data: l, isFetching: o } = jc(), u = l == null ? void 0 : l.seo, d = lt(
6258
6256
  null
6259
6257
  ), [h, f] = A({
6260
6258
  title: "",
@@ -6270,7 +6268,7 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6270
6268
  searchDescription: "",
6271
6269
  jsonLD: "",
6272
6270
  ...u
6273
- }), y = lt({ initial: h, updated: h }), p = t.length ? t : n, { mutate: g, isPending: N } = js(), E = N, { hasPermission: I } = Ft(), w = I(ge.EDIT_SEO);
6271
+ }), y = lt({ initial: h, updated: h }), p = t.length ? t : n, { mutate: g, isPending: w } = js(), E = w, { hasPermission: D } = Ft(), N = D(ge.EDIT_SEO);
6274
6272
  Ee(() => {
6275
6273
  !o && u && f({
6276
6274
  title: "",
@@ -6287,7 +6285,7 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6287
6285
  ...u
6288
6286
  });
6289
6287
  }, [o, u]);
6290
- const k = async () => {
6288
+ const I = async () => {
6291
6289
  g(
6292
6290
  { id: l == null ? void 0 : l.id, seo: h },
6293
6291
  {
@@ -6302,7 +6300,7 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6302
6300
  ogTitle: h.title,
6303
6301
  ogDescription: h.description
6304
6302
  });
6305
- }, D = () => {
6303
+ }, L = () => {
6306
6304
  f({
6307
6305
  ...h,
6308
6306
  searchTitle: h.ogTitle,
@@ -6311,7 +6309,7 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6311
6309
  }, M = (B, $) => {
6312
6310
  const U = document.getElementById($);
6313
6311
  if (U) {
6314
- const { value: Y, newCursorPos: R } = zc(
6312
+ const { value: Y, newCursorPos: R } = qc(
6315
6313
  U,
6316
6314
  B
6317
6315
  );
@@ -6349,7 +6347,7 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6349
6347
  f($), y.current.updated = $;
6350
6348
  };
6351
6349
  return /* @__PURE__ */ c("div", { className: "relative h-full flex flex-col", children: [
6352
- !w && /* @__PURE__ */ a("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ a(Is, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ a(Xi, { children: e(
6350
+ !N && /* @__PURE__ */ a("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ a(Is, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ a(Qi, { children: e(
6353
6351
  "You don't have permission to edit SEO settings. Contact your administrator for access."
6354
6352
  ) }) }) }),
6355
6353
  /* @__PURE__ */ c("div", { className: "flex-grow overflow-y-auto no-scrollbar px-2", children: [
@@ -6364,14 +6362,14 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6364
6362
  ")"
6365
6363
  ] })
6366
6364
  ] }),
6367
- /* @__PURE__ */ a("form", { className: "space-y-8", children: /* @__PURE__ */ c(Zi, { type: "multiple", defaultValue: ["page"], children: [
6365
+ /* @__PURE__ */ a("form", { className: "space-y-8", children: /* @__PURE__ */ c(Xi, { type: "multiple", defaultValue: ["page"], children: [
6368
6366
  /* @__PURE__ */ c(Pn, { value: "page", children: [
6369
6367
  /* @__PURE__ */ a(_n, { className: "font-semibold text-slate-700", children: e("SEO") }),
6370
6368
  /* @__PURE__ */ a(In, { className: "pt-2", children: /* @__PURE__ */ c("div", { className: "space-y-4", children: [
6371
6369
  /* @__PURE__ */ c("div", { className: "space-y-1", children: [
6372
6370
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
6373
6371
  /* @__PURE__ */ a(te, { className: "text-xs", htmlFor: "title", children: e("SEO Title") }),
6374
- w && /* @__PURE__ */ a(
6372
+ N && /* @__PURE__ */ a(
6375
6373
  it,
6376
6374
  {
6377
6375
  dataType: "value",
@@ -6388,16 +6386,16 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6388
6386
  name: "title",
6389
6387
  value: h.title,
6390
6388
  onChange: J,
6391
- disabled: E || !w,
6389
+ disabled: E || !N,
6392
6390
  placeholder: e("Enter SEO title"),
6393
- readOnly: !w
6391
+ readOnly: !N
6394
6392
  }
6395
6393
  )
6396
6394
  ] }),
6397
6395
  /* @__PURE__ */ c("div", { className: "space-y-1", children: [
6398
6396
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
6399
6397
  /* @__PURE__ */ a(te, { className: "text-xs", htmlFor: "description", children: e("SEO Description") }),
6400
- w && /* @__PURE__ */ a(
6398
+ N && /* @__PURE__ */ a(
6401
6399
  it,
6402
6400
  {
6403
6401
  data: i ?? {},
@@ -6413,16 +6411,16 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6413
6411
  rows: 5,
6414
6412
  value: h.description,
6415
6413
  onChange: J,
6416
- disabled: E || !w,
6414
+ disabled: E || !N,
6417
6415
  placeholder: e("Enter SEO description"),
6418
- readOnly: !w
6416
+ readOnly: !N
6419
6417
  }
6420
6418
  )
6421
6419
  ] }),
6422
6420
  /* @__PURE__ */ c("div", { className: "space-y-1", children: [
6423
6421
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
6424
6422
  /* @__PURE__ */ a(te, { className: "text-xs", htmlFor: "title", children: e("Canonical URL") }),
6425
- w && /* @__PURE__ */ a(
6423
+ N && /* @__PURE__ */ a(
6426
6424
  it,
6427
6425
  {
6428
6426
  dataType: "value",
@@ -6439,9 +6437,9 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6439
6437
  name: "canonicalUrl",
6440
6438
  value: h.canonicalUrl,
6441
6439
  onChange: J,
6442
- disabled: E || !w,
6440
+ disabled: E || !N,
6443
6441
  placeholder: e("Enter Canonical URL"),
6444
- readOnly: !w
6442
+ readOnly: !N
6445
6443
  }
6446
6444
  )
6447
6445
  ] }),
@@ -6455,7 +6453,7 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6455
6453
  name: "noIndex",
6456
6454
  checked: h.noIndex,
6457
6455
  onChange: J,
6458
- disabled: E || !w,
6456
+ disabled: E || !N,
6459
6457
  className: "w-4 h-4"
6460
6458
  }
6461
6459
  ),
@@ -6475,7 +6473,7 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6475
6473
  name: "noFollow",
6476
6474
  checked: h.noFollow,
6477
6475
  onChange: J,
6478
- disabled: E || !w,
6476
+ disabled: E || !N,
6479
6477
  className: "w-4 h-4"
6480
6478
  }
6481
6479
  ),
@@ -6497,14 +6495,14 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6497
6495
  variant: "outline",
6498
6496
  size: "sm",
6499
6497
  onClick: b,
6500
- disabled: !w,
6498
+ disabled: !N,
6501
6499
  children: e("Copy from SEO Settings")
6502
6500
  }
6503
6501
  ) }),
6504
6502
  /* @__PURE__ */ c("div", { className: "space-y-1", children: [
6505
6503
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
6506
6504
  /* @__PURE__ */ a(te, { className: "text-xs", htmlFor: "ogTitle", children: e("OG Title") }),
6507
- w && /* @__PURE__ */ a(
6505
+ N && /* @__PURE__ */ a(
6508
6506
  it,
6509
6507
  {
6510
6508
  dataType: "value",
@@ -6521,16 +6519,16 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6521
6519
  name: "ogTitle",
6522
6520
  value: h.ogTitle,
6523
6521
  onChange: J,
6524
- disabled: E || !w,
6522
+ disabled: E || !N,
6525
6523
  placeholder: e("Enter OG title"),
6526
- readOnly: !w
6524
+ readOnly: !N
6527
6525
  }
6528
6526
  )
6529
6527
  ] }),
6530
6528
  /* @__PURE__ */ c("div", { className: "space-y-1", children: [
6531
6529
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
6532
6530
  /* @__PURE__ */ a(te, { className: "text-xs", htmlFor: "ogDescription", children: e("OG Description") }),
6533
- w && /* @__PURE__ */ a(
6531
+ N && /* @__PURE__ */ a(
6534
6532
  it,
6535
6533
  {
6536
6534
  dataType: "value",
@@ -6547,16 +6545,16 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6547
6545
  rows: 5,
6548
6546
  value: h.ogDescription,
6549
6547
  onChange: J,
6550
- disabled: E || !w,
6548
+ disabled: E || !N,
6551
6549
  placeholder: e("Enter OG description"),
6552
- readOnly: !w
6550
+ readOnly: !N
6553
6551
  }
6554
6552
  )
6555
6553
  ] }),
6556
6554
  /* @__PURE__ */ c("div", { className: "space-y-1", children: [
6557
6555
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ a(te, { className: "text-xs", htmlFor: "ogImage", children: e("OG Image") }) }),
6558
6556
  /* @__PURE__ */ a(
6559
- jc,
6557
+ Fc,
6560
6558
  {
6561
6559
  assetId: h.ogImageId,
6562
6560
  assetUrl: h.ogImage,
@@ -6568,7 +6566,7 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6568
6566
  };
6569
6567
  f($), y.current.updated = $;
6570
6568
  },
6571
- disabled: E || !w,
6569
+ disabled: E || !N,
6572
6570
  placeholder: e("Select OG image"),
6573
6571
  className: "mb-2"
6574
6572
  }
@@ -6585,15 +6583,15 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6585
6583
  type: "button",
6586
6584
  variant: "outline",
6587
6585
  size: "sm",
6588
- onClick: D,
6589
- disabled: !w,
6586
+ onClick: L,
6587
+ disabled: !N,
6590
6588
  children: e("Copy from OG Settings")
6591
6589
  }
6592
6590
  ) }),
6593
6591
  /* @__PURE__ */ c("div", { className: "space-y-1", children: [
6594
6592
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
6595
6593
  /* @__PURE__ */ a(te, { className: "text-xs", htmlFor: "searchTitle", children: e("Search Title") }),
6596
- w && /* @__PURE__ */ a(
6594
+ N && /* @__PURE__ */ a(
6597
6595
  it,
6598
6596
  {
6599
6597
  dataType: "value",
@@ -6610,16 +6608,16 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6610
6608
  name: "searchTitle",
6611
6609
  value: h.searchTitle,
6612
6610
  onChange: J,
6613
- disabled: E || !w,
6611
+ disabled: E || !N,
6614
6612
  placeholder: e("Enter search title"),
6615
- readOnly: !w
6613
+ readOnly: !N
6616
6614
  }
6617
6615
  )
6618
6616
  ] }),
6619
6617
  /* @__PURE__ */ c("div", { className: "space-y-1", children: [
6620
6618
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
6621
6619
  /* @__PURE__ */ a(te, { className: "text-xs", htmlFor: "searchDescription", children: e("Search Description") }),
6622
- w && /* @__PURE__ */ a(
6620
+ N && /* @__PURE__ */ a(
6623
6621
  it,
6624
6622
  {
6625
6623
  dataType: "value",
@@ -6637,8 +6635,8 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6637
6635
  value: h.searchDescription,
6638
6636
  onChange: J,
6639
6637
  placeholder: e("Enter search description"),
6640
- disabled: E || !w,
6641
- readOnly: !w
6638
+ disabled: E || !N,
6639
+ readOnly: !N
6642
6640
  }
6643
6641
  )
6644
6642
  ] })
@@ -6649,7 +6647,7 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6649
6647
  /* @__PURE__ */ a(In, { children: /* @__PURE__ */ a("div", { className: "space-y-4", children: /* @__PURE__ */ c("div", { className: "space-y-1", children: [
6650
6648
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
6651
6649
  /* @__PURE__ */ a(te, { className: "text-xs", htmlFor: "jsonLD", children: e("JSON-LD") }),
6652
- w && /* @__PURE__ */ a(
6650
+ N && /* @__PURE__ */ a(
6653
6651
  it,
6654
6652
  {
6655
6653
  dataType: "value",
@@ -6667,32 +6665,32 @@ const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6667
6665
  value: h.jsonLD,
6668
6666
  onChange: J,
6669
6667
  placeholder: e("Enter JSON-LD"),
6670
- disabled: E || !w,
6671
- readOnly: !w
6668
+ disabled: E || !N,
6669
+ readOnly: !N
6672
6670
  }
6673
6671
  )
6674
6672
  ] }) }) })
6675
6673
  ] })
6676
6674
  ] }) })
6677
6675
  ] }),
6678
- w && /* @__PURE__ */ a("div", { className: "flex-shrink-0 flex items-center justify-end w-full p-4 bg-background border-t", children: /* @__PURE__ */ a(
6676
+ N && /* @__PURE__ */ a("div", { className: "flex-shrink-0 flex items-center justify-end w-full p-4 bg-background border-t", children: /* @__PURE__ */ a(
6679
6677
  T,
6680
6678
  {
6681
6679
  size: "lg",
6682
6680
  variant: "default",
6683
- onClick: k,
6684
- disabled: ws(y.current.initial, h) || E || !w,
6685
- children: e(N ? "Saving..." : "Save")
6681
+ onClick: I,
6682
+ disabled: ws(y.current.initial, h) || E || !N,
6683
+ children: e(w ? "Saving..." : "Save")
6686
6684
  }
6687
6685
  ) })
6688
6686
  ] });
6689
6687
  };
6690
6688
  pr.displayName = "SeoPanel";
6691
- const yr = "seo", $c = ({
6689
+ const yr = "seo", zc = ({
6692
6690
  isActive: e,
6693
6691
  show: t
6694
6692
  }) => {
6695
- const { data: n } = Ve(), s = fo(n == null ? void 0 : n.pageType);
6693
+ const { data: n } = Ve(), s = mo(n == null ? void 0 : n.pageType);
6696
6694
  return !nt(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ a(
6697
6695
  T,
6698
6696
  {
@@ -6715,19 +6713,19 @@ const yr = "seo", $c = ({
6715
6713
  )
6716
6714
  }
6717
6715
  );
6718
- }, Kc = {
6716
+ }, $c = {
6719
6717
  id: yr,
6720
6718
  label: "SEO",
6721
6719
  panel: pr,
6722
- button: $c,
6720
+ button: zc,
6723
6721
  position: "top",
6724
6722
  view: "modal",
6725
6723
  width: 600
6726
- }, Vc = "user-info", Hc = () => {
6724
+ }, Kc = "user-info", Vc = () => {
6727
6725
  const { user: e, logout: t } = ut(), n = Se(), s = at("onLogout", pi);
6728
- return e ? /* @__PURE__ */ c(Ji, { children: [
6729
- /* @__PURE__ */ a(el, { asChild: !0, children: /* @__PURE__ */ a(T, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ a(kl, { className: "w-4 h-4" }) }) }),
6730
- /* @__PURE__ */ c(tl, { className: "w-auto p-4 space-y-2", children: [
6726
+ return e ? /* @__PURE__ */ c(Zi, { children: [
6727
+ /* @__PURE__ */ a(Ji, { asChild: !0, children: /* @__PURE__ */ a(T, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ a(Il, { className: "w-4 h-4" }) }) }),
6728
+ /* @__PURE__ */ c(el, { className: "w-auto p-4 space-y-2", children: [
6731
6729
  /* @__PURE__ */ a("div", { className: "text-sm font-medium", children: e.name ?? e.email }),
6732
6730
  /* @__PURE__ */ a("div", { className: "text-xs text-muted-foreground", children: e.email }),
6733
6731
  /* @__PURE__ */ c(Ta, { children: [
@@ -6753,13 +6751,13 @@ const yr = "seo", $c = ({
6753
6751
  ] })
6754
6752
  ] })
6755
6753
  ] }) : null;
6756
- }, Wc = {
6757
- id: Vc,
6754
+ }, Hc = {
6755
+ id: Kc,
6758
6756
  label: "User Info",
6759
- button: Hc,
6757
+ button: Vc,
6760
6758
  position: "bottom"
6761
- }, Yc = () => {
6762
- ss(yr, Kc), ss(fr, _c), ss("user-info", Wc);
6759
+ }, Wc = () => {
6760
+ ss(yr, $c), ss(fr, Pc), ss("user-info", Hc);
6763
6761
  };
6764
6762
  var V = {
6765
6763
  context: void 0,
@@ -6780,14 +6778,14 @@ function ca(e) {
6780
6778
  function Kt(e) {
6781
6779
  V.context = e;
6782
6780
  }
6783
- var Qc = (e, t) => e === t, Fn = Symbol("solid-proxy"), vr = typeof Proxy == "function", br = Symbol("solid-track"), jn = {
6784
- equals: Qc
6781
+ var Yc = (e, t) => e === t, Fn = Symbol("solid-proxy"), vr = typeof Proxy == "function", br = Symbol("solid-track"), jn = {
6782
+ equals: Yc
6785
6783
  }, Er = Tr, rt = 1, qn = 2, Nr = {
6786
6784
  owned: null,
6787
6785
  cleanups: null,
6788
6786
  context: null,
6789
6787
  owner: null
6790
- }, is = {}, ie = null, ls = null, Xc = null, he = null, Oe = null, st = null, Jn = 0;
6788
+ }, is = {}, ie = null, ls = null, Qc = null, he = null, Oe = null, st = null, Jn = 0;
6791
6789
  function mt(e, t) {
6792
6790
  const n = he, s = ie, r = e.length === 0, i = t === void 0 ? s : t, l = r ? Nr : {
6793
6791
  owned: null,
@@ -6812,7 +6810,7 @@ function Pe(e, t) {
6812
6810
  }, s = (r) => (typeof r == "function" && (r = r(n.value)), Ar(n, r));
6813
6811
  return [xr.bind(n), s];
6814
6812
  }
6815
- function Zc(e, t, n) {
6813
+ function Xc(e, t, n) {
6816
6814
  const s = es(e, t, !0, rt);
6817
6815
  zt(s);
6818
6816
  }
@@ -6821,7 +6819,7 @@ function ft(e, t, n) {
6821
6819
  zt(s);
6822
6820
  }
6823
6821
  function wr(e, t, n) {
6824
- Er = ou;
6822
+ Er = lu;
6825
6823
  const s = es(e, t, !1, rt);
6826
6824
  (!n || !n.render) && (s.user = !0), st ? st.push(s) : zt(s);
6827
6825
  }
@@ -6830,18 +6828,18 @@ function je(e, t, n) {
6830
6828
  const s = es(e, t, !0, 0);
6831
6829
  return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, zt(s), xr.bind(s);
6832
6830
  }
6833
- function Jc(e) {
6831
+ function Zc(e) {
6834
6832
  return e && typeof e == "object" && "then" in e;
6835
6833
  }
6836
- function eu(e, t, n) {
6834
+ function Jc(e, t, n) {
6837
6835
  let s, r, i;
6838
6836
  arguments.length === 1 ? (s = !0, r = e, i = {}) : (s = e, r = t, i = {});
6839
6837
  let l = null, o = is, u = null, d = !1, h = "initialValue" in i, f = typeof s == "function" && je(s);
6840
- const y = /* @__PURE__ */ new Set(), [p, g] = (i.storage || Pe)(i.initialValue), [N, E] = Pe(void 0), [I, w] = Pe(void 0, {
6838
+ const y = /* @__PURE__ */ new Set(), [p, g] = (i.storage || Pe)(i.initialValue), [w, E] = Pe(void 0), [D, N] = Pe(void 0, {
6841
6839
  equals: !1
6842
- }), [k, b] = Pe(h ? "ready" : "unresolved");
6840
+ }), [I, b] = Pe(h ? "ready" : "unresolved");
6843
6841
  V.context && (u = V.getNextContextId(), i.ssrLoadFrom === "initial" ? o = i.initialValue : V.load && V.has(u) && (o = V.load(u)));
6844
- function D($, U, Y, R) {
6842
+ function L($, U, Y, R) {
6845
6843
  return l === $ && (l = null, R !== void 0 && (h = !0), ($ === o || U === o) && i.onHydrated && queueMicrotask(
6846
6844
  () => i.onHydrated(R, {
6847
6845
  value: U
@@ -6857,7 +6855,7 @@ function eu(e, t, n) {
6857
6855
  }, !1);
6858
6856
  }
6859
6857
  function J() {
6860
- const $ = ru, U = p(), Y = N();
6858
+ const $ = au, U = p(), Y = w();
6861
6859
  if (Y !== void 0 && !l)
6862
6860
  throw Y;
6863
6861
  return he && he.user, U;
@@ -6868,7 +6866,7 @@ function eu(e, t, n) {
6868
6866
  d = !1;
6869
6867
  const U = f ? f() : s;
6870
6868
  if (U == null || U === !1) {
6871
- D(l, Ge(p));
6869
+ L(l, Ge(p));
6872
6870
  return;
6873
6871
  }
6874
6872
  const Y = o !== is ? o : Ge(
@@ -6877,23 +6875,23 @@ function eu(e, t, n) {
6877
6875
  refetching: $
6878
6876
  })
6879
6877
  );
6880
- return Jc(Y) ? (l = Y, "value" in Y ? (Y.status === "success" ? D(l, Y.value, void 0, U) : D(l, void 0, ds(Y.value), U), Y) : (d = !0, queueMicrotask(() => d = !1), et(() => {
6881
- b(h ? "refreshing" : "pending"), w();
6878
+ return Zc(Y) ? (l = Y, "value" in Y ? (Y.status === "success" ? L(l, Y.value, void 0, U) : L(l, void 0, ds(Y.value), U), Y) : (d = !0, queueMicrotask(() => d = !1), et(() => {
6879
+ b(h ? "refreshing" : "pending"), N();
6882
6880
  }, !1), Y.then(
6883
- (R) => D(Y, R, void 0, U),
6884
- (R) => D(Y, void 0, ds(R), U)
6885
- ))) : (D(l, Y, void 0, U), Y);
6881
+ (R) => L(Y, R, void 0, U),
6882
+ (R) => L(Y, void 0, ds(R), U)
6883
+ ))) : (L(l, Y, void 0, U), Y);
6886
6884
  }
6887
6885
  return Object.defineProperties(J, {
6888
6886
  state: {
6889
- get: () => k()
6887
+ get: () => I()
6890
6888
  },
6891
6889
  error: {
6892
- get: () => N()
6890
+ get: () => w()
6893
6891
  },
6894
6892
  loading: {
6895
6893
  get() {
6896
- const $ = k();
6894
+ const $ = I();
6897
6895
  return $ === "pending" || $ === "refreshing";
6898
6896
  }
6899
6897
  },
@@ -6901,13 +6899,13 @@ function eu(e, t, n) {
6901
6899
  get() {
6902
6900
  if (!h)
6903
6901
  return J();
6904
- const $ = N();
6902
+ const $ = w();
6905
6903
  if ($ && !l)
6906
6904
  throw $;
6907
6905
  return p();
6908
6906
  }
6909
6907
  }
6910
- }), f ? Zc(() => B(!1)) : B(!1), [
6908
+ }), f ? Xc(() => B(!1)) : B(!1), [
6911
6909
  J,
6912
6910
  {
6913
6911
  refetch: B,
@@ -6915,7 +6913,7 @@ function eu(e, t, n) {
6915
6913
  }
6916
6914
  ];
6917
6915
  }
6918
- function $d(e) {
6916
+ function zd(e) {
6919
6917
  return et(e, !1);
6920
6918
  }
6921
6919
  function Ge(e) {
@@ -6929,7 +6927,7 @@ function Ge(e) {
6929
6927
  he = t;
6930
6928
  }
6931
6929
  }
6932
- function Kd(e, t, n) {
6930
+ function $d(e, t, n) {
6933
6931
  const s = Array.isArray(e);
6934
6932
  let r, i = n && n.defer;
6935
6933
  return (l) => {
@@ -6946,7 +6944,7 @@ function Kd(e, t, n) {
6946
6944
  return r = o, u;
6947
6945
  };
6948
6946
  }
6949
- function tu(e) {
6947
+ function eu(e) {
6950
6948
  wr(() => Ge(e));
6951
6949
  }
6952
6950
  function Zt(e) {
@@ -6955,7 +6953,7 @@ function Zt(e) {
6955
6953
  function ua() {
6956
6954
  return ie;
6957
6955
  }
6958
- function nu(e, t) {
6956
+ function tu(e, t) {
6959
6957
  const n = ie, s = he;
6960
6958
  ie = e, he = null;
6961
6959
  try {
@@ -6966,7 +6964,7 @@ function nu(e, t) {
6966
6964
  ie = n, he = s;
6967
6965
  }
6968
6966
  }
6969
- function su(e) {
6967
+ function nu(e) {
6970
6968
  const t = he, n = ie;
6971
6969
  return Promise.resolve().then(() => {
6972
6970
  he = t, ie = n;
@@ -6974,19 +6972,19 @@ function su(e) {
6974
6972
  return et(e, !1), he = ie = null, s ? s.done : void 0;
6975
6973
  });
6976
6974
  }
6977
- var [au, Vd] = /* @__PURE__ */ Pe(!1);
6978
- function Hd() {
6979
- return [au, su];
6975
+ var [su, Kd] = /* @__PURE__ */ Pe(!1);
6976
+ function Vd() {
6977
+ return [su, nu];
6980
6978
  }
6981
- function Wd(e, t) {
6979
+ function Hd(e, t) {
6982
6980
  const n = Symbol("context");
6983
6981
  return {
6984
6982
  id: n,
6985
- Provider: cu(n),
6983
+ Provider: ou(n),
6986
6984
  defaultValue: e
6987
6985
  };
6988
6986
  }
6989
- function Yd(e) {
6987
+ function Wd(e) {
6990
6988
  let t;
6991
6989
  return ie && ie.context && (t = ie.context[e.id]) !== void 0 ? t : e.defaultValue;
6992
6990
  }
@@ -6997,7 +6995,7 @@ function Sr(e) {
6997
6995
  return Array.isArray(s) ? s : s != null ? [s] : [];
6998
6996
  }, n;
6999
6997
  }
7000
- var ru;
6998
+ var au;
7001
6999
  function xr() {
7002
7000
  if (this.sources && this.state)
7003
7001
  if (this.state === rt)
@@ -7028,13 +7026,13 @@ function zt(e) {
7028
7026
  return;
7029
7027
  Jt(e);
7030
7028
  const t = Jn;
7031
- iu(
7029
+ ru(
7032
7030
  e,
7033
7031
  e.value,
7034
7032
  t
7035
7033
  );
7036
7034
  }
7037
- function iu(e, t, n) {
7035
+ function ru(e, t, n) {
7038
7036
  let s;
7039
7037
  const r = ie, i = he;
7040
7038
  he = ie = e;
@@ -7088,12 +7086,12 @@ function et(e, t) {
7088
7086
  t || (Oe = []), st ? n = !0 : st = [], Jn++;
7089
7087
  try {
7090
7088
  const s = e();
7091
- return lu(n), s;
7089
+ return iu(n), s;
7092
7090
  } catch (s) {
7093
7091
  n || (st = null), Oe = null, Ks(s);
7094
7092
  }
7095
7093
  }
7096
- function lu(e) {
7094
+ function iu(e) {
7097
7095
  if (Oe && (Tr(Oe), Oe = null), e)
7098
7096
  return;
7099
7097
  const t = st;
@@ -7103,7 +7101,7 @@ function Tr(e) {
7103
7101
  for (let t = 0; t < e.length; t++)
7104
7102
  zn(e[t]);
7105
7103
  }
7106
- function ou(e) {
7104
+ function lu(e) {
7107
7105
  let t, n = 0;
7108
7106
  for (t = 0; t < e.length; t++) {
7109
7107
  const s = e[t];
@@ -7183,7 +7181,7 @@ function hs(e) {
7183
7181
  }
7184
7182
  return e;
7185
7183
  }
7186
- function cu(e, t) {
7184
+ function ou(e, t) {
7187
7185
  return function(s) {
7188
7186
  let r;
7189
7187
  return ft(
@@ -7200,12 +7198,12 @@ function Kn(e) {
7200
7198
  for (let t = 0; t < e.length; t++)
7201
7199
  e[t]();
7202
7200
  }
7203
- function uu(e, t, n = {}) {
7201
+ function cu(e, t, n = {}) {
7204
7202
  let s = [], r = [], i = [], l = 0, o = t.length > 1 ? [] : null;
7205
7203
  return Zt(() => Kn(i)), () => {
7206
7204
  let u = e() || [], d = u.length, h, f;
7207
7205
  return u[br], Ge(() => {
7208
- let p, g, N, E, I, w, k, b, D;
7206
+ let p, g, w, E, D, N, I, b, L;
7209
7207
  if (d === 0)
7210
7208
  l !== 0 && (Kn(i), i = [], s = [], r = [], l = 0, o && (o = [])), n.fallback && (s = [ms], r[0] = mt((M) => (i[0] = M, n.fallback())), l = 1);
7211
7209
  else if (l === 0) {
@@ -7213,30 +7211,30 @@ function uu(e, t, n = {}) {
7213
7211
  s[f] = u[f], r[f] = mt(y);
7214
7212
  l = d;
7215
7213
  } else {
7216
- for (N = new Array(d), E = new Array(d), o && (I = new Array(d)), w = 0, k = Math.min(l, d); w < k && s[w] === u[w]; w++)
7214
+ for (w = new Array(d), E = new Array(d), o && (D = new Array(d)), N = 0, I = Math.min(l, d); N < I && s[N] === u[N]; N++)
7217
7215
  ;
7218
- for (k = l - 1, b = d - 1; k >= w && b >= w && s[k] === u[b]; k--, b--)
7219
- N[b] = r[k], E[b] = i[k], o && (I[b] = o[k]);
7220
- for (p = /* @__PURE__ */ new Map(), g = new Array(b + 1), f = b; f >= w; f--)
7221
- D = u[f], h = p.get(D), g[f] = h === void 0 ? -1 : h, p.set(D, f);
7222
- for (h = w; h <= k; h++)
7223
- D = s[h], f = p.get(D), f !== void 0 && f !== -1 ? (N[f] = r[h], E[f] = i[h], o && (I[f] = o[h]), f = g[f], p.set(D, f)) : i[h]();
7224
- for (f = w; f < d; f++)
7225
- f in N ? (r[f] = N[f], i[f] = E[f], o && (o[f] = I[f], o[f](f))) : r[f] = mt(y);
7216
+ for (I = l - 1, b = d - 1; I >= N && b >= N && s[I] === u[b]; I--, b--)
7217
+ w[b] = r[I], E[b] = i[I], o && (D[b] = o[I]);
7218
+ for (p = /* @__PURE__ */ new Map(), g = new Array(b + 1), f = b; f >= N; f--)
7219
+ L = u[f], h = p.get(L), g[f] = h === void 0 ? -1 : h, p.set(L, f);
7220
+ for (h = N; h <= I; h++)
7221
+ L = s[h], f = p.get(L), f !== void 0 && f !== -1 ? (w[f] = r[h], E[f] = i[h], o && (D[f] = o[h]), f = g[f], p.set(L, f)) : i[h]();
7222
+ for (f = N; f < d; f++)
7223
+ f in w ? (r[f] = w[f], i[f] = E[f], o && (o[f] = D[f], o[f](f))) : r[f] = mt(y);
7226
7224
  r = r.slice(0, l = d), s = u.slice(0);
7227
7225
  }
7228
7226
  return r;
7229
7227
  });
7230
7228
  function y(p) {
7231
7229
  if (i[f] = p, o) {
7232
- const [g, N] = Pe(f);
7233
- return o[f] = N, t(u[f], g);
7230
+ const [g, w] = Pe(f);
7231
+ return o[f] = w, t(u[f], g);
7234
7232
  }
7235
7233
  return t(u[f]);
7236
7234
  }
7237
7235
  };
7238
7236
  }
7239
- function du(e, t, n = {}) {
7237
+ function uu(e, t, n = {}) {
7240
7238
  let s = [], r = [], i = [], l = [], o = 0, u;
7241
7239
  return Zt(() => Kn(i)), () => {
7242
7240
  const d = e() || [], h = d.length;
@@ -7289,7 +7287,7 @@ var fs = {
7289
7287
  function os(e) {
7290
7288
  return (e = typeof e == "function" ? e() : e) ? e : {};
7291
7289
  }
7292
- function hu() {
7290
+ function du() {
7293
7291
  for (let e = 0, t = this.length; e < t; ++e) {
7294
7292
  const n = this[e]();
7295
7293
  if (n !== void 0)
@@ -7342,7 +7340,7 @@ function _r(...e) {
7342
7340
  s[h] = f.get ? {
7343
7341
  enumerable: !0,
7344
7342
  configurable: !0,
7345
- get: hu.bind(n[h] = [f.get.bind(o)])
7343
+ get: du.bind(n[h] = [f.get.bind(o)])
7346
7344
  } : f.value !== void 0 ? f : void 0;
7347
7345
  else {
7348
7346
  const y = n[h];
@@ -7357,7 +7355,7 @@ function _r(...e) {
7357
7355
  }
7358
7356
  return r;
7359
7357
  }
7360
- function mu(e, ...t) {
7358
+ function hu(e, ...t) {
7361
7359
  if (vr && Fn in e) {
7362
7360
  const r = new Set(t.length > 1 ? t.flat() : t[0]), i = t.map((l) => new Proxy(
7363
7361
  {
@@ -7410,7 +7408,7 @@ function Ir(e) {
7410
7408
  !V.done && Kt(i), V.count--, u(() => d.default), Kt();
7411
7409
  }), t = o;
7412
7410
  } else if (!t) {
7413
- const [o] = eu(() => (n || (n = e())).then((u) => u.default));
7411
+ const [o] = Jc(() => (n || (n = e())).then((u) => u.default));
7414
7412
  t = o;
7415
7413
  }
7416
7414
  let l;
@@ -7427,24 +7425,24 @@ function Ir(e) {
7427
7425
  };
7428
7426
  return s.preload = () => n || ((n = e()).then((r) => t = () => r.default), n), s;
7429
7427
  }
7430
- var fu = 0;
7431
- function Qd() {
7432
- return V.context ? V.getNextContextId() : `cl-${fu++}`;
7428
+ var mu = 0;
7429
+ function Yd() {
7430
+ return V.context ? V.getNextContextId() : `cl-${mu++}`;
7433
7431
  }
7434
7432
  var kr = (e) => `Stale read from <${e}>.`;
7435
- function Xd(e) {
7433
+ function Qd(e) {
7436
7434
  const t = "fallback" in e && {
7437
7435
  fallback: () => e.fallback
7438
7436
  };
7439
- return je(uu(() => e.each, e.children, t || void 0));
7437
+ return je(cu(() => e.each, e.children, t || void 0));
7440
7438
  }
7441
- function Zd(e) {
7439
+ function Xd(e) {
7442
7440
  const t = "fallback" in e && {
7443
7441
  fallback: () => e.fallback
7444
7442
  };
7445
- return je(du(() => e.each, e.children, t || void 0));
7443
+ return je(uu(() => e.each, e.children, t || void 0));
7446
7444
  }
7447
- function Jd(e) {
7445
+ function Zd(e) {
7448
7446
  const t = e.keyed, n = je(() => e.when, void 0, {
7449
7447
  equals: (s, r) => t ? s === r : !s == !r
7450
7448
  });
@@ -7469,7 +7467,7 @@ function Jd(e) {
7469
7467
  void 0
7470
7468
  );
7471
7469
  }
7472
- function eh(e) {
7470
+ function Jd(e) {
7473
7471
  let t = !1;
7474
7472
  const n = (i, l) => (t ? i[1] === l[1] : !i[1] == !l[1]) && i[2] === l[2], s = Sr(() => e.children), r = je(
7475
7473
  () => {
@@ -7507,10 +7505,10 @@ function eh(e) {
7507
7505
  void 0
7508
7506
  );
7509
7507
  }
7510
- function th(e) {
7508
+ function eh(e) {
7511
7509
  return e;
7512
7510
  }
7513
- var gu = [
7511
+ var fu = [
7514
7512
  "allowfullscreen",
7515
7513
  "async",
7516
7514
  "autofocus",
@@ -7536,7 +7534,7 @@ var gu = [
7536
7534
  "reversed",
7537
7535
  "seamless",
7538
7536
  "selected"
7539
- ], pu = /* @__PURE__ */ new Set([
7537
+ ], gu = /* @__PURE__ */ new Set([
7540
7538
  "className",
7541
7539
  "value",
7542
7540
  "readOnly",
@@ -7544,16 +7542,16 @@ var gu = [
7544
7542
  "isMap",
7545
7543
  "noModule",
7546
7544
  "playsInline",
7547
- ...gu
7548
- ]), yu = /* @__PURE__ */ new Set([
7545
+ ...fu
7546
+ ]), pu = /* @__PURE__ */ new Set([
7549
7547
  "innerHTML",
7550
7548
  "textContent",
7551
7549
  "innerText",
7552
7550
  "children"
7553
- ]), vu = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
7551
+ ]), yu = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
7554
7552
  className: "class",
7555
7553
  htmlFor: "for"
7556
- }), bu = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
7554
+ }), vu = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
7557
7555
  class: "className",
7558
7556
  formnovalidate: {
7559
7557
  $: "formNoValidate",
@@ -7578,11 +7576,11 @@ var gu = [
7578
7576
  TEXTAREA: 1
7579
7577
  }
7580
7578
  });
7581
- function Eu(e, t) {
7582
- const n = bu[e];
7579
+ function bu(e, t) {
7580
+ const n = vu[e];
7583
7581
  return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
7584
7582
  }
7585
- var Nu = /* @__PURE__ */ new Set([
7583
+ var Eu = /* @__PURE__ */ new Set([
7586
7584
  "beforeinput",
7587
7585
  "click",
7588
7586
  "dblclick",
@@ -7605,7 +7603,7 @@ var Nu = /* @__PURE__ */ new Set([
7605
7603
  "touchend",
7606
7604
  "touchmove",
7607
7605
  "touchstart"
7608
- ]), wu = /* @__PURE__ */ new Set([
7606
+ ]), Nu = /* @__PURE__ */ new Set([
7609
7607
  "altGlyph",
7610
7608
  "altGlyphDef",
7611
7609
  "altGlyphItem",
@@ -7683,11 +7681,11 @@ var Nu = /* @__PURE__ */ new Set([
7683
7681
  "use",
7684
7682
  "view",
7685
7683
  "vkern"
7686
- ]), Su = {
7684
+ ]), wu = {
7687
7685
  xlink: "http://www.w3.org/1999/xlink",
7688
7686
  xml: "http://www.w3.org/XML/1998/namespace"
7689
7687
  };
7690
- function xu(e, t, n) {
7688
+ function Su(e, t, n) {
7691
7689
  let s = n.length, r = t.length, i = s, l = 0, o = 0, u = t[r - 1].nextSibling, d = null;
7692
7690
  for (; l < r || o < i; ) {
7693
7691
  if (t[l] === n[o]) {
@@ -7741,7 +7739,7 @@ function Lr(e, t, n, s = {}) {
7741
7739
  r(), t.textContent = "";
7742
7740
  };
7743
7741
  }
7744
- function nh(e, t, n) {
7742
+ function th(e, t, n) {
7745
7743
  let s;
7746
7744
  const r = () => {
7747
7745
  const l = document.createElement("template");
@@ -7749,14 +7747,14 @@ function nh(e, t, n) {
7749
7747
  }, i = () => (s || (s = r())).cloneNode(!0);
7750
7748
  return i.cloneNode = i, i;
7751
7749
  }
7752
- function Au(e, t = window.document) {
7750
+ function xu(e, t = window.document) {
7753
7751
  const n = t[Ht] || (t[Ht] = /* @__PURE__ */ new Set());
7754
7752
  for (let s = 0, r = e.length; s < r; s++) {
7755
7753
  const i = e[s];
7756
7754
  n.has(i) || (n.add(i), t.addEventListener(i, Dr));
7757
7755
  }
7758
7756
  }
7759
- function sh(e = window.document) {
7757
+ function nh(e = window.document) {
7760
7758
  if (e[Ht]) {
7761
7759
  for (let t of e[Ht].keys())
7762
7760
  e.removeEventListener(t, Dr);
@@ -7766,16 +7764,16 @@ function sh(e = window.document) {
7766
7764
  function gs(e, t, n) {
7767
7765
  vt(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
7768
7766
  }
7769
- function Tu(e, t, n, s) {
7767
+ function Au(e, t, n, s) {
7770
7768
  vt(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
7771
7769
  }
7772
- function Cu(e, t, n) {
7770
+ function Tu(e, t, n) {
7773
7771
  vt(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
7774
7772
  }
7775
- function Pu(e, t) {
7773
+ function Cu(e, t) {
7776
7774
  vt(e) || (t == null ? e.removeAttribute("class") : e.className = t);
7777
7775
  }
7778
- function _u(e, t, n, s) {
7776
+ function Pu(e, t, n, s) {
7779
7777
  if (s)
7780
7778
  Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
7781
7779
  else if (Array.isArray(n)) {
@@ -7784,7 +7782,7 @@ function _u(e, t, n, s) {
7784
7782
  } else
7785
7783
  e.addEventListener(t, n, typeof n != "function" && n);
7786
7784
  }
7787
- function Iu(e, t, n = {}) {
7785
+ function _u(e, t, n = {}) {
7788
7786
  const s = Object.keys(t || {}), r = Object.keys(n);
7789
7787
  let i, l;
7790
7788
  for (i = 0, l = r.length; i < l; i++) {
@@ -7797,7 +7795,7 @@ function Iu(e, t, n = {}) {
7797
7795
  }
7798
7796
  return n;
7799
7797
  }
7800
- function ku(e, t, n) {
7798
+ function Iu(e, t, n) {
7801
7799
  if (!t)
7802
7800
  return n ? gs(e, "style") : t;
7803
7801
  const s = e.style;
@@ -7811,13 +7809,13 @@ function ku(e, t, n) {
7811
7809
  r = t[i], r !== n[i] && (s.setProperty(i, r), n[i] = r);
7812
7810
  return n;
7813
7811
  }
7814
- function Lu(e, t = {}, n, s) {
7812
+ function ku(e, t = {}, n, s) {
7815
7813
  const r = {};
7816
7814
  return s || ft(
7817
7815
  () => r.children = en(e, t.children, r.children)
7818
- ), ft(() => typeof t.ref == "function" && Du(t.ref, e)), ft(() => Gu(e, t, n, !0, r, !0)), r;
7816
+ ), ft(() => typeof t.ref == "function" && Lu(t.ref, e)), ft(() => Du(e, t, n, !0, r, !0)), r;
7819
7817
  }
7820
- function Du(e, t, n) {
7818
+ function Lu(e, t, n) {
7821
7819
  return Ge(() => e(t, n));
7822
7820
  }
7823
7821
  function ps(e, t, n, s) {
@@ -7825,7 +7823,7 @@ function ps(e, t, n, s) {
7825
7823
  return en(e, t, s, n);
7826
7824
  ft((r) => en(e, t(), r, n), s);
7827
7825
  }
7828
- function Gu(e, t, n, s, r = {}, i = !1) {
7826
+ function Du(e, t, n, s, r = {}, i = !1) {
7829
7827
  t || (t = {});
7830
7828
  for (const l in r)
7831
7829
  if (!(l in t)) {
@@ -7840,14 +7838,14 @@ function Gu(e, t, n, s, r = {}, i = !1) {
7840
7838
  r[l] = ha(e, l, o, r[l], n, i, t);
7841
7839
  }
7842
7840
  }
7843
- function Uu(e) {
7841
+ function Gu(e) {
7844
7842
  let t, n;
7845
- return !vt() || !(t = V.registry.get(n = Ru())) ? e() : (V.completed && V.completed.add(t), V.registry.delete(n), t);
7843
+ return !vt() || !(t = V.registry.get(n = Ou())) ? e() : (V.completed && V.completed.add(t), V.registry.delete(n), t);
7846
7844
  }
7847
7845
  function vt(e) {
7848
7846
  return !!V.context && !V.done && (!e || e.isConnected);
7849
7847
  }
7850
- function Ou(e) {
7848
+ function Uu(e) {
7851
7849
  return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
7852
7850
  }
7853
7851
  function da(e, t, n) {
@@ -7858,9 +7856,9 @@ function da(e, t, n) {
7858
7856
  function ha(e, t, n, s, r, i, l) {
7859
7857
  let o, u, d, h, f;
7860
7858
  if (t === "style")
7861
- return ku(e, n, s);
7862
- if (t === "classList")
7863
7859
  return Iu(e, n, s);
7860
+ if (t === "classList")
7861
+ return _u(e, n, s);
7864
7862
  if (n === s)
7865
7863
  return s;
7866
7864
  if (t === "ref")
@@ -7872,25 +7870,25 @@ function ha(e, t, n, s, r, i, l) {
7872
7870
  const y = t.slice(10);
7873
7871
  s && e.removeEventListener(y, s, !0), n && e.addEventListener(y, n, !0);
7874
7872
  } else if (t.slice(0, 2) === "on") {
7875
- const y = t.slice(2).toLowerCase(), p = Nu.has(y);
7873
+ const y = t.slice(2).toLowerCase(), p = Eu.has(y);
7876
7874
  if (!p && s) {
7877
7875
  const g = Array.isArray(s) ? s[0] : s;
7878
7876
  e.removeEventListener(y, g);
7879
7877
  }
7880
- (p || n) && (_u(e, y, n, p), p && Au([y]));
7878
+ (p || n) && (Pu(e, y, n, p), p && xu([y]));
7881
7879
  } else if (t.slice(0, 5) === "attr:")
7882
7880
  gs(e, t.slice(5), n);
7883
7881
  else if (t.slice(0, 5) === "bool:")
7884
- Cu(e, t.slice(5), n);
7885
- else if ((f = t.slice(0, 5) === "prop:") || (d = yu.has(t)) || !r && ((h = Eu(t, e.tagName)) || (u = pu.has(t))) || (o = e.nodeName.includes("-") || "is" in l)) {
7882
+ Tu(e, t.slice(5), n);
7883
+ else if ((f = t.slice(0, 5) === "prop:") || (d = pu.has(t)) || !r && ((h = bu(t, e.tagName)) || (u = gu.has(t))) || (o = e.nodeName.includes("-") || "is" in l)) {
7886
7884
  if (f)
7887
7885
  t = t.slice(5), u = !0;
7888
7886
  else if (vt(e))
7889
7887
  return n;
7890
- t === "class" || t === "className" ? Pu(e, n) : o && !u && !d ? e[Ou(t)] = n : e[h || t] = n;
7888
+ t === "class" || t === "className" ? Cu(e, n) : o && !u && !d ? e[Uu(t)] = n : e[h || t] = n;
7891
7889
  } else {
7892
- const y = r && t.indexOf(":") > -1 && Su[t.split(":")[0]];
7893
- y ? Tu(e, y, t, n) : gs(e, vu[t] || t, n);
7890
+ const y = r && t.indexOf(":") > -1 && wu[t.split(":")[0]];
7891
+ y ? Au(e, y, t, n) : gs(e, yu[t] || t, n);
7894
7892
  }
7895
7893
  return n;
7896
7894
  }
@@ -7989,7 +7987,7 @@ function en(e, t, n, s, r) {
7989
7987
  if (u.length === 0) {
7990
7988
  if (n = Nt(e, n, s), o)
7991
7989
  return n;
7992
- } else d ? n.length === 0 ? ma(e, u, s) : xu(e, n, u) : (n && Nt(e), ma(e, u));
7990
+ } else d ? n.length === 0 ? ma(e, u, s) : Su(e, n, u) : (n && Nt(e), ma(e, u));
7993
7991
  n = u;
7994
7992
  } else if (t.nodeType) {
7995
7993
  if (i && t.parentNode)
@@ -8053,19 +8051,19 @@ function Nt(e, t, n, s) {
8053
8051
  e.insertBefore(r, n);
8054
8052
  return [r];
8055
8053
  }
8056
- function Ru() {
8054
+ function Ou() {
8057
8055
  return V.getNextContextId();
8058
8056
  }
8059
- var Bu = "http://www.w3.org/2000/svg";
8057
+ var Ru = "http://www.w3.org/2000/svg";
8060
8058
  function Gr(e, t = !1) {
8061
- return t ? document.createElementNS(Bu, e) : document.createElement(e);
8059
+ return t ? document.createElementNS(Ru, e) : document.createElement(e);
8062
8060
  }
8063
- function ah(e) {
8061
+ function sh(e) {
8064
8062
  const { useShadow: t } = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = ua();
8065
8063
  let i, l = !!V.context;
8066
8064
  return wr(
8067
8065
  () => {
8068
- l && (ua().user = l = !1), i || (i = nu(r, () => je(() => e.children)));
8066
+ l && (ua().user = l = !1), i || (i = tu(r, () => je(() => e.children)));
8069
8067
  const o = s();
8070
8068
  if (o instanceof HTMLHeadElement) {
8071
8069
  const [u, d] = Pe(!1), h = () => d(!0);
@@ -8088,20 +8086,20 @@ function ah(e) {
8088
8086
  }
8089
8087
  ), n;
8090
8088
  }
8091
- function rh(e) {
8092
- const [t, n] = mu(e, ["component"]), s = je(() => t.component);
8089
+ function ah(e) {
8090
+ const [t, n] = hu(e, ["component"]), s = je(() => t.component);
8093
8091
  return je(() => {
8094
8092
  const r = s();
8095
8093
  switch (typeof r) {
8096
8094
  case "function":
8097
8095
  return Ge(() => r(n));
8098
8096
  case "string":
8099
- const i = wu.has(r), l = V.context ? Uu() : Gr(r, i);
8100
- return Lu(l, n, i), l;
8097
+ const i = Nu.has(r), l = V.context ? Gu() : Gr(r, i);
8098
+ return ku(l, n, i), l;
8101
8099
  }
8102
8100
  });
8103
8101
  }
8104
- var Mu = class {
8102
+ var Bu = class {
8105
8103
  constructor() {
8106
8104
  this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
8107
8105
  }
@@ -8119,7 +8117,7 @@ var Mu = class {
8119
8117
  }
8120
8118
  }, Ur = class {
8121
8119
  constructor(e) {
8122
- this.generateIdentifier = e, this.kv = new Mu();
8120
+ this.generateIdentifier = e, this.kv = new Bu();
8123
8121
  }
8124
8122
  register(e, t) {
8125
8123
  this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
@@ -8133,7 +8131,7 @@ var Mu = class {
8133
8131
  getValue(e) {
8134
8132
  return this.kv.getByKey(e);
8135
8133
  }
8136
- }, Fu = class extends Ur {
8134
+ }, Mu = class extends Ur {
8137
8135
  constructor() {
8138
8136
  super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
8139
8137
  }
@@ -8144,7 +8142,7 @@ var Mu = class {
8144
8142
  return this.classToAllowedProps.get(e);
8145
8143
  }
8146
8144
  };
8147
- function ju(e) {
8145
+ function Fu(e) {
8148
8146
  if ("values" in Object)
8149
8147
  return Object.values(e);
8150
8148
  const t = [];
@@ -8152,8 +8150,8 @@ function ju(e) {
8152
8150
  e.hasOwnProperty(n) && t.push(e[n]);
8153
8151
  return t;
8154
8152
  }
8155
- function qu(e, t) {
8156
- const n = ju(e);
8153
+ function ju(e, t) {
8154
+ const n = Fu(e);
8157
8155
  if ("find" in n)
8158
8156
  return n.find(t);
8159
8157
  const s = n;
@@ -8176,7 +8174,7 @@ function fa(e, t) {
8176
8174
  return s;
8177
8175
  }
8178
8176
  }
8179
- var zu = class {
8177
+ var qu = class {
8180
8178
  constructor() {
8181
8179
  this.transfomers = {};
8182
8180
  }
@@ -8184,12 +8182,12 @@ var zu = class {
8184
8182
  this.transfomers[e.name] = e;
8185
8183
  }
8186
8184
  findApplicable(e) {
8187
- return qu(this.transfomers, (t) => t.isApplicable(e));
8185
+ return ju(this.transfomers, (t) => t.isApplicable(e));
8188
8186
  }
8189
8187
  findByName(e) {
8190
8188
  return this.transfomers[e];
8191
8189
  }
8192
- }, $u = (e) => Object.prototype.toString.call(e).slice(8, -1), Or = (e) => typeof e > "u", Ku = (e) => e === null, tn = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, vs = (e) => tn(e) && Object.keys(e).length === 0, ot = (e) => Array.isArray(e), Vu = (e) => typeof e == "string", Hu = (e) => typeof e == "number" && !isNaN(e), Wu = (e) => typeof e == "boolean", Yu = (e) => e instanceof RegExp, nn = (e) => e instanceof Map, sn = (e) => e instanceof Set, Rr = (e) => $u(e) === "Symbol", Qu = (e) => e instanceof Date && !isNaN(e.valueOf()), Xu = (e) => e instanceof Error, ga = (e) => typeof e == "number" && isNaN(e), Zu = (e) => Wu(e) || Ku(e) || Or(e) || Hu(e) || Vu(e) || Rr(e), Ju = (e) => typeof e == "bigint", ed = (e) => e === 1 / 0 || e === -1 / 0, td = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), nd = (e) => e instanceof URL, Br = (e) => e.replace(/\./g, "\\."), cs = (e) => e.map(String).map(Br).join("."), Wt = (e) => {
8190
+ }, zu = (e) => Object.prototype.toString.call(e).slice(8, -1), Or = (e) => typeof e > "u", $u = (e) => e === null, tn = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, vs = (e) => tn(e) && Object.keys(e).length === 0, ot = (e) => Array.isArray(e), Ku = (e) => typeof e == "string", Vu = (e) => typeof e == "number" && !isNaN(e), Hu = (e) => typeof e == "boolean", Wu = (e) => e instanceof RegExp, nn = (e) => e instanceof Map, sn = (e) => e instanceof Set, Rr = (e) => zu(e) === "Symbol", Yu = (e) => e instanceof Date && !isNaN(e.valueOf()), Qu = (e) => e instanceof Error, ga = (e) => typeof e == "number" && isNaN(e), Xu = (e) => Hu(e) || $u(e) || Or(e) || Vu(e) || Ku(e) || Rr(e), Zu = (e) => typeof e == "bigint", Ju = (e) => e === 1 / 0 || e === -1 / 0, ed = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), td = (e) => e instanceof URL, Br = (e) => e.replace(/\./g, "\\."), cs = (e) => e.map(String).map(Br).join("."), Wt = (e) => {
8193
8191
  const t = [];
8194
8192
  let n = "";
8195
8193
  for (let r = 0; r < e.length; r++) {
@@ -8218,9 +8216,9 @@ function Je(e, t, n, s) {
8218
8216
  var Mr = [
8219
8217
  Je(Or, "undefined", () => null, () => {
8220
8218
  }),
8221
- Je(Ju, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
8222
- Je(Qu, "Date", (e) => e.toISOString(), (e) => new Date(e)),
8223
- Je(Xu, "Error", (e, t) => {
8219
+ Je(Zu, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
8220
+ Je(Yu, "Date", (e) => e.toISOString(), (e) => new Date(e)),
8221
+ Je(Qu, "Error", (e, t) => {
8224
8222
  const n = {
8225
8223
  name: e.name,
8226
8224
  message: e.message
@@ -8234,7 +8232,7 @@ var Mr = [
8234
8232
  n[s] = e[s];
8235
8233
  }), n;
8236
8234
  }),
8237
- Je(Yu, "regexp", (e) => "" + e, (e) => {
8235
+ Je(Wu, "regexp", (e) => "" + e, (e) => {
8238
8236
  const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
8239
8237
  return new RegExp(t, n);
8240
8238
  }),
@@ -8247,9 +8245,9 @@ var Mr = [
8247
8245
  (e) => new Set(e)
8248
8246
  ),
8249
8247
  Je(nn, "map", (e) => [...e.entries()], (e) => new Map(e)),
8250
- Je((e) => ga(e) || ed(e), "number", (e) => ga(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
8248
+ Je((e) => ga(e) || Ju(e), "number", (e) => ga(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
8251
8249
  Je((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
8252
- Je(nd, "URL", (e) => e.toString(), (e) => new URL(e))
8250
+ Je(td, "URL", (e) => e.toString(), (e) => new URL(e))
8253
8251
  ];
8254
8252
  function ts(e, t, n, s) {
8255
8253
  return {
@@ -8264,7 +8262,7 @@ var Fr = ts((e, t) => Rr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
8264
8262
  if (!s)
8265
8263
  throw new Error("Trying to deserialize unknown symbol");
8266
8264
  return s;
8267
- }), sd = [
8265
+ }), nd = [
8268
8266
  Int8Array,
8269
8267
  Uint8Array,
8270
8268
  Int16Array,
@@ -8274,8 +8272,8 @@ var Fr = ts((e, t) => Rr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
8274
8272
  Float32Array,
8275
8273
  Float64Array,
8276
8274
  Uint8ClampedArray
8277
- ].reduce((e, t) => (e[t.name] = t, e), {}), jr = ts(td, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
8278
- const n = sd[t[1]];
8275
+ ].reduce((e, t) => (e[t.name] = t, e), {}), jr = ts(ed, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
8276
+ const n = nd[t[1]];
8279
8277
  if (!n)
8280
8278
  throw new Error("Trying to deserialize unknown typed array");
8281
8279
  return new n(e);
@@ -8301,8 +8299,8 @@ var zr = ts(qr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
8301
8299
  if (!s)
8302
8300
  throw new Error("Trying to deserialize unknown custom value");
8303
8301
  return s.deserialize(e);
8304
- }), ad = [zr, Fr, $r, jr], pa = (e, t) => {
8305
- const n = fa(ad, (r) => r.isApplicable(e, t));
8302
+ }), sd = [zr, Fr, $r, jr], pa = (e, t) => {
8303
+ const n = fa(sd, (r) => r.isApplicable(e, t));
8306
8304
  if (n)
8307
8305
  return {
8308
8306
  value: n.transform(e, t),
@@ -8318,7 +8316,7 @@ var zr = ts(qr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
8318
8316
  Mr.forEach((e) => {
8319
8317
  Kr[e.annotation] = e;
8320
8318
  });
8321
- var rd = (e, t, n) => {
8319
+ var ad = (e, t, n) => {
8322
8320
  if (ot(t))
8323
8321
  switch (t[0]) {
8324
8322
  case "symbol":
@@ -8352,7 +8350,7 @@ function Vr(e) {
8352
8350
  if (Bn(e, "constructor"))
8353
8351
  throw new Error("constructor is not allowed as a property");
8354
8352
  }
8355
- var id = (e, t) => {
8353
+ var rd = (e, t) => {
8356
8354
  Vr(t);
8357
8355
  for (let n = 0; n < t.length; n++) {
8358
8356
  const s = t[n];
@@ -8433,14 +8431,14 @@ function Es(e, t, n = []) {
8433
8431
  Es(i, t, [...n, ...Wt(l)]);
8434
8432
  }), t(s, n);
8435
8433
  }
8436
- function ld(e, t, n) {
8434
+ function id(e, t, n) {
8437
8435
  return Es(t, (s, r) => {
8438
- e = bs(e, r, (i) => rd(i, s, n));
8436
+ e = bs(e, r, (i) => ad(i, s, n));
8439
8437
  }), e;
8440
8438
  }
8441
- function od(e, t) {
8439
+ function ld(e, t) {
8442
8440
  function n(s, r) {
8443
- const i = id(e, Wt(r));
8441
+ const i = rd(e, Wt(r));
8444
8442
  s.map(Wt).forEach((l) => {
8445
8443
  e = bs(e, l, () => i);
8446
8444
  });
@@ -8454,12 +8452,12 @@ function od(e, t) {
8454
8452
  Mt(t, n);
8455
8453
  return e;
8456
8454
  }
8457
- var cd = (e, t) => tn(e) || ot(e) || nn(e) || sn(e) || qr(e, t);
8458
- function ud(e, t, n) {
8455
+ var od = (e, t) => tn(e) || ot(e) || nn(e) || sn(e) || qr(e, t);
8456
+ function cd(e, t, n) {
8459
8457
  const s = n.get(e);
8460
8458
  s ? s.push(t) : n.set(e, [t]);
8461
8459
  }
8462
- function dd(e, t) {
8460
+ function ud(e, t) {
8463
8461
  const n = {};
8464
8462
  let s;
8465
8463
  return e.forEach((r) => {
@@ -8471,16 +8469,16 @@ function dd(e, t) {
8471
8469
  }), s ? vs(n) ? [s] : [s, n] : vs(n) ? void 0 : n;
8472
8470
  }
8473
8471
  var Hr = (e, t, n, s, r = [], i = [], l = /* @__PURE__ */ new Map()) => {
8474
- const o = Zu(e);
8472
+ const o = Xu(e);
8475
8473
  if (!o) {
8476
- ud(e, r, t);
8474
+ cd(e, r, t);
8477
8475
  const p = l.get(e);
8478
8476
  if (p)
8479
8477
  return s ? {
8480
8478
  transformedValue: null
8481
8479
  } : p;
8482
8480
  }
8483
- if (!cd(e, n)) {
8481
+ if (!od(e, n)) {
8484
8482
  const p = pa(e, n), g = p ? {
8485
8483
  transformedValue: p.value,
8486
8484
  annotations: [p.type]
@@ -8497,9 +8495,9 @@ var Hr = (e, t, n, s, r = [], i = [], l = /* @__PURE__ */ new Map()) => {
8497
8495
  Mt(d, (p, g) => {
8498
8496
  if (g === "__proto__" || g === "constructor" || g === "prototype")
8499
8497
  throw new Error(`Detected property ${g}. This is a prototype pollution risk, please remove it from your object.`);
8500
- const N = Hr(p, t, n, s, [...r, g], [...i, e], l);
8501
- h[g] = N.transformedValue, ot(N.annotations) ? f[g] = N.annotations : tn(N.annotations) && Mt(N.annotations, (E, I) => {
8502
- f[Br(g) + "." + I] = E;
8498
+ const w = Hr(p, t, n, s, [...r, g], [...i, e], l);
8499
+ h[g] = w.transformedValue, ot(w.annotations) ? f[g] = w.annotations : tn(w.annotations) && Mt(w.annotations, (E, D) => {
8500
+ f[Br(g) + "." + D] = E;
8503
8501
  });
8504
8502
  });
8505
8503
  const y = vs(f) ? {
@@ -8517,13 +8515,13 @@ function Wr(e) {
8517
8515
  function ya(e) {
8518
8516
  return Wr(e) === "Array";
8519
8517
  }
8520
- function hd(e) {
8518
+ function dd(e) {
8521
8519
  if (Wr(e) !== "Object")
8522
8520
  return !1;
8523
8521
  const t = Object.getPrototypeOf(e);
8524
8522
  return !!t && t.constructor === Object && t === Object.prototype;
8525
8523
  }
8526
- function md(e, t, n, s, r) {
8524
+ function hd(e, t, n, s, r) {
8527
8525
  const i = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
8528
8526
  i === "enumerable" && (e[t] = n), r && i === "nonenumerable" && Object.defineProperty(e, t, {
8529
8527
  value: n,
@@ -8535,14 +8533,14 @@ function md(e, t, n, s, r) {
8535
8533
  function Ns(e, t = {}) {
8536
8534
  if (ya(e))
8537
8535
  return e.map((r) => Ns(r, t));
8538
- if (!hd(e))
8536
+ if (!dd(e))
8539
8537
  return e;
8540
8538
  const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
8541
8539
  return [...n, ...s].reduce((r, i) => {
8542
8540
  if (ya(t.props) && !t.props.includes(i))
8543
8541
  return r;
8544
8542
  const l = e[i], o = Ns(l, t);
8545
- return md(r, i, o, e, t.nonenumerable), r;
8543
+ return hd(r, i, o, e, t.nonenumerable), r;
8546
8544
  }, {});
8547
8545
  }
8548
8546
  var me = class {
@@ -8550,7 +8548,7 @@ var me = class {
8550
8548
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
8551
8549
  */
8552
8550
  constructor({ dedupe: e = !1 } = {}) {
8553
- this.classRegistry = new Fu(), this.symbolRegistry = new Ur((t) => t.description ?? ""), this.customTransformerRegistry = new zu(), this.allowedErrorProps = [], this.dedupe = e;
8551
+ this.classRegistry = new Mu(), this.symbolRegistry = new Ur((t) => t.description ?? ""), this.customTransformerRegistry = new qu(), this.allowedErrorProps = [], this.dedupe = e;
8554
8552
  }
8555
8553
  serialize(e) {
8556
8554
  const t = /* @__PURE__ */ new Map(), n = Hr(e, t, this, this.dedupe), s = {
@@ -8560,7 +8558,7 @@ var me = class {
8560
8558
  ...s.meta,
8561
8559
  values: n.annotations
8562
8560
  });
8563
- const r = dd(t, this.dedupe);
8561
+ const r = ud(t, this.dedupe);
8564
8562
  return r && (s.meta = {
8565
8563
  ...s.meta,
8566
8564
  referentialEqualities: r
@@ -8569,7 +8567,7 @@ var me = class {
8569
8567
  deserialize(e) {
8570
8568
  const { json: t, meta: n } = e;
8571
8569
  let s = Ns(t);
8572
- return n != null && n.values && (s = ld(s, n.values, this)), n != null && n.referentialEqualities && (s = od(s, n.referentialEqualities)), s;
8570
+ return n != null && n.values && (s = id(s, n.values, this)), n != null && n.referentialEqualities && (s = ld(s, n.referentialEqualities)), s;
8573
8571
  }
8574
8572
  stringify(e) {
8575
8573
  return JSON.stringify(this.serialize(e));
@@ -8602,44 +8600,44 @@ me.registerClass = me.defaultInstance.registerClass.bind(me.defaultInstance);
8602
8600
  me.registerSymbol = me.defaultInstance.registerSymbol.bind(me.defaultInstance);
8603
8601
  me.registerCustom = me.defaultInstance.registerCustom.bind(me.defaultInstance);
8604
8602
  me.allowErrorProps = me.defaultInstance.allowErrorProps.bind(me.defaultInstance);
8605
- var fd = me.serialize, ih = me.stringify;
8606
- function lh(e) {
8603
+ var md = me.serialize, rh = me.stringify;
8604
+ function ih(e) {
8607
8605
  return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
8608
8606
  }
8609
- function oh(e, t) {
8607
+ function lh(e, t) {
8610
8608
  return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
8611
8609
  }
8612
- function ch({
8610
+ function oh({
8613
8611
  queryState: e,
8614
8612
  observerCount: t,
8615
8613
  isStale: n
8616
8614
  }) {
8617
8615
  return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
8618
8616
  }
8619
- function uh({
8617
+ function ch({
8620
8618
  status: e,
8621
8619
  isPaused: t
8622
8620
  }) {
8623
8621
  return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
8624
8622
  }
8625
- function dh(e) {
8623
+ function uh(e) {
8626
8624
  return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
8627
8625
  }
8628
- var hh = (e, t = !1) => {
8626
+ var dh = (e, t = !1) => {
8629
8627
  const {
8630
8628
  json: n
8631
- } = fd(e);
8629
+ } = md(e);
8632
8630
  return JSON.stringify(n, null, t ? 2 : void 0);
8633
- }, Ln = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, gd = (e, t) => e.queryHash.localeCompare(t.queryHash), Yr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, pd = (e, t) => Ln(e) === Ln(t) ? Yr(e, t) : Ln(e) > Ln(t) ? 1 : -1, mh = {
8634
- status: pd,
8635
- "query hash": gd,
8631
+ }, Ln = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, fd = (e, t) => e.queryHash.localeCompare(t.queryHash), Yr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, gd = (e, t) => Ln(e) === Ln(t) ? Yr(e, t) : Ln(e) > Ln(t) ? 1 : -1, hh = {
8632
+ status: gd,
8633
+ "query hash": fd,
8636
8634
  "last updated": Yr
8637
- }, Dn = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Qr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, yd = (e, t) => Dn(e) === Dn(t) ? Qr(e, t) : Dn(e) > Dn(t) ? 1 : -1, fh = {
8638
- status: yd,
8635
+ }, Dn = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Qr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, pd = (e, t) => Dn(e) === Dn(t) ? Qr(e, t) : Dn(e) > Dn(t) ? 1 : -1, mh = {
8636
+ status: pd,
8639
8637
  "last updated": Qr
8640
- }, gh = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), ph = () => {
8638
+ }, fh = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), gh = () => {
8641
8639
  const [e, t] = Pe("dark");
8642
- return tu(() => {
8640
+ return eu(() => {
8643
8641
  const n = window.matchMedia("(prefers-color-scheme: dark)");
8644
8642
  t(n.matches ? "dark" : "light");
8645
8643
  const s = (r) => {
@@ -8712,7 +8710,7 @@ var hh = (e, t = !1) => {
8712
8710
  return;
8713
8711
  const s = document.createElement("style"), r = document.createTextNode("");
8714
8712
  s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
8715
- }, xt, an, rn, ln, dt, on, At, Tt, Ct, Pt, _t, It, cn, va, vd = (va = class {
8713
+ }, xt, an, rn, ln, dt, on, At, Tt, Ct, Pt, _t, It, cn, va, yd = (va = class {
8716
8714
  constructor(e) {
8717
8715
  de(this, xt);
8718
8716
  de(this, an);
@@ -8762,7 +8760,7 @@ var hh = (e, t = !1) => {
8762
8760
  const t = Lr(() => {
8763
8761
  const n = this, [s] = q(this, Tt), [r] = q(this, Ct), [i] = q(this, Pt), [l] = q(this, _t), [o] = q(this, xt);
8764
8762
  let u;
8765
- return q(this, It) ? u = q(this, It) : (u = Ir(() => import("./HO4MOOFI-CTW4q_go.js")), oe(this, It, u)), Xr(q(this, on), q(this, At)), Pr(u, _r({
8763
+ return q(this, It) ? u = q(this, It) : (u = Ir(() => import("./HO4MOOFI-Dkp41hiS.js")), oe(this, It, u)), Xr(q(this, on), q(this, At)), Pr(u, _r({
8766
8764
  get queryFlavor() {
8767
8765
  return q(n, rn);
8768
8766
  },
@@ -8801,7 +8799,7 @@ var hh = (e, t = !1) => {
8801
8799
  throw new Error("Devtools is not mounted");
8802
8800
  (e = q(this, cn)) == null || e.call(this), oe(this, dt, !1);
8803
8801
  }
8804
- }, xt = new WeakMap(), an = new WeakMap(), rn = new WeakMap(), ln = new WeakMap(), dt = new WeakMap(), on = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Pt = new WeakMap(), _t = new WeakMap(), It = new WeakMap(), cn = new WeakMap(), va), kt, un, dn, hn, ht, mn, Lt, Dt, Gt, Ut, Ot, Rt, Bt, fn, ba, bd = (ba = class {
8802
+ }, xt = new WeakMap(), an = new WeakMap(), rn = new WeakMap(), ln = new WeakMap(), dt = new WeakMap(), on = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Pt = new WeakMap(), _t = new WeakMap(), It = new WeakMap(), cn = new WeakMap(), va), kt, un, dn, hn, ht, mn, Lt, Dt, Gt, Ut, Ot, Rt, Bt, fn, ba, vd = (ba = class {
8805
8803
  constructor(e) {
8806
8804
  de(this, kt);
8807
8805
  de(this, un);
@@ -8856,7 +8854,7 @@ var hh = (e, t = !1) => {
8856
8854
  const t = Lr(() => {
8857
8855
  const n = this, [s] = q(this, Dt), [r] = q(this, Gt), [i] = q(this, Ut), [l] = q(this, Ot), [o] = q(this, kt), [u] = q(this, Rt);
8858
8856
  let d;
8859
- return q(this, Bt) ? d = q(this, Bt) : (d = Ir(() => import("./HUY7CZI3-Bic9WgW9.js")), oe(this, Bt, d)), Xr(q(this, mn), q(this, Lt)), Pr(d, _r({
8857
+ return q(this, Bt) ? d = q(this, Bt) : (d = Ir(() => import("./HUY7CZI3-B1Gm93uu.js")), oe(this, Bt, d)), Xr(q(this, mn), q(this, Lt)), Pr(d, _r({
8860
8858
  get queryFlavor() {
8861
8859
  return q(n, dn);
8862
8860
  },
@@ -8899,7 +8897,7 @@ var hh = (e, t = !1) => {
8899
8897
  (e = q(this, fn)) == null || e.call(this), oe(this, ht, !1);
8900
8898
  }
8901
8899
  }, kt = new WeakMap(), un = new WeakMap(), dn = new WeakMap(), hn = new WeakMap(), ht = new WeakMap(), mn = new WeakMap(), Lt = new WeakMap(), Dt = new WeakMap(), Gt = new WeakMap(), Ut = new WeakMap(), Ot = new WeakMap(), Rt = new WeakMap(), Bt = new WeakMap(), fn = new WeakMap(), ba);
8902
- function Ed(e) {
8900
+ function bd(e) {
8903
8901
  const t = Se(e.client), n = Ne.useRef(null), {
8904
8902
  buttonPosition: s,
8905
8903
  position: r,
@@ -8908,7 +8906,7 @@ function Ed(e) {
8908
8906
  styleNonce: o,
8909
8907
  shadowDOMTarget: u
8910
8908
  } = e, [d] = Ne.useState(
8911
- new vd({
8909
+ new yd({
8912
8910
  client: t,
8913
8911
  queryFlavor: "React Query",
8914
8912
  version: "5",
@@ -8935,9 +8933,9 @@ function Ed(e) {
8935
8933
  d.unmount();
8936
8934
  }), [d]), /* @__PURE__ */ a("div", { className: "tsqd-parent-container", ref: n });
8937
8935
  }
8938
- function Nd(e) {
8936
+ function Ed(e) {
8939
8937
  const t = Se(e.client), n = Ne.useRef(null), { errorTypes: s, styleNonce: r, shadowDOMTarget: i } = e, [l] = Ne.useState(
8940
- new bd({
8938
+ new vd({
8941
8939
  client: t,
8942
8940
  queryFlavor: "React Query",
8943
8941
  version: "5",
@@ -8969,18 +8967,18 @@ function Nd(e) {
8969
8967
  }
8970
8968
  );
8971
8969
  }
8972
- var wd = process.env.NODE_ENV !== "development" ? function() {
8970
+ var Nd = process.env.NODE_ENV !== "development" ? function() {
8973
8971
  return null;
8974
- } : Ed;
8972
+ } : bd;
8975
8973
  process.env.NODE_ENV;
8976
- const Sd = () => {
8974
+ const wd = () => {
8977
8975
  const e = se(), t = z();
8978
8976
  return _e({
8979
8977
  queryKey: [j, P.GET_COLLECTIONS],
8980
8978
  initialData: [],
8981
8979
  queryFn: async () => t(e, { action: P.GET_COLLECTIONS })
8982
8980
  });
8983
- }, xd = () => {
8981
+ }, Sd = () => {
8984
8982
  const { data: e } = Ve(), { data: t } = yt(), n = se(), s = z(), r = ne(
8985
8983
  () => (t == null ? void 0 : t.fallbackLang) || "en",
8986
8984
  [t == null ? void 0 : t.fallbackLang]
@@ -8995,26 +8993,26 @@ const Sd = () => {
8995
8993
  }
8996
8994
  })
8997
8995
  });
8998
- }, Ad = bi(
8999
- () => Promise.resolve().then(() => Fc)
8996
+ }, xd = bi(
8997
+ () => Promise.resolve().then(() => Mc)
9000
8998
  );
9001
- Ol();
9002
- ki(yc);
9003
- Yc();
9004
- Li(Ad);
9005
- Di(ho);
9006
- const Td = (e) => {
8999
+ Ul();
9000
+ Ii(pc);
9001
+ Wc();
9002
+ ki(xd);
9003
+ Li(uo);
9004
+ const Ad = (e) => {
9007
9005
  const t = lt([]), [n] = Me(), s = n.get("page"), { data: r } = Ve(), {
9008
9006
  data: i = {
9009
9007
  role: "",
9010
9008
  permissions: null
9011
9009
  }
9012
- } = wc();
9013
- Nc();
9014
- const { data: l, isFetching: o } = rr(), { blocks: u } = Ec(l), { data: d } = Re(), { mutateAsync: h } = er(), f = vc(), { onSave: y } = Sc(), { getPartialBlocks: p, getPartialBlockBlocks: g } = xc(), { aiContext: N, setAiContext: E } = Ms(), { mutateAsync: I } = go(), [w, k] = A(!1), { data: b } = yt(), D = ar(), { data: M } = ir(), { data: J } = Sd(), { mutateAsync: B } = xd();
9015
- Wl(), Ee(() => {
9010
+ } = Nc();
9011
+ Ec();
9012
+ const { data: l, isFetching: o } = rr(), { blocks: u } = bc(l), { data: d } = Re(), { mutateAsync: h } = er(), f = yc(), { onSave: y } = wc(), { getPartialBlocks: p, getPartialBlockBlocks: g } = Sc(), { aiContext: w, setAiContext: E } = Ms(), { mutateAsync: D } = fo(), [N, I] = A(!1), { data: b } = yt(), L = ar(), { data: M } = ir(), { data: J } = wd(), { mutateAsync: B } = Sd();
9013
+ Hl(), Ee(() => {
9016
9014
  const R = () => {
9017
- document.hidden ? k(!0) : k(!1);
9015
+ document.hidden ? I(!0) : I(!1);
9018
9016
  };
9019
9017
  return window.addEventListener("visibilitychange", R), () => window.removeEventListener("visibilitychange", R);
9020
9018
  }, []), t.current = u;
@@ -9022,8 +9020,8 @@ const Td = (e) => {
9022
9020
  const R = {};
9023
9021
  return i && (R.permissions = Z(i, "permissions", null), R.role = Z(i, "role", "user")), R;
9024
9022
  }, [i]), U = be(
9025
- async (R, Ie) => await I({ pageType: R, query: Ie }),
9026
- [I]
9023
+ async (R, Ie) => await D({ pageType: R, query: Ie }),
9024
+ [D]
9027
9025
  ), Y = ne(
9028
9026
  () => Z(b, "theme", {}) || {},
9029
9027
  [b]
@@ -9031,7 +9029,7 @@ const Td = (e) => {
9031
9029
  return /* @__PURE__ */ c(pe, { children: [
9032
9030
  o && /* @__PURE__ */ a("div", { className: "absolute inset-0 z-50 flex items-center justify-center w-screen h-screen bg-white/30", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-center bg-white rounded-full size-10", children: /* @__PURE__ */ a(Qa, { className: "size-5 animate-spin" }) }) }),
9033
9031
  /* @__PURE__ */ a(
9034
- Gi,
9032
+ Di,
9035
9033
  {
9036
9034
  collections: J ?? [],
9037
9035
  getBlockAsyncProps: B,
@@ -9039,13 +9037,13 @@ const Td = (e) => {
9039
9037
  themePresets: e.themePresets ?? [],
9040
9038
  pageId: r == null ? void 0 : r.id,
9041
9039
  loading: o,
9042
- fallbackLang: D,
9040
+ fallbackLang: L,
9043
9041
  languages: (b == null ? void 0 : b.languages) || [],
9044
9042
  brandingOptions: (b == null ? void 0 : b.theme) || {},
9045
9043
  translations: e.translations || {},
9046
9044
  locale: e.locale || "en",
9047
9045
  htmlDir: e.htmlDir || "ltr",
9048
- autoSaveSupport: !w && (e.autoSaveSupport ?? !0),
9046
+ autoSaveSupport: !N && (e.autoSaveSupport ?? !0),
9049
9047
  autoSaveInterval: e.autoSaveInterval ?? 15,
9050
9048
  onError: e.onError || console.error,
9051
9049
  getPartialBlockBlocks: g,
@@ -9062,34 +9060,34 @@ const Td = (e) => {
9062
9060
  }, _ = [...Ie, K];
9063
9061
  return await y({ page: s, blocks: _ }), E(R), !0;
9064
9062
  },
9065
- aiContext: N,
9063
+ aiContext: w,
9066
9064
  askAiCallBack: f,
9067
9065
  onSave: async ({ blocks: R, theme: Ie }) => {
9068
9066
  if (!s) return !0;
9069
9067
  t.current = R;
9070
9068
  const K = {
9071
9069
  _type: "@chai/ai-context",
9072
- _value: Xs(N) ? N : ""
9070
+ _value: Xs(w) ? w : ""
9073
9071
  }, _ = [...R, K];
9074
9072
  return await y({ page: s, blocks: _ }), t.current = _, ws(Ie, Y) || await h({ settings: { theme: Ie } }), !0;
9075
9073
  },
9076
- themePanelComponent: xo,
9074
+ themePanelComponent: So,
9077
9075
  ...$
9078
9076
  }
9079
9077
  ),
9080
9078
  /* @__PURE__ */ c("div", { children: [
9081
- /* @__PURE__ */ a(eo, {}),
9082
- /* @__PURE__ */ a(to, {})
9079
+ /* @__PURE__ */ a(Jl, {}),
9080
+ /* @__PURE__ */ a(eo, {})
9083
9081
  ] })
9084
9082
  ] });
9085
- }, Cd = new Ei({
9083
+ }, Td = new Ei({
9086
9084
  defaultOptions: {
9087
9085
  queries: {
9088
9086
  refetchOnWindowFocus: !1,
9089
9087
  refetchOnReconnect: !1
9090
9088
  }
9091
9089
  }
9092
- }), yh = (e) => {
9090
+ }), ph = (e) => {
9093
9091
  const { isLoggedIn: t } = ut(), [, n] = tr(), [s, r] = A(!1);
9094
9092
  return Ee(() => (n(
9095
9093
  Vn(e, [
@@ -9105,12 +9103,12 @@ const Td = (e) => {
9105
9103
  r(!0);
9106
9104
  }, 200), () => {
9107
9105
  r(!1), n({});
9108
- }), [e, n]), s ? /* @__PURE__ */ c(Ni, { client: Cd, children: [
9109
- t ? /* @__PURE__ */ a(Td, { ...e }) : /* @__PURE__ */ a(Cc, {}),
9110
- /* @__PURE__ */ a(wd, {})
9106
+ }), [e, n]), s ? /* @__PURE__ */ c(Ni, { client: Td, children: [
9107
+ t ? /* @__PURE__ */ a(Ad, { ...e }) : /* @__PURE__ */ a(Tc, {}),
9108
+ /* @__PURE__ */ a(Nd, {})
9111
9109
  ] }) : /* @__PURE__ */ a("div", {});
9112
- }, vh = () => {
9113
- const e = se(), t = z(), { data: n } = Ql(), s = Se();
9110
+ }, yh = () => {
9111
+ const e = se(), t = z(), { data: n } = Yl(), s = Se();
9114
9112
  return xe({
9115
9113
  mutationFn: async (r) => {
9116
9114
  if (!(n != null && n.id))
@@ -9134,7 +9132,7 @@ const Td = (e) => {
9134
9132
  console.error("Failed to update metadata");
9135
9133
  }
9136
9134
  });
9137
- }, bh = () => {
9135
+ }, vh = () => {
9138
9136
  const { user: e, logout: t } = ut(), n = e == null ? void 0 : e.accessToken;
9139
9137
  return be(
9140
9138
  async ({
@@ -9173,68 +9171,68 @@ if (typeof window > "u")
9173
9171
  throw new Error("@chaibuilder/pages is not available on the server");
9174
9172
  export {
9175
9173
  br as $,
9176
- hh as A,
9177
- $d as B,
9178
- sh as C,
9179
- rh as D,
9174
+ dh as A,
9175
+ zd as B,
9176
+ nh as C,
9177
+ ah as D,
9180
9178
  Ge as E,
9181
- Xd as F,
9182
- Zc as G,
9183
- fd as H,
9184
- Zd as I,
9179
+ Qd as F,
9180
+ Xc as G,
9181
+ md as H,
9182
+ Xd as I,
9185
9183
  Gn as J,
9186
- gh as K,
9187
- oh as L,
9188
- lh as M,
9184
+ fh as K,
9185
+ lh as L,
9186
+ ih as M,
9189
9187
  mt as N,
9190
- _u as O,
9191
- ah as P,
9192
- ih as Q,
9193
- th as R,
9194
- Jd as S,
9195
- eh as T,
9188
+ Pu as O,
9189
+ sh as P,
9190
+ rh as Q,
9191
+ eh as R,
9192
+ Zd as S,
9193
+ Jd as T,
9196
9194
  Un as U,
9197
- Hd as V,
9198
- yh as W,
9199
- Ql as X,
9195
+ Vd as V,
9196
+ ph as W,
9197
+ Yl as X,
9200
9198
  ar as Y,
9201
- vh as Z,
9199
+ yh as Z,
9202
9200
  He as _,
9203
9201
  Pr as a,
9204
- jc as a0,
9205
- zd as a1,
9202
+ Fc as a0,
9203
+ qd as a1,
9206
9204
  Ve as a2,
9207
9205
  jt as a3,
9208
9206
  Zn as a4,
9209
9207
  yt as a5,
9210
9208
  ut as a6,
9211
- wc as a7,
9212
- bh as a8,
9209
+ Nc as a7,
9210
+ vh as a8,
9213
9211
  z as a9,
9214
9212
  qt as aa,
9215
9213
  Pe as b,
9216
9214
  je as c,
9217
- Au as d,
9215
+ xu as d,
9218
9216
  wr as e,
9219
9217
  _r as f,
9220
- ph as g,
9221
- mu as h,
9222
- Wd as i,
9218
+ gh as g,
9219
+ hu as h,
9220
+ Hd as i,
9223
9221
  ft as j,
9224
9222
  gs as k,
9225
- Qd as l,
9226
- fh as m,
9223
+ Yd as l,
9224
+ mh as m,
9227
9225
  Zt as n,
9228
- Kd as o,
9229
- tu as p,
9230
- Du as q,
9226
+ $d as o,
9227
+ eu as p,
9228
+ Lu as q,
9231
9229
  ps as r,
9232
- mh as s,
9233
- nh as t,
9234
- Yd as u,
9235
- Pu as v,
9236
- ch as w,
9237
- uh as x,
9238
- Lu as y,
9239
- dh as z
9230
+ hh as s,
9231
+ th as t,
9232
+ Wd as u,
9233
+ Cu as v,
9234
+ oh as w,
9235
+ ch as x,
9236
+ ku as y,
9237
+ uh as z
9240
9238
  };