@chaibuilder/pages 0.16.0 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/{2AITGKQY-BxEty5Ow.cjs → 2AITGKQY-8xBkB8Pv.cjs} +1 -1
  2. package/dist/{2AITGKQY-BFankGad.js → 2AITGKQY-DI5Po2Nc.js} +2 -2
  3. package/dist/{NCMVHL6D-DP-qw6yT.cjs → NCMVHL6D-B4xqJIpr.cjs} +1 -1
  4. package/dist/{NCMVHL6D-DFMKkQPN.js → NCMVHL6D-kHUQxG8D.js} +2 -2
  5. package/dist/{ZDWCUMSJ-Cu1VTliO.cjs → ZDWCUMSJ-CjlhoCfQ.cjs} +1 -1
  6. package/dist/{ZDWCUMSJ-DU81uAQq.js → ZDWCUMSJ-DRgY2Er1.js} +1 -1
  7. package/dist/{add-new-language-page-0zC1CJZK.js → add-new-language-page-DSB8ohdj.js} +2 -2
  8. package/dist/{add-new-language-page-DQ46xqnc.cjs → add-new-language-page-noBKABVx.cjs} +1 -1
  9. package/dist/{add-new-page-CUtZhDvi.js → add-new-page-BYkFbQvH.js} +1 -1
  10. package/dist/{add-new-page-Ca2H2J-2.cjs → add-new-page-CByS9KqS.cjs} +1 -1
  11. package/dist/ai-panel-content-BBnzp4fO.cjs +1 -0
  12. package/dist/ai-panel-content-DET3HjIR.js +54 -0
  13. package/dist/ai-panel-default-lang-BYfcAA8u.js +178 -0
  14. package/dist/ai-panel-default-lang-D-RS6z5I.cjs +1 -0
  15. package/dist/ai-panel-other-lang-BoD4FsoG.cjs +1 -0
  16. package/dist/ai-panel-other-lang-TVjNYPRK.js +150 -0
  17. package/dist/{ai-panel-quick-prompts-DiNVPPAn.cjs → ai-panel-quick-prompts-BGBdrdP7.cjs} +1 -1
  18. package/dist/{ai-panel-quick-prompts-CpzN48cl.js → ai-panel-quick-prompts-BPrA9nvg.js} +1 -1
  19. package/dist/ai-prompt-input-DB1FpA_q.cjs +1 -0
  20. package/dist/ai-prompt-input-qegCvwnu.js +222 -0
  21. package/dist/ai-translation-prompt--HB1UAhC.js +28 -0
  22. package/dist/ai-translation-prompt-Bj-AM4xK.cjs +1 -0
  23. package/dist/{delete-page-BS10zPLU.js → delete-page-C7xfkDN5.js} +1 -1
  24. package/dist/{delete-page-ClgtvB6n.cjs → delete-page-DJLNpUxo.cjs} +1 -1
  25. package/dist/{digital-asset-manager-MK8ZL6Nd.cjs → digital-asset-manager-BblMbig0.cjs} +1 -1
  26. package/dist/{digital-asset-manager-D_FFLECK.js → digital-asset-manager-INrgGoC0.js} +1 -1
  27. package/dist/{duplicate-page-C1r4cCIJ.js → duplicate-page-B8k4yZxa.js} +2 -2
  28. package/dist/{duplicate-page-BaZrekqu.cjs → duplicate-page-C9XewuHN.cjs} +1 -1
  29. package/dist/{dynamic-page-selector-CjtnFkxO.js → dynamic-page-selector-C7Vos5-l.js} +1 -1
  30. package/dist/{dynamic-page-selector-C4R_vhhz.cjs → dynamic-page-selector-CYYnEngT.cjs} +1 -1
  31. package/dist/index-CyHmr87X.cjs +5 -0
  32. package/dist/{index-D_qadcqD.js → index-DRQI9rlW.js} +864 -858
  33. package/dist/index.cjs +1 -1
  34. package/dist/index.js +1 -1
  35. package/dist/{json-diff-viewer-BURQmaIL.js → json-diff-viewer-8vUwU0Sk.js} +1 -1
  36. package/dist/{json-diff-viewer-CyZVbnpL.cjs → json-diff-viewer-DVskWjAL.cjs} +1 -1
  37. package/dist/{lang-panel-C8yx7PSU.js → lang-panel-B8SeKnwN.js} +2 -2
  38. package/dist/{lang-panel-SUARS5YU.cjs → lang-panel-BeyCHr4u.cjs} +1 -1
  39. package/dist/{mark-as-template-CUHypMlj.js → mark-as-template-CpNHtyfB.js} +1 -1
  40. package/dist/{mark-as-template-DS-nfI06.cjs → mark-as-template-DTEF_hyN.cjs} +1 -1
  41. package/dist/{no-language-page-content-qoHrlxwD.js → no-language-page-content-BPiFDGJr.js} +1 -1
  42. package/dist/{no-language-page-content-DZj3cmtM.cjs → no-language-page-content-DnAP2ICP.cjs} +1 -1
  43. package/dist/{page-creator-HwE9ST54.cjs → page-creator-BawPgFIv.cjs} +1 -1
  44. package/dist/{page-creator-C8VQGfap.js → page-creator-BiDN-rLc.js} +2 -2
  45. package/dist/{page-lock-request-CBVKtxVj.js → page-lock-request-BVYclE6H.js} +1 -1
  46. package/dist/{page-lock-request-Db7-x_EI.cjs → page-lock-request-wIw-W5qT.cjs} +1 -1
  47. package/dist/{page-locked-by-dialog-DEC58QPA.js → page-locked-by-dialog-CuHvd48D.js} +1 -1
  48. package/dist/{page-locked-by-dialog-CvRDaBcN.cjs → page-locked-by-dialog-jZDY0omZ.cjs} +1 -1
  49. package/dist/{page-manager-new-CBxSkcYY.cjs → page-manager-new-BmZlPcpL.cjs} +1 -1
  50. package/dist/{page-manager-new-B1PDwz2w.js → page-manager-new-kMwd9hkH.js} +2 -2
  51. package/dist/{page-manager-search-and-filter-0eTSE1C1.js → page-manager-search-and-filter-BU-1wFbM.js} +1 -1
  52. package/dist/{page-manager-search-and-filter-BRLPHE64.cjs → page-manager-search-and-filter-DMauRN5Y.cjs} +1 -1
  53. package/dist/{page-revisions-content-CTrVTQ_s.cjs → page-revisions-content-BH0Xy_k9.cjs} +1 -1
  54. package/dist/{page-revisions-content-CKcp4He4.js → page-revisions-content-c32By7XR.js} +2 -2
  55. package/dist/{prompt-helper-BtijECyh.cjs → prompt-helper-BLBZjr5q.cjs} +3 -3
  56. package/dist/{prompt-helper-CfyAlam9.js → prompt-helper-Bh7WyDYo.js} +31 -19
  57. package/dist/{publish-pages-content-B6HGaUtO.cjs → publish-pages-content-B5UqPZy0.cjs} +1 -1
  58. package/dist/{publish-pages-content-BMaeNHV2.js → publish-pages-content-BB6l92oG.js} +2 -2
  59. package/dist/{save-to-lib-BKKTPv4h.cjs → save-to-lib-DM1MzZTb.cjs} +1 -1
  60. package/dist/{save-to-lib-CccnzwO8.js → save-to-lib-NvQZll63.js} +1 -1
  61. package/dist/{seo-panel-4KK4r-BP.js → seo-panel-BsMBb5Ep.js} +1 -1
  62. package/dist/{seo-panel-DL_rcWwC.cjs → seo-panel-C20m5SFc.cjs} +1 -1
  63. package/dist/server.cjs +11 -8
  64. package/dist/server.d.ts +2 -1
  65. package/dist/server.js +144 -141
  66. package/dist/{shared-json-ld-DGW40Ccy.js → shared-json-ld-BVqIgANo.js} +1 -1
  67. package/dist/{shared-json-ld-BuYzbmKx.cjs → shared-json-ld-CfWO90c0.cjs} +1 -1
  68. package/dist/{slug-input--8SgDwYu.cjs → slug-input-BewLv-d8.cjs} +1 -1
  69. package/dist/{slug-input-DH5w0H22.js → slug-input-RCGUFL2T.js} +1 -1
  70. package/dist/{theme-panel-footer-Co5VI_i9.cjs → theme-panel-footer-8oSQtfZ5.cjs} +1 -1
  71. package/dist/{theme-panel-footer-CHR7J97n.js → theme-panel-footer-BJB36k8A.js} +1 -1
  72. package/dist/{unmark-as-template-DlA879QF.js → unmark-as-template-CGZ0CCI2.js} +1 -1
  73. package/dist/{unmark-as-template-B3h10oHA.cjs → unmark-as-template-DLNmyum3.cjs} +1 -1
  74. package/dist/{unpublish-page-Bfo_DuW5.cjs → unpublish-page-B_xQPGsZ.cjs} +1 -1
  75. package/dist/{unpublish-page-JzGl35pF.js → unpublish-page-CEtpcrvc.js} +1 -1
  76. package/dist/{web-preview-CJ6JyhJD.js → web-preview-CCGkTRU3.js} +1 -1
  77. package/dist/{web-preview-oG2epixb.cjs → web-preview-Cifi0bwK.cjs} +1 -1
  78. package/package.json +1 -1
  79. package/dist/ai-panel-content-CV-HTsAs.cjs +0 -1
  80. package/dist/ai-panel-content-r2jlUBoR.js +0 -52
  81. package/dist/ai-panel-default-lang-D6RAQW1X.js +0 -173
  82. package/dist/ai-panel-default-lang-EH3w6g25.cjs +0 -1
  83. package/dist/ai-panel-other-lang-BeTdv7yM.js +0 -133
  84. package/dist/ai-panel-other-lang-_gGQTjZQ.cjs +0 -1
  85. package/dist/ai-prompt-input-D-F23bdc.cjs +0 -1
  86. package/dist/ai-prompt-input-vAcIZSB1.js +0 -133
  87. package/dist/ai-translation-prompt-AImJlmDg.cjs +0 -1
  88. package/dist/ai-translation-prompt-BKyp1IW2.js +0 -63
  89. package/dist/index-C64wG61b.cjs +0 -5
@@ -3,20 +3,20 @@ var Mn = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
5
  var vr = (e, t, n) => t in e ? Pr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
