@chaibuilder/pages 0.14.1 → 0.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{2AITGKQY-PHs1xUsz.cjs → 2AITGKQY-DWDDkd18.cjs} +1 -1
- package/dist/{2AITGKQY-Cti4x7QE.js → 2AITGKQY-DtQPkxBe.js} +2 -2
- package/dist/{NCMVHL6D-BChQ0wDN.cjs → NCMVHL6D-6CkVnw0a.cjs} +1 -1
- package/dist/{NCMVHL6D-fAWarBw8.js → NCMVHL6D-CksZXXOw.js} +2 -2
- package/dist/{ZDWCUMSJ-DRWuu_nE.js → ZDWCUMSJ-BXQ01VPt.js} +1 -1
- package/dist/{ZDWCUMSJ-CwWfQqyn.cjs → ZDWCUMSJ-DoM-AA0C.cjs} +1 -1
- package/dist/{add-new-language-page-Dt9DWunK.cjs → add-new-language-page-BA73lQnm.cjs} +1 -1
- package/dist/{add-new-language-page-CcBqDtYv.js → add-new-language-page-D8iXtyLA.js} +2 -2
- package/dist/{add-new-page-CTUiEKzv.js → add-new-page-DESlqvED.js} +1 -1
- package/dist/{add-new-page-BN3z9rSq.cjs → add-new-page-EOMgMSeq.cjs} +1 -1
- package/dist/{delete-page-8MnGZ_mz.js → delete-page-BP1Df8QL.js} +1 -1
- package/dist/{delete-page-jELwTpGY.cjs → delete-page-ZvnuEow6.cjs} +1 -1
- package/dist/{digital-asset-manager-BJhwyEdT.js → digital-asset-manager-Bb81T3mS.js} +1 -1
- package/dist/{digital-asset-manager-ZyQJP6AO.cjs → digital-asset-manager-BxWb1j_y.cjs} +1 -1
- package/dist/{duplicate-page-BGYZLkco.js → duplicate-page-B1j0H7gP.js} +2 -2
- package/dist/{duplicate-page-BRjKFpBP.cjs → duplicate-page-W5xbmPSC.cjs} +1 -1
- package/dist/{dynamic-page-selector-CR-ZpSJ8.cjs → dynamic-page-selector-BZKJmSx5.cjs} +1 -1
- package/dist/{dynamic-page-selector-CrbujoYg.js → dynamic-page-selector-Crjyco6l.js} +1 -1
- package/dist/{index-Byi6-4u1.js → index-DFvsMFVH.js} +600 -604
- package/dist/index-Qnh8Lkr0.cjs +5 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{json-diff-viewer-De2bStRw.js → json-diff-viewer-BGGSLqtx.js} +1 -1
- package/dist/{json-diff-viewer-DKlC7yl6.cjs → json-diff-viewer-DRkE-x_z.cjs} +1 -1
- package/dist/{lang-panel-B3bC1gKq.cjs → lang-panel-9T8dIx2p.cjs} +1 -1
- package/dist/{lang-panel-G7RoMOP7.js → lang-panel-B3tr2uhr.js} +2 -2
- package/dist/{mark-as-template-OgR8I38n.cjs → mark-as-template-DPVPRgbi.cjs} +1 -1
- package/dist/{mark-as-template-B1TpGPms.js → mark-as-template-L9cHzL84.js} +1 -1
- package/dist/{no-language-page-content-iZo2ztXp.cjs → no-language-page-content-Cy_D-3jE.cjs} +1 -1
- package/dist/{no-language-page-content-CqH4FMNy.js → no-language-page-content-DP7gmy0s.js} +1 -1
- package/dist/{page-creator-Chnj3W4j.js → page-creator-Ctn5ixJE.js} +2 -2
- package/dist/{page-creator-DUXzx-zg.cjs → page-creator-DDaI1HYj.cjs} +1 -1
- package/dist/{page-lock-request-D3gmV8Yq.cjs → page-lock-request-BKrxnEtQ.cjs} +1 -1
- package/dist/{page-lock-request-Dc-JkLEZ.js → page-lock-request-CjJFJKL2.js} +1 -1
- package/dist/{page-locked-by-dialog-DC8UKy9e.js → page-locked-by-dialog-DmsSmAY2.js} +1 -1
- package/dist/{page-locked-by-dialog-B9pGi6zb.cjs → page-locked-by-dialog-b25_rn2m.cjs} +1 -1
- package/dist/{page-manager-new-CFtYUNbS.cjs → page-manager-new-DiZVY7Me.cjs} +1 -1
- package/dist/{page-manager-new-DYYWpxWy.js → page-manager-new-EsIg6iQn.js} +3 -3
- package/dist/{page-manager-search-and-filter-B4xo9IJO.js → page-manager-search-and-filter-Bt4T_dnB.js} +2 -2
- package/dist/{page-manager-search-and-filter-DT9V9AoS.cjs → page-manager-search-and-filter-CgY2qiXU.cjs} +1 -1
- package/dist/{page-revisions-content-KJGhm9Pl.js → page-revisions-content-CsT6aF2I.js} +2 -2
- package/dist/{page-revisions-content-BjIECUPY.cjs → page-revisions-content-DtI8CmtR.cjs} +1 -1
- package/dist/{publish-pages-content-CTduLNtg.cjs → publish-pages-content-DpC7RcTw.cjs} +1 -1
- package/dist/{publish-pages-content-BWLQZGjd.js → publish-pages-content-KAuhOPv0.js} +2 -2
- package/dist/{save-to-lib-CsrSeusU.cjs → save-to-lib-BGpWGHJo.cjs} +1 -1
- package/dist/{save-to-lib-B07GbG4I.js → save-to-lib-CeWaSQdB.js} +1 -1
- package/dist/{seo-panel-B20DCgo0.js → seo-panel-Dhhpe_7z.js} +1 -1
- package/dist/{seo-panel-QphuqXT2.cjs → seo-panel-JDQ_7bOx.cjs} +1 -1
- package/dist/{shared-json-ld-C_vIO-Qk.cjs → shared-json-ld-BYbdMttx.cjs} +1 -1
- package/dist/{shared-json-ld-CkOQRUEw.js → shared-json-ld-BliIbNv9.js} +1 -1
- package/dist/{slug-input-71BuN79c.cjs → slug-input-QxBMijHP.cjs} +1 -1
- package/dist/{slug-input-rAe3mMkd.js → slug-input-hJdU8DaF.js} +1 -1
- package/dist/{theme-panel-footer-DHRs6ag2.cjs → theme-panel-footer-BZnPvTkM.cjs} +1 -1
- package/dist/{theme-panel-footer-DFUfCqKP.js → theme-panel-footer-D2B7iYW2.js} +1 -1
- package/dist/{unmark-as-template-Cx0CqrpM.cjs → unmark-as-template-Byn2RRAp.cjs} +1 -1
- package/dist/{unmark-as-template-_VyWoVNk.js → unmark-as-template-Dcpkj7EZ.js} +1 -1
- package/dist/{unpublish-page-D3NM8b3u.cjs → unpublish-page-5Fi1wKXb.cjs} +1 -1
- package/dist/{unpublish-page-CuSJRr5c.js → unpublish-page-CPLlsfm4.js} +1 -1
- package/dist/{use-page-expand-manager-_msrWd0a.js → use-page-expand-manager-DkyBiNpx.js} +1 -1
- package/dist/{use-page-expand-manager-MjYZ3CDZ.cjs → use-page-expand-manager-To-SsGy3.cjs} +1 -1
- package/dist/{web-preview-CI3Vz7Yp.cjs → web-preview-CVvxe5Ll.cjs} +1 -1
- package/dist/{web-preview-BL-vsgoa.js → web-preview-YuuoRaZn.js} +1 -1
- package/package.json +3 -3
- package/dist/index-DSUpSpeI.cjs +0 -5
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Lr = Object.defineProperty;
|
|
2
2
|
var qn = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var ve = (e, t, n) =>
|
|
5
|
+
var kr = (e, t, n) => t in e ? Lr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var ve = (e, t, n) => kr(e, typeof t != "symbol" ? t + "" : t, n), Kn = (e, t, n) => t.has(e) || qn("Cannot " + n);
|
|
7
7
|
var _ = (e, t, n) => (Kn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), L = (e, t, n) => t.has(e) ? qn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), C = (e, t, n, s) => (Kn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
8
8
|
import { jsx as c, jsxs as m, Fragment as he } from "react/jsx-runtime";
|
|
9
|
-
import { get as H, has as Y, reverse as
|
|
9
|
+
import { get as H, has as Y, reverse as Dr, sortBy as xr, each as Gr, find as ae, isEmpty as me, groupBy as Or, minBy as Rr, noop as As, keyBy as Ur, map as Kt, compact as Ts, upperCase as Vn, filter as Ss, includes as Br, pick as In, keys as Mr, pickBy as Fr, endsWith as qr, isArray as Kr, startCase as Vr, isFunction as Hr, cloneDeep as $r, isEqual as Qr } from "lodash-es";
|
|
10
10
|
import * as j from "react";
|
|
11
|
-
import
|
|
12
|
-
import { atom as pe, useAtom as
|
|
13
|
-
import { useMutation as se, useQuery as ie, useQueryClient as ee, onlineManager as _s, QueryClient as Wr, QueryClientProvider as
|
|
14
|
-
import { useLanguages as Re, useSavePage as Oe, mergeClasses as Vt, usePermissions as Ps, PERMISSIONS as
|
|
15
|
-
import { toast as
|
|
16
|
-
import { Tooltip as Yt, TooltipTrigger as Jt, Button as M, TooltipContent as Xt, Sheet as ws, SheetContent as vs, SheetHeader as
|
|
17
|
-
import { LogsIcon as
|
|
18
|
-
import { useRegisteredChaiBlocks as
|
|
11
|
+
import jr, { useMemo as $, useCallback as q, useState as G, useEffect as re, useRef as ct, lazy as K, Suspense as V } from "react";
|
|
12
|
+
import { atom as pe, useAtom as ne } from "jotai";
|
|
13
|
+
import { useMutation as se, useQuery as ie, useQueryClient as ee, onlineManager as _s, QueryClient as Wr, QueryClientProvider as zr } from "@tanstack/react-query";
|
|
14
|
+
import { useLanguages as Re, useSavePage as Oe, mergeClasses as Vt, usePermissions as Ps, PERMISSIONS as Yr, useRightPanel as Jr, useChaiFeatureFlag as Xr, useIsPageLoaded as Zr, registerChaiLibrary as ea, getBlocksFromHTML as ta, registerChaiSidebarPanel as rn, registerChaiFeatureFlag as Hn, registerChaiTopBar as na, registerChaiMediaManager as sa, registerChaiSaveToLibrary as ra, ChaiBuilderEditor as aa } from "@chaibuilder/sdk";
|
|
15
|
+
import { toast as W } from "sonner";
|
|
16
|
+
import { Tooltip as Yt, TooltipTrigger as Jt, Button as M, TooltipContent as Xt, Sheet as ws, SheetContent as vs, SheetHeader as ia, SheetTitle as oa, SheetDescription as la, DropdownMenu as Nn, DropdownMenuTrigger as Cn, DropdownMenuContent as Ln, DropdownMenuItem as fe, Separator as ca, TooltipProvider as bs, SheetTrigger as ua, Skeleton as Dt, Dialog as Is, Card as da, CardHeader as fa, CardTitle as ha, CardDescription as ga, CardContent as ma, Label as $n, Input as Qn, CardFooter as Ea, HoverCard as pa, HoverCardTrigger as ya, HoverCardContent as Aa, AlertDialog as Ta, AlertDialogTrigger as Sa, AlertDialogContent as _a, AlertDialogHeader as Pa, AlertDialogTitle as wa, AlertDialogDescription as va, AlertDialogFooter as ba, AlertDialogCancel as Ia, AlertDialogAction as Na, Popover as Ca, PopoverTrigger as La, DialogContent as ka, DialogHeader as Da, DialogTitle as xa, Tabs as Ga, TabsList as Oa, TabsTrigger as an, TabsContent as on, Textarea as jn, Alert as Ra, AlertDescription as Ua } from "@chaibuilder/sdk/ui";
|
|
17
|
+
import { LogsIcon as Ba, Folder as Ma, Languages as Wn, ChevronDown as mn, Star as Fa, Plus as Ns, History as qa, Play as Ka, Palette as Va, CheckCircle as Ha, Loader as ft, Save as $a, Send as zn, Rocket as Yn, CopyPlusIcon as Qa, Pencil as ja, Power as Wa, Trash as za, SquareLibrary as Jn, Globe as Ya, File as Ja, MoreHorizontal as Xn, ExternalLink as Xa, EyeOff as Za, Eye as Cs, LanguagesIcon as ei, User as ti, X as Zn, Trash2 as ni, ImageIcon as es, Code as si, Share2 as ri, FileCode2 as ai, AlertTriangle as ii } from "lucide-react";
|
|
18
|
+
import { useRegisteredChaiBlocks as oi, getDefaultBlockProps as li } from "@chaibuilder/runtime";
|
|
19
19
|
import { z as Mt } from "zod";
|
|
20
|
-
import { loadWebBlocks as
|
|
20
|
+
import { loadWebBlocks as ci } from "@chaibuilder/sdk/web-blocks";
|
|
21
21
|
const y = {
|
|
22
22
|
GENERATE_SEO_FIELD: "GENERATE_SEO_FIELD",
|
|
23
23
|
UPDATE_PAGE_METADATA: "UPDATE_PAGE_METADATA",
|
|
@@ -75,32 +75,32 @@ const y = {
|
|
|
75
75
|
UPDATE_ASSET: "UPDATE_ASSET",
|
|
76
76
|
GET_ASSETS: "GET_ASSETS",
|
|
77
77
|
GET_ASSET: "GET_ASSET"
|
|
78
|
-
},
|
|
78
|
+
}, ui = pe({}), kn = () => ne(ui), ye = (e, t) => {
|
|
79
79
|
const [n] = kn();
|
|
80
80
|
return $(() => H(n, e, t), [n, e, t]);
|
|
81
|
-
}, B = () => ye("apiUrl", "/chai/api"), Zt = () => ye("usersApiUrl", "/chai/users"),
|
|
82
|
-
let
|
|
81
|
+
}, B = () => ye("apiUrl", "/chai/api"), Zt = () => ye("usersApiUrl", "/chai/users"), zc = () => ye("assetsApiUrl", "/chai/assets"), di = () => ye("supabaseInstance", null);
|
|
82
|
+
let fi = 0;
|
|
83
83
|
function ts(e, t) {
|
|
84
|
-
const n = `atom${++
|
|
84
|
+
const n = `atom${++fi}`, s = {
|
|
85
85
|
toString() {
|
|
86
86
|
return n;
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
|
-
return typeof e == "function" ? s.read = e : (s.init = e, s.read =
|
|
89
|
+
return typeof e == "function" ? s.read = e : (s.init = e, s.read = hi, s.write = gi), t && (s.write = t), s;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function hi(e) {
|
|
92
92
|
return e(this);
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function gi(e, t, n) {
|
|
95
95
|
return t(
|
|
96
96
|
this,
|
|
97
97
|
typeof n == "function" ? n(e(this)) : n
|
|
98
98
|
);
|
|
99
99
|
}
|
|
100
|
-
const
|
|
100
|
+
const mi = Symbol(
|
|
101
101
|
""
|
|
102
102
|
), Ls = (e) => typeof (e == null ? void 0 : e.then) == "function";
|
|
103
|
-
function
|
|
103
|
+
function Ei(e = () => {
|
|
104
104
|
try {
|
|
105
105
|
return window.localStorage;
|
|
106
106
|
} catch {
|
|
@@ -162,8 +162,8 @@ function pi(e = () => {
|
|
|
162
162
|
};
|
|
163
163
|
}), o && (a.subscribe = i(o)), a;
|
|
164
164
|
}
|
|
165
|
-
const
|
|
166
|
-
function
|
|
165
|
+
const pi = Ei();
|
|
166
|
+
function yi(e, t, n = pi, s) {
|
|
167
167
|
const r = ts(
|
|
168
168
|
t
|
|
169
169
|
);
|
|
@@ -175,14 +175,14 @@ function Ai(e, t, n = yi, s) {
|
|
|
175
175
|
(i) => i(r),
|
|
176
176
|
(i, o, l) => {
|
|
177
177
|
const u = typeof l == "function" ? l(i(r)) : l;
|
|
178
|
-
return u ===
|
|
178
|
+
return u === mi ? (o(r, t), n.removeItem(e)) : Ls(u) ? u.then((f) => (o(r, f), n.setItem(e, f))) : (o(r, u), n.setItem(e, u));
|
|
179
179
|
}
|
|
180
180
|
);
|
|
181
181
|
}
|
|
182
182
|
localStorage.removeItem("_chai_user");
|
|
183
183
|
localStorage.removeItem("__chai__user");
|
|
184
|
-
const ks = "__logged_in_user",
|
|
185
|
-
const [e, t] =
|
|
184
|
+
const ks = "__logged_in_user", Ai = yi(ks, null), Ae = () => {
|
|
185
|
+
const [e, t] = ne(Ai), n = q(() => {
|
|
186
186
|
t(null), localStorage.removeItem(ks);
|
|
187
187
|
}, [t]);
|
|
188
188
|
return {
|
|
@@ -209,7 +209,7 @@ if (import.meta.vitest) {
|
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
211
|
let qe = null;
|
|
212
|
-
function
|
|
212
|
+
function Ti() {
|
|
213
213
|
const { user: e, setUser: t, logout: n } = Ae(), s = Zt(), r = ye("getAccessToken", !1), a = async () => {
|
|
214
214
|
if (r === !1 && e && !(!Y(e, "expiresAt") || !Y(e, "accessToken") || !Y(e, "refreshToken")))
|
|
215
215
|
try {
|
|
@@ -247,11 +247,11 @@ function Si() {
|
|
|
247
247
|
}
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function Si() {
|
|
251
251
|
return qe;
|
|
252
252
|
}
|
|
253
253
|
const Ds = () => {
|
|
254
|
-
const { user: e, setUser: t } = Ae(), { mutateAsync: n } =
|
|
254
|
+
const { user: e, setUser: t } = Ae(), { mutateAsync: n } = Ti(), s = 60, r = q(() => {
|
|
255
255
|
if (!(e != null && e.expiresAt)) return !1;
|
|
256
256
|
if (!e || !(e != null && e.refreshToken)) return !0;
|
|
257
257
|
const o = Math.floor(Date.now() / 1e3);
|
|
@@ -260,7 +260,7 @@ const Ds = () => {
|
|
|
260
260
|
if (!Y(e, "expiresAt") || !Y(e, "accessToken") || !Y(e, "refreshToken"))
|
|
261
261
|
return (e == null ? void 0 : e.accessToken) || "";
|
|
262
262
|
if (r()) {
|
|
263
|
-
const o =
|
|
263
|
+
const o = Si();
|
|
264
264
|
if (o) {
|
|
265
265
|
const u = await o;
|
|
266
266
|
return u && t(u), (u == null ? void 0 : u.accessToken) || "";
|
|
@@ -311,7 +311,7 @@ const Ds = () => {
|
|
|
311
311
|
);
|
|
312
312
|
};
|
|
313
313
|
function le() {
|
|
314
|
-
const [e, t] =
|
|
314
|
+
const [e, t] = G(
|
|
315
315
|
new URLSearchParams(window.location.search)
|
|
316
316
|
);
|
|
317
317
|
return re(() => {
|
|
@@ -336,7 +336,7 @@ const Ue = (e) => {
|
|
|
336
336
|
action: y.GET_LANGUAGE_PAGES,
|
|
337
337
|
data: { id: s }
|
|
338
338
|
});
|
|
339
|
-
return
|
|
339
|
+
return Dr(xr(a, "primaryPage"));
|
|
340
340
|
},
|
|
341
341
|
enabled: !!s
|
|
342
342
|
});
|
|
@@ -356,17 +356,17 @@ const Ue = (e) => {
|
|
|
356
356
|
data: { draft: !0 }
|
|
357
357
|
})
|
|
358
358
|
});
|
|
359
|
-
},
|
|
359
|
+
}, xs = (e) => {
|
|
360
360
|
const { fallbackLang: t } = Re(), { data: n } = Be(), { data: s, isFetching: r } = Ue(), a = $(() => {
|
|
361
361
|
const i = { [t]: !0 };
|
|
362
|
-
return
|
|
362
|
+
return Gr(H(n, "languages"), (o) => {
|
|
363
363
|
const l = ae(s, { lang: o });
|
|
364
364
|
i[o] = !!l;
|
|
365
365
|
}), i;
|
|
366
366
|
}, [t, s, n]);
|
|
367
367
|
return r || me(e) || e && a[e];
|
|
368
368
|
};
|
|
369
|
-
class
|
|
369
|
+
class _i {
|
|
370
370
|
constructor(t, n, s, r) {
|
|
371
371
|
ve(this, "channelId");
|
|
372
372
|
ve(this, "supabase");
|
|
@@ -410,10 +410,10 @@ class Pi {
|
|
|
410
410
|
return t.length > 0 ? t[0] : null;
|
|
411
411
|
}
|
|
412
412
|
getPageUserMapping() {
|
|
413
|
-
const t = this.getOnlineUsers({}), n =
|
|
413
|
+
const t = this.getOnlineUsers({}), n = Or(t, "pageId"), s = {};
|
|
414
414
|
return Object.keys(n).forEach((r) => {
|
|
415
415
|
var i;
|
|
416
|
-
const a = (i =
|
|
416
|
+
const a = (i = Rr(n[r], "onlineAt")) == null ? void 0 : i.userId;
|
|
417
417
|
a !== this.userId && (s[r] = a);
|
|
418
418
|
}), s;
|
|
419
419
|
}
|
|
@@ -473,20 +473,20 @@ class Pi {
|
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
const
|
|
476
|
+
const Pi = pe(
|
|
477
477
|
null
|
|
478
|
-
),
|
|
479
|
-
const [e] =
|
|
478
|
+
), Gs = () => ne(Pi), Dn = () => {
|
|
479
|
+
const [e] = Gs();
|
|
480
480
|
return (e == null ? void 0 : e.slug) || "";
|
|
481
481
|
};
|
|
482
|
-
function
|
|
483
|
-
const [n, s] =
|
|
482
|
+
function wi(e, t) {
|
|
483
|
+
const [n, s] = G(e);
|
|
484
484
|
return re(() => {
|
|
485
485
|
const r = setTimeout(() => s(e), t);
|
|
486
486
|
return () => clearTimeout(r);
|
|
487
487
|
}, [e, t]), n;
|
|
488
488
|
}
|
|
489
|
-
const
|
|
489
|
+
const vi = ({ query: e, uuid: t }) => {
|
|
490
490
|
const { selectedLang: n, fallbackLang: s } = Re(), { data: r } = oe(), a = r == null ? void 0 : r.pageType, i = B(), o = R(), { data: l, isFetching: u } = ie({
|
|
491
491
|
queryKey: [y.GET_DYNAMIC_PAGES, e, a, t],
|
|
492
492
|
staleTime: 60 * 60 * 1e3,
|
|
@@ -498,8 +498,8 @@ const bi = ({ query: e, uuid: t }) => {
|
|
|
498
498
|
enabled: !!a
|
|
499
499
|
}), f = $(() => n === "" ? l.filter((d) => d.lang === "" || d.lang === s) : l.filter((d) => d.lang === n), [n, s, l]);
|
|
500
500
|
return { allLangPages: l, data: f, isFetching: u };
|
|
501
|
-
},
|
|
502
|
-
const { selectedLang: e, fallbackLang: t } = Re(), [n, s] =
|
|
501
|
+
}, bi = () => {
|
|
502
|
+
const { selectedLang: e, fallbackLang: t } = Re(), [n, s] = Gs(), [r, a] = G(""), i = wi(r, 500), { allLangPages: o, data: l, isFetching: u } = vi({ query: i }), f = q((g) => s(g), [s]), d = q((g) => a(g), [a]), h = q(() => {
|
|
503
503
|
if (!n) return;
|
|
504
504
|
const g = !(n != null && n.primaryPage), E = e.length === 0, S = g ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, p = o.filter(
|
|
505
505
|
(A) => (A == null ? void 0 : A.primaryPage) === S || A.id === S
|
|
@@ -517,16 +517,16 @@ const bi = ({ query: e, uuid: t }) => {
|
|
|
517
517
|
updateSearchQuery: d,
|
|
518
518
|
onChangeLanguage: h
|
|
519
519
|
};
|
|
520
|
-
},
|
|
520
|
+
}, Ii = pe({ lastSaved: void 0 }), xn = () => ne(Ii), oe = () => {
|
|
521
521
|
const [e] = le(), t = e.get("page"), { data: n, isFetching: s } = Ue();
|
|
522
522
|
return { data: $(() => ({ ...ae(n, { id: t }) || {} }), [n, t]), isFetching: s };
|
|
523
523
|
}, Ie = () => {
|
|
524
524
|
const [e] = le(), t = e.get("lang") ?? "", { data: n, isFetching: s } = Ue();
|
|
525
525
|
return { data: $(() => ae(n, { lang: t }) || {}, [n, t]), isFetching: s };
|
|
526
|
-
},
|
|
526
|
+
}, Ni = pe({}), Ci = () => ne(Ni), Li = () => {
|
|
527
527
|
const { data: e } = Ie(), t = Dn(), n = ye("getLiveUrl", As), s = e == null ? void 0 : e.slug, r = n(s || "/");
|
|
528
528
|
return t ? r + t : r;
|
|
529
|
-
},
|
|
529
|
+
}, ki = (e) => {
|
|
530
530
|
const t = Zt(), n = R();
|
|
531
531
|
return ie({
|
|
532
532
|
queryKey: [y.GET_CHAI_USER, e],
|
|
@@ -540,14 +540,14 @@ const bi = ({ query: e, uuid: t }) => {
|
|
|
540
540
|
enabled: !me(e),
|
|
541
541
|
staleTime: "static"
|
|
542
542
|
});
|
|
543
|
-
},
|
|
543
|
+
}, Di = pe({
|
|
544
544
|
status: "checking",
|
|
545
545
|
requestedBy: "",
|
|
546
546
|
isTakeOverRequested: !1,
|
|
547
547
|
requestingClientId: "",
|
|
548
548
|
isActiveInOtherTab: !1
|
|
549
|
-
}), xi = pe(""),
|
|
550
|
-
const [e] = le(), t = e.get("page"), [n, s] =
|
|
549
|
+
}), xi = pe(""), Gi = pe(null), Gn = pe({}), Yc = () => ne(Gn), Ne = () => {
|
|
550
|
+
const [e] = le(), t = e.get("page"), [n, s] = ne(Di), [r, a] = ne(Gi), [i, o] = ne(xi), [l] = ne(Gn);
|
|
551
551
|
return {
|
|
552
552
|
pageLock: n,
|
|
553
553
|
pageToUser: l,
|
|
@@ -560,8 +560,8 @@ const bi = ({ query: e, uuid: t }) => {
|
|
|
560
560
|
currentEditor: l[t || ""],
|
|
561
561
|
isLocked: t && n.status === "locked"
|
|
562
562
|
};
|
|
563
|
-
},
|
|
564
|
-
const e =
|
|
563
|
+
}, Oi = () => {
|
|
564
|
+
const e = di(), { data: t } = oe(), { user: n } = Ae(), s = t == null ? void 0 : t.id, { data: r } = Be(), { pageLock: a, setPageLock: i, setLockingStatus: o, realtimeInstance: l, setRealtimeInstance: u } = Ne(), [, f] = ne(Gn), d = ct(!1), h = ct(a), g = ct(!1);
|
|
565
565
|
return re(() => {
|
|
566
566
|
if (n != null && n.id && e && !l && (r != null && r.appKey) && !g.current) {
|
|
567
567
|
g.current = !0;
|
|
@@ -625,7 +625,7 @@ const bi = ({ query: e, uuid: t }) => {
|
|
|
625
625
|
* - update state for editing page
|
|
626
626
|
*/
|
|
627
627
|
case "TAKE_OVER_REQUEST_ACCEPTED":
|
|
628
|
-
p != null && p.isTakingOverFromAnotherTab || (o("take_over_request_accepted"),
|
|
628
|
+
p != null && p.isTakingOverFromAnotherTab || (o("take_over_request_accepted"), W.success("Your Page Take Over Request Accepted", { position: "top-center" })), i({
|
|
629
629
|
...h == null ? void 0 : h.current,
|
|
630
630
|
status: "checking",
|
|
631
631
|
requestedBy: "",
|
|
@@ -645,7 +645,7 @@ const bi = ({ query: e, uuid: t }) => {
|
|
|
645
645
|
});
|
|
646
646
|
break;
|
|
647
647
|
}
|
|
648
|
-
}, S = new
|
|
648
|
+
}, S = new _i(
|
|
649
649
|
e,
|
|
650
650
|
r == null ? void 0 : r.appKey,
|
|
651
651
|
n == null ? void 0 : n.id,
|
|
@@ -667,7 +667,7 @@ const bi = ({ query: e, uuid: t }) => {
|
|
|
667
667
|
}, o(""), i(h.current), l == null || l.leavePage());
|
|
668
668
|
};
|
|
669
669
|
}, [s, l]), a == null ? void 0 : a.status;
|
|
670
|
-
},
|
|
670
|
+
}, Ri = () => {
|
|
671
671
|
const { data: e } = oe(), { user: t } = Ae(), n = e == null ? void 0 : e.id, { pageLock: s, setPageLock: r, realtimeInstance: a } = Ne(), { savePageAsync: i } = Oe(), o = q(() => {
|
|
672
672
|
!a || !n || !(t != null && t.id) || (r({ ...s, isTakeOverRequested: !0 }), a == null || a.sendEvent("TAKE_OVER_REQUESTED"));
|
|
673
673
|
}, [a, n, t == null ? void 0 : t.id, r, s]), l = q(async () => {
|
|
@@ -698,8 +698,8 @@ const bi = ({ query: e, uuid: t }) => {
|
|
|
698
698
|
rejectTakeOver: u,
|
|
699
699
|
requestTakeOver: o
|
|
700
700
|
};
|
|
701
|
-
},
|
|
702
|
-
const { pageLock: t, requestTakeOver: n } =
|
|
701
|
+
}, Ui = K(() => import("./no-language-page-content-DP7gmy0s.js")), Bi = K(() => import("./page-locked-by-dialog-DmsSmAY2.js")), ln = K(() => import("./page-lock-request-CjJFJKL2.js")), Mi = ({ isFetchingPage: e }) => {
|
|
702
|
+
const { pageLock: t, requestTakeOver: n } = Ri(), { currentEditor: s, lockingStatus: r, setLockingStatus: a, realtimePageLockEnabled: i } = Ne(), { data: o, isFetching: l } = ki(s), [u] = le(), f = u.get("page"), [d] = xn(), h = ee(), g = q(() => {
|
|
703
703
|
n();
|
|
704
704
|
}, [n]);
|
|
705
705
|
return !f || e || !i || (t == null ? void 0 : t.status) === "checking" ? null : t != null && t.requestedBy ? /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
@@ -721,7 +721,7 @@ const bi = ({ query: e, uuid: t }) => {
|
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
723
|
) }) : null : t != null && t.isActiveInOtherTab ? /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(ln, { lockingStatus: "page_is_active_in_other_tab", onContinue: n }) }) : /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
724
|
-
|
|
724
|
+
Bi,
|
|
725
725
|
{
|
|
726
726
|
...o,
|
|
727
727
|
isFetchingUserInfo: l,
|
|
@@ -733,10 +733,10 @@ const bi = ({ query: e, uuid: t }) => {
|
|
|
733
733
|
isRequestRejected: r === "take_over_request_rejected"
|
|
734
734
|
}
|
|
735
735
|
) });
|
|
736
|
-
},
|
|
736
|
+
}, Fi = () => {
|
|
737
737
|
const [e] = le(), t = e.get("lang");
|
|
738
|
-
return
|
|
739
|
-
},
|
|
738
|
+
return xs(t) ? null : /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Ui, {}) });
|
|
739
|
+
}, xt = {
|
|
740
740
|
ab: "Abkhazian",
|
|
741
741
|
aa: "Afar",
|
|
742
742
|
af: "Afrikaans",
|
|
@@ -952,15 +952,15 @@ const On = pe(null), Rn = () => {
|
|
|
952
952
|
queryFn: async () => {
|
|
953
953
|
if (s === e) return {};
|
|
954
954
|
const r = await t(n, { action: y.GET_WEBSITE_PAGES, data: { lang: e } }) || [];
|
|
955
|
-
return
|
|
955
|
+
return Ur(
|
|
956
956
|
Kt(r, (a) => ({ ...a, lang: e })),
|
|
957
957
|
"primaryPage"
|
|
958
958
|
);
|
|
959
959
|
},
|
|
960
960
|
placeholderData: (r) => r || {}
|
|
961
961
|
});
|
|
962
|
-
},
|
|
963
|
-
const [t, n] = le(), s = t.get("page"), { data: r, isFetching: a } = oe(), { data: i, isFetching: o } = Rs(), [l, u] =
|
|
962
|
+
}, qi = K(() => import("./page-manager-new-EsIg6iQn.js")), Us = ({ children: e }) => {
|
|
963
|
+
const [t, n] = le(), s = t.get("page"), { data: r, isFetching: a } = oe(), { data: i, isFetching: o } = Rs(), [l, u] = G(!1), [f, d] = G(!0), { savePage: h } = Oe(), g = !!s && !me(r), E = $(() => {
|
|
964
964
|
if (!i || o) return !1;
|
|
965
965
|
const A = i.find((w) => w.slug === "/");
|
|
966
966
|
return A == null ? void 0 : A.id;
|
|
@@ -980,7 +980,7 @@ const On = pe(null), Rn = () => {
|
|
|
980
980
|
onClick: () => {
|
|
981
981
|
h(), u(!0);
|
|
982
982
|
},
|
|
983
|
-
children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(
|
|
983
|
+
children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(Ba, { className: "h-4 w-4" }) }, "template-viewer")
|
|
984
984
|
}
|
|
985
985
|
),
|
|
986
986
|
/* @__PURE__ */ c(Xt, { side: "right", children: /* @__PURE__ */ c("p", { children: "Open pages manager" }) })
|
|
@@ -992,25 +992,25 @@ const On = pe(null), Rn = () => {
|
|
|
992
992
|
"aria-describedby": "pages-manager-description",
|
|
993
993
|
className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${g ? "" : "sheet-hide-close-btn"}`,
|
|
994
994
|
children: [
|
|
995
|
-
/* @__PURE__ */ m(
|
|
996
|
-
/* @__PURE__ */ m(
|
|
997
|
-
/* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(
|
|
995
|
+
/* @__PURE__ */ m(ia, { className: "mb-3 px-4 pt-4", children: [
|
|
996
|
+
/* @__PURE__ */ m(oa, { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
997
|
+
/* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(Ma, { className: "h-4 w-4" }) }),
|
|
998
998
|
/* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
999
999
|
/* @__PURE__ */ c("span", { className: "text-sm font-semibold", children: "Pages" }),
|
|
1000
1000
|
/* @__PURE__ */ c("span", { id: "pages-manager-description", className: "text-xs font-normal text-muted-foreground", children: "Manage your site structure" })
|
|
1001
1001
|
] })
|
|
1002
1002
|
] }),
|
|
1003
|
-
/* @__PURE__ */ c(
|
|
1003
|
+
/* @__PURE__ */ c(la, { className: "sr-only", children: "Manage your site structure" })
|
|
1004
1004
|
] }),
|
|
1005
|
-
/* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: p && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
1005
|
+
/* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: p && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(qi, { close: () => u(!1) }) }) })
|
|
1006
1006
|
]
|
|
1007
1007
|
}
|
|
1008
1008
|
) })
|
|
1009
1009
|
] });
|
|
1010
|
-
},
|
|
1010
|
+
}, Ki = K(() => import("./add-new-language-page-D8iXtyLA.js")), Vi = () => {
|
|
1011
1011
|
const e = ye("topLeftCorner", null);
|
|
1012
|
-
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children:
|
|
1013
|
-
},
|
|
1012
|
+
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: jr.createElement(e, {}) }) : null;
|
|
1013
|
+
}, Hi = ({
|
|
1014
1014
|
showAdd: e = !0,
|
|
1015
1015
|
variant: t = "ghost"
|
|
1016
1016
|
}) => {
|
|
@@ -1019,13 +1019,13 @@ const On = pe(null), Rn = () => {
|
|
|
1019
1019
|
const T = new URLSearchParams(window.location.search), p = T.get("lang");
|
|
1020
1020
|
p && (s.includes(p) ? a(p) : (T.delete("lang"), o(T), a("")));
|
|
1021
1021
|
}, [s, o, a]);
|
|
1022
|
-
const [, u] =
|
|
1022
|
+
const [, u] = ne(On), { data: f } = oe(), { data: d } = Be(), { data: h } = Ue(), g = $(() => {
|
|
1023
1023
|
const T = Ts(
|
|
1024
1024
|
Kt(H(d, "languages"), (p) => {
|
|
1025
1025
|
const A = ae(h, { lang: p });
|
|
1026
1026
|
return {
|
|
1027
1027
|
key: p,
|
|
1028
|
-
value: H(
|
|
1028
|
+
value: H(xt, p, p),
|
|
1029
1029
|
isLangPageAdded: !!A
|
|
1030
1030
|
};
|
|
1031
1031
|
})
|
|
@@ -1033,7 +1033,7 @@ const On = pe(null), Rn = () => {
|
|
|
1033
1033
|
return [
|
|
1034
1034
|
{
|
|
1035
1035
|
key: n,
|
|
1036
|
-
value: H(
|
|
1036
|
+
value: H(xt, n),
|
|
1037
1037
|
isLangPageAdded: !0
|
|
1038
1038
|
},
|
|
1039
1039
|
...T
|
|
@@ -1057,8 +1057,8 @@ const On = pe(null), Rn = () => {
|
|
|
1057
1057
|
T === n ? p.delete("lang") : p.set("lang", T), Os(p, o);
|
|
1058
1058
|
};
|
|
1059
1059
|
return me(s) ? null : l ? /* @__PURE__ */ m(M, { variant: "ghost", size: "sm", className: "ml-px h-max cursor-not-allowed gap-2 py-1.5 opacity-50", children: [
|
|
1060
|
-
/* @__PURE__ */ c(
|
|
1061
|
-
H(
|
|
1060
|
+
/* @__PURE__ */ c(Wn, { className: "h-4 w-4" }),
|
|
1061
|
+
H(xt, i, i),
|
|
1062
1062
|
/* @__PURE__ */ c(mn, { className: "h-4 w-4" })
|
|
1063
1063
|
] }) : /* @__PURE__ */ c(he, { children: /* @__PURE__ */ m(Nn, { children: [
|
|
1064
1064
|
/* @__PURE__ */ c(Cn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(
|
|
@@ -1069,8 +1069,8 @@ const On = pe(null), Rn = () => {
|
|
|
1069
1069
|
size: "sm",
|
|
1070
1070
|
className: "ml-px h-max gap-2 py-1.5",
|
|
1071
1071
|
children: [
|
|
1072
|
-
/* @__PURE__ */ c(
|
|
1073
|
-
H(
|
|
1072
|
+
/* @__PURE__ */ c(Wn, { className: "h-4 w-4" }),
|
|
1073
|
+
H(xt, i, i),
|
|
1074
1074
|
/* @__PURE__ */ c(mn, { className: "h-4 w-4" })
|
|
1075
1075
|
]
|
|
1076
1076
|
}
|
|
@@ -1089,7 +1089,7 @@ const On = pe(null), Rn = () => {
|
|
|
1089
1089
|
children: [
|
|
1090
1090
|
/* @__PURE__ */ c("div", { className: "text-slate-600", children: T.value }),
|
|
1091
1091
|
T.key === n && /* @__PURE__ */ m("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
|
|
1092
|
-
/* @__PURE__ */ c(
|
|
1092
|
+
/* @__PURE__ */ c(Fa, { fill: "orange", className: "h-2 w-2" }),
|
|
1093
1093
|
"Primary"
|
|
1094
1094
|
] })
|
|
1095
1095
|
]
|
|
@@ -1098,7 +1098,7 @@ const On = pe(null), Rn = () => {
|
|
|
1098
1098
|
)
|
|
1099
1099
|
),
|
|
1100
1100
|
e && !me(g.filter((T) => !T.isLangPageAdded)) && /* @__PURE__ */ m(he, { children: [
|
|
1101
|
-
/* @__PURE__ */ c(
|
|
1101
|
+
/* @__PURE__ */ c(ca, {}),
|
|
1102
1102
|
/* @__PURE__ */ m(
|
|
1103
1103
|
M,
|
|
1104
1104
|
{
|
|
@@ -1121,13 +1121,13 @@ const On = pe(null), Rn = () => {
|
|
|
1121
1121
|
] })
|
|
1122
1122
|
] }) });
|
|
1123
1123
|
};
|
|
1124
|
-
function
|
|
1125
|
-
const [e, t] =
|
|
1124
|
+
function $i() {
|
|
1125
|
+
const [e, t] = ne(On);
|
|
1126
1126
|
return /* @__PURE__ */ m("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
|
|
1127
|
-
/* @__PURE__ */ c(
|
|
1127
|
+
/* @__PURE__ */ c(Vi, {}),
|
|
1128
1128
|
/* @__PURE__ */ c(Us, {}),
|
|
1129
1129
|
e && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
1130
|
-
|
|
1130
|
+
Ki,
|
|
1131
1131
|
{
|
|
1132
1132
|
isOpen: !0,
|
|
1133
1133
|
id: e == null ? void 0 : e.id,
|
|
@@ -1139,8 +1139,7 @@ function Qi() {
|
|
|
1139
1139
|
) })
|
|
1140
1140
|
] });
|
|
1141
1141
|
}
|
|
1142
|
-
|
|
1143
|
-
function ji() {
|
|
1142
|
+
function Qi() {
|
|
1144
1143
|
return /* @__PURE__ */ c("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: [
|
|
1145
1144
|
/* @__PURE__ */ m("div", { className: "flex-1 space-y-1", children: [
|
|
1146
1145
|
/* @__PURE__ */ c(Dt, { className: "h-4 w-3/4" }),
|
|
@@ -1150,19 +1149,19 @@ function ji() {
|
|
|
1150
1149
|
/* @__PURE__ */ c(Dt, { className: "h-8 w-8 rounded-full" })
|
|
1151
1150
|
] }, t)) });
|
|
1152
1151
|
}
|
|
1153
|
-
const
|
|
1152
|
+
const ji = j.lazy(() => import("./page-revisions-content-CsT6aF2I.js"));
|
|
1154
1153
|
function Wi() {
|
|
1155
1154
|
const [e, t] = j.useState(!1);
|
|
1156
1155
|
return /* @__PURE__ */ c(bs, { children: /* @__PURE__ */ m(Yt, { delayDuration: 0, children: [
|
|
1157
1156
|
/* @__PURE__ */ m(ws, { open: e, onOpenChange: t, children: [
|
|
1158
|
-
/* @__PURE__ */ c(
|
|
1157
|
+
/* @__PURE__ */ c(ua, { asChild: !0, children: /* @__PURE__ */ c(Jt, { asChild: !0, children: /* @__PURE__ */ m("span", { className: "flex items-center gap-2", children: [
|
|
1159
1158
|
/* @__PURE__ */ m(M, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
|
|
1160
|
-
/* @__PURE__ */ c(
|
|
1159
|
+
/* @__PURE__ */ c(qa, { className: "h-4 w-4" }),
|
|
1161
1160
|
/* @__PURE__ */ c("span", { className: "sr-only", children: "View revision history" })
|
|
1162
1161
|
] }),
|
|
1163
1162
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1164
1163
|
] }) }) }),
|
|
1165
|
-
/* @__PURE__ */ c(vs, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(V, { fallback: /* @__PURE__ */ c(
|
|
1164
|
+
/* @__PURE__ */ c(vs, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(V, { fallback: /* @__PURE__ */ c(Qi, {}), children: /* @__PURE__ */ c(ji, { isOpen: e }) }) })
|
|
1166
1165
|
] }),
|
|
1167
1166
|
/* @__PURE__ */ c(Xt, { side: "bottom", children: /* @__PURE__ */ c("p", { children: "Revision history" }) })
|
|
1168
1167
|
] }) });
|
|
@@ -1177,6 +1176,7 @@ const cn = ({
|
|
|
1177
1176
|
return e && !r(e) || t && !t.some((a) => r(a)) ? s : n;
|
|
1178
1177
|
}, X = {
|
|
1179
1178
|
TOGGLE_PREVIEW: "Toggle Preview",
|
|
1179
|
+
OPEN_PREVIEW_IN_NEW_TAB: "Open preview in new tab",
|
|
1180
1180
|
THEME: "Theme",
|
|
1181
1181
|
SAVEDRAFT: "Save draft",
|
|
1182
1182
|
SAVING: "Saving",
|
|
@@ -1224,7 +1224,7 @@ const cn = ({
|
|
|
1224
1224
|
GLOBAL_BLOCK_PUBLISH_SUCCESS: "Global block published successfully.",
|
|
1225
1225
|
PAGES_PUBLISH_SUCCESS: "Your changes have been published successfully.",
|
|
1226
1226
|
SLUG_CHANGE_SUCCESS: "Slug changed successfully."
|
|
1227
|
-
},
|
|
1227
|
+
}, zi = {
|
|
1228
1228
|
SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
|
|
1229
1229
|
}, Ce = () => {
|
|
1230
1230
|
const e = B(), t = R();
|
|
@@ -1234,10 +1234,10 @@ const cn = ({
|
|
|
1234
1234
|
placeholderData: [],
|
|
1235
1235
|
queryFn: async () => t(e, { action: y.GET_PAGE_TYPES })
|
|
1236
1236
|
});
|
|
1237
|
-
},
|
|
1237
|
+
}, Yi = (e) => {
|
|
1238
1238
|
const { data: t } = Ce();
|
|
1239
1239
|
return $(() => t == null ? void 0 : t.find((n) => n.key === e), [t, e]);
|
|
1240
|
-
},
|
|
1240
|
+
}, Ji = () => {
|
|
1241
1241
|
const e = B(), t = R();
|
|
1242
1242
|
return se({
|
|
1243
1243
|
mutationFn: async ({ pageType: n, query: s }) => {
|
|
@@ -1271,12 +1271,12 @@ const cn = ({
|
|
|
1271
1271
|
queryKey: [y.GET_WEBSITE_PAGES]
|
|
1272
1272
|
});
|
|
1273
1273
|
const i = a.template ? `Page created from "${a.template.name}" template` : a.hasSlug === !1 ? "New " + ((o = ae(s, { key: a.pageType })) == null ? void 0 : o.name) + " added successfully" : "New page added successfully";
|
|
1274
|
-
|
|
1274
|
+
W.success(i);
|
|
1275
1275
|
},
|
|
1276
1276
|
onError: (r, a) => {
|
|
1277
1277
|
const i = ae(s, { key: a.pageType });
|
|
1278
|
-
|
|
1279
|
-
description: H(
|
|
1278
|
+
W.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1279
|
+
description: H(zi, r.message, r.message)
|
|
1280
1280
|
});
|
|
1281
1281
|
}
|
|
1282
1282
|
});
|
|
@@ -1300,7 +1300,7 @@ const cn = ({
|
|
|
1300
1300
|
},
|
|
1301
1301
|
onError: (a, i) => {
|
|
1302
1302
|
const o = ae(r, { key: i.pageType });
|
|
1303
|
-
|
|
1303
|
+
W.error(`Failed to update ${o != null && o.hasSlug ? "page" : o.name}.`, {
|
|
1304
1304
|
description: a.message
|
|
1305
1305
|
});
|
|
1306
1306
|
}
|
|
@@ -1314,7 +1314,7 @@ const cn = ({
|
|
|
1314
1314
|
}),
|
|
1315
1315
|
onSuccess: (r, a) => {
|
|
1316
1316
|
if (r.code === "PAGE_LOCKED") {
|
|
1317
|
-
|
|
1317
|
+
W.error("Delete not allowed", {
|
|
1318
1318
|
description: "Page is currently being edited by another user."
|
|
1319
1319
|
});
|
|
1320
1320
|
return;
|
|
@@ -1329,7 +1329,7 @@ const cn = ({
|
|
|
1329
1329
|
},
|
|
1330
1330
|
onError: (r, a) => {
|
|
1331
1331
|
const i = ae(s, { key: a.pageType });
|
|
1332
|
-
|
|
1332
|
+
W.error(`Failed to delete ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1333
1333
|
description: r.message
|
|
1334
1334
|
});
|
|
1335
1335
|
}
|
|
@@ -1348,18 +1348,18 @@ const cn = ({
|
|
|
1348
1348
|
queryKey: [y.GET_WEBSITE_PAGES]
|
|
1349
1349
|
});
|
|
1350
1350
|
const i = ae(s, { key: a.pageType });
|
|
1351
|
-
|
|
1351
|
+
W.success(
|
|
1352
1352
|
i != null && i.hasSlug ? X.PAGE_UNPUBLISH_SUCCESS : "New " + i.name + " added successfully."
|
|
1353
1353
|
);
|
|
1354
1354
|
},
|
|
1355
1355
|
onError: (r, a) => {
|
|
1356
1356
|
const i = ae(s, { key: a.pageType });
|
|
1357
|
-
|
|
1357
|
+
W.error(`Failed to take offline ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1358
1358
|
description: r.message
|
|
1359
1359
|
});
|
|
1360
1360
|
}
|
|
1361
1361
|
});
|
|
1362
|
-
},
|
|
1362
|
+
}, Bs = () => {
|
|
1363
1363
|
const e = B(), t = R(), n = ee(), { data: s } = oe(), { savePageAsync: r } = Oe();
|
|
1364
1364
|
return se({
|
|
1365
1365
|
mutationFn: async ({ ids: a }) => (await r(), t(e, {
|
|
@@ -1376,7 +1376,7 @@ const cn = ({
|
|
|
1376
1376
|
});
|
|
1377
1377
|
},
|
|
1378
1378
|
onError: (a) => {
|
|
1379
|
-
console.log("##", a),
|
|
1379
|
+
console.log("##", a), W.error("Failed to publish pages.");
|
|
1380
1380
|
}
|
|
1381
1381
|
});
|
|
1382
1382
|
}, nu = () => {
|
|
@@ -1398,10 +1398,10 @@ const cn = ({
|
|
|
1398
1398
|
onSuccess: () => {
|
|
1399
1399
|
n.invalidateQueries({
|
|
1400
1400
|
queryKey: [y.GET_WEBSITE_PAGES]
|
|
1401
|
-
}),
|
|
1401
|
+
}), W.success("Page marked as template successfully.");
|
|
1402
1402
|
},
|
|
1403
1403
|
onError: () => {
|
|
1404
|
-
|
|
1404
|
+
W.error("Failed to mark page as template.");
|
|
1405
1405
|
}
|
|
1406
1406
|
});
|
|
1407
1407
|
}, su = () => {
|
|
@@ -1414,10 +1414,10 @@ const cn = ({
|
|
|
1414
1414
|
onSuccess: () => {
|
|
1415
1415
|
n.invalidateQueries({
|
|
1416
1416
|
queryKey: [y.GET_WEBSITE_PAGES]
|
|
1417
|
-
}),
|
|
1417
|
+
}), W.success("Page unmarked as template successfully.");
|
|
1418
1418
|
},
|
|
1419
1419
|
onError: () => {
|
|
1420
|
-
|
|
1420
|
+
W.error("Failed to unmark page as template.");
|
|
1421
1421
|
}
|
|
1422
1422
|
});
|
|
1423
1423
|
}, ru = () => {
|
|
@@ -1428,27 +1428,27 @@ const cn = ({
|
|
|
1428
1428
|
data: { id: s, slug: r }
|
|
1429
1429
|
}),
|
|
1430
1430
|
onSuccess: (s, { primaryPage: r }) => {
|
|
1431
|
-
|
|
1431
|
+
W.success(X.SLUG_CHANGE_SUCCESS), r ? n.invalidateQueries({
|
|
1432
1432
|
queryKey: [y.GET_LANGUAGE_PAGES, r]
|
|
1433
1433
|
}) : n.invalidateQueries({
|
|
1434
1434
|
queryKey: [y.GET_WEBSITE_PAGES]
|
|
1435
1435
|
});
|
|
1436
1436
|
},
|
|
1437
1437
|
onError: () => {
|
|
1438
|
-
|
|
1438
|
+
W.error("Failed to change slug");
|
|
1439
1439
|
}
|
|
1440
1440
|
});
|
|
1441
|
-
},
|
|
1442
|
-
function
|
|
1441
|
+
}, Xi = K(() => import("./publish-pages-content-KAuhOPv0.js"));
|
|
1442
|
+
function Zi({
|
|
1443
1443
|
showModal: e = !1,
|
|
1444
1444
|
onClose: t = () => console.log("Cancelled")
|
|
1445
1445
|
}) {
|
|
1446
|
-
const { mutate: n, isPending: s } =
|
|
1446
|
+
const { mutate: n, isPending: s } = Bs();
|
|
1447
1447
|
return /* @__PURE__ */ c(Is, { open: e, onOpenChange: s ? () => {
|
|
1448
|
-
} : t, children: e && /* @__PURE__ */ c(V, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(
|
|
1448
|
+
} : t, children: e && /* @__PURE__ */ c(V, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(Xi, { onClose: t, isPending: s, publishPage: n }) }) });
|
|
1449
1449
|
}
|
|
1450
1450
|
const de = {
|
|
1451
|
-
...
|
|
1451
|
+
...Yr,
|
|
1452
1452
|
//pages
|
|
1453
1453
|
ADD_PAGE: "add_page",
|
|
1454
1454
|
EDIT_PAGE: "edit_page",
|
|
@@ -1484,12 +1484,12 @@ const de = {
|
|
|
1484
1484
|
ADD_MEDIA: "add_media",
|
|
1485
1485
|
EDIT_MEDIA: "edit_media",
|
|
1486
1486
|
DELETE_MEDIA: "delete_media"
|
|
1487
|
-
},
|
|
1487
|
+
}, eo = {
|
|
1488
1488
|
particleCount: 350,
|
|
1489
1489
|
spread: 120,
|
|
1490
1490
|
origin: { y: 0.6 },
|
|
1491
1491
|
angle: 90
|
|
1492
|
-
},
|
|
1492
|
+
}, to = {
|
|
1493
1493
|
TOP_RIGHT: {
|
|
1494
1494
|
angle: 225,
|
|
1495
1495
|
origin: { x: 0.9, y: 0 }
|
|
@@ -1498,14 +1498,14 @@ const de = {
|
|
|
1498
1498
|
angle: 100,
|
|
1499
1499
|
origin: { x: 0.9, y: 0.9 }
|
|
1500
1500
|
}
|
|
1501
|
-
},
|
|
1501
|
+
}, no = async () => {
|
|
1502
1502
|
const { default: e } = await import("./confetti.module-DCmCkDyV.js");
|
|
1503
1503
|
return e;
|
|
1504
1504
|
}, un = (e) => {
|
|
1505
|
-
let t =
|
|
1505
|
+
let t = to[e];
|
|
1506
1506
|
t || (t = {});
|
|
1507
|
-
const n = { ...
|
|
1508
|
-
|
|
1507
|
+
const n = { ...eo, ...t };
|
|
1508
|
+
no().then((s) => s(n));
|
|
1509
1509
|
};
|
|
1510
1510
|
function Un({
|
|
1511
1511
|
children: e,
|
|
@@ -1519,34 +1519,30 @@ function Un({
|
|
|
1519
1519
|
/* @__PURE__ */ c(Xt, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
|
|
1520
1520
|
] }) }) : e;
|
|
1521
1521
|
}
|
|
1522
|
-
const
|
|
1523
|
-
const { selectedLang: e, fallbackLang: t } = Re(), n = ye("getPreviewUrl", async (
|
|
1522
|
+
const so = K(() => import("./unpublish-page-CPLlsfm4.js")), ro = K(() => import("./translation-warning-modal-DalBhNQy.js")), ao = () => {
|
|
1523
|
+
const { selectedLang: e, fallbackLang: t } = Re(), n = ye("getPreviewUrl", async (d) => d), [s, r] = G(""), { data: a } = oe(), { data: i } = Ue(), { data: o } = Ce(), l = $(
|
|
1524
1524
|
() => {
|
|
1525
|
-
var
|
|
1526
|
-
return (
|
|
1525
|
+
var d;
|
|
1526
|
+
return (d = i == null ? void 0 : i.find((h) => (h == null ? void 0 : h.lang) === e)) == null ? void 0 : d.slug;
|
|
1527
1527
|
},
|
|
1528
|
-
[e,
|
|
1529
|
-
),
|
|
1530
|
-
var
|
|
1531
|
-
return (
|
|
1532
|
-
}, [
|
|
1533
|
-
re(() => {
|
|
1528
|
+
[e, i]
|
|
1529
|
+
), u = q((d) => {
|
|
1530
|
+
var h;
|
|
1531
|
+
return (h = ae(o, { key: d })) == null ? void 0 : h.hasSlug;
|
|
1532
|
+
}, [o]), f = e === t ? "" : e;
|
|
1533
|
+
return re(() => {
|
|
1534
1534
|
(async () => {
|
|
1535
1535
|
if (typeof n == "function") {
|
|
1536
|
-
const
|
|
1537
|
-
|
|
1536
|
+
const d = !u(a == null ? void 0 : a.pageType), h = await n(
|
|
1537
|
+
d ? `${f !== "" ? f + "/" : ""}${a == null ? void 0 : a.id}` : l || ""
|
|
1538
1538
|
);
|
|
1539
|
-
|
|
1539
|
+
r(h);
|
|
1540
1540
|
} else
|
|
1541
|
-
|
|
1541
|
+
r("");
|
|
1542
1542
|
})();
|
|
1543
|
-
}, [n,
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
};
|
|
1547
|
-
return /* @__PURE__ */ c(he, { children: /* @__PURE__ */ c(Un, { content: X.TOGGLE_PREVIEW, delayDuration: 0, children: /* @__PURE__ */ c(M, { variant: "ghost", size: "sm", className: "gap-2", onClick: h, children: /* @__PURE__ */ c(Va, { className: "h-4 w-4" }) }) }) });
|
|
1548
|
-
}, oo = () => {
|
|
1549
|
-
const [e, t] = Xr();
|
|
1543
|
+
}, [n, l, a == null ? void 0 : a.pageType, u, a == null ? void 0 : a.id, f]), /* @__PURE__ */ c(he, { children: /* @__PURE__ */ c(Un, { content: X.OPEN_PREVIEW_IN_NEW_TAB, delayDuration: 0, children: /* @__PURE__ */ c("a", { href: s, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c(M, { variant: "ghost", size: "sm", className: "gap-2", children: /* @__PURE__ */ c(Ka, { className: "h-4 w-4" }) }) }) }) });
|
|
1544
|
+
}, io = () => {
|
|
1545
|
+
const [e, t] = Jr();
|
|
1550
1546
|
return /* @__PURE__ */ m(he, { children: [
|
|
1551
1547
|
/* @__PURE__ */ c(Un, { content: X.THEME, delayDuration: 0, children: /* @__PURE__ */ c(
|
|
1552
1548
|
M,
|
|
@@ -1555,13 +1551,13 @@ const ro = K(() => import("./unpublish-page-CuSJRr5c.js")), ao = K(() => import(
|
|
|
1555
1551
|
size: "icon",
|
|
1556
1552
|
className: "gap-2",
|
|
1557
1553
|
onClick: () => t(e === "theme" ? "block" : "theme"),
|
|
1558
|
-
children: /* @__PURE__ */ c(
|
|
1554
|
+
children: /* @__PURE__ */ c(Va, { className: "h-4 w-4" })
|
|
1559
1555
|
}
|
|
1560
1556
|
) }),
|
|
1561
1557
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1562
1558
|
] });
|
|
1563
|
-
},
|
|
1564
|
-
const [e, t] =
|
|
1559
|
+
}, oo = () => {
|
|
1560
|
+
const [e, t] = G(!1), { isLocked: n } = Ne(), { savePageAsync: s, saveState: r } = Oe();
|
|
1565
1561
|
re(() => {
|
|
1566
1562
|
const u = (f) => {
|
|
1567
1563
|
r === "UNSAVED" && (f.preventDefault(), f.returnValue = !1);
|
|
@@ -1577,7 +1573,7 @@ const ro = K(() => import("./unpublish-page-CuSJRr5c.js")), ao = K(() => import(
|
|
|
1577
1573
|
case "UNSAVED":
|
|
1578
1574
|
return {
|
|
1579
1575
|
tooltipContent: X.SAVEDRAFT,
|
|
1580
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1576
|
+
buttonIcon: /* @__PURE__ */ c($a, { className: "h-4 w-4" }),
|
|
1581
1577
|
buttonClass: "gap-x-1"
|
|
1582
1578
|
};
|
|
1583
1579
|
case "SAVING":
|
|
@@ -1589,7 +1585,7 @@ const ro = K(() => import("./unpublish-page-CuSJRr5c.js")), ao = K(() => import(
|
|
|
1589
1585
|
case "SAVED":
|
|
1590
1586
|
return {
|
|
1591
1587
|
tooltipContent: X.SAVED,
|
|
1592
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1588
|
+
buttonIcon: /* @__PURE__ */ c(Ha, { className: "h-4 w-4" }),
|
|
1593
1589
|
buttonClass: "text-green-500 gap-x-1"
|
|
1594
1590
|
};
|
|
1595
1591
|
}
|
|
@@ -1599,8 +1595,8 @@ const ro = K(() => import("./unpublish-page-CuSJRr5c.js")), ao = K(() => import(
|
|
|
1599
1595
|
" ",
|
|
1600
1596
|
l
|
|
1601
1597
|
] });
|
|
1602
|
-
},
|
|
1603
|
-
const { selectedLang: e } = Re(), { data: t } = Ie(), { data: n } = Ue(), [s, r] =
|
|
1598
|
+
}, lo = () => {
|
|
1599
|
+
const { selectedLang: e } = Re(), { data: t } = Ie(), { data: n } = Ue(), [s, r] = G(!1), [a, i] = G(!1), [o, l] = G(null), { savePageAsync: u } = Oe(), [f, d] = G(!1), { data: h } = oe(), { mutate: g, isPending: E } = Bs(), { needTranslations: S } = Oe(), T = S(), { buttonText: p, buttonClassName: A, isPublished: w } = $(() => {
|
|
1604
1600
|
const k = h && (h == null ? void 0 : h.online);
|
|
1605
1601
|
return {
|
|
1606
1602
|
buttonClassName: k ? "hover:bg-green-600 bg-green-500" : "",
|
|
@@ -1637,14 +1633,14 @@ const ro = K(() => import("./unpublish-page-CuSJRr5c.js")), ao = K(() => import(
|
|
|
1637
1633
|
"span",
|
|
1638
1634
|
{
|
|
1639
1635
|
className: `flex items-center transition-transform duration-300 ease-in-out ${a ? "-translate-y-10" : ""}`,
|
|
1640
|
-
children: w ? /* @__PURE__ */ c(
|
|
1636
|
+
children: w ? /* @__PURE__ */ c(zn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Yn, { className: "h-4 w-4" })
|
|
1641
1637
|
}
|
|
1642
1638
|
),
|
|
1643
1639
|
/* @__PURE__ */ c(
|
|
1644
1640
|
"span",
|
|
1645
1641
|
{
|
|
1646
1642
|
className: `absolute inset-0 left-3 flex items-center transition-transform duration-300 ease-in-out ${a ? "" : "translate-y-10"}`,
|
|
1647
|
-
children: w ? /* @__PURE__ */ c(Yn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(
|
|
1643
|
+
children: w ? /* @__PURE__ */ c(Yn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(zn, { className: "h-4 w-4" })
|
|
1648
1644
|
}
|
|
1649
1645
|
),
|
|
1650
1646
|
/* @__PURE__ */ c("span", { children: p }),
|
|
@@ -1699,10 +1695,10 @@ const ro = K(() => import("./unpublish-page-CuSJRr5c.js")), ao = K(() => import(
|
|
|
1699
1695
|
] })
|
|
1700
1696
|
] })
|
|
1701
1697
|
] }),
|
|
1702
|
-
/* @__PURE__ */ c(
|
|
1703
|
-
o && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
1698
|
+
/* @__PURE__ */ c(Zi, { showModal: s, onClose: () => r(!1) }),
|
|
1699
|
+
o && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(so, { page: o, onClose: () => l(null) }) }),
|
|
1704
1700
|
f && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
1705
|
-
|
|
1701
|
+
ro,
|
|
1706
1702
|
{
|
|
1707
1703
|
isOpen: f,
|
|
1708
1704
|
onClose: Te,
|
|
@@ -1712,17 +1708,17 @@ const ro = K(() => import("./unpublish-page-CuSJRr5c.js")), ao = K(() => import(
|
|
|
1712
1708
|
) })
|
|
1713
1709
|
] });
|
|
1714
1710
|
};
|
|
1715
|
-
function
|
|
1716
|
-
const { isLocked: e } = Ne(), [t] = le(), n = t.get("lang"), s =
|
|
1711
|
+
function co() {
|
|
1712
|
+
const { isLocked: e } = Ne(), [t] = le(), n = t.get("lang"), s = xs(n);
|
|
1717
1713
|
return e || !s ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-1", children: [
|
|
1718
1714
|
/* @__PURE__ */ c(Wi, {}),
|
|
1719
|
-
/* @__PURE__ */ c(cn, { permission: de.EDIT_THEME, children: /* @__PURE__ */ c(
|
|
1720
|
-
/* @__PURE__ */ c(
|
|
1721
|
-
/* @__PURE__ */ c(cn, { permission: de.SAVE_PAGE, children: /* @__PURE__ */ c(
|
|
1722
|
-
/* @__PURE__ */ c(cn, { permission: de.PUBLISH_PAGE, children: /* @__PURE__ */ c(
|
|
1715
|
+
/* @__PURE__ */ c(cn, { permission: de.EDIT_THEME, children: /* @__PURE__ */ c(io, {}) }),
|
|
1716
|
+
/* @__PURE__ */ c(ao, {}),
|
|
1717
|
+
/* @__PURE__ */ c(cn, { permission: de.SAVE_PAGE, children: /* @__PURE__ */ c(oo, {}) }),
|
|
1718
|
+
/* @__PURE__ */ c(cn, { permission: de.PUBLISH_PAGE, children: /* @__PURE__ */ c(lo, {}) })
|
|
1723
1719
|
] });
|
|
1724
1720
|
}
|
|
1725
|
-
const
|
|
1721
|
+
const uo = ({
|
|
1726
1722
|
page: e,
|
|
1727
1723
|
setDuplicatePage: t,
|
|
1728
1724
|
setAddEditPage: n,
|
|
@@ -1745,7 +1741,7 @@ const fo = ({
|
|
|
1745
1741
|
S.stopPropagation(), t(e);
|
|
1746
1742
|
},
|
|
1747
1743
|
children: [
|
|
1748
|
-
/* @__PURE__ */ c(
|
|
1744
|
+
/* @__PURE__ */ c(Qa, { className: "size-3" }),
|
|
1749
1745
|
"Duplicate page"
|
|
1750
1746
|
]
|
|
1751
1747
|
}
|
|
@@ -1761,7 +1757,7 @@ const fo = ({
|
|
|
1761
1757
|
});
|
|
1762
1758
|
},
|
|
1763
1759
|
children: [
|
|
1764
|
-
/* @__PURE__ */ c(
|
|
1760
|
+
/* @__PURE__ */ c(ja, { className: "size-3" }),
|
|
1765
1761
|
"Edit"
|
|
1766
1762
|
]
|
|
1767
1763
|
}
|
|
@@ -1787,7 +1783,7 @@ const fo = ({
|
|
|
1787
1783
|
S.stopPropagation(), r(e);
|
|
1788
1784
|
},
|
|
1789
1785
|
children: [
|
|
1790
|
-
/* @__PURE__ */ c(
|
|
1786
|
+
/* @__PURE__ */ c(za, { className: "size-3" }),
|
|
1791
1787
|
X.DELETE
|
|
1792
1788
|
]
|
|
1793
1789
|
}
|
|
@@ -1819,8 +1815,8 @@ const fo = ({
|
|
|
1819
1815
|
) })
|
|
1820
1816
|
] })
|
|
1821
1817
|
] });
|
|
1822
|
-
},
|
|
1823
|
-
const [e, t] =
|
|
1818
|
+
}, fo = K(() => import("./add-new-page-DESlqvED.js")), ho = K(() => import("./delete-page-BP1Df8QL.js")), go = K(() => import("./duplicate-page-B1j0H7gP.js")), mo = K(() => import("./mark-as-template-L9cHzL84.js")), Eo = K(() => import("./unmark-as-template-Dcpkj7EZ.js")), po = K(() => import("./unpublish-page-CPLlsfm4.js")), yo = () => {
|
|
1819
|
+
const [e, t] = G(null), [n, s] = G(null), [r, a] = G(null), [i, o] = G(null), [l, u] = G(null), [f, d] = G(null), { data: h, isFetching: g } = Ie(), { selectedLang: E, fallbackLang: S } = Re(), { data: T } = Ue(), p = T == null ? void 0 : T.find((b) => b.lang === E), { isLocked: A } = Ne(), w = !(h != null && h.slug), [, D] = ne(On);
|
|
1824
1820
|
if (!h) return null;
|
|
1825
1821
|
const U = (b) => {
|
|
1826
1822
|
E.length > 0 && E !== S ? D({
|
|
@@ -1837,7 +1833,7 @@ const fo = ({
|
|
|
1837
1833
|
className: "flex h-7 max-w-[200px] cursor-pointer items-center truncate rounded px-1 text-xs font-medium",
|
|
1838
1834
|
variant: "ghost",
|
|
1839
1835
|
children: g ? /* @__PURE__ */ c(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: [
|
|
1840
|
-
w ? /* @__PURE__ */ c(
|
|
1836
|
+
w ? /* @__PURE__ */ c(Ya, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ c(Ja, { className: "mr-1 h-4 w-4" }),
|
|
1841
1837
|
H(p || h, "name") ?? ""
|
|
1842
1838
|
] })
|
|
1843
1839
|
}
|
|
@@ -1851,7 +1847,7 @@ const fo = ({
|
|
|
1851
1847
|
children: /* @__PURE__ */ c(Xn, { className: "h-4 w-4" })
|
|
1852
1848
|
}
|
|
1853
1849
|
) : /* @__PURE__ */ c(
|
|
1854
|
-
|
|
1850
|
+
uo,
|
|
1855
1851
|
{
|
|
1856
1852
|
page: h,
|
|
1857
1853
|
setDuplicatePage: (b) => u(b),
|
|
@@ -1866,7 +1862,7 @@ const fo = ({
|
|
|
1866
1862
|
)
|
|
1867
1863
|
] }),
|
|
1868
1864
|
f && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
1869
|
-
|
|
1865
|
+
fo,
|
|
1870
1866
|
{
|
|
1871
1867
|
closePanel: () => d(null),
|
|
1872
1868
|
editPage: () => {
|
|
@@ -1875,12 +1871,12 @@ const fo = ({
|
|
|
1875
1871
|
setAddEditPage: d
|
|
1876
1872
|
}
|
|
1877
1873
|
) }),
|
|
1878
|
-
e && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
1879
|
-
n && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
1880
|
-
r && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
1881
|
-
i && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
1874
|
+
e && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(ho, { page: e, onClose: () => t(null) }) }),
|
|
1875
|
+
n && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(po, { page: n, onClose: () => s(null) }) }),
|
|
1876
|
+
r && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(mo, { page: r, onClose: () => a(null) }) }),
|
|
1877
|
+
i && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(Eo, { page: i, onClose: () => o(null) }) }),
|
|
1882
1878
|
l && /* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
1883
|
-
|
|
1879
|
+
go,
|
|
1884
1880
|
{
|
|
1885
1881
|
page: l,
|
|
1886
1882
|
onClose: () => u(null),
|
|
@@ -1888,7 +1884,7 @@ const fo = ({
|
|
|
1888
1884
|
}
|
|
1889
1885
|
) })
|
|
1890
1886
|
] });
|
|
1891
|
-
},
|
|
1887
|
+
}, Ms = ({ children: e, className: t = "" }) => /* @__PURE__ */ c(
|
|
1892
1888
|
"div",
|
|
1893
1889
|
{
|
|
1894
1890
|
className: Vt(
|
|
@@ -1897,17 +1893,17 @@ const fo = ({
|
|
|
1897
1893
|
),
|
|
1898
1894
|
children: e
|
|
1899
1895
|
}
|
|
1900
|
-
),
|
|
1896
|
+
), Ao = ({ hasDynamicPage: e }) => /* @__PURE__ */ c(Ms, { 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: [
|
|
1901
1897
|
/* @__PURE__ */ c("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
|
|
1902
1898
|
/* @__PURE__ */ c("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" })
|
|
1903
|
-
] }) }),
|
|
1904
|
-
const { dynamicPage: e, allLangPages: t, isFetching: n } =
|
|
1899
|
+
] }) }), To = K(() => import("./dynamic-page-selector-Crjyco6l.js")), So = () => {
|
|
1900
|
+
const { dynamicPage: e, allLangPages: t, isFetching: n } = bi(), s = t.length > 0;
|
|
1905
1901
|
return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
1906
|
-
!e && /* @__PURE__ */ c(
|
|
1907
|
-
/* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(
|
|
1902
|
+
!e && /* @__PURE__ */ c(Ao, { hasDynamicPage: s }),
|
|
1903
|
+
/* @__PURE__ */ c(V, { children: /* @__PURE__ */ c(To, {}) })
|
|
1908
1904
|
] });
|
|
1909
|
-
},
|
|
1910
|
-
const { data: e, isFetching: t } = Ie(), { data: n, isFetching: s } = oe(), r = H(n, "dynamic", !1), a = Dn(), i =
|
|
1905
|
+
}, _o = () => {
|
|
1906
|
+
const { data: e, isFetching: t } = Ie(), { data: n, isFetching: s } = oe(), r = H(n, "dynamic", !1), a = Dn(), i = Xr("dynamic-page-selector"), o = e == null ? void 0 : e.slug, l = !o, u = Li(), f = t || s, h = (l ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
|
|
1911
1907
|
return /* @__PURE__ */ m("div", { className: "relative flex items-center gap-x-1", children: [
|
|
1912
1908
|
/* @__PURE__ */ c(
|
|
1913
1909
|
"div",
|
|
@@ -1916,7 +1912,7 @@ const fo = ({
|
|
|
1916
1912
|
"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",
|
|
1917
1913
|
f && "max-w-0 overflow-hidden opacity-0"
|
|
1918
1914
|
),
|
|
1919
|
-
children: /* @__PURE__ */ c(
|
|
1915
|
+
children: /* @__PURE__ */ c(yo, {})
|
|
1920
1916
|
}
|
|
1921
1917
|
),
|
|
1922
1918
|
/* @__PURE__ */ m(
|
|
@@ -1927,7 +1923,7 @@ const fo = ({
|
|
|
1927
1923
|
f && "max-w-0 overflow-hidden opacity-0"
|
|
1928
1924
|
),
|
|
1929
1925
|
children: [
|
|
1930
|
-
/* @__PURE__ */ c(
|
|
1926
|
+
/* @__PURE__ */ c(Hi, {}),
|
|
1931
1927
|
/* @__PURE__ */ m("div", { className: "flex w-full items-center overflow-hidden", children: [
|
|
1932
1928
|
/* @__PURE__ */ c(
|
|
1933
1929
|
"div",
|
|
@@ -1939,18 +1935,18 @@ const fo = ({
|
|
|
1939
1935
|
] }) : h
|
|
1940
1936
|
}
|
|
1941
1937
|
),
|
|
1942
|
-
!l && /* @__PURE__ */ c("a", { href: u, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c("div", { className: "ml-2 mr-px flex-shrink-0 rounded-sm p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300", children: /* @__PURE__ */ c(
|
|
1938
|
+
!l && /* @__PURE__ */ c("a", { href: u, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c("div", { className: "ml-2 mr-px flex-shrink-0 rounded-sm p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300", children: /* @__PURE__ */ c(Xa, { className: "h-4 w-4", strokeWidth: 1 }) }) })
|
|
1943
1939
|
] })
|
|
1944
1940
|
]
|
|
1945
1941
|
}
|
|
1946
1942
|
),
|
|
1947
|
-
r && i && /* @__PURE__ */ c(
|
|
1943
|
+
r && i && /* @__PURE__ */ c(So, {})
|
|
1948
1944
|
] });
|
|
1949
|
-
},
|
|
1950
|
-
/* @__PURE__ */ c(
|
|
1951
|
-
/* @__PURE__ */ c(
|
|
1952
|
-
/* @__PURE__ */ c(
|
|
1953
|
-
] }),
|
|
1945
|
+
}, Po = () => /* @__PURE__ */ m("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
|
|
1946
|
+
/* @__PURE__ */ c($i, {}),
|
|
1947
|
+
/* @__PURE__ */ c(_o, {}),
|
|
1948
|
+
/* @__PURE__ */ c(co, {})
|
|
1949
|
+
] }), Fs = () => {
|
|
1954
1950
|
const e = ee(), { data: t } = ie({
|
|
1955
1951
|
queryKey: [y.AI_CONTEXT],
|
|
1956
1952
|
initialData: "",
|
|
@@ -1963,8 +1959,8 @@ const fo = ({
|
|
|
1963
1959
|
},
|
|
1964
1960
|
[e]
|
|
1965
1961
|
), aiContext: t };
|
|
1966
|
-
},
|
|
1967
|
-
const e = B(), { aiContext: t } =
|
|
1962
|
+
}, wo = () => {
|
|
1963
|
+
const e = B(), { aiContext: t } = Fs(), n = R();
|
|
1968
1964
|
return q(
|
|
1969
1965
|
async (s, r, a, i) => n(e, {
|
|
1970
1966
|
action: y.ASK_AI,
|
|
@@ -1972,36 +1968,36 @@ const fo = ({
|
|
|
1972
1968
|
}),
|
|
1973
1969
|
[e, t, n]
|
|
1974
1970
|
);
|
|
1975
|
-
},
|
|
1971
|
+
}, vo = (e, t) => t.map((n) => {
|
|
1976
1972
|
if (Y(e, n._type)) {
|
|
1977
|
-
const s =
|
|
1973
|
+
const s = li(n._type);
|
|
1978
1974
|
return {
|
|
1979
1975
|
...s,
|
|
1980
1976
|
...In(n, [
|
|
1981
|
-
...
|
|
1977
|
+
...Mr(s),
|
|
1982
1978
|
"_type",
|
|
1983
1979
|
"_id",
|
|
1984
1980
|
"_name",
|
|
1985
1981
|
"_parent",
|
|
1986
1982
|
"_bindings"
|
|
1987
1983
|
]),
|
|
1988
|
-
...
|
|
1984
|
+
...Fr(n, (r, a) => qr(a, "_attrs")),
|
|
1989
1985
|
...n
|
|
1990
1986
|
};
|
|
1991
1987
|
}
|
|
1992
1988
|
return n;
|
|
1993
|
-
}),
|
|
1994
|
-
const t =
|
|
1989
|
+
}), bo = (e) => {
|
|
1990
|
+
const t = oi();
|
|
1995
1991
|
return $(() => {
|
|
1996
1992
|
if (!e || me(e)) return { blocks: [] };
|
|
1997
1993
|
const n = Ss(
|
|
1998
1994
|
e,
|
|
1999
|
-
(s) => !
|
|
1995
|
+
(s) => !Br(s == null ? void 0 : s._type, "@chai/")
|
|
2000
1996
|
);
|
|
2001
|
-
return { blocks:
|
|
1997
|
+
return { blocks: vo(t, n) };
|
|
2002
1998
|
}, [e, t]);
|
|
2003
|
-
},
|
|
2004
|
-
const [e] = le(), t = e.get("page"), n = B(), { setAiContext: s } =
|
|
1999
|
+
}, Io = () => {
|
|
2000
|
+
const [e] = le(), t = e.get("page"), n = B(), { setAiContext: s } = Fs(), [, r] = xn(), [, a] = Ci(), [, i] = Zr(), o = R();
|
|
2005
2001
|
return ie({
|
|
2006
2002
|
queryKey: [y.GET_DRAFT_PAGE, t],
|
|
2007
2003
|
staleTime: 1 / 0,
|
|
@@ -2016,7 +2012,7 @@ const fo = ({
|
|
|
2016
2012
|
},
|
|
2017
2013
|
enabled: !!t
|
|
2018
2014
|
});
|
|
2019
|
-
},
|
|
2015
|
+
}, No = () => {
|
|
2020
2016
|
const { data: e } = oe(), { data: t } = Ie(), n = B(), s = R(), r = Rn(), a = Dn();
|
|
2021
2017
|
return ie({
|
|
2022
2018
|
queryKey: [y.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id, a],
|
|
@@ -2046,7 +2042,7 @@ const fo = ({
|
|
|
2046
2042
|
}),
|
|
2047
2043
|
enabled: !!(e != null && e.pageType) && !!t.id
|
|
2048
2044
|
});
|
|
2049
|
-
},
|
|
2045
|
+
}, Co = () => {
|
|
2050
2046
|
const e = B(), t = ee(), n = R();
|
|
2051
2047
|
return se({
|
|
2052
2048
|
mutationFn: async (s) => n(e, {
|
|
@@ -2057,10 +2053,10 @@ const fo = ({
|
|
|
2057
2053
|
var a;
|
|
2058
2054
|
t.invalidateQueries({
|
|
2059
2055
|
queryKey: [y.GET_WEBSITE_DRAFT_SETTINGS]
|
|
2060
|
-
}), (a = r == null ? void 0 : r.settings) != null && a.theme ||
|
|
2056
|
+
}), (a = r == null ? void 0 : r.settings) != null && a.theme || W.success("Website settings updated successfully.");
|
|
2061
2057
|
},
|
|
2062
2058
|
onError: (s) => {
|
|
2063
|
-
|
|
2059
|
+
W.error("Failed to update website settings", {
|
|
2064
2060
|
description: s.message
|
|
2065
2061
|
});
|
|
2066
2062
|
}
|
|
@@ -2072,10 +2068,10 @@ const fo = ({
|
|
|
2072
2068
|
onSuccess: () => {
|
|
2073
2069
|
t.invalidateQueries({
|
|
2074
2070
|
queryKey: [y.GET_APP_SHARED_JSONLD]
|
|
2075
|
-
}),
|
|
2071
|
+
}), W.success("Shared JSON-LD updated successfully.");
|
|
2076
2072
|
},
|
|
2077
2073
|
onError: (s) => {
|
|
2078
|
-
|
|
2074
|
+
W.error("Failed to update shared JSON-LD", {
|
|
2079
2075
|
description: s.message
|
|
2080
2076
|
});
|
|
2081
2077
|
}
|
|
@@ -2086,7 +2082,7 @@ const fo = ({
|
|
|
2086
2082
|
action: "GET_LIBRARY_ITEM",
|
|
2087
2083
|
data: { id: e.id }
|
|
2088
2084
|
}), r = H(s, "html", ""), a = H(s, "blocks", []);
|
|
2089
|
-
return
|
|
2085
|
+
return Kr(a) ? a : ta(r);
|
|
2090
2086
|
},
|
|
2091
2087
|
async getUILibraryBlocks(e, t, n) {
|
|
2092
2088
|
try {
|
|
@@ -2100,7 +2096,7 @@ const fo = ({
|
|
|
2100
2096
|
return console.error(s), [];
|
|
2101
2097
|
}
|
|
2102
2098
|
}
|
|
2103
|
-
},
|
|
2099
|
+
}, Lo = () => {
|
|
2104
2100
|
const e = B(), t = R();
|
|
2105
2101
|
return ie({
|
|
2106
2102
|
queryKey: ["uiLibraries"],
|
|
@@ -2110,7 +2106,7 @@ const fo = ({
|
|
|
2110
2106
|
...r
|
|
2111
2107
|
}));
|
|
2112
2108
|
return s.forEach((r) => {
|
|
2113
|
-
|
|
2109
|
+
ea(r.id, {
|
|
2114
2110
|
name: r.isSiteLibrary ? r.name + " (Current Site) " : r.name,
|
|
2115
2111
|
description: r.description,
|
|
2116
2112
|
getBlocksList: (a) => ns.getUILibraryBlocks(a, t, e),
|
|
@@ -2119,7 +2115,7 @@ const fo = ({
|
|
|
2119
2115
|
}), s;
|
|
2120
2116
|
}
|
|
2121
2117
|
});
|
|
2122
|
-
},
|
|
2118
|
+
}, ko = () => {
|
|
2123
2119
|
const e = Zt(), t = R(), { user: n } = Ae(), s = n == null ? void 0 : n.id;
|
|
2124
2120
|
return ie({
|
|
2125
2121
|
queryKey: [y.GET_ROLE_AND_PERMISSIONS, s],
|
|
@@ -2130,8 +2126,8 @@ const fo = ({
|
|
|
2130
2126
|
enabled: !!s,
|
|
2131
2127
|
staleTime: 1 / 0
|
|
2132
2128
|
});
|
|
2133
|
-
},
|
|
2134
|
-
const e = B(), t = R(), [, n] =
|
|
2129
|
+
}, Do = () => {
|
|
2130
|
+
const e = B(), t = R(), [, n] = xn();
|
|
2135
2131
|
return { onSave: async ({
|
|
2136
2132
|
page: r,
|
|
2137
2133
|
blocks: a,
|
|
@@ -2158,7 +2154,7 @@ const fo = ({
|
|
|
2158
2154
|
for (const r of e ?? [])
|
|
2159
2155
|
me(r == null ? void 0 : r.slug) && (s[r.id] = {
|
|
2160
2156
|
type: r.pageType,
|
|
2161
|
-
name:
|
|
2157
|
+
name: Vr(r.name ?? r.slug),
|
|
2162
2158
|
description: ""
|
|
2163
2159
|
});
|
|
2164
2160
|
return s;
|
|
@@ -2182,8 +2178,8 @@ const fo = ({
|
|
|
2182
2178
|
}, ss = Mt.object({
|
|
2183
2179
|
email: Mt.string().email({ message: "Please enter a valid email address" }),
|
|
2184
2180
|
password: Mt.string().min(6, { message: "Password must be at least 6 characters" })
|
|
2185
|
-
}),
|
|
2186
|
-
const { setUser: e, logout: t } = Ae(), n = Zt(), [s, r] =
|
|
2181
|
+
}), Go = () => {
|
|
2182
|
+
const { setUser: e, logout: t } = Ae(), n = Zt(), [s, r] = G(""), [a, i] = G(""), [o, l] = G({}), [u, f] = G(!1), [d, h] = G(""), g = se({
|
|
2187
2183
|
mutationFn: async (T) => {
|
|
2188
2184
|
h("");
|
|
2189
2185
|
const p = await en(n, {
|
|
@@ -2226,12 +2222,12 @@ const fo = ({
|
|
|
2226
2222
|
}
|
|
2227
2223
|
}
|
|
2228
2224
|
}, S = ss.safeParse({ email: s, password: a }).success;
|
|
2229
|
-
return /* @__PURE__ */ c("div", { className: "flex min-h-screen items-center justify-center bg-slate-50", children: /* @__PURE__ */ m(
|
|
2230
|
-
/* @__PURE__ */ m(
|
|
2231
|
-
/* @__PURE__ */ c(
|
|
2232
|
-
/* @__PURE__ */ c(
|
|
2225
|
+
return /* @__PURE__ */ c("div", { className: "flex min-h-screen items-center justify-center bg-slate-50", children: /* @__PURE__ */ m(da, { className: "w-full max-w-md", children: [
|
|
2226
|
+
/* @__PURE__ */ m(fa, { children: [
|
|
2227
|
+
/* @__PURE__ */ c(ha, { className: "text-2xl", children: "Sign in" }),
|
|
2228
|
+
/* @__PURE__ */ c(ga, { children: "Enter your credentials to sign in to visual builder" })
|
|
2233
2229
|
] }),
|
|
2234
|
-
/* @__PURE__ */ c(
|
|
2230
|
+
/* @__PURE__ */ c(ma, { children: /* @__PURE__ */ m("form", { onSubmit: E, className: "space-y-4", children: [
|
|
2235
2231
|
/* @__PURE__ */ m("div", { className: "space-y-1", children: [
|
|
2236
2232
|
/* @__PURE__ */ c($n, { htmlFor: "email", children: "Email" }),
|
|
2237
2233
|
/* @__PURE__ */ c(
|
|
@@ -2267,7 +2263,7 @@ const fo = ({
|
|
|
2267
2263
|
type: "button",
|
|
2268
2264
|
className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",
|
|
2269
2265
|
onClick: () => f(!u),
|
|
2270
|
-
children: u ? /* @__PURE__ */ c(
|
|
2266
|
+
children: u ? /* @__PURE__ */ c(Za, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Cs, { className: "h-4 w-4" })
|
|
2271
2267
|
}
|
|
2272
2268
|
)
|
|
2273
2269
|
] }),
|
|
@@ -2279,7 +2275,7 @@ const fo = ({
|
|
|
2279
2275
|
"Logging in..."
|
|
2280
2276
|
] }) : "Login" })
|
|
2281
2277
|
] }) }),
|
|
2282
|
-
/* @__PURE__ */ m(
|
|
2278
|
+
/* @__PURE__ */ m(Ea, { className: "flex flex-col justify-center", children: [
|
|
2283
2279
|
/* @__PURE__ */ m("p", { className: "text-sm text-muted-foreground", children: [
|
|
2284
2280
|
"Forgot your password?",
|
|
2285
2281
|
" ",
|
|
@@ -2313,25 +2309,25 @@ const fo = ({
|
|
|
2313
2309
|
] })
|
|
2314
2310
|
] }) });
|
|
2315
2311
|
};
|
|
2316
|
-
let En =
|
|
2317
|
-
const
|
|
2312
|
+
let En = Go;
|
|
2313
|
+
const Oo = () => $(() => En, [En]), iu = (e) => {
|
|
2318
2314
|
En = e;
|
|
2319
2315
|
}, rs = () => {
|
|
2320
|
-
const e =
|
|
2316
|
+
const e = Oo();
|
|
2321
2317
|
return /* @__PURE__ */ c(V, { fallback: /* @__PURE__ */ c("div", { children: "Loading..." }), children: /* @__PURE__ */ c(e, {}) });
|
|
2322
|
-
},
|
|
2318
|
+
}, Ro = K(() => import("./lang-panel-B3tr2uhr.js")), Uo = ({ isActive: e, show: t }) => {
|
|
2323
2319
|
const { data: n } = Be();
|
|
2324
|
-
return !Y(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(
|
|
2325
|
-
},
|
|
2326
|
-
id:
|
|
2320
|
+
return !Y(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(ei, { className: "h-4 w-4" }) });
|
|
2321
|
+
}, qs = "lang", Bo = {
|
|
2322
|
+
id: qs,
|
|
2327
2323
|
label: "Languages",
|
|
2328
2324
|
position: "top",
|
|
2329
|
-
panel:
|
|
2330
|
-
button:
|
|
2325
|
+
panel: Ro,
|
|
2326
|
+
button: Uo,
|
|
2331
2327
|
view: "modal",
|
|
2332
2328
|
width: 400
|
|
2333
|
-
},
|
|
2334
|
-
const { data: n } = oe(), s =
|
|
2329
|
+
}, Mo = K(() => import("./seo-panel-Dhhpe_7z.js")), Ks = "seo", Fo = ({ isActive: e, show: t }) => {
|
|
2330
|
+
const { data: n } = oe(), s = Yi(n == null ? void 0 : n.pageType);
|
|
2335
2331
|
return !Y(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(M, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
|
|
2336
2332
|
"svg",
|
|
2337
2333
|
{
|
|
@@ -2350,35 +2346,35 @@ const Ro = () => $(() => En, [En]), iu = (e) => {
|
|
|
2350
2346
|
]
|
|
2351
2347
|
}
|
|
2352
2348
|
) });
|
|
2353
|
-
},
|
|
2354
|
-
id:
|
|
2349
|
+
}, qo = {
|
|
2350
|
+
id: Ks,
|
|
2355
2351
|
label: "SEO",
|
|
2356
|
-
panel:
|
|
2357
|
-
button:
|
|
2352
|
+
panel: Mo,
|
|
2353
|
+
button: Fo,
|
|
2358
2354
|
position: "top",
|
|
2359
2355
|
width: 600,
|
|
2360
2356
|
view: "modal"
|
|
2361
|
-
},
|
|
2357
|
+
}, Vs = "user-info", Ko = () => {
|
|
2362
2358
|
const { user: e, logout: t } = Ae(), n = ye("onLogout", As);
|
|
2363
|
-
return e ? /* @__PURE__ */ m(
|
|
2364
|
-
/* @__PURE__ */ c(
|
|
2365
|
-
/* @__PURE__ */ m(
|
|
2359
|
+
return e ? /* @__PURE__ */ m(pa, { children: [
|
|
2360
|
+
/* @__PURE__ */ c(ya, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ c(ti, { className: "h-4 w-4" }) }) }),
|
|
2361
|
+
/* @__PURE__ */ m(Aa, { className: "w-auto space-y-2 p-4", children: [
|
|
2366
2362
|
/* @__PURE__ */ c("div", { className: "text-sm font-medium", children: e.name ?? e.email }),
|
|
2367
2363
|
/* @__PURE__ */ c("div", { className: "text-xs text-muted-foreground", children: e.email }),
|
|
2368
|
-
/* @__PURE__ */ m(
|
|
2369
|
-
/* @__PURE__ */ c(
|
|
2370
|
-
/* @__PURE__ */ m(
|
|
2371
|
-
/* @__PURE__ */ m(
|
|
2372
|
-
/* @__PURE__ */ c(
|
|
2373
|
-
/* @__PURE__ */ c(
|
|
2364
|
+
/* @__PURE__ */ m(Ta, { children: [
|
|
2365
|
+
/* @__PURE__ */ c(Sa, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "outline", size: "sm", className: "w-full", children: "Logout" }) }),
|
|
2366
|
+
/* @__PURE__ */ m(_a, { children: [
|
|
2367
|
+
/* @__PURE__ */ m(Pa, { children: [
|
|
2368
|
+
/* @__PURE__ */ c(wa, { children: "Are you sure you want to logout?" }),
|
|
2369
|
+
/* @__PURE__ */ c(va, { children: "You will be redirected to the login page." })
|
|
2374
2370
|
] }),
|
|
2375
|
-
/* @__PURE__ */ m(
|
|
2376
|
-
/* @__PURE__ */ c(
|
|
2371
|
+
/* @__PURE__ */ m(ba, { children: [
|
|
2372
|
+
/* @__PURE__ */ c(Ia, { children: "Cancel" }),
|
|
2377
2373
|
/* @__PURE__ */ c(
|
|
2378
|
-
|
|
2374
|
+
Na,
|
|
2379
2375
|
{
|
|
2380
2376
|
onClick: () => {
|
|
2381
|
-
t(),
|
|
2377
|
+
t(), Hr(n) && n();
|
|
2382
2378
|
},
|
|
2383
2379
|
children: "Logout"
|
|
2384
2380
|
}
|
|
@@ -2388,13 +2384,13 @@ const Ro = () => $(() => En, [En]), iu = (e) => {
|
|
|
2388
2384
|
] })
|
|
2389
2385
|
] })
|
|
2390
2386
|
] }) : null;
|
|
2391
|
-
},
|
|
2392
|
-
id:
|
|
2387
|
+
}, Vo = {
|
|
2388
|
+
id: Vs,
|
|
2393
2389
|
label: "User Info",
|
|
2394
|
-
button:
|
|
2390
|
+
button: Ko,
|
|
2395
2391
|
position: "bottom"
|
|
2396
|
-
},
|
|
2397
|
-
rn(
|
|
2392
|
+
}, Ho = () => {
|
|
2393
|
+
rn(Ks, qo), rn(qs, Bo), rn(Vs, Vo);
|
|
2398
2394
|
};
|
|
2399
2395
|
var P = {
|
|
2400
2396
|
context: void 0,
|
|
@@ -2415,26 +2411,26 @@ function as(e) {
|
|
|
2415
2411
|
function lt(e) {
|
|
2416
2412
|
P.context = e;
|
|
2417
2413
|
}
|
|
2418
|
-
var
|
|
2419
|
-
equals:
|
|
2420
|
-
},
|
|
2414
|
+
var Hs = !1, $o = (e, t) => e === t, Ht = Symbol("solid-proxy"), $s = typeof Proxy == "function", Qs = Symbol("solid-track"), $t = {
|
|
2415
|
+
equals: $o
|
|
2416
|
+
}, js = er, Pe = 1, Qt = 2, Ws = {
|
|
2421
2417
|
owned: null,
|
|
2422
2418
|
cleanups: null,
|
|
2423
2419
|
context: null,
|
|
2424
2420
|
owner: null
|
|
2425
|
-
}, dn = {}, N = null, fn = null,
|
|
2426
|
-
function
|
|
2427
|
-
const n =
|
|
2421
|
+
}, dn = {}, N = null, fn = null, Qo = null, x = null, te = null, _e = null, tn = 0;
|
|
2422
|
+
function xe(e, t) {
|
|
2423
|
+
const n = x, s = N, r = e.length === 0, a = t === void 0 ? s : t, i = r ? Ws : {
|
|
2428
2424
|
owned: null,
|
|
2429
2425
|
cleanups: null,
|
|
2430
2426
|
context: a ? a.context : null,
|
|
2431
2427
|
owner: a
|
|
2432
2428
|
}, o = r ? e : () => e(() => Z(() => gt(i)));
|
|
2433
|
-
N = i,
|
|
2429
|
+
N = i, x = null;
|
|
2434
2430
|
try {
|
|
2435
2431
|
return Ee(o, !0);
|
|
2436
2432
|
} finally {
|
|
2437
|
-
|
|
2433
|
+
x = n, N = s;
|
|
2438
2434
|
}
|
|
2439
2435
|
}
|
|
2440
2436
|
function F(e, t) {
|
|
@@ -2444,31 +2440,31 @@ function F(e, t) {
|
|
|
2444
2440
|
observers: null,
|
|
2445
2441
|
observerSlots: null,
|
|
2446
2442
|
comparator: t.equals || void 0
|
|
2447
|
-
}, s = (r) => (typeof r == "function" && (r = r(n.value)),
|
|
2448
|
-
return [
|
|
2443
|
+
}, s = (r) => (typeof r == "function" && (r = r(n.value)), Zs(n, r));
|
|
2444
|
+
return [Xs.bind(n), s];
|
|
2449
2445
|
}
|
|
2450
|
-
function
|
|
2446
|
+
function jo(e, t, n) {
|
|
2451
2447
|
const s = nn(e, t, !0, Pe);
|
|
2452
2448
|
at(s);
|
|
2453
2449
|
}
|
|
2454
|
-
function
|
|
2450
|
+
function Ge(e, t, n) {
|
|
2455
2451
|
const s = nn(e, t, !1, Pe);
|
|
2456
2452
|
at(s);
|
|
2457
2453
|
}
|
|
2458
|
-
function
|
|
2459
|
-
|
|
2454
|
+
function zs(e, t, n) {
|
|
2455
|
+
js = nl;
|
|
2460
2456
|
const s = nn(e, t, !1, Pe);
|
|
2461
2457
|
(!n || !n.render) && (s.user = !0), _e ? _e.push(s) : at(s);
|
|
2462
2458
|
}
|
|
2463
2459
|
function J(e, t, n) {
|
|
2464
2460
|
n = n ? Object.assign({}, $t, n) : $t;
|
|
2465
2461
|
const s = nn(e, t, !0, 0);
|
|
2466
|
-
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, at(s),
|
|
2462
|
+
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, at(s), Xs.bind(s);
|
|
2467
2463
|
}
|
|
2468
2464
|
function Wo(e) {
|
|
2469
2465
|
return e && typeof e == "object" && "then" in e;
|
|
2470
2466
|
}
|
|
2471
|
-
function
|
|
2467
|
+
function zo(e, t, n) {
|
|
2472
2468
|
let s, r, a;
|
|
2473
2469
|
s = !0, r = e, a = {};
|
|
2474
2470
|
let i = null, o = dn, l = null, u = !1, f = "initialValue" in a, d = typeof s == "function" && J(s);
|
|
@@ -2476,22 +2472,22 @@ function Yo(e, t, n) {
|
|
|
2476
2472
|
equals: !1
|
|
2477
2473
|
}), [w, D] = F(f ? "ready" : "unresolved");
|
|
2478
2474
|
P.context && (l = P.getNextContextId(), a.ssrLoadFrom === "initial" ? o = a.initialValue : P.load && P.has(l) && (o = P.load(l)));
|
|
2479
|
-
function U(v, I,
|
|
2475
|
+
function U(v, I, z, Q) {
|
|
2480
2476
|
return i === v && (i = null, Q !== void 0 && (f = !0), (v === o || I === o) && a.onHydrated && queueMicrotask(() => a.onHydrated(Q, {
|
|
2481
2477
|
value: I
|
|
2482
|
-
})), o = dn, b(I,
|
|
2478
|
+
})), o = dn, b(I, z)), I;
|
|
2483
2479
|
}
|
|
2484
2480
|
function b(v, I) {
|
|
2485
2481
|
Ee(() => {
|
|
2486
2482
|
I === void 0 && E(() => v), D(I !== void 0 ? "errored" : f ? "ready" : "unresolved"), T(I);
|
|
2487
|
-
for (const
|
|
2483
|
+
for (const z of h.keys()) z.decrement();
|
|
2488
2484
|
h.clear();
|
|
2489
2485
|
}, !1);
|
|
2490
2486
|
}
|
|
2491
2487
|
function Te() {
|
|
2492
|
-
const v =
|
|
2493
|
-
if (
|
|
2494
|
-
return
|
|
2488
|
+
const v = Zo, I = g(), z = S();
|
|
2489
|
+
if (z !== void 0 && !i) throw z;
|
|
2490
|
+
return x && x.user, I;
|
|
2495
2491
|
}
|
|
2496
2492
|
function Se(v = !0) {
|
|
2497
2493
|
if (v !== !1 && u) return;
|
|
@@ -2501,7 +2497,7 @@ function Yo(e, t, n) {
|
|
|
2501
2497
|
U(i, Z(g));
|
|
2502
2498
|
return;
|
|
2503
2499
|
}
|
|
2504
|
-
let
|
|
2500
|
+
let z;
|
|
2505
2501
|
const Q = o !== dn ? o : Z(() => {
|
|
2506
2502
|
try {
|
|
2507
2503
|
return r(I, {
|
|
@@ -2509,11 +2505,11 @@ function Yo(e, t, n) {
|
|
|
2509
2505
|
refetching: v
|
|
2510
2506
|
});
|
|
2511
2507
|
} catch (ce) {
|
|
2512
|
-
|
|
2508
|
+
z = ce;
|
|
2513
2509
|
}
|
|
2514
2510
|
});
|
|
2515
|
-
if (
|
|
2516
|
-
U(i, void 0, Ft(
|
|
2511
|
+
if (z !== void 0) {
|
|
2512
|
+
U(i, void 0, Ft(z), I);
|
|
2517
2513
|
return;
|
|
2518
2514
|
} else if (!Wo(Q))
|
|
2519
2515
|
return U(i, Q, void 0, I), Q;
|
|
@@ -2544,8 +2540,8 @@ function Yo(e, t, n) {
|
|
|
2544
2540
|
}
|
|
2545
2541
|
});
|
|
2546
2542
|
let k = N;
|
|
2547
|
-
return d ?
|
|
2548
|
-
refetch: (v) =>
|
|
2543
|
+
return d ? jo(() => (k = N, Se(!1))) : Se(!1), [Te, {
|
|
2544
|
+
refetch: (v) => Ys(k, () => Se(v)),
|
|
2549
2545
|
mutate: E
|
|
2550
2546
|
}];
|
|
2551
2547
|
}
|
|
@@ -2553,13 +2549,13 @@ function ou(e) {
|
|
|
2553
2549
|
return Ee(e, !1);
|
|
2554
2550
|
}
|
|
2555
2551
|
function Z(e) {
|
|
2556
|
-
if (
|
|
2557
|
-
const t =
|
|
2558
|
-
|
|
2552
|
+
if (x === null) return e();
|
|
2553
|
+
const t = x;
|
|
2554
|
+
x = null;
|
|
2559
2555
|
try {
|
|
2560
2556
|
return e();
|
|
2561
2557
|
} finally {
|
|
2562
|
-
|
|
2558
|
+
x = t;
|
|
2563
2559
|
}
|
|
2564
2560
|
}
|
|
2565
2561
|
function lu(e, t, n) {
|
|
@@ -2577,8 +2573,8 @@ function lu(e, t, n) {
|
|
|
2577
2573
|
return r = o, l;
|
|
2578
2574
|
};
|
|
2579
2575
|
}
|
|
2580
|
-
function
|
|
2581
|
-
|
|
2576
|
+
function Yo(e) {
|
|
2577
|
+
zs(() => Z(e));
|
|
2582
2578
|
}
|
|
2583
2579
|
function ht(e) {
|
|
2584
2580
|
return N === null || (N.cleanups === null ? N.cleanups = [e] : N.cleanups.push(e)), e;
|
|
@@ -2586,34 +2582,34 @@ function ht(e) {
|
|
|
2586
2582
|
function is() {
|
|
2587
2583
|
return N;
|
|
2588
2584
|
}
|
|
2589
|
-
function
|
|
2590
|
-
const n = N, s =
|
|
2591
|
-
N = e,
|
|
2585
|
+
function Ys(e, t) {
|
|
2586
|
+
const n = N, s = x;
|
|
2587
|
+
N = e, x = null;
|
|
2592
2588
|
try {
|
|
2593
2589
|
return Ee(t, !0);
|
|
2594
2590
|
} catch (r) {
|
|
2595
2591
|
Bn(r);
|
|
2596
2592
|
} finally {
|
|
2597
|
-
N = n,
|
|
2593
|
+
N = n, x = s;
|
|
2598
2594
|
}
|
|
2599
2595
|
}
|
|
2600
|
-
function
|
|
2601
|
-
const t =
|
|
2596
|
+
function Jo(e) {
|
|
2597
|
+
const t = x, n = N;
|
|
2602
2598
|
return Promise.resolve().then(() => {
|
|
2603
|
-
|
|
2599
|
+
x = t, N = n;
|
|
2604
2600
|
let s;
|
|
2605
|
-
return Ee(e, !1),
|
|
2601
|
+
return Ee(e, !1), x = N = null, s ? s.done : void 0;
|
|
2606
2602
|
});
|
|
2607
2603
|
}
|
|
2608
|
-
var [
|
|
2604
|
+
var [Xo, cu] = /* @__PURE__ */ F(!1);
|
|
2609
2605
|
function uu() {
|
|
2610
|
-
return [
|
|
2606
|
+
return [Xo, Jo];
|
|
2611
2607
|
}
|
|
2612
2608
|
function du(e, t) {
|
|
2613
2609
|
const n = Symbol("context");
|
|
2614
2610
|
return {
|
|
2615
2611
|
id: n,
|
|
2616
|
-
Provider:
|
|
2612
|
+
Provider: sl(n),
|
|
2617
2613
|
defaultValue: e
|
|
2618
2614
|
};
|
|
2619
2615
|
}
|
|
@@ -2621,56 +2617,56 @@ function fu(e) {
|
|
|
2621
2617
|
let t;
|
|
2622
2618
|
return N && N.context && (t = N.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
2623
2619
|
}
|
|
2624
|
-
function
|
|
2620
|
+
function Js(e) {
|
|
2625
2621
|
const t = J(e), n = J(() => pn(t()));
|
|
2626
2622
|
return n.toArray = () => {
|
|
2627
2623
|
const s = n();
|
|
2628
2624
|
return Array.isArray(s) ? s : s != null ? [s] : [];
|
|
2629
2625
|
}, n;
|
|
2630
2626
|
}
|
|
2631
|
-
var
|
|
2632
|
-
function
|
|
2627
|
+
var Zo;
|
|
2628
|
+
function Xs() {
|
|
2633
2629
|
if (this.sources && this.state)
|
|
2634
2630
|
if (this.state === Pe) at(this);
|
|
2635
2631
|
else {
|
|
2636
|
-
const e =
|
|
2637
|
-
|
|
2632
|
+
const e = te;
|
|
2633
|
+
te = null, Ee(() => Wt(this), !1), te = e;
|
|
2638
2634
|
}
|
|
2639
|
-
if (
|
|
2635
|
+
if (x) {
|
|
2640
2636
|
const e = this.observers ? this.observers.length : 0;
|
|
2641
|
-
|
|
2637
|
+
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]);
|
|
2642
2638
|
}
|
|
2643
2639
|
return this.value;
|
|
2644
2640
|
}
|
|
2645
|
-
function
|
|
2641
|
+
function Zs(e, t, n) {
|
|
2646
2642
|
let s = e.value;
|
|
2647
2643
|
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && Ee(() => {
|
|
2648
2644
|
for (let r = 0; r < e.observers.length; r += 1) {
|
|
2649
2645
|
const a = e.observers[r], i = fn && fn.running;
|
|
2650
|
-
i && fn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ?
|
|
2646
|
+
i && fn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? te.push(a) : _e.push(a), a.observers && tr(a)), i || (a.state = Pe);
|
|
2651
2647
|
}
|
|
2652
|
-
if (
|
|
2653
|
-
throw
|
|
2648
|
+
if (te.length > 1e6)
|
|
2649
|
+
throw te = [], new Error();
|
|
2654
2650
|
}, !1)), t;
|
|
2655
2651
|
}
|
|
2656
2652
|
function at(e) {
|
|
2657
2653
|
if (!e.fn) return;
|
|
2658
2654
|
gt(e);
|
|
2659
2655
|
const t = tn;
|
|
2660
|
-
|
|
2656
|
+
el(e, e.value, t);
|
|
2661
2657
|
}
|
|
2662
|
-
function
|
|
2658
|
+
function el(e, t, n) {
|
|
2663
2659
|
let s;
|
|
2664
|
-
const r = N, a =
|
|
2665
|
-
|
|
2660
|
+
const r = N, a = x;
|
|
2661
|
+
x = N = e;
|
|
2666
2662
|
try {
|
|
2667
2663
|
s = e.fn(t);
|
|
2668
2664
|
} catch (i) {
|
|
2669
2665
|
return e.pure && (e.state = Pe, e.owned && e.owned.forEach(gt), e.owned = null), e.updatedAt = n + 1, Bn(i);
|
|
2670
2666
|
} finally {
|
|
2671
|
-
|
|
2667
|
+
x = a, N = r;
|
|
2672
2668
|
}
|
|
2673
|
-
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ?
|
|
2669
|
+
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Zs(e, s) : e.value = s, e.updatedAt = n);
|
|
2674
2670
|
}
|
|
2675
2671
|
function nn(e, t, n, s = Pe, r) {
|
|
2676
2672
|
const a = {
|
|
@@ -2690,7 +2686,7 @@ function nn(e, t, n, s = Pe, r) {
|
|
|
2690
2686
|
}
|
|
2691
2687
|
function jt(e) {
|
|
2692
2688
|
if (e.state === 0) return;
|
|
2693
|
-
if (e.state === Qt) return
|
|
2689
|
+
if (e.state === Qt) return Wt(e);
|
|
2694
2690
|
if (e.suspense && Z(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
2695
2691
|
const t = [e];
|
|
2696
2692
|
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < tn); )
|
|
@@ -2699,30 +2695,30 @@ function jt(e) {
|
|
|
2699
2695
|
if (e = t[n], e.state === Pe)
|
|
2700
2696
|
at(e);
|
|
2701
2697
|
else if (e.state === Qt) {
|
|
2702
|
-
const s =
|
|
2703
|
-
|
|
2698
|
+
const s = te;
|
|
2699
|
+
te = null, Ee(() => Wt(e, t[0]), !1), te = s;
|
|
2704
2700
|
}
|
|
2705
2701
|
}
|
|
2706
2702
|
function Ee(e, t) {
|
|
2707
|
-
if (
|
|
2703
|
+
if (te) return e();
|
|
2708
2704
|
let n = !1;
|
|
2709
|
-
t || (
|
|
2705
|
+
t || (te = []), _e ? n = !0 : _e = [], tn++;
|
|
2710
2706
|
try {
|
|
2711
2707
|
const s = e();
|
|
2712
|
-
return
|
|
2708
|
+
return tl(n), s;
|
|
2713
2709
|
} catch (s) {
|
|
2714
|
-
n || (_e = null),
|
|
2710
|
+
n || (_e = null), te = null, Bn(s);
|
|
2715
2711
|
}
|
|
2716
2712
|
}
|
|
2717
|
-
function
|
|
2718
|
-
if (
|
|
2713
|
+
function tl(e) {
|
|
2714
|
+
if (te && (er(te), te = null), e) return;
|
|
2719
2715
|
const t = _e;
|
|
2720
|
-
_e = null, t.length && Ee(() =>
|
|
2716
|
+
_e = null, t.length && Ee(() => js(t), !1);
|
|
2721
2717
|
}
|
|
2722
|
-
function
|
|
2718
|
+
function er(e) {
|
|
2723
2719
|
for (let t = 0; t < e.length; t++) jt(e[t]);
|
|
2724
2720
|
}
|
|
2725
|
-
function
|
|
2721
|
+
function nl(e) {
|
|
2726
2722
|
let t, n = 0;
|
|
2727
2723
|
for (t = 0; t < e.length; t++) {
|
|
2728
2724
|
const s = e[t];
|
|
@@ -2737,20 +2733,20 @@ function sl(e) {
|
|
|
2737
2733
|
}
|
|
2738
2734
|
for (P.effects && (P.done || !P.count) && (e = [...P.effects, ...e], n += P.effects.length, delete P.effects), t = 0; t < n; t++) jt(e[t]);
|
|
2739
2735
|
}
|
|
2740
|
-
function
|
|
2736
|
+
function Wt(e, t) {
|
|
2741
2737
|
e.state = 0;
|
|
2742
2738
|
for (let n = 0; n < e.sources.length; n += 1) {
|
|
2743
2739
|
const s = e.sources[n];
|
|
2744
2740
|
if (s.sources) {
|
|
2745
2741
|
const r = s.state;
|
|
2746
|
-
r === Pe ? s !== t && (!s.updatedAt || s.updatedAt < tn) && jt(s) : r === Qt &&
|
|
2742
|
+
r === Pe ? s !== t && (!s.updatedAt || s.updatedAt < tn) && jt(s) : r === Qt && Wt(s, t);
|
|
2747
2743
|
}
|
|
2748
2744
|
}
|
|
2749
2745
|
}
|
|
2750
|
-
function
|
|
2746
|
+
function tr(e) {
|
|
2751
2747
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
2752
2748
|
const n = e.observers[t];
|
|
2753
|
-
n.state || (n.state = Qt, n.pure ?
|
|
2749
|
+
n.state || (n.state = Qt, n.pure ? te.push(n) : _e.push(n), n.observers && tr(n));
|
|
2754
2750
|
}
|
|
2755
2751
|
}
|
|
2756
2752
|
function gt(e) {
|
|
@@ -2797,30 +2793,30 @@ function pn(e) {
|
|
|
2797
2793
|
}
|
|
2798
2794
|
return e;
|
|
2799
2795
|
}
|
|
2800
|
-
function
|
|
2796
|
+
function sl(e, t) {
|
|
2801
2797
|
return function(s) {
|
|
2802
2798
|
let r;
|
|
2803
|
-
return
|
|
2799
|
+
return Ge(() => r = Z(() => (N.context = {
|
|
2804
2800
|
...N.context,
|
|
2805
2801
|
[e]: s.value
|
|
2806
|
-
},
|
|
2802
|
+
}, Js(() => s.children))), void 0), r;
|
|
2807
2803
|
};
|
|
2808
2804
|
}
|
|
2809
2805
|
var yn = Symbol("fallback");
|
|
2810
|
-
function
|
|
2806
|
+
function zt(e) {
|
|
2811
2807
|
for (let t = 0; t < e.length; t++) e[t]();
|
|
2812
2808
|
}
|
|
2813
|
-
function
|
|
2809
|
+
function rl(e, t, n = {}) {
|
|
2814
2810
|
let s = [], r = [], a = [], i = 0, o = t.length > 1 ? [] : null;
|
|
2815
|
-
return ht(() =>
|
|
2811
|
+
return ht(() => zt(a)), () => {
|
|
2816
2812
|
let l = e() || [], u = l.length, f, d;
|
|
2817
|
-
return l[
|
|
2813
|
+
return l[Qs], Z(() => {
|
|
2818
2814
|
let g, E, S, T, p, A, w, D, U;
|
|
2819
2815
|
if (u === 0)
|
|
2820
|
-
i !== 0 && (
|
|
2816
|
+
i !== 0 && (zt(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [yn], r[0] = xe((b) => (a[0] = b, n.fallback())), i = 1);
|
|
2821
2817
|
else if (i === 0) {
|
|
2822
2818
|
for (r = new Array(u), d = 0; d < u; d++)
|
|
2823
|
-
s[d] = l[d], r[d] =
|
|
2819
|
+
s[d] = l[d], r[d] = xe(h);
|
|
2824
2820
|
i = u;
|
|
2825
2821
|
} else {
|
|
2826
2822
|
for (S = new Array(u), T = new Array(u), o && (p = new Array(u)), A = 0, w = Math.min(i, u); A < w && s[A] === l[A]; A++) ;
|
|
@@ -2831,7 +2827,7 @@ function al(e, t, n = {}) {
|
|
|
2831
2827
|
for (f = A; f <= w; f++)
|
|
2832
2828
|
U = s[f], d = g.get(U), d !== void 0 && d !== -1 ? (S[d] = r[f], T[d] = a[f], o && (p[d] = o[f]), d = E[d], g.set(U, d)) : a[f]();
|
|
2833
2829
|
for (d = A; d < u; d++)
|
|
2834
|
-
d in S ? (r[d] = S[d], a[d] = T[d], o && (o[d] = p[d], o[d](d))) : r[d] =
|
|
2830
|
+
d in S ? (r[d] = S[d], a[d] = T[d], o && (o[d] = p[d], o[d](d))) : r[d] = xe(h);
|
|
2835
2831
|
r = r.slice(0, i = u), s = l.slice(0);
|
|
2836
2832
|
}
|
|
2837
2833
|
return r;
|
|
@@ -2845,15 +2841,15 @@ function al(e, t, n = {}) {
|
|
|
2845
2841
|
}
|
|
2846
2842
|
};
|
|
2847
2843
|
}
|
|
2848
|
-
function
|
|
2844
|
+
function al(e, t, n = {}) {
|
|
2849
2845
|
let s = [], r = [], a = [], i = [], o = 0, l;
|
|
2850
|
-
return ht(() =>
|
|
2846
|
+
return ht(() => zt(a)), () => {
|
|
2851
2847
|
const u = e() || [], f = u.length;
|
|
2852
|
-
return u[
|
|
2848
|
+
return u[Qs], Z(() => {
|
|
2853
2849
|
if (f === 0)
|
|
2854
|
-
return o !== 0 && (
|
|
2850
|
+
return o !== 0 && (zt(a), a = [], s = [], r = [], o = 0, i = []), n.fallback && (s = [yn], r[0] = xe((h) => (a[0] = h, n.fallback())), o = 1), r;
|
|
2855
2851
|
for (s[0] === yn && (a[0](), a = [], s = [], r = [], o = 0), l = 0; l < f; l++)
|
|
2856
|
-
l < s.length && s[l] !== u[l] ? i[l](() => u[l]) : l >= s.length && (r[l] =
|
|
2852
|
+
l < s.length && s[l] !== u[l] ? i[l](() => u[l]) : l >= s.length && (r[l] = xe(d));
|
|
2857
2853
|
for (; l < s.length; l++)
|
|
2858
2854
|
a[l]();
|
|
2859
2855
|
return o = i.length = a.length = f, s = u.slice(0), r = r.slice(0, o);
|
|
@@ -2865,10 +2861,10 @@ function il(e, t, n = {}) {
|
|
|
2865
2861
|
}
|
|
2866
2862
|
};
|
|
2867
2863
|
}
|
|
2868
|
-
function
|
|
2864
|
+
function nr(e, t) {
|
|
2869
2865
|
return Z(() => e(t || {}));
|
|
2870
2866
|
}
|
|
2871
|
-
function
|
|
2867
|
+
function Gt() {
|
|
2872
2868
|
return !0;
|
|
2873
2869
|
}
|
|
2874
2870
|
var An = {
|
|
@@ -2878,8 +2874,8 @@ var An = {
|
|
|
2878
2874
|
has(e, t) {
|
|
2879
2875
|
return t === Ht ? !0 : e.has(t);
|
|
2880
2876
|
},
|
|
2881
|
-
set:
|
|
2882
|
-
deleteProperty:
|
|
2877
|
+
set: Gt,
|
|
2878
|
+
deleteProperty: Gt,
|
|
2883
2879
|
getOwnPropertyDescriptor(e, t) {
|
|
2884
2880
|
return {
|
|
2885
2881
|
configurable: !0,
|
|
@@ -2887,8 +2883,8 @@ var An = {
|
|
|
2887
2883
|
get() {
|
|
2888
2884
|
return e.get(t);
|
|
2889
2885
|
},
|
|
2890
|
-
set:
|
|
2891
|
-
deleteProperty:
|
|
2886
|
+
set: Gt,
|
|
2887
|
+
deleteProperty: Gt
|
|
2892
2888
|
};
|
|
2893
2889
|
},
|
|
2894
2890
|
ownKeys(e) {
|
|
@@ -2898,19 +2894,19 @@ var An = {
|
|
|
2898
2894
|
function hn(e) {
|
|
2899
2895
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
2900
2896
|
}
|
|
2901
|
-
function
|
|
2897
|
+
function il() {
|
|
2902
2898
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
2903
2899
|
const n = this[e]();
|
|
2904
2900
|
if (n !== void 0) return n;
|
|
2905
2901
|
}
|
|
2906
2902
|
}
|
|
2907
|
-
function
|
|
2903
|
+
function sr(...e) {
|
|
2908
2904
|
let t = !1;
|
|
2909
2905
|
for (let i = 0; i < e.length; i++) {
|
|
2910
2906
|
const o = e[i];
|
|
2911
2907
|
t = t || !!o && Ht in o, e[i] = typeof o == "function" ? (t = !0, J(o)) : o;
|
|
2912
2908
|
}
|
|
2913
|
-
if (
|
|
2909
|
+
if ($s && t)
|
|
2914
2910
|
return new Proxy({
|
|
2915
2911
|
get(i) {
|
|
2916
2912
|
for (let o = e.length - 1; o >= 0; o--) {
|
|
@@ -2942,7 +2938,7 @@ function rr(...e) {
|
|
|
2942
2938
|
s[f] = d.get ? {
|
|
2943
2939
|
enumerable: !0,
|
|
2944
2940
|
configurable: !0,
|
|
2945
|
-
get:
|
|
2941
|
+
get: il.bind(n[f] = [d.get.bind(o)])
|
|
2946
2942
|
} : d.value !== void 0 ? d : void 0;
|
|
2947
2943
|
else {
|
|
2948
2944
|
const h = n[f];
|
|
@@ -2957,8 +2953,8 @@ function rr(...e) {
|
|
|
2957
2953
|
}
|
|
2958
2954
|
return r;
|
|
2959
2955
|
}
|
|
2960
|
-
function
|
|
2961
|
-
if (
|
|
2956
|
+
function ol(e, ...t) {
|
|
2957
|
+
if ($s && Ht in e) {
|
|
2962
2958
|
const r = new Set(t.length > 1 ? t.flat() : t[0]), a = t.map((i) => new Proxy({
|
|
2963
2959
|
get(o) {
|
|
2964
2960
|
return i.includes(o) ? e[o] : void 0;
|
|
@@ -2992,7 +2988,7 @@ function ll(e, ...t) {
|
|
|
2992
2988
|
}
|
|
2993
2989
|
return [...s, n];
|
|
2994
2990
|
}
|
|
2995
|
-
function
|
|
2991
|
+
function rr(e) {
|
|
2996
2992
|
let t, n;
|
|
2997
2993
|
const s = (r) => {
|
|
2998
2994
|
const a = P.context;
|
|
@@ -3002,7 +2998,7 @@ function ar(e) {
|
|
|
3002
2998
|
!P.done && lt(a), P.count--, l(() => u.default), lt();
|
|
3003
2999
|
}), t = o;
|
|
3004
3000
|
} else if (!t) {
|
|
3005
|
-
const [o] =
|
|
3001
|
+
const [o] = zo(() => (n || (n = e())).then((l) => l.default));
|
|
3006
3002
|
t = o;
|
|
3007
3003
|
}
|
|
3008
3004
|
let i;
|
|
@@ -3016,22 +3012,22 @@ function ar(e) {
|
|
|
3016
3012
|
};
|
|
3017
3013
|
return s.preload = () => n || ((n = e()).then((r) => t = () => r.default), n), s;
|
|
3018
3014
|
}
|
|
3019
|
-
var
|
|
3015
|
+
var ll = 0;
|
|
3020
3016
|
function hu() {
|
|
3021
|
-
return P.context ? P.getNextContextId() : `cl-${
|
|
3017
|
+
return P.context ? P.getNextContextId() : `cl-${ll++}`;
|
|
3022
3018
|
}
|
|
3023
|
-
var
|
|
3019
|
+
var ar = (e) => `Stale read from <${e}>.`;
|
|
3024
3020
|
function gu(e) {
|
|
3025
3021
|
const t = "fallback" in e && {
|
|
3026
3022
|
fallback: () => e.fallback
|
|
3027
3023
|
};
|
|
3028
|
-
return J(
|
|
3024
|
+
return J(rl(() => e.each, e.children, t || void 0));
|
|
3029
3025
|
}
|
|
3030
3026
|
function mu(e) {
|
|
3031
3027
|
const t = "fallback" in e && {
|
|
3032
3028
|
fallback: () => e.fallback
|
|
3033
3029
|
};
|
|
3034
|
-
return J(
|
|
3030
|
+
return J(al(() => e.each, e.children, t || void 0));
|
|
3035
3031
|
}
|
|
3036
3032
|
function Eu(e) {
|
|
3037
3033
|
const t = e.keyed, n = J(() => e.when, void 0, void 0), s = t ? n : J(n, void 0, {
|
|
@@ -3042,7 +3038,7 @@ function Eu(e) {
|
|
|
3042
3038
|
if (r) {
|
|
3043
3039
|
const a = e.children;
|
|
3044
3040
|
return typeof a == "function" && a.length > 0 ? Z(() => a(t ? r : () => {
|
|
3045
|
-
if (!Z(s)) throw
|
|
3041
|
+
if (!Z(s)) throw ar("Show");
|
|
3046
3042
|
return n();
|
|
3047
3043
|
})) : a;
|
|
3048
3044
|
}
|
|
@@ -3050,7 +3046,7 @@ function Eu(e) {
|
|
|
3050
3046
|
}, void 0, void 0);
|
|
3051
3047
|
}
|
|
3052
3048
|
function pu(e) {
|
|
3053
|
-
const t =
|
|
3049
|
+
const t = Js(() => e.children), n = J(() => {
|
|
3054
3050
|
const s = t(), r = Array.isArray(s) ? s : [s];
|
|
3055
3051
|
let a = () => {
|
|
3056
3052
|
};
|
|
@@ -3068,7 +3064,7 @@ function pu(e) {
|
|
|
3068
3064
|
const [r, a, i] = s, o = i.children;
|
|
3069
3065
|
return typeof o == "function" && o.length > 0 ? Z(() => o(i.keyed ? a() : () => {
|
|
3070
3066
|
var u;
|
|
3071
|
-
if (((u = Z(n)()) == null ? void 0 : u[0]) !== r) throw
|
|
3067
|
+
if (((u = Z(n)()) == null ? void 0 : u[0]) !== r) throw ar("Match");
|
|
3072
3068
|
return a();
|
|
3073
3069
|
})) : o;
|
|
3074
3070
|
}, void 0, void 0);
|
|
@@ -3076,10 +3072,10 @@ function pu(e) {
|
|
|
3076
3072
|
function yu(e) {
|
|
3077
3073
|
return e;
|
|
3078
3074
|
}
|
|
3079
|
-
var
|
|
3075
|
+
var cl = ["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"], ul = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...cl]), dl = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), fl = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
3080
3076
|
className: "class",
|
|
3081
3077
|
htmlFor: "for"
|
|
3082
|
-
}),
|
|
3078
|
+
}), hl = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
3083
3079
|
class: "className",
|
|
3084
3080
|
novalidate: {
|
|
3085
3081
|
$: "noValidate",
|
|
@@ -3108,11 +3104,11 @@ var ul = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "contr
|
|
|
3108
3104
|
TEXTAREA: 1
|
|
3109
3105
|
}
|
|
3110
3106
|
});
|
|
3111
|
-
function
|
|
3112
|
-
const n =
|
|
3107
|
+
function gl(e, t) {
|
|
3108
|
+
const n = hl[e];
|
|
3113
3109
|
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
3114
3110
|
}
|
|
3115
|
-
var
|
|
3111
|
+
var ml = /* @__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"]), El = /* @__PURE__ */ new Set([
|
|
3116
3112
|
"altGlyph",
|
|
3117
3113
|
"altGlyphDef",
|
|
3118
3114
|
"altGlyphItem",
|
|
@@ -3190,11 +3186,11 @@ var El = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
|
|
|
3190
3186
|
"use",
|
|
3191
3187
|
"view",
|
|
3192
3188
|
"vkern"
|
|
3193
|
-
]),
|
|
3189
|
+
]), pl = {
|
|
3194
3190
|
xlink: "http://www.w3.org/1999/xlink",
|
|
3195
3191
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
3196
3192
|
}, Au = (e) => J(() => e());
|
|
3197
|
-
function
|
|
3193
|
+
function yl(e, t, n) {
|
|
3198
3194
|
let s = n.length, r = t.length, a = s, i = 0, o = 0, l = t[r - 1].nextSibling, u = null;
|
|
3199
3195
|
for (; i < r || o < a; ) {
|
|
3200
3196
|
if (t[i] === n[o]) {
|
|
@@ -3234,9 +3230,9 @@ function Al(e, t, n) {
|
|
|
3234
3230
|
}
|
|
3235
3231
|
}
|
|
3236
3232
|
var ut = "_$DX_DELEGATE";
|
|
3237
|
-
function
|
|
3233
|
+
function ir(e, t, n, s = {}) {
|
|
3238
3234
|
let r;
|
|
3239
|
-
return
|
|
3235
|
+
return xe((a) => {
|
|
3240
3236
|
r = a, t === document ? e() : Sn(t, e(), t.firstChild ? null : void 0, n);
|
|
3241
3237
|
}, s.owner), () => {
|
|
3242
3238
|
r(), t.textContent = "";
|
|
@@ -3250,32 +3246,32 @@ function Tu(e, t, n, s) {
|
|
|
3250
3246
|
}, i = () => (r || (r = a())).cloneNode(!0);
|
|
3251
3247
|
return i.cloneNode = i, i;
|
|
3252
3248
|
}
|
|
3253
|
-
function
|
|
3249
|
+
function Al(e, t = window.document) {
|
|
3254
3250
|
const n = t[ut] || (t[ut] = /* @__PURE__ */ new Set());
|
|
3255
3251
|
for (let s = 0, r = e.length; s < r; s++) {
|
|
3256
3252
|
const a = e[s];
|
|
3257
|
-
n.has(a) || (n.add(a), t.addEventListener(a,
|
|
3253
|
+
n.has(a) || (n.add(a), t.addEventListener(a, or));
|
|
3258
3254
|
}
|
|
3259
3255
|
}
|
|
3260
3256
|
function Su(e = window.document) {
|
|
3261
3257
|
if (e[ut]) {
|
|
3262
|
-
for (let t of e[ut].keys()) e.removeEventListener(t,
|
|
3258
|
+
for (let t of e[ut].keys()) e.removeEventListener(t, or);
|
|
3263
3259
|
delete e[ut];
|
|
3264
3260
|
}
|
|
3265
3261
|
}
|
|
3266
3262
|
function Tn(e, t, n) {
|
|
3267
3263
|
Me(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
3268
3264
|
}
|
|
3269
|
-
function
|
|
3265
|
+
function Tl(e, t, n, s) {
|
|
3270
3266
|
Me(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
|
|
3271
3267
|
}
|
|
3272
|
-
function
|
|
3268
|
+
function Sl(e, t, n) {
|
|
3273
3269
|
Me(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
|
|
3274
3270
|
}
|
|
3275
|
-
function
|
|
3271
|
+
function _l(e, t) {
|
|
3276
3272
|
Me(e) || (t == null ? e.removeAttribute("class") : e.className = t);
|
|
3277
3273
|
}
|
|
3278
|
-
function
|
|
3274
|
+
function Pl(e, t, n, s) {
|
|
3279
3275
|
if (s)
|
|
3280
3276
|
Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
3281
3277
|
else if (Array.isArray(n)) {
|
|
@@ -3283,7 +3279,7 @@ function wl(e, t, n, s) {
|
|
|
3283
3279
|
e.addEventListener(t, n[0] = (a) => r.call(e, n[1], a));
|
|
3284
3280
|
} else e.addEventListener(t, n, typeof n != "function" && n);
|
|
3285
3281
|
}
|
|
3286
|
-
function
|
|
3282
|
+
function wl(e, t, n = {}) {
|
|
3287
3283
|
const s = Object.keys(t || {}), r = Object.keys(n);
|
|
3288
3284
|
let a, i;
|
|
3289
3285
|
for (a = 0, i = r.length; a < i; a++) {
|
|
@@ -3296,7 +3292,7 @@ function vl(e, t, n = {}) {
|
|
|
3296
3292
|
}
|
|
3297
3293
|
return n;
|
|
3298
3294
|
}
|
|
3299
|
-
function
|
|
3295
|
+
function vl(e, t, n) {
|
|
3300
3296
|
if (!t) return n ? Tn(e, "style") : t;
|
|
3301
3297
|
const s = e.style;
|
|
3302
3298
|
if (typeof t == "string") return s.cssText = t;
|
|
@@ -3308,18 +3304,18 @@ function bl(e, t, n) {
|
|
|
3308
3304
|
r = t[a], r !== n[a] && (s.setProperty(a, r), n[a] = r);
|
|
3309
3305
|
return n;
|
|
3310
3306
|
}
|
|
3311
|
-
function
|
|
3307
|
+
function bl(e, t = {}, n, s) {
|
|
3312
3308
|
const r = {};
|
|
3313
|
-
return s ||
|
|
3309
|
+
return s || Ge(() => r.children = mt(e, t.children, r.children)), Ge(() => typeof t.ref == "function" && Il(t.ref, e)), Ge(() => Nl(e, t, n, !0, r, !0)), r;
|
|
3314
3310
|
}
|
|
3315
|
-
function
|
|
3311
|
+
function Il(e, t, n) {
|
|
3316
3312
|
return Z(() => e(t, n));
|
|
3317
3313
|
}
|
|
3318
3314
|
function Sn(e, t, n, s) {
|
|
3319
3315
|
if (n !== void 0 && !s && (s = []), typeof t != "function") return mt(e, t, s, n);
|
|
3320
|
-
|
|
3316
|
+
Ge((r) => mt(e, t(), r, n), s);
|
|
3321
3317
|
}
|
|
3322
|
-
function
|
|
3318
|
+
function Nl(e, t, n, s, r = {}, a = !1) {
|
|
3323
3319
|
t || (t = {});
|
|
3324
3320
|
for (const i in r)
|
|
3325
3321
|
if (!(i in t)) {
|
|
@@ -3333,14 +3329,14 @@ function Cl(e, t, n, s, r = {}, a = !1) {
|
|
|
3333
3329
|
r[i] = ls(e, i, o, r[i], n, a, t);
|
|
3334
3330
|
}
|
|
3335
3331
|
}
|
|
3336
|
-
function
|
|
3332
|
+
function Cl(e) {
|
|
3337
3333
|
let t, n;
|
|
3338
|
-
return !Me() || !(t = P.registry.get(n =
|
|
3334
|
+
return !Me() || !(t = P.registry.get(n = kl())) ? e() : (P.completed && P.completed.add(t), P.registry.delete(n), t);
|
|
3339
3335
|
}
|
|
3340
3336
|
function Me(e) {
|
|
3341
3337
|
return !!P.context && !P.done && (!e || e.isConnected);
|
|
3342
3338
|
}
|
|
3343
|
-
function
|
|
3339
|
+
function Ll(e) {
|
|
3344
3340
|
return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
3345
3341
|
}
|
|
3346
3342
|
function os(e, t, n) {
|
|
@@ -3349,8 +3345,8 @@ function os(e, t, n) {
|
|
|
3349
3345
|
}
|
|
3350
3346
|
function ls(e, t, n, s, r, a, i) {
|
|
3351
3347
|
let o, l, u, f, d;
|
|
3352
|
-
if (t === "style") return
|
|
3353
|
-
if (t === "classList") return
|
|
3348
|
+
if (t === "style") return vl(e, n, s);
|
|
3349
|
+
if (t === "classList") return wl(e, n, s);
|
|
3354
3350
|
if (n === s) return s;
|
|
3355
3351
|
if (t === "ref")
|
|
3356
3352
|
a || n(e);
|
|
@@ -3361,28 +3357,28 @@ function ls(e, t, n, s, r, a, i) {
|
|
|
3361
3357
|
const h = t.slice(10);
|
|
3362
3358
|
s && e.removeEventListener(h, s, !0), n && e.addEventListener(h, n, !0);
|
|
3363
3359
|
} else if (t.slice(0, 2) === "on") {
|
|
3364
|
-
const h = t.slice(2).toLowerCase(), g =
|
|
3360
|
+
const h = t.slice(2).toLowerCase(), g = ml.has(h);
|
|
3365
3361
|
if (!g && s) {
|
|
3366
3362
|
const E = Array.isArray(s) ? s[0] : s;
|
|
3367
3363
|
e.removeEventListener(h, E);
|
|
3368
3364
|
}
|
|
3369
|
-
(g || n) && (
|
|
3365
|
+
(g || n) && (Pl(e, h, n, g), g && Al([h]));
|
|
3370
3366
|
} else if (t.slice(0, 5) === "attr:")
|
|
3371
3367
|
Tn(e, t.slice(5), n);
|
|
3372
3368
|
else if (t.slice(0, 5) === "bool:")
|
|
3373
|
-
|
|
3374
|
-
else if ((d = t.slice(0, 5) === "prop:") || (u =
|
|
3369
|
+
Sl(e, t.slice(5), n);
|
|
3370
|
+
else if ((d = t.slice(0, 5) === "prop:") || (u = dl.has(t)) || !r && ((f = gl(t, e.tagName)) || (l = ul.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
|
|
3375
3371
|
if (d)
|
|
3376
3372
|
t = t.slice(5), l = !0;
|
|
3377
3373
|
else if (Me(e)) return n;
|
|
3378
|
-
t === "class" || t === "className" ?
|
|
3374
|
+
t === "class" || t === "className" ? _l(e, n) : o && !l && !u ? e[Ll(t)] = n : e[f || t] = n;
|
|
3379
3375
|
} else {
|
|
3380
|
-
const h = r && t.indexOf(":") > -1 &&
|
|
3381
|
-
h ?
|
|
3376
|
+
const h = r && t.indexOf(":") > -1 && pl[t.split(":")[0]];
|
|
3377
|
+
h ? Tl(e, h, t, n) : Tn(e, fl[t] || t, n);
|
|
3382
3378
|
}
|
|
3383
3379
|
return n;
|
|
3384
3380
|
}
|
|
3385
|
-
function
|
|
3381
|
+
function or(e) {
|
|
3386
3382
|
if (P.registry && P.events && P.events.find(([l, u]) => u === e))
|
|
3387
3383
|
return;
|
|
3388
3384
|
let t = e.target;
|
|
@@ -3445,7 +3441,7 @@ function mt(e, t, n, s, r) {
|
|
|
3445
3441
|
n = Fe(e, n, s);
|
|
3446
3442
|
} else {
|
|
3447
3443
|
if (i === "function")
|
|
3448
|
-
return
|
|
3444
|
+
return Ge(() => {
|
|
3449
3445
|
let l = t();
|
|
3450
3446
|
for (; typeof l == "function"; ) l = l();
|
|
3451
3447
|
n = mt(e, l, n, s);
|
|
@@ -3453,7 +3449,7 @@ function mt(e, t, n, s, r) {
|
|
|
3453
3449
|
if (Array.isArray(t)) {
|
|
3454
3450
|
const l = [], u = n && Array.isArray(n);
|
|
3455
3451
|
if (_n(l, t, n, r))
|
|
3456
|
-
return
|
|
3452
|
+
return Ge(() => n = mt(e, l, n, s, !0)), () => n;
|
|
3457
3453
|
if (a) {
|
|
3458
3454
|
if (!l.length) return n;
|
|
3459
3455
|
if (s === void 0) return n = [...e.childNodes];
|
|
@@ -3465,7 +3461,7 @@ function mt(e, t, n, s, r) {
|
|
|
3465
3461
|
}
|
|
3466
3462
|
if (l.length === 0) {
|
|
3467
3463
|
if (n = Fe(e, n, s), o) return n;
|
|
3468
|
-
} else u ? n.length === 0 ? cs(e, l, s) :
|
|
3464
|
+
} else u ? n.length === 0 ? cs(e, l, s) : yl(e, n, l) : (n && Fe(e), cs(e, l));
|
|
3469
3465
|
n = l;
|
|
3470
3466
|
} else if (t.nodeType) {
|
|
3471
3467
|
if (a && t.parentNode) return n = o ? [t] : t;
|
|
@@ -3517,26 +3513,26 @@ function Fe(e, t, n, s) {
|
|
|
3517
3513
|
} else e.insertBefore(r, n);
|
|
3518
3514
|
return [r];
|
|
3519
3515
|
}
|
|
3520
|
-
function
|
|
3516
|
+
function kl() {
|
|
3521
3517
|
return P.getNextContextId();
|
|
3522
3518
|
}
|
|
3523
|
-
var
|
|
3524
|
-
function
|
|
3525
|
-
return t ? document.createElementNS(
|
|
3519
|
+
var Dl = "http://www.w3.org/2000/svg";
|
|
3520
|
+
function lr(e, t = !1) {
|
|
3521
|
+
return t ? document.createElementNS(Dl, e) : document.createElement(e);
|
|
3526
3522
|
}
|
|
3527
3523
|
function _u(e) {
|
|
3528
3524
|
const {
|
|
3529
3525
|
useShadow: t
|
|
3530
3526
|
} = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = is();
|
|
3531
3527
|
let a, i = !!P.context;
|
|
3532
|
-
return
|
|
3533
|
-
i && (is().user = i = !1), a || (a =
|
|
3528
|
+
return zs(() => {
|
|
3529
|
+
i && (is().user = i = !1), a || (a = Ys(r, () => J(() => e.children)));
|
|
3534
3530
|
const o = s();
|
|
3535
3531
|
if (o instanceof HTMLHeadElement) {
|
|
3536
3532
|
const [l, u] = F(!1), f = () => u(!0);
|
|
3537
|
-
|
|
3533
|
+
xe((d) => Sn(o, () => l() ? d() : a(), null)), ht(f);
|
|
3538
3534
|
} else {
|
|
3539
|
-
const l =
|
|
3535
|
+
const l = lr(e.isSVG ? "g" : "div", e.isSVG), u = t && l.attachShadow ? l.attachShadow({
|
|
3540
3536
|
mode: "open"
|
|
3541
3537
|
}) : l;
|
|
3542
3538
|
Object.defineProperty(l, "_$host", {
|
|
@@ -3558,16 +3554,16 @@ function xl(e, t) {
|
|
|
3558
3554
|
case "function":
|
|
3559
3555
|
return Z(() => s(t));
|
|
3560
3556
|
case "string":
|
|
3561
|
-
const r =
|
|
3562
|
-
return
|
|
3557
|
+
const r = El.has(s), a = P.context ? Cl() : lr(s, r);
|
|
3558
|
+
return bl(a, t, r), a;
|
|
3563
3559
|
}
|
|
3564
3560
|
});
|
|
3565
3561
|
}
|
|
3566
3562
|
function Pu(e) {
|
|
3567
|
-
const [, t] =
|
|
3563
|
+
const [, t] = ol(e, ["component"]);
|
|
3568
3564
|
return xl(() => e.component, t);
|
|
3569
3565
|
}
|
|
3570
|
-
var
|
|
3566
|
+
var Gl = class {
|
|
3571
3567
|
constructor() {
|
|
3572
3568
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
3573
3569
|
}
|
|
@@ -3583,9 +3579,9 @@ var Ol = class {
|
|
|
3583
3579
|
clear() {
|
|
3584
3580
|
this.keyToValue.clear(), this.valueToKey.clear();
|
|
3585
3581
|
}
|
|
3586
|
-
},
|
|
3582
|
+
}, cr = class {
|
|
3587
3583
|
constructor(e) {
|
|
3588
|
-
this.generateIdentifier = e, this.kv = new
|
|
3584
|
+
this.generateIdentifier = e, this.kv = new Gl();
|
|
3589
3585
|
}
|
|
3590
3586
|
register(e, t) {
|
|
3591
3587
|
this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
|
|
@@ -3599,7 +3595,7 @@ var Ol = class {
|
|
|
3599
3595
|
getValue(e) {
|
|
3600
3596
|
return this.kv.getByKey(e);
|
|
3601
3597
|
}
|
|
3602
|
-
},
|
|
3598
|
+
}, Ol = class extends cr {
|
|
3603
3599
|
constructor() {
|
|
3604
3600
|
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
3605
3601
|
}
|
|
@@ -3610,7 +3606,7 @@ var Ol = class {
|
|
|
3610
3606
|
return this.classToAllowedProps.get(e);
|
|
3611
3607
|
}
|
|
3612
3608
|
};
|
|
3613
|
-
function
|
|
3609
|
+
function Rl(e) {
|
|
3614
3610
|
if ("values" in Object)
|
|
3615
3611
|
return Object.values(e);
|
|
3616
3612
|
const t = [];
|
|
@@ -3618,8 +3614,8 @@ function Ul(e) {
|
|
|
3618
3614
|
e.hasOwnProperty(n) && t.push(e[n]);
|
|
3619
3615
|
return t;
|
|
3620
3616
|
}
|
|
3621
|
-
function
|
|
3622
|
-
const n =
|
|
3617
|
+
function Ul(e, t) {
|
|
3618
|
+
const n = Rl(e);
|
|
3623
3619
|
if ("find" in n)
|
|
3624
3620
|
return n.find(t);
|
|
3625
3621
|
const s = n;
|
|
@@ -3642,7 +3638,7 @@ function us(e, t) {
|
|
|
3642
3638
|
return s;
|
|
3643
3639
|
}
|
|
3644
3640
|
}
|
|
3645
|
-
var
|
|
3641
|
+
var Bl = class {
|
|
3646
3642
|
constructor() {
|
|
3647
3643
|
this.transfomers = {};
|
|
3648
3644
|
}
|
|
@@ -3650,12 +3646,12 @@ var Ml = class {
|
|
|
3650
3646
|
this.transfomers[e.name] = e;
|
|
3651
3647
|
}
|
|
3652
3648
|
findApplicable(e) {
|
|
3653
|
-
return
|
|
3649
|
+
return Ul(this.transfomers, (t) => t.isApplicable(e));
|
|
3654
3650
|
}
|
|
3655
3651
|
findByName(e) {
|
|
3656
3652
|
return this.transfomers[e];
|
|
3657
3653
|
}
|
|
3658
|
-
},
|
|
3654
|
+
}, Ml = (e) => Object.prototype.toString.call(e).slice(8, -1), ur = (e) => typeof e > "u", Fl = (e) => e === null, Et = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Pn = (e) => Et(e) && Object.keys(e).length === 0, be = (e) => Array.isArray(e), ql = (e) => typeof e == "string", Kl = (e) => typeof e == "number" && !isNaN(e), Vl = (e) => typeof e == "boolean", Hl = (e) => e instanceof RegExp, pt = (e) => e instanceof Map, yt = (e) => e instanceof Set, dr = (e) => Ml(e) === "Symbol", $l = (e) => e instanceof Date && !isNaN(e.valueOf()), Ql = (e) => e instanceof Error, ds = (e) => typeof e == "number" && isNaN(e), jl = (e) => Vl(e) || Fl(e) || ur(e) || Kl(e) || ql(e) || dr(e), Wl = (e) => typeof e == "bigint", zl = (e) => e === 1 / 0 || e === -1 / 0, Yl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Jl = (e) => e instanceof URL, fr = (e) => e.replace(/\./g, "\\."), gn = (e) => e.map(String).map(fr).join("."), dt = (e) => {
|
|
3659
3655
|
const t = [];
|
|
3660
3656
|
let n = "";
|
|
3661
3657
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -3681,12 +3677,12 @@ function ge(e, t, n, s) {
|
|
|
3681
3677
|
untransform: s
|
|
3682
3678
|
};
|
|
3683
3679
|
}
|
|
3684
|
-
var
|
|
3685
|
-
ge(
|
|
3680
|
+
var hr = [
|
|
3681
|
+
ge(ur, "undefined", () => null, () => {
|
|
3686
3682
|
}),
|
|
3687
3683
|
ge(Wl, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
3688
|
-
ge(
|
|
3689
|
-
ge(
|
|
3684
|
+
ge($l, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
3685
|
+
ge(Ql, "Error", (e, t) => {
|
|
3690
3686
|
const n = {
|
|
3691
3687
|
name: e.name,
|
|
3692
3688
|
message: e.message
|
|
@@ -3700,7 +3696,7 @@ var gr = [
|
|
|
3700
3696
|
n[s] = e[s];
|
|
3701
3697
|
}), n;
|
|
3702
3698
|
}),
|
|
3703
|
-
ge(
|
|
3699
|
+
ge(Hl, "regexp", (e) => "" + e, (e) => {
|
|
3704
3700
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
3705
3701
|
return new RegExp(t, n);
|
|
3706
3702
|
}),
|
|
@@ -3713,9 +3709,9 @@ var gr = [
|
|
|
3713
3709
|
(e) => new Set(e)
|
|
3714
3710
|
),
|
|
3715
3711
|
ge(pt, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
3716
|
-
ge((e) => ds(e) ||
|
|
3712
|
+
ge((e) => ds(e) || zl(e), "number", (e) => ds(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
3717
3713
|
ge((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
3718
|
-
ge(
|
|
3714
|
+
ge(Jl, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
3719
3715
|
];
|
|
3720
3716
|
function sn(e, t, n, s) {
|
|
3721
3717
|
return {
|
|
@@ -3725,12 +3721,12 @@ function sn(e, t, n, s) {
|
|
|
3725
3721
|
untransform: s
|
|
3726
3722
|
};
|
|
3727
3723
|
}
|
|
3728
|
-
var
|
|
3724
|
+
var gr = sn((e, t) => dr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
|
|
3729
3725
|
const s = n.symbolRegistry.getValue(t[1]);
|
|
3730
3726
|
if (!s)
|
|
3731
3727
|
throw new Error("Trying to deserialize unknown symbol");
|
|
3732
3728
|
return s;
|
|
3733
|
-
}),
|
|
3729
|
+
}), Xl = [
|
|
3734
3730
|
Int8Array,
|
|
3735
3731
|
Uint8Array,
|
|
3736
3732
|
Int16Array,
|
|
@@ -3740,16 +3736,16 @@ var mr = sn((e, t) => fr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
3740
3736
|
Float32Array,
|
|
3741
3737
|
Float64Array,
|
|
3742
3738
|
Uint8ClampedArray
|
|
3743
|
-
].reduce((e, t) => (e[t.name] = t, e), {}),
|
|
3744
|
-
const n =
|
|
3739
|
+
].reduce((e, t) => (e[t.name] = t, e), {}), mr = sn(Yl, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
3740
|
+
const n = Xl[t[1]];
|
|
3745
3741
|
if (!n)
|
|
3746
3742
|
throw new Error("Trying to deserialize unknown typed array");
|
|
3747
3743
|
return new n(e);
|
|
3748
3744
|
});
|
|
3749
|
-
function
|
|
3745
|
+
function Er(e, t) {
|
|
3750
3746
|
return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
|
|
3751
3747
|
}
|
|
3752
|
-
var
|
|
3748
|
+
var pr = sn(Er, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
|
|
3753
3749
|
const n = t.classRegistry.getAllowedProps(e.constructor);
|
|
3754
3750
|
if (!n)
|
|
3755
3751
|
return { ...e };
|
|
@@ -3762,44 +3758,44 @@ var yr = sn(pr, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
3762
3758
|
if (!s)
|
|
3763
3759
|
throw new Error(`Trying to deserialize unknown class '${t[1]}' - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564`);
|
|
3764
3760
|
return Object.assign(Object.create(s.prototype), e);
|
|
3765
|
-
}),
|
|
3761
|
+
}), yr = sn((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
|
|
3766
3762
|
const s = n.customTransformerRegistry.findByName(t[1]);
|
|
3767
3763
|
if (!s)
|
|
3768
3764
|
throw new Error("Trying to deserialize unknown custom value");
|
|
3769
3765
|
return s.deserialize(e);
|
|
3770
|
-
}),
|
|
3771
|
-
const n = us(
|
|
3766
|
+
}), Zl = [pr, gr, yr, mr], fs = (e, t) => {
|
|
3767
|
+
const n = us(Zl, (r) => r.isApplicable(e, t));
|
|
3772
3768
|
if (n)
|
|
3773
3769
|
return {
|
|
3774
3770
|
value: n.transform(e, t),
|
|
3775
3771
|
type: n.annotation(e, t)
|
|
3776
3772
|
};
|
|
3777
|
-
const s = us(
|
|
3773
|
+
const s = us(hr, (r) => r.isApplicable(e, t));
|
|
3778
3774
|
if (s)
|
|
3779
3775
|
return {
|
|
3780
3776
|
value: s.transform(e, t),
|
|
3781
3777
|
type: s.annotation
|
|
3782
3778
|
};
|
|
3783
|
-
},
|
|
3784
|
-
|
|
3785
|
-
|
|
3779
|
+
}, Ar = {};
|
|
3780
|
+
hr.forEach((e) => {
|
|
3781
|
+
Ar[e.annotation] = e;
|
|
3786
3782
|
});
|
|
3787
|
-
var
|
|
3783
|
+
var ec = (e, t, n) => {
|
|
3788
3784
|
if (be(t))
|
|
3789
3785
|
switch (t[0]) {
|
|
3790
3786
|
case "symbol":
|
|
3791
|
-
return
|
|
3787
|
+
return gr.untransform(e, t, n);
|
|
3792
3788
|
case "class":
|
|
3793
|
-
return
|
|
3789
|
+
return pr.untransform(e, t, n);
|
|
3794
3790
|
case "custom":
|
|
3795
|
-
return
|
|
3791
|
+
return yr.untransform(e, t, n);
|
|
3796
3792
|
case "typed-array":
|
|
3797
|
-
return
|
|
3793
|
+
return mr.untransform(e, t, n);
|
|
3798
3794
|
default:
|
|
3799
3795
|
throw new Error("Unknown transformation: " + t);
|
|
3800
3796
|
}
|
|
3801
3797
|
else {
|
|
3802
|
-
const s =
|
|
3798
|
+
const s = Ar[t];
|
|
3803
3799
|
if (!s)
|
|
3804
3800
|
throw new Error("Unknown transformation: " + t);
|
|
3805
3801
|
return s.untransform(e, n);
|
|
@@ -3812,7 +3808,7 @@ var tc = (e, t, n) => {
|
|
|
3812
3808
|
n.next(), t--;
|
|
3813
3809
|
return n.next().value;
|
|
3814
3810
|
};
|
|
3815
|
-
function
|
|
3811
|
+
function Tr(e) {
|
|
3816
3812
|
if (qt(e, "__proto__"))
|
|
3817
3813
|
throw new Error("__proto__ is not allowed as a property");
|
|
3818
3814
|
if (qt(e, "prototype"))
|
|
@@ -3820,8 +3816,8 @@ function Sr(e) {
|
|
|
3820
3816
|
if (qt(e, "constructor"))
|
|
3821
3817
|
throw new Error("constructor is not allowed as a property");
|
|
3822
3818
|
}
|
|
3823
|
-
var
|
|
3824
|
-
|
|
3819
|
+
var tc = (e, t) => {
|
|
3820
|
+
Tr(t);
|
|
3825
3821
|
for (let n = 0; n < t.length; n++) {
|
|
3826
3822
|
const s = t[n];
|
|
3827
3823
|
if (yt(e))
|
|
@@ -3841,7 +3837,7 @@ var nc = (e, t) => {
|
|
|
3841
3837
|
}
|
|
3842
3838
|
return e;
|
|
3843
3839
|
}, wn = (e, t, n) => {
|
|
3844
|
-
if (
|
|
3840
|
+
if (Tr(t), t.length === 0)
|
|
3845
3841
|
return n(e);
|
|
3846
3842
|
let s = e;
|
|
3847
3843
|
for (let a = 0; a < t.length - 1; a++) {
|
|
@@ -3901,14 +3897,14 @@ function vn(e, t, n = []) {
|
|
|
3901
3897
|
vn(a, t, [...n, ...dt(i)]);
|
|
3902
3898
|
}), t(s, n);
|
|
3903
3899
|
}
|
|
3904
|
-
function
|
|
3900
|
+
function nc(e, t, n) {
|
|
3905
3901
|
return vn(t, (s, r) => {
|
|
3906
|
-
e = wn(e, r, (a) =>
|
|
3902
|
+
e = wn(e, r, (a) => ec(a, s, n));
|
|
3907
3903
|
}), e;
|
|
3908
3904
|
}
|
|
3909
|
-
function
|
|
3905
|
+
function sc(e, t) {
|
|
3910
3906
|
function n(s, r) {
|
|
3911
|
-
const a =
|
|
3907
|
+
const a = tc(e, dt(r));
|
|
3912
3908
|
s.map(dt).forEach((i) => {
|
|
3913
3909
|
e = wn(e, i, () => a);
|
|
3914
3910
|
});
|
|
@@ -3922,12 +3918,12 @@ function rc(e, t) {
|
|
|
3922
3918
|
rt(t, n);
|
|
3923
3919
|
return e;
|
|
3924
3920
|
}
|
|
3925
|
-
var
|
|
3926
|
-
function
|
|
3921
|
+
var rc = (e, t) => Et(e) || be(e) || pt(e) || yt(e) || Er(e, t);
|
|
3922
|
+
function ac(e, t, n) {
|
|
3927
3923
|
const s = n.get(e);
|
|
3928
3924
|
s ? s.push(t) : n.set(e, [t]);
|
|
3929
3925
|
}
|
|
3930
|
-
function
|
|
3926
|
+
function ic(e, t) {
|
|
3931
3927
|
const n = {};
|
|
3932
3928
|
let s;
|
|
3933
3929
|
return e.forEach((r) => {
|
|
@@ -3938,17 +3934,17 @@ function oc(e, t) {
|
|
|
3938
3934
|
a.length === 0 ? s = i.map(gn) : n[gn(a)] = i.map(gn);
|
|
3939
3935
|
}), s ? Pn(n) ? [s] : [s, n] : Pn(n) ? void 0 : n;
|
|
3940
3936
|
}
|
|
3941
|
-
var
|
|
3942
|
-
const o =
|
|
3937
|
+
var Sr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
3938
|
+
const o = jl(e);
|
|
3943
3939
|
if (!o) {
|
|
3944
|
-
|
|
3940
|
+
ac(e, r, t);
|
|
3945
3941
|
const g = i.get(e);
|
|
3946
3942
|
if (g)
|
|
3947
3943
|
return s ? {
|
|
3948
3944
|
transformedValue: null
|
|
3949
3945
|
} : g;
|
|
3950
3946
|
}
|
|
3951
|
-
if (!
|
|
3947
|
+
if (!rc(e, n)) {
|
|
3952
3948
|
const g = fs(e, n), E = g ? {
|
|
3953
3949
|
transformedValue: g.value,
|
|
3954
3950
|
annotations: [g.type]
|
|
@@ -3965,9 +3961,9 @@ var _r = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3965
3961
|
rt(u, (g, E) => {
|
|
3966
3962
|
if (E === "__proto__" || E === "constructor" || E === "prototype")
|
|
3967
3963
|
throw new Error(`Detected property ${E}. This is a prototype pollution risk, please remove it from your object.`);
|
|
3968
|
-
const S =
|
|
3964
|
+
const S = Sr(g, t, n, s, [...r, E], [...a, e], i);
|
|
3969
3965
|
f[E] = S.transformedValue, be(S.annotations) ? d[E] = S.annotations : Et(S.annotations) && rt(S.annotations, (T, p) => {
|
|
3970
|
-
d[
|
|
3966
|
+
d[fr(E) + "." + p] = T;
|
|
3971
3967
|
});
|
|
3972
3968
|
});
|
|
3973
3969
|
const h = Pn(d) ? {
|
|
@@ -3979,19 +3975,19 @@ var _r = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3979
3975
|
};
|
|
3980
3976
|
return o || i.set(e, h), h;
|
|
3981
3977
|
};
|
|
3982
|
-
function
|
|
3978
|
+
function _r(e) {
|
|
3983
3979
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
3984
3980
|
}
|
|
3985
3981
|
function hs(e) {
|
|
3986
|
-
return
|
|
3982
|
+
return _r(e) === "Array";
|
|
3987
3983
|
}
|
|
3988
|
-
function
|
|
3989
|
-
if (
|
|
3984
|
+
function oc(e) {
|
|
3985
|
+
if (_r(e) !== "Object")
|
|
3990
3986
|
return !1;
|
|
3991
3987
|
const t = Object.getPrototypeOf(e);
|
|
3992
3988
|
return !!t && t.constructor === Object && t === Object.prototype;
|
|
3993
3989
|
}
|
|
3994
|
-
function
|
|
3990
|
+
function lc(e, t, n, s, r) {
|
|
3995
3991
|
const a = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
|
|
3996
3992
|
a === "enumerable" && (e[t] = n), r && a === "nonenumerable" && Object.defineProperty(e, t, {
|
|
3997
3993
|
value: n,
|
|
@@ -4003,14 +3999,14 @@ function cc(e, t, n, s, r) {
|
|
|
4003
3999
|
function bn(e, t = {}) {
|
|
4004
4000
|
if (hs(e))
|
|
4005
4001
|
return e.map((r) => bn(r, t));
|
|
4006
|
-
if (!
|
|
4002
|
+
if (!oc(e))
|
|
4007
4003
|
return e;
|
|
4008
4004
|
const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
|
|
4009
4005
|
return [...n, ...s].reduce((r, a) => {
|
|
4010
4006
|
if (hs(t.props) && !t.props.includes(a))
|
|
4011
4007
|
return r;
|
|
4012
4008
|
const i = e[a], o = bn(i, t);
|
|
4013
|
-
return
|
|
4009
|
+
return lc(r, a, o, e, t.nonenumerable), r;
|
|
4014
4010
|
}, {});
|
|
4015
4011
|
}
|
|
4016
4012
|
var O = class {
|
|
@@ -4018,17 +4014,17 @@ var O = class {
|
|
|
4018
4014
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
4019
4015
|
*/
|
|
4020
4016
|
constructor({ dedupe: e = !1 } = {}) {
|
|
4021
|
-
this.classRegistry = new
|
|
4017
|
+
this.classRegistry = new Ol(), this.symbolRegistry = new cr((t) => t.description ?? ""), this.customTransformerRegistry = new Bl(), this.allowedErrorProps = [], this.dedupe = e;
|
|
4022
4018
|
}
|
|
4023
4019
|
serialize(e) {
|
|
4024
|
-
const t = /* @__PURE__ */ new Map(), n =
|
|
4020
|
+
const t = /* @__PURE__ */ new Map(), n = Sr(e, t, this, this.dedupe), s = {
|
|
4025
4021
|
json: n.transformedValue
|
|
4026
4022
|
};
|
|
4027
4023
|
n.annotations && (s.meta = {
|
|
4028
4024
|
...s.meta,
|
|
4029
4025
|
values: n.annotations
|
|
4030
4026
|
});
|
|
4031
|
-
const r =
|
|
4027
|
+
const r = ic(t, this.dedupe);
|
|
4032
4028
|
return r && (s.meta = {
|
|
4033
4029
|
...s.meta,
|
|
4034
4030
|
referentialEqualities: r
|
|
@@ -4037,7 +4033,7 @@ var O = class {
|
|
|
4037
4033
|
deserialize(e) {
|
|
4038
4034
|
const { json: t, meta: n } = e;
|
|
4039
4035
|
let s = bn(t);
|
|
4040
|
-
return n != null && n.values && (s =
|
|
4036
|
+
return n != null && n.values && (s = nc(s, n.values, this)), n != null && n.referentialEqualities && (s = sc(s, n.referentialEqualities)), s;
|
|
4041
4037
|
}
|
|
4042
4038
|
stringify(e) {
|
|
4043
4039
|
return JSON.stringify(this.serialize(e));
|
|
@@ -4070,7 +4066,7 @@ O.registerClass = O.defaultInstance.registerClass.bind(O.defaultInstance);
|
|
|
4070
4066
|
O.registerSymbol = O.defaultInstance.registerSymbol.bind(O.defaultInstance);
|
|
4071
4067
|
O.registerCustom = O.defaultInstance.registerCustom.bind(O.defaultInstance);
|
|
4072
4068
|
O.allowErrorProps = O.defaultInstance.allowErrorProps.bind(O.defaultInstance);
|
|
4073
|
-
var
|
|
4069
|
+
var cc = O.serialize, wu = O.stringify;
|
|
4074
4070
|
function vu(e) {
|
|
4075
4071
|
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
4076
4072
|
}
|
|
@@ -4096,18 +4092,18 @@ function Cu(e) {
|
|
|
4096
4092
|
var Lu = (e, t = !1) => {
|
|
4097
4093
|
const {
|
|
4098
4094
|
json: n
|
|
4099
|
-
} =
|
|
4095
|
+
} = cc(e);
|
|
4100
4096
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
4101
|
-
}, Ot = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3,
|
|
4097
|
+
}, Ot = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, uc = (e, t) => e.queryHash.localeCompare(t.queryHash), Pr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, dc = (e, t) => Ot(e) === Ot(t) ? Pr(e, t) : Ot(e) > Ot(t) ? 1 : -1, ku = {
|
|
4098
|
+
status: dc,
|
|
4099
|
+
"query hash": uc,
|
|
4100
|
+
"last updated": Pr
|
|
4101
|
+
}, Rt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, wr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, fc = (e, t) => Rt(e) === Rt(t) ? wr(e, t) : Rt(e) > Rt(t) ? 1 : -1, Du = {
|
|
4102
4102
|
status: fc,
|
|
4103
|
-
"query hash": dc,
|
|
4104
4103
|
"last updated": wr
|
|
4105
|
-
},
|
|
4106
|
-
status: hc,
|
|
4107
|
-
"last updated": vr
|
|
4108
|
-
}, Gu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), xu = () => {
|
|
4104
|
+
}, xu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Gu = () => {
|
|
4109
4105
|
const [e, t] = F("dark");
|
|
4110
|
-
return
|
|
4106
|
+
return Yo(() => {
|
|
4111
4107
|
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
4112
4108
|
t(n.matches ? "dark" : "light");
|
|
4113
4109
|
const s = (r) => {
|
|
@@ -4175,11 +4171,11 @@ var Lu = (e, t = !1) => {
|
|
|
4175
4171
|
return n[s] = Bt(n[s], r), n;
|
|
4176
4172
|
}
|
|
4177
4173
|
return e;
|
|
4178
|
-
},
|
|
4174
|
+
}, vr = (e, t) => {
|
|
4179
4175
|
if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
|
|
4180
4176
|
const s = document.createElement("style"), r = document.createTextNode("");
|
|
4181
4177
|
s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
|
|
4182
|
-
}, Ve, At, Tt, St, ke, _t, He, $e, Qe, je,
|
|
4178
|
+
}, Ve, At, Tt, St, ke, _t, He, $e, Qe, je, We, Pt, ze, wt, ps, hc = (ps = class {
|
|
4183
4179
|
constructor(e) {
|
|
4184
4180
|
L(this, Ve);
|
|
4185
4181
|
L(this, At);
|
|
@@ -4191,9 +4187,9 @@ var Lu = (e, t = !1) => {
|
|
|
4191
4187
|
L(this, $e);
|
|
4192
4188
|
L(this, Qe);
|
|
4193
4189
|
L(this, je);
|
|
4194
|
-
L(this, ze);
|
|
4195
|
-
L(this, Pt);
|
|
4196
4190
|
L(this, We);
|
|
4191
|
+
L(this, Pt);
|
|
4192
|
+
L(this, ze);
|
|
4197
4193
|
L(this, wt);
|
|
4198
4194
|
const {
|
|
4199
4195
|
client: t,
|
|
@@ -4208,7 +4204,7 @@ var Lu = (e, t = !1) => {
|
|
|
4208
4204
|
shadowDOMTarget: f,
|
|
4209
4205
|
hideDisabledQueries: d
|
|
4210
4206
|
} = e;
|
|
4211
|
-
C(this, Ve, F(t)), C(this, Tt, n), C(this, St, s), C(this, At, r), C(this, _t, u), C(this, He, f), C(this, $e, F(a)), C(this, Qe, F(i)), C(this, je, F(o)), C(this,
|
|
4207
|
+
C(this, Ve, F(t)), C(this, Tt, n), C(this, St, s), C(this, At, r), C(this, _t, u), C(this, He, f), C(this, $e, F(a)), C(this, Qe, F(i)), C(this, je, F(o)), C(this, We, F(l)), C(this, Pt, F(d));
|
|
4212
4208
|
}
|
|
4213
4209
|
setButtonPosition(e) {
|
|
4214
4210
|
_(this, $e)[1](e);
|
|
@@ -4220,7 +4216,7 @@ var Lu = (e, t = !1) => {
|
|
|
4220
4216
|
_(this, je)[1](e);
|
|
4221
4217
|
}
|
|
4222
4218
|
setErrorTypes(e) {
|
|
4223
|
-
_(this,
|
|
4219
|
+
_(this, We)[1](e);
|
|
4224
4220
|
}
|
|
4225
4221
|
setClient(e) {
|
|
4226
4222
|
_(this, Ve)[1](e);
|
|
@@ -4228,10 +4224,10 @@ var Lu = (e, t = !1) => {
|
|
|
4228
4224
|
mount(e) {
|
|
4229
4225
|
if (_(this, ke))
|
|
4230
4226
|
throw new Error("Devtools is already mounted");
|
|
4231
|
-
const t =
|
|
4232
|
-
const n = this, [s] = _(this, $e), [r] = _(this, Qe), [a] = _(this, je), [i] = _(this,
|
|
4227
|
+
const t = ir(() => {
|
|
4228
|
+
const n = this, [s] = _(this, $e), [r] = _(this, Qe), [a] = _(this, je), [i] = _(this, We), [o] = _(this, Pt), [l] = _(this, Ve);
|
|
4233
4229
|
let u;
|
|
4234
|
-
return _(this,
|
|
4230
|
+
return _(this, ze) ? u = _(this, ze) : (u = rr(() => import("./NCMVHL6D-CksZXXOw.js")), C(this, ze, u)), vr(_(this, _t), _(this, He)), nr(u, sr({
|
|
4235
4231
|
get queryFlavor() {
|
|
4236
4232
|
return _(n, Tt);
|
|
4237
4233
|
},
|
|
@@ -4273,7 +4269,7 @@ var Lu = (e, t = !1) => {
|
|
|
4273
4269
|
throw new Error("Devtools is not mounted");
|
|
4274
4270
|
(e = _(this, wt)) == null || e.call(this), C(this, ke, !1);
|
|
4275
4271
|
}
|
|
4276
|
-
}, Ve = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), St = new WeakMap(), ke = new WeakMap(), _t = new WeakMap(), He = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), je = new WeakMap(),
|
|
4272
|
+
}, Ve = new WeakMap(), At = new WeakMap(), Tt = new WeakMap(), St = new WeakMap(), ke = new WeakMap(), _t = new WeakMap(), He = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), je = new WeakMap(), We = new WeakMap(), Pt = new WeakMap(), ze = new WeakMap(), wt = new WeakMap(), ps), Ye, vt, bt, It, De, Nt, Je, Xe, Ze, et, tt, Ct, nt, st, Lt, ys, gc = (ys = class {
|
|
4277
4273
|
constructor(e) {
|
|
4278
4274
|
L(this, Ye);
|
|
4279
4275
|
L(this, vt);
|
|
@@ -4327,10 +4323,10 @@ var Lu = (e, t = !1) => {
|
|
|
4327
4323
|
mount(e) {
|
|
4328
4324
|
if (_(this, De))
|
|
4329
4325
|
throw new Error("Devtools is already mounted");
|
|
4330
|
-
const t =
|
|
4326
|
+
const t = ir(() => {
|
|
4331
4327
|
const n = this, [s] = _(this, Xe), [r] = _(this, Ze), [a] = _(this, et), [i] = _(this, tt), [o] = _(this, Ct), [l] = _(this, Ye), [u] = _(this, nt);
|
|
4332
4328
|
let f;
|
|
4333
|
-
return _(this, st) ? f = _(this, st) : (f =
|
|
4329
|
+
return _(this, st) ? f = _(this, st) : (f = rr(() => import("./2AITGKQY-DtQPkxBe.js")), C(this, st, f)), vr(_(this, Nt), _(this, Je)), nr(f, sr({
|
|
4334
4330
|
get queryFlavor() {
|
|
4335
4331
|
return _(n, bt);
|
|
4336
4332
|
},
|
|
@@ -4376,7 +4372,7 @@ var Lu = (e, t = !1) => {
|
|
|
4376
4372
|
(e = _(this, Lt)) == null || e.call(this), C(this, De, !1);
|
|
4377
4373
|
}
|
|
4378
4374
|
}, Ye = new WeakMap(), vt = new WeakMap(), bt = new WeakMap(), It = new WeakMap(), De = new WeakMap(), Nt = new WeakMap(), Je = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), Ct = new WeakMap(), nt = new WeakMap(), st = new WeakMap(), Lt = new WeakMap(), ys);
|
|
4379
|
-
function
|
|
4375
|
+
function mc(e) {
|
|
4380
4376
|
const t = ee(e.client), n = j.useRef(null), {
|
|
4381
4377
|
buttonPosition: s,
|
|
4382
4378
|
position: r,
|
|
@@ -4386,7 +4382,7 @@ function Ec(e) {
|
|
|
4386
4382
|
shadowDOMTarget: l,
|
|
4387
4383
|
hideDisabledQueries: u
|
|
4388
4384
|
} = e, [f] = j.useState(
|
|
4389
|
-
new
|
|
4385
|
+
new hc({
|
|
4390
4386
|
client: t,
|
|
4391
4387
|
queryFlavor: "React Query",
|
|
4392
4388
|
version: "5",
|
|
@@ -4414,9 +4410,9 @@ function Ec(e) {
|
|
|
4414
4410
|
f.unmount();
|
|
4415
4411
|
}), [f]), /* @__PURE__ */ c("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
|
|
4416
4412
|
}
|
|
4417
|
-
function
|
|
4413
|
+
function Ec(e) {
|
|
4418
4414
|
const t = ee(e.client), n = j.useRef(null), { errorTypes: s, styleNonce: r, shadowDOMTarget: a, hideDisabledQueries: i } = e, [o] = j.useState(
|
|
4419
|
-
new
|
|
4415
|
+
new gc({
|
|
4420
4416
|
client: t,
|
|
4421
4417
|
queryFlavor: "React Query",
|
|
4422
4418
|
version: "5",
|
|
@@ -4451,9 +4447,9 @@ function pc(e) {
|
|
|
4451
4447
|
}
|
|
4452
4448
|
var gs = process.env.NODE_ENV !== "development" ? function() {
|
|
4453
4449
|
return null;
|
|
4454
|
-
} :
|
|
4450
|
+
} : mc;
|
|
4455
4451
|
process.env.NODE_ENV;
|
|
4456
|
-
const yc = () => {
|
|
4452
|
+
const pc = pe(""), yc = () => {
|
|
4457
4453
|
Hn("dynamic-page-selector", {
|
|
4458
4454
|
description: "Dynamic page selector"
|
|
4459
4455
|
}), Hn("enable-add-page-dropdown", {
|
|
@@ -4507,37 +4503,37 @@ const yc = () => {
|
|
|
4507
4503
|
},
|
|
4508
4504
|
[e]
|
|
4509
4505
|
);
|
|
4510
|
-
}, Pc = K(() => import("./digital-asset-manager-
|
|
4506
|
+
}, Pc = K(() => import("./digital-asset-manager-Bb81T3mS.js")), wc = K(() => import("./save-to-lib-CeWaSQdB.js")), vc = K(() => import("./theme-panel-footer-D2B7iYW2.js")), bc = K(() => import("./web-preview-YuuoRaZn.js"));
|
|
4511
4507
|
yc();
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4508
|
+
ci();
|
|
4509
|
+
na(Po);
|
|
4510
|
+
Ho();
|
|
4511
|
+
sa(Pc);
|
|
4512
|
+
ra(wc);
|
|
4517
4513
|
const Ic = {
|
|
4518
4514
|
role: "",
|
|
4519
4515
|
permissions: null
|
|
4520
4516
|
}, ms = (e) => {
|
|
4521
|
-
|
|
4522
|
-
const t = Rn(), { data: n = Ic, isFetching: s } =
|
|
4517
|
+
Lo(), Oi();
|
|
4518
|
+
const t = Rn(), { data: n = Ic, isFetching: s } = ko(), { data: r, isFetching: a } = Ce(), { data: i, isFetching: o } = Ac(), { data: l, isFetching: u } = Be(), f = s || a || o || u, [d] = le(), h = d.get("page"), { data: g } = oe(), { data: E, isFetching: S } = Io(), { blocks: T } = bo(E), { lockingStatus: p, pageLock: A } = Ne(), { data: w, isFetching: D } = No(), U = wo(), { onSave: b } = Do(), { mutateAsync: Te } = Tc(), { getPartialBlocks: Se, getPartialBlockBlocks: k } = xo(), { mutateAsync: v } = Ji(), { mutateAsync: I } = Co(), z = _c(), [Q, ce] = G(!1), it = ct([]), we = $(() => H(l, "theme", {}) || {}, [l]), ot = me(p) && (A == null ? void 0 : A.status) === "editing", Le = (A == null ? void 0 : A.status) === "checking", Mn = S || Le || D;
|
|
4523
4519
|
it.current = T;
|
|
4524
|
-
const [
|
|
4520
|
+
const [br] = ne(pc);
|
|
4525
4521
|
re(() => {
|
|
4526
4522
|
const ue = () => {
|
|
4527
4523
|
document.hidden ? ce(!0) : ce(!1);
|
|
4528
4524
|
};
|
|
4529
4525
|
return window.addEventListener("visibilitychange", ue), () => window.removeEventListener("visibilitychange", ue);
|
|
4530
4526
|
}, []);
|
|
4531
|
-
const
|
|
4527
|
+
const Ir = $(() => {
|
|
4532
4528
|
const ue = {};
|
|
4533
4529
|
return n && (ue.permissions = H(n, "permissions", null), ue.role = H(n, "role", "user")), ue;
|
|
4534
|
-
}, [n]),
|
|
4530
|
+
}, [n]), Nr = q(
|
|
4535
4531
|
async (ue, kt) => await v({ pageType: ue, query: kt }),
|
|
4536
4532
|
[v]
|
|
4537
4533
|
);
|
|
4538
4534
|
return /* @__PURE__ */ m(he, { children: [
|
|
4539
|
-
Mn && /* @__PURE__ */ c(
|
|
4540
|
-
|
|
4535
|
+
Mn && /* @__PURE__ */ c(Ms, { className: f ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ c(ft, { className: `animate-spin text-primary ${f ? "h-6 w-6" : "h-5 w-5"}` }) }),
|
|
4536
|
+
br && /* @__PURE__ */ c(
|
|
4541
4537
|
V,
|
|
4542
4538
|
{
|
|
4543
4539
|
fallback: /* @__PURE__ */ c("div", { className: "absolute inset-0 z-[999999] flex min-h-screen w-screen items-center justify-center bg-gray-100", children: /* @__PURE__ */ c(ft, { className: "h-6 w-6 animate-spin text-primary" }) }),
|
|
@@ -4545,9 +4541,9 @@ const Ic = {
|
|
|
4545
4541
|
}
|
|
4546
4542
|
),
|
|
4547
4543
|
/* @__PURE__ */ c(
|
|
4548
|
-
|
|
4544
|
+
aa,
|
|
4549
4545
|
{
|
|
4550
|
-
gotoPage:
|
|
4546
|
+
gotoPage: z,
|
|
4551
4547
|
collections: i ?? [],
|
|
4552
4548
|
getBlockAsyncProps: Te,
|
|
4553
4549
|
pageExternalData: w,
|
|
@@ -4566,23 +4562,23 @@ const Ic = {
|
|
|
4566
4562
|
getPartialBlockBlocks: k,
|
|
4567
4563
|
getPartialBlocks: Se,
|
|
4568
4564
|
blocks: S ? [] : T,
|
|
4569
|
-
theme:
|
|
4565
|
+
theme: $r(we),
|
|
4570
4566
|
pageTypes: r,
|
|
4571
|
-
searchPageTypeItems:
|
|
4567
|
+
searchPageTypeItems: Nr,
|
|
4572
4568
|
askAiCallBack: U,
|
|
4573
|
-
onSave: async ({ blocks: ue, theme: kt, needTranslations:
|
|
4569
|
+
onSave: async ({ blocks: ue, theme: kt, needTranslations: Cr }) => {
|
|
4574
4570
|
if (!h) return !0;
|
|
4575
4571
|
it.current = ue;
|
|
4576
4572
|
const Fn = [...ue];
|
|
4577
|
-
return await b({ page: h, blocks: Fn, needTranslations:
|
|
4573
|
+
return await b({ page: h, blocks: Fn, needTranslations: Cr }), it.current = Fn, Qr(kt, we) || await I({ settings: { theme: kt } }), !0;
|
|
4578
4574
|
},
|
|
4579
4575
|
themePanelComponent: vc,
|
|
4580
|
-
...
|
|
4576
|
+
...Ir
|
|
4581
4577
|
}
|
|
4582
4578
|
),
|
|
4583
4579
|
/* @__PURE__ */ m("div", { children: [
|
|
4584
|
-
/* @__PURE__ */ c(
|
|
4585
|
-
/* @__PURE__ */ c(
|
|
4580
|
+
/* @__PURE__ */ c(Mi, { isFetchingPage: Mn }),
|
|
4581
|
+
/* @__PURE__ */ c(Fi, {})
|
|
4586
4582
|
] })
|
|
4587
4583
|
] });
|
|
4588
4584
|
}, Nc = new Wr({
|
|
@@ -4593,7 +4589,7 @@ const Ic = {
|
|
|
4593
4589
|
}
|
|
4594
4590
|
}
|
|
4595
4591
|
}), Ou = (e) => {
|
|
4596
|
-
const { isLoggedIn: t } = Ae(), [, n] = kn(), [s, r] =
|
|
4592
|
+
const { isLoggedIn: t } = Ae(), [, n] = kn(), [s, r] = G(!1);
|
|
4597
4593
|
return re(() => (n(
|
|
4598
4594
|
In(e, [
|
|
4599
4595
|
"apiUrl",
|
|
@@ -4614,16 +4610,16 @@ const Ic = {
|
|
|
4614
4610
|
}), [e, n]), s ? H(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ m(he, { children: [
|
|
4615
4611
|
t ? /* @__PURE__ */ c(ms, { ...e }) : /* @__PURE__ */ c(rs, {}),
|
|
4616
4612
|
/* @__PURE__ */ c(gs, {})
|
|
4617
|
-
] }) : /* @__PURE__ */ m(
|
|
4613
|
+
] }) : /* @__PURE__ */ m(zr, { client: Nc, children: [
|
|
4618
4614
|
t ? /* @__PURE__ */ c(ms, { ...e }) : /* @__PURE__ */ c(rs, {}),
|
|
4619
4615
|
/* @__PURE__ */ c(gs, {})
|
|
4620
4616
|
] }) : /* @__PURE__ */ c("div", {});
|
|
4621
4617
|
}, Cc = j.lazy(() => import("./nested-path-selector-content-DvIL_EoN.js"));
|
|
4622
4618
|
function Lc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
4623
4619
|
const [r, a] = j.useState(!1);
|
|
4624
|
-
return /* @__PURE__ */ m(
|
|
4620
|
+
return /* @__PURE__ */ m(Ca, { open: r, onOpenChange: a, children: [
|
|
4625
4621
|
/* @__PURE__ */ m(Yt, { children: [
|
|
4626
|
-
/* @__PURE__ */ c(Jt, { asChild: !0, children: /* @__PURE__ */ c(
|
|
4622
|
+
/* @__PURE__ */ c(Jt, { asChild: !0, children: /* @__PURE__ */ c(La, { asChild: !0, children: /* @__PURE__ */ c(
|
|
4627
4623
|
M,
|
|
4628
4624
|
{
|
|
4629
4625
|
size: "sm",
|
|
@@ -4693,7 +4689,7 @@ const Ru = () => {
|
|
|
4693
4689
|
console.error("Failed to update metadata");
|
|
4694
4690
|
}
|
|
4695
4691
|
});
|
|
4696
|
-
}, kc = K(() => import("./digital-asset-manager-
|
|
4692
|
+
}, kc = K(() => import("./digital-asset-manager-Bb81T3mS.js")), Mu = ({
|
|
4697
4693
|
assetId: e,
|
|
4698
4694
|
assetUrl: t,
|
|
4699
4695
|
onChange: n,
|
|
@@ -4701,7 +4697,7 @@ const Ru = () => {
|
|
|
4701
4697
|
placeholder: r = "Select an image",
|
|
4702
4698
|
disabled: a = !1
|
|
4703
4699
|
}) => {
|
|
4704
|
-
const [i, o] =
|
|
4700
|
+
const [i, o] = G(!1), l = () => {
|
|
4705
4701
|
a || o(!0);
|
|
4706
4702
|
}, u = () => {
|
|
4707
4703
|
o(!1);
|
|
@@ -4732,7 +4728,7 @@ const Ru = () => {
|
|
|
4732
4728
|
className: "h-8 w-8 rounded-full bg-white text-red-500",
|
|
4733
4729
|
onClick: d,
|
|
4734
4730
|
disabled: a,
|
|
4735
|
-
children: h ? /* @__PURE__ */ c(Zn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(
|
|
4731
|
+
children: h ? /* @__PURE__ */ c(Zn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(ni, { className: "h-4 w-4" })
|
|
4736
4732
|
}
|
|
4737
4733
|
),
|
|
4738
4734
|
!h && /* @__PURE__ */ c(
|
|
@@ -4759,8 +4755,8 @@ const Ru = () => {
|
|
|
4759
4755
|
] })
|
|
4760
4756
|
}
|
|
4761
4757
|
),
|
|
4762
|
-
/* @__PURE__ */ c(Is, { open: i, onOpenChange: o, children: /* @__PURE__ */ m(
|
|
4763
|
-
/* @__PURE__ */ m(
|
|
4758
|
+
/* @__PURE__ */ c(Is, { open: i, onOpenChange: o, children: /* @__PURE__ */ m(ka, { className: "h-fit w-full max-w-7xl overflow-hidden p-0", children: [
|
|
4759
|
+
/* @__PURE__ */ m(Da, { className: "hidden border-b px-4 py-2", children: [
|
|
4764
4760
|
/* @__PURE__ */ c(xa, { children: "Select Image" }),
|
|
4765
4761
|
/* @__PURE__ */ c(
|
|
4766
4762
|
M,
|
|
@@ -4820,13 +4816,13 @@ const Ru = () => {
|
|
|
4820
4816
|
}
|
|
4821
4817
|
};
|
|
4822
4818
|
}
|
|
4823
|
-
},
|
|
4819
|
+
}, xc = (e, t) => {
|
|
4824
4820
|
let s = JSON.stringify(e, null, 2);
|
|
4825
4821
|
return t.forEach(({ original: r }, a) => {
|
|
4826
4822
|
const i = `"__placeholder_${a}__"`, o = new RegExp(Dc(i), "g");
|
|
4827
4823
|
s = s.replace(o, r);
|
|
4828
4824
|
}), s;
|
|
4829
|
-
},
|
|
4825
|
+
}, Gc = (e, t) => {
|
|
4830
4826
|
if (!e) return "";
|
|
4831
4827
|
let n = JSON.stringify(e, null, 2);
|
|
4832
4828
|
const s = /{{([^{}]+)}}/g;
|
|
@@ -4836,7 +4832,7 @@ const Ru = () => {
|
|
|
4836
4832
|
n = n.replace(r[0], i);
|
|
4837
4833
|
}
|
|
4838
4834
|
return n;
|
|
4839
|
-
}, Oc = K(() => import("./shared-json-ld-
|
|
4835
|
+
}, Oc = K(() => import("./shared-json-ld-BliIbNv9.js")), Fu = ({
|
|
4840
4836
|
value: e,
|
|
4841
4837
|
onChange: t,
|
|
4842
4838
|
disabled: n = !1,
|
|
@@ -4849,7 +4845,7 @@ const Ru = () => {
|
|
|
4849
4845
|
hasJsonLdForSelectedLang: u,
|
|
4850
4846
|
copyJsonLDFromDefaultPage: f
|
|
4851
4847
|
}) => {
|
|
4852
|
-
const [d, h] =
|
|
4848
|
+
const [d, h] = G("edit"), [g, E] = G(null), [S, T] = G(""), p = ct(null), [A] = kn(), w = i === "jsonLD" && H(A, "features.sharedJsonLD", !1), D = i === "jsonLD" && !u && !!f;
|
|
4853
4849
|
re(() => {
|
|
4854
4850
|
e.trim() === "" && t("{}");
|
|
4855
4851
|
}, [e, t]);
|
|
@@ -4860,25 +4856,25 @@ const Ru = () => {
|
|
|
4860
4856
|
}, b = (k) => {
|
|
4861
4857
|
if (k.key === "Tab") {
|
|
4862
4858
|
k.preventDefault();
|
|
4863
|
-
const v = k.currentTarget, I = v.selectionStart,
|
|
4864
|
-
if (I !==
|
|
4865
|
-
const ce = e.substring(I,
|
|
4859
|
+
const v = k.currentTarget, I = v.selectionStart, z = v.selectionEnd;
|
|
4860
|
+
if (I !== z) {
|
|
4861
|
+
const ce = e.substring(I, z).split(`
|
|
4866
4862
|
`);
|
|
4867
4863
|
if (k.shiftKey) {
|
|
4868
4864
|
const we = ce.map((Le) => Le.startsWith(" ") ? Le.substring(2) : Le).join(`
|
|
4869
|
-
`), ot = e.substring(0, I) + we + e.substring(
|
|
4865
|
+
`), ot = e.substring(0, I) + we + e.substring(z);
|
|
4870
4866
|
t(ot), setTimeout(() => {
|
|
4871
4867
|
v.selectionStart = I, v.selectionEnd = I + we.length;
|
|
4872
4868
|
}, 0);
|
|
4873
4869
|
} else {
|
|
4874
4870
|
const we = ce.map((Le) => ` ${Le}`).join(`
|
|
4875
|
-
`), ot = e.substring(0, I) + we + e.substring(
|
|
4871
|
+
`), ot = e.substring(0, I) + we + e.substring(z);
|
|
4876
4872
|
t(ot), setTimeout(() => {
|
|
4877
4873
|
v.selectionStart = I, v.selectionEnd = I + we.length;
|
|
4878
4874
|
}, 0);
|
|
4879
4875
|
}
|
|
4880
4876
|
} else {
|
|
4881
|
-
const Q = e.substring(0, I) + " " + e.substring(
|
|
4877
|
+
const Q = e.substring(0, I) + " " + e.substring(z);
|
|
4882
4878
|
t(Q), setTimeout(() => {
|
|
4883
4879
|
v.selectionStart = v.selectionEnd = I + 2;
|
|
4884
4880
|
}, 0);
|
|
@@ -4889,7 +4885,7 @@ const Ru = () => {
|
|
|
4889
4885
|
const k = Es(e);
|
|
4890
4886
|
if (k.isValid)
|
|
4891
4887
|
if (E(null), k.parsed) {
|
|
4892
|
-
const v =
|
|
4888
|
+
const v = Gc(k.parsed, o);
|
|
4893
4889
|
T(v);
|
|
4894
4890
|
} else
|
|
4895
4891
|
T("");
|
|
@@ -4899,17 +4895,17 @@ const Ru = () => {
|
|
|
4899
4895
|
const Te = () => {
|
|
4900
4896
|
const k = Es(e);
|
|
4901
4897
|
if (k.isValid && k.parsed) {
|
|
4902
|
-
const v =
|
|
4898
|
+
const v = xc(k.parsed, k.placeholders);
|
|
4903
4899
|
t(v);
|
|
4904
4900
|
}
|
|
4905
4901
|
}, Se = () => {
|
|
4906
4902
|
g != null && g.position && p.current && (p.current.focus(), p.current.setSelectionRange(g.position, g.position + 1));
|
|
4907
4903
|
};
|
|
4908
|
-
return /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */ m(
|
|
4904
|
+
return /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */ m(Ga, { value: d, onValueChange: h, className: "w-full", children: [
|
|
4909
4905
|
/* @__PURE__ */ m("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
4910
|
-
/* @__PURE__ */ m(
|
|
4906
|
+
/* @__PURE__ */ m(Oa, { className: "w-max", children: [
|
|
4911
4907
|
/* @__PURE__ */ m(an, { value: "edit", className: "flex items-center gap-1", children: [
|
|
4912
|
-
/* @__PURE__ */ c(
|
|
4908
|
+
/* @__PURE__ */ c(si, { className: "h-4 w-4" }),
|
|
4913
4909
|
/* @__PURE__ */ c("span", { children: "Edit" })
|
|
4914
4910
|
] }),
|
|
4915
4911
|
/* @__PURE__ */ m(
|
|
@@ -4931,7 +4927,7 @@ const Ru = () => {
|
|
|
4931
4927
|
className: "flex items-center gap-1",
|
|
4932
4928
|
disabled: !e.trim() || g !== null,
|
|
4933
4929
|
children: [
|
|
4934
|
-
/* @__PURE__ */ c(
|
|
4930
|
+
/* @__PURE__ */ c(ri, { className: "h-4 w-4" }),
|
|
4935
4931
|
/* @__PURE__ */ c("span", { children: "Shared" })
|
|
4936
4932
|
]
|
|
4937
4933
|
}
|
|
@@ -4956,7 +4952,7 @@ const Ru = () => {
|
|
|
4956
4952
|
onClick: Te,
|
|
4957
4953
|
className: "absolute right-1 top-1 h-6 w-6 p-1",
|
|
4958
4954
|
disabled: !e.trim() || n || g !== null,
|
|
4959
|
-
children: /* @__PURE__ */ c(
|
|
4955
|
+
children: /* @__PURE__ */ c(ai, {})
|
|
4960
4956
|
}
|
|
4961
4957
|
) }),
|
|
4962
4958
|
D ? /* @__PURE__ */ c("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: [
|
|
@@ -4981,9 +4977,9 @@ const Ru = () => {
|
|
|
4981
4977
|
readOnly: s
|
|
4982
4978
|
}
|
|
4983
4979
|
),
|
|
4984
|
-
g && /* @__PURE__ */ m(
|
|
4985
|
-
/* @__PURE__ */ c(
|
|
4986
|
-
/* @__PURE__ */ m(
|
|
4980
|
+
g && /* @__PURE__ */ m(Ra, { variant: "destructive", className: "mt-2", children: [
|
|
4981
|
+
/* @__PURE__ */ c(ii, { className: "h-4 w-4" }),
|
|
4982
|
+
/* @__PURE__ */ m(Ua, { className: "flex flex-col", children: [
|
|
4987
4983
|
/* @__PURE__ */ c("span", { className: "font-medium", children: "Invalid JSON" }),
|
|
4988
4984
|
/* @__PURE__ */ c("span", { className: "text-sm", children: g.message }),
|
|
4989
4985
|
g.line && g.column && /* @__PURE__ */ m("span", { className: "text-sm", children: [
|
|
@@ -5053,17 +5049,17 @@ if (typeof window > "u")
|
|
|
5053
5049
|
export {
|
|
5054
5050
|
Cu as $,
|
|
5055
5051
|
y as A,
|
|
5056
|
-
|
|
5052
|
+
Ms as B,
|
|
5057
5053
|
X as C,
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5054
|
+
zs as D,
|
|
5055
|
+
sr as E,
|
|
5056
|
+
ol as F,
|
|
5061
5057
|
du as G,
|
|
5062
5058
|
fu as H,
|
|
5063
|
-
|
|
5059
|
+
Ge as I,
|
|
5064
5060
|
Tn as J,
|
|
5065
5061
|
hu as K,
|
|
5066
|
-
|
|
5062
|
+
xt as L,
|
|
5067
5063
|
lu as M,
|
|
5068
5064
|
Au as N,
|
|
5069
5065
|
ht as O,
|
|
@@ -5072,34 +5068,34 @@ export {
|
|
|
5072
5068
|
Tu as R,
|
|
5073
5069
|
Eu as S,
|
|
5074
5070
|
Un as T,
|
|
5075
|
-
|
|
5076
|
-
|
|
5071
|
+
Yo as U,
|
|
5072
|
+
Il as V,
|
|
5077
5073
|
Sn as W,
|
|
5078
|
-
|
|
5074
|
+
_l as X,
|
|
5079
5075
|
Iu as Y,
|
|
5080
5076
|
Nu as Z,
|
|
5081
|
-
|
|
5082
|
-
|
|
5077
|
+
bl as _,
|
|
5078
|
+
Co as a,
|
|
5083
5079
|
Lu as a0,
|
|
5084
5080
|
gu as a1,
|
|
5085
5081
|
ou as a2,
|
|
5086
5082
|
Su as a3,
|
|
5087
5083
|
Z as a4,
|
|
5088
|
-
|
|
5089
|
-
|
|
5084
|
+
jo as a5,
|
|
5085
|
+
cc as a6,
|
|
5090
5086
|
mu as a7,
|
|
5091
5087
|
Ut as a8,
|
|
5092
|
-
|
|
5088
|
+
xu as a9,
|
|
5093
5089
|
Jc as aA,
|
|
5094
5090
|
Os as aB,
|
|
5095
|
-
|
|
5096
|
-
|
|
5091
|
+
No as aC,
|
|
5092
|
+
Yi as aD,
|
|
5097
5093
|
kn as aE,
|
|
5098
|
-
|
|
5094
|
+
Hi as aF,
|
|
5099
5095
|
Lc as aG,
|
|
5100
5096
|
Mu as aH,
|
|
5101
5097
|
Fu as aI,
|
|
5102
|
-
|
|
5098
|
+
zc as aJ,
|
|
5103
5099
|
Ou as aK,
|
|
5104
5100
|
Ie as aL,
|
|
5105
5101
|
Uu as aM,
|
|
@@ -5107,14 +5103,14 @@ export {
|
|
|
5107
5103
|
Ru as aO,
|
|
5108
5104
|
iu as aP,
|
|
5109
5105
|
Ae as aQ,
|
|
5110
|
-
|
|
5106
|
+
ko as aR,
|
|
5111
5107
|
qu as aS,
|
|
5112
|
-
|
|
5108
|
+
_i as aT,
|
|
5113
5109
|
bu as aa,
|
|
5114
5110
|
vu as ab,
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5111
|
+
Qs as ac,
|
|
5112
|
+
xe as ad,
|
|
5113
|
+
Pl as ae,
|
|
5118
5114
|
wu as af,
|
|
5119
5115
|
yu as ag,
|
|
5120
5116
|
pu as ah,
|
|
@@ -5126,16 +5122,16 @@ export {
|
|
|
5126
5122
|
Bu as an,
|
|
5127
5123
|
au as ao,
|
|
5128
5124
|
Es as ap,
|
|
5129
|
-
|
|
5130
|
-
|
|
5125
|
+
ki as aq,
|
|
5126
|
+
Ri as ar,
|
|
5131
5127
|
Sc as as,
|
|
5132
5128
|
ru as at,
|
|
5133
5129
|
On as au,
|
|
5134
5130
|
cn as av,
|
|
5135
5131
|
de as aw,
|
|
5136
|
-
|
|
5132
|
+
xn as ax,
|
|
5137
5133
|
Yc as ay,
|
|
5138
|
-
|
|
5134
|
+
uo as az,
|
|
5139
5135
|
Rs as b,
|
|
5140
5136
|
Xc as c,
|
|
5141
5137
|
Zc as d,
|
|
@@ -5144,21 +5140,21 @@ export {
|
|
|
5144
5140
|
Ue as g,
|
|
5145
5141
|
Ce as h,
|
|
5146
5142
|
le as i,
|
|
5147
|
-
|
|
5148
|
-
|
|
5143
|
+
xs as j,
|
|
5144
|
+
bi as k,
|
|
5149
5145
|
tu as l,
|
|
5150
5146
|
eu as m,
|
|
5151
5147
|
nu as n,
|
|
5152
5148
|
su as o,
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5149
|
+
pc as p,
|
|
5150
|
+
yi as q,
|
|
5151
|
+
Gu as r,
|
|
5156
5152
|
J as s,
|
|
5157
5153
|
un as t,
|
|
5158
|
-
|
|
5159
|
-
|
|
5154
|
+
Bs as u,
|
|
5155
|
+
nr as v,
|
|
5160
5156
|
ku as w,
|
|
5161
5157
|
Du as x,
|
|
5162
5158
|
F as y,
|
|
5163
|
-
|
|
5159
|
+
Al as z
|
|
5164
5160
|
};
|