@chaibuilder/pages 0.16.16 → 0.16.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{2AITGKQY-DmJ7FEya.js → 2AITGKQY-BS9f-jSI.js} +2 -2
- package/dist/{2AITGKQY-BV6JxIio.cjs → 2AITGKQY-DhZ3CIAd.cjs} +1 -1
- package/dist/{NCMVHL6D-DsqUQxZK.js → NCMVHL6D-Bhn1i9Td.js} +2 -2
- package/dist/{NCMVHL6D-B_AZmaGG.cjs → NCMVHL6D-tLp-yfh7.cjs} +1 -1
- package/dist/{ZDWCUMSJ-DusX6DXb.js → ZDWCUMSJ-Cyfoak0s.js} +1 -1
- package/dist/{ZDWCUMSJ-CQXWzREv.cjs → ZDWCUMSJ-DnUbZaON.cjs} +1 -1
- package/dist/{active-in-another-tab-CSNxota6.js → active-in-another-tab-CE6mPlAF.js} +1 -1
- package/dist/{active-in-another-tab-rGDvhc3f.cjs → active-in-another-tab-DPmHAOnz.cjs} +1 -1
- package/dist/{add-new-language-page-DmQ_eB85.cjs → add-new-language-page-C_cqrchc.cjs} +1 -1
- package/dist/{add-new-language-page-C1ekdWwV.js → add-new-language-page-CfjQxseQ.js} +2 -2
- package/dist/{add-new-page-BImvK_fV.cjs → add-new-page-Cz73obNf.cjs} +1 -1
- package/dist/{add-new-page-C6gW1_B-.js → add-new-page-DrqKQSBZ.js} +1 -1
- package/dist/{ai-panel-content-BGMRcgkl.cjs → ai-panel-content-CwzT_8_2.cjs} +1 -1
- package/dist/{ai-panel-content-BJoNy1Yk.js → ai-panel-content-D0WeLOfT.js} +2 -2
- package/dist/{ai-panel-default-lang-BLE3cVLR.js → ai-panel-default-lang-BFo0lvIA.js} +3 -3
- package/dist/{ai-panel-default-lang-CNTq97FU.cjs → ai-panel-default-lang-BWE3xU7D.cjs} +2 -2
- package/dist/{ai-panel-other-lang-DBBxinT6.js → ai-panel-other-lang-DMk1Fjnx.js} +3 -3
- package/dist/{ai-panel-other-lang-VRmIp9Qm.cjs → ai-panel-other-lang-mtv23TJX.cjs} +1 -1
- package/dist/{ai-prompt-input-BivmKxNH.js → ai-prompt-input-BsZtecyO.js} +2 -2
- package/dist/{ai-prompt-input-5aMuJDep.cjs → ai-prompt-input-DuEk6ni6.cjs} +1 -1
- package/dist/{ai-translation-prompt-CkvGj9Zu.js → ai-translation-prompt-5zkH9z1O.js} +1 -1
- package/dist/{ai-translation-prompt-hp5Ey1Eq.cjs → ai-translation-prompt-XxU4clD3.cjs} +1 -1
- package/dist/{continue-editing-in-this-client-Bdm_5BEM.js → continue-editing-in-this-client-BAJLU5V9.js} +1 -1
- package/dist/{continue-editing-in-this-client-BdjGzFLm.cjs → continue-editing-in-this-client-DAPO-FaB.cjs} +1 -1
- package/dist/{delete-page-OGCRZzrG.cjs → delete-page-CstA2FGa.cjs} +1 -1
- package/dist/{delete-page-BHu4rVNA.js → delete-page-Dz7E_Gln.js} +1 -1
- package/dist/{digital-asset-manager-C7JEgxdI.js → digital-asset-manager-D52Jj1Gh.js} +1 -1
- package/dist/{digital-asset-manager-CaF6tRHd.cjs → digital-asset-manager-Id4p005p.cjs} +1 -1
- package/dist/{duplicate-page-Co3QgE3M.cjs → duplicate-page-DwW4tzGq.cjs} +1 -1
- package/dist/{duplicate-page-DZW5jpE3.js → duplicate-page-LxJbVeQX.js} +2 -2
- package/dist/{dynamic-page-selector-C2vVfVwL.js → dynamic-page-selector-6BmMIsBj.js} +1 -1
- package/dist/{dynamic-page-selector-CL-sCDkO.cjs → dynamic-page-selector-CIBjgfhU.cjs} +1 -1
- package/dist/index-GczdtTmR.cjs +5 -0
- package/dist/{index-DOH-lluK.js → index-zBK_xIhc.js} +216 -217
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{json-diff-viewer-DVB2glQZ.js → json-diff-viewer-C5tv7nua.js} +1 -1
- package/dist/{json-diff-viewer-C69tubC8.cjs → json-diff-viewer-DugqhV-o.cjs} +1 -1
- package/dist/{lang-panel-BDNMrT8U.js → lang-panel-Cq1HkfIL.js} +2 -2
- package/dist/{lang-panel-DWj5wlfo.cjs → lang-panel-rpel3ady.cjs} +1 -1
- package/dist/{mark-as-template-wKn7aI8D.js → mark-as-template-DHcvdwtH.js} +1 -1
- package/dist/{mark-as-template-Br9qxjbc.cjs → mark-as-template-DIItdNWI.cjs} +1 -1
- package/dist/{no-language-page-content-CFVzHv_Y.cjs → no-language-page-content-BFRBPe6H.cjs} +1 -1
- package/dist/{no-language-page-content-C7oVsIYu.js → no-language-page-content-DA6iLaZm.js} +1 -1
- package/dist/{no-language-page-dialog-BqrxzBfj.cjs → no-language-page-dialog-Bp0hhhWQ.cjs} +1 -1
- package/dist/{no-language-page-dialog-5-cAE2F2.js → no-language-page-dialog-CgeVcFEJ.js} +2 -2
- package/dist/{page-creator-89jgn0Ao.js → page-creator-B1-9ivVp.js} +2 -2
- package/dist/{page-creator-itnGYmd4.cjs → page-creator-DPr6rEPU.cjs} +1 -1
- package/dist/{page-lock-T6QScRbl.js → page-lock-Kt_How1V.js} +2 -2
- package/dist/{page-lock-BGnEhXCW.cjs → page-lock-bteeVlGf.cjs} +1 -1
- package/dist/{page-locked-dialog-B39IqdJ9.cjs → page-locked-dialog-CcmOfDpE.cjs} +1 -1
- package/dist/{page-locked-dialog-Bo2JuCSN.js → page-locked-dialog-DHskFACu.js} +1 -1
- package/dist/{page-manager-new-D44_zdpQ.cjs → page-manager-new-B8wYCKP9.cjs} +1 -1
- package/dist/{page-manager-new-CElobhjD.js → page-manager-new-DlyDlsLT.js} +2 -2
- package/dist/{page-manager-search-and-filter-VgVbeup1.js → page-manager-search-and-filter-CJH8kViJ.js} +1 -1
- package/dist/{page-manager-search-and-filter-DmXFyylC.cjs → page-manager-search-and-filter-DXIX1wnh.cjs} +1 -1
- package/dist/{page-revisions-content-CsxGDRzT.cjs → page-revisions-content-BEKm2IRj.cjs} +1 -1
- package/dist/{page-revisions-content-C3GLr_sM.js → page-revisions-content-Do3_ATby.js} +2 -2
- package/dist/{publish-pages-content-Cj6sTZ-B.js → publish-pages-content-CfIH4-uW.js} +2 -2
- package/dist/{publish-pages-content-CdwZOxtG.cjs → publish-pages-content-tmYxmeSk.cjs} +1 -1
- package/dist/{save-to-lib-DtdHpuWg.js → save-to-lib-DVUkBZb8.js} +1 -1
- package/dist/{save-to-lib-BjfzVByH.cjs → save-to-lib-H2XwOH8O.cjs} +1 -1
- package/dist/{selected-block-display-DVzQ888o.js → selected-block-display-BlnYcH8f.js} +1 -1
- package/dist/{selected-block-display-B0yeKnWl.cjs → selected-block-display-bCgnhTf4.cjs} +1 -1
- package/dist/{seo-panel-h6FQkwhv.js → seo-panel-DO9e9dzR.js} +1 -1
- package/dist/{seo-panel-CaXQTicZ.cjs → seo-panel-uLBliADi.cjs} +1 -1
- package/dist/{shared-json-ld-DcYfd7Sl.cjs → shared-json-ld-BwEzPasW.cjs} +1 -1
- package/dist/{shared-json-ld-B1HhFgk0.js → shared-json-ld-DFwVZaJ7.js} +1 -1
- package/dist/{slug-input-DDDMhrBe.cjs → slug-input-B2GUrPyZ.cjs} +1 -1
- package/dist/{slug-input-Bq48cfWr.js → slug-input-CiuBvodc.js} +1 -1
- package/dist/{take-over-request-BC2Rh5wd.js → take-over-request-D9aGP8wJ.js} +1 -1
- package/dist/{take-over-request-Cpa9ooTw.cjs → take-over-request-Dm4emE8Q.cjs} +1 -1
- package/dist/{theme-panel-footer-DoFYuPy1.cjs → theme-panel-footer--fgczfnN.cjs} +1 -1
- package/dist/{theme-panel-footer-B4D33YEO.js → theme-panel-footer-DMV_nX6m.js} +1 -1
- package/dist/{unmark-as-template-fkt1rehy.js → unmark-as-template-CBksW8B6.js} +1 -1
- package/dist/{unmark-as-template-4A6kxi6r.cjs → unmark-as-template-D6lWcLbq.cjs} +1 -1
- package/dist/{unpublish-page-uIYo5nwG.cjs → unpublish-page-B8_HpJ5N.cjs} +1 -1
- package/dist/{unpublish-page-IQ4WTVMd.js → unpublish-page-my8VTao9.js} +1 -1
- package/dist/{web-preview-DYbA7jro.js → web-preview-32tyIOuK.js} +1 -1
- package/dist/{web-preview-BvfhE4ij.cjs → web-preview-DQpJA364.cjs} +1 -1
- package/package.json +1 -1
- package/dist/index-MzR4MaVE.cjs +0 -5
|
@@ -2,17 +2,17 @@ var Vn = (e) => {
|
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
4
|
var Hn = (e, t, n) => t.has(e) || Vn("Cannot " + n);
|
|
5
|
-
var
|
|
5
|
+
var T = (e, t, n) => (Hn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), O = (e, t, n) => t.has(e) ? Vn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), G = (e, t, n, s) => (Hn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
6
6
|
import { jsxs as m, Fragment as me, jsx as c } from "react/jsx-runtime";
|
|
7
7
|
import { get as H, reverse as Or, sortBy as Dr, find as ae, noop as ms, groupBy as xr, values as Es, first as ps, minBy as ys, keyBy as Rr, map as Kt, isEmpty as Te, compact as As, each as kr, upperCase as qn, filter as Ts, includes as Ur, has as Yt, pick as In, keys as Mr, pickBy as Br, endsWith as Fr, isArray as Kr, startCase as Vr, isFunction as Hr, cloneDeep as qr, isEqual as $r } from "lodash-es";
|
|
8
8
|
import * as Q from "react";
|
|
9
|
-
import Qr, { useMemo as q, useCallback as z, useState as
|
|
9
|
+
import Qr, { useMemo as q, useCallback as z, useState as F, useEffect as ne, useRef as Ie, lazy as V, Suspense as X, createContext as zr, Component as jr, createElement as $n } from "react";
|
|
10
10
|
import { atom as pe, useAtom as ie } from "jotai";
|
|
11
11
|
import { useQuery as oe, useMutation as Y, useQueryClient as J, onlineManager as Ss, QueryClient as Wr, QueryClientProvider as Yr } from "@tanstack/react-query";
|
|
12
12
|
import { useLanguages as _e, useSavePage as ke, useTranslation as Pe, mergeClasses as Vt, usePermissions as _s, PERMISSIONS as Jr, useRightPanel as Zr, useChaiFeatureFlag as Xr, useIsPageLoaded as ea, registerChaiLibrary as ta, getBlocksFromHTML as na, registerChaiSidebarPanel as Gt, registerChaiFeatureFlag as rn, registerChaiTopBar as sa, registerChaiMediaManager as ra, registerChaiSaveToLibrary as aa, ChaiBuilderEditor as ia } from "@chaibuilder/sdk";
|
|
13
13
|
import { Tooltip as Jt, TooltipTrigger as Zt, Button as M, TooltipContent as Xt, Sheet as Ps, SheetContent as ws, SheetHeader as oa, SheetTitle as la, SheetDescription as ca, DropdownMenu as Ln, DropdownMenuTrigger as Nn, DropdownMenuContent as Cn, DropdownMenuItem as fe, Separator as ua, TooltipProvider as vs, SheetTrigger as da, Skeleton as Ot, Dialog as bs, HoverCard as fa, HoverCardTrigger as ha, HoverCardContent as ga, AlertDialog as ma, AlertDialogTrigger as Ea, AlertDialogContent as pa, AlertDialogHeader as ya, AlertDialogTitle as Aa, AlertDialogDescription as Ta, AlertDialogFooter as Sa, AlertDialogCancel as _a, AlertDialogAction as Pa, Popover as wa, PopoverTrigger as va, DialogContent as ba, DialogHeader as Ia, DialogTitle as La, Tabs as Na, TabsList as Ca, TabsTrigger as an, TabsContent as on, Textarea as Qn, Alert as Ga, AlertDescription as Oa } from "@chaibuilder/sdk/ui";
|
|
14
14
|
import { LogsIcon as Da, Folder as xa, Languages as zn, ChevronDown as En, Star as Ra, Plus as Is, History as ka, Play as Ua, Palette as Ma, CheckCircle as Ba, Loader as Ht, Save as Fa, Send as jn, Rocket as Wn, CopyPlusIcon as Ka, Pencil as Va, Power as Ha, Trash as qa, SquareLibrary as Yn, Hash as $a, File as Qa, MoreHorizontal as Jn, ExternalLink as za, LanguagesIcon as ja, User as Wa, X as Zn, Trash2 as Ya, ImageIcon as Xn, Code as Ja, Eye as Za, Share2 as Xa, FileCode2 as ei, AlertTriangle as ti } from "lucide-react";
|
|
15
|
-
import { toast as
|
|
15
|
+
import { toast as k } from "sonner";
|
|
16
16
|
import { useRegisteredChaiBlocks as ni, getDefaultBlockProps as si } from "@chaibuilder/runtime";
|
|
17
17
|
import { loadWebBlocks as ri } from "@chaibuilder/sdk/web-blocks";
|
|
18
18
|
const Dt = {
|
|
@@ -330,10 +330,10 @@ const Vc = () => {
|
|
|
330
330
|
);
|
|
331
331
|
};
|
|
332
332
|
function we() {
|
|
333
|
-
const [e, t] =
|
|
333
|
+
const [e, t] = F(
|
|
334
334
|
new URLSearchParams(window.location.search)
|
|
335
335
|
);
|
|
336
|
-
return
|
|
336
|
+
return ne(() => {
|
|
337
337
|
const n = () => {
|
|
338
338
|
t(new URLSearchParams(window.location.search));
|
|
339
339
|
};
|
|
@@ -366,8 +366,8 @@ const Me = (e) => {
|
|
|
366
366
|
return (e == null ? void 0 : e.slug) || "";
|
|
367
367
|
};
|
|
368
368
|
function oi(e, t) {
|
|
369
|
-
const [n, s] =
|
|
370
|
-
return
|
|
369
|
+
const [n, s] = F(e);
|
|
370
|
+
return ne(() => {
|
|
371
371
|
const r = setTimeout(() => s(e), t);
|
|
372
372
|
return () => clearTimeout(r);
|
|
373
373
|
}, [e, t]), n;
|
|
@@ -385,12 +385,12 @@ const li = ({ query: e, uuid: t }) => {
|
|
|
385
385
|
}), u = q(() => n === "" ? l.filter((f) => f.lang === "" || f.lang === s) : l.filter((f) => f.lang === n), [n, s, l]);
|
|
386
386
|
return { allLangPages: l, data: u, isFetching: d };
|
|
387
387
|
}, ci = () => {
|
|
388
|
-
const { selectedLang: e, fallbackLang: t } = _e(), [n, s] = Gs(), [r, a] =
|
|
388
|
+
const { selectedLang: e, fallbackLang: t } = _e(), [n, s] = Gs(), [r, a] = F(""), i = oi(r, 500), { allLangPages: o, data: l, isFetching: d } = li({ query: i }), u = z((h) => s(h), [s]), f = z((h) => a(h), [a]), g = z(() => {
|
|
389
389
|
if (!n) return;
|
|
390
|
-
const h = !(n != null && n.primaryPage), p = e.length === 0,
|
|
391
|
-
(y) => (y == null ? void 0 : y.primaryPage) ===
|
|
390
|
+
const h = !(n != null && n.primaryPage), p = e.length === 0, A = h ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, D = o.filter(
|
|
391
|
+
(y) => (y == null ? void 0 : y.primaryPage) === A || y.id === A
|
|
392
392
|
).find((y) => p ? y.lang === e || y.lang === t : y.lang === e);
|
|
393
|
-
s(
|
|
393
|
+
s(D || n);
|
|
394
394
|
}, [n, e, o, s, t]);
|
|
395
395
|
return {
|
|
396
396
|
isFetching: d,
|
|
@@ -448,7 +448,7 @@ const Dn = pe(null), xn = () => {
|
|
|
448
448
|
ACTIVE_IN_ANOTHER_TAB: "ACTIVE_IN_ANOTHER_TAB",
|
|
449
449
|
FORCE_TAKE_OVER: "FORCE_TAKE_OVER",
|
|
450
450
|
CONNECTION_LOST: "CONNECTION_LOST"
|
|
451
|
-
},
|
|
451
|
+
}, se = {
|
|
452
452
|
FORCE_TAKE_OVER: "FORCE_TAKE_OVER",
|
|
453
453
|
TAKE_OVER_REQUEST: "TAKE_OVER_REQUEST",
|
|
454
454
|
TAKE_OVER_APPROVED: "TAKE_OVER_APPROVED",
|
|
@@ -457,13 +457,13 @@ const Dn = pe(null), xn = () => {
|
|
|
457
457
|
CONTINUE_EDITING_IN_THIS_CLIENT: "CONTINUE_EDITING_IN_THIS_CLIENT",
|
|
458
458
|
CONTINUE_EDITING_IN_THIS_TAB_REQUEST: "CONTINUE_EDITING_IN_THIS_TAB_REQUEST"
|
|
459
459
|
}, gi = ["sync", "join", "leave"], mi = [
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
460
|
+
se.FORCE_TAKE_OVER,
|
|
461
|
+
se.TAKE_OVER_REQUEST,
|
|
462
|
+
se.TAKE_OVER_APPROVED,
|
|
463
|
+
se.TAKE_OVER_REJECTED,
|
|
464
|
+
se.FORCE_TAKE_OVER_REQUEST,
|
|
465
|
+
se.CONTINUE_EDITING_IN_THIS_CLIENT,
|
|
466
|
+
se.CONTINUE_EDITING_IN_THIS_TAB_REQUEST
|
|
467
467
|
], Ei = pe({}), xs = pe(null), pi = pe(ee.CHECKING), yi = pe({}), Ai = (e) => {
|
|
468
468
|
const t = {}, n = xr(Es(e).map(ps).filter(Boolean), "pageId");
|
|
469
469
|
return Object.entries(n).forEach(
|
|
@@ -497,7 +497,7 @@ const Rs = () => {
|
|
|
497
497
|
return q(() => t[e], [t, e]);
|
|
498
498
|
}, Rn = () => {
|
|
499
499
|
const e = Ns(), { setPageStatus: t } = he(), [n] = ie(xs);
|
|
500
|
-
return
|
|
500
|
+
return ne(() => {
|
|
501
501
|
if (clearTimeout(ln), !e)
|
|
502
502
|
return ln = setTimeout(() => {
|
|
503
503
|
e || t(ee.EDITING);
|
|
@@ -541,27 +541,27 @@ const Rs = () => {
|
|
|
541
541
|
const u = d || {};
|
|
542
542
|
if (!(!(u != null && u.pageId) || (u == null ? void 0 : u.pageId) !== i.current || (u == null ? void 0 : u.receiverClientId) !== Ue))
|
|
543
543
|
switch (r({}), l) {
|
|
544
|
-
case
|
|
545
|
-
case
|
|
544
|
+
case se.FORCE_TAKE_OVER_REQUEST:
|
|
545
|
+
case se.CONTINUE_EDITING_IN_THIS_TAB_REQUEST: {
|
|
546
546
|
try {
|
|
547
547
|
await o(!0);
|
|
548
548
|
} catch (f) {
|
|
549
549
|
console.error("Failed to save page before releasing lock:", f);
|
|
550
550
|
}
|
|
551
|
-
await a(
|
|
551
|
+
await a(se.CONTINUE_EDITING_IN_THIS_CLIENT, { requestingClientId: u == null ? void 0 : u.senderClientId }), setTimeout(() => r({ type: l }), 0);
|
|
552
552
|
break;
|
|
553
553
|
}
|
|
554
|
-
case
|
|
554
|
+
case se.TAKE_OVER_REQUEST: {
|
|
555
555
|
r({ requestingUserId: u == null ? void 0 : u.userId, requestingClientId: u == null ? void 0 : u.senderClientId }), s(ee.TAKE_OVER_REQUESTED);
|
|
556
556
|
break;
|
|
557
557
|
}
|
|
558
|
-
case
|
|
558
|
+
case se.CONTINUE_EDITING_IN_THIS_CLIENT: {
|
|
559
559
|
const f = Ti(n == null ? void 0 : n.presenceState());
|
|
560
560
|
s(ee.CHECKING), await (n == null ? void 0 : n.track({ onlineAt: f, pageId: i.current, userId: e, clientId: Ue }));
|
|
561
561
|
break;
|
|
562
562
|
}
|
|
563
|
-
case
|
|
564
|
-
r({ type:
|
|
563
|
+
case se.TAKE_OVER_REJECTED: {
|
|
564
|
+
r({ type: se.TAKE_OVER_REJECTED });
|
|
565
565
|
break;
|
|
566
566
|
}
|
|
567
567
|
}
|
|
@@ -569,36 +569,35 @@ const Rs = () => {
|
|
|
569
569
|
[a, r, s, n, e, o]
|
|
570
570
|
);
|
|
571
571
|
}, Hc = () => {
|
|
572
|
-
const e = Ns(), t = en(), n = Nt(), s = Si(), [r, a] = ie(xs), { setPageStatus: i } = he(), o = vi(),
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
}, [
|
|
572
|
+
const e = Ns(), t = en(), n = Nt(), s = Si(), [r, a] = ie(xs), { setPageStatus: i } = he(), [o, l] = F(0), d = vi(), u = Pi(), f = Ie(d), g = Ie(u);
|
|
573
|
+
ne(() => {
|
|
574
|
+
f.current = d, g.current = u;
|
|
575
|
+
}, [d, u]), ne(() => {
|
|
576
|
+
const h = () => {
|
|
577
|
+
document.visibilityState === "visible" && l((p) => p + 1);
|
|
578
|
+
};
|
|
579
|
+
return document.addEventListener("visibilitychange", h), () => {
|
|
580
|
+
document.removeEventListener("visibilitychange", h);
|
|
581
|
+
};
|
|
582
|
+
}, []), ne(() => {
|
|
576
583
|
if (!e || !t || !s || r && r.topic === s) return;
|
|
577
|
-
const
|
|
584
|
+
const h = e.channel(s, {
|
|
578
585
|
config: { presence: { key: Ue } }
|
|
579
586
|
});
|
|
580
|
-
return mi.forEach((
|
|
581
|
-
|
|
582
|
-
|
|
587
|
+
return mi.forEach((p) => {
|
|
588
|
+
h.on("broadcast", { event: p }, (A) => {
|
|
589
|
+
f.current(p)(A);
|
|
583
590
|
});
|
|
584
|
-
}), gi.forEach((
|
|
585
|
-
|
|
586
|
-
|
|
591
|
+
}), gi.forEach((p) => {
|
|
592
|
+
h.on("presence", { event: p }, () => {
|
|
593
|
+
g.current(h);
|
|
587
594
|
});
|
|
588
|
-
}),
|
|
589
|
-
|
|
590
|
-
id: "realtime-connection-error",
|
|
591
|
-
duration: 1 / 0,
|
|
592
|
-
action: {
|
|
593
|
-
label: "Reload",
|
|
594
|
-
onClick: () => window.location.reload()
|
|
595
|
-
},
|
|
596
|
-
position: "bottom-center"
|
|
597
|
-
}), a(null), i(ee.CONNECTION_LOST));
|
|
595
|
+
}), h.subscribe(async (p) => {
|
|
596
|
+
p === "SUBSCRIBED" ? (k.dismiss("realtime-connection-error"), a(h)) : (p === "CHANNEL_ERROR" || p === "TIMED_OUT") && (console.log("Realtime connection failed", p), a(null), i(ee.CONNECTION_LOST), document.visibilityState === "visible" && setTimeout(() => l((A) => A + 1), 2e3));
|
|
598
597
|
}), () => {
|
|
599
|
-
|
|
598
|
+
h.unsubscribe(), a(null);
|
|
600
599
|
};
|
|
601
|
-
}, [e, t, s, a]),
|
|
600
|
+
}, [e, t, s, a, o]), ne(() => (r && n && t && r.track({
|
|
602
601
|
pageId: n,
|
|
603
602
|
userId: t,
|
|
604
603
|
clientId: Ue,
|
|
@@ -636,18 +635,18 @@ const Rs = () => {
|
|
|
636
635
|
},
|
|
637
636
|
placeholderData: (r) => r || {}
|
|
638
637
|
});
|
|
639
|
-
}, bi = V(() => import("./page-manager-new-
|
|
640
|
-
const { t } = Pe(), [n, s] = we(), r = n.get("page"), { data: a, isFetching: i } = ce(), { data: o, isFetching: l } = Us(), [d, u] =
|
|
638
|
+
}, bi = V(() => import("./page-manager-new-DlyDlsLT.js")), Ms = ({ children: e }) => {
|
|
639
|
+
const { t } = Pe(), [n, s] = we(), r = n.get("page"), { data: a, isFetching: i } = ce(), { data: o, isFetching: l } = Us(), [d, u] = F(!1), [f, g] = F(!0), { savePage: h } = ke(), p = !!r && !Te(a), { isLocked: A } = he(), S = q(() => {
|
|
641
640
|
if (!o || l) return !1;
|
|
642
641
|
const v = o.find((U) => U.slug === "/");
|
|
643
642
|
return v == null ? void 0 : v.id;
|
|
644
643
|
}, [o, l]);
|
|
645
|
-
|
|
644
|
+
ne(() => {
|
|
646
645
|
if (l || !S || o.some((b) => b.id === r)) return;
|
|
647
646
|
const U = new URLSearchParams({ page: S });
|
|
648
647
|
Ds(U, s), !l && o && g(!1);
|
|
649
648
|
}, [r, l, o, S, s]);
|
|
650
|
-
const
|
|
649
|
+
const D = !f && !r, y = !f && !i && Te(a), w = d || D || y;
|
|
651
650
|
return /* @__PURE__ */ m(me, { children: [
|
|
652
651
|
/* @__PURE__ */ c("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ c("div", { className: "relative", children: /* @__PURE__ */ m(Jt, { children: [
|
|
653
652
|
/* @__PURE__ */ c(
|
|
@@ -655,7 +654,7 @@ const Rs = () => {
|
|
|
655
654
|
{
|
|
656
655
|
asChild: !0,
|
|
657
656
|
onClick: () => {
|
|
658
|
-
|
|
657
|
+
A || h(), u(!0);
|
|
659
658
|
},
|
|
660
659
|
children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(Da, { className: "h-4 w-4" }) }, "template-viewer")
|
|
661
660
|
}
|
|
@@ -684,7 +683,7 @@ const Rs = () => {
|
|
|
684
683
|
}
|
|
685
684
|
) })
|
|
686
685
|
] });
|
|
687
|
-
}, Ii = V(() => import("./add-new-language-page-
|
|
686
|
+
}, Ii = V(() => import("./add-new-language-page-CfjQxseQ.js")), Li = () => {
|
|
688
687
|
const e = le("topLeftCorner", null);
|
|
689
688
|
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Qr.createElement(e, {}) }) : null;
|
|
690
689
|
}, Ni = ({
|
|
@@ -693,11 +692,11 @@ const Rs = () => {
|
|
|
693
692
|
goToDefaultLang: n = !1
|
|
694
693
|
}) => {
|
|
695
694
|
const { fallbackLang: s, languages: r, selectedLang: a, setSelectedLang: i } = _e(), o = Te(a) ? s : a, [, l] = we(), { isLocked: d } = he(), { t: u } = Pe();
|
|
696
|
-
|
|
695
|
+
ne(() => {
|
|
697
696
|
const y = new URLSearchParams(window.location.search), w = y.get("lang");
|
|
698
697
|
w && (r.includes(w) ? i(w) : (y.delete("lang"), l(y), i("")));
|
|
699
698
|
}, [r, l, i]);
|
|
700
|
-
const [, f] = ie(Dn), { data: g } = ce(), { data: h } = Be(), { data: p } = Me(),
|
|
699
|
+
const [, f] = ie(Dn), { data: g } = ce(), { data: h } = Be(), { data: p } = Me(), A = q(() => {
|
|
701
700
|
const y = As(
|
|
702
701
|
Kt(H(h, "languages"), (w) => {
|
|
703
702
|
const v = ae(p, { lang: w });
|
|
@@ -722,14 +721,14 @@ const Rs = () => {
|
|
|
722
721
|
detail: {
|
|
723
722
|
fromLang: o,
|
|
724
723
|
toLang: y,
|
|
725
|
-
switchHandler: () =>
|
|
724
|
+
switchHandler: () => D(y)
|
|
726
725
|
}
|
|
727
726
|
});
|
|
728
727
|
window.dispatchEvent(v);
|
|
729
728
|
return;
|
|
730
729
|
}
|
|
731
|
-
|
|
732
|
-
},
|
|
730
|
+
D(y);
|
|
731
|
+
}, D = (y) => {
|
|
733
732
|
i(y);
|
|
734
733
|
const w = new URLSearchParams(window.location.search);
|
|
735
734
|
y === s ? w.delete("lang") : w.set("lang", y), Ds(w, l);
|
|
@@ -738,7 +737,7 @@ const Rs = () => {
|
|
|
738
737
|
/* @__PURE__ */ c(zn, { className: "h-4 w-4" }),
|
|
739
738
|
H(Dt, o, o),
|
|
740
739
|
/* @__PURE__ */ c(En, { className: "h-4 w-4" })
|
|
741
|
-
] }) : n ? /* @__PURE__ */ c(M, { onClick: () =>
|
|
740
|
+
] }) : n ? /* @__PURE__ */ c(M, { onClick: () => D(s), variant: "link", size: "sm", children: u("Switch to default language") }) : /* @__PURE__ */ c(me, { children: /* @__PURE__ */ m(Ln, { children: [
|
|
742
741
|
/* @__PURE__ */ c(Nn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(
|
|
743
742
|
M,
|
|
744
743
|
{
|
|
@@ -755,7 +754,7 @@ const Rs = () => {
|
|
|
755
754
|
) }),
|
|
756
755
|
/* @__PURE__ */ m(Cn, { className: "space-y-1 border-border", children: [
|
|
757
756
|
Kt(
|
|
758
|
-
|
|
757
|
+
A.filter((y) => y.isLangPageAdded),
|
|
759
758
|
(y) => /* @__PURE__ */ m(
|
|
760
759
|
fe,
|
|
761
760
|
{
|
|
@@ -775,7 +774,7 @@ const Rs = () => {
|
|
|
775
774
|
y.value
|
|
776
775
|
)
|
|
777
776
|
),
|
|
778
|
-
e && !Te(
|
|
777
|
+
e && !Te(A.filter((y) => !y.isLangPageAdded)) && /* @__PURE__ */ m(me, { children: [
|
|
779
778
|
/* @__PURE__ */ c(ua, {}),
|
|
780
779
|
/* @__PURE__ */ m(
|
|
781
780
|
M,
|
|
@@ -827,7 +826,7 @@ function Gi() {
|
|
|
827
826
|
/* @__PURE__ */ c(Ot, { className: "h-8 w-8 rounded-full" })
|
|
828
827
|
] }, t)) });
|
|
829
828
|
}
|
|
830
|
-
const Oi = Q.lazy(() => import("./page-revisions-content-
|
|
829
|
+
const Oi = Q.lazy(() => import("./page-revisions-content-Do3_ATby.js"));
|
|
831
830
|
function Di() {
|
|
832
831
|
const [e, t] = Q.useState(!1);
|
|
833
832
|
return /* @__PURE__ */ c(vs, { children: /* @__PURE__ */ m(Jt, { delayDuration: 0, children: [
|
|
@@ -899,11 +898,11 @@ const cn = ({
|
|
|
899
898
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
900
899
|
});
|
|
901
900
|
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";
|
|
902
|
-
|
|
901
|
+
k.success(i);
|
|
903
902
|
},
|
|
904
903
|
onError: (r, a) => {
|
|
905
904
|
const i = ae(s, { key: a.pageType });
|
|
906
|
-
|
|
905
|
+
k.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
907
906
|
description: H(xi, r.message, r.message)
|
|
908
907
|
});
|
|
909
908
|
}
|
|
@@ -928,7 +927,7 @@ const cn = ({
|
|
|
928
927
|
},
|
|
929
928
|
onError: (a, i) => {
|
|
930
929
|
const o = ae(r, { key: i.pageType });
|
|
931
|
-
|
|
930
|
+
k.error(`Failed to update ${o != null && o.hasSlug ? "page" : o.name}.`, {
|
|
932
931
|
description: a.message
|
|
933
932
|
});
|
|
934
933
|
}
|
|
@@ -942,7 +941,7 @@ const cn = ({
|
|
|
942
941
|
}),
|
|
943
942
|
onSuccess: (r, a) => {
|
|
944
943
|
if (r.code === "PAGE_LOCKED") {
|
|
945
|
-
|
|
944
|
+
k.error("Delete not allowed", {
|
|
946
945
|
description: "Page is currently being edited by another user."
|
|
947
946
|
});
|
|
948
947
|
return;
|
|
@@ -957,7 +956,7 @@ const cn = ({
|
|
|
957
956
|
},
|
|
958
957
|
onError: (r, a) => {
|
|
959
958
|
const i = ae(s, { key: a.pageType });
|
|
960
|
-
|
|
959
|
+
k.error(`Failed to delete ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
961
960
|
description: r.message
|
|
962
961
|
});
|
|
963
962
|
}
|
|
@@ -976,13 +975,13 @@ const cn = ({
|
|
|
976
975
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
977
976
|
});
|
|
978
977
|
const i = ae(s, { key: a.pageType });
|
|
979
|
-
|
|
978
|
+
k.success(
|
|
980
979
|
i != null && i.hasSlug ? "Page unpublished successfully." : "New " + i.name + " added successfully."
|
|
981
980
|
);
|
|
982
981
|
},
|
|
983
982
|
onError: (r, a) => {
|
|
984
983
|
const i = ae(s, { key: a.pageType });
|
|
985
|
-
|
|
984
|
+
k.error(`Failed to take offline ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
986
985
|
description: r.message
|
|
987
986
|
});
|
|
988
987
|
}
|
|
@@ -1004,7 +1003,7 @@ const cn = ({
|
|
|
1004
1003
|
});
|
|
1005
1004
|
},
|
|
1006
1005
|
onError: (a) => {
|
|
1007
|
-
console.log("##", a),
|
|
1006
|
+
console.log("##", a), k.error("Failed to publish pages.");
|
|
1008
1007
|
}
|
|
1009
1008
|
});
|
|
1010
1009
|
}, Wc = () => {
|
|
@@ -1026,10 +1025,10 @@ const cn = ({
|
|
|
1026
1025
|
onSuccess: () => {
|
|
1027
1026
|
n.invalidateQueries({
|
|
1028
1027
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1029
|
-
}),
|
|
1028
|
+
}), k.success("Page marked as template successfully.");
|
|
1030
1029
|
},
|
|
1031
1030
|
onError: () => {
|
|
1032
|
-
|
|
1031
|
+
k.error("Failed to mark page as template.");
|
|
1033
1032
|
}
|
|
1034
1033
|
});
|
|
1035
1034
|
}, Yc = () => {
|
|
@@ -1042,10 +1041,10 @@ const cn = ({
|
|
|
1042
1041
|
onSuccess: () => {
|
|
1043
1042
|
n.invalidateQueries({
|
|
1044
1043
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1045
|
-
}),
|
|
1044
|
+
}), k.success("Page unmarked as template successfully.");
|
|
1046
1045
|
},
|
|
1047
1046
|
onError: () => {
|
|
1048
|
-
|
|
1047
|
+
k.error("Failed to unmark page as template.");
|
|
1049
1048
|
}
|
|
1050
1049
|
});
|
|
1051
1050
|
}, Jc = () => {
|
|
@@ -1056,17 +1055,17 @@ const cn = ({
|
|
|
1056
1055
|
data: { id: s, slug: r }
|
|
1057
1056
|
}),
|
|
1058
1057
|
onSuccess: (s, { primaryPage: r }) => {
|
|
1059
|
-
|
|
1058
|
+
k.success("Slug changed successfully."), r ? n.invalidateQueries({
|
|
1060
1059
|
queryKey: [E.GET_LANGUAGE_PAGES, r]
|
|
1061
1060
|
}) : n.invalidateQueries({
|
|
1062
1061
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1063
1062
|
});
|
|
1064
1063
|
},
|
|
1065
1064
|
onError: () => {
|
|
1066
|
-
|
|
1065
|
+
k.error("Failed to change slug");
|
|
1067
1066
|
}
|
|
1068
1067
|
});
|
|
1069
|
-
}, Ui = V(() => import("./publish-pages-content-
|
|
1068
|
+
}, Ui = V(() => import("./publish-pages-content-CfIH4-uW.js"));
|
|
1070
1069
|
function Mi({
|
|
1071
1070
|
showModal: e = !1,
|
|
1072
1071
|
onClose: t = () => console.log("Cancelled")
|
|
@@ -1156,8 +1155,8 @@ function Un({
|
|
|
1156
1155
|
/* @__PURE__ */ c(Xt, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
|
|
1157
1156
|
] }) }) : e;
|
|
1158
1157
|
}
|
|
1159
|
-
const Hi = V(() => import("./unpublish-page-
|
|
1160
|
-
const { t: e } = Pe(), { selectedLang: t, fallbackLang: n } = _e(), s = le("getPreviewUrl", async (g) => g), [r, a] =
|
|
1158
|
+
const Hi = V(() => import("./unpublish-page-my8VTao9.js")), qi = V(() => import("./translation-warning-modal-DalBhNQy.js")), $i = () => {
|
|
1159
|
+
const { t: e } = Pe(), { selectedLang: t, fallbackLang: n } = _e(), s = le("getPreviewUrl", async (g) => g), [r, a] = F(""), { data: i } = ce(), { data: o } = Me(), { data: l } = Ce(), d = q(
|
|
1161
1160
|
() => {
|
|
1162
1161
|
var g;
|
|
1163
1162
|
return (g = o == null ? void 0 : o.find((h) => (h == null ? void 0 : h.lang) === t)) == null ? void 0 : g.slug;
|
|
@@ -1167,7 +1166,7 @@ const Hi = V(() => import("./unpublish-page-IQ4WTVMd.js")), qi = V(() => import(
|
|
|
1167
1166
|
var h;
|
|
1168
1167
|
return (h = ae(l, { key: g })) == null ? void 0 : h.hasSlug;
|
|
1169
1168
|
}, [l]), f = t === n ? "" : t;
|
|
1170
|
-
return
|
|
1169
|
+
return ne(() => {
|
|
1171
1170
|
(async () => {
|
|
1172
1171
|
if (typeof s == "function") {
|
|
1173
1172
|
const g = !u(i == null ? void 0 : i.pageType), h = await s(
|
|
@@ -1194,8 +1193,8 @@ const Hi = V(() => import("./unpublish-page-IQ4WTVMd.js")), qi = V(() => import(
|
|
|
1194
1193
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1195
1194
|
] });
|
|
1196
1195
|
}, zi = () => {
|
|
1197
|
-
const { t: e } = Pe(), [t, n] =
|
|
1198
|
-
|
|
1196
|
+
const { t: e } = Pe(), [t, n] = F(!1), { isLocked: s } = he(), { savePageAsync: r, saveState: a } = ke();
|
|
1197
|
+
ne(() => {
|
|
1199
1198
|
const u = (f) => {
|
|
1200
1199
|
a === "UNSAVED" && (f.preventDefault(), f.returnValue = !1);
|
|
1201
1200
|
};
|
|
@@ -1233,7 +1232,7 @@ const Hi = V(() => import("./unpublish-page-IQ4WTVMd.js")), qi = V(() => import(
|
|
|
1233
1232
|
d
|
|
1234
1233
|
] });
|
|
1235
1234
|
}, ji = () => {
|
|
1236
|
-
const { t: e } = Pe(), { selectedLang: t } = _e(), { data: n } = Ne(), { data: s } = Me(), [r, a] =
|
|
1235
|
+
const { t: e } = Pe(), { selectedLang: t } = _e(), { data: n } = Ne(), { data: s } = Me(), [r, a] = F(!1), [i, o] = F(!1), [l, d] = F(null), { savePageAsync: u } = ke(), [f, g] = F(!1), { data: h } = ce(), { mutate: p, isPending: A } = Bs(), { needTranslations: S } = ke(), D = S(), { buttonText: y, buttonClassName: w, isPublished: v } = q(() => {
|
|
1237
1236
|
const P = h && (h == null ? void 0 : h.online);
|
|
1238
1237
|
return {
|
|
1239
1238
|
buttonClassName: P ? "hover:bg-green-600 bg-green-500" : "",
|
|
@@ -1241,7 +1240,7 @@ const Hi = V(() => import("./unpublish-page-IQ4WTVMd.js")), qi = V(() => import(
|
|
|
1241
1240
|
buttonText: e(P ? "Published" : "Publish")
|
|
1242
1241
|
};
|
|
1243
1242
|
}, [h, e]), U = async () => {
|
|
1244
|
-
if (
|
|
1243
|
+
if (D) {
|
|
1245
1244
|
g(!0);
|
|
1246
1245
|
return;
|
|
1247
1246
|
}
|
|
@@ -1261,7 +1260,7 @@ const Hi = V(() => import("./unpublish-page-IQ4WTVMd.js")), qi = V(() => import(
|
|
|
1261
1260
|
{
|
|
1262
1261
|
size: "sm",
|
|
1263
1262
|
onClick: U,
|
|
1264
|
-
disabled:
|
|
1263
|
+
disabled: A || !(h != null && h.id),
|
|
1265
1264
|
className: `relative flex items-center gap-1 overflow-hidden rounded-r-none text-white transition-all duration-300 ease-in-out ${w}`,
|
|
1266
1265
|
onMouseEnter: () => o(!0),
|
|
1267
1266
|
onMouseLeave: () => o(!1),
|
|
@@ -1290,7 +1289,7 @@ const Hi = V(() => import("./unpublish-page-IQ4WTVMd.js")), qi = V(() => import(
|
|
|
1290
1289
|
M,
|
|
1291
1290
|
{
|
|
1292
1291
|
size: "sm",
|
|
1293
|
-
disabled:
|
|
1292
|
+
disabled: A || !(h != null && h.id),
|
|
1294
1293
|
className: `rounded-l-none border-l border-white/50 px-2 text-white ${w}`,
|
|
1295
1294
|
children: /* @__PURE__ */ c(En, { className: "h-4 w-4" })
|
|
1296
1295
|
}
|
|
@@ -1299,7 +1298,7 @@ const Hi = V(() => import("./unpublish-page-IQ4WTVMd.js")), qi = V(() => import(
|
|
|
1299
1298
|
/* @__PURE__ */ m(
|
|
1300
1299
|
fe,
|
|
1301
1300
|
{
|
|
1302
|
-
disabled:
|
|
1301
|
+
disabled: A,
|
|
1303
1302
|
className: "cursor-pointer text-xs",
|
|
1304
1303
|
onClick: () => p({ ids: B }, { onSuccess: () => un("TOP_RIGHT") }),
|
|
1305
1304
|
children: [
|
|
@@ -1311,7 +1310,7 @@ const Hi = V(() => import("./unpublish-page-IQ4WTVMd.js")), qi = V(() => import(
|
|
|
1311
1310
|
!v && /* @__PURE__ */ m(
|
|
1312
1311
|
fe,
|
|
1313
1312
|
{
|
|
1314
|
-
disabled:
|
|
1313
|
+
disabled: A,
|
|
1315
1314
|
className: "cursor-pointer text-xs",
|
|
1316
1315
|
onClick: () => p({ ids: [h == null ? void 0 : h.id] }, { onSuccess: () => un("TOP_RIGHT") }),
|
|
1317
1316
|
children: [
|
|
@@ -1340,7 +1339,7 @@ const Hi = V(() => import("./unpublish-page-IQ4WTVMd.js")), qi = V(() => import(
|
|
|
1340
1339
|
isOpen: f,
|
|
1341
1340
|
onClose: Ae,
|
|
1342
1341
|
onContinue: ye,
|
|
1343
|
-
isPending:
|
|
1342
|
+
isPending: A
|
|
1344
1343
|
}
|
|
1345
1344
|
) })
|
|
1346
1345
|
] });
|
|
@@ -1452,11 +1451,11 @@ const Yi = ({
|
|
|
1452
1451
|
) })
|
|
1453
1452
|
] })
|
|
1454
1453
|
] });
|
|
1455
|
-
}, Ji = V(() => import("./add-new-page-
|
|
1456
|
-
const [e, t] =
|
|
1454
|
+
}, Ji = V(() => import("./add-new-page-DrqKQSBZ.js")), Zi = V(() => import("./delete-page-Dz7E_Gln.js")), Xi = V(() => import("./duplicate-page-LxJbVeQX.js")), eo = V(() => import("./mark-as-template-DHcvdwtH.js")), to = V(() => import("./unmark-as-template-CBksW8B6.js")), no = V(() => import("./unpublish-page-my8VTao9.js")), so = () => {
|
|
1455
|
+
const [e, t] = F(null), [n, s] = F(null), [r, a] = F(null), [i, o] = F(null), [l, d] = F(null), [u, f] = F(null), { data: g, isFetching: h } = Ne(), { selectedLang: p, fallbackLang: A } = _e(), { data: S } = Me(), D = S == null ? void 0 : S.find((b) => b.lang === p), { isLocked: y } = he(), w = !(g != null && g.slug), [, v] = ie(Dn);
|
|
1457
1456
|
if (!g) return null;
|
|
1458
1457
|
const U = (b) => {
|
|
1459
|
-
p.length > 0 && p !==
|
|
1458
|
+
p.length > 0 && p !== A ? v({
|
|
1460
1459
|
edit: !0,
|
|
1461
1460
|
id: b == null ? void 0 : b.id,
|
|
1462
1461
|
primaryPage: b == null ? void 0 : b.primaryPage
|
|
@@ -1471,7 +1470,7 @@ const Yi = ({
|
|
|
1471
1470
|
variant: "ghost",
|
|
1472
1471
|
children: h ? /* @__PURE__ */ c(Ht, { 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: [
|
|
1473
1472
|
w ? /* @__PURE__ */ c($a, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ c(Qa, { className: "mr-1 h-4 w-4" }),
|
|
1474
|
-
H(
|
|
1473
|
+
H(D || g, "name") ?? ""
|
|
1475
1474
|
] })
|
|
1476
1475
|
}
|
|
1477
1476
|
) }),
|
|
@@ -1493,7 +1492,7 @@ const Yi = ({
|
|
|
1493
1492
|
setDeletePage: (b) => t(b),
|
|
1494
1493
|
setMarkAsTemplate: (b) => a(b),
|
|
1495
1494
|
setUnmarkAsTemplate: (b) => o(b),
|
|
1496
|
-
isLanguagePage: p.length > 0 && p !==
|
|
1495
|
+
isLanguagePage: p.length > 0 && p !== A,
|
|
1497
1496
|
children: /* @__PURE__ */ c(M, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ c(Jn, { className: "h-4 w-4" }) })
|
|
1498
1497
|
}
|
|
1499
1498
|
)
|
|
@@ -1533,7 +1532,7 @@ const Yi = ({
|
|
|
1533
1532
|
), ro = ({ hasDynamicPage: e }) => /* @__PURE__ */ c(Fs, { 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: [
|
|
1534
1533
|
/* @__PURE__ */ c("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
|
|
1535
1534
|
/* @__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" })
|
|
1536
|
-
] }) }), ao = V(() => import("./dynamic-page-selector-
|
|
1535
|
+
] }) }), ao = V(() => import("./dynamic-page-selector-6BmMIsBj.js")), io = () => {
|
|
1537
1536
|
const { dynamicPage: e, allLangPages: t, isFetching: n } = ci(), s = t.length > 0;
|
|
1538
1537
|
return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
1539
1538
|
!e && /* @__PURE__ */ c(ro, { hasDynamicPage: s }),
|
|
@@ -1690,10 +1689,10 @@ const Yi = ({
|
|
|
1690
1689
|
var a;
|
|
1691
1690
|
t.invalidateQueries({
|
|
1692
1691
|
queryKey: [E.GET_WEBSITE_DRAFT_SETTINGS]
|
|
1693
|
-
}), (a = r == null ? void 0 : r.settings) != null && a.theme ||
|
|
1692
|
+
}), (a = r == null ? void 0 : r.settings) != null && a.theme || k.success("Website settings updated successfully.");
|
|
1694
1693
|
},
|
|
1695
1694
|
onError: (s) => {
|
|
1696
|
-
|
|
1695
|
+
k.error("Failed to update website settings", {
|
|
1697
1696
|
description: s.message
|
|
1698
1697
|
});
|
|
1699
1698
|
}
|
|
@@ -1705,10 +1704,10 @@ const Yi = ({
|
|
|
1705
1704
|
onSuccess: () => {
|
|
1706
1705
|
t.invalidateQueries({
|
|
1707
1706
|
queryKey: [E.GET_GLOBAL_JSONLD_ITEMS]
|
|
1708
|
-
}),
|
|
1707
|
+
}), k.success("Schema added successfully.");
|
|
1709
1708
|
},
|
|
1710
1709
|
onError: (r) => {
|
|
1711
|
-
|
|
1710
|
+
k.error("Failed to add schema", {
|
|
1712
1711
|
description: r.message
|
|
1713
1712
|
});
|
|
1714
1713
|
}
|
|
@@ -1720,10 +1719,10 @@ const Yi = ({
|
|
|
1720
1719
|
onSuccess: () => {
|
|
1721
1720
|
t.invalidateQueries({
|
|
1722
1721
|
queryKey: [E.GET_GLOBAL_JSONLD_ITEMS]
|
|
1723
|
-
}),
|
|
1722
|
+
}), k.success("Schema updated successfully.");
|
|
1724
1723
|
},
|
|
1725
1724
|
onError: (r) => {
|
|
1726
|
-
|
|
1725
|
+
k.error("Failed to update schema", {
|
|
1727
1726
|
description: r.message
|
|
1728
1727
|
});
|
|
1729
1728
|
}
|
|
@@ -1735,10 +1734,10 @@ const Yi = ({
|
|
|
1735
1734
|
onSuccess: () => {
|
|
1736
1735
|
t.invalidateQueries({
|
|
1737
1736
|
queryKey: [E.GET_GLOBAL_JSONLD_ITEMS]
|
|
1738
|
-
}),
|
|
1737
|
+
}), k.success("Schema deleted successfully.");
|
|
1739
1738
|
},
|
|
1740
1739
|
onError: (s) => {
|
|
1741
|
-
|
|
1740
|
+
k.error("Failed to delete schema", {
|
|
1742
1741
|
description: s.message
|
|
1743
1742
|
});
|
|
1744
1743
|
}
|
|
@@ -1748,7 +1747,7 @@ const Yi = ({
|
|
|
1748
1747
|
return Y({
|
|
1749
1748
|
mutationFn: async (n) => t(e, { action: E.TOGGLE_PAGE_GLOBAL_SCHEMA, data: n }),
|
|
1750
1749
|
onError: (n) => {
|
|
1751
|
-
|
|
1750
|
+
k.error("Failed to toggle schema", {
|
|
1752
1751
|
description: n.message
|
|
1753
1752
|
});
|
|
1754
1753
|
}
|
|
@@ -1758,10 +1757,10 @@ const Yi = ({
|
|
|
1758
1757
|
return Y({
|
|
1759
1758
|
mutationFn: async (n) => t(e, { action: E.APPLY_SCHEMA_TO_ALL_PAGES, data: { schemaId: n } }),
|
|
1760
1759
|
onSuccess: (n) => {
|
|
1761
|
-
|
|
1760
|
+
k.success(`Schema applied to ${n.count} page(s)`);
|
|
1762
1761
|
},
|
|
1763
1762
|
onError: (n) => {
|
|
1764
|
-
|
|
1763
|
+
k.error("Failed to apply schema to all pages", {
|
|
1765
1764
|
description: n.message
|
|
1766
1765
|
});
|
|
1767
1766
|
}
|
|
@@ -1771,10 +1770,10 @@ const Yi = ({
|
|
|
1771
1770
|
return Y({
|
|
1772
1771
|
mutationFn: async (n) => t(e, { action: E.REMOVE_SCHEMA_FROM_ALL_PAGES, data: { schemaId: n } }),
|
|
1773
1772
|
onSuccess: (n) => {
|
|
1774
|
-
|
|
1773
|
+
k.success(`Schema removed from ${n.count} page(s)`);
|
|
1775
1774
|
},
|
|
1776
1775
|
onError: (n) => {
|
|
1777
|
-
|
|
1776
|
+
k.error("Failed to remove schema from all pages", {
|
|
1778
1777
|
description: n.message
|
|
1779
1778
|
});
|
|
1780
1779
|
}
|
|
@@ -1878,7 +1877,7 @@ const Yi = ({
|
|
|
1878
1877
|
[n, t]
|
|
1879
1878
|
)
|
|
1880
1879
|
};
|
|
1881
|
-
}, To = V(() => import("./ai-panel-content-
|
|
1880
|
+
}, To = V(() => import("./ai-panel-content-D0WeLOfT.js").then((e) => e.b)), Vs = "chai-chat-panel", So = ({ className: e = "h-full w-full" }) => /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", version: "1.1", className: e, children: [
|
|
1882
1881
|
/* @__PURE__ */ c("title", { children: "ai" }),
|
|
1883
1882
|
/* @__PURE__ */ c("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ c("g", { id: "icon", fill: "currentColor", transform: "translate(64.000000, 64.000000)", children: /* @__PURE__ */ c(
|
|
1884
1883
|
"path",
|
|
@@ -1893,7 +1892,7 @@ const Yi = ({
|
|
|
1893
1892
|
button: _o,
|
|
1894
1893
|
panel: To,
|
|
1895
1894
|
position: "top"
|
|
1896
|
-
}, wo = V(() => import("./lang-panel-
|
|
1895
|
+
}, wo = V(() => import("./lang-panel-Cq1HkfIL.js")), vo = ({ isActive: e, show: t }) => {
|
|
1897
1896
|
const { data: n } = Be();
|
|
1898
1897
|
return !Yt(n, "languages") || !H(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(ja, { className: "h-4 w-4" }) });
|
|
1899
1898
|
}, Hs = "lang", bo = {
|
|
@@ -1904,7 +1903,7 @@ const Yi = ({
|
|
|
1904
1903
|
button: vo,
|
|
1905
1904
|
view: "modal",
|
|
1906
1905
|
width: 400
|
|
1907
|
-
}, Io = V(() => import("./seo-panel-
|
|
1906
|
+
}, Io = V(() => import("./seo-panel-DO9e9dzR.js")), qs = "seo", Lo = ({ isActive: e, show: t }) => {
|
|
1908
1907
|
const { data: n } = ce(), s = Ri(n == null ? void 0 : n.pageType);
|
|
1909
1908
|
return !Yt(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(M, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
|
|
1910
1909
|
"svg",
|
|
@@ -1996,22 +1995,22 @@ var Qs = !1, Do = (e, t) => e === t, qt = Symbol("solid-proxy"), zs = typeof Pro
|
|
|
1996
1995
|
cleanups: null,
|
|
1997
1996
|
context: null,
|
|
1998
1997
|
owner: null
|
|
1999
|
-
}, dn = {}, N = null, fn = null, xo = null,
|
|
1998
|
+
}, dn = {}, N = null, fn = null, xo = null, x = null, te = null, Se = null, tn = 0;
|
|
2000
1999
|
function xe(e, t) {
|
|
2001
|
-
const n =
|
|
2000
|
+
const n = x, s = N, r = e.length === 0, a = t === void 0 ? s : t, i = r ? Ys : {
|
|
2002
2001
|
owned: null,
|
|
2003
2002
|
cleanups: null,
|
|
2004
2003
|
context: a ? a.context : null,
|
|
2005
2004
|
owner: a
|
|
2006
2005
|
}, o = r ? e : () => e(() => Z(() => ft(i)));
|
|
2007
|
-
N = i,
|
|
2006
|
+
N = i, x = null;
|
|
2008
2007
|
try {
|
|
2009
2008
|
return Ee(o, !0);
|
|
2010
2009
|
} finally {
|
|
2011
|
-
|
|
2010
|
+
x = n, N = s;
|
|
2012
2011
|
}
|
|
2013
2012
|
}
|
|
2014
|
-
function
|
|
2013
|
+
function K(e, t) {
|
|
2015
2014
|
t = t ? Object.assign({}, $t, t) : $t;
|
|
2016
2015
|
const n = {
|
|
2017
2016
|
value: e,
|
|
@@ -2046,9 +2045,9 @@ function Uo(e, t, n) {
|
|
|
2046
2045
|
let s, r, a;
|
|
2047
2046
|
s = !0, r = e, a = {};
|
|
2048
2047
|
let i = null, o = dn, l = null, d = !1, u = "initialValue" in a, f = typeof s == "function" && W(s);
|
|
2049
|
-
const g = /* @__PURE__ */ new Set(), [h, p] = (a.storage ||
|
|
2048
|
+
const g = /* @__PURE__ */ new Set(), [h, p] = (a.storage || K)(a.initialValue), [A, S] = K(void 0), [D, y] = K(void 0, {
|
|
2050
2049
|
equals: !1
|
|
2051
|
-
}), [w, v] =
|
|
2050
|
+
}), [w, v] = K(u ? "ready" : "unresolved");
|
|
2052
2051
|
_.context && (l = _.getNextContextId(), a.ssrLoadFrom === "initial" ? o = a.initialValue : _.load && _.has(l) && (o = _.load(l)));
|
|
2053
2052
|
function U(P, I, j, $) {
|
|
2054
2053
|
return i === P && (i = null, $ !== void 0 && (u = !0), (P === o || I === o) && a.onHydrated && queueMicrotask(() => a.onHydrated($, {
|
|
@@ -2063,9 +2062,9 @@ function Uo(e, t, n) {
|
|
|
2063
2062
|
}, !1);
|
|
2064
2063
|
}
|
|
2065
2064
|
function ye() {
|
|
2066
|
-
const P = Ko, I = h(), j =
|
|
2065
|
+
const P = Ko, I = h(), j = A();
|
|
2067
2066
|
if (j !== void 0 && !i) throw j;
|
|
2068
|
-
return
|
|
2067
|
+
return x && x.user, I;
|
|
2069
2068
|
}
|
|
2070
2069
|
function Ae(P = !0) {
|
|
2071
2070
|
if (P !== !1 && d) return;
|
|
@@ -2100,7 +2099,7 @@ function Uo(e, t, n) {
|
|
|
2100
2099
|
get: () => w()
|
|
2101
2100
|
},
|
|
2102
2101
|
error: {
|
|
2103
|
-
get: () =>
|
|
2102
|
+
get: () => A()
|
|
2104
2103
|
},
|
|
2105
2104
|
loading: {
|
|
2106
2105
|
get() {
|
|
@@ -2111,7 +2110,7 @@ function Uo(e, t, n) {
|
|
|
2111
2110
|
latest: {
|
|
2112
2111
|
get() {
|
|
2113
2112
|
if (!u) return ye();
|
|
2114
|
-
const P =
|
|
2113
|
+
const P = A();
|
|
2115
2114
|
if (P && !i) throw P;
|
|
2116
2115
|
return h();
|
|
2117
2116
|
}
|
|
@@ -2127,13 +2126,13 @@ function ru(e) {
|
|
|
2127
2126
|
return Ee(e, !1);
|
|
2128
2127
|
}
|
|
2129
2128
|
function Z(e) {
|
|
2130
|
-
if (
|
|
2131
|
-
const t =
|
|
2132
|
-
|
|
2129
|
+
if (x === null) return e();
|
|
2130
|
+
const t = x;
|
|
2131
|
+
x = null;
|
|
2133
2132
|
try {
|
|
2134
2133
|
return e();
|
|
2135
2134
|
} finally {
|
|
2136
|
-
|
|
2135
|
+
x = t;
|
|
2137
2136
|
}
|
|
2138
2137
|
}
|
|
2139
2138
|
function au(e, t, n) {
|
|
@@ -2161,25 +2160,25 @@ function ns() {
|
|
|
2161
2160
|
return N;
|
|
2162
2161
|
}
|
|
2163
2162
|
function Zs(e, t) {
|
|
2164
|
-
const n = N, s =
|
|
2165
|
-
N = e,
|
|
2163
|
+
const n = N, s = x;
|
|
2164
|
+
N = e, x = null;
|
|
2166
2165
|
try {
|
|
2167
2166
|
return Ee(t, !0);
|
|
2168
2167
|
} catch (r) {
|
|
2169
2168
|
Mn(r);
|
|
2170
2169
|
} finally {
|
|
2171
|
-
N = n,
|
|
2170
|
+
N = n, x = s;
|
|
2172
2171
|
}
|
|
2173
2172
|
}
|
|
2174
2173
|
function Bo(e) {
|
|
2175
|
-
const t =
|
|
2174
|
+
const t = x, n = N;
|
|
2176
2175
|
return Promise.resolve().then(() => {
|
|
2177
|
-
|
|
2176
|
+
x = t, N = n;
|
|
2178
2177
|
let s;
|
|
2179
|
-
return Ee(e, !1),
|
|
2178
|
+
return Ee(e, !1), x = N = null, s ? s.done : void 0;
|
|
2180
2179
|
});
|
|
2181
2180
|
}
|
|
2182
|
-
var [Fo, iu] = /* @__PURE__ */
|
|
2181
|
+
var [Fo, iu] = /* @__PURE__ */ K(!1);
|
|
2183
2182
|
function ou() {
|
|
2184
2183
|
return [Fo, Bo];
|
|
2185
2184
|
}
|
|
@@ -2210,9 +2209,9 @@ function er() {
|
|
|
2210
2209
|
const e = te;
|
|
2211
2210
|
te = null, Ee(() => jt(this), !1), te = e;
|
|
2212
2211
|
}
|
|
2213
|
-
if (
|
|
2212
|
+
if (x) {
|
|
2214
2213
|
const e = this.observers ? this.observers.length : 0;
|
|
2215
|
-
|
|
2214
|
+
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]);
|
|
2216
2215
|
}
|
|
2217
2216
|
return this.value;
|
|
2218
2217
|
}
|
|
@@ -2235,14 +2234,14 @@ function at(e) {
|
|
|
2235
2234
|
}
|
|
2236
2235
|
function Vo(e, t, n) {
|
|
2237
2236
|
let s;
|
|
2238
|
-
const r = N, a =
|
|
2239
|
-
|
|
2237
|
+
const r = N, a = x;
|
|
2238
|
+
x = N = e;
|
|
2240
2239
|
try {
|
|
2241
2240
|
s = e.fn(t);
|
|
2242
2241
|
} catch (i) {
|
|
2243
2242
|
return e.pure && (e.state = ve, e.owned && e.owned.forEach(ft), e.owned = null), e.updatedAt = n + 1, Mn(i);
|
|
2244
2243
|
} finally {
|
|
2245
|
-
|
|
2244
|
+
x = a, N = r;
|
|
2246
2245
|
}
|
|
2247
2246
|
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? tr(e, s) : e.value = s, e.updatedAt = n);
|
|
2248
2247
|
}
|
|
@@ -2389,7 +2388,7 @@ function Qo(e, t, n = {}) {
|
|
|
2389
2388
|
return dt(() => Wt(a)), () => {
|
|
2390
2389
|
let l = e() || [], d = l.length, u, f;
|
|
2391
2390
|
return l[js], Z(() => {
|
|
2392
|
-
let h, p,
|
|
2391
|
+
let h, p, A, S, D, y, w, v, U;
|
|
2393
2392
|
if (d === 0)
|
|
2394
2393
|
i !== 0 && (Wt(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [yn], r[0] = xe((b) => (a[0] = b, n.fallback())), i = 1);
|
|
2395
2394
|
else if (i === 0) {
|
|
@@ -2397,23 +2396,23 @@ function Qo(e, t, n = {}) {
|
|
|
2397
2396
|
s[f] = l[f], r[f] = xe(g);
|
|
2398
2397
|
i = d;
|
|
2399
2398
|
} else {
|
|
2400
|
-
for (
|
|
2399
|
+
for (A = new Array(d), S = new Array(d), o && (D = new Array(d)), y = 0, w = Math.min(i, d); y < w && s[y] === l[y]; y++) ;
|
|
2401
2400
|
for (w = i - 1, v = d - 1; w >= y && v >= y && s[w] === l[v]; w--, v--)
|
|
2402
|
-
|
|
2401
|
+
A[v] = r[w], S[v] = a[w], o && (D[v] = o[w]);
|
|
2403
2402
|
for (h = /* @__PURE__ */ new Map(), p = new Array(v + 1), f = v; f >= y; f--)
|
|
2404
2403
|
U = l[f], u = h.get(U), p[f] = u === void 0 ? -1 : u, h.set(U, f);
|
|
2405
2404
|
for (u = y; u <= w; u++)
|
|
2406
|
-
U = s[u], f = h.get(U), f !== void 0 && f !== -1 ? (
|
|
2405
|
+
U = s[u], f = h.get(U), f !== void 0 && f !== -1 ? (A[f] = r[u], S[f] = a[u], o && (D[f] = o[u]), f = p[f], h.set(U, f)) : a[u]();
|
|
2407
2406
|
for (f = y; f < d; f++)
|
|
2408
|
-
f in
|
|
2407
|
+
f in A ? (r[f] = A[f], a[f] = S[f], o && (o[f] = D[f], o[f](f))) : r[f] = xe(g);
|
|
2409
2408
|
r = r.slice(0, i = d), s = l.slice(0);
|
|
2410
2409
|
}
|
|
2411
2410
|
return r;
|
|
2412
2411
|
});
|
|
2413
2412
|
function g(h) {
|
|
2414
2413
|
if (a[f] = h, o) {
|
|
2415
|
-
const [p,
|
|
2416
|
-
return o[f] =
|
|
2414
|
+
const [p, A] = K(f);
|
|
2415
|
+
return o[f] = A, t(l[f], p);
|
|
2417
2416
|
}
|
|
2418
2417
|
return t(l[f]);
|
|
2419
2418
|
}
|
|
@@ -2434,7 +2433,7 @@ function zo(e, t, n = {}) {
|
|
|
2434
2433
|
});
|
|
2435
2434
|
function f(g) {
|
|
2436
2435
|
a[l] = g;
|
|
2437
|
-
const [h, p] =
|
|
2436
|
+
const [h, p] = K(d[l]);
|
|
2438
2437
|
return i[l] = p, t(h, l);
|
|
2439
2438
|
}
|
|
2440
2439
|
};
|
|
@@ -2571,7 +2570,7 @@ function ir(e) {
|
|
|
2571
2570
|
const s = (r) => {
|
|
2572
2571
|
const a = _.context;
|
|
2573
2572
|
if (a) {
|
|
2574
|
-
const [o, l] =
|
|
2573
|
+
const [o, l] = K();
|
|
2575
2574
|
_.count || (_.count = 0), _.count++, (n || (n = e())).then((d) => {
|
|
2576
2575
|
!_.done && lt(a), _.count--, l(() => d.default), lt();
|
|
2577
2576
|
}), t = o;
|
|
@@ -3107,7 +3106,7 @@ function Au(e) {
|
|
|
3107
3106
|
i && (ns().user = i = !1), a || (a = Zs(r, () => W(() => e.children)));
|
|
3108
3107
|
const o = s();
|
|
3109
3108
|
if (o instanceof HTMLHeadElement) {
|
|
3110
|
-
const [l, d] =
|
|
3109
|
+
const [l, d] = K(!1), u = () => d(!0);
|
|
3111
3110
|
xe((f) => Sn(o, () => l() ? f() : a(), null)), dt(u);
|
|
3112
3111
|
} else {
|
|
3113
3112
|
const l = ur(e.isSVG ? "g" : "div", e.isSVG), d = t && l.attachShadow ? l.attachShadow({
|
|
@@ -3539,9 +3538,9 @@ var Pr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3539
3538
|
rt(d, (h, p) => {
|
|
3540
3539
|
if (p === "__proto__" || p === "constructor" || p === "prototype")
|
|
3541
3540
|
throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
|
|
3542
|
-
const
|
|
3543
|
-
u[p] =
|
|
3544
|
-
f[gr(p) + "." +
|
|
3541
|
+
const A = Pr(h, t, n, s, [...r, p], [...a, e], i);
|
|
3542
|
+
u[p] = A.transformedValue, Le(A.annotations) ? f[p] = A.annotations : gt(A.annotations) && rt(A.annotations, (S, D) => {
|
|
3543
|
+
f[gr(p) + "." + D] = S;
|
|
3545
3544
|
});
|
|
3546
3545
|
});
|
|
3547
3546
|
const g = Pn(f) ? {
|
|
@@ -3587,7 +3586,7 @@ function bn(e, t = {}) {
|
|
|
3587
3586
|
return Yl(r, a, o, e, t.nonenumerable), r;
|
|
3588
3587
|
}, {});
|
|
3589
3588
|
}
|
|
3590
|
-
var
|
|
3589
|
+
var R = class {
|
|
3591
3590
|
/**
|
|
3592
3591
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
3593
3592
|
*/
|
|
@@ -3635,16 +3634,16 @@ var k = class {
|
|
|
3635
3634
|
this.allowedErrorProps.push(...e);
|
|
3636
3635
|
}
|
|
3637
3636
|
};
|
|
3638
|
-
|
|
3639
|
-
|
|
3640
|
-
|
|
3641
|
-
|
|
3642
|
-
|
|
3643
|
-
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
var Jl =
|
|
3637
|
+
R.defaultInstance = new R();
|
|
3638
|
+
R.serialize = R.defaultInstance.serialize.bind(R.defaultInstance);
|
|
3639
|
+
R.deserialize = R.defaultInstance.deserialize.bind(R.defaultInstance);
|
|
3640
|
+
R.stringify = R.defaultInstance.stringify.bind(R.defaultInstance);
|
|
3641
|
+
R.parse = R.defaultInstance.parse.bind(R.defaultInstance);
|
|
3642
|
+
R.registerClass = R.defaultInstance.registerClass.bind(R.defaultInstance);
|
|
3643
|
+
R.registerSymbol = R.defaultInstance.registerSymbol.bind(R.defaultInstance);
|
|
3644
|
+
R.registerCustom = R.defaultInstance.registerCustom.bind(R.defaultInstance);
|
|
3645
|
+
R.allowErrorProps = R.defaultInstance.allowErrorProps.bind(R.defaultInstance);
|
|
3646
|
+
var Jl = R.serialize, Su = R.stringify;
|
|
3648
3647
|
function _u(e) {
|
|
3649
3648
|
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
3650
3649
|
}
|
|
@@ -3680,7 +3679,7 @@ var Iu = (e, t = !1) => {
|
|
|
3680
3679
|
status: ec,
|
|
3681
3680
|
"last updated": br
|
|
3682
3681
|
}, Cu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Gu = () => {
|
|
3683
|
-
const [e, t] =
|
|
3682
|
+
const [e, t] = K("dark");
|
|
3684
3683
|
return Mo(() => {
|
|
3685
3684
|
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3686
3685
|
t(n.matches ? "dark" : "light");
|
|
@@ -3782,41 +3781,41 @@ var Iu = (e, t = !1) => {
|
|
|
3782
3781
|
shadowDOMTarget: u,
|
|
3783
3782
|
hideDisabledQueries: f
|
|
3784
3783
|
} = e;
|
|
3785
|
-
G(this, He,
|
|
3784
|
+
G(this, He, K(t)), G(this, yt, n), G(this, At, s), G(this, pt, r), G(this, Tt, d), G(this, qe, u), G(this, $e, K(a)), G(this, Qe, K(i)), G(this, ze, K(o)), G(this, je, K(l)), G(this, St, K(f));
|
|
3786
3785
|
}
|
|
3787
3786
|
setButtonPosition(e) {
|
|
3788
|
-
|
|
3787
|
+
T(this, $e)[1](e);
|
|
3789
3788
|
}
|
|
3790
3789
|
setPosition(e) {
|
|
3791
|
-
|
|
3790
|
+
T(this, Qe)[1](e);
|
|
3792
3791
|
}
|
|
3793
3792
|
setInitialIsOpen(e) {
|
|
3794
|
-
|
|
3793
|
+
T(this, ze)[1](e);
|
|
3795
3794
|
}
|
|
3796
3795
|
setErrorTypes(e) {
|
|
3797
|
-
|
|
3796
|
+
T(this, je)[1](e);
|
|
3798
3797
|
}
|
|
3799
3798
|
setClient(e) {
|
|
3800
|
-
|
|
3799
|
+
T(this, He)[1](e);
|
|
3801
3800
|
}
|
|
3802
3801
|
mount(e) {
|
|
3803
|
-
if (
|
|
3802
|
+
if (T(this, Oe))
|
|
3804
3803
|
throw new Error("Devtools is already mounted");
|
|
3805
3804
|
const t = lr(() => {
|
|
3806
|
-
const n = this, [s] =
|
|
3805
|
+
const n = this, [s] = T(this, $e), [r] = T(this, Qe), [a] = T(this, ze), [i] = T(this, je), [o] = T(this, St), [l] = T(this, He);
|
|
3807
3806
|
let d;
|
|
3808
|
-
return
|
|
3807
|
+
return T(this, We) ? d = T(this, We) : (d = ir(() => import("./NCMVHL6D-Bhn1i9Td.js")), G(this, We, d)), Ir(T(this, Tt), T(this, qe)), rr(d, ar({
|
|
3809
3808
|
get queryFlavor() {
|
|
3810
|
-
return
|
|
3809
|
+
return T(n, yt);
|
|
3811
3810
|
},
|
|
3812
3811
|
get version() {
|
|
3813
|
-
return
|
|
3812
|
+
return T(n, At);
|
|
3814
3813
|
},
|
|
3815
3814
|
get onlineManager() {
|
|
3816
|
-
return
|
|
3815
|
+
return T(n, pt);
|
|
3817
3816
|
},
|
|
3818
3817
|
get shadowDOMTarget() {
|
|
3819
|
-
return
|
|
3818
|
+
return T(n, qe);
|
|
3820
3819
|
}
|
|
3821
3820
|
}, {
|
|
3822
3821
|
get client() {
|
|
@@ -3843,9 +3842,9 @@ var Iu = (e, t = !1) => {
|
|
|
3843
3842
|
}
|
|
3844
3843
|
unmount() {
|
|
3845
3844
|
var e;
|
|
3846
|
-
if (!
|
|
3845
|
+
if (!T(this, Oe))
|
|
3847
3846
|
throw new Error("Devtools is not mounted");
|
|
3848
|
-
(e =
|
|
3847
|
+
(e = T(this, _t)) == null || e.call(this), G(this, Oe, !1);
|
|
3849
3848
|
}
|
|
3850
3849
|
}, He = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), At = new WeakMap(), Oe = new WeakMap(), Tt = new WeakMap(), qe = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), ze = new WeakMap(), je = new WeakMap(), St = new WeakMap(), We = new WeakMap(), _t = new WeakMap(), hs), Ye, Pt, wt, vt, De, bt, Je, Ze, Xe, et, tt, It, nt, st, Lt, gs, nc = (gs = class {
|
|
3851
3850
|
constructor(e) {
|
|
@@ -3878,44 +3877,44 @@ var Iu = (e, t = !1) => {
|
|
|
3878
3877
|
onClose: f,
|
|
3879
3878
|
hideDisabledQueries: g
|
|
3880
3879
|
} = e;
|
|
3881
|
-
G(this, Ye,
|
|
3880
|
+
G(this, Ye, K(t)), G(this, wt, n), G(this, vt, s), G(this, Pt, r), G(this, bt, d), G(this, Je, u), G(this, Ze, K(a)), G(this, Xe, K(i)), G(this, et, K(o)), G(this, tt, K(l)), G(this, It, K(g)), G(this, nt, K(f));
|
|
3882
3881
|
}
|
|
3883
3882
|
setButtonPosition(e) {
|
|
3884
|
-
|
|
3883
|
+
T(this, Ze)[1](e);
|
|
3885
3884
|
}
|
|
3886
3885
|
setPosition(e) {
|
|
3887
|
-
|
|
3886
|
+
T(this, Xe)[1](e);
|
|
3888
3887
|
}
|
|
3889
3888
|
setInitialIsOpen(e) {
|
|
3890
|
-
|
|
3889
|
+
T(this, et)[1](e);
|
|
3891
3890
|
}
|
|
3892
3891
|
setErrorTypes(e) {
|
|
3893
|
-
|
|
3892
|
+
T(this, tt)[1](e);
|
|
3894
3893
|
}
|
|
3895
3894
|
setClient(e) {
|
|
3896
|
-
|
|
3895
|
+
T(this, Ye)[1](e);
|
|
3897
3896
|
}
|
|
3898
3897
|
setOnClose(e) {
|
|
3899
|
-
|
|
3898
|
+
T(this, nt)[1](() => e);
|
|
3900
3899
|
}
|
|
3901
3900
|
mount(e) {
|
|
3902
|
-
if (
|
|
3901
|
+
if (T(this, De))
|
|
3903
3902
|
throw new Error("Devtools is already mounted");
|
|
3904
3903
|
const t = lr(() => {
|
|
3905
|
-
const n = this, [s] =
|
|
3904
|
+
const n = this, [s] = T(this, Ze), [r] = T(this, Xe), [a] = T(this, et), [i] = T(this, tt), [o] = T(this, It), [l] = T(this, Ye), [d] = T(this, nt);
|
|
3906
3905
|
let u;
|
|
3907
|
-
return
|
|
3906
|
+
return T(this, st) ? u = T(this, st) : (u = ir(() => import("./2AITGKQY-BS9f-jSI.js")), G(this, st, u)), Ir(T(this, bt), T(this, Je)), rr(u, ar({
|
|
3908
3907
|
get queryFlavor() {
|
|
3909
|
-
return
|
|
3908
|
+
return T(n, wt);
|
|
3910
3909
|
},
|
|
3911
3910
|
get version() {
|
|
3912
|
-
return
|
|
3911
|
+
return T(n, vt);
|
|
3913
3912
|
},
|
|
3914
3913
|
get onlineManager() {
|
|
3915
|
-
return
|
|
3914
|
+
return T(n, Pt);
|
|
3916
3915
|
},
|
|
3917
3916
|
get shadowDOMTarget() {
|
|
3918
|
-
return
|
|
3917
|
+
return T(n, Je);
|
|
3919
3918
|
}
|
|
3920
3919
|
}, {
|
|
3921
3920
|
get client() {
|
|
@@ -3945,9 +3944,9 @@ var Iu = (e, t = !1) => {
|
|
|
3945
3944
|
}
|
|
3946
3945
|
unmount() {
|
|
3947
3946
|
var e;
|
|
3948
|
-
if (!
|
|
3947
|
+
if (!T(this, De))
|
|
3949
3948
|
throw new Error("Devtools is not mounted");
|
|
3950
|
-
(e =
|
|
3949
|
+
(e = T(this, Lt)) == null || e.call(this), G(this, De, !1);
|
|
3951
3950
|
}
|
|
3952
3951
|
}, Ye = new WeakMap(), Pt = new WeakMap(), wt = new WeakMap(), vt = new WeakMap(), De = new WeakMap(), bt = new WeakMap(), Je = new WeakMap(), Ze = new WeakMap(), Xe = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), It = new WeakMap(), nt = new WeakMap(), st = new WeakMap(), Lt = new WeakMap(), gs);
|
|
3953
3952
|
function sc(e) {
|
|
@@ -4090,7 +4089,7 @@ const ac = pe(""), ic = () => {
|
|
|
4090
4089
|
},
|
|
4091
4090
|
[e]
|
|
4092
4091
|
);
|
|
4093
|
-
}, dc = V(() => import("./page-lock-
|
|
4092
|
+
}, dc = V(() => import("./page-lock-Kt_How1V.js")), fc = V(() => import("./no-language-page-dialog-CgeVcFEJ.js")), hc = V(() => import("./digital-asset-manager-D52Jj1Gh.js")), gc = V(() => import("./save-to-lib-DVUkBZb8.js")), mc = V(() => import("./theme-panel-footer-DMV_nX6m.js")), Ec = V(() => import("./web-preview-32tyIOuK.js"));
|
|
4094
4093
|
ic();
|
|
4095
4094
|
ri();
|
|
4096
4095
|
sa(lo);
|
|
@@ -4101,10 +4100,10 @@ const pc = {
|
|
|
4101
4100
|
role: "",
|
|
4102
4101
|
permissions: null
|
|
4103
4102
|
}, ds = (e) => {
|
|
4104
|
-
const { data: t } = Eo(), n = kn(), { data: s = pc, isFetching: r } = po(), { data: a, isFetching: i } = Ce(), { data: o, isFetching: l } = oc(), { data: d, isFetching: u } = Be(), f = r || i || l || u, [g] = we(), h = g.get("page"), { data: p } = ce(), { data:
|
|
4105
|
-
it.current =
|
|
4103
|
+
const { data: t } = Eo(), n = kn(), { data: s = pc, isFetching: r } = po(), { data: a, isFetching: i } = Ce(), { data: o, isFetching: l } = oc(), { data: d, isFetching: u } = Be(), f = r || i || l || u, [g] = we(), h = g.get("page"), { data: p } = ce(), { data: A, isFetching: S } = ho(), { blocks: D } = fo(A), { data: y, isFetching: w } = go(), { pageStatus: v } = he(), U = co(), { onSave: b } = yo(), { mutateAsync: ye } = lc(), { getPartialBlocks: Ae, getPartialBlockBlocks: B } = Ao(), { mutateAsync: P } = ki(), { mutateAsync: I } = mo(), j = uc(), [$, ue] = F(!1), it = Ie([]), be = q(() => H(d, "theme", {}) || {}, [d]), ot = v === ee.EDITING, Ge = v === ee.CHECKING, Bn = S || Ge || w;
|
|
4104
|
+
it.current = D;
|
|
4106
4105
|
const [Lr] = ie(ac);
|
|
4107
|
-
|
|
4106
|
+
ne(() => {
|
|
4108
4107
|
const re = () => {
|
|
4109
4108
|
document.hidden ? ue(!0) : ue(!1);
|
|
4110
4109
|
};
|
|
@@ -4148,7 +4147,7 @@ const pc = {
|
|
|
4148
4147
|
onError: e.onError || console.error,
|
|
4149
4148
|
getPartialBlockBlocks: B,
|
|
4150
4149
|
getPartialBlocks: Ae,
|
|
4151
|
-
blocks: S ? [] :
|
|
4150
|
+
blocks: S ? [] : D,
|
|
4152
4151
|
theme: qr(be),
|
|
4153
4152
|
pageTypes: a,
|
|
4154
4153
|
searchPageTypeItems: Cr,
|
|
@@ -4175,8 +4174,8 @@ const pc = {
|
|
|
4175
4174
|
}
|
|
4176
4175
|
}
|
|
4177
4176
|
}), Ou = (e) => {
|
|
4178
|
-
const [, t] = Gn(), [n, s] =
|
|
4179
|
-
return
|
|
4177
|
+
const [, t] = Gn(), [n, s] = F(!1);
|
|
4178
|
+
return ne(() => (t(
|
|
4180
4179
|
In(e, [
|
|
4181
4180
|
"apiUrl",
|
|
4182
4181
|
"usersApiUrl",
|
|
@@ -4277,7 +4276,7 @@ const Du = () => {
|
|
|
4277
4276
|
console.error("Failed to update metadata");
|
|
4278
4277
|
}
|
|
4279
4278
|
});
|
|
4280
|
-
}, Sc = V(() => import("./digital-asset-manager-
|
|
4279
|
+
}, Sc = V(() => import("./digital-asset-manager-D52Jj1Gh.js")), ku = ({
|
|
4281
4280
|
assetId: e,
|
|
4282
4281
|
assetUrl: t,
|
|
4283
4282
|
onChange: n,
|
|
@@ -4285,13 +4284,13 @@ const Du = () => {
|
|
|
4285
4284
|
placeholder: r = "Select an image",
|
|
4286
4285
|
disabled: a = !1
|
|
4287
4286
|
}) => {
|
|
4288
|
-
const { t: i } = Pe(), [o, l] =
|
|
4287
|
+
const { t: i } = Pe(), [o, l] = F(!1), d = () => {
|
|
4289
4288
|
a || l(!0);
|
|
4290
4289
|
}, u = () => {
|
|
4291
4290
|
l(!1);
|
|
4292
4291
|
}, f = (p) => {
|
|
4293
|
-
const
|
|
4294
|
-
|
|
4292
|
+
const A = Array.isArray(p) ? p[0] : p;
|
|
4293
|
+
A != null && A.url && n(In(A, ["url", "id"])), l(!1);
|
|
4295
4294
|
}, g = () => {
|
|
4296
4295
|
n({ url: "", id: "" });
|
|
4297
4296
|
}, h = (t == null ? void 0 : t.startsWith("{{")) && (t == null ? void 0 : t.endsWith("}}"));
|
|
@@ -4504,7 +4503,7 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4504
4503
|
n = n.replace(r[0], i);
|
|
4505
4504
|
}
|
|
4506
4505
|
return n;
|
|
4507
|
-
}, Lc = V(() => import("./shared-json-ld-
|
|
4506
|
+
}, Lc = V(() => import("./shared-json-ld-DFwVZaJ7.js")), Uu = ({
|
|
4508
4507
|
value: e,
|
|
4509
4508
|
onChange: t,
|
|
4510
4509
|
disabled: n = !1,
|
|
@@ -4517,8 +4516,8 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4517
4516
|
hasJsonLdForSelectedLang: d,
|
|
4518
4517
|
copyJsonLDFromDefaultPage: u
|
|
4519
4518
|
}) => {
|
|
4520
|
-
const [f, g] =
|
|
4521
|
-
|
|
4519
|
+
const [f, g] = F("edit"), [h, p] = F(null), [A, S] = F(""), D = Ie(null), [y] = Gn(), w = i === "jsonLD" && H(y, "features.sharedJsonLD", !1), v = i === "jsonLD" && !d && !!u;
|
|
4520
|
+
ne(() => {
|
|
4522
4521
|
e.trim() === "" && t("{}");
|
|
4523
4522
|
}, [e, t]);
|
|
4524
4523
|
const U = (B) => {
|
|
@@ -4553,7 +4552,7 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4553
4552
|
}
|
|
4554
4553
|
}
|
|
4555
4554
|
};
|
|
4556
|
-
|
|
4555
|
+
ne(() => {
|
|
4557
4556
|
const B = fs(e);
|
|
4558
4557
|
if (B.isValid)
|
|
4559
4558
|
if (p(null), B.parsed) {
|
|
@@ -4571,7 +4570,7 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4571
4570
|
t(P);
|
|
4572
4571
|
}
|
|
4573
4572
|
}, Ae = () => {
|
|
4574
|
-
h != null && h.position &&
|
|
4573
|
+
h != null && h.position && D.current && (D.current.focus(), D.current.setSelectionRange(h.position, h.position + 1));
|
|
4575
4574
|
};
|
|
4576
4575
|
return /* @__PURE__ */ c(Pc, { fallback: /* @__PURE__ */ c("div", { children: "Some error" }), children: /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */ m(Na, { value: f, onValueChange: g, className: "w-full", children: [
|
|
4577
4576
|
/* @__PURE__ */ m("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
@@ -4636,7 +4635,7 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4636
4635
|
] }) }) : /* @__PURE__ */ c(
|
|
4637
4636
|
Qn,
|
|
4638
4637
|
{
|
|
4639
|
-
ref:
|
|
4638
|
+
ref: D,
|
|
4640
4639
|
id: i,
|
|
4641
4640
|
name: i,
|
|
4642
4641
|
className: `rounded-md border border-input text-xs ${h ? "border-red-500" : ""}`,
|
|
@@ -4675,7 +4674,7 @@ const vc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), fs = (e) => {
|
|
|
4675
4674
|
] })
|
|
4676
4675
|
] }),
|
|
4677
4676
|
/* @__PURE__ */ m(on, { value: "preview", className: "mt-0", children: [
|
|
4678
|
-
/* @__PURE__ */ c(Qn, { rows: a, value:
|
|
4677
|
+
/* @__PURE__ */ c(Qn, { rows: a, value: A, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
|
|
4679
4678
|
/* @__PURE__ */ c("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
|
|
4680
4679
|
] }),
|
|
4681
4680
|
w && /* @__PURE__ */ c(on, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(X, { children: /* @__PURE__ */ c(Lc, {}) }) })
|
|
@@ -4701,9 +4700,9 @@ export {
|
|
|
4701
4700
|
wu as $,
|
|
4702
4701
|
E as A,
|
|
4703
4702
|
Fs as B,
|
|
4704
|
-
|
|
4703
|
+
K as C,
|
|
4705
4704
|
ol as D,
|
|
4706
|
-
|
|
4705
|
+
se as E,
|
|
4707
4706
|
Js as F,
|
|
4708
4707
|
ar as G,
|
|
4709
4708
|
Wo as H,
|