@chaibuilder/pages 0.16.0 → 0.16.1
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-BxEty5Ow.cjs → 2AITGKQY-CD9A6oc6.cjs} +1 -1
- package/dist/{2AITGKQY-BFankGad.js → 2AITGKQY-Z1XcJ6Q7.js} +2 -2
- package/dist/{NCMVHL6D-DP-qw6yT.cjs → NCMVHL6D-CkpM-3og.cjs} +1 -1
- package/dist/{NCMVHL6D-DFMKkQPN.js → NCMVHL6D-DoK0XoIo.js} +2 -2
- package/dist/{ZDWCUMSJ-Cu1VTliO.cjs → ZDWCUMSJ-D32swpGV.cjs} +1 -1
- package/dist/{ZDWCUMSJ-DU81uAQq.js → ZDWCUMSJ-hGXNxbOK.js} +1 -1
- package/dist/{add-new-language-page-0zC1CJZK.js → add-new-language-page-BZPoqdX-.js} +2 -2
- package/dist/{add-new-language-page-DQ46xqnc.cjs → add-new-language-page-D65TpIwK.cjs} +1 -1
- package/dist/{add-new-page-Ca2H2J-2.cjs → add-new-page-CQ0aj4RJ.cjs} +1 -1
- package/dist/{add-new-page-CUtZhDvi.js → add-new-page-DK25Y0zS.js} +1 -1
- package/dist/{ai-panel-content-CV-HTsAs.cjs → ai-panel-content-BSGJqnTM.cjs} +1 -1
- package/dist/{ai-panel-content-r2jlUBoR.js → ai-panel-content-DYRZnMgV.js} +2 -2
- package/dist/ai-panel-default-lang-BOZrL5Xe.cjs +1 -0
- package/dist/{ai-panel-default-lang-D6RAQW1X.js → ai-panel-default-lang-DZUqC79y.js} +3 -3
- package/dist/ai-panel-other-lang-CCyiE6ha.js +145 -0
- package/dist/ai-panel-other-lang-CNtlT5dM.cjs +1 -0
- package/dist/{ai-panel-quick-prompts-DiNVPPAn.cjs → ai-panel-quick-prompts-DeS7L1f0.cjs} +1 -1
- package/dist/{ai-panel-quick-prompts-CpzN48cl.js → ai-panel-quick-prompts-Ds0Ndz7g.js} +1 -1
- package/dist/{ai-prompt-input-vAcIZSB1.js → ai-prompt-input-Ch_PLEPN.js} +1 -1
- package/dist/{ai-prompt-input-D-F23bdc.cjs → ai-prompt-input-Zg6lN1Lo.cjs} +1 -1
- package/dist/ai-translation-prompt-BUFjo_om.cjs +1 -0
- package/dist/ai-translation-prompt-BiJ5B_an.js +28 -0
- package/dist/{delete-page-BS10zPLU.js → delete-page-B95T2Prd.js} +1 -1
- package/dist/{delete-page-ClgtvB6n.cjs → delete-page-BSop1jNg.cjs} +1 -1
- package/dist/{digital-asset-manager-D_FFLECK.js → digital-asset-manager-BQNSwfKs.js} +1 -1
- package/dist/{digital-asset-manager-MK8ZL6Nd.cjs → digital-asset-manager-Bn58WzM6.cjs} +1 -1
- package/dist/{duplicate-page-BaZrekqu.cjs → duplicate-page-BLxkSiug.cjs} +1 -1
- package/dist/{duplicate-page-C1r4cCIJ.js → duplicate-page-CrzzObAj.js} +2 -2
- package/dist/{dynamic-page-selector-CjtnFkxO.js → dynamic-page-selector-D6wQnNfH.js} +1 -1
- package/dist/{dynamic-page-selector-C4R_vhhz.cjs → dynamic-page-selector-D8UZ63LW.cjs} +1 -1
- package/dist/index-W0r4o5Ro.cjs +5 -0
- package/dist/{index-D_qadcqD.js → index-yhKyIbgs.js} +584 -587
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{json-diff-viewer-BURQmaIL.js → json-diff-viewer-ISJS7lHK.js} +1 -1
- package/dist/{json-diff-viewer-CyZVbnpL.cjs → json-diff-viewer-ZeJ3Rp2y.cjs} +1 -1
- package/dist/{lang-panel-C8yx7PSU.js → lang-panel-Bj11IL7k.js} +2 -2
- package/dist/{lang-panel-SUARS5YU.cjs → lang-panel-DqN_J3vz.cjs} +1 -1
- package/dist/{mark-as-template-DS-nfI06.cjs → mark-as-template-CcwAAdrd.cjs} +1 -1
- package/dist/{mark-as-template-CUHypMlj.js → mark-as-template-CmCCMaQg.js} +1 -1
- package/dist/{no-language-page-content-DZj3cmtM.cjs → no-language-page-content-BXm1k1Aa.cjs} +1 -1
- package/dist/{no-language-page-content-qoHrlxwD.js → no-language-page-content-Cme-zo4R.js} +1 -1
- package/dist/{page-creator-HwE9ST54.cjs → page-creator-ByhjXyHP.cjs} +1 -1
- package/dist/{page-creator-C8VQGfap.js → page-creator-Zbv4d4H8.js} +2 -2
- package/dist/{page-lock-request-Db7-x_EI.cjs → page-lock-request-Cln-EE6Z.cjs} +1 -1
- package/dist/{page-lock-request-CBVKtxVj.js → page-lock-request-DDQJb8IA.js} +1 -1
- package/dist/{page-locked-by-dialog-CvRDaBcN.cjs → page-locked-by-dialog-BIXYITEu.cjs} +1 -1
- package/dist/{page-locked-by-dialog-DEC58QPA.js → page-locked-by-dialog-Csn56a3n.js} +1 -1
- package/dist/{page-manager-new-CBxSkcYY.cjs → page-manager-new-BJaTBpih.cjs} +1 -1
- package/dist/{page-manager-new-B1PDwz2w.js → page-manager-new-BrRxZDfT.js} +2 -2
- package/dist/{page-manager-search-and-filter-BRLPHE64.cjs → page-manager-search-and-filter-Bk3PUjha.cjs} +1 -1
- package/dist/{page-manager-search-and-filter-0eTSE1C1.js → page-manager-search-and-filter-_Hvk3bU3.js} +1 -1
- package/dist/{page-revisions-content-CKcp4He4.js → page-revisions-content-B6fRCBX_.js} +2 -2
- package/dist/{page-revisions-content-CTrVTQ_s.cjs → page-revisions-content-C_Ha3tFu.cjs} +1 -1
- package/dist/{prompt-helper-CfyAlam9.js → prompt-helper-Csgu8Rfb.js} +31 -19
- package/dist/{prompt-helper-BtijECyh.cjs → prompt-helper-DgI1lgGV.cjs} +3 -3
- package/dist/{publish-pages-content-BMaeNHV2.js → publish-pages-content-CFEIxKQD.js} +2 -2
- package/dist/{publish-pages-content-B6HGaUtO.cjs → publish-pages-content-DQDNxwHD.cjs} +1 -1
- package/dist/{save-to-lib-BKKTPv4h.cjs → save-to-lib-Bl22umTa.cjs} +1 -1
- package/dist/{save-to-lib-CccnzwO8.js → save-to-lib-YyYkF6c6.js} +1 -1
- package/dist/{seo-panel-4KK4r-BP.js → seo-panel-BZlMea1L.js} +1 -1
- package/dist/{seo-panel-DL_rcWwC.cjs → seo-panel-BhxikAkG.cjs} +1 -1
- package/dist/server.cjs +3 -0
- package/dist/server.d.ts +1 -1
- package/dist/server.js +3 -0
- package/dist/{shared-json-ld-BuYzbmKx.cjs → shared-json-ld-BfkH76U3.cjs} +1 -1
- package/dist/{shared-json-ld-DGW40Ccy.js → shared-json-ld-E4Ckwlbr.js} +1 -1
- package/dist/{slug-input--8SgDwYu.cjs → slug-input--VmQG0S1.cjs} +1 -1
- package/dist/{slug-input-DH5w0H22.js → slug-input-CKKkqGj4.js} +1 -1
- package/dist/{theme-panel-footer-CHR7J97n.js → theme-panel-footer-2ERfMsET.js} +1 -1
- package/dist/{theme-panel-footer-Co5VI_i9.cjs → theme-panel-footer-CagxEZEO.cjs} +1 -1
- package/dist/{unmark-as-template-DlA879QF.js → unmark-as-template-BJ5CTNAe.js} +1 -1
- package/dist/{unmark-as-template-B3h10oHA.cjs → unmark-as-template-CeWpo9wD.cjs} +1 -1
- package/dist/{unpublish-page-Bfo_DuW5.cjs → unpublish-page-DmZSVxFj.cjs} +1 -1
- package/dist/{unpublish-page-JzGl35pF.js → unpublish-page-DvOWVBIf.js} +1 -1
- package/dist/{web-preview-CJ6JyhJD.js → web-preview-DTkIggV7.js} +1 -1
- package/dist/{web-preview-oG2epixb.cjs → web-preview-DlSKpPUZ.cjs} +1 -1
- package/package.json +1 -1
- package/dist/ai-panel-default-lang-EH3w6g25.cjs +0 -1
- package/dist/ai-panel-other-lang-BeTdv7yM.js +0 -133
- package/dist/ai-panel-other-lang-_gGQTjZQ.cjs +0 -1
- package/dist/ai-translation-prompt-AImJlmDg.cjs +0 -1
- package/dist/ai-translation-prompt-BKyp1IW2.js +0 -63
- package/dist/index-C64wG61b.cjs +0 -5
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
var Pr = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var Bn = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
5
|
var vr = (e, t, n) => t in e ? Pr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var ve = (e, t, n) => vr(e, typeof t != "symbol" ? t + "" : t, n), Mn = (e, t, n) => t.has(e) || Bn("Cannot " + n);
|
|
7
|
+
var _ = (e, t, n) => (Mn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), D = (e, t, n) => t.has(e) ? Bn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), O = (e, t, n, s) => (Mn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
8
8
|
import { jsx as l, jsxs as m, Fragment as ge } from "react/jsx-runtime";
|
|
9
|
-
import { get as V, reverse as wr, sortBy as br, each as Ir, find as re, isEmpty as he, groupBy as Cr, minBy as Nr, noop as ds, keyBy as Lr, map as Bt, compact as fs, upperCase as
|
|
9
|
+
import { get as V, reverse as wr, sortBy as br, each as Ir, find as re, isEmpty as he, groupBy as Cr, minBy as Nr, noop as ds, keyBy as Lr, map as Bt, compact as fs, upperCase as Fn, filter as hs, includes as kr, has as jt, pick as vn, keys as Or, pickBy as Dr, endsWith as Gr, isArray as xr, startCase as Rr, isFunction as Ur, cloneDeep as Br, isEqual as Mr } from "lodash-es";
|
|
10
10
|
import * as z from "react";
|
|
11
|
-
import Fr, { useMemo as Q, useCallback as j, useState as K, useEffect as se, useRef as at, lazy as F, Suspense as H, createContext as qr, Component as Kr, createElement as
|
|
11
|
+
import Fr, { useMemo as Q, useCallback as j, useState as K, useEffect as se, useRef as at, lazy as F, Suspense as H, createContext as qr, Component as Kr, createElement as qn } from "react";
|
|
12
12
|
import { atom as Ee, useAtom as te } from "jotai";
|
|
13
13
|
import { useQuery as ae, useQueryClient as W, useMutation as X, onlineManager as gs, QueryClient as Vr, QueryClientProvider as Hr } from "@tanstack/react-query";
|
|
14
|
-
import { useLanguages as Se, useSavePage as Ge, useTranslation as
|
|
14
|
+
import { useLanguages as Se, useSavePage as Ge, useTranslation as _e, mergeClasses as Mt, usePermissions as ms, PERMISSIONS as Qr, useRightPanel as $r, useChaiFeatureFlag as jr, useIsPageLoaded as zr, registerChaiLibrary as Wr, getBlocksFromHTML as Yr, registerChaiSidebarPanel as Ct, registerChaiFeatureFlag as tn, registerChaiTopBar as Jr, registerChaiMediaManager as Xr, registerChaiSaveToLibrary as Zr, ChaiBuilderEditor as ea } from "@chaibuilder/sdk";
|
|
15
15
|
import { toast as R } from "sonner";
|
|
16
|
-
import { Tooltip as zt, TooltipTrigger as Wt, Button as U, TooltipContent as Yt, Sheet as Es, SheetContent as ps, SheetHeader as ta, SheetTitle as na, SheetDescription as sa, DropdownMenu as
|
|
17
|
-
import { LogsIcon as Ia, Folder as Ca, Languages as
|
|
16
|
+
import { Tooltip as zt, TooltipTrigger as Wt, Button as U, TooltipContent as Yt, Sheet as Es, SheetContent as ps, SheetHeader as ta, SheetTitle as na, SheetDescription as sa, DropdownMenu as wn, DropdownMenuTrigger as bn, DropdownMenuContent as In, DropdownMenuItem as ue, Separator as ra, TooltipProvider as ys, SheetTrigger as aa, Skeleton as Nt, Dialog as As, HoverCard as ia, HoverCardTrigger as oa, HoverCardContent as la, AlertDialog as ca, AlertDialogTrigger as ua, AlertDialogContent as da, AlertDialogHeader as fa, AlertDialogTitle as ha, AlertDialogDescription as ga, AlertDialogFooter as ma, AlertDialogCancel as Ea, AlertDialogAction as pa, Popover as ya, PopoverTrigger as Aa, DialogContent as Ta, DialogHeader as Sa, DialogTitle as _a, Tabs as Pa, TabsList as va, TabsTrigger as nn, TabsContent as sn, Textarea as Kn, Alert as wa, AlertDescription as ba } from "@chaibuilder/sdk/ui";
|
|
17
|
+
import { LogsIcon as Ia, Folder as Ca, Languages as Vn, ChevronDown as hn, Star as Na, Plus as Ts, History as La, Play as ka, Palette as Oa, CheckCircle as Da, Loader as Ft, Save as Ga, Send as Hn, Rocket as Qn, CopyPlusIcon as xa, Pencil as Ra, Power as Ua, Trash as Ba, SquareLibrary as $n, Hash as Ma, File as Fa, MoreHorizontal as jn, ExternalLink as qa, LanguagesIcon as Ka, User as Va, X as zn, Trash2 as Ha, ImageIcon as Wn, Code as Qa, Eye as $a, Share2 as ja, FileCode2 as za, AlertTriangle as Wa } from "lucide-react";
|
|
18
18
|
import { useRegisteredChaiBlocks as Ya, getDefaultBlockProps as Ja } from "@chaibuilder/runtime";
|
|
19
19
|
import { loadWebBlocks as Xa } from "@chaibuilder/sdk/web-blocks";
|
|
20
20
|
const E = {
|
|
@@ -81,10 +81,10 @@ const E = {
|
|
|
81
81
|
UPDATE_ASSET: "UPDATE_ASSET",
|
|
82
82
|
GET_ASSETS: "GET_ASSETS",
|
|
83
83
|
GET_ASSET: "GET_ASSET"
|
|
84
|
-
}, Za = Ee({}),
|
|
85
|
-
const [n] =
|
|
84
|
+
}, Za = Ee({}), Cn = () => te(Za), oe = (e, t) => {
|
|
85
|
+
const [n] = Cn();
|
|
86
86
|
return Q(() => V(n, e, t), [n, e, t]);
|
|
87
|
-
},
|
|
87
|
+
}, L = () => oe("apiUrl", "/chai/api"), Ss = () => oe("usersApiUrl", "/chai/users"), Oc = () => oe("assetsApiUrl", "/chai/assets"), ei = () => oe("websocket", null), _s = async (e, t, n = {}) => await fetch(e, {
|
|
88
88
|
method: "POST",
|
|
89
89
|
headers: {
|
|
90
90
|
"Content-Type": "application/json",
|
|
@@ -102,7 +102,7 @@ if (import.meta.vitest) {
|
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
104
|
const Dc = () => {
|
|
105
|
-
const e =
|
|
105
|
+
const e = C(), t = L();
|
|
106
106
|
return j(
|
|
107
107
|
async ({
|
|
108
108
|
body: n,
|
|
@@ -112,8 +112,8 @@ const Dc = () => {
|
|
|
112
112
|
}) => e(r, n, s, a),
|
|
113
113
|
[e]
|
|
114
114
|
);
|
|
115
|
-
},
|
|
116
|
-
const e = oe("onLogout"), t = oe("getAccessToken"), n =
|
|
115
|
+
}, C = () => {
|
|
116
|
+
const e = oe("onLogout"), t = oe("getAccessToken"), n = L();
|
|
117
117
|
return j(
|
|
118
118
|
async (s = n, r, a = {}, i = !1) => {
|
|
119
119
|
const o = await t();
|
|
@@ -129,12 +129,12 @@ const Dc = () => {
|
|
|
129
129
|
if (u.status === 401)
|
|
130
130
|
return console.log("401 Response", u), e(), window.location.reload(), null;
|
|
131
131
|
if (!u.ok) {
|
|
132
|
-
const
|
|
133
|
-
throw console.error(`API Error (${u.status}):`,
|
|
132
|
+
const d = await u.json();
|
|
133
|
+
throw console.error(`API Error (${u.status}):`, d), {
|
|
134
134
|
status: u.status,
|
|
135
135
|
statusText: u.statusText,
|
|
136
|
-
...
|
|
137
|
-
message:
|
|
136
|
+
...d,
|
|
137
|
+
message: d.error || d.message || `Server error: ${u.status}`
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
return await u.json();
|
|
@@ -159,7 +159,7 @@ function le() {
|
|
|
159
159
|
}, []), [e, t];
|
|
160
160
|
}
|
|
161
161
|
const xe = (e) => {
|
|
162
|
-
const t =
|
|
162
|
+
const t = L(), [n] = le(), s = e ?? n.get("page"), r = C();
|
|
163
163
|
return ae({
|
|
164
164
|
queryKey: [E.GET_LANGUAGE_PAGES, s],
|
|
165
165
|
staleTime: 1 / 0,
|
|
@@ -176,7 +176,7 @@ const xe = (e) => {
|
|
|
176
176
|
enabled: !!s
|
|
177
177
|
});
|
|
178
178
|
}, Re = () => {
|
|
179
|
-
const e =
|
|
179
|
+
const e = L(), t = C();
|
|
180
180
|
return ae({
|
|
181
181
|
queryKey: [E.GET_WEBSITE_DRAFT_SETTINGS],
|
|
182
182
|
staleTime: 5 * 60 * 1e3,
|
|
@@ -203,32 +203,32 @@ const xe = (e) => {
|
|
|
203
203
|
};
|
|
204
204
|
class ti {
|
|
205
205
|
constructor(t, n, s, r) {
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
var a, i, o, c, u,
|
|
214
|
-
this.userId = s, this.websocket = t, this.clientId = this.getClientId(), this.channelId = `WEBSITE:${n}`, this.callback = r, this.channel = this.websocket.channel(this.channelId, { config: { presence: { key: this.clientId } } }), (
|
|
215
|
-
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC",
|
|
216
|
-
})) == null ? void 0 : i.on("presence", { event: "leave" }, (
|
|
217
|
-
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC",
|
|
218
|
-
})) == null ? void 0 : o.on("presence", { event: "join" }, (
|
|
219
|
-
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC",
|
|
206
|
+
ve(this, "channelId");
|
|
207
|
+
ve(this, "websocket");
|
|
208
|
+
ve(this, "channel", null);
|
|
209
|
+
ve(this, "userId", null);
|
|
210
|
+
ve(this, "clientId", null);
|
|
211
|
+
ve(this, "pageId", null);
|
|
212
|
+
ve(this, "callback");
|
|
213
|
+
var a, i, o, c, u, d;
|
|
214
|
+
this.userId = s, this.websocket = t, this.clientId = this.getClientId(), this.channelId = `WEBSITE:${n}`, this.callback = r, this.channel = this.websocket.channel(this.channelId, { config: { presence: { key: this.clientId } } }), (d = (u = (c = (o = (i = (a = this.channel) == null ? void 0 : a.on("presence", { event: "sync" }, (f) => {
|
|
215
|
+
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", f);
|
|
216
|
+
})) == null ? void 0 : i.on("presence", { event: "leave" }, (f) => {
|
|
217
|
+
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", f);
|
|
218
|
+
})) == null ? void 0 : o.on("presence", { event: "join" }, (f) => {
|
|
219
|
+
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", f);
|
|
220
220
|
})) == null ? void 0 : c.on(
|
|
221
221
|
"broadcast",
|
|
222
222
|
{ event: "TAKE_OVER_REQUESTED" },
|
|
223
|
-
({ payload:
|
|
223
|
+
({ payload: f }) => this.onReceiveEvent("TAKE_OVER_REQUESTED", f)
|
|
224
224
|
)) == null ? void 0 : u.on(
|
|
225
225
|
"broadcast",
|
|
226
226
|
{ event: "TAKE_OVER_REQUEST_ACCEPTED" },
|
|
227
|
-
({ payload:
|
|
228
|
-
)) == null ||
|
|
227
|
+
({ payload: f }) => this.onReceiveEvent("TAKE_OVER_REQUEST_ACCEPTED", f)
|
|
228
|
+
)) == null || d.on(
|
|
229
229
|
"broadcast",
|
|
230
230
|
{ event: "TAKE_OVER_REQUEST_REJECTED" },
|
|
231
|
-
({ payload:
|
|
231
|
+
({ payload: f }) => this.onReceiveEvent("TAKE_OVER_REQUEST_REJECTED", f)
|
|
232
232
|
).subscribe();
|
|
233
233
|
}
|
|
234
234
|
getClientId() {
|
|
@@ -310,7 +310,7 @@ class ti {
|
|
|
310
310
|
}
|
|
311
311
|
const ni = Ee(
|
|
312
312
|
null
|
|
313
|
-
), vs = () => te(ni),
|
|
313
|
+
), vs = () => te(ni), Nn = () => {
|
|
314
314
|
const [e] = vs();
|
|
315
315
|
return (e == null ? void 0 : e.slug) || "";
|
|
316
316
|
};
|
|
@@ -322,7 +322,7 @@ function si(e, t) {
|
|
|
322
322
|
}, [e, t]), n;
|
|
323
323
|
}
|
|
324
324
|
const ri = ({ query: e, uuid: t }) => {
|
|
325
|
-
const { selectedLang: n, fallbackLang: s } = Se(), { data: r } = ie(), a = r == null ? void 0 : r.pageType, i =
|
|
325
|
+
const { selectedLang: n, fallbackLang: s } = Se(), { data: r } = ie(), a = r == null ? void 0 : r.pageType, i = L(), o = C(), { data: c, isFetching: u } = ae({
|
|
326
326
|
queryKey: [E.GET_DYNAMIC_PAGES, e, a, t],
|
|
327
327
|
staleTime: 60 * 60 * 1e3,
|
|
328
328
|
placeholderData: [],
|
|
@@ -331,15 +331,15 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
331
331
|
data: { query: e, pageType: a, uuid: t }
|
|
332
332
|
}) || [],
|
|
333
333
|
enabled: !!a
|
|
334
|
-
}),
|
|
335
|
-
return { allLangPages: c, data:
|
|
334
|
+
}), d = Q(() => n === "" ? c.filter((f) => f.lang === "" || f.lang === s) : c.filter((f) => f.lang === n), [n, s, c]);
|
|
335
|
+
return { allLangPages: c, data: d, isFetching: u };
|
|
336
336
|
}, ai = () => {
|
|
337
|
-
const { selectedLang: e, fallbackLang: t } = Se(), [n, s] = vs(), [r, a] = K(""), i = si(r, 500), { allLangPages: o, data: c, isFetching: u } = ri({ query: i }),
|
|
337
|
+
const { selectedLang: e, fallbackLang: t } = Se(), [n, s] = vs(), [r, a] = K(""), i = si(r, 500), { allLangPages: o, data: c, isFetching: u } = ri({ query: i }), d = j((g) => s(g), [s]), f = j((g) => a(g), [a]), h = j(() => {
|
|
338
338
|
if (!n) return;
|
|
339
|
-
const g = !(n != null && n.primaryPage),
|
|
340
|
-
(
|
|
341
|
-
).find((
|
|
342
|
-
s(
|
|
339
|
+
const g = !(n != null && n.primaryPage), p = e.length === 0, S = g ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, T = o.filter(
|
|
340
|
+
(y) => (y == null ? void 0 : y.primaryPage) === S || y.id === S
|
|
341
|
+
).find((y) => p ? y.lang === e || y.lang === t : y.lang === e);
|
|
342
|
+
s(T || n);
|
|
343
343
|
}, [n, e, o, s, t]);
|
|
344
344
|
return {
|
|
345
345
|
isFetching: u,
|
|
@@ -348,18 +348,18 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
348
348
|
selectedLang: e,
|
|
349
349
|
dynamicPages: c,
|
|
350
350
|
allLangPages: o,
|
|
351
|
-
updateDynamicPage:
|
|
352
|
-
updateSearchQuery:
|
|
351
|
+
updateDynamicPage: d,
|
|
352
|
+
updateSearchQuery: f,
|
|
353
353
|
onChangeLanguage: h
|
|
354
354
|
};
|
|
355
|
-
}, ii = Ee({ lastSaved: void 0 }),
|
|
355
|
+
}, ii = Ee({ lastSaved: void 0 }), Ln = () => te(ii), ie = () => {
|
|
356
356
|
const [e] = le(), t = e.get("page"), { data: n, isFetching: s } = xe();
|
|
357
357
|
return { data: Q(() => ({ ...re(n, { id: t }) || {} }), [n, t]), isFetching: s };
|
|
358
358
|
}, be = () => {
|
|
359
359
|
const [e] = le(), t = e.get("lang") ?? "", { data: n, isFetching: s } = xe();
|
|
360
360
|
return { data: Q(() => re(n, { lang: t }) || {}, [n, t]), isFetching: s };
|
|
361
361
|
}, oi = Ee({}), li = () => te(oi), ci = () => {
|
|
362
|
-
const { data: e } = be(), t =
|
|
362
|
+
const { data: e } = be(), t = Nn(), n = oe("getLiveUrl", ds), s = e == null ? void 0 : e.slug, r = n(s || "/");
|
|
363
363
|
return t ? r + t : r;
|
|
364
364
|
}, Jt = () => {
|
|
365
365
|
const e = oe("currentUser"), t = oe("onLogout");
|
|
@@ -369,7 +369,7 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
369
369
|
logout: t
|
|
370
370
|
};
|
|
371
371
|
}, ui = (e) => {
|
|
372
|
-
const t = Ss(), n =
|
|
372
|
+
const t = Ss(), n = C();
|
|
373
373
|
return ae({
|
|
374
374
|
queryKey: [E.GET_CHAI_USER, e],
|
|
375
375
|
queryFn: async () => {
|
|
@@ -388,8 +388,8 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
388
388
|
isTakeOverRequested: !1,
|
|
389
389
|
requestingClientId: "",
|
|
390
390
|
isActiveInOtherTab: !1
|
|
391
|
-
}), fi = Ee(""), hi = Ee(null),
|
|
392
|
-
const [e] = le(), t = e.get("page"), [n, s] = te(di), [r, a] = te(hi), [i, o] = te(fi), [c] = te(
|
|
391
|
+
}), fi = Ee(""), hi = Ee(null), kn = Ee({}), Gc = () => te(kn), Ie = () => {
|
|
392
|
+
const [e] = le(), t = e.get("page"), [n, s] = te(di), [r, a] = te(hi), [i, o] = te(fi), [c] = te(kn);
|
|
393
393
|
return {
|
|
394
394
|
pageLock: n,
|
|
395
395
|
pageToUser: c,
|
|
@@ -403,20 +403,20 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
403
403
|
isLocked: t && n.status === "locked"
|
|
404
404
|
};
|
|
405
405
|
}, gi = () => {
|
|
406
|
-
const e = ei(), { data: t } = ie(), { user: n } = Jt(), s = t == null ? void 0 : t.id, { data: r } = Re(), { pageLock: a, setPageLock: i, setLockingStatus: o, realtimeInstance: c, setRealtimeInstance: u } = Ie(), [,
|
|
406
|
+
const e = ei(), { data: t } = ie(), { user: n } = Jt(), s = t == null ? void 0 : t.id, { data: r } = Re(), { pageLock: a, setPageLock: i, setLockingStatus: o, realtimeInstance: c, setRealtimeInstance: u } = Ie(), [, d] = te(kn), f = at(!1), h = at(a), g = at(!1);
|
|
407
407
|
return se(() => {
|
|
408
408
|
if (n != null && n.id && e && !c && (r != null && r.appKey) && !g.current) {
|
|
409
409
|
g.current = !0;
|
|
410
|
-
const
|
|
411
|
-
var
|
|
412
|
-
switch (
|
|
410
|
+
const p = async (P, T) => {
|
|
411
|
+
var y, A;
|
|
412
|
+
switch (P) {
|
|
413
413
|
/**
|
|
414
414
|
* When user joins
|
|
415
415
|
* @payload : { pageToUser: { [pageId: string]: [userId: string] } }
|
|
416
416
|
* - Update page user mapping
|
|
417
417
|
*/
|
|
418
418
|
case "UPDATE_ONLINE_USERS":
|
|
419
|
-
|
|
419
|
+
d((T == null ? void 0 : T.pageToUser) || {});
|
|
420
420
|
break;
|
|
421
421
|
/**
|
|
422
422
|
* When page is locked
|
|
@@ -428,7 +428,7 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
428
428
|
...h == null ? void 0 : h.current,
|
|
429
429
|
requestedBy: "",
|
|
430
430
|
status: "locked",
|
|
431
|
-
isActiveInOtherTab:
|
|
431
|
+
isActiveInOtherTab: T == null ? void 0 : T.isActiveInOtherTab
|
|
432
432
|
});
|
|
433
433
|
break;
|
|
434
434
|
/**
|
|
@@ -437,12 +437,12 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
437
437
|
* - User will be owner of this page
|
|
438
438
|
*/
|
|
439
439
|
case "USER_JOINED":
|
|
440
|
-
if (((
|
|
441
|
-
((
|
|
440
|
+
if (((y = h == null ? void 0 : h.current) == null ? void 0 : y.status) === "editing") return;
|
|
441
|
+
((A = h == null ? void 0 : h.current) == null ? void 0 : A.status) === "locked" && o("can_edit_now"), i({
|
|
442
442
|
...h == null ? void 0 : h.current,
|
|
443
443
|
requestedBy: "",
|
|
444
444
|
status: "editing",
|
|
445
|
-
isActiveInOtherTab:
|
|
445
|
+
isActiveInOtherTab: T == null ? void 0 : T.isActiveInOtherTab
|
|
446
446
|
});
|
|
447
447
|
break;
|
|
448
448
|
/**
|
|
@@ -456,8 +456,8 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
456
456
|
case "TAKE_OVER_REQUESTED":
|
|
457
457
|
i({
|
|
458
458
|
...h == null ? void 0 : h.current,
|
|
459
|
-
requestingClientId:
|
|
460
|
-
requestedBy:
|
|
459
|
+
requestingClientId: T == null ? void 0 : T.requestingClientId,
|
|
460
|
+
requestedBy: T != null && T.isRequestedFromAnotherTab ? "ANOTHER_TAB" : T == null ? void 0 : T.requestedBy
|
|
461
461
|
});
|
|
462
462
|
break;
|
|
463
463
|
/**
|
|
@@ -467,7 +467,7 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
467
467
|
* - update state for editing page
|
|
468
468
|
*/
|
|
469
469
|
case "TAKE_OVER_REQUEST_ACCEPTED":
|
|
470
|
-
|
|
470
|
+
T != null && T.isTakingOverFromAnotherTab || (o("take_over_request_accepted"), R.success("Your Page Take Over Request Accepted", { position: "top-center" })), i({
|
|
471
471
|
...h == null ? void 0 : h.current,
|
|
472
472
|
status: "editing",
|
|
473
473
|
requestedBy: "",
|
|
@@ -487,20 +487,20 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
487
487
|
});
|
|
488
488
|
break;
|
|
489
489
|
}
|
|
490
|
-
},
|
|
490
|
+
}, S = new ti(
|
|
491
491
|
e,
|
|
492
492
|
r == null ? void 0 : r.appKey,
|
|
493
493
|
n == null ? void 0 : n.id,
|
|
494
|
-
|
|
494
|
+
p
|
|
495
495
|
);
|
|
496
|
-
u(
|
|
496
|
+
u(S);
|
|
497
497
|
}
|
|
498
498
|
}, [u, e, r == null ? void 0 : r.appKey]), se(() => {
|
|
499
499
|
h.current = a;
|
|
500
500
|
}, [a]), se(() => {
|
|
501
|
-
if (!(!c || !s || !(n != null && n.id) ||
|
|
502
|
-
return
|
|
503
|
-
c &&
|
|
501
|
+
if (!(!c || !s || !(n != null && n.id) || f.current))
|
|
502
|
+
return f.current = !0, c == null || c.joinPage(s), () => {
|
|
503
|
+
c && f.current && (f.current = !1, h.current = {
|
|
504
504
|
requestedBy: "",
|
|
505
505
|
status: "checking",
|
|
506
506
|
requestingClientId: "",
|
|
@@ -540,12 +540,12 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
540
540
|
rejectTakeOver: u,
|
|
541
541
|
requestTakeOver: o
|
|
542
542
|
};
|
|
543
|
-
}, Ei = F(() => import("./no-language-page-content-
|
|
544
|
-
const { pageLock: t, requestTakeOver: n } = mi(), { currentEditor: s, lockingStatus: r, setLockingStatus: a, realtimePageLockEnabled: i } = Ie(), { data: o, isFetching: c } = ui(s), [u] = le(),
|
|
543
|
+
}, Ei = F(() => import("./no-language-page-content-Cme-zo4R.js")), pi = F(() => import("./page-locked-by-dialog-Csn56a3n.js")), rn = F(() => import("./page-lock-request-DDQJb8IA.js")), yi = ({ isFetchingPage: e }) => {
|
|
544
|
+
const { pageLock: t, requestTakeOver: n } = mi(), { currentEditor: s, lockingStatus: r, setLockingStatus: a, realtimePageLockEnabled: i } = Ie(), { data: o, isFetching: c } = ui(s), [u] = le(), d = u.get("page"), [f] = Ln(), h = W(), g = j(() => {
|
|
545
545
|
n();
|
|
546
546
|
}, [n]);
|
|
547
|
-
return !
|
|
548
|
-
|
|
547
|
+
return !d || e || !i || (t == null ? void 0 : t.status) === "checking" ? null : t != null && t.requestedBy ? /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
|
|
548
|
+
rn,
|
|
549
549
|
{
|
|
550
550
|
lockingStatus: "",
|
|
551
551
|
onContinue: () => {
|
|
@@ -553,7 +553,7 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
) }) : (t == null ? void 0 : t.status) !== "locked" ? r === "take_over_request_accepted" || r === "can_edit_now" ? /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
|
|
556
|
-
|
|
556
|
+
rn,
|
|
557
557
|
{
|
|
558
558
|
lockingStatus: r,
|
|
559
559
|
onContinue: () => {
|
|
@@ -562,14 +562,14 @@ const ri = ({ query: e, uuid: t }) => {
|
|
|
562
562
|
}), a("");
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
|
-
) }) : null : t != null && t.isActiveInOtherTab ? /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
|
|
565
|
+
) }) : null : t != null && t.isActiveInOtherTab ? /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(rn, { lockingStatus: "page_is_active_in_other_tab", onContinue: n }) }) : /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
|
|
566
566
|
pi,
|
|
567
567
|
{
|
|
568
568
|
...o,
|
|
569
569
|
isFetchingUserInfo: c,
|
|
570
570
|
name: (o == null ? void 0 : o.name) || "Unknown User",
|
|
571
571
|
email: (o == null ? void 0 : o.email) || "",
|
|
572
|
-
lastSaved: (
|
|
572
|
+
lastSaved: (f == null ? void 0 : f.lastSaved) || "",
|
|
573
573
|
onTakeOver: g,
|
|
574
574
|
realtimePageLockEnabled: i,
|
|
575
575
|
isRequestRejected: r === "take_over_request_rejected"
|
|
@@ -771,14 +771,14 @@ function ws(e, t, n = !1) {
|
|
|
771
771
|
const s = e.toString() ? `?${e.toString()}` : "/";
|
|
772
772
|
n ? window.history.replaceState(null, "", s) : window.history.pushState({}, "", s), t(e), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
773
773
|
}
|
|
774
|
-
const
|
|
774
|
+
const On = Ee(null), Dn = () => {
|
|
775
775
|
const { data: e } = Re();
|
|
776
776
|
return Q(
|
|
777
777
|
() => (e == null ? void 0 : e.fallbackLang) || "en",
|
|
778
778
|
[e]
|
|
779
779
|
);
|
|
780
780
|
}, bs = () => {
|
|
781
|
-
const e =
|
|
781
|
+
const e = C(), t = L();
|
|
782
782
|
return ae({
|
|
783
783
|
queryKey: [E.GET_WEBSITE_PAGES],
|
|
784
784
|
staleTime: 1e3 * 60 * 5,
|
|
@@ -786,7 +786,7 @@ const Dn = Ee(null), Gn = () => {
|
|
|
786
786
|
placeholderData: (n) => n || []
|
|
787
787
|
});
|
|
788
788
|
}, xc = (e) => {
|
|
789
|
-
const t =
|
|
789
|
+
const t = C(), n = L(), s = Dn();
|
|
790
790
|
return ae({
|
|
791
791
|
queryKey: [E.GET_WEBSITE_PAGES, e, s],
|
|
792
792
|
staleTime: 1e3 * 60 * 5,
|
|
@@ -801,18 +801,18 @@ const Dn = Ee(null), Gn = () => {
|
|
|
801
801
|
},
|
|
802
802
|
placeholderData: (r) => r || {}
|
|
803
803
|
});
|
|
804
|
-
}, Ti = F(() => import("./page-manager-new-
|
|
805
|
-
const { t } =
|
|
804
|
+
}, Ti = F(() => import("./page-manager-new-BrRxZDfT.js")), Is = ({ children: e }) => {
|
|
805
|
+
const { t } = _e(), [n, s] = le(), r = n.get("page"), { data: a, isFetching: i } = ie(), { data: o, isFetching: c } = bs(), [u, d] = K(!1), [f, h] = K(!0), { savePage: g } = Ge(), p = !!r && !he(a), S = Q(() => {
|
|
806
806
|
if (!o || c) return !1;
|
|
807
|
-
const
|
|
808
|
-
return
|
|
807
|
+
const A = o.find((b) => b.slug === "/");
|
|
808
|
+
return A == null ? void 0 : A.id;
|
|
809
809
|
}, [o, c]);
|
|
810
810
|
se(() => {
|
|
811
|
-
if (c || !
|
|
812
|
-
const
|
|
813
|
-
ws(
|
|
814
|
-
}, [r, c, o,
|
|
815
|
-
const
|
|
811
|
+
if (c || !S || o.some((M) => M.id === r)) return;
|
|
812
|
+
const b = new URLSearchParams({ page: S });
|
|
813
|
+
ws(b, s), !c && o && h(!1);
|
|
814
|
+
}, [r, c, o, S, s]);
|
|
815
|
+
const P = !f && !r, T = !f && !i && he(a), y = u || P || T;
|
|
816
816
|
return /* @__PURE__ */ m(ge, { children: [
|
|
817
817
|
/* @__PURE__ */ l("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ l("div", { className: "relative", children: /* @__PURE__ */ m(zt, { children: [
|
|
818
818
|
/* @__PURE__ */ l(
|
|
@@ -820,19 +820,19 @@ const Dn = Ee(null), Gn = () => {
|
|
|
820
820
|
{
|
|
821
821
|
asChild: !0,
|
|
822
822
|
onClick: () => {
|
|
823
|
-
g(),
|
|
823
|
+
g(), d(!0);
|
|
824
824
|
},
|
|
825
825
|
children: e || /* @__PURE__ */ l(U, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ l(Ia, { className: "h-4 w-4" }) }, "template-viewer")
|
|
826
826
|
}
|
|
827
827
|
),
|
|
828
828
|
/* @__PURE__ */ l(Yt, { side: "right", children: /* @__PURE__ */ l("p", { children: t("Open pages manager") }) })
|
|
829
829
|
] }) }) }),
|
|
830
|
-
/* @__PURE__ */ l(Es, { open:
|
|
830
|
+
/* @__PURE__ */ l(Es, { open: y, onOpenChange: (A) => !A && p && d(!1), children: /* @__PURE__ */ m(
|
|
831
831
|
ps,
|
|
832
832
|
{
|
|
833
833
|
side: "left",
|
|
834
834
|
"aria-describedby": "pages-manager-description",
|
|
835
|
-
className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${
|
|
835
|
+
className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${p ? "" : "sheet-hide-close-btn"}`,
|
|
836
836
|
children: [
|
|
837
837
|
/* @__PURE__ */ m(ta, { className: "mb-3 px-4 pt-4", children: [
|
|
838
838
|
/* @__PURE__ */ m(na, { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
@@ -844,12 +844,12 @@ const Dn = Ee(null), Gn = () => {
|
|
|
844
844
|
] }),
|
|
845
845
|
/* @__PURE__ */ l(sa, { className: "sr-only", children: t("Manage your site structure") })
|
|
846
846
|
] }),
|
|
847
|
-
/* @__PURE__ */ l("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children:
|
|
847
|
+
/* @__PURE__ */ l("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: y && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Ti, { close: () => d(!1) }) }) })
|
|
848
848
|
]
|
|
849
849
|
}
|
|
850
850
|
) })
|
|
851
851
|
] });
|
|
852
|
-
}, Si = F(() => import("./add-new-language-page-
|
|
852
|
+
}, Si = F(() => import("./add-new-language-page-BZPoqdX-.js")), _i = () => {
|
|
853
853
|
const e = oe("topLeftCorner", null);
|
|
854
854
|
return e ? /* @__PURE__ */ l("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Fr.createElement(e, {}) }) : null;
|
|
855
855
|
}, Pi = ({
|
|
@@ -857,19 +857,19 @@ const Dn = Ee(null), Gn = () => {
|
|
|
857
857
|
variant: t = "ghost",
|
|
858
858
|
goToDefaultLang: n = !1
|
|
859
859
|
}) => {
|
|
860
|
-
const { fallbackLang: s, languages: r, selectedLang: a, setSelectedLang: i } = Se(), o = he(a) ? s : a, [, c] = le(), { isLocked: u } = Ie();
|
|
860
|
+
const { fallbackLang: s, languages: r, selectedLang: a, setSelectedLang: i } = Se(), o = he(a) ? s : a, [, c] = le(), { isLocked: u } = Ie(), { t: d } = _e();
|
|
861
861
|
se(() => {
|
|
862
|
-
const
|
|
863
|
-
A && (r.includes(A) ? i(A) : (
|
|
862
|
+
const y = new URLSearchParams(window.location.search), A = y.get("lang");
|
|
863
|
+
A && (r.includes(A) ? i(A) : (y.delete("lang"), c(y), i("")));
|
|
864
864
|
}, [r, c, i]);
|
|
865
|
-
const [, f] = te(
|
|
866
|
-
const
|
|
867
|
-
Bt(V(
|
|
868
|
-
const
|
|
865
|
+
const [, f] = te(On), { data: h } = ie(), { data: g } = Re(), { data: p } = xe(), S = Q(() => {
|
|
866
|
+
const y = fs(
|
|
867
|
+
Bt(V(g, "languages"), (A) => {
|
|
868
|
+
const b = re(p, { lang: A });
|
|
869
869
|
return {
|
|
870
870
|
key: A,
|
|
871
871
|
value: V(Lt, A, A),
|
|
872
|
-
isLangPageAdded: !!
|
|
872
|
+
isLangPageAdded: !!b
|
|
873
873
|
};
|
|
874
874
|
})
|
|
875
875
|
).filter(Boolean);
|
|
@@ -879,35 +879,32 @@ const Dn = Ee(null), Gn = () => {
|
|
|
879
879
|
value: V(Lt, s),
|
|
880
880
|
isLangPageAdded: !0
|
|
881
881
|
},
|
|
882
|
-
...
|
|
882
|
+
...y
|
|
883
883
|
];
|
|
884
|
-
}, [s,
|
|
884
|
+
}, [s, p, g]), P = (y) => {
|
|
885
885
|
if (document.querySelector('[data-panel-id="seo"]')) {
|
|
886
|
-
const
|
|
886
|
+
const b = new CustomEvent("seo-language-switch-check", {
|
|
887
887
|
detail: {
|
|
888
888
|
fromLang: o,
|
|
889
|
-
toLang:
|
|
890
|
-
switchHandler: () =>
|
|
889
|
+
toLang: y,
|
|
890
|
+
switchHandler: () => T(y)
|
|
891
891
|
}
|
|
892
892
|
});
|
|
893
|
-
window.dispatchEvent(
|
|
893
|
+
window.dispatchEvent(b);
|
|
894
894
|
return;
|
|
895
895
|
}
|
|
896
|
-
|
|
897
|
-
},
|
|
898
|
-
i(
|
|
896
|
+
T(y);
|
|
897
|
+
}, T = (y) => {
|
|
898
|
+
i(y);
|
|
899
899
|
const A = new URLSearchParams(window.location.search);
|
|
900
|
-
|
|
900
|
+
y === s ? A.delete("lang") : A.set("lang", y), ws(A, c);
|
|
901
901
|
};
|
|
902
902
|
return he(r) ? null : u ? /* @__PURE__ */ m(U, { variant: "ghost", size: "sm", className: "ml-px h-max cursor-not-allowed gap-2 py-1.5 opacity-50", children: [
|
|
903
|
-
/* @__PURE__ */ l(
|
|
903
|
+
/* @__PURE__ */ l(Vn, { className: "h-4 w-4" }),
|
|
904
904
|
V(Lt, o, o),
|
|
905
|
-
/* @__PURE__ */ l(
|
|
906
|
-
] }) : n ? /* @__PURE__ */
|
|
907
|
-
/* @__PURE__ */ l(
|
|
908
|
-
"Go to default language"
|
|
909
|
-
] }) : /* @__PURE__ */ l(ge, { children: /* @__PURE__ */ m(bn, { children: [
|
|
910
|
-
/* @__PURE__ */ l(In, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(
|
|
905
|
+
/* @__PURE__ */ l(hn, { className: "h-4 w-4" })
|
|
906
|
+
] }) : n ? /* @__PURE__ */ l(U, { onClick: () => T(s), variant: "link", size: "sm", children: d("Switch to default language") }) : /* @__PURE__ */ l(ge, { children: /* @__PURE__ */ m(wn, { children: [
|
|
907
|
+
/* @__PURE__ */ l(bn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(
|
|
911
908
|
U,
|
|
912
909
|
{
|
|
913
910
|
disabled: !!u,
|
|
@@ -915,35 +912,35 @@ const Dn = Ee(null), Gn = () => {
|
|
|
915
912
|
size: "sm",
|
|
916
913
|
className: "ml-px h-max gap-2 py-1.5",
|
|
917
914
|
children: [
|
|
918
|
-
/* @__PURE__ */ l(
|
|
915
|
+
/* @__PURE__ */ l(Vn, { className: "h-4 w-4" }),
|
|
919
916
|
V(Lt, o, o),
|
|
920
|
-
/* @__PURE__ */ l(
|
|
917
|
+
/* @__PURE__ */ l(hn, { className: "h-4 w-4" })
|
|
921
918
|
]
|
|
922
919
|
}
|
|
923
920
|
) }),
|
|
924
|
-
/* @__PURE__ */ m(
|
|
921
|
+
/* @__PURE__ */ m(In, { className: "space-y-1 border-border", children: [
|
|
925
922
|
Bt(
|
|
926
|
-
|
|
927
|
-
(
|
|
923
|
+
S.filter((y) => y.isLangPageAdded),
|
|
924
|
+
(y) => /* @__PURE__ */ m(
|
|
928
925
|
ue,
|
|
929
926
|
{
|
|
930
927
|
className: Mt(
|
|
931
928
|
"flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
|
|
932
|
-
|
|
929
|
+
y.key === o && "!bg-gray-200 text-gray-700"
|
|
933
930
|
),
|
|
934
|
-
onClick: () =>
|
|
931
|
+
onClick: () => P(y.key),
|
|
935
932
|
children: [
|
|
936
|
-
/* @__PURE__ */ l("div", { className: "text-slate-600", children:
|
|
937
|
-
|
|
933
|
+
/* @__PURE__ */ l("div", { className: "text-slate-600", children: y.value }),
|
|
934
|
+
y.key === s && /* @__PURE__ */ m("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
|
|
938
935
|
/* @__PURE__ */ l(Na, { fill: "orange", className: "h-2 w-2" }),
|
|
939
936
|
"Primary"
|
|
940
937
|
] })
|
|
941
938
|
]
|
|
942
939
|
},
|
|
943
|
-
|
|
940
|
+
y.value
|
|
944
941
|
)
|
|
945
942
|
),
|
|
946
|
-
e && !he(
|
|
943
|
+
e && !he(S.filter((y) => !y.isLangPageAdded)) && /* @__PURE__ */ m(ge, { children: [
|
|
947
944
|
/* @__PURE__ */ l(ra, {}),
|
|
948
945
|
/* @__PURE__ */ m(
|
|
949
946
|
U,
|
|
@@ -951,9 +948,9 @@ const Dn = Ee(null), Gn = () => {
|
|
|
951
948
|
size: "sm",
|
|
952
949
|
variant: "ghost",
|
|
953
950
|
onClick: () => {
|
|
954
|
-
|
|
951
|
+
h && f({
|
|
955
952
|
edit: !1,
|
|
956
|
-
primaryPage:
|
|
953
|
+
primaryPage: h.id
|
|
957
954
|
});
|
|
958
955
|
},
|
|
959
956
|
className: "text-xs font-normal duration-200 hover:bg-slate-300 hover:text-slate-800",
|
|
@@ -968,7 +965,7 @@ const Dn = Ee(null), Gn = () => {
|
|
|
968
965
|
] }) });
|
|
969
966
|
};
|
|
970
967
|
function vi() {
|
|
971
|
-
const [e, t] = te(
|
|
968
|
+
const [e, t] = te(On);
|
|
972
969
|
return /* @__PURE__ */ m("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
|
|
973
970
|
/* @__PURE__ */ l(_i, {}),
|
|
974
971
|
/* @__PURE__ */ l(Is, {}),
|
|
@@ -995,7 +992,7 @@ function wi() {
|
|
|
995
992
|
/* @__PURE__ */ l(Nt, { className: "h-8 w-8 rounded-full" })
|
|
996
993
|
] }, t)) });
|
|
997
994
|
}
|
|
998
|
-
const bi = z.lazy(() => import("./page-revisions-content-
|
|
995
|
+
const bi = z.lazy(() => import("./page-revisions-content-B6fRCBX_.js"));
|
|
999
996
|
function Ii() {
|
|
1000
997
|
const [e, t] = z.useState(!1);
|
|
1001
998
|
return /* @__PURE__ */ l(ys, { children: /* @__PURE__ */ m(zt, { delayDuration: 0, children: [
|
|
@@ -1012,7 +1009,7 @@ function Ii() {
|
|
|
1012
1009
|
/* @__PURE__ */ l(Yt, { side: "bottom", children: /* @__PURE__ */ l("p", { children: "Revision history" }) })
|
|
1013
1010
|
] }) });
|
|
1014
1011
|
}
|
|
1015
|
-
const
|
|
1012
|
+
const an = ({
|
|
1016
1013
|
permission: e,
|
|
1017
1014
|
permissions: t,
|
|
1018
1015
|
children: n,
|
|
@@ -1023,7 +1020,7 @@ const on = ({
|
|
|
1023
1020
|
}, Ci = {
|
|
1024
1021
|
SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
|
|
1025
1022
|
}, Ce = () => {
|
|
1026
|
-
const e =
|
|
1023
|
+
const e = L(), t = C();
|
|
1027
1024
|
return ae({
|
|
1028
1025
|
queryKey: [E.GET_PAGE_TYPES],
|
|
1029
1026
|
staleTime: 1 / 0,
|
|
@@ -1034,7 +1031,7 @@ const on = ({
|
|
|
1034
1031
|
const { data: t } = Ce();
|
|
1035
1032
|
return Q(() => t == null ? void 0 : t.find((n) => n.key === e), [t, e]);
|
|
1036
1033
|
}, Li = () => {
|
|
1037
|
-
const e =
|
|
1034
|
+
const e = L(), t = C();
|
|
1038
1035
|
return X({
|
|
1039
1036
|
mutationFn: async ({ pageType: n, query: s }) => {
|
|
1040
1037
|
try {
|
|
@@ -1051,7 +1048,7 @@ const on = ({
|
|
|
1051
1048
|
}
|
|
1052
1049
|
});
|
|
1053
1050
|
}, Rc = () => {
|
|
1054
|
-
const e =
|
|
1051
|
+
const e = L(), t = W(), n = C(), { data: s } = Ce();
|
|
1055
1052
|
return X({
|
|
1056
1053
|
mutationFn: async (r) => await n(e, {
|
|
1057
1054
|
action: E.CREATE_PAGE,
|
|
@@ -1077,7 +1074,7 @@ const on = ({
|
|
|
1077
1074
|
}
|
|
1078
1075
|
});
|
|
1079
1076
|
}, Uc = () => {
|
|
1080
|
-
const e =
|
|
1077
|
+
const e = L(), t = W(), n = C(), { data: s } = be(), { data: r } = Ce();
|
|
1081
1078
|
return X({
|
|
1082
1079
|
mutationFn: async (a) => await n(e, {
|
|
1083
1080
|
action: E.UPDATE_PAGE,
|
|
@@ -1102,7 +1099,7 @@ const on = ({
|
|
|
1102
1099
|
}
|
|
1103
1100
|
});
|
|
1104
1101
|
}, Bc = () => {
|
|
1105
|
-
const e =
|
|
1102
|
+
const e = L(), t = W(), n = C(), { data: s } = Ce();
|
|
1106
1103
|
return X({
|
|
1107
1104
|
mutationFn: async (r) => n(e, {
|
|
1108
1105
|
action: E.DELETE_PAGE,
|
|
@@ -1131,7 +1128,7 @@ const on = ({
|
|
|
1131
1128
|
}
|
|
1132
1129
|
});
|
|
1133
1130
|
}, Mc = () => {
|
|
1134
|
-
const e =
|
|
1131
|
+
const e = L(), t = W(), n = C(), { data: s } = Ce();
|
|
1135
1132
|
return X({
|
|
1136
1133
|
mutationFn: async (r) => n(e, {
|
|
1137
1134
|
action: E.TAKE_OFFLINE,
|
|
@@ -1156,7 +1153,7 @@ const on = ({
|
|
|
1156
1153
|
}
|
|
1157
1154
|
});
|
|
1158
1155
|
}, Cs = () => {
|
|
1159
|
-
const e =
|
|
1156
|
+
const e = L(), t = C(), n = W(), { data: s } = ie(), { savePageAsync: r } = Ge();
|
|
1160
1157
|
return X({
|
|
1161
1158
|
mutationFn: async ({ ids: a }) => (await r(), t(e, {
|
|
1162
1159
|
action: E.PUBLISH_CHANGES,
|
|
@@ -1176,7 +1173,7 @@ const on = ({
|
|
|
1176
1173
|
}
|
|
1177
1174
|
});
|
|
1178
1175
|
}, Fc = () => {
|
|
1179
|
-
const e =
|
|
1176
|
+
const e = L(), t = C(), n = W();
|
|
1180
1177
|
return X({
|
|
1181
1178
|
mutationFn: async (s) => {
|
|
1182
1179
|
var r;
|
|
@@ -1201,7 +1198,7 @@ const on = ({
|
|
|
1201
1198
|
}
|
|
1202
1199
|
});
|
|
1203
1200
|
}, qc = () => {
|
|
1204
|
-
const e =
|
|
1201
|
+
const e = L(), t = C(), n = W();
|
|
1205
1202
|
return X({
|
|
1206
1203
|
mutationFn: async (s) => t(e, {
|
|
1207
1204
|
action: E.UNMARK_AS_TEMPLATE,
|
|
@@ -1217,7 +1214,7 @@ const on = ({
|
|
|
1217
1214
|
}
|
|
1218
1215
|
});
|
|
1219
1216
|
}, Kc = () => {
|
|
1220
|
-
const e =
|
|
1217
|
+
const e = L(), t = C(), n = W();
|
|
1221
1218
|
return X({
|
|
1222
1219
|
mutationFn: async ({ id: s, slug: r }) => t(e, {
|
|
1223
1220
|
action: E.CHANGE_SLUG,
|
|
@@ -1234,7 +1231,7 @@ const on = ({
|
|
|
1234
1231
|
R.error("Failed to change slug");
|
|
1235
1232
|
}
|
|
1236
1233
|
});
|
|
1237
|
-
}, ki = F(() => import("./publish-pages-content-
|
|
1234
|
+
}, ki = F(() => import("./publish-pages-content-CFEIxKQD.js"));
|
|
1238
1235
|
function Oi({
|
|
1239
1236
|
showModal: e = !1,
|
|
1240
1237
|
onClose: t = () => console.log("Cancelled")
|
|
@@ -1297,13 +1294,13 @@ const ce = {
|
|
|
1297
1294
|
}, xi = async () => {
|
|
1298
1295
|
const { default: e } = await import("./confetti.module-DCmCkDyV.js");
|
|
1299
1296
|
return e;
|
|
1300
|
-
},
|
|
1297
|
+
}, on = (e) => {
|
|
1301
1298
|
let t = Gi[e];
|
|
1302
1299
|
t || (t = {});
|
|
1303
1300
|
const n = { ...Di, ...t };
|
|
1304
1301
|
xi().then((s) => s(n));
|
|
1305
1302
|
};
|
|
1306
|
-
function
|
|
1303
|
+
function Gn({
|
|
1307
1304
|
children: e,
|
|
1308
1305
|
content: t,
|
|
1309
1306
|
side: n = "bottom",
|
|
@@ -1315,32 +1312,32 @@ function xn({
|
|
|
1315
1312
|
/* @__PURE__ */ l(Yt, { side: n, sideOffset: 10, children: /* @__PURE__ */ l("p", { children: t }) })
|
|
1316
1313
|
] }) }) : e;
|
|
1317
1314
|
}
|
|
1318
|
-
const Ri = F(() => import("./unpublish-page-
|
|
1319
|
-
const { t: e } =
|
|
1315
|
+
const Ri = F(() => import("./unpublish-page-DvOWVBIf.js")), Ui = F(() => import("./translation-warning-modal-DalBhNQy.js")), Bi = () => {
|
|
1316
|
+
const { t: e } = _e(), { selectedLang: t, fallbackLang: n } = Se(), s = oe("getPreviewUrl", async (h) => h), [r, a] = K(""), { data: i } = ie(), { data: o } = xe(), { data: c } = Ce(), u = Q(
|
|
1320
1317
|
() => {
|
|
1321
1318
|
var h;
|
|
1322
1319
|
return (h = o == null ? void 0 : o.find((g) => (g == null ? void 0 : g.lang) === t)) == null ? void 0 : h.slug;
|
|
1323
1320
|
},
|
|
1324
1321
|
[t, o]
|
|
1325
|
-
),
|
|
1322
|
+
), d = j((h) => {
|
|
1326
1323
|
var g;
|
|
1327
1324
|
return (g = re(c, { key: h })) == null ? void 0 : g.hasSlug;
|
|
1328
|
-
}, [c]),
|
|
1325
|
+
}, [c]), f = t === n ? "" : t;
|
|
1329
1326
|
return se(() => {
|
|
1330
1327
|
(async () => {
|
|
1331
1328
|
if (typeof s == "function") {
|
|
1332
|
-
const h = !
|
|
1333
|
-
h ? `${
|
|
1329
|
+
const h = !d(i == null ? void 0 : i.pageType), g = await s(
|
|
1330
|
+
h ? `${f !== "" ? f + "/" : ""}${i == null ? void 0 : i.id}` : u || ""
|
|
1334
1331
|
);
|
|
1335
1332
|
a(g);
|
|
1336
1333
|
} else
|
|
1337
1334
|
a("");
|
|
1338
1335
|
})();
|
|
1339
|
-
}, [s, u, i == null ? void 0 : i.pageType,
|
|
1336
|
+
}, [s, u, i == null ? void 0 : i.pageType, d, i == null ? void 0 : i.id, f]), /* @__PURE__ */ l(ge, { children: /* @__PURE__ */ l(Gn, { content: e("Open preview in new tab"), delayDuration: 0, children: /* @__PURE__ */ l("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ l(U, { variant: "ghost", size: "sm", className: "gap-2", children: /* @__PURE__ */ l(ka, { className: "h-4 w-4" }) }) }) }) });
|
|
1340
1337
|
}, Mi = () => {
|
|
1341
|
-
const { t: e } =
|
|
1338
|
+
const { t: e } = _e(), [t, n] = $r();
|
|
1342
1339
|
return /* @__PURE__ */ m(ge, { children: [
|
|
1343
|
-
/* @__PURE__ */ l(
|
|
1340
|
+
/* @__PURE__ */ l(Gn, { content: e("Theme"), delayDuration: 0, children: /* @__PURE__ */ l(
|
|
1344
1341
|
U,
|
|
1345
1342
|
{
|
|
1346
1343
|
variant: t === "theme" ? "outline" : "ghost",
|
|
@@ -1353,13 +1350,13 @@ const Ri = F(() => import("./unpublish-page-JzGl35pF.js")), Ui = F(() => import(
|
|
|
1353
1350
|
/* @__PURE__ */ l("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1354
1351
|
] });
|
|
1355
1352
|
}, Fi = () => {
|
|
1356
|
-
const { t: e } =
|
|
1353
|
+
const { t: e } = _e(), [t, n] = K(!1), { isLocked: s } = Ie(), { savePageAsync: r, saveState: a } = Ge();
|
|
1357
1354
|
se(() => {
|
|
1358
|
-
const
|
|
1359
|
-
a === "UNSAVED" && (
|
|
1355
|
+
const d = (f) => {
|
|
1356
|
+
a === "UNSAVED" && (f.preventDefault(), f.returnValue = !1);
|
|
1360
1357
|
};
|
|
1361
|
-
return a === "UNSAVED" && window.addEventListener("beforeunload",
|
|
1362
|
-
window.removeEventListener("beforeunload",
|
|
1358
|
+
return a === "UNSAVED" && window.addEventListener("beforeunload", d), () => {
|
|
1359
|
+
window.removeEventListener("beforeunload", d);
|
|
1363
1360
|
};
|
|
1364
1361
|
}, [a]);
|
|
1365
1362
|
const i = j(async () => {
|
|
@@ -1392,7 +1389,7 @@ const Ri = F(() => import("./unpublish-page-JzGl35pF.js")), Ui = F(() => import(
|
|
|
1392
1389
|
u
|
|
1393
1390
|
] });
|
|
1394
1391
|
}, qi = () => {
|
|
1395
|
-
const { t: e } =
|
|
1392
|
+
const { t: e } = _e(), { selectedLang: t } = Se(), { data: n } = be(), { data: s } = xe(), [r, a] = K(!1), [i, o] = K(!1), [c, u] = K(null), { savePageAsync: d } = Ge(), [f, h] = K(!1), { data: g } = ie(), { mutate: p, isPending: S } = Cs(), { needTranslations: P } = Ge(), T = P(), { buttonText: y, buttonClassName: A, isPublished: b } = Q(() => {
|
|
1396
1393
|
const w = g && (g == null ? void 0 : g.online);
|
|
1397
1394
|
return {
|
|
1398
1395
|
buttonClassName: w ? "hover:bg-green-600 bg-green-500" : "",
|
|
@@ -1400,18 +1397,18 @@ const Ri = F(() => import("./unpublish-page-JzGl35pF.js")), Ui = F(() => import(
|
|
|
1400
1397
|
buttonText: e(w ? "Published" : "Publish")
|
|
1401
1398
|
};
|
|
1402
1399
|
}, [g, e]), M = async () => {
|
|
1403
|
-
if (
|
|
1400
|
+
if (T) {
|
|
1404
1401
|
h(!0);
|
|
1405
1402
|
return;
|
|
1406
1403
|
}
|
|
1407
|
-
|
|
1408
|
-
},
|
|
1404
|
+
k();
|
|
1405
|
+
}, k = () => {
|
|
1409
1406
|
const w = [n == null ? void 0 : n.id, n == null ? void 0 : n.primaryPage];
|
|
1410
|
-
|
|
1407
|
+
p({ ids: fs(w) }, { onSuccess: () => on("TOP_RIGHT") });
|
|
1411
1408
|
}, pe = () => {
|
|
1412
|
-
h(!1),
|
|
1409
|
+
h(!1), k();
|
|
1413
1410
|
}, ye = async () => {
|
|
1414
|
-
h(!1), await
|
|
1411
|
+
h(!1), await d();
|
|
1415
1412
|
}, B = Q(() => Bt(s ?? [], "id"), [s]);
|
|
1416
1413
|
return /* @__PURE__ */ m(ge, { children: [
|
|
1417
1414
|
/* @__PURE__ */ m("div", { className: "flex", children: [
|
|
@@ -1420,8 +1417,8 @@ const Ri = F(() => import("./unpublish-page-JzGl35pF.js")), Ui = F(() => import(
|
|
|
1420
1417
|
{
|
|
1421
1418
|
size: "sm",
|
|
1422
1419
|
onClick: M,
|
|
1423
|
-
disabled:
|
|
1424
|
-
className: `relative flex items-center gap-1 overflow-hidden rounded-r-none text-white transition-all duration-300 ease-in-out ${
|
|
1420
|
+
disabled: S || !(g != null && g.id),
|
|
1421
|
+
className: `relative flex items-center gap-1 overflow-hidden rounded-r-none text-white transition-all duration-300 ease-in-out ${A}`,
|
|
1425
1422
|
onMouseEnter: () => o(!0),
|
|
1426
1423
|
onMouseLeave: () => o(!1),
|
|
1427
1424
|
children: [
|
|
@@ -1429,50 +1426,50 @@ const Ri = F(() => import("./unpublish-page-JzGl35pF.js")), Ui = F(() => import(
|
|
|
1429
1426
|
"span",
|
|
1430
1427
|
{
|
|
1431
1428
|
className: `flex items-center transition-transform duration-300 ease-in-out ${i ? "-translate-y-10" : ""}`,
|
|
1432
|
-
children:
|
|
1429
|
+
children: b ? /* @__PURE__ */ l(Hn, { className: "h-4 w-4" }) : /* @__PURE__ */ l(Qn, { className: "h-4 w-4" })
|
|
1433
1430
|
}
|
|
1434
1431
|
),
|
|
1435
1432
|
/* @__PURE__ */ l(
|
|
1436
1433
|
"span",
|
|
1437
1434
|
{
|
|
1438
1435
|
className: `absolute inset-0 left-3 flex items-center transition-transform duration-300 ease-in-out ${i ? "" : "translate-y-10"}`,
|
|
1439
|
-
children:
|
|
1436
|
+
children: b ? /* @__PURE__ */ l(Qn, { className: "h-4 w-4" }) : /* @__PURE__ */ l(Hn, { className: "h-4 w-4" })
|
|
1440
1437
|
}
|
|
1441
1438
|
),
|
|
1442
|
-
/* @__PURE__ */ l("span", { children:
|
|
1443
|
-
t ? `(${
|
|
1439
|
+
/* @__PURE__ */ l("span", { children: y }),
|
|
1440
|
+
t ? `(${Fn(t)})` : ""
|
|
1444
1441
|
]
|
|
1445
1442
|
}
|
|
1446
1443
|
),
|
|
1447
|
-
/* @__PURE__ */ m(
|
|
1448
|
-
/* @__PURE__ */ l(
|
|
1444
|
+
/* @__PURE__ */ m(wn, { children: [
|
|
1445
|
+
/* @__PURE__ */ l(bn, { asChild: !0, children: /* @__PURE__ */ l(
|
|
1449
1446
|
U,
|
|
1450
1447
|
{
|
|
1451
1448
|
size: "sm",
|
|
1452
|
-
disabled:
|
|
1453
|
-
className: `rounded-l-none border-l border-white/50 px-2 text-white ${
|
|
1454
|
-
children: /* @__PURE__ */ l(
|
|
1449
|
+
disabled: S || !(g != null && g.id),
|
|
1450
|
+
className: `rounded-l-none border-l border-white/50 px-2 text-white ${A}`,
|
|
1451
|
+
children: /* @__PURE__ */ l(hn, { className: "h-4 w-4" })
|
|
1455
1452
|
}
|
|
1456
1453
|
) }),
|
|
1457
|
-
/* @__PURE__ */ m(
|
|
1454
|
+
/* @__PURE__ */ m(In, { align: "end", className: "w-52", children: [
|
|
1458
1455
|
/* @__PURE__ */ m(
|
|
1459
1456
|
ue,
|
|
1460
1457
|
{
|
|
1461
|
-
disabled:
|
|
1458
|
+
disabled: S,
|
|
1462
1459
|
className: "cursor-pointer text-xs",
|
|
1463
|
-
onClick: () =>
|
|
1460
|
+
onClick: () => p({ ids: B }, { onSuccess: () => on("TOP_RIGHT") }),
|
|
1464
1461
|
children: [
|
|
1465
1462
|
e("Publish"),
|
|
1466
1463
|
" with translation pages"
|
|
1467
1464
|
]
|
|
1468
1465
|
}
|
|
1469
1466
|
),
|
|
1470
|
-
!
|
|
1467
|
+
!b && /* @__PURE__ */ m(
|
|
1471
1468
|
ue,
|
|
1472
1469
|
{
|
|
1473
|
-
disabled:
|
|
1470
|
+
disabled: S,
|
|
1474
1471
|
className: "cursor-pointer text-xs",
|
|
1475
|
-
onClick: () =>
|
|
1472
|
+
onClick: () => p({ ids: [g == null ? void 0 : g.id] }, { onSuccess: () => on("TOP_RIGHT") }),
|
|
1476
1473
|
children: [
|
|
1477
1474
|
e("Publish"),
|
|
1478
1475
|
" page"
|
|
@@ -1483,23 +1480,23 @@ const Ri = F(() => import("./unpublish-page-JzGl35pF.js")), Ui = F(() => import(
|
|
|
1483
1480
|
e("Open"),
|
|
1484
1481
|
" publish menu"
|
|
1485
1482
|
] }),
|
|
1486
|
-
|
|
1483
|
+
b && /* @__PURE__ */ m(ue, { onClick: () => u(n), className: "cursor-pointer text-xs", children: [
|
|
1487
1484
|
e("Unpublish"),
|
|
1488
1485
|
" page ",
|
|
1489
|
-
t ? `(${
|
|
1486
|
+
t ? `(${Fn(t)})` : ""
|
|
1490
1487
|
] })
|
|
1491
1488
|
] })
|
|
1492
1489
|
] })
|
|
1493
1490
|
] }),
|
|
1494
1491
|
/* @__PURE__ */ l(Oi, { showModal: r, onClose: () => a(!1) }),
|
|
1495
1492
|
c && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Ri, { page: c, onClose: () => u(null) }) }),
|
|
1496
|
-
|
|
1493
|
+
f && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
|
|
1497
1494
|
Ui,
|
|
1498
1495
|
{
|
|
1499
|
-
isOpen:
|
|
1496
|
+
isOpen: f,
|
|
1500
1497
|
onClose: ye,
|
|
1501
1498
|
onContinue: pe,
|
|
1502
|
-
isPending:
|
|
1499
|
+
isPending: S
|
|
1503
1500
|
}
|
|
1504
1501
|
) })
|
|
1505
1502
|
] });
|
|
@@ -1508,10 +1505,10 @@ function Ki() {
|
|
|
1508
1505
|
const { isLocked: e } = Ie(), [t] = le(), n = t.get("lang"), s = Ps(n);
|
|
1509
1506
|
return e || !s ? /* @__PURE__ */ l("div", {}) : /* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-1", children: [
|
|
1510
1507
|
/* @__PURE__ */ l(Ii, {}),
|
|
1511
|
-
/* @__PURE__ */ l(
|
|
1508
|
+
/* @__PURE__ */ l(an, { permission: ce.EDIT_THEME, children: /* @__PURE__ */ l(Mi, {}) }),
|
|
1512
1509
|
/* @__PURE__ */ l(Bi, {}),
|
|
1513
|
-
/* @__PURE__ */ l(
|
|
1514
|
-
/* @__PURE__ */ l(
|
|
1510
|
+
/* @__PURE__ */ l(an, { permission: ce.SAVE_PAGE, children: /* @__PURE__ */ l(Fi, {}) }),
|
|
1511
|
+
/* @__PURE__ */ l(an, { permission: ce.PUBLISH_PAGE, children: /* @__PURE__ */ l(qi, {}) })
|
|
1515
1512
|
] });
|
|
1516
1513
|
}
|
|
1517
1514
|
const Vi = ({
|
|
@@ -1525,16 +1522,16 @@ const Vi = ({
|
|
|
1525
1522
|
children: o,
|
|
1526
1523
|
isLanguagePage: c
|
|
1527
1524
|
}) => {
|
|
1528
|
-
const { t: u } =
|
|
1529
|
-
return !
|
|
1530
|
-
/* @__PURE__ */ l(
|
|
1531
|
-
/* @__PURE__ */ m(
|
|
1532
|
-
|
|
1525
|
+
const { t: u } = _e(), { hasPermission: d } = ms(), { data: f } = Ce(), h = Q(() => re(f, { key: e.pageType }), [f, e.pageType]), g = Q(() => !!e.isTemplate, [e.isTemplate]), p = Q(() => !!(h != null && h.hasSlug), [h == null ? void 0 : h.hasSlug]);
|
|
1526
|
+
return !d(ce.EDIT_PAGE) && !d(ce.DELETE_PAGE) && !d(ce.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ m(wn, { children: [
|
|
1527
|
+
/* @__PURE__ */ l(bn, { asChild: !0, onClick: (P) => P.stopPropagation(), children: o }),
|
|
1528
|
+
/* @__PURE__ */ m(In, { align: "center", className: "text-sm", children: [
|
|
1529
|
+
d(ce.ADD_PAGE) && !c && /* @__PURE__ */ m(
|
|
1533
1530
|
ue,
|
|
1534
1531
|
{
|
|
1535
1532
|
className: "flex cursor-pointer items-center gap-2",
|
|
1536
|
-
onClick: (
|
|
1537
|
-
|
|
1533
|
+
onClick: (P) => {
|
|
1534
|
+
P.stopPropagation(), t(e);
|
|
1538
1535
|
},
|
|
1539
1536
|
children: [
|
|
1540
1537
|
/* @__PURE__ */ l(xa, { className: "size-3" }),
|
|
@@ -1542,12 +1539,12 @@ const Vi = ({
|
|
|
1542
1539
|
]
|
|
1543
1540
|
}
|
|
1544
1541
|
),
|
|
1545
|
-
|
|
1542
|
+
d(ce.EDIT_PAGE) && /* @__PURE__ */ m(
|
|
1546
1543
|
ue,
|
|
1547
1544
|
{
|
|
1548
1545
|
className: "flex cursor-pointer items-center gap-2",
|
|
1549
|
-
onClick: (
|
|
1550
|
-
|
|
1546
|
+
onClick: (P) => {
|
|
1547
|
+
P.stopPropagation(), n({
|
|
1551
1548
|
...e,
|
|
1552
1549
|
global: !(h != null && h.hasSlug)
|
|
1553
1550
|
});
|
|
@@ -1558,12 +1555,12 @@ const Vi = ({
|
|
|
1558
1555
|
]
|
|
1559
1556
|
}
|
|
1560
1557
|
),
|
|
1561
|
-
(e == null ? void 0 : e.online) &&
|
|
1558
|
+
(e == null ? void 0 : e.online) && d(ce.UNPUBLISH_PAGE) && /* @__PURE__ */ m(
|
|
1562
1559
|
ue,
|
|
1563
1560
|
{
|
|
1564
1561
|
className: "flex cursor-pointer items-center gap-2",
|
|
1565
|
-
onClick: (
|
|
1566
|
-
|
|
1562
|
+
onClick: (P) => {
|
|
1563
|
+
P.stopPropagation(), s(e);
|
|
1567
1564
|
},
|
|
1568
1565
|
children: [
|
|
1569
1566
|
/* @__PURE__ */ l(Ua, { className: "size-3" }),
|
|
@@ -1571,12 +1568,12 @@ const Vi = ({
|
|
|
1571
1568
|
]
|
|
1572
1569
|
}
|
|
1573
1570
|
),
|
|
1574
|
-
|
|
1571
|
+
d(ce.DELETE_PAGE) && /* @__PURE__ */ m(
|
|
1575
1572
|
ue,
|
|
1576
1573
|
{
|
|
1577
1574
|
className: "flex cursor-pointer items-center gap-2",
|
|
1578
|
-
onClick: (
|
|
1579
|
-
|
|
1575
|
+
onClick: (P) => {
|
|
1576
|
+
P.stopPropagation(), r(e);
|
|
1580
1577
|
},
|
|
1581
1578
|
children: [
|
|
1582
1579
|
/* @__PURE__ */ l(Ba, { className: "size-3" }),
|
|
@@ -1584,12 +1581,12 @@ const Vi = ({
|
|
|
1584
1581
|
]
|
|
1585
1582
|
}
|
|
1586
1583
|
),
|
|
1587
|
-
|
|
1584
|
+
d(ce.MARK_AS_TEMPLATE) && p && !c && /* @__PURE__ */ l(ge, { children: g ? /* @__PURE__ */ m(
|
|
1588
1585
|
ue,
|
|
1589
1586
|
{
|
|
1590
1587
|
className: "flex cursor-pointer items-center gap-2",
|
|
1591
|
-
onClick: (
|
|
1592
|
-
|
|
1588
|
+
onClick: (P) => {
|
|
1589
|
+
P.stopPropagation(), i(e);
|
|
1593
1590
|
},
|
|
1594
1591
|
children: [
|
|
1595
1592
|
/* @__PURE__ */ l($n, { className: "size-3" }),
|
|
@@ -1600,8 +1597,8 @@ const Vi = ({
|
|
|
1600
1597
|
ue,
|
|
1601
1598
|
{
|
|
1602
1599
|
className: "flex cursor-pointer items-center gap-2",
|
|
1603
|
-
onClick: (
|
|
1604
|
-
|
|
1600
|
+
onClick: (P) => {
|
|
1601
|
+
P.stopPropagation(), a(e);
|
|
1605
1602
|
},
|
|
1606
1603
|
children: [
|
|
1607
1604
|
/* @__PURE__ */ l($n, { className: "size-3" }),
|
|
@@ -1611,15 +1608,15 @@ const Vi = ({
|
|
|
1611
1608
|
) })
|
|
1612
1609
|
] })
|
|
1613
1610
|
] });
|
|
1614
|
-
}, Hi = F(() => import("./add-new-page-
|
|
1615
|
-
const [e, t] = K(null), [n, s] = K(null), [r, a] = K(null), [i, o] = K(null), [c, u] = K(null), [
|
|
1611
|
+
}, Hi = F(() => import("./add-new-page-DK25Y0zS.js")), Qi = F(() => import("./delete-page-B95T2Prd.js")), $i = F(() => import("./duplicate-page-CrzzObAj.js")), ji = F(() => import("./mark-as-template-CmCCMaQg.js")), zi = F(() => import("./unmark-as-template-BJ5CTNAe.js")), Wi = F(() => import("./unpublish-page-DvOWVBIf.js")), Yi = () => {
|
|
1612
|
+
const [e, t] = K(null), [n, s] = K(null), [r, a] = K(null), [i, o] = K(null), [c, u] = K(null), [d, f] = K(null), { data: h, isFetching: g } = be(), { selectedLang: p, fallbackLang: S } = Se(), { data: P } = xe(), T = P == null ? void 0 : P.find((k) => k.lang === p), { isLocked: y } = Ie(), A = !(h != null && h.slug), [, b] = te(On);
|
|
1616
1613
|
if (!h) return null;
|
|
1617
|
-
const M = (
|
|
1618
|
-
|
|
1614
|
+
const M = (k) => {
|
|
1615
|
+
p.length > 0 && p !== S ? b({
|
|
1619
1616
|
edit: !0,
|
|
1620
|
-
id:
|
|
1621
|
-
primaryPage:
|
|
1622
|
-
}) :
|
|
1617
|
+
id: k == null ? void 0 : k.id,
|
|
1618
|
+
primaryPage: k == null ? void 0 : k.primaryPage
|
|
1619
|
+
}) : f(k);
|
|
1623
1620
|
};
|
|
1624
1621
|
return /* @__PURE__ */ m(ge, { children: [
|
|
1625
1622
|
/* @__PURE__ */ m("div", { className: "flex items-center justify-between rounded px-[2px] transition-colors duration-200", children: [
|
|
@@ -1629,12 +1626,12 @@ const Vi = ({
|
|
|
1629
1626
|
className: "flex h-7 max-w-[200px] cursor-pointer items-center truncate rounded px-1 text-xs font-medium",
|
|
1630
1627
|
variant: "ghost",
|
|
1631
1628
|
children: g ? /* @__PURE__ */ l(Ft, { className: "h-4 w-4 animate-spin text-slate-400" }) : /* @__PURE__ */ m("span", { className: "flex w-full cursor-pointer items-end overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-xs font-medium", children: [
|
|
1632
|
-
|
|
1633
|
-
V(
|
|
1629
|
+
A ? /* @__PURE__ */ l(Ma, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ l(Fa, { className: "mr-1 h-4 w-4" }),
|
|
1630
|
+
V(T || h, "name") ?? ""
|
|
1634
1631
|
] })
|
|
1635
1632
|
}
|
|
1636
1633
|
) }),
|
|
1637
|
-
|
|
1634
|
+
y ? /* @__PURE__ */ l(
|
|
1638
1635
|
U,
|
|
1639
1636
|
{
|
|
1640
1637
|
variant: "ghost",
|
|
@@ -1646,25 +1643,25 @@ const Vi = ({
|
|
|
1646
1643
|
Vi,
|
|
1647
1644
|
{
|
|
1648
1645
|
page: h,
|
|
1649
|
-
setDuplicatePage: (
|
|
1650
|
-
setAddEditPage: (
|
|
1651
|
-
setUnpublishPage: (
|
|
1652
|
-
setDeletePage: (
|
|
1653
|
-
setMarkAsTemplate: (
|
|
1654
|
-
setUnmarkAsTemplate: (
|
|
1655
|
-
isLanguagePage:
|
|
1646
|
+
setDuplicatePage: (k) => u(k),
|
|
1647
|
+
setAddEditPage: (k) => M(k),
|
|
1648
|
+
setUnpublishPage: (k) => s(k),
|
|
1649
|
+
setDeletePage: (k) => t(k),
|
|
1650
|
+
setMarkAsTemplate: (k) => a(k),
|
|
1651
|
+
setUnmarkAsTemplate: (k) => o(k),
|
|
1652
|
+
isLanguagePage: p.length > 0 && p !== S,
|
|
1656
1653
|
children: /* @__PURE__ */ l(U, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ l(jn, { className: "h-4 w-4" }) })
|
|
1657
1654
|
}
|
|
1658
1655
|
)
|
|
1659
1656
|
] }),
|
|
1660
|
-
|
|
1657
|
+
d && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
|
|
1661
1658
|
Hi,
|
|
1662
1659
|
{
|
|
1663
|
-
closePanel: () =>
|
|
1660
|
+
closePanel: () => f(null),
|
|
1664
1661
|
editPage: () => {
|
|
1665
1662
|
},
|
|
1666
|
-
addEditPage:
|
|
1667
|
-
setAddEditPage:
|
|
1663
|
+
addEditPage: d,
|
|
1664
|
+
setAddEditPage: f
|
|
1668
1665
|
}
|
|
1669
1666
|
) }),
|
|
1670
1667
|
e && /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Qi, { page: e, onClose: () => t(null) }) }),
|
|
@@ -1676,7 +1673,7 @@ const Vi = ({
|
|
|
1676
1673
|
{
|
|
1677
1674
|
page: c,
|
|
1678
1675
|
onClose: () => u(null),
|
|
1679
|
-
closePanel: () =>
|
|
1676
|
+
closePanel: () => f(null)
|
|
1680
1677
|
}
|
|
1681
1678
|
) })
|
|
1682
1679
|
] });
|
|
@@ -1692,21 +1689,21 @@ const Vi = ({
|
|
|
1692
1689
|
), Ji = ({ hasDynamicPage: e }) => /* @__PURE__ */ l(Ns, { children: /* @__PURE__ */ m("div", { className: "flex min-w-[300px] max-w-[400px] flex-col items-center justify-center rounded-lg border bg-white p-4 shadow-lg", children: [
|
|
1693
1690
|
/* @__PURE__ */ l("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
|
|
1694
1691
|
/* @__PURE__ */ l("p", { className: "pt-2 text-center text-sm font-light text-gray-600", children: e ? "Please select a page from the list in the top header. This will enable you to edit the page." : "Please add a new page" })
|
|
1695
|
-
] }) }), Xi = F(() => import("./dynamic-page-selector-
|
|
1692
|
+
] }) }), Xi = F(() => import("./dynamic-page-selector-D6wQnNfH.js")), Zi = () => {
|
|
1696
1693
|
const { dynamicPage: e, allLangPages: t, isFetching: n } = ai(), s = t.length > 0;
|
|
1697
1694
|
return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
1698
1695
|
!e && /* @__PURE__ */ l(Ji, { hasDynamicPage: s }),
|
|
1699
1696
|
/* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Xi, {}) })
|
|
1700
1697
|
] });
|
|
1701
1698
|
}, eo = () => {
|
|
1702
|
-
const { data: e, isFetching: t } = be(), { data: n, isFetching: s } = ie(), r = V(n, "dynamic", !1), a =
|
|
1699
|
+
const { data: e, isFetching: t } = be(), { data: n, isFetching: s } = ie(), r = V(n, "dynamic", !1), a = Nn(), i = jr("dynamic-page-selector"), o = e == null ? void 0 : e.slug, c = !o, u = ci(), d = t || s, h = (c ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
|
|
1703
1700
|
return /* @__PURE__ */ m("div", { className: "relative flex items-center gap-x-1", children: [
|
|
1704
1701
|
/* @__PURE__ */ l(
|
|
1705
1702
|
"div",
|
|
1706
1703
|
{
|
|
1707
1704
|
className: Mt(
|
|
1708
1705
|
"flex h-8 w-auto max-w-[600px] items-center rounded-md border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-800",
|
|
1709
|
-
|
|
1706
|
+
d && "max-w-0 overflow-hidden opacity-0"
|
|
1710
1707
|
),
|
|
1711
1708
|
children: /* @__PURE__ */ l(Yi, {})
|
|
1712
1709
|
}
|
|
@@ -1716,7 +1713,7 @@ const Vi = ({
|
|
|
1716
1713
|
{
|
|
1717
1714
|
className: Mt(
|
|
1718
1715
|
"flex h-8 w-auto max-w-[600px] items-center rounded-md border border-gray-200 bg-white shadow-sm dark:border-gray-700 dark:bg-gray-800" + (c ? " pr-2" : ""),
|
|
1719
|
-
|
|
1716
|
+
d && "max-w-0 overflow-hidden opacity-0"
|
|
1720
1717
|
),
|
|
1721
1718
|
children: [
|
|
1722
1719
|
/* @__PURE__ */ l(Pi, {}),
|
|
@@ -1756,7 +1753,7 @@ const Vi = ({
|
|
|
1756
1753
|
[e]
|
|
1757
1754
|
), aiContext: t };
|
|
1758
1755
|
}, no = () => {
|
|
1759
|
-
const e =
|
|
1756
|
+
const e = L(), { aiContext: t } = Ls(), n = C();
|
|
1760
1757
|
return j(
|
|
1761
1758
|
async (s, r, a, i) => n(e, {
|
|
1762
1759
|
action: E.ASK_AI,
|
|
@@ -1769,7 +1766,7 @@ const Vi = ({
|
|
|
1769
1766
|
const s = Ja(n._type);
|
|
1770
1767
|
return {
|
|
1771
1768
|
...s,
|
|
1772
|
-
...
|
|
1769
|
+
...vn(n, [
|
|
1773
1770
|
...Or(s),
|
|
1774
1771
|
"_type",
|
|
1775
1772
|
"_id",
|
|
@@ -1793,7 +1790,7 @@ const Vi = ({
|
|
|
1793
1790
|
return { blocks: so(t, n) };
|
|
1794
1791
|
}, [e, t]);
|
|
1795
1792
|
}, ao = () => {
|
|
1796
|
-
const [e] = le(), t = e.get("page"), n =
|
|
1793
|
+
const [e] = le(), t = e.get("page"), n = L(), { setAiContext: s } = Ls(), [, r] = Ln(), [, a] = li(), [, i] = zr(), o = C();
|
|
1797
1794
|
return ae({
|
|
1798
1795
|
queryKey: [E.GET_DRAFT_PAGE, t],
|
|
1799
1796
|
staleTime: 1 / 0,
|
|
@@ -1803,13 +1800,13 @@ const Vi = ({
|
|
|
1803
1800
|
const c = await o(n, {
|
|
1804
1801
|
action: E.GET_DRAFT_PAGE,
|
|
1805
1802
|
data: { id: t, draft: !0 }
|
|
1806
|
-
}), u = c.blocks ?? [],
|
|
1807
|
-
return s(V(
|
|
1803
|
+
}), u = c.blocks ?? [], d = re(u, { _type: "@chai/ai-context" });
|
|
1804
|
+
return s(V(d, "_value", "") || ""), r((f) => ({ ...f, lastSaved: c.lastSaved })), a(V(c, "metadata", {})), setTimeout(() => i(!0), 500), u;
|
|
1808
1805
|
},
|
|
1809
1806
|
enabled: !!t
|
|
1810
1807
|
});
|
|
1811
1808
|
}, io = () => {
|
|
1812
|
-
const { data: e } = ie(), { data: t } = be(), n =
|
|
1809
|
+
const { data: e } = ie(), { data: t } = be(), n = L(), s = C(), r = Dn(), a = Nn();
|
|
1813
1810
|
return ae({
|
|
1814
1811
|
queryKey: [E.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id, a],
|
|
1815
1812
|
staleTime: 1 / 0,
|
|
@@ -1839,7 +1836,7 @@ const Vi = ({
|
|
|
1839
1836
|
enabled: !!(e != null && e.pageType) && !!t.id
|
|
1840
1837
|
});
|
|
1841
1838
|
}, oo = () => {
|
|
1842
|
-
const e =
|
|
1839
|
+
const e = L(), t = W(), n = C();
|
|
1843
1840
|
return X({
|
|
1844
1841
|
mutationFn: async (s) => n(e, {
|
|
1845
1842
|
action: E.UPDATE_WEBSITE_SETTINGS,
|
|
@@ -1858,7 +1855,7 @@ const Vi = ({
|
|
|
1858
1855
|
}
|
|
1859
1856
|
});
|
|
1860
1857
|
}, Vc = () => {
|
|
1861
|
-
const e =
|
|
1858
|
+
const e = L(), t = W(), n = C(), { selectedLang: s } = Se();
|
|
1862
1859
|
return X({
|
|
1863
1860
|
mutationFn: async (r) => n(e, { action: E.ADD_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1864
1861
|
onSuccess: () => {
|
|
@@ -1873,7 +1870,7 @@ const Vi = ({
|
|
|
1873
1870
|
}
|
|
1874
1871
|
});
|
|
1875
1872
|
}, Hc = () => {
|
|
1876
|
-
const e =
|
|
1873
|
+
const e = L(), t = W(), n = C(), { selectedLang: s } = Se();
|
|
1877
1874
|
return X({
|
|
1878
1875
|
mutationFn: async (r) => n(e, { action: E.UPDATE_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1879
1876
|
onSuccess: () => {
|
|
@@ -1888,7 +1885,7 @@ const Vi = ({
|
|
|
1888
1885
|
}
|
|
1889
1886
|
});
|
|
1890
1887
|
}, Qc = () => {
|
|
1891
|
-
const e =
|
|
1888
|
+
const e = L(), t = W(), n = C();
|
|
1892
1889
|
return X({
|
|
1893
1890
|
mutationFn: async (s) => n(e, { action: E.DELETE_GLOBAL_SCHEMA, data: { id: s } }),
|
|
1894
1891
|
onSuccess: () => {
|
|
@@ -1903,7 +1900,7 @@ const Vi = ({
|
|
|
1903
1900
|
}
|
|
1904
1901
|
});
|
|
1905
1902
|
}, $c = () => {
|
|
1906
|
-
const e =
|
|
1903
|
+
const e = L(), t = C();
|
|
1907
1904
|
return X({
|
|
1908
1905
|
mutationFn: async (n) => t(e, { action: E.TOGGLE_PAGE_GLOBAL_SCHEMA, data: n }),
|
|
1909
1906
|
onError: (n) => {
|
|
@@ -1913,7 +1910,7 @@ const Vi = ({
|
|
|
1913
1910
|
}
|
|
1914
1911
|
});
|
|
1915
1912
|
}, jc = () => {
|
|
1916
|
-
const e =
|
|
1913
|
+
const e = L(), t = C();
|
|
1917
1914
|
return X({
|
|
1918
1915
|
mutationFn: async (n) => t(e, { action: E.APPLY_SCHEMA_TO_ALL_PAGES, data: { schemaId: n } }),
|
|
1919
1916
|
onSuccess: (n) => {
|
|
@@ -1926,7 +1923,7 @@ const Vi = ({
|
|
|
1926
1923
|
}
|
|
1927
1924
|
});
|
|
1928
1925
|
}, zc = () => {
|
|
1929
|
-
const e =
|
|
1926
|
+
const e = L(), t = C();
|
|
1930
1927
|
return X({
|
|
1931
1928
|
mutationFn: async (n) => t(e, { action: E.REMOVE_SCHEMA_FROM_ALL_PAGES, data: { schemaId: n } }),
|
|
1932
1929
|
onSuccess: (n) => {
|
|
@@ -1959,7 +1956,7 @@ const Vi = ({
|
|
|
1959
1956
|
}
|
|
1960
1957
|
}
|
|
1961
1958
|
}, lo = () => {
|
|
1962
|
-
const e =
|
|
1959
|
+
const e = L(), t = C();
|
|
1963
1960
|
return ae({
|
|
1964
1961
|
queryKey: ["uiLibraries"],
|
|
1965
1962
|
staleTime: "static",
|
|
@@ -1978,7 +1975,7 @@ const Vi = ({
|
|
|
1978
1975
|
}
|
|
1979
1976
|
});
|
|
1980
1977
|
}, co = () => {
|
|
1981
|
-
const e = Ss(), t =
|
|
1978
|
+
const e = Ss(), t = C(), { user: n } = Jt(), s = n == null ? void 0 : n.id;
|
|
1982
1979
|
return ae({
|
|
1983
1980
|
queryKey: [E.GET_ROLE_AND_PERMISSIONS, s],
|
|
1984
1981
|
queryFn: () => t(e, {
|
|
@@ -1989,7 +1986,7 @@ const Vi = ({
|
|
|
1989
1986
|
staleTime: 1 / 0
|
|
1990
1987
|
});
|
|
1991
1988
|
}, uo = () => {
|
|
1992
|
-
const e =
|
|
1989
|
+
const e = L(), t = C(), [, n] = Ln();
|
|
1993
1990
|
return { onSave: async ({
|
|
1994
1991
|
page: r,
|
|
1995
1992
|
blocks: a,
|
|
@@ -2009,7 +2006,7 @@ const Vi = ({
|
|
|
2009
2006
|
}
|
|
2010
2007
|
} };
|
|
2011
2008
|
}, fo = () => {
|
|
2012
|
-
const { data: e } = bs(), t =
|
|
2009
|
+
const { data: e } = bs(), t = L(), n = C();
|
|
2013
2010
|
return {
|
|
2014
2011
|
getPartialBlocks: j(async () => {
|
|
2015
2012
|
const s = {};
|
|
@@ -2037,13 +2034,13 @@ const Vi = ({
|
|
|
2037
2034
|
[n, t]
|
|
2038
2035
|
)
|
|
2039
2036
|
};
|
|
2040
|
-
}, ho = F(() => import("./ai-panel-content-
|
|
2037
|
+
}, ho = F(() => import("./ai-panel-content-DYRZnMgV.js")), ks = "chai-chat-panel", go = ({ className: e = "h-full w-full" }) => /* @__PURE__ */ l("svg", { className: e, viewBox: "0 0 256 256", fill: "currentColor", children: /* @__PURE__ */ l("path", { d: "m198.39 128.986-52.16-19.216-19.216-52.16a16 16 0 0 0-30.028 0L77.77 109.77l-52.16 19.216a16 16 0 0 0 0 30.028l52.16 19.216 19.216 52.16a16 16 0 0 0 30.028 0l19.216-52.16 52.16-19.216a16 16 0 0 0 0-30.028m-57.69 34.23a15.97 15.97 0 0 0-9.483 9.483l-19.22 52.152-19.214-52.15a15.97 15.97 0 0 0-9.482-9.484l-52.152-19.22 52.15-19.214a15.97 15.97 0 0 0 9.484-9.482l19.22-52.152 19.214 52.15a15.97 15.97 0 0 0 9.482 9.484l52.152 19.22ZM144 40a8 8 0 0 1 8-8h16V16a8 8 0 0 1 16 0v16h16a8 8 0 0 1 0 16h-16v16a8 8 0 0 1-16 0V48h-16a8 8 0 0 1-8-8m104 48a8 8 0 0 1-8 8h-8v8a8 8 0 0 1-16 0v-8h-8a8 8 0 0 1 0-16h8v-8a8 8 0 0 1 16 0v8h8a8 8 0 0 1 8 8" }) }), mo = ({ isActive: e, show: t }) => /* @__PURE__ */ l(U, { size: "icon", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ l(go, { className: "h-4 w-4" }) }), Eo = {
|
|
2041
2038
|
id: ks,
|
|
2042
2039
|
label: "AI Assistant",
|
|
2043
2040
|
button: mo,
|
|
2044
2041
|
panel: ho,
|
|
2045
2042
|
position: "top"
|
|
2046
|
-
}, po = F(() => import("./lang-panel-
|
|
2043
|
+
}, po = F(() => import("./lang-panel-Bj11IL7k.js")), yo = ({ isActive: e, show: t }) => {
|
|
2047
2044
|
const { data: n } = Re();
|
|
2048
2045
|
return !jt(n, "languages") || !V(n, "languages", []).length ? null : /* @__PURE__ */ l(U, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ l(Ka, { className: "h-4 w-4" }) });
|
|
2049
2046
|
}, Os = "lang", Ao = {
|
|
@@ -2054,7 +2051,7 @@ const Vi = ({
|
|
|
2054
2051
|
button: yo,
|
|
2055
2052
|
view: "modal",
|
|
2056
2053
|
width: 400
|
|
2057
|
-
}, To = F(() => import("./seo-panel-
|
|
2054
|
+
}, To = F(() => import("./seo-panel-BZlMea1L.js")), Ds = "seo", So = ({ isActive: e, show: t }) => {
|
|
2058
2055
|
const { data: n } = ie(), s = Ni(n == null ? void 0 : n.pageType);
|
|
2059
2056
|
return !jt(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ l(U, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
|
|
2060
2057
|
"svg",
|
|
@@ -2083,7 +2080,7 @@ const Vi = ({
|
|
|
2083
2080
|
width: 600,
|
|
2084
2081
|
view: "modal"
|
|
2085
2082
|
}, Gs = "user-info", Po = () => {
|
|
2086
|
-
const { t: e } =
|
|
2083
|
+
const { t: e } = _e(), { user: t, logout: n } = Jt(), s = oe("onLogout", ds);
|
|
2087
2084
|
return t ? /* @__PURE__ */ m(ia, { children: [
|
|
2088
2085
|
/* @__PURE__ */ l(oa, { asChild: !0, children: /* @__PURE__ */ l(U, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ l(Va, { className: "h-4 w-4" }) }) }),
|
|
2089
2086
|
/* @__PURE__ */ m(la, { className: "w-auto space-y-2 p-4", children: [
|
|
@@ -2141,24 +2138,24 @@ function rt(e) {
|
|
|
2141
2138
|
}
|
|
2142
2139
|
var xs = !1, bo = (e, t) => e === t, qt = Symbol("solid-proxy"), Rs = typeof Proxy == "function", Us = Symbol("solid-track"), Kt = {
|
|
2143
2140
|
equals: bo
|
|
2144
|
-
}, Bs = Qs,
|
|
2141
|
+
}, Bs = Qs, Pe = 1, Vt = 2, Ms = {
|
|
2145
2142
|
owned: null,
|
|
2146
2143
|
cleanups: null,
|
|
2147
2144
|
context: null,
|
|
2148
2145
|
owner: null
|
|
2149
|
-
},
|
|
2146
|
+
}, ln = {}, N = null, cn = null, Io = null, G = null, ee = null, Te = null, Xt = 0;
|
|
2150
2147
|
function Oe(e, t) {
|
|
2151
|
-
const n = G, s =
|
|
2148
|
+
const n = G, s = N, r = e.length === 0, a = t === void 0 ? s : t, i = r ? Ms : {
|
|
2152
2149
|
owned: null,
|
|
2153
2150
|
cleanups: null,
|
|
2154
2151
|
context: a ? a.context : null,
|
|
2155
2152
|
owner: a
|
|
2156
2153
|
}, o = r ? e : () => e(() => Z(() => ct(i)));
|
|
2157
|
-
|
|
2154
|
+
N = i, G = null;
|
|
2158
2155
|
try {
|
|
2159
2156
|
return me(o, !0);
|
|
2160
2157
|
} finally {
|
|
2161
|
-
G = n,
|
|
2158
|
+
G = n, N = s;
|
|
2162
2159
|
}
|
|
2163
2160
|
}
|
|
2164
2161
|
function q(e, t) {
|
|
@@ -2172,16 +2169,16 @@ function q(e, t) {
|
|
|
2172
2169
|
return [Vs.bind(n), s];
|
|
2173
2170
|
}
|
|
2174
2171
|
function Co(e, t, n) {
|
|
2175
|
-
const s = Zt(e, t, !0,
|
|
2172
|
+
const s = Zt(e, t, !0, Pe);
|
|
2176
2173
|
st(s);
|
|
2177
2174
|
}
|
|
2178
2175
|
function De(e, t, n) {
|
|
2179
|
-
const s = Zt(e, t, !1,
|
|
2176
|
+
const s = Zt(e, t, !1, Pe);
|
|
2180
2177
|
st(s);
|
|
2181
2178
|
}
|
|
2182
2179
|
function Fs(e, t, n) {
|
|
2183
2180
|
Bs = Uo;
|
|
2184
|
-
const s = Zt(e, t, !1,
|
|
2181
|
+
const s = Zt(e, t, !1, Pe);
|
|
2185
2182
|
(!n || !n.render) && (s.user = !0), Te ? Te.push(s) : st(s);
|
|
2186
2183
|
}
|
|
2187
2184
|
function J(e, t, n) {
|
|
@@ -2195,40 +2192,40 @@ function No(e) {
|
|
|
2195
2192
|
function Lo(e, t, n) {
|
|
2196
2193
|
let s, r, a;
|
|
2197
2194
|
s = !0, r = e, a = {};
|
|
2198
|
-
let i = null, o =
|
|
2199
|
-
const h = /* @__PURE__ */ new Set(), [g,
|
|
2195
|
+
let i = null, o = ln, c = null, u = !1, d = "initialValue" in a, f = typeof s == "function" && J(s);
|
|
2196
|
+
const h = /* @__PURE__ */ new Set(), [g, p] = (a.storage || q)(a.initialValue), [S, P] = q(void 0), [T, y] = q(void 0, {
|
|
2200
2197
|
equals: !1
|
|
2201
|
-
}), [
|
|
2198
|
+
}), [A, b] = q(d ? "ready" : "unresolved");
|
|
2202
2199
|
v.context && (c = v.getNextContextId(), a.ssrLoadFrom === "initial" ? o = a.initialValue : v.load && v.has(c) && (o = v.load(c)));
|
|
2203
|
-
function M(w,
|
|
2204
|
-
return i === w && (i = null, $ !== void 0 && (
|
|
2205
|
-
value:
|
|
2206
|
-
})), o =
|
|
2200
|
+
function M(w, I, Y, $) {
|
|
2201
|
+
return i === w && (i = null, $ !== void 0 && (d = !0), (w === o || I === o) && a.onHydrated && queueMicrotask(() => a.onHydrated($, {
|
|
2202
|
+
value: I
|
|
2203
|
+
})), o = ln, k(I, Y)), I;
|
|
2207
2204
|
}
|
|
2208
|
-
function
|
|
2205
|
+
function k(w, I) {
|
|
2209
2206
|
me(() => {
|
|
2210
|
-
|
|
2207
|
+
I === void 0 && p(() => w), b(I !== void 0 ? "errored" : d ? "ready" : "unresolved"), P(I);
|
|
2211
2208
|
for (const Y of h.keys()) Y.decrement();
|
|
2212
2209
|
h.clear();
|
|
2213
2210
|
}, !1);
|
|
2214
2211
|
}
|
|
2215
2212
|
function pe() {
|
|
2216
|
-
const w = Go,
|
|
2213
|
+
const w = Go, I = g(), Y = S();
|
|
2217
2214
|
if (Y !== void 0 && !i) throw Y;
|
|
2218
|
-
return G && G.user,
|
|
2215
|
+
return G && G.user, I;
|
|
2219
2216
|
}
|
|
2220
2217
|
function ye(w = !0) {
|
|
2221
2218
|
if (w !== !1 && u) return;
|
|
2222
2219
|
u = !1;
|
|
2223
|
-
const
|
|
2224
|
-
if (
|
|
2220
|
+
const I = f ? f() : s;
|
|
2221
|
+
if (I == null || I === !1) {
|
|
2225
2222
|
M(i, Z(g));
|
|
2226
2223
|
return;
|
|
2227
2224
|
}
|
|
2228
2225
|
let Y;
|
|
2229
|
-
const $ = o !==
|
|
2226
|
+
const $ = o !== ln ? o : Z(() => {
|
|
2230
2227
|
try {
|
|
2231
|
-
return r(
|
|
2228
|
+
return r(I, {
|
|
2232
2229
|
value: g(),
|
|
2233
2230
|
refetching: w
|
|
2234
2231
|
});
|
|
@@ -2237,40 +2234,40 @@ function Lo(e, t, n) {
|
|
|
2237
2234
|
}
|
|
2238
2235
|
});
|
|
2239
2236
|
if (Y !== void 0) {
|
|
2240
|
-
M(i, void 0, Rt(Y),
|
|
2237
|
+
M(i, void 0, Rt(Y), I);
|
|
2241
2238
|
return;
|
|
2242
2239
|
} else if (!No($))
|
|
2243
|
-
return M(i, $, void 0,
|
|
2244
|
-
return i = $, "v" in $ ? ($.s === 1 ? M(i, $.v, void 0,
|
|
2245
|
-
|
|
2246
|
-
}, !1), $.then((de) => M($, de, void 0,
|
|
2240
|
+
return M(i, $, void 0, I), $;
|
|
2241
|
+
return i = $, "v" in $ ? ($.s === 1 ? M(i, $.v, void 0, I) : M(i, void 0, Rt($.v), I), $) : (u = !0, queueMicrotask(() => u = !1), me(() => {
|
|
2242
|
+
b(d ? "refreshing" : "pending"), y();
|
|
2243
|
+
}, !1), $.then((de) => M($, de, void 0, I), (de) => M($, void 0, Rt(de), I)));
|
|
2247
2244
|
}
|
|
2248
2245
|
Object.defineProperties(pe, {
|
|
2249
2246
|
state: {
|
|
2250
|
-
get: () =>
|
|
2247
|
+
get: () => A()
|
|
2251
2248
|
},
|
|
2252
2249
|
error: {
|
|
2253
|
-
get: () =>
|
|
2250
|
+
get: () => S()
|
|
2254
2251
|
},
|
|
2255
2252
|
loading: {
|
|
2256
2253
|
get() {
|
|
2257
|
-
const w =
|
|
2254
|
+
const w = A();
|
|
2258
2255
|
return w === "pending" || w === "refreshing";
|
|
2259
2256
|
}
|
|
2260
2257
|
},
|
|
2261
2258
|
latest: {
|
|
2262
2259
|
get() {
|
|
2263
|
-
if (!
|
|
2264
|
-
const w =
|
|
2260
|
+
if (!d) return pe();
|
|
2261
|
+
const w = S();
|
|
2265
2262
|
if (w && !i) throw w;
|
|
2266
2263
|
return g();
|
|
2267
2264
|
}
|
|
2268
2265
|
}
|
|
2269
2266
|
});
|
|
2270
|
-
let B =
|
|
2271
|
-
return
|
|
2267
|
+
let B = N;
|
|
2268
|
+
return f ? Co(() => (B = N, ye(!1))) : ye(!1), [pe, {
|
|
2272
2269
|
refetch: (w) => qs(B, () => ye(w)),
|
|
2273
|
-
mutate:
|
|
2270
|
+
mutate: p
|
|
2274
2271
|
}];
|
|
2275
2272
|
}
|
|
2276
2273
|
function Wc(e) {
|
|
@@ -2305,28 +2302,28 @@ function ko(e) {
|
|
|
2305
2302
|
Fs(() => Z(e));
|
|
2306
2303
|
}
|
|
2307
2304
|
function lt(e) {
|
|
2308
|
-
return
|
|
2305
|
+
return N === null || (N.cleanups === null ? N.cleanups = [e] : N.cleanups.push(e)), e;
|
|
2309
2306
|
}
|
|
2310
2307
|
function Xn() {
|
|
2311
|
-
return
|
|
2308
|
+
return N;
|
|
2312
2309
|
}
|
|
2313
2310
|
function qs(e, t) {
|
|
2314
|
-
const n =
|
|
2315
|
-
|
|
2311
|
+
const n = N, s = G;
|
|
2312
|
+
N = e, G = null;
|
|
2316
2313
|
try {
|
|
2317
2314
|
return me(t, !0);
|
|
2318
2315
|
} catch (r) {
|
|
2319
|
-
|
|
2316
|
+
xn(r);
|
|
2320
2317
|
} finally {
|
|
2321
|
-
|
|
2318
|
+
N = n, G = s;
|
|
2322
2319
|
}
|
|
2323
2320
|
}
|
|
2324
2321
|
function Oo(e) {
|
|
2325
|
-
const t = G, n =
|
|
2322
|
+
const t = G, n = N;
|
|
2326
2323
|
return Promise.resolve().then(() => {
|
|
2327
|
-
G = t,
|
|
2324
|
+
G = t, N = n;
|
|
2328
2325
|
let s;
|
|
2329
|
-
return me(e, !1), G =
|
|
2326
|
+
return me(e, !1), G = N = null, s ? s.done : void 0;
|
|
2330
2327
|
});
|
|
2331
2328
|
}
|
|
2332
2329
|
var [Do, Jc] = /* @__PURE__ */ q(!1);
|
|
@@ -2343,10 +2340,10 @@ function Zc(e, t) {
|
|
|
2343
2340
|
}
|
|
2344
2341
|
function eu(e) {
|
|
2345
2342
|
let t;
|
|
2346
|
-
return
|
|
2343
|
+
return N && N.context && (t = N.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
2347
2344
|
}
|
|
2348
2345
|
function Ks(e) {
|
|
2349
|
-
const t = J(e), n = J(() =>
|
|
2346
|
+
const t = J(e), n = J(() => gn(t()));
|
|
2350
2347
|
return n.toArray = () => {
|
|
2351
2348
|
const s = n();
|
|
2352
2349
|
return Array.isArray(s) ? s : s != null ? [s] : [];
|
|
@@ -2355,7 +2352,7 @@ function Ks(e) {
|
|
|
2355
2352
|
var Go;
|
|
2356
2353
|
function Vs() {
|
|
2357
2354
|
if (this.sources && this.state)
|
|
2358
|
-
if (this.state ===
|
|
2355
|
+
if (this.state === Pe) st(this);
|
|
2359
2356
|
else {
|
|
2360
2357
|
const e = ee;
|
|
2361
2358
|
ee = null, me(() => Qt(this), !1), ee = e;
|
|
@@ -2370,8 +2367,8 @@ function Hs(e, t, n) {
|
|
|
2370
2367
|
let s = e.value;
|
|
2371
2368
|
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && me(() => {
|
|
2372
2369
|
for (let r = 0; r < e.observers.length; r += 1) {
|
|
2373
|
-
const a = e.observers[r], i =
|
|
2374
|
-
i &&
|
|
2370
|
+
const a = e.observers[r], i = cn && cn.running;
|
|
2371
|
+
i && cn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ee.push(a) : Te.push(a), a.observers && $s(a)), i || (a.state = Pe);
|
|
2375
2372
|
}
|
|
2376
2373
|
if (ee.length > 1e6)
|
|
2377
2374
|
throw ee = [], new Error();
|
|
@@ -2385,18 +2382,18 @@ function st(e) {
|
|
|
2385
2382
|
}
|
|
2386
2383
|
function xo(e, t, n) {
|
|
2387
2384
|
let s;
|
|
2388
|
-
const r =
|
|
2389
|
-
G =
|
|
2385
|
+
const r = N, a = G;
|
|
2386
|
+
G = N = e;
|
|
2390
2387
|
try {
|
|
2391
2388
|
s = e.fn(t);
|
|
2392
2389
|
} catch (i) {
|
|
2393
|
-
return e.pure && (e.state =
|
|
2390
|
+
return e.pure && (e.state = Pe, e.owned && e.owned.forEach(ct), e.owned = null), e.updatedAt = n + 1, xn(i);
|
|
2394
2391
|
} finally {
|
|
2395
|
-
G = a,
|
|
2392
|
+
G = a, N = r;
|
|
2396
2393
|
}
|
|
2397
2394
|
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Hs(e, s) : e.value = s, e.updatedAt = n);
|
|
2398
2395
|
}
|
|
2399
|
-
function Zt(e, t, n, s =
|
|
2396
|
+
function Zt(e, t, n, s = Pe, r) {
|
|
2400
2397
|
const a = {
|
|
2401
2398
|
fn: e,
|
|
2402
2399
|
state: s,
|
|
@@ -2406,11 +2403,11 @@ function Zt(e, t, n, s = _e, r) {
|
|
|
2406
2403
|
sourceSlots: null,
|
|
2407
2404
|
cleanups: null,
|
|
2408
2405
|
value: t,
|
|
2409
|
-
owner:
|
|
2410
|
-
context:
|
|
2406
|
+
owner: N,
|
|
2407
|
+
context: N ? N.context : null,
|
|
2411
2408
|
pure: n
|
|
2412
2409
|
};
|
|
2413
|
-
return
|
|
2410
|
+
return N === null || N !== Ms && (N.owned ? N.owned.push(a) : N.owned = [a]), a;
|
|
2414
2411
|
}
|
|
2415
2412
|
function Ht(e) {
|
|
2416
2413
|
if (e.state === 0) return;
|
|
@@ -2420,7 +2417,7 @@ function Ht(e) {
|
|
|
2420
2417
|
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < Xt); )
|
|
2421
2418
|
e.state && t.push(e);
|
|
2422
2419
|
for (let n = t.length - 1; n >= 0; n--)
|
|
2423
|
-
if (e = t[n], e.state ===
|
|
2420
|
+
if (e = t[n], e.state === Pe)
|
|
2424
2421
|
st(e);
|
|
2425
2422
|
else if (e.state === Vt) {
|
|
2426
2423
|
const s = ee;
|
|
@@ -2435,7 +2432,7 @@ function me(e, t) {
|
|
|
2435
2432
|
const s = e();
|
|
2436
2433
|
return Ro(n), s;
|
|
2437
2434
|
} catch (s) {
|
|
2438
|
-
n || (Te = null), ee = null,
|
|
2435
|
+
n || (Te = null), ee = null, xn(s);
|
|
2439
2436
|
}
|
|
2440
2437
|
}
|
|
2441
2438
|
function Ro(e) {
|
|
@@ -2467,7 +2464,7 @@ function Qt(e, t) {
|
|
|
2467
2464
|
const s = e.sources[n];
|
|
2468
2465
|
if (s.sources) {
|
|
2469
2466
|
const r = s.state;
|
|
2470
|
-
r ===
|
|
2467
|
+
r === Pe ? s !== t && (!s.updatedAt || s.updatedAt < Xt) && Ht(s) : r === Vt && Qt(s, t);
|
|
2471
2468
|
}
|
|
2472
2469
|
}
|
|
2473
2470
|
}
|
|
@@ -2506,15 +2503,15 @@ function Rt(e) {
|
|
|
2506
2503
|
cause: e
|
|
2507
2504
|
});
|
|
2508
2505
|
}
|
|
2509
|
-
function
|
|
2506
|
+
function xn(e, t = N) {
|
|
2510
2507
|
throw Rt(e);
|
|
2511
2508
|
}
|
|
2512
|
-
function
|
|
2513
|
-
if (typeof e == "function" && !e.length) return
|
|
2509
|
+
function gn(e) {
|
|
2510
|
+
if (typeof e == "function" && !e.length) return gn(e());
|
|
2514
2511
|
if (Array.isArray(e)) {
|
|
2515
2512
|
const t = [];
|
|
2516
2513
|
for (let n = 0; n < e.length; n++) {
|
|
2517
|
-
const s =
|
|
2514
|
+
const s = gn(e[n]);
|
|
2518
2515
|
Array.isArray(s) ? t.push.apply(t, s) : t.push(s);
|
|
2519
2516
|
}
|
|
2520
2517
|
return t;
|
|
@@ -2524,68 +2521,68 @@ function mn(e) {
|
|
|
2524
2521
|
function Bo(e, t) {
|
|
2525
2522
|
return function(s) {
|
|
2526
2523
|
let r;
|
|
2527
|
-
return De(() => r = Z(() => (
|
|
2528
|
-
...
|
|
2524
|
+
return De(() => r = Z(() => (N.context = {
|
|
2525
|
+
...N.context,
|
|
2529
2526
|
[e]: s.value
|
|
2530
2527
|
}, Ks(() => s.children))), void 0), r;
|
|
2531
2528
|
};
|
|
2532
2529
|
}
|
|
2533
|
-
var
|
|
2530
|
+
var mn = Symbol("fallback");
|
|
2534
2531
|
function $t(e) {
|
|
2535
2532
|
for (let t = 0; t < e.length; t++) e[t]();
|
|
2536
2533
|
}
|
|
2537
2534
|
function Mo(e, t, n = {}) {
|
|
2538
2535
|
let s = [], r = [], a = [], i = 0, o = t.length > 1 ? [] : null;
|
|
2539
2536
|
return lt(() => $t(a)), () => {
|
|
2540
|
-
let c = e() || [], u = c.length,
|
|
2537
|
+
let c = e() || [], u = c.length, d, f;
|
|
2541
2538
|
return c[Us], Z(() => {
|
|
2542
|
-
let g,
|
|
2539
|
+
let g, p, S, P, T, y, A, b, M;
|
|
2543
2540
|
if (u === 0)
|
|
2544
|
-
i !== 0 && ($t(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [
|
|
2541
|
+
i !== 0 && ($t(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [mn], r[0] = Oe((k) => (a[0] = k, n.fallback())), i = 1);
|
|
2545
2542
|
else if (i === 0) {
|
|
2546
|
-
for (r = new Array(u),
|
|
2547
|
-
s[
|
|
2543
|
+
for (r = new Array(u), f = 0; f < u; f++)
|
|
2544
|
+
s[f] = c[f], r[f] = Oe(h);
|
|
2548
2545
|
i = u;
|
|
2549
2546
|
} else {
|
|
2550
|
-
for (
|
|
2551
|
-
for (
|
|
2552
|
-
|
|
2553
|
-
for (g = /* @__PURE__ */ new Map(),
|
|
2554
|
-
M = c[
|
|
2555
|
-
for (
|
|
2556
|
-
M = s[
|
|
2557
|
-
for (
|
|
2558
|
-
|
|
2547
|
+
for (S = new Array(u), P = new Array(u), o && (T = new Array(u)), y = 0, A = Math.min(i, u); y < A && s[y] === c[y]; y++) ;
|
|
2548
|
+
for (A = i - 1, b = u - 1; A >= y && b >= y && s[A] === c[b]; A--, b--)
|
|
2549
|
+
S[b] = r[A], P[b] = a[A], o && (T[b] = o[A]);
|
|
2550
|
+
for (g = /* @__PURE__ */ new Map(), p = new Array(b + 1), f = b; f >= y; f--)
|
|
2551
|
+
M = c[f], d = g.get(M), p[f] = d === void 0 ? -1 : d, g.set(M, f);
|
|
2552
|
+
for (d = y; d <= A; d++)
|
|
2553
|
+
M = s[d], f = g.get(M), f !== void 0 && f !== -1 ? (S[f] = r[d], P[f] = a[d], o && (T[f] = o[d]), f = p[f], g.set(M, f)) : a[d]();
|
|
2554
|
+
for (f = y; f < u; f++)
|
|
2555
|
+
f in S ? (r[f] = S[f], a[f] = P[f], o && (o[f] = T[f], o[f](f))) : r[f] = Oe(h);
|
|
2559
2556
|
r = r.slice(0, i = u), s = c.slice(0);
|
|
2560
2557
|
}
|
|
2561
2558
|
return r;
|
|
2562
2559
|
});
|
|
2563
2560
|
function h(g) {
|
|
2564
|
-
if (a[
|
|
2565
|
-
const [
|
|
2566
|
-
return o[
|
|
2561
|
+
if (a[f] = g, o) {
|
|
2562
|
+
const [p, S] = q(f);
|
|
2563
|
+
return o[f] = S, t(c[f], p);
|
|
2567
2564
|
}
|
|
2568
|
-
return t(c[
|
|
2565
|
+
return t(c[f]);
|
|
2569
2566
|
}
|
|
2570
2567
|
};
|
|
2571
2568
|
}
|
|
2572
2569
|
function Fo(e, t, n = {}) {
|
|
2573
2570
|
let s = [], r = [], a = [], i = [], o = 0, c;
|
|
2574
2571
|
return lt(() => $t(a)), () => {
|
|
2575
|
-
const u = e() || [],
|
|
2572
|
+
const u = e() || [], d = u.length;
|
|
2576
2573
|
return u[Us], Z(() => {
|
|
2577
|
-
if (
|
|
2578
|
-
return o !== 0 && ($t(a), a = [], s = [], r = [], o = 0, i = []), n.fallback && (s = [
|
|
2579
|
-
for (s[0] ===
|
|
2580
|
-
c < s.length && s[c] !== u[c] ? i[c](() => u[c]) : c >= s.length && (r[c] = Oe(
|
|
2574
|
+
if (d === 0)
|
|
2575
|
+
return o !== 0 && ($t(a), a = [], s = [], r = [], o = 0, i = []), n.fallback && (s = [mn], r[0] = Oe((h) => (a[0] = h, n.fallback())), o = 1), r;
|
|
2576
|
+
for (s[0] === mn && (a[0](), a = [], s = [], r = [], o = 0), c = 0; c < d; c++)
|
|
2577
|
+
c < s.length && s[c] !== u[c] ? i[c](() => u[c]) : c >= s.length && (r[c] = Oe(f));
|
|
2581
2578
|
for (; c < s.length; c++)
|
|
2582
2579
|
a[c]();
|
|
2583
|
-
return o = i.length = a.length =
|
|
2580
|
+
return o = i.length = a.length = d, s = u.slice(0), r = r.slice(0, o);
|
|
2584
2581
|
});
|
|
2585
|
-
function
|
|
2582
|
+
function f(h) {
|
|
2586
2583
|
a[c] = h;
|
|
2587
|
-
const [g,
|
|
2588
|
-
return i[c] =
|
|
2584
|
+
const [g, p] = q(u[c]);
|
|
2585
|
+
return i[c] = p, t(g, c);
|
|
2589
2586
|
}
|
|
2590
2587
|
};
|
|
2591
2588
|
}
|
|
@@ -2595,7 +2592,7 @@ function js(e, t) {
|
|
|
2595
2592
|
function kt() {
|
|
2596
2593
|
return !0;
|
|
2597
2594
|
}
|
|
2598
|
-
var
|
|
2595
|
+
var En = {
|
|
2599
2596
|
get(e, t, n) {
|
|
2600
2597
|
return t === qt ? n : e.get(t);
|
|
2601
2598
|
},
|
|
@@ -2619,7 +2616,7 @@ var pn = {
|
|
|
2619
2616
|
return e.keys();
|
|
2620
2617
|
}
|
|
2621
2618
|
};
|
|
2622
|
-
function
|
|
2619
|
+
function un(e) {
|
|
2623
2620
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
2624
2621
|
}
|
|
2625
2622
|
function qo() {
|
|
@@ -2638,39 +2635,39 @@ function zs(...e) {
|
|
|
2638
2635
|
return new Proxy({
|
|
2639
2636
|
get(i) {
|
|
2640
2637
|
for (let o = e.length - 1; o >= 0; o--) {
|
|
2641
|
-
const c =
|
|
2638
|
+
const c = un(e[o])[i];
|
|
2642
2639
|
if (c !== void 0) return c;
|
|
2643
2640
|
}
|
|
2644
2641
|
},
|
|
2645
2642
|
has(i) {
|
|
2646
2643
|
for (let o = e.length - 1; o >= 0; o--)
|
|
2647
|
-
if (i in
|
|
2644
|
+
if (i in un(e[o])) return !0;
|
|
2648
2645
|
return !1;
|
|
2649
2646
|
},
|
|
2650
2647
|
keys() {
|
|
2651
2648
|
const i = [];
|
|
2652
|
-
for (let o = 0; o < e.length; o++) i.push(...Object.keys(
|
|
2649
|
+
for (let o = 0; o < e.length; o++) i.push(...Object.keys(un(e[o])));
|
|
2653
2650
|
return [...new Set(i)];
|
|
2654
2651
|
}
|
|
2655
|
-
},
|
|
2652
|
+
}, En);
|
|
2656
2653
|
const n = {}, s = /* @__PURE__ */ Object.create(null);
|
|
2657
2654
|
for (let i = e.length - 1; i >= 0; i--) {
|
|
2658
2655
|
const o = e[i];
|
|
2659
2656
|
if (!o) continue;
|
|
2660
2657
|
const c = Object.getOwnPropertyNames(o);
|
|
2661
2658
|
for (let u = c.length - 1; u >= 0; u--) {
|
|
2662
|
-
const
|
|
2663
|
-
if (
|
|
2664
|
-
const
|
|
2665
|
-
if (!s[
|
|
2666
|
-
s[
|
|
2659
|
+
const d = c[u];
|
|
2660
|
+
if (d === "__proto__" || d === "constructor") continue;
|
|
2661
|
+
const f = Object.getOwnPropertyDescriptor(o, d);
|
|
2662
|
+
if (!s[d])
|
|
2663
|
+
s[d] = f.get ? {
|
|
2667
2664
|
enumerable: !0,
|
|
2668
2665
|
configurable: !0,
|
|
2669
|
-
get: qo.bind(n[
|
|
2670
|
-
} :
|
|
2666
|
+
get: qo.bind(n[d] = [f.get.bind(o)])
|
|
2667
|
+
} : f.value !== void 0 ? f : void 0;
|
|
2671
2668
|
else {
|
|
2672
|
-
const h = n[
|
|
2673
|
-
h && (
|
|
2669
|
+
const h = n[d];
|
|
2670
|
+
h && (f.get ? h.push(f.get.bind(o)) : f.value !== void 0 && h.push(() => f.value));
|
|
2674
2671
|
}
|
|
2675
2672
|
}
|
|
2676
2673
|
}
|
|
@@ -2693,7 +2690,7 @@ function Ko(e, ...t) {
|
|
|
2693
2690
|
keys() {
|
|
2694
2691
|
return i.filter((o) => o in e);
|
|
2695
2692
|
}
|
|
2696
|
-
},
|
|
2693
|
+
}, En));
|
|
2697
2694
|
return a.push(new Proxy({
|
|
2698
2695
|
get(i) {
|
|
2699
2696
|
return r.has(i) ? void 0 : e[i];
|
|
@@ -2704,7 +2701,7 @@ function Ko(e, ...t) {
|
|
|
2704
2701
|
keys() {
|
|
2705
2702
|
return Object.keys(e).filter((i) => !r.has(i));
|
|
2706
2703
|
}
|
|
2707
|
-
},
|
|
2704
|
+
}, En)), a;
|
|
2708
2705
|
}
|
|
2709
2706
|
const n = {}, s = t.map(() => ({}));
|
|
2710
2707
|
for (const r of Object.getOwnPropertyNames(e)) {
|
|
@@ -2779,10 +2776,10 @@ function au(e) {
|
|
|
2779
2776
|
let a = () => {
|
|
2780
2777
|
};
|
|
2781
2778
|
for (let i = 0; i < r.length; i++) {
|
|
2782
|
-
const o = i, c = r[i], u = a,
|
|
2779
|
+
const o = i, c = r[i], u = a, d = J(() => u() ? void 0 : c.when, void 0, void 0), f = c.keyed ? d : J(d, void 0, {
|
|
2783
2780
|
equals: (h, g) => !h == !g
|
|
2784
2781
|
});
|
|
2785
|
-
a = () => u() || (
|
|
2782
|
+
a = () => u() || (f() ? [o, d, c] : void 0);
|
|
2786
2783
|
}
|
|
2787
2784
|
return a;
|
|
2788
2785
|
});
|
|
@@ -2928,29 +2925,29 @@ function Zo(e, t, n) {
|
|
|
2928
2925
|
for (; t[r - 1] === n[a - 1]; )
|
|
2929
2926
|
r--, a--;
|
|
2930
2927
|
if (r === i) {
|
|
2931
|
-
const
|
|
2932
|
-
for (; o < a; ) e.insertBefore(n[o++],
|
|
2928
|
+
const d = a < s ? o ? n[o - 1].nextSibling : n[a - o] : c;
|
|
2929
|
+
for (; o < a; ) e.insertBefore(n[o++], d);
|
|
2933
2930
|
} else if (a === o)
|
|
2934
2931
|
for (; i < r; )
|
|
2935
2932
|
(!u || !u.has(t[i])) && t[i].remove(), i++;
|
|
2936
2933
|
else if (t[i] === n[a - 1] && n[o] === t[r - 1]) {
|
|
2937
|
-
const
|
|
2938
|
-
e.insertBefore(n[o++], t[i++].nextSibling), e.insertBefore(n[--a],
|
|
2934
|
+
const d = t[--r].nextSibling;
|
|
2935
|
+
e.insertBefore(n[o++], t[i++].nextSibling), e.insertBefore(n[--a], d), t[r] = n[a];
|
|
2939
2936
|
} else {
|
|
2940
2937
|
if (!u) {
|
|
2941
2938
|
u = /* @__PURE__ */ new Map();
|
|
2942
|
-
let
|
|
2943
|
-
for (;
|
|
2939
|
+
let f = o;
|
|
2940
|
+
for (; f < a; ) u.set(n[f], f++);
|
|
2944
2941
|
}
|
|
2945
|
-
const
|
|
2946
|
-
if (
|
|
2947
|
-
if (o <
|
|
2948
|
-
let
|
|
2949
|
-
for (; ++
|
|
2942
|
+
const d = u.get(t[i]);
|
|
2943
|
+
if (d != null)
|
|
2944
|
+
if (o < d && d < a) {
|
|
2945
|
+
let f = i, h = 1, g;
|
|
2946
|
+
for (; ++f < r && f < a && !((g = u.get(t[f])) == null || g !== d + h); )
|
|
2950
2947
|
h++;
|
|
2951
|
-
if (h >
|
|
2952
|
-
const
|
|
2953
|
-
for (; o <
|
|
2948
|
+
if (h > d - o) {
|
|
2949
|
+
const p = t[i];
|
|
2950
|
+
for (; o < d; ) e.insertBefore(n[o++], p);
|
|
2954
2951
|
} else e.replaceChild(n[o++], t[i++]);
|
|
2955
2952
|
} else i++;
|
|
2956
2953
|
else t[i++].remove();
|
|
@@ -2961,7 +2958,7 @@ var it = "_$DX_DELEGATE";
|
|
|
2961
2958
|
function Js(e, t, n, s = {}) {
|
|
2962
2959
|
let r;
|
|
2963
2960
|
return Oe((a) => {
|
|
2964
|
-
r = a, t === document ? e() :
|
|
2961
|
+
r = a, t === document ? e() : yn(t, e(), t.firstChild ? null : void 0, n);
|
|
2965
2962
|
}, s.owner), () => {
|
|
2966
2963
|
r(), t.textContent = "";
|
|
2967
2964
|
};
|
|
@@ -2987,7 +2984,7 @@ function cu(e = window.document) {
|
|
|
2987
2984
|
delete e[it];
|
|
2988
2985
|
}
|
|
2989
2986
|
}
|
|
2990
|
-
function
|
|
2987
|
+
function pn(e, t, n) {
|
|
2991
2988
|
Ue(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
2992
2989
|
}
|
|
2993
2990
|
function tl(e, t, n, s) {
|
|
@@ -3021,7 +3018,7 @@ function al(e, t, n = {}) {
|
|
|
3021
3018
|
return n;
|
|
3022
3019
|
}
|
|
3023
3020
|
function il(e, t, n) {
|
|
3024
|
-
if (!t) return n ?
|
|
3021
|
+
if (!t) return n ? pn(e, "style") : t;
|
|
3025
3022
|
const s = e.style;
|
|
3026
3023
|
if (typeof t == "string") return s.cssText = t;
|
|
3027
3024
|
typeof n == "string" && (s.cssText = n = void 0), n || (n = {}), t || (t = {});
|
|
@@ -3039,7 +3036,7 @@ function ol(e, t = {}, n, s) {
|
|
|
3039
3036
|
function ll(e, t, n) {
|
|
3040
3037
|
return Z(() => e(t, n));
|
|
3041
3038
|
}
|
|
3042
|
-
function
|
|
3039
|
+
function yn(e, t, n, s) {
|
|
3043
3040
|
if (n !== void 0 && !s && (s = []), typeof t != "function") return ut(e, t, s, n);
|
|
3044
3041
|
De((r) => ut(e, t(), r, n), s);
|
|
3045
3042
|
}
|
|
@@ -3072,7 +3069,7 @@ function Zn(e, t, n) {
|
|
|
3072
3069
|
for (let r = 0, a = s.length; r < a; r++) e.classList.toggle(s[r], n);
|
|
3073
3070
|
}
|
|
3074
3071
|
function es(e, t, n, s, r, a, i) {
|
|
3075
|
-
let o, c, u,
|
|
3072
|
+
let o, c, u, d, f;
|
|
3076
3073
|
if (t === "style") return il(e, n, s);
|
|
3077
3074
|
if (t === "classList") return al(e, n, s);
|
|
3078
3075
|
if (n === s) return s;
|
|
@@ -3087,22 +3084,22 @@ function es(e, t, n, s, r, a, i) {
|
|
|
3087
3084
|
} else if (t.slice(0, 2) === "on") {
|
|
3088
3085
|
const h = t.slice(2).toLowerCase(), g = Yo.has(h);
|
|
3089
3086
|
if (!g && s) {
|
|
3090
|
-
const
|
|
3091
|
-
e.removeEventListener(h,
|
|
3087
|
+
const p = Array.isArray(s) ? s[0] : s;
|
|
3088
|
+
e.removeEventListener(h, p);
|
|
3092
3089
|
}
|
|
3093
3090
|
(g || n) && (rl(e, h, n, g), g && el([h]));
|
|
3094
3091
|
} else if (t.slice(0, 5) === "attr:")
|
|
3095
|
-
|
|
3092
|
+
pn(e, t.slice(5), n);
|
|
3096
3093
|
else if (t.slice(0, 5) === "bool:")
|
|
3097
3094
|
nl(e, t.slice(5), n);
|
|
3098
|
-
else if ((
|
|
3099
|
-
if (
|
|
3095
|
+
else if ((f = t.slice(0, 5) === "prop:") || (u = $o.has(t)) || !r && ((d = Wo(t, e.tagName)) || (c = Qo.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
|
|
3096
|
+
if (f)
|
|
3100
3097
|
t = t.slice(5), c = !0;
|
|
3101
3098
|
else if (Ue(e)) return n;
|
|
3102
|
-
t === "class" || t === "className" ? sl(e, n) : o && !c && !u ? e[dl(t)] = n : e[
|
|
3099
|
+
t === "class" || t === "className" ? sl(e, n) : o && !c && !u ? e[dl(t)] = n : e[d || t] = n;
|
|
3103
3100
|
} else {
|
|
3104
3101
|
const h = r && t.indexOf(":") > -1 && Xo[t.split(":")[0]];
|
|
3105
|
-
h ? tl(e, h, t, n) :
|
|
3102
|
+
h ? tl(e, h, t, n) : pn(e, jo[t] || t, n);
|
|
3106
3103
|
}
|
|
3107
3104
|
return n;
|
|
3108
3105
|
}
|
|
@@ -3148,8 +3145,8 @@ function ut(e, t, n, s, r) {
|
|
|
3148
3145
|
!n && (n = [...e.childNodes]);
|
|
3149
3146
|
let c = [];
|
|
3150
3147
|
for (let u = 0; u < n.length; u++) {
|
|
3151
|
-
const
|
|
3152
|
-
|
|
3148
|
+
const d = n[u];
|
|
3149
|
+
d.nodeType === 8 && d.data.slice(0, 2) === "!$" ? d.remove() : c.push(d);
|
|
3153
3150
|
}
|
|
3154
3151
|
n = c;
|
|
3155
3152
|
}
|
|
@@ -3176,16 +3173,16 @@ function ut(e, t, n, s, r) {
|
|
|
3176
3173
|
}), () => n;
|
|
3177
3174
|
if (Array.isArray(t)) {
|
|
3178
3175
|
const c = [], u = n && Array.isArray(n);
|
|
3179
|
-
if (
|
|
3176
|
+
if (An(c, t, n, r))
|
|
3180
3177
|
return De(() => n = ut(e, c, n, s, !0)), () => n;
|
|
3181
3178
|
if (a) {
|
|
3182
3179
|
if (!c.length) return n;
|
|
3183
3180
|
if (s === void 0) return n = [...e.childNodes];
|
|
3184
|
-
let
|
|
3185
|
-
if (
|
|
3186
|
-
const
|
|
3187
|
-
for (; (
|
|
3188
|
-
return n =
|
|
3181
|
+
let d = c[0];
|
|
3182
|
+
if (d.parentNode !== e) return n;
|
|
3183
|
+
const f = [d];
|
|
3184
|
+
for (; (d = d.nextSibling) !== s; ) f.push(d);
|
|
3185
|
+
return n = f;
|
|
3189
3186
|
}
|
|
3190
3187
|
if (c.length === 0) {
|
|
3191
3188
|
if (n = Me(e, n, s), o) return n;
|
|
@@ -3202,23 +3199,23 @@ function ut(e, t, n, s, r) {
|
|
|
3202
3199
|
}
|
|
3203
3200
|
return n;
|
|
3204
3201
|
}
|
|
3205
|
-
function
|
|
3202
|
+
function An(e, t, n, s) {
|
|
3206
3203
|
let r = !1;
|
|
3207
3204
|
for (let a = 0, i = t.length; a < i; a++) {
|
|
3208
3205
|
let o = t[a], c = n && n[e.length], u;
|
|
3209
3206
|
if (!(o == null || o === !0 || o === !1)) if ((u = typeof o) == "object" && o.nodeType)
|
|
3210
3207
|
e.push(o);
|
|
3211
3208
|
else if (Array.isArray(o))
|
|
3212
|
-
r =
|
|
3209
|
+
r = An(e, o, c) || r;
|
|
3213
3210
|
else if (u === "function")
|
|
3214
3211
|
if (s) {
|
|
3215
3212
|
for (; typeof o == "function"; ) o = o();
|
|
3216
|
-
r =
|
|
3213
|
+
r = An(e, Array.isArray(o) ? o : [o], Array.isArray(c) ? c : [c]) || r;
|
|
3217
3214
|
} else
|
|
3218
3215
|
e.push(o), r = !0;
|
|
3219
3216
|
else {
|
|
3220
|
-
const
|
|
3221
|
-
c && c.nodeType === 3 && c.data ===
|
|
3217
|
+
const d = String(o);
|
|
3218
|
+
c && c.nodeType === 3 && c.data === d ? e.push(c) : e.push(document.createTextNode(d));
|
|
3222
3219
|
}
|
|
3223
3220
|
}
|
|
3224
3221
|
return r;
|
|
@@ -3257,8 +3254,8 @@ function uu(e) {
|
|
|
3257
3254
|
i && (Xn().user = i = !1), a || (a = qs(r, () => J(() => e.children)));
|
|
3258
3255
|
const o = s();
|
|
3259
3256
|
if (o instanceof HTMLHeadElement) {
|
|
3260
|
-
const [c, u] = q(!1),
|
|
3261
|
-
Oe((
|
|
3257
|
+
const [c, u] = q(!1), d = () => u(!0);
|
|
3258
|
+
Oe((f) => yn(o, () => c() ? f() : a(), null)), lt(d);
|
|
3262
3259
|
} else {
|
|
3263
3260
|
const c = Zs(e.isSVG ? "g" : "div", e.isSVG), u = t && c.attachShadow ? c.attachShadow({
|
|
3264
3261
|
mode: "open"
|
|
@@ -3268,7 +3265,7 @@ function uu(e) {
|
|
|
3268
3265
|
return n.parentNode;
|
|
3269
3266
|
},
|
|
3270
3267
|
configurable: !0
|
|
3271
|
-
}),
|
|
3268
|
+
}), yn(u, a), o.appendChild(c), e.ref && e.ref(c), lt(() => o.removeChild(c));
|
|
3272
3269
|
}
|
|
3273
3270
|
}, void 0, {
|
|
3274
3271
|
render: !i
|
|
@@ -3379,7 +3376,7 @@ var Al = class {
|
|
|
3379
3376
|
findByName(e) {
|
|
3380
3377
|
return this.transfomers[e];
|
|
3381
3378
|
}
|
|
3382
|
-
}, Tl = (e) => Object.prototype.toString.call(e).slice(8, -1), tr = (e) => typeof e > "u", Sl = (e) => e === null, dt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype,
|
|
3379
|
+
}, Tl = (e) => Object.prototype.toString.call(e).slice(8, -1), tr = (e) => typeof e > "u", Sl = (e) => e === null, dt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, Tn = (e) => dt(e) && Object.keys(e).length === 0, we = (e) => Array.isArray(e), _l = (e) => typeof e == "string", Pl = (e) => typeof e == "number" && !isNaN(e), vl = (e) => typeof e == "boolean", wl = (e) => e instanceof RegExp, ft = (e) => e instanceof Map, ht = (e) => e instanceof Set, nr = (e) => Tl(e) === "Symbol", bl = (e) => e instanceof Date && !isNaN(e.valueOf()), Il = (e) => e instanceof Error, ss = (e) => typeof e == "number" && isNaN(e), Cl = (e) => vl(e) || Sl(e) || tr(e) || Pl(e) || _l(e) || nr(e), Nl = (e) => typeof e == "bigint", Ll = (e) => e === 1 / 0 || e === -1 / 0, kl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Ol = (e) => e instanceof URL, sr = (e) => e.replace(/\./g, "\\."), dn = (e) => e.map(String).map(sr).join("."), ot = (e) => {
|
|
3383
3380
|
const t = [];
|
|
3384
3381
|
let n = "";
|
|
3385
3382
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -3509,7 +3506,7 @@ rr.forEach((e) => {
|
|
|
3509
3506
|
ur[e.annotation] = e;
|
|
3510
3507
|
});
|
|
3511
3508
|
var xl = (e, t, n) => {
|
|
3512
|
-
if (
|
|
3509
|
+
if (we(t))
|
|
3513
3510
|
switch (t[0]) {
|
|
3514
3511
|
case "symbol":
|
|
3515
3512
|
return ar.untransform(e, t, n);
|
|
@@ -3564,13 +3561,13 @@ var Rl = (e, t) => {
|
|
|
3564
3561
|
e = e[s];
|
|
3565
3562
|
}
|
|
3566
3563
|
return e;
|
|
3567
|
-
},
|
|
3564
|
+
}, Sn = (e, t, n) => {
|
|
3568
3565
|
if (dr(t), t.length === 0)
|
|
3569
3566
|
return n(e);
|
|
3570
3567
|
let s = e;
|
|
3571
3568
|
for (let a = 0; a < t.length - 1; a++) {
|
|
3572
3569
|
const i = t[a];
|
|
3573
|
-
if (
|
|
3570
|
+
if (we(s)) {
|
|
3574
3571
|
const o = +i;
|
|
3575
3572
|
s = s[o];
|
|
3576
3573
|
} else if (dt(s))
|
|
@@ -3581,19 +3578,19 @@ var Rl = (e, t) => {
|
|
|
3581
3578
|
} else if (ft(s)) {
|
|
3582
3579
|
if (a === t.length - 2)
|
|
3583
3580
|
break;
|
|
3584
|
-
const c = +i, u = +t[++a] == 0 ? "key" : "value",
|
|
3581
|
+
const c = +i, u = +t[++a] == 0 ? "key" : "value", d = Fe(s, c);
|
|
3585
3582
|
switch (u) {
|
|
3586
3583
|
case "key":
|
|
3587
|
-
s =
|
|
3584
|
+
s = d;
|
|
3588
3585
|
break;
|
|
3589
3586
|
case "value":
|
|
3590
|
-
s = s.get(
|
|
3587
|
+
s = s.get(d);
|
|
3591
3588
|
break;
|
|
3592
3589
|
}
|
|
3593
3590
|
}
|
|
3594
3591
|
}
|
|
3595
3592
|
const r = t[t.length - 1];
|
|
3596
|
-
if (
|
|
3593
|
+
if (we(s) ? s[+r] = n(s[+r]) : dt(s) && (s[r] = n(s[r])), ht(s)) {
|
|
3597
3594
|
const a = Fe(s, +r), i = n(a);
|
|
3598
3595
|
a !== i && (s.delete(a), s.add(i));
|
|
3599
3596
|
}
|
|
@@ -3613,40 +3610,40 @@ var Rl = (e, t) => {
|
|
|
3613
3610
|
}
|
|
3614
3611
|
return e;
|
|
3615
3612
|
};
|
|
3616
|
-
function
|
|
3613
|
+
function _n(e, t, n = []) {
|
|
3617
3614
|
if (!e)
|
|
3618
3615
|
return;
|
|
3619
|
-
if (!
|
|
3620
|
-
nt(e, (a, i) =>
|
|
3616
|
+
if (!we(e)) {
|
|
3617
|
+
nt(e, (a, i) => _n(a, t, [...n, ...ot(i)]));
|
|
3621
3618
|
return;
|
|
3622
3619
|
}
|
|
3623
3620
|
const [s, r] = e;
|
|
3624
3621
|
r && nt(r, (a, i) => {
|
|
3625
|
-
|
|
3622
|
+
_n(a, t, [...n, ...ot(i)]);
|
|
3626
3623
|
}), t(s, n);
|
|
3627
3624
|
}
|
|
3628
3625
|
function Ul(e, t, n) {
|
|
3629
|
-
return
|
|
3630
|
-
e =
|
|
3626
|
+
return _n(t, (s, r) => {
|
|
3627
|
+
e = Sn(e, r, (a) => xl(a, s, n));
|
|
3631
3628
|
}), e;
|
|
3632
3629
|
}
|
|
3633
3630
|
function Bl(e, t) {
|
|
3634
3631
|
function n(s, r) {
|
|
3635
3632
|
const a = Rl(e, ot(r));
|
|
3636
3633
|
s.map(ot).forEach((i) => {
|
|
3637
|
-
e =
|
|
3634
|
+
e = Sn(e, i, () => a);
|
|
3638
3635
|
});
|
|
3639
3636
|
}
|
|
3640
|
-
if (
|
|
3637
|
+
if (we(t)) {
|
|
3641
3638
|
const [s, r] = t;
|
|
3642
3639
|
s.forEach((a) => {
|
|
3643
|
-
e =
|
|
3640
|
+
e = Sn(e, ot(a), () => e);
|
|
3644
3641
|
}), r && nt(r, n);
|
|
3645
3642
|
} else
|
|
3646
3643
|
nt(t, n);
|
|
3647
3644
|
return e;
|
|
3648
3645
|
}
|
|
3649
|
-
var Ml = (e, t) => dt(e) ||
|
|
3646
|
+
var Ml = (e, t) => dt(e) || we(e) || ft(e) || ht(e) || or(e, t);
|
|
3650
3647
|
function Fl(e, t, n) {
|
|
3651
3648
|
const s = n.get(e);
|
|
3652
3649
|
s ? s.push(t) : n.set(e, [t]);
|
|
@@ -3659,8 +3656,8 @@ function ql(e, t) {
|
|
|
3659
3656
|
return;
|
|
3660
3657
|
t || (r = r.map((o) => o.map(String)).sort((o, c) => o.length - c.length));
|
|
3661
3658
|
const [a, ...i] = r;
|
|
3662
|
-
a.length === 0 ? s = i.map(
|
|
3663
|
-
}), s ?
|
|
3659
|
+
a.length === 0 ? s = i.map(dn) : n[dn(a)] = i.map(dn);
|
|
3660
|
+
}), s ? Tn(n) ? [s] : [s, n] : Tn(n) ? void 0 : n;
|
|
3664
3661
|
}
|
|
3665
3662
|
var fr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
3666
3663
|
const o = Cl(e);
|
|
@@ -3673,33 +3670,33 @@ var fr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3673
3670
|
} : g;
|
|
3674
3671
|
}
|
|
3675
3672
|
if (!Ml(e, n)) {
|
|
3676
|
-
const g = rs(e, n),
|
|
3673
|
+
const g = rs(e, n), p = g ? {
|
|
3677
3674
|
transformedValue: g.value,
|
|
3678
3675
|
annotations: [g.type]
|
|
3679
3676
|
} : {
|
|
3680
3677
|
transformedValue: e
|
|
3681
3678
|
};
|
|
3682
|
-
return o || i.set(e,
|
|
3679
|
+
return o || i.set(e, p), p;
|
|
3683
3680
|
}
|
|
3684
3681
|
if (Ut(a, e))
|
|
3685
3682
|
return {
|
|
3686
3683
|
transformedValue: null
|
|
3687
3684
|
};
|
|
3688
|
-
const c = rs(e, n), u = (c == null ? void 0 : c.value) ?? e,
|
|
3689
|
-
nt(u, (g,
|
|
3690
|
-
if (
|
|
3691
|
-
throw new Error(`Detected property ${
|
|
3692
|
-
const
|
|
3693
|
-
|
|
3694
|
-
|
|
3685
|
+
const c = rs(e, n), u = (c == null ? void 0 : c.value) ?? e, d = we(u) ? [] : {}, f = {};
|
|
3686
|
+
nt(u, (g, p) => {
|
|
3687
|
+
if (p === "__proto__" || p === "constructor" || p === "prototype")
|
|
3688
|
+
throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
|
|
3689
|
+
const S = fr(g, t, n, s, [...r, p], [...a, e], i);
|
|
3690
|
+
d[p] = S.transformedValue, we(S.annotations) ? f[p] = S.annotations : dt(S.annotations) && nt(S.annotations, (P, T) => {
|
|
3691
|
+
f[sr(p) + "." + T] = P;
|
|
3695
3692
|
});
|
|
3696
3693
|
});
|
|
3697
|
-
const h =
|
|
3698
|
-
transformedValue:
|
|
3694
|
+
const h = Tn(f) ? {
|
|
3695
|
+
transformedValue: d,
|
|
3699
3696
|
annotations: c ? [c.type] : void 0
|
|
3700
3697
|
} : {
|
|
3701
|
-
transformedValue:
|
|
3702
|
-
annotations: c ? [c.type,
|
|
3698
|
+
transformedValue: d,
|
|
3699
|
+
annotations: c ? [c.type, f] : f
|
|
3703
3700
|
};
|
|
3704
3701
|
return o || i.set(e, h), h;
|
|
3705
3702
|
};
|
|
@@ -3724,16 +3721,16 @@ function Vl(e, t, n, s, r) {
|
|
|
3724
3721
|
configurable: !0
|
|
3725
3722
|
});
|
|
3726
3723
|
}
|
|
3727
|
-
function
|
|
3724
|
+
function Pn(e, t = {}) {
|
|
3728
3725
|
if (as(e))
|
|
3729
|
-
return e.map((r) =>
|
|
3726
|
+
return e.map((r) => Pn(r, t));
|
|
3730
3727
|
if (!Kl(e))
|
|
3731
3728
|
return e;
|
|
3732
3729
|
const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
|
|
3733
3730
|
return [...n, ...s].reduce((r, a) => {
|
|
3734
3731
|
if (as(t.props) && !t.props.includes(a))
|
|
3735
3732
|
return r;
|
|
3736
|
-
const i = e[a], o =
|
|
3733
|
+
const i = e[a], o = Pn(i, t);
|
|
3737
3734
|
return Vl(r, a, o, e, t.nonenumerable), r;
|
|
3738
3735
|
}, {});
|
|
3739
3736
|
}
|
|
@@ -3760,7 +3757,7 @@ var x = class {
|
|
|
3760
3757
|
}
|
|
3761
3758
|
deserialize(e) {
|
|
3762
3759
|
const { json: t, meta: n } = e;
|
|
3763
|
-
let s =
|
|
3760
|
+
let s = Pn(t);
|
|
3764
3761
|
return n != null && n.values && (s = Ul(s, n.values, this)), n != null && n.referentialEqualities && (s = Bl(s, n.referentialEqualities)), s;
|
|
3765
3762
|
}
|
|
3766
3763
|
stringify(e) {
|
|
@@ -3929,44 +3926,44 @@ var yu = (e, t = !1) => {
|
|
|
3929
3926
|
initialIsOpen: o,
|
|
3930
3927
|
errorTypes: c,
|
|
3931
3928
|
styleNonce: u,
|
|
3932
|
-
shadowDOMTarget:
|
|
3933
|
-
hideDisabledQueries:
|
|
3929
|
+
shadowDOMTarget: d,
|
|
3930
|
+
hideDisabledQueries: f
|
|
3934
3931
|
} = e;
|
|
3935
|
-
|
|
3932
|
+
O(this, qe, q(t)), O(this, mt, n), O(this, Et, s), O(this, gt, r), O(this, pt, u), O(this, Ke, d), O(this, Ve, q(a)), O(this, He, q(i)), O(this, Qe, q(o)), O(this, $e, q(c)), O(this, yt, q(f));
|
|
3936
3933
|
}
|
|
3937
3934
|
setButtonPosition(e) {
|
|
3938
|
-
|
|
3935
|
+
_(this, Ve)[1](e);
|
|
3939
3936
|
}
|
|
3940
3937
|
setPosition(e) {
|
|
3941
|
-
|
|
3938
|
+
_(this, He)[1](e);
|
|
3942
3939
|
}
|
|
3943
3940
|
setInitialIsOpen(e) {
|
|
3944
|
-
|
|
3941
|
+
_(this, Qe)[1](e);
|
|
3945
3942
|
}
|
|
3946
3943
|
setErrorTypes(e) {
|
|
3947
|
-
|
|
3944
|
+
_(this, $e)[1](e);
|
|
3948
3945
|
}
|
|
3949
3946
|
setClient(e) {
|
|
3950
|
-
|
|
3947
|
+
_(this, qe)[1](e);
|
|
3951
3948
|
}
|
|
3952
3949
|
mount(e) {
|
|
3953
|
-
if (
|
|
3950
|
+
if (_(this, Le))
|
|
3954
3951
|
throw new Error("Devtools is already mounted");
|
|
3955
3952
|
const t = Js(() => {
|
|
3956
|
-
const n = this, [s] =
|
|
3953
|
+
const n = this, [s] = _(this, Ve), [r] = _(this, He), [a] = _(this, Qe), [i] = _(this, $e), [o] = _(this, yt), [c] = _(this, qe);
|
|
3957
3954
|
let u;
|
|
3958
|
-
return
|
|
3955
|
+
return _(this, je) ? u = _(this, je) : (u = Ws(() => import("./NCMVHL6D-DoK0XoIo.js")), O(this, je, u)), Er(_(this, pt), _(this, Ke)), js(u, zs({
|
|
3959
3956
|
get queryFlavor() {
|
|
3960
|
-
return
|
|
3957
|
+
return _(n, mt);
|
|
3961
3958
|
},
|
|
3962
3959
|
get version() {
|
|
3963
|
-
return
|
|
3960
|
+
return _(n, Et);
|
|
3964
3961
|
},
|
|
3965
3962
|
get onlineManager() {
|
|
3966
|
-
return
|
|
3963
|
+
return _(n, gt);
|
|
3967
3964
|
},
|
|
3968
3965
|
get shadowDOMTarget() {
|
|
3969
|
-
return
|
|
3966
|
+
return _(n, Ke);
|
|
3970
3967
|
}
|
|
3971
3968
|
}, {
|
|
3972
3969
|
get client() {
|
|
@@ -3989,13 +3986,13 @@ var yu = (e, t = !1) => {
|
|
|
3989
3986
|
}
|
|
3990
3987
|
}));
|
|
3991
3988
|
}, e);
|
|
3992
|
-
|
|
3989
|
+
O(this, Le, !0), O(this, At, t);
|
|
3993
3990
|
}
|
|
3994
3991
|
unmount() {
|
|
3995
3992
|
var e;
|
|
3996
|
-
if (!
|
|
3993
|
+
if (!_(this, Le))
|
|
3997
3994
|
throw new Error("Devtools is not mounted");
|
|
3998
|
-
(e =
|
|
3995
|
+
(e = _(this, At)) == null || e.call(this), O(this, Le, !1);
|
|
3999
3996
|
}
|
|
4000
3997
|
}, qe = new WeakMap(), gt = new WeakMap(), mt = new WeakMap(), Et = new WeakMap(), Le = new WeakMap(), pt = new WeakMap(), Ke = new WeakMap(), Ve = new WeakMap(), He = new WeakMap(), Qe = new WeakMap(), $e = new WeakMap(), yt = new WeakMap(), je = new WeakMap(), At = new WeakMap(), cs), ze, Tt, St, _t, ke, Pt, We, Ye, Je, Xe, Ze, vt, et, tt, wt, us, Wl = (us = class {
|
|
4001
3998
|
constructor(e) {
|
|
@@ -4024,48 +4021,48 @@ var yu = (e, t = !1) => {
|
|
|
4024
4021
|
initialIsOpen: o,
|
|
4025
4022
|
errorTypes: c,
|
|
4026
4023
|
styleNonce: u,
|
|
4027
|
-
shadowDOMTarget:
|
|
4028
|
-
onClose:
|
|
4024
|
+
shadowDOMTarget: d,
|
|
4025
|
+
onClose: f,
|
|
4029
4026
|
hideDisabledQueries: h
|
|
4030
4027
|
} = e;
|
|
4031
|
-
|
|
4028
|
+
O(this, ze, q(t)), O(this, St, n), O(this, _t, s), O(this, Tt, r), O(this, Pt, u), O(this, We, d), O(this, Ye, q(a)), O(this, Je, q(i)), O(this, Xe, q(o)), O(this, Ze, q(c)), O(this, vt, q(h)), O(this, et, q(f));
|
|
4032
4029
|
}
|
|
4033
4030
|
setButtonPosition(e) {
|
|
4034
|
-
|
|
4031
|
+
_(this, Ye)[1](e);
|
|
4035
4032
|
}
|
|
4036
4033
|
setPosition(e) {
|
|
4037
|
-
|
|
4034
|
+
_(this, Je)[1](e);
|
|
4038
4035
|
}
|
|
4039
4036
|
setInitialIsOpen(e) {
|
|
4040
|
-
|
|
4037
|
+
_(this, Xe)[1](e);
|
|
4041
4038
|
}
|
|
4042
4039
|
setErrorTypes(e) {
|
|
4043
|
-
|
|
4040
|
+
_(this, Ze)[1](e);
|
|
4044
4041
|
}
|
|
4045
4042
|
setClient(e) {
|
|
4046
|
-
|
|
4043
|
+
_(this, ze)[1](e);
|
|
4047
4044
|
}
|
|
4048
4045
|
setOnClose(e) {
|
|
4049
|
-
|
|
4046
|
+
_(this, et)[1](() => e);
|
|
4050
4047
|
}
|
|
4051
4048
|
mount(e) {
|
|
4052
|
-
if (
|
|
4049
|
+
if (_(this, ke))
|
|
4053
4050
|
throw new Error("Devtools is already mounted");
|
|
4054
4051
|
const t = Js(() => {
|
|
4055
|
-
const n = this, [s] =
|
|
4056
|
-
let
|
|
4057
|
-
return
|
|
4052
|
+
const n = this, [s] = _(this, Ye), [r] = _(this, Je), [a] = _(this, Xe), [i] = _(this, Ze), [o] = _(this, vt), [c] = _(this, ze), [u] = _(this, et);
|
|
4053
|
+
let d;
|
|
4054
|
+
return _(this, tt) ? d = _(this, tt) : (d = Ws(() => import("./2AITGKQY-Z1XcJ6Q7.js")), O(this, tt, d)), Er(_(this, Pt), _(this, We)), js(d, zs({
|
|
4058
4055
|
get queryFlavor() {
|
|
4059
|
-
return
|
|
4056
|
+
return _(n, St);
|
|
4060
4057
|
},
|
|
4061
4058
|
get version() {
|
|
4062
|
-
return
|
|
4059
|
+
return _(n, _t);
|
|
4063
4060
|
},
|
|
4064
4061
|
get onlineManager() {
|
|
4065
|
-
return
|
|
4062
|
+
return _(n, Tt);
|
|
4066
4063
|
},
|
|
4067
4064
|
get shadowDOMTarget() {
|
|
4068
|
-
return
|
|
4065
|
+
return _(n, We);
|
|
4069
4066
|
}
|
|
4070
4067
|
}, {
|
|
4071
4068
|
get client() {
|
|
@@ -4091,13 +4088,13 @@ var yu = (e, t = !1) => {
|
|
|
4091
4088
|
}
|
|
4092
4089
|
}));
|
|
4093
4090
|
}, e);
|
|
4094
|
-
|
|
4091
|
+
O(this, ke, !0), O(this, wt, t);
|
|
4095
4092
|
}
|
|
4096
4093
|
unmount() {
|
|
4097
4094
|
var e;
|
|
4098
|
-
if (!
|
|
4095
|
+
if (!_(this, ke))
|
|
4099
4096
|
throw new Error("Devtools is not mounted");
|
|
4100
|
-
(e =
|
|
4097
|
+
(e = _(this, wt)) == null || e.call(this), O(this, ke, !1);
|
|
4101
4098
|
}
|
|
4102
4099
|
}, ze = new WeakMap(), Tt = new WeakMap(), St = new WeakMap(), _t = new WeakMap(), ke = new WeakMap(), Pt = new WeakMap(), We = new WeakMap(), Ye = new WeakMap(), Je = new WeakMap(), Xe = new WeakMap(), Ze = new WeakMap(), vt = new WeakMap(), et = new WeakMap(), tt = new WeakMap(), wt = new WeakMap(), us);
|
|
4103
4100
|
function Yl(e) {
|
|
@@ -4109,7 +4106,7 @@ function Yl(e) {
|
|
|
4109
4106
|
styleNonce: o,
|
|
4110
4107
|
shadowDOMTarget: c,
|
|
4111
4108
|
hideDisabledQueries: u
|
|
4112
|
-
} = e, [
|
|
4109
|
+
} = e, [d] = z.useState(
|
|
4113
4110
|
new zl({
|
|
4114
4111
|
client: t,
|
|
4115
4112
|
queryFlavor: "React Query",
|
|
@@ -4125,18 +4122,18 @@ function Yl(e) {
|
|
|
4125
4122
|
})
|
|
4126
4123
|
);
|
|
4127
4124
|
return z.useEffect(() => {
|
|
4128
|
-
|
|
4129
|
-
}, [t,
|
|
4130
|
-
s &&
|
|
4131
|
-
}, [s,
|
|
4132
|
-
r &&
|
|
4133
|
-
}, [r,
|
|
4134
|
-
|
|
4135
|
-
}, [a,
|
|
4136
|
-
|
|
4137
|
-
}, [i,
|
|
4138
|
-
|
|
4139
|
-
}), [
|
|
4125
|
+
d.setClient(t);
|
|
4126
|
+
}, [t, d]), z.useEffect(() => {
|
|
4127
|
+
s && d.setButtonPosition(s);
|
|
4128
|
+
}, [s, d]), z.useEffect(() => {
|
|
4129
|
+
r && d.setPosition(r);
|
|
4130
|
+
}, [r, d]), z.useEffect(() => {
|
|
4131
|
+
d.setInitialIsOpen(a || !1);
|
|
4132
|
+
}, [a, d]), z.useEffect(() => {
|
|
4133
|
+
d.setErrorTypes(i || []);
|
|
4134
|
+
}, [i, d]), z.useEffect(() => (n.current && d.mount(n.current), () => {
|
|
4135
|
+
d.unmount();
|
|
4136
|
+
}), [d]), /* @__PURE__ */ l("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
|
|
4140
4137
|
}
|
|
4141
4138
|
function Jl(e) {
|
|
4142
4139
|
const t = W(e.client), n = z.useRef(null), { errorTypes: s, styleNonce: r, shadowDOMTarget: a, hideDisabledQueries: i } = e, [o] = z.useState(
|
|
@@ -4186,14 +4183,14 @@ const Xl = Ee(""), Zl = () => {
|
|
|
4186
4183
|
description: "Enable AI chat panel"
|
|
4187
4184
|
});
|
|
4188
4185
|
}, ec = () => {
|
|
4189
|
-
const e =
|
|
4186
|
+
const e = L(), t = C();
|
|
4190
4187
|
return ae({
|
|
4191
4188
|
queryKey: [E.GET_COLLECTIONS],
|
|
4192
4189
|
staleTime: 1 / 0,
|
|
4193
4190
|
queryFn: async () => t(e, { action: E.GET_COLLECTIONS })
|
|
4194
4191
|
});
|
|
4195
4192
|
}, tc = () => {
|
|
4196
|
-
const { data: e } = ie(), { data: t } = be(), { data: n } = Re(), s =
|
|
4193
|
+
const { data: e } = ie(), { data: t } = be(), { data: n } = Re(), s = L(), r = C(), a = Q(() => (n == null ? void 0 : n.fallbackLang) || "en", [n == null ? void 0 : n.fallbackLang]);
|
|
4197
4194
|
return X({
|
|
4198
4195
|
mutationFn: async ({ block: i }) => r(s, {
|
|
4199
4196
|
action: E.GET_BLOCK_ASYNC_PROPS,
|
|
@@ -4233,7 +4230,7 @@ const Xl = Ee(""), Zl = () => {
|
|
|
4233
4230
|
},
|
|
4234
4231
|
[e]
|
|
4235
4232
|
);
|
|
4236
|
-
}, rc = F(() => import("./digital-asset-manager-
|
|
4233
|
+
}, rc = F(() => import("./digital-asset-manager-BQNSwfKs.js")), ac = F(() => import("./save-to-lib-YyYkF6c6.js")), ic = F(() => import("./theme-panel-footer-2ERfMsET.js")), oc = F(() => import("./web-preview-DTkIggV7.js"));
|
|
4237
4234
|
Zl();
|
|
4238
4235
|
Xa();
|
|
4239
4236
|
Jr(to);
|
|
@@ -4246,8 +4243,8 @@ const lc = {
|
|
|
4246
4243
|
}, os = (e) => {
|
|
4247
4244
|
const { data: t } = lo();
|
|
4248
4245
|
gi();
|
|
4249
|
-
const n =
|
|
4250
|
-
Ae.current =
|
|
4246
|
+
const n = Dn(), { data: s = lc, isFetching: r } = co(), { data: a, isFetching: i } = Ce(), { data: o, isFetching: c } = ec(), { data: u, isFetching: d } = Re(), f = r || i || c || d, [h] = le(), g = h.get("page"), { data: p } = ie(), { data: S, isFetching: P } = ao(), { blocks: T } = ro(S), { lockingStatus: y, pageLock: A } = Ie(), { data: b, isFetching: M } = io(), k = no(), { onSave: pe } = uo(), { mutateAsync: ye } = tc(), { getPartialBlocks: B, getPartialBlockBlocks: w } = fo(), { mutateAsync: I } = Li(), { mutateAsync: Y } = oo(), $ = sc(), [de, bt] = K(!1), Ae = at([]), Be = Q(() => V(u, "theme", {}) || {}, [u]), Ne = he(y) && (A == null ? void 0 : A.status) === "editing", pr = (A == null ? void 0 : A.status) === "checking", Rn = P || pr || M;
|
|
4247
|
+
Ae.current = T;
|
|
4251
4248
|
const [yr] = te(Xl);
|
|
4252
4249
|
se(() => {
|
|
4253
4250
|
const ne = () => {
|
|
@@ -4259,11 +4256,11 @@ const lc = {
|
|
|
4259
4256
|
const ne = {};
|
|
4260
4257
|
return s && (ne.permissions = V(s, "permissions", null), ne.role = V(s, "role", "user")), ne;
|
|
4261
4258
|
}, [s]), Tr = Q(() => t == null ? void 0 : t.some((ne) => ne.isSiteLibrary), [t]), Sr = j(
|
|
4262
|
-
async (ne, It) => await
|
|
4263
|
-
[
|
|
4259
|
+
async (ne, It) => await I({ pageType: ne, query: It }),
|
|
4260
|
+
[I]
|
|
4264
4261
|
);
|
|
4265
4262
|
return /* @__PURE__ */ m(ge, { children: [
|
|
4266
|
-
|
|
4263
|
+
Rn && /* @__PURE__ */ l(Ns, { className: f ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ l(Ft, { className: `animate-spin text-primary ${f ? "h-6 w-6" : "h-5 w-5"}` }) }),
|
|
4267
4264
|
yr && /* @__PURE__ */ l(
|
|
4268
4265
|
H,
|
|
4269
4266
|
{
|
|
@@ -4278,10 +4275,10 @@ const lc = {
|
|
|
4278
4275
|
gotoPage: $,
|
|
4279
4276
|
collections: o ?? [],
|
|
4280
4277
|
getBlockAsyncProps: ye,
|
|
4281
|
-
pageExternalData:
|
|
4278
|
+
pageExternalData: b,
|
|
4282
4279
|
themePresets: e.themePresets ?? [],
|
|
4283
|
-
pageId:
|
|
4284
|
-
loading:
|
|
4280
|
+
pageId: p == null ? void 0 : p.id,
|
|
4281
|
+
loading: P,
|
|
4285
4282
|
fallbackLang: n,
|
|
4286
4283
|
languages: (u == null ? void 0 : u.languages) || [],
|
|
4287
4284
|
brandingOptions: (u == null ? void 0 : u.theme) || {},
|
|
@@ -4293,23 +4290,23 @@ const lc = {
|
|
|
4293
4290
|
onError: e.onError || console.error,
|
|
4294
4291
|
getPartialBlockBlocks: w,
|
|
4295
4292
|
getPartialBlocks: B,
|
|
4296
|
-
blocks:
|
|
4293
|
+
blocks: P ? [] : T,
|
|
4297
4294
|
theme: Br(Be),
|
|
4298
4295
|
pageTypes: a,
|
|
4299
4296
|
searchPageTypeItems: Sr,
|
|
4300
|
-
askAiCallBack:
|
|
4297
|
+
askAiCallBack: k,
|
|
4301
4298
|
onSave: async ({ blocks: ne, theme: It, needTranslations: _r }) => {
|
|
4302
4299
|
if (!g) return !0;
|
|
4303
4300
|
Ae.current = ne;
|
|
4304
|
-
const
|
|
4305
|
-
return await pe({ page: g, blocks:
|
|
4301
|
+
const Un = [...ne];
|
|
4302
|
+
return await pe({ page: g, blocks: Un, needTranslations: _r }), Ae.current = Un, Mr(It, Be) || await Y({ settings: { theme: It } }), !0;
|
|
4306
4303
|
},
|
|
4307
4304
|
themePanelComponent: ic,
|
|
4308
4305
|
...Ar
|
|
4309
4306
|
}
|
|
4310
4307
|
),
|
|
4311
4308
|
/* @__PURE__ */ m("div", { children: [
|
|
4312
|
-
/* @__PURE__ */ l(yi, { isFetchingPage:
|
|
4309
|
+
/* @__PURE__ */ l(yi, { isFetchingPage: Rn }),
|
|
4313
4310
|
/* @__PURE__ */ l(Ai, {})
|
|
4314
4311
|
] })
|
|
4315
4312
|
] });
|
|
@@ -4322,9 +4319,9 @@ const lc = {
|
|
|
4322
4319
|
}
|
|
4323
4320
|
}
|
|
4324
4321
|
}), Pu = (e) => {
|
|
4325
|
-
const [, t] =
|
|
4322
|
+
const [, t] = Cn(), [n, s] = K(!1);
|
|
4326
4323
|
return se(() => (t(
|
|
4327
|
-
|
|
4324
|
+
vn(e, [
|
|
4328
4325
|
"apiUrl",
|
|
4329
4326
|
"usersApiUrl",
|
|
4330
4327
|
"assetsApiUrl",
|
|
@@ -4400,7 +4397,7 @@ const vu = () => {
|
|
|
4400
4397
|
e.clear();
|
|
4401
4398
|
}, [e]);
|
|
4402
4399
|
}, bu = () => {
|
|
4403
|
-
const e =
|
|
4400
|
+
const e = L(), t = C(), { data: n } = be(), s = W();
|
|
4404
4401
|
return X({
|
|
4405
4402
|
mutationFn: async (r) => {
|
|
4406
4403
|
if (!(n != null && n.id))
|
|
@@ -4424,7 +4421,7 @@ const vu = () => {
|
|
|
4424
4421
|
console.error("Failed to update metadata");
|
|
4425
4422
|
}
|
|
4426
4423
|
});
|
|
4427
|
-
}, fc = F(() => import("./digital-asset-manager-
|
|
4424
|
+
}, fc = F(() => import("./digital-asset-manager-BQNSwfKs.js")), Iu = ({
|
|
4428
4425
|
assetId: e,
|
|
4429
4426
|
assetUrl: t,
|
|
4430
4427
|
onChange: n,
|
|
@@ -4432,13 +4429,13 @@ const vu = () => {
|
|
|
4432
4429
|
placeholder: r = "Select an image",
|
|
4433
4430
|
disabled: a = !1
|
|
4434
4431
|
}) => {
|
|
4435
|
-
const { t: i } =
|
|
4432
|
+
const { t: i } = _e(), [o, c] = K(!1), u = () => {
|
|
4436
4433
|
a || c(!0);
|
|
4437
|
-
},
|
|
4434
|
+
}, d = () => {
|
|
4438
4435
|
c(!1);
|
|
4439
|
-
},
|
|
4440
|
-
const
|
|
4441
|
-
|
|
4436
|
+
}, f = (p) => {
|
|
4437
|
+
const S = Array.isArray(p) ? p[0] : p;
|
|
4438
|
+
S != null && S.url && n(vn(S, ["url", "id"])), c(!1);
|
|
4442
4439
|
}, h = () => {
|
|
4443
4440
|
n({ url: "", id: "" });
|
|
4444
4441
|
}, g = (t == null ? void 0 : t.startsWith("{{")) && (t == null ? void 0 : t.endsWith("}}"));
|
|
@@ -4500,7 +4497,7 @@ const vu = () => {
|
|
|
4500
4497
|
variant: "ghost",
|
|
4501
4498
|
size: "icon",
|
|
4502
4499
|
className: "absolute right-4 top-2",
|
|
4503
|
-
onClick:
|
|
4500
|
+
onClick: d,
|
|
4504
4501
|
children: /* @__PURE__ */ l(zn, { className: "h-4 w-4" })
|
|
4505
4502
|
}
|
|
4506
4503
|
)
|
|
@@ -4508,21 +4505,21 @@ const vu = () => {
|
|
|
4508
4505
|
/* @__PURE__ */ l("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(
|
|
4509
4506
|
fc,
|
|
4510
4507
|
{
|
|
4511
|
-
close:
|
|
4512
|
-
onSelect:
|
|
4508
|
+
close: d,
|
|
4509
|
+
onSelect: f,
|
|
4513
4510
|
mode: "image",
|
|
4514
4511
|
assetId: e
|
|
4515
4512
|
}
|
|
4516
4513
|
) }) })
|
|
4517
4514
|
] }) })
|
|
4518
4515
|
] });
|
|
4519
|
-
}, hc = qr(null),
|
|
4516
|
+
}, hc = qr(null), fn = {
|
|
4520
4517
|
didCatch: !1,
|
|
4521
4518
|
error: null
|
|
4522
4519
|
};
|
|
4523
4520
|
class gc extends Kr {
|
|
4524
4521
|
constructor(t) {
|
|
4525
|
-
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state =
|
|
4522
|
+
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = fn;
|
|
4526
4523
|
}
|
|
4527
4524
|
static getDerivedStateFromError(t) {
|
|
4528
4525
|
return {
|
|
@@ -4540,7 +4537,7 @@ class gc extends Kr {
|
|
|
4540
4537
|
(n = (s = this.props).onReset) === null || n === void 0 || n.call(s, {
|
|
4541
4538
|
args: a,
|
|
4542
4539
|
reason: "imperative-api"
|
|
4543
|
-
}), this.setState(
|
|
4540
|
+
}), this.setState(fn);
|
|
4544
4541
|
}
|
|
4545
4542
|
}
|
|
4546
4543
|
componentDidCatch(t, n) {
|
|
@@ -4559,7 +4556,7 @@ class gc extends Kr {
|
|
|
4559
4556
|
next: r,
|
|
4560
4557
|
prev: t.resetKeys,
|
|
4561
4558
|
reason: "keys"
|
|
4562
|
-
}), this.setState(
|
|
4559
|
+
}), this.setState(fn);
|
|
4563
4560
|
}
|
|
4564
4561
|
}
|
|
4565
4562
|
render() {
|
|
@@ -4581,13 +4578,13 @@ class gc extends Kr {
|
|
|
4581
4578
|
if (typeof n == "function")
|
|
4582
4579
|
o = n(c);
|
|
4583
4580
|
else if (s)
|
|
4584
|
-
o =
|
|
4581
|
+
o = qn(s, c);
|
|
4585
4582
|
else if (r !== void 0)
|
|
4586
4583
|
o = r;
|
|
4587
4584
|
else
|
|
4588
4585
|
throw i;
|
|
4589
4586
|
}
|
|
4590
|
-
return
|
|
4587
|
+
return qn(hc.Provider, {
|
|
4591
4588
|
value: {
|
|
4592
4589
|
didCatch: a,
|
|
4593
4590
|
error: i,
|
|
@@ -4617,11 +4614,11 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4617
4614
|
return { isValid: !0, parsed: JSON.parse(s), error: null, placeholders: n };
|
|
4618
4615
|
} catch (a) {
|
|
4619
4616
|
const i = a, o = i.message.match(/position (\d+)/), c = o ? parseInt(o[1]) : void 0;
|
|
4620
|
-
let u,
|
|
4617
|
+
let u, d;
|
|
4621
4618
|
if (c !== void 0) {
|
|
4622
|
-
const
|
|
4619
|
+
const f = s.substring(0, c).split(`
|
|
4623
4620
|
`);
|
|
4624
|
-
u =
|
|
4621
|
+
u = f.length, d = f[f.length - 1].length + 1;
|
|
4625
4622
|
}
|
|
4626
4623
|
return {
|
|
4627
4624
|
isValid: !1,
|
|
@@ -4630,7 +4627,7 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4630
4627
|
error: {
|
|
4631
4628
|
message: i.message,
|
|
4632
4629
|
line: u,
|
|
4633
|
-
column:
|
|
4630
|
+
column: d,
|
|
4634
4631
|
position: c
|
|
4635
4632
|
}
|
|
4636
4633
|
};
|
|
@@ -4651,7 +4648,7 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4651
4648
|
n = n.replace(r[0], i);
|
|
4652
4649
|
}
|
|
4653
4650
|
return n;
|
|
4654
|
-
}, Ac = F(() => import("./shared-json-ld-
|
|
4651
|
+
}, Ac = F(() => import("./shared-json-ld-E4Ckwlbr.js")), Cu = ({
|
|
4655
4652
|
value: e,
|
|
4656
4653
|
onChange: t,
|
|
4657
4654
|
disabled: n = !1,
|
|
@@ -4662,9 +4659,9 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4662
4659
|
pageData: o = {},
|
|
4663
4660
|
handleFieldInsert: c,
|
|
4664
4661
|
hasJsonLdForSelectedLang: u,
|
|
4665
|
-
copyJsonLDFromDefaultPage:
|
|
4662
|
+
copyJsonLDFromDefaultPage: d
|
|
4666
4663
|
}) => {
|
|
4667
|
-
const [
|
|
4664
|
+
const [f, h] = K("edit"), [g, p] = K(null), [S, P] = K(""), T = at(null), [y] = Cn(), A = i === "jsonLD" && V(y, "features.sharedJsonLD", !1), b = i === "jsonLD" && !u && !!d;
|
|
4668
4665
|
se(() => {
|
|
4669
4666
|
e.trim() === "" && t("{}");
|
|
4670
4667
|
}, [e, t]);
|
|
@@ -4672,30 +4669,30 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4672
4669
|
if (s) return;
|
|
4673
4670
|
const w = B.target.value;
|
|
4674
4671
|
t(w);
|
|
4675
|
-
},
|
|
4672
|
+
}, k = (B) => {
|
|
4676
4673
|
if (B.key === "Tab") {
|
|
4677
4674
|
B.preventDefault();
|
|
4678
|
-
const w = B.currentTarget,
|
|
4679
|
-
if (
|
|
4680
|
-
const de = e.substring(
|
|
4675
|
+
const w = B.currentTarget, I = w.selectionStart, Y = w.selectionEnd;
|
|
4676
|
+
if (I !== Y) {
|
|
4677
|
+
const de = e.substring(I, Y).split(`
|
|
4681
4678
|
`);
|
|
4682
4679
|
if (B.shiftKey) {
|
|
4683
4680
|
const Ae = de.map((Ne) => Ne.startsWith(" ") ? Ne.substring(2) : Ne).join(`
|
|
4684
|
-
`), Be = e.substring(0,
|
|
4681
|
+
`), Be = e.substring(0, I) + Ae + e.substring(Y);
|
|
4685
4682
|
t(Be), setTimeout(() => {
|
|
4686
|
-
w.selectionStart =
|
|
4683
|
+
w.selectionStart = I, w.selectionEnd = I + Ae.length;
|
|
4687
4684
|
}, 0);
|
|
4688
4685
|
} else {
|
|
4689
4686
|
const Ae = de.map((Ne) => ` ${Ne}`).join(`
|
|
4690
|
-
`), Be = e.substring(0,
|
|
4687
|
+
`), Be = e.substring(0, I) + Ae + e.substring(Y);
|
|
4691
4688
|
t(Be), setTimeout(() => {
|
|
4692
|
-
w.selectionStart =
|
|
4689
|
+
w.selectionStart = I, w.selectionEnd = I + Ae.length;
|
|
4693
4690
|
}, 0);
|
|
4694
4691
|
}
|
|
4695
4692
|
} else {
|
|
4696
|
-
const $ = e.substring(0,
|
|
4693
|
+
const $ = e.substring(0, I) + " " + e.substring(Y);
|
|
4697
4694
|
t($), setTimeout(() => {
|
|
4698
|
-
w.selectionStart = w.selectionEnd =
|
|
4695
|
+
w.selectionStart = w.selectionEnd = I + 2;
|
|
4699
4696
|
}, 0);
|
|
4700
4697
|
}
|
|
4701
4698
|
}
|
|
@@ -4703,13 +4700,13 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4703
4700
|
se(() => {
|
|
4704
4701
|
const B = ls(e);
|
|
4705
4702
|
if (B.isValid)
|
|
4706
|
-
if (
|
|
4703
|
+
if (p(null), B.parsed) {
|
|
4707
4704
|
const w = yc(B.parsed, o);
|
|
4708
|
-
|
|
4705
|
+
P(w);
|
|
4709
4706
|
} else
|
|
4710
|
-
|
|
4707
|
+
P("");
|
|
4711
4708
|
else
|
|
4712
|
-
|
|
4709
|
+
p(B.error), P("");
|
|
4713
4710
|
}, [e, o]);
|
|
4714
4711
|
const pe = () => {
|
|
4715
4712
|
const B = ls(e);
|
|
@@ -4718,9 +4715,9 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4718
4715
|
t(w);
|
|
4719
4716
|
}
|
|
4720
4717
|
}, ye = () => {
|
|
4721
|
-
g != null && g.position &&
|
|
4718
|
+
g != null && g.position && T.current && (T.current.focus(), T.current.setSelectionRange(g.position, g.position + 1));
|
|
4722
4719
|
};
|
|
4723
|
-
return /* @__PURE__ */ l(gc, { fallback: /* @__PURE__ */ l("div", { children: "Some error" }), children: /* @__PURE__ */ l("div", { className: "space-y-2", children: /* @__PURE__ */ m(Pa, { value:
|
|
4720
|
+
return /* @__PURE__ */ l(gc, { fallback: /* @__PURE__ */ l("div", { children: "Some error" }), children: /* @__PURE__ */ l("div", { className: "space-y-2", children: /* @__PURE__ */ m(Pa, { value: f, onValueChange: h, className: "w-full", children: [
|
|
4724
4721
|
/* @__PURE__ */ m("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
4725
4722
|
/* @__PURE__ */ m(va, { className: "w-max", children: [
|
|
4726
4723
|
/* @__PURE__ */ m(nn, { value: "edit", className: "flex items-center gap-1", children: [
|
|
@@ -4732,14 +4729,14 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4732
4729
|
{
|
|
4733
4730
|
value: "preview",
|
|
4734
4731
|
className: "flex items-center gap-1",
|
|
4735
|
-
disabled: !e.trim() || g !== null ||
|
|
4732
|
+
disabled: !e.trim() || g !== null || b,
|
|
4736
4733
|
children: [
|
|
4737
4734
|
/* @__PURE__ */ l($a, { className: "h-4 w-4" }),
|
|
4738
4735
|
/* @__PURE__ */ l("span", { children: "Preview" })
|
|
4739
4736
|
]
|
|
4740
4737
|
}
|
|
4741
4738
|
),
|
|
4742
|
-
|
|
4739
|
+
A && /* @__PURE__ */ m(
|
|
4743
4740
|
nn,
|
|
4744
4741
|
{
|
|
4745
4742
|
value: "shared",
|
|
@@ -4752,7 +4749,7 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4752
4749
|
}
|
|
4753
4750
|
)
|
|
4754
4751
|
] }),
|
|
4755
|
-
|
|
4752
|
+
b ? null : f === "edit" && !s && /* @__PURE__ */ l("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ l(
|
|
4756
4753
|
dc,
|
|
4757
4754
|
{
|
|
4758
4755
|
dataType: "value",
|
|
@@ -4762,7 +4759,7 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4762
4759
|
) })
|
|
4763
4760
|
] }),
|
|
4764
4761
|
/* @__PURE__ */ m(sn, { value: "edit", className: "relative mt-0", children: [
|
|
4765
|
-
!
|
|
4762
|
+
!b && f === "edit" && /* @__PURE__ */ l(Gn, { content: "Format JSON", side: "right", showTooltip: !n && !g, children: /* @__PURE__ */ l(
|
|
4766
4763
|
U,
|
|
4767
4764
|
{
|
|
4768
4765
|
type: "button",
|
|
@@ -4774,21 +4771,21 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4774
4771
|
children: /* @__PURE__ */ l(za, {})
|
|
4775
4772
|
}
|
|
4776
4773
|
) }),
|
|
4777
|
-
|
|
4774
|
+
b ? /* @__PURE__ */ l("div", { className: "flex h-40 items-center justify-center rounded-md bg-black/20", children: /* @__PURE__ */ m("div", { className: "flex max-w-[400px] flex-col items-center gap-2 rounded-md bg-white p-4 shadow-lg", children: [
|
|
4778
4775
|
/* @__PURE__ */ l("div", { className: "max-w-xl text-center text-xs text-gray-500", children: "JSON-LD for is not added for selected language. JSON LD will be used from default language." }),
|
|
4779
|
-
/* @__PURE__ */ m(U, { type: "button", variant: "default", size: "sm", onClick:
|
|
4776
|
+
/* @__PURE__ */ m(U, { type: "button", variant: "default", size: "sm", onClick: d, children: [
|
|
4780
4777
|
/* @__PURE__ */ l(Ts, {}),
|
|
4781
4778
|
"Copy & Edit from default language"
|
|
4782
4779
|
] })
|
|
4783
4780
|
] }) }) : /* @__PURE__ */ l(
|
|
4784
|
-
|
|
4781
|
+
Kn,
|
|
4785
4782
|
{
|
|
4786
|
-
ref:
|
|
4783
|
+
ref: T,
|
|
4787
4784
|
id: i,
|
|
4788
4785
|
name: i,
|
|
4789
4786
|
className: `rounded-md border border-input text-xs ${g ? "border-red-500" : ""}`,
|
|
4790
4787
|
onChange: M,
|
|
4791
|
-
onKeyDown:
|
|
4788
|
+
onKeyDown: k,
|
|
4792
4789
|
value: e,
|
|
4793
4790
|
placeholder: r,
|
|
4794
4791
|
rows: a,
|
|
@@ -4822,10 +4819,10 @@ const Ec = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4822
4819
|
] })
|
|
4823
4820
|
] }),
|
|
4824
4821
|
/* @__PURE__ */ m(sn, { value: "preview", className: "mt-0", children: [
|
|
4825
|
-
/* @__PURE__ */ l(
|
|
4822
|
+
/* @__PURE__ */ l(Kn, { rows: a, value: S, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
|
|
4826
4823
|
/* @__PURE__ */ l("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
|
|
4827
4824
|
] }),
|
|
4828
|
-
|
|
4825
|
+
A && /* @__PURE__ */ l(sn, { value: "shared", className: "mt-0", children: /* @__PURE__ */ l(H, { children: /* @__PURE__ */ l(Ac, {}) }) })
|
|
4829
4826
|
] }) }) });
|
|
4830
4827
|
};
|
|
4831
4828
|
if (typeof window > "u")
|
|
@@ -4840,7 +4837,7 @@ export {
|
|
|
4840
4837
|
Zc as F,
|
|
4841
4838
|
eu as G,
|
|
4842
4839
|
De as H,
|
|
4843
|
-
|
|
4840
|
+
pn as I,
|
|
4844
4841
|
tu as J,
|
|
4845
4842
|
Yc as K,
|
|
4846
4843
|
Lt as L,
|
|
@@ -4851,9 +4848,9 @@ export {
|
|
|
4851
4848
|
lu as Q,
|
|
4852
4849
|
ko as R,
|
|
4853
4850
|
ru as S,
|
|
4854
|
-
|
|
4851
|
+
Gn as T,
|
|
4855
4852
|
ll as U,
|
|
4856
|
-
|
|
4853
|
+
yn as V,
|
|
4857
4854
|
sl as W,
|
|
4858
4855
|
mu as X,
|
|
4859
4856
|
Eu as Y,
|
|
@@ -4879,7 +4876,7 @@ export {
|
|
|
4879
4876
|
ws as aG,
|
|
4880
4877
|
io as aH,
|
|
4881
4878
|
Ni as aI,
|
|
4882
|
-
|
|
4879
|
+
Cn as aJ,
|
|
4883
4880
|
dc as aK,
|
|
4884
4881
|
Iu as aL,
|
|
4885
4882
|
Oc as aM,
|
|
@@ -4905,15 +4902,15 @@ export {
|
|
|
4905
4902
|
Pi as aj,
|
|
4906
4903
|
ui as ak,
|
|
4907
4904
|
mi as al,
|
|
4908
|
-
|
|
4909
|
-
|
|
4905
|
+
L as am,
|
|
4906
|
+
C as an,
|
|
4910
4907
|
nc as ao,
|
|
4911
4908
|
Kc as ap,
|
|
4912
|
-
|
|
4909
|
+
On as aq,
|
|
4913
4910
|
ie as ar,
|
|
4914
|
-
|
|
4911
|
+
an as as,
|
|
4915
4912
|
ce as at,
|
|
4916
|
-
|
|
4913
|
+
Ln as au,
|
|
4917
4914
|
Gc as av,
|
|
4918
4915
|
Vc as aw,
|
|
4919
4916
|
$c as ax,
|
|
@@ -4923,7 +4920,7 @@ export {
|
|
|
4923
4920
|
Rc as c,
|
|
4924
4921
|
Uc as d,
|
|
4925
4922
|
Re as e,
|
|
4926
|
-
|
|
4923
|
+
Dn as f,
|
|
4927
4924
|
xe as g,
|
|
4928
4925
|
Ce as h,
|
|
4929
4926
|
le as i,
|
|
@@ -4937,7 +4934,7 @@ export {
|
|
|
4937
4934
|
Dc as q,
|
|
4938
4935
|
_u as r,
|
|
4939
4936
|
J as s,
|
|
4940
|
-
|
|
4937
|
+
on as t,
|
|
4941
4938
|
Cs as u,
|
|
4942
4939
|
js as v,
|
|
4943
4940
|
Au as w,
|