- var Pe = (e, t, n) => vr(e, typeof t != "symbol" ? t + "" : t, n), Fn = (e, t, n) => t.has(e) || Mn("Cannot " + n);
7
- var S = (e, t, n) => (Fn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), D = (e, t, n) => t.has(e) ? Mn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), k = (e, t, n, s) => (Fn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
6
+ var ve = (e, t, n) => vr(e, typeof t != "symbol" ? t + "" : t, n), Bn = (e, t, n) => t.has(e) || Mn("Cannot " + n);
7
+ var _ = (e, t, n) => (Bn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), D = (e, t, n) => t.has(e) ? Mn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), O = (e, t, n, s) => (Bn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
8
8
  import { jsx as l, jsxs as m, Fragment as ge } from "react/jsx-runtime";
9
- import { get as V, reverse as wr, sortBy as br, each as Ir, find as re, isEmpty as he, groupBy as Cr, minBy as Nr, noop as ds, keyBy as Lr, map as Bt, compact as fs, upperCase as qn, filter as hs, includes as kr, has as jt, pick as wn, keys as Or, pickBy as Dr, endsWith as Gr, isArray as xr, startCase as Rr, isFunction as Ur, cloneDeep as Br, isEqual as Mr } from "lodash-es";
10
- import * as z from "react";
11
- import Fr, { useMemo as Q, useCallback as j, useState as K, useEffect as se, useRef as at, lazy as F, Suspense as H, createContext as qr, Component as Kr, createElement as Kn } from "react";
9
+ import { get as V, reverse as wr, sortBy as br, each as Ir, find as re, isEmpty as he, groupBy as Lr, minBy as Cr, noop as ds, keyBy as Nr, map as Mt, compact as fs, upperCase as Fn, filter as hs, includes as kr, has as zt, pick as vn, keys as Or, pickBy as Dr, endsWith as xr, isArray as Gr, startCase as Rr, isFunction as Ur, cloneDeep as Mr, isEqual as Br } from "lodash-es";
10
+ import * as j from "react";
11
+ import Fr, { useMemo as Q, useCallback as z, useState as K, useEffect as se, useRef as at, lazy as F, Suspense as H, createContext as qr, Component as Kr, createElement as qn } from "react";
12
12
  import { atom as Ee, useAtom as te } from "jotai";
13
- import { useQuery as ae, useQueryClient as W, useMutation as X, onlineManager as gs, QueryClient as Vr, QueryClientProvider as Hr } from "@tanstack/react-query";
14
- import { useLanguages as Se, useSavePage as Ge, useTranslation as we, mergeClasses as Mt, usePermissions as ms, PERMISSIONS as Qr, useRightPanel as $r, useChaiFeatureFlag as jr, useIsPageLoaded as zr, registerChaiLibrary as Wr, getBlocksFromHTML as Yr, registerChaiSidebarPanel as Ct, registerChaiFeatureFlag as tn, registerChaiTopBar as Jr, registerChaiMediaManager as Xr, registerChaiSaveToLibrary as Zr, ChaiBuilderEditor as ea } from "@chaibuilder/sdk";
13
+ import { useQuery as ae, useQueryClient as W, useMutation as Z, onlineManager as gs, QueryClient as Vr, QueryClientProvider as Hr } from "@tanstack/react-query";
14
+ import { useLanguages as Se, useSavePage as xe, useTranslation as _e, mergeClasses as Bt, usePermissions as ms, PERMISSIONS as Qr, useRightPanel as $r, useChaiFeatureFlag as zr, useIsPageLoaded as jr, registerChaiLibrary as Wr, getBlocksFromHTML as Yr, registerChaiSidebarPanel as Lt, registerChaiFeatureFlag as tn, registerChaiTopBar as Jr, registerChaiMediaManager as Zr, registerChaiSaveToLibrary as Xr, ChaiBuilderEditor as ea } from "@chaibuilder/sdk";
15
15
  import { toast as R } from "sonner";
16
- import { Tooltip as zt, TooltipTrigger as Wt, Button as U, TooltipContent as Yt, Sheet as Es, SheetContent as ps, SheetHeader as ta, SheetTitle as na, SheetDescription as sa, DropdownMenu as bn, DropdownMenuTrigger as In, DropdownMenuContent as Cn, DropdownMenuItem as ue, Separator as ra, TooltipProvider as ys, SheetTrigger as aa, Skeleton as Nt, Dialog as As, HoverCard as ia, HoverCardTrigger as oa, HoverCardContent as la, AlertDialog as ca, AlertDialogTrigger as ua, AlertDialogContent as da, AlertDialogHeader as fa, AlertDialogTitle as ha, AlertDialogDescription as ga, AlertDialogFooter as ma, AlertDialogCancel as Ea, AlertDialogAction as pa, Popover as ya, PopoverTrigger as Aa, DialogContent as Ta, DialogHeader as Sa, DialogTitle as _a, Tabs as Pa, TabsList as va, TabsTrigger as nn, TabsContent as sn, Textarea as Vn, Alert as wa, AlertDescription as ba } from "@chaibuilder/sdk/ui";
17
- import { LogsIcon as Ia, Folder as Ca, Languages as rn, ChevronDown as gn, Star as Na, Plus as Ts, History as La, Play as ka, Palette as Oa, CheckCircle as Da, Loader as Ft, Save as Ga, Send as Hn, Rocket as Qn, CopyPlusIcon as xa, Pencil as Ra, Power as Ua, Trash as Ba, SquareLibrary as $n, Hash as Ma, File as Fa, MoreHorizontal as jn, ExternalLink as qa, LanguagesIcon as Ka, User as Va, X as zn, Trash2 as Ha, ImageIcon as Wn, Code as Qa, Eye as $a, Share2 as ja, FileCode2 as za, AlertTriangle as Wa } from "lucide-react";
16
+ import { Tooltip as jt, TooltipTrigger as Wt, Button as U, TooltipContent as Yt, Sheet as Es, SheetContent as ps, SheetHeader as ta, SheetTitle as na, SheetDescription as sa, DropdownMenu as wn, DropdownMenuTrigger as bn, DropdownMenuContent as In, DropdownMenuItem as ue, Separator as ra, TooltipProvider as ys, SheetTrigger as aa, Skeleton as Ct, Dialog as As, HoverCard as ia, HoverCardTrigger as oa, HoverCardContent as la, AlertDialog as ca, AlertDialogTrigger as ua, AlertDialogContent as da, AlertDialogHeader as fa, AlertDialogTitle as ha, AlertDialogDescription as ga, AlertDialogFooter as ma, AlertDialogCancel as Ea, AlertDialogAction as pa, Popover as ya, PopoverTrigger as Aa, DialogContent as Ta, DialogHeader as Sa, DialogTitle as _a, Tabs as Pa, TabsList as va, TabsTrigger as nn, TabsContent as sn, Textarea as Kn, Alert as wa, AlertDescription as ba } from "@chaibuilder/sdk/ui";
17
+ import { LogsIcon as Ia, Folder as La, Languages as Vn, ChevronDown as hn, Star as Ca, Plus as Ts, History as Na, Play as ka, Palette as Oa, CheckCircle as Da, Loader as Ft, Save as xa, Send as Hn, Rocket as Qn, CopyPlusIcon as Ga, Pencil as Ra, Power as Ua, Trash as Ma, SquareLibrary as $n, Hash as Ba, File as Fa, MoreHorizontal as zn, ExternalLink as qa, LanguagesIcon as Ka, User as Va, X as jn, Trash2 as Ha, ImageIcon as Wn, Code as Qa, Eye as $a, Share2 as za, FileCode2 as ja, AlertTriangle as Wa } from "lucide-react";
18
18
  import { useRegisteredChaiBlocks as Ya, getDefaultBlockProps as Ja } from "@chaibuilder/runtime";
19
- import { loadWebBlocks as Xa } from "@chaibuilder/sdk/web-blocks";
19
+ import { loadWebBlocks as Za } from "@chaibuilder/sdk/web-blocks";
20
20
  const E = {
21
21
  GET_GLOBAL_JSONLD_ITEMS: "GET_GLOBAL_JSONLD_ITEMS",
22
22
  GENERATE_SEO_FIELD: "GENERATE_SEO_FIELD",
@@ -81,8 +81,8 @@ const E = {
81
81
  UPDATE_ASSET: "UPDATE_ASSET",
82
82
  GET_ASSETS: "GET_ASSETS",
83
83
  GET_ASSET: "GET_ASSET"
84
- }, Za = Ee({}), Nn = () => te(Za), oe = (e, t) => {
85
- const [n] = Nn();
84
+ }, Xa = Ee({}), Ln = () => te(Xa), oe = (e, t) => {
85
+ const [n] = Ln();
86
86
  return Q(() => V(n, e, t), [n, e, t]);
87
87
  }, N = () => oe("apiUrl", "/chai/api"), Ss = () => oe("usersApiUrl", "/chai/users"), Oc = () => oe("assetsApiUrl", "/chai/assets"), ei = () => oe("websocket", null), _s = async (e, t, n = {}) => await fetch(e, {
88
88
  method: "POST",
@@ -102,8 +102,8 @@ if (import.meta.vitest) {
102
102
  });
103
103
  }
104
104
  const Dc = () => {
105
- const e = I(), t = N();
106
- return j(
105
+ const e = L(), t = N();
106
+ return z(
107
107
  async ({
108
108
  body: n,
109
109
  headers: s = {},
@@ -112,9 +112,9 @@ const Dc = () => {
112
112
  }) => e(r, n, s, a),
113
113
  [e]
114
114
  );
115
- }, I = () => {
115
+ }, L = () => {
116
116
  const e = oe("onLogout"), t = oe("getAccessToken"), n = N();
117
- return j(
117
+ return z(
118
118
  async (s = n, r, a = {}, i = !1) => {
119
119
  const o = await t();
120
120
  if (!o)
@@ -129,12 +129,12 @@ const Dc = () => {
129
129
  if (u.status === 401)
130
130
  return console.log("401 Response", u), e(), window.location.reload(), null;
131
131
  if (!u.ok) {
132
- const f = await u.json();
133
- throw console.error(`API Error (${u.status}):`, f), {
132
+ const d = await u.json();
133
+ throw console.error(`API Error (${u.status}):`, d), {
134
134
  status: u.status,
135
135
  statusText: u.statusText,
136
- ...f,
137
- message: f.error || f.message || `Server error: ${u.status}`
136
+ ...d,
137
+ message: d.error || d.message || `Server error: ${u.status}`
138
138
  };
139
139
  }
140
140
  return await u.json();
@@ -158,8 +158,8 @@ function le() {
158
158
  };
159
159
  }, []), [e, t];
160
160
  }
161
- const xe = (e) => {
162
- const t = N(), [n] = le(), s = e ?? n.get("page"), r = I();
161
+ const Ge = (e) => {
162
+ const t = N(), [n] = le(), s = e ?? n.get("page"), r = L();
163
163
  return ae({
164
164
  queryKey: [E.GET_LANGUAGE_PAGES, s],
165
165
  staleTime: 1 / 0,
@@ -176,7 +176,7 @@ const xe = (e) => {
176
176
  enabled: !!s
177
177
  });
178
178
  }, Re = () => {
179
- const e = N(), t = I();
179
+ const e = N(), t = L();
180
180
  return ae({
181
181
  queryKey: [E.GET_WEBSITE_DRAFT_SETTINGS],
182
182
  staleTime: 5 * 60 * 1e3,
@@ -192,7 +192,7 @@ const xe = (e) => {
192
192
  })
193
193
  });
194
194
  }, Ps = (e) => {
195
- const { fallbackLang: t } = Se(), { data: n } = Re(), { data: s, isFetching: r } = xe(), a = Q(() => {
195
+ const { fallbackLang: t } = Se(), { data: n } = Re(), { data: s, isFetching: r } = Ge(), a = Q(() => {
196
196
  const i = { [t]: !0 };
197
197
  return Ir(V(n, "languages"), (o) => {
198
198
  const c = re(s, { lang: o });
@@ -203,32 +203,32 @@ const xe = (e) => {
203
203
  };
204
204
  class ti {
205
205
  constructor(t, n, s, r) {
206
- Pe(this, "channelId");
207
- Pe(this, "websocket");
208
- Pe(this, "channel", null);
209
- Pe(this, "userId", null);
210
- Pe(this, "clientId", null);
211
- Pe(this, "pageId", null);
212
- Pe(this, "callback");
213
- var a, i, o, c, u, f;
214
- this.userId = s, this.websocket = t, this.clientId = this.getClientId(), this.channelId = `WEBSITE:${n}`, this.callback = r, this.channel = this.websocket.channel(this.channelId, { config: { presence: { key: this.clientId } } }), (f = (u = (c = (o = (i = (a = this.channel) == null ? void 0 : a.on("presence", { event: "sync" }, (d) => {
215
- this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", d);
216
- })) == null ? void 0 : i.on("presence", { event: "leave" }, (d) => {
217
- this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", d);
218
- })) == null ? void 0 : o.on("presence", { event: "join" }, (d) => {
219
- this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", d);
206
+ ve(this, "channelId");
207
+ ve(this, "websocket");
208
+ ve(this, "channel", null);
209
+ ve(this, "userId", null);
210
+ ve(this, "clientId", null);
211
+ ve(this, "pageId", null);
212
+ ve(this, "callback");
213
+ var a, i, o, c, u, d;
214
+ this.userId = s, this.websocket = t, this.clientId = this.getClientId(), this.channelId = `WEBSITE:${n}`, this.callback = r, this.channel = this.websocket.channel(this.channelId, { config: { presence: { key: this.clientId } } }), (d = (u = (c = (o = (i = (a = this.channel) == null ? void 0 : a.on("presence", { event: "sync" }, (f) => {
215
+ this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", f);
216
+ })) == null ? void 0 : i.on("presence", { event: "leave" }, (f) => {
217
+ this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", f);
218
+ })) == null ? void 0 : o.on("presence", { event: "join" }, (f) => {
219
+ this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", f);
220
220
  })) == null ? void 0 : c.on(
221
221
  "broadcast",
222
222
  { event: "TAKE_OVER_REQUESTED" },
223
- ({ payload: d }) => this.onReceiveEvent("TAKE_OVER_REQUESTED", d)
223
+ ({ payload: f }) => this.onReceiveEvent("TAKE_OVER_REQUESTED", f)
224
224
  )) == null ? void 0 : u.on(
225
225
  "broadcast",
226
226
  { event: "TAKE_OVER_REQUEST_ACCEPTED" },
227
- ({ payload: d }) => this.onReceiveEvent("TAKE_OVER_REQUEST_ACCEPTED", d)
228
- )) == null || f.on(
227
+ ({ payload: f }) => this.onReceiveEvent("TAKE_OVER_REQUEST_ACCEPTED", f)
228
+ )) == null || d.on(
229
229
  "broadcast",
230
230
  { event: "TAKE_OVER_REQUEST_REJECTED" },
231
- ({ payload: d }) => this.onReceiveEvent("TAKE_OVER_REQUEST_REJECTED", d)
231
+ ({ payload: f }) => this.onReceiveEvent("TAKE_OVER_REQUEST_REJECTED", f)
232
232
  ).subscribe();
233
233
  }
234
234
  getClientId() {
@@ -245,10 +245,10 @@ class ti {
245
245
  return t.length > 0 ? t[0] : null;
246
246
  }
247
247
  getPageUserMapping() {
248
- const t = this.getOnlineUsers({}), n = Cr(t, "pageId"), s = {};
248
+ const t = this.getOnlineUsers({}), n = Lr(t, "pageId"), s = {};
249
249
  return Object.keys(n).forEach((r) => {
250
250
  var i;
251
- const a = (i = Nr(n[r], "onlineAt")) == null ? void 0 : i.userId;
251
+ const a = (i = Cr(n[r], "onlineAt")) == null ? void 0 : i.userId;
252
252
  a !== this.userId && (s[r] = a);
253
253
  }), s;
254
254
  }
@@ -310,7 +310,7 @@ class ti {
310
310
  }
311
311
  const ni = Ee(
312
312
  null
313
- ), vs = () => te(ni), Ln = () => {
313
+ ), vs = () => te(ni), Cn = () => {
314
314
  const [e] = vs();
315
315
  return (e == null ? void 0 : e.slug) || "";
316
316
  };
@@ -322,7 +322,7 @@ function si(e, t) {
322
322
  }, [e, t]), n;
323
323
  }
324
324
  const ri = ({ query: e, uuid: t }) => {
325
- const { selectedLang: n, fallbackLang: s } = Se(), { data: r } = ie(), a = r == null ? void 0 : r.pageType, i = N(), o = I(), { data: c, isFetching: u } = ae({
325
+ const { selectedLang: n, fallbackLang: s } = Se(), { data: r } = ie(), a = r == null ? void 0 : r.pageType, i = N(), o = L(), { data: c, isFetching: u } = ae({
326
326
  queryKey: [E.GET_DYNAMIC_PAGES, e, a, t],
327
327
  staleTime: 60 * 60 * 1e3,
328
328
  placeholderData: [],
@@ -331,15 +331,15 @@ const ri = ({ query: e, uuid: t }) => {
331
331
  data: { query: e, pageType: a, uuid: t }
332
332
  }) || [],
333
333
  enabled: !!a
334
- }), f = Q(() => n === "" ? c.filter((d) => d.lang === "" || d.lang === s) : c.filter((d) => d.lang === n), [n, s, c]);
335
- return { allLangPages: c, data: f, isFetching: u };
334
+ }), d = Q(() => n === "" ? c.filter((f) => f.lang === "" || f.lang === s) : c.filter((f) => f.lang === n), [n, s, c]);
335
+ return { allLangPages: c, data: d, isFetching: u };
336
336
  }, ai = () => {
337
- const { selectedLang: e, fallbackLang: t } = Se(), [n, s] = vs(), [r, a] = K(""), i = si(r, 500), { allLangPages: o, data: c, isFetching: u } = ri({ query: i }), f = j((g) => s(g), [s]), d = j((g) => a(g), [a]), h = j(() => {
337
+ const { selectedLang: e, fallbackLang: t } = Se(), [n, s] = vs(), [r, a] = K(""), i = si(r, 500), { allLangPages: o, data: c, isFetching: u } = ri({ query: i }), d = z((g) => s(g), [s]), f = z((g) => a(g), [a]), h = z(() => {
338
338
  if (!n) return;
339
- const g = !(n != null && n.primaryPage), y = e.length === 0, T = g ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, p = o.filter(
340
- (A) => (A == null ? void 0 : A.primaryPage) === T || A.id === T
341
- ).find((A) => y ? A.lang === e || A.lang === t : A.lang === e);
342
- s(p || n);
339
+ const g = !(n != null && n.primaryPage), p = e.length === 0, S = g ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, T = o.filter(
340
+ (y) => (y == null ? void 0 : y.primaryPage) === S || y.id === S
341
+ ).find((y) => p ? y.lang === e || y.lang === t : y.lang === e);
342
+ s(T || n);
343
343
  }, [n, e, o, s, t]);
344
344
  return {
345
345
  isFetching: u,
@@ -348,18 +348,18 @@ const ri = ({ query: e, uuid: t }) => {
348
348
  selectedLang: e,
349
349
  dynamicPages: c,
350
350
  allLangPages: o,
351
- updateDynamicPage: f,
352
- updateSearchQuery: d,
351
+ updateDynamicPage: d,
352
+ updateSearchQuery: f,
353
353
  onChangeLanguage: h
354
354
  };
355
- }, ii = Ee({ lastSaved: void 0 }), kn = () => te(ii), ie = () => {
356
- const [e] = le(), t = e.get("page"), { data: n, isFetching: s } = xe();
355
+ }, ii = Ee({ lastSaved: void 0 }), Nn = () => te(ii), ie = () => {
356
+ const [e] = le(), t = e.get("page"), { data: n, isFetching: s } = Ge();
357
357
  return { data: Q(() => ({ ...re(n, { id: t }) || {} }), [n, t]), isFetching: s };
358
358
  }, be = () => {
359
- const [e] = le(), t = e.get("lang") ?? "", { data: n, isFetching: s } = xe();
359
+ const [e] = le(), t = e.get("lang") ?? "", { data: n, isFetching: s } = Ge();
360
360
  return { data: Q(() => re(n, { lang: t }) || {}, [n, t]), isFetching: s };
361
361
  }, oi = Ee({}), li = () => te(oi), ci = () => {
362
- const { data: e } = be(), t = Ln(), n = oe("getLiveUrl", ds), s = e == null ? void 0 : e.slug, r = n(s || "/");
362
+ const { data: e } = be(), t = Cn(), n = oe("getLiveUrl", ds), s = e == null ? void 0 : e.slug, r = n(s || "/");
363
363
  return t ? r + t : r;
364
364
  }, Jt = () => {
365
365
  const e = oe("currentUser"), t = oe("onLogout");
@@ -369,7 +369,7 @@ const ri = ({ query: e, uuid: t }) => {
369
369
  logout: t
370
370
  };
371
371
  }, ui = (e) => {
372
- const t = Ss(), n = I();
372
+ const t = Ss(), n = L();
373
373
  return ae({
374
374
  queryKey: [E.GET_CHAI_USER, e],
375
375
  queryFn: async () => {
@@ -388,8 +388,8 @@ const ri = ({ query: e, uuid: t }) => {
388
388
  isTakeOverRequested: !1,
389
389
  requestingClientId: "",
390
390
  isActiveInOtherTab: !1
391
- }), fi = Ee(""), hi = Ee(null), On = Ee({}), Gc = () => te(On), Ie = () => {
392
- const [e] = le(), t = e.get("page"), [n, s] = te(di), [r, a] = te(hi), [i, o] = te(fi), [c] = te(On);
391
+ }), fi = Ee(""), hi = Ee(null), kn = Ee({}), xc = () => te(kn), Ie = () => {
392
+ const [e] = le(), t = e.get("page"), [n, s] = te(di), [r, a] = te(hi), [i, o] = te(fi), [c] = te(kn);
393
393
  return {
394
394
  pageLock: n,
395
395
  pageToUser: c,
@@ -403,20 +403,20 @@ const ri = ({ query: e, uuid: t }) => {
403
403
  isLocked: t && n.status === "locked"
404
404
  };
405
405
  }, gi = () => {
406
- const e = ei(), { data: t } = ie(), { user: n } = Jt(), s = t == null ? void 0 : t.id, { data: r } = Re(), { pageLock: a, setPageLock: i, setLockingStatus: o, realtimeInstance: c, setRealtimeInstance: u } = Ie(), [, f] = te(On), d = at(!1), h = at(a), g = at(!1);
406
+ const e = ei(), { data: t } = ie(), { user: n } = Jt(), s = t == null ? void 0 : t.id, { data: r } = Re(), { pageLock: a, setPageLock: i, setLockingStatus: o, realtimeInstance: c, setRealtimeInstance: u } = Ie(), [, d] = te(kn), f = at(!1), h = at(a), g = at(!1);
407
407
  return se(() => {
408
408
  if (n != null && n.id && e && !c && (r != null && r.appKey) && !g.current) {
409
409
  g.current = !0;
410
- const y = async (_, p) => {
411
- var A, P;
412
- switch (_) {
410
+ const p = async (P, T) => {
411
+ var y, A;
412
+ switch (P) {
413
413
  /**
414
414
  * When user joins
415
415
  * @payload : { pageToUser: { [pageId: string]: [userId: string] } }
416
416
  * - Update page user mapping
417
417
  */
418
418
  case "UPDATE_ONLINE_USERS":
419
- f((p == null ? void 0 : p.pageToUser) || {});
419
+ d((T == null ? void 0 : T.pageToUser) || {});
420
420
  break;
421
421
  /**
422
422
  * When page is locked
@@ -428,7 +428,7 @@ const ri = ({ query: e, uuid: t }) => {
428
428
  ...h == null ? void 0 : h.current,
429
429
  requestedBy: "",
430
430
  status: "locked",
431
- isActiveInOtherTab: p == null ? void 0 : p.isActiveInOtherTab
431
+ isActiveInOtherTab: T == null ? void 0 : T.isActiveInOtherTab
432
432
  });
433
433
  break;
434
434
  /**
@@ -437,12 +437,12 @@ const ri = ({ query: e, uuid: t }) => {
437
437
  * - User will be owner of this page
438
438
  */
439
439
  case "USER_JOINED":
440
- if (((A = h == null ? void 0 : h.current) == null ? void 0 : A.status) === "editing") return;
441
- ((P = h == null ? void 0 : h.current) == null ? void 0 : P.status) === "locked" && o("can_edit_now"), i({
440
+ if (((y = h == null ? void 0 : h.current) == null ? void 0 : y.status) === "editing") return;
441
+ ((A = h == null ? void 0 : h.current) == null ? void 0 : A.status) === "locked" && o("can_edit_now"), i({
442
442
  ...h == null ? void 0 : h.current,
443
443
  requestedBy: "",
444
444
  status: "editing",
445
- isActiveInOtherTab: p == null ? void 0 : p.isActiveInOtherTab
445
+ isActiveInOtherTab: T == null ? void 0 : T.isActiveInOtherTab
446
446
  });
447
447
  break;
448
448
  /**
@@ -456,8 +456,8 @@ const ri = ({ query: e, uuid: t }) => {
456
456
  case "TAKE_OVER_REQUESTED":
457
457
  i({
458
458
  ...h == null ? void 0 : h.current,
459
- requestingClientId: p == null ? void 0 : p.requestingClientId,
460
- requestedBy: p != null && p.isRequestedFromAnotherTab ? "ANOTHER_TAB" : p == null ? void 0 : p.requestedBy
459
+ requestingClientId: T == null ? void 0 : T.requestingClientId,
460
+ requestedBy: T != null && T.isRequestedFromAnotherTab ? "ANOTHER_TAB" : T == null ? void 0 : T.requestedBy
461
461
  });
462
462
  break;
463
463
  /**
@@ -467,7 +467,7 @@ const ri = ({ query: e, uuid: t }) => {
467
467
  * - update state for editing page
468
468
  */
469
469
  case "TAKE_OVER_REQUEST_ACCEPTED":
470
- p != null && p.isTakingOverFromAnotherTab || (o("take_over_request_accepted"), R.success("Your Page Take Over Request Accepted", { position: "top-center" })), i({
470
+ T != null && T.isTakingOverFromAnotherTab || (o("take_over_request_accepted"), R.success("Your Page Take Over Request Accepted", { position: "top-center" })), i({
471
471
  ...h == null ? void 0 : h.current,
472
472
  status: "editing",
473
473
  requestedBy: "",
@@ -487,20 +487,20 @@ const ri = ({ query: e, uuid: t }) => {
487
487
  });
488
488
  break;
489
489
  }
490
- }, T = new ti(
490
+ }, S = new ti(
491
491
  e,
492
492
  r == null ? void 0 : r.appKey,
493
493
  n == null ? void 0 : n.id,
494
- y
494
+ p
495
495
  );
496
- u(T);
496
+ u(S);
497
497
  }
498
498
  }, [u, e, r == null ? void 0 : r.appKey]), se(() => {
499
499
  h.current = a;
500
500
  }, [a]), se(() => {
501
- if (!(!c || !s || !(n != null && n.id) || d.current))
502
- return d.current = !0, c == null || c.joinPage(s), () => {
503
- c && d.current && (d.current = !1, h.current = {
501
+ if (!(!c || !s || !(n != null && n.id) || f.current))
502
+ return f.current = !0, c == null || c.joinPage(s), () => {
503
+ c && f.current && (f.current = !1, h.current = {
504
504
  requestedBy: "",
505
505
  status: "checking",
506
506
  requestingClientId: "",
@@ -510,9 +510,9 @@ const ri = ({ query: e, uuid: t }) => {
510
510
  };
511
511
  }, [s, c]), a == null ? void 0 : a.status;
512
512
  }, mi = () => {
513
- const { data: e } = ie(), { user: t } = Jt(), n = e == null ? void 0 : e.id, { pageLock: s, setPageLock: r, realtimeInstance: a } = Ie(), { savePageAsync: i } = Ge(), o = j(() => {
513
+ const { data: e } = ie(), { user: t } = Jt(), n = e == null ? void 0 : e.id, { pageLock: s, setPageLock: r, realtimeInstance: a } = Ie(), { savePageAsync: i } = xe(), o = z(() => {
514
514
  !a || !n || !(t != null && t.id) || (r({ ...s, isTakeOverRequested: !0 }), a == null || a.sendEvent("TAKE_OVER_REQUESTED"));
515
- }, [a, n, t == null ? void 0 : t.id, r, s]), c = j(async () => {
515
+ }, [a, n, t == null ? void 0 : t.id, r, s]), c = z(async () => {
516
516
  !a || !n || !(t != null && t.id) || (await i(), a == null || a.sendEvent("TAKE_OVER_REQUEST_ACCEPTED", {
517
517
  requestingClientId: s == null ? void 0 : s.requestingClientId
518
518
  }), r({
@@ -522,7 +522,7 @@ const ri = ({ query: e, uuid: t }) => {
522
522
  isActiveInOtherTab: !1,
523
523
  isTakeOverRequested: !1
524
524
  }));
525
- }, [n, a, t == null ? void 0 : t.id, r, i, s]), u = j(() => {
525
+ }, [n, a, t == null ? void 0 : t.id, r, i, s]), u = z(() => {
526
526
  !a || !n || !(t != null && t.id) || (a == null || a.sendEvent("TAKE_OVER_REQUEST_REJECTED", {
527
527
  requestingClientId: s == null ? void 0 : s.requestingClientId
528
528
  }), r({
@@ -540,12 +540,12 @@ const ri = ({ query: e, uuid: t }) => {
540
540
  rejectTakeOver: u,
541
541
  requestTakeOver: o
542
542
  };
543
- }, Ei = F(() => import("./no-language-page-content-qoHrlxwD.js")), pi = F(() => import("./page-locked-by-dialog-DEC58QPA.js")), an = F(() => import("./page-lock-request-CBVKtxVj.js")), yi = ({ isFetchingPage: e }) => {
544
- const { pageLock: t, requestTakeOver: n } = mi(), { currentEditor: s, lockingStatus: r, setLockingStatus: a, realtimePageLockEnabled: i } = Ie(), { data: o, isFetching: c } = ui(s), [u] = le(), f = u.get("page"), [d] = kn(), h = W(), g = j(() => {
543
+ }, Ei = F(() => import("./no-language-page-content-BPiFDGJr.js")), pi = F(() => import("./page-locked-by-dialog-CuHvd48D.js")), rn = F(() => import("./page-lock-request-BVYclE6H.js")), yi = ({ isFetchingPage: e }) => {
544
+ const { pageLock: t, requestTakeOver: n } = mi(), { currentEditor: s, lockingStatus: r, setLockingStatus: a, realtimePageLockEnabled: i } = Ie(), { data: o, isFetching: c } = ui(s), [u] = le(), d = u.get("page"), [f] = Nn(), h = W(), g = z(() => {
545
545
  n();
546
546
  }, [n]);
547
- return !f || e || !i || (t == null ? void 0 : t.status) === "checking" ? null : t != null && t.requestedBy ? /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
548
- an,
547
+ return !d || e || !i || (t == null ? void 0 : t.status) === "checking" ? null : t != null && t.requestedBy ? /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
548
+ rn,
549
549
  {
550
550
  lockingStatus: "",
551
551
  onContinue: () => {
@@ -553,7 +553,7 @@ const ri = ({ query: e, uuid: t }) => {
553
553
  }
554
554
  }
555
555
  ) }) : (t == null ? void 0 : t.status) !== "locked" ? r === "take_over_request_accepted" || r === "can_edit_now" ? /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
556
- an,
556
+ rn,
557
557
  {
558
558
  lockingStatus: r,
559
559
  onContinue: () => {
@@ -562,14 +562,14 @@ const ri = ({ query: e, uuid: t }) => {
562
562
  }), a("");
563
563
  }
564
564
  }
565
- ) }) : null : t != null && t.isActiveInOtherTab ? /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(an, { lockingStatus: "page_is_active_in_other_tab", onContinue: n }) }) : /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
565
+ ) }) : null : t != null && t.isActiveInOtherTab ? /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(rn, { lockingStatus: "page_is_active_in_other_tab", onContinue: n }) }) : /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
566
566
  pi,
567
567
  {
568
568
  ...o,
569
569
  isFetchingUserInfo: c,
570
570
  name: (o == null ? void 0 : o.name) || "Unknown User",
571
571
  email: (o == null ? void 0 : o.email) || "",
572
- lastSaved: (d == null ? void 0 : d.lastSaved) || "",
572
+ lastSaved: (f == null ? void 0 : f.lastSaved) || "",
573
573
  onTakeOver: g,
574
574
  realtimePageLockEnabled: i,
575
575
  isRequestRejected: r === "take_over_request_rejected"
@@ -578,7 +578,7 @@ const ri = ({ query: e, uuid: t }) => {
578
578
  }, Ai = () => {
579
579
  const [e] = le(), t = e.get("lang");
580
580
  return Ps(t) ? null : /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Ei, {}) });
581
- }, Lt = {
581
+ }, Nt = {
582
582
  ab: "Abkhazian",
583
583
  aa: "Afar",
584
584
  af: "Afrikaans",
@@ -771,22 +771,22 @@ function ws(e, t, n = !1) {
771
771
  const s = e.toString() ? `?${e.toString()}` : "/";
772
772
  n ? window.history.replaceState(null, "", s) : window.history.pushState({}, "", s), t(e), window.dispatchEvent(new PopStateEvent("popstate"));
773
773
  }
774
- const Dn = Ee(null), Gn = () => {
774
+ const On = Ee(null), Dn = () => {
775
775
  const { data: e } = Re();
776
776
  return Q(
777
777
  () => (e == null ? void 0 : e.fallbackLang) || "en",
778
778
  [e]
779
779
  );
780
780
  }, bs = () => {
781
- const e = I(), t = N();
781
+ const e = L(), t = N();
782
782
  return ae({
783
783
  queryKey: [E.GET_WEBSITE_PAGES],
784
784
  staleTime: 1e3 * 60 * 5,
785
785
  queryFn: async () => e(t, { action: E.GET_WEBSITE_PAGES }) || [],
786
786
  placeholderData: (n) => n || []
787
787
  });
788
- }, xc = (e) => {
789
- const t = I(), n = N(), s = Gn();
788
+ }, Gc = (e) => {
789
+ const t = L(), n = N(), s = Dn();
790
790
  return ae({
791
791
  queryKey: [E.GET_WEBSITE_PAGES, e, s],
792
792
  staleTime: 1e3 * 60 * 5,
@@ -794,49 +794,49 @@ const Dn = Ee(null), Gn = () => {
794
794
  queryFn: async () => {
795
795
  if (s === e) return {};
796
796
  const r = await t(n, { action: E.GET_WEBSITE_PAGES, data: { lang: e } }) || [];
797
- return Lr(
798
- Bt(r, (a) => ({ ...a, lang: e })),
797
+ return Nr(
798
+ Mt(r, (a) => ({ ...a, lang: e })),
799
799
  "primaryPage"
800
800
  );
801
801
  },
802
802
  placeholderData: (r) => r || {}
803
803
  });
804
- }, Ti = F(() => import("./page-manager-new-B1PDwz2w.js")), Is = ({ children: e }) => {
805
- const { t } = we(), [n, s] = le(), r = n.get("page"), { data: a, isFetching: i } = ie(), { data: o, isFetching: c } = bs(), [u, f] = K(!1), [d, h] = K(!0), { savePage: g } = Ge(), y = !!r && !he(a), T = Q(() => {
804
+ }, Ti = F(() => import("./page-manager-new-kMwd9hkH.js")), Is = ({ children: e }) => {
805
+ const { t } = _e(), [n, s] = le(), r = n.get("page"), { data: a, isFetching: i } = ie(), { data: o, isFetching: c } = bs(), [u, d] = K(!1), [f, h] = K(!0), { savePage: g } = xe(), p = !!r && !he(a), S = Q(() => {
806
806
  if (!o || c) return !1;
807
- const P = o.find((O) => O.slug === "/");
808
- return P == null ? void 0 : P.id;
807
+ const A = o.find((b) => b.slug === "/");
808
+ return A == null ? void 0 : A.id;
809
809
  }, [o, c]);
810
810
  se(() => {
811
- if (c || !T || o.some((M) => M.id === r)) return;
812
- const O = new URLSearchParams({ page: T });
813
- ws(O, s), !c && o && h(!1);
814
- }, [r, c, o, T, s]);
815
- const _ = !d && !r, p = !d && !i && he(a), A = u || _ || p;
811
+ if (c || !S || o.some((B) => B.id === r)) return;
812
+ const b = new URLSearchParams({ page: S });
813
+ ws(b, s), !c && o && h(!1);
814
+ }, [r, c, o, S, s]);
815
+ const P = !f && !r, T = !f && !i && he(a), y = u || P || T;
816
816
  return /* @__PURE__ */ m(ge, { children: [
817
- /* @__PURE__ */ l("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ l("div", { className: "relative", children: /* @__PURE__ */ m(zt, { children: [
817
+ /* @__PURE__ */ l("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ l("div", { className: "relative", children: /* @__PURE__ */ m(jt, { children: [
818
818
  /* @__PURE__ */ l(
819
819
  Wt,
820
820
  {
821
821
  asChild: !0,
822
822
  onClick: () => {
823
- g(), f(!0);
823
+ g(), d(!0);
824
824
  },
825
825
  children: e || /* @__PURE__ */ l(U, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ l(Ia, { className: "h-4 w-4" }) }, "template-viewer")
826
826
  }
827
827
  ),
828
828
  /* @__PURE__ */ l(Yt, { side: "right", children: /* @__PURE__ */ l("p", { children: t("Open pages manager") }) })
829
829
  ] }) }) }),
830
- /* @__PURE__ */ l(Es, { open: A, onOpenChange: (P) => !P && y && f(!1), children: /* @__PURE__ */ m(
830
+ /* @__PURE__ */ l(Es, { open: y, onOpenChange: (A) => !A && p && d(!1), children: /* @__PURE__ */ m(
831
831
  ps,
832
832
  {
833
833
  side: "left",
834
834
  "aria-describedby": "pages-manager-description",
835
- className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${y ? "" : "sheet-hide-close-btn"}`,
835
+ className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${p ? "" : "sheet-hide-close-btn"}`,
836
836
  children: [
837
837
  /* @__PURE__ */ m(ta, { className: "mb-3 px-4 pt-4", children: [
838
838
  /* @__PURE__ */ m(na, { className: "flex items-center gap-2 text-sm font-semibold", children: [
839
- /* @__PURE__ */ l("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ l(Ca, { className: "h-4 w-4" }) }),
839
+ /* @__PURE__ */ l("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ l(La, { className: "h-4 w-4" }) }),
840
840
  /* @__PURE__ */ m("div", { className: "flex flex-col", children: [
841
841
  /* @__PURE__ */ l("span", { className: "text-sm font-semibold", children: t("Pages") }),
842
842
  /* @__PURE__ */ l("span", { id: "pages-manager-description", className: "text-xs font-normal text-muted-foreground", children: t("Manage your site structure") })
@@ -844,12 +844,12 @@ const Dn = Ee(null), Gn = () => {
844
844
  ] }),
845
845
  /* @__PURE__ */ l(sa, { className: "sr-only", children: t("Manage your site structure") })
846
846
  ] }),
847
- /* @__PURE__ */ l("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: A && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Ti, { close: () => f(!1) }) }) })
847
+ /* @__PURE__ */ l("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: y && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Ti, { close: () => d(!1) }) }) })
848
848
  ]
849
849
  }
850
850
  ) })
851
851
  ] });
852
- }, Si = F(() => import("./add-new-language-page-0zC1CJZK.js")), _i = () => {
852
+ }, Si = F(() => import("./add-new-language-page-DSB8ohdj.js")), _i = () => {
853
853
  const e = oe("topLeftCorner", null);
854
854
  return e ? /* @__PURE__ */ l("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Fr.createElement(e, {}) }) : null;
855
855
  }, Pi = ({
@@ -857,57 +857,54 @@ const Dn = Ee(null), Gn = () => {
857
857
  variant: t = "ghost",
858
858
  goToDefaultLang: n = !1
859
859
  }) => {
860
- const { fallbackLang: s, languages: r, selectedLang: a, setSelectedLang: i } = Se(), o = he(a) ? s : a, [, c] = le(), { isLocked: u } = Ie();
860
+ const { fallbackLang: s, languages: r, selectedLang: a, setSelectedLang: i } = Se(), o = he(a) ? s : a, [, c] = le(), { isLocked: u } = Ie(), { t: d } = _e();
861
861
  se(() => {
862
- const p = new URLSearchParams(window.location.search), A = p.get("lang");
863
- A && (r.includes(A) ? i(A) : (p.delete("lang"), c(p), i("")));
862
+ const y = new URLSearchParams(window.location.search), A = y.get("lang");
863
+ A && (r.includes(A) ? i(A) : (y.delete("lang"), c(y), i("")));
864
864
  }, [r, c, i]);
865
- const [, f] = te(Dn), { data: d } = ie(), { data: h } = Re(), { data: g } = xe(), y = Q(() => {
866
- const p = fs(
867
- Bt(V(h, "languages"), (A) => {
868
- const P = re(g, { lang: A });
865
+ const [, f] = te(On), { data: h } = ie(), { data: g } = Re(), { data: p } = Ge(), S = Q(() => {
866
+ const y = fs(
867
+ Mt(V(g, "languages"), (A) => {
868
+ const b = re(p, { lang: A });
869
869
  return {
870
870
  key: A,
871
- value: V(Lt, A, A),
872
- isLangPageAdded: !!P
871
+ value: V(Nt, A, A),
872
+ isLangPageAdded: !!b
873
873
  };
874
874
  })
875
875
  ).filter(Boolean);
876
876
  return [
877
877
  {
878
878
  key: s,
879
- value: V(Lt, s),
879
+ value: V(Nt, s),
880
880
  isLangPageAdded: !0
881
881
  },
882
- ...p
882
+ ...y
883
883
  ];
884
- }, [s, g, h]), T = (p) => {
884
+ }, [s, p, g]), P = (y) => {
885
885
  if (document.querySelector('[data-panel-id="seo"]')) {
886
- const P = new CustomEvent("seo-language-switch-check", {
886
+ const b = new CustomEvent("seo-language-switch-check", {
887
887
  detail: {
888
888
  fromLang: o,
889
- toLang: p,
890
- switchHandler: () => _(p)
889
+ toLang: y,
890
+ switchHandler: () => T(y)
891
891
  }
892
892
  });
893
- window.dispatchEvent(P);
893
+ window.dispatchEvent(b);
894
894
  return;
895
895
  }
896
- _(p);
897
- }, _ = (p) => {
898
- i(p);
896
+ T(y);
897
+ }, T = (y) => {
898
+ i(y);
899
899
  const A = new URLSearchParams(window.location.search);
900
- p === s ? A.delete("lang") : A.set("lang", p), ws(A, c);
900
+ y === s ? A.delete("lang") : A.set("lang", y), ws(A, c);
901
901
  };
902
902
  return he(r) ? null : u ? /* @__PURE__ */ m(U, { variant: "ghost", size: "sm", className: "ml-px h-max cursor-not-allowed gap-2 py-1.5 opacity-50", children: [
903
- /* @__PURE__ */ l(rn, { className: "h-4 w-4" }),
904
- V(Lt, o, o),
905
- /* @__PURE__ */ l(gn, { className: "h-4 w-4" })
906
- ] }) : n ? /* @__PURE__ */ m(U, { onClick: () => _(s), variant: t, size: "sm", className: "h-7", children: [
907
- /* @__PURE__ */ l(rn, { className: "h-4 w-4" }),
908
- "Go to default language"
909
- ] }) : /* @__PURE__ */ l(ge, { children: /* @__PURE__ */ m(bn, { children: [
910
- /* @__PURE__ */ l(In, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(
903
+ /* @__PURE__ */ l(Vn, { className: "h-4 w-4" }),
904
+ V(Nt, o, o),
905
+ /* @__PURE__ */ l(hn, { className: "h-4 w-4" })
906
+ ] }) : n ? /* @__PURE__ */ l(U, { onClick: () => T(s), variant: "link", size: "sm", children: d("Switch to default language") }) : /* @__PURE__ */ l(ge, { children: /* @__PURE__ */ m(wn, { children: [
907
+ /* @__PURE__ */ l(bn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(
911
908
  U,
912
909
  {
913
910
  disabled: !!u,
@@ -915,35 +912,35 @@ const Dn = Ee(null), Gn = () => {
915
912
  size: "sm",
916
913
  className: "ml-px h-max gap-2 py-1.5",
917
914
  children: [
918
- /* @__PURE__ */ l(rn, { className: "h-4 w-4" }),
919
- V(Lt, o, o),
920
- /* @__PURE__ */ l(gn, { className: "h-4 w-4" })
915
+ /* @__PURE__ */ l(Vn, { className: "h-4 w-4" }),
916
+ V(Nt, o, o),
917
+ /* @__PURE__ */ l(hn, { className: "h-4 w-4" })
921
918
  ]
922
919
  }
923
920
  ) }),
924
- /* @__PURE__ */ m(Cn, { className: "space-y-1 border-border", children: [
925
- Bt(
926
- y.filter((p) => p.isLangPageAdded),
927
- (p) => /* @__PURE__ */ m(
921
+ /* @__PURE__ */ m(In, { className: "space-y-1 border-border", children: [
922
+ Mt(
923
+ S.filter((y) => y.isLangPageAdded),
924
+ (y) => /* @__PURE__ */ m(
928
925
  ue,
929
926
  {
930
- className: Mt(
927
+ className: Bt(
931
928
  "flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
932
- p.key === o && "!bg-gray-200 text-gray-700"
929
+ y.key === o && "!bg-gray-200 text-gray-700"
933
930
  ),
934
- onClick: () => T(p.key),
931
+ onClick: () => P(y.key),
935
932
  children: [
936
- /* @__PURE__ */ l("div", { className: "text-slate-600", children: p.value }),
937
- p.key === s && /* @__PURE__ */ m("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
938
- /* @__PURE__ */ l(Na, { fill: "orange", className: "h-2 w-2" }),
933
+ /* @__PURE__ */ l("div", { className: "text-slate-600", children: y.value }),
934
+ y.key === s && /* @__PURE__ */ m("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
935
+ /* @__PURE__ */ l(Ca, { fill: "orange", className: "h-2 w-2" }),
939
936
  "Primary"
940
937
  ] })
941
938
  ]
942
939
  },
943
- p.value
940
+ y.value
944
941
  )
945
942
  ),
946
- e && !he(y.filter((p) => !p.isLangPageAdded)) && /* @__PURE__ */ m(ge, { children: [
943
+ e && !he(S.filter((y) => !y.isLangPageAdded)) && /* @__PURE__ */ m(ge, { children: [
947
944
  /* @__PURE__ */ l(ra, {}),
948
945
  /* @__PURE__ */ m(
949
946
  U,
@@ -951,9 +948,9 @@ const Dn = Ee(null), Gn = () => {
951
948
  size: "sm",
952
949
  variant: "ghost",
953
950
  onClick: () => {
954
- d && f({
951
+ h && f({
955
952
  edit: !1,
956
- primaryPage: d.id
953
+ primaryPage: h.id
957
954
  });
958
955
  },
959
956
  className: "text-xs font-normal duration-200 hover:bg-slate-300 hover:text-slate-800",
@@ -968,7 +965,7 @@ const Dn = Ee(null), Gn = () => {
968
965
  ] }) });
969
966
  };
970
967
  function vi() {
971
- const [e, t] = te(Dn);
968
+ const [e, t] = te(On);
972
969
  return /* @__PURE__ */ m("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
973
970
  /* @__PURE__ */ l(_i, {}),
974
971
  /* @__PURE__ */ l(Is, {}),
@@ -988,21 +985,21 @@ function vi() {
988
985
  function wi() {
989
986
  return /* @__PURE__ */ l("div", { className: "mt-2 space-y-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ m("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
990
987
  /* @__PURE__ */ m("div", { className: "flex-1 space-y-1", children: [
991
- /* @__PURE__ */ l(Nt, { className: "h-4 w-3/4" }),
992
- /* @__PURE__ */ l(Nt, { className: "h-3 w-1/2" }),
993
- /* @__PURE__ */ l(Nt, { className: "mt-1 h-5 w-20" })
988
+ /* @__PURE__ */ l(Ct, { className: "h-4 w-3/4" }),
989
+ /* @__PURE__ */ l(Ct, { className: "h-3 w-1/2" }),
990
+ /* @__PURE__ */ l(Ct, { className: "mt-1 h-5 w-20" })
994
991
  ] }),
995
- /* @__PURE__ */ l(Nt, { className: "h-8 w-8 rounded-full" })
992
+ /* @__PURE__ */ l(Ct, { className: "h-8 w-8 rounded-full" })
996
993
  ] }, t)) });
997
994
  }
998
- const bi = z.lazy(() => import("./page-revisions-content-CKcp4He4.js"));
995
+ const bi = j.lazy(() => import("./page-revisions-content-c32By7XR.js"));
999
996
  function Ii() {
1000
- const [e, t] = z.useState(!1);
1001
- return /* @__PURE__ */ l(ys, { children: /* @__PURE__ */ m(zt, { delayDuration: 0, children: [
997
+ const [e, t] = j.useState(!1);
998
+ return /* @__PURE__ */ l(ys, { children: /* @__PURE__ */ m(jt, { delayDuration: 0, children: [
1002
999
  /* @__PURE__ */ m(Es, { open: e, onOpenChange: t, children: [
1003
1000
  /* @__PURE__ */ l(aa, { asChild: !0, children: /* @__PURE__ */ l(Wt, { asChild: !0, children: /* @__PURE__ */ m("span", { className: "flex items-center gap-2", children: [
1004
1001
  /* @__PURE__ */ m(U, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
1005
- /* @__PURE__ */ l(La, { className: "h-4 w-4" }),
1002
+ /* @__PURE__ */ l(Na, { className: "h-4 w-4" }),
1006
1003
  /* @__PURE__ */ l("span", { className: "sr-only", children: "View revision history" })
1007
1004
  ] }),
1008
1005
  /* @__PURE__ */ l("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
@@ -1012,7 +1009,7 @@ function Ii() {
1012
1009
  /* @__PURE__ */ l(Yt, { side: "bottom", children: /* @__PURE__ */ l("p", { children: "Revision history" }) })
1013
1010
  ] }) });
1014
1011
  }
1015
- const on = ({
1012
+ const an = ({
1016
1013
  permission: e,
1017
1014
  permissions: t,
1018
1015
  children: n,
@@ -1020,22 +1017,22 @@ const on = ({
1020
1017
  }) => {
1021
1018
  const { hasPermission: r } = ms();
1022
1019
  return e && !r(e) || t && !t.some((a) => r(a)) ? s : n;
1023
- }, Ci = {
1020
+ }, Li = {
1024
1021
  SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
1025
- }, Ce = () => {
1026
- const e = N(), t = I();
1022
+ }, Le = () => {
1023
+ const e = N(), t = L();
1027
1024
  return ae({
1028
1025
  queryKey: [E.GET_PAGE_TYPES],
1029
1026
  staleTime: 1 / 0,
1030
1027
  placeholderData: [],
1031
1028
  queryFn: async () => t(e, { action: E.GET_PAGE_TYPES })
1032
1029
  });
1033
- }, Ni = (e) => {
1034
- const { data: t } = Ce();
1030
+ }, Ci = (e) => {
1031
+ const { data: t } = Le();
1035
1032
  return Q(() => t == null ? void 0 : t.find((n) => n.key === e), [t, e]);
1036
- }, Li = () => {
1037
- const e = N(), t = I();
1038
- return X({
1033
+ }, Ni = () => {
1034
+ const e = N(), t = L();
1035
+ return Z({
1039
1036
  mutationFn: async ({ pageType: n, query: s }) => {
1040
1037
  try {
1041
1038
  return t(e, {
@@ -1051,8 +1048,8 @@ const on = ({
1051
1048
  }
1052
1049
  });
1053
1050
  }, Rc = () => {
1054
- const e = N(), t = W(), n = I(), { data: s } = Ce();
1055
- return X({
1051
+ const e = N(), t = W(), n = L(), { data: s } = Le();
1052
+ return Z({
1056
1053
  mutationFn: async (r) => await n(e, {
1057
1054
  action: E.CREATE_PAGE,
1058
1055
  data: r
@@ -1072,13 +1069,13 @@ const on = ({
1072
1069
  onError: (r, a) => {
1073
1070
  const i = re(s, { key: a.pageType });
1074
1071
  R.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
1075
- description: V(Ci, r.message, r.message)
1072
+ description: V(Li, r.message, r.message)
1076
1073
  });
1077
1074
  }
1078
1075
  });
1079
1076
  }, Uc = () => {
1080
- const e = N(), t = W(), n = I(), { data: s } = be(), { data: r } = Ce();
1081
- return X({
1077
+ const e = N(), t = W(), n = L(), { data: s } = be(), { data: r } = Le();
1078
+ return Z({
1082
1079
  mutationFn: async (a) => await n(e, {
1083
1080
  action: E.UPDATE_PAGE,
1084
1081
  data: a
@@ -1101,9 +1098,9 @@ const on = ({
1101
1098
  });
1102
1099
  }
1103
1100
  });
1104
- }, Bc = () => {
1105
- const e = N(), t = W(), n = I(), { data: s } = Ce();
1106
- return X({
1101
+ }, Mc = () => {
1102
+ const e = N(), t = W(), n = L(), { data: s } = Le();
1103
+ return Z({
1107
1104
  mutationFn: async (r) => n(e, {
1108
1105
  action: E.DELETE_PAGE,
1109
1106
  data: { id: r == null ? void 0 : r.id }
@@ -1130,9 +1127,9 @@ const on = ({
1130
1127
  });
1131
1128
  }
1132
1129
  });
1133
- }, Mc = () => {
1134
- const e = N(), t = W(), n = I(), { data: s } = Ce();
1135
- return X({
1130
+ }, Bc = () => {
1131
+ const e = N(), t = W(), n = L(), { data: s } = Le();
1132
+ return Z({
1136
1133
  mutationFn: async (r) => n(e, {
1137
1134
  action: E.TAKE_OFFLINE,
1138
1135
  data: { id: r == null ? void 0 : r.id }
@@ -1155,9 +1152,9 @@ const on = ({
1155
1152
  });
1156
1153
  }
1157
1154
  });
1158
- }, Cs = () => {
1159
- const e = N(), t = I(), n = W(), { data: s } = ie(), { savePageAsync: r } = Ge();
1160
- return X({
1155
+ }, Ls = () => {
1156
+ const e = N(), t = L(), n = W(), { data: s } = ie(), { savePageAsync: r } = xe();
1157
+ return Z({
1161
1158
  mutationFn: async ({ ids: a }) => (await r(), t(e, {
1162
1159
  action: E.PUBLISH_CHANGES,
1163
1160
  data: { ids: a }
@@ -1176,8 +1173,8 @@ const on = ({
1176
1173
  }
1177
1174
  });
1178
1175
  }, Fc = () => {
1179
- const e = N(), t = I(), n = W();
1180
- return X({
1176
+ const e = N(), t = L(), n = W();
1177
+ return Z({
1181
1178
  mutationFn: async (s) => {
1182
1179
  var r;
1183
1180
  return t(e, {
@@ -1201,8 +1198,8 @@ const on = ({
1201
1198
  }
1202
1199
  });
1203
1200
  }, qc = () => {
1204
- const e = N(), t = I(), n = W();
1205
- return X({
1201
+ const e = N(), t = L(), n = W();
1202
+ return Z({
1206
1203
  mutationFn: async (s) => t(e, {
1207
1204
  action: E.UNMARK_AS_TEMPLATE,
1208
1205
  data: { id: s == null ? void 0 : s.id }
@@ -1217,8 +1214,8 @@ const on = ({
1217
1214
  }
1218
1215
  });
1219
1216
  }, Kc = () => {
1220
- const e = N(), t = I(), n = W();
1221
- return X({
1217
+ const e = N(), t = L(), n = W();
1218
+ return Z({
1222
1219
  mutationFn: async ({ id: s, slug: r }) => t(e, {
1223
1220
  action: E.CHANGE_SLUG,
1224
1221
  data: { id: s, slug: r }
@@ -1234,12 +1231,12 @@ const on = ({
1234
1231
  R.error("Failed to change slug");
1235
1232
  }
1236
1233
  });
1237
- }, ki = F(() => import("./publish-pages-content-BMaeNHV2.js"));
1234
+ }, ki = F(() => import("./publish-pages-content-BB6l92oG.js"));
1238
1235
  function Oi({
1239
1236
  showModal: e = !1,
1240
1237
  onClose: t = () => console.log("Cancelled")
1241
1238
  }) {
1242
- const { mutate: n, isPending: s } = Cs();
1239
+ const { mutate: n, isPending: s } = Ls();
1243
1240
  return /* @__PURE__ */ l(As, { open: e, onOpenChange: s ? () => {
1244
1241
  } : t, children: e && /* @__PURE__ */ l(H, { fallback: /* @__PURE__ */ l("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ l(ki, { onClose: t, isPending: s, publishPage: n }) }) });
1245
1242
  }
@@ -1285,7 +1282,7 @@ const ce = {
1285
1282
  spread: 120,
1286
1283
  origin: { y: 0.6 },
1287
1284
  angle: 90
1288
- }, Gi = {
1285
+ }, xi = {
1289
1286
  TOP_RIGHT: {
1290
1287
  angle: 225,
1291
1288
  origin: { x: 0.9, y: 0 }
@@ -1294,14 +1291,14 @@ const ce = {
1294
1291
  angle: 100,
1295
1292
  origin: { x: 0.9, y: 0.9 }
1296
1293
  }
1297
- }, xi = async () => {
1294
+ }, Gi = async () => {
1298
1295
  const { default: e } = await import("./confetti.module-DCmCkDyV.js");
1299
1296
  return e;
1300
- }, ln = (e) => {
1301
- let t = Gi[e];
1297
+ }, on = (e) => {
1298
+ let t = xi[e];
1302
1299
  t || (t = {});
1303
1300
  const n = { ...Di, ...t };
1304
- xi().then((s) => s(n));
1301
+ Gi().then((s) => s(n));
1305
1302
  };
1306
1303
  function xn({
1307
1304
  children: e,
@@ -1310,35 +1307,35 @@ function xn({
1310
1307
  delayDuration: s = 700,
1311
1308
  showTooltip: r = !0
1312
1309
  }) {
1313
- return r ? /* @__PURE__ */ l(ys, { children: /* @__PURE__ */ m(zt, { delayDuration: s, children: [
1310
+ return r ? /* @__PURE__ */ l(ys, { children: /* @__PURE__ */ m(jt, { delayDuration: s, children: [
1314
1311
  /* @__PURE__ */ l(Wt, { asChild: !0, children: e }),
1315
1312
  /* @__PURE__ */ l(Yt, { side: n, sideOffset: 10, children: /* @__PURE__ */ l("p", { children: t }) })
1316
1313
  ] }) }) : e;
1317
1314
  }
1318
- const Ri = F(() => import("./unpublish-page-JzGl35pF.js")), Ui = F(() => import("./translation-warning-modal-DalBhNQy.js")), Bi = () => {
1319
- const { t: e } = we(), { selectedLang: t, fallbackLang: n } = Se(), s = oe("getPreviewUrl", async (h) => h), [r, a] = K(""), { data: i } = ie(), { data: o } = xe(), { data: c } = Ce(), u = Q(
1315
+ const Ri = F(() => import("./unpublish-page-CEtpcrvc.js")), Ui = F(() => import("./translation-warning-modal-DalBhNQy.js")), Mi = () => {
1316
+ const { t: e } = _e(), { selectedLang: t, fallbackLang: n } = Se(), s = oe("getPreviewUrl", async (h) => h), [r, a] = K(""), { data: i } = ie(), { data: o } = Ge(), { data: c } = Le(), u = Q(
1320
1317
  () => {
1321
1318
  var h;
1322
1319
  return (h = o == null ? void 0 : o.find((g) => (g == null ? void 0 : g.lang) === t)) == null ? void 0 : h.slug;
1323
1320
  },
1324
1321
  [t, o]
1325
- ), f = j((h) => {
1322
+ ), d = z((h) => {
1326
1323
  var g;
1327
1324
  return (g = re(c, { key: h })) == null ? void 0 : g.hasSlug;
1328
- }, [c]), d = t === n ? "" : t;
1325
+ }, [c]), f = t === n ? "" : t;
1329
1326
  return se(() => {
1330
1327
  (async () => {
1331
1328
  if (typeof s == "function") {
1332
- const h = !f(i == null ? void 0 : i.pageType), g = await s(
1333
- h ? `${d !== "" ? d + "/" : ""}${i == null ? void 0 : i.id}` : u || ""
1329
+ const h = !d(i == null ? void 0 : i.pageType), g = await s(
1330
+ h ? `${f !== "" ? f + "/" : ""}${i == null ? void 0 : i.id}` : u || ""
1334
1331
  );
1335
1332
  a(g);
1336
1333
  } else
1337
1334
  a("");
1338
1335
  })();
1339
- }, [s, u, i == null ? void 0 : i.pageType, f, i == null ? void 0 : i.id, d]), /* @__PURE__ */ l(ge, { children: /* @__PURE__ */ l(xn, { content: e("Open preview in new tab"), delayDuration: 0, children: /* @__PURE__ */ l("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ l(U, { variant: "ghost", size: "sm", className: "gap-2", children: /* @__PURE__ */ l(ka, { className: "h-4 w-4" }) }) }) }) });
1340
- }, Mi = () => {
1341
- const { t: e } = we(), [t, n] = $r();
1336
+ }, [s, u, i == null ? void 0 : i.pageType, d, i == null ? void 0 : i.id, f]), /* @__PURE__ */ l(ge, { children: /* @__PURE__ */ l(xn, { content: e("Open preview in new tab"), delayDuration: 0, children: /* @__PURE__ */ l("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ l(U, { variant: "ghost", size: "sm", className: "gap-2", children: /* @__PURE__ */ l(ka, { className: "h-4 w-4" }) }) }) }) });
1337
+ }, Bi = () => {
1338
+ const { t: e } = _e(), [t, n] = $r();
1342
1339
  return /* @__PURE__ */ m(ge, { children: [
1343
1340
  /* @__PURE__ */ l(xn, { content: e("Theme"), delayDuration: 0, children: /* @__PURE__ */ l(
1344
1341
  U,
@@ -1353,23 +1350,23 @@ const Ri = F(() => import("./unpublish-page-JzGl35pF.js")), Ui = F(() => import(
1353
1350
  /* @__PURE__ */ l("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
1354
1351
  ] });
1355
1352
  }, Fi = () => {
1356
- const { t: e } = we(), [t, n] = K(!1), { isLocked: s } = Ie(), { savePageAsync: r, saveState: a } = Ge();
1353
+ const { t: e } = _e(), [t, n] = K(!1), { isLocked: s } = Ie(), { savePageAsync: r, saveState: a } = xe();
1357
1354
  se(() => {
1358
- const f = (d) => {
1359
- a === "UNSAVED" && (d.preventDefault(), d.returnValue = !1);
1355
+ const d = (f) => {
1356
+ a === "UNSAVED" && (f.preventDefault(), f.returnValue = !1);
1360
1357
  };
1361
- return a === "UNSAVED" && window.addEventListener("beforeunload", f), () => {
1362
- window.removeEventListener("beforeunload", f);
1358
+ return a === "UNSAVED" && window.addEventListener("beforeunload", d), () => {
1359
+ window.removeEventListener("beforeunload", d);
1363
1360
  };
1364
1361
  }, [a]);
1365
- const i = j(async () => {
1362
+ const i = z(async () => {
1366
1363
  t || (n(!0), await r(), n(!1));
1367
1364
  }, [r, t]), { buttonIcon: o, buttonClass: c, tooltipContent: u } = Q(() => {
1368
1365
  switch (a) {
1369
1366
  case "UNSAVED":
1370
1367
  return {
1371
1368
  tooltipContent: e("Save draft"),
1372
- buttonIcon: /* @__PURE__ */ l(Ga, { className: "h-4 w-4" }),
1369
+ buttonIcon: /* @__PURE__ */ l(xa, { className: "h-4 w-4" }),
1373
1370
  buttonClass: "gap-x-1"
1374
1371
  };
1375
1372
  case "SAVING":
@@ -1392,36 +1389,36 @@ const Ri = F(() => import("./unpublish-page-JzGl35pF.js")), Ui = F(() => import(
1392
1389
  u
1393
1390
  ] });
1394
1391
  }, qi = () => {
1395
- const { t: e } = we(), { selectedLang: t } = Se(), { data: n } = be(), { data: s } = xe(), [r, a] = K(!1), [i, o] = K(!1), [c, u] = K(null), { savePageAsync: f } = Ge(), [d, h] = K(!1), { data: g } = ie(), { mutate: y, isPending: T } = Cs(), { needTranslations: _ } = Ge(), p = _(), { buttonText: A, buttonClassName: P, isPublished: O } = Q(() => {
1392
+ const { t: e } = _e(), { selectedLang: t } = Se(), { data: n } = be(), { data: s } = Ge(), [r, a] = K(!1), [i, o] = K(!1), [c, u] = K(null), { savePageAsync: d } = xe(), [f, h] = K(!1), { data: g } = ie(), { mutate: p, isPending: S } = Ls(), { needTranslations: P } = xe(), T = P(), { buttonText: y, buttonClassName: A, isPublished: b } = Q(() => {
1396
1393
  const w = g && (g == null ? void 0 : g.online);
1397
1394
  return {
1398
1395
  buttonClassName: w ? "hover:bg-green-600 bg-green-500" : "",
1399
1396
  isPublished: w,
1400
1397
  buttonText: e(w ? "Published" : "Publish")
1401
1398
  };
1402
- }, [g, e]), M = async () => {
1403
- if (p) {
1399
+ }, [g, e]), B = async () => {
1400
+ if (T) {
1404
1401
  h(!0);
1405
1402
  return;
1406
1403
  }
1407
- L();
1408
- }, L = () => {
1404
+ k();
1405
+ }, k = () => {
1409
1406
  const w = [n == null ? void 0 : n.id, n == null ? void 0 : n.primaryPage];
1410
- y({ ids: fs(w) }, { onSuccess: () => ln("TOP_RIGHT") });
1407
+ p({ ids: fs(w) }, { onSuccess: () => on("TOP_RIGHT") });
1411
1408
  }, pe = () => {
1412
- h(!1), L();
1409
+ h(!1), k();
1413
1410
  }, ye = async () => {
1414
- h(!1), await f();
1415
- }, B = Q(() => Bt(s ?? [], "id"), [s]);
1411
+ h(!1), await d();
1412
+ }, M = Q(() => Mt(s ?? [], "id"), [s]);
1416
1413
  return /* @__PURE__ */ m(ge, { children: [
1417
1414
  /* @__PURE__ */ m("div", { className: "flex", children: [
1418
1415
  /* @__PURE__ */ m(
1419
1416
  U,
1420
1417
  {
1421
1418
  size: "sm",
1422
- onClick: M,
1423
- disabled: T || !(g != null && g.id),
1424
- className: `relative flex items-center gap-1 overflow-hidden rounded-r-none text-white transition-all duration-300 ease-in-out ${P}`,
1419
+ onClick: B,
1420
+ disabled: S || !(g != null && g.id),
1421
+ className: `relative flex items-center gap-1 overflow-hidden rounded-r-none text-white transition-all duration-300 ease-in-out ${A}`,
1425
1422
  onMouseEnter: () => o(!0),
1426
1423
  onMouseLeave: () => o(!1),
1427
1424
  children: [
@@ -1429,50 +1426,50 @@ const Ri = F(() => import("./unpublish-page-JzGl35pF.js")), Ui = F(() => import(
1429
1426
  "span",
1430
1427
  {
1431
1428
  className: `flex items-center transition-transform duration-300 ease-in-out ${i ? "-translate-y-10" : ""}`,
1432
- children: O ? /* @__PURE__ */ l(Hn, { className: "h-4 w-4" }) : /* @__PURE__ */ l(Qn, { className: "h-4 w-4" })
1429
+ children: b ? /* @__PURE__ */ l(Hn, { className: "h-4 w-4" }) : /* @__PURE__ */ l(Qn, { className: "h-4 w-4" })
1433
1430
  }
1434
1431
  ),
1435
1432
  /* @__PURE__ */ l(
1436
1433
  "span",
1437
1434
  {
1438
1435
  className: `absolute inset-0 left-3 flex items-center transition-transform duration-300 ease-in-out ${i ? "" : "translate-y-10"}`,
1439
- children: O ? /* @__PURE__ */ l(Qn, { className: "h-4 w-4" }) : /* @__PURE__ */ l(Hn, { className: "h-4 w-4" })
1436
+ children: b ? /* @__PURE__ */ l(Qn, { className: "h-4 w-4" }) : /* @__PURE__ */ l(Hn, { className: "h-4 w-4" })
1440
1437
  }
1441
1438
  ),
1442
- /* @__PURE__ */ l("span", { children: A }),
1443
- t ? `(${qn(t)})` : ""
1439
+ /* @__PURE__ */ l("span", { children: y }),
1440
+ t ? `(${Fn(t)})` : ""
1444
1441
  ]
1445
1442
  }
1446
1443
  ),
1447
- /* @__PURE__ */ m(bn, { children: [
1448
- /* @__PURE__ */ l(In, { asChild: !0, children: /* @__PURE__ */ l(
1444
+ /* @__PURE__ */ m(wn, { children: [
1445
+ /* @__PURE__ */ l(bn, { asChild: !0, children: /* @__PURE__ */ l(
1449
1446
  U,
1450
1447
  {
1451
1448
  size: "sm",
1452
- disabled: T || !(g != null && g.id),
1453
- className: `rounded-l-none border-l border-white/50 px-2 text-white ${P}`,
1454
- children: /* @__PURE__ */ l(gn, { className: "h-4 w-4" })
1449
+ disabled: S || !(g != null && g.id),
1450
+ className: `rounded-l-none border-l border-white/50 px-2 text-white ${A}`,
1451
+ children: /* @__PURE__ */ l(hn, { className: "h-4 w-4" })
1455
1452
  }
1456
1453
  ) }),
1457
- /* @__PURE__ */ m(Cn, { align: "end", className: "w-52", children: [
1454
+ /* @__PURE__ */ m(In, { align: "end", className: "w-52", children: [
1458
1455
  /* @__PURE__ */ m(
1459
1456
  ue,
1460
1457
  {
1461
- disabled: T,
1458
+ disabled: S,
1462
1459
  className: "cursor-pointer text-xs",
1463
- onClick: () => y({ ids: B }, { onSuccess: () => ln("TOP_RIGHT") }),
1460
+ onClick: () => p({ ids: M }, { onSuccess: () => on("TOP_RIGHT") }),
1464
1461
  children: [
1465
1462
  e("Publish"),
1466
1463
  " with translation pages"
1467
1464
  ]
1468
1465
  }
1469
1466
  ),
1470
- !O && /* @__PURE__ */ m(
1467
+ !b && /* @__PURE__ */ m(
1471
1468
  ue,
1472
1469
  {
1473
- disabled: T,
1470
+ disabled: S,
1474
1471
  className: "cursor-pointer text-xs",
1475
- onClick: () => y({ ids: [g == null ? void 0 : g.id] }, { onSuccess: () => ln("TOP_RIGHT") }),
1472
+ onClick: () => p({ ids: [g == null ? void 0 : g.id] }, { onSuccess: () => on("TOP_RIGHT") }),
1476
1473
  children: [
1477
1474
  e("Publish"),
1478
1475
  " page"
@@ -1483,23 +1480,23 @@ const Ri = F(() => import("./unpublish-page-JzGl35pF.js")), Ui = F(() => import(
1483
1480
  e("Open"),
1484
1481
  " publish menu"
1485
1482
  ] }),
1486
- O && /* @__PURE__ */ m(ue, { onClick: () => u(n), className: "cursor-pointer text-xs", children: [
1483
+ b && /* @__PURE__ */ m(ue, { onClick: () => u(n), className: "cursor-pointer text-xs", children: [
1487
1484
  e("Unpublish"),
1488
1485
  " page ",
1489
- t ? `(${qn(t)})` : ""
1486
+ t ? `(${Fn(t)})` : ""
1490
1487
  ] })
1491
1488
  ] })
1492
1489
  ] })
1493
1490
  ] }),
1494
1491
  /* @__PURE__ */ l(Oi, { showModal: r, onClose: () => a(!1) }),
1495
1492
  c && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Ri, { page: c, onClose: () => u(null) }) }),
1496
- d && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
1493
+ f && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
1497
1494
  Ui,
1498
1495
  {
1499
- isOpen: d,
1496
+ isOpen: f,
1500
1497
  onClose: ye,
1501
1498
  onContinue: pe,
1502
- isPending: T
1499
+ isPending: S
1503
1500
  }
1504
1501
  ) })
1505
1502
  ] });
@@ -1508,10 +1505,10 @@ function Ki() {
1508
1505
  const { isLocked: e } = Ie(), [t] = le(), n = t.get("lang"), s = Ps(n);
1509
1506
  return e || !s ? /* @__PURE__ */ l("div", {}) : /* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-1", children: [
1510
1507
  /* @__PURE__ */ l(Ii, {}),
1511
- /* @__PURE__ */ l(on, { permission: ce.EDIT_THEME, children: /* @__PURE__ */ l(Mi, {}) }),
1512
- /* @__PURE__ */ l(Bi, {}),
1513
- /* @__PURE__ */ l(on, { permission: ce.SAVE_PAGE, children: /* @__PURE__ */ l(Fi, {}) }),
1514
- /* @__PURE__ */ l(on, { permission: ce.PUBLISH_PAGE, children: /* @__PURE__ */ l(qi, {}) })
1508
+ /* @__PURE__ */ l(an, { permission: ce.EDIT_THEME, children: /* @__PURE__ */ l(Bi, {}) }),
1509
+ /* @__PURE__ */ l(Mi, {}),
1510
+ /* @__PURE__ */ l(an, { permission: ce.SAVE_PAGE, children: /* @__PURE__ */ l(Fi, {}) }),
1511
+ /* @__PURE__ */ l(an, { permission: ce.PUBLISH_PAGE, children: /* @__PURE__ */ l(qi, {}) })
1515
1512
  ] });
1516
1513
  }
1517
1514
  const Vi = ({
@@ -1525,29 +1522,29 @@ const Vi = ({
1525
1522
  children: o,
1526
1523
  isLanguagePage: c
1527
1524
  }) => {
1528
- const { t: u } = we(), { hasPermission: f } = ms(), { data: d } = Ce(), h = Q(() => re(d, { key: e.pageType }), [d, e.pageType]), g = Q(() => !!e.isTemplate, [e.isTemplate]), y = Q(() => !!(h != null && h.hasSlug), [h == null ? void 0 : h.hasSlug]);
1529
- return !f(ce.EDIT_PAGE) && !f(ce.DELETE_PAGE) && !f(ce.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ m(bn, { children: [
1530
- /* @__PURE__ */ l(In, { asChild: !0, onClick: (_) => _.stopPropagation(), children: o }),
1531
- /* @__PURE__ */ m(Cn, { align: "center", className: "text-sm", children: [
1532
- f(ce.ADD_PAGE) && !c && /* @__PURE__ */ m(
1525
+ const { t: u } = _e(), { hasPermission: d } = ms(), { data: f } = Le(), h = Q(() => re(f, { key: e.pageType }), [f, e.pageType]), g = Q(() => !!e.isTemplate, [e.isTemplate]), p = Q(() => !!(h != null && h.hasSlug), [h == null ? void 0 : h.hasSlug]);
1526
+ return !d(ce.EDIT_PAGE) && !d(ce.DELETE_PAGE) && !d(ce.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ m(wn, { children: [
1527
+ /* @__PURE__ */ l(bn, { asChild: !0, onClick: (P) => P.stopPropagation(), children: o }),
1528
+ /* @__PURE__ */ m(In, { align: "center", className: "text-sm", children: [
1529
+ d(ce.ADD_PAGE) && !c && /* @__PURE__ */ m(
1533
1530
  ue,
1534
1531
  {
1535
1532
  className: "flex cursor-pointer items-center gap-2",
1536
- onClick: (_) => {
1537
- _.stopPropagation(), t(e);
1533
+ onClick: (P) => {
1534
+ P.stopPropagation(), t(e);
1538
1535
  },
1539
1536
  children: [
1540
- /* @__PURE__ */ l(xa, { className: "size-3" }),
1537
+ /* @__PURE__ */ l(Ga, { className: "size-3" }),
1541
1538
  "Duplicate page"
1542
1539
  ]
1543
1540
  }
1544
1541
  ),
1545
- f(ce.EDIT_PAGE) && /* @__PURE__ */ m(
1542
+ d(ce.EDIT_PAGE) && /* @__PURE__ */ m(
1546
1543
  ue,
1547
1544
  {
1548
1545
  className: "flex cursor-pointer items-center gap-2",
1549
- onClick: (_) => {
1550
- _.stopPropagation(), n({
1546
+ onClick: (P) => {
1547
+ P.stopPropagation(), n({
1551
1548
  ...e,
1552
1549
  global: !(h != null && h.hasSlug)
1553
1550
  });
@@ -1558,12 +1555,12 @@ const Vi = ({
1558
1555
  ]
1559
1556
  }
1560
1557
  ),
1561
- (e == null ? void 0 : e.online) && f(ce.UNPUBLISH_PAGE) && /* @__PURE__ */ m(
1558
+ (e == null ? void 0 : e.online) && d(ce.UNPUBLISH_PAGE) && /* @__PURE__ */ m(
1562
1559
  ue,
1563
1560
  {
1564
1561
  className: "flex cursor-pointer items-center gap-2",
1565
- onClick: (_) => {
1566
- _.stopPropagation(), s(e);
1562
+ onClick: (P) => {
1563
+ P.stopPropagation(), s(e);
1567
1564
  },
1568
1565
  children: [
1569
1566
  /* @__PURE__ */ l(Ua, { className: "size-3" }),
@@ -1571,25 +1568,25 @@ const Vi = ({
1571
1568
  ]
1572
1569
  }
1573
1570
  ),
1574
- f(ce.DELETE_PAGE) && /* @__PURE__ */ m(
1571
+ d(ce.DELETE_PAGE) && /* @__PURE__ */ m(
1575
1572
  ue,
1576
1573
  {
1577
1574
  className: "flex cursor-pointer items-center gap-2",
1578
- onClick: (_) => {
1579
- _.stopPropagation(), r(e);
1575
+ onClick: (P) => {
1576
+ P.stopPropagation(), r(e);
1580
1577
  },
1581
1578
  children: [
1582
- /* @__PURE__ */ l(Ba, { className: "size-3" }),
1579
+ /* @__PURE__ */ l(Ma, { className: "size-3" }),
1583
1580
  u("Delete")
1584
1581
  ]
1585
1582
  }
1586
1583
  ),
1587
- f(ce.MARK_AS_TEMPLATE) && y && !c && /* @__PURE__ */ l(ge, { children: g ? /* @__PURE__ */ m(
1584
+ d(ce.MARK_AS_TEMPLATE) && p && !c && /* @__PURE__ */ l(ge, { children: g ? /* @__PURE__ */ m(
1588
1585
  ue,
1589
1586
  {
1590
1587
  className: "flex cursor-pointer items-center gap-2",
1591
- onClick: (_) => {
1592
- _.stopPropagation(), i(e);
1588
+ onClick: (P) => {
1589
+ P.stopPropagation(), i(e);
1593
1590
  },
1594
1591
  children: [
1595
1592
  /* @__PURE__ */ l($n, { className: "size-3" }),
@@ -1600,8 +1597,8 @@ const Vi = ({
1600
1597
  ue,
1601
1598
  {
1602
1599
  className: "flex cursor-pointer items-center gap-2",
1603
- onClick: (_) => {
1604
- _.stopPropagation(), a(e);
1600
+ onClick: (P) => {
1601
+ P.stopPropagation(), a(e);
1605
1602
  },
1606
1603
  children: [
1607
1604
  /* @__PURE__ */ l($n, { className: "size-3" }),
@@ -1611,15 +1608,15 @@ const Vi = ({
1611
1608
  ) })
1612
1609
  ] })
1613
1610
  ] });
1614
- }, Hi = F(() => import("./add-new-page-CUtZhDvi.js")), Qi = F(() => import("./delete-page-BS10zPLU.js")), $i = F(() => import("./duplicate-page-C1r4cCIJ.js")), ji = F(() => import("./mark-as-template-CUHypMlj.js")), zi = F(() => import("./unmark-as-template-DlA879QF.js")), Wi = F(() => import("./unpublish-page-JzGl35pF.js")), Yi = () => {
1615
- const [e, t] = K(null), [n, s] = K(null), [r, a] = K(null), [i, o] = K(null), [c, u] = K(null), [f, d] = K(null), { data: h, isFetching: g } = be(), { selectedLang: y, fallbackLang: T } = Se(), { data: _ } = xe(), p = _ == null ? void 0 : _.find((L) => L.lang === y), { isLocked: A } = Ie(), P = !(h != null && h.slug), [, O] = te(Dn);
1611
+ }, Hi = F(() => import("./add-new-page-BYkFbQvH.js")), Qi = F(() => import("./delete-page-C7xfkDN5.js")), $i = F(() => import("./duplicate-page-B8k4yZxa.js")), zi = F(() => import("./mark-as-template-CpNHtyfB.js")), ji = F(() => import("./unmark-as-template-CGZ0CCI2.js")), Wi = F(() => import("./unpublish-page-CEtpcrvc.js")), Yi = () => {
1612
+ const [e, t] = K(null), [n, s] = K(null), [r, a] = K(null), [i, o] = K(null), [c, u] = K(null), [d, f] = K(null), { data: h, isFetching: g } = be(), { selectedLang: p, fallbackLang: S } = Se(), { data: P } = Ge(), T = P == null ? void 0 : P.find((k) => k.lang === p), { isLocked: y } = Ie(), A = !(h != null && h.slug), [, b] = te(On);
1616
1613
  if (!h) return null;
1617
- const M = (L) => {
1618
- y.length > 0 && y !== T ? O({
1614
+ const B = (k) => {
1615
+ p.length > 0 && p !== S ? b({
1619
1616
  edit: !0,
1620
- id: L == null ? void 0 : L.id,
1621
- primaryPage: L == null ? void 0 : L.primaryPage
1622
- }) : d(L);
1617
+ id: k == null ? void 0 : k.id,
1618
+ primaryPage: k == null ? void 0 : k.primaryPage
1619
+ }) : f(k);
1623
1620
  };
1624
1621
  return /* @__PURE__ */ m(ge, { children: [
1625
1622
  /* @__PURE__ */ m("div", { className: "flex items-center justify-between rounded px-[2px] transition-colors duration-200", children: [
@@ -1629,84 +1626,84 @@ const Vi = ({
1629
1626
  className: "flex h-7 max-w-[200px] cursor-pointer items-center truncate rounded px-1 text-xs font-medium",
1630
1627
  variant: "ghost",
1631
1628
  children: g ? /* @__PURE__ */ l(Ft, { className: "h-4 w-4 animate-spin text-slate-400" }) : /* @__PURE__ */ m("span", { className: "flex w-full cursor-pointer items-end overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-xs font-medium", children: [
1632
- P ? /* @__PURE__ */ l(Ma, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ l(Fa, { className: "mr-1 h-4 w-4" }),
1633
- V(p || h, "name") ?? ""
1629
+ A ? /* @__PURE__ */ l(Ba, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ l(Fa, { className: "mr-1 h-4 w-4" }),
1630
+ V(T || h, "name") ?? ""
1634
1631
  ] })
1635
1632
  }
1636
1633
  ) }),
1637
- A ? /* @__PURE__ */ l(
1634
+ y ? /* @__PURE__ */ l(
1638
1635
  U,
1639
1636
  {
1640
1637
  variant: "ghost",
1641
1638
  size: "icon",
1642
1639
  className: "h-7 w-7 cursor-not-allowed rounded opacity-50 hover:bg-transparent",
1643
- children: /* @__PURE__ */ l(jn, { className: "h-4 w-4" })
1640
+ children: /* @__PURE__ */ l(zn, { className: "h-4 w-4" })
1644
1641
  }
1645
1642
  ) : /* @__PURE__ */ l(
1646
1643
  Vi,
1647
1644
  {
1648
1645
  page: h,
1649
- setDuplicatePage: (L) => u(L),
1650
- setAddEditPage: (L) => M(L),
1651
- setUnpublishPage: (L) => s(L),
1652
- setDeletePage: (L) => t(L),
1653
- setMarkAsTemplate: (L) => a(L),
1654
- setUnmarkAsTemplate: (L) => o(L),
1655
- isLanguagePage: y.length > 0 && y !== T,
1656
- children: /* @__PURE__ */ l(U, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ l(jn, { className: "h-4 w-4" }) })
1646
+ setDuplicatePage: (k) => u(k),
1647
+ setAddEditPage: (k) => B(k),
1648
+ setUnpublishPage: (k) => s(k),
1649
+ setDeletePage: (k) => t(k),
1650
+ setMarkAsTemplate: (k) => a(k),
1651
+ setUnmarkAsTemplate: (k) => o(k),
1652
+ isLanguagePage: p.length > 0 && p !== S,
1653
+ children: /* @__PURE__ */ l(U, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ l(zn, { className: "h-4 w-4" }) })
1657
1654
  }
1658
1655
  )
1659
1656
  ] }),
1660
- f && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
1657
+ d && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
1661
1658
  Hi,
1662
1659
  {
1663
- closePanel: () => d(null),
1660
+ closePanel: () => f(null),
1664
1661
  editPage: () => {
1665
1662
  },
1666
- addEditPage: f,
1667
- setAddEditPage: d
1663
+ addEditPage: d,
1664
+ setAddEditPage: f
1668
1665
  }
1669
1666
  ) }),
1670
1667
  e && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Qi, { page: e, onClose: () => t(null) }) }),
1671
1668
  n && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Wi, { page: n, onClose: () => s(null) }) }),
1672
- r && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(ji, { page: r, onClose: () => a(null) }) }),
1673
- i && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(zi, { page: i, onClose: () => o(null) }) }),
1669
+ r && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(zi, { page: r, onClose: () => a(null) }) }),
1670
+ i && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(ji, { page: i, onClose: () => o(null) }) }),
1674
1671
  c && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
1675
1672
  $i,
1676
1673
  {
1677
1674
  page: c,
1678
1675
  onClose: () => u(null),
1679
- closePanel: () => d(null)
1676
+ closePanel: () => f(null)
1680
1677
  }
1681
1678
  ) })
1682
1679
  ] });
1683
- }, Ns = ({ children: e, className: t = "" }) => /* @__PURE__ */ l(
1680
+ }, Cs = ({ children: e, className: t = "" }) => /* @__PURE__ */ l(
1684
1681
  "div",
1685
1682
  {
1686
- className: Mt(
1683
+ className: Bt(
1687
1684
  "fixed bottom-0 left-0 right-0 top-[50px] z-[20] flex w-screen flex-col items-center justify-center bg-black/40 transition-all",
1688
1685
  t
1689
1686
  ),
1690
1687
  children: e
1691
1688
  }
1692
- ), Ji = ({ hasDynamicPage: e }) => /* @__PURE__ */ l(Ns, { children: /* @__PURE__ */ m("div", { className: "flex min-w-[300px] max-w-[400px] flex-col items-center justify-center rounded-lg border bg-white p-4 shadow-lg", children: [
1689
+ ), Ji = ({ hasDynamicPage: e }) => /* @__PURE__ */ l(Cs, { children: /* @__PURE__ */ m("div", { className: "flex min-w-[300px] max-w-[400px] flex-col items-center justify-center rounded-lg border bg-white p-4 shadow-lg", children: [
1693
1690
  /* @__PURE__ */ l("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
1694
1691
  /* @__PURE__ */ l("p", { className: "pt-2 text-center text-sm font-light text-gray-600", children: e ? "Please select a page from the list in the top header. This will enable you to edit the page." : "Please add a new page" })
1695
- ] }) }), Xi = F(() => import("./dynamic-page-selector-CjtnFkxO.js")), Zi = () => {
1692
+ ] }) }), Zi = F(() => import("./dynamic-page-selector-C7Vos5-l.js")), Xi = () => {
1696
1693
  const { dynamicPage: e, allLangPages: t, isFetching: n } = ai(), s = t.length > 0;
1697
1694
  return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
1698
1695
  !e && /* @__PURE__ */ l(Ji, { hasDynamicPage: s }),
1699
- /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Xi, {}) })
1696
+ /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Zi, {}) })
1700
1697
  ] });
1701
1698
  }, eo = () => {
1702
- const { data: e, isFetching: t } = be(), { data: n, isFetching: s } = ie(), r = V(n, "dynamic", !1), a = Ln(), i = jr("dynamic-page-selector"), o = e == null ? void 0 : e.slug, c = !o, u = ci(), f = t || s, h = (c ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
1699
+ const { data: e, isFetching: t } = be(), { data: n, isFetching: s } = ie(), r = V(n, "dynamic", !1), a = Cn(), i = zr("dynamic-page-selector"), o = e == null ? void 0 : e.slug, c = !o, u = ci(), d = t || s, h = (c ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
1703
1700
  return /* @__PURE__ */ m("div", { className: "relative flex items-center gap-x-1", children: [
1704
1701
  /* @__PURE__ */ l(
1705
1702
  "div",
1706
1703
  {
1707
- className: Mt(
1704
+ className: Bt(
1708
1705
  "flex h-8 w-auto max-w-[600px] items-center rounded-md border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-800",
1709
- f && "max-w-0 overflow-hidden opacity-0"
1706
+ d && "max-w-0 overflow-hidden opacity-0"
1710
1707
  ),
1711
1708
  children: /* @__PURE__ */ l(Yi, {})
1712
1709
  }
@@ -1714,9 +1711,9 @@ const Vi = ({
1714
1711
  /* @__PURE__ */ m(
1715
1712
  "div",
1716
1713
  {
1717
- className: Mt(
1714
+ className: Bt(
1718
1715
  "flex h-8 w-auto max-w-[600px] items-center rounded-md border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-800" + (c ? " pr-2" : ""),
1719
- f && "max-w-0 overflow-hidden opacity-0"
1716
+ d && "max-w-0 overflow-hidden opacity-0"
1720
1717
  ),
1721
1718
  children: [
1722
1719
  /* @__PURE__ */ l(Pi, {}),
@@ -1736,28 +1733,28 @@ const Vi = ({
1736
1733
  ]
1737
1734
  }
1738
1735
  ),
1739
- r && i && /* @__PURE__ */ l(Zi, {})
1736
+ r && i && /* @__PURE__ */ l(Xi, {})
1740
1737
  ] });
1741
1738
  }, to = () => /* @__PURE__ */ m("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
1742
1739
  /* @__PURE__ */ l(vi, {}),
1743
1740
  /* @__PURE__ */ l(eo, {}),
1744
1741
  /* @__PURE__ */ l(Ki, {})
1745
- ] }), Ls = () => {
1742
+ ] }), Ns = () => {
1746
1743
  const e = W(), { data: t } = ae({
1747
1744
  queryKey: [E.AI_CONTEXT],
1748
1745
  initialData: "",
1749
1746
  queryFn: () => "",
1750
1747
  staleTime: 0
1751
1748
  });
1752
- return { setAiContext: j(
1749
+ return { setAiContext: z(
1753
1750
  (s) => {
1754
1751
  e.setQueryData([E.AI_CONTEXT], s);
1755
1752
  },
1756
1753
  [e]
1757
1754
  ), aiContext: t };
1758
1755
  }, no = () => {
1759
- const e = N(), { aiContext: t } = Ls(), n = I();
1760
- return j(
1756
+ const e = N(), { aiContext: t } = Ns(), n = L();
1757
+ return z(
1761
1758
  async (s, r, a, i) => n(e, {
1762
1759
  action: E.ASK_AI,
1763
1760
  data: { type: s, prompt: r, blocks: a, context: t, lang: i }
@@ -1765,11 +1762,11 @@ const Vi = ({
1765
1762
  [e, t, n]
1766
1763
  );
1767
1764
  }, so = (e, t) => t.map((n) => {
1768
- if (jt(e, n._type)) {
1765
+ if (zt(e, n._type)) {
1769
1766
  const s = Ja(n._type);
1770
1767
  return {
1771
1768
  ...s,
1772
- ...wn(n, [
1769
+ ...vn(n, [
1773
1770
  ...Or(s),
1774
1771
  "_type",
1775
1772
  "_id",
@@ -1777,7 +1774,7 @@ const Vi = ({
1777
1774
  "_parent",
1778
1775
  "_bindings"
1779
1776
  ]),
1780
- ...Dr(n, (r, a) => Gr(a, "_attrs")),
1777
+ ...Dr(n, (r, a) => xr(a, "_attrs")),
1781
1778
  ...n
1782
1779
  };
1783
1780
  }
@@ -1793,7 +1790,7 @@ const Vi = ({
1793
1790
  return { blocks: so(t, n) };
1794
1791
  }, [e, t]);
1795
1792
  }, ao = () => {
1796
- const [e] = le(), t = e.get("page"), n = N(), { setAiContext: s } = Ls(), [, r] = kn(), [, a] = li(), [, i] = zr(), o = I();
1793
+ const [e] = le(), t = e.get("page"), n = N(), { setAiContext: s } = Ns(), [, r] = Nn(), [, a] = li(), [, i] = jr(), o = L();
1797
1794
  return ae({
1798
1795
  queryKey: [E.GET_DRAFT_PAGE, t],
1799
1796
  staleTime: 1 / 0,
@@ -1803,13 +1800,13 @@ const Vi = ({
1803
1800
  const c = await o(n, {
1804
1801
  action: E.GET_DRAFT_PAGE,
1805
1802
  data: { id: t, draft: !0 }
1806
- }), u = c.blocks ?? [], f = re(u, { _type: "@chai/ai-context" });
1807
- return s(V(f, "_value", "") || ""), r((d) => ({ ...d, lastSaved: c.lastSaved })), a(V(c, "metadata", {})), setTimeout(() => i(!0), 500), u;
1803
+ }), u = c.blocks ?? [], d = re(u, { _type: "@chai/ai-context" });
1804
+ return s(V(d, "_value", "") || ""), r((f) => ({ ...f, lastSaved: c.lastSaved })), a(V(c, "metadata", {})), setTimeout(() => i(!0), 500), u;
1808
1805
  },
1809
1806
  enabled: !!t
1810
1807
  });
1811
1808
  }, io = () => {
1812
- const { data: e } = ie(), { data: t } = be(), n = N(), s = I(), r = Gn(), a = Ln();
1809
+ const { data: e } = ie(), { data: t } = be(), n = N(), s = L(), r = Dn(), a = Cn();
1813
1810
  return ae({
1814
1811
  queryKey: [E.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id, a],
1815
1812
  staleTime: 1 / 0,
@@ -1839,8 +1836,8 @@ const Vi = ({
1839
1836
  enabled: !!(e != null && e.pageType) && !!t.id
1840
1837
  });
1841
1838
  }, oo = () => {
1842
- const e = N(), t = W(), n = I();
1843
- return X({
1839
+ const e = N(), t = W(), n = L();
1840
+ return Z({
1844
1841
  mutationFn: async (s) => n(e, {
1845
1842
  action: E.UPDATE_WEBSITE_SETTINGS,
1846
1843
  data: s
@@ -1858,8 +1855,8 @@ const Vi = ({
1858
1855
  }
1859
1856
  });
1860
1857
  }, Vc = () => {
1861
- const e = N(), t = W(), n = I(), { selectedLang: s } = Se();
1862
- return X({
1858
+ const e = N(), t = W(), n = L(), { selectedLang: s } = Se();
1859
+ return Z({
1863
1860
  mutationFn: async (r) => n(e, { action: E.ADD_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
1864
1861
  onSuccess: () => {
1865
1862
  t.invalidateQueries({
@@ -1873,8 +1870,8 @@ const Vi = ({
1873
1870
  }
1874
1871
  });
1875
1872
  }, Hc = () => {
1876
- const e = N(), t = W(), n = I(), { selectedLang: s } = Se();
1877
- return X({
1873
+ const e = N(), t = W(), n = L(), { selectedLang: s } = Se();
1874
+ return Z({
1878
1875
  mutationFn: async (r) => n(e, { action: E.UPDATE_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
1879
1876
  onSuccess: () => {
1880
1877
  t.invalidateQueries({
@@ -1888,8 +1885,8 @@ const Vi = ({
1888
1885
  }
1889
1886
  });
1890
1887
  }, Qc = () => {
1891
- const e = N(), t = W(), n = I();
1892
- return X({
1888
+ const e = N(), t = W(), n = L();
1889
+ return Z({
1893
1890
  mutationFn: async (s) => n(e, { action: E.DELETE_GLOBAL_SCHEMA, data: { id: s } }),
1894
1891
  onSuccess: () => {
1895
1892
  t.invalidateQueries({
@@ -1903,8 +1900,8 @@ const Vi = ({
1903
1900
  }
1904
1901
  });
1905
1902
  }, $c = () => {
1906
- const e = N(), t = I();
1907
- return X({
1903
+ const e = N(), t = L();
1904
+ return Z({
1908
1905
  mutationFn: async (n) => t(e, { action: E.TOGGLE_PAGE_GLOBAL_SCHEMA, data: n }),
1909
1906
  onError: (n) => {
1910
1907
  R.error("Failed to toggle schema", {
@@ -1912,9 +1909,9 @@ const Vi = ({
1912
1909
  });
1913
1910
  }
1914
1911
  });
1915
- }, jc = () => {
1916
- const e = N(), t = I();
1917
- return X({
1912
+ }, zc = () => {
1913
+ const e = N(), t = L();
1914
+ return Z({
1918
1915
  mutationFn: async (n) => t(e, { action: E.APPLY_SCHEMA_TO_ALL_PAGES, data: { schemaId: n } }),
1919
1916
  onSuccess: (n) => {
1920
1917
  R.success(`Schema applied to ${n.count} page(s)`);
@@ -1925,9 +1922,9 @@ const Vi = ({
1925
1922
  });
1926
1923
  }
1927
1924
  });
1928
- }, zc = () => {
1929
- const e = N(), t = I();
1930
- return X({
1925
+ }, jc = () => {
1926
+ const e = N(), t = L();
1927
+ return Z({
1931
1928
  mutationFn: async (n) => t(e, { action: E.REMOVE_SCHEMA_FROM_ALL_PAGES, data: { schemaId: n } }),
1932
1929
  onSuccess: (n) => {
1933
1930
  R.success(`Schema removed from ${n.count} page(s)`);
@@ -1944,7 +1941,7 @@ const Vi = ({
1944
1941
  action: "GET_LIBRARY_ITEM",
1945
1942
  data: { id: e.id }
1946
1943
  }), r = V(s, "html", ""), a = V(s, "blocks", []);
1947
- return xr(a) ? a : Yr(r);
1944
+ return Gr(a) ? a : Yr(r);
1948
1945
  },
1949
1946
  async getUILibraryBlocks(e, t, n) {
1950
1947
  try {
@@ -1959,7 +1956,7 @@ const Vi = ({
1959
1956
  }
1960
1957
  }
1961
1958
  }, lo = () => {
1962
- const e = N(), t = I();
1959
+ const e = N(), t = L();
1963
1960
  return ae({
1964
1961
  queryKey: ["uiLibraries"],
1965
1962
  staleTime: "static",
@@ -1978,7 +1975,7 @@ const Vi = ({
1978
1975
  }
1979
1976
  });
1980
1977
  }, co = () => {
1981
- const e = Ss(), t = I(), { user: n } = Jt(), s = n == null ? void 0 : n.id;
1978
+ const e = Ss(), t = L(), { user: n } = Jt(), s = n == null ? void 0 : n.id;
1982
1979
  return ae({
1983
1980
  queryKey: [E.GET_ROLE_AND_PERMISSIONS, s],
1984
1981
  queryFn: () => t(e, {
@@ -1989,7 +1986,7 @@ const Vi = ({
1989
1986
  staleTime: 1 / 0
1990
1987
  });
1991
1988
  }, uo = () => {
1992
- const e = N(), t = I(), [, n] = kn();
1989
+ const e = N(), t = L(), [, n] = Nn();
1993
1990
  return { onSave: async ({
1994
1991
  page: r,
1995
1992
  blocks: a,
@@ -2009,9 +2006,9 @@ const Vi = ({
2009
2006
  }
2010
2007
  } };
2011
2008
  }, fo = () => {
2012
- const { data: e } = bs(), t = N(), n = I();
2009
+ const { data: e } = bs(), t = N(), n = L();
2013
2010
  return {
2014
- getPartialBlocks: j(async () => {
2011
+ getPartialBlocks: z(async () => {
2015
2012
  const s = {};
2016
2013
  for (const r of e ?? [])
2017
2014
  he(r == null ? void 0 : r.slug) && (s[r.id] = {
@@ -2021,7 +2018,7 @@ const Vi = ({
2021
2018
  });
2022
2019
  return s;
2023
2020
  }, [e]),
2024
- getPartialBlockBlocks: j(
2021
+ getPartialBlockBlocks: z(
2025
2022
  async (s) => {
2026
2023
  if (!s) return [];
2027
2024
  try {
@@ -2029,7 +2026,7 @@ const Vi = ({
2029
2026
  action: "GET_DRAFT_PAGE",
2030
2027
  data: { id: s, draft: !0, editor: !1 }
2031
2028
  });
2032
- return hs(r.blocks, (a) => jt(a, "_id"));
2029
+ return hs(r.blocks, (a) => zt(a, "_id"));
2033
2030
  } catch (r) {
2034
2031
  return console.error(r), [];
2035
2032
  }
@@ -2037,15 +2034,24 @@ const Vi = ({
2037
2034
  [n, t]
2038
2035
  )
2039
2036
  };
2040
- }, ho = F(() => import("./ai-panel-content-r2jlUBoR.js")), ks = "chai-chat-panel", go = ({ className: e = "h-full w-full" }) => /* @__PURE__ */ l("svg", { className: e, viewBox: "0 0 256 256", fill: "currentColor", children: /* @__PURE__ */ l("path", { d: "m198.39 128.986-52.16-19.216-19.216-52.16a16 16 0 0 0-30.028 0L77.77 109.77l-52.16 19.216a16 16 0 0 0 0 30.028l52.16 19.216 19.216 52.16a16 16 0 0 0 30.028 0l19.216-52.16 52.16-19.216a16 16 0 0 0 0-30.028m-57.69 34.23a15.97 15.97 0 0 0-9.483 9.483l-19.22 52.152-19.214-52.15a15.97 15.97 0 0 0-9.482-9.484l-52.152-19.22 52.15-19.214a15.97 15.97 0 0 0 9.484-9.482l19.22-52.152 19.214 52.15a15.97 15.97 0 0 0 9.482 9.484l52.152 19.22ZM144 40a8 8 0 0 1 8-8h16V16a8 8 0 0 1 16 0v16h16a8 8 0 0 1 0 16h-16v16a8 8 0 0 1-16 0V48h-16a8 8 0 0 1-8-8m104 48a8 8 0 0 1-8 8h-8v8a8 8 0 0 1-16 0v-8h-8a8 8 0 0 1 0-16h8v-8a8 8 0 0 1 16 0v8h8a8 8 0 0 1 8 8" }) }), mo = ({ isActive: e, show: t }) => /* @__PURE__ */ l(U, { size: "icon", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ l(go, { className: "h-4 w-4" }) }), Eo = {
2037
+ }, ho = F(() => import("./ai-panel-content-DET3HjIR.js")), ks = "chai-chat-panel", go = ({ className: e = "h-full w-full" }) => /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", version: "1.1", className: e, children: [
2038
+ /* @__PURE__ */ l("title", { children: "ai" }),
2039
+ /* @__PURE__ */ l("g", { id: "Page-1", stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd", children: /* @__PURE__ */ l("g", { id: "icon", fill: "currentColor", transform: "translate(64.000000, 64.000000)", children: /* @__PURE__ */ l(
2040
+ "path",
2041
+ {
2042
+ d: "M320,64 L320,320 L64,320 L64,64 L320,64 Z M171.749388,128 L146.817842,128 L99.4840387,256 L121.976629,256 L130.913039,230.977 L187.575039,230.977 L196.319607,256 L220.167172,256 L171.749388,128 Z M260.093778,128 L237.691519,128 L237.691519,256 L260.093778,256 L260.093778,128 Z M159.094727,149.47526 L181.409039,213.333 L137.135039,213.333 L159.094727,149.47526 Z M341.333333,256 L384,256 L384,298.666667 L341.333333,298.666667 L341.333333,256 Z M85.3333333,341.333333 L128,341.333333 L128,384 L85.3333333,384 L85.3333333,341.333333 Z M170.666667,341.333333 L213.333333,341.333333 L213.333333,384 L170.666667,384 L170.666667,341.333333 Z M85.3333333,0 L128,0 L128,42.6666667 L85.3333333,42.6666667 L85.3333333,0 Z M256,341.333333 L298.666667,341.333333 L298.666667,384 L256,384 L256,341.333333 Z M170.666667,0 L213.333333,0 L213.333333,42.6666667 L170.666667,42.6666667 L170.666667,0 Z M256,0 L298.666667,0 L298.666667,42.6666667 L256,42.6666667 L256,0 Z M341.333333,170.666667 L384,170.666667 L384,213.333333 L341.333333,213.333333 L341.333333,170.666667 Z M0,256 L42.6666667,256 L42.6666667,298.666667 L0,298.666667 L0,256 Z M341.333333,85.3333333 L384,85.3333333 L384,128 L341.333333,128 L341.333333,85.3333333 Z M0,170.666667 L42.6666667,170.666667 L42.6666667,213.333333 L0,213.333333 L0,170.666667 Z M0,85.3333333 L42.6666667,85.3333333 L42.6666667,128 L0,128 L0,85.3333333 Z",
2043
+ id: "Combined-Shape"
2044
+ }
2045
+ ) }) })
2046
+ ] }), mo = ({ isActive: e, show: t }) => /* @__PURE__ */ l(U, { size: "icon", className: "p-0 [&_svg]:size-6", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ l(go, { className: e ? "h-5 w-5 text-white" : "h-5 w-5 text-primary" }) }), Eo = {
2041
2047
  id: ks,
2042
2048
  label: "AI Assistant",
2043
2049
  button: mo,
2044
2050
  panel: ho,
2045
2051
  position: "top"
2046
- }, po = F(() => import("./lang-panel-C8yx7PSU.js")), yo = ({ isActive: e, show: t }) => {
2052
+ }, po = F(() => import("./lang-panel-B8SeKnwN.js")), yo = ({ isActive: e, show: t }) => {
2047
2053
  const { data: n } = Re();
2048
- return !jt(n, "languages") || !V(n, "languages", []).length ? null : /* @__PURE__ */ l(U, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ l(Ka, { className: "h-4 w-4" }) });
2054
+ return !zt(n, "languages") || !V(n, "languages", []).length ? null : /* @__PURE__ */ l(U, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ l(Ka, { className: "h-4 w-4" }) });
2049
2055
  }, Os = "lang", Ao = {
2050
2056
  id: Os,
2051
2057
  label: "Languages",
@@ -2054,9 +2060,9 @@ const Vi = ({
2054
2060
  button: yo,
2055
2061
  view: "modal",
2056
2062
  width: 400
2057
- }, To = F(() => import("./seo-panel-4KK4r-BP.js")), Ds = "seo", So = ({ isActive: e, show: t }) => {
2058
- const { data: n } = ie(), s = Ni(n == null ? void 0 : n.pageType);
2059
- return !jt(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ l(U, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
2063
+ }, To = F(() => import("./seo-panel-BsMBb5Ep.js")), Ds = "seo", So = ({ isActive: e, show: t }) => {
2064
+ const { data: n } = ie(), s = Ci(n == null ? void 0 : n.pageType);
2065
+ return !zt(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ l(U, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
2060
2066
  "svg",
2061
2067
  {
2062
2068
  stroke: "currentColor",
@@ -2082,8 +2088,8 @@ const Vi = ({
2082
2088
  position: "top",
2083
2089
  width: 600,
2084
2090
  view: "modal"
2085
- }, Gs = "user-info", Po = () => {
2086
- const { t: e } = we(), { user: t, logout: n } = Jt(), s = oe("onLogout", ds);
2091
+ }, xs = "user-info", Po = () => {
2092
+ const { t: e } = _e(), { user: t, logout: n } = Jt(), s = oe("onLogout", ds);
2087
2093
  return t ? /* @__PURE__ */ m(ia, { children: [
2088
2094
  /* @__PURE__ */ l(oa, { asChild: !0, children: /* @__PURE__ */ l(U, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ l(Va, { className: "h-4 w-4" }) }) }),
2089
2095
  /* @__PURE__ */ m(la, { className: "w-auto space-y-2 p-4", children: [
@@ -2113,12 +2119,12 @@ const Vi = ({
2113
2119
  ] })
2114
2120
  ] }) : null;
2115
2121
  }, vo = {
2116
- id: Gs,
2122
+ id: xs,
2117
2123
  label: "User Info",
2118
2124
  button: Po,
2119
2125
  position: "bottom"
2120
2126
  }, wo = () => {
2121
- Ct(Ds, _o), Ct(Os, Ao), Ct(Gs, vo), (localStorage.getItem("chai-feature-flags") ?? "").includes("enable-ai-chat-panel") && (console.log("enable-ai-chat-panel"), Ct(ks, Eo));
2127
+ Lt(Ds, _o), Lt(Os, Ao), Lt(xs, vo), (localStorage.getItem("chai-feature-flags") ?? "").includes("enable-ai-chat-panel") && (console.log("enable-ai-chat-panel"), Lt(ks, Eo));
2122
2128
  };
2123
2129
  var v = {
2124
2130
  context: void 0,
@@ -2139,26 +2145,26 @@ function Jn(e) {
2139
2145
  function rt(e) {
2140
2146
  v.context = e;
2141
2147
  }
2142
- var xs = !1, bo = (e, t) => e === t, qt = Symbol("solid-proxy"), Rs = typeof Proxy == "function", Us = Symbol("solid-track"), Kt = {
2148
+ var Gs = !1, bo = (e, t) => e === t, qt = Symbol("solid-proxy"), Rs = typeof Proxy == "function", Us = Symbol("solid-track"), Kt = {
2143
2149
  equals: bo
2144
- }, Bs = Qs, _e = 1, Vt = 2, Ms = {
2150
+ }, Ms = Qs, Pe = 1, Vt = 2, Bs = {
2145
2151
  owned: null,
2146
2152
  cleanups: null,
2147
2153
  context: null,
2148
2154
  owner: null
2149
- }, cn = {}, C = null, un = null, Io = null, G = null, ee = null, Te = null, Xt = 0;
2155
+ }, ln = {}, C = null, cn = null, Io = null, x = null, ee = null, Te = null, Zt = 0;
2150
2156
  function Oe(e, t) {
2151
- const n = G, s = C, r = e.length === 0, a = t === void 0 ? s : t, i = r ? Ms : {
2157
+ const n = x, s = C, r = e.length === 0, a = t === void 0 ? s : t, i = r ? Bs : {
2152
2158
  owned: null,
2153
2159
  cleanups: null,
2154
2160
  context: a ? a.context : null,
2155
2161
  owner: a
2156
- }, o = r ? e : () => e(() => Z(() => ct(i)));
2157
- C = i, G = null;
2162
+ }, o = r ? e : () => e(() => X(() => ct(i)));
2163
+ C = i, x = null;
2158
2164
  try {
2159
2165
  return me(o, !0);
2160
2166
  } finally {
2161
- G = n, C = s;
2167
+ x = n, C = s;
2162
2168
  }
2163
2169
  }
2164
2170
  function q(e, t) {
@@ -2171,64 +2177,64 @@ function q(e, t) {
2171
2177
  }, s = (r) => (typeof r == "function" && (r = r(n.value)), Hs(n, r));
2172
2178
  return [Vs.bind(n), s];
2173
2179
  }
2174
- function Co(e, t, n) {
2175
- const s = Zt(e, t, !0, _e);
2180
+ function Lo(e, t, n) {
2181
+ const s = Xt(e, t, !0, Pe);
2176
2182
  st(s);
2177
2183
  }
2178
2184
  function De(e, t, n) {
2179
- const s = Zt(e, t, !1, _e);
2185
+ const s = Xt(e, t, !1, Pe);
2180
2186
  st(s);
2181
2187
  }
2182
2188
  function Fs(e, t, n) {
2183
- Bs = Uo;
2184
- const s = Zt(e, t, !1, _e);
2189
+ Ms = Uo;
2190
+ const s = Xt(e, t, !1, Pe);
2185
2191
  (!n || !n.render) && (s.user = !0), Te ? Te.push(s) : st(s);
2186
2192
  }
2187
2193
  function J(e, t, n) {
2188
2194
  n = n ? Object.assign({}, Kt, n) : Kt;
2189
- const s = Zt(e, t, !0, 0);
2195
+ const s = Xt(e, t, !0, 0);
2190
2196
  return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, st(s), Vs.bind(s);
2191
2197
  }
2192
- function No(e) {
2198
+ function Co(e) {
2193
2199
  return e && typeof e == "object" && "then" in e;
2194
2200
  }
2195
- function Lo(e, t, n) {
2201
+ function No(e, t, n) {
2196
2202
  let s, r, a;
2197
2203
  s = !0, r = e, a = {};
2198
- let i = null, o = cn, c = null, u = !1, f = "initialValue" in a, d = typeof s == "function" && J(s);
2199
- const h = /* @__PURE__ */ new Set(), [g, y] = (a.storage || q)(a.initialValue), [T, _] = q(void 0), [p, A] = q(void 0, {
2204
+ let i = null, o = ln, c = null, u = !1, d = "initialValue" in a, f = typeof s == "function" && J(s);
2205
+ const h = /* @__PURE__ */ new Set(), [g, p] = (a.storage || q)(a.initialValue), [S, P] = q(void 0), [T, y] = q(void 0, {
2200
2206
  equals: !1
2201
- }), [P, O] = q(f ? "ready" : "unresolved");
2207
+ }), [A, b] = q(d ? "ready" : "unresolved");
2202
2208
  v.context && (c = v.getNextContextId(), a.ssrLoadFrom === "initial" ? o = a.initialValue : v.load && v.has(c) && (o = v.load(c)));
2203
- function M(w, b, Y, $) {
2204
- return i === w && (i = null, $ !== void 0 && (f = !0), (w === o || b === o) && a.onHydrated && queueMicrotask(() => a.onHydrated($, {
2205
- value: b
2206
- })), o = cn, L(b, Y)), b;
2209
+ function B(w, I, Y, $) {
2210
+ return i === w && (i = null, $ !== void 0 && (d = !0), (w === o || I === o) && a.onHydrated && queueMicrotask(() => a.onHydrated($, {
2211
+ value: I
2212
+ })), o = ln, k(I, Y)), I;
2207
2213
  }
2208
- function L(w, b) {
2214
+ function k(w, I) {
2209
2215
  me(() => {
2210
- b === void 0 && y(() => w), O(b !== void 0 ? "errored" : f ? "ready" : "unresolved"), _(b);
2216
+ I === void 0 && p(() => w), b(I !== void 0 ? "errored" : d ? "ready" : "unresolved"), P(I);
2211
2217
  for (const Y of h.keys()) Y.decrement();
2212
2218
  h.clear();
2213
2219
  }, !1);
2214
2220
  }
2215
2221
  function pe() {
2216
- const w = Go, b = g(), Y = T();
2222
+ const w = xo, I = g(), Y = S();
2217
2223
  if (Y !== void 0 && !i) throw Y;
2218
- return G && G.user, b;
2224
+ return x && x.user, I;
2219
2225
  }
2220
2226
  function ye(w = !0) {
2221
2227
  if (w !== !1 && u) return;
2222
2228
  u = !1;
2223
- const b = d ? d() : s;
2224
- if (b == null || b === !1) {
2225
- M(i, Z(g));
2229
+ const I = f ? f() : s;
2230
+ if (I == null || I === !1) {
2231
+ B(i, X(g));
2226
2232
  return;
2227
2233
  }
2228
2234
  let Y;
2229
- const $ = o !== cn ? o : Z(() => {
2235
+ const $ = o !== ln ? o : X(() => {
2230
2236
  try {
2231
- return r(b, {
2237
+ return r(I, {
2232
2238
  value: g(),
2233
2239
  refetching: w
2234
2240
  });
@@ -2237,53 +2243,53 @@ function Lo(e, t, n) {
2237
2243
  }
2238
2244
  });
2239
2245
  if (Y !== void 0) {
2240
- M(i, void 0, Rt(Y), b);
2246
+ B(i, void 0, Rt(Y), I);
2241
2247
  return;
2242
- } else if (!No($))
2243
- return M(i, $, void 0, b), $;
2244
- return i = $, "v" in $ ? ($.s === 1 ? M(i, $.v, void 0, b) : M(i, void 0, Rt($.v), b), $) : (u = !0, queueMicrotask(() => u = !1), me(() => {
2245
- O(f ? "refreshing" : "pending"), A();
2246
- }, !1), $.then((de) => M($, de, void 0, b), (de) => M($, void 0, Rt(de), b)));
2248
+ } else if (!Co($))
2249
+ return B(i, $, void 0, I), $;
2250
+ return i = $, "v" in $ ? ($.s === 1 ? B(i, $.v, void 0, I) : B(i, void 0, Rt($.v), I), $) : (u = !0, queueMicrotask(() => u = !1), me(() => {
2251
+ b(d ? "refreshing" : "pending"), y();
2252
+ }, !1), $.then((de) => B($, de, void 0, I), (de) => B($, void 0, Rt(de), I)));
2247
2253
  }
2248
2254
  Object.defineProperties(pe, {
2249
2255
  state: {
2250
- get: () => P()
2256
+ get: () => A()
2251
2257
  },
2252
2258
  error: {
2253
- get: () => T()
2259
+ get: () => S()
2254
2260
  },
2255
2261
  loading: {
2256
2262
  get() {
2257
- const w = P();
2263
+ const w = A();
2258
2264
  return w === "pending" || w === "refreshing";
2259
2265
  }
2260
2266
  },
2261
2267
  latest: {
2262
2268
  get() {
2263
- if (!f) return pe();
2264
- const w = T();
2269
+ if (!d) return pe();
2270
+ const w = S();
2265
2271
  if (w && !i) throw w;
2266
2272
  return g();
2267
2273
  }
2268
2274
  }
2269
2275
  });
2270
- let B = C;
2271
- return d ? Co(() => (B = C, ye(!1))) : ye(!1), [pe, {
2272
- refetch: (w) => qs(B, () => ye(w)),
2273
- mutate: y
2276
+ let M = C;
2277
+ return f ? Lo(() => (M = C, ye(!1))) : ye(!1), [pe, {
2278
+ refetch: (w) => qs(M, () => ye(w)),
2279
+ mutate: p
2274
2280
  }];
2275
2281
  }
2276
2282
  function Wc(e) {
2277
2283
  return me(e, !1);
2278
2284
  }
2279
- function Z(e) {
2280
- if (G === null) return e();
2281
- const t = G;
2282
- G = null;
2285
+ function X(e) {
2286
+ if (x === null) return e();
2287
+ const t = x;
2288
+ x = null;
2283
2289
  try {
2284
2290
  return e();
2285
2291
  } finally {
2286
- G = t;
2292
+ x = t;
2287
2293
  }
2288
2294
  }
2289
2295
  function Yc(e, t, n) {
@@ -2297,47 +2303,47 @@ function Yc(e, t, n) {
2297
2303
  } else o = e();
2298
2304
  if (a)
2299
2305
  return a = !1, i;
2300
- const c = Z(() => t(o, r, i));
2306
+ const c = X(() => t(o, r, i));
2301
2307
  return r = o, c;
2302
2308
  };
2303
2309
  }
2304
2310
  function ko(e) {
2305
- Fs(() => Z(e));
2311
+ Fs(() => X(e));
2306
2312
  }
2307
2313
  function lt(e) {
2308
2314
  return C === null || (C.cleanups === null ? C.cleanups = [e] : C.cleanups.push(e)), e;
2309
2315
  }
2310
- function Xn() {
2316
+ function Zn() {
2311
2317
  return C;
2312
2318
  }
2313
2319
  function qs(e, t) {
2314
- const n = C, s = G;
2315
- C = e, G = null;
2320
+ const n = C, s = x;
2321
+ C = e, x = null;
2316
2322
  try {
2317
2323
  return me(t, !0);
2318
2324
  } catch (r) {
2319
- Rn(r);
2325
+ Gn(r);
2320
2326
  } finally {
2321
- C = n, G = s;
2327
+ C = n, x = s;
2322
2328
  }
2323
2329
  }
2324
2330
  function Oo(e) {
2325
- const t = G, n = C;
2331
+ const t = x, n = C;
2326
2332
  return Promise.resolve().then(() => {
2327
- G = t, C = n;
2333
+ x = t, C = n;
2328
2334
  let s;
2329
- return me(e, !1), G = C = null, s ? s.done : void 0;
2335
+ return me(e, !1), x = C = null, s ? s.done : void 0;
2330
2336
  });
2331
2337
  }
2332
2338
  var [Do, Jc] = /* @__PURE__ */ q(!1);
2333
- function Xc() {
2339
+ function Zc() {
2334
2340
  return [Do, Oo];
2335
2341
  }
2336
- function Zc(e, t) {
2342
+ function Xc(e, t) {
2337
2343
  const n = Symbol("context");
2338
2344
  return {
2339
2345
  id: n,
2340
- Provider: Bo(n),
2346
+ Provider: Mo(n),
2341
2347
  defaultValue: e
2342
2348
  };
2343
2349
  }
@@ -2346,23 +2352,23 @@ function eu(e) {
2346
2352
  return C && C.context && (t = C.context[e.id]) !== void 0 ? t : e.defaultValue;
2347
2353
  }
2348
2354
  function Ks(e) {
2349
- const t = J(e), n = J(() => mn(t()));
2355
+ const t = J(e), n = J(() => gn(t()));
2350
2356
  return n.toArray = () => {
2351
2357
  const s = n();
2352
2358
  return Array.isArray(s) ? s : s != null ? [s] : [];
2353
2359
  }, n;
2354
2360
  }
2355
- var Go;
2361
+ var xo;
2356
2362
  function Vs() {
2357
2363
  if (this.sources && this.state)
2358
- if (this.state === _e) st(this);
2364
+ if (this.state === Pe) st(this);
2359
2365
  else {
2360
2366
  const e = ee;
2361
2367
  ee = null, me(() => Qt(this), !1), ee = e;
2362
2368
  }
2363
- if (G) {
2369
+ if (x) {
2364
2370
  const e = this.observers ? this.observers.length : 0;
2365
- G.sources ? (G.sources.push(this), G.sourceSlots.push(e)) : (G.sources = [this], G.sourceSlots = [e]), this.observers ? (this.observers.push(G), this.observerSlots.push(G.sources.length - 1)) : (this.observers = [G], this.observerSlots = [G.sources.length - 1]);
2371
+ x.sources ? (x.sources.push(this), x.sourceSlots.push(e)) : (x.sources = [this], x.sourceSlots = [e]), this.observers ? (this.observers.push(x), this.observerSlots.push(x.sources.length - 1)) : (this.observers = [x], this.observerSlots = [x.sources.length - 1]);
2366
2372
  }
2367
2373
  return this.value;
2368
2374
  }
@@ -2370,8 +2376,8 @@ function Hs(e, t, n) {
2370
2376
  let s = e.value;
2371
2377
  return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && me(() => {
2372
2378
  for (let r = 0; r < e.observers.length; r += 1) {
2373
- const a = e.observers[r], i = un && un.running;
2374
- i && un.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ee.push(a) : Te.push(a), a.observers && $s(a)), i || (a.state = _e);
2379
+ const a = e.observers[r], i = cn && cn.running;
2380
+ i && cn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ee.push(a) : Te.push(a), a.observers && $s(a)), i || (a.state = Pe);
2375
2381
  }
2376
2382
  if (ee.length > 1e6)
2377
2383
  throw ee = [], new Error();
@@ -2380,23 +2386,23 @@ function Hs(e, t, n) {
2380
2386
  function st(e) {
2381
2387
  if (!e.fn) return;
2382
2388
  ct(e);
2383
- const t = Xt;
2384
- xo(e, e.value, t);
2389
+ const t = Zt;
2390
+ Go(e, e.value, t);
2385
2391
  }
2386
- function xo(e, t, n) {
2392
+ function Go(e, t, n) {
2387
2393
  let s;
2388
- const r = C, a = G;
2389
- G = C = e;
2394
+ const r = C, a = x;
2395
+ x = C = e;
2390
2396
  try {
2391
2397
  s = e.fn(t);
2392
2398
  } catch (i) {
2393
- return e.pure && (e.state = _e, e.owned && e.owned.forEach(ct), e.owned = null), e.updatedAt = n + 1, Rn(i);
2399
+ return e.pure && (e.state = Pe, e.owned && e.owned.forEach(ct), e.owned = null), e.updatedAt = n + 1, Gn(i);
2394
2400
  } finally {
2395
- G = a, C = r;
2401
+ x = a, C = r;
2396
2402
  }
2397
2403
  (!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Hs(e, s) : e.value = s, e.updatedAt = n);
2398
2404
  }
2399
- function Zt(e, t, n, s = _e, r) {
2405
+ function Xt(e, t, n, s = Pe, r) {
2400
2406
  const a = {
2401
2407
  fn: e,
2402
2408
  state: s,
@@ -2410,17 +2416,17 @@ function Zt(e, t, n, s = _e, r) {
2410
2416
  context: C ? C.context : null,
2411
2417
  pure: n
2412
2418
  };
2413
- return C === null || C !== Ms && (C.owned ? C.owned.push(a) : C.owned = [a]), a;
2419
+ return C === null || C !== Bs && (C.owned ? C.owned.push(a) : C.owned = [a]), a;
2414
2420
  }
2415
2421
  function Ht(e) {
2416
2422
  if (e.state === 0) return;
2417
2423
  if (e.state === Vt) return Qt(e);
2418
- if (e.suspense && Z(e.suspense.inFallback)) return e.suspense.effects.push(e);
2424
+ if (e.suspense && X(e.suspense.inFallback)) return e.suspense.effects.push(e);
2419
2425
  const t = [e];
2420
- for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < Xt); )
2426
+ for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < Zt); )
2421
2427
  e.state && t.push(e);
2422
2428
  for (let n = t.length - 1; n >= 0; n--)
2423
- if (e = t[n], e.state === _e)
2429
+ if (e = t[n], e.state === Pe)
2424
2430
  st(e);
2425
2431
  else if (e.state === Vt) {
2426
2432
  const s = ee;
@@ -2430,18 +2436,18 @@ function Ht(e) {
2430
2436
  function me(e, t) {
2431
2437
  if (ee) return e();
2432
2438
  let n = !1;
2433
- t || (ee = []), Te ? n = !0 : Te = [], Xt++;
2439
+ t || (ee = []), Te ? n = !0 : Te = [], Zt++;
2434
2440
  try {
2435
2441
  const s = e();
2436
2442
  return Ro(n), s;
2437
2443
  } catch (s) {
2438
- n || (Te = null), ee = null, Rn(s);
2444
+ n || (Te = null), ee = null, Gn(s);
2439
2445
  }
2440
2446
  }
2441
2447
  function Ro(e) {
2442
2448
  if (ee && (Qs(ee), ee = null), e) return;
2443
2449
  const t = Te;
2444
- Te = null, t.length && me(() => Bs(t), !1);
2450
+ Te = null, t.length && me(() => Ms(t), !1);
2445
2451
  }
2446
2452
  function Qs(e) {
2447
2453
  for (let t = 0; t < e.length; t++) Ht(e[t]);
@@ -2467,7 +2473,7 @@ function Qt(e, t) {
2467
2473
  const s = e.sources[n];
2468
2474
  if (s.sources) {
2469
2475
  const r = s.state;
2470
- r === _e ? s !== t && (!s.updatedAt || s.updatedAt < Xt) && Ht(s) : r === Vt && Qt(s, t);
2476
+ r === Pe ? s !== t && (!s.updatedAt || s.updatedAt < Zt) && Ht(s) : r === Vt && Qt(s, t);
2471
2477
  }
2472
2478
  }
2473
2479
  }
@@ -2506,96 +2512,96 @@ function Rt(e) {
2506
2512
  cause: e
2507
2513
  });
2508
2514
  }
2509
- function Rn(e, t = C) {
2515
+ function Gn(e, t = C) {
2510
2516
  throw Rt(e);
2511
2517
  }
2512
- function mn(e) {
2513
- if (typeof e == "function" && !e.length) return mn(e());
2518
+ function gn(e) {
2519
+ if (typeof e == "function" && !e.length) return gn(e());
2514
2520
  if (Array.isArray(e)) {
2515
2521
  const t = [];
2516
2522
  for (let n = 0; n < e.length; n++) {
2517
- const s = mn(e[n]);
2523
+ const s = gn(e[n]);
2518
2524
  Array.isArray(s) ? t.push.apply(t, s) : t.push(s);
2519
2525
  }
2520
2526
  return t;
2521
2527
  }
2522
2528
  return e;
2523
2529
  }
2524
- function Bo(e, t) {
2530
+ function Mo(e, t) {
2525
2531
  return function(s) {
2526
2532
  let r;
2527
- return De(() => r = Z(() => (C.context = {
2533
+ return De(() => r = X(() => (C.context = {
2528
2534
  ...C.context,
2529
2535
  [e]: s.value
2530
2536
  }, Ks(() => s.children))), void 0), r;
2531
2537
  };
2532
2538
  }
2533
- var En = Symbol("fallback");
2539
+ var mn = Symbol("fallback");
2534
2540
  function $t(e) {
2535
2541
  for (let t = 0; t < e.length; t++) e[t]();
2536
2542
  }
2537
- function Mo(e, t, n = {}) {
2543
+ function Bo(e, t, n = {}) {
2538
2544
  let s = [], r = [], a = [], i = 0, o = t.length > 1 ? [] : null;
2539
2545
  return lt(() => $t(a)), () => {
2540
- let c = e() || [], u = c.length, f, d;
2541
- return c[Us], Z(() => {
2542
- let g, y, T, _, p, A, P, O, M;
2546
+ let c = e() || [], u = c.length, d, f;
2547
+ return c[Us], X(() => {
2548
+ let g, p, S, P, T, y, A, b, B;
2543
2549
  if (u === 0)
2544
- i !== 0 && ($t(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [En], r[0] = Oe((L) => (a[0] = L, n.fallback())), i = 1);
2550
+ i !== 0 && ($t(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [mn], r[0] = Oe((k) => (a[0] = k, n.fallback())), i = 1);
2545
2551
  else if (i === 0) {
2546
- for (r = new Array(u), d = 0; d < u; d++)
2547
- s[d] = c[d], r[d] = Oe(h);
2552
+ for (r = new Array(u), f = 0; f < u; f++)
2553
+ s[f] = c[f], r[f] = Oe(h);
2548
2554
  i = u;
2549
2555
  } else {
2550
- for (T = new Array(u), _ = new Array(u), o && (p = new Array(u)), A = 0, P = Math.min(i, u); A < P && s[A] === c[A]; A++) ;
2551
- for (P = i - 1, O = u - 1; P >= A && O >= A && s[P] === c[O]; P--, O--)
2552
- T[O] = r[P], _[O] = a[P], o && (p[O] = o[P]);
2553
- for (g = /* @__PURE__ */ new Map(), y = new Array(O + 1), d = O; d >= A; d--)
2554
- M = c[d], f = g.get(M), y[d] = f === void 0 ? -1 : f, g.set(M, d);
2555
- for (f = A; f <= P; f++)
2556
- M = s[f], d = g.get(M), d !== void 0 && d !== -1 ? (T[d] = r[f], _[d] = a[f], o && (p[d] = o[f]), d = y[d], g.set(M, d)) : a[f]();
2557
- for (d = A; d < u; d++)
2558
- d in T ? (r[d] = T[d], a[d] = _[d], o && (o[d] = p[d], o[d](d))) : r[d] = Oe(h);
2556
+ for (S = new Array(u), P = new Array(u), o && (T = new Array(u)), y = 0, A = Math.min(i, u); y < A && s[y] === c[y]; y++) ;
2557
+ for (A = i - 1, b = u - 1; A >= y && b >= y && s[A] === c[b]; A--, b--)
2558
+ S[b] = r[A], P[b] = a[A], o && (T[b] = o[A]);
2559
+ for (g = /* @__PURE__ */ new Map(), p = new Array(b + 1), f = b; f >= y; f--)
2560
+ B = c[f], d = g.get(B), p[f] = d === void 0 ? -1 : d, g.set(B, f);
2561
+ for (d = y; d <= A; d++)
2562
+ B = s[d], f = g.get(B), f !== void 0 && f !== -1 ? (S[f] = r[d], P[f] = a[d], o && (T[f] = o[d]), f = p[f], g.set(B, f)) : a[d]();
2563
+ for (f = y; f < u; f++)
2564
+ f in S ? (r[f] = S[f], a[f] = P[f], o && (o[f] = T[f], o[f](f))) : r[f] = Oe(h);
2559
2565
  r = r.slice(0, i = u), s = c.slice(0);
2560
2566
  }
2561
2567
  return r;
2562
2568
  });
2563
2569
  function h(g) {
2564
- if (a[d] = g, o) {
2565
- const [y, T] = q(d);
2566
- return o[d] = T, t(c[d], y);
2570
+ if (a[f] = g, o) {
2571
+ const [p, S] = q(f);
2572
+ return o[f] = S, t(c[f], p);
2567
2573
  }
2568
- return t(c[d]);
2574
+ return t(c[f]);
2569
2575
  }
2570
2576
  };
2571
2577
  }
2572
2578
  function Fo(e, t, n = {}) {
2573
2579
  let s = [], r = [], a = [], i = [], o = 0, c;
2574
2580
  return lt(() => $t(a)), () => {
2575
- const u = e() || [], f = u.length;
2576
- return u[Us], Z(() => {
2577
- if (f === 0)
2578
- return o !== 0 && ($t(a), a = [], s = [], r = [], o = 0, i = []), n.fallback && (s = [En], r[0] = Oe((h) => (a[0] = h, n.fallback())), o = 1), r;
2579
- for (s[0] === En && (a[0](), a = [], s = [], r = [], o = 0), c = 0; c < f; c++)
2580
- c < s.length && s[c] !== u[c] ? i[c](() => u[c]) : c >= s.length && (r[c] = Oe(d));
2581
+ const u = e() || [], d = u.length;
2582
+ return u[Us], X(() => {
2583
+ if (d === 0)
2584
+ return o !== 0 && ($t(a), a = [], s = [], r = [], o = 0, i = []), n.fallback && (s = [mn], r[0] = Oe((h) => (a[0] = h, n.fallback())), o = 1), r;
2585
+ for (s[0] === mn && (a[0](), a = [], s = [], r = [], o = 0), c = 0; c < d; c++)
2586
+ c < s.length && s[c] !== u[c] ? i[c](() => u[c]) : c >= s.length && (r[c] = Oe(f));
2581
2587
  for (; c < s.length; c++)
2582
2588
  a[c]();
2583
- return o = i.length = a.length = f, s = u.slice(0), r = r.slice(0, o);
2589
+ return o = i.length = a.length = d, s = u.slice(0), r = r.slice(0, o);
2584
2590
  });
2585
- function d(h) {
2591
+ function f(h) {
2586
2592
  a[c] = h;
2587
- const [g, y] = q(u[c]);
2588
- return i[c] = y, t(g, c);
2593
+ const [g, p] = q(u[c]);
2594
+ return i[c] = p, t(g, c);
2589
2595
  }
2590
2596
  };
2591
2597
  }
2592
- function js(e, t) {
2593
- return Z(() => e(t || {}));
2598
+ function zs(e, t) {
2599
+ return X(() => e(t || {}));
2594
2600
  }
2595
2601
  function kt() {
2596
2602
  return !0;
2597
2603
  }
2598
- var pn = {
2604
+ var En = {
2599
2605
  get(e, t, n) {
2600
2606
  return t === qt ? n : e.get(t);
2601
2607
  },
@@ -2619,7 +2625,7 @@ var pn = {
2619
2625
  return e.keys();
2620
2626
  }
2621
2627
  };
2622
- function dn(e) {
2628
+ function un(e) {
2623
2629
  return (e = typeof e == "function" ? e() : e) ? e : {};
2624
2630
  }
2625
2631
  function qo() {
@@ -2628,7 +2634,7 @@ function qo() {
2628
2634
  if (n !== void 0) return n;
2629
2635
  }
2630
2636
  }
2631
- function zs(...e) {
2637
+ function js(...e) {
2632
2638
  let t = !1;
2633
2639
  for (let i = 0; i < e.length; i++) {
2634
2640
  const o = e[i];
@@ -2638,39 +2644,39 @@ function zs(...e) {
2638
2644
  return new Proxy({
2639
2645
  get(i) {
2640
2646
  for (let o = e.length - 1; o >= 0; o--) {
2641
- const c = dn(e[o])[i];
2647
+ const c = un(e[o])[i];
2642
2648
  if (c !== void 0) return c;
2643
2649
  }
2644
2650
  },
2645
2651
  has(i) {
2646
2652
  for (let o = e.length - 1; o >= 0; o--)
2647
- if (i in dn(e[o])) return !0;
2653
+ if (i in un(e[o])) return !0;
2648
2654
  return !1;
2649
2655
  },
2650
2656
  keys() {
2651
2657
  const i = [];
2652
- for (let o = 0; o < e.length; o++) i.push(...Object.keys(dn(e[o])));
2658
+ for (let o = 0; o < e.length; o++) i.push(...Object.keys(un(e[o])));
2653
2659
  return [...new Set(i)];
2654
2660
  }
2655
- }, pn);
2661
+ }, En);
2656
2662
  const n = {}, s = /* @__PURE__ */ Object.create(null);
2657
2663
  for (let i = e.length - 1; i >= 0; i--) {
2658
2664
  const o = e[i];
2659
2665
  if (!o) continue;
2660
2666
  const c = Object.getOwnPropertyNames(o);
2661
2667
  for (let u = c.length - 1; u >= 0; u--) {
2662
- const f = c[u];
2663
- if (f === "__proto__" || f === "constructor") continue;
2664
- const d = Object.getOwnPropertyDescriptor(o, f);
2665
- if (!s[f])
2666
- s[f] = d.get ? {
2668
+ const d = c[u];
2669
+ if (d === "__proto__" || d === "constructor") continue;
2670
+ const f = Object.getOwnPropertyDescriptor(o, d);
2671
+ if (!s[d])
2672
+ s[d] = f.get ? {
2667
2673
  enumerable: !0,
2668
2674
  configurable: !0,
2669
- get: qo.bind(n[f] = [d.get.bind(o)])
2670
- } : d.value !== void 0 ? d : void 0;
2675
+ get: qo.bind(n[d] = [f.get.bind(o)])
2676
+ } : f.value !== void 0 ? f : void 0;
2671
2677
  else {
2672
- const h = n[f];
2673
- h && (d.get ? h.push(d.get.bind(o)) : d.value !== void 0 && h.push(() => d.value));
2678
+ const h = n[d];
2679
+ h && (f.get ? h.push(f.get.bind(o)) : f.value !== void 0 && h.push(() => f.value));
2674
2680
  }
2675
2681
  }
2676
2682
  }
@@ -2693,7 +2699,7 @@ function Ko(e, ...t) {
2693
2699
  keys() {
2694
2700
  return i.filter((o) => o in e);
2695
2701
  }
2696
- }, pn));
2702
+ }, En));
2697
2703
  return a.push(new Proxy({
2698
2704
  get(i) {
2699
2705
  return r.has(i) ? void 0 : e[i];
@@ -2704,7 +2710,7 @@ function Ko(e, ...t) {
2704
2710
  keys() {
2705
2711
  return Object.keys(e).filter((i) => !r.has(i));
2706
2712
  }
2707
- }, pn)), a;
2713
+ }, En)), a;
2708
2714
  }
2709
2715
  const n = {}, s = t.map(() => ({}));
2710
2716
  for (const r of Object.getOwnPropertyNames(e)) {
@@ -2726,11 +2732,11 @@ function Ws(e) {
2726
2732
  !v.done && rt(a), v.count--, c(() => u.default), rt();
2727
2733
  }), t = o;
2728
2734
  } else if (!t) {
2729
- const [o] = Lo(() => (n || (n = e())).then((c) => c.default));
2735
+ const [o] = No(() => (n || (n = e())).then((c) => c.default));
2730
2736
  t = o;
2731
2737
  }
2732
2738
  let i;
2733
- return J(() => (i = t()) ? Z(() => {
2739
+ return J(() => (i = t()) ? X(() => {
2734
2740
  if (!a || v.done) return i(r);
2735
2741
  const o = v.context;
2736
2742
  rt(a);
@@ -2749,7 +2755,7 @@ function nu(e) {
2749
2755
  const t = "fallback" in e && {
2750
2756
  fallback: () => e.fallback
2751
2757
  };
2752
- return J(Mo(() => e.each, e.children, t || void 0));
2758
+ return J(Bo(() => e.each, e.children, t || void 0));
2753
2759
  }
2754
2760
  function su(e) {
2755
2761
  const t = "fallback" in e && {
@@ -2765,8 +2771,8 @@ function ru(e) {
2765
2771
  const r = s();
2766
2772
  if (r) {
2767
2773
  const a = e.children;
2768
- return typeof a == "function" && a.length > 0 ? Z(() => a(t ? r : () => {
2769
- if (!Z(s)) throw Ys("Show");
2774
+ return typeof a == "function" && a.length > 0 ? X(() => a(t ? r : () => {
2775
+ if (!X(s)) throw Ys("Show");
2770
2776
  return n();
2771
2777
  })) : a;
2772
2778
  }
@@ -2779,10 +2785,10 @@ function au(e) {
2779
2785
  let a = () => {
2780
2786
  };
2781
2787
  for (let i = 0; i < r.length; i++) {
2782
- const o = i, c = r[i], u = a, f = J(() => u() ? void 0 : c.when, void 0, void 0), d = c.keyed ? f : J(f, void 0, {
2788
+ const o = i, c = r[i], u = a, d = J(() => u() ? void 0 : c.when, void 0, void 0), f = c.keyed ? d : J(d, void 0, {
2783
2789
  equals: (h, g) => !h == !g
2784
2790
  });
2785
- a = () => u() || (d() ? [o, f, c] : void 0);
2791
+ a = () => u() || (f() ? [o, d, c] : void 0);
2786
2792
  }
2787
2793
  return a;
2788
2794
  });
@@ -2790,9 +2796,9 @@ function au(e) {
2790
2796
  const s = n()();
2791
2797
  if (!s) return e.fallback;
2792
2798
  const [r, a, i] = s, o = i.children;
2793
- return typeof o == "function" && o.length > 0 ? Z(() => o(i.keyed ? a() : () => {
2799
+ return typeof o == "function" && o.length > 0 ? X(() => o(i.keyed ? a() : () => {
2794
2800
  var u;
2795
- if (((u = Z(n)()) == null ? void 0 : u[0]) !== r) throw Ys("Match");
2801
+ if (((u = X(n)()) == null ? void 0 : u[0]) !== r) throw Ys("Match");
2796
2802
  return a();
2797
2803
  })) : o;
2798
2804
  }, void 0, void 0);
@@ -2800,10 +2806,10 @@ function au(e) {
2800
2806
  function iu(e) {
2801
2807
  return e;
2802
2808
  }
2803
- var Ho = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"], Qo = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...Ho]), $o = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), jo = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
2809
+ var Ho = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"], Qo = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...Ho]), $o = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), zo = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
2804
2810
  className: "class",
2805
2811
  htmlFor: "for"
2806
- }), zo = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
2812
+ }), jo = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
2807
2813
  class: "className",
2808
2814
  novalidate: {
2809
2815
  $: "noValidate",
@@ -2833,7 +2839,7 @@ var Ho = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "contr
2833
2839
  }
2834
2840
  });
2835
2841
  function Wo(e, t) {
2836
- const n = zo[e];
2842
+ const n = jo[e];
2837
2843
  return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
2838
2844
  }
2839
2845
  var Yo = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]), Jo = /* @__PURE__ */ new Set([
@@ -2914,11 +2920,11 @@ var Yo = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
2914
2920
  "use",
2915
2921
  "view",
2916
2922
  "vkern"
2917
- ]), Xo = {
2923
+ ]), Zo = {
2918
2924
  xlink: "http://www.w3.org/1999/xlink",
2919
2925
  xml: "http://www.w3.org/XML/1998/namespace"
2920
2926
  }, ou = (e) => J(() => e());
2921
- function Zo(e, t, n) {
2927
+ function Xo(e, t, n) {
2922
2928
  let s = n.length, r = t.length, a = s, i = 0, o = 0, c = t[r - 1].nextSibling, u = null;
2923
2929
  for (; i < r || o < a; ) {
2924
2930
  if (t[i] === n[o]) {
@@ -2928,29 +2934,29 @@ function Zo(e, t, n) {
2928
2934
  for (; t[r - 1] === n[a - 1]; )
2929
2935
  r--, a--;
2930
2936
  if (r === i) {
2931
- const f = a < s ? o ? n[o - 1].nextSibling : n[a - o] : c;
2932
- for (; o < a; ) e.insertBefore(n[o++], f);
2937
+ const d = a < s ? o ? n[o - 1].nextSibling : n[a - o] : c;
2938
+ for (; o < a; ) e.insertBefore(n[o++], d);
2933
2939
  } else if (a === o)
2934
2940
  for (; i < r; )
2935
2941
  (!u || !u.has(t[i])) && t[i].remove(), i++;
2936
2942
  else if (t[i] === n[a - 1] && n[o] === t[r - 1]) {
2937
- const f = t[--r].nextSibling;
2938
- e.insertBefore(n[o++], t[i++].nextSibling), e.insertBefore(n[--a], f), t[r] = n[a];
2943
+ const d = t[--r].nextSibling;
2944
+ e.insertBefore(n[o++], t[i++].nextSibling), e.insertBefore(n[--a], d), t[r] = n[a];
2939
2945
  } else {
2940
2946
  if (!u) {
2941
2947
  u = /* @__PURE__ */ new Map();
2942
- let d = o;
2943
- for (; d < a; ) u.set(n[d], d++);
2948
+ let f = o;
2949
+ for (; f < a; ) u.set(n[f], f++);
2944
2950
  }
2945
- const f = u.get(t[i]);
2946
- if (f != null)
2947
- if (o < f && f < a) {
2948
- let d = i, h = 1, g;
2949
- for (; ++d < r && d < a && !((g = u.get(t[d])) == null || g !== f + h); )
2951
+ const d = u.get(t[i]);
2952
+ if (d != null)
2953
+ if (o < d && d < a) {
2954
+ let f = i, h = 1, g;
2955
+ for (; ++f < r && f < a && !((g = u.get(t[f])) == null || g !== d + h); )
2950
2956
  h++;
2951
- if (h > f - o) {
2952
- const y = t[i];
2953
- for (; o < f; ) e.insertBefore(n[o++], y);
2957
+ if (h > d - o) {
2958
+ const p = t[i];
2959
+ for (; o < d; ) e.insertBefore(n[o++], p);
2954
2960
  } else e.replaceChild(n[o++], t[i++]);
2955
2961
  } else i++;
2956
2962
  else t[i++].remove();
@@ -2961,7 +2967,7 @@ var it = "_$DX_DELEGATE";
2961
2967
  function Js(e, t, n, s = {}) {
2962
2968
  let r;
2963
2969
  return Oe((a) => {
2964
- r = a, t === document ? e() : An(t, e(), t.firstChild ? null : void 0, n);
2970
+ r = a, t === document ? e() : yn(t, e(), t.firstChild ? null : void 0, n);
2965
2971
  }, s.owner), () => {
2966
2972
  r(), t.textContent = "";
2967
2973
  };
@@ -2978,16 +2984,16 @@ function el(e, t = window.document) {
2978
2984
  const n = t[it] || (t[it] = /* @__PURE__ */ new Set());
2979
2985
  for (let s = 0, r = e.length; s < r; s++) {
2980
2986
  const a = e[s];
2981
- n.has(a) || (n.add(a), t.addEventListener(a, Xs));
2987
+ n.has(a) || (n.add(a), t.addEventListener(a, Zs));
2982
2988
  }
2983
2989
  }
2984
2990
  function cu(e = window.document) {
2985
2991
  if (e[it]) {
2986
- for (let t of e[it].keys()) e.removeEventListener(t, Xs);
2992
+ for (let t of e[it].keys()) e.removeEventListener(t, Zs);
2987
2993
  delete e[it];
2988
2994
  }
2989
2995
  }
2990
- function yn(e, t, n) {
2996
+ function pn(e, t, n) {
2991
2997
  Ue(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
2992
2998
  }
2993
2999
  function tl(e, t, n, s) {
@@ -3012,16 +3018,16 @@ function al(e, t, n = {}) {
3012
3018
  let a, i;
3013
3019
  for (a = 0, i = r.length; a < i; a++) {
3014
3020
  const o = r[a];
3015
- !o || o === "undefined" || t[o] || (Zn(e, o, !1), delete n[o]);
3021
+ !o || o === "undefined" || t[o] || (Xn(e, o, !1), delete n[o]);
3016
3022
  }
3017
3023
  for (a = 0, i = s.length; a < i; a++) {
3018
3024
  const o = s[a], c = !!t[o];
3019
- !o || o === "undefined" || n[o] === c || !c || (Zn(e, o, !0), n[o] = c);
3025
+ !o || o === "undefined" || n[o] === c || !c || (Xn(e, o, !0), n[o] = c);
3020
3026
  }
3021
3027
  return n;
3022
3028
  }
3023
3029
  function il(e, t, n) {
3024
- if (!t) return n ? yn(e, "style") : t;
3030
+ if (!t) return n ? pn(e, "style") : t;
3025
3031
  const s = e.style;
3026
3032
  if (typeof t == "string") return s.cssText = t;
3027
3033
  typeof n == "string" && (s.cssText = n = void 0), n || (n = {}), t || (t = {});
@@ -3037,9 +3043,9 @@ function ol(e, t = {}, n, s) {
3037
3043
  return s || De(() => r.children = ut(e, t.children, r.children)), De(() => typeof t.ref == "function" && ll(t.ref, e)), De(() => cl(e, t, n, !0, r, !0)), r;
3038
3044
  }
3039
3045
  function ll(e, t, n) {
3040
- return Z(() => e(t, n));
3046
+ return X(() => e(t, n));
3041
3047
  }
3042
- function An(e, t, n, s) {
3048
+ function yn(e, t, n, s) {
3043
3049
  if (n !== void 0 && !s && (s = []), typeof t != "function") return ut(e, t, s, n);
3044
3050
  De((r) => ut(e, t(), r, n), s);
3045
3051
  }
@@ -3067,12 +3073,12 @@ function Ue(e) {
3067
3073
  function dl(e) {
3068
3074
  return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
3069
3075
  }
3070
- function Zn(e, t, n) {
3076
+ function Xn(e, t, n) {
3071
3077
  const s = t.trim().split(/\s+/);
3072
3078
  for (let r = 0, a = s.length; r < a; r++) e.classList.toggle(s[r], n);
3073
3079
  }
3074
3080
  function es(e, t, n, s, r, a, i) {
3075
- let o, c, u, f, d;
3081
+ let o, c, u, d, f;
3076
3082
  if (t === "style") return il(e, n, s);
3077
3083
  if (t === "classList") return al(e, n, s);
3078
3084
  if (n === s) return s;
@@ -3087,26 +3093,26 @@ function es(e, t, n, s, r, a, i) {
3087
3093
  } else if (t.slice(0, 2) === "on") {
3088
3094
  const h = t.slice(2).toLowerCase(), g = Yo.has(h);
3089
3095
  if (!g && s) {
3090
- const y = Array.isArray(s) ? s[0] : s;
3091
- e.removeEventListener(h, y);
3096
+ const p = Array.isArray(s) ? s[0] : s;
3097
+ e.removeEventListener(h, p);
3092
3098
  }
3093
3099
  (g || n) && (rl(e, h, n, g), g && el([h]));
3094
3100
  } else if (t.slice(0, 5) === "attr:")
3095
- yn(e, t.slice(5), n);
3101
+ pn(e, t.slice(5), n);
3096
3102
  else if (t.slice(0, 5) === "bool:")
3097
3103
  nl(e, t.slice(5), n);
3098
- else if ((d = t.slice(0, 5) === "prop:") || (u = $o.has(t)) || !r && ((f = Wo(t, e.tagName)) || (c = Qo.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
3099
- if (d)
3104
+ else if ((f = t.slice(0, 5) === "prop:") || (u = $o.has(t)) || !r && ((d = Wo(t, e.tagName)) || (c = Qo.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
3105
+ if (f)
3100
3106
  t = t.slice(5), c = !0;
3101
3107
  else if (Ue(e)) return n;
3102
- t === "class" || t === "className" ? sl(e, n) : o && !c && !u ? e[dl(t)] = n : e[f || t] = n;
3108
+ t === "class" || t === "className" ? sl(e, n) : o && !c && !u ? e[dl(t)] = n : e[d || t] = n;
3103
3109
  } else {
3104
- const h = r && t.indexOf(":") > -1 && Xo[t.split(":")[0]];
3105
- h ? tl(e, h, t, n) : yn(e, jo[t] || t, n);
3110
+ const h = r && t.indexOf(":") > -1 && Zo[t.split(":")[0]];
3111
+ h ? tl(e, h, t, n) : pn(e, zo[t] || t, n);
3106
3112
  }
3107
3113
  return n;
3108
3114
  }
3109
- function Xs(e) {
3115
+ function Zs(e) {
3110
3116
  if (v.registry && v.events && v.events.find(([c, u]) => u === e))
3111
3117
  return;
3112
3118
  let t = e.target;
@@ -3148,8 +3154,8 @@ function ut(e, t, n, s, r) {
3148
3154
  !n && (n = [...e.childNodes]);
3149
3155
  let c = [];
3150
3156
  for (let u = 0; u < n.length; u++) {
3151
- const f = n[u];
3152
- f.nodeType === 8 && f.data.slice(0, 2) === "!$" ? f.remove() : c.push(f);
3157
+ const d = n[u];
3158
+ d.nodeType === 8 && d.data.slice(0, 2) === "!$" ? d.remove() : c.push(d);
3153
3159
  }
3154
3160
  n = c;
3155
3161
  }
@@ -3161,12 +3167,12 @@ function ut(e, t, n, s, r) {
3161
3167
  return n;
3162
3168
  if (o) {
3163
3169
  let c = n[0];
3164
- c && c.nodeType === 3 ? c.data !== t && (c.data = t) : c = document.createTextNode(t), n = Me(e, n, s, c);
3170
+ c && c.nodeType === 3 ? c.data !== t && (c.data = t) : c = document.createTextNode(t), n = Be(e, n, s, c);
3165
3171
  } else
3166
3172
  n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
3167
3173
  } else if (t == null || i === "boolean") {
3168
3174
  if (a) return n;
3169
- n = Me(e, n, s);
3175
+ n = Be(e, n, s);
3170
3176
  } else {
3171
3177
  if (i === "function")
3172
3178
  return De(() => {
@@ -3176,49 +3182,49 @@ function ut(e, t, n, s, r) {
3176
3182
  }), () => n;
3177
3183
  if (Array.isArray(t)) {
3178
3184
  const c = [], u = n && Array.isArray(n);
3179
- if (Tn(c, t, n, r))
3185
+ if (An(c, t, n, r))
3180
3186
  return De(() => n = ut(e, c, n, s, !0)), () => n;
3181
3187
  if (a) {
3182
3188
  if (!c.length) return n;
3183
3189
  if (s === void 0) return n = [...e.childNodes];
3184
- let f = c[0];
3185
- if (f.parentNode !== e) return n;
3186
- const d = [f];
3187
- for (; (f = f.nextSibling) !== s; ) d.push(f);
3188
- return n = d;
3190
+ let d = c[0];
3191
+ if (d.parentNode !== e) return n;
3192
+ const f = [d];
3193
+ for (; (d = d.nextSibling) !== s; ) f.push(d);
3194
+ return n = f;
3189
3195
  }
3190
3196
  if (c.length === 0) {
3191
- if (n = Me(e, n, s), o) return n;
3192
- } else u ? n.length === 0 ? ts(e, c, s) : Zo(e, n, c) : (n && Me(e), ts(e, c));
3197
+ if (n = Be(e, n, s), o) return n;
3198
+ } else u ? n.length === 0 ? ts(e, c, s) : Xo(e, n, c) : (n && Be(e), ts(e, c));
3193
3199
  n = c;
3194
3200
  } else if (t.nodeType) {
3195
3201
  if (a && t.parentNode) return n = o ? [t] : t;
3196
3202
  if (Array.isArray(n)) {
3197
- if (o) return n = Me(e, n, s, t);
3198
- Me(e, n, null, t);
3203
+ if (o) return n = Be(e, n, s, t);
3204
+ Be(e, n, null, t);
3199
3205
  } else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
3200
3206
  n = t;
3201
3207
  }
3202
3208
  }
3203
3209
  return n;
3204
3210
  }
3205
- function Tn(e, t, n, s) {
3211
+ function An(e, t, n, s) {
3206
3212
  let r = !1;
3207
3213
  for (let a = 0, i = t.length; a < i; a++) {
3208
3214
  let o = t[a], c = n && n[e.length], u;
3209
3215
  if (!(o == null || o === !0 || o === !1)) if ((u = typeof o) == "object" && o.nodeType)
3210
3216
  e.push(o);
3211
3217
  else if (Array.isArray(o))
3212
- r = Tn(e, o, c) || r;
3218
+ r = An(e, o, c) || r;
3213
3219
  else if (u === "function")
3214
3220
  if (s) {
3215
3221
  for (; typeof o == "function"; ) o = o();
3216
- r = Tn(e, Array.isArray(o) ? o : [o], Array.isArray(c) ? c : [c]) || r;
3222
+ r = An(e, Array.isArray(o) ? o : [o], Array.isArray(c) ? c : [c]) || r;
3217
3223
  } else
3218
3224
  e.push(o), r = !0;
3219
3225
  else {
3220
- const f = String(o);
3221
- c && c.nodeType === 3 && c.data === f ? e.push(c) : e.push(document.createTextNode(f));
3226
+ const d = String(o);
3227
+ c && c.nodeType === 3 && c.data === d ? e.push(c) : e.push(document.createTextNode(d));
3222
3228
  }
3223
3229
  }
3224
3230
  return r;
@@ -3226,7 +3232,7 @@ function Tn(e, t, n, s) {
3226
3232
  function ts(e, t, n = null) {
3227
3233
  for (let s = 0, r = t.length; s < r; s++) e.insertBefore(t[s], n);
3228
3234
  }
3229
- function Me(e, t, n, s) {
3235
+ function Be(e, t, n, s) {
3230
3236
  if (n === void 0) return e.textContent = "";
3231
3237
  const r = s || document.createTextNode("");
3232
3238
  if (t.length) {
@@ -3245,22 +3251,22 @@ function fl() {
3245
3251
  return v.getNextContextId();
3246
3252
  }
3247
3253
  var hl = "http://www.w3.org/2000/svg";
3248
- function Zs(e, t = !1) {
3254
+ function Xs(e, t = !1) {
3249
3255
  return t ? document.createElementNS(hl, e) : document.createElement(e);
3250
3256
  }
3251
3257
  function uu(e) {
3252
3258
  const {
3253
3259
  useShadow: t
3254
- } = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = Xn();
3260
+ } = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = Zn();
3255
3261
  let a, i = !!v.context;
3256
3262
  return Fs(() => {
3257
- i && (Xn().user = i = !1), a || (a = qs(r, () => J(() => e.children)));
3263
+ i && (Zn().user = i = !1), a || (a = qs(r, () => J(() => e.children)));
3258
3264
  const o = s();
3259
3265
  if (o instanceof HTMLHeadElement) {
3260
- const [c, u] = q(!1), f = () => u(!0);
3261
- Oe((d) => An(o, () => c() ? d() : a(), null)), lt(f);
3266
+ const [c, u] = q(!1), d = () => u(!0);
3267
+ Oe((f) => yn(o, () => c() ? f() : a(), null)), lt(d);
3262
3268
  } else {
3263
- const c = Zs(e.isSVG ? "g" : "div", e.isSVG), u = t && c.attachShadow ? c.attachShadow({
3269
+ const c = Xs(e.isSVG ? "g" : "div", e.isSVG), u = t && c.attachShadow ? c.attachShadow({
3264
3270
  mode: "open"
3265
3271
  }) : c;
3266
3272
  Object.defineProperty(c, "_$host", {
@@ -3268,7 +3274,7 @@ function uu(e) {
3268
3274
  return n.parentNode;
3269
3275
  },
3270
3276
  configurable: !0
3271
- }), An(u, a), o.appendChild(c), e.ref && e.ref(c), lt(() => o.removeChild(c));
3277
+ }), yn(u, a), o.appendChild(c), e.ref && e.ref(c), lt(() => o.removeChild(c));
3272
3278
  }
3273
3279
  }, void 0, {
3274
3280
  render: !i
@@ -3280,9 +3286,9 @@ function gl(e, t) {
3280
3286
  const s = n();
3281
3287
  switch (typeof s) {
3282
3288
  case "function":
3283
- return Z(() => s(t));
3289
+ return X(() => s(t));
3284
3290
  case "string":
3285
- const r = Jo.has(s), a = v.context ? ul() : Zs(s, r);
3291
+ const r = Jo.has(s), a = v.context ? ul() : Xs(s, r);
3286
3292
  return ol(a, t, r), a;
3287
3293
  }
3288
3294
  });
@@ -3379,7 +3385,7 @@ var Al = class {
3379
3385
  findByName(e) {
3380
3386
  return this.transfomers[e];
3381
3387
  }
3382
- }, Tl = (e) => Object.prototype.toString.call(e).slice(8, -1), tr = (e) => typeof e > "u", Sl = (e) => e === null, dt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Sn = (e) => dt(e) && Object.keys(e).length === 0, ve = (e) => Array.isArray(e), _l = (e) => typeof e == "string", Pl = (e) => typeof e == "number" && !isNaN(e), vl = (e) => typeof e == "boolean", wl = (e) => e instanceof RegExp, ft = (e) => e instanceof Map, ht = (e) => e instanceof Set, nr = (e) => Tl(e) === "Symbol", bl = (e) => e instanceof Date && !isNaN(e.valueOf()), Il = (e) => e instanceof Error, ss = (e) => typeof e == "number" && isNaN(e), Cl = (e) => vl(e) || Sl(e) || tr(e) || Pl(e) || _l(e) || nr(e), Nl = (e) => typeof e == "bigint", Ll = (e) => e === 1 / 0 || e === -1 / 0, kl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Ol = (e) => e instanceof URL, sr = (e) => e.replace(/\./g, "\\."), fn = (e) => e.map(String).map(sr).join("."), ot = (e) => {
3388
+ }, Tl = (e) => Object.prototype.toString.call(e).slice(8, -1), tr = (e) => typeof e > "u", Sl = (e) => e === null, dt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Tn = (e) => dt(e) && Object.keys(e).length === 0, we = (e) => Array.isArray(e), _l = (e) => typeof e == "string", Pl = (e) => typeof e == "number" && !isNaN(e), vl = (e) => typeof e == "boolean", wl = (e) => e instanceof RegExp, ft = (e) => e instanceof Map, ht = (e) => e instanceof Set, nr = (e) => Tl(e) === "Symbol", bl = (e) => e instanceof Date && !isNaN(e.valueOf()), Il = (e) => e instanceof Error, ss = (e) => typeof e == "number" && isNaN(e), Ll = (e) => vl(e) || Sl(e) || tr(e) || Pl(e) || _l(e) || nr(e), Cl = (e) => typeof e == "bigint", Nl = (e) => e === 1 / 0 || e === -1 / 0, kl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Ol = (e) => e instanceof URL, sr = (e) => e.replace(/\./g, "\\."), dn = (e) => e.map(String).map(sr).join("."), ot = (e) => {
3383
3389
  const t = [];
3384
3390
  let n = "";
3385
3391
  for (let r = 0; r < e.length; r++) {
@@ -3408,7 +3414,7 @@ function fe(e, t, n, s) {
3408
3414
  var rr = [
3409
3415
  fe(tr, "undefined", () => null, () => {
3410
3416
  }),
3411
- fe(Nl, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
3417
+ fe(Cl, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
3412
3418
  fe(bl, "Date", (e) => e.toISOString(), (e) => new Date(e)),
3413
3419
  fe(Il, "Error", (e, t) => {
3414
3420
  const n = {
@@ -3437,7 +3443,7 @@ var rr = [
3437
3443
  (e) => new Set(e)
3438
3444
  ),
3439
3445
  fe(ft, "map", (e) => [...e.entries()], (e) => new Map(e)),
3440
- fe((e) => ss(e) || Ll(e), "number", (e) => ss(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
3446
+ fe((e) => ss(e) || Nl(e), "number", (e) => ss(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
3441
3447
  fe((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
3442
3448
  fe(Ol, "URL", (e) => e.toString(), (e) => new URL(e))
3443
3449
  ];
@@ -3491,8 +3497,8 @@ var lr = en(or, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
3491
3497
  if (!s)
3492
3498
  throw new Error("Trying to deserialize unknown custom value");
3493
3499
  return s.deserialize(e);
3494
- }), Gl = [lr, ar, cr, ir], rs = (e, t) => {
3495
- const n = ns(Gl, (r) => r.isApplicable(e, t));
3500
+ }), xl = [lr, ar, cr, ir], rs = (e, t) => {
3501
+ const n = ns(xl, (r) => r.isApplicable(e, t));
3496
3502
  if (n)
3497
3503
  return {
3498
3504
  value: n.transform(e, t),
@@ -3508,8 +3514,8 @@ var lr = en(or, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
3508
3514
  rr.forEach((e) => {
3509
3515
  ur[e.annotation] = e;
3510
3516
  });
3511
- var xl = (e, t, n) => {
3512
- if (ve(t))
3517
+ var Gl = (e, t, n) => {
3518
+ if (we(t))
3513
3519
  switch (t[0]) {
3514
3520
  case "symbol":
3515
3521
  return ar.untransform(e, t, n);
@@ -3564,13 +3570,13 @@ var Rl = (e, t) => {
3564
3570
  e = e[s];
3565
3571
  }
3566
3572
  return e;
3567
- }, _n = (e, t, n) => {
3573
+ }, Sn = (e, t, n) => {
3568
3574
  if (dr(t), t.length === 0)
3569
3575
  return n(e);
3570
3576
  let s = e;
3571
3577
  for (let a = 0; a < t.length - 1; a++) {
3572
3578
  const i = t[a];
3573
- if (ve(s)) {
3579
+ if (we(s)) {
3574
3580
  const o = +i;
3575
3581
  s = s[o];
3576
3582
  } else if (dt(s))
@@ -3581,19 +3587,19 @@ var Rl = (e, t) => {
3581
3587
  } else if (ft(s)) {
3582
3588
  if (a === t.length - 2)
3583
3589
  break;
3584
- const c = +i, u = +t[++a] == 0 ? "key" : "value", f = Fe(s, c);
3590
+ const c = +i, u = +t[++a] == 0 ? "key" : "value", d = Fe(s, c);
3585
3591
  switch (u) {
3586
3592
  case "key":
3587
- s = f;
3593
+ s = d;
3588
3594
  break;
3589
3595
  case "value":
3590
- s = s.get(f);
3596
+ s = s.get(d);
3591
3597
  break;
3592
3598
  }
3593
3599
  }
3594
3600
  }
3595
3601
  const r = t[t.length - 1];
3596
- if (ve(s) ? s[+r] = n(s[+r]) : dt(s) && (s[r] = n(s[r])), ht(s)) {
3602
+ if (we(s) ? s[+r] = n(s[+r]) : dt(s) && (s[r] = n(s[r])), ht(s)) {
3597
3603
  const a = Fe(s, +r), i = n(a);
3598
3604
  a !== i && (s.delete(a), s.add(i));
3599
3605
  }
@@ -3613,40 +3619,40 @@ var Rl = (e, t) => {
3613
3619
  }
3614
3620
  return e;
3615
3621
  };
3616
- function Pn(e, t, n = []) {
3622
+ function _n(e, t, n = []) {
3617
3623
  if (!e)
3618
3624
  return;
3619
- if (!ve(e)) {
3620
- nt(e, (a, i) => Pn(a, t, [...n, ...ot(i)]));
3625
+ if (!we(e)) {
3626
+ nt(e, (a, i) => _n(a, t, [...n, ...ot(i)]));
3621
3627
  return;
3622
3628
  }
3623
3629
  const [s, r] = e;
3624
3630
  r && nt(r, (a, i) => {
3625
- Pn(a, t, [...n, ...ot(i)]);
3631
+ _n(a, t, [...n, ...ot(i)]);
3626
3632
  }), t(s, n);
3627
3633
  }
3628
3634
  function Ul(e, t, n) {
3629
- return Pn(t, (s, r) => {
3630
- e = _n(e, r, (a) => xl(a, s, n));
3635
+ return _n(t, (s, r) => {
3636
+ e = Sn(e, r, (a) => Gl(a, s, n));
3631
3637
  }), e;
3632
3638
  }
3633
- function Bl(e, t) {
3639
+ function Ml(e, t) {
3634
3640
  function n(s, r) {
3635
3641
  const a = Rl(e, ot(r));
3636
3642
  s.map(ot).forEach((i) => {
3637
- e = _n(e, i, () => a);
3643
+ e = Sn(e, i, () => a);
3638
3644
  });
3639
3645
  }
3640
- if (ve(t)) {
3646
+ if (we(t)) {
3641
3647
  const [s, r] = t;
3642
3648
  s.forEach((a) => {
3643
- e = _n(e, ot(a), () => e);
3649
+ e = Sn(e, ot(a), () => e);
3644
3650
  }), r && nt(r, n);
3645
3651
  } else
3646
3652
  nt(t, n);
3647
3653
  return e;
3648
3654
  }
3649
- var Ml = (e, t) => dt(e) || ve(e) || ft(e) || ht(e) || or(e, t);
3655
+ var Bl = (e, t) => dt(e) || we(e) || ft(e) || ht(e) || or(e, t);
3650
3656
  function Fl(e, t, n) {
3651
3657
  const s = n.get(e);
3652
3658
  s ? s.push(t) : n.set(e, [t]);
@@ -3659,11 +3665,11 @@ function ql(e, t) {
3659
3665
  return;
3660
3666
  t || (r = r.map((o) => o.map(String)).sort((o, c) => o.length - c.length));
3661
3667
  const [a, ...i] = r;
3662
- a.length === 0 ? s = i.map(fn) : n[fn(a)] = i.map(fn);
3663
- }), s ? Sn(n) ? [s] : [s, n] : Sn(n) ? void 0 : n;
3668
+ a.length === 0 ? s = i.map(dn) : n[dn(a)] = i.map(dn);
3669
+ }), s ? Tn(n) ? [s] : [s, n] : Tn(n) ? void 0 : n;
3664
3670
  }
3665
3671
  var fr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
3666
- const o = Cl(e);
3672
+ const o = Ll(e);
3667
3673
  if (!o) {
3668
3674
  Fl(e, r, t);
3669
3675
  const g = i.get(e);
@@ -3672,34 +3678,34 @@ var fr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
3672
3678
  transformedValue: null
3673
3679
  } : g;
3674
3680
  }
3675
- if (!Ml(e, n)) {
3676
- const g = rs(e, n), y = g ? {
3681
+ if (!Bl(e, n)) {
3682
+ const g = rs(e, n), p = g ? {
3677
3683
  transformedValue: g.value,
3678
3684
  annotations: [g.type]
3679
3685
  } : {
3680
3686
  transformedValue: e
3681
3687
  };
3682
- return o || i.set(e, y), y;
3688
+ return o || i.set(e, p), p;
3683
3689
  }
3684
3690
  if (Ut(a, e))
3685
3691
  return {
3686
3692
  transformedValue: null
3687
3693
  };
3688
- const c = rs(e, n), u = (c == null ? void 0 : c.value) ?? e, f = ve(u) ? [] : {}, d = {};
3689
- nt(u, (g, y) => {
3690
- if (y === "__proto__" || y === "constructor" || y === "prototype")
3691
- throw new Error(`Detected property ${y}. This is a prototype pollution risk, please remove it from your object.`);
3692
- const T = fr(g, t, n, s, [...r, y], [...a, e], i);
3693
- f[y] = T.transformedValue, ve(T.annotations) ? d[y] = T.annotations : dt(T.annotations) && nt(T.annotations, (_, p) => {
3694
- d[sr(y) + "." + p] = _;
3694
+ const c = rs(e, n), u = (c == null ? void 0 : c.value) ?? e, d = we(u) ? [] : {}, f = {};
3695
+ nt(u, (g, p) => {
3696
+ if (p === "__proto__" || p === "constructor" || p === "prototype")
3697
+ throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
3698
+ const S = fr(g, t, n, s, [...r, p], [...a, e], i);
3699
+ d[p] = S.transformedValue, we(S.annotations) ? f[p] = S.annotations : dt(S.annotations) && nt(S.annotations, (P, T) => {
3700
+ f[sr(p) + "." + T] = P;
3695
3701
  });
3696
3702
  });
3697
- const h = Sn(d) ? {
3698
- transformedValue: f,
3703
+ const h = Tn(f) ? {
3704
+ transformedValue: d,
3699
3705
  annotations: c ? [c.type] : void 0
3700
3706
  } : {
3701
- transformedValue: f,
3702
- annotations: c ? [c.type, d] : d
3707
+ transformedValue: d,
3708
+ annotations: c ? [c.type, f] : f
3703
3709
  };
3704
3710
  return o || i.set(e, h), h;
3705
3711
  };
@@ -3724,20 +3730,20 @@ function Vl(e, t, n, s, r) {
3724
3730
  configurable: !0
3725
3731
  });
3726
3732
  }
3727
- function vn(e, t = {}) {
3733
+ function Pn(e, t = {}) {
3728
3734
  if (as(e))
3729
- return e.map((r) => vn(r, t));
3735
+ return e.map((r) => Pn(r, t));
3730
3736
  if (!Kl(e))
3731
3737
  return e;
3732
3738
  const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
3733
3739
  return [...n, ...s].reduce((r, a) => {
3734
3740
  if (as(t.props) && !t.props.includes(a))
3735
3741
  return r;
3736
- const i = e[a], o = vn(i, t);
3742
+ const i = e[a], o = Pn(i, t);
3737
3743
  return Vl(r, a, o, e, t.nonenumerable), r;
3738
3744
  }, {});
3739
3745
  }
3740
- var x = class {
3746
+ var G = class {
3741
3747
  /**
3742
3748
  * @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
3743
3749
  */
@@ -3760,8 +3766,8 @@ var x = class {
3760
3766
  }
3761
3767
  deserialize(e) {
3762
3768
  const { json: t, meta: n } = e;
3763
- let s = vn(t);
3764
- return n != null && n.values && (s = Ul(s, n.values, this)), n != null && n.referentialEqualities && (s = Bl(s, n.referentialEqualities)), s;
3769
+ let s = Pn(t);
3770
+ return n != null && n.values && (s = Ul(s, n.values, this)), n != null && n.referentialEqualities && (s = Ml(s, n.referentialEqualities)), s;
3765
3771
  }
3766
3772
  stringify(e) {
3767
3773
  return JSON.stringify(this.serialize(e));
@@ -3785,16 +3791,16 @@ var x = class {
3785
3791
  this.allowedErrorProps.push(...e);
3786
3792
  }
3787
3793
  };
3788
- x.defaultInstance = new x();
3789
- x.serialize = x.defaultInstance.serialize.bind(x.defaultInstance);
3790
- x.deserialize = x.defaultInstance.deserialize.bind(x.defaultInstance);
3791
- x.stringify = x.defaultInstance.stringify.bind(x.defaultInstance);
3792
- x.parse = x.defaultInstance.parse.bind(x.defaultInstance);
3793
- x.registerClass = x.defaultInstance.registerClass.bind(x.defaultInstance);
3794
- x.registerSymbol = x.defaultInstance.registerSymbol.bind(x.defaultInstance);
3795
- x.registerCustom = x.defaultInstance.registerCustom.bind(x.defaultInstance);
3796
- x.allowErrorProps = x.defaultInstance.allowErrorProps.bind(x.defaultInstance);
3797
- var Hl = x.serialize, fu = x.stringify;
3794
+ G.defaultInstance = new G();
3795
+ G.serialize = G.defaultInstance.serialize.bind(G.defaultInstance);
3796
+ G.deserialize = G.defaultInstance.deserialize.bind(G.defaultInstance);
3797
+ G.stringify = G.defaultInstance.stringify.bind(G.defaultInstance);
3798
+ G.parse = G.defaultInstance.parse.bind(G.defaultInstance);
3799
+ G.registerClass = G.defaultInstance.registerClass.bind(G.defaultInstance);
3800
+ G.registerSymbol = G.defaultInstance.registerSymbol.bind(G.defaultInstance);
3801
+ G.registerCustom = G.defaultInstance.registerCustom.bind(G.defaultInstance);
3802
+ G.allowErrorProps = G.defaultInstance.allowErrorProps.bind(G.defaultInstance);
3803
+ var Hl = G.serialize, fu = G.stringify;
3798
3804
  function hu(e) {
3799
3805
  return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
3800
3806
  }
@@ -3826,8 +3832,8 @@ var yu = (e, t = !1) => {
3826
3832
  status: $l,
3827
3833
  "query hash": Ql,
3828
3834
  "last updated": gr
3829
- }, Dt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, mr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, jl = (e, t) => Dt(e) === Dt(t) ? mr(e, t) : Dt(e) > Dt(t) ? 1 : -1, Tu = {
3830
- status: jl,
3835
+ }, Dt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, mr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, zl = (e, t) => Dt(e) === Dt(t) ? mr(e, t) : Dt(e) > Dt(t) ? 1 : -1, Tu = {
3836
+ status: zl,
3831
3837
  "last updated": mr
3832
3838
  }, Su = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), _u = () => {
3833
3839
  const [e, t] = q("dark");
@@ -3839,7 +3845,7 @@ var yu = (e, t = !1) => {
3839
3845
  };
3840
3846
  n.addEventListener("change", s), lt(() => n.removeEventListener("change", s));
3841
3847
  }), e;
3842
- }, Gt = (e, t, n) => {
3848
+ }, xt = (e, t, n) => {
3843
3849
  if (t.length === 0)
3844
3850
  return n;
3845
3851
  if (e instanceof Map) {
@@ -3847,10 +3853,10 @@ var yu = (e, t = !1) => {
3847
3853
  if (t.length === 1)
3848
3854
  return s.set(t[0], n), s;
3849
3855
  const [r, ...a] = t;
3850
- return s.set(r, Gt(s.get(r), a, n)), s;
3856
+ return s.set(r, xt(s.get(r), a, n)), s;
3851
3857
  }
3852
3858
  if (e instanceof Set) {
3853
- const s = Gt(Array.from(e), t, n);
3859
+ const s = xt(Array.from(e), t, n);
3854
3860
  return new Set(s);
3855
3861
  }
3856
3862
  if (Array.isArray(e)) {
@@ -3858,7 +3864,7 @@ var yu = (e, t = !1) => {
3858
3864
  if (t.length === 1)
3859
3865
  return s[t[0]] = n, s;
3860
3866
  const [r, ...a] = t;
3861
- return s[r] = Gt(s[r], a, n), s;
3867
+ return s[r] = xt(s[r], a, n), s;
3862
3868
  }
3863
3869
  if (e instanceof Object) {
3864
3870
  const s = {
@@ -3867,19 +3873,19 @@ var yu = (e, t = !1) => {
3867
3873
  if (t.length === 1)
3868
3874
  return s[t[0]] = n, s;
3869
3875
  const [r, ...a] = t;
3870
- return s[r] = Gt(s[r], a, n), s;
3876
+ return s[r] = xt(s[r], a, n), s;
3871
3877
  }
3872
3878
  return e;
3873
- }, xt = (e, t) => {
3879
+ }, Gt = (e, t) => {
3874
3880
  if (e instanceof Map) {
3875
3881
  const n = new Map(e);
3876
3882
  if (t.length === 1)
3877
3883
  return n.delete(t[0]), n;
3878
3884
  const [s, ...r] = t;
3879
- return n.set(s, xt(n.get(s), r)), n;
3885
+ return n.set(s, Gt(n.get(s), r)), n;
3880
3886
  }
3881
3887
  if (e instanceof Set) {
3882
- const n = xt(Array.from(e), t);
3888
+ const n = Gt(Array.from(e), t);
3883
3889
  return new Set(n);
3884
3890
  }
3885
3891
  if (Array.isArray(e)) {
@@ -3887,7 +3893,7 @@ var yu = (e, t = !1) => {
3887
3893
  if (t.length === 1)
3888
3894
  return n.filter((a, i) => i.toString() !== t[0]);
3889
3895
  const [s, ...r] = t;
3890
- return n[s] = xt(n[s], r), n;
3896
+ return n[s] = Gt(n[s], r), n;
3891
3897
  }
3892
3898
  if (e instanceof Object) {
3893
3899
  const n = {
@@ -3896,20 +3902,20 @@ var yu = (e, t = !1) => {
3896
3902
  if (t.length === 1)
3897
3903
  return delete n[t[0]], n;
3898
3904
  const [s, ...r] = t;
3899
- return n[s] = xt(n[s], r), n;
3905
+ return n[s] = Gt(n[s], r), n;
3900
3906
  }
3901
3907
  return e;
3902
3908
  }, Er = (e, t) => {
3903
3909
  if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
3904
3910
  const s = document.createElement("style"), r = document.createTextNode("");
3905
3911
  s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
3906
- }, qe, gt, mt, Et, Le, pt, Ke, Ve, He, Qe, $e, yt, je, At, cs, zl = (cs = class {
3912
+ }, qe, gt, mt, Et, Ne, pt, Ke, Ve, He, Qe, $e, yt, ze, At, cs, jl = (cs = class {
3907
3913
  constructor(e) {
3908
3914
  D(this, qe);
3909
3915
  D(this, gt);
3910
3916
  D(this, mt);
3911
3917
  D(this, Et);
3912
- D(this, Le, !1);
3918
+ D(this, Ne, !1);
3913
3919
  D(this, pt);
3914
3920
  D(this, Ke);
3915
3921
  D(this, Ve);
@@ -3917,7 +3923,7 @@ var yu = (e, t = !1) => {
3917
3923
  D(this, Qe);
3918
3924
  D(this, $e);
3919
3925
  D(this, yt);
3920
- D(this, je);
3926
+ D(this, ze);
3921
3927
  D(this, At);
3922
3928
  const {
3923
3929
  client: t,
@@ -3929,44 +3935,44 @@ var yu = (e, t = !1) => {
3929
3935
  initialIsOpen: o,
3930
3936
  errorTypes: c,
3931
3937
  styleNonce: u,
3932
- shadowDOMTarget: f,
3933
- hideDisabledQueries: d
3938
+ shadowDOMTarget: d,
3939
+ hideDisabledQueries: f
3934
3940
  } = e;
3935
- k(this, qe, q(t)), k(this, mt, n), k(this, Et, s), k(this, gt, r), k(this, pt, u), k(this, Ke, f), k(this, Ve, q(a)), k(this, He, q(i)), k(this, Qe, q(o)), k(this, $e, q(c)), k(this, yt, q(d));
3941
+ O(this, qe, q(t)), O(this, mt, n), O(this, Et, s), O(this, gt, r), O(this, pt, u), O(this, Ke, d), O(this, Ve, q(a)), O(this, He, q(i)), O(this, Qe, q(o)), O(this, $e, q(c)), O(this, yt, q(f));
3936
3942
  }
3937
3943
  setButtonPosition(e) {
3938
- S(this, Ve)[1](e);
3944
+ _(this, Ve)[1](e);
3939
3945
  }
3940
3946
  setPosition(e) {
3941
- S(this, He)[1](e);
3947
+ _(this, He)[1](e);
3942
3948
  }
3943
3949
  setInitialIsOpen(e) {
3944
- S(this, Qe)[1](e);
3950
+ _(this, Qe)[1](e);
3945
3951
  }
3946
3952
  setErrorTypes(e) {
3947
- S(this, $e)[1](e);
3953
+ _(this, $e)[1](e);
3948
3954
  }
3949
3955
  setClient(e) {
3950
- S(this, qe)[1](e);
3956
+ _(this, qe)[1](e);
3951
3957
  }
3952
3958
  mount(e) {
3953
- if (S(this, Le))
3959
+ if (_(this, Ne))
3954
3960
  throw new Error("Devtools is already mounted");
3955
3961
  const t = Js(() => {
3956
- const n = this, [s] = S(this, Ve), [r] = S(this, He), [a] = S(this, Qe), [i] = S(this, $e), [o] = S(this, yt), [c] = S(this, qe);
3962
+ const n = this, [s] = _(this, Ve), [r] = _(this, He), [a] = _(this, Qe), [i] = _(this, $e), [o] = _(this, yt), [c] = _(this, qe);
3957
3963
  let u;
3958
- return S(this, je) ? u = S(this, je) : (u = Ws(() => import("./NCMVHL6D-DFMKkQPN.js")), k(this, je, u)), Er(S(this, pt), S(this, Ke)), js(u, zs({
3964
+ return _(this, ze) ? u = _(this, ze) : (u = Ws(() => import("./NCMVHL6D-kHUQxG8D.js")), O(this, ze, u)), Er(_(this, pt), _(this, Ke)), zs(u, js({
3959
3965
  get queryFlavor() {
3960
- return S(n, mt);
3966
+ return _(n, mt);
3961
3967
  },
3962
3968
  get version() {
3963
- return S(n, Et);
3969
+ return _(n, Et);
3964
3970
  },
3965
3971
  get onlineManager() {
3966
- return S(n, gt);
3972
+ return _(n, gt);
3967
3973
  },
3968
3974
  get shadowDOMTarget() {
3969
- return S(n, Ke);
3975
+ return _(n, Ke);
3970
3976
  }
3971
3977
  }, {
3972
3978
  get client() {
@@ -3989,17 +3995,17 @@ var yu = (e, t = !1) => {
3989
3995
  }
3990
3996
  }));
3991
3997
  }, e);
3992
- k(this, Le, !0), k(this, At, t);
3998
+ O(this, Ne, !0), O(this, At, t);
3993
3999
  }
3994
4000
  unmount() {
3995
4001
  var e;
3996
- if (!S(this, Le))
4002
+ if (!_(this, Ne))
3997
4003
  throw new Error("Devtools is not mounted");
3998
- (e = S(this, At)) == null || e.call(this), k(this, Le, !1);
4004
+ (e = _(this, At)) == null || e.call(this), O(this, Ne, !1);
3999
4005
  }
4000
- }, qe = new WeakMap(), gt = new WeakMap(), mt = new WeakMap(), Et = new WeakMap(), Le = new WeakMap(), pt = new WeakMap(), Ke = new WeakMap(), Ve = new WeakMap(), He = new WeakMap(), Qe = new WeakMap(), $e = new WeakMap(), yt = new WeakMap(), je = new WeakMap(), At = new WeakMap(), cs), ze, Tt, St, _t, ke, Pt, We, Ye, Je, Xe, Ze, vt, et, tt, wt, us, Wl = (us = class {
4006
+ }, qe = new WeakMap(), gt = new WeakMap(), mt = new WeakMap(), Et = new WeakMap(), Ne = new WeakMap(), pt = new WeakMap(), Ke = new WeakMap(), Ve = new WeakMap(), He = new WeakMap(), Qe = new WeakMap(), $e = new WeakMap(), yt = new WeakMap(), ze = new WeakMap(), At = new WeakMap(), cs), je, Tt, St, _t, ke, Pt, We, Ye, Je, Ze, Xe, vt, et, tt, wt, us, Wl = (us = class {
4001
4007
  constructor(e) {
4002
- D(this, ze);
4008
+ D(this, je);
4003
4009
  D(this, Tt);
4004
4010
  D(this, St);
4005
4011
  D(this, _t);
@@ -4008,8 +4014,8 @@ var yu = (e, t = !1) => {
4008
4014
  D(this, We);
4009
4015
  D(this, Ye);
4010
4016
  D(this, Je);
4011
- D(this, Xe);
4012
4017
  D(this, Ze);
4018
+ D(this, Xe);
4013
4019
  D(this, vt);
4014
4020
  D(this, et);
4015
4021
  D(this, tt);
@@ -4024,48 +4030,48 @@ var yu = (e, t = !1) => {
4024
4030
  initialIsOpen: o,
4025
4031
  errorTypes: c,
4026
4032
  styleNonce: u,
4027
- shadowDOMTarget: f,
4028
- onClose: d,
4033
+ shadowDOMTarget: d,
4034
+ onClose: f,
4029
4035
  hideDisabledQueries: h
4030
4036
  } = e;
4031
- k(this, ze, q(t)), k(this, St, n), k(this, _t, s), k(this, Tt, r), k(this, Pt, u), k(this, We, f), k(this, Ye, q(a)), k(this, Je, q(i)), k(this, Xe, q(o)), k(this, Ze, q(c)), k(this, vt, q(h)), k(this, et, q(d));
4037
+ O(this, je, q(t)), O(this, St, n), O(this, _t, s), O(this, Tt, r), O(this, Pt, u), O(this, We, d), O(this, Ye, q(a)), O(this, Je, q(i)), O(this, Ze, q(o)), O(this, Xe, q(c)), O(this, vt, q(h)), O(this, et, q(f));
4032
4038
  }
4033
4039
  setButtonPosition(e) {
4034
- S(this, Ye)[1](e);
4040
+ _(this, Ye)[1](e);
4035
4041
  }
4036
4042
  setPosition(e) {
4037
- S(this, Je)[1](e);
4043
+ _(this, Je)[1](e);
4038
4044
  }
4039
4045
  setInitialIsOpen(e) {
4040
- S(this, Xe)[1](e);
4046
+ _(this, Ze)[1](e);
4041
4047
  }
4042
4048
  setErrorTypes(e) {
4043
- S(this, Ze)[1](e);
4049
+ _(this, Xe)[1](e);
4044
4050
  }
4045
4051
  setClient(e) {
4046
- S(this, ze)[1](e);
4052
+ _(this, je)[1](e);
4047
4053
  }
4048
4054
  setOnClose(e) {
4049
- S(this, et)[1](() => e);
4055
+ _(this, et)[1](() => e);
4050
4056
  }
4051
4057
  mount(e) {
4052
- if (S(this, ke))
4058
+ if (_(this, ke))
4053
4059
  throw new Error("Devtools is already mounted");
4054
4060
  const t = Js(() => {
4055
- const n = this, [s] = S(this, Ye), [r] = S(this, Je), [a] = S(this, Xe), [i] = S(this, Ze), [o] = S(this, vt), [c] = S(this, ze), [u] = S(this, et);
4056
- let f;
4057
- return S(this, tt) ? f = S(this, tt) : (f = Ws(() => import("./2AITGKQY-BFankGad.js")), k(this, tt, f)), Er(S(this, Pt), S(this, We)), js(f, zs({
4061
+ const n = this, [s] = _(this, Ye), [r] = _(this, Je), [a] = _(this, Ze), [i] = _(this, Xe), [o] = _(this, vt), [c] = _(this, je), [u] = _(this, et);
4062
+ let d;
4063
+ return _(this, tt) ? d = _(this, tt) : (d = Ws(() => import("./2AITGKQY-DI5Po2Nc.js")), O(this, tt, d)), Er(_(this, Pt), _(this, We)), zs(d, js({
4058
4064
  get queryFlavor() {
4059
- return S(n, St);
4065
+ return _(n, St);
4060
4066
  },
4061
4067
  get version() {
4062
- return S(n, _t);
4068
+ return _(n, _t);
4063
4069
  },
4064
4070
  get onlineManager() {
4065
- return S(n, Tt);
4071
+ return _(n, Tt);
4066
4072
  },
4067
4073
  get shadowDOMTarget() {
4068
- return S(n, We);
4074
+ return _(n, We);
4069
4075
  }
4070
4076
  }, {
4071
4077
  get client() {
@@ -4091,17 +4097,17 @@ var yu = (e, t = !1) => {
4091
4097
  }
4092
4098
  }));
4093
4099
  }, e);
4094
- k(this, ke, !0), k(this, wt, t);
4100
+ O(this, ke, !0), O(this, wt, t);
4095
4101
  }
4096
4102
  unmount() {
4097
4103
  var e;
4098
- if (!S(this, ke))
4104
+ if (!_(this, ke))
4099
4105
  throw new Error("Devtools is not mounted");
4100
- (e = S(this, wt)) == null || e.call(this), k(this, ke, !1);
4106
+ (e = _(this, wt)) == null || e.call(this), O(this, ke, !1);
4101
4107
  }
4102
- }, ze = new WeakMap(), Tt = new WeakMap(), St = new WeakMap(), _t = new WeakMap(), ke = new WeakMap(), Pt = new WeakMap(), We = new WeakMap(), Ye = new WeakMap(), Je = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), vt = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), us);
4108
+ }, je = new WeakMap(), Tt = new WeakMap(), St = new WeakMap(), _t = new WeakMap(), ke = new WeakMap(), Pt = new WeakMap(), We = new WeakMap(), Ye = new WeakMap(), Je = new WeakMap(), Ze = new WeakMap(), Xe = new WeakMap(), vt = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), us);
4103
4109
  function Yl(e) {
4104
- const t = W(e.client), n = z.useRef(null), {
4110
+ const t = W(e.client), n = j.useRef(null), {
4105
4111
  buttonPosition: s,
4106
4112
  position: r,
4107
4113
  initialIsOpen: a,
@@ -4109,8 +4115,8 @@ function Yl(e) {
4109
4115
  styleNonce: o,
4110
4116
  shadowDOMTarget: c,
4111
4117
  hideDisabledQueries: u
4112
- } = e, [f] = z.useState(
4113
- new zl({
4118
+ } = e, [d] = j.useState(
4119
+ new jl({
4114
4120
  client: t,
4115
4121
  queryFlavor: "React Query",
4116
4122
  version: "5",
@@ -4124,22 +4130,22 @@ function Yl(e) {
4124
4130
  hideDisabledQueries: u
4125
4131
  })
4126
4132
  );
4127
- return z.useEffect(() => {
4128
- f.setClient(t);
4129
- }, [t, f]), z.useEffect(() => {
4130
- s && f.setButtonPosition(s);
4131
- }, [s, f]), z.useEffect(() => {
4132
- r && f.setPosition(r);
4133
- }, [r, f]), z.useEffect(() => {
4134
- f.setInitialIsOpen(a || !1);
4135
- }, [a, f]), z.useEffect(() => {
4136
- f.setErrorTypes(i || []);
4137
- }, [i, f]), z.useEffect(() => (n.current && f.mount(n.current), () => {
4138
- f.unmount();
4139
- }), [f]), /* @__PURE__ */ l("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
4133
+ return j.useEffect(() => {
4134
+ d.setClient(t);
4135
+ }, [t, d]), j.useEffect(() => {
4136
+ s && d.setButtonPosition(s);
4137
+ }, [s, d]), j.useEffect(() => {
4138
+ r && d.setPosition(r);
4139
+ }, [r, d]), j.useEffect(() => {
4140
+ d.setInitialIsOpen(a || !1);
4141
+ }, [a, d]), j.useEffect(() => {
4142
+ d.setErrorTypes(i || []);
4143
+ }, [i, d]), j.useEffect(() => (n.current && d.mount(n.current), () => {
4144
+ d.unmount();
4145
+ }), [d]), /* @__PURE__ */ l("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
4140
4146
  }
4141
4147
  function Jl(e) {
4142
- const t = W(e.client), n = z.useRef(null), { errorTypes: s, styleNonce: r, shadowDOMTarget: a, hideDisabledQueries: i } = e, [o] = z.useState(
4148
+ const t = W(e.client), n = j.useRef(null), { errorTypes: s, styleNonce: r, shadowDOMTarget: a, hideDisabledQueries: i } = e, [o] = j.useState(
4143
4149
  new Wl({
4144
4150
  client: t,
4145
4151
  queryFlavor: "React Query",
@@ -4155,14 +4161,14 @@ function Jl(e) {
4155
4161
  hideDisabledQueries: i
4156
4162
  })
4157
4163
  );
4158
- return z.useEffect(() => {
4164
+ return j.useEffect(() => {
4159
4165
  o.setClient(t);
4160
- }, [t, o]), z.useEffect(() => {
4166
+ }, [t, o]), j.useEffect(() => {
4161
4167
  o.setOnClose(e.onClose ?? (() => {
4162
4168
  }));
4163
- }, [e.onClose, o]), z.useEffect(() => {
4169
+ }, [e.onClose, o]), j.useEffect(() => {
4164
4170
  o.setErrorTypes(s || []);
4165
- }, [s, o]), z.useEffect(() => (n.current && o.mount(n.current), () => {
4171
+ }, [s, o]), j.useEffect(() => (n.current && o.mount(n.current), () => {
4166
4172
  o.unmount();
4167
4173
  }), [o]), /* @__PURE__ */ l(
4168
4174
  "div",
@@ -4177,7 +4183,7 @@ var is = process.env.NODE_ENV !== "development" ? function() {
4177
4183
  return null;
4178
4184
  } : Yl;
4179
4185
  process.env.NODE_ENV;
4180
- const Xl = Ee(""), Zl = () => {
4186
+ const Zl = Ee(""), Xl = () => {
4181
4187
  tn("dynamic-page-selector", {
4182
4188
  description: "Dynamic page selector"
4183
4189
  }), tn("enable-add-page-dropdown", {
@@ -4186,15 +4192,15 @@ const Xl = Ee(""), Zl = () => {
4186
4192
  description: "Enable AI chat panel"
4187
4193
  });
4188
4194
  }, ec = () => {
4189
- const e = N(), t = I();
4195
+ const e = N(), t = L();
4190
4196
  return ae({
4191
4197
  queryKey: [E.GET_COLLECTIONS],
4192
4198
  staleTime: 1 / 0,
4193
4199
  queryFn: async () => t(e, { action: E.GET_COLLECTIONS })
4194
4200
  });
4195
4201
  }, tc = () => {
4196
- const { data: e } = ie(), { data: t } = be(), { data: n } = Re(), s = N(), r = I(), a = Q(() => (n == null ? void 0 : n.fallbackLang) || "en", [n == null ? void 0 : n.fallbackLang]);
4197
- return X({
4202
+ const { data: e } = ie(), { data: t } = be(), { data: n } = Re(), s = N(), r = L(), a = Q(() => (n == null ? void 0 : n.fallbackLang) || "en", [n == null ? void 0 : n.fallbackLang]);
4203
+ return Z({
4198
4204
  mutationFn: async ({ block: i }) => r(s, {
4199
4205
  action: E.GET_BLOCK_ASYNC_PROPS,
4200
4206
  data: {
@@ -4218,7 +4224,7 @@ const Xl = Ee(""), Zl = () => {
4218
4224
  });
4219
4225
  }, nc = () => {
4220
4226
  const [, e] = le();
4221
- return j(
4227
+ return z(
4222
4228
  (t, n) => {
4223
4229
  const r = new URLSearchParams(window.location.search).get("lang"), a = new URLSearchParams({ page: t });
4224
4230
  r && a.set("lang", r), window.history.pushState({}, "", `?${a.toString()}`), e(a), window.dispatchEvent(new PopStateEvent("popstate")), n == null || n();
@@ -4227,28 +4233,28 @@ const Xl = Ee(""), Zl = () => {
4227
4233
  );
4228
4234
  }, sc = () => {
4229
4235
  const e = nc();
4230
- return j(
4236
+ return z(
4231
4237
  ({ pageId: t }) => {
4232
4238
  e(t);
4233
4239
  },
4234
4240
  [e]
4235
4241
  );
4236
- }, rc = F(() => import("./digital-asset-manager-D_FFLECK.js")), ac = F(() => import("./save-to-lib-CccnzwO8.js")), ic = F(() => import("./theme-panel-footer-CHR7J97n.js")), oc = F(() => import("./web-preview-CJ6JyhJD.js"));
4237
- Zl();
4238
- Xa();
4242
+ }, rc = F(() => import("./digital-asset-manager-INrgGoC0.js")), ac = F(() => import("./save-to-lib-NvQZll63.js")), ic = F(() => import("./theme-panel-footer-BJB36k8A.js")), oc = F(() => import("./web-preview-CCGkTRU3.js"));
4243
+ Xl();
4244
+ Za();
4239
4245
  Jr(to);
4240
4246
  wo();
4241
- Xr(rc);
4242
- Zr(ac);
4247
+ Zr(rc);
4248
+ Xr(ac);
4243
4249
  const lc = {
4244
4250
  role: "",
4245
4251
  permissions: null
4246
4252
  }, os = (e) => {
4247
4253
  const { data: t } = lo();
4248
4254
  gi();
4249
- const n = Gn(), { data: s = lc, isFetching: r } = co(), { data: a, isFetching: i } = Ce(), { data: o, isFetching: c } = ec(), { data: u, isFetching: f } = Re(), d = r || i || c || f, [h] = le(), g = h.get("page"), { data: y } = ie(), { data: T, isFetching: _ } = ao(), { blocks: p } = ro(T), { lockingStatus: A, pageLock: P } = Ie(), { data: O, isFetching: M } = io(), L = no(), { onSave: pe } = uo(), { mutateAsync: ye } = tc(), { getPartialBlocks: B, getPartialBlockBlocks: w } = fo(), { mutateAsync: b } = Li(), { mutateAsync: Y } = oo(), $ = sc(), [de, bt] = K(!1), Ae = at([]), Be = Q(() => V(u, "theme", {}) || {}, [u]), Ne = he(A) && (P == null ? void 0 : P.status) === "editing", pr = (P == null ? void 0 : P.status) === "checking", Un = _ || pr || M;
4250
- Ae.current = p;
4251
- const [yr] = te(Xl);
4255
+ const n = Dn(), { data: s = lc, isFetching: r } = co(), { data: a, isFetching: i } = Le(), { data: o, isFetching: c } = ec(), { data: u, isFetching: d } = Re(), f = r || i || c || d, [h] = le(), g = h.get("page"), { data: p } = ie(), { data: S, isFetching: P } = ao(), { blocks: T } = ro(S), { lockingStatus: y, pageLock: A } = Ie(), { data: b, isFetching: B } = io(), k = no(), { onSave: pe } = uo(), { mutateAsync: ye } = tc(), { getPartialBlocks: M, getPartialBlockBlocks: w } = fo(), { mutateAsync: I } = Ni(), { mutateAsync: Y } = oo(), $ = sc(), [de, bt] = K(!1), Ae = at([]), Me = Q(() => V(u, "theme", {}) || {}, [u]), Ce = he(y) && (A == null ? void 0 : A.status) === "editing", pr = (A == null ? void 0 : A.status) === "checking", Rn = P || pr || B;
4256
+ Ae.current = T;
4257
+ const [yr] = te(Zl);
4252
4258
  se(() => {
4253
4259
  const ne = () => {
4254
4260
  document.hidden ? bt(!0) : bt(!1);
@@ -4258,12 +4264,12 @@ const lc = {
4258
4264
  const Ar = Q(() => {
4259
4265
  const ne = {};
4260
4266
  return s && (ne.permissions = V(s, "permissions", null), ne.role = V(s, "role", "user")), ne;
4261
- }, [s]), Tr = Q(() => t == null ? void 0 : t.some((ne) => ne.isSiteLibrary), [t]), Sr = j(
4262
- async (ne, It) => await b({ pageType: ne, query: It }),
4263
- [b]
4267
+ }, [s]), Tr = Q(() => t == null ? void 0 : t.some((ne) => ne.isSiteLibrary), [t]), Sr = z(
4268
+ async (ne, It) => await I({ pageType: ne, query: It }),
4269
+ [I]
4264
4270
  );
4265
4271
  return /* @__PURE__ */ m(ge, { children: [
4266
- Un && /* @__PURE__ */ l(Ns, { className: d ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ l(Ft, { className: `animate-spin text-primary ${d ? "h-6 w-6" : "h-5 w-5"}` }) }),
4272
+ Rn && /* @__PURE__ */ l(Cs, { className: f ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ l(Ft, { className: `animate-spin text-primary ${f ? "h-6 w-6" : "h-5 w-5"}` }) }),
4267
4273
  yr && /* @__PURE__ */ l(
4268
4274
  H,
4269
4275
  {
@@ -4278,38 +4284,38 @@ const lc = {
4278
4284
  gotoPage: $,
4279
4285
  collections: o ?? [],
4280
4286
  getBlockAsyncProps: ye,
4281
- pageExternalData: O,
4287
+ pageExternalData: b,
4282
4288
  themePresets: e.themePresets ?? [],
4283
- pageId: y == null ? void 0 : y.id,
4284
- loading: _,
4289
+ pageId: p == null ? void 0 : p.id,
4290
+ loading: P,
4285
4291
  fallbackLang: n,
4286
4292
  languages: (u == null ? void 0 : u.languages) || [],
4287
4293
  brandingOptions: (u == null ? void 0 : u.theme) || {},
4288
4294
  translations: e.translations || {},
4289
4295
  locale: e.locale || "en",
4290
4296
  htmlDir: e.htmlDir || "ltr",
4291
- autoSave: !de && Ne && (e.autoSave ?? !0),
4297
+ autoSave: !de && Ce && (e.autoSave ?? !0),
4292
4298
  autoSaveInterval: e.autoSaveInterval ?? 15,
4293
4299
  onError: e.onError || console.error,
4294
4300
  getPartialBlockBlocks: w,
4295
- getPartialBlocks: B,
4296
- blocks: _ ? [] : p,
4297
- theme: Br(Be),
4301
+ getPartialBlocks: M,
4302
+ blocks: P ? [] : T,
4303
+ theme: Mr(Me),
4298
4304
  pageTypes: a,
4299
4305
  searchPageTypeItems: Sr,
4300
- askAiCallBack: L,
4306
+ askAiCallBack: k,
4301
4307
  onSave: async ({ blocks: ne, theme: It, needTranslations: _r }) => {
4302
4308
  if (!g) return !0;
4303
4309
  Ae.current = ne;
4304
- const Bn = [...ne];
4305
- return await pe({ page: g, blocks: Bn, needTranslations: _r }), Ae.current = Bn, Mr(It, Be) || await Y({ settings: { theme: It } }), !0;
4310
+ const Un = [...ne];
4311
+ return await pe({ page: g, blocks: Un, needTranslations: _r }), Ae.current = Un, Br(It, Me) || await Y({ settings: { theme: It } }), !0;
4306
4312
  },
4307
4313
  themePanelComponent: ic,
4308
4314
  ...Ar
4309
4315
  }
4310
4316
  ),
4311
4317
  /* @__PURE__ */ m("div", { children: [
4312
- /* @__PURE__ */ l(yi, { isFetchingPage: Un }),
4318
+ /* @__PURE__ */ l(yi, { isFetchingPage: Rn }),
4313
4319
  /* @__PURE__ */ l(Ai, {})
4314
4320
  ] })
4315
4321
  ] });
@@ -4322,9 +4328,9 @@ const lc = {
4322
4328
  }
4323
4329
  }
4324
4330
  }), Pu = (e) => {
4325
- const [, t] = Nn(), [n, s] = K(!1);
4331
+ const [, t] = Ln(), [n, s] = K(!1);
4326
4332
  return se(() => (t(
4327
- wn(e, [
4333
+ vn(e, [
4328
4334
  "apiUrl",
4329
4335
  "usersApiUrl",
4330
4336
  "assetsApiUrl",
@@ -4349,11 +4355,11 @@ const lc = {
4349
4355
  /* @__PURE__ */ l(os, { ...e }),
4350
4356
  /* @__PURE__ */ l(is, {})
4351
4357
  ] }) : /* @__PURE__ */ l("div", {});
4352
- }, uc = z.lazy(() => import("./nested-path-selector-content-DvIL_EoN.js"));
4358
+ }, uc = j.lazy(() => import("./nested-path-selector-content-DvIL_EoN.js"));
4353
4359
  function dc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
4354
- const [r, a] = z.useState(!1);
4360
+ const [r, a] = j.useState(!1);
4355
4361
  return /* @__PURE__ */ m(ya, { open: r, onOpenChange: a, children: [
4356
- /* @__PURE__ */ m(zt, { children: [
4362
+ /* @__PURE__ */ m(jt, { children: [
4357
4363
  /* @__PURE__ */ l(Wt, { asChild: !0, children: /* @__PURE__ */ l(Aa, { asChild: !0, children: /* @__PURE__ */ l(
4358
4364
  U,
4359
4365
  {
@@ -4377,7 +4383,7 @@ function dc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
4377
4383
  ) }) }),
4378
4384
  /* @__PURE__ */ l(Yt, { children: "Add field" })
4379
4385
  ] }),
4380
- r && /* @__PURE__ */ l(z.Suspense, { children: /* @__PURE__ */ l(
4386
+ r && /* @__PURE__ */ l(j.Suspense, { children: /* @__PURE__ */ l(
4381
4387
  uc,
4382
4388
  {
4383
4389
  data: e,
@@ -4390,18 +4396,18 @@ function dc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
4390
4396
  ] });
4391
4397
  }
4392
4398
  const vu = () => {
4393
- const { savePageAsync: e } = Ge(), t = W();
4394
- return j(async () => {
4399
+ const { savePageAsync: e } = xe(), t = W();
4400
+ return z(async () => {
4395
4401
  await e(), t.invalidateQueries({ queryKey: [E.GET_DRAFT_PAGE] }), t.invalidateQueries({ queryKey: [E.GET_BUILDER_PAGE_DATA] });
4396
4402
  }, [e, t]);
4397
4403
  }, wu = () => {
4398
4404
  const e = W();
4399
- return j(() => {
4405
+ return z(() => {
4400
4406
  e.clear();
4401
4407
  }, [e]);
4402
4408
  }, bu = () => {
4403
- const e = N(), t = I(), { data: n } = be(), s = W();
4404
- return X({
4409
+ const e = N(), t = L(), { data: n } = be(), s = W();
4410
+ return Z({
4405
4411
  mutationFn: async (r) => {
4406
4412
  if (!(n != null && n.id))
4407
4413
  throw new Error("No active page found");
@@ -4424,7 +4430,7 @@ const vu = () => {
4424
4430
  console.error("Failed to update metadata");
4425
4431
  }
4426
4432
  });
4427
- }, fc = F(() => import("./digital-asset-manager-D_FFLECK.js")), Iu = ({
4433
+ }, fc = F(() => import("./digital-asset-manager-INrgGoC0.js")), Iu = ({
4428
4434
  assetId: e,
4429
4435
  assetUrl: t,
4430
4436
  onChange: n,
@@ -4432,13 +4438,13 @@ const vu = () => {
4432
4438
  placeholder: r = "Select an image",
4433
4439
  disabled: a = !1
4434
4440
  }) => {
4435
- const { t: i } = we(), [o, c] = K(!1), u = () => {
4441
+ const { t: i } = _e(), [o, c] = K(!1), u = () => {
4436
4442
  a || c(!0);
4437
- }, f = () => {
4443
+ }, d = () => {
4438
4444
  c(!1);
4439
- }, d = (y) => {
4440
- const T = Array.isArray(y) ? y[0] : y;
4441
- T != null && T.url && n(wn(T, ["url", "id"])), c(!1);
4445
+ }, f = (p) => {
4446
+ const S = Array.isArray(p) ? p[0] : p;
4447
+ S != null && S.url && n(vn(S, ["url", "id"])), c(!1);
4442
4448
  }, h = () => {
4443
4449
  n({ url: "", id: "" });
4444
4450
  }, g = (t == null ? void 0 : t.startsWith("{{")) && (t == null ? void 0 : t.endsWith("}}"));
@@ -4463,7 +4469,7 @@ const vu = () => {
4463
4469
  className: "h-8 w-8 rounded-full bg-white text-red-500",
4464
4470
  onClick: h,
4465
4471
  disabled: a,
4466
- children: g ? /* @__PURE__ */ l(zn, { className: "h-4 w-4" }) : /* @__PURE__ */ l(Ha, { className: "h-4 w-4" })
4472
+ children: g ? /* @__PURE__ */ l(jn, { className: "h-4 w-4" }) : /* @__PURE__ */ l(Ha, { className: "h-4 w-4" })
4467
4473
  }
4468
4474
  ),
4469
4475
  !g && /* @__PURE__ */ l(
@@ -4500,29 +4506,29 @@ const vu = () => {
4500
4506
  variant: "ghost",
4501
4507
  size: "icon",
4502
4508
  className: "absolute right-4 top-2",
4503
- onClick: f,
4504
- children: /* @__PURE__ */ l(zn, { className: "h-4 w-4" })
4509
+ onClick: d,
4510
+ children: /* @__PURE__ */ l(jn, { className: "h-4 w-4" })
4505
4511
  }
4506
4512
  )
4507
4513
  ] }),
4508
4514
  /* @__PURE__ */ l("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
4509
4515
  fc,
4510
4516
  {
4511
- close: f,
4512
- onSelect: d,
4517
+ close: d,
4518
+ onSelect: f,
4513
4519
  mode: "image",
4514
4520
  assetId: e
4515
4521
  }
4516
4522
  ) }) })
4517
4523
  ] }) })
4518
4524
  ] });
4519
- }, hc = qr(null), hn = {
4525
+ }, hc = qr(null), fn = {
4520
4526
  didCatch: !1,
4521
4527
  error: null
4522
4528
  };
4523
4529
  class gc extends Kr {
4524
4530
  constructor(t) {
4525
- super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = hn;
4531
+ super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = fn;
4526
4532
  }
4527
4533
  static getDerivedStateFromError(t) {
4528
4534
  return {
@@ -4540,7 +4546,7 @@ class gc extends Kr {
4540
4546
  (n = (s = this.props).onReset) === null || n === void 0 || n.call(s, {
4541
4547
  args: a,
4542
4548
  reason: "imperative-api"
4543
- }), this.setState(hn);
4549
+ }), this.setState(fn);
4544
4550
  }
4545
4551
  }
4546
4552
  componentDidCatch(t, n) {
@@ -4559,7 +4565,7 @@ class gc extends Kr {
4559
4565
  next: r,
4560
4566
  prev: t.resetKeys,
4561
4567
  reason: "keys"
4562
- }), this.setState(hn);
4568
+ }), this.setState(fn);
4563
4569
  }
4564
4570
  }
4565
4571
  render() {
@@ -4581,13 +4587,13 @@ class gc extends Kr {
4581
4587
  if (typeof n == "function")
4582
4588
  o = n(c);
4583
4589
  else if (s)
4584
- o = Kn(s, c);
4590
+ o = qn(s, c);
4585
4591
  else if (r !== void 0)
4586
4592
  o = r;
4587
4593
  else
4588
4594
  throw i;
4589
4595
  }
4590
- return Kn(hc.Provider, {
4596
+ return qn(hc.Provider, {
4591
4597
  value: {
4592
4598
  didCatch: a,
4593
4599
  error: i,
@@ -4617,11 +4623,11 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
4617
4623
  return { isValid: !0, parsed: JSON.parse(s), error: null, placeholders: n };
4618
4624
  } catch (a) {
4619
4625
  const i = a, o = i.message.match(/position (\d+)/), c = o ? parseInt(o[1]) : void 0;
4620
- let u, f;
4626
+ let u, d;
4621
4627
  if (c !== void 0) {
4622
- const d = s.substring(0, c).split(`
4628
+ const f = s.substring(0, c).split(`
4623
4629
  `);
4624
- u = d.length, f = d[d.length - 1].length + 1;
4630
+ u = f.length, d = f[f.length - 1].length + 1;
4625
4631
  }
4626
4632
  return {
4627
4633
  isValid: !1,
@@ -4630,7 +4636,7 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
4630
4636
  error: {
4631
4637
  message: i.message,
4632
4638
  line: u,
4633
- column: f,
4639
+ column: d,
4634
4640
  position: c
4635
4641
  }
4636
4642
  };
@@ -4651,7 +4657,7 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
4651
4657
  n = n.replace(r[0], i);
4652
4658
  }
4653
4659
  return n;
4654
- }, Ac = F(() => import("./shared-json-ld-DGW40Ccy.js")), Cu = ({
4660
+ }, Ac = F(() => import("./shared-json-ld-BVqIgANo.js")), Lu = ({
4655
4661
  value: e,
4656
4662
  onChange: t,
4657
4663
  disabled: n = !1,
@@ -4662,65 +4668,65 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
4662
4668
  pageData: o = {},
4663
4669
  handleFieldInsert: c,
4664
4670
  hasJsonLdForSelectedLang: u,
4665
- copyJsonLDFromDefaultPage: f
4671
+ copyJsonLDFromDefaultPage: d
4666
4672
  }) => {
4667
- const [d, h] = K("edit"), [g, y] = K(null), [T, _] = K(""), p = at(null), [A] = Nn(), P = i === "jsonLD" && V(A, "features.sharedJsonLD", !1), O = i === "jsonLD" && !u && !!f;
4673
+ const [f, h] = K("edit"), [g, p] = K(null), [S, P] = K(""), T = at(null), [y] = Ln(), A = i === "jsonLD" && V(y, "features.sharedJsonLD", !1), b = i === "jsonLD" && !u && !!d;
4668
4674
  se(() => {
4669
4675
  e.trim() === "" && t("{}");
4670
4676
  }, [e, t]);
4671
- const M = (B) => {
4677
+ const B = (M) => {
4672
4678
  if (s) return;
4673
- const w = B.target.value;
4679
+ const w = M.target.value;
4674
4680
  t(w);
4675
- }, L = (B) => {
4676
- if (B.key === "Tab") {
4677
- B.preventDefault();
4678
- const w = B.currentTarget, b = w.selectionStart, Y = w.selectionEnd;
4679
- if (b !== Y) {
4680
- const de = e.substring(b, Y).split(`
4681
+ }, k = (M) => {
4682
+ if (M.key === "Tab") {
4683
+ M.preventDefault();
4684
+ const w = M.currentTarget, I = w.selectionStart, Y = w.selectionEnd;
4685
+ if (I !== Y) {
4686
+ const de = e.substring(I, Y).split(`
4681
4687
  `);
4682
- if (B.shiftKey) {
4683
- const Ae = de.map((Ne) => Ne.startsWith(" ") ? Ne.substring(2) : Ne).join(`
4684
- `), Be = e.substring(0, b) + Ae + e.substring(Y);
4685
- t(Be), setTimeout(() => {
4686
- w.selectionStart = b, w.selectionEnd = b + Ae.length;
4688
+ if (M.shiftKey) {
4689
+ const Ae = de.map((Ce) => Ce.startsWith(" ") ? Ce.substring(2) : Ce).join(`
4690
+ `), Me = e.substring(0, I) + Ae + e.substring(Y);
4691
+ t(Me), setTimeout(() => {
4692
+ w.selectionStart = I, w.selectionEnd = I + Ae.length;
4687
4693
  }, 0);
4688
4694
  } else {
4689
- const Ae = de.map((Ne) => ` ${Ne}`).join(`
4690
- `), Be = e.substring(0, b) + Ae + e.substring(Y);
4691
- t(Be), setTimeout(() => {
4692
- w.selectionStart = b, w.selectionEnd = b + Ae.length;
4695
+ const Ae = de.map((Ce) => ` ${Ce}`).join(`
4696
+ `), Me = e.substring(0, I) + Ae + e.substring(Y);
4697
+ t(Me), setTimeout(() => {
4698
+ w.selectionStart = I, w.selectionEnd = I + Ae.length;
4693
4699
  }, 0);
4694
4700
  }
4695
4701
  } else {
4696
- const $ = e.substring(0, b) + " " + e.substring(Y);
4702
+ const $ = e.substring(0, I) + " " + e.substring(Y);
4697
4703
  t($), setTimeout(() => {
4698
- w.selectionStart = w.selectionEnd = b + 2;
4704
+ w.selectionStart = w.selectionEnd = I + 2;
4699
4705
  }, 0);
4700
4706
  }
4701
4707
  }
4702
4708
  };
4703
4709
  se(() => {
4704
- const B = ls(e);
4705
- if (B.isValid)
4706
- if (y(null), B.parsed) {
4707
- const w = yc(B.parsed, o);
4708
- _(w);
4710
+ const M = ls(e);
4711
+ if (M.isValid)
4712
+ if (p(null), M.parsed) {
4713
+ const w = yc(M.parsed, o);
4714
+ P(w);
4709
4715
  } else
4710
- _("");
4716
+ P("");
4711
4717
  else
4712
- y(B.error), _("");
4718
+ p(M.error), P("");
4713
4719
  }, [e, o]);
4714
4720
  const pe = () => {
4715
- const B = ls(e);
4716
- if (B.isValid && B.parsed) {
4717
- const w = pc(B.parsed, B.placeholders);
4721
+ const M = ls(e);
4722
+ if (M.isValid && M.parsed) {
4723
+ const w = pc(M.parsed, M.placeholders);
4718
4724
  t(w);
4719
4725
  }
4720
4726
  }, ye = () => {
4721
- g != null && g.position && p.current && (p.current.focus(), p.current.setSelectionRange(g.position, g.position + 1));
4727
+ g != null && g.position && T.current && (T.current.focus(), T.current.setSelectionRange(g.position, g.position + 1));
4722
4728
  };
4723
- return /* @__PURE__ */ l(gc, { fallback: /* @__PURE__ */ l("div", { children: "Some error" }), children: /* @__PURE__ */ l("div", { className: "space-y-2", children: /* @__PURE__ */ m(Pa, { value: d, onValueChange: h, className: "w-full", children: [
4729
+ return /* @__PURE__ */ l(gc, { fallback: /* @__PURE__ */ l("div", { children: "Some error" }), children: /* @__PURE__ */ l("div", { className: "space-y-2", children: /* @__PURE__ */ m(Pa, { value: f, onValueChange: h, className: "w-full", children: [
4724
4730
  /* @__PURE__ */ m("div", { className: "mb-2 flex items-center justify-between", children: [
4725
4731
  /* @__PURE__ */ m(va, { className: "w-max", children: [
4726
4732
  /* @__PURE__ */ m(nn, { value: "edit", className: "flex items-center gap-1", children: [
@@ -4732,37 +4738,37 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
4732
4738
  {
4733
4739
  value: "preview",
4734
4740
  className: "flex items-center gap-1",
4735
- disabled: !e.trim() || g !== null || O,
4741
+ disabled: !e.trim() || g !== null || b,
4736
4742
  children: [
4737
4743
  /* @__PURE__ */ l($a, { className: "h-4 w-4" }),
4738
4744
  /* @__PURE__ */ l("span", { children: "Preview" })
4739
4745
  ]
4740
4746
  }
4741
4747
  ),
4742
- P && /* @__PURE__ */ m(
4748
+ A && /* @__PURE__ */ m(
4743
4749
  nn,
4744
4750
  {
4745
4751
  value: "shared",
4746
4752
  className: "flex items-center gap-1",
4747
4753
  disabled: !e.trim() || g !== null,
4748
4754
  children: [
4749
- /* @__PURE__ */ l(ja, { className: "h-4 w-4" }),
4755
+ /* @__PURE__ */ l(za, { className: "h-4 w-4" }),
4750
4756
  /* @__PURE__ */ l("span", { children: "Shared" })
4751
4757
  ]
4752
4758
  }
4753
4759
  )
4754
4760
  ] }),
4755
- O ? null : d === "edit" && !s && /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ l(
4761
+ b ? null : f === "edit" && !s && /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ l(
4756
4762
  dc,
4757
4763
  {
4758
4764
  dataType: "value",
4759
4765
  data: o ?? {},
4760
- onSelect: (B) => c && c(B, i)
4766
+ onSelect: (M) => c && c(M, i)
4761
4767
  }
4762
4768
  ) })
4763
4769
  ] }),
4764
4770
  /* @__PURE__ */ m(sn, { value: "edit", className: "relative mt-0", children: [
4765
- !O && d === "edit" && /* @__PURE__ */ l(xn, { content: "Format JSON", side: "right", showTooltip: !n && !g, children: /* @__PURE__ */ l(
4771
+ !b && f === "edit" && /* @__PURE__ */ l(xn, { content: "Format JSON", side: "right", showTooltip: !n && !g, children: /* @__PURE__ */ l(
4766
4772
  U,
4767
4773
  {
4768
4774
  type: "button",
@@ -4771,24 +4777,24 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
4771
4777
  onClick: pe,
4772
4778
  className: "absolute right-1 top-1 h-6 w-6 p-1",
4773
4779
  disabled: !e.trim() || n || g !== null,
4774
- children: /* @__PURE__ */ l(za, {})
4780
+ children: /* @__PURE__ */ l(ja, {})
4775
4781
  }
4776
4782
  ) }),
4777
- O ? /* @__PURE__ */ l("div", { className: "flex h-40 items-center justify-center rounded-md bg-black/20", children: /* @__PURE__ */ m("div", { className: "flex max-w-[400px] flex-col items-center gap-2 rounded-md bg-white p-4 shadow-lg", children: [
4783
+ b ? /* @__PURE__ */ l("div", { className: "flex h-40 items-center justify-center rounded-md bg-black/20", children: /* @__PURE__ */ m("div", { className: "flex max-w-[400px] flex-col items-center gap-2 rounded-md bg-white p-4 shadow-lg", children: [
4778
4784
  /* @__PURE__ */ l("div", { className: "max-w-xl text-center text-xs text-gray-500", children: "JSON-LD for is not added for selected language. JSON LD will be used from default language." }),
4779
- /* @__PURE__ */ m(U, { type: "button", variant: "default", size: "sm", onClick: f, children: [
4785
+ /* @__PURE__ */ m(U, { type: "button", variant: "default", size: "sm", onClick: d, children: [
4780
4786
  /* @__PURE__ */ l(Ts, {}),
4781
4787
  "Copy & Edit from default language"
4782
4788
  ] })
4783
4789
  ] }) }) : /* @__PURE__ */ l(
4784
- Vn,
4790
+ Kn,
4785
4791
  {
4786
- ref: p,
4792
+ ref: T,
4787
4793
  id: i,
4788
4794
  name: i,
4789
4795
  className: `rounded-md border border-input text-xs ${g ? "border-red-500" : ""}`,
4790
- onChange: M,
4791
- onKeyDown: L,
4796
+ onChange: B,
4797
+ onKeyDown: k,
4792
4798
  value: e,
4793
4799
  placeholder: r,
4794
4800
  rows: a,
@@ -4822,10 +4828,10 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
4822
4828
  ] })
4823
4829
  ] }),
4824
4830
  /* @__PURE__ */ m(sn, { value: "preview", className: "mt-0", children: [
4825
- /* @__PURE__ */ l(Vn, { rows: a, value: T, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
4831
+ /* @__PURE__ */ l(Kn, { rows: a, value: S, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
4826
4832
  /* @__PURE__ */ l("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
4827
4833
  ] }),
4828
- P && /* @__PURE__ */ l(sn, { value: "shared", className: "mt-0", children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Ac, {}) }) })
4834
+ A && /* @__PURE__ */ l(sn, { value: "shared", className: "mt-0", children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Ac, {}) }) })
4829
4835
  ] }) }) });
4830
4836
  };
4831
4837
  if (typeof window > "u")
@@ -4833,17 +4839,17 @@ if (typeof window > "u")
4833
4839
  export {
4834
4840
  yu as $,
4835
4841
  E as A,
4836
- Ns as B,
4842
+ Cs as B,
4837
4843
  Fs as C,
4838
- zs as D,
4844
+ js as D,
4839
4845
  Ko as E,
4840
- Zc as F,
4846
+ Xc as F,
4841
4847
  eu as G,
4842
4848
  De as H,
4843
- yn as I,
4849
+ pn as I,
4844
4850
  tu as J,
4845
4851
  Yc as K,
4846
- Lt as L,
4852
+ Nt as L,
4847
4853
  ou as M,
4848
4854
  lt as N,
4849
4855
  du as O,
@@ -4853,7 +4859,7 @@ export {
4853
4859
  ru as S,
4854
4860
  xn as T,
4855
4861
  ll as U,
4856
- An as V,
4862
+ yn as V,
4857
4863
  sl as W,
4858
4864
  mu as X,
4859
4865
  Eu as Y,
@@ -4863,23 +4869,23 @@ export {
4863
4869
  nu as a0,
4864
4870
  Wc as a1,
4865
4871
  cu as a2,
4866
- Z as a3,
4867
- Co as a4,
4872
+ X as a3,
4873
+ Lo as a4,
4868
4874
  Hl as a5,
4869
4875
  su as a6,
4870
- Gt as a7,
4876
+ xt as a7,
4871
4877
  Su as a8,
4872
4878
  gu as a9,
4873
4879
  Hc as aA,
4874
- jc as aB,
4875
- zc as aC,
4880
+ zc as aB,
4881
+ jc as aC,
4876
4882
  Qc as aD,
4877
4883
  Vi as aE,
4878
- xc as aF,
4884
+ Gc as aF,
4879
4885
  ws as aG,
4880
4886
  io as aH,
4881
- Ni as aI,
4882
- Nn as aJ,
4887
+ Ci as aI,
4888
+ Ln as aJ,
4883
4889
  dc as aK,
4884
4890
  Iu as aL,
4885
4891
  Oc as aM,
@@ -4900,46 +4906,46 @@ export {
4900
4906
  fu as ae,
4901
4907
  iu as af,
4902
4908
  au as ag,
4903
- xt as ah,
4904
- Xc as ai,
4909
+ Gt as ah,
4910
+ Zc as ai,
4905
4911
  Pi as aj,
4906
4912
  ui as ak,
4907
4913
  mi as al,
4908
4914
  N as am,
4909
- I as an,
4915
+ L as an,
4910
4916
  nc as ao,
4911
4917
  Kc as ap,
4912
- Dn as aq,
4918
+ On as aq,
4913
4919
  ie as ar,
4914
- on as as,
4920
+ an as as,
4915
4921
  ce as at,
4916
- kn as au,
4917
- Gc as av,
4922
+ Nn as au,
4923
+ xc as av,
4918
4924
  Vc as aw,
4919
4925
  $c as ax,
4920
- Cu as ay,
4926
+ Lu as ay,
4921
4927
  ls as az,
4922
4928
  bs as b,
4923
4929
  Rc as c,
4924
4930
  Uc as d,
4925
4931
  Re as e,
4926
- Gn as f,
4927
- xe as g,
4928
- Ce as h,
4932
+ Dn as f,
4933
+ Ge as g,
4934
+ Le as h,
4929
4935
  le as i,
4930
4936
  Ps as j,
4931
4937
  ai as k,
4932
- Mc as l,
4933
- Bc as m,
4938
+ Bc as l,
4939
+ Mc as m,
4934
4940
  Fc as n,
4935
4941
  qc as o,
4936
- Xl as p,
4942
+ Zl as p,
4937
4943
  Dc as q,
4938
4944
  _u as r,
4939
4945
  J as s,
4940
- ln as t,
4941
- Cs as u,
4942
- js as v,
4946
+ on as t,
4947
+ Ls as u,
4948
+ zs as v,
4943
4949
  Au as w,
4944
4950
  Tu as x,
4945
4951
  q as y,