@chaibuilder/pages 0.5.7 → 0.5.8

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.
@@ -2,17 +2,17 @@ var Zs = (e) => {
2
2
  throw TypeError(e);
3
3
  };
4
4
  var Js = (e, t, n) => t.has(e) || Zs("Cannot " + n);
5
- var $ = (e, t, n) => (Js(e, t, "read from private field"), n ? n.call(e) : t.get(e)), he = (e, t, n) => t.has(e) ? Zs("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), de = (e, t, n, a) => (Js(e, t, "write to private field"), a ? a.call(e, n) : t.set(e, n), n);
5
+ var $ = (e, t, n) => (Js(e, t, "read from private field"), n ? n.call(e) : t.get(e)), me = (e, t, n) => t.has(e) ? Zs("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), ue = (e, t, n, a) => (Js(e, t, "write to private field"), a ? a.call(e, n) : t.set(e, n), n);
6
6
  import { jsx as s, jsxs as c, Fragment as ve } from "react/jsx-runtime";
7
- import { get as ee, isEmpty as ue, reverse as ai, sortBy as ri, each as ii, find as Se, set as li, has as nt, startsWith as Xt, isEqual as xs, map as We, toLower as Yt, trim as oi, filter as _e, startCase as en, groupBy as ci, initial as di, compact as Bn, includes as tn, endsWith as Sa, orderBy as Pn, first as xa, concat as ui, uniq as hi, debounce as mi, pick as Wn, keys as fi, pickBy as gi, isArray as pi, merge as yi, noop as vi, isFunction as bi, cloneDeep as Ei, isString as ea } from "lodash-es";
8
- import * as we from "react";
9
- import Yn, { useCallback as ye, useState as A, useEffect as Ne, useRef as ut, useMemo as ie, Suspense as Aa, lazy as Ni } from "react";
10
- import { useAtom as En, atom as Qn } from "jotai";
7
+ import { get as ee, isEmpty as he, reverse as ai, sortBy as ri, each as ii, find as be, set as li, has as nt, startsWith as Zt, isEqual as xs, map as We, toLower as Qt, trim as oi, filter as _e, startCase as tn, groupBy as ci, initial as di, compact as Bn, includes as nn, endsWith as Sa, orderBy as Pn, first as xa, concat as ui, uniq as hi, debounce as mi, pick as Wn, keys as fi, pickBy as gi, isArray as pi, merge as yi, noop as vi, isFunction as bi, cloneDeep as Ei, isString as ea } from "lodash-es";
8
+ import * as Se from "react";
9
+ import Yn, { useCallback as ye, useState as A, useEffect as we, useRef as ht, useMemo as ie, Suspense as Aa, lazy as Ni } from "react";
10
+ import { useAtom as Nn, atom as Qn } from "jotai";
11
11
  import { useQueryClient as xe, useMutation as Ae, useQuery as ke, onlineManager as Ta, QueryClient as wi, QueryClientProvider as Si } from "@tanstack/react-query";
12
12
  import { toast as j, Toaster as xi } from "sonner";
13
- import { useLanguages as lt, useUpdateBlocksPropsRealtime as Ca, PERMISSIONS as Ai, usePartailBlocksStore as Ti, usePermissions as Vt, useLibraryBlocks as Ci, useTheme as Pi, useSidebarActivePanel as Pa, useSavePage as As, mergeClasses as Ts, useRightPanel as _i, registerChaiLibrary as Ii, getBlocksFromHTML as ki, useBuilderProp as Li, useTranslation as Di, registerChaiSidebarPanel as rs, registerChaiTopBar as Gi, registerChaiMediaManager as Ui, registerChaiSaveToLibrary as Oi, ChaiBuilderEditor as Ri } from "@chaibuilder/sdk";
14
- import { Card as Cs, CardHeader as Ps, CardTitle as _s, CardContent as Is, CardFooter as ks, Button as T, AlertDialog as _a, AlertDialogTrigger as Ia, AlertDialogContent as ka, AlertDialogHeader as La, AlertDialogTitle as Da, AlertDialogDescription as Ga, AlertDialogFooter as Ua, AlertDialogCancel as Oa, AlertDialogAction as Ra, Popover as Ba, PopoverTrigger as Ma, PopoverContent as Fa, Input as Ce, Label as re, Dialog as qe, DialogContent as ze, DialogHeader as $e, DialogTitle as Ve, DialogDescription as Ye, Alert as Ls, DialogFooter as tt, DropdownMenu as Nn, DropdownMenuTrigger as wn, DropdownMenuContent as Sn, DropdownMenuItem as Be, Textarea as Ct, Tooltip as st, TooltipTrigger as at, TooltipContent as rt, Select as Bi, SelectTrigger as Mi, SelectValue as Fi, SelectContent as ji, SelectItem as is, Badge as ls, Sheet as ja, SheetContent as qa, SheetHeader as za, SheetTitle as $a, SheetDescription as qi, Separator as zi, TooltipProvider as gt, SheetTrigger as $i, ScrollArea as Vi, Skeleton as _n, DropdownMenuSeparator as Ki, CardDescription as Hi, Command as Wi, CommandInput as Yi, CommandList as Qi, CommandEmpty as Xi, CommandGroup as Zi, CommandItem as ta, Switch as Ji, AlertDescription as el, Accordion as tl, AccordionItem as In, AccordionTrigger as kn, AccordionContent as Ln, HoverCard as nl, HoverCardTrigger as sl, HoverCardContent as al } from "@chaibuilder/sdk/ui";
15
- import { LockIcon as Ds, UserIcon as rl, AlertTriangleIcon as il, Trash2 as Xn, Plus as Gs, ImageIcon as nn, X as Us, AlertCircle as Zn, StarIcon as ll, MoreHorizontal as Os, PencilIcon as ol, Power as Va, TrashIcon as cl, Tag as dl, File as xn, Search as Ka, StarsIcon as ul, Globe as hl, CopyPlusIcon as ml, Pencil as Ha, Trash as Rs, SquareLibrary as na, Logs as fl, Loader as Et, Languages as gl, ChevronDown as Wa, Star as pl, History as sa, ArrowUpRight as yl, Clock as vl, Undo2 as Ya, CloudOff as bl, Edit as Qa, Save as Xa, GlobeIcon as El, Eye as Za, Palette as Nl, CheckCircle as wl, Send as aa, Rocket as ra, Settings as Sl, ExternalLink as xl, EyeOff as Al, Loader2 as Bs, LanguagesIcon as Tl, DatabaseIcon as Cl, ChevronLeft as Ja, ChevronRight as Pl, Copy as er, Link as _l, Archive as Il, Film as kl, Check as Ll, Upload as Dl, AlertTriangle as Gl, Sparkle as Ul, User as Ol } from "lucide-react";
13
+ import { useLanguages as lt, useUpdateBlocksPropsRealtime as Ca, PERMISSIONS as Ai, usePartailBlocksStore as Ti, usePermissions as Kt, useLibraryBlocks as Ci, useTheme as Pi, useSidebarActivePanel as Pa, useSavePage as As, mergeClasses as Ts, useRightPanel as _i, registerChaiLibrary as Ii, getBlocksFromHTML as ki, useBuilderProp as Li, useTranslation as Di, registerChaiSidebarPanel as rs, registerChaiTopBar as Gi, registerChaiMediaManager as Ui, registerChaiSaveToLibrary as Oi, ChaiBuilderEditor as Ri } from "@chaibuilder/sdk";
14
+ import { Card as Cs, CardHeader as Ps, CardTitle as _s, CardContent as Is, CardFooter as ks, Button as T, AlertDialog as _a, AlertDialogTrigger as Ia, AlertDialogContent as ka, AlertDialogHeader as La, AlertDialogTitle as Da, AlertDialogDescription as Ga, AlertDialogFooter as Ua, AlertDialogCancel as Oa, AlertDialogAction as Ra, Popover as Ba, PopoverTrigger as Ma, PopoverContent as Fa, Input as Ce, Label as re, Dialog as qe, DialogContent as ze, DialogHeader as $e, DialogTitle as Ve, DialogDescription as Ye, Alert as Ls, DialogFooter as tt, DropdownMenu as wn, DropdownMenuTrigger as Sn, DropdownMenuContent as xn, DropdownMenuItem as Be, Textarea as Pt, Tooltip as st, TooltipTrigger as at, TooltipContent as rt, Select as Bi, SelectTrigger as Mi, SelectValue as Fi, SelectContent as ji, SelectItem as is, Badge as ls, Sheet as ja, SheetContent as qa, SheetHeader as za, SheetTitle as $a, SheetDescription as qi, Separator as zi, TooltipProvider as yt, SheetTrigger as $i, ScrollArea as Vi, Skeleton as _n, DropdownMenuSeparator as Ki, CardDescription as Hi, Command as Wi, CommandInput as Yi, CommandList as Qi, CommandEmpty as Xi, CommandGroup as Zi, CommandItem as ta, Switch as Ji, AlertDescription as el, Accordion as tl, AccordionItem as In, AccordionTrigger as kn, AccordionContent as Ln, HoverCard as nl, HoverCardTrigger as sl, HoverCardContent as al } from "@chaibuilder/sdk/ui";
15
+ import { LockIcon as Ds, UserIcon as rl, AlertTriangleIcon as il, Trash2 as Xn, Plus as Gs, ImageIcon as sn, X as Us, AlertCircle as Zn, StarIcon as ll, MoreHorizontal as Os, PencilIcon as ol, Power as Va, TrashIcon as cl, Tag as dl, File as An, Search as Ka, StarsIcon as ul, Globe as hl, CopyPlusIcon as ml, Pencil as Ha, Trash as Rs, SquareLibrary as na, Logs as fl, Loader as wt, Languages as gl, ChevronDown as Wa, Star as pl, History as sa, ArrowUpRight as yl, Clock as vl, Undo2 as Ya, CloudOff as bl, Edit as Qa, Save as Xa, GlobeIcon as El, Eye as Za, Palette as Nl, CheckCircle as wl, Send as aa, Rocket as ra, Settings as Sl, ExternalLink as xl, EyeOff as Al, Loader2 as Bs, LanguagesIcon as Tl, DatabaseIcon as Cl, ChevronLeft as Ja, ChevronRight as Pl, Copy as er, Link as _l, Archive as Il, Film as kl, Check as Ll, Upload as Dl, AlertTriangle as Gl, Sparkle as Ul, User as Ol } from "lucide-react";
16
16
  import { format as Jn, formatDistanceToNow as Rl } from "date-fns";
17
17
  import { useRegisteredChaiBlocks as Bl, getDefaultBlockProps as Ml } from "@chaibuilder/runtime";
18
18
  import { z as Mn } from "zod";
@@ -364,8 +364,8 @@ localStorage.removeItem("__chai__user");
364
364
  const tr = "__logged_in_user", Ql = Yl(
365
365
  tr,
366
366
  null
367
- ), mt = () => {
368
- const [e, t] = En(Ql), n = ye(() => {
367
+ ), ft = () => {
368
+ const [e, t] = Nn(Ql), n = ye(() => {
369
369
  t(null), localStorage.removeItem(tr);
370
370
  }, [t]);
371
371
  return {
@@ -392,7 +392,7 @@ if (import.meta.vitest) {
392
392
  });
393
393
  }
394
394
  const V = () => {
395
- const { user: e, logout: t } = mt(), n = xe(), a = e == null ? void 0 : e.accessToken;
395
+ const { user: e, logout: t } = ft(), n = xe(), a = e == null ? void 0 : e.accessToken;
396
396
  return ye(
397
397
  async (r, i, l = {}) => {
398
398
  if (!a)
@@ -472,7 +472,7 @@ function Me() {
472
472
  const [e, t] = A(
473
473
  new URLSearchParams(window.location.search)
474
474
  );
475
- return Ne(() => {
475
+ return we(() => {
476
476
  const n = () => {
477
477
  t(new URLSearchParams(window.location.search));
478
478
  };
@@ -481,10 +481,10 @@ function Me() {
481
481
  };
482
482
  }, []), [e, t];
483
483
  }
484
- const Zl = Qn({}), ar = () => En(Zl), Jl = () => {
485
- const [e] = Me(), t = e.get("page"), n = ut(""), { mutate: a } = nr();
486
- Ne(() => {
487
- !ue(n.current) && t !== n.current && a({ id: n.current }), n.current = t;
484
+ const Zl = Qn({}), ar = () => Nn(Zl), Jl = () => {
485
+ const [e] = Me(), t = e.get("page"), n = ht(""), { mutate: a } = nr();
486
+ we(() => {
487
+ !he(n.current) && t !== n.current && a({ id: n.current }), n.current = t;
488
488
  }, [t, a, n]);
489
489
  }, ot = (e, t) => {
490
490
  const [n] = ar();
@@ -492,7 +492,7 @@ const Zl = Qn({}), ar = () => En(Zl), Jl = () => {
492
492
  () => ee(n, e, t),
493
493
  [n, e, t]
494
494
  );
495
- }, te = () => ot("apiUrl", "/chai/api"), Fs = () => ot("usersApiUrl", "/chai/users"), An = () => ot("assetsApiUrl", "/chai/assets"), Kt = () => {
495
+ }, te = () => ot("apiUrl", "/chai/api"), Fs = () => ot("usersApiUrl", "/chai/users"), Tn = () => ot("assetsApiUrl", "/chai/assets"), Ht = () => {
496
496
  const e = te(), [t] = Me(), n = t.get("page"), a = V();
497
497
  return ke({
498
498
  queryKey: [F, _.GET_LANGUAGE_PAGES, n],
@@ -507,7 +507,7 @@ const Zl = Qn({}), ar = () => En(Zl), Jl = () => {
507
507
  },
508
508
  enabled: !!n
509
509
  });
510
- }, wt = () => {
510
+ }, xt = () => {
511
511
  const e = te(), t = V();
512
512
  return ke({
513
513
  queryKey: [F, _.GET_WEBSITE_DRAFT_SETTINGS],
@@ -522,14 +522,14 @@ const Zl = Qn({}), ar = () => En(Zl), Jl = () => {
522
522
  })
523
523
  });
524
524
  }, rr = (e) => {
525
- const { fallbackLang: t } = lt(), { data: n } = wt(), { data: a, isFetching: r } = Kt(), i = ie(() => {
525
+ const { fallbackLang: t } = lt(), { data: n } = xt(), { data: a, isFetching: r } = Ht(), i = ie(() => {
526
526
  const l = { [t]: !0 };
527
527
  return ii(ee(n, "languages"), (o) => {
528
- const d = Se(a, { lang: o });
528
+ const d = be(a, { lang: o });
529
529
  l[o] = !!d;
530
530
  }), l;
531
531
  }, [t, a, n]);
532
- return r || ue(e) || e && i[e];
532
+ return r || he(e) || e && i[e];
533
533
  }, js = () => {
534
534
  const e = xe(), { data: t } = ke({
535
535
  queryKey: [F, _.AI_CONTEXT],
@@ -551,19 +551,19 @@ const Zl = Qn({}), ar = () => En(Zl), Jl = () => {
551
551
  queryFn: async () => e(t, { action: _.GET_WEBSITE_PAGES }) || [],
552
552
  placeholderData: (n) => n
553
553
  });
554
- }, eo = Qn({ lastSaved: void 0 }), qs = () => En(eo), Ke = () => {
554
+ }, eo = Qn({ lastSaved: void 0 }), qs = () => Nn(eo), Ke = () => {
555
555
  const [e] = Me(), t = e.get("page"), [n] = ir(), { data: a, isFetching: r } = es();
556
556
  return { data: ie(
557
- () => ({ ...Se(a, { id: t }) || {}, metadata: n }),
557
+ () => ({ ...be(a, { id: t }) || {}, metadata: n }),
558
558
  [a, t, n]
559
559
  ), isFetching: r };
560
560
  }, to = () => {
561
- const [e] = Me(), t = e.get("lang") ?? "", { data: n, isFetching: a } = Kt();
561
+ const [e] = Me(), t = e.get("lang") ?? "", { data: n, isFetching: a } = Ht();
562
562
  return { data: ie(
563
- () => Se(n, { lang: t }) || {},
563
+ () => be(n, { lang: t }) || {},
564
564
  [n, t]
565
565
  ), isFetching: a };
566
- }, no = Qn({}), ir = () => En(no), Ht = (e) => {
566
+ }, no = Qn({}), ir = () => Nn(no), Wt = (e) => {
567
567
  const t = Fs(), n = V();
568
568
  return ke({
569
569
  queryKey: [F, "chaiUserInfo", e],
@@ -571,23 +571,23 @@ const Zl = Qn({}), ar = () => En(Zl), Jl = () => {
571
571
  action: _.GET_CHAI_USER,
572
572
  data: { userId: e }
573
573
  }),
574
- enabled: !ue(e)
574
+ enabled: !he(e)
575
575
  });
576
- }, so = Qn(void 0), Tn = () => {
577
- const [e] = Me(), t = e.get("page"), { user: n } = mt(), [a, r] = En(so);
576
+ }, so = Qn(void 0), Cn = () => {
577
+ const [e] = Me(), t = e.get("page"), { user: n } = ft(), [a, r] = Nn(so);
578
578
  return ie(() => ({
579
579
  isLocked: t && (n == null ? void 0 : n.id) !== a,
580
580
  currentEditor: a,
581
581
  setCurrentEditor: (i) => r(i)
582
582
  }), [n == null ? void 0 : n.id, a, t, r]);
583
583
  }, lr = () => {
584
- const { data: e } = wt();
584
+ const { data: e } = xt();
585
585
  return ie(
586
586
  () => (e == null ? void 0 : e.fallbackLang) || "en",
587
587
  [e]
588
588
  );
589
589
  }, or = () => {
590
- const [e] = Me(), t = e.get("page"), n = te(), { setAiContext: a } = js(), { setCurrentEditor: r } = Tn(), [, i] = qs(), [, l] = ir(), o = V();
590
+ const [e] = Me(), t = e.get("page"), n = te(), { setAiContext: a } = js(), { setCurrentEditor: r } = Cn(), [, i] = qs(), [, l] = ir(), o = V();
591
591
  return ke({
592
592
  queryKey: [F, _.GET_DRAFT_PAGE, t],
593
593
  staleTime: 1 / 0,
@@ -599,7 +599,7 @@ const Zl = Qn({}), ar = () => En(Zl), Jl = () => {
599
599
  data: { id: t, draft: !0 }
600
600
  });
601
601
  r(d.currentEditor);
602
- const u = d.blocks ?? [], h = Se(u, { _type: "@chai/ai-context" });
602
+ const u = d.blocks ?? [], h = be(u, { _type: "@chai/ai-context" });
603
603
  return a(ee(h, "_value", "") || ""), i((f) => ({ ...f, lastSaved: d.lastSaved })), l(ee(d, "metadata", {})), u;
604
604
  },
605
605
  enabled: !!t
@@ -689,7 +689,7 @@ function ao({
689
689
  ] }) });
690
690
  }
691
691
  const ro = () => {
692
- const { isLocked: e, currentEditor: t } = Tn(), { data: n } = Ht(t), [a] = Me(), r = a.get("page"), { mutate: i } = nr(), { isFetching: l } = or(), o = ye(() => {
692
+ const { isLocked: e, currentEditor: t } = Cn(), { data: n } = Wt(t), [a] = Me(), r = a.get("page"), { mutate: i } = nr(), { isFetching: l } = or(), o = ye(() => {
693
693
  i({ id: r });
694
694
  }, [r, i]);
695
695
  return !e || l ? /* @__PURE__ */ s("div", { className: "" }) : /* @__PURE__ */ s(
@@ -941,7 +941,7 @@ const ro = () => {
941
941
  isCreating: o
942
942
  };
943
943
  }, fo = ({ value: e, onChange: t }) => {
944
- const [n, a] = A(!1), [r, i] = A(""), l = ut(null), { groups: o } = mo(), [d, u] = A([
944
+ const [n, a] = A(!1), [r, i] = A(""), l = ht(null), { groups: o } = mo(), [d, u] = A([
945
945
  { id: "hero", name: "Hero" },
946
946
  { id: "feature", name: "Feature" },
947
947
  { id: "footer", name: "Footer" },
@@ -983,13 +983,13 @@ const ro = () => {
983
983
  const g = { id: p, name: p };
984
984
  u((N) => [...N, g]), t(g.id), i(""), a(!1);
985
985
  };
986
- Ne(() => {
986
+ we(() => {
987
987
  n && l.current && l.current.focus();
988
988
  }, [n]);
989
989
  const y = (p) => {
990
990
  p.key === "Enter" && (p.preventDefault(), f());
991
991
  };
992
- return Ne(() => {
992
+ return we(() => {
993
993
  e && !h.some((p) => p.id === e) && t("");
994
994
  }, [e, h, t]), n ? /* @__PURE__ */ c("div", { className: "space-y-2", children: [
995
995
  /* @__PURE__ */ s(
@@ -1044,7 +1044,7 @@ const ro = () => {
1044
1044
  )
1045
1045
  ] });
1046
1046
  }, go = 10 * 1024 * 1024, po = ({ value: e, onChange: t }) => {
1047
- const [n, a] = A(!1), r = ut(null), i = ye(
1047
+ const [n, a] = A(!1), r = ht(null), i = ye(
1048
1048
  (d) => {
1049
1049
  var h;
1050
1050
  const u = (h = d.target.files) == null ? void 0 : h[0];
@@ -1097,7 +1097,7 @@ const ro = () => {
1097
1097
  /* @__PURE__ */ s("div", { className: "animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full" }),
1098
1098
  "Uploading..."
1099
1099
  ] }) : /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
1100
- /* @__PURE__ */ s(nn, { className: "h-4 w-4" }),
1100
+ /* @__PURE__ */ s(sn, { className: "h-4 w-4" }),
1101
1101
  "Select image"
1102
1102
  ] })
1103
1103
  }
@@ -1162,41 +1162,41 @@ const ro = () => {
1162
1162
  EDIT_MEDIA: "edit_media",
1163
1163
  DELETE_MEDIA: "delete_media"
1164
1164
  }, yo = (e) => {
1165
- const { blocks: t, close: n, blockId: a } = e, { getPartailBlocks: r } = Ti(), i = t.find((S) => S._id === a), l = i == null ? void 0 : i._libBlockId, o = !!l, d = ie(() => t.some(
1166
- (S) => S._type === "PartialBlock" || S._type === "GlobalBlock"
1165
+ const { blocks: t, close: n, blockId: a } = e, { getPartailBlocks: r } = Ti(), i = t.find((x) => x._id === a), l = i == null ? void 0 : i._libBlockId, o = !!l, d = ie(() => t.some(
1166
+ (x) => x._type === "PartialBlock" || x._type === "GlobalBlock"
1167
1167
  ), [t]), u = ie(() => {
1168
- let S = [];
1168
+ let x = [];
1169
1169
  for (const U of t)
1170
1170
  if (U._type === "PartialBlock" || U._type === "GlobalBlock") {
1171
1171
  let R = r(U.partialBlockId);
1172
- U._parent && (R == null ? void 0 : R.length) > 0 && (R = R.map((C) => (ue(C._parent) && li(C, "_parent", U._parent), C))), S = [...S, ...R];
1172
+ U._parent && (R == null ? void 0 : R.length) > 0 && (R = R.map((C) => (he(C._parent) && li(C, "_parent", U._parent), C))), x = [...x, ...R];
1173
1173
  } else
1174
- S.push(U);
1175
- return S;
1176
- }, [t, r]), [h, f] = A(""), [y, p] = A(""), [g, N] = A(""), [E, G] = A(""), [w, I] = A({}), [b, D] = A(!1), [B, Z] = A(o), [J, O] = A(!1), { hasPermission: L } = Vt(), q = L(pe.DELETE_LIBRARY_BLOCK), X = Ca(), ne = () => {
1174
+ x.push(U);
1175
+ return x;
1176
+ }, [t, r]), [h, f] = A(""), [y, p] = A(""), [g, N] = A(""), [E, G] = A(""), [w, I] = A({}), [b, D] = A(!1), [B, Z] = A(o), [J, O] = A(!1), { hasPermission: L } = Kt(), q = L(pe.DELETE_LIBRARY_BLOCK), X = Ca(), ne = () => {
1177
1177
  X([a], { _libBlockId: void 0 }), j.success("Block delinked from library"), n();
1178
1178
  }, {
1179
1179
  data: Y,
1180
1180
  isLoading: k,
1181
1181
  isError: z
1182
1182
  } = oo(l);
1183
- Ne(() => {
1183
+ we(() => {
1184
1184
  z && o && (O(!0), Z(!1));
1185
- }, [z, o]), Ne(() => {
1185
+ }, [z, o]), we(() => {
1186
1186
  Y && !k && (f(Y.name || ""), p(Y.group || ""), N(Y.description || ""), G(Y.preview || ""), Z(!1));
1187
- }, [Y, k]), Ne(() => {
1188
- const S = h.trim().length >= 2, U = y.trim() !== "";
1189
- D(S && U);
1187
+ }, [Y, k]), we(() => {
1188
+ const x = h.trim().length >= 2, U = y.trim() !== "";
1189
+ D(x && U);
1190
1190
  }, [h, y]);
1191
1191
  const Te = () => {
1192
- const S = {};
1193
- 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;
1192
+ const x = {};
1193
+ return h.trim() ? h.length < 2 && (x.name = "Name must be at least 2 characters") : x.name = "Name is required", y || (x.group = "Group is required"), I(x), Object.keys(x).length === 0;
1194
1194
  }, { resetLibrary: De } = Ci({ id: "" }), Ze = lo(
1195
- (S) => {
1196
- o || X([a], { _libBlockId: S.id }), j.success(`Block ${o ? "updated" : "saved"} successfully`), De(S.library), n();
1195
+ (x) => {
1196
+ o || X([a], { _libBlockId: x.id }), j.success(`Block ${o ? "updated" : "saved"} successfully`), De(x.library), n();
1197
1197
  }
1198
- ), v = async (S) => {
1199
- if (S.preventDefault(), !Te()) return;
1198
+ ), v = async (x) => {
1199
+ if (x.preventDefault(), !Te()) return;
1200
1200
  const U = u.map((R) => (nt(R, "_libBlockId") && delete R._libBlockId, R));
1201
1201
  Ze.mutate({
1202
1202
  name: h.trim(),
@@ -1240,7 +1240,7 @@ const ro = () => {
1240
1240
  id: "name",
1241
1241
  placeholder: "Enter block name",
1242
1242
  value: h,
1243
- onChange: (S) => f(S.target.value),
1243
+ onChange: (x) => f(x.target.value),
1244
1244
  className: w.name ? "border-destructive" : ""
1245
1245
  }
1246
1246
  ),
@@ -1267,7 +1267,7 @@ const ro = () => {
1267
1267
  placeholder: "Enter a brief description",
1268
1268
  className: "resize-none",
1269
1269
  value: g,
1270
- onChange: (S) => N(S.target.value)
1270
+ onChange: (x) => N(x.target.value)
1271
1271
  }
1272
1272
  )
1273
1273
  ] }),
@@ -1399,11 +1399,11 @@ const ro = () => {
1399
1399
  }) : t.invalidateQueries({
1400
1400
  queryKey: [F, _.GET_WEBSITE_PAGES]
1401
1401
  });
1402
- const l = i.template ? `Page created from "${i.template.name}" template` : i.hasSlug === !1 ? "New " + ((o = Se(a, { key: i.pageType })) == null ? void 0 : o.name) + " added successfully" : "New page added successfully";
1402
+ const l = i.template ? `Page created from "${i.template.name}" template` : i.hasSlug === !1 ? "New " + ((o = be(a, { key: i.pageType })) == null ? void 0 : o.name) + " added successfully" : "New page added successfully";
1403
1403
  j.success(l);
1404
1404
  },
1405
1405
  onError: (r, i) => {
1406
- const l = Se(a, { key: i.pageType });
1406
+ const l = be(a, { key: i.pageType });
1407
1407
  j.error(
1408
1408
  `Failed to add new ${l != null && l.hasSlug ? "page" : l.name}.`,
1409
1409
  {
@@ -1431,7 +1431,7 @@ const ro = () => {
1431
1431
  });
1432
1432
  },
1433
1433
  onError: (r, i) => {
1434
- const l = Se(a, { key: i.pageType });
1434
+ const l = be(a, { key: i.pageType });
1435
1435
  j.error(
1436
1436
  `Failed to update ${l != null && l.hasSlug ? "page" : l.name}.`,
1437
1437
  {
@@ -1465,7 +1465,7 @@ const ro = () => {
1465
1465
  });
1466
1466
  },
1467
1467
  onError: (r, i) => {
1468
- const l = Se(a, { key: i.pageType });
1468
+ const l = be(a, { key: i.pageType });
1469
1469
  j.error(
1470
1470
  `Failed to delete ${l != null && l.hasSlug ? "page" : l.name}.`,
1471
1471
  {
@@ -1491,13 +1491,13 @@ const ro = () => {
1491
1491
  }) : t.invalidateQueries({
1492
1492
  queryKey: [F, _.GET_WEBSITE_PAGES]
1493
1493
  });
1494
- const l = Se(a, { key: i.pageType });
1494
+ const l = be(a, { key: i.pageType });
1495
1495
  j.success(
1496
1496
  l != null && l.hasSlug ? H.PAGE_UNPUBLISH_SUCCESS : "New " + l.name + " added successfully."
1497
1497
  );
1498
1498
  },
1499
1499
  onError: (r, i) => {
1500
- const l = Se(a, { key: i.pageType });
1500
+ const l = be(a, { key: i.pageType });
1501
1501
  j.error(
1502
1502
  `Failed to take offline ${l != null && l.hasSlug ? "page" : l.name}.`,
1503
1503
  {
@@ -1593,9 +1593,9 @@ var Vs = {};
1593
1593
  return !1;
1594
1594
  var v = new OffscreenCanvas(1, 1), m = v.getContext("2d");
1595
1595
  m.fillRect(0, 0, 1, 1);
1596
- var S = v.transferToImageBitmap();
1596
+ var x = v.transferToImageBitmap();
1597
1597
  try {
1598
- m.createPattern(S, "no-repeat");
1598
+ m.createPattern(x, "no-repeat");
1599
1599
  } catch {
1600
1600
  return !1;
1601
1601
  }
@@ -1604,39 +1604,39 @@ var Vs = {};
1604
1604
  function d() {
1605
1605
  }
1606
1606
  function u(v) {
1607
- var m = n.exports.Promise, S = m !== void 0 ? m : t.Promise;
1608
- return typeof S == "function" ? new S(v) : (v(d, d), null);
1607
+ var m = n.exports.Promise, x = m !== void 0 ? m : t.Promise;
1608
+ return typeof x == "function" ? new x(v) : (v(d, d), null);
1609
1609
  }
1610
1610
  var h = /* @__PURE__ */ function(v, m) {
1611
1611
  return {
1612
- transform: function(S) {
1612
+ transform: function(x) {
1613
1613
  if (v)
1614
- return S;
1615
- if (m.has(S))
1616
- return m.get(S);
1617
- var U = new OffscreenCanvas(S.width, S.height), R = U.getContext("2d");
1618
- return R.drawImage(S, 0, 0), m.set(S, U), U;
1614
+ return x;
1615
+ if (m.has(x))
1616
+ return m.get(x);
1617
+ var U = new OffscreenCanvas(x.width, x.height), R = U.getContext("2d");
1618
+ return R.drawImage(x, 0, 0), m.set(x, U), U;
1619
1619
  },
1620
1620
  clear: function() {
1621
1621
  m.clear();
1622
1622
  }
1623
1623
  };
1624
1624
  }(o, /* @__PURE__ */ new Map()), f = function() {
1625
- var v = Math.floor(16.666666666666668), m, S, U = {}, R = 0;
1625
+ var v = Math.floor(16.666666666666668), m, x, U = {}, R = 0;
1626
1626
  return typeof requestAnimationFrame == "function" && typeof cancelAnimationFrame == "function" ? (m = function(C) {
1627
1627
  var W = Math.random();
1628
1628
  return U[W] = requestAnimationFrame(function M(Q) {
1629
1629
  R === Q || R + v - 1 < Q ? (R = Q, delete U[W], C()) : U[W] = requestAnimationFrame(M);
1630
1630
  }), W;
1631
- }, S = function(C) {
1631
+ }, x = function(C) {
1632
1632
  U[C] && cancelAnimationFrame(U[C]);
1633
1633
  }) : (m = function(C) {
1634
1634
  return setTimeout(C, v);
1635
- }, S = function(C) {
1635
+ }, x = function(C) {
1636
1636
  return clearTimeout(C);
1637
- }), { frame: m, cancel: S };
1637
+ }), { frame: m, cancel: x };
1638
1638
  }(), y = /* @__PURE__ */ function() {
1639
- var v, m, S = {};
1639
+ var v, m, x = {};
1640
1640
  function U(R) {
1641
1641
  function C(W, M) {
1642
1642
  R.postMessage({ options: W || {}, callback: M });
@@ -1644,20 +1644,20 @@ var Vs = {};
1644
1644
  R.init = function(M) {
1645
1645
  var Q = M.transferControlToOffscreen();
1646
1646
  R.postMessage({ canvas: Q }, [Q]);
1647
- }, R.fire = function(M, Q, oe) {
1647
+ }, R.fire = function(M, Q, ce) {
1648
1648
  if (m)
1649
1649
  return C(M, null), m;
1650
- var be = Math.random().toString(36).slice(2);
1651
- return m = u(function(ce) {
1652
- function Ee(Pe) {
1653
- Pe.data.callback === be && (delete S[be], R.removeEventListener("message", Ee), m = null, h.clear(), oe(), ce());
1650
+ var Ee = Math.random().toString(36).slice(2);
1651
+ return m = u(function(de) {
1652
+ function Ne(Pe) {
1653
+ Pe.data.callback === Ee && (delete x[Ee], R.removeEventListener("message", Ne), m = null, h.clear(), ce(), de());
1654
1654
  }
1655
- R.addEventListener("message", Ee), C(M, be), S[be] = Ee.bind(null, { data: { callback: be } });
1655
+ R.addEventListener("message", Ne), C(M, Ee), x[Ee] = Ne.bind(null, { data: { callback: Ee } });
1656
1656
  }), m;
1657
1657
  }, R.reset = function() {
1658
1658
  R.postMessage({ reset: !0 });
1659
- for (var M in S)
1660
- S[M](), delete S[M];
1659
+ for (var M in x)
1660
+ x[M](), delete x[M];
1661
1661
  };
1662
1662
  }
1663
1663
  return function() {
@@ -1728,10 +1728,10 @@ var Vs = {};
1728
1728
  function N(v) {
1729
1729
  return v != null;
1730
1730
  }
1731
- function E(v, m, S) {
1731
+ function E(v, m, x) {
1732
1732
  return g(
1733
1733
  v && N(v[m]) ? v[m] : p[m],
1734
- S
1734
+ x
1735
1735
  );
1736
1736
  }
1737
1737
  function G(v) {
@@ -1769,18 +1769,18 @@ var Vs = {};
1769
1769
  var m = document.createElement("canvas");
1770
1770
  return m.style.position = "fixed", m.style.top = "0px", m.style.left = "0px", m.style.pointerEvents = "none", m.style.zIndex = v, m;
1771
1771
  }
1772
- function L(v, m, S, U, R, C, W, M, Q) {
1773
- v.save(), v.translate(m, S), v.rotate(C), v.scale(U, R), v.arc(0, 0, 1, W, M, Q), v.restore();
1772
+ function L(v, m, x, U, R, C, W, M, Q) {
1773
+ v.save(), v.translate(m, x), v.rotate(C), v.scale(U, R), v.arc(0, 0, 1, W, M, Q), v.restore();
1774
1774
  }
1775
1775
  function q(v) {
1776
- var m = v.angle * (Math.PI / 180), S = v.spread * (Math.PI / 180);
1776
+ var m = v.angle * (Math.PI / 180), x = v.spread * (Math.PI / 180);
1777
1777
  return {
1778
1778
  x: v.x,
1779
1779
  y: v.y,
1780
1780
  wobble: Math.random() * 10,
1781
1781
  wobbleSpeed: Math.min(0.11, Math.random() * 0.1 + 0.05),
1782
1782
  velocity: v.startVelocity * 0.5 + Math.random() * v.startVelocity,
1783
- angle2D: -m + (0.5 * S - Math.random() * S),
1783
+ angle2D: -m + (0.5 * x - Math.random() * x),
1784
1784
  tiltAngle: (Math.random() * (0.75 - 0.25) + 0.25) * Math.PI,
1785
1785
  color: v.color,
1786
1786
  shape: v.shape,
@@ -1801,8 +1801,8 @@ var Vs = {};
1801
1801
  }
1802
1802
  function X(v, m) {
1803
1803
  m.x += Math.cos(m.angle2D) * m.velocity + m.drift, m.y += Math.sin(m.angle2D) * m.velocity + m.gravity, m.velocity *= m.decay, m.flat ? (m.wobble = 0, m.wobbleX = m.x + 10 * m.scalar, m.wobbleY = m.y + 10 * m.scalar, m.tiltSin = 0, m.tiltCos = 0, m.random = 1) : (m.wobble += m.wobbleSpeed, m.wobbleX = m.x + 10 * m.scalar * Math.cos(m.wobble), m.wobbleY = m.y + 10 * m.scalar * Math.sin(m.wobble), m.tiltAngle += 0.1, m.tiltSin = Math.sin(m.tiltAngle), m.tiltCos = Math.cos(m.tiltAngle), m.random = Math.random() + 2);
1804
- var S = m.tick++ / m.totalTicks, U = m.x + m.random * m.tiltCos, R = m.y + m.random * m.tiltSin, C = m.wobbleX + m.random * m.tiltCos, W = m.wobbleY + m.random * m.tiltSin;
1805
- if (v.fillStyle = "rgba(" + m.color.r + ", " + m.color.g + ", " + m.color.b + ", " + (1 - S) + ")", v.beginPath(), l && m.shape.type === "path" && typeof m.shape.path == "string" && Array.isArray(m.shape.matrix))
1804
+ var x = m.tick++ / m.totalTicks, U = m.x + m.random * m.tiltCos, R = m.y + m.random * m.tiltSin, C = m.wobbleX + m.random * m.tiltCos, W = m.wobbleY + m.random * m.tiltSin;
1805
+ if (v.fillStyle = "rgba(" + m.color.r + ", " + m.color.g + ", " + m.color.b + ", " + (1 - x) + ")", v.beginPath(), l && m.shape.type === "path" && typeof m.shape.path == "string" && Array.isArray(m.shape.matrix))
1806
1806
  v.fill(Te(
1807
1807
  m.shape.path,
1808
1808
  m.shape.matrix,
@@ -1813,173 +1813,173 @@ var Vs = {};
1813
1813
  Math.PI / 10 * m.wobble
1814
1814
  ));
1815
1815
  else if (m.shape.type === "bitmap") {
1816
- var M = Math.PI / 10 * m.wobble, Q = Math.abs(C - U) * 0.1, oe = Math.abs(W - R) * 0.1, be = m.shape.bitmap.width * m.scalar, ce = m.shape.bitmap.height * m.scalar, Ee = new DOMMatrix([
1816
+ var M = Math.PI / 10 * m.wobble, Q = Math.abs(C - U) * 0.1, ce = Math.abs(W - R) * 0.1, Ee = m.shape.bitmap.width * m.scalar, de = m.shape.bitmap.height * m.scalar, Ne = new DOMMatrix([
1817
1817
  Math.cos(M) * Q,
1818
1818
  Math.sin(M) * Q,
1819
- -Math.sin(M) * oe,
1820
- Math.cos(M) * oe,
1819
+ -Math.sin(M) * ce,
1820
+ Math.cos(M) * ce,
1821
1821
  m.x,
1822
1822
  m.y
1823
1823
  ]);
1824
- Ee.multiplySelf(new DOMMatrix(m.shape.matrix));
1824
+ Ne.multiplySelf(new DOMMatrix(m.shape.matrix));
1825
1825
  var Pe = v.createPattern(h.transform(m.shape.bitmap), "no-repeat");
1826
- Pe.setTransform(Ee), v.globalAlpha = 1 - S, v.fillStyle = Pe, v.fillRect(
1827
- m.x - be / 2,
1828
- m.y - ce / 2,
1829
- be,
1830
- ce
1826
+ Pe.setTransform(Ne), v.globalAlpha = 1 - x, v.fillStyle = Pe, v.fillRect(
1827
+ m.x - Ee / 2,
1828
+ m.y - de / 2,
1829
+ Ee,
1830
+ de
1831
1831
  ), v.globalAlpha = 1;
1832
1832
  } else if (m.shape === "circle")
1833
1833
  v.ellipse ? v.ellipse(m.x, m.y, Math.abs(C - U) * m.ovalScalar, Math.abs(W - R) * m.ovalScalar, Math.PI / 10 * m.wobble, 0, 2 * Math.PI) : L(v, m.x, m.y, Math.abs(C - U) * m.ovalScalar, Math.abs(W - R) * m.ovalScalar, Math.PI / 10 * m.wobble, 0, 2 * Math.PI);
1834
1834
  else if (m.shape === "star")
1835
- for (var se = Math.PI / 2 * 3, Le = 4 * m.scalar, Ue = 8 * m.scalar, P = m.x, ae = m.y, x = 5, ge = Math.PI / x; x--; )
1836
- P = m.x + Math.cos(se) * Ue, ae = m.y + Math.sin(se) * Ue, v.lineTo(P, ae), se += ge, P = m.x + Math.cos(se) * Le, ae = m.y + Math.sin(se) * Le, v.lineTo(P, ae), se += ge;
1835
+ for (var se = Math.PI / 2 * 3, Le = 4 * m.scalar, Ue = 8 * m.scalar, P = m.x, ae = m.y, S = 5, le = Math.PI / S; S--; )
1836
+ P = m.x + Math.cos(se) * Ue, ae = m.y + Math.sin(se) * Ue, v.lineTo(P, ae), se += le, P = m.x + Math.cos(se) * Le, ae = m.y + Math.sin(se) * Le, v.lineTo(P, ae), se += le;
1837
1837
  else
1838
1838
  v.moveTo(Math.floor(m.x), Math.floor(m.y)), v.lineTo(Math.floor(m.wobbleX), Math.floor(R)), v.lineTo(Math.floor(C), Math.floor(W)), v.lineTo(Math.floor(U), Math.floor(m.wobbleY));
1839
1839
  return v.closePath(), v.fill(), m.tick < m.totalTicks;
1840
1840
  }
1841
- function ne(v, m, S, U, R) {
1842
- var C = m.slice(), W = v.getContext("2d"), M, Q, oe = u(function(be) {
1843
- function ce() {
1844
- M = Q = null, W.clearRect(0, 0, U.width, U.height), h.clear(), R(), be();
1841
+ function ne(v, m, x, U, R) {
1842
+ var C = m.slice(), W = v.getContext("2d"), M, Q, ce = u(function(Ee) {
1843
+ function de() {
1844
+ M = Q = null, W.clearRect(0, 0, U.width, U.height), h.clear(), R(), Ee();
1845
1845
  }
1846
- function Ee() {
1847
- a && !(U.width === r.width && U.height === r.height) && (U.width = v.width = r.width, U.height = v.height = r.height), !U.width && !U.height && (S(v), U.width = v.width, U.height = v.height), W.clearRect(0, 0, U.width, U.height), C = C.filter(function(Pe) {
1846
+ function Ne() {
1847
+ a && !(U.width === r.width && U.height === r.height) && (U.width = v.width = r.width, U.height = v.height = r.height), !U.width && !U.height && (x(v), U.width = v.width, U.height = v.height), W.clearRect(0, 0, U.width, U.height), C = C.filter(function(Pe) {
1848
1848
  return X(W, Pe);
1849
- }), C.length ? M = f.frame(Ee) : ce();
1849
+ }), C.length ? M = f.frame(Ne) : de();
1850
1850
  }
1851
- M = f.frame(Ee), Q = ce;
1851
+ M = f.frame(Ne), Q = de;
1852
1852
  });
1853
1853
  return {
1854
- addFettis: function(be) {
1855
- return C = C.concat(be), oe;
1854
+ addFettis: function(Ee) {
1855
+ return C = C.concat(Ee), ce;
1856
1856
  },
1857
1857
  canvas: v,
1858
- promise: oe,
1858
+ promise: ce,
1859
1859
  reset: function() {
1860
1860
  M && f.cancel(M), Q && Q();
1861
1861
  }
1862
1862
  };
1863
1863
  }
1864
1864
  function Y(v, m) {
1865
- var S = !v, U = !!E(m || {}, "resize"), R = !1, C = E(m, "disableForReducedMotion", Boolean), W = i && !!E(m || {}, "useWorker"), M = W ? y() : null, Q = S ? Z : J, oe = v && M ? !!v.__confetti_initialized : !1, be = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion)").matches, ce;
1866
- function Ee(se, Le, Ue) {
1867
- for (var P = E(se, "particleCount", G), ae = E(se, "angle", Number), x = E(se, "spread", Number), ge = E(se, "startVelocity", Number), Qe = E(se, "decay", Number), Fe = E(se, "gravity", Number), xt = E(se, "drift", Number), At = E(se, "colors", b), Cn = E(se, "ticks", Number), Ys = E(se, "shapes"), ei = E(se, "scalar"), ti = !!E(se, "flat"), Qs = B(se), Xs = P, as = [], ni = v.width * Qs.x, si = v.height * Qs.y; Xs--; )
1865
+ var x = !v, U = !!E(m || {}, "resize"), R = !1, C = E(m, "disableForReducedMotion", Boolean), W = i && !!E(m || {}, "useWorker"), M = W ? y() : null, Q = x ? Z : J, ce = v && M ? !!v.__confetti_initialized : !1, Ee = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion)").matches, de;
1866
+ function Ne(se, Le, Ue) {
1867
+ for (var P = E(se, "particleCount", G), ae = E(se, "angle", Number), S = E(se, "spread", Number), le = E(se, "startVelocity", Number), Qe = E(se, "decay", Number), Fe = E(se, "gravity", Number), gt = E(se, "drift", Number), dt = E(se, "colors", b), Tt = E(se, "ticks", Number), Ys = E(se, "shapes"), ei = E(se, "scalar"), ti = !!E(se, "flat"), Qs = B(se), Xs = P, as = [], ni = v.width * Qs.x, si = v.height * Qs.y; Xs--; )
1868
1868
  as.push(
1869
1869
  q({
1870
1870
  x: ni,
1871
1871
  y: si,
1872
1872
  angle: ae,
1873
- spread: x,
1874
- startVelocity: ge,
1875
- color: At[Xs % At.length],
1873
+ spread: S,
1874
+ startVelocity: le,
1875
+ color: dt[Xs % dt.length],
1876
1876
  shape: Ys[w(0, Ys.length)],
1877
- ticks: Cn,
1877
+ ticks: Tt,
1878
1878
  decay: Qe,
1879
1879
  gravity: Fe,
1880
- drift: xt,
1880
+ drift: gt,
1881
1881
  scalar: ei,
1882
1882
  flat: ti
1883
1883
  })
1884
1884
  );
1885
- return ce ? ce.addFettis(as) : (ce = ne(v, as, Q, Le, Ue), ce.promise);
1885
+ return de ? de.addFettis(as) : (de = ne(v, as, Q, Le, Ue), de.promise);
1886
1886
  }
1887
1887
  function Pe(se) {
1888
1888
  var Le = C || E(se, "disableForReducedMotion", Boolean), Ue = E(se, "zIndex", Number);
1889
- if (Le && be)
1890
- return u(function(ge) {
1891
- ge();
1889
+ if (Le && Ee)
1890
+ return u(function(le) {
1891
+ le();
1892
1892
  });
1893
- S && ce ? v = ce.canvas : S && !v && (v = O(Ue), document.body.appendChild(v)), U && !oe && Q(v);
1893
+ x && de ? v = de.canvas : x && !v && (v = O(Ue), document.body.appendChild(v)), U && !ce && Q(v);
1894
1894
  var P = {
1895
1895
  width: v.width,
1896
1896
  height: v.height
1897
1897
  };
1898
- M && !oe && M.init(v), oe = !0, M && (v.__confetti_initialized = !0);
1898
+ M && !ce && M.init(v), ce = !0, M && (v.__confetti_initialized = !0);
1899
1899
  function ae() {
1900
1900
  if (M) {
1901
- var ge = {
1901
+ var le = {
1902
1902
  getBoundingClientRect: function() {
1903
- if (!S)
1903
+ if (!x)
1904
1904
  return v.getBoundingClientRect();
1905
1905
  }
1906
1906
  };
1907
- Q(ge), M.postMessage({
1907
+ Q(le), M.postMessage({
1908
1908
  resize: {
1909
- width: ge.width,
1910
- height: ge.height
1909
+ width: le.width,
1910
+ height: le.height
1911
1911
  }
1912
1912
  });
1913
1913
  return;
1914
1914
  }
1915
1915
  P.width = P.height = null;
1916
1916
  }
1917
- function x() {
1918
- ce = null, U && (R = !1, t.removeEventListener("resize", ae)), S && v && (document.body.contains(v) && document.body.removeChild(v), v = null, oe = !1);
1917
+ function S() {
1918
+ de = null, U && (R = !1, t.removeEventListener("resize", ae)), x && v && (document.body.contains(v) && document.body.removeChild(v), v = null, ce = !1);
1919
1919
  }
1920
- return U && !R && (R = !0, t.addEventListener("resize", ae, !1)), M ? M.fire(se, P, x) : Ee(se, P, x);
1920
+ return U && !R && (R = !0, t.addEventListener("resize", ae, !1)), M ? M.fire(se, P, S) : Ne(se, P, S);
1921
1921
  }
1922
1922
  return Pe.reset = function() {
1923
- M && M.reset(), ce && ce.reset();
1923
+ M && M.reset(), de && de.reset();
1924
1924
  }, Pe;
1925
1925
  }
1926
1926
  var k;
1927
1927
  function z() {
1928
1928
  return k || (k = Y(null, { useWorker: !0, resize: !0 })), k;
1929
1929
  }
1930
- function Te(v, m, S, U, R, C, W) {
1930
+ function Te(v, m, x, U, R, C, W) {
1931
1931
  var M = new Path2D(v), Q = new Path2D();
1932
1932
  Q.addPath(M, new DOMMatrix(m));
1933
- var oe = new Path2D();
1934
- return oe.addPath(Q, new DOMMatrix([
1933
+ var ce = new Path2D();
1934
+ return ce.addPath(Q, new DOMMatrix([
1935
1935
  Math.cos(W) * R,
1936
1936
  Math.sin(W) * R,
1937
1937
  -Math.sin(W) * C,
1938
1938
  Math.cos(W) * C,
1939
- S,
1939
+ x,
1940
1940
  U
1941
- ])), oe;
1941
+ ])), ce;
1942
1942
  }
1943
1943
  function De(v) {
1944
1944
  if (!l)
1945
1945
  throw new Error("path confetti are not supported in this browser");
1946
- var m, S;
1947
- typeof v == "string" ? m = v : (m = v.path, S = v.matrix);
1946
+ var m, x;
1947
+ typeof v == "string" ? m = v : (m = v.path, x = v.matrix);
1948
1948
  var U = new Path2D(m), R = document.createElement("canvas"), C = R.getContext("2d");
1949
- if (!S) {
1950
- for (var W = 1e3, M = W, Q = W, oe = 0, be = 0, ce, Ee, Pe = 0; Pe < W; Pe += 2)
1949
+ if (!x) {
1950
+ for (var W = 1e3, M = W, Q = W, ce = 0, Ee = 0, de, Ne, Pe = 0; Pe < W; Pe += 2)
1951
1951
  for (var se = 0; se < W; se += 2)
1952
- C.isPointInPath(U, Pe, se, "nonzero") && (M = Math.min(M, Pe), Q = Math.min(Q, se), oe = Math.max(oe, Pe), be = Math.max(be, se));
1953
- ce = oe - M, Ee = be - Q;
1954
- var Le = 10, Ue = Math.min(Le / ce, Le / Ee);
1955
- S = [
1952
+ C.isPointInPath(U, Pe, se, "nonzero") && (M = Math.min(M, Pe), Q = Math.min(Q, se), ce = Math.max(ce, Pe), Ee = Math.max(Ee, se));
1953
+ de = ce - M, Ne = Ee - Q;
1954
+ var Le = 10, Ue = Math.min(Le / de, Le / Ne);
1955
+ x = [
1956
1956
  Ue,
1957
1957
  0,
1958
1958
  0,
1959
1959
  Ue,
1960
- -Math.round(ce / 2 + M) * Ue,
1961
- -Math.round(Ee / 2 + Q) * Ue
1960
+ -Math.round(de / 2 + M) * Ue,
1961
+ -Math.round(Ne / 2 + Q) * Ue
1962
1962
  ];
1963
1963
  }
1964
1964
  return {
1965
1965
  type: "path",
1966
1966
  path: m,
1967
- matrix: S
1967
+ matrix: x
1968
1968
  };
1969
1969
  }
1970
1970
  function Ze(v) {
1971
- var m, S = 1, U = "#000000", R = '"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';
1972
- typeof v == "string" ? m = v : (m = v.text, S = "scalar" in v ? v.scalar : S, R = "fontFamily" in v ? v.fontFamily : R, U = "color" in v ? v.color : U);
1973
- var C = 10 * S, W = "" + C + "px " + R, M = new OffscreenCanvas(C, C), Q = M.getContext("2d");
1971
+ var m, x = 1, U = "#000000", R = '"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';
1972
+ typeof v == "string" ? m = v : (m = v.text, x = "scalar" in v ? v.scalar : x, R = "fontFamily" in v ? v.fontFamily : R, U = "color" in v ? v.color : U);
1973
+ var C = 10 * x, W = "" + C + "px " + R, M = new OffscreenCanvas(C, C), Q = M.getContext("2d");
1974
1974
  Q.font = W;
1975
- var oe = Q.measureText(m), be = Math.ceil(oe.actualBoundingBoxRight + oe.actualBoundingBoxLeft), ce = Math.ceil(oe.actualBoundingBoxAscent + oe.actualBoundingBoxDescent), Ee = 2, Pe = oe.actualBoundingBoxLeft + Ee, se = oe.actualBoundingBoxAscent + Ee;
1976
- be += Ee + Ee, ce += Ee + Ee, M = new OffscreenCanvas(be, ce), Q = M.getContext("2d"), Q.font = W, Q.fillStyle = U, Q.fillText(m, Pe, se);
1977
- var Le = 1 / S;
1975
+ var ce = Q.measureText(m), Ee = Math.ceil(ce.actualBoundingBoxRight + ce.actualBoundingBoxLeft), de = Math.ceil(ce.actualBoundingBoxAscent + ce.actualBoundingBoxDescent), Ne = 2, Pe = ce.actualBoundingBoxLeft + Ne, se = ce.actualBoundingBoxAscent + Ne;
1976
+ Ee += Ne + Ne, de += Ne + Ne, M = new OffscreenCanvas(Ee, de), Q = M.getContext("2d"), Q.font = W, Q.fillStyle = U, Q.fillText(m, Pe, se);
1977
+ var Le = 1 / x;
1978
1978
  return {
1979
1979
  type: "bitmap",
1980
1980
  // TODO these probably need to be transfered for workers
1981
1981
  bitmap: M.transferToImageBitmap(),
1982
- matrix: [Le, 0, 0, Le, -be * Le / 2, -ce * Le / 2]
1982
+ matrix: [Le, 0, 0, Le, -Ee * Le / 2, -de * Le / 2]
1983
1983
  };
1984
1984
  }
1985
1985
  n.exports = function() {
@@ -2049,8 +2049,8 @@ const Co = {
2049
2049
  page: e,
2050
2050
  onClose: t
2051
2051
  }) => {
2052
- const [n, a] = A(e.slug || ""), { mutate: r, isPending: i } = Ao(), { data: l } = Re(), o = Se(l, { key: e == null ? void 0 : e.pageType }), d = (h) => {
2053
- if (h.preventDefault(), !(e != null && e.primaryPage) && Object.keys(Xe).some((p) => n === `/${p}` || Xt(n, `/${p}/`))) {
2052
+ const [n, a] = A(e.slug || ""), { mutate: r, isPending: i } = Ao(), { data: l } = Re(), o = be(l, { key: e == null ? void 0 : e.pageType }), d = (h) => {
2053
+ if (h.preventDefault(), !(e != null && e.primaryPage) && Object.keys(Xe).some((p) => n === `/${p}` || Zt(n, `/${p}/`))) {
2054
2054
  j.error("Error", {
2055
2055
  description: "Slugs cannot start with a language code for primary page"
2056
2056
  });
@@ -2100,7 +2100,7 @@ const Co = {
2100
2100
  value: n,
2101
2101
  onChange: (h) => {
2102
2102
  const f = h.target.value;
2103
- Xt(f, `/${u}`) && a(f);
2103
+ Zt(f, `/${u}`) && a(f);
2104
2104
  },
2105
2105
  className: "col-span-3",
2106
2106
  required: !0,
@@ -2115,7 +2115,7 @@ const Co = {
2115
2115
  T,
2116
2116
  {
2117
2117
  type: "submit",
2118
- disabled: i || !Xt(n, `/${u}`) || xs(e == null ? void 0 : e.slug, n),
2118
+ disabled: i || !Zt(n, `/${u}`) || xs(e == null ? void 0 : e.slug, n),
2119
2119
  children: i ? "Changing..." : "Change Slug"
2120
2120
  }
2121
2121
  ) })
@@ -2172,7 +2172,7 @@ const He = ({
2172
2172
  children: n,
2173
2173
  fallback: a = null
2174
2174
  }) => {
2175
- const { hasPermission: r } = Vt();
2175
+ const { hasPermission: r } = Kt();
2176
2176
  return e && !r(e) || t && !t.some((i) => r(i)) ? a : n;
2177
2177
  }, Ks = ({
2178
2178
  page: e,
@@ -2221,7 +2221,8 @@ const He = ({
2221
2221
  lang: o,
2222
2222
  primaryPage: a == null ? void 0 : a.id,
2223
2223
  slug: u,
2224
- pageType: a == null ? void 0 : a.pageType
2224
+ pageType: a == null ? void 0 : a.pageType,
2225
+ tracking: {}
2225
2226
  };
2226
2227
  b.pageType = e.pageType, e.edit && (b.id = e == null ? void 0 : e.id), e.edit ? p(b, { onSuccess: t }) : f(b, { onSuccess: t });
2227
2228
  };
@@ -2238,14 +2239,14 @@ const He = ({
2238
2239
  "select",
2239
2240
  {
2240
2241
  value: o,
2241
- disabled: e.edit || ue(n),
2242
+ disabled: e.edit || he(n),
2242
2243
  onChange: (I) => {
2243
2244
  const b = I.target.value;
2244
2245
  d(b), !E && h(`/${b}`);
2245
2246
  },
2246
2247
  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",
2247
2248
  children: [
2248
- /* @__PURE__ */ s("option", { value: "", disabled: !0, selected: !0, children: e.edit ? ee(Xe, e.lang, e.lang) : ue(n) ? H.ALL_AVAILABLE_LANGUAGE_PAGE : H.CHOOSE_LANGUAGE }),
2249
+ /* @__PURE__ */ s("option", { value: "", disabled: !0, selected: !0, children: e.edit ? ee(Xe, e.lang, e.lang) : he(n) ? H.ALL_AVAILABLE_LANGUAGE_PAGE : H.CHOOSE_LANGUAGE }),
2249
2250
  We(n, (I) => /* @__PURE__ */ s("option", { value: I, children: ee(Xe, I, I) }, I))
2250
2251
  ]
2251
2252
  }
@@ -2278,14 +2279,14 @@ const He = ({
2278
2279
  value: u,
2279
2280
  onChange: (I) => {
2280
2281
  const b = I.target.value;
2281
- Xt(b, `/${o}`) && h(Yt(oi(b)));
2282
+ Zt(b, `/${o}`) && h(Qt(oi(b)));
2282
2283
  },
2283
2284
  className: "col-span-3",
2284
2285
  required: !0,
2285
2286
  pattern: "^/.*",
2286
- disabled: ue(o),
2287
+ disabled: he(o),
2287
2288
  title: H.SLUG_MUST_START_WITH,
2288
- placeholder: ue(o) ? H.CHOOSE_LANGUAGE_TO_ADD_SLUG : H.ENTER_PAGE_SLUG
2289
+ placeholder: he(o) ? H.CHOOSE_LANGUAGE_TO_ADD_SLUG : H.ENTER_PAGE_SLUG
2289
2290
  }
2290
2291
  )
2291
2292
  ] })
@@ -2294,16 +2295,16 @@ const He = ({
2294
2295
  T,
2295
2296
  {
2296
2297
  type: "submit",
2297
- disabled: G || !i || !o || !E && !Xt(u, `/${o}`),
2298
+ disabled: G || !i || !o || !E && !Zt(u, `/${o}`),
2298
2299
  children: G ? e.edit ? H.UPDATING : H.ADDING : e.edit ? H.UPDATE : H.ADD_NEW_LANGUAGE
2299
2300
  }
2300
2301
  ) })
2301
2302
  ] })
2302
2303
  ] }) });
2303
2304
  }, ko = () => {
2304
- const [e, t] = A(null), { selectedLang: n, fallbackLang: a, setSelectedLang: r } = lt(), { data: i, isFetching: l } = Kt(), { data: o } = Ke(), [d, u] = A(null), [h, f] = A(null), [y, p] = A(null), { data: g } = wt(), N = _e(
2305
+ const [e, t] = A(null), { selectedLang: n, fallbackLang: a, setSelectedLang: r } = lt(), { data: i, isFetching: l } = Ht(), { data: o } = Ke(), [d, u] = A(null), [h, f] = A(null), [y, p] = A(null), { data: g } = xt(), N = _e(
2305
2306
  ee(g, "languages") || ["en"],
2306
- (E) => !Se(i, { lang: E }) && E !== ee(g, "fallbackLang")
2307
+ (E) => !be(i, { lang: E }) && E !== ee(g, "fallbackLang")
2307
2308
  );
2308
2309
  return /* @__PURE__ */ c("div", { className: "space-y-4", children: [
2309
2310
  /* @__PURE__ */ s("ul", { className: "space-y-2", children: l ? /* @__PURE__ */ c("div", { className: "w-full space-y-3 py-4", children: [
@@ -2361,9 +2362,9 @@ const He = ({
2361
2362
  pe.DELETE_PAGE,
2362
2363
  pe.UNPUBLISH_PAGE
2363
2364
  ],
2364
- children: /* @__PURE__ */ c(Nn, { children: [
2365
+ children: /* @__PURE__ */ c(wn, { children: [
2365
2366
  /* @__PURE__ */ s(
2366
- wn,
2367
+ Sn,
2367
2368
  {
2368
2369
  asChild: !0,
2369
2370
  onClick: (D) => D.stopPropagation(),
@@ -2379,7 +2380,7 @@ const He = ({
2379
2380
  }
2380
2381
  ),
2381
2382
  /* @__PURE__ */ c(
2382
- Sn,
2383
+ xn,
2383
2384
  {
2384
2385
  align: "end",
2385
2386
  className: "text-sm z-[9999]",
@@ -2459,7 +2460,7 @@ const He = ({
2459
2460
  {
2460
2461
  variant: "default",
2461
2462
  size: "sm",
2462
- disabled: ue(N),
2463
+ disabled: he(N),
2463
2464
  onClick: () => {
2464
2465
  t({
2465
2466
  name: o == null ? void 0 : o.name,
@@ -2504,8 +2505,8 @@ function Lo({
2504
2505
  dynamicPattern: a,
2505
2506
  onValidationChange: r
2506
2507
  }) {
2507
- const [i, l] = A(null), o = ut(null), [d, u] = A(a + e);
2508
- Ne(() => {
2508
+ const [i, l] = A(null), o = ht(null), [d, u] = A(a + e);
2509
+ we(() => {
2509
2510
  u(a + e);
2510
2511
  }, [e, a]);
2511
2512
  const h = (p) => {
@@ -2560,12 +2561,12 @@ const Do = (e) => {
2560
2561
  if (t <= 0) return { base: e, extension: null };
2561
2562
  const n = e.substring(t);
2562
2563
  return { base: e.substring(0, t), extension: n };
2563
- }, Nt = (e) => {
2564
+ }, St = (e) => {
2564
2565
  if (!e) return e;
2565
2566
  const { base: t } = Do(e);
2566
2567
  return t;
2567
- }, Go = (e) => e && Nt(e), la = (e, t) => {
2568
- const n = Nt(e || "");
2568
+ }, Go = (e) => e && St(e), la = (e, t) => {
2569
+ const n = St(e || "");
2569
2570
  return !n || n === "/" ? `/${t}` : `${n}/${t}`;
2570
2571
  };
2571
2572
  function Uo({
@@ -2575,15 +2576,15 @@ function Uo({
2575
2576
  className: a = "w-full rounded-md border border-gray-300 px-3 py-2",
2576
2577
  id: r = "parentPage"
2577
2578
  }) {
2578
- const i = ie(() => !e || e.length === 0 ? [] : e.filter((h) => !ue(h.slug)).filter((h) => h.slug !== "/").sort((h, f) => h.slug.localeCompare(f.slug)), [e]), l = (u) => Math.max(0, (u.match(/\//g) || []).length - 1), o = (u) => "    ".repeat(u), d = (u) => {
2579
+ const i = ie(() => !e || e.length === 0 ? [] : e.filter((h) => !he(h.slug)).filter((h) => h.slug !== "/").sort((h, f) => h.slug.localeCompare(f.slug)), [e]), l = (u) => Math.max(0, (u.match(/\//g) || []).length - 1), o = (u) => "    ".repeat(u), d = (u) => {
2579
2580
  if (u === "/") return "/";
2580
2581
  const h = u.split("/").filter(Boolean);
2581
2582
  if (h.length <= 1) {
2582
2583
  const p = h[0] || "";
2583
- return `/${Nt(p)}`;
2584
+ return `/${St(p)}`;
2584
2585
  }
2585
2586
  const f = h[h.length - 1];
2586
- return `/${Nt(f)}`;
2587
+ return `/${St(f)}`;
2587
2588
  };
2588
2589
  return /* @__PURE__ */ c("div", { className: "space-y-0.5", children: [
2589
2590
  /* @__PURE__ */ s(re, { htmlFor: r, className: "text-sm", children: "Parent" }),
@@ -2620,7 +2621,7 @@ function mr({
2620
2621
  onValidationChange: r
2621
2622
  }) {
2622
2623
  const [i, l] = A(e), [o, d] = A(null);
2623
- Ne(() => {
2624
+ we(() => {
2624
2625
  l(e);
2625
2626
  }, [e]);
2626
2627
  const u = (h) => {
@@ -2653,7 +2654,7 @@ const Oo = ({
2653
2654
  isLoading: a = !1
2654
2655
  }) => {
2655
2656
  const [r, i] = A("");
2656
- if (Ne(() => {
2657
+ if (we(() => {
2657
2658
  if (t) {
2658
2659
  const o = e.find((d) => d.id === t);
2659
2660
  i((o == null ? void 0 : o.preview) || "");
@@ -2677,7 +2678,7 @@ const Oo = ({
2677
2678
  children: [
2678
2679
  /* @__PURE__ */ s("option", { value: "", children: "No Template" }),
2679
2680
  Object.entries(l).map(
2680
- ([o, d]) => /* @__PURE__ */ s("optgroup", { label: o, children: d.map((u) => /* @__PURE__ */ s("option", { value: u.id, children: en(u.name) }, u.id)) }, o)
2681
+ ([o, d]) => /* @__PURE__ */ s("optgroup", { label: o, children: d.map((u) => /* @__PURE__ */ s("option", { value: u.id, children: tn(u.name) }, u.id)) }, o)
2681
2682
  )
2682
2683
  ]
2683
2684
  }
@@ -2715,7 +2716,7 @@ const Oo = ({
2715
2716
  });
2716
2717
  }, Mo = (e) => {
2717
2718
  const { data: t = [], isLoading: n } = Bo(e), { data: a = [], isLoading: r } = Ro(), i = ie(() => n || r ? [] : t.map((o) => {
2718
- const d = Se(a, { id: o.library });
2719
+ const d = be(a, { id: o.library });
2719
2720
  return {
2720
2721
  ...o,
2721
2722
  libraryName: (d == null ? void 0 : d.type) !== "shared" ? "Site Library" : (d == null ? void 0 : d.name) + " Library",
@@ -2746,11 +2747,11 @@ function Fo({
2746
2747
  var P, ae;
2747
2748
  const r = Hs(), i = !!(e != null && e.id), { data: l } = es(), { mutate: o, isPending: d } = dr(), { mutate: u, isPending: h } = zs(), [f, y] = A(null), [p, g] = A(!0), [N, E] = A(
2748
2749
  (e == null ? void 0 : e.pageType) ?? "page"
2749
- ), { hasPermission: G } = Vt(), w = G(pe.CHANGE_PAGE_TYPE), [I, b] = A(!1), [D, B] = A(""), Z = ie(() => {
2750
- const x = t.find(
2751
- (ge) => ge.key === N
2750
+ ), { hasPermission: G } = Kt(), w = G(pe.CHANGE_PAGE_TYPE), [I, b] = A(!1), [D, B] = A(""), Z = ie(() => {
2751
+ const S = t.find(
2752
+ (le) => le.key === N
2752
2753
  );
2753
- return (x == null ? void 0 : x.hasSlug) === !1;
2754
+ return (S == null ? void 0 : S.hasSlug) === !1;
2754
2755
  }, [N, t]), [J, O] = A(
2755
2756
  (e == null ? void 0 : e.parent) ?? ""
2756
2757
  ), [L, q] = A((e == null ? void 0 : e.name) ?? ""), [X, ne] = A(
@@ -2759,23 +2760,23 @@ function Fo({
2759
2760
  X ? "" : ((e == null ? void 0 : e.slug) ?? "").split("/").pop() || ""
2760
2761
  ), [z, Te] = A(
2761
2762
  (e == null ? void 0 : e.dynamicSlugCustom) ?? ""
2762
- ), [De, Ze] = A(!0), [v, m] = A(""), { data: S, isLoading: U } = Mo(N), R = d || h, C = t.find(
2763
- (x) => x.key === N
2764
- ), W = (x) => {
2765
- if (i && N !== x) {
2766
- B(x), b(!0);
2763
+ ), [De, Ze] = A(!0), [v, m] = A(""), { data: x, isLoading: U } = Mo(N), R = d || h, C = t.find(
2764
+ (S) => S.key === N
2765
+ ), W = (S) => {
2766
+ if (i && N !== S) {
2767
+ B(S), b(!0);
2767
2768
  return;
2768
2769
  }
2769
- E(x);
2770
+ E(S);
2770
2771
  }, M = () => {
2771
2772
  E(D), b(!1), ne(!1);
2772
- }, Q = (x) => {
2773
- ne(x), x ? k("") : Te("");
2774
- }, oe = (x) => {
2775
- if (O(x), x && x !== "none") {
2776
- const ge = l == null ? void 0 : l.find(
2777
- (Fe) => Fe.id === x
2778
- ), Qe = (ge == null ? void 0 : ge.slug) || "";
2773
+ }, Q = (S) => {
2774
+ ne(S), S ? k("") : Te("");
2775
+ }, ce = (S) => {
2776
+ if (O(S), S && S !== "none") {
2777
+ const le = l == null ? void 0 : l.find(
2778
+ (Fe) => Fe.id === S
2779
+ ), Qe = (le == null ? void 0 : le.slug) || "";
2779
2780
  if (Y.startsWith(Qe)) {
2780
2781
  const Fe = Y.slice(Qe.length).replace(/^\/+/, "");
2781
2782
  k(Fe);
@@ -2783,10 +2784,10 @@ function Fo({
2783
2784
  k(Y.replace(/^\/+/, ""));
2784
2785
  } else
2785
2786
  k(Y ? `${Y}` : "");
2786
- }, be = (x) => {
2787
- m(x);
2788
- }, ce = () => L.trim() ? X && !ue(Y) ? (y("Slug must be empty when using dynamic slug"), !1) : X && !De ? (y("Dynamic slug is invalid"), !1) : !0 : (j.error("Name is required"), !1), Ee = () => {
2789
- const x = {
2787
+ }, Ee = (S) => {
2788
+ m(S);
2789
+ }, de = () => L.trim() ? X && !he(Y) ? (y("Slug must be empty when using dynamic slug"), !1) : X && !De ? (y("Dynamic slug is invalid"), !1) : !0 : (j.error("Name is required"), !1), Ne = () => {
2790
+ const S = {
2790
2791
  pageType: C == null ? void 0 : C.key,
2791
2792
  name: L,
2792
2793
  slug: "",
@@ -2799,20 +2800,20 @@ function Fo({
2799
2800
  j.success((C == null ? void 0 : C.name) + " updated successfully"), n();
2800
2801
  }
2801
2802
  }
2802
- ) : o(x, {
2803
- onSuccess: (ge) => {
2804
- console.log("response", ge), n(), r(ge.page.id, a);
2803
+ ) : o(S, {
2804
+ onSuccess: (le) => {
2805
+ console.log("response", le), n(), r(le.page.id, a);
2805
2806
  }
2806
2807
  });
2807
- }, Pe = (x, ge) => {
2808
- if (!x.trim() && !X)
2808
+ }, Pe = (S, le) => {
2809
+ if (!S.trim() && !X)
2809
2810
  return y("Child page slug is required"), !1;
2810
- const Qe = Nt(ge), Fe = la(Qe, x);
2811
- return Object.keys(Xe).some((Cn) => Fe === `/${Cn}` || (Fe == null ? void 0 : Fe.startsWith(`/${Cn}/`))) ? (y(
2811
+ const Qe = St(le), Fe = la(Qe, S);
2812
+ return Object.keys(Xe).some((Tt) => Fe === `/${Tt}` || (Fe == null ? void 0 : Fe.startsWith(`/${Tt}/`))) ? (y(
2812
2813
  "Slugs cannot start with a language code for primary page"
2813
2814
  ), !1) : !0;
2814
- }, se = (x, ge) => {
2815
- const Qe = Nt(ge), Fe = la(Qe, x), xt = {
2815
+ }, se = (S, le) => {
2816
+ const Qe = St(le), Fe = la(Qe, S), gt = {
2816
2817
  pageType: N,
2817
2818
  name: L,
2818
2819
  slug: Fe.replace(/\/$/, ""),
@@ -2820,50 +2821,62 @@ function Fo({
2820
2821
  parent: J,
2821
2822
  dynamic: X,
2822
2823
  hasSlug: !0,
2823
- template: v || void 0
2824
+ template: v || void 0,
2825
+ tracking: {}
2824
2826
  };
2825
- X && (xt.dynamicSlugCustom = z), i ? u(
2826
- { id: e == null ? void 0 : e.id, ...xt },
2827
- {
2828
- onSuccess: () => {
2829
- j.success("Page updated successfully"), n();
2827
+ if (X && (gt.dynamicSlugCustom = z), i)
2828
+ u(
2829
+ { id: e == null ? void 0 : e.id, ...gt },
2830
+ {
2831
+ onSuccess: () => {
2832
+ j.success("Page updated successfully"), n();
2833
+ }
2830
2834
  }
2831
- }
2832
- ) : o(xt, {
2833
- onSuccess: (At) => {
2834
- console.log("response", At), n(), r(At.page.id, a);
2835
- }
2836
- });
2835
+ );
2836
+ else {
2837
+ const dt = be(t, { key: N });
2838
+ dt != null && dt.trackingDefault && (gt.tracking = dt.trackingDefault), o(gt, {
2839
+ onSuccess: (Tt) => {
2840
+ n(), r(Tt.page.id, a);
2841
+ }
2842
+ });
2843
+ }
2837
2844
  }, Le = () => {
2838
- const x = {
2845
+ const S = {
2839
2846
  pageType: N,
2840
2847
  name: L,
2841
2848
  slug: Y === "" ? "/" : `/${Y.replace(/\/$/, "")}`,
2842
2849
  template: v || void 0,
2843
- parent: null
2850
+ parent: null,
2851
+ tracking: {}
2844
2852
  };
2845
- i ? u(
2846
- { id: e == null ? void 0 : e.id, ...x },
2847
- {
2853
+ if (i)
2854
+ u(
2855
+ { id: e == null ? void 0 : e.id, ...S },
2856
+ {
2857
+ onSuccess: () => {
2858
+ j.success("Page updated successfully"), n();
2859
+ }
2860
+ }
2861
+ );
2862
+ else {
2863
+ const le = be(t, { key: N });
2864
+ le != null && le.trackingDefault && (S.tracking = le.trackingDefault), o(S, {
2848
2865
  onSuccess: () => {
2849
- j.success("Page updated successfully"), n();
2866
+ n();
2850
2867
  }
2851
- }
2852
- ) : o(x, {
2853
- onSuccess: () => {
2854
- n();
2855
- }
2856
- });
2857
- }, Ue = (x) => {
2858
- if (x.preventDefault(), y(null), !!ce()) {
2868
+ });
2869
+ }
2870
+ }, Ue = (S) => {
2871
+ if (S.preventDefault(), y(null), !!de()) {
2859
2872
  if (!(C != null && C.hasSlug)) {
2860
- Ee();
2873
+ Ne();
2861
2874
  return;
2862
2875
  }
2863
2876
  if (J && J !== "none") {
2864
- const ge = l == null ? void 0 : l.find(
2877
+ const le = l == null ? void 0 : l.find(
2865
2878
  (Fe) => Fe.id === J
2866
- ), Qe = (ge == null ? void 0 : ge.slug) || "";
2879
+ ), Qe = (le == null ? void 0 : le.slug) || "";
2867
2880
  if (!Pe(Y, Qe))
2868
2881
  return;
2869
2882
  se(Y, Qe);
@@ -2880,11 +2893,11 @@ function Fo({
2880
2893
  id: "pageType",
2881
2894
  value: N,
2882
2895
  disabled: i && !w,
2883
- onChange: (x) => W(x.target.value),
2896
+ onChange: (S) => W(S.target.value),
2884
2897
  className: `w-full rounded-md border border-gray-300 px-3 py-2 ${i && !w ? "cursor-not-allowed text-gray-500" : ""}`,
2885
- children: i ? Z ? /* @__PURE__ */ s("optgroup", { label: "Partials", children: t.filter((x) => x.hasSlug === !1).map((x) => /* @__PURE__ */ s("option", { value: x.key, children: x.name }, x.key)) }) : /* @__PURE__ */ s("optgroup", { label: "Pages", children: t.filter((x) => x.hasSlug !== !1).map((x) => /* @__PURE__ */ s("option", { value: x.key, children: x.name }, x.key)) }) : /* @__PURE__ */ c(ve, { children: [
2886
- /* @__PURE__ */ s("optgroup", { label: "Pages", children: t.filter((x) => x.hasSlug !== !1).map((x) => /* @__PURE__ */ s("option", { value: x.key, children: x.name }, x.key)) }),
2887
- /* @__PURE__ */ s("optgroup", { label: "Partials", children: t.filter((x) => x.hasSlug === !1).map((x) => /* @__PURE__ */ s("option", { value: x.key, children: x.name }, x.key)) })
2898
+ children: i ? Z ? /* @__PURE__ */ s("optgroup", { label: "Partials", children: t.filter((S) => S.hasSlug === !1).map((S) => /* @__PURE__ */ s("option", { value: S.key, children: S.name }, S.key)) }) : /* @__PURE__ */ s("optgroup", { label: "Pages", children: t.filter((S) => S.hasSlug !== !1).map((S) => /* @__PURE__ */ s("option", { value: S.key, children: S.name }, S.key)) }) : /* @__PURE__ */ c(ve, { children: [
2899
+ /* @__PURE__ */ s("optgroup", { label: "Pages", children: t.filter((S) => S.hasSlug !== !1).map((S) => /* @__PURE__ */ s("option", { value: S.key, children: S.name }, S.key)) }),
2900
+ /* @__PURE__ */ s("optgroup", { label: "Partials", children: t.filter((S) => S.hasSlug === !1).map((S) => /* @__PURE__ */ s("option", { value: S.key, children: S.name }, S.key)) })
2888
2901
  ] })
2889
2902
  }
2890
2903
  ),
@@ -2912,14 +2925,14 @@ function Fo({
2912
2925
  ] })
2913
2926
  ] })
2914
2927
  ] }),
2915
- !i && (C == null ? void 0 : C.hasSlug) && S.length > 0 && /* @__PURE__ */ c("div", { className: "space-y-1", children: [
2928
+ !i && (C == null ? void 0 : C.hasSlug) && x.length > 0 && /* @__PURE__ */ c("div", { className: "space-y-1", children: [
2916
2929
  /* @__PURE__ */ s(re, { className: "text-sm mb-1 block", children: "Template" }),
2917
2930
  /* @__PURE__ */ s(
2918
2931
  Oo,
2919
2932
  {
2920
- templates: S,
2933
+ templates: x,
2921
2934
  selectedTemplateId: v,
2922
- onSelectTemplate: be,
2935
+ onSelectTemplate: Ee,
2923
2936
  isLoading: U
2924
2937
  }
2925
2938
  )
@@ -2929,7 +2942,7 @@ function Fo({
2929
2942
  {
2930
2943
  pages: l,
2931
2944
  selectedParentId: J,
2932
- onChange: oe
2945
+ onChange: ce
2933
2946
  }
2934
2947
  ),
2935
2948
  /* @__PURE__ */ c("div", { className: "space-y-0.5", children: [
@@ -2939,7 +2952,7 @@ function Fo({
2939
2952
  {
2940
2953
  id: "name",
2941
2954
  value: L,
2942
- onChange: (x) => q(x.target.value),
2955
+ onChange: (S) => q(S.target.value),
2943
2956
  required: !0,
2944
2957
  "aria-required": "true"
2945
2958
  }
@@ -2953,7 +2966,7 @@ function Fo({
2953
2966
  type: "checkbox",
2954
2967
  id: "useDynamicSlug",
2955
2968
  checked: X,
2956
- onChange: (x) => Q(x.target.checked),
2969
+ onChange: (S) => Q(S.target.checked),
2957
2970
  className: "rounded border-gray-300"
2958
2971
  }
2959
2972
  ),
@@ -2978,7 +2991,7 @@ function Fo({
2978
2991
  value: Y,
2979
2992
  onChange: k,
2980
2993
  placeholder: J && J !== "none" ? "Enter page slug" : N === "page" ? "Leave empty for home page" : "Required - e.g. your-slug",
2981
- parentSlug: J && J !== "none" ? (ae = l == null ? void 0 : l.find((x) => x.id === J)) == null ? void 0 : ae.slug : void 0,
2994
+ parentSlug: J && J !== "none" ? (ae = l == null ? void 0 : l.find((S) => S.id === J)) == null ? void 0 : ae.slug : void 0,
2982
2995
  onValidationChange: g
2983
2996
  }
2984
2997
  ),
@@ -3009,9 +3022,9 @@ function Fo({
3009
3022
  id: "pageType",
3010
3023
  value: N,
3011
3024
  disabled: i && !w,
3012
- onChange: (x) => W(x.target.value),
3025
+ onChange: (S) => W(S.target.value),
3013
3026
  className: `w-full rounded-md border border-gray-300 px-3 py-2 ${i && !w ? "cursor-not-allowed text-gray-500" : ""}`,
3014
- children: /* @__PURE__ */ s("optgroup", { label: "Partials", children: t.filter((x) => x.hasSlug === !1).map((x) => /* @__PURE__ */ s("option", { value: x.key, children: x.name }, x.key)) })
3027
+ children: /* @__PURE__ */ s("optgroup", { label: "Partials", children: t.filter((S) => S.hasSlug === !1).map((S) => /* @__PURE__ */ s("option", { value: S.key, children: S.name }, S.key)) })
3015
3028
  }
3016
3029
  ),
3017
3030
  I && /* @__PURE__ */ c("div", { className: "mt-2 p-3 bg-yellow-50 border border-yellow-200 rounded-md", children: [
@@ -3037,7 +3050,7 @@ function Fo({
3037
3050
  )
3038
3051
  ] })
3039
3052
  ] }),
3040
- /* @__PURE__ */ s("p", { className: "text-xs text-gray-500", children: (P = t.find((x) => x.key === N)) == null ? void 0 : P.helpText })
3053
+ /* @__PURE__ */ s("p", { className: "text-xs text-gray-500", children: (P = t.find((S) => S.key === N)) == null ? void 0 : P.helpText })
3041
3054
  ] }),
3042
3055
  /* @__PURE__ */ c("div", { className: "space-y-0.5", children: [
3043
3056
  /* @__PURE__ */ s(re, { htmlFor: "name", className: "text-sm", children: "Name" }),
@@ -3046,7 +3059,7 @@ function Fo({
3046
3059
  {
3047
3060
  id: "name",
3048
3061
  value: L,
3049
- onChange: (x) => q(x.target.value),
3062
+ onChange: (S) => q(S.target.value),
3050
3063
  required: !0,
3051
3064
  "aria-required": "true"
3052
3065
  }
@@ -3113,7 +3126,7 @@ const jo = ({
3113
3126
  page: e,
3114
3127
  onClose: t
3115
3128
  }) => {
3116
- const { mutate: n, isPending: a } = qo(), [r, i] = A(null), [l, o] = A(`${e.name} (Copy)`), d = ue(e.slug), [u, h] = A(
3129
+ const { mutate: n, isPending: a } = qo(), [r, i] = A(null), [l, o] = A(`${e.name} (Copy)`), d = he(e.slug), [u, h] = A(
3117
3130
  d ? "" : `${e.slug.split("/").pop()}-copy`
3118
3131
  ), f = d ? "" : di(e.slug.split("/")).join("/"), [y, p] = A(!1), g = (N) => {
3119
3132
  if (N.preventDefault(), !l.trim()) {
@@ -3229,9 +3242,9 @@ const jo = ({
3229
3242
  page: e,
3230
3243
  onClose: t
3231
3244
  }) => {
3232
- const [n, a] = A(!1), [r, i] = A(""), [l, o] = A(""), [d, u] = A(!1), h = ut(null), f = So(), { data: y } = Re(), p = y == null ? void 0 : y.find(
3245
+ const [n, a] = A(!1), [r, i] = A(""), [l, o] = A(""), [d, u] = A(!1), h = ht(null), f = So(), { data: y } = Re(), p = y == null ? void 0 : y.find(
3233
3246
  (I) => I.key === e.pageType
3234
- ), g = (p == null ? void 0 : p.name) || en(e.pageType), N = ye(
3247
+ ), g = (p == null ? void 0 : p.name) || tn(e.pageType), N = ye(
3235
3248
  (I) => {
3236
3249
  var D;
3237
3250
  const b = (D = I.target.files) == null ? void 0 : D[0];
@@ -3294,10 +3307,10 @@ const jo = ({
3294
3307
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
3295
3308
  /* @__PURE__ */ s(dl, { className: "w-4 h-4 text-slate-500" }),
3296
3309
  /* @__PURE__ */ s("span", { className: "font-medium text-slate-500", children: "Page Name:" }),
3297
- /* @__PURE__ */ s("span", { className: "font-semibold", children: en(e.name) })
3310
+ /* @__PURE__ */ s("span", { className: "font-semibold", children: tn(e.name) })
3298
3311
  ] }),
3299
3312
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
3300
- /* @__PURE__ */ s(xn, { className: "w-4 h-4 text-slate-500" }),
3313
+ /* @__PURE__ */ s(An, { className: "w-4 h-4 text-slate-500" }),
3301
3314
  /* @__PURE__ */ s("span", { className: "font-medium text-slate-500", children: "Type:" }),
3302
3315
  /* @__PURE__ */ s("span", { className: "font-semibold", children: g })
3303
3316
  ] })
@@ -3305,7 +3318,7 @@ const jo = ({
3305
3318
  /* @__PURE__ */ c("div", { children: [
3306
3319
  /* @__PURE__ */ s(re, { htmlFor: "description", className: "text-xs font-medium", children: "Description (Optional)" }),
3307
3320
  /* @__PURE__ */ s(
3308
- Ct,
3321
+ Pt,
3309
3322
  {
3310
3323
  id: "description",
3311
3324
  placeholder: "Describe this template's purpose",
@@ -3342,7 +3355,7 @@ const jo = ({
3342
3355
  /* @__PURE__ */ s("div", { className: "animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full" }),
3343
3356
  "Uploading..."
3344
3357
  ] }) : /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
3345
- /* @__PURE__ */ s(nn, { className: "h-4 w-4" }),
3358
+ /* @__PURE__ */ s(sn, { className: "h-4 w-4" }),
3346
3359
  "Select image"
3347
3360
  ] })
3348
3361
  }
@@ -3430,7 +3443,7 @@ const jo = ({
3430
3443
  )
3431
3444
  ] }) });
3432
3445
  }, Ho = ({ currentEditor: e }) => {
3433
- const { user: t } = mt(), { data: n } = Ht(e);
3446
+ const { user: t } = ft(), { data: n } = Wt(e);
3434
3447
  return !n || !e || e === (t == null ? void 0 : t.id) ? null : /* @__PURE__ */ s("span", { className: "ml-2 text-xs font-light text-gray-500 flex items-center gap-1", children: /* @__PURE__ */ c(st, { children: [
3435
3448
  /* @__PURE__ */ s(at, { children: /* @__PURE__ */ s(Ds, { className: "w-3 h-3" }) }),
3436
3449
  /* @__PURE__ */ s(rt, { children: /* @__PURE__ */ c("p", { children: [
@@ -3450,11 +3463,11 @@ const jo = ({
3450
3463
  setUnmarkAsTemplate: d,
3451
3464
  setDuplicatePage: u
3452
3465
  }) => {
3453
- const h = Hs(), { data: f } = Re(), { hasPermission: y } = Vt(), [, p] = Pa(), g = ie(
3454
- () => Se(f, { key: t.pageType }),
3466
+ const h = Hs(), { data: f } = Re(), { hasPermission: y } = Kt(), [, p] = Pa(), g = ie(
3467
+ () => be(f, { key: t.pageType }),
3455
3468
  [f, t.pageType]
3456
3469
  ), N = ie(() => {
3457
- const b = ee(t, "slug", ""), D = e ? Nt(e) : "", B = D ? b.replace(D, "") : b;
3470
+ const b = ee(t, "slug", ""), D = e ? St(e) : "", B = D ? b.replace(D, "") : b;
3458
3471
  return B || "/";
3459
3472
  }, [t, e]), E = !y(pe.EDIT_PAGE) && !y(pe.DELETE_PAGE) && !y(pe.UNPUBLISH_PAGE), G = ie(() => !!t.isTemplate, [t.isTemplate]), w = ie(
3460
3473
  () => !!(g != null && g.hasSlug),
@@ -3475,7 +3488,7 @@ const jo = ({
3475
3488
  className: "w-4 h-4 text-slate-500 stroke-[1]",
3476
3489
  dangerouslySetInnerHTML: { __html: g.icon }
3477
3490
  }
3478
- ) : g != null && g.hasSlug ? /* @__PURE__ */ s(xn, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ s(hl, { className: "w-4 h-4 text-slate-500 stroke-[1]" }),
3491
+ ) : g != null && g.hasSlug ? /* @__PURE__ */ s(An, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ s(hl, { className: "w-4 h-4 text-slate-500 stroke-[1]" }),
3479
3492
  /* @__PURE__ */ s(
3480
3493
  "div",
3481
3494
  {
@@ -3515,9 +3528,9 @@ const jo = ({
3515
3528
  ] }),
3516
3529
  /* @__PURE__ */ c("div", { className: "flex items-center space-x-4", children: [
3517
3530
  /* @__PURE__ */ s(Ho, { currentEditor: t.currentEditor }),
3518
- !E && /* @__PURE__ */ c(Nn, { children: [
3519
- /* @__PURE__ */ s(wn, { asChild: !0, onClick: (b) => b.stopPropagation(), children: /* @__PURE__ */ s(Os, { className: "h-4 w-4 hover:stroke-[3]" }) }),
3520
- /* @__PURE__ */ c(Sn, { align: "end", className: "text-sm", children: [
3531
+ !E && /* @__PURE__ */ c(wn, { children: [
3532
+ /* @__PURE__ */ s(Sn, { asChild: !0, onClick: (b) => b.stopPropagation(), children: /* @__PURE__ */ s(Os, { className: "h-4 w-4 hover:stroke-[3]" }) }),
3533
+ /* @__PURE__ */ c(xn, { align: "end", className: "text-sm", children: [
3521
3534
  y(pe.ADD_PAGE) && /* @__PURE__ */ c(
3522
3535
  Be,
3523
3536
  {
@@ -3608,19 +3621,19 @@ const jo = ({
3608
3621
  close: e,
3609
3622
  isOpen: t
3610
3623
  }) => {
3611
- const [, n] = A([]), [a, r] = A(null), [i, l] = A(""), [o, d] = A(null), [u, h] = A(null), [f, y] = A(null), [p, g] = A(null), [N, E] = A(null), { data: G, isFetching: w, refetch: I } = es(), [b, D] = A(""), { hasPermission: B } = Vt(), [Z, J] = Me(), O = Z.get("page"), { data: L } = Re(), q = ye(
3624
+ const [, n] = A([]), [a, r] = A(null), [i, l] = A(""), [o, d] = A(null), [u, h] = A(null), [f, y] = A(null), [p, g] = A(null), [N, E] = A(null), { data: G, isFetching: w, refetch: I } = es(), [b, D] = A(""), { hasPermission: B } = Kt(), [Z, J] = Me(), O = Z.get("page"), { data: L } = Re(), q = ye(
3612
3625
  (k) => {
3613
3626
  var z;
3614
- return (z = Se(L, { key: k })) == null ? void 0 : z.hasSlug;
3627
+ return (z = be(L, { key: k })) == null ? void 0 : z.hasSlug;
3615
3628
  },
3616
3629
  [L]
3617
3630
  );
3618
- Ne(() => {
3631
+ we(() => {
3619
3632
  t && I();
3620
- }, [t, I]), Ne(() => {
3621
- if (!ue(b)) return;
3633
+ }, [t, I]), we(() => {
3634
+ if (!he(b)) return;
3622
3635
  const k = sessionStorage.getItem("pageTypeFilter") || "all";
3623
- !ue(L) && k && (Se(L, { key: k }) ? D(k) : D("all"));
3636
+ !he(L) && k && (be(L, { key: k }) ? D(k) : D("all"));
3624
3637
  }, [L, b]);
3625
3638
  const X = (k) => {
3626
3639
  D(k), sessionStorage.setItem("pageTypeFilter", k);
@@ -3631,15 +3644,15 @@ const jo = ({
3631
3644
  },
3632
3645
  [J, e]
3633
3646
  );
3634
- Ne(() => {
3647
+ we(() => {
3635
3648
  if (O && !w) {
3636
- const k = Se(G, { id: O });
3649
+ const k = be(G, { id: O });
3637
3650
  k && (k != null && k.pageType) ? n((z) => [...z, k == null ? void 0 : k.pageType]) : (window.history.replaceState(null, "", "/"), J(new URLSearchParams({})), window.dispatchEvent(new PopStateEvent("popstate")));
3638
3651
  }
3639
3652
  }, [G, O, w, J]);
3640
3653
  const Y = ie(() => {
3641
3654
  const k = Bn(
3642
- _e(G, (m) => ue(i) ? !0 : tn(Yt(m == null ? void 0 : m.name), Yt(i)) || tn(Yt(m == null ? void 0 : m.slug), Yt(i)))
3655
+ _e(G, (m) => he(i) ? !0 : nn(Qt(m == null ? void 0 : m.name), Qt(i)) || nn(Qt(m == null ? void 0 : m.slug), Qt(i)))
3643
3656
  );
3644
3657
  if (b !== "all")
3645
3658
  return Bn(_e(k, { pageType: b }));
@@ -3650,19 +3663,19 @@ const jo = ({
3650
3663
  const Te = [];
3651
3664
  z.forEach((m) => {
3652
3665
  if (m.parent) {
3653
- const S = z.get(m.parent);
3654
- S ? S.children.push(m) : Te.push(m);
3666
+ const x = z.get(m.parent);
3667
+ x ? x.children.push(m) : Te.push(m);
3655
3668
  } else
3656
3669
  Te.push(m);
3657
3670
  });
3658
- const De = (m) => (m.sort((S, U) => S.name.localeCompare(U.name)), m.forEach((S) => {
3659
- S.children && S.children.length > 0 && De(S.children);
3671
+ const De = (m) => (m.sort((x, U) => x.name.localeCompare(U.name)), m.forEach((x) => {
3672
+ x.children && x.children.length > 0 && De(x.children);
3660
3673
  }), m);
3661
3674
  De(Te);
3662
3675
  const Ze = _e(
3663
3676
  Te,
3664
3677
  (m) => q(m.pageType)
3665
- ).sort((m, S) => m.name.localeCompare(S.name)), v = _e(Te, (m) => !q(m.pageType));
3678
+ ).sort((m, x) => m.name.localeCompare(x.name)), v = _e(Te, (m) => !q(m.pageType));
3666
3679
  return Bn([...Ze, ...v]);
3667
3680
  }, [G, q, i, b]);
3668
3681
  return /* @__PURE__ */ c("div", { className: "flex flex-col justify-between h-full", children: [
@@ -3684,7 +3697,7 @@ const jo = ({
3684
3697
  onChange: (k) => l(k.target.value)
3685
3698
  }
3686
3699
  ),
3687
- !ue(b) && /* @__PURE__ */ c(Bi, { value: b, onValueChange: X, children: [
3700
+ !he(b) && /* @__PURE__ */ c(Bi, { value: b, onValueChange: X, children: [
3688
3701
  /* @__PURE__ */ s(
3689
3702
  Mi,
3690
3703
  {
@@ -3694,7 +3707,7 @@ const jo = ({
3694
3707
  ),
3695
3708
  /* @__PURE__ */ c(ji, { align: "end", children: [
3696
3709
  /* @__PURE__ */ s(is, { value: "all", children: "All" }, "all"),
3697
- !ue(
3710
+ !he(
3698
3711
  _e(L, (k) => k.hasSlug)
3699
3712
  ) && /* @__PURE__ */ c(ve, { children: [
3700
3713
  /* @__PURE__ */ s("div", { className: "px-2 py-1.5 text-xs font-semibold text-gray-500 mt-2 border-t pt-2", children: "Pages" }),
@@ -3714,7 +3727,7 @@ const jo = ({
3714
3727
  )
3715
3728
  )
3716
3729
  ] }),
3717
- !ue(
3730
+ !he(
3718
3731
  _e(L, (k) => !k.hasSlug)
3719
3732
  ) && /* @__PURE__ */ c(ve, { children: [
3720
3733
  /* @__PURE__ */ s("div", { className: "px-2 py-1.5 text-xs font-semibold text-gray-500 mt-2 border-t pt-2", children: "Partials" }),
@@ -3743,8 +3756,8 @@ const jo = ({
3743
3756
  className: "w-full bg-gray-200 rounded h-9 animate-pulse"
3744
3757
  },
3745
3758
  k
3746
- )) }) : ue(Y) ? /* @__PURE__ */ c("div", { className: "h-[70vh] flex flex-col gap-y-1 items-center justify-center text-slate-500 text-sm font-medium", children: [
3747
- /* @__PURE__ */ s(xn, { className: "h-6 w-6 stroke-[1]" }),
3759
+ )) }) : he(Y) ? /* @__PURE__ */ c("div", { className: "h-[70vh] flex flex-col gap-y-1 items-center justify-center text-slate-500 text-sm font-medium", children: [
3760
+ /* @__PURE__ */ s(An, { className: "h-6 w-6 stroke-[1]" }),
3748
3761
  "Empty List!",
3749
3762
  /* @__PURE__ */ s("span", { className: "font-light", children: "Add new page to start" })
3750
3763
  ] }) : /* @__PURE__ */ s("div", { className: "text-sm text-slate-700 space-y-2 h-[70vh] overflow-y-auto", children: We(Y, (k) => /* @__PURE__ */ s(
@@ -3833,7 +3846,7 @@ const jo = ({
3833
3846
  parentSlug: u,
3834
3847
  level: h = 0
3835
3848
  }) => {
3836
- const f = !ue(e == null ? void 0 : e.children);
3849
+ const f = !he(e == null ? void 0 : e.children);
3837
3850
  return /* @__PURE__ */ c("div", { className: "border-0", children: [
3838
3851
  /* @__PURE__ */ s(
3839
3852
  Wo,
@@ -3872,7 +3885,7 @@ const jo = ({
3872
3885
  const e = ot("logo", null);
3873
3886
  return e ? /* @__PURE__ */ s("div", { className: "w-full max-h-9 overflow-hidden pr-2", children: Yn.createElement(e, {}) }) : null;
3874
3887
  }, Xo = () => {
3875
- const [e] = Me(), t = e.get("page"), { data: n, isFetching: a } = Ke(), [r, i] = A(!1), { savePage: l } = As(), o = !!t && !ue(n), d = !t || !a && ue(n) || r;
3888
+ const [e] = Me(), t = e.get("page"), { data: n, isFetching: a } = Ke(), [r, i] = A(!1), { savePage: l } = As(), o = !!t && !he(n), d = !t || !a && he(n) || r;
3876
3889
  return /* @__PURE__ */ c(ve, { children: [
3877
3890
  /* @__PURE__ */ c(
3878
3891
  T,
@@ -3886,7 +3899,7 @@ const jo = ({
3886
3899
  /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s(fl, { className: "h-4 w-4" }) }),
3887
3900
  /* @__PURE__ */ c("span", { className: "truncate leading-tight flex items-center max-w-[200px]", children: [
3888
3901
  /* @__PURE__ */ s("span", { className: "text-slate-600 pr-1 font-light", children: "Editing:" }),
3889
- a ? /* @__PURE__ */ s(Et, { className: "h-4 w-4 animate-spin text-slate-400 ml-2" }) : en(ee(n, "name")) ?? ""
3902
+ a ? /* @__PURE__ */ s(wt, { className: "h-4 w-4 animate-spin text-slate-400 ml-2" }) : tn(ee(n, "name")) ?? ""
3890
3903
  ] })
3891
3904
  ]
3892
3905
  },
@@ -3906,7 +3919,7 @@ const jo = ({
3906
3919
  children: [
3907
3920
  /* @__PURE__ */ c(za, { className: "mb-3", children: [
3908
3921
  /* @__PURE__ */ c($a, { className: "text-sm flex items-center gap-2 font-semibold", children: [
3909
- /* @__PURE__ */ s("div", { className: "p-2 rounded-md bg-primary text-primary-foreground", children: /* @__PURE__ */ s(xn, { className: "w-6 h-6" }) }),
3922
+ /* @__PURE__ */ s("div", { className: "p-2 rounded-md bg-primary text-primary-foreground", children: /* @__PURE__ */ s(An, { className: "w-6 h-6" }) }),
3910
3923
  /* @__PURE__ */ c("div", { className: "flex flex-col", children: [
3911
3924
  /* @__PURE__ */ s("span", { className: "text-sm font-semibold", children: "Pages" }),
3912
3925
  /* @__PURE__ */ s(
@@ -3929,15 +3942,15 @@ const jo = ({
3929
3942
  )
3930
3943
  ] });
3931
3944
  }, Zo = () => {
3932
- const { fallbackLang: e, languages: t, selectedLang: n, setSelectedLang: a } = lt(), r = ue(n) ? e : n, [, i] = Me();
3933
- Ne(() => {
3945
+ const { fallbackLang: e, languages: t, selectedLang: n, setSelectedLang: a } = lt(), r = he(n) ? e : n, [, i] = Me();
3946
+ we(() => {
3934
3947
  const g = new URLSearchParams(window.location.search), N = g.get("lang");
3935
3948
  N && (t.includes(N) ? a(N) : (g.delete("lang"), i(g), a("")));
3936
3949
  }, [t, i, a]);
3937
- const [l, o] = A(null), { data: d } = Ke(), { data: u } = wt(), { data: h, isFetching: f } = Kt(), y = ie(() => {
3950
+ const [l, o] = A(null), { data: d } = Ke(), { data: u } = xt(), { data: h, isFetching: f } = Ht(), y = ie(() => {
3938
3951
  const g = Bn(
3939
3952
  We(ee(u, "languages"), (N) => {
3940
- const E = Se(h, { lang: N });
3953
+ const E = be(h, { lang: N });
3941
3954
  return {
3942
3955
  key: N,
3943
3956
  value: ee(Xe, N, N),
@@ -3960,14 +3973,14 @@ const jo = ({
3960
3973
  const E = N.toString(), G = `${window.location.pathname}${E ? `?${E}` : ""}`;
3961
3974
  window.history.pushState({}, "", G), i(N), window.dispatchEvent(new PopStateEvent("popstate"));
3962
3975
  };
3963
- return ue(t) || f ? null : /* @__PURE__ */ c(ve, { children: [
3964
- /* @__PURE__ */ c(Nn, { children: [
3965
- /* @__PURE__ */ s(wn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ c(T, { variant: "ghost", size: "sm", className: "gap-2", children: [
3976
+ return he(t) || f ? null : /* @__PURE__ */ c(ve, { children: [
3977
+ /* @__PURE__ */ c(wn, { children: [
3978
+ /* @__PURE__ */ s(Sn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ c(T, { variant: "ghost", size: "sm", className: "gap-2", children: [
3966
3979
  /* @__PURE__ */ s(gl, { className: "w-4 h-4" }),
3967
3980
  ee(Xe, r, r),
3968
3981
  /* @__PURE__ */ s(Wa, { className: "w-4 h-4" })
3969
3982
  ] }) }),
3970
- /* @__PURE__ */ c(Sn, { className: "border-border space-y-1", children: [
3983
+ /* @__PURE__ */ c(xn, { className: "border-border space-y-1", children: [
3971
3984
  We(
3972
3985
  y.filter((g) => g.isLangPageAdded),
3973
3986
  (g) => /* @__PURE__ */ c(
@@ -3995,7 +4008,7 @@ const jo = ({
3995
4008
  g.value
3996
4009
  )
3997
4010
  ),
3998
- !ue(y.filter((g) => !g.isLangPageAdded)) && /* @__PURE__ */ c(ve, { children: [
4011
+ !he(y.filter((g) => !g.isLangPageAdded)) && /* @__PURE__ */ c(ve, { children: [
3999
4012
  /* @__PURE__ */ s(zi, {}),
4000
4013
  /* @__PURE__ */ c(
4001
4014
  T,
@@ -4085,7 +4098,7 @@ function sc() {
4085
4098
  const { data: e } = Ke(), { saveState: t } = As(), [n] = qs();
4086
4099
  return e ? /* @__PURE__ */ s("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: [
4087
4100
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ s("p", { className: "text-sm flex items-center gap-1 font-medium leading-none", children: /* @__PURE__ */ s("span", { className: "font-bold", children: "Currently editing" }) }) }),
4088
- /* @__PURE__ */ s("div", { className: "flex items-center text-xs text-muted-foreground", children: !ue(n.lastSaved) && /* @__PURE__ */ c("span", { children: [
4101
+ /* @__PURE__ */ s("div", { className: "flex items-center text-xs text-muted-foreground", children: !he(n.lastSaved) && /* @__PURE__ */ c("span", { children: [
4089
4102
  "Last updated",
4090
4103
  " ",
4091
4104
  Rl(new Date(n.lastSaved), {
@@ -4105,7 +4118,7 @@ function sc() {
4105
4118
  ] }) }) : null;
4106
4119
  }
4107
4120
  function ac() {
4108
- const [e, t] = we.useState(!1), [n, a] = we.useState(null), [r, i] = we.useState(!1), [l, o] = we.useState(!1), { data: d } = Ke(), {
4121
+ const [e, t] = Se.useState(!1), [n, a] = Se.useState(null), [r, i] = Se.useState(!1), [l, o] = Se.useState(!1), { data: d } = Ke(), {
4109
4122
  data: u,
4110
4123
  isFetching: h,
4111
4124
  error: f,
@@ -4132,10 +4145,10 @@ function ac() {
4132
4145
  }
4133
4146
  });
4134
4147
  };
4135
- return Ne(() => {
4148
+ return we(() => {
4136
4149
  e && y();
4137
4150
  }, [e, y]), /* @__PURE__ */ c(ve, { children: [
4138
- /* @__PURE__ */ s(gt, { children: /* @__PURE__ */ c(st, { children: [
4151
+ /* @__PURE__ */ s(yt, { children: /* @__PURE__ */ c(st, { children: [
4139
4152
  /* @__PURE__ */ c(ja, { open: e, onOpenChange: t, children: [
4140
4153
  /* @__PURE__ */ s($i, { asChild: !0, children: /* @__PURE__ */ s(at, { asChild: !0, children: /* @__PURE__ */ c("span", { className: "flex items-center gap-2", children: [
4141
4154
  /* @__PURE__ */ c(T, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
@@ -4214,7 +4227,7 @@ function ic({
4214
4227
  onRestore: n,
4215
4228
  onDelete: a
4216
4229
  }) {
4217
- const { data: r } = Ht(e.currentEditor), i = (r == null ? void 0 : r.name) || "Unknown";
4230
+ const { data: r } = Wt(e.currentEditor), i = (r == null ? void 0 : r.name) || "Unknown";
4218
4231
  return /* @__PURE__ */ c("div", { className: "flex items-start gap-3 rounded-md border p-2 hover:bg-accent/50", children: [
4219
4232
  /* @__PURE__ */ c("div", { className: "flex-1 space-y-1", children: [
4220
4233
  /* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ c("p", { className: "text-sm flex items-center gap-1 font-medium leading-none", children: [
@@ -4262,12 +4275,12 @@ function lc({
4262
4275
  onRestore: t,
4263
4276
  onDelete: n
4264
4277
  }) {
4265
- return /* @__PURE__ */ c(Nn, { children: [
4266
- /* @__PURE__ */ s(wn, { asChild: !0, children: /* @__PURE__ */ c(T, { variant: "ghost", size: "icon", className: "h-7 w-7 -mr-1", children: [
4278
+ return /* @__PURE__ */ c(wn, { children: [
4279
+ /* @__PURE__ */ s(Sn, { asChild: !0, children: /* @__PURE__ */ c(T, { variant: "ghost", size: "icon", className: "h-7 w-7 -mr-1", children: [
4267
4280
  /* @__PURE__ */ s(Os, { className: "h-4 w-4" }),
4268
4281
  /* @__PURE__ */ s("span", { className: "sr-only", children: "More options" })
4269
4282
  ] }) }),
4270
- /* @__PURE__ */ c(Sn, { align: "end", className: "text-xs", children: [
4283
+ /* @__PURE__ */ c(xn, { align: "end", className: "text-xs", children: [
4271
4284
  /* @__PURE__ */ s(He, { permission: pe.RESTORE_REVISION, children: /* @__PURE__ */ c(Be, { onClick: t, className: "cursor-pointer", children: [
4272
4285
  /* @__PURE__ */ s(Ya, { className: "mr-2 h-4 w-4" }),
4273
4286
  /* @__PURE__ */ s("span", { children: "Restore this version" })
@@ -4296,7 +4309,7 @@ function oc({
4296
4309
  onRestore: a,
4297
4310
  isRestoring: r
4298
4311
  }) {
4299
- const { data: i } = Ht((n == null ? void 0 : n.currentEditor) || ""), l = (i == null ? void 0 : i.name) || "Unknown";
4312
+ const { data: i } = Wt((n == null ? void 0 : n.currentEditor) || ""), l = (i == null ? void 0 : i.name) || "Unknown";
4300
4313
  return n ? /* @__PURE__ */ s(
4301
4314
  qe,
4302
4315
  {
@@ -4364,7 +4377,7 @@ function cc({
4364
4377
  onDelete: a,
4365
4378
  isDeleting: r
4366
4379
  }) {
4367
- const { data: i } = Ht((n == null ? void 0 : n.currentEditor) || ""), l = (i == null ? void 0 : i.name) || "Unknown";
4380
+ const { data: i } = Wt((n == null ? void 0 : n.currentEditor) || ""), l = (i == null ? void 0 : i.name) || "Unknown";
4368
4381
  return n ? /* @__PURE__ */ s(
4369
4382
  qe,
4370
4383
  {
@@ -4426,7 +4439,7 @@ const dc = () => {
4426
4439
  queryFn: async () => t(e, { action: _.GET_CHANGES })
4427
4440
  });
4428
4441
  }, uc = ({ currentEditor: e }) => {
4429
- const { data: t } = Ht(e);
4442
+ const { data: t } = Wt(e);
4430
4443
  return t == null ? void 0 : t.name;
4431
4444
  };
4432
4445
  function hc({
@@ -4436,7 +4449,7 @@ function hc({
4436
4449
  const [n, a] = A([]), { data: r, isFetching: i } = dc(), { data: l } = Re(), o = ye(
4437
4450
  (b) => {
4438
4451
  var D;
4439
- return (D = Se(l, { key: b })) == null ? void 0 : D.hasSlug;
4452
+ return (D = be(l, { key: b })) == null ? void 0 : D.hasSlug;
4440
4453
  },
4441
4454
  [l]
4442
4455
  ), d = ie(
@@ -4451,16 +4464,16 @@ function hc({
4451
4464
  () => _e(r, (b) => d.includes(b.pageType)),
4452
4465
  [r, d]
4453
4466
  ), f = ie(
4454
- () => Se(r, { pageType: "theme", id: "THEME" }),
4467
+ () => be(r, { pageType: "theme", id: "THEME" }),
4455
4468
  [r]
4456
4469
  ), { mutate: y, isPending: p } = $s();
4457
- Ne(() => {
4470
+ we(() => {
4458
4471
  const b = We(_e(r, { online: !0 }), "id");
4459
4472
  f && b.push(f == null ? void 0 : f.id), a(b);
4460
4473
  }, [r, f]);
4461
4474
  const g = n.length === (r == null ? void 0 : r.length), N = (b) => {
4462
4475
  a(
4463
- (D) => tn(D, b) ? _e(D, (B) => B !== b) : ui(D, b)
4476
+ (D) => nn(D, b) ? _e(D, (B) => B !== b) : ui(D, b)
4464
4477
  );
4465
4478
  }, E = () => {
4466
4479
  a(g ? [] : We(r, "id"));
@@ -4475,7 +4488,7 @@ function hc({
4475
4488
  );
4476
4489
  }, w = (b) => {
4477
4490
  if (b === "theme") return "Theme";
4478
- const D = Se(l, { key: b });
4491
+ const D = be(l, { key: b });
4479
4492
  return D ? D == null ? void 0 : D.name : b;
4480
4493
  }, I = ie(() => {
4481
4494
  const b = [
@@ -4553,7 +4566,7 @@ function hc({
4553
4566
  /* @__PURE__ */ s(
4554
4567
  "input",
4555
4568
  {
4556
- checked: tn(n, b == null ? void 0 : b.id),
4569
+ checked: nn(n, b == null ? void 0 : b.id),
4557
4570
  onClick: (D) => {
4558
4571
  D.stopPropagation(), N(b == null ? void 0 : b.id);
4559
4572
  },
@@ -4562,7 +4575,7 @@ function hc({
4562
4575
  }
4563
4576
  ),
4564
4577
  " ",
4565
- o(b.pageType) ? /* @__PURE__ */ s(xn, { className: "w-4 h-4" }) : /* @__PURE__ */ s(El, { className: "w-4 h-4" }),
4578
+ o(b.pageType) ? /* @__PURE__ */ s(An, { className: "w-4 h-4" }) : /* @__PURE__ */ s(El, { className: "w-4 h-4" }),
4566
4579
  b.name,
4567
4580
  b.slug && /* @__PURE__ */ c("span", { className: "text-xs text-gray-500", children: [
4568
4581
  "(",
@@ -4599,7 +4612,7 @@ function hc({
4599
4612
  /* @__PURE__ */ s(
4600
4613
  T,
4601
4614
  {
4602
- disabled: p || i || ue(r),
4615
+ disabled: p || i || he(r),
4603
4616
  onClick: G,
4604
4617
  children: p ? "Publishing..." : "Publish"
4605
4618
  }
@@ -4642,7 +4655,7 @@ function gr({
4642
4655
  children: e,
4643
4656
  content: t
4644
4657
  }) {
4645
- return /* @__PURE__ */ s(gt, { children: /* @__PURE__ */ c(st, { children: [
4658
+ return /* @__PURE__ */ s(yt, { children: /* @__PURE__ */ c(st, { children: [
4646
4659
  /* @__PURE__ */ s(at, { asChild: !0, children: e }),
4647
4660
  /* @__PURE__ */ s(rt, { side: "bottom", sideOffset: 10, children: /* @__PURE__ */ s("p", { children: t }) })
4648
4661
  ] }) });
@@ -4651,7 +4664,7 @@ const gc = () => {
4651
4664
  const { selectedLang: e, fallbackLang: t } = lt(), n = ot(
4652
4665
  "getPreviewUrl",
4653
4666
  async (f) => f
4654
- ), [a, r] = A(""), { data: i } = Ke(), { data: l } = Kt(), { data: o } = Re(), d = ie(
4667
+ ), [a, r] = A(""), { data: i } = Ke(), { data: l } = Ht(), { data: o } = Re(), d = ie(
4655
4668
  () => {
4656
4669
  var f;
4657
4670
  return (f = l == null ? void 0 : l.find((y) => (y == null ? void 0 : y.lang) === e)) == null ? void 0 : f.slug;
@@ -4660,11 +4673,11 @@ const gc = () => {
4660
4673
  ), u = ye(
4661
4674
  (f) => {
4662
4675
  var y;
4663
- return (y = Se(o, { key: f })) == null ? void 0 : y.hasSlug;
4676
+ return (y = be(o, { key: f })) == null ? void 0 : y.hasSlug;
4664
4677
  },
4665
4678
  [o]
4666
4679
  ), h = e === t ? "" : e;
4667
- return Ne(() => {
4680
+ return we(() => {
4668
4681
  (async () => {
4669
4682
  if (typeof n == "function") {
4670
4683
  const f = !u(i == null ? void 0 : i.pageType), y = await n(
@@ -4702,8 +4715,8 @@ const gc = () => {
4702
4715
  /* @__PURE__ */ s("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
4703
4716
  ] });
4704
4717
  }, yc = () => {
4705
- const [e, t] = A(!1), { isLocked: n } = Tn(), { savePage: a, saveState: r } = As();
4706
- Ne(() => {
4718
+ const [e, t] = A(!1), { isLocked: n } = Cn(), { savePage: a, saveState: r } = As();
4719
+ we(() => {
4707
4720
  const h = (f) => {
4708
4721
  r === "UNSAVED" && (f.preventDefault(), f.returnValue = !1);
4709
4722
  };
@@ -4714,7 +4727,7 @@ const gc = () => {
4714
4727
  const i = ye(async () => {
4715
4728
  t(!0), await a(!1);
4716
4729
  }, [a]);
4717
- Ne(() => {
4730
+ we(() => {
4718
4731
  r === "SAVED" && t(!1);
4719
4732
  }, [r]);
4720
4733
  const l = ie(() => {
@@ -4731,7 +4744,7 @@ const gc = () => {
4731
4744
  case "SAVING":
4732
4745
  return {
4733
4746
  tooltipContent: H.SAVING,
4734
- buttonIcon: /* @__PURE__ */ s(Et, { className: "w-4 h-4 animate-spin" }),
4747
+ buttonIcon: /* @__PURE__ */ s(wt, { className: "w-4 h-4 animate-spin" }),
4735
4748
  buttonClass: "flex items-center gap-x-1 leading-tight"
4736
4749
  };
4737
4750
  case "SAVED":
@@ -4800,8 +4813,8 @@ const gc = () => {
4800
4813
  ]
4801
4814
  }
4802
4815
  ),
4803
- /* @__PURE__ */ c(Nn, { children: [
4804
- /* @__PURE__ */ s(wn, { asChild: !0, children: /* @__PURE__ */ s(
4816
+ /* @__PURE__ */ c(wn, { children: [
4817
+ /* @__PURE__ */ s(Sn, { asChild: !0, children: /* @__PURE__ */ s(
4805
4818
  T,
4806
4819
  {
4807
4820
  size: "sm",
@@ -4810,7 +4823,7 @@ const gc = () => {
4810
4823
  children: /* @__PURE__ */ s(Wa, { className: "w-4 h-4" })
4811
4824
  }
4812
4825
  ) }),
4813
- /* @__PURE__ */ c(Sn, { align: "end", className: "w-36", children: [
4826
+ /* @__PURE__ */ c(xn, { align: "end", className: "w-36", children: [
4814
4827
  !f && /* @__PURE__ */ c(
4815
4828
  Be,
4816
4829
  {
@@ -4880,11 +4893,11 @@ const gc = () => {
4880
4893
  const { data: e } = Ke(), [t, n] = A(""), a = e && (e == null ? void 0 : e.online), { data: r } = Re(), i = ot("getLiveUrl", async (y) => y), l = ye(
4881
4894
  (y) => {
4882
4895
  var p;
4883
- return (p = Se(r, { key: y })) == null ? void 0 : p.hasSlug;
4896
+ return (p = be(r, { key: y })) == null ? void 0 : p.hasSlug;
4884
4897
  },
4885
4898
  [r]
4886
4899
  ), { selectedLang: o, fallbackLang: d } = lt(), u = e == null ? void 0 : e.id, h = e == null ? void 0 : e.slug, f = o === d ? "" : o;
4887
- return Ne(() => {
4900
+ return we(() => {
4888
4901
  (async () => {
4889
4902
  if (typeof i == "function") {
4890
4903
  const y = !l(e == null ? void 0 : e.pageType), p = await i(
@@ -4917,7 +4930,7 @@ const gc = () => {
4917
4930
  );
4918
4931
  };
4919
4932
  function Nc() {
4920
- const { isLocked: e } = Tn(), [t] = Me(), n = t.get("lang"), a = rr(n);
4933
+ const { isLocked: e } = Cn(), [t] = Me(), n = t.get("lang"), a = rr(n);
4921
4934
  return e || !a ? null : /* @__PURE__ */ c("div", { className: "flex items-center justify-end gap-1", children: [
4922
4935
  /* @__PURE__ */ s(ac, {}),
4923
4936
  /* @__PURE__ */ s(He, { permission: pe.EDIT_THEME, children: /* @__PURE__ */ s(pc, {}) }),
@@ -4961,10 +4974,10 @@ const wc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
4961
4974
  }), Ac = (e) => {
4962
4975
  const t = Bl();
4963
4976
  return ie(() => {
4964
- if (!e || ue(e)) return { blocks: [] };
4977
+ if (!e || he(e)) return { blocks: [] };
4965
4978
  const n = _e(
4966
4979
  e,
4967
- (a) => !tn(a == null ? void 0 : a._type, "@chai/")
4980
+ (a) => !nn(a == null ? void 0 : a._type, "@chai/")
4968
4981
  );
4969
4982
  return { blocks: xc(t, n) };
4970
4983
  }, [e, t]);
@@ -5016,7 +5029,7 @@ const wc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5016
5029
  }
5017
5030
  });
5018
5031
  }, Cc = () => {
5019
- const e = Fs(), t = V(), { user: n } = mt(), a = n == null ? void 0 : n.id;
5032
+ const e = Fs(), t = V(), { user: n } = ft(), a = n == null ? void 0 : n.id;
5020
5033
  return ke({
5021
5034
  queryKey: [F, "permissions", a],
5022
5035
  queryFn: () => t(e, {
@@ -5026,7 +5039,7 @@ const wc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5026
5039
  enabled: !!a
5027
5040
  });
5028
5041
  }, Pc = () => {
5029
- const e = te(), t = V(), { setCurrentEditor: n } = Tn(), [, a] = qs();
5042
+ const e = te(), t = V(), { setCurrentEditor: n } = Cn(), [, a] = qs();
5030
5043
  return { onSave: async ({
5031
5044
  page: i,
5032
5045
  blocks: l
@@ -5050,9 +5063,9 @@ const wc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5050
5063
  getPartialBlocks: ye(async () => {
5051
5064
  const a = {};
5052
5065
  for (const r of e ?? [])
5053
- ue(r == null ? void 0 : r.slug) && (a[r.id] = {
5066
+ he(r == null ? void 0 : r.slug) && (a[r.id] = {
5054
5067
  type: r.pageType,
5055
- name: en(r.name ?? r.slug),
5068
+ name: tn(r.name ?? r.slug),
5056
5069
  description: ""
5057
5070
  });
5058
5071
  return a;
@@ -5077,7 +5090,7 @@ const wc = () => /* @__PURE__ */ c("div", { className: "flex px-2 h-full items-c
5077
5090
  email: Mn.string().email({ message: "Please enter a valid email address" }),
5078
5091
  password: Mn.string().min(6, { message: "Password must be at least 6 characters" })
5079
5092
  }), Ic = () => {
5080
- const { setUser: e, logout: t } = mt(), n = Fs(), [a, r] = A(""), [i, l] = A(""), [o, d] = A({}), [u, h] = A(!1), [f, y] = A(""), p = Ae({
5093
+ const { setUser: e, logout: t } = ft(), n = Fs(), [a, r] = A(""), [i, l] = A(""), [o, d] = A({}), [u, h] = A(!1), [f, y] = A(""), p = Ae({
5081
5094
  mutationFn: async (E) => {
5082
5095
  y("");
5083
5096
  const G = await Ms(n, {
@@ -5233,7 +5246,7 @@ const kc = () => ie(() => hs, [hs]), Qu = (e) => {
5233
5246
  isActive: e,
5234
5247
  show: t
5235
5248
  }) => {
5236
- const { data: n } = wt();
5249
+ const { data: n } = xt();
5237
5250
  return !nt(n, "languages") || !ee(n, "languages", []).length ? null : /* @__PURE__ */ s(T, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ s(Tl, { className: "w-4 h-4" }) });
5238
5251
  }, pr = "lang", Gc = {
5239
5252
  id: pr,
@@ -5244,28 +5257,28 @@ const kc = () => ie(() => hs, [hs]), Qu = (e) => {
5244
5257
  view: "modal",
5245
5258
  width: 400
5246
5259
  };
5247
- function dt({
5260
+ function ut({
5248
5261
  data: e,
5249
5262
  onSelect: t,
5250
5263
  dataType: n = "value",
5251
5264
  disabled: a = !1
5252
5265
  }) {
5253
- const [r, i] = we.useState(!1), [l, o] = we.useState([]), [d, u] = we.useState(e);
5254
- we.useEffect(() => {
5266
+ const [r, i] = Se.useState(!1), [l, o] = Se.useState([]), [d, u] = Se.useState(e);
5267
+ Se.useEffect(() => {
5255
5268
  r || o([]), u(e);
5256
5269
  }, [e, r]);
5257
- const h = (g) => Array.isArray(g) ? "array" : typeof g == "object" && g !== null ? "object" : "value", f = we.useCallback(
5270
+ const h = (g) => Array.isArray(g) ? "array" : typeof g == "object" && g !== null ? "object" : "value", f = Se.useCallback(
5258
5271
  (g) => {
5259
5272
  const N = (E) => n === "value" ? E === "value" || E === "object" : n === "array" ? E === "array" : E === n;
5260
5273
  g.type === "object" ? (o((E) => [...E, g.key]), u(g.value)) : N(g.type) && (t([...l, g.key].join(".")), i(!1));
5261
5274
  },
5262
5275
  [l, t, n]
5263
- ), y = we.useCallback(() => {
5276
+ ), y = Se.useCallback(() => {
5264
5277
  if (l.length > 0) {
5265
5278
  const g = l.slice(0, -1);
5266
5279
  o(g), u(g.reduce((N, E) => N[E], e));
5267
5280
  }
5268
- }, [l, e]), p = we.useMemo(() => Object.entries(d).map(([g, N]) => ({
5281
+ }, [l, e]), p = Se.useMemo(() => Object.entries(d).map(([g, N]) => ({
5269
5282
  key: g,
5270
5283
  value: N,
5271
5284
  type: h(N)
@@ -5334,7 +5347,7 @@ function dt({
5334
5347
  ] });
5335
5348
  }
5336
5349
  const Uc = () => {
5337
- const e = An(), t = xe(), n = V();
5350
+ const e = Tn(), t = xe(), n = V();
5338
5351
  return Ae({
5339
5352
  mutationFn: async ({
5340
5353
  file: a,
@@ -5357,7 +5370,7 @@ const Uc = () => {
5357
5370
  }
5358
5371
  });
5359
5372
  }, Oc = () => {
5360
- const e = An(), t = xe(), n = V();
5373
+ const e = Tn(), t = xe(), n = V();
5361
5374
  return Ae({
5362
5375
  mutationFn: async (a) => n(e, {
5363
5376
  action: _.DELETE_ASSET,
@@ -5375,7 +5388,7 @@ const Uc = () => {
5375
5388
  }
5376
5389
  });
5377
5390
  }, Rc = () => {
5378
- const e = An(), t = xe(), n = V();
5391
+ const e = Tn(), t = xe(), n = V();
5379
5392
  return Ae({
5380
5393
  mutationFn: async (a) => n(e, {
5381
5394
  action: _.UPDATE_ASSET,
@@ -5393,7 +5406,7 @@ const Uc = () => {
5393
5406
  }
5394
5407
  });
5395
5408
  }, Bc = (e = {}) => {
5396
- const t = An(), n = V(), { search: a, page: r = 1, limit: i = 30 } = e;
5409
+ const t = Tn(), n = V(), { search: a, page: r = 1, limit: i = 30 } = e;
5397
5410
  return ke({
5398
5411
  queryKey: [F, _.GET_ASSETS, a, r, i],
5399
5412
  queryFn: async () => {
@@ -5411,7 +5424,7 @@ const Uc = () => {
5411
5424
  retry: 1
5412
5425
  });
5413
5426
  }, Mc = (e) => {
5414
- const t = An(), n = V();
5427
+ const t = Tn(), n = V();
5415
5428
  return ke({
5416
5429
  queryKey: [F, _.GET_ASSET, e],
5417
5430
  queryFn: async () => e ? await n(t, {
@@ -5460,7 +5473,7 @@ const jc = ({
5460
5473
  };
5461
5474
  return Yn.useEffect(() => {
5462
5475
  i != null && i.description && u(i.description);
5463
- }, [i]), l ? /* @__PURE__ */ s("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ s(Et, { className: "h-8 w-8 animate-spin" }) }) : o || !(i != null && i.id) ? /* @__PURE__ */ s("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ c("div", { className: "text-center max-w-md mx-auto p-6", children: [
5476
+ }, [i]), l ? /* @__PURE__ */ s("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ s(wt, { className: "h-8 w-8 animate-spin" }) }) : o || !(i != null && i.id) ? /* @__PURE__ */ s("div", { className: "flex-1 flex items-center justify-center", children: /* @__PURE__ */ c("div", { className: "text-center max-w-md mx-auto p-6", children: [
5464
5477
  /* @__PURE__ */ s("div", { className: "flex justify-center mb-4", children: /* @__PURE__ */ s(Zn, { className: "h-12 w-12 text-gray-400" }) }),
5465
5478
  /* @__PURE__ */ s("h3", { className: "text-lg font-medium text-gray-900 mb-2", children: "No Asset Found" }),
5466
5479
  /* @__PURE__ */ s("p", { className: "text-sm text-gray-500 mb-6", children: o ? "There was an error loading the asset. Please try again later." : "The asset you're looking for doesn't exist or has been removed." }),
@@ -5599,7 +5612,7 @@ const jc = ({
5599
5612
  /* @__PURE__ */ c("div", { className: "grid gap-3 border rounded-md pt-2 bg-gray-100 relative", children: [
5600
5613
  /* @__PURE__ */ s(re, { className: "w-full text-center", children: "Description" }),
5601
5614
  /* @__PURE__ */ s(
5602
- Ct,
5615
+ Pt,
5603
5616
  {
5604
5617
  id: "description",
5605
5618
  value: d,
@@ -5618,7 +5631,7 @@ const jc = ({
5618
5631
  disabled: r || !ua(d, i),
5619
5632
  className: `py-0 bg-blue-500 text-white px-3 py-0.5 rounded-md text-sm ${r || !ua(d, i) ? "opacity-50 cursor-not-allowed" : ""}`,
5620
5633
  children: r ? /* @__PURE__ */ c(ve, { children: [
5621
- /* @__PURE__ */ s(Et, { className: "h-4 w-4 mr-2 animate-spin" }),
5634
+ /* @__PURE__ */ s(wt, { className: "h-4 w-4 mr-2 animate-spin" }),
5622
5635
  "Saving..."
5623
5636
  ] }) : "Save"
5624
5637
  }
@@ -5644,7 +5657,7 @@ const $c = ({
5644
5657
  const p = localStorage.getItem("chai_optimize_images");
5645
5658
  return p !== null ? p === "true" : !0;
5646
5659
  });
5647
- Ne(() => {
5660
+ we(() => {
5648
5661
  localStorage.setItem("chai_optimize_images", l.toString());
5649
5662
  }, [l]);
5650
5663
  const d = e || r, u = ye(
@@ -5702,7 +5715,7 @@ const $c = ({
5702
5715
  "div",
5703
5716
  {
5704
5717
  className: "flex items-center justify-center rounded-full bg-indigo-100 p-2",
5705
- children: /* @__PURE__ */ s(Et, { className: "h-4 w-4 text-indigo-500 animate-spin" })
5718
+ children: /* @__PURE__ */ s(wt, { className: "h-4 w-4 text-indigo-500 animate-spin" })
5706
5719
  }
5707
5720
  ),
5708
5721
  /* @__PURE__ */ c("div", { className: "text-left", children: [
@@ -5782,7 +5795,7 @@ const $c = ({
5782
5795
  }
5783
5796
  )
5784
5797
  ] }),
5785
- /* @__PURE__ */ s(gt, { children: /* @__PURE__ */ c(st, { children: [
5798
+ /* @__PURE__ */ s(yt, { children: /* @__PURE__ */ c(st, { children: [
5786
5799
  /* @__PURE__ */ s(at, { asChild: !0, children: /* @__PURE__ */ s(
5787
5800
  "span",
5788
5801
  {
@@ -5813,9 +5826,9 @@ function yr({
5813
5826
  const l = ie(() => [n], [n]), [o, d] = A(null), [u, h] = A(null), [f, y] = A(null), [p, g] = A({ show: !1, file: "" }), [N, E] = A(!1), [G, w] = A(
5814
5827
  a ? "details" : "grid"
5815
5828
  ), [I, b] = A(""), [D, B] = A(""), [Z, J] = A(1), [O] = A(30), [L, q] = A([]);
5816
- Ne(() => {
5829
+ we(() => {
5817
5830
  a && (d(a), w("details"));
5818
- }, [a]), Ne(() => {
5831
+ }, [a]), we(() => {
5819
5832
  const P = setTimeout(() => {
5820
5833
  b(D), J(1);
5821
5834
  }, 300);
@@ -5825,7 +5838,7 @@ function yr({
5825
5838
  search: I.toLowerCase().trim(),
5826
5839
  page: Z,
5827
5840
  limit: O
5828
- }), Y = (X == null ? void 0 : X.assets) || [], k = (X == null ? void 0 : X.total) || 0, z = Math.ceil(k / O), Te = Z < z, De = Z > 1, Ze = (Y == null ? void 0 : Y.length) > 0, { mutate: v } = Oc(), { mutate: m, isPending: S } = Uc(), { mutate: U, isPending: R } = Rc(), C = ye(
5841
+ }), Y = (X == null ? void 0 : X.assets) || [], k = (X == null ? void 0 : X.total) || 0, z = Math.ceil(k / O), Te = Z < z, De = Z > 1, Ze = (Y == null ? void 0 : Y.length) > 0, { mutate: v } = Oc(), { mutate: m, isPending: x } = Uc(), { mutate: U, isPending: R } = Rc(), C = ye(
5829
5842
  (P) => {
5830
5843
  P >= 1 && P <= z && J(P);
5831
5844
  },
@@ -5836,14 +5849,14 @@ function yr({
5836
5849
  De && C(Z - 1);
5837
5850
  }, [Z, De, C]), Q = (P) => {
5838
5851
  B(P.target.value);
5839
- }, oe = ye(
5852
+ }, ce = ye(
5840
5853
  (P) => {
5841
- q((ae) => Se(ae, { id: P.id }) ? [] : [P]);
5854
+ q((ae) => be(ae, { id: P.id }) ? [] : [P]);
5842
5855
  },
5843
5856
  [!1]
5844
- ), be = ye(() => {
5857
+ ), Ee = ye(() => {
5845
5858
  q([]);
5846
- }, []), ce = (P) => {
5859
+ }, []), de = (P) => {
5847
5860
  (P == null ? void 0 : P.length) !== 0 && (t(
5848
5861
  Wn(xa(P || L), [
5849
5862
  "id",
@@ -5853,7 +5866,7 @@ function yr({
5853
5866
  "description"
5854
5867
  ])
5855
5868
  ), e());
5856
- }, Ee = async (P) => {
5869
+ }, Ne = async (P) => {
5857
5870
  h(P);
5858
5871
  }, Pe = async () => {
5859
5872
  u && (y(u == null ? void 0 : u.id), await v(u.id, {
@@ -5868,18 +5881,18 @@ function yr({
5868
5881
  d(P.id), w("details");
5869
5882
  }, Le = async (P, ae) => {
5870
5883
  try {
5871
- const x = localStorage.getItem("chai_optimize_images") !== "false";
5884
+ const S = localStorage.getItem("chai_optimize_images") !== "false";
5872
5885
  ae ? (await m({
5873
5886
  file: P,
5874
5887
  folderId: void 0,
5875
5888
  name: p.name || "",
5876
- optimize: x
5889
+ optimize: S
5877
5890
  }), g({ show: !1, file: "" })) : (await U({
5878
5891
  id: p.id || "",
5879
5892
  file: P
5880
5893
  }), g({ show: !1, file: "" }));
5881
- } catch (x) {
5882
- console.error("Error saving edited image:", x);
5894
+ } catch (S) {
5895
+ console.error("Error saving edited image:", S);
5883
5896
  }
5884
5897
  }, Ue = ye((P) => {
5885
5898
  q([P]);
@@ -5895,7 +5908,7 @@ function yr({
5895
5908
  allowedTypes: l,
5896
5909
  uploadAsset: m,
5897
5910
  isUpdatingAsset: R,
5898
- isUploadingAsset: S,
5911
+ isUploadingAsset: x,
5899
5912
  onUploaded: Ue
5900
5913
  }
5901
5914
  ),
@@ -5925,7 +5938,7 @@ function yr({
5925
5938
  {
5926
5939
  variant: "outline",
5927
5940
  size: "sm",
5928
- onClick: () => be(),
5941
+ onClick: () => Ee(),
5929
5942
  title: "Clear selection",
5930
5943
  children: "Clear"
5931
5944
  }
@@ -5934,7 +5947,7 @@ function yr({
5934
5947
  T,
5935
5948
  {
5936
5949
  size: "sm",
5937
- onClick: () => ce(L),
5950
+ onClick: () => de(L),
5938
5951
  disabled: L.length === 0,
5939
5952
  children: "Select Asset"
5940
5953
  }
@@ -5966,11 +5979,11 @@ function yr({
5966
5979
  f && (u == null ? void 0 : u.id) === P.id ? "opacity-50 pointer-events-none" : "",
5967
5980
  f === P.id ? "opacity-50 pointer-events-none" : ""
5968
5981
  ),
5969
- onClick: () => oe(P),
5970
- onDoubleClick: () => ce([P]),
5982
+ onClick: () => ce(P),
5983
+ onDoubleClick: () => de([P]),
5971
5984
  children: [
5972
5985
  /* @__PURE__ */ c("div", { className: "aspect-square relative overflow-hidden", children: [
5973
- f === P.id ? /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ s(Et, { className: "h-8 w-8 animate-spin text-white" }) }) : null,
5986
+ f === P.id ? /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center bg-black/50", children: /* @__PURE__ */ s(wt, { className: "h-8 w-8 animate-spin text-white" }) }) : null,
5974
5987
  P.type === "image" ? /* @__PURE__ */ s(
5975
5988
  "img",
5976
5989
  {
@@ -6002,7 +6015,7 @@ function yr({
6002
6015
  /* @__PURE__ */ s("div", { className: "text-[9px] whitespace-nowrap font-light text-muted-foreground flex items-center justify-between", children: /* @__PURE__ */ s("span", { children: zc((P == null ? void 0 : P.size) || 0) }) })
6003
6016
  ] }),
6004
6017
  !L.some((ae) => ae.id === P.id) && /* @__PURE__ */ s("div", { className: "absolute inset-0 opacity-0 group-hover:opacity-100 transition-opacity flex items-center justify-center", children: /* @__PURE__ */ c("div", { className: "grid grid-cols-4 gap-2 p-2", children: [
6005
- /* @__PURE__ */ s(gt, { children: /* @__PURE__ */ c(st, { children: [
6018
+ /* @__PURE__ */ s(yt, { children: /* @__PURE__ */ c(st, { children: [
6006
6019
  /* @__PURE__ */ s(at, { asChild: !0, children: /* @__PURE__ */ s(
6007
6020
  T,
6008
6021
  {
@@ -6012,12 +6025,12 @@ function yr({
6012
6025
  onClick: (ae) => {
6013
6026
  ae.stopPropagation(), se(P);
6014
6027
  },
6015
- children: /* @__PURE__ */ s(nn, { className: "h-4 w-4" })
6028
+ children: /* @__PURE__ */ s(sn, { className: "h-4 w-4" })
6016
6029
  }
6017
6030
  ) }),
6018
6031
  /* @__PURE__ */ s(rt, { children: /* @__PURE__ */ s("p", { children: "View Details" }) })
6019
6032
  ] }) }),
6020
- /* @__PURE__ */ s(gt, { children: /* @__PURE__ */ c(st, { children: [
6033
+ /* @__PURE__ */ s(yt, { children: /* @__PURE__ */ c(st, { children: [
6021
6034
  /* @__PURE__ */ s(at, { asChild: !0, children: /* @__PURE__ */ s(
6022
6035
  T,
6023
6036
  {
@@ -6036,7 +6049,7 @@ function yr({
6036
6049
  ) }),
6037
6050
  /* @__PURE__ */ s(rt, { children: /* @__PURE__ */ s("p", { children: "Copy URL" }) })
6038
6051
  ] }) }),
6039
- /* @__PURE__ */ s(gt, { children: /* @__PURE__ */ c(st, { children: [
6052
+ /* @__PURE__ */ s(yt, { children: /* @__PURE__ */ c(st, { children: [
6040
6053
  /* @__PURE__ */ s(at, { asChild: !0, children: /* @__PURE__ */ s(
6041
6054
  T,
6042
6055
  {
@@ -6056,7 +6069,7 @@ function yr({
6056
6069
  ) }),
6057
6070
  /* @__PURE__ */ s(rt, { children: /* @__PURE__ */ s("p", { children: "Edit Image" }) })
6058
6071
  ] }) }),
6059
- /* @__PURE__ */ s(gt, { children: /* @__PURE__ */ c(st, { children: [
6072
+ /* @__PURE__ */ s(yt, { children: /* @__PURE__ */ c(st, { children: [
6060
6073
  /* @__PURE__ */ s(at, { asChild: !0, children: /* @__PURE__ */ s(
6061
6074
  T,
6062
6075
  {
@@ -6064,7 +6077,7 @@ function yr({
6064
6077
  size: "icon",
6065
6078
  className: "h-8 w-8 rounded-full",
6066
6079
  onClick: (ae) => {
6067
- ae.stopPropagation(), Ee(P);
6080
+ ae.stopPropagation(), Ne(P);
6068
6081
  },
6069
6082
  children: /* @__PURE__ */ s(Xn, { className: "h-4 w-4" })
6070
6083
  }
@@ -6095,16 +6108,16 @@ function yr({
6095
6108
  }
6096
6109
  ),
6097
6110
  Array.from({ length: Math.min(5, z) }, (P, ae) => {
6098
- const x = ae + 1;
6111
+ const S = ae + 1;
6099
6112
  return /* @__PURE__ */ s(
6100
6113
  T,
6101
6114
  {
6102
- variant: Z === x ? "default" : "outline",
6115
+ variant: Z === S ? "default" : "outline",
6103
6116
  size: "sm",
6104
- onClick: () => C(x),
6105
- children: x
6117
+ onClick: () => C(S),
6118
+ children: S
6106
6119
  },
6107
- x
6120
+ S
6108
6121
  );
6109
6122
  }),
6110
6123
  z > 5 && /* @__PURE__ */ c(ve, { children: [
@@ -6150,7 +6163,7 @@ function yr({
6150
6163
  if (o) {
6151
6164
  E(!0);
6152
6165
  try {
6153
- const ae = Y.find((x) => x.id === o);
6166
+ const ae = Y.find((S) => S.id === o);
6154
6167
  ae && await U(yi(ae, { description: P }));
6155
6168
  } finally {
6156
6169
  E(!1);
@@ -6164,7 +6177,7 @@ function yr({
6164
6177
  p.show && /* @__PURE__ */ s(
6165
6178
  Aa,
6166
6179
  {
6167
- fallback: /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s(Et, { className: "h-8 w-8 animate-spin" }) }),
6180
+ fallback: /* @__PURE__ */ s("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ s(wt, { className: "h-8 w-8 animate-spin" }) }),
6168
6181
  children: /* @__PURE__ */ s(
6169
6182
  qc,
6170
6183
  {
@@ -6256,7 +6269,7 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6256
6269
  className: "h-8 w-8 rounded-full bg-white/80 hover:bg-white/90",
6257
6270
  onClick: d,
6258
6271
  disabled: i,
6259
- children: /* @__PURE__ */ s(nn, { className: "h-4 w-4" })
6272
+ children: /* @__PURE__ */ s(sn, { className: "h-4 w-4" })
6260
6273
  }
6261
6274
  )
6262
6275
  ] })
@@ -6266,7 +6279,7 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6266
6279
  className: `flex items-center justify-center border border-dashed rounded-md p-6 cursor-pointer ${i ? "opacity-50 cursor-not-allowed" : "hover:border-gray-400"}`,
6267
6280
  onClick: d,
6268
6281
  children: /* @__PURE__ */ c("div", { className: "flex flex-col items-center gap-2", children: [
6269
- /* @__PURE__ */ s(nn, { className: "h-10 w-10 text-gray-400" }),
6282
+ /* @__PURE__ */ s(sn, { className: "h-10 w-10 text-gray-400" }),
6270
6283
  /* @__PURE__ */ s("p", { className: "text-sm text-gray-500", children: r })
6271
6284
  ] })
6272
6285
  }
@@ -6298,8 +6311,8 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6298
6311
  ] }) })
6299
6312
  ] });
6300
6313
  }, Hc = () => {
6301
- const { selectedLang: e } = lt(), { data: t, isFetching: n } = Kt();
6302
- return { data: ie(() => Se(t, { lang: e || "" }) || {}, [t, e]), isFetching: n };
6314
+ const { selectedLang: e } = lt(), { data: t, isFetching: n } = Ht();
6315
+ return { data: ie(() => be(t, { lang: e || "" }) || {}, [t, e]), isFetching: n };
6303
6316
  }, Wc = () => {
6304
6317
  var l;
6305
6318
  const t = (l = document.getElementById("canvas-iframe").contentDocument) == null ? void 0 : l.body.innerHTML;
@@ -6319,7 +6332,7 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6319
6332
  /<p>Partial block. Double click to edit.<\/p>/,
6320
6333
  ""
6321
6334
  );
6322
- }, ft = ({
6335
+ }, pt = ({
6323
6336
  onComplete: e,
6324
6337
  field: t
6325
6338
  }) => {
@@ -6375,7 +6388,7 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6375
6388
  newCursorPos: p
6376
6389
  };
6377
6390
  }, vr = () => {
6378
- const { t: e } = Di(), { selectedLang: t, fallbackLang: n, languages: a } = lt(), [, r] = Pa(), { data: i } = cr(), { data: l, isFetching: o } = Hc(), d = l == null ? void 0 : l.seo, u = ut(
6391
+ const { t: e } = Di(), { selectedLang: t, fallbackLang: n, languages: a } = lt(), [, r] = Pa(), { data: i } = cr(), { data: l, isFetching: o } = Hc(), d = l == null ? void 0 : l.seo, u = ht(
6379
6392
  null
6380
6393
  ), [h, f] = A({
6381
6394
  title: "",
@@ -6391,8 +6404,8 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6391
6404
  searchDescription: "",
6392
6405
  jsonLD: "",
6393
6406
  ...d
6394
- }), y = ut({ initial: h, updated: h }), p = t.length ? t : n, { mutate: g, isPending: N } = zs(), E = N, { hasPermission: G } = Vt(), w = G(pe.EDIT_SEO);
6395
- Ne(() => {
6407
+ }), y = ht({ initial: h, updated: h }), p = t.length ? t : n, { mutate: g, isPending: N } = zs(), E = N, { hasPermission: G } = Kt(), w = G(pe.EDIT_SEO);
6408
+ we(() => {
6396
6409
  !o && d && f({
6397
6410
  title: "",
6398
6411
  description: "",
@@ -6469,7 +6482,7 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6469
6482
  };
6470
6483
  f(L), y.current.updated = L;
6471
6484
  }, J = (O) => (L) => {
6472
- ue(L.fieldValue) || Z({
6485
+ he(L.fieldValue) || Z({
6473
6486
  target: {
6474
6487
  name: O,
6475
6488
  value: L.fieldValue
@@ -6506,14 +6519,14 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6506
6519
  /* @__PURE__ */ s(re, { className: "text-xs", htmlFor: "title", children: e("SEO Title") }),
6507
6520
  /* @__PURE__ */ c("div", { className: "flex items-center justify-end gap-2", children: [
6508
6521
  /* @__PURE__ */ s(
6509
- ft,
6522
+ pt,
6510
6523
  {
6511
6524
  onComplete: J("title"),
6512
6525
  field: "title"
6513
6526
  }
6514
6527
  ),
6515
6528
  w && /* @__PURE__ */ s(
6516
- dt,
6529
+ ut,
6517
6530
  {
6518
6531
  dataType: "value",
6519
6532
  data: i ?? {},
@@ -6541,14 +6554,14 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6541
6554
  /* @__PURE__ */ s(re, { className: "text-xs", htmlFor: "description", children: e("SEO Description") }),
6542
6555
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
6543
6556
  /* @__PURE__ */ s(
6544
- ft,
6557
+ pt,
6545
6558
  {
6546
6559
  onComplete: J("description"),
6547
6560
  field: "description"
6548
6561
  }
6549
6562
  ),
6550
6563
  w && /* @__PURE__ */ s(
6551
- dt,
6564
+ ut,
6552
6565
  {
6553
6566
  data: i ?? {},
6554
6567
  onSelect: (O) => B(O, "description")
@@ -6557,7 +6570,7 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6557
6570
  ] })
6558
6571
  ] }),
6559
6572
  /* @__PURE__ */ s(
6560
- Ct,
6573
+ Pt,
6561
6574
  {
6562
6575
  id: "description",
6563
6576
  name: "description",
@@ -6574,7 +6587,7 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6574
6587
  /* @__PURE__ */ c("div", { className: "flex items-center justify-between", children: [
6575
6588
  /* @__PURE__ */ s(re, { className: "text-xs", htmlFor: "title", children: e("Canonical URL") }),
6576
6589
  w && /* @__PURE__ */ s(
6577
- dt,
6590
+ ut,
6578
6591
  {
6579
6592
  dataType: "value",
6580
6593
  data: i ?? {},
@@ -6657,14 +6670,14 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6657
6670
  /* @__PURE__ */ s(re, { className: "text-xs", htmlFor: "ogTitle", children: e("OG Title") }),
6658
6671
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
6659
6672
  /* @__PURE__ */ s(
6660
- ft,
6673
+ pt,
6661
6674
  {
6662
6675
  onComplete: J("ogTitle"),
6663
6676
  field: "ogTitle"
6664
6677
  }
6665
6678
  ),
6666
6679
  w && /* @__PURE__ */ s(
6667
- dt,
6680
+ ut,
6668
6681
  {
6669
6682
  dataType: "value",
6670
6683
  data: i ?? {},
@@ -6692,14 +6705,14 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6692
6705
  /* @__PURE__ */ s(re, { className: "text-xs", htmlFor: "ogDescription", children: e("OG Description") }),
6693
6706
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
6694
6707
  /* @__PURE__ */ s(
6695
- ft,
6708
+ pt,
6696
6709
  {
6697
6710
  onComplete: J("ogDescription"),
6698
6711
  field: "ogDescription"
6699
6712
  }
6700
6713
  ),
6701
6714
  w && /* @__PURE__ */ s(
6702
- dt,
6715
+ ut,
6703
6716
  {
6704
6717
  dataType: "value",
6705
6718
  data: i ?? {},
@@ -6709,7 +6722,7 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6709
6722
  ] })
6710
6723
  ] }),
6711
6724
  /* @__PURE__ */ s(
6712
- Ct,
6725
+ Pt,
6713
6726
  {
6714
6727
  id: "ogDescription",
6715
6728
  name: "ogDescription",
@@ -6764,14 +6777,14 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6764
6777
  /* @__PURE__ */ s(re, { className: "text-xs", htmlFor: "searchTitle", children: e("Search Title") }),
6765
6778
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
6766
6779
  /* @__PURE__ */ s(
6767
- ft,
6780
+ pt,
6768
6781
  {
6769
6782
  onComplete: J("searchTitle"),
6770
6783
  field: "searchTitle"
6771
6784
  }
6772
6785
  ),
6773
6786
  w && /* @__PURE__ */ s(
6774
- dt,
6787
+ ut,
6775
6788
  {
6776
6789
  dataType: "value",
6777
6790
  data: i ?? {},
@@ -6798,14 +6811,14 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6798
6811
  /* @__PURE__ */ s(re, { className: "text-xs", htmlFor: "searchDescription", children: e("Search Description") }),
6799
6812
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
6800
6813
  /* @__PURE__ */ s(
6801
- ft,
6814
+ pt,
6802
6815
  {
6803
6816
  onComplete: J("searchDescription"),
6804
6817
  field: "searchDescription"
6805
6818
  }
6806
6819
  ),
6807
6820
  w && /* @__PURE__ */ s(
6808
- dt,
6821
+ ut,
6809
6822
  {
6810
6823
  dataType: "value",
6811
6824
  data: i ?? {},
@@ -6815,7 +6828,7 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6815
6828
  ] })
6816
6829
  ] }),
6817
6830
  /* @__PURE__ */ s(
6818
- Ct,
6831
+ Pt,
6819
6832
  {
6820
6833
  id: "searchDescription",
6821
6834
  rows: 5,
@@ -6838,14 +6851,14 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6838
6851
  /* @__PURE__ */ s(re, { className: "text-xs", htmlFor: "jsonLD", children: e("JSON-LD") }),
6839
6852
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
6840
6853
  /* @__PURE__ */ s(
6841
- ft,
6854
+ pt,
6842
6855
  {
6843
6856
  onComplete: J("jsonLD"),
6844
6857
  field: "jsonLD"
6845
6858
  }
6846
6859
  ),
6847
6860
  w && /* @__PURE__ */ s(
6848
- dt,
6861
+ ut,
6849
6862
  {
6850
6863
  dataType: "value",
6851
6864
  data: i ?? {},
@@ -6855,7 +6868,7 @@ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6855
6868
  ] })
6856
6869
  ] }),
6857
6870
  /* @__PURE__ */ s(
6858
- Ct,
6871
+ Pt,
6859
6872
  {
6860
6873
  id: "jsonLD",
6861
6874
  name: "jsonLD",
@@ -6920,7 +6933,7 @@ const br = "seo", Qc = ({
6920
6933
  view: "modal",
6921
6934
  width: 600
6922
6935
  }, Zc = "user-info", Jc = () => {
6923
- const { user: e, logout: t } = mt(), n = xe(), a = ot("onLogout", vi);
6936
+ const { user: e, logout: t } = ft(), n = xe(), a = ot("onLogout", vi);
6924
6937
  return e ? /* @__PURE__ */ c(nl, { children: [
6925
6938
  /* @__PURE__ */ s(sl, { asChild: !0, children: /* @__PURE__ */ s(T, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ s(Ol, { className: "w-4 h-4" }) }) }),
6926
6939
  /* @__PURE__ */ c(al, { className: "w-auto p-4 space-y-2", children: [
@@ -6973,7 +6986,7 @@ function ha(e) {
6973
6986
  const t = String(e), n = t.length - 1;
6974
6987
  return K.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
6975
6988
  }
6976
- function Qt(e) {
6989
+ function Xt(e) {
6977
6990
  K.context = e;
6978
6991
  }
6979
6992
  var nd = (e, t) => e === t, qn = Symbol("solid-proxy"), Er = typeof Proxy == "function", Nr = Symbol("solid-track"), zn = {
@@ -6983,19 +6996,19 @@ var nd = (e, t) => e === t, qn = Symbol("solid-proxy"), Er = typeof Proxy == "fu
6983
6996
  cleanups: null,
6984
6997
  context: null,
6985
6998
  owner: null
6986
- }, os = {}, le = null, cs = null, sd = null, me = null, Oe = null, it = null, ts = 0;
6987
- function vt(e, t) {
6988
- const n = me, a = le, r = e.length === 0, i = t === void 0 ? a : t, l = r ? Sr : {
6999
+ }, os = {}, oe = null, cs = null, sd = null, fe = null, Oe = null, it = null, ts = 0;
7000
+ function Et(e, t) {
7001
+ const n = fe, a = oe, r = e.length === 0, i = t === void 0 ? a : t, l = r ? Sr : {
6989
7002
  owned: null,
6990
7003
  cleanups: null,
6991
7004
  context: i ? i.context : null,
6992
7005
  owner: i
6993
- }, o = r ? e : () => e(() => Ge(() => an(l)));
6994
- le = l, me = null;
7006
+ }, o = r ? e : () => e(() => Ge(() => rn(l)));
7007
+ oe = l, fe = null;
6995
7008
  try {
6996
7009
  return et(o, !0);
6997
7010
  } finally {
6998
- me = n, le = a;
7011
+ fe = n, oe = a;
6999
7012
  }
7000
7013
  }
7001
7014
  function Ie(e, t) {
@@ -7010,21 +7023,21 @@ function Ie(e, t) {
7010
7023
  }
7011
7024
  function ad(e, t, n) {
7012
7025
  const a = ns(e, t, !0, ct);
7013
- Wt(a);
7026
+ Yt(a);
7014
7027
  }
7015
- function bt(e, t, n) {
7028
+ function Nt(e, t, n) {
7016
7029
  const a = ns(e, t, !1, ct);
7017
- Wt(a);
7030
+ Yt(a);
7018
7031
  }
7019
7032
  function xr(e, t, n) {
7020
7033
  wr = fd;
7021
7034
  const a = ns(e, t, !1, ct);
7022
- (!n || !n.render) && (a.user = !0), it ? it.push(a) : Wt(a);
7035
+ (!n || !n.render) && (a.user = !0), it ? it.push(a) : Yt(a);
7023
7036
  }
7024
7037
  function je(e, t, n) {
7025
7038
  n = n ? Object.assign({}, zn, n) : zn;
7026
7039
  const a = ns(e, t, !0, 0);
7027
- return a.observers = null, a.observerSlots = null, a.comparator = n.equals || void 0, Wt(a), Tr.bind(a);
7040
+ return a.observers = null, a.observerSlots = null, a.comparator = n.equals || void 0, Yt(a), Tr.bind(a);
7028
7041
  }
7029
7042
  function rd(e) {
7030
7043
  return e && typeof e == "object" && "then" in e;
@@ -7056,7 +7069,7 @@ function id(e, t, n) {
7056
7069
  const O = ud, L = p(), q = N();
7057
7070
  if (q !== void 0 && !l)
7058
7071
  throw q;
7059
- return me && me.user, L;
7072
+ return fe && fe.user, L;
7060
7073
  }
7061
7074
  function J(O = !0) {
7062
7075
  if (O !== !1 && u)
@@ -7115,14 +7128,14 @@ function Xu(e) {
7115
7128
  return et(e, !1);
7116
7129
  }
7117
7130
  function Ge(e) {
7118
- if (me === null)
7131
+ if (fe === null)
7119
7132
  return e();
7120
- const t = me;
7121
- me = null;
7133
+ const t = fe;
7134
+ fe = null;
7122
7135
  try {
7123
7136
  return e();
7124
7137
  } finally {
7125
- me = t;
7138
+ fe = t;
7126
7139
  }
7127
7140
  }
7128
7141
  function Zu(e, t, n) {
@@ -7145,29 +7158,29 @@ function Zu(e, t, n) {
7145
7158
  function ld(e) {
7146
7159
  xr(() => Ge(e));
7147
7160
  }
7148
- function sn(e) {
7149
- return le === null || (le.cleanups === null ? le.cleanups = [e] : le.cleanups.push(e)), e;
7161
+ function an(e) {
7162
+ return oe === null || (oe.cleanups === null ? oe.cleanups = [e] : oe.cleanups.push(e)), e;
7150
7163
  }
7151
7164
  function ma() {
7152
- return le;
7165
+ return oe;
7153
7166
  }
7154
7167
  function od(e, t) {
7155
- const n = le, a = me;
7156
- le = e, me = null;
7168
+ const n = oe, a = fe;
7169
+ oe = e, fe = null;
7157
7170
  try {
7158
7171
  return et(t, !0);
7159
7172
  } catch (r) {
7160
7173
  Ws(r);
7161
7174
  } finally {
7162
- le = n, me = a;
7175
+ oe = n, fe = a;
7163
7176
  }
7164
7177
  }
7165
7178
  function cd(e) {
7166
- const t = me, n = le;
7179
+ const t = fe, n = oe;
7167
7180
  return Promise.resolve().then(() => {
7168
- me = t, le = n;
7181
+ fe = t, oe = n;
7169
7182
  let a;
7170
- return et(e, !1), me = le = null, a ? a.done : void 0;
7183
+ return et(e, !1), fe = oe = null, a ? a.done : void 0;
7171
7184
  });
7172
7185
  }
7173
7186
  var [dd, Ju] = /* @__PURE__ */ Ie(!1);
@@ -7184,7 +7197,7 @@ function th(e, t) {
7184
7197
  }
7185
7198
  function nh(e) {
7186
7199
  let t;
7187
- return le && le.context && (t = le.context[e.id]) !== void 0 ? t : e.defaultValue;
7200
+ return oe && oe.context && (t = oe.context[e.id]) !== void 0 ? t : e.defaultValue;
7188
7201
  }
7189
7202
  function Ar(e) {
7190
7203
  const t = je(e), n = je(() => fs(t()));
@@ -7197,14 +7210,14 @@ var ud;
7197
7210
  function Tr() {
7198
7211
  if (this.sources && this.state)
7199
7212
  if (this.state === ct)
7200
- Wt(this);
7213
+ Yt(this);
7201
7214
  else {
7202
7215
  const e = Oe;
7203
7216
  Oe = null, et(() => Kn(this), !1), Oe = e;
7204
7217
  }
7205
- if (me) {
7218
+ if (fe) {
7206
7219
  const e = this.observers ? this.observers.length : 0;
7207
- me.sources ? (me.sources.push(this), me.sourceSlots.push(e)) : (me.sources = [this], me.sourceSlots = [e]), this.observers ? (this.observers.push(me), this.observerSlots.push(me.sources.length - 1)) : (this.observers = [me], this.observerSlots = [me.sources.length - 1]);
7220
+ fe.sources ? (fe.sources.push(this), fe.sourceSlots.push(e)) : (fe.sources = [this], fe.sourceSlots = [e]), this.observers ? (this.observers.push(fe), this.observerSlots.push(fe.sources.length - 1)) : (this.observers = [fe], this.observerSlots = [fe.sources.length - 1]);
7208
7221
  }
7209
7222
  return this.value;
7210
7223
  }
@@ -7219,10 +7232,10 @@ function Cr(e, t, n) {
7219
7232
  throw Oe = [], new Error();
7220
7233
  }, !1)), t;
7221
7234
  }
7222
- function Wt(e) {
7235
+ function Yt(e) {
7223
7236
  if (!e.fn)
7224
7237
  return;
7225
- an(e);
7238
+ rn(e);
7226
7239
  const t = ts;
7227
7240
  hd(
7228
7241
  e,
@@ -7232,14 +7245,14 @@ function Wt(e) {
7232
7245
  }
7233
7246
  function hd(e, t, n) {
7234
7247
  let a;
7235
- const r = le, i = me;
7236
- me = le = e;
7248
+ const r = oe, i = fe;
7249
+ fe = oe = e;
7237
7250
  try {
7238
7251
  a = e.fn(t);
7239
7252
  } catch (l) {
7240
- return e.pure && (e.state = ct, e.owned && e.owned.forEach(an), e.owned = null), e.updatedAt = n + 1, Ws(l);
7253
+ return e.pure && (e.state = ct, e.owned && e.owned.forEach(rn), e.owned = null), e.updatedAt = n + 1, Ws(l);
7241
7254
  } finally {
7242
- me = i, le = r;
7255
+ fe = i, oe = r;
7243
7256
  }
7244
7257
  (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Cr(e, a) : e.value = a, e.updatedAt = n);
7245
7258
  }
@@ -7253,11 +7266,11 @@ function ns(e, t, n, a = ct, r) {
7253
7266
  sourceSlots: null,
7254
7267
  cleanups: null,
7255
7268
  value: t,
7256
- owner: le,
7257
- context: le ? le.context : null,
7269
+ owner: oe,
7270
+ context: oe ? oe.context : null,
7258
7271
  pure: n
7259
7272
  };
7260
- return le === null || le !== Sr && (le.owned ? le.owned.push(i) : le.owned = [i]), i;
7273
+ return oe === null || oe !== Sr && (oe.owned ? oe.owned.push(i) : oe.owned = [i]), i;
7261
7274
  }
7262
7275
  function Vn(e) {
7263
7276
  if (e.state === 0)
@@ -7271,7 +7284,7 @@ function Vn(e) {
7271
7284
  e.state && t.push(e);
7272
7285
  for (let n = t.length - 1; n >= 0; n--)
7273
7286
  if (e = t[n], e.state === ct)
7274
- Wt(e);
7287
+ Yt(e);
7275
7288
  else if (e.state === $n) {
7276
7289
  const a = Oe;
7277
7290
  Oe = null, et(() => Kn(e, t[0]), !1), Oe = a;
@@ -7310,7 +7323,7 @@ function fd(e) {
7310
7323
  K.effects || (K.effects = []), K.effects.push(...e.slice(0, n));
7311
7324
  return;
7312
7325
  }
7313
- Qt();
7326
+ Xt();
7314
7327
  }
7315
7328
  for (K.effects && (K.done || !K.count) && (e = [...K.effects, ...e], n += K.effects.length, delete K.effects), t = 0; t < n; t++)
7316
7329
  Vn(e[t]);
@@ -7331,7 +7344,7 @@ function _r(e) {
7331
7344
  n.state || (n.state = $n, n.pure ? Oe.push(n) : it.push(n), n.observers && _r(n));
7332
7345
  }
7333
7346
  }
7334
- function an(e) {
7347
+ function rn(e) {
7335
7348
  let t;
7336
7349
  if (e.sources)
7337
7350
  for (; e.sources.length; ) {
@@ -7343,12 +7356,12 @@ function an(e) {
7343
7356
  }
7344
7357
  if (e.tOwned) {
7345
7358
  for (t = e.tOwned.length - 1; t >= 0; t--)
7346
- an(e.tOwned[t]);
7359
+ rn(e.tOwned[t]);
7347
7360
  delete e.tOwned;
7348
7361
  }
7349
7362
  if (e.owned) {
7350
7363
  for (t = e.owned.length - 1; t >= 0; t--)
7351
- an(e.owned[t]);
7364
+ rn(e.owned[t]);
7352
7365
  e.owned = null;
7353
7366
  }
7354
7367
  if (e.cleanups) {
@@ -7363,7 +7376,7 @@ function ms(e) {
7363
7376
  cause: e
7364
7377
  });
7365
7378
  }
7366
- function Ws(e, t = le) {
7379
+ function Ws(e, t = oe) {
7367
7380
  throw ms(e);
7368
7381
  }
7369
7382
  function fs(e) {
@@ -7382,9 +7395,9 @@ function fs(e) {
7382
7395
  function gd(e, t) {
7383
7396
  return function(a) {
7384
7397
  let r;
7385
- return bt(
7386
- () => r = Ge(() => (le.context = {
7387
- ...le.context,
7398
+ return Nt(
7399
+ () => r = Ge(() => (oe.context = {
7400
+ ...oe.context,
7388
7401
  [e]: a.value
7389
7402
  }, Ar(() => a.children))),
7390
7403
  void 0
@@ -7398,15 +7411,15 @@ function Hn(e) {
7398
7411
  }
7399
7412
  function pd(e, t, n = {}) {
7400
7413
  let a = [], r = [], i = [], l = 0, o = t.length > 1 ? [] : null;
7401
- return sn(() => Hn(i)), () => {
7414
+ return an(() => Hn(i)), () => {
7402
7415
  let d = e() || [], u = d.length, h, f;
7403
7416
  return d[Nr], Ge(() => {
7404
7417
  let p, g, N, E, G, w, I, b, D;
7405
7418
  if (u === 0)
7406
- l !== 0 && (Hn(i), i = [], a = [], r = [], l = 0, o && (o = [])), n.fallback && (a = [gs], r[0] = vt((B) => (i[0] = B, n.fallback())), l = 1);
7419
+ l !== 0 && (Hn(i), i = [], a = [], r = [], l = 0, o && (o = [])), n.fallback && (a = [gs], r[0] = Et((B) => (i[0] = B, n.fallback())), l = 1);
7407
7420
  else if (l === 0) {
7408
7421
  for (r = new Array(u), f = 0; f < u; f++)
7409
- a[f] = d[f], r[f] = vt(y);
7422
+ a[f] = d[f], r[f] = Et(y);
7410
7423
  l = u;
7411
7424
  } else {
7412
7425
  for (N = new Array(u), E = new Array(u), o && (G = new Array(u)), w = 0, I = Math.min(l, u); w < I && a[w] === d[w]; w++)
@@ -7418,7 +7431,7 @@ function pd(e, t, n = {}) {
7418
7431
  for (h = w; h <= I; h++)
7419
7432
  D = a[h], f = p.get(D), f !== void 0 && f !== -1 ? (N[f] = r[h], E[f] = i[h], o && (G[f] = o[h]), f = g[f], p.set(D, f)) : i[h]();
7420
7433
  for (f = w; f < u; f++)
7421
- f in N ? (r[f] = N[f], i[f] = E[f], o && (o[f] = G[f], o[f](f))) : r[f] = vt(y);
7434
+ f in N ? (r[f] = N[f], i[f] = E[f], o && (o[f] = G[f], o[f](f))) : r[f] = Et(y);
7422
7435
  r = r.slice(0, l = u), a = d.slice(0);
7423
7436
  }
7424
7437
  return r;
@@ -7434,13 +7447,13 @@ function pd(e, t, n = {}) {
7434
7447
  }
7435
7448
  function yd(e, t, n = {}) {
7436
7449
  let a = [], r = [], i = [], l = [], o = 0, d;
7437
- return sn(() => Hn(i)), () => {
7450
+ return an(() => Hn(i)), () => {
7438
7451
  const u = e() || [], h = u.length;
7439
7452
  return u[Nr], Ge(() => {
7440
7453
  if (h === 0)
7441
- return o !== 0 && (Hn(i), i = [], a = [], r = [], o = 0, l = []), n.fallback && (a = [gs], r[0] = vt((y) => (i[0] = y, n.fallback())), o = 1), r;
7454
+ return o !== 0 && (Hn(i), i = [], a = [], r = [], o = 0, l = []), n.fallback && (a = [gs], r[0] = Et((y) => (i[0] = y, n.fallback())), o = 1), r;
7442
7455
  for (a[0] === gs && (i[0](), i = [], a = [], r = [], o = 0), d = 0; d < h; d++)
7443
- d < a.length && a[d] !== u[d] ? l[d](() => u[d]) : d >= a.length && (r[d] = vt(f));
7456
+ d < a.length && a[d] !== u[d] ? l[d](() => u[d]) : d >= a.length && (r[d] = Et(f));
7444
7457
  for (; d < a.length; d++)
7445
7458
  i[d]();
7446
7459
  return o = l.length = i.length = h, a = u.slice(0), r = r.slice(0, o);
@@ -7603,7 +7616,7 @@ function Lr(e) {
7603
7616
  if (i) {
7604
7617
  const [o, d] = Ie();
7605
7618
  K.count || (K.count = 0), K.count++, (n || (n = e())).then((u) => {
7606
- !K.done && Qt(i), K.count--, d(() => u.default), Qt();
7619
+ !K.done && Xt(i), K.count--, d(() => u.default), Xt();
7607
7620
  }), t = o;
7608
7621
  } else if (!t) {
7609
7622
  const [o] = id(() => (n || (n = e())).then((d) => d.default));
@@ -7615,9 +7628,9 @@ function Lr(e) {
7615
7628
  if (!i || K.done)
7616
7629
  return l(r);
7617
7630
  const o = K.context;
7618
- Qt(i);
7631
+ Xt(i);
7619
7632
  const d = l(r);
7620
- return Qt(o), d;
7633
+ return Xt(o), d;
7621
7634
  }) : ""
7622
7635
  );
7623
7636
  };
@@ -7928,10 +7941,10 @@ function Id(e, t, n) {
7928
7941
  }
7929
7942
  }
7930
7943
  }
7931
- var Zt = "_$DX_DELEGATE";
7944
+ var Jt = "_$DX_DELEGATE";
7932
7945
  function Gr(e, t, n, a = {}) {
7933
7946
  let r;
7934
- return vt((i) => {
7947
+ return Et((i) => {
7935
7948
  r = i, t === document ? e() : vs(t, e(), t.firstChild ? null : void 0, n);
7936
7949
  }, a.owner), () => {
7937
7950
  r(), t.textContent = "";
@@ -7946,30 +7959,30 @@ function ch(e, t, n) {
7946
7959
  return i.cloneNode = i, i;
7947
7960
  }
7948
7961
  function kd(e, t = window.document) {
7949
- const n = t[Zt] || (t[Zt] = /* @__PURE__ */ new Set());
7962
+ const n = t[Jt] || (t[Jt] = /* @__PURE__ */ new Set());
7950
7963
  for (let a = 0, r = e.length; a < r; a++) {
7951
7964
  const i = e[a];
7952
7965
  n.has(i) || (n.add(i), t.addEventListener(i, Ur));
7953
7966
  }
7954
7967
  }
7955
7968
  function dh(e = window.document) {
7956
- if (e[Zt]) {
7957
- for (let t of e[Zt].keys())
7969
+ if (e[Jt]) {
7970
+ for (let t of e[Jt].keys())
7958
7971
  e.removeEventListener(t, Ur);
7959
- delete e[Zt];
7972
+ delete e[Jt];
7960
7973
  }
7961
7974
  }
7962
7975
  function ys(e, t, n) {
7963
- St(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
7976
+ At(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
7964
7977
  }
7965
7978
  function Ld(e, t, n, a) {
7966
- St(e) || (a == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, a));
7979
+ At(e) || (a == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, a));
7967
7980
  }
7968
7981
  function Dd(e, t, n) {
7969
- St(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
7982
+ At(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
7970
7983
  }
7971
7984
  function Gd(e, t) {
7972
- St(e) || (t == null ? e.removeAttribute("class") : e.className = t);
7985
+ At(e) || (t == null ? e.removeAttribute("class") : e.className = t);
7973
7986
  }
7974
7987
  function Ud(e, t, n, a) {
7975
7988
  if (a)
@@ -8009,17 +8022,17 @@ function Rd(e, t, n) {
8009
8022
  }
8010
8023
  function Bd(e, t = {}, n, a) {
8011
8024
  const r = {};
8012
- return a || bt(
8013
- () => r.children = rn(e, t.children, r.children)
8014
- ), bt(() => typeof t.ref == "function" && Md(t.ref, e)), bt(() => Fd(e, t, n, !0, r, !0)), r;
8025
+ return a || Nt(
8026
+ () => r.children = ln(e, t.children, r.children)
8027
+ ), Nt(() => typeof t.ref == "function" && Md(t.ref, e)), Nt(() => Fd(e, t, n, !0, r, !0)), r;
8015
8028
  }
8016
8029
  function Md(e, t, n) {
8017
8030
  return Ge(() => e(t, n));
8018
8031
  }
8019
8032
  function vs(e, t, n, a) {
8020
8033
  if (n !== void 0 && !a && (a = []), typeof t != "function")
8021
- return rn(e, t, a, n);
8022
- bt((r) => rn(e, t(), r, n), a);
8034
+ return ln(e, t, a, n);
8035
+ Nt((r) => ln(e, t(), r, n), a);
8023
8036
  }
8024
8037
  function Fd(e, t, n, a, r = {}, i = !1) {
8025
8038
  t || (t = {});
@@ -8038,9 +8051,9 @@ function Fd(e, t, n, a, r = {}, i = !1) {
8038
8051
  }
8039
8052
  function jd(e) {
8040
8053
  let t, n;
8041
- return !St() || !(t = K.registry.get(n = zd())) ? e() : (K.completed && K.completed.add(t), K.registry.delete(n), t);
8054
+ return !At() || !(t = K.registry.get(n = zd())) ? e() : (K.completed && K.completed.add(t), K.registry.delete(n), t);
8042
8055
  }
8043
- function St(e) {
8056
+ function At(e) {
8044
8057
  return !!K.context && !K.done && (!e || e.isConnected);
8045
8058
  }
8046
8059
  function qd(e) {
@@ -8081,7 +8094,7 @@ function ga(e, t, n, a, r, i, l) {
8081
8094
  else if ((f = t.slice(0, 5) === "prop:") || (u = Sd.has(t)) || !r && ((h = Td(t, e.tagName)) || (d = wd.has(t))) || (o = e.nodeName.includes("-") || "is" in l)) {
8082
8095
  if (f)
8083
8096
  t = t.slice(5), d = !0;
8084
- else if (St(e))
8097
+ else if (At(e))
8085
8098
  return n;
8086
8099
  t === "class" || t === "className" ? Gd(e, n) : o && !d && !u ? e[qd(t)] = n : e[h || t] = n;
8087
8100
  } else {
@@ -8129,8 +8142,8 @@ function Ur(e) {
8129
8142
  o();
8130
8143
  i(a);
8131
8144
  }
8132
- function rn(e, t, n, a, r) {
8133
- const i = St(e);
8145
+ function ln(e, t, n, a, r) {
8146
+ const i = At(e);
8134
8147
  if (i) {
8135
8148
  !n && (n = [...e.childNodes]);
8136
8149
  let d = [];
@@ -8150,25 +8163,25 @@ function rn(e, t, n, a, r) {
8150
8163
  return n;
8151
8164
  if (o) {
8152
8165
  let d = n[0];
8153
- d && d.nodeType === 3 ? d.data !== t && (d.data = t) : d = document.createTextNode(t), n = Tt(e, n, a, d);
8166
+ d && d.nodeType === 3 ? d.data !== t && (d.data = t) : d = document.createTextNode(t), n = Ct(e, n, a, d);
8154
8167
  } else
8155
8168
  n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
8156
8169
  } else if (t == null || l === "boolean") {
8157
8170
  if (i)
8158
8171
  return n;
8159
- n = Tt(e, n, a);
8172
+ n = Ct(e, n, a);
8160
8173
  } else {
8161
8174
  if (l === "function")
8162
- return bt(() => {
8175
+ return Nt(() => {
8163
8176
  let d = t();
8164
8177
  for (; typeof d == "function"; )
8165
8178
  d = d();
8166
- n = rn(e, d, n, a);
8179
+ n = ln(e, d, n, a);
8167
8180
  }), () => n;
8168
8181
  if (Array.isArray(t)) {
8169
8182
  const d = [], u = n && Array.isArray(n);
8170
8183
  if (bs(d, t, n, r))
8171
- return bt(() => n = rn(e, d, n, a, !0)), () => n;
8184
+ return Nt(() => n = ln(e, d, n, a, !0)), () => n;
8172
8185
  if (i) {
8173
8186
  if (!d.length)
8174
8187
  return n;
@@ -8183,17 +8196,17 @@ function rn(e, t, n, a, r) {
8183
8196
  return n = f;
8184
8197
  }
8185
8198
  if (d.length === 0) {
8186
- if (n = Tt(e, n, a), o)
8199
+ if (n = Ct(e, n, a), o)
8187
8200
  return n;
8188
- } else u ? n.length === 0 ? pa(e, d, a) : Id(e, n, d) : (n && Tt(e), pa(e, d));
8201
+ } else u ? n.length === 0 ? pa(e, d, a) : Id(e, n, d) : (n && Ct(e), pa(e, d));
8189
8202
  n = d;
8190
8203
  } else if (t.nodeType) {
8191
8204
  if (i && t.parentNode)
8192
8205
  return n = o ? [t] : t;
8193
8206
  if (Array.isArray(n)) {
8194
8207
  if (o)
8195
- return n = Tt(e, n, a, t);
8196
- Tt(e, n, null, t);
8208
+ return n = Ct(e, n, a, t);
8209
+ Ct(e, n, null, t);
8197
8210
  } else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
8198
8211
  n = t;
8199
8212
  }
@@ -8231,7 +8244,7 @@ function pa(e, t, n = null) {
8231
8244
  for (let a = 0, r = t.length; a < r; a++)
8232
8245
  e.insertBefore(t[a], n);
8233
8246
  }
8234
- function Tt(e, t, n, a) {
8247
+ function Ct(e, t, n, a) {
8235
8248
  if (n === void 0)
8236
8249
  return e.textContent = "";
8237
8250
  const r = a || document.createTextNode("");
@@ -8265,7 +8278,7 @@ function uh(e) {
8265
8278
  const o = a();
8266
8279
  if (o instanceof HTMLHeadElement) {
8267
8280
  const [d, u] = Ie(!1), h = () => u(!0);
8268
- vt((f) => vs(o, () => d() ? f() : i(), null)), sn(h);
8281
+ Et((f) => vs(o, () => d() ? f() : i(), null)), an(h);
8269
8282
  } else {
8270
8283
  const d = Or(e.isSVG ? "g" : "div", e.isSVG), u = t && d.attachShadow ? d.attachShadow({
8271
8284
  mode: "open"
@@ -8275,7 +8288,7 @@ function uh(e) {
8275
8288
  return n.parentNode;
8276
8289
  },
8277
8290
  configurable: !0
8278
- }), vs(u, i), o.appendChild(d), e.ref && e.ref(d), sn(() => o.removeChild(d));
8291
+ }), vs(u, i), o.appendChild(d), e.ref && e.ref(d), an(() => o.removeChild(d));
8279
8292
  }
8280
8293
  },
8281
8294
  void 0,
@@ -8359,7 +8372,7 @@ function Wd(e, t) {
8359
8372
  return i;
8360
8373
  }
8361
8374
  }
8362
- function $t(e, t) {
8375
+ function Vt(e, t) {
8363
8376
  Object.entries(e).forEach(([n, a]) => t(a, n));
8364
8377
  }
8365
8378
  function Fn(e, t) {
@@ -8385,7 +8398,7 @@ var Yd = class {
8385
8398
  findByName(e) {
8386
8399
  return this.transfomers[e];
8387
8400
  }
8388
- }, Qd = (e) => Object.prototype.toString.call(e).slice(8, -1), Br = (e) => typeof e > "u", Xd = (e) => e === null, ln = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Es = (e) => ln(e) && Object.keys(e).length === 0, ht = (e) => Array.isArray(e), Zd = (e) => typeof e == "string", Jd = (e) => typeof e == "number" && !isNaN(e), eu = (e) => typeof e == "boolean", tu = (e) => e instanceof RegExp, on = (e) => e instanceof Map, cn = (e) => e instanceof Set, Mr = (e) => Qd(e) === "Symbol", nu = (e) => e instanceof Date && !isNaN(e.valueOf()), su = (e) => e instanceof Error, va = (e) => typeof e == "number" && isNaN(e), au = (e) => eu(e) || Xd(e) || Br(e) || Jd(e) || Zd(e) || Mr(e), ru = (e) => typeof e == "bigint", iu = (e) => e === 1 / 0 || e === -1 / 0, lu = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), ou = (e) => e instanceof URL, Fr = (e) => e.replace(/\./g, "\\."), us = (e) => e.map(String).map(Fr).join("."), Jt = (e) => {
8401
+ }, Qd = (e) => Object.prototype.toString.call(e).slice(8, -1), Br = (e) => typeof e > "u", Xd = (e) => e === null, on = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Es = (e) => on(e) && Object.keys(e).length === 0, mt = (e) => Array.isArray(e), Zd = (e) => typeof e == "string", Jd = (e) => typeof e == "number" && !isNaN(e), eu = (e) => typeof e == "boolean", tu = (e) => e instanceof RegExp, cn = (e) => e instanceof Map, dn = (e) => e instanceof Set, Mr = (e) => Qd(e) === "Symbol", nu = (e) => e instanceof Date && !isNaN(e.valueOf()), su = (e) => e instanceof Error, va = (e) => typeof e == "number" && isNaN(e), au = (e) => eu(e) || Xd(e) || Br(e) || Jd(e) || Zd(e) || Mr(e), ru = (e) => typeof e == "bigint", iu = (e) => e === 1 / 0 || e === -1 / 0, lu = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), ou = (e) => e instanceof URL, Fr = (e) => e.replace(/\./g, "\\."), us = (e) => e.map(String).map(Fr).join("."), en = (e) => {
8389
8402
  const t = [];
8390
8403
  let n = "";
8391
8404
  for (let r = 0; r < e.length; r++) {
@@ -8435,14 +8448,14 @@ var jr = [
8435
8448
  return new RegExp(t, n);
8436
8449
  }),
8437
8450
  Je(
8438
- cn,
8451
+ dn,
8439
8452
  "set",
8440
8453
  // (sets only exist in es6+)
8441
8454
  // eslint-disable-next-line es5/no-es6-methods
8442
8455
  (e) => [...e.values()],
8443
8456
  (e) => new Set(e)
8444
8457
  ),
8445
- Je(on, "map", (e) => [...e.entries()], (e) => new Map(e)),
8458
+ Je(cn, "map", (e) => [...e.entries()], (e) => new Map(e)),
8446
8459
  Je((e) => va(e) || iu(e), "number", (e) => va(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
8447
8460
  Je((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
8448
8461
  Je(ou, "URL", (e) => e.toString(), (e) => new URL(e))
@@ -8515,7 +8528,7 @@ jr.forEach((e) => {
8515
8528
  Hr[e.annotation] = e;
8516
8529
  });
8517
8530
  var uu = (e, t, n) => {
8518
- if (ht(t))
8531
+ if (mt(t))
8519
8532
  switch (t[0]) {
8520
8533
  case "symbol":
8521
8534
  return qr.untransform(e, t, n);
@@ -8534,7 +8547,7 @@ var uu = (e, t, n) => {
8534
8547
  throw new Error("Unknown transformation: " + t);
8535
8548
  return a.untransform(e, n);
8536
8549
  }
8537
- }, Pt = (e, t) => {
8550
+ }, _t = (e, t) => {
8538
8551
  const n = e.keys();
8539
8552
  for (; t > 0; )
8540
8553
  n.next(), t--;
@@ -8552,10 +8565,10 @@ var hu = (e, t) => {
8552
8565
  Wr(t);
8553
8566
  for (let n = 0; n < t.length; n++) {
8554
8567
  const a = t[n];
8555
- if (cn(e))
8556
- e = Pt(e, +a);
8557
- else if (on(e)) {
8558
- const r = +a, i = +t[++n] == 0 ? "key" : "value", l = Pt(e, r);
8568
+ if (dn(e))
8569
+ e = _t(e, +a);
8570
+ else if (cn(e)) {
8571
+ const r = +a, i = +t[++n] == 0 ? "key" : "value", l = _t(e, r);
8559
8572
  switch (i) {
8560
8573
  case "key":
8561
8574
  e = l;
@@ -8574,18 +8587,18 @@ var hu = (e, t) => {
8574
8587
  let a = e;
8575
8588
  for (let i = 0; i < t.length - 1; i++) {
8576
8589
  const l = t[i];
8577
- if (ht(a)) {
8590
+ if (mt(a)) {
8578
8591
  const o = +l;
8579
8592
  a = a[o];
8580
- } else if (ln(a))
8593
+ } else if (on(a))
8581
8594
  a = a[l];
8582
- else if (cn(a)) {
8595
+ else if (dn(a)) {
8583
8596
  const o = +l;
8584
- a = Pt(a, o);
8585
- } else if (on(a)) {
8597
+ a = _t(a, o);
8598
+ } else if (cn(a)) {
8586
8599
  if (i === t.length - 2)
8587
8600
  break;
8588
- const d = +l, u = +t[++i] == 0 ? "key" : "value", h = Pt(a, d);
8601
+ const d = +l, u = +t[++i] == 0 ? "key" : "value", h = _t(a, d);
8589
8602
  switch (u) {
8590
8603
  case "key":
8591
8604
  a = h;
@@ -8597,12 +8610,12 @@ var hu = (e, t) => {
8597
8610
  }
8598
8611
  }
8599
8612
  const r = t[t.length - 1];
8600
- if (ht(a) ? a[+r] = n(a[+r]) : ln(a) && (a[r] = n(a[r])), cn(a)) {
8601
- const i = Pt(a, +r), l = n(i);
8613
+ if (mt(a) ? a[+r] = n(a[+r]) : on(a) && (a[r] = n(a[r])), dn(a)) {
8614
+ const i = _t(a, +r), l = n(i);
8602
8615
  i !== l && (a.delete(i), a.add(l));
8603
8616
  }
8604
- if (on(a)) {
8605
- const i = +t[t.length - 2], l = Pt(a, i);
8617
+ if (cn(a)) {
8618
+ const i = +t[t.length - 2], l = _t(a, i);
8606
8619
  switch (+r == 0 ? "key" : "value") {
8607
8620
  case "key": {
8608
8621
  const d = n(l);
@@ -8620,13 +8633,13 @@ var hu = (e, t) => {
8620
8633
  function ws(e, t, n = []) {
8621
8634
  if (!e)
8622
8635
  return;
8623
- if (!ht(e)) {
8624
- $t(e, (i, l) => ws(i, t, [...n, ...Jt(l)]));
8636
+ if (!mt(e)) {
8637
+ Vt(e, (i, l) => ws(i, t, [...n, ...en(l)]));
8625
8638
  return;
8626
8639
  }
8627
8640
  const [a, r] = e;
8628
- r && $t(r, (i, l) => {
8629
- ws(i, t, [...n, ...Jt(l)]);
8641
+ r && Vt(r, (i, l) => {
8642
+ ws(i, t, [...n, ...en(l)]);
8630
8643
  }), t(a, n);
8631
8644
  }
8632
8645
  function mu(e, t, n) {
@@ -8636,21 +8649,21 @@ function mu(e, t, n) {
8636
8649
  }
8637
8650
  function fu(e, t) {
8638
8651
  function n(a, r) {
8639
- const i = hu(e, Jt(r));
8640
- a.map(Jt).forEach((l) => {
8652
+ const i = hu(e, en(r));
8653
+ a.map(en).forEach((l) => {
8641
8654
  e = Ns(e, l, () => i);
8642
8655
  });
8643
8656
  }
8644
- if (ht(t)) {
8657
+ if (mt(t)) {
8645
8658
  const [a, r] = t;
8646
8659
  a.forEach((i) => {
8647
- e = Ns(e, Jt(i), () => e);
8648
- }), r && $t(r, n);
8660
+ e = Ns(e, en(i), () => e);
8661
+ }), r && Vt(r, n);
8649
8662
  } else
8650
- $t(t, n);
8663
+ Vt(t, n);
8651
8664
  return e;
8652
8665
  }
8653
- var gu = (e, t) => ln(e) || ht(e) || on(e) || cn(e) || $r(e, t);
8666
+ var gu = (e, t) => on(e) || mt(e) || cn(e) || dn(e) || $r(e, t);
8654
8667
  function pu(e, t, n) {
8655
8668
  const a = n.get(e);
8656
8669
  a ? a.push(t) : n.set(e, [t]);
@@ -8689,12 +8702,12 @@ var Yr = (e, t, n, a, r = [], i = [], l = /* @__PURE__ */ new Map()) => {
8689
8702
  return {
8690
8703
  transformedValue: null
8691
8704
  };
8692
- const d = ba(e, n), u = (d == null ? void 0 : d.value) ?? e, h = ht(u) ? [] : {}, f = {};
8693
- $t(u, (p, g) => {
8705
+ const d = ba(e, n), u = (d == null ? void 0 : d.value) ?? e, h = mt(u) ? [] : {}, f = {};
8706
+ Vt(u, (p, g) => {
8694
8707
  if (g === "__proto__" || g === "constructor" || g === "prototype")
8695
8708
  throw new Error(`Detected property ${g}. This is a prototype pollution risk, please remove it from your object.`);
8696
8709
  const N = Yr(p, t, n, a, [...r, g], [...i, e], l);
8697
- h[g] = N.transformedValue, ht(N.annotations) ? f[g] = N.annotations : ln(N.annotations) && $t(N.annotations, (E, G) => {
8710
+ h[g] = N.transformedValue, mt(N.annotations) ? f[g] = N.annotations : on(N.annotations) && Vt(N.annotations, (E, G) => {
8698
8711
  f[Fr(g) + "." + G] = E;
8699
8712
  });
8700
8713
  });
@@ -8741,7 +8754,7 @@ function Ss(e, t = {}) {
8741
8754
  return bu(r, i, o, e, t.nonenumerable), r;
8742
8755
  }, {});
8743
8756
  }
8744
- var fe = class {
8757
+ var ge = class {
8745
8758
  /**
8746
8759
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
8747
8760
  */
@@ -8789,16 +8802,16 @@ var fe = class {
8789
8802
  this.allowedErrorProps.push(...e);
8790
8803
  }
8791
8804
  };
8792
- fe.defaultInstance = new fe();
8793
- fe.serialize = fe.defaultInstance.serialize.bind(fe.defaultInstance);
8794
- fe.deserialize = fe.defaultInstance.deserialize.bind(fe.defaultInstance);
8795
- fe.stringify = fe.defaultInstance.stringify.bind(fe.defaultInstance);
8796
- fe.parse = fe.defaultInstance.parse.bind(fe.defaultInstance);
8797
- fe.registerClass = fe.defaultInstance.registerClass.bind(fe.defaultInstance);
8798
- fe.registerSymbol = fe.defaultInstance.registerSymbol.bind(fe.defaultInstance);
8799
- fe.registerCustom = fe.defaultInstance.registerCustom.bind(fe.defaultInstance);
8800
- fe.allowErrorProps = fe.defaultInstance.allowErrorProps.bind(fe.defaultInstance);
8801
- var Eu = fe.serialize, mh = fe.stringify;
8805
+ ge.defaultInstance = new ge();
8806
+ ge.serialize = ge.defaultInstance.serialize.bind(ge.defaultInstance);
8807
+ ge.deserialize = ge.defaultInstance.deserialize.bind(ge.defaultInstance);
8808
+ ge.stringify = ge.defaultInstance.stringify.bind(ge.defaultInstance);
8809
+ ge.parse = ge.defaultInstance.parse.bind(ge.defaultInstance);
8810
+ ge.registerClass = ge.defaultInstance.registerClass.bind(ge.defaultInstance);
8811
+ ge.registerSymbol = ge.defaultInstance.registerSymbol.bind(ge.defaultInstance);
8812
+ ge.registerCustom = ge.defaultInstance.registerCustom.bind(ge.defaultInstance);
8813
+ ge.allowErrorProps = ge.defaultInstance.allowErrorProps.bind(ge.defaultInstance);
8814
+ var Eu = ge.serialize, mh = ge.stringify;
8802
8815
  function fh(e) {
8803
8816
  return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
8804
8817
  }
@@ -8841,7 +8854,7 @@ var bh = (e, t = !1) => {
8841
8854
  const a = (r) => {
8842
8855
  t(r.matches ? "dark" : "light");
8843
8856
  };
8844
- n.addEventListener("change", a), sn(() => n.removeEventListener("change", a));
8857
+ n.addEventListener("change", a), an(() => n.removeEventListener("change", a));
8845
8858
  }), e;
8846
8859
  }, On = (e, t, n) => {
8847
8860
  if (t.length === 0)
@@ -8908,21 +8921,21 @@ var bh = (e, t = !1) => {
8908
8921
  return;
8909
8922
  const a = document.createElement("style"), r = document.createTextNode("");
8910
8923
  a.appendChild(r), a.id = "_goober", a.setAttribute("nonce", e), t ? t.appendChild(a) : document.head.appendChild(a);
8911
- }, _t, dn, un, hn, pt, mn, It, kt, Lt, Dt, Gt, Ut, fn, Na, xu = (Na = class {
8924
+ }, It, un, hn, mn, vt, fn, kt, Lt, Dt, Gt, Ut, Ot, gn, Na, xu = (Na = class {
8912
8925
  constructor(e) {
8913
- he(this, _t);
8914
- he(this, dn);
8915
- he(this, un);
8916
- he(this, hn);
8917
- he(this, pt, !1);
8918
- he(this, mn);
8919
- he(this, It);
8920
- he(this, kt);
8921
- he(this, Lt);
8922
- he(this, Dt);
8923
- he(this, Gt);
8924
- he(this, Ut);
8925
- he(this, fn);
8926
+ me(this, It);
8927
+ me(this, un);
8928
+ me(this, hn);
8929
+ me(this, mn);
8930
+ me(this, vt, !1);
8931
+ me(this, fn);
8932
+ me(this, kt);
8933
+ me(this, Lt);
8934
+ me(this, Dt);
8935
+ me(this, Gt);
8936
+ me(this, Ut);
8937
+ me(this, Ot);
8938
+ me(this, gn);
8926
8939
  const {
8927
8940
  client: t,
8928
8941
  queryFlavor: n,
@@ -8935,41 +8948,41 @@ var bh = (e, t = !1) => {
8935
8948
  styleNonce: u,
8936
8949
  shadowDOMTarget: h
8937
8950
  } = e;
8938
- de(this, _t, Ie(t)), de(this, un, n), de(this, hn, a), de(this, dn, r), de(this, mn, u), de(this, It, h), de(this, kt, Ie(i)), de(this, Lt, Ie(l)), de(this, Dt, Ie(o)), de(this, Gt, Ie(d));
8951
+ ue(this, It, Ie(t)), ue(this, hn, n), ue(this, mn, a), ue(this, un, r), ue(this, fn, u), ue(this, kt, h), ue(this, Lt, Ie(i)), ue(this, Dt, Ie(l)), ue(this, Gt, Ie(o)), ue(this, Ut, Ie(d));
8939
8952
  }
8940
8953
  setButtonPosition(e) {
8941
- $(this, kt)[1](e);
8954
+ $(this, Lt)[1](e);
8942
8955
  }
8943
8956
  setPosition(e) {
8944
- $(this, Lt)[1](e);
8957
+ $(this, Dt)[1](e);
8945
8958
  }
8946
8959
  setInitialIsOpen(e) {
8947
- $(this, Dt)[1](e);
8960
+ $(this, Gt)[1](e);
8948
8961
  }
8949
8962
  setErrorTypes(e) {
8950
- $(this, Gt)[1](e);
8963
+ $(this, Ut)[1](e);
8951
8964
  }
8952
8965
  setClient(e) {
8953
- $(this, _t)[1](e);
8966
+ $(this, It)[1](e);
8954
8967
  }
8955
8968
  mount(e) {
8956
- if ($(this, pt))
8969
+ if ($(this, vt))
8957
8970
  throw new Error("Devtools is already mounted");
8958
8971
  const t = Gr(() => {
8959
- const n = this, [a] = $(this, kt), [r] = $(this, Lt), [i] = $(this, Dt), [l] = $(this, Gt), [o] = $(this, _t);
8972
+ const n = this, [a] = $(this, Lt), [r] = $(this, Dt), [i] = $(this, Gt), [l] = $(this, Ut), [o] = $(this, It);
8960
8973
  let d;
8961
- return $(this, Ut) ? d = $(this, Ut) : (d = Lr(() => import("./HO4MOOFI-C8yOiR3L.js")), de(this, Ut, d)), Jr($(this, mn), $(this, It)), Ir(d, kr({
8974
+ return $(this, Ot) ? d = $(this, Ot) : (d = Lr(() => import("./HO4MOOFI-DphjJPm8.js")), ue(this, Ot, d)), Jr($(this, fn), $(this, kt)), Ir(d, kr({
8962
8975
  get queryFlavor() {
8963
- return $(n, un);
8976
+ return $(n, hn);
8964
8977
  },
8965
8978
  get version() {
8966
- return $(n, hn);
8979
+ return $(n, mn);
8967
8980
  },
8968
8981
  get onlineManager() {
8969
- return $(n, dn);
8982
+ return $(n, un);
8970
8983
  },
8971
8984
  get shadowDOMTarget() {
8972
- return $(n, It);
8985
+ return $(n, kt);
8973
8986
  }
8974
8987
  }, {
8975
8988
  get client() {
@@ -8989,30 +9002,30 @@ var bh = (e, t = !1) => {
8989
9002
  }
8990
9003
  }));
8991
9004
  }, e);
8992
- de(this, pt, !0), de(this, fn, t);
9005
+ ue(this, vt, !0), ue(this, gn, t);
8993
9006
  }
8994
9007
  unmount() {
8995
9008
  var e;
8996
- if (!$(this, pt))
9009
+ if (!$(this, vt))
8997
9010
  throw new Error("Devtools is not mounted");
8998
- (e = $(this, fn)) == null || e.call(this), de(this, pt, !1);
9011
+ (e = $(this, gn)) == null || e.call(this), ue(this, vt, !1);
8999
9012
  }
9000
- }, _t = new WeakMap(), dn = new WeakMap(), un = new WeakMap(), hn = new WeakMap(), pt = new WeakMap(), mn = new WeakMap(), It = new WeakMap(), kt = new WeakMap(), Lt = new WeakMap(), Dt = new WeakMap(), Gt = new WeakMap(), Ut = new WeakMap(), fn = new WeakMap(), Na), Ot, gn, pn, yn, yt, vn, Rt, Bt, Mt, Ft, jt, qt, zt, bn, wa, Au = (wa = class {
9013
+ }, It = new WeakMap(), un = new WeakMap(), hn = new WeakMap(), mn = new WeakMap(), vt = new WeakMap(), fn = new WeakMap(), kt = new WeakMap(), Lt = new WeakMap(), Dt = new WeakMap(), Gt = new WeakMap(), Ut = new WeakMap(), Ot = new WeakMap(), gn = new WeakMap(), Na), Rt, pn, yn, vn, bt, bn, Bt, Mt, Ft, jt, qt, zt, $t, En, wa, Au = (wa = class {
9001
9014
  constructor(e) {
9002
- he(this, Ot);
9003
- he(this, gn);
9004
- he(this, pn);
9005
- he(this, yn);
9006
- he(this, yt, !1);
9007
- he(this, vn);
9008
- he(this, Rt);
9009
- he(this, Bt);
9010
- he(this, Mt);
9011
- he(this, Ft);
9012
- he(this, jt);
9013
- he(this, qt);
9014
- he(this, zt);
9015
- he(this, bn);
9015
+ me(this, Rt);
9016
+ me(this, pn);
9017
+ me(this, yn);
9018
+ me(this, vn);
9019
+ me(this, bt, !1);
9020
+ me(this, bn);
9021
+ me(this, Bt);
9022
+ me(this, Mt);
9023
+ me(this, Ft);
9024
+ me(this, jt);
9025
+ me(this, qt);
9026
+ me(this, zt);
9027
+ me(this, $t);
9028
+ me(this, En);
9016
9029
  const {
9017
9030
  client: t,
9018
9031
  queryFlavor: n,
@@ -9026,44 +9039,44 @@ var bh = (e, t = !1) => {
9026
9039
  shadowDOMTarget: h,
9027
9040
  onClose: f
9028
9041
  } = e;
9029
- de(this, Ot, Ie(t)), de(this, pn, n), de(this, yn, a), de(this, gn, r), de(this, vn, u), de(this, Rt, h), de(this, Bt, Ie(i)), de(this, Mt, Ie(l)), de(this, Ft, Ie(o)), de(this, jt, Ie(d)), de(this, qt, Ie(f));
9042
+ ue(this, Rt, Ie(t)), ue(this, yn, n), ue(this, vn, a), ue(this, pn, r), ue(this, bn, u), ue(this, Bt, h), ue(this, Mt, Ie(i)), ue(this, Ft, Ie(l)), ue(this, jt, Ie(o)), ue(this, qt, Ie(d)), ue(this, zt, Ie(f));
9030
9043
  }
9031
9044
  setButtonPosition(e) {
9032
- $(this, Bt)[1](e);
9045
+ $(this, Mt)[1](e);
9033
9046
  }
9034
9047
  setPosition(e) {
9035
- $(this, Mt)[1](e);
9048
+ $(this, Ft)[1](e);
9036
9049
  }
9037
9050
  setInitialIsOpen(e) {
9038
- $(this, Ft)[1](e);
9051
+ $(this, jt)[1](e);
9039
9052
  }
9040
9053
  setErrorTypes(e) {
9041
- $(this, jt)[1](e);
9054
+ $(this, qt)[1](e);
9042
9055
  }
9043
9056
  setClient(e) {
9044
- $(this, Ot)[1](e);
9057
+ $(this, Rt)[1](e);
9045
9058
  }
9046
9059
  setOnClose(e) {
9047
- $(this, qt)[1](() => e);
9060
+ $(this, zt)[1](() => e);
9048
9061
  }
9049
9062
  mount(e) {
9050
- if ($(this, yt))
9063
+ if ($(this, bt))
9051
9064
  throw new Error("Devtools is already mounted");
9052
9065
  const t = Gr(() => {
9053
- const n = this, [a] = $(this, Bt), [r] = $(this, Mt), [i] = $(this, Ft), [l] = $(this, jt), [o] = $(this, Ot), [d] = $(this, qt);
9066
+ const n = this, [a] = $(this, Mt), [r] = $(this, Ft), [i] = $(this, jt), [l] = $(this, qt), [o] = $(this, Rt), [d] = $(this, zt);
9054
9067
  let u;
9055
- return $(this, zt) ? u = $(this, zt) : (u = Lr(() => import("./HUY7CZI3-2cSChutK.js")), de(this, zt, u)), Jr($(this, vn), $(this, Rt)), Ir(u, kr({
9068
+ return $(this, $t) ? u = $(this, $t) : (u = Lr(() => import("./HUY7CZI3-DQjU0HHc.js")), ue(this, $t, u)), Jr($(this, bn), $(this, Bt)), Ir(u, kr({
9056
9069
  get queryFlavor() {
9057
- return $(n, pn);
9070
+ return $(n, yn);
9058
9071
  },
9059
9072
  get version() {
9060
- return $(n, yn);
9073
+ return $(n, vn);
9061
9074
  },
9062
9075
  get onlineManager() {
9063
- return $(n, gn);
9076
+ return $(n, pn);
9064
9077
  },
9065
9078
  get shadowDOMTarget() {
9066
- return $(n, Rt);
9079
+ return $(n, Bt);
9067
9080
  }
9068
9081
  }, {
9069
9082
  get client() {
@@ -9086,24 +9099,24 @@ var bh = (e, t = !1) => {
9086
9099
  }
9087
9100
  }));
9088
9101
  }, e);
9089
- de(this, yt, !0), de(this, bn, t);
9102
+ ue(this, bt, !0), ue(this, En, t);
9090
9103
  }
9091
9104
  unmount() {
9092
9105
  var e;
9093
- if (!$(this, yt))
9106
+ if (!$(this, bt))
9094
9107
  throw new Error("Devtools is not mounted");
9095
- (e = $(this, bn)) == null || e.call(this), de(this, yt, !1);
9108
+ (e = $(this, En)) == null || e.call(this), ue(this, bt, !1);
9096
9109
  }
9097
- }, Ot = new WeakMap(), gn = new WeakMap(), pn = new WeakMap(), yn = new WeakMap(), yt = new WeakMap(), vn = new WeakMap(), Rt = new WeakMap(), Bt = new WeakMap(), Mt = new WeakMap(), Ft = new WeakMap(), jt = new WeakMap(), qt = new WeakMap(), zt = new WeakMap(), bn = new WeakMap(), wa);
9110
+ }, Rt = new WeakMap(), pn = new WeakMap(), yn = new WeakMap(), vn = new WeakMap(), bt = new WeakMap(), bn = new WeakMap(), Bt = new WeakMap(), Mt = new WeakMap(), Ft = new WeakMap(), jt = new WeakMap(), qt = new WeakMap(), zt = new WeakMap(), $t = new WeakMap(), En = new WeakMap(), wa);
9098
9111
  function Tu(e) {
9099
- const t = xe(e.client), n = we.useRef(null), {
9112
+ const t = xe(e.client), n = Se.useRef(null), {
9100
9113
  buttonPosition: a,
9101
9114
  position: r,
9102
9115
  initialIsOpen: i,
9103
9116
  errorTypes: l,
9104
9117
  styleNonce: o,
9105
9118
  shadowDOMTarget: d
9106
- } = e, [u] = we.useState(
9119
+ } = e, [u] = Se.useState(
9107
9120
  new xu({
9108
9121
  client: t,
9109
9122
  queryFlavor: "React Query",
@@ -9117,22 +9130,22 @@ function Tu(e) {
9117
9130
  shadowDOMTarget: d
9118
9131
  })
9119
9132
  );
9120
- return we.useEffect(() => {
9133
+ return Se.useEffect(() => {
9121
9134
  u.setClient(t);
9122
- }, [t, u]), we.useEffect(() => {
9135
+ }, [t, u]), Se.useEffect(() => {
9123
9136
  a && u.setButtonPosition(a);
9124
- }, [a, u]), we.useEffect(() => {
9137
+ }, [a, u]), Se.useEffect(() => {
9125
9138
  r && u.setPosition(r);
9126
- }, [r, u]), we.useEffect(() => {
9139
+ }, [r, u]), Se.useEffect(() => {
9127
9140
  u.setInitialIsOpen(i || !1);
9128
- }, [i, u]), we.useEffect(() => {
9141
+ }, [i, u]), Se.useEffect(() => {
9129
9142
  u.setErrorTypes(l || []);
9130
- }, [l, u]), we.useEffect(() => (n.current && u.mount(n.current), () => {
9143
+ }, [l, u]), Se.useEffect(() => (n.current && u.mount(n.current), () => {
9131
9144
  u.unmount();
9132
9145
  }), [u]), /* @__PURE__ */ s("div", { className: "tsqd-parent-container", ref: n });
9133
9146
  }
9134
9147
  function Cu(e) {
9135
- const t = xe(e.client), n = we.useRef(null), { errorTypes: a, styleNonce: r, shadowDOMTarget: i } = e, [l] = we.useState(
9148
+ const t = xe(e.client), n = Se.useRef(null), { errorTypes: a, styleNonce: r, shadowDOMTarget: i } = e, [l] = Se.useState(
9136
9149
  new Au({
9137
9150
  client: t,
9138
9151
  queryFlavor: "React Query",
@@ -9147,14 +9160,14 @@ function Cu(e) {
9147
9160
  onClose: e.onClose
9148
9161
  })
9149
9162
  );
9150
- return we.useEffect(() => {
9163
+ return Se.useEffect(() => {
9151
9164
  l.setClient(t);
9152
- }, [t, l]), we.useEffect(() => {
9165
+ }, [t, l]), Se.useEffect(() => {
9153
9166
  l.setOnClose(e.onClose ?? (() => {
9154
9167
  }));
9155
- }, [e.onClose, l]), we.useEffect(() => {
9168
+ }, [e.onClose, l]), Se.useEffect(() => {
9156
9169
  l.setErrorTypes(a || []);
9157
- }, [a, l]), we.useEffect(() => (n.current && l.mount(n.current), () => {
9170
+ }, [a, l]), Se.useEffect(() => (n.current && l.mount(n.current), () => {
9158
9171
  l.unmount();
9159
9172
  }), [l]), /* @__PURE__ */ s(
9160
9173
  "div",
@@ -9177,7 +9190,7 @@ const _u = () => {
9177
9190
  queryFn: async () => t(e, { action: _.GET_COLLECTIONS })
9178
9191
  });
9179
9192
  }, Iu = () => {
9180
- const { data: e } = Ke(), { data: t } = wt(), n = te(), a = V(), r = ie(
9193
+ const { data: e } = Ke(), { data: t } = xt(), n = te(), a = V(), r = ie(
9181
9194
  () => (t == null ? void 0 : t.fallbackLang) || "en",
9182
9195
  [t == null ? void 0 : t.fallbackLang]
9183
9196
  );
@@ -9208,15 +9221,15 @@ td();
9208
9221
  Ui(Lu);
9209
9222
  Oi(yo);
9210
9223
  const Du = (e) => {
9211
- const t = ut([]), [n] = Me(), a = n.get("page"), { data: r } = Ke(), {
9224
+ const t = ht([]), [n] = Me(), a = n.get("page"), { data: r } = Ke(), {
9212
9225
  data: i = {
9213
9226
  role: "",
9214
9227
  permissions: null
9215
9228
  }
9216
9229
  } = Cc();
9217
9230
  Tc();
9218
- const { data: l, isFetching: o } = or(), { blocks: d } = Ac(l), { data: u } = Re(), { mutateAsync: h } = sr(), f = Sc(), { onSave: y } = Pc(), { getPartialBlocks: p, getPartialBlockBlocks: g } = _c(), { aiContext: N, setAiContext: E } = js(), { mutateAsync: G } = Eo(), [w, I] = A(!1), { data: b } = wt(), D = lr(), { data: B } = cr(), { data: Z } = _u(), { mutateAsync: J } = Iu(), O = ku();
9219
- Jl(), Ne(() => {
9231
+ const { data: l, isFetching: o } = or(), { blocks: d } = Ac(l), { data: u } = Re(), { mutateAsync: h } = sr(), f = Sc(), { onSave: y } = Pc(), { getPartialBlocks: p, getPartialBlockBlocks: g } = _c(), { aiContext: N, setAiContext: E } = js(), { mutateAsync: G } = Eo(), [w, I] = A(!1), { data: b } = xt(), D = lr(), { data: B } = cr(), { data: Z } = _u(), { mutateAsync: J } = Iu(), O = ku();
9232
+ Jl(), we(() => {
9220
9233
  const ne = () => {
9221
9234
  document.hidden ? I(!0) : I(!1);
9222
9235
  };
@@ -9295,8 +9308,8 @@ const Du = (e) => {
9295
9308
  }
9296
9309
  }
9297
9310
  }), xh = (e) => {
9298
- const { isLoggedIn: t } = mt(), [, n] = ar(), [a, r] = A(!1);
9299
- return Ne(() => (n(
9311
+ const { isLoggedIn: t } = ft(), [, n] = ar(), [a, r] = A(!1);
9312
+ return we(() => (n(
9300
9313
  Wn(e, [
9301
9314
  "apiUrl",
9302
9315
  "usersApiUrl",
@@ -9341,7 +9354,7 @@ const Du = (e) => {
9341
9354
  }
9342
9355
  });
9343
9356
  }, Th = () => {
9344
- const { user: e, logout: t } = mt(), n = e == null ? void 0 : e.accessToken;
9357
+ const { user: e, logout: t } = ft(), n = e == null ? void 0 : e.accessToken;
9345
9358
  return ye(
9346
9359
  async ({
9347
9360
  url: a,
@@ -9392,7 +9405,7 @@ export {
9392
9405
  wh as K,
9393
9406
  gh as L,
9394
9407
  fh as M,
9395
- vt as N,
9408
+ Et as N,
9396
9409
  Ud as O,
9397
9410
  uh as P,
9398
9411
  mh as Q,
@@ -9402,22 +9415,24 @@ export {
9402
9415
  Rn as U,
9403
9416
  eh as V,
9404
9417
  xh as W,
9405
- to as X,
9406
- lr as Y,
9407
- Ah as Z,
9408
- He as _,
9418
+ ut as X,
9419
+ to as Y,
9420
+ cr as Z,
9421
+ lr as _,
9409
9422
  Ir as a,
9410
- Kc as a0,
9411
- Qu as a1,
9412
- Ke as a2,
9413
- Kt as a3,
9414
- es as a4,
9415
- wt as a5,
9416
- mt as a6,
9417
- Cc as a7,
9418
- Th as a8,
9419
- V as a9,
9420
- Ht as aa,
9423
+ Ah as a0,
9424
+ He as a1,
9425
+ Kc as a2,
9426
+ Qu as a3,
9427
+ Ke as a4,
9428
+ Ht as a5,
9429
+ es as a6,
9430
+ xt as a7,
9431
+ ft as a8,
9432
+ Cc as a9,
9433
+ Th as aa,
9434
+ V as ab,
9435
+ Wt as ac,
9421
9436
  Ie as b,
9422
9437
  je as c,
9423
9438
  kd as d,
@@ -9426,11 +9441,11 @@ export {
9426
9441
  Sh as g,
9427
9442
  bd as h,
9428
9443
  th as i,
9429
- bt as j,
9444
+ Nt as j,
9430
9445
  ys as k,
9431
9446
  sh as l,
9432
9447
  Nh as m,
9433
- sn as n,
9448
+ an as n,
9434
9449
  Zu as o,
9435
9450
  ld as p,
9436
9451
  Md as q,