@chaibuilder/pages 0.15.14 → 0.15.16
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-BGvx_OEz.cjs → 2AITGKQY-CuxhppUA.cjs} +1 -1
- package/dist/{2AITGKQY-CCad8XK8.js → 2AITGKQY-JdTvsit7.js} +2 -2
- package/dist/{NCMVHL6D-Iv9ufIUy.js → NCMVHL6D-CTrkJrNW.js} +2 -2
- package/dist/{NCMVHL6D-C_u5lHQe.cjs → NCMVHL6D-rzEn9a-Z.cjs} +1 -1
- package/dist/{ZDWCUMSJ-DT4dg62a.js → ZDWCUMSJ-DIAJ5hj-.js} +1 -1
- package/dist/{ZDWCUMSJ-BqZPKNlU.cjs → ZDWCUMSJ-DZa1ZX5H.cjs} +1 -1
- package/dist/{add-new-language-page-CfH8Ernl.js → add-new-language-page-3fFJlIi4.js} +2 -2
- package/dist/{add-new-language-page-DlQjzp--.cjs → add-new-language-page-DPbVVRnt.cjs} +1 -1
- package/dist/{add-new-page-DX1aQA56.js → add-new-page-C-DdGfOJ.js} +1 -1
- package/dist/{add-new-page-DH-nv7ae.cjs → add-new-page-CgsPADOI.cjs} +1 -1
- package/dist/{delete-page-DE-nabXs.js → delete-page-X6KE9Snl.js} +1 -1
- package/dist/{delete-page-WPGzECyJ.cjs → delete-page-ftu1i43t.cjs} +1 -1
- package/dist/{digital-asset-manager-DtWIJGhf.js → digital-asset-manager-CWneIIcn.js} +1 -1
- package/dist/{digital-asset-manager-CGLE6VEW.cjs → digital-asset-manager-zEPka3BT.cjs} +1 -1
- package/dist/{duplicate-page-C1r3iBDY.js → duplicate-page-Bwp0RTTE.js} +2 -2
- package/dist/{duplicate-page-CByLwz0z.cjs → duplicate-page-D-2tkgsd.cjs} +1 -1
- package/dist/{dynamic-page-selector-GwGV0Q6Z.cjs → dynamic-page-selector-DDyEyh7e.cjs} +1 -1
- package/dist/{dynamic-page-selector-Bk8_xgFx.js → dynamic-page-selector-Vl0aOeHK.js} +1 -1
- package/dist/{index-Djepisz3.js → index-DHfaX2M6.js} +1179 -1213
- package/dist/index-DOlBrCPx.cjs +5 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +12 -8
- package/dist/index.js +19 -18
- package/dist/{json-diff-viewer-zKpzQFxw.js → json-diff-viewer-BCtaXLmG.js} +1 -1
- package/dist/{json-diff-viewer-BUhKwjf9.cjs → json-diff-viewer-CM1kUeoR.cjs} +1 -1
- package/dist/{lang-panel-CtpuO-KH.js → lang-panel-CaOkz8d3.js} +2 -2
- package/dist/{lang-panel-BYF6aLAt.cjs → lang-panel-DNQEDZ5D.cjs} +1 -1
- package/dist/{mark-as-template-wRAGJGtp.cjs → mark-as-template-CD1bYgow.cjs} +1 -1
- package/dist/{mark-as-template-0kikl0oL.js → mark-as-template-XIeQkqPw.js} +1 -1
- package/dist/{no-language-page-content-DX9WXKXs.cjs → no-language-page-content-BHacGf6H.cjs} +1 -1
- package/dist/{no-language-page-content-B1M_x_U7.js → no-language-page-content-CtN5VB9K.js} +1 -1
- package/dist/{page-creator-DuN5JD41.cjs → page-creator-C7j6rkr2.cjs} +1 -1
- package/dist/{page-creator-BDJ6iDX9.js → page-creator-Ci3yqsDv.js} +2 -2
- package/dist/{page-lock-request-Bc_vwJhy.js → page-lock-request-01G9AeVF.js} +1 -1
- package/dist/{page-lock-request-PRQo0DDm.cjs → page-lock-request-BNS3-biN.cjs} +1 -1
- package/dist/{page-locked-by-dialog-DiKNpVwH.js → page-locked-by-dialog-BQV9X0UF.js} +1 -1
- package/dist/{page-locked-by-dialog-Dk0G2l7a.cjs → page-locked-by-dialog-Cei-v0MT.cjs} +1 -1
- package/dist/{page-manager-new-CUHqC9Og.js → page-manager-new-DE_2H_ow.js} +2 -2
- package/dist/{page-manager-new-KBhn93Yd.cjs → page-manager-new-XGKr4mup.cjs} +1 -1
- package/dist/{page-manager-search-and-filter-CJ4AK1_7.js → page-manager-search-and-filter-B8zCpxug.js} +1 -1
- package/dist/{page-manager-search-and-filter-Ck5_TfNx.cjs → page-manager-search-and-filter-BDw2AYXn.cjs} +1 -1
- package/dist/{page-revisions-content-Cw2cumYS.cjs → page-revisions-content-BIdaOcUx.cjs} +1 -1
- package/dist/{page-revisions-content-q1Ch2-IQ.js → page-revisions-content-mih9gx3J.js} +2 -2
- package/dist/{publish-pages-content-B8Uuw29Q.cjs → publish-pages-content-1knN5SPM.cjs} +1 -1
- package/dist/{publish-pages-content-DEHD8qkl.js → publish-pages-content-jYi-Q1Vl.js} +2 -2
- package/dist/{save-to-lib-B83ZH4XX.cjs → save-to-lib-B56XAto8.cjs} +1 -1
- package/dist/{save-to-lib-QEOpf_Bd.js → save-to-lib-CpFEdU_R.js} +1 -1
- package/dist/{seo-panel-DEQfOfZs.js → seo-panel-D3bp2i90.js} +1 -1
- package/dist/{seo-panel-DvDEatlO.cjs → seo-panel-DRb3uTUp.cjs} +1 -1
- package/dist/{shared-json-ld-Cyv9JitF.js → shared-json-ld-C4Kjka5m.js} +1 -1
- package/dist/{shared-json-ld-D5F8RuF2.cjs → shared-json-ld-pNjN-zzY.cjs} +1 -1
- package/dist/{slug-input-3vWL9FPC.cjs → slug-input-BeepGXWz.cjs} +1 -1
- package/dist/{slug-input-D4e2anEs.js → slug-input-CKIckRno.js} +1 -1
- package/dist/{theme-panel-footer-4dbLfEph.cjs → theme-panel-footer-B0NRCfkL.cjs} +1 -1
- package/dist/{theme-panel-footer-D3Gub87c.js → theme-panel-footer-DscF7mar.js} +1 -1
- package/dist/{unmark-as-template-Dkc7zLZr.cjs → unmark-as-template-9-wHwCPl.cjs} +1 -1
- package/dist/{unmark-as-template-BENGNo7g.js → unmark-as-template-Dezq0GEM.js} +1 -1
- package/dist/{unpublish-page-D5tWKVLY.js → unpublish-page-COPOrCk_.js} +1 -1
- package/dist/{unpublish-page-Cui0tgvd.cjs → unpublish-page-DU3jKAJ5.cjs} +1 -1
- package/dist/{web-preview-CcPTcMio.cjs → web-preview-DBBTePPU.cjs} +1 -1
- package/dist/{web-preview-CHNZZcqH.js → web-preview-sSS97N-o.js} +1 -1
- package/package.json +1 -1
- package/dist/index-BELYt0c9.cjs +0 -5
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _r = Object.defineProperty;
|
|
2
2
|
var Un = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var Pe = (e, t, n) =>
|
|
7
|
-
var S = (e, t, n) => (Bn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), D = (e, t, n) => t.has(e) ? Un("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n),
|
|
5
|
+
var Pr = (e, t, n) => t in e ? _r(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var Pe = (e, t, n) => Pr(e, typeof t != "symbol" ? t + "" : t, n), Bn = (e, t, n) => t.has(e) || Un("Cannot " + n);
|
|
7
|
+
var S = (e, t, n) => (Bn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), D = (e, t, n) => t.has(e) ? Un("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), k = (e, t, n, s) => (Bn(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
8
8
|
import { jsx as c, jsxs as m, Fragment as ge } from "react/jsx-runtime";
|
|
9
|
-
import { get as V, reverse as
|
|
9
|
+
import { get as V, reverse as vr, sortBy as wr, each as br, find as re, isEmpty as he, groupBy as Ir, minBy as Cr, noop as ds, keyBy as Nr, map as Ut, compact as fs, upperCase as Mn, filter as hs, includes as Lr, has as $t, pick as Pn, keys as kr, pickBy as Or, endsWith as Dr, isArray as Gr, startCase as xr, isFunction as Rr, cloneDeep as Ur, isEqual as Br } from "lodash-es";
|
|
10
10
|
import * as z from "react";
|
|
11
|
-
import
|
|
11
|
+
import Mr, { useMemo as Q, useCallback as j, useState as q, useEffect as se, useRef as at, lazy as K, Suspense as H, createContext as Fr, Component as qr, createElement as Fn } from "react";
|
|
12
12
|
import { atom as Ee, useAtom as te } from "jotai";
|
|
13
|
-
import { useQuery as ae, useQueryClient as W, useMutation as X, onlineManager as gs, QueryClient as
|
|
14
|
-
import { useLanguages as
|
|
13
|
+
import { useQuery as ae, useQueryClient as W, useMutation as X, onlineManager as gs, QueryClient as Kr, QueryClientProvider as Vr } from "@tanstack/react-query";
|
|
14
|
+
import { useLanguages as Se, useSavePage as Ge, useTranslation as we, mergeClasses as Bt, usePermissions as ms, PERMISSIONS as Hr, useRightPanel as Qr, useChaiFeatureFlag as $r, useIsPageLoaded as jr, registerChaiLibrary as zr, getBlocksFromHTML as Wr, registerChaiSidebarPanel as en, registerChaiFeatureFlag as qn, registerChaiTopBar as Yr, registerChaiMediaManager as Jr, registerChaiSaveToLibrary as Xr, ChaiBuilderEditor as Zr } from "@chaibuilder/sdk";
|
|
15
15
|
import { toast as R } from "sonner";
|
|
16
|
-
import { Tooltip as
|
|
17
|
-
import { LogsIcon as
|
|
18
|
-
import { useRegisteredChaiBlocks as
|
|
19
|
-
import { loadWebBlocks as
|
|
16
|
+
import { Tooltip as jt, TooltipTrigger as zt, Button as M, TooltipContent as Wt, Sheet as Es, SheetContent as ps, SheetHeader as ea, SheetTitle as ta, SheetDescription as na, DropdownMenu as vn, DropdownMenuTrigger as wn, DropdownMenuContent as bn, DropdownMenuItem as ue, Separator as sa, TooltipProvider as ys, SheetTrigger as ra, Skeleton as Ct, Dialog as As, HoverCard as aa, HoverCardTrigger as ia, HoverCardContent as oa, AlertDialog as la, AlertDialogTrigger as ca, AlertDialogContent as ua, AlertDialogHeader as da, AlertDialogTitle as fa, AlertDialogDescription as ha, AlertDialogFooter as ga, AlertDialogCancel as ma, AlertDialogAction as Ea, Popover as pa, PopoverTrigger as ya, DialogContent as Aa, DialogHeader as Ta, DialogTitle as Sa, Tabs as _a, TabsList as Pa, TabsTrigger as tn, TabsContent as nn, Textarea as Kn, Alert as va, AlertDescription as wa } from "@chaibuilder/sdk/ui";
|
|
17
|
+
import { LogsIcon as ba, Folder as Ia, Languages as Vn, ChevronDown as fn, Star as Ca, Plus as Ts, History as Na, Play as La, Palette as ka, CheckCircle as Oa, Loader as Mt, Save as Da, Send as Hn, Rocket as Qn, CopyPlusIcon as Ga, Pencil as xa, Power as Ra, Trash as Ua, SquareLibrary as $n, Hash as Ba, File as Ma, MoreHorizontal as jn, ExternalLink as Fa, LanguagesIcon as qa, User as Ka, X as zn, Trash2 as Va, ImageIcon as Wn, Code as Ha, Eye as Qa, Share2 as $a, FileCode2 as ja, AlertTriangle as za } from "lucide-react";
|
|
18
|
+
import { useRegisteredChaiBlocks as Wa, getDefaultBlockProps as Ya } from "@chaibuilder/runtime";
|
|
19
|
+
import { loadWebBlocks as Ja } from "@chaibuilder/sdk/web-blocks";
|
|
20
20
|
const E = {
|
|
21
21
|
GET_GLOBAL_JSONLD_ITEMS: "GET_GLOBAL_JSONLD_ITEMS",
|
|
22
22
|
GENERATE_SEO_FIELD: "GENERATE_SEO_FIELD",
|
|
@@ -81,10 +81,10 @@ const E = {
|
|
|
81
81
|
UPDATE_ASSET: "UPDATE_ASSET",
|
|
82
82
|
GET_ASSETS: "GET_ASSETS",
|
|
83
83
|
GET_ASSET: "GET_ASSET"
|
|
84
|
-
},
|
|
84
|
+
}, Xa = Ee({}), In = () => te(Xa), oe = (e, t) => {
|
|
85
85
|
const [n] = In();
|
|
86
|
-
return
|
|
87
|
-
},
|
|
86
|
+
return Q(() => V(n, e, t), [n, e, t]);
|
|
87
|
+
}, N = () => oe("apiUrl", "/chai/api"), Ss = () => oe("usersApiUrl", "/chai/users"), Ic = () => oe("assetsApiUrl", "/chai/assets"), Za = () => oe("websocket", null), _s = async (e, t, n = {}) => await fetch(e, {
|
|
88
88
|
method: "POST",
|
|
89
89
|
headers: {
|
|
90
90
|
"Content-Type": "application/json",
|
|
@@ -101,42 +101,52 @@ if (import.meta.vitest) {
|
|
|
101
101
|
t(n).toBeDefined();
|
|
102
102
|
});
|
|
103
103
|
}
|
|
104
|
-
const
|
|
105
|
-
const e =
|
|
106
|
-
return
|
|
107
|
-
async (
|
|
108
|
-
|
|
109
|
-
|
|
104
|
+
const Cc = () => {
|
|
105
|
+
const e = I(), t = N();
|
|
106
|
+
return j(
|
|
107
|
+
async ({
|
|
108
|
+
body: n,
|
|
109
|
+
headers: s = {},
|
|
110
|
+
url: r = t
|
|
111
|
+
}) => e(r, n, s),
|
|
112
|
+
[e]
|
|
113
|
+
);
|
|
114
|
+
}, I = () => {
|
|
115
|
+
const e = oe("onLogout"), t = oe("getAccessToken"), n = N();
|
|
116
|
+
return j(
|
|
117
|
+
async (s = n, r, a = {}) => {
|
|
118
|
+
const i = await t();
|
|
119
|
+
if (!i)
|
|
110
120
|
return console.error("No auth token found"), null;
|
|
111
121
|
try {
|
|
112
|
-
const
|
|
113
|
-
...
|
|
114
|
-
Authorization: `Bearer ${
|
|
122
|
+
const o = V(r, "action", "").toLowerCase(), l = await _s(s + (o ? `?action=${o}` : ""), r, {
|
|
123
|
+
...a,
|
|
124
|
+
Authorization: `Bearer ${i}`
|
|
115
125
|
});
|
|
116
|
-
if (
|
|
117
|
-
return console.log("401 Response",
|
|
118
|
-
if (!
|
|
119
|
-
const
|
|
120
|
-
throw console.error(`API Error (${
|
|
121
|
-
status:
|
|
122
|
-
statusText:
|
|
123
|
-
...
|
|
124
|
-
message:
|
|
126
|
+
if (l.status === 401)
|
|
127
|
+
return console.log("401 Response", l), e(), window.location.reload(), null;
|
|
128
|
+
if (!l.ok) {
|
|
129
|
+
const u = await l.json();
|
|
130
|
+
throw console.error(`API Error (${l.status}):`, u), {
|
|
131
|
+
status: l.status,
|
|
132
|
+
statusText: l.statusText,
|
|
133
|
+
...u,
|
|
134
|
+
message: u.error || u.message || `Server error: ${l.status}`
|
|
125
135
|
};
|
|
126
136
|
}
|
|
127
|
-
return await
|
|
128
|
-
} catch (
|
|
129
|
-
throw console.error("API request failed:",
|
|
137
|
+
return await l.json();
|
|
138
|
+
} catch (o) {
|
|
139
|
+
throw console.error("API request failed:", r, o), o;
|
|
130
140
|
}
|
|
131
141
|
},
|
|
132
142
|
[e, t]
|
|
133
143
|
);
|
|
134
144
|
};
|
|
135
|
-
function
|
|
145
|
+
function le() {
|
|
136
146
|
const [e, t] = q(
|
|
137
147
|
new URLSearchParams(window.location.search)
|
|
138
148
|
);
|
|
139
|
-
return
|
|
149
|
+
return se(() => {
|
|
140
150
|
const n = () => {
|
|
141
151
|
t(new URLSearchParams(window.location.search));
|
|
142
152
|
};
|
|
@@ -146,7 +156,7 @@ function oe() {
|
|
|
146
156
|
}, []), [e, t];
|
|
147
157
|
}
|
|
148
158
|
const xe = (e) => {
|
|
149
|
-
const t =
|
|
159
|
+
const t = N(), [n] = le(), s = e ?? n.get("page"), r = I();
|
|
150
160
|
return ae({
|
|
151
161
|
queryKey: [E.GET_LANGUAGE_PAGES, s],
|
|
152
162
|
staleTime: 1 / 0,
|
|
@@ -158,12 +168,12 @@ const xe = (e) => {
|
|
|
158
168
|
action: E.GET_LANGUAGE_PAGES,
|
|
159
169
|
data: { id: s }
|
|
160
170
|
});
|
|
161
|
-
return
|
|
171
|
+
return vr(wr(a, "primaryPage"));
|
|
162
172
|
},
|
|
163
173
|
enabled: !!s
|
|
164
174
|
});
|
|
165
175
|
}, Re = () => {
|
|
166
|
-
const e =
|
|
176
|
+
const e = N(), t = I();
|
|
167
177
|
return ae({
|
|
168
178
|
queryKey: [E.GET_WEBSITE_DRAFT_SETTINGS],
|
|
169
179
|
staleTime: 5 * 60 * 1e3,
|
|
@@ -179,16 +189,16 @@ const xe = (e) => {
|
|
|
179
189
|
})
|
|
180
190
|
});
|
|
181
191
|
}, Ps = (e) => {
|
|
182
|
-
const { fallbackLang: t } =
|
|
192
|
+
const { fallbackLang: t } = Se(), { data: n } = Re(), { data: s, isFetching: r } = xe(), a = Q(() => {
|
|
183
193
|
const i = { [t]: !0 };
|
|
184
|
-
return
|
|
185
|
-
const l =
|
|
194
|
+
return br(V(n, "languages"), (o) => {
|
|
195
|
+
const l = re(s, { lang: o });
|
|
186
196
|
i[o] = !!l;
|
|
187
197
|
}), i;
|
|
188
198
|
}, [t, s, n]);
|
|
189
199
|
return r || he(e) || e && a[e];
|
|
190
200
|
};
|
|
191
|
-
class
|
|
201
|
+
class ei {
|
|
192
202
|
constructor(t, n, s, r) {
|
|
193
203
|
Pe(this, "channelId");
|
|
194
204
|
Pe(this, "websocket");
|
|
@@ -197,25 +207,25 @@ class Xa {
|
|
|
197
207
|
Pe(this, "clientId", null);
|
|
198
208
|
Pe(this, "pageId", null);
|
|
199
209
|
Pe(this, "callback");
|
|
200
|
-
var a, i, o, l,
|
|
201
|
-
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 } } }), (
|
|
202
|
-
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC",
|
|
203
|
-
})) == null ? void 0 : i.on("presence", { event: "leave" }, (
|
|
204
|
-
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC",
|
|
205
|
-
})) == null ? void 0 : o.on("presence", { event: "join" }, (
|
|
206
|
-
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC",
|
|
210
|
+
var a, i, o, l, u, f;
|
|
211
|
+
this.userId = s, this.websocket = t, this.clientId = this.getClientId(), this.channelId = `WEBSITE:${n}`, this.callback = r, this.channel = this.websocket.channel(this.channelId, { config: { presence: { key: this.clientId } } }), (f = (u = (l = (o = (i = (a = this.channel) == null ? void 0 : a.on("presence", { event: "sync" }, (d) => {
|
|
212
|
+
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", d);
|
|
213
|
+
})) == null ? void 0 : i.on("presence", { event: "leave" }, (d) => {
|
|
214
|
+
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", d);
|
|
215
|
+
})) == null ? void 0 : o.on("presence", { event: "join" }, (d) => {
|
|
216
|
+
this.callback("UPDATE_ONLINE_USERS", { pageToUser: this.getPageUserMapping() }), this.onReceiveEvent("SYNC", d);
|
|
207
217
|
})) == null ? void 0 : l.on(
|
|
208
218
|
"broadcast",
|
|
209
219
|
{ event: "TAKE_OVER_REQUESTED" },
|
|
210
|
-
({ payload:
|
|
211
|
-
)) == null ? void 0 :
|
|
220
|
+
({ payload: d }) => this.onReceiveEvent("TAKE_OVER_REQUESTED", d)
|
|
221
|
+
)) == null ? void 0 : u.on(
|
|
212
222
|
"broadcast",
|
|
213
223
|
{ event: "TAKE_OVER_REQUEST_ACCEPTED" },
|
|
214
|
-
({ payload:
|
|
215
|
-
)) == null ||
|
|
224
|
+
({ payload: d }) => this.onReceiveEvent("TAKE_OVER_REQUEST_ACCEPTED", d)
|
|
225
|
+
)) == null || f.on(
|
|
216
226
|
"broadcast",
|
|
217
227
|
{ event: "TAKE_OVER_REQUEST_REJECTED" },
|
|
218
|
-
({ payload:
|
|
228
|
+
({ payload: d }) => this.onReceiveEvent("TAKE_OVER_REQUEST_REJECTED", d)
|
|
219
229
|
).subscribe();
|
|
220
230
|
}
|
|
221
231
|
getClientId() {
|
|
@@ -232,10 +242,10 @@ class Xa {
|
|
|
232
242
|
return t.length > 0 ? t[0] : null;
|
|
233
243
|
}
|
|
234
244
|
getPageUserMapping() {
|
|
235
|
-
const t = this.getOnlineUsers({}), n =
|
|
245
|
+
const t = this.getOnlineUsers({}), n = Ir(t, "pageId"), s = {};
|
|
236
246
|
return Object.keys(n).forEach((r) => {
|
|
237
247
|
var i;
|
|
238
|
-
const a = (i =
|
|
248
|
+
const a = (i = Cr(n[r], "onlineAt")) == null ? void 0 : i.userId;
|
|
239
249
|
a !== this.userId && (s[r] = a);
|
|
240
250
|
}), s;
|
|
241
251
|
}
|
|
@@ -295,21 +305,21 @@ class Xa {
|
|
|
295
305
|
}
|
|
296
306
|
}
|
|
297
307
|
}
|
|
298
|
-
const
|
|
308
|
+
const ti = Ee(
|
|
299
309
|
null
|
|
300
|
-
),
|
|
301
|
-
const [e] =
|
|
310
|
+
), vs = () => te(ti), Cn = () => {
|
|
311
|
+
const [e] = vs();
|
|
302
312
|
return (e == null ? void 0 : e.slug) || "";
|
|
303
313
|
};
|
|
304
|
-
function
|
|
314
|
+
function ni(e, t) {
|
|
305
315
|
const [n, s] = q(e);
|
|
306
|
-
return
|
|
316
|
+
return se(() => {
|
|
307
317
|
const r = setTimeout(() => s(e), t);
|
|
308
318
|
return () => clearTimeout(r);
|
|
309
319
|
}, [e, t]), n;
|
|
310
320
|
}
|
|
311
|
-
const
|
|
312
|
-
const { selectedLang: n, fallbackLang: s } =
|
|
321
|
+
const si = ({ query: e, uuid: t }) => {
|
|
322
|
+
const { selectedLang: n, fallbackLang: s } = Se(), { data: r } = ie(), a = r == null ? void 0 : r.pageType, i = N(), o = I(), { data: l, isFetching: u } = ae({
|
|
313
323
|
queryKey: [E.GET_DYNAMIC_PAGES, e, a, t],
|
|
314
324
|
staleTime: 60 * 60 * 1e3,
|
|
315
325
|
placeholderData: [],
|
|
@@ -318,45 +328,45 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
318
328
|
data: { query: e, pageType: a, uuid: t }
|
|
319
329
|
}) || [],
|
|
320
330
|
enabled: !!a
|
|
321
|
-
}),
|
|
322
|
-
return { allLangPages: l, data:
|
|
323
|
-
},
|
|
324
|
-
const { selectedLang: e, fallbackLang: t } =
|
|
331
|
+
}), f = Q(() => n === "" ? l.filter((d) => d.lang === "" || d.lang === s) : l.filter((d) => d.lang === n), [n, s, l]);
|
|
332
|
+
return { allLangPages: l, data: f, isFetching: u };
|
|
333
|
+
}, ri = () => {
|
|
334
|
+
const { selectedLang: e, fallbackLang: t } = Se(), [n, s] = vs(), [r, a] = q(""), i = ni(r, 500), { allLangPages: o, data: l, isFetching: u } = si({ query: i }), f = j((g) => s(g), [s]), d = j((g) => a(g), [a]), h = j(() => {
|
|
325
335
|
if (!n) return;
|
|
326
336
|
const g = !(n != null && n.primaryPage), A = e.length === 0, T = g ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, y = o.filter(
|
|
327
|
-
(
|
|
328
|
-
).find((
|
|
337
|
+
(P) => (P == null ? void 0 : P.primaryPage) === T || P.id === T
|
|
338
|
+
).find((P) => A ? P.lang === e || P.lang === t : P.lang === e);
|
|
329
339
|
s(y || n);
|
|
330
340
|
}, [n, e, o, s, t]);
|
|
331
341
|
return {
|
|
332
|
-
isFetching:
|
|
342
|
+
isFetching: u,
|
|
333
343
|
dynamicPage: n,
|
|
334
344
|
searchQuery: r,
|
|
335
345
|
selectedLang: e,
|
|
336
346
|
dynamicPages: l,
|
|
337
347
|
allLangPages: o,
|
|
338
|
-
updateDynamicPage:
|
|
339
|
-
updateSearchQuery:
|
|
348
|
+
updateDynamicPage: f,
|
|
349
|
+
updateSearchQuery: d,
|
|
340
350
|
onChangeLanguage: h
|
|
341
351
|
};
|
|
342
|
-
},
|
|
343
|
-
const [e] =
|
|
344
|
-
return { data:
|
|
352
|
+
}, ai = Ee({ lastSaved: void 0 }), Nn = () => te(ai), ie = () => {
|
|
353
|
+
const [e] = le(), t = e.get("page"), { data: n, isFetching: s } = xe();
|
|
354
|
+
return { data: Q(() => ({ ...re(n, { id: t }) || {} }), [n, t]), isFetching: s };
|
|
345
355
|
}, be = () => {
|
|
346
|
-
const [e] =
|
|
347
|
-
return { data:
|
|
348
|
-
},
|
|
349
|
-
const { data: e } = be(), t = Cn(), n =
|
|
356
|
+
const [e] = le(), t = e.get("lang") ?? "", { data: n, isFetching: s } = xe();
|
|
357
|
+
return { data: Q(() => re(n, { lang: t }) || {}, [n, t]), isFetching: s };
|
|
358
|
+
}, ii = Ee({}), oi = () => te(ii), li = () => {
|
|
359
|
+
const { data: e } = be(), t = Cn(), n = oe("getLiveUrl", ds), s = e == null ? void 0 : e.slug, r = n(s || "/");
|
|
350
360
|
return t ? r + t : r;
|
|
351
|
-
},
|
|
352
|
-
const e =
|
|
361
|
+
}, Yt = () => {
|
|
362
|
+
const e = oe("currentUser"), t = oe("onLogout");
|
|
353
363
|
return {
|
|
354
364
|
isLoggedIn: !!e,
|
|
355
365
|
user: e,
|
|
356
366
|
logout: t
|
|
357
367
|
};
|
|
358
|
-
},
|
|
359
|
-
const t = Ss(), n =
|
|
368
|
+
}, ci = (e) => {
|
|
369
|
+
const t = Ss(), n = I();
|
|
360
370
|
return ae({
|
|
361
371
|
queryKey: [E.GET_CHAI_USER, e],
|
|
362
372
|
queryFn: async () => {
|
|
@@ -369,14 +379,14 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
369
379
|
enabled: !he(e),
|
|
370
380
|
staleTime: "static"
|
|
371
381
|
});
|
|
372
|
-
},
|
|
382
|
+
}, ui = Ee({
|
|
373
383
|
status: "checking",
|
|
374
384
|
requestedBy: "",
|
|
375
385
|
isTakeOverRequested: !1,
|
|
376
386
|
requestingClientId: "",
|
|
377
387
|
isActiveInOtherTab: !1
|
|
378
|
-
}),
|
|
379
|
-
const [e] =
|
|
388
|
+
}), di = Ee(""), fi = Ee(null), Ln = Ee({}), Nc = () => te(Ln), Ie = () => {
|
|
389
|
+
const [e] = le(), t = e.get("page"), [n, s] = te(ui), [r, a] = te(fi), [i, o] = te(di), [l] = te(Ln);
|
|
380
390
|
return {
|
|
381
391
|
pageLock: n,
|
|
382
392
|
pageToUser: l,
|
|
@@ -389,13 +399,13 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
389
399
|
currentEditor: l[t || ""],
|
|
390
400
|
isLocked: t && n.status === "locked"
|
|
391
401
|
};
|
|
392
|
-
},
|
|
393
|
-
const e =
|
|
394
|
-
return
|
|
402
|
+
}, hi = () => {
|
|
403
|
+
const e = Za(), { data: t } = ie(), { user: n } = Yt(), s = t == null ? void 0 : t.id, { data: r } = Re(), { pageLock: a, setPageLock: i, setLockingStatus: o, realtimeInstance: l, setRealtimeInstance: u } = Ie(), [, f] = te(Ln), d = at(!1), h = at(a), g = at(!1);
|
|
404
|
+
return se(() => {
|
|
395
405
|
if (n != null && n.id && e && !l && (r != null && r.appKey) && !g.current) {
|
|
396
406
|
g.current = !0;
|
|
397
407
|
const A = async (p, y) => {
|
|
398
|
-
var
|
|
408
|
+
var P, w;
|
|
399
409
|
switch (p) {
|
|
400
410
|
/**
|
|
401
411
|
* When user joins
|
|
@@ -403,7 +413,7 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
403
413
|
* - Update page user mapping
|
|
404
414
|
*/
|
|
405
415
|
case "UPDATE_ONLINE_USERS":
|
|
406
|
-
|
|
416
|
+
f((y == null ? void 0 : y.pageToUser) || {});
|
|
407
417
|
break;
|
|
408
418
|
/**
|
|
409
419
|
* When page is locked
|
|
@@ -424,8 +434,8 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
424
434
|
* - User will be owner of this page
|
|
425
435
|
*/
|
|
426
436
|
case "USER_JOINED":
|
|
427
|
-
if (((
|
|
428
|
-
((
|
|
437
|
+
if (((P = h == null ? void 0 : h.current) == null ? void 0 : P.status) === "editing") return;
|
|
438
|
+
((w = h == null ? void 0 : h.current) == null ? void 0 : w.status) === "locked" && o("can_edit_now"), i({
|
|
429
439
|
...h == null ? void 0 : h.current,
|
|
430
440
|
requestedBy: "",
|
|
431
441
|
status: "editing",
|
|
@@ -474,20 +484,20 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
474
484
|
});
|
|
475
485
|
break;
|
|
476
486
|
}
|
|
477
|
-
}, T = new
|
|
487
|
+
}, T = new ei(
|
|
478
488
|
e,
|
|
479
489
|
r == null ? void 0 : r.appKey,
|
|
480
490
|
n == null ? void 0 : n.id,
|
|
481
491
|
A
|
|
482
492
|
);
|
|
483
|
-
|
|
493
|
+
u(T);
|
|
484
494
|
}
|
|
485
|
-
}, [
|
|
495
|
+
}, [u, e, r == null ? void 0 : r.appKey]), se(() => {
|
|
486
496
|
h.current = a;
|
|
487
|
-
}, [a]),
|
|
488
|
-
if (!(!l || !s || !(n != null && n.id) ||
|
|
489
|
-
return
|
|
490
|
-
l &&
|
|
497
|
+
}, [a]), se(() => {
|
|
498
|
+
if (!(!l || !s || !(n != null && n.id) || d.current))
|
|
499
|
+
return d.current = !0, l == null || l.joinPage(s), () => {
|
|
500
|
+
l && d.current && (d.current = !1, h.current = {
|
|
491
501
|
requestedBy: "",
|
|
492
502
|
status: "checking",
|
|
493
503
|
requestingClientId: "",
|
|
@@ -496,10 +506,10 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
496
506
|
}, o(""), i(h.current), l == null || l.leavePage());
|
|
497
507
|
};
|
|
498
508
|
}, [s, l]), a == null ? void 0 : a.status;
|
|
499
|
-
},
|
|
500
|
-
const { data: e } = ie(), { user: t } =
|
|
509
|
+
}, gi = () => {
|
|
510
|
+
const { data: e } = ie(), { user: t } = Yt(), n = e == null ? void 0 : e.id, { pageLock: s, setPageLock: r, realtimeInstance: a } = Ie(), { savePageAsync: i } = Ge(), o = j(() => {
|
|
501
511
|
!a || !n || !(t != null && t.id) || (r({ ...s, isTakeOverRequested: !0 }), a == null || a.sendEvent("TAKE_OVER_REQUESTED"));
|
|
502
|
-
}, [a, n, t == null ? void 0 : t.id, r, s]), l =
|
|
512
|
+
}, [a, n, t == null ? void 0 : t.id, r, s]), l = j(async () => {
|
|
503
513
|
!a || !n || !(t != null && t.id) || (await i(), a == null || a.sendEvent("TAKE_OVER_REQUEST_ACCEPTED", {
|
|
504
514
|
requestingClientId: s == null ? void 0 : s.requestingClientId
|
|
505
515
|
}), r({
|
|
@@ -509,7 +519,7 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
509
519
|
isActiveInOtherTab: !1,
|
|
510
520
|
isTakeOverRequested: !1
|
|
511
521
|
}));
|
|
512
|
-
}, [n, a, t == null ? void 0 : t.id, r, i, s]),
|
|
522
|
+
}, [n, a, t == null ? void 0 : t.id, r, i, s]), u = j(() => {
|
|
513
523
|
!a || !n || !(t != null && t.id) || (a == null || a.sendEvent("TAKE_OVER_REQUEST_REJECTED", {
|
|
514
524
|
requestingClientId: s == null ? void 0 : s.requestingClientId
|
|
515
525
|
}), r({
|
|
@@ -524,14 +534,14 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
524
534
|
return {
|
|
525
535
|
pageLock: s,
|
|
526
536
|
acceptTakeOver: l,
|
|
527
|
-
rejectTakeOver:
|
|
537
|
+
rejectTakeOver: u,
|
|
528
538
|
requestTakeOver: o
|
|
529
539
|
};
|
|
530
|
-
},
|
|
531
|
-
const { pageLock: t, requestTakeOver: n } =
|
|
540
|
+
}, mi = K(() => import("./no-language-page-content-CtN5VB9K.js")), Ei = K(() => import("./page-locked-by-dialog-BQV9X0UF.js")), sn = K(() => import("./page-lock-request-01G9AeVF.js")), pi = ({ isFetchingPage: e }) => {
|
|
541
|
+
const { pageLock: t, requestTakeOver: n } = gi(), { currentEditor: s, lockingStatus: r, setLockingStatus: a, realtimePageLockEnabled: i } = Ie(), { data: o, isFetching: l } = ci(s), [u] = le(), f = u.get("page"), [d] = Nn(), h = W(), g = j(() => {
|
|
532
542
|
n();
|
|
533
543
|
}, [n]);
|
|
534
|
-
return !
|
|
544
|
+
return !f || e || !i || (t == null ? void 0 : t.status) === "checking" ? null : t != null && t.requestedBy ? /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
535
545
|
sn,
|
|
536
546
|
{
|
|
537
547
|
lockingStatus: "",
|
|
@@ -550,22 +560,22 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
550
560
|
}
|
|
551
561
|
}
|
|
552
562
|
) }) : null : t != null && t.isActiveInOtherTab ? /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(sn, { lockingStatus: "page_is_active_in_other_tab", onContinue: n }) }) : /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
553
|
-
|
|
563
|
+
Ei,
|
|
554
564
|
{
|
|
555
565
|
...o,
|
|
556
566
|
isFetchingUserInfo: l,
|
|
557
567
|
name: (o == null ? void 0 : o.name) || "Unknown User",
|
|
558
568
|
email: (o == null ? void 0 : o.email) || "",
|
|
559
|
-
lastSaved: (
|
|
569
|
+
lastSaved: (d == null ? void 0 : d.lastSaved) || "",
|
|
560
570
|
onTakeOver: g,
|
|
561
571
|
realtimePageLockEnabled: i,
|
|
562
572
|
isRequestRejected: r === "take_over_request_rejected"
|
|
563
573
|
}
|
|
564
574
|
) });
|
|
565
|
-
},
|
|
566
|
-
const [e] =
|
|
567
|
-
return Ps(t) ? null : /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
568
|
-
},
|
|
575
|
+
}, yi = () => {
|
|
576
|
+
const [e] = le(), t = e.get("lang");
|
|
577
|
+
return Ps(t) ? null : /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(mi, {}) });
|
|
578
|
+
}, Nt = {
|
|
569
579
|
ab: "Abkhazian",
|
|
570
580
|
aa: "Afar",
|
|
571
581
|
af: "Afrikaans",
|
|
@@ -754,26 +764,26 @@ const ti = ({ query: e, uuid: t }) => {
|
|
|
754
764
|
za: "Zhuang, Chuang",
|
|
755
765
|
zu: "Zulu"
|
|
756
766
|
};
|
|
757
|
-
function
|
|
767
|
+
function ws(e, t, n = !1) {
|
|
758
768
|
const s = e.toString() ? `?${e.toString()}` : "/";
|
|
759
769
|
n ? window.history.replaceState(null, "", s) : window.history.pushState({}, "", s), t(e), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
760
770
|
}
|
|
761
771
|
const kn = Ee(null), On = () => {
|
|
762
772
|
const { data: e } = Re();
|
|
763
|
-
return
|
|
773
|
+
return Q(
|
|
764
774
|
() => (e == null ? void 0 : e.fallbackLang) || "en",
|
|
765
775
|
[e]
|
|
766
776
|
);
|
|
767
777
|
}, bs = () => {
|
|
768
|
-
const e =
|
|
778
|
+
const e = I(), t = N();
|
|
769
779
|
return ae({
|
|
770
780
|
queryKey: [E.GET_WEBSITE_PAGES],
|
|
771
781
|
staleTime: 1e3 * 60 * 5,
|
|
772
782
|
queryFn: async () => e(t, { action: E.GET_WEBSITE_PAGES }) || [],
|
|
773
783
|
placeholderData: (n) => n || []
|
|
774
784
|
});
|
|
775
|
-
},
|
|
776
|
-
const t =
|
|
785
|
+
}, Lc = (e) => {
|
|
786
|
+
const t = I(), n = N(), s = On();
|
|
777
787
|
return ae({
|
|
778
788
|
queryKey: [E.GET_WEBSITE_PAGES, e, s],
|
|
779
789
|
staleTime: 1e3 * 60 * 5,
|
|
@@ -781,116 +791,116 @@ const kn = Ee(null), On = () => {
|
|
|
781
791
|
queryFn: async () => {
|
|
782
792
|
if (s === e) return {};
|
|
783
793
|
const r = await t(n, { action: E.GET_WEBSITE_PAGES, data: { lang: e } }) || [];
|
|
784
|
-
return
|
|
785
|
-
|
|
794
|
+
return Nr(
|
|
795
|
+
Ut(r, (a) => ({ ...a, lang: e })),
|
|
786
796
|
"primaryPage"
|
|
787
797
|
);
|
|
788
798
|
},
|
|
789
799
|
placeholderData: (r) => r || {}
|
|
790
800
|
});
|
|
791
|
-
},
|
|
792
|
-
const { t } =
|
|
801
|
+
}, Ai = K(() => import("./page-manager-new-DE_2H_ow.js")), Is = ({ children: e }) => {
|
|
802
|
+
const { t } = we(), [n, s] = le(), r = n.get("page"), { data: a, isFetching: i } = ie(), { data: o, isFetching: l } = bs(), [u, f] = q(!1), [d, h] = q(!0), { savePage: g } = Ge(), A = !!r && !he(a), T = Q(() => {
|
|
793
803
|
if (!o || l) return !1;
|
|
794
|
-
const
|
|
795
|
-
return
|
|
804
|
+
const w = o.find((O) => O.slug === "/");
|
|
805
|
+
return w == null ? void 0 : w.id;
|
|
796
806
|
}, [o, l]);
|
|
797
|
-
|
|
807
|
+
se(() => {
|
|
798
808
|
if (l || !T || o.some((B) => B.id === r)) return;
|
|
799
809
|
const O = new URLSearchParams({ page: T });
|
|
800
|
-
|
|
810
|
+
ws(O, s), !l && o && h(!1);
|
|
801
811
|
}, [r, l, o, T, s]);
|
|
802
|
-
const p = !
|
|
812
|
+
const p = !d && !r, y = !d && !i && he(a), P = u || p || y;
|
|
803
813
|
return /* @__PURE__ */ m(ge, { children: [
|
|
804
|
-
/* @__PURE__ */ c("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ c("div", { className: "relative", children: /* @__PURE__ */ m(
|
|
814
|
+
/* @__PURE__ */ c("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ c("div", { className: "relative", children: /* @__PURE__ */ m(jt, { children: [
|
|
805
815
|
/* @__PURE__ */ c(
|
|
806
|
-
|
|
816
|
+
zt,
|
|
807
817
|
{
|
|
808
818
|
asChild: !0,
|
|
809
819
|
onClick: () => {
|
|
810
|
-
g(),
|
|
820
|
+
g(), f(!0);
|
|
811
821
|
},
|
|
812
|
-
children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(
|
|
822
|
+
children: e || /* @__PURE__ */ c(M, { variant: "outline", className: "flex w-full items-center space-x-2 py-1", children: /* @__PURE__ */ c(ba, { className: "h-4 w-4" }) }, "template-viewer")
|
|
813
823
|
}
|
|
814
824
|
),
|
|
815
|
-
/* @__PURE__ */ c(
|
|
825
|
+
/* @__PURE__ */ c(Wt, { side: "right", children: /* @__PURE__ */ c("p", { children: t("Open pages manager") }) })
|
|
816
826
|
] }) }) }),
|
|
817
|
-
/* @__PURE__ */ c(Es, { open:
|
|
827
|
+
/* @__PURE__ */ c(Es, { open: P, onOpenChange: (w) => !w && A && f(!1), children: /* @__PURE__ */ m(
|
|
818
828
|
ps,
|
|
819
829
|
{
|
|
820
830
|
side: "left",
|
|
821
831
|
"aria-describedby": "pages-manager-description",
|
|
822
832
|
className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${A ? "" : "sheet-hide-close-btn"}`,
|
|
823
833
|
children: [
|
|
824
|
-
/* @__PURE__ */ m(
|
|
825
|
-
/* @__PURE__ */ m(
|
|
826
|
-
/* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(
|
|
834
|
+
/* @__PURE__ */ m(ea, { className: "mb-3 px-4 pt-4", children: [
|
|
835
|
+
/* @__PURE__ */ m(ta, { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
836
|
+
/* @__PURE__ */ c("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ c(Ia, { className: "h-4 w-4" }) }),
|
|
827
837
|
/* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
828
838
|
/* @__PURE__ */ c("span", { className: "text-sm font-semibold", children: t("Pages") }),
|
|
829
839
|
/* @__PURE__ */ c("span", { id: "pages-manager-description", className: "text-xs font-normal text-muted-foreground", children: t("Manage your site structure") })
|
|
830
840
|
] })
|
|
831
841
|
] }),
|
|
832
|
-
/* @__PURE__ */ c(
|
|
842
|
+
/* @__PURE__ */ c(na, { className: "sr-only", children: t("Manage your site structure") })
|
|
833
843
|
] }),
|
|
834
|
-
/* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children:
|
|
844
|
+
/* @__PURE__ */ c("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: P && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(Ai, { close: () => f(!1) }) }) })
|
|
835
845
|
]
|
|
836
846
|
}
|
|
837
847
|
) })
|
|
838
848
|
] });
|
|
839
|
-
},
|
|
840
|
-
const e =
|
|
841
|
-
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children:
|
|
842
|
-
},
|
|
849
|
+
}, Ti = K(() => import("./add-new-language-page-3fFJlIi4.js")), Si = () => {
|
|
850
|
+
const e = oe("topLeftCorner", null);
|
|
851
|
+
return e ? /* @__PURE__ */ c("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: Mr.createElement(e, {}) }) : null;
|
|
852
|
+
}, _i = ({
|
|
843
853
|
showAdd: e = !0,
|
|
844
854
|
variant: t = "ghost"
|
|
845
855
|
}) => {
|
|
846
|
-
const { fallbackLang: n, languages: s, selectedLang: r, setSelectedLang: a } =
|
|
847
|
-
|
|
856
|
+
const { fallbackLang: n, languages: s, selectedLang: r, setSelectedLang: a } = Se(), i = he(r) ? n : r, [, o] = le(), { isLocked: l } = Ie();
|
|
857
|
+
se(() => {
|
|
848
858
|
const p = new URLSearchParams(window.location.search), y = p.get("lang");
|
|
849
859
|
y && (s.includes(y) ? a(y) : (p.delete("lang"), o(p), a("")));
|
|
850
860
|
}, [s, o, a]);
|
|
851
|
-
const [,
|
|
861
|
+
const [, u] = te(kn), { data: f } = ie(), { data: d } = Re(), { data: h } = xe(), g = Q(() => {
|
|
852
862
|
const p = fs(
|
|
853
|
-
|
|
854
|
-
const
|
|
863
|
+
Ut(V(d, "languages"), (y) => {
|
|
864
|
+
const P = re(h, { lang: y });
|
|
855
865
|
return {
|
|
856
866
|
key: y,
|
|
857
|
-
value: V(
|
|
858
|
-
isLangPageAdded: !!
|
|
867
|
+
value: V(Nt, y, y),
|
|
868
|
+
isLangPageAdded: !!P
|
|
859
869
|
};
|
|
860
870
|
})
|
|
861
871
|
).filter(Boolean);
|
|
862
872
|
return [
|
|
863
873
|
{
|
|
864
874
|
key: n,
|
|
865
|
-
value: V(
|
|
875
|
+
value: V(Nt, n),
|
|
866
876
|
isLangPageAdded: !0
|
|
867
877
|
},
|
|
868
878
|
...p
|
|
869
879
|
];
|
|
870
|
-
}, [n, h,
|
|
880
|
+
}, [n, h, d]), A = (p) => {
|
|
871
881
|
if (document.querySelector('[data-panel-id="seo"]')) {
|
|
872
|
-
const
|
|
882
|
+
const P = new CustomEvent("seo-language-switch-check", {
|
|
873
883
|
detail: {
|
|
874
884
|
fromLang: i,
|
|
875
885
|
toLang: p,
|
|
876
886
|
switchHandler: () => T(p)
|
|
877
887
|
}
|
|
878
888
|
});
|
|
879
|
-
window.dispatchEvent(
|
|
889
|
+
window.dispatchEvent(P);
|
|
880
890
|
return;
|
|
881
891
|
}
|
|
882
892
|
T(p);
|
|
883
893
|
}, T = (p) => {
|
|
884
894
|
a(p);
|
|
885
895
|
const y = new URLSearchParams(window.location.search);
|
|
886
|
-
p === n ? y.delete("lang") : y.set("lang", p),
|
|
896
|
+
p === n ? y.delete("lang") : y.set("lang", p), ws(y, o);
|
|
887
897
|
};
|
|
888
898
|
return he(s) ? null : l ? /* @__PURE__ */ m(M, { variant: "ghost", size: "sm", className: "ml-px h-max cursor-not-allowed gap-2 py-1.5 opacity-50", children: [
|
|
889
899
|
/* @__PURE__ */ c(Vn, { className: "h-4 w-4" }),
|
|
890
|
-
V(
|
|
900
|
+
V(Nt, i, i),
|
|
891
901
|
/* @__PURE__ */ c(fn, { className: "h-4 w-4" })
|
|
892
|
-
] }) : /* @__PURE__ */ c(ge, { children: /* @__PURE__ */ m(
|
|
893
|
-
/* @__PURE__ */ c(
|
|
902
|
+
] }) : /* @__PURE__ */ c(ge, { children: /* @__PURE__ */ m(vn, { children: [
|
|
903
|
+
/* @__PURE__ */ c(wn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(
|
|
894
904
|
M,
|
|
895
905
|
{
|
|
896
906
|
disabled: !!l,
|
|
@@ -899,18 +909,18 @@ const kn = Ee(null), On = () => {
|
|
|
899
909
|
className: "ml-px h-max gap-2 py-1.5",
|
|
900
910
|
children: [
|
|
901
911
|
/* @__PURE__ */ c(Vn, { className: "h-4 w-4" }),
|
|
902
|
-
V(
|
|
912
|
+
V(Nt, i, i),
|
|
903
913
|
/* @__PURE__ */ c(fn, { className: "h-4 w-4" })
|
|
904
914
|
]
|
|
905
915
|
}
|
|
906
916
|
) }),
|
|
907
917
|
/* @__PURE__ */ m(bn, { className: "space-y-1 border-border", children: [
|
|
908
|
-
|
|
918
|
+
Ut(
|
|
909
919
|
g.filter((p) => p.isLangPageAdded),
|
|
910
920
|
(p) => /* @__PURE__ */ m(
|
|
911
|
-
|
|
921
|
+
ue,
|
|
912
922
|
{
|
|
913
|
-
className:
|
|
923
|
+
className: Bt(
|
|
914
924
|
"flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
|
|
915
925
|
p.key === i && "!bg-gray-200 text-gray-700"
|
|
916
926
|
),
|
|
@@ -918,7 +928,7 @@ const kn = Ee(null), On = () => {
|
|
|
918
928
|
children: [
|
|
919
929
|
/* @__PURE__ */ c("div", { className: "text-slate-600", children: p.value }),
|
|
920
930
|
p.key === n && /* @__PURE__ */ m("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
|
|
921
|
-
/* @__PURE__ */ c(
|
|
931
|
+
/* @__PURE__ */ c(Ca, { fill: "orange", className: "h-2 w-2" }),
|
|
922
932
|
"Primary"
|
|
923
933
|
] })
|
|
924
934
|
]
|
|
@@ -927,16 +937,16 @@ const kn = Ee(null), On = () => {
|
|
|
927
937
|
)
|
|
928
938
|
),
|
|
929
939
|
e && !he(g.filter((p) => !p.isLangPageAdded)) && /* @__PURE__ */ m(ge, { children: [
|
|
930
|
-
/* @__PURE__ */ c(
|
|
940
|
+
/* @__PURE__ */ c(sa, {}),
|
|
931
941
|
/* @__PURE__ */ m(
|
|
932
942
|
M,
|
|
933
943
|
{
|
|
934
944
|
size: "sm",
|
|
935
945
|
variant: "ghost",
|
|
936
946
|
onClick: () => {
|
|
937
|
-
|
|
947
|
+
f && u({
|
|
938
948
|
edit: !1,
|
|
939
|
-
primaryPage:
|
|
949
|
+
primaryPage: f.id
|
|
940
950
|
});
|
|
941
951
|
},
|
|
942
952
|
className: "text-xs font-normal duration-200 hover:bg-slate-300 hover:text-slate-800",
|
|
@@ -950,13 +960,13 @@ const kn = Ee(null), On = () => {
|
|
|
950
960
|
] })
|
|
951
961
|
] }) });
|
|
952
962
|
};
|
|
953
|
-
function
|
|
963
|
+
function Pi() {
|
|
954
964
|
const [e, t] = te(kn);
|
|
955
965
|
return /* @__PURE__ */ m("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
|
|
956
|
-
/* @__PURE__ */ c(
|
|
966
|
+
/* @__PURE__ */ c(Si, {}),
|
|
957
967
|
/* @__PURE__ */ c(Is, {}),
|
|
958
968
|
e && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
959
|
-
|
|
969
|
+
Ti,
|
|
960
970
|
{
|
|
961
971
|
isOpen: !0,
|
|
962
972
|
id: e == null ? void 0 : e.id,
|
|
@@ -968,31 +978,31 @@ function Si() {
|
|
|
968
978
|
) })
|
|
969
979
|
] });
|
|
970
980
|
}
|
|
971
|
-
function
|
|
981
|
+
function vi() {
|
|
972
982
|
return /* @__PURE__ */ c("div", { className: "mt-2 space-y-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ m("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
|
|
973
983
|
/* @__PURE__ */ m("div", { className: "flex-1 space-y-1", children: [
|
|
974
|
-
/* @__PURE__ */ c(
|
|
975
|
-
/* @__PURE__ */ c(
|
|
976
|
-
/* @__PURE__ */ c(
|
|
984
|
+
/* @__PURE__ */ c(Ct, { className: "h-4 w-3/4" }),
|
|
985
|
+
/* @__PURE__ */ c(Ct, { className: "h-3 w-1/2" }),
|
|
986
|
+
/* @__PURE__ */ c(Ct, { className: "mt-1 h-5 w-20" })
|
|
977
987
|
] }),
|
|
978
|
-
/* @__PURE__ */ c(
|
|
988
|
+
/* @__PURE__ */ c(Ct, { className: "h-8 w-8 rounded-full" })
|
|
979
989
|
] }, t)) });
|
|
980
990
|
}
|
|
981
|
-
const
|
|
982
|
-
function
|
|
991
|
+
const wi = z.lazy(() => import("./page-revisions-content-mih9gx3J.js"));
|
|
992
|
+
function bi() {
|
|
983
993
|
const [e, t] = z.useState(!1);
|
|
984
|
-
return /* @__PURE__ */ c(ys, { children: /* @__PURE__ */ m(
|
|
994
|
+
return /* @__PURE__ */ c(ys, { children: /* @__PURE__ */ m(jt, { delayDuration: 0, children: [
|
|
985
995
|
/* @__PURE__ */ m(Es, { open: e, onOpenChange: t, children: [
|
|
986
|
-
/* @__PURE__ */ c(
|
|
996
|
+
/* @__PURE__ */ c(ra, { asChild: !0, children: /* @__PURE__ */ c(zt, { asChild: !0, children: /* @__PURE__ */ m("span", { className: "flex items-center gap-2", children: [
|
|
987
997
|
/* @__PURE__ */ m(M, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
|
|
988
|
-
/* @__PURE__ */ c(
|
|
998
|
+
/* @__PURE__ */ c(Na, { className: "h-4 w-4" }),
|
|
989
999
|
/* @__PURE__ */ c("span", { className: "sr-only", children: "View revision history" })
|
|
990
1000
|
] }),
|
|
991
1001
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
992
1002
|
] }) }) }),
|
|
993
|
-
/* @__PURE__ */ c(ps, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(H, { fallback: /* @__PURE__ */ c(
|
|
1003
|
+
/* @__PURE__ */ c(ps, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ c(H, { fallback: /* @__PURE__ */ c(vi, {}), children: /* @__PURE__ */ c(wi, { isOpen: e }) }) })
|
|
994
1004
|
] }),
|
|
995
|
-
/* @__PURE__ */ c(
|
|
1005
|
+
/* @__PURE__ */ c(Wt, { side: "bottom", children: /* @__PURE__ */ c("p", { children: "Revision history" }) })
|
|
996
1006
|
] }) });
|
|
997
1007
|
}
|
|
998
1008
|
const rn = ({
|
|
@@ -1003,21 +1013,21 @@ const rn = ({
|
|
|
1003
1013
|
}) => {
|
|
1004
1014
|
const { hasPermission: r } = ms();
|
|
1005
1015
|
return e && !r(e) || t && !t.some((a) => r(a)) ? s : n;
|
|
1006
|
-
},
|
|
1016
|
+
}, Ii = {
|
|
1007
1017
|
SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
|
|
1008
1018
|
}, Ce = () => {
|
|
1009
|
-
const e =
|
|
1019
|
+
const e = N(), t = I();
|
|
1010
1020
|
return ae({
|
|
1011
1021
|
queryKey: [E.GET_PAGE_TYPES],
|
|
1012
1022
|
staleTime: 1 / 0,
|
|
1013
1023
|
placeholderData: [],
|
|
1014
1024
|
queryFn: async () => t(e, { action: E.GET_PAGE_TYPES })
|
|
1015
1025
|
});
|
|
1016
|
-
},
|
|
1026
|
+
}, Ci = (e) => {
|
|
1017
1027
|
const { data: t } = Ce();
|
|
1018
|
-
return
|
|
1019
|
-
},
|
|
1020
|
-
const e =
|
|
1028
|
+
return Q(() => t == null ? void 0 : t.find((n) => n.key === e), [t, e]);
|
|
1029
|
+
}, Ni = () => {
|
|
1030
|
+
const e = N(), t = I();
|
|
1021
1031
|
return X({
|
|
1022
1032
|
mutationFn: async ({ pageType: n, query: s }) => {
|
|
1023
1033
|
try {
|
|
@@ -1033,8 +1043,8 @@ const rn = ({
|
|
|
1033
1043
|
}
|
|
1034
1044
|
}
|
|
1035
1045
|
});
|
|
1036
|
-
},
|
|
1037
|
-
const e =
|
|
1046
|
+
}, kc = () => {
|
|
1047
|
+
const e = N(), t = W(), n = I(), { data: s } = Ce();
|
|
1038
1048
|
return X({
|
|
1039
1049
|
mutationFn: async (r) => await n(e, {
|
|
1040
1050
|
action: E.CREATE_PAGE,
|
|
@@ -1049,18 +1059,18 @@ const rn = ({
|
|
|
1049
1059
|
})) : t.invalidateQueries({
|
|
1050
1060
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1051
1061
|
});
|
|
1052
|
-
const i = a.template ? `Page created from "${a.template.name}" template` : a.hasSlug === !1 ? "New " + ((o =
|
|
1062
|
+
const i = a.template ? `Page created from "${a.template.name}" template` : a.hasSlug === !1 ? "New " + ((o = re(s, { key: a.pageType })) == null ? void 0 : o.name) + " added successfully" : "New page added successfully";
|
|
1053
1063
|
R.success(i);
|
|
1054
1064
|
},
|
|
1055
1065
|
onError: (r, a) => {
|
|
1056
|
-
const i =
|
|
1066
|
+
const i = re(s, { key: a.pageType });
|
|
1057
1067
|
R.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1058
|
-
description: V(
|
|
1068
|
+
description: V(Ii, r.message, r.message)
|
|
1059
1069
|
});
|
|
1060
1070
|
}
|
|
1061
1071
|
});
|
|
1062
|
-
},
|
|
1063
|
-
const e =
|
|
1072
|
+
}, Oc = () => {
|
|
1073
|
+
const e = N(), t = W(), n = I(), { data: s } = be(), { data: r } = Ce();
|
|
1064
1074
|
return X({
|
|
1065
1075
|
mutationFn: async (a) => await n(e, {
|
|
1066
1076
|
action: E.UPDATE_PAGE,
|
|
@@ -1078,14 +1088,14 @@ const rn = ({
|
|
|
1078
1088
|
});
|
|
1079
1089
|
},
|
|
1080
1090
|
onError: (a, i) => {
|
|
1081
|
-
const o =
|
|
1091
|
+
const o = re(r, { key: i.pageType });
|
|
1082
1092
|
R.error(`Failed to update ${o != null && o.hasSlug ? "page" : o.name}.`, {
|
|
1083
1093
|
description: a.message
|
|
1084
1094
|
});
|
|
1085
1095
|
}
|
|
1086
1096
|
});
|
|
1087
|
-
},
|
|
1088
|
-
const e =
|
|
1097
|
+
}, Dc = () => {
|
|
1098
|
+
const e = N(), t = W(), n = I(), { data: s } = Ce();
|
|
1089
1099
|
return X({
|
|
1090
1100
|
mutationFn: async (r) => n(e, {
|
|
1091
1101
|
action: E.DELETE_PAGE,
|
|
@@ -1107,14 +1117,14 @@ const rn = ({
|
|
|
1107
1117
|
});
|
|
1108
1118
|
},
|
|
1109
1119
|
onError: (r, a) => {
|
|
1110
|
-
const i =
|
|
1120
|
+
const i = re(s, { key: a.pageType });
|
|
1111
1121
|
R.error(`Failed to delete ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1112
1122
|
description: r.message
|
|
1113
1123
|
});
|
|
1114
1124
|
}
|
|
1115
1125
|
});
|
|
1116
|
-
},
|
|
1117
|
-
const e =
|
|
1126
|
+
}, Gc = () => {
|
|
1127
|
+
const e = N(), t = W(), n = I(), { data: s } = Ce();
|
|
1118
1128
|
return X({
|
|
1119
1129
|
mutationFn: async (r) => n(e, {
|
|
1120
1130
|
action: E.TAKE_OFFLINE,
|
|
@@ -1126,20 +1136,20 @@ const rn = ({
|
|
|
1126
1136
|
}) : t.invalidateQueries({
|
|
1127
1137
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1128
1138
|
});
|
|
1129
|
-
const i =
|
|
1139
|
+
const i = re(s, { key: a.pageType });
|
|
1130
1140
|
R.success(
|
|
1131
1141
|
i != null && i.hasSlug ? "Page unpublished successfully." : "New " + i.name + " added successfully."
|
|
1132
1142
|
);
|
|
1133
1143
|
},
|
|
1134
1144
|
onError: (r, a) => {
|
|
1135
|
-
const i =
|
|
1145
|
+
const i = re(s, { key: a.pageType });
|
|
1136
1146
|
R.error(`Failed to take offline ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1137
1147
|
description: r.message
|
|
1138
1148
|
});
|
|
1139
1149
|
}
|
|
1140
1150
|
});
|
|
1141
1151
|
}, Cs = () => {
|
|
1142
|
-
const e =
|
|
1152
|
+
const e = N(), t = I(), n = W(), { data: s } = ie(), { savePageAsync: r } = Ge();
|
|
1143
1153
|
return X({
|
|
1144
1154
|
mutationFn: async ({ ids: a }) => (await r(), t(e, {
|
|
1145
1155
|
action: E.PUBLISH_CHANGES,
|
|
@@ -1158,8 +1168,8 @@ const rn = ({
|
|
|
1158
1168
|
console.log("##", a), R.error("Failed to publish pages.");
|
|
1159
1169
|
}
|
|
1160
1170
|
});
|
|
1161
|
-
},
|
|
1162
|
-
const e =
|
|
1171
|
+
}, xc = () => {
|
|
1172
|
+
const e = N(), t = I(), n = W();
|
|
1163
1173
|
return X({
|
|
1164
1174
|
mutationFn: async (s) => {
|
|
1165
1175
|
var r;
|
|
@@ -1183,8 +1193,8 @@ const rn = ({
|
|
|
1183
1193
|
R.error("Failed to mark page as template.");
|
|
1184
1194
|
}
|
|
1185
1195
|
});
|
|
1186
|
-
},
|
|
1187
|
-
const e =
|
|
1196
|
+
}, Rc = () => {
|
|
1197
|
+
const e = N(), t = I(), n = W();
|
|
1188
1198
|
return X({
|
|
1189
1199
|
mutationFn: async (s) => t(e, {
|
|
1190
1200
|
action: E.UNMARK_AS_TEMPLATE,
|
|
@@ -1199,8 +1209,8 @@ const rn = ({
|
|
|
1199
1209
|
R.error("Failed to unmark page as template.");
|
|
1200
1210
|
}
|
|
1201
1211
|
});
|
|
1202
|
-
},
|
|
1203
|
-
const e =
|
|
1212
|
+
}, Uc = () => {
|
|
1213
|
+
const e = N(), t = I(), n = W();
|
|
1204
1214
|
return X({
|
|
1205
1215
|
mutationFn: async ({ id: s, slug: r }) => t(e, {
|
|
1206
1216
|
action: E.CHANGE_SLUG,
|
|
@@ -1217,17 +1227,17 @@ const rn = ({
|
|
|
1217
1227
|
R.error("Failed to change slug");
|
|
1218
1228
|
}
|
|
1219
1229
|
});
|
|
1220
|
-
},
|
|
1221
|
-
function
|
|
1230
|
+
}, Li = K(() => import("./publish-pages-content-jYi-Q1Vl.js"));
|
|
1231
|
+
function ki({
|
|
1222
1232
|
showModal: e = !1,
|
|
1223
1233
|
onClose: t = () => console.log("Cancelled")
|
|
1224
1234
|
}) {
|
|
1225
1235
|
const { mutate: n, isPending: s } = Cs();
|
|
1226
1236
|
return /* @__PURE__ */ c(As, { open: e, onOpenChange: s ? () => {
|
|
1227
|
-
} : t, children: e && /* @__PURE__ */ c(H, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(
|
|
1237
|
+
} : t, children: e && /* @__PURE__ */ c(H, { fallback: /* @__PURE__ */ c("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ c(Li, { onClose: t, isPending: s, publishPage: n }) }) });
|
|
1228
1238
|
}
|
|
1229
|
-
const
|
|
1230
|
-
...
|
|
1239
|
+
const ce = {
|
|
1240
|
+
...Hr,
|
|
1231
1241
|
//pages
|
|
1232
1242
|
ADD_PAGE: "add_page",
|
|
1233
1243
|
EDIT_PAGE: "edit_page",
|
|
@@ -1263,12 +1273,12 @@ const ue = {
|
|
|
1263
1273
|
ADD_MEDIA: "add_media",
|
|
1264
1274
|
EDIT_MEDIA: "edit_media",
|
|
1265
1275
|
DELETE_MEDIA: "delete_media"
|
|
1266
|
-
},
|
|
1276
|
+
}, Oi = {
|
|
1267
1277
|
particleCount: 350,
|
|
1268
1278
|
spread: 120,
|
|
1269
1279
|
origin: { y: 0.6 },
|
|
1270
1280
|
angle: 90
|
|
1271
|
-
},
|
|
1281
|
+
}, Di = {
|
|
1272
1282
|
TOP_RIGHT: {
|
|
1273
1283
|
angle: 225,
|
|
1274
1284
|
origin: { x: 0.9, y: 0 }
|
|
@@ -1277,14 +1287,14 @@ const ue = {
|
|
|
1277
1287
|
angle: 100,
|
|
1278
1288
|
origin: { x: 0.9, y: 0.9 }
|
|
1279
1289
|
}
|
|
1280
|
-
},
|
|
1290
|
+
}, Gi = async () => {
|
|
1281
1291
|
const { default: e } = await import("./confetti.module-DCmCkDyV.js");
|
|
1282
1292
|
return e;
|
|
1283
1293
|
}, an = (e) => {
|
|
1284
|
-
let t =
|
|
1294
|
+
let t = Di[e];
|
|
1285
1295
|
t || (t = {});
|
|
1286
|
-
const n = { ...
|
|
1287
|
-
|
|
1296
|
+
const n = { ...Oi, ...t };
|
|
1297
|
+
Gi().then((s) => s(n));
|
|
1288
1298
|
};
|
|
1289
1299
|
function Dn({
|
|
1290
1300
|
children: e,
|
|
@@ -1293,35 +1303,35 @@ function Dn({
|
|
|
1293
1303
|
delayDuration: s = 700,
|
|
1294
1304
|
showTooltip: r = !0
|
|
1295
1305
|
}) {
|
|
1296
|
-
return r ? /* @__PURE__ */ c(ys, { children: /* @__PURE__ */ m(
|
|
1297
|
-
/* @__PURE__ */ c(
|
|
1298
|
-
/* @__PURE__ */ c(
|
|
1306
|
+
return r ? /* @__PURE__ */ c(ys, { children: /* @__PURE__ */ m(jt, { delayDuration: s, children: [
|
|
1307
|
+
/* @__PURE__ */ c(zt, { asChild: !0, children: e }),
|
|
1308
|
+
/* @__PURE__ */ c(Wt, { side: n, sideOffset: 10, children: /* @__PURE__ */ c("p", { children: t }) })
|
|
1299
1309
|
] }) }) : e;
|
|
1300
1310
|
}
|
|
1301
|
-
const
|
|
1302
|
-
const { t: e } =
|
|
1311
|
+
const xi = K(() => import("./unpublish-page-COPOrCk_.js")), Ri = K(() => import("./translation-warning-modal-DalBhNQy.js")), Ui = () => {
|
|
1312
|
+
const { t: e } = we(), { selectedLang: t, fallbackLang: n } = Se(), s = oe("getPreviewUrl", async (h) => h), [r, a] = q(""), { data: i } = ie(), { data: o } = xe(), { data: l } = Ce(), u = Q(
|
|
1303
1313
|
() => {
|
|
1304
1314
|
var h;
|
|
1305
1315
|
return (h = o == null ? void 0 : o.find((g) => (g == null ? void 0 : g.lang) === t)) == null ? void 0 : h.slug;
|
|
1306
1316
|
},
|
|
1307
1317
|
[t, o]
|
|
1308
|
-
),
|
|
1318
|
+
), f = j((h) => {
|
|
1309
1319
|
var g;
|
|
1310
|
-
return (g =
|
|
1311
|
-
}, [l]),
|
|
1312
|
-
return
|
|
1320
|
+
return (g = re(l, { key: h })) == null ? void 0 : g.hasSlug;
|
|
1321
|
+
}, [l]), d = t === n ? "" : t;
|
|
1322
|
+
return se(() => {
|
|
1313
1323
|
(async () => {
|
|
1314
1324
|
if (typeof s == "function") {
|
|
1315
|
-
const h = !
|
|
1316
|
-
h ? `${
|
|
1325
|
+
const h = !f(i == null ? void 0 : i.pageType), g = await s(
|
|
1326
|
+
h ? `${d !== "" ? d + "/" : ""}${i == null ? void 0 : i.id}` : u || ""
|
|
1317
1327
|
);
|
|
1318
1328
|
a(g);
|
|
1319
1329
|
} else
|
|
1320
1330
|
a("");
|
|
1321
1331
|
})();
|
|
1322
|
-
}, [s,
|
|
1323
|
-
},
|
|
1324
|
-
const { t: e } =
|
|
1332
|
+
}, [s, u, i == null ? void 0 : i.pageType, f, i == null ? void 0 : i.id, d]), /* @__PURE__ */ c(ge, { children: /* @__PURE__ */ c(Dn, { content: e("Open preview in new tab"), delayDuration: 0, children: /* @__PURE__ */ c("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c(M, { variant: "ghost", size: "sm", className: "gap-2", children: /* @__PURE__ */ c(La, { className: "h-4 w-4" }) }) }) }) });
|
|
1333
|
+
}, Bi = () => {
|
|
1334
|
+
const { t: e } = we(), [t, n] = Qr();
|
|
1325
1335
|
return /* @__PURE__ */ m(ge, { children: [
|
|
1326
1336
|
/* @__PURE__ */ c(Dn, { content: e("Theme"), delayDuration: 0, children: /* @__PURE__ */ c(
|
|
1327
1337
|
M,
|
|
@@ -1330,41 +1340,41 @@ const Di = K(() => import("./unpublish-page-D5tWKVLY.js")), Gi = K(() => import(
|
|
|
1330
1340
|
size: "icon",
|
|
1331
1341
|
className: "gap-2",
|
|
1332
1342
|
onClick: () => n(t === "theme" ? "block" : "theme"),
|
|
1333
|
-
children: /* @__PURE__ */ c(
|
|
1343
|
+
children: /* @__PURE__ */ c(ka, { className: "h-4 w-4" })
|
|
1334
1344
|
}
|
|
1335
1345
|
) }),
|
|
1336
1346
|
/* @__PURE__ */ c("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1337
1347
|
] });
|
|
1338
|
-
},
|
|
1339
|
-
const { t: e } =
|
|
1340
|
-
|
|
1341
|
-
const
|
|
1342
|
-
a === "UNSAVED" && (
|
|
1348
|
+
}, Mi = () => {
|
|
1349
|
+
const { t: e } = we(), [t, n] = q(!1), { isLocked: s } = Ie(), { savePageAsync: r, saveState: a } = Ge();
|
|
1350
|
+
se(() => {
|
|
1351
|
+
const f = (d) => {
|
|
1352
|
+
a === "UNSAVED" && (d.preventDefault(), d.returnValue = !1);
|
|
1343
1353
|
};
|
|
1344
|
-
return a === "UNSAVED" && window.addEventListener("beforeunload",
|
|
1345
|
-
window.removeEventListener("beforeunload",
|
|
1354
|
+
return a === "UNSAVED" && window.addEventListener("beforeunload", f), () => {
|
|
1355
|
+
window.removeEventListener("beforeunload", f);
|
|
1346
1356
|
};
|
|
1347
1357
|
}, [a]);
|
|
1348
|
-
const i =
|
|
1358
|
+
const i = j(async () => {
|
|
1349
1359
|
t || (n(!0), await r(), n(!1));
|
|
1350
|
-
}, [r, t]), { buttonIcon: o, buttonClass: l, tooltipContent:
|
|
1360
|
+
}, [r, t]), { buttonIcon: o, buttonClass: l, tooltipContent: u } = Q(() => {
|
|
1351
1361
|
switch (a) {
|
|
1352
1362
|
case "UNSAVED":
|
|
1353
1363
|
return {
|
|
1354
1364
|
tooltipContent: e("Save draft"),
|
|
1355
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1365
|
+
buttonIcon: /* @__PURE__ */ c(Da, { className: "h-4 w-4" }),
|
|
1356
1366
|
buttonClass: "gap-x-1"
|
|
1357
1367
|
};
|
|
1358
1368
|
case "SAVING":
|
|
1359
1369
|
return {
|
|
1360
1370
|
tooltipContent: e("Saving"),
|
|
1361
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1371
|
+
buttonIcon: /* @__PURE__ */ c(Mt, { className: "h-4 w-4 animate-spin text-sky-700" }),
|
|
1362
1372
|
buttonClass: "gap-x-1"
|
|
1363
1373
|
};
|
|
1364
1374
|
case "SAVED":
|
|
1365
1375
|
return {
|
|
1366
1376
|
tooltipContent: e("Saved"),
|
|
1367
|
-
buttonIcon: /* @__PURE__ */ c(
|
|
1377
|
+
buttonIcon: /* @__PURE__ */ c(Oa, { className: "h-4 w-4" }),
|
|
1368
1378
|
buttonClass: "text-green-500 gap-x-1"
|
|
1369
1379
|
};
|
|
1370
1380
|
}
|
|
@@ -1372,30 +1382,30 @@ const Di = K(() => import("./unpublish-page-D5tWKVLY.js")), Gi = K(() => import(
|
|
|
1372
1382
|
return s ? null : /* @__PURE__ */ m(M, { size: "sm", variant: "ghost", onClick: i, className: `${l} w-24 max-w-24`, children: [
|
|
1373
1383
|
o,
|
|
1374
1384
|
" ",
|
|
1375
|
-
|
|
1385
|
+
u
|
|
1376
1386
|
] });
|
|
1377
|
-
},
|
|
1378
|
-
const { t: e } =
|
|
1379
|
-
const
|
|
1387
|
+
}, Fi = () => {
|
|
1388
|
+
const { t: e } = we(), { selectedLang: t } = Se(), { data: n } = be(), { data: s } = xe(), [r, a] = q(!1), [i, o] = q(!1), [l, u] = q(null), { savePageAsync: f } = Ge(), [d, h] = q(!1), { data: g } = ie(), { mutate: A, isPending: T } = Cs(), { needTranslations: p } = Ge(), y = p(), { buttonText: P, buttonClassName: w, isPublished: O } = Q(() => {
|
|
1389
|
+
const v = g && (g == null ? void 0 : g.online);
|
|
1380
1390
|
return {
|
|
1381
|
-
buttonClassName:
|
|
1382
|
-
isPublished:
|
|
1383
|
-
buttonText: e(
|
|
1391
|
+
buttonClassName: v ? "hover:bg-green-600 bg-green-500" : "",
|
|
1392
|
+
isPublished: v,
|
|
1393
|
+
buttonText: e(v ? "Published" : "Publish")
|
|
1384
1394
|
};
|
|
1385
1395
|
}, [g, e]), B = async () => {
|
|
1386
1396
|
if (y) {
|
|
1387
1397
|
h(!0);
|
|
1388
1398
|
return;
|
|
1389
1399
|
}
|
|
1390
|
-
|
|
1391
|
-
},
|
|
1392
|
-
const
|
|
1393
|
-
A({ ids: fs(
|
|
1400
|
+
L();
|
|
1401
|
+
}, L = () => {
|
|
1402
|
+
const v = [n == null ? void 0 : n.id, n == null ? void 0 : n.primaryPage];
|
|
1403
|
+
A({ ids: fs(v) }, { onSuccess: () => an("TOP_RIGHT") });
|
|
1394
1404
|
}, pe = () => {
|
|
1395
|
-
h(!1),
|
|
1405
|
+
h(!1), L();
|
|
1396
1406
|
}, ye = async () => {
|
|
1397
|
-
h(!1), await
|
|
1398
|
-
}, U =
|
|
1407
|
+
h(!1), await f();
|
|
1408
|
+
}, U = Q(() => Ut(s ?? [], "id"), [s]);
|
|
1399
1409
|
return /* @__PURE__ */ m(ge, { children: [
|
|
1400
1410
|
/* @__PURE__ */ m("div", { className: "flex", children: [
|
|
1401
1411
|
/* @__PURE__ */ m(
|
|
@@ -1404,7 +1414,7 @@ const Di = K(() => import("./unpublish-page-D5tWKVLY.js")), Gi = K(() => import(
|
|
|
1404
1414
|
size: "sm",
|
|
1405
1415
|
onClick: B,
|
|
1406
1416
|
disabled: T || !(g != null && g.id),
|
|
1407
|
-
className: `relative flex items-center gap-1 overflow-hidden rounded-r-none text-white transition-all duration-300 ease-in-out ${
|
|
1417
|
+
className: `relative flex items-center gap-1 overflow-hidden rounded-r-none text-white transition-all duration-300 ease-in-out ${w}`,
|
|
1408
1418
|
onMouseEnter: () => o(!0),
|
|
1409
1419
|
onMouseLeave: () => o(!1),
|
|
1410
1420
|
children: [
|
|
@@ -1422,24 +1432,24 @@ const Di = K(() => import("./unpublish-page-D5tWKVLY.js")), Gi = K(() => import(
|
|
|
1422
1432
|
children: O ? /* @__PURE__ */ c(Qn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Hn, { className: "h-4 w-4" })
|
|
1423
1433
|
}
|
|
1424
1434
|
),
|
|
1425
|
-
/* @__PURE__ */ c("span", { children:
|
|
1435
|
+
/* @__PURE__ */ c("span", { children: P }),
|
|
1426
1436
|
t ? `(${Mn(t)})` : ""
|
|
1427
1437
|
]
|
|
1428
1438
|
}
|
|
1429
1439
|
),
|
|
1430
|
-
/* @__PURE__ */ m(
|
|
1431
|
-
/* @__PURE__ */ c(
|
|
1440
|
+
/* @__PURE__ */ m(vn, { children: [
|
|
1441
|
+
/* @__PURE__ */ c(wn, { asChild: !0, children: /* @__PURE__ */ c(
|
|
1432
1442
|
M,
|
|
1433
1443
|
{
|
|
1434
1444
|
size: "sm",
|
|
1435
1445
|
disabled: T || !(g != null && g.id),
|
|
1436
|
-
className: `rounded-l-none border-l border-white/50 px-2 text-white ${
|
|
1446
|
+
className: `rounded-l-none border-l border-white/50 px-2 text-white ${w}`,
|
|
1437
1447
|
children: /* @__PURE__ */ c(fn, { className: "h-4 w-4" })
|
|
1438
1448
|
}
|
|
1439
1449
|
) }),
|
|
1440
1450
|
/* @__PURE__ */ m(bn, { align: "end", className: "w-52", children: [
|
|
1441
1451
|
/* @__PURE__ */ m(
|
|
1442
|
-
|
|
1452
|
+
ue,
|
|
1443
1453
|
{
|
|
1444
1454
|
disabled: T,
|
|
1445
1455
|
className: "cursor-pointer text-xs",
|
|
@@ -1451,7 +1461,7 @@ const Di = K(() => import("./unpublish-page-D5tWKVLY.js")), Gi = K(() => import(
|
|
|
1451
1461
|
}
|
|
1452
1462
|
),
|
|
1453
1463
|
!O && /* @__PURE__ */ m(
|
|
1454
|
-
|
|
1464
|
+
ue,
|
|
1455
1465
|
{
|
|
1456
1466
|
disabled: T,
|
|
1457
1467
|
className: "cursor-pointer text-xs",
|
|
@@ -1462,11 +1472,11 @@ const Di = K(() => import("./unpublish-page-D5tWKVLY.js")), Gi = K(() => import(
|
|
|
1462
1472
|
]
|
|
1463
1473
|
}
|
|
1464
1474
|
),
|
|
1465
|
-
/* @__PURE__ */ m(
|
|
1475
|
+
/* @__PURE__ */ m(ue, { onClick: () => a(!0), className: "cursor-pointer text-xs", children: [
|
|
1466
1476
|
e("Open"),
|
|
1467
1477
|
" publish menu"
|
|
1468
1478
|
] }),
|
|
1469
|
-
O && /* @__PURE__ */ m(
|
|
1479
|
+
O && /* @__PURE__ */ m(ue, { onClick: () => u(n), className: "cursor-pointer text-xs", children: [
|
|
1470
1480
|
e("Unpublish"),
|
|
1471
1481
|
" page ",
|
|
1472
1482
|
t ? `(${Mn(t)})` : ""
|
|
@@ -1474,12 +1484,12 @@ const Di = K(() => import("./unpublish-page-D5tWKVLY.js")), Gi = K(() => import(
|
|
|
1474
1484
|
] })
|
|
1475
1485
|
] })
|
|
1476
1486
|
] }),
|
|
1477
|
-
/* @__PURE__ */ c(
|
|
1478
|
-
l && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1479
|
-
|
|
1480
|
-
|
|
1487
|
+
/* @__PURE__ */ c(ki, { showModal: r, onClose: () => a(!1) }),
|
|
1488
|
+
l && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(xi, { page: l, onClose: () => u(null) }) }),
|
|
1489
|
+
d && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1490
|
+
Ri,
|
|
1481
1491
|
{
|
|
1482
|
-
isOpen:
|
|
1492
|
+
isOpen: d,
|
|
1483
1493
|
onClose: ye,
|
|
1484
1494
|
onContinue: pe,
|
|
1485
1495
|
isPending: T
|
|
@@ -1487,17 +1497,17 @@ const Di = K(() => import("./unpublish-page-D5tWKVLY.js")), Gi = K(() => import(
|
|
|
1487
1497
|
) })
|
|
1488
1498
|
] });
|
|
1489
1499
|
};
|
|
1490
|
-
function
|
|
1491
|
-
const { isLocked: e } = Ie(), [t] =
|
|
1500
|
+
function qi() {
|
|
1501
|
+
const { isLocked: e } = Ie(), [t] = le(), n = t.get("lang"), s = Ps(n);
|
|
1492
1502
|
return e || !s ? /* @__PURE__ */ c("div", {}) : /* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-1", children: [
|
|
1493
|
-
/* @__PURE__ */ c(
|
|
1494
|
-
/* @__PURE__ */ c(rn, { permission:
|
|
1495
|
-
/* @__PURE__ */ c(
|
|
1496
|
-
/* @__PURE__ */ c(rn, { permission:
|
|
1497
|
-
/* @__PURE__ */ c(rn, { permission:
|
|
1503
|
+
/* @__PURE__ */ c(bi, {}),
|
|
1504
|
+
/* @__PURE__ */ c(rn, { permission: ce.EDIT_THEME, children: /* @__PURE__ */ c(Bi, {}) }),
|
|
1505
|
+
/* @__PURE__ */ c(Ui, {}),
|
|
1506
|
+
/* @__PURE__ */ c(rn, { permission: ce.SAVE_PAGE, children: /* @__PURE__ */ c(Mi, {}) }),
|
|
1507
|
+
/* @__PURE__ */ c(rn, { permission: ce.PUBLISH_PAGE, children: /* @__PURE__ */ c(Fi, {}) })
|
|
1498
1508
|
] });
|
|
1499
1509
|
}
|
|
1500
|
-
const
|
|
1510
|
+
const Ki = ({
|
|
1501
1511
|
page: e,
|
|
1502
1512
|
setDuplicatePage: t,
|
|
1503
1513
|
setAddEditPage: n,
|
|
@@ -1508,25 +1518,25 @@ const Fi = ({
|
|
|
1508
1518
|
children: o,
|
|
1509
1519
|
isLanguagePage: l
|
|
1510
1520
|
}) => {
|
|
1511
|
-
const { t:
|
|
1512
|
-
return !
|
|
1513
|
-
/* @__PURE__ */ c(
|
|
1521
|
+
const { t: u } = we(), { hasPermission: f } = ms(), { data: d } = Ce(), h = Q(() => re(d, { key: e.pageType }), [d, e.pageType]), g = Q(() => !!e.isTemplate, [e.isTemplate]), A = Q(() => !!(h != null && h.hasSlug), [h == null ? void 0 : h.hasSlug]);
|
|
1522
|
+
return !f(ce.EDIT_PAGE) && !f(ce.DELETE_PAGE) && !f(ce.UNPUBLISH_PAGE) || !e ? null : /* @__PURE__ */ m(vn, { children: [
|
|
1523
|
+
/* @__PURE__ */ c(wn, { asChild: !0, onClick: (p) => p.stopPropagation(), children: o }),
|
|
1514
1524
|
/* @__PURE__ */ m(bn, { align: "center", className: "text-sm", children: [
|
|
1515
|
-
|
|
1516
|
-
|
|
1525
|
+
f(ce.ADD_PAGE) && !l && /* @__PURE__ */ m(
|
|
1526
|
+
ue,
|
|
1517
1527
|
{
|
|
1518
1528
|
className: "flex cursor-pointer items-center gap-2",
|
|
1519
1529
|
onClick: (p) => {
|
|
1520
1530
|
p.stopPropagation(), t(e);
|
|
1521
1531
|
},
|
|
1522
1532
|
children: [
|
|
1523
|
-
/* @__PURE__ */ c(
|
|
1533
|
+
/* @__PURE__ */ c(Ga, { className: "size-3" }),
|
|
1524
1534
|
"Duplicate page"
|
|
1525
1535
|
]
|
|
1526
1536
|
}
|
|
1527
1537
|
),
|
|
1528
|
-
|
|
1529
|
-
|
|
1538
|
+
f(ce.EDIT_PAGE) && /* @__PURE__ */ m(
|
|
1539
|
+
ue,
|
|
1530
1540
|
{
|
|
1531
1541
|
className: "flex cursor-pointer items-center gap-2",
|
|
1532
1542
|
onClick: (p) => {
|
|
@@ -1536,39 +1546,39 @@ const Fi = ({
|
|
|
1536
1546
|
});
|
|
1537
1547
|
},
|
|
1538
1548
|
children: [
|
|
1539
|
-
/* @__PURE__ */ c(
|
|
1549
|
+
/* @__PURE__ */ c(xa, { className: "size-3" }),
|
|
1540
1550
|
"Edit"
|
|
1541
1551
|
]
|
|
1542
1552
|
}
|
|
1543
1553
|
),
|
|
1544
|
-
(e == null ? void 0 : e.online) &&
|
|
1545
|
-
|
|
1554
|
+
(e == null ? void 0 : e.online) && f(ce.UNPUBLISH_PAGE) && /* @__PURE__ */ m(
|
|
1555
|
+
ue,
|
|
1546
1556
|
{
|
|
1547
1557
|
className: "flex cursor-pointer items-center gap-2",
|
|
1548
1558
|
onClick: (p) => {
|
|
1549
1559
|
p.stopPropagation(), s(e);
|
|
1550
1560
|
},
|
|
1551
1561
|
children: [
|
|
1552
|
-
/* @__PURE__ */ c(
|
|
1553
|
-
|
|
1562
|
+
/* @__PURE__ */ c(Ra, { className: "size-3" }),
|
|
1563
|
+
u("Unpublish")
|
|
1554
1564
|
]
|
|
1555
1565
|
}
|
|
1556
1566
|
),
|
|
1557
|
-
|
|
1558
|
-
|
|
1567
|
+
f(ce.DELETE_PAGE) && /* @__PURE__ */ m(
|
|
1568
|
+
ue,
|
|
1559
1569
|
{
|
|
1560
1570
|
className: "flex cursor-pointer items-center gap-2",
|
|
1561
1571
|
onClick: (p) => {
|
|
1562
1572
|
p.stopPropagation(), r(e);
|
|
1563
1573
|
},
|
|
1564
1574
|
children: [
|
|
1565
|
-
/* @__PURE__ */ c(
|
|
1566
|
-
|
|
1575
|
+
/* @__PURE__ */ c(Ua, { className: "size-3" }),
|
|
1576
|
+
u("Delete")
|
|
1567
1577
|
]
|
|
1568
1578
|
}
|
|
1569
1579
|
),
|
|
1570
|
-
|
|
1571
|
-
|
|
1580
|
+
f(ce.MARK_AS_TEMPLATE) && A && !l && /* @__PURE__ */ c(ge, { children: g ? /* @__PURE__ */ m(
|
|
1581
|
+
ue,
|
|
1572
1582
|
{
|
|
1573
1583
|
className: "flex cursor-pointer items-center gap-2",
|
|
1574
1584
|
onClick: (p) => {
|
|
@@ -1576,11 +1586,11 @@ const Fi = ({
|
|
|
1576
1586
|
},
|
|
1577
1587
|
children: [
|
|
1578
1588
|
/* @__PURE__ */ c($n, { className: "size-3" }),
|
|
1579
|
-
|
|
1589
|
+
u("Unmark as template")
|
|
1580
1590
|
]
|
|
1581
1591
|
}
|
|
1582
1592
|
) : /* @__PURE__ */ m(
|
|
1583
|
-
|
|
1593
|
+
ue,
|
|
1584
1594
|
{
|
|
1585
1595
|
className: "flex cursor-pointer items-center gap-2",
|
|
1586
1596
|
onClick: (p) => {
|
|
@@ -1588,21 +1598,21 @@ const Fi = ({
|
|
|
1588
1598
|
},
|
|
1589
1599
|
children: [
|
|
1590
1600
|
/* @__PURE__ */ c($n, { className: "size-3" }),
|
|
1591
|
-
|
|
1601
|
+
u("Mark as template")
|
|
1592
1602
|
]
|
|
1593
1603
|
}
|
|
1594
1604
|
) })
|
|
1595
1605
|
] })
|
|
1596
1606
|
] });
|
|
1597
|
-
},
|
|
1598
|
-
const [e, t] = q(null), [n, s] = q(null), [r, a] = q(null), [i, o] = q(null), [l,
|
|
1607
|
+
}, Vi = K(() => import("./add-new-page-C-DdGfOJ.js")), Hi = K(() => import("./delete-page-X6KE9Snl.js")), Qi = K(() => import("./duplicate-page-Bwp0RTTE.js")), $i = K(() => import("./mark-as-template-XIeQkqPw.js")), ji = K(() => import("./unmark-as-template-Dezq0GEM.js")), zi = K(() => import("./unpublish-page-COPOrCk_.js")), Wi = () => {
|
|
1608
|
+
const [e, t] = q(null), [n, s] = q(null), [r, a] = q(null), [i, o] = q(null), [l, u] = q(null), [f, d] = q(null), { data: h, isFetching: g } = be(), { selectedLang: A, fallbackLang: T } = Se(), { data: p } = xe(), y = p == null ? void 0 : p.find((L) => L.lang === A), { isLocked: P } = Ie(), w = !(h != null && h.slug), [, O] = te(kn);
|
|
1599
1609
|
if (!h) return null;
|
|
1600
|
-
const B = (
|
|
1610
|
+
const B = (L) => {
|
|
1601
1611
|
A.length > 0 && A !== T ? O({
|
|
1602
1612
|
edit: !0,
|
|
1603
|
-
id:
|
|
1604
|
-
primaryPage:
|
|
1605
|
-
}) :
|
|
1613
|
+
id: L == null ? void 0 : L.id,
|
|
1614
|
+
primaryPage: L == null ? void 0 : L.primaryPage
|
|
1615
|
+
}) : d(L);
|
|
1606
1616
|
};
|
|
1607
1617
|
return /* @__PURE__ */ m(ge, { children: [
|
|
1608
1618
|
/* @__PURE__ */ m("div", { className: "flex items-center justify-between rounded px-[2px] transition-colors duration-200", children: [
|
|
@@ -1611,13 +1621,13 @@ const Fi = ({
|
|
|
1611
1621
|
{
|
|
1612
1622
|
className: "flex h-7 max-w-[200px] cursor-pointer items-center truncate rounded px-1 text-xs font-medium",
|
|
1613
1623
|
variant: "ghost",
|
|
1614
|
-
children: g ? /* @__PURE__ */ c(
|
|
1615
|
-
|
|
1624
|
+
children: g ? /* @__PURE__ */ c(Mt, { 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: [
|
|
1625
|
+
w ? /* @__PURE__ */ c(Ba, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ c(Ma, { className: "mr-1 h-4 w-4" }),
|
|
1616
1626
|
V(y || h, "name") ?? ""
|
|
1617
1627
|
] })
|
|
1618
1628
|
}
|
|
1619
1629
|
) }),
|
|
1620
|
-
|
|
1630
|
+
P ? /* @__PURE__ */ c(
|
|
1621
1631
|
M,
|
|
1622
1632
|
{
|
|
1623
1633
|
variant: "ghost",
|
|
@@ -1626,83 +1636,83 @@ const Fi = ({
|
|
|
1626
1636
|
children: /* @__PURE__ */ c(jn, { className: "h-4 w-4" })
|
|
1627
1637
|
}
|
|
1628
1638
|
) : /* @__PURE__ */ c(
|
|
1629
|
-
|
|
1639
|
+
Ki,
|
|
1630
1640
|
{
|
|
1631
1641
|
page: h,
|
|
1632
|
-
setDuplicatePage: (
|
|
1633
|
-
setAddEditPage: (
|
|
1634
|
-
setUnpublishPage: (
|
|
1635
|
-
setDeletePage: (
|
|
1636
|
-
setMarkAsTemplate: (
|
|
1637
|
-
setUnmarkAsTemplate: (
|
|
1642
|
+
setDuplicatePage: (L) => u(L),
|
|
1643
|
+
setAddEditPage: (L) => B(L),
|
|
1644
|
+
setUnpublishPage: (L) => s(L),
|
|
1645
|
+
setDeletePage: (L) => t(L),
|
|
1646
|
+
setMarkAsTemplate: (L) => a(L),
|
|
1647
|
+
setUnmarkAsTemplate: (L) => o(L),
|
|
1638
1648
|
isLanguagePage: A.length > 0 && A !== T,
|
|
1639
1649
|
children: /* @__PURE__ */ c(M, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ c(jn, { className: "h-4 w-4" }) })
|
|
1640
1650
|
}
|
|
1641
1651
|
)
|
|
1642
1652
|
] }),
|
|
1643
|
-
|
|
1644
|
-
|
|
1653
|
+
f && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1654
|
+
Vi,
|
|
1645
1655
|
{
|
|
1646
|
-
closePanel: () =>
|
|
1656
|
+
closePanel: () => d(null),
|
|
1647
1657
|
editPage: () => {
|
|
1648
1658
|
},
|
|
1649
|
-
addEditPage:
|
|
1650
|
-
setAddEditPage:
|
|
1659
|
+
addEditPage: f,
|
|
1660
|
+
setAddEditPage: d
|
|
1651
1661
|
}
|
|
1652
1662
|
) }),
|
|
1653
|
-
e && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1654
|
-
n && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1655
|
-
r && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1656
|
-
i && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1663
|
+
e && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(Hi, { page: e, onClose: () => t(null) }) }),
|
|
1664
|
+
n && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(zi, { page: n, onClose: () => s(null) }) }),
|
|
1665
|
+
r && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c($i, { page: r, onClose: () => a(null) }) }),
|
|
1666
|
+
i && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(ji, { page: i, onClose: () => o(null) }) }),
|
|
1657
1667
|
l && /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1658
|
-
|
|
1668
|
+
Qi,
|
|
1659
1669
|
{
|
|
1660
1670
|
page: l,
|
|
1661
|
-
onClose: () =>
|
|
1662
|
-
closePanel: () =>
|
|
1671
|
+
onClose: () => u(null),
|
|
1672
|
+
closePanel: () => d(null)
|
|
1663
1673
|
}
|
|
1664
1674
|
) })
|
|
1665
1675
|
] });
|
|
1666
1676
|
}, Ns = ({ children: e, className: t = "" }) => /* @__PURE__ */ c(
|
|
1667
1677
|
"div",
|
|
1668
1678
|
{
|
|
1669
|
-
className:
|
|
1679
|
+
className: Bt(
|
|
1670
1680
|
"fixed bottom-0 left-0 right-0 top-[50px] z-[20] flex w-screen flex-col items-center justify-center bg-black/40 transition-all",
|
|
1671
1681
|
t
|
|
1672
1682
|
),
|
|
1673
1683
|
children: e
|
|
1674
1684
|
}
|
|
1675
|
-
),
|
|
1685
|
+
), Yi = ({ hasDynamicPage: e }) => /* @__PURE__ */ c(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: [
|
|
1676
1686
|
/* @__PURE__ */ c("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
|
|
1677
1687
|
/* @__PURE__ */ c("p", { className: "pt-2 text-center text-sm font-light text-gray-600", children: e ? "Please select a page from the list in the top header. This will enable you to edit the page." : "Please add a new page" })
|
|
1678
|
-
] }) }),
|
|
1679
|
-
const { dynamicPage: e, allLangPages: t, isFetching: n } =
|
|
1688
|
+
] }) }), Ji = K(() => import("./dynamic-page-selector-Vl0aOeHK.js")), Xi = () => {
|
|
1689
|
+
const { dynamicPage: e, allLangPages: t, isFetching: n } = ri(), s = t.length > 0;
|
|
1680
1690
|
return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
1681
|
-
!e && /* @__PURE__ */ c(
|
|
1682
|
-
/* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
1691
|
+
!e && /* @__PURE__ */ c(Yi, { hasDynamicPage: s }),
|
|
1692
|
+
/* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(Ji, {}) })
|
|
1683
1693
|
] });
|
|
1684
|
-
},
|
|
1685
|
-
const { data: e, isFetching: t } = be(), { data: n, isFetching: s } = ie(), r = V(n, "dynamic", !1), a = Cn(), i =
|
|
1694
|
+
}, Zi = () => {
|
|
1695
|
+
const { data: e, isFetching: t } = be(), { data: n, isFetching: s } = ie(), r = V(n, "dynamic", !1), a = Cn(), i = $r("dynamic-page-selector"), o = e == null ? void 0 : e.slug, l = !o, u = li(), f = t || s, h = (l ? `Partial: ${e == null ? void 0 : e.name} ` : `${o}${a}`).replace(window.location.host, "");
|
|
1686
1696
|
return /* @__PURE__ */ m("div", { className: "relative flex items-center gap-x-1", children: [
|
|
1687
1697
|
/* @__PURE__ */ c(
|
|
1688
1698
|
"div",
|
|
1689
1699
|
{
|
|
1690
|
-
className:
|
|
1700
|
+
className: Bt(
|
|
1691
1701
|
"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",
|
|
1692
|
-
|
|
1702
|
+
f && "max-w-0 overflow-hidden opacity-0"
|
|
1693
1703
|
),
|
|
1694
|
-
children: /* @__PURE__ */ c(
|
|
1704
|
+
children: /* @__PURE__ */ c(Wi, {})
|
|
1695
1705
|
}
|
|
1696
1706
|
),
|
|
1697
1707
|
/* @__PURE__ */ m(
|
|
1698
1708
|
"div",
|
|
1699
1709
|
{
|
|
1700
|
-
className:
|
|
1710
|
+
className: Bt(
|
|
1701
1711
|
"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" + (l ? " pr-2" : ""),
|
|
1702
|
-
|
|
1712
|
+
f && "max-w-0 overflow-hidden opacity-0"
|
|
1703
1713
|
),
|
|
1704
1714
|
children: [
|
|
1705
|
-
/* @__PURE__ */ c(
|
|
1715
|
+
/* @__PURE__ */ c(_i, {}),
|
|
1706
1716
|
/* @__PURE__ */ m("div", { className: "flex w-full items-center overflow-hidden", children: [
|
|
1707
1717
|
/* @__PURE__ */ c(
|
|
1708
1718
|
"div",
|
|
@@ -1714,17 +1724,17 @@ const Fi = ({
|
|
|
1714
1724
|
] }) : h
|
|
1715
1725
|
}
|
|
1716
1726
|
),
|
|
1717
|
-
!l && /* @__PURE__ */ c("a", { href:
|
|
1727
|
+
!l && /* @__PURE__ */ c("a", { href: u, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ c("div", { className: "ml-2 mr-px flex-shrink-0 rounded-sm p-1.5 text-gray-500 hover:bg-gray-100 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-300", children: /* @__PURE__ */ c(Fa, { className: "h-4 w-4", strokeWidth: 1 }) }) })
|
|
1718
1728
|
] })
|
|
1719
1729
|
]
|
|
1720
1730
|
}
|
|
1721
1731
|
),
|
|
1722
|
-
r && i && /* @__PURE__ */ c(
|
|
1732
|
+
r && i && /* @__PURE__ */ c(Xi, {})
|
|
1723
1733
|
] });
|
|
1724
|
-
},
|
|
1725
|
-
/* @__PURE__ */ c(
|
|
1726
|
-
/* @__PURE__ */ c(
|
|
1727
|
-
/* @__PURE__ */ c(
|
|
1734
|
+
}, eo = () => /* @__PURE__ */ m("div", { className: "flex h-full w-full items-center justify-between px-2", children: [
|
|
1735
|
+
/* @__PURE__ */ c(Pi, {}),
|
|
1736
|
+
/* @__PURE__ */ c(Zi, {}),
|
|
1737
|
+
/* @__PURE__ */ c(qi, {})
|
|
1728
1738
|
] }), Ls = () => {
|
|
1729
1739
|
const e = W(), { data: t } = ae({
|
|
1730
1740
|
queryKey: [E.AI_CONTEXT],
|
|
@@ -1732,51 +1742,51 @@ const Fi = ({
|
|
|
1732
1742
|
queryFn: () => "",
|
|
1733
1743
|
staleTime: 0
|
|
1734
1744
|
});
|
|
1735
|
-
return { setAiContext:
|
|
1745
|
+
return { setAiContext: j(
|
|
1736
1746
|
(s) => {
|
|
1737
1747
|
e.setQueryData([E.AI_CONTEXT], s);
|
|
1738
1748
|
},
|
|
1739
1749
|
[e]
|
|
1740
1750
|
), aiContext: t };
|
|
1741
|
-
},
|
|
1742
|
-
const e =
|
|
1743
|
-
return
|
|
1751
|
+
}, to = () => {
|
|
1752
|
+
const e = N(), { aiContext: t } = Ls(), n = I();
|
|
1753
|
+
return j(
|
|
1744
1754
|
async (s, r, a, i) => n(e, {
|
|
1745
1755
|
action: E.ASK_AI,
|
|
1746
1756
|
data: { type: s, prompt: r, blocks: a, context: t, lang: i }
|
|
1747
1757
|
}),
|
|
1748
1758
|
[e, t, n]
|
|
1749
1759
|
);
|
|
1750
|
-
},
|
|
1751
|
-
if (
|
|
1752
|
-
const s =
|
|
1760
|
+
}, no = (e, t) => t.map((n) => {
|
|
1761
|
+
if ($t(e, n._type)) {
|
|
1762
|
+
const s = Ya(n._type);
|
|
1753
1763
|
return {
|
|
1754
1764
|
...s,
|
|
1755
1765
|
...Pn(n, [
|
|
1756
|
-
...
|
|
1766
|
+
...kr(s),
|
|
1757
1767
|
"_type",
|
|
1758
1768
|
"_id",
|
|
1759
1769
|
"_name",
|
|
1760
1770
|
"_parent",
|
|
1761
1771
|
"_bindings"
|
|
1762
1772
|
]),
|
|
1763
|
-
...
|
|
1773
|
+
...Or(n, (r, a) => Dr(a, "_attrs")),
|
|
1764
1774
|
...n
|
|
1765
1775
|
};
|
|
1766
1776
|
}
|
|
1767
1777
|
return n;
|
|
1768
|
-
}),
|
|
1769
|
-
const t =
|
|
1770
|
-
return
|
|
1778
|
+
}), so = (e) => {
|
|
1779
|
+
const t = Wa();
|
|
1780
|
+
return Q(() => {
|
|
1771
1781
|
if (!e || he(e)) return { blocks: [] };
|
|
1772
1782
|
const n = hs(
|
|
1773
1783
|
e,
|
|
1774
|
-
(s) => !
|
|
1784
|
+
(s) => !Lr(s == null ? void 0 : s._type, "@chai/")
|
|
1775
1785
|
);
|
|
1776
|
-
return { blocks:
|
|
1786
|
+
return { blocks: no(t, n) };
|
|
1777
1787
|
}, [e, t]);
|
|
1778
|
-
},
|
|
1779
|
-
const [e] =
|
|
1788
|
+
}, ro = () => {
|
|
1789
|
+
const [e] = le(), t = e.get("page"), n = N(), { setAiContext: s } = Ls(), [, r] = Nn(), [, a] = oi(), [, i] = jr(), o = I();
|
|
1780
1790
|
return ae({
|
|
1781
1791
|
queryKey: [E.GET_DRAFT_PAGE, t],
|
|
1782
1792
|
staleTime: 1 / 0,
|
|
@@ -1786,13 +1796,13 @@ const Fi = ({
|
|
|
1786
1796
|
const l = await o(n, {
|
|
1787
1797
|
action: E.GET_DRAFT_PAGE,
|
|
1788
1798
|
data: { id: t, draft: !0 }
|
|
1789
|
-
}),
|
|
1790
|
-
return s(V(
|
|
1799
|
+
}), u = l.blocks ?? [], f = re(u, { _type: "@chai/ai-context" });
|
|
1800
|
+
return s(V(f, "_value", "") || ""), r((d) => ({ ...d, lastSaved: l.lastSaved })), a(V(l, "metadata", {})), setTimeout(() => i(!0), 500), u;
|
|
1791
1801
|
},
|
|
1792
1802
|
enabled: !!t
|
|
1793
1803
|
});
|
|
1794
|
-
},
|
|
1795
|
-
const { data: e } = ie(), { data: t } = be(), n =
|
|
1804
|
+
}, ao = () => {
|
|
1805
|
+
const { data: e } = ie(), { data: t } = be(), n = N(), s = I(), r = On(), a = Cn();
|
|
1796
1806
|
return ae({
|
|
1797
1807
|
queryKey: [E.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id, a],
|
|
1798
1808
|
staleTime: 1 / 0,
|
|
@@ -1821,8 +1831,8 @@ const Fi = ({
|
|
|
1821
1831
|
}),
|
|
1822
1832
|
enabled: !!(e != null && e.pageType) && !!t.id
|
|
1823
1833
|
});
|
|
1824
|
-
},
|
|
1825
|
-
const e =
|
|
1834
|
+
}, io = () => {
|
|
1835
|
+
const e = N(), t = W(), n = I();
|
|
1826
1836
|
return X({
|
|
1827
1837
|
mutationFn: async (s) => n(e, {
|
|
1828
1838
|
action: E.UPDATE_WEBSITE_SETTINGS,
|
|
@@ -1840,8 +1850,8 @@ const Fi = ({
|
|
|
1840
1850
|
});
|
|
1841
1851
|
}
|
|
1842
1852
|
});
|
|
1843
|
-
},
|
|
1844
|
-
const e =
|
|
1853
|
+
}, Bc = () => {
|
|
1854
|
+
const e = N(), t = W(), n = I(), { selectedLang: s } = Se();
|
|
1845
1855
|
return X({
|
|
1846
1856
|
mutationFn: async (r) => n(e, { action: E.ADD_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1847
1857
|
onSuccess: () => {
|
|
@@ -1855,8 +1865,8 @@ const Fi = ({
|
|
|
1855
1865
|
});
|
|
1856
1866
|
}
|
|
1857
1867
|
});
|
|
1858
|
-
},
|
|
1859
|
-
const e =
|
|
1868
|
+
}, Mc = () => {
|
|
1869
|
+
const e = N(), t = W(), n = I(), { selectedLang: s } = Se();
|
|
1860
1870
|
return X({
|
|
1861
1871
|
mutationFn: async (r) => n(e, { action: E.UPDATE_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1862
1872
|
onSuccess: () => {
|
|
@@ -1870,8 +1880,8 @@ const Fi = ({
|
|
|
1870
1880
|
});
|
|
1871
1881
|
}
|
|
1872
1882
|
});
|
|
1873
|
-
},
|
|
1874
|
-
const e =
|
|
1883
|
+
}, Fc = () => {
|
|
1884
|
+
const e = N(), t = W(), n = I();
|
|
1875
1885
|
return X({
|
|
1876
1886
|
mutationFn: async (s) => n(e, { action: E.DELETE_GLOBAL_SCHEMA, data: { id: s } }),
|
|
1877
1887
|
onSuccess: () => {
|
|
@@ -1885,8 +1895,8 @@ const Fi = ({
|
|
|
1885
1895
|
});
|
|
1886
1896
|
}
|
|
1887
1897
|
});
|
|
1888
|
-
},
|
|
1889
|
-
const e =
|
|
1898
|
+
}, qc = () => {
|
|
1899
|
+
const e = N(), t = I();
|
|
1890
1900
|
return X({
|
|
1891
1901
|
mutationFn: async (n) => t(e, { action: E.TOGGLE_PAGE_GLOBAL_SCHEMA, data: n }),
|
|
1892
1902
|
onError: (n) => {
|
|
@@ -1895,8 +1905,8 @@ const Fi = ({
|
|
|
1895
1905
|
});
|
|
1896
1906
|
}
|
|
1897
1907
|
});
|
|
1898
|
-
},
|
|
1899
|
-
const e =
|
|
1908
|
+
}, Kc = () => {
|
|
1909
|
+
const e = N(), t = I();
|
|
1900
1910
|
return X({
|
|
1901
1911
|
mutationFn: async (n) => t(e, { action: E.APPLY_SCHEMA_TO_ALL_PAGES, data: { schemaId: n } }),
|
|
1902
1912
|
onSuccess: (n) => {
|
|
@@ -1908,8 +1918,8 @@ const Fi = ({
|
|
|
1908
1918
|
});
|
|
1909
1919
|
}
|
|
1910
1920
|
});
|
|
1911
|
-
},
|
|
1912
|
-
const e =
|
|
1921
|
+
}, Vc = () => {
|
|
1922
|
+
const e = N(), t = I();
|
|
1913
1923
|
return X({
|
|
1914
1924
|
mutationFn: async (n) => t(e, { action: E.REMOVE_SCHEMA_FROM_ALL_PAGES, data: { schemaId: n } }),
|
|
1915
1925
|
onSuccess: (n) => {
|
|
@@ -1927,7 +1937,7 @@ const Fi = ({
|
|
|
1927
1937
|
action: "GET_LIBRARY_ITEM",
|
|
1928
1938
|
data: { id: e.id }
|
|
1929
1939
|
}), r = V(s, "html", ""), a = V(s, "blocks", []);
|
|
1930
|
-
return
|
|
1940
|
+
return Gr(a) ? a : Wr(r);
|
|
1931
1941
|
},
|
|
1932
1942
|
async getUILibraryBlocks(e, t, n) {
|
|
1933
1943
|
try {
|
|
@@ -1941,8 +1951,8 @@ const Fi = ({
|
|
|
1941
1951
|
return console.error(s), [];
|
|
1942
1952
|
}
|
|
1943
1953
|
}
|
|
1944
|
-
},
|
|
1945
|
-
const e =
|
|
1954
|
+
}, oo = () => {
|
|
1955
|
+
const e = N(), t = I();
|
|
1946
1956
|
return ae({
|
|
1947
1957
|
queryKey: ["uiLibraries"],
|
|
1948
1958
|
staleTime: "static",
|
|
@@ -1951,7 +1961,7 @@ const Fi = ({
|
|
|
1951
1961
|
...r
|
|
1952
1962
|
}));
|
|
1953
1963
|
return s.forEach((r) => {
|
|
1954
|
-
|
|
1964
|
+
zr(r.id, {
|
|
1955
1965
|
name: r.isSiteLibrary ? r.name + " (Current Site) " : r.name,
|
|
1956
1966
|
description: r.description,
|
|
1957
1967
|
getBlocksList: (a) => Yn.getUILibraryBlocks(a, t, e),
|
|
@@ -1960,8 +1970,8 @@ const Fi = ({
|
|
|
1960
1970
|
}), s;
|
|
1961
1971
|
}
|
|
1962
1972
|
});
|
|
1963
|
-
},
|
|
1964
|
-
const e = Ss(), t =
|
|
1973
|
+
}, lo = () => {
|
|
1974
|
+
const e = Ss(), t = I(), { user: n } = Yt(), s = n == null ? void 0 : n.id;
|
|
1965
1975
|
return ae({
|
|
1966
1976
|
queryKey: [E.GET_ROLE_AND_PERMISSIONS, s],
|
|
1967
1977
|
queryFn: () => t(e, {
|
|
@@ -1971,8 +1981,8 @@ const Fi = ({
|
|
|
1971
1981
|
enabled: !!s,
|
|
1972
1982
|
staleTime: 1 / 0
|
|
1973
1983
|
});
|
|
1974
|
-
},
|
|
1975
|
-
const e =
|
|
1984
|
+
}, co = () => {
|
|
1985
|
+
const e = N(), t = I(), [, n] = Nn();
|
|
1976
1986
|
return { onSave: async ({
|
|
1977
1987
|
page: r,
|
|
1978
1988
|
blocks: a,
|
|
@@ -1991,20 +2001,20 @@ const Fi = ({
|
|
|
1991
2001
|
return console.error(o), new Error("Failed to save blocks");
|
|
1992
2002
|
}
|
|
1993
2003
|
} };
|
|
1994
|
-
},
|
|
1995
|
-
const { data: e } = bs(), t =
|
|
2004
|
+
}, uo = () => {
|
|
2005
|
+
const { data: e } = bs(), t = N(), n = I();
|
|
1996
2006
|
return {
|
|
1997
|
-
getPartialBlocks:
|
|
2007
|
+
getPartialBlocks: j(async () => {
|
|
1998
2008
|
const s = {};
|
|
1999
2009
|
for (const r of e ?? [])
|
|
2000
2010
|
he(r == null ? void 0 : r.slug) && (s[r.id] = {
|
|
2001
2011
|
type: r.pageType,
|
|
2002
|
-
name:
|
|
2012
|
+
name: xr(r.name ?? r.slug),
|
|
2003
2013
|
description: ""
|
|
2004
2014
|
});
|
|
2005
2015
|
return s;
|
|
2006
2016
|
}, [e]),
|
|
2007
|
-
getPartialBlockBlocks:
|
|
2017
|
+
getPartialBlockBlocks: j(
|
|
2008
2018
|
async (s) => {
|
|
2009
2019
|
if (!s) return [];
|
|
2010
2020
|
try {
|
|
@@ -2012,7 +2022,7 @@ const Fi = ({
|
|
|
2012
2022
|
action: "GET_DRAFT_PAGE",
|
|
2013
2023
|
data: { id: s, draft: !0, editor: !1 }
|
|
2014
2024
|
});
|
|
2015
|
-
return hs(r.blocks, (a) =>
|
|
2025
|
+
return hs(r.blocks, (a) => $t(a, "_id"));
|
|
2016
2026
|
} catch (r) {
|
|
2017
2027
|
return console.error(r), [];
|
|
2018
2028
|
}
|
|
@@ -2020,20 +2030,20 @@ const Fi = ({
|
|
|
2020
2030
|
[n, t]
|
|
2021
2031
|
)
|
|
2022
2032
|
};
|
|
2023
|
-
},
|
|
2033
|
+
}, fo = K(() => import("./lang-panel-CaOkz8d3.js")), ho = ({ isActive: e, show: t }) => {
|
|
2024
2034
|
const { data: n } = Re();
|
|
2025
|
-
return
|
|
2026
|
-
}, ks = "lang",
|
|
2035
|
+
return !$t(n, "languages") || !V(n, "languages", []).length ? null : /* @__PURE__ */ c(M, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ c(qa, { className: "h-4 w-4" }) });
|
|
2036
|
+
}, ks = "lang", go = {
|
|
2027
2037
|
id: ks,
|
|
2028
2038
|
label: "Languages",
|
|
2029
2039
|
position: "top",
|
|
2030
|
-
panel:
|
|
2031
|
-
button:
|
|
2040
|
+
panel: fo,
|
|
2041
|
+
button: ho,
|
|
2032
2042
|
view: "modal",
|
|
2033
2043
|
width: 400
|
|
2034
|
-
},
|
|
2035
|
-
const { data: n } = ie(), s =
|
|
2036
|
-
return
|
|
2044
|
+
}, mo = K(() => import("./seo-panel-D3bp2i90.js")), Os = "seo", Eo = ({ isActive: e, show: t }) => {
|
|
2045
|
+
const { data: n } = ie(), s = Ci(n == null ? void 0 : n.pageType);
|
|
2046
|
+
return !$t(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ c(M, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
|
|
2037
2047
|
"svg",
|
|
2038
2048
|
{
|
|
2039
2049
|
stroke: "currentColor",
|
|
@@ -2051,35 +2061,35 @@ const Fi = ({
|
|
|
2051
2061
|
]
|
|
2052
2062
|
}
|
|
2053
2063
|
) });
|
|
2054
|
-
},
|
|
2064
|
+
}, po = {
|
|
2055
2065
|
id: Os,
|
|
2056
2066
|
label: "SEO",
|
|
2057
|
-
panel:
|
|
2058
|
-
button:
|
|
2067
|
+
panel: mo,
|
|
2068
|
+
button: Eo,
|
|
2059
2069
|
position: "top",
|
|
2060
2070
|
width: 600,
|
|
2061
2071
|
view: "modal"
|
|
2062
|
-
}, Ds = "user-info",
|
|
2063
|
-
const { t: e } =
|
|
2064
|
-
return t ? /* @__PURE__ */ m(
|
|
2065
|
-
/* @__PURE__ */ c(
|
|
2066
|
-
/* @__PURE__ */ m(
|
|
2072
|
+
}, Ds = "user-info", yo = () => {
|
|
2073
|
+
const { t: e } = we(), { user: t, logout: n } = Yt(), s = oe("onLogout", ds);
|
|
2074
|
+
return t ? /* @__PURE__ */ m(aa, { children: [
|
|
2075
|
+
/* @__PURE__ */ c(ia, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ c(Ka, { className: "h-4 w-4" }) }) }),
|
|
2076
|
+
/* @__PURE__ */ m(oa, { className: "w-auto space-y-2 p-4", children: [
|
|
2067
2077
|
/* @__PURE__ */ c("div", { className: "text-sm font-medium", children: t.name ?? t.email }),
|
|
2068
2078
|
/* @__PURE__ */ c("div", { className: "text-xs text-muted-foreground", children: t.email }),
|
|
2069
|
-
/* @__PURE__ */ m(
|
|
2070
|
-
/* @__PURE__ */ c(
|
|
2071
|
-
/* @__PURE__ */ m(
|
|
2072
|
-
/* @__PURE__ */ m(
|
|
2073
|
-
/* @__PURE__ */ c(
|
|
2074
|
-
/* @__PURE__ */ c(
|
|
2079
|
+
/* @__PURE__ */ m(la, { children: [
|
|
2080
|
+
/* @__PURE__ */ c(ca, { asChild: !0, children: /* @__PURE__ */ c(M, { variant: "outline", size: "sm", className: "w-full", children: e("Logout") }) }),
|
|
2081
|
+
/* @__PURE__ */ m(ua, { children: [
|
|
2082
|
+
/* @__PURE__ */ m(da, { children: [
|
|
2083
|
+
/* @__PURE__ */ c(fa, { children: e("Are you sure you want to logout?") }),
|
|
2084
|
+
/* @__PURE__ */ c(ha, { children: e("You will be redirected to the login page.") })
|
|
2075
2085
|
] }),
|
|
2076
|
-
/* @__PURE__ */ m(
|
|
2077
|
-
/* @__PURE__ */ c(
|
|
2086
|
+
/* @__PURE__ */ m(ga, { children: [
|
|
2087
|
+
/* @__PURE__ */ c(ma, { children: e("Cancel") }),
|
|
2078
2088
|
/* @__PURE__ */ c(
|
|
2079
|
-
|
|
2089
|
+
Ea,
|
|
2080
2090
|
{
|
|
2081
2091
|
onClick: () => {
|
|
2082
|
-
n(),
|
|
2092
|
+
n(), Rr(s) && s();
|
|
2083
2093
|
},
|
|
2084
2094
|
children: e("Logout")
|
|
2085
2095
|
}
|
|
@@ -2089,15 +2099,15 @@ const Fi = ({
|
|
|
2089
2099
|
] })
|
|
2090
2100
|
] })
|
|
2091
2101
|
] }) : null;
|
|
2092
|
-
},
|
|
2102
|
+
}, Ao = {
|
|
2093
2103
|
id: Ds,
|
|
2094
2104
|
label: "User Info",
|
|
2095
|
-
button:
|
|
2105
|
+
button: yo,
|
|
2096
2106
|
position: "bottom"
|
|
2097
|
-
},
|
|
2098
|
-
en(Os,
|
|
2107
|
+
}, To = () => {
|
|
2108
|
+
en(Os, po), en(ks, go), en(Ds, Ao);
|
|
2099
2109
|
};
|
|
2100
|
-
var
|
|
2110
|
+
var _ = {
|
|
2101
2111
|
context: void 0,
|
|
2102
2112
|
registry: void 0,
|
|
2103
2113
|
effects: void 0,
|
|
@@ -2111,35 +2121,35 @@ var P = {
|
|
|
2111
2121
|
};
|
|
2112
2122
|
function Jn(e) {
|
|
2113
2123
|
const t = String(e), n = t.length - 1;
|
|
2114
|
-
return
|
|
2124
|
+
return _.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
|
|
2115
2125
|
}
|
|
2116
|
-
function
|
|
2117
|
-
|
|
2126
|
+
function rt(e) {
|
|
2127
|
+
_.context = e;
|
|
2118
2128
|
}
|
|
2119
|
-
var Gs = !1,
|
|
2120
|
-
equals:
|
|
2121
|
-
}, Us = Hs,
|
|
2129
|
+
var Gs = !1, So = (e, t) => e === t, Ft = Symbol("solid-proxy"), xs = typeof Proxy == "function", Rs = Symbol("solid-track"), qt = {
|
|
2130
|
+
equals: So
|
|
2131
|
+
}, Us = Hs, _e = 1, Kt = 2, Bs = {
|
|
2122
2132
|
owned: null,
|
|
2123
2133
|
cleanups: null,
|
|
2124
2134
|
context: null,
|
|
2125
2135
|
owner: null
|
|
2126
|
-
}, on = {},
|
|
2136
|
+
}, on = {}, C = null, ln = null, _o = null, G = null, ee = null, Te = null, Jt = 0;
|
|
2127
2137
|
function Oe(e, t) {
|
|
2128
|
-
const n = G, s =
|
|
2138
|
+
const n = G, s = C, r = e.length === 0, a = t === void 0 ? s : t, i = r ? Bs : {
|
|
2129
2139
|
owned: null,
|
|
2130
2140
|
cleanups: null,
|
|
2131
2141
|
context: a ? a.context : null,
|
|
2132
2142
|
owner: a
|
|
2133
|
-
}, o = r ? e : () => e(() => Z(() =>
|
|
2134
|
-
|
|
2143
|
+
}, o = r ? e : () => e(() => Z(() => ct(i)));
|
|
2144
|
+
C = i, G = null;
|
|
2135
2145
|
try {
|
|
2136
2146
|
return me(o, !0);
|
|
2137
2147
|
} finally {
|
|
2138
|
-
G = n,
|
|
2148
|
+
G = n, C = s;
|
|
2139
2149
|
}
|
|
2140
2150
|
}
|
|
2141
2151
|
function F(e, t) {
|
|
2142
|
-
t = t ? Object.assign({},
|
|
2152
|
+
t = t ? Object.assign({}, qt, t) : qt;
|
|
2143
2153
|
const n = {
|
|
2144
2154
|
value: e,
|
|
2145
2155
|
observers: null,
|
|
@@ -2148,109 +2158,109 @@ function F(e, t) {
|
|
|
2148
2158
|
}, s = (r) => (typeof r == "function" && (r = r(n.value)), Vs(n, r));
|
|
2149
2159
|
return [Ks.bind(n), s];
|
|
2150
2160
|
}
|
|
2151
|
-
function
|
|
2152
|
-
const s = Xt(e, t, !0,
|
|
2153
|
-
|
|
2161
|
+
function Po(e, t, n) {
|
|
2162
|
+
const s = Xt(e, t, !0, _e);
|
|
2163
|
+
st(s);
|
|
2154
2164
|
}
|
|
2155
2165
|
function De(e, t, n) {
|
|
2156
|
-
const s = Xt(e, t, !1,
|
|
2157
|
-
|
|
2166
|
+
const s = Xt(e, t, !1, _e);
|
|
2167
|
+
st(s);
|
|
2158
2168
|
}
|
|
2159
2169
|
function Ms(e, t, n) {
|
|
2160
|
-
Us =
|
|
2161
|
-
const s = Xt(e, t, !1,
|
|
2162
|
-
(!n || !n.render) && (s.user = !0),
|
|
2170
|
+
Us = Oo;
|
|
2171
|
+
const s = Xt(e, t, !1, _e);
|
|
2172
|
+
(!n || !n.render) && (s.user = !0), Te ? Te.push(s) : st(s);
|
|
2163
2173
|
}
|
|
2164
2174
|
function J(e, t, n) {
|
|
2165
|
-
n = n ? Object.assign({},
|
|
2175
|
+
n = n ? Object.assign({}, qt, n) : qt;
|
|
2166
2176
|
const s = Xt(e, t, !0, 0);
|
|
2167
|
-
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0,
|
|
2177
|
+
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, st(s), Ks.bind(s);
|
|
2168
2178
|
}
|
|
2169
|
-
function
|
|
2179
|
+
function vo(e) {
|
|
2170
2180
|
return e && typeof e == "object" && "then" in e;
|
|
2171
2181
|
}
|
|
2172
|
-
function
|
|
2182
|
+
function wo(e, t, n) {
|
|
2173
2183
|
let s, r, a;
|
|
2174
2184
|
s = !0, r = e, a = {};
|
|
2175
|
-
let i = null, o = on, l = null,
|
|
2176
|
-
const h = /* @__PURE__ */ new Set(), [g, A] = (a.storage || F)(a.initialValue), [T, p] = F(void 0), [y,
|
|
2185
|
+
let i = null, o = on, l = null, u = !1, f = "initialValue" in a, d = typeof s == "function" && J(s);
|
|
2186
|
+
const h = /* @__PURE__ */ new Set(), [g, A] = (a.storage || F)(a.initialValue), [T, p] = F(void 0), [y, P] = F(void 0, {
|
|
2177
2187
|
equals: !1
|
|
2178
|
-
}), [
|
|
2179
|
-
|
|
2180
|
-
function B(
|
|
2181
|
-
return i ===
|
|
2182
|
-
value:
|
|
2183
|
-
})), o = on,
|
|
2188
|
+
}), [w, O] = F(f ? "ready" : "unresolved");
|
|
2189
|
+
_.context && (l = _.getNextContextId(), a.ssrLoadFrom === "initial" ? o = a.initialValue : _.load && _.has(l) && (o = _.load(l)));
|
|
2190
|
+
function B(v, b, Y, $) {
|
|
2191
|
+
return i === v && (i = null, $ !== void 0 && (f = !0), (v === o || b === o) && a.onHydrated && queueMicrotask(() => a.onHydrated($, {
|
|
2192
|
+
value: b
|
|
2193
|
+
})), o = on, L(b, Y)), b;
|
|
2184
2194
|
}
|
|
2185
|
-
function
|
|
2195
|
+
function L(v, b) {
|
|
2186
2196
|
me(() => {
|
|
2187
|
-
|
|
2197
|
+
b === void 0 && A(() => v), O(b !== void 0 ? "errored" : f ? "ready" : "unresolved"), p(b);
|
|
2188
2198
|
for (const Y of h.keys()) Y.decrement();
|
|
2189
2199
|
h.clear();
|
|
2190
2200
|
}, !1);
|
|
2191
2201
|
}
|
|
2192
2202
|
function pe() {
|
|
2193
|
-
const
|
|
2203
|
+
const v = No, b = g(), Y = T();
|
|
2194
2204
|
if (Y !== void 0 && !i) throw Y;
|
|
2195
|
-
return G && G.user,
|
|
2205
|
+
return G && G.user, b;
|
|
2196
2206
|
}
|
|
2197
|
-
function ye(
|
|
2198
|
-
if (
|
|
2199
|
-
|
|
2200
|
-
const
|
|
2201
|
-
if (
|
|
2207
|
+
function ye(v = !0) {
|
|
2208
|
+
if (v !== !1 && u) return;
|
|
2209
|
+
u = !1;
|
|
2210
|
+
const b = d ? d() : s;
|
|
2211
|
+
if (b == null || b === !1) {
|
|
2202
2212
|
B(i, Z(g));
|
|
2203
2213
|
return;
|
|
2204
2214
|
}
|
|
2205
2215
|
let Y;
|
|
2206
2216
|
const $ = o !== on ? o : Z(() => {
|
|
2207
2217
|
try {
|
|
2208
|
-
return r(
|
|
2218
|
+
return r(b, {
|
|
2209
2219
|
value: g(),
|
|
2210
|
-
refetching:
|
|
2220
|
+
refetching: v
|
|
2211
2221
|
});
|
|
2212
|
-
} catch (
|
|
2213
|
-
Y =
|
|
2222
|
+
} catch (de) {
|
|
2223
|
+
Y = de;
|
|
2214
2224
|
}
|
|
2215
2225
|
});
|
|
2216
2226
|
if (Y !== void 0) {
|
|
2217
|
-
B(i, void 0,
|
|
2227
|
+
B(i, void 0, xt(Y), b);
|
|
2218
2228
|
return;
|
|
2219
|
-
} else if (!
|
|
2220
|
-
return B(i, $, void 0,
|
|
2221
|
-
return i = $, "v" in $ ? ($.s === 1 ? B(i, $.v, void 0,
|
|
2222
|
-
O(
|
|
2223
|
-
}, !1), $.then((
|
|
2229
|
+
} else if (!vo($))
|
|
2230
|
+
return B(i, $, void 0, b), $;
|
|
2231
|
+
return i = $, "v" in $ ? ($.s === 1 ? B(i, $.v, void 0, b) : B(i, void 0, xt($.v), b), $) : (u = !0, queueMicrotask(() => u = !1), me(() => {
|
|
2232
|
+
O(f ? "refreshing" : "pending"), P();
|
|
2233
|
+
}, !1), $.then((de) => B($, de, void 0, b), (de) => B($, void 0, xt(de), b)));
|
|
2224
2234
|
}
|
|
2225
2235
|
Object.defineProperties(pe, {
|
|
2226
2236
|
state: {
|
|
2227
|
-
get: () =>
|
|
2237
|
+
get: () => w()
|
|
2228
2238
|
},
|
|
2229
2239
|
error: {
|
|
2230
2240
|
get: () => T()
|
|
2231
2241
|
},
|
|
2232
2242
|
loading: {
|
|
2233
2243
|
get() {
|
|
2234
|
-
const
|
|
2235
|
-
return
|
|
2244
|
+
const v = w();
|
|
2245
|
+
return v === "pending" || v === "refreshing";
|
|
2236
2246
|
}
|
|
2237
2247
|
},
|
|
2238
2248
|
latest: {
|
|
2239
2249
|
get() {
|
|
2240
|
-
if (!
|
|
2241
|
-
const
|
|
2242
|
-
if (
|
|
2250
|
+
if (!f) return pe();
|
|
2251
|
+
const v = T();
|
|
2252
|
+
if (v && !i) throw v;
|
|
2243
2253
|
return g();
|
|
2244
2254
|
}
|
|
2245
2255
|
}
|
|
2246
2256
|
});
|
|
2247
|
-
let U =
|
|
2248
|
-
return
|
|
2249
|
-
refetch: (
|
|
2257
|
+
let U = C;
|
|
2258
|
+
return d ? Po(() => (U = C, ye(!1))) : ye(!1), [pe, {
|
|
2259
|
+
refetch: (v) => Fs(U, () => ye(v)),
|
|
2250
2260
|
mutate: A
|
|
2251
2261
|
}];
|
|
2252
2262
|
}
|
|
2253
|
-
function
|
|
2263
|
+
function Hc(e) {
|
|
2254
2264
|
return me(e, !1);
|
|
2255
2265
|
}
|
|
2256
2266
|
function Z(e) {
|
|
@@ -2263,14 +2273,14 @@ function Z(e) {
|
|
|
2263
2273
|
G = t;
|
|
2264
2274
|
}
|
|
2265
2275
|
}
|
|
2266
|
-
function
|
|
2276
|
+
function Qc(e, t, n) {
|
|
2267
2277
|
const s = Array.isArray(e);
|
|
2268
2278
|
let r, a = n && n.defer;
|
|
2269
2279
|
return (i) => {
|
|
2270
2280
|
let o;
|
|
2271
2281
|
if (s) {
|
|
2272
2282
|
o = Array(e.length);
|
|
2273
|
-
for (let
|
|
2283
|
+
for (let u = 0; u < e.length; u++) o[u] = e[u]();
|
|
2274
2284
|
} else o = e();
|
|
2275
2285
|
if (a)
|
|
2276
2286
|
return a = !1, i;
|
|
@@ -2278,49 +2288,49 @@ function Vc(e, t, n) {
|
|
|
2278
2288
|
return r = o, l;
|
|
2279
2289
|
};
|
|
2280
2290
|
}
|
|
2281
|
-
function
|
|
2291
|
+
function bo(e) {
|
|
2282
2292
|
Ms(() => Z(e));
|
|
2283
2293
|
}
|
|
2284
|
-
function
|
|
2285
|
-
return
|
|
2294
|
+
function lt(e) {
|
|
2295
|
+
return C === null || (C.cleanups === null ? C.cleanups = [e] : C.cleanups.push(e)), e;
|
|
2286
2296
|
}
|
|
2287
2297
|
function Xn() {
|
|
2288
|
-
return
|
|
2298
|
+
return C;
|
|
2289
2299
|
}
|
|
2290
2300
|
function Fs(e, t) {
|
|
2291
|
-
const n =
|
|
2292
|
-
|
|
2301
|
+
const n = C, s = G;
|
|
2302
|
+
C = e, G = null;
|
|
2293
2303
|
try {
|
|
2294
2304
|
return me(t, !0);
|
|
2295
2305
|
} catch (r) {
|
|
2296
2306
|
Gn(r);
|
|
2297
2307
|
} finally {
|
|
2298
|
-
|
|
2308
|
+
C = n, G = s;
|
|
2299
2309
|
}
|
|
2300
2310
|
}
|
|
2301
|
-
function
|
|
2302
|
-
const t = G, n =
|
|
2311
|
+
function Io(e) {
|
|
2312
|
+
const t = G, n = C;
|
|
2303
2313
|
return Promise.resolve().then(() => {
|
|
2304
|
-
G = t,
|
|
2314
|
+
G = t, C = n;
|
|
2305
2315
|
let s;
|
|
2306
|
-
return me(e, !1), G =
|
|
2316
|
+
return me(e, !1), G = C = null, s ? s.done : void 0;
|
|
2307
2317
|
});
|
|
2308
2318
|
}
|
|
2309
|
-
var [
|
|
2310
|
-
function
|
|
2311
|
-
return [
|
|
2319
|
+
var [Co, $c] = /* @__PURE__ */ F(!1);
|
|
2320
|
+
function jc() {
|
|
2321
|
+
return [Co, Io];
|
|
2312
2322
|
}
|
|
2313
|
-
function
|
|
2323
|
+
function zc(e, t) {
|
|
2314
2324
|
const n = Symbol("context");
|
|
2315
2325
|
return {
|
|
2316
2326
|
id: n,
|
|
2317
|
-
Provider:
|
|
2327
|
+
Provider: Do(n),
|
|
2318
2328
|
defaultValue: e
|
|
2319
2329
|
};
|
|
2320
2330
|
}
|
|
2321
|
-
function
|
|
2331
|
+
function Wc(e) {
|
|
2322
2332
|
let t;
|
|
2323
|
-
return
|
|
2333
|
+
return C && C.context && (t = C.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
2324
2334
|
}
|
|
2325
2335
|
function qs(e) {
|
|
2326
2336
|
const t = J(e), n = J(() => hn(t()));
|
|
@@ -2329,13 +2339,13 @@ function qs(e) {
|
|
|
2329
2339
|
return Array.isArray(s) ? s : s != null ? [s] : [];
|
|
2330
2340
|
}, n;
|
|
2331
2341
|
}
|
|
2332
|
-
var
|
|
2342
|
+
var No;
|
|
2333
2343
|
function Ks() {
|
|
2334
2344
|
if (this.sources && this.state)
|
|
2335
|
-
if (this.state ===
|
|
2345
|
+
if (this.state === _e) st(this);
|
|
2336
2346
|
else {
|
|
2337
2347
|
const e = ee;
|
|
2338
|
-
ee = null, me(() =>
|
|
2348
|
+
ee = null, me(() => Ht(this), !1), ee = e;
|
|
2339
2349
|
}
|
|
2340
2350
|
if (G) {
|
|
2341
2351
|
const e = this.observers ? this.observers.length : 0;
|
|
@@ -2348,32 +2358,32 @@ function Vs(e, t, n) {
|
|
|
2348
2358
|
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && me(() => {
|
|
2349
2359
|
for (let r = 0; r < e.observers.length; r += 1) {
|
|
2350
2360
|
const a = e.observers[r], i = ln && ln.running;
|
|
2351
|
-
i && ln.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ee.push(a) :
|
|
2361
|
+
i && ln.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ee.push(a) : Te.push(a), a.observers && Qs(a)), i || (a.state = _e);
|
|
2352
2362
|
}
|
|
2353
2363
|
if (ee.length > 1e6)
|
|
2354
2364
|
throw ee = [], new Error();
|
|
2355
2365
|
}, !1)), t;
|
|
2356
2366
|
}
|
|
2357
|
-
function
|
|
2367
|
+
function st(e) {
|
|
2358
2368
|
if (!e.fn) return;
|
|
2359
|
-
|
|
2369
|
+
ct(e);
|
|
2360
2370
|
const t = Jt;
|
|
2361
|
-
|
|
2371
|
+
Lo(e, e.value, t);
|
|
2362
2372
|
}
|
|
2363
|
-
function
|
|
2373
|
+
function Lo(e, t, n) {
|
|
2364
2374
|
let s;
|
|
2365
|
-
const r =
|
|
2366
|
-
G =
|
|
2375
|
+
const r = C, a = G;
|
|
2376
|
+
G = C = e;
|
|
2367
2377
|
try {
|
|
2368
2378
|
s = e.fn(t);
|
|
2369
2379
|
} catch (i) {
|
|
2370
|
-
return e.pure && (e.state =
|
|
2380
|
+
return e.pure && (e.state = _e, e.owned && e.owned.forEach(ct), e.owned = null), e.updatedAt = n + 1, Gn(i);
|
|
2371
2381
|
} finally {
|
|
2372
|
-
G = a,
|
|
2382
|
+
G = a, C = r;
|
|
2373
2383
|
}
|
|
2374
2384
|
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Vs(e, s) : e.value = s, e.updatedAt = n);
|
|
2375
2385
|
}
|
|
2376
|
-
function Xt(e, t, n, s =
|
|
2386
|
+
function Xt(e, t, n, s = _e, r) {
|
|
2377
2387
|
const a = {
|
|
2378
2388
|
fn: e,
|
|
2379
2389
|
state: s,
|
|
@@ -2383,78 +2393,78 @@ function Xt(e, t, n, s = Se, r) {
|
|
|
2383
2393
|
sourceSlots: null,
|
|
2384
2394
|
cleanups: null,
|
|
2385
2395
|
value: t,
|
|
2386
|
-
owner:
|
|
2387
|
-
context:
|
|
2396
|
+
owner: C,
|
|
2397
|
+
context: C ? C.context : null,
|
|
2388
2398
|
pure: n
|
|
2389
2399
|
};
|
|
2390
|
-
return
|
|
2400
|
+
return C === null || C !== Bs && (C.owned ? C.owned.push(a) : C.owned = [a]), a;
|
|
2391
2401
|
}
|
|
2392
|
-
function
|
|
2402
|
+
function Vt(e) {
|
|
2393
2403
|
if (e.state === 0) return;
|
|
2394
|
-
if (e.state ===
|
|
2404
|
+
if (e.state === Kt) return Ht(e);
|
|
2395
2405
|
if (e.suspense && Z(e.suspense.inFallback)) return e.suspense.effects.push(e);
|
|
2396
2406
|
const t = [e];
|
|
2397
2407
|
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < Jt); )
|
|
2398
2408
|
e.state && t.push(e);
|
|
2399
2409
|
for (let n = t.length - 1; n >= 0; n--)
|
|
2400
|
-
if (e = t[n], e.state ===
|
|
2401
|
-
|
|
2402
|
-
else if (e.state ===
|
|
2410
|
+
if (e = t[n], e.state === _e)
|
|
2411
|
+
st(e);
|
|
2412
|
+
else if (e.state === Kt) {
|
|
2403
2413
|
const s = ee;
|
|
2404
|
-
ee = null, me(() =>
|
|
2414
|
+
ee = null, me(() => Ht(e, t[0]), !1), ee = s;
|
|
2405
2415
|
}
|
|
2406
2416
|
}
|
|
2407
2417
|
function me(e, t) {
|
|
2408
2418
|
if (ee) return e();
|
|
2409
2419
|
let n = !1;
|
|
2410
|
-
t || (ee = []),
|
|
2420
|
+
t || (ee = []), Te ? n = !0 : Te = [], Jt++;
|
|
2411
2421
|
try {
|
|
2412
2422
|
const s = e();
|
|
2413
|
-
return
|
|
2423
|
+
return ko(n), s;
|
|
2414
2424
|
} catch (s) {
|
|
2415
|
-
n || (
|
|
2425
|
+
n || (Te = null), ee = null, Gn(s);
|
|
2416
2426
|
}
|
|
2417
2427
|
}
|
|
2418
|
-
function
|
|
2428
|
+
function ko(e) {
|
|
2419
2429
|
if (ee && (Hs(ee), ee = null), e) return;
|
|
2420
|
-
const t =
|
|
2421
|
-
|
|
2430
|
+
const t = Te;
|
|
2431
|
+
Te = null, t.length && me(() => Us(t), !1);
|
|
2422
2432
|
}
|
|
2423
2433
|
function Hs(e) {
|
|
2424
|
-
for (let t = 0; t < e.length; t++)
|
|
2434
|
+
for (let t = 0; t < e.length; t++) Vt(e[t]);
|
|
2425
2435
|
}
|
|
2426
|
-
function
|
|
2436
|
+
function Oo(e) {
|
|
2427
2437
|
let t, n = 0;
|
|
2428
2438
|
for (t = 0; t < e.length; t++) {
|
|
2429
2439
|
const s = e[t];
|
|
2430
|
-
s.user ? e[n++] = s :
|
|
2440
|
+
s.user ? e[n++] = s : Vt(s);
|
|
2431
2441
|
}
|
|
2432
|
-
if (
|
|
2433
|
-
if (
|
|
2434
|
-
|
|
2442
|
+
if (_.context) {
|
|
2443
|
+
if (_.count) {
|
|
2444
|
+
_.effects || (_.effects = []), _.effects.push(...e.slice(0, n));
|
|
2435
2445
|
return;
|
|
2436
2446
|
}
|
|
2437
|
-
|
|
2447
|
+
rt();
|
|
2438
2448
|
}
|
|
2439
|
-
for (
|
|
2449
|
+
for (_.effects && (_.done || !_.count) && (e = [..._.effects, ...e], n += _.effects.length, delete _.effects), t = 0; t < n; t++) Vt(e[t]);
|
|
2440
2450
|
}
|
|
2441
|
-
function
|
|
2451
|
+
function Ht(e, t) {
|
|
2442
2452
|
e.state = 0;
|
|
2443
2453
|
for (let n = 0; n < e.sources.length; n += 1) {
|
|
2444
2454
|
const s = e.sources[n];
|
|
2445
2455
|
if (s.sources) {
|
|
2446
2456
|
const r = s.state;
|
|
2447
|
-
r ===
|
|
2457
|
+
r === _e ? s !== t && (!s.updatedAt || s.updatedAt < Jt) && Vt(s) : r === Kt && Ht(s, t);
|
|
2448
2458
|
}
|
|
2449
2459
|
}
|
|
2450
2460
|
}
|
|
2451
2461
|
function Qs(e) {
|
|
2452
2462
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
2453
2463
|
const n = e.observers[t];
|
|
2454
|
-
n.state || (n.state =
|
|
2464
|
+
n.state || (n.state = Kt, n.pure ? ee.push(n) : Te.push(n), n.observers && Qs(n));
|
|
2455
2465
|
}
|
|
2456
2466
|
}
|
|
2457
|
-
function
|
|
2467
|
+
function ct(e) {
|
|
2458
2468
|
let t;
|
|
2459
2469
|
if (e.sources)
|
|
2460
2470
|
for (; e.sources.length; ) {
|
|
@@ -2465,11 +2475,11 @@ function ut(e) {
|
|
|
2465
2475
|
}
|
|
2466
2476
|
}
|
|
2467
2477
|
if (e.tOwned) {
|
|
2468
|
-
for (t = e.tOwned.length - 1; t >= 0; t--)
|
|
2478
|
+
for (t = e.tOwned.length - 1; t >= 0; t--) ct(e.tOwned[t]);
|
|
2469
2479
|
delete e.tOwned;
|
|
2470
2480
|
}
|
|
2471
2481
|
if (e.owned) {
|
|
2472
|
-
for (t = e.owned.length - 1; t >= 0; t--)
|
|
2482
|
+
for (t = e.owned.length - 1; t >= 0; t--) ct(e.owned[t]);
|
|
2473
2483
|
e.owned = null;
|
|
2474
2484
|
}
|
|
2475
2485
|
if (e.cleanups) {
|
|
@@ -2478,13 +2488,13 @@ function ut(e) {
|
|
|
2478
2488
|
}
|
|
2479
2489
|
e.state = 0;
|
|
2480
2490
|
}
|
|
2481
|
-
function
|
|
2491
|
+
function xt(e) {
|
|
2482
2492
|
return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
|
|
2483
2493
|
cause: e
|
|
2484
2494
|
});
|
|
2485
2495
|
}
|
|
2486
|
-
function Gn(e, t =
|
|
2487
|
-
throw
|
|
2496
|
+
function Gn(e, t = C) {
|
|
2497
|
+
throw xt(e);
|
|
2488
2498
|
}
|
|
2489
2499
|
function hn(e) {
|
|
2490
2500
|
if (typeof e == "function" && !e.length) return hn(e());
|
|
@@ -2498,70 +2508,70 @@ function hn(e) {
|
|
|
2498
2508
|
}
|
|
2499
2509
|
return e;
|
|
2500
2510
|
}
|
|
2501
|
-
function
|
|
2511
|
+
function Do(e, t) {
|
|
2502
2512
|
return function(s) {
|
|
2503
2513
|
let r;
|
|
2504
|
-
return De(() => r = Z(() => (
|
|
2505
|
-
...
|
|
2514
|
+
return De(() => r = Z(() => (C.context = {
|
|
2515
|
+
...C.context,
|
|
2506
2516
|
[e]: s.value
|
|
2507
2517
|
}, qs(() => s.children))), void 0), r;
|
|
2508
2518
|
};
|
|
2509
2519
|
}
|
|
2510
2520
|
var gn = Symbol("fallback");
|
|
2511
|
-
function
|
|
2521
|
+
function Qt(e) {
|
|
2512
2522
|
for (let t = 0; t < e.length; t++) e[t]();
|
|
2513
2523
|
}
|
|
2514
|
-
function
|
|
2524
|
+
function Go(e, t, n = {}) {
|
|
2515
2525
|
let s = [], r = [], a = [], i = 0, o = t.length > 1 ? [] : null;
|
|
2516
|
-
return
|
|
2517
|
-
let l = e() || [],
|
|
2526
|
+
return lt(() => Qt(a)), () => {
|
|
2527
|
+
let l = e() || [], u = l.length, f, d;
|
|
2518
2528
|
return l[Rs], Z(() => {
|
|
2519
|
-
let g, A, T, p, y,
|
|
2520
|
-
if (
|
|
2521
|
-
i !== 0 && (
|
|
2529
|
+
let g, A, T, p, y, P, w, O, B;
|
|
2530
|
+
if (u === 0)
|
|
2531
|
+
i !== 0 && (Qt(a), a = [], s = [], r = [], i = 0, o && (o = [])), n.fallback && (s = [gn], r[0] = Oe((L) => (a[0] = L, n.fallback())), i = 1);
|
|
2522
2532
|
else if (i === 0) {
|
|
2523
|
-
for (r = new Array(
|
|
2524
|
-
s[
|
|
2525
|
-
i =
|
|
2533
|
+
for (r = new Array(u), d = 0; d < u; d++)
|
|
2534
|
+
s[d] = l[d], r[d] = Oe(h);
|
|
2535
|
+
i = u;
|
|
2526
2536
|
} else {
|
|
2527
|
-
for (T = new Array(
|
|
2528
|
-
for (
|
|
2529
|
-
T[O] = r[
|
|
2530
|
-
for (g = /* @__PURE__ */ new Map(), A = new Array(O + 1),
|
|
2531
|
-
B = l[
|
|
2532
|
-
for (
|
|
2533
|
-
B = s[
|
|
2534
|
-
for (
|
|
2535
|
-
|
|
2536
|
-
r = r.slice(0, i =
|
|
2537
|
+
for (T = new Array(u), p = new Array(u), o && (y = new Array(u)), P = 0, w = Math.min(i, u); P < w && s[P] === l[P]; P++) ;
|
|
2538
|
+
for (w = i - 1, O = u - 1; w >= P && O >= P && s[w] === l[O]; w--, O--)
|
|
2539
|
+
T[O] = r[w], p[O] = a[w], o && (y[O] = o[w]);
|
|
2540
|
+
for (g = /* @__PURE__ */ new Map(), A = new Array(O + 1), d = O; d >= P; d--)
|
|
2541
|
+
B = l[d], f = g.get(B), A[d] = f === void 0 ? -1 : f, g.set(B, d);
|
|
2542
|
+
for (f = P; f <= w; f++)
|
|
2543
|
+
B = s[f], d = g.get(B), d !== void 0 && d !== -1 ? (T[d] = r[f], p[d] = a[f], o && (y[d] = o[f]), d = A[d], g.set(B, d)) : a[f]();
|
|
2544
|
+
for (d = P; d < u; d++)
|
|
2545
|
+
d in T ? (r[d] = T[d], a[d] = p[d], o && (o[d] = y[d], o[d](d))) : r[d] = Oe(h);
|
|
2546
|
+
r = r.slice(0, i = u), s = l.slice(0);
|
|
2537
2547
|
}
|
|
2538
2548
|
return r;
|
|
2539
2549
|
});
|
|
2540
2550
|
function h(g) {
|
|
2541
|
-
if (a[
|
|
2542
|
-
const [A, T] = F(
|
|
2543
|
-
return o[
|
|
2551
|
+
if (a[d] = g, o) {
|
|
2552
|
+
const [A, T] = F(d);
|
|
2553
|
+
return o[d] = T, t(l[d], A);
|
|
2544
2554
|
}
|
|
2545
|
-
return t(l[
|
|
2555
|
+
return t(l[d]);
|
|
2546
2556
|
}
|
|
2547
2557
|
};
|
|
2548
2558
|
}
|
|
2549
|
-
function
|
|
2559
|
+
function xo(e, t, n = {}) {
|
|
2550
2560
|
let s = [], r = [], a = [], i = [], o = 0, l;
|
|
2551
|
-
return
|
|
2552
|
-
const
|
|
2553
|
-
return
|
|
2554
|
-
if (
|
|
2555
|
-
return o !== 0 && (
|
|
2556
|
-
for (s[0] === gn && (a[0](), a = [], s = [], r = [], o = 0), l = 0; l <
|
|
2557
|
-
l < s.length && s[l] !==
|
|
2561
|
+
return lt(() => Qt(a)), () => {
|
|
2562
|
+
const u = e() || [], f = u.length;
|
|
2563
|
+
return u[Rs], Z(() => {
|
|
2564
|
+
if (f === 0)
|
|
2565
|
+
return o !== 0 && (Qt(a), a = [], s = [], r = [], o = 0, i = []), n.fallback && (s = [gn], r[0] = Oe((h) => (a[0] = h, n.fallback())), o = 1), r;
|
|
2566
|
+
for (s[0] === gn && (a[0](), a = [], s = [], r = [], o = 0), l = 0; l < f; l++)
|
|
2567
|
+
l < s.length && s[l] !== u[l] ? i[l](() => u[l]) : l >= s.length && (r[l] = Oe(d));
|
|
2558
2568
|
for (; l < s.length; l++)
|
|
2559
2569
|
a[l]();
|
|
2560
|
-
return o = i.length = a.length =
|
|
2570
|
+
return o = i.length = a.length = f, s = u.slice(0), r = r.slice(0, o);
|
|
2561
2571
|
});
|
|
2562
|
-
function
|
|
2572
|
+
function d(h) {
|
|
2563
2573
|
a[l] = h;
|
|
2564
|
-
const [g, A] = F(
|
|
2574
|
+
const [g, A] = F(u[l]);
|
|
2565
2575
|
return i[l] = A, t(g, l);
|
|
2566
2576
|
}
|
|
2567
2577
|
};
|
|
@@ -2569,18 +2579,18 @@ function Do(e, t, n = {}) {
|
|
|
2569
2579
|
function $s(e, t) {
|
|
2570
2580
|
return Z(() => e(t || {}));
|
|
2571
2581
|
}
|
|
2572
|
-
function
|
|
2582
|
+
function Lt() {
|
|
2573
2583
|
return !0;
|
|
2574
2584
|
}
|
|
2575
2585
|
var mn = {
|
|
2576
2586
|
get(e, t, n) {
|
|
2577
|
-
return t ===
|
|
2587
|
+
return t === Ft ? n : e.get(t);
|
|
2578
2588
|
},
|
|
2579
2589
|
has(e, t) {
|
|
2580
|
-
return t ===
|
|
2590
|
+
return t === Ft ? !0 : e.has(t);
|
|
2581
2591
|
},
|
|
2582
|
-
set:
|
|
2583
|
-
deleteProperty:
|
|
2592
|
+
set: Lt,
|
|
2593
|
+
deleteProperty: Lt,
|
|
2584
2594
|
getOwnPropertyDescriptor(e, t) {
|
|
2585
2595
|
return {
|
|
2586
2596
|
configurable: !0,
|
|
@@ -2588,8 +2598,8 @@ var mn = {
|
|
|
2588
2598
|
get() {
|
|
2589
2599
|
return e.get(t);
|
|
2590
2600
|
},
|
|
2591
|
-
set:
|
|
2592
|
-
deleteProperty:
|
|
2601
|
+
set: Lt,
|
|
2602
|
+
deleteProperty: Lt
|
|
2593
2603
|
};
|
|
2594
2604
|
},
|
|
2595
2605
|
ownKeys(e) {
|
|
@@ -2599,7 +2609,7 @@ var mn = {
|
|
|
2599
2609
|
function cn(e) {
|
|
2600
2610
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
2601
2611
|
}
|
|
2602
|
-
function
|
|
2612
|
+
function Ro() {
|
|
2603
2613
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
2604
2614
|
const n = this[e]();
|
|
2605
2615
|
if (n !== void 0) return n;
|
|
@@ -2609,7 +2619,7 @@ function js(...e) {
|
|
|
2609
2619
|
let t = !1;
|
|
2610
2620
|
for (let i = 0; i < e.length; i++) {
|
|
2611
2621
|
const o = e[i];
|
|
2612
|
-
t = t || !!o &&
|
|
2622
|
+
t = t || !!o && Ft in o, e[i] = typeof o == "function" ? (t = !0, J(o)) : o;
|
|
2613
2623
|
}
|
|
2614
2624
|
if (xs && t)
|
|
2615
2625
|
return new Proxy({
|
|
@@ -2635,19 +2645,19 @@ function js(...e) {
|
|
|
2635
2645
|
const o = e[i];
|
|
2636
2646
|
if (!o) continue;
|
|
2637
2647
|
const l = Object.getOwnPropertyNames(o);
|
|
2638
|
-
for (let
|
|
2639
|
-
const
|
|
2640
|
-
if (
|
|
2641
|
-
const
|
|
2642
|
-
if (!s[
|
|
2643
|
-
s[
|
|
2648
|
+
for (let u = l.length - 1; u >= 0; u--) {
|
|
2649
|
+
const f = l[u];
|
|
2650
|
+
if (f === "__proto__" || f === "constructor") continue;
|
|
2651
|
+
const d = Object.getOwnPropertyDescriptor(o, f);
|
|
2652
|
+
if (!s[f])
|
|
2653
|
+
s[f] = d.get ? {
|
|
2644
2654
|
enumerable: !0,
|
|
2645
2655
|
configurable: !0,
|
|
2646
|
-
get:
|
|
2647
|
-
} :
|
|
2656
|
+
get: Ro.bind(n[f] = [d.get.bind(o)])
|
|
2657
|
+
} : d.value !== void 0 ? d : void 0;
|
|
2648
2658
|
else {
|
|
2649
|
-
const h = n[
|
|
2650
|
-
h && (
|
|
2659
|
+
const h = n[f];
|
|
2660
|
+
h && (d.get ? h.push(d.get.bind(o)) : d.value !== void 0 && h.push(() => d.value));
|
|
2651
2661
|
}
|
|
2652
2662
|
}
|
|
2653
2663
|
}
|
|
@@ -2658,8 +2668,8 @@ function js(...e) {
|
|
|
2658
2668
|
}
|
|
2659
2669
|
return r;
|
|
2660
2670
|
}
|
|
2661
|
-
function
|
|
2662
|
-
if (xs &&
|
|
2671
|
+
function Uo(e, ...t) {
|
|
2672
|
+
if (xs && Ft in e) {
|
|
2663
2673
|
const r = new Set(t.length > 1 ? t.flat() : t[0]), a = t.map((i) => new Proxy({
|
|
2664
2674
|
get(o) {
|
|
2665
2675
|
return i.includes(o) ? e[o] : void 0;
|
|
@@ -2687,8 +2697,8 @@ function xo(e, ...t) {
|
|
|
2687
2697
|
for (const r of Object.getOwnPropertyNames(e)) {
|
|
2688
2698
|
const a = Object.getOwnPropertyDescriptor(e, r), i = !a.get && !a.set && a.enumerable && a.writable && a.configurable;
|
|
2689
2699
|
let o = !1, l = 0;
|
|
2690
|
-
for (const
|
|
2691
|
-
|
|
2700
|
+
for (const u of t)
|
|
2701
|
+
u.includes(r) && (o = !0, i ? s[l][r] = a.value : Object.defineProperty(s[l], r, a)), ++l;
|
|
2692
2702
|
o || (i ? n[r] = a.value : Object.defineProperty(n, r, a));
|
|
2693
2703
|
}
|
|
2694
2704
|
return [...s, n];
|
|
@@ -2696,45 +2706,45 @@ function xo(e, ...t) {
|
|
|
2696
2706
|
function zs(e) {
|
|
2697
2707
|
let t, n;
|
|
2698
2708
|
const s = (r) => {
|
|
2699
|
-
const a =
|
|
2709
|
+
const a = _.context;
|
|
2700
2710
|
if (a) {
|
|
2701
2711
|
const [o, l] = F();
|
|
2702
|
-
|
|
2703
|
-
!
|
|
2712
|
+
_.count || (_.count = 0), _.count++, (n || (n = e())).then((u) => {
|
|
2713
|
+
!_.done && rt(a), _.count--, l(() => u.default), rt();
|
|
2704
2714
|
}), t = o;
|
|
2705
2715
|
} else if (!t) {
|
|
2706
|
-
const [o] =
|
|
2716
|
+
const [o] = wo(() => (n || (n = e())).then((l) => l.default));
|
|
2707
2717
|
t = o;
|
|
2708
2718
|
}
|
|
2709
2719
|
let i;
|
|
2710
2720
|
return J(() => (i = t()) ? Z(() => {
|
|
2711
|
-
if (!a ||
|
|
2712
|
-
const o =
|
|
2713
|
-
|
|
2721
|
+
if (!a || _.done) return i(r);
|
|
2722
|
+
const o = _.context;
|
|
2723
|
+
rt(a);
|
|
2714
2724
|
const l = i(r);
|
|
2715
|
-
return
|
|
2725
|
+
return rt(o), l;
|
|
2716
2726
|
}) : "");
|
|
2717
2727
|
};
|
|
2718
2728
|
return s.preload = () => n || ((n = e()).then((r) => t = () => r.default), n), s;
|
|
2719
2729
|
}
|
|
2720
|
-
var
|
|
2721
|
-
function
|
|
2722
|
-
return
|
|
2730
|
+
var Bo = 0;
|
|
2731
|
+
function Yc() {
|
|
2732
|
+
return _.context ? _.getNextContextId() : `cl-${Bo++}`;
|
|
2723
2733
|
}
|
|
2724
2734
|
var Ws = (e) => `Stale read from <${e}>.`;
|
|
2725
|
-
function
|
|
2735
|
+
function Jc(e) {
|
|
2726
2736
|
const t = "fallback" in e && {
|
|
2727
2737
|
fallback: () => e.fallback
|
|
2728
2738
|
};
|
|
2729
|
-
return J(
|
|
2739
|
+
return J(Go(() => e.each, e.children, t || void 0));
|
|
2730
2740
|
}
|
|
2731
|
-
function
|
|
2741
|
+
function Xc(e) {
|
|
2732
2742
|
const t = "fallback" in e && {
|
|
2733
2743
|
fallback: () => e.fallback
|
|
2734
2744
|
};
|
|
2735
|
-
return J(
|
|
2745
|
+
return J(xo(() => e.each, e.children, t || void 0));
|
|
2736
2746
|
}
|
|
2737
|
-
function
|
|
2747
|
+
function Zc(e) {
|
|
2738
2748
|
const t = e.keyed, n = J(() => e.when, void 0, void 0), s = t ? n : J(n, void 0, {
|
|
2739
2749
|
equals: (r, a) => !r == !a
|
|
2740
2750
|
});
|
|
@@ -2750,16 +2760,16 @@ function Jc(e) {
|
|
|
2750
2760
|
return e.fallback;
|
|
2751
2761
|
}, void 0, void 0);
|
|
2752
2762
|
}
|
|
2753
|
-
function
|
|
2763
|
+
function eu(e) {
|
|
2754
2764
|
const t = qs(() => e.children), n = J(() => {
|
|
2755
2765
|
const s = t(), r = Array.isArray(s) ? s : [s];
|
|
2756
2766
|
let a = () => {
|
|
2757
2767
|
};
|
|
2758
2768
|
for (let i = 0; i < r.length; i++) {
|
|
2759
|
-
const o = i, l = r[i],
|
|
2769
|
+
const o = i, l = r[i], u = a, f = J(() => u() ? void 0 : l.when, void 0, void 0), d = l.keyed ? f : J(f, void 0, {
|
|
2760
2770
|
equals: (h, g) => !h == !g
|
|
2761
2771
|
});
|
|
2762
|
-
a = () =>
|
|
2772
|
+
a = () => u() || (d() ? [o, f, l] : void 0);
|
|
2763
2773
|
}
|
|
2764
2774
|
return a;
|
|
2765
2775
|
});
|
|
@@ -2768,19 +2778,19 @@ function Xc(e) {
|
|
|
2768
2778
|
if (!s) return e.fallback;
|
|
2769
2779
|
const [r, a, i] = s, o = i.children;
|
|
2770
2780
|
return typeof o == "function" && o.length > 0 ? Z(() => o(i.keyed ? a() : () => {
|
|
2771
|
-
var
|
|
2772
|
-
if (((
|
|
2781
|
+
var u;
|
|
2782
|
+
if (((u = Z(n)()) == null ? void 0 : u[0]) !== r) throw Ws("Match");
|
|
2773
2783
|
return a();
|
|
2774
2784
|
})) : o;
|
|
2775
2785
|
}, void 0, void 0);
|
|
2776
2786
|
}
|
|
2777
|
-
function
|
|
2787
|
+
function tu(e) {
|
|
2778
2788
|
return e;
|
|
2779
2789
|
}
|
|
2780
|
-
var
|
|
2790
|
+
var Mo = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"], Fo = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...Mo]), qo = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), Ko = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2781
2791
|
className: "class",
|
|
2782
2792
|
htmlFor: "for"
|
|
2783
|
-
}),
|
|
2793
|
+
}), Vo = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2784
2794
|
class: "className",
|
|
2785
2795
|
novalidate: {
|
|
2786
2796
|
$: "noValidate",
|
|
@@ -2809,11 +2819,11 @@ var Uo = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "contr
|
|
|
2809
2819
|
TEXTAREA: 1
|
|
2810
2820
|
}
|
|
2811
2821
|
});
|
|
2812
|
-
function
|
|
2813
|
-
const n =
|
|
2822
|
+
function Ho(e, t) {
|
|
2823
|
+
const n = Vo[e];
|
|
2814
2824
|
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
2815
2825
|
}
|
|
2816
|
-
var
|
|
2826
|
+
var Qo = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]), $o = /* @__PURE__ */ new Set([
|
|
2817
2827
|
"altGlyph",
|
|
2818
2828
|
"altGlyphDef",
|
|
2819
2829
|
"altGlyphItem",
|
|
@@ -2891,12 +2901,12 @@ var Vo = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
|
|
|
2891
2901
|
"use",
|
|
2892
2902
|
"view",
|
|
2893
2903
|
"vkern"
|
|
2894
|
-
]),
|
|
2904
|
+
]), jo = {
|
|
2895
2905
|
xlink: "http://www.w3.org/1999/xlink",
|
|
2896
2906
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
2897
|
-
},
|
|
2898
|
-
function
|
|
2899
|
-
let s = n.length, r = t.length, a = s, i = 0, o = 0, l = t[r - 1].nextSibling,
|
|
2907
|
+
}, nu = (e) => J(() => e());
|
|
2908
|
+
function zo(e, t, n) {
|
|
2909
|
+
let s = n.length, r = t.length, a = s, i = 0, o = 0, l = t[r - 1].nextSibling, u = null;
|
|
2900
2910
|
for (; i < r || o < a; ) {
|
|
2901
2911
|
if (t[i] === n[o]) {
|
|
2902
2912
|
i++, o++;
|
|
@@ -2905,36 +2915,36 @@ function $o(e, t, n) {
|
|
|
2905
2915
|
for (; t[r - 1] === n[a - 1]; )
|
|
2906
2916
|
r--, a--;
|
|
2907
2917
|
if (r === i) {
|
|
2908
|
-
const
|
|
2909
|
-
for (; o < a; ) e.insertBefore(n[o++],
|
|
2918
|
+
const f = a < s ? o ? n[o - 1].nextSibling : n[a - o] : l;
|
|
2919
|
+
for (; o < a; ) e.insertBefore(n[o++], f);
|
|
2910
2920
|
} else if (a === o)
|
|
2911
2921
|
for (; i < r; )
|
|
2912
|
-
(!
|
|
2922
|
+
(!u || !u.has(t[i])) && t[i].remove(), i++;
|
|
2913
2923
|
else if (t[i] === n[a - 1] && n[o] === t[r - 1]) {
|
|
2914
|
-
const
|
|
2915
|
-
e.insertBefore(n[o++], t[i++].nextSibling), e.insertBefore(n[--a],
|
|
2924
|
+
const f = t[--r].nextSibling;
|
|
2925
|
+
e.insertBefore(n[o++], t[i++].nextSibling), e.insertBefore(n[--a], f), t[r] = n[a];
|
|
2916
2926
|
} else {
|
|
2917
|
-
if (!
|
|
2918
|
-
|
|
2919
|
-
let
|
|
2920
|
-
for (;
|
|
2927
|
+
if (!u) {
|
|
2928
|
+
u = /* @__PURE__ */ new Map();
|
|
2929
|
+
let d = o;
|
|
2930
|
+
for (; d < a; ) u.set(n[d], d++);
|
|
2921
2931
|
}
|
|
2922
|
-
const
|
|
2923
|
-
if (
|
|
2924
|
-
if (o <
|
|
2925
|
-
let
|
|
2926
|
-
for (; ++
|
|
2932
|
+
const f = u.get(t[i]);
|
|
2933
|
+
if (f != null)
|
|
2934
|
+
if (o < f && f < a) {
|
|
2935
|
+
let d = i, h = 1, g;
|
|
2936
|
+
for (; ++d < r && d < a && !((g = u.get(t[d])) == null || g !== f + h); )
|
|
2927
2937
|
h++;
|
|
2928
|
-
if (h >
|
|
2938
|
+
if (h > f - o) {
|
|
2929
2939
|
const A = t[i];
|
|
2930
|
-
for (; o <
|
|
2940
|
+
for (; o < f; ) e.insertBefore(n[o++], A);
|
|
2931
2941
|
} else e.replaceChild(n[o++], t[i++]);
|
|
2932
2942
|
} else i++;
|
|
2933
2943
|
else t[i++].remove();
|
|
2934
2944
|
}
|
|
2935
2945
|
}
|
|
2936
2946
|
}
|
|
2937
|
-
var
|
|
2947
|
+
var it = "_$DX_DELEGATE";
|
|
2938
2948
|
function Ys(e, t, n, s = {}) {
|
|
2939
2949
|
let r;
|
|
2940
2950
|
return Oe((a) => {
|
|
@@ -2943,7 +2953,7 @@ function Ys(e, t, n, s = {}) {
|
|
|
2943
2953
|
r(), t.textContent = "";
|
|
2944
2954
|
};
|
|
2945
2955
|
}
|
|
2946
|
-
function
|
|
2956
|
+
function su(e, t, n, s) {
|
|
2947
2957
|
let r;
|
|
2948
2958
|
const a = () => {
|
|
2949
2959
|
const o = document.createElement("template");
|
|
@@ -2951,32 +2961,32 @@ function tu(e, t, n, s) {
|
|
|
2951
2961
|
}, i = () => (r || (r = a())).cloneNode(!0);
|
|
2952
2962
|
return i.cloneNode = i, i;
|
|
2953
2963
|
}
|
|
2954
|
-
function
|
|
2955
|
-
const n = t[
|
|
2964
|
+
function Wo(e, t = window.document) {
|
|
2965
|
+
const n = t[it] || (t[it] = /* @__PURE__ */ new Set());
|
|
2956
2966
|
for (let s = 0, r = e.length; s < r; s++) {
|
|
2957
2967
|
const a = e[s];
|
|
2958
2968
|
n.has(a) || (n.add(a), t.addEventListener(a, Js));
|
|
2959
2969
|
}
|
|
2960
2970
|
}
|
|
2961
|
-
function
|
|
2962
|
-
if (e[
|
|
2963
|
-
for (let t of e[
|
|
2964
|
-
delete e[
|
|
2971
|
+
function ru(e = window.document) {
|
|
2972
|
+
if (e[it]) {
|
|
2973
|
+
for (let t of e[it].keys()) e.removeEventListener(t, Js);
|
|
2974
|
+
delete e[it];
|
|
2965
2975
|
}
|
|
2966
2976
|
}
|
|
2967
2977
|
function En(e, t, n) {
|
|
2968
2978
|
Ue(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
2969
2979
|
}
|
|
2970
|
-
function
|
|
2980
|
+
function Yo(e, t, n, s) {
|
|
2971
2981
|
Ue(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
|
|
2972
2982
|
}
|
|
2973
|
-
function
|
|
2983
|
+
function Jo(e, t, n) {
|
|
2974
2984
|
Ue(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
|
|
2975
2985
|
}
|
|
2976
|
-
function
|
|
2986
|
+
function Xo(e, t) {
|
|
2977
2987
|
Ue(e) || (t == null ? e.removeAttribute("class") : e.className = t);
|
|
2978
2988
|
}
|
|
2979
|
-
function
|
|
2989
|
+
function Zo(e, t, n, s) {
|
|
2980
2990
|
if (s)
|
|
2981
2991
|
Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
2982
2992
|
else if (Array.isArray(n)) {
|
|
@@ -2984,7 +2994,7 @@ function Jo(e, t, n, s) {
|
|
|
2984
2994
|
e.addEventListener(t, n[0] = (a) => r.call(e, n[1], a));
|
|
2985
2995
|
} else e.addEventListener(t, n, typeof n != "function" && n);
|
|
2986
2996
|
}
|
|
2987
|
-
function
|
|
2997
|
+
function el(e, t, n = {}) {
|
|
2988
2998
|
const s = Object.keys(t || {}), r = Object.keys(n);
|
|
2989
2999
|
let a, i;
|
|
2990
3000
|
for (a = 0, i = r.length; a < i; a++) {
|
|
@@ -2997,7 +3007,7 @@ function Xo(e, t, n = {}) {
|
|
|
2997
3007
|
}
|
|
2998
3008
|
return n;
|
|
2999
3009
|
}
|
|
3000
|
-
function
|
|
3010
|
+
function tl(e, t, n) {
|
|
3001
3011
|
if (!t) return n ? En(e, "style") : t;
|
|
3002
3012
|
const s = e.style;
|
|
3003
3013
|
if (typeof t == "string") return s.cssText = t;
|
|
@@ -3009,18 +3019,18 @@ function Zo(e, t, n) {
|
|
|
3009
3019
|
r = t[a], r !== n[a] && (s.setProperty(a, r), n[a] = r);
|
|
3010
3020
|
return n;
|
|
3011
3021
|
}
|
|
3012
|
-
function
|
|
3022
|
+
function nl(e, t = {}, n, s) {
|
|
3013
3023
|
const r = {};
|
|
3014
|
-
return s || De(() => r.children =
|
|
3024
|
+
return s || De(() => r.children = ut(e, t.children, r.children)), De(() => typeof t.ref == "function" && sl(t.ref, e)), De(() => rl(e, t, n, !0, r, !0)), r;
|
|
3015
3025
|
}
|
|
3016
|
-
function
|
|
3026
|
+
function sl(e, t, n) {
|
|
3017
3027
|
return Z(() => e(t, n));
|
|
3018
3028
|
}
|
|
3019
3029
|
function pn(e, t, n, s) {
|
|
3020
|
-
if (n !== void 0 && !s && (s = []), typeof t != "function") return
|
|
3021
|
-
De((r) =>
|
|
3030
|
+
if (n !== void 0 && !s && (s = []), typeof t != "function") return ut(e, t, s, n);
|
|
3031
|
+
De((r) => ut(e, t(), r, n), s);
|
|
3022
3032
|
}
|
|
3023
|
-
function
|
|
3033
|
+
function rl(e, t, n, s, r = {}, a = !1) {
|
|
3024
3034
|
t || (t = {});
|
|
3025
3035
|
for (const i in r)
|
|
3026
3036
|
if (!(i in t)) {
|
|
@@ -3034,14 +3044,14 @@ function nl(e, t, n, s, r = {}, a = !1) {
|
|
|
3034
3044
|
r[i] = es(e, i, o, r[i], n, a, t);
|
|
3035
3045
|
}
|
|
3036
3046
|
}
|
|
3037
|
-
function
|
|
3047
|
+
function al(e) {
|
|
3038
3048
|
let t, n;
|
|
3039
|
-
return !Ue() || !(t =
|
|
3049
|
+
return !Ue() || !(t = _.registry.get(n = ol())) ? e() : (_.completed && _.completed.add(t), _.registry.delete(n), t);
|
|
3040
3050
|
}
|
|
3041
3051
|
function Ue(e) {
|
|
3042
|
-
return !!
|
|
3052
|
+
return !!_.context && !_.done && (!e || e.isConnected);
|
|
3043
3053
|
}
|
|
3044
|
-
function
|
|
3054
|
+
function il(e) {
|
|
3045
3055
|
return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
3046
3056
|
}
|
|
3047
3057
|
function Zn(e, t, n) {
|
|
@@ -3049,9 +3059,9 @@ function Zn(e, t, n) {
|
|
|
3049
3059
|
for (let r = 0, a = s.length; r < a; r++) e.classList.toggle(s[r], n);
|
|
3050
3060
|
}
|
|
3051
3061
|
function es(e, t, n, s, r, a, i) {
|
|
3052
|
-
let o, l, f, d
|
|
3053
|
-
if (t === "style") return
|
|
3054
|
-
if (t === "classList") return
|
|
3062
|
+
let o, l, u, f, d;
|
|
3063
|
+
if (t === "style") return tl(e, n, s);
|
|
3064
|
+
if (t === "classList") return el(e, n, s);
|
|
3055
3065
|
if (n === s) return s;
|
|
3056
3066
|
if (t === "ref")
|
|
3057
3067
|
a || n(e);
|
|
@@ -3062,29 +3072,29 @@ function es(e, t, n, s, r, a, i) {
|
|
|
3062
3072
|
const h = t.slice(10);
|
|
3063
3073
|
s && e.removeEventListener(h, s, !0), n && e.addEventListener(h, n, !0);
|
|
3064
3074
|
} else if (t.slice(0, 2) === "on") {
|
|
3065
|
-
const h = t.slice(2).toLowerCase(), g =
|
|
3075
|
+
const h = t.slice(2).toLowerCase(), g = Qo.has(h);
|
|
3066
3076
|
if (!g && s) {
|
|
3067
3077
|
const A = Array.isArray(s) ? s[0] : s;
|
|
3068
3078
|
e.removeEventListener(h, A);
|
|
3069
3079
|
}
|
|
3070
|
-
(g || n) && (
|
|
3080
|
+
(g || n) && (Zo(e, h, n, g), g && Wo([h]));
|
|
3071
3081
|
} else if (t.slice(0, 5) === "attr:")
|
|
3072
3082
|
En(e, t.slice(5), n);
|
|
3073
3083
|
else if (t.slice(0, 5) === "bool:")
|
|
3074
|
-
|
|
3075
|
-
else if ((
|
|
3076
|
-
if (
|
|
3084
|
+
Jo(e, t.slice(5), n);
|
|
3085
|
+
else if ((d = t.slice(0, 5) === "prop:") || (u = qo.has(t)) || !r && ((f = Ho(t, e.tagName)) || (l = Fo.has(t))) || (o = e.nodeName.includes("-") || "is" in i)) {
|
|
3086
|
+
if (d)
|
|
3077
3087
|
t = t.slice(5), l = !0;
|
|
3078
3088
|
else if (Ue(e)) return n;
|
|
3079
|
-
t === "class" || t === "className" ?
|
|
3089
|
+
t === "class" || t === "className" ? Xo(e, n) : o && !l && !u ? e[il(t)] = n : e[f || t] = n;
|
|
3080
3090
|
} else {
|
|
3081
|
-
const h = r && t.indexOf(":") > -1 &&
|
|
3082
|
-
h ?
|
|
3091
|
+
const h = r && t.indexOf(":") > -1 && jo[t.split(":")[0]];
|
|
3092
|
+
h ? Yo(e, h, t, n) : En(e, Ko[t] || t, n);
|
|
3083
3093
|
}
|
|
3084
3094
|
return n;
|
|
3085
3095
|
}
|
|
3086
3096
|
function Js(e) {
|
|
3087
|
-
if (
|
|
3097
|
+
if (_.registry && _.events && _.events.find(([l, u]) => u === e))
|
|
3088
3098
|
return;
|
|
3089
3099
|
let t = e.target;
|
|
3090
3100
|
const n = `$$${e.type}`, s = e.target, r = e.currentTarget, a = (l) => Object.defineProperty(e, "target", {
|
|
@@ -3093,8 +3103,8 @@ function Js(e) {
|
|
|
3093
3103
|
}), i = () => {
|
|
3094
3104
|
const l = t[n];
|
|
3095
3105
|
if (l && !t.disabled) {
|
|
3096
|
-
const
|
|
3097
|
-
if (
|
|
3106
|
+
const u = t[`${n}Data`];
|
|
3107
|
+
if (u !== void 0 ? l.call(t, u, e) : l.call(t, e), e.cancelBubble) return;
|
|
3098
3108
|
}
|
|
3099
3109
|
return t.host && typeof t.host != "string" && !t.host._$host && t.contains(e.target) && a(t.host), !0;
|
|
3100
3110
|
}, o = () => {
|
|
@@ -3105,10 +3115,10 @@ function Js(e) {
|
|
|
3105
3115
|
get() {
|
|
3106
3116
|
return t || document;
|
|
3107
3117
|
}
|
|
3108
|
-
}),
|
|
3118
|
+
}), _.registry && !_.done && (_.done = _$HY.done = !0), e.composedPath) {
|
|
3109
3119
|
const l = e.composedPath();
|
|
3110
3120
|
a(l[0]);
|
|
3111
|
-
for (let
|
|
3121
|
+
for (let u = 0; u < l.length - 2 && (t = l[u], !!i()); u++) {
|
|
3112
3122
|
if (t._$host) {
|
|
3113
3123
|
t = t._$host, o();
|
|
3114
3124
|
break;
|
|
@@ -3119,14 +3129,14 @@ function Js(e) {
|
|
|
3119
3129
|
} else o();
|
|
3120
3130
|
a(s);
|
|
3121
3131
|
}
|
|
3122
|
-
function
|
|
3132
|
+
function ut(e, t, n, s, r) {
|
|
3123
3133
|
const a = Ue(e);
|
|
3124
3134
|
if (a) {
|
|
3125
3135
|
!n && (n = [...e.childNodes]);
|
|
3126
3136
|
let l = [];
|
|
3127
|
-
for (let
|
|
3128
|
-
const
|
|
3129
|
-
|
|
3137
|
+
for (let u = 0; u < n.length; u++) {
|
|
3138
|
+
const f = n[u];
|
|
3139
|
+
f.nodeType === 8 && f.data.slice(0, 2) === "!$" ? f.remove() : l.push(f);
|
|
3130
3140
|
}
|
|
3131
3141
|
n = l;
|
|
3132
3142
|
}
|
|
@@ -3138,41 +3148,41 @@ function dt(e, t, n, s, r) {
|
|
|
3138
3148
|
return n;
|
|
3139
3149
|
if (o) {
|
|
3140
3150
|
let l = n[0];
|
|
3141
|
-
l && l.nodeType === 3 ? l.data !== t && (l.data = t) : l = document.createTextNode(t), n =
|
|
3151
|
+
l && l.nodeType === 3 ? l.data !== t && (l.data = t) : l = document.createTextNode(t), n = Me(e, n, s, l);
|
|
3142
3152
|
} else
|
|
3143
3153
|
n !== "" && typeof n == "string" ? n = e.firstChild.data = t : n = e.textContent = t;
|
|
3144
3154
|
} else if (t == null || i === "boolean") {
|
|
3145
3155
|
if (a) return n;
|
|
3146
|
-
n =
|
|
3156
|
+
n = Me(e, n, s);
|
|
3147
3157
|
} else {
|
|
3148
3158
|
if (i === "function")
|
|
3149
3159
|
return De(() => {
|
|
3150
3160
|
let l = t();
|
|
3151
3161
|
for (; typeof l == "function"; ) l = l();
|
|
3152
|
-
n =
|
|
3162
|
+
n = ut(e, l, n, s);
|
|
3153
3163
|
}), () => n;
|
|
3154
3164
|
if (Array.isArray(t)) {
|
|
3155
|
-
const l = [],
|
|
3165
|
+
const l = [], u = n && Array.isArray(n);
|
|
3156
3166
|
if (yn(l, t, n, r))
|
|
3157
|
-
return De(() => n =
|
|
3167
|
+
return De(() => n = ut(e, l, n, s, !0)), () => n;
|
|
3158
3168
|
if (a) {
|
|
3159
3169
|
if (!l.length) return n;
|
|
3160
3170
|
if (s === void 0) return n = [...e.childNodes];
|
|
3161
|
-
let
|
|
3162
|
-
if (
|
|
3163
|
-
const
|
|
3164
|
-
for (; (
|
|
3165
|
-
return n =
|
|
3171
|
+
let f = l[0];
|
|
3172
|
+
if (f.parentNode !== e) return n;
|
|
3173
|
+
const d = [f];
|
|
3174
|
+
for (; (f = f.nextSibling) !== s; ) d.push(f);
|
|
3175
|
+
return n = d;
|
|
3166
3176
|
}
|
|
3167
3177
|
if (l.length === 0) {
|
|
3168
|
-
if (n =
|
|
3169
|
-
} else
|
|
3178
|
+
if (n = Me(e, n, s), o) return n;
|
|
3179
|
+
} else u ? n.length === 0 ? ts(e, l, s) : zo(e, n, l) : (n && Me(e), ts(e, l));
|
|
3170
3180
|
n = l;
|
|
3171
3181
|
} else if (t.nodeType) {
|
|
3172
3182
|
if (a && t.parentNode) return n = o ? [t] : t;
|
|
3173
3183
|
if (Array.isArray(n)) {
|
|
3174
|
-
if (o) return n =
|
|
3175
|
-
|
|
3184
|
+
if (o) return n = Me(e, n, s, t);
|
|
3185
|
+
Me(e, n, null, t);
|
|
3176
3186
|
} else n == null || n === "" || !e.firstChild ? e.appendChild(t) : e.replaceChild(t, e.firstChild);
|
|
3177
3187
|
n = t;
|
|
3178
3188
|
}
|
|
@@ -3182,20 +3192,20 @@ function dt(e, t, n, s, r) {
|
|
|
3182
3192
|
function yn(e, t, n, s) {
|
|
3183
3193
|
let r = !1;
|
|
3184
3194
|
for (let a = 0, i = t.length; a < i; a++) {
|
|
3185
|
-
let o = t[a], l = n && n[e.length],
|
|
3186
|
-
if (!(o == null || o === !0 || o === !1)) if ((
|
|
3195
|
+
let o = t[a], l = n && n[e.length], u;
|
|
3196
|
+
if (!(o == null || o === !0 || o === !1)) if ((u = typeof o) == "object" && o.nodeType)
|
|
3187
3197
|
e.push(o);
|
|
3188
3198
|
else if (Array.isArray(o))
|
|
3189
3199
|
r = yn(e, o, l) || r;
|
|
3190
|
-
else if (
|
|
3200
|
+
else if (u === "function")
|
|
3191
3201
|
if (s) {
|
|
3192
3202
|
for (; typeof o == "function"; ) o = o();
|
|
3193
3203
|
r = yn(e, Array.isArray(o) ? o : [o], Array.isArray(l) ? l : [l]) || r;
|
|
3194
3204
|
} else
|
|
3195
3205
|
e.push(o), r = !0;
|
|
3196
3206
|
else {
|
|
3197
|
-
const
|
|
3198
|
-
l && l.nodeType === 3 && l.data ===
|
|
3207
|
+
const f = String(o);
|
|
3208
|
+
l && l.nodeType === 3 && l.data === f ? e.push(l) : e.push(document.createTextNode(f));
|
|
3199
3209
|
}
|
|
3200
3210
|
}
|
|
3201
3211
|
return r;
|
|
@@ -3203,7 +3213,7 @@ function yn(e, t, n, s) {
|
|
|
3203
3213
|
function ts(e, t, n = null) {
|
|
3204
3214
|
for (let s = 0, r = t.length; s < r; s++) e.insertBefore(t[s], n);
|
|
3205
3215
|
}
|
|
3206
|
-
function
|
|
3216
|
+
function Me(e, t, n, s) {
|
|
3207
3217
|
if (n === void 0) return e.textContent = "";
|
|
3208
3218
|
const r = s || document.createTextNode("");
|
|
3209
3219
|
if (t.length) {
|
|
@@ -3218,26 +3228,26 @@ function Be(e, t, n, s) {
|
|
|
3218
3228
|
} else e.insertBefore(r, n);
|
|
3219
3229
|
return [r];
|
|
3220
3230
|
}
|
|
3221
|
-
function
|
|
3222
|
-
return
|
|
3231
|
+
function ol() {
|
|
3232
|
+
return _.getNextContextId();
|
|
3223
3233
|
}
|
|
3224
|
-
var
|
|
3234
|
+
var ll = "http://www.w3.org/2000/svg";
|
|
3225
3235
|
function Xs(e, t = !1) {
|
|
3226
|
-
return t ? document.createElementNS(
|
|
3236
|
+
return t ? document.createElementNS(ll, e) : document.createElement(e);
|
|
3227
3237
|
}
|
|
3228
|
-
function
|
|
3238
|
+
function au(e) {
|
|
3229
3239
|
const {
|
|
3230
3240
|
useShadow: t
|
|
3231
3241
|
} = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = Xn();
|
|
3232
|
-
let a, i = !!
|
|
3242
|
+
let a, i = !!_.context;
|
|
3233
3243
|
return Ms(() => {
|
|
3234
3244
|
i && (Xn().user = i = !1), a || (a = Fs(r, () => J(() => e.children)));
|
|
3235
3245
|
const o = s();
|
|
3236
3246
|
if (o instanceof HTMLHeadElement) {
|
|
3237
|
-
const [l,
|
|
3238
|
-
Oe((
|
|
3247
|
+
const [l, u] = F(!1), f = () => u(!0);
|
|
3248
|
+
Oe((d) => pn(o, () => l() ? d() : a(), null)), lt(f);
|
|
3239
3249
|
} else {
|
|
3240
|
-
const l = Xs(e.isSVG ? "g" : "div", e.isSVG),
|
|
3250
|
+
const l = Xs(e.isSVG ? "g" : "div", e.isSVG), u = t && l.attachShadow ? l.attachShadow({
|
|
3241
3251
|
mode: "open"
|
|
3242
3252
|
}) : l;
|
|
3243
3253
|
Object.defineProperty(l, "_$host", {
|
|
@@ -3245,13 +3255,13 @@ function su(e) {
|
|
|
3245
3255
|
return n.parentNode;
|
|
3246
3256
|
},
|
|
3247
3257
|
configurable: !0
|
|
3248
|
-
}), pn(
|
|
3258
|
+
}), pn(u, a), o.appendChild(l), e.ref && e.ref(l), lt(() => o.removeChild(l));
|
|
3249
3259
|
}
|
|
3250
3260
|
}, void 0, {
|
|
3251
3261
|
render: !i
|
|
3252
3262
|
}), n;
|
|
3253
3263
|
}
|
|
3254
|
-
function
|
|
3264
|
+
function cl(e, t) {
|
|
3255
3265
|
const n = J(e);
|
|
3256
3266
|
return J(() => {
|
|
3257
3267
|
const s = n();
|
|
@@ -3259,16 +3269,16 @@ function ol(e, t) {
|
|
|
3259
3269
|
case "function":
|
|
3260
3270
|
return Z(() => s(t));
|
|
3261
3271
|
case "string":
|
|
3262
|
-
const r =
|
|
3263
|
-
return
|
|
3272
|
+
const r = $o.has(s), a = _.context ? al() : Xs(s, r);
|
|
3273
|
+
return nl(a, t, r), a;
|
|
3264
3274
|
}
|
|
3265
3275
|
});
|
|
3266
3276
|
}
|
|
3267
|
-
function
|
|
3268
|
-
const [, t] =
|
|
3269
|
-
return
|
|
3277
|
+
function iu(e) {
|
|
3278
|
+
const [, t] = Uo(e, ["component"]);
|
|
3279
|
+
return cl(() => e.component, t);
|
|
3270
3280
|
}
|
|
3271
|
-
var
|
|
3281
|
+
var ul = class {
|
|
3272
3282
|
constructor() {
|
|
3273
3283
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
3274
3284
|
}
|
|
@@ -3286,7 +3296,7 @@ var ll = class {
|
|
|
3286
3296
|
}
|
|
3287
3297
|
}, Zs = class {
|
|
3288
3298
|
constructor(e) {
|
|
3289
|
-
this.generateIdentifier = e, this.kv = new
|
|
3299
|
+
this.generateIdentifier = e, this.kv = new ul();
|
|
3290
3300
|
}
|
|
3291
3301
|
register(e, t) {
|
|
3292
3302
|
this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
|
|
@@ -3300,7 +3310,7 @@ var ll = class {
|
|
|
3300
3310
|
getValue(e) {
|
|
3301
3311
|
return this.kv.getByKey(e);
|
|
3302
3312
|
}
|
|
3303
|
-
},
|
|
3313
|
+
}, dl = class extends Zs {
|
|
3304
3314
|
constructor() {
|
|
3305
3315
|
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
3306
3316
|
}
|
|
@@ -3311,7 +3321,7 @@ var ll = class {
|
|
|
3311
3321
|
return this.classToAllowedProps.get(e);
|
|
3312
3322
|
}
|
|
3313
3323
|
};
|
|
3314
|
-
function
|
|
3324
|
+
function fl(e) {
|
|
3315
3325
|
if ("values" in Object)
|
|
3316
3326
|
return Object.values(e);
|
|
3317
3327
|
const t = [];
|
|
@@ -3319,8 +3329,8 @@ function ul(e) {
|
|
|
3319
3329
|
e.hasOwnProperty(n) && t.push(e[n]);
|
|
3320
3330
|
return t;
|
|
3321
3331
|
}
|
|
3322
|
-
function
|
|
3323
|
-
const n =
|
|
3332
|
+
function hl(e, t) {
|
|
3333
|
+
const n = fl(e);
|
|
3324
3334
|
if ("find" in n)
|
|
3325
3335
|
return n.find(t);
|
|
3326
3336
|
const s = n;
|
|
@@ -3330,10 +3340,10 @@ function dl(e, t) {
|
|
|
3330
3340
|
return a;
|
|
3331
3341
|
}
|
|
3332
3342
|
}
|
|
3333
|
-
function
|
|
3343
|
+
function nt(e, t) {
|
|
3334
3344
|
Object.entries(e).forEach(([n, s]) => t(s, n));
|
|
3335
3345
|
}
|
|
3336
|
-
function
|
|
3346
|
+
function Rt(e, t) {
|
|
3337
3347
|
return e.indexOf(t) !== -1;
|
|
3338
3348
|
}
|
|
3339
3349
|
function ns(e, t) {
|
|
@@ -3343,7 +3353,7 @@ function ns(e, t) {
|
|
|
3343
3353
|
return s;
|
|
3344
3354
|
}
|
|
3345
3355
|
}
|
|
3346
|
-
var
|
|
3356
|
+
var gl = class {
|
|
3347
3357
|
constructor() {
|
|
3348
3358
|
this.transfomers = {};
|
|
3349
3359
|
}
|
|
@@ -3351,12 +3361,12 @@ var fl = class {
|
|
|
3351
3361
|
this.transfomers[e.name] = e;
|
|
3352
3362
|
}
|
|
3353
3363
|
findApplicable(e) {
|
|
3354
|
-
return
|
|
3364
|
+
return hl(this.transfomers, (t) => t.isApplicable(e));
|
|
3355
3365
|
}
|
|
3356
3366
|
findByName(e) {
|
|
3357
3367
|
return this.transfomers[e];
|
|
3358
3368
|
}
|
|
3359
|
-
},
|
|
3369
|
+
}, ml = (e) => Object.prototype.toString.call(e).slice(8, -1), er = (e) => typeof e > "u", El = (e) => e === null, dt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, An = (e) => dt(e) && Object.keys(e).length === 0, ve = (e) => Array.isArray(e), pl = (e) => typeof e == "string", yl = (e) => typeof e == "number" && !isNaN(e), Al = (e) => typeof e == "boolean", Tl = (e) => e instanceof RegExp, ft = (e) => e instanceof Map, ht = (e) => e instanceof Set, tr = (e) => ml(e) === "Symbol", Sl = (e) => e instanceof Date && !isNaN(e.valueOf()), _l = (e) => e instanceof Error, ss = (e) => typeof e == "number" && isNaN(e), Pl = (e) => Al(e) || El(e) || er(e) || yl(e) || pl(e) || tr(e), vl = (e) => typeof e == "bigint", wl = (e) => e === 1 / 0 || e === -1 / 0, bl = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Il = (e) => e instanceof URL, nr = (e) => e.replace(/\./g, "\\."), un = (e) => e.map(String).map(nr).join("."), ot = (e) => {
|
|
3360
3370
|
const t = [];
|
|
3361
3371
|
let n = "";
|
|
3362
3372
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -3385,9 +3395,9 @@ function fe(e, t, n, s) {
|
|
|
3385
3395
|
var sr = [
|
|
3386
3396
|
fe(er, "undefined", () => null, () => {
|
|
3387
3397
|
}),
|
|
3388
|
-
fe(
|
|
3389
|
-
fe(
|
|
3390
|
-
fe(
|
|
3398
|
+
fe(vl, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
3399
|
+
fe(Sl, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
3400
|
+
fe(_l, "Error", (e, t) => {
|
|
3391
3401
|
const n = {
|
|
3392
3402
|
name: e.name,
|
|
3393
3403
|
message: e.message
|
|
@@ -3401,22 +3411,22 @@ var sr = [
|
|
|
3401
3411
|
n[s] = e[s];
|
|
3402
3412
|
}), n;
|
|
3403
3413
|
}),
|
|
3404
|
-
fe(
|
|
3414
|
+
fe(Tl, "regexp", (e) => "" + e, (e) => {
|
|
3405
3415
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
3406
3416
|
return new RegExp(t, n);
|
|
3407
3417
|
}),
|
|
3408
3418
|
fe(
|
|
3409
|
-
|
|
3419
|
+
ht,
|
|
3410
3420
|
"set",
|
|
3411
3421
|
// (sets only exist in es6+)
|
|
3412
3422
|
// eslint-disable-next-line es5/no-es6-methods
|
|
3413
3423
|
(e) => [...e.values()],
|
|
3414
3424
|
(e) => new Set(e)
|
|
3415
3425
|
),
|
|
3416
|
-
fe(
|
|
3417
|
-
fe((e) => ss(e) ||
|
|
3426
|
+
fe(ft, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
3427
|
+
fe((e) => ss(e) || wl(e), "number", (e) => ss(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
3418
3428
|
fe((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
3419
|
-
fe(
|
|
3429
|
+
fe(Il, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
3420
3430
|
];
|
|
3421
3431
|
function Zt(e, t, n, s) {
|
|
3422
3432
|
return {
|
|
@@ -3431,7 +3441,7 @@ var rr = Zt((e, t) => tr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
3431
3441
|
if (!s)
|
|
3432
3442
|
throw new Error("Trying to deserialize unknown symbol");
|
|
3433
3443
|
return s;
|
|
3434
|
-
}),
|
|
3444
|
+
}), Cl = [
|
|
3435
3445
|
Int8Array,
|
|
3436
3446
|
Uint8Array,
|
|
3437
3447
|
Int16Array,
|
|
@@ -3441,8 +3451,8 @@ var rr = Zt((e, t) => tr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
3441
3451
|
Float32Array,
|
|
3442
3452
|
Float64Array,
|
|
3443
3453
|
Uint8ClampedArray
|
|
3444
|
-
].reduce((e, t) => (e[t.name] = t, e), {}), ar = Zt(
|
|
3445
|
-
const n =
|
|
3454
|
+
].reduce((e, t) => (e[t.name] = t, e), {}), ar = Zt(bl, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
3455
|
+
const n = Cl[t[1]];
|
|
3446
3456
|
if (!n)
|
|
3447
3457
|
throw new Error("Trying to deserialize unknown typed array");
|
|
3448
3458
|
return new n(e);
|
|
@@ -3468,8 +3478,8 @@ var or = Zt(ir, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
3468
3478
|
if (!s)
|
|
3469
3479
|
throw new Error("Trying to deserialize unknown custom value");
|
|
3470
3480
|
return s.deserialize(e);
|
|
3471
|
-
}),
|
|
3472
|
-
const n = ns(
|
|
3481
|
+
}), Nl = [or, rr, lr, ar], rs = (e, t) => {
|
|
3482
|
+
const n = ns(Nl, (r) => r.isApplicable(e, t));
|
|
3473
3483
|
if (n)
|
|
3474
3484
|
return {
|
|
3475
3485
|
value: n.transform(e, t),
|
|
@@ -3485,8 +3495,8 @@ var or = Zt(ir, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
3485
3495
|
sr.forEach((e) => {
|
|
3486
3496
|
cr[e.annotation] = e;
|
|
3487
3497
|
});
|
|
3488
|
-
var
|
|
3489
|
-
if (
|
|
3498
|
+
var Ll = (e, t, n) => {
|
|
3499
|
+
if (ve(t))
|
|
3490
3500
|
switch (t[0]) {
|
|
3491
3501
|
case "symbol":
|
|
3492
3502
|
return rr.untransform(e, t, n);
|
|
@@ -3505,7 +3515,7 @@ var Cl = (e, t, n) => {
|
|
|
3505
3515
|
throw new Error("Unknown transformation: " + t);
|
|
3506
3516
|
return s.untransform(e, n);
|
|
3507
3517
|
}
|
|
3508
|
-
},
|
|
3518
|
+
}, Fe = (e, t) => {
|
|
3509
3519
|
if (t > e.size)
|
|
3510
3520
|
throw new Error("index out of bounds");
|
|
3511
3521
|
const n = e.keys();
|
|
@@ -3514,21 +3524,21 @@ var Cl = (e, t, n) => {
|
|
|
3514
3524
|
return n.next().value;
|
|
3515
3525
|
};
|
|
3516
3526
|
function ur(e) {
|
|
3517
|
-
if (
|
|
3527
|
+
if (Rt(e, "__proto__"))
|
|
3518
3528
|
throw new Error("__proto__ is not allowed as a property");
|
|
3519
|
-
if (
|
|
3529
|
+
if (Rt(e, "prototype"))
|
|
3520
3530
|
throw new Error("prototype is not allowed as a property");
|
|
3521
|
-
if (
|
|
3531
|
+
if (Rt(e, "constructor"))
|
|
3522
3532
|
throw new Error("constructor is not allowed as a property");
|
|
3523
3533
|
}
|
|
3524
|
-
var
|
|
3534
|
+
var kl = (e, t) => {
|
|
3525
3535
|
ur(t);
|
|
3526
3536
|
for (let n = 0; n < t.length; n++) {
|
|
3527
3537
|
const s = t[n];
|
|
3528
|
-
if (
|
|
3529
|
-
e =
|
|
3530
|
-
else if (
|
|
3531
|
-
const r = +s, a = +t[++n] == 0 ? "key" : "value", i =
|
|
3538
|
+
if (ht(e))
|
|
3539
|
+
e = Fe(e, +s);
|
|
3540
|
+
else if (ft(e)) {
|
|
3541
|
+
const r = +s, a = +t[++n] == 0 ? "key" : "value", i = Fe(e, r);
|
|
3532
3542
|
switch (a) {
|
|
3533
3543
|
case "key":
|
|
3534
3544
|
e = i;
|
|
@@ -3547,35 +3557,35 @@ var Nl = (e, t) => {
|
|
|
3547
3557
|
let s = e;
|
|
3548
3558
|
for (let a = 0; a < t.length - 1; a++) {
|
|
3549
3559
|
const i = t[a];
|
|
3550
|
-
if (
|
|
3560
|
+
if (ve(s)) {
|
|
3551
3561
|
const o = +i;
|
|
3552
3562
|
s = s[o];
|
|
3553
|
-
} else if (
|
|
3563
|
+
} else if (dt(s))
|
|
3554
3564
|
s = s[i];
|
|
3555
|
-
else if (
|
|
3565
|
+
else if (ht(s)) {
|
|
3556
3566
|
const o = +i;
|
|
3557
|
-
s =
|
|
3558
|
-
} else if (
|
|
3567
|
+
s = Fe(s, o);
|
|
3568
|
+
} else if (ft(s)) {
|
|
3559
3569
|
if (a === t.length - 2)
|
|
3560
3570
|
break;
|
|
3561
|
-
const l = +i,
|
|
3562
|
-
switch (
|
|
3571
|
+
const l = +i, u = +t[++a] == 0 ? "key" : "value", f = Fe(s, l);
|
|
3572
|
+
switch (u) {
|
|
3563
3573
|
case "key":
|
|
3564
|
-
s =
|
|
3574
|
+
s = f;
|
|
3565
3575
|
break;
|
|
3566
3576
|
case "value":
|
|
3567
|
-
s = s.get(
|
|
3577
|
+
s = s.get(f);
|
|
3568
3578
|
break;
|
|
3569
3579
|
}
|
|
3570
3580
|
}
|
|
3571
3581
|
}
|
|
3572
3582
|
const r = t[t.length - 1];
|
|
3573
|
-
if (
|
|
3574
|
-
const a =
|
|
3583
|
+
if (ve(s) ? s[+r] = n(s[+r]) : dt(s) && (s[r] = n(s[r])), ht(s)) {
|
|
3584
|
+
const a = Fe(s, +r), i = n(a);
|
|
3575
3585
|
a !== i && (s.delete(a), s.add(i));
|
|
3576
3586
|
}
|
|
3577
|
-
if (
|
|
3578
|
-
const a = +t[t.length - 2], i =
|
|
3587
|
+
if (ft(s)) {
|
|
3588
|
+
const a = +t[t.length - 2], i = Fe(s, a);
|
|
3579
3589
|
switch (+r == 0 ? "key" : "value") {
|
|
3580
3590
|
case "key": {
|
|
3581
3591
|
const l = n(i);
|
|
@@ -3593,42 +3603,42 @@ var Nl = (e, t) => {
|
|
|
3593
3603
|
function Sn(e, t, n = []) {
|
|
3594
3604
|
if (!e)
|
|
3595
3605
|
return;
|
|
3596
|
-
if (!
|
|
3597
|
-
|
|
3606
|
+
if (!ve(e)) {
|
|
3607
|
+
nt(e, (a, i) => Sn(a, t, [...n, ...ot(i)]));
|
|
3598
3608
|
return;
|
|
3599
3609
|
}
|
|
3600
3610
|
const [s, r] = e;
|
|
3601
|
-
r &&
|
|
3602
|
-
Sn(a, t, [...n, ...
|
|
3611
|
+
r && nt(r, (a, i) => {
|
|
3612
|
+
Sn(a, t, [...n, ...ot(i)]);
|
|
3603
3613
|
}), t(s, n);
|
|
3604
3614
|
}
|
|
3605
|
-
function
|
|
3615
|
+
function Ol(e, t, n) {
|
|
3606
3616
|
return Sn(t, (s, r) => {
|
|
3607
|
-
e = Tn(e, r, (a) =>
|
|
3617
|
+
e = Tn(e, r, (a) => Ll(a, s, n));
|
|
3608
3618
|
}), e;
|
|
3609
3619
|
}
|
|
3610
|
-
function
|
|
3620
|
+
function Dl(e, t) {
|
|
3611
3621
|
function n(s, r) {
|
|
3612
|
-
const a =
|
|
3613
|
-
s.map(
|
|
3622
|
+
const a = kl(e, ot(r));
|
|
3623
|
+
s.map(ot).forEach((i) => {
|
|
3614
3624
|
e = Tn(e, i, () => a);
|
|
3615
3625
|
});
|
|
3616
3626
|
}
|
|
3617
|
-
if (
|
|
3627
|
+
if (ve(t)) {
|
|
3618
3628
|
const [s, r] = t;
|
|
3619
3629
|
s.forEach((a) => {
|
|
3620
|
-
e = Tn(e,
|
|
3621
|
-
}), r &&
|
|
3630
|
+
e = Tn(e, ot(a), () => e);
|
|
3631
|
+
}), r && nt(r, n);
|
|
3622
3632
|
} else
|
|
3623
|
-
|
|
3633
|
+
nt(t, n);
|
|
3624
3634
|
return e;
|
|
3625
3635
|
}
|
|
3626
|
-
var
|
|
3627
|
-
function
|
|
3636
|
+
var Gl = (e, t) => dt(e) || ve(e) || ft(e) || ht(e) || ir(e, t);
|
|
3637
|
+
function xl(e, t, n) {
|
|
3628
3638
|
const s = n.get(e);
|
|
3629
3639
|
s ? s.push(t) : n.set(e, [t]);
|
|
3630
3640
|
}
|
|
3631
|
-
function
|
|
3641
|
+
function Rl(e, t) {
|
|
3632
3642
|
const n = {};
|
|
3633
3643
|
let s;
|
|
3634
3644
|
return e.forEach((r) => {
|
|
@@ -3640,16 +3650,16 @@ function Gl(e, t) {
|
|
|
3640
3650
|
}), s ? An(n) ? [s] : [s, n] : An(n) ? void 0 : n;
|
|
3641
3651
|
}
|
|
3642
3652
|
var dr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
3643
|
-
const o =
|
|
3653
|
+
const o = Pl(e);
|
|
3644
3654
|
if (!o) {
|
|
3645
|
-
|
|
3655
|
+
xl(e, r, t);
|
|
3646
3656
|
const g = i.get(e);
|
|
3647
3657
|
if (g)
|
|
3648
3658
|
return s ? {
|
|
3649
3659
|
transformedValue: null
|
|
3650
3660
|
} : g;
|
|
3651
3661
|
}
|
|
3652
|
-
if (!
|
|
3662
|
+
if (!Gl(e, n)) {
|
|
3653
3663
|
const g = rs(e, n), A = g ? {
|
|
3654
3664
|
transformedValue: g.value,
|
|
3655
3665
|
annotations: [g.type]
|
|
@@ -3658,25 +3668,25 @@ var dr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3658
3668
|
};
|
|
3659
3669
|
return o || i.set(e, A), A;
|
|
3660
3670
|
}
|
|
3661
|
-
if (
|
|
3671
|
+
if (Rt(a, e))
|
|
3662
3672
|
return {
|
|
3663
3673
|
transformedValue: null
|
|
3664
3674
|
};
|
|
3665
|
-
const l = rs(e, n),
|
|
3666
|
-
|
|
3675
|
+
const l = rs(e, n), u = (l == null ? void 0 : l.value) ?? e, f = ve(u) ? [] : {}, d = {};
|
|
3676
|
+
nt(u, (g, A) => {
|
|
3667
3677
|
if (A === "__proto__" || A === "constructor" || A === "prototype")
|
|
3668
3678
|
throw new Error(`Detected property ${A}. This is a prototype pollution risk, please remove it from your object.`);
|
|
3669
3679
|
const T = dr(g, t, n, s, [...r, A], [...a, e], i);
|
|
3670
|
-
|
|
3671
|
-
|
|
3680
|
+
f[A] = T.transformedValue, ve(T.annotations) ? d[A] = T.annotations : dt(T.annotations) && nt(T.annotations, (p, y) => {
|
|
3681
|
+
d[nr(A) + "." + y] = p;
|
|
3672
3682
|
});
|
|
3673
3683
|
});
|
|
3674
|
-
const h = An(
|
|
3675
|
-
transformedValue:
|
|
3684
|
+
const h = An(d) ? {
|
|
3685
|
+
transformedValue: f,
|
|
3676
3686
|
annotations: l ? [l.type] : void 0
|
|
3677
3687
|
} : {
|
|
3678
|
-
transformedValue:
|
|
3679
|
-
annotations: l ? [l.type,
|
|
3688
|
+
transformedValue: f,
|
|
3689
|
+
annotations: l ? [l.type, d] : d
|
|
3680
3690
|
};
|
|
3681
3691
|
return o || i.set(e, h), h;
|
|
3682
3692
|
};
|
|
@@ -3686,13 +3696,13 @@ function fr(e) {
|
|
|
3686
3696
|
function as(e) {
|
|
3687
3697
|
return fr(e) === "Array";
|
|
3688
3698
|
}
|
|
3689
|
-
function
|
|
3699
|
+
function Ul(e) {
|
|
3690
3700
|
if (fr(e) !== "Object")
|
|
3691
3701
|
return !1;
|
|
3692
3702
|
const t = Object.getPrototypeOf(e);
|
|
3693
3703
|
return !!t && t.constructor === Object && t === Object.prototype;
|
|
3694
3704
|
}
|
|
3695
|
-
function
|
|
3705
|
+
function Bl(e, t, n, s, r) {
|
|
3696
3706
|
const a = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
|
|
3697
3707
|
a === "enumerable" && (e[t] = n), r && a === "nonenumerable" && Object.defineProperty(e, t, {
|
|
3698
3708
|
value: n,
|
|
@@ -3704,14 +3714,14 @@ function Rl(e, t, n, s, r) {
|
|
|
3704
3714
|
function _n(e, t = {}) {
|
|
3705
3715
|
if (as(e))
|
|
3706
3716
|
return e.map((r) => _n(r, t));
|
|
3707
|
-
if (!
|
|
3717
|
+
if (!Ul(e))
|
|
3708
3718
|
return e;
|
|
3709
3719
|
const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
|
|
3710
3720
|
return [...n, ...s].reduce((r, a) => {
|
|
3711
3721
|
if (as(t.props) && !t.props.includes(a))
|
|
3712
3722
|
return r;
|
|
3713
3723
|
const i = e[a], o = _n(i, t);
|
|
3714
|
-
return
|
|
3724
|
+
return Bl(r, a, o, e, t.nonenumerable), r;
|
|
3715
3725
|
}, {});
|
|
3716
3726
|
}
|
|
3717
3727
|
var x = class {
|
|
@@ -3719,7 +3729,7 @@ var x = class {
|
|
|
3719
3729
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
3720
3730
|
*/
|
|
3721
3731
|
constructor({ dedupe: e = !1 } = {}) {
|
|
3722
|
-
this.classRegistry = new
|
|
3732
|
+
this.classRegistry = new dl(), this.symbolRegistry = new Zs((t) => t.description ?? ""), this.customTransformerRegistry = new gl(), this.allowedErrorProps = [], this.dedupe = e;
|
|
3723
3733
|
}
|
|
3724
3734
|
serialize(e) {
|
|
3725
3735
|
const t = /* @__PURE__ */ new Map(), n = dr(e, t, this, this.dedupe), s = {
|
|
@@ -3729,7 +3739,7 @@ var x = class {
|
|
|
3729
3739
|
...s.meta,
|
|
3730
3740
|
values: n.annotations
|
|
3731
3741
|
});
|
|
3732
|
-
const r =
|
|
3742
|
+
const r = Rl(t, this.dedupe);
|
|
3733
3743
|
return r && (s.meta = {
|
|
3734
3744
|
...s.meta,
|
|
3735
3745
|
referentialEqualities: r
|
|
@@ -3738,7 +3748,7 @@ var x = class {
|
|
|
3738
3748
|
deserialize(e) {
|
|
3739
3749
|
const { json: t, meta: n } = e;
|
|
3740
3750
|
let s = _n(t);
|
|
3741
|
-
return n != null && n.values && (s =
|
|
3751
|
+
return n != null && n.values && (s = Ol(s, n.values, this)), n != null && n.referentialEqualities && (s = Dl(s, n.referentialEqualities)), s;
|
|
3742
3752
|
}
|
|
3743
3753
|
stringify(e) {
|
|
3744
3754
|
return JSON.stringify(this.serialize(e));
|
|
@@ -3771,52 +3781,52 @@ x.registerClass = x.defaultInstance.registerClass.bind(x.defaultInstance);
|
|
|
3771
3781
|
x.registerSymbol = x.defaultInstance.registerSymbol.bind(x.defaultInstance);
|
|
3772
3782
|
x.registerCustom = x.defaultInstance.registerCustom.bind(x.defaultInstance);
|
|
3773
3783
|
x.allowErrorProps = x.defaultInstance.allowErrorProps.bind(x.defaultInstance);
|
|
3774
|
-
var
|
|
3775
|
-
function
|
|
3784
|
+
var Ml = x.serialize, ou = x.stringify;
|
|
3785
|
+
function lu(e) {
|
|
3776
3786
|
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
3777
3787
|
}
|
|
3778
|
-
function
|
|
3788
|
+
function cu(e, t) {
|
|
3779
3789
|
return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
3780
3790
|
}
|
|
3781
|
-
function
|
|
3791
|
+
function uu({
|
|
3782
3792
|
queryState: e,
|
|
3783
3793
|
observerCount: t,
|
|
3784
3794
|
isStale: n
|
|
3785
3795
|
}) {
|
|
3786
3796
|
return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
|
|
3787
3797
|
}
|
|
3788
|
-
function
|
|
3798
|
+
function du({
|
|
3789
3799
|
status: e,
|
|
3790
3800
|
isPaused: t
|
|
3791
3801
|
}) {
|
|
3792
3802
|
return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
|
|
3793
3803
|
}
|
|
3794
|
-
function
|
|
3804
|
+
function fu(e) {
|
|
3795
3805
|
return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
|
|
3796
3806
|
}
|
|
3797
|
-
var
|
|
3807
|
+
var hu = (e, t = !1) => {
|
|
3798
3808
|
const {
|
|
3799
3809
|
json: n
|
|
3800
|
-
} =
|
|
3810
|
+
} = Ml(e);
|
|
3801
3811
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
3802
|
-
},
|
|
3803
|
-
status:
|
|
3804
|
-
"query hash":
|
|
3812
|
+
}, kt = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, Fl = (e, t) => e.queryHash.localeCompare(t.queryHash), hr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, ql = (e, t) => kt(e) === kt(t) ? hr(e, t) : kt(e) > kt(t) ? 1 : -1, gu = {
|
|
3813
|
+
status: ql,
|
|
3814
|
+
"query hash": Fl,
|
|
3805
3815
|
"last updated": hr
|
|
3806
|
-
},
|
|
3807
|
-
status:
|
|
3816
|
+
}, Ot = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, gr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Kl = (e, t) => Ot(e) === Ot(t) ? gr(e, t) : Ot(e) > Ot(t) ? 1 : -1, mu = {
|
|
3817
|
+
status: Kl,
|
|
3808
3818
|
"last updated": gr
|
|
3809
|
-
},
|
|
3819
|
+
}, Eu = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), pu = () => {
|
|
3810
3820
|
const [e, t] = F("dark");
|
|
3811
|
-
return
|
|
3821
|
+
return bo(() => {
|
|
3812
3822
|
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3813
3823
|
t(n.matches ? "dark" : "light");
|
|
3814
3824
|
const s = (r) => {
|
|
3815
3825
|
t(r.matches ? "dark" : "light");
|
|
3816
3826
|
};
|
|
3817
|
-
n.addEventListener("change", s),
|
|
3827
|
+
n.addEventListener("change", s), lt(() => n.removeEventListener("change", s));
|
|
3818
3828
|
}), e;
|
|
3819
|
-
},
|
|
3829
|
+
}, Dt = (e, t, n) => {
|
|
3820
3830
|
if (t.length === 0)
|
|
3821
3831
|
return n;
|
|
3822
3832
|
if (e instanceof Map) {
|
|
@@ -3824,10 +3834,10 @@ var du = (e, t = !1) => {
|
|
|
3824
3834
|
if (t.length === 1)
|
|
3825
3835
|
return s.set(t[0], n), s;
|
|
3826
3836
|
const [r, ...a] = t;
|
|
3827
|
-
return s.set(r,
|
|
3837
|
+
return s.set(r, Dt(s.get(r), a, n)), s;
|
|
3828
3838
|
}
|
|
3829
3839
|
if (e instanceof Set) {
|
|
3830
|
-
const s =
|
|
3840
|
+
const s = Dt(Array.from(e), t, n);
|
|
3831
3841
|
return new Set(s);
|
|
3832
3842
|
}
|
|
3833
3843
|
if (Array.isArray(e)) {
|
|
@@ -3835,7 +3845,7 @@ var du = (e, t = !1) => {
|
|
|
3835
3845
|
if (t.length === 1)
|
|
3836
3846
|
return s[t[0]] = n, s;
|
|
3837
3847
|
const [r, ...a] = t;
|
|
3838
|
-
return s[r] =
|
|
3848
|
+
return s[r] = Dt(s[r], a, n), s;
|
|
3839
3849
|
}
|
|
3840
3850
|
if (e instanceof Object) {
|
|
3841
3851
|
const s = {
|
|
@@ -3844,19 +3854,19 @@ var du = (e, t = !1) => {
|
|
|
3844
3854
|
if (t.length === 1)
|
|
3845
3855
|
return s[t[0]] = n, s;
|
|
3846
3856
|
const [r, ...a] = t;
|
|
3847
|
-
return s[r] =
|
|
3857
|
+
return s[r] = Dt(s[r], a, n), s;
|
|
3848
3858
|
}
|
|
3849
3859
|
return e;
|
|
3850
|
-
},
|
|
3860
|
+
}, Gt = (e, t) => {
|
|
3851
3861
|
if (e instanceof Map) {
|
|
3852
3862
|
const n = new Map(e);
|
|
3853
3863
|
if (t.length === 1)
|
|
3854
3864
|
return n.delete(t[0]), n;
|
|
3855
3865
|
const [s, ...r] = t;
|
|
3856
|
-
return n.set(s,
|
|
3866
|
+
return n.set(s, Gt(n.get(s), r)), n;
|
|
3857
3867
|
}
|
|
3858
3868
|
if (e instanceof Set) {
|
|
3859
|
-
const n =
|
|
3869
|
+
const n = Gt(Array.from(e), t);
|
|
3860
3870
|
return new Set(n);
|
|
3861
3871
|
}
|
|
3862
3872
|
if (Array.isArray(e)) {
|
|
@@ -3864,7 +3874,7 @@ var du = (e, t = !1) => {
|
|
|
3864
3874
|
if (t.length === 1)
|
|
3865
3875
|
return n.filter((a, i) => i.toString() !== t[0]);
|
|
3866
3876
|
const [s, ...r] = t;
|
|
3867
|
-
return n[s] =
|
|
3877
|
+
return n[s] = Gt(n[s], r), n;
|
|
3868
3878
|
}
|
|
3869
3879
|
if (e instanceof Object) {
|
|
3870
3880
|
const n = {
|
|
@@ -3873,29 +3883,29 @@ var du = (e, t = !1) => {
|
|
|
3873
3883
|
if (t.length === 1)
|
|
3874
3884
|
return delete n[t[0]], n;
|
|
3875
3885
|
const [s, ...r] = t;
|
|
3876
|
-
return n[s] =
|
|
3886
|
+
return n[s] = Gt(n[s], r), n;
|
|
3877
3887
|
}
|
|
3878
3888
|
return e;
|
|
3879
3889
|
}, mr = (e, t) => {
|
|
3880
3890
|
if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
|
|
3881
3891
|
const s = document.createElement("style"), r = document.createTextNode("");
|
|
3882
3892
|
s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
|
|
3883
|
-
},
|
|
3893
|
+
}, qe, gt, mt, Et, Le, pt, Ke, Ve, He, Qe, $e, yt, je, At, cs, Vl = (cs = class {
|
|
3884
3894
|
constructor(e) {
|
|
3885
|
-
D(this,
|
|
3895
|
+
D(this, qe);
|
|
3896
|
+
D(this, gt);
|
|
3886
3897
|
D(this, mt);
|
|
3887
3898
|
D(this, Et);
|
|
3888
|
-
D(this, pt);
|
|
3889
3899
|
D(this, Le, !1);
|
|
3890
|
-
D(this,
|
|
3891
|
-
D(this, qe);
|
|
3900
|
+
D(this, pt);
|
|
3892
3901
|
D(this, Ke);
|
|
3893
3902
|
D(this, Ve);
|
|
3894
3903
|
D(this, He);
|
|
3895
3904
|
D(this, Qe);
|
|
3896
|
-
D(this, At);
|
|
3897
3905
|
D(this, $e);
|
|
3898
|
-
D(this,
|
|
3906
|
+
D(this, yt);
|
|
3907
|
+
D(this, je);
|
|
3908
|
+
D(this, At);
|
|
3899
3909
|
const {
|
|
3900
3910
|
client: t,
|
|
3901
3911
|
queryFlavor: n,
|
|
@@ -3905,45 +3915,45 @@ var du = (e, t = !1) => {
|
|
|
3905
3915
|
position: i,
|
|
3906
3916
|
initialIsOpen: o,
|
|
3907
3917
|
errorTypes: l,
|
|
3908
|
-
styleNonce:
|
|
3909
|
-
shadowDOMTarget:
|
|
3910
|
-
hideDisabledQueries:
|
|
3918
|
+
styleNonce: u,
|
|
3919
|
+
shadowDOMTarget: f,
|
|
3920
|
+
hideDisabledQueries: d
|
|
3911
3921
|
} = e;
|
|
3912
|
-
|
|
3922
|
+
k(this, qe, F(t)), k(this, mt, n), k(this, Et, s), k(this, gt, r), k(this, pt, u), k(this, Ke, f), k(this, Ve, F(a)), k(this, He, F(i)), k(this, Qe, F(o)), k(this, $e, F(l)), k(this, yt, F(d));
|
|
3913
3923
|
}
|
|
3914
3924
|
setButtonPosition(e) {
|
|
3915
|
-
S(this,
|
|
3925
|
+
S(this, Ve)[1](e);
|
|
3916
3926
|
}
|
|
3917
3927
|
setPosition(e) {
|
|
3918
|
-
S(this,
|
|
3928
|
+
S(this, He)[1](e);
|
|
3919
3929
|
}
|
|
3920
3930
|
setInitialIsOpen(e) {
|
|
3921
|
-
S(this,
|
|
3931
|
+
S(this, Qe)[1](e);
|
|
3922
3932
|
}
|
|
3923
3933
|
setErrorTypes(e) {
|
|
3924
|
-
S(this,
|
|
3934
|
+
S(this, $e)[1](e);
|
|
3925
3935
|
}
|
|
3926
3936
|
setClient(e) {
|
|
3927
|
-
S(this,
|
|
3937
|
+
S(this, qe)[1](e);
|
|
3928
3938
|
}
|
|
3929
3939
|
mount(e) {
|
|
3930
3940
|
if (S(this, Le))
|
|
3931
3941
|
throw new Error("Devtools is already mounted");
|
|
3932
3942
|
const t = Ys(() => {
|
|
3933
|
-
const n = this, [s] = S(this,
|
|
3934
|
-
let
|
|
3935
|
-
return S(this,
|
|
3943
|
+
const n = this, [s] = S(this, Ve), [r] = S(this, He), [a] = S(this, Qe), [i] = S(this, $e), [o] = S(this, yt), [l] = S(this, qe);
|
|
3944
|
+
let u;
|
|
3945
|
+
return S(this, je) ? u = S(this, je) : (u = zs(() => import("./NCMVHL6D-CTrkJrNW.js")), k(this, je, u)), mr(S(this, pt), S(this, Ke)), $s(u, js({
|
|
3936
3946
|
get queryFlavor() {
|
|
3937
|
-
return S(n,
|
|
3947
|
+
return S(n, mt);
|
|
3938
3948
|
},
|
|
3939
3949
|
get version() {
|
|
3940
|
-
return S(n,
|
|
3950
|
+
return S(n, Et);
|
|
3941
3951
|
},
|
|
3942
3952
|
get onlineManager() {
|
|
3943
|
-
return S(n,
|
|
3953
|
+
return S(n, gt);
|
|
3944
3954
|
},
|
|
3945
3955
|
get shadowDOMTarget() {
|
|
3946
|
-
return S(n,
|
|
3956
|
+
return S(n, Ke);
|
|
3947
3957
|
}
|
|
3948
3958
|
}, {
|
|
3949
3959
|
get client() {
|
|
@@ -3966,31 +3976,31 @@ var du = (e, t = !1) => {
|
|
|
3966
3976
|
}
|
|
3967
3977
|
}));
|
|
3968
3978
|
}, e);
|
|
3969
|
-
|
|
3979
|
+
k(this, Le, !0), k(this, At, t);
|
|
3970
3980
|
}
|
|
3971
3981
|
unmount() {
|
|
3972
3982
|
var e;
|
|
3973
3983
|
if (!S(this, Le))
|
|
3974
3984
|
throw new Error("Devtools is not mounted");
|
|
3975
|
-
(e = S(this,
|
|
3985
|
+
(e = S(this, At)) == null || e.call(this), k(this, Le, !1);
|
|
3976
3986
|
}
|
|
3977
|
-
},
|
|
3987
|
+
}, 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, Hl = (us = class {
|
|
3978
3988
|
constructor(e) {
|
|
3979
|
-
D(this,
|
|
3989
|
+
D(this, ze);
|
|
3990
|
+
D(this, Tt);
|
|
3980
3991
|
D(this, St);
|
|
3981
3992
|
D(this, _t);
|
|
3982
|
-
D(this, Pt);
|
|
3983
3993
|
D(this, ke, !1);
|
|
3984
|
-
D(this,
|
|
3985
|
-
D(this, ze);
|
|
3994
|
+
D(this, Pt);
|
|
3986
3995
|
D(this, We);
|
|
3987
3996
|
D(this, Ye);
|
|
3988
3997
|
D(this, Je);
|
|
3989
3998
|
D(this, Xe);
|
|
3990
|
-
D(this, vt);
|
|
3991
3999
|
D(this, Ze);
|
|
4000
|
+
D(this, vt);
|
|
3992
4001
|
D(this, et);
|
|
3993
|
-
D(this,
|
|
4002
|
+
D(this, tt);
|
|
4003
|
+
D(this, wt);
|
|
3994
4004
|
const {
|
|
3995
4005
|
client: t,
|
|
3996
4006
|
queryFlavor: n,
|
|
@@ -4000,49 +4010,49 @@ var du = (e, t = !1) => {
|
|
|
4000
4010
|
position: i,
|
|
4001
4011
|
initialIsOpen: o,
|
|
4002
4012
|
errorTypes: l,
|
|
4003
|
-
styleNonce:
|
|
4004
|
-
shadowDOMTarget:
|
|
4005
|
-
onClose:
|
|
4013
|
+
styleNonce: u,
|
|
4014
|
+
shadowDOMTarget: f,
|
|
4015
|
+
onClose: d,
|
|
4006
4016
|
hideDisabledQueries: h
|
|
4007
4017
|
} = e;
|
|
4008
|
-
|
|
4018
|
+
k(this, ze, F(t)), k(this, St, n), k(this, _t, s), k(this, Tt, r), k(this, Pt, u), k(this, We, f), k(this, Ye, F(a)), k(this, Je, F(i)), k(this, Xe, F(o)), k(this, Ze, F(l)), k(this, vt, F(h)), k(this, et, F(d));
|
|
4009
4019
|
}
|
|
4010
4020
|
setButtonPosition(e) {
|
|
4011
|
-
S(this,
|
|
4021
|
+
S(this, Ye)[1](e);
|
|
4012
4022
|
}
|
|
4013
4023
|
setPosition(e) {
|
|
4014
|
-
S(this,
|
|
4024
|
+
S(this, Je)[1](e);
|
|
4015
4025
|
}
|
|
4016
4026
|
setInitialIsOpen(e) {
|
|
4017
|
-
S(this,
|
|
4027
|
+
S(this, Xe)[1](e);
|
|
4018
4028
|
}
|
|
4019
4029
|
setErrorTypes(e) {
|
|
4020
|
-
S(this,
|
|
4030
|
+
S(this, Ze)[1](e);
|
|
4021
4031
|
}
|
|
4022
4032
|
setClient(e) {
|
|
4023
|
-
S(this,
|
|
4033
|
+
S(this, ze)[1](e);
|
|
4024
4034
|
}
|
|
4025
4035
|
setOnClose(e) {
|
|
4026
|
-
S(this,
|
|
4036
|
+
S(this, et)[1](() => e);
|
|
4027
4037
|
}
|
|
4028
4038
|
mount(e) {
|
|
4029
4039
|
if (S(this, ke))
|
|
4030
4040
|
throw new Error("Devtools is already mounted");
|
|
4031
4041
|
const t = Ys(() => {
|
|
4032
|
-
const n = this, [s] = S(this,
|
|
4033
|
-
let
|
|
4034
|
-
return S(this,
|
|
4042
|
+
const n = this, [s] = S(this, Ye), [r] = S(this, Je), [a] = S(this, Xe), [i] = S(this, Ze), [o] = S(this, vt), [l] = S(this, ze), [u] = S(this, et);
|
|
4043
|
+
let f;
|
|
4044
|
+
return S(this, tt) ? f = S(this, tt) : (f = zs(() => import("./2AITGKQY-JdTvsit7.js")), k(this, tt, f)), mr(S(this, Pt), S(this, We)), $s(f, js({
|
|
4035
4045
|
get queryFlavor() {
|
|
4036
|
-
return S(n,
|
|
4046
|
+
return S(n, St);
|
|
4037
4047
|
},
|
|
4038
4048
|
get version() {
|
|
4039
|
-
return S(n,
|
|
4049
|
+
return S(n, _t);
|
|
4040
4050
|
},
|
|
4041
4051
|
get onlineManager() {
|
|
4042
|
-
return S(n,
|
|
4052
|
+
return S(n, Tt);
|
|
4043
4053
|
},
|
|
4044
4054
|
get shadowDOMTarget() {
|
|
4045
|
-
return S(n,
|
|
4055
|
+
return S(n, We);
|
|
4046
4056
|
}
|
|
4047
4057
|
}, {
|
|
4048
4058
|
get client() {
|
|
@@ -4064,20 +4074,20 @@ var du = (e, t = !1) => {
|
|
|
4064
4074
|
return o();
|
|
4065
4075
|
},
|
|
4066
4076
|
get onClose() {
|
|
4067
|
-
return
|
|
4077
|
+
return u();
|
|
4068
4078
|
}
|
|
4069
4079
|
}));
|
|
4070
4080
|
}, e);
|
|
4071
|
-
|
|
4081
|
+
k(this, ke, !0), k(this, wt, t);
|
|
4072
4082
|
}
|
|
4073
4083
|
unmount() {
|
|
4074
4084
|
var e;
|
|
4075
4085
|
if (!S(this, ke))
|
|
4076
4086
|
throw new Error("Devtools is not mounted");
|
|
4077
|
-
(e = S(this,
|
|
4087
|
+
(e = S(this, wt)) == null || e.call(this), k(this, ke, !1);
|
|
4078
4088
|
}
|
|
4079
|
-
},
|
|
4080
|
-
function
|
|
4089
|
+
}, 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);
|
|
4090
|
+
function Ql(e) {
|
|
4081
4091
|
const t = W(e.client), n = z.useRef(null), {
|
|
4082
4092
|
buttonPosition: s,
|
|
4083
4093
|
position: r,
|
|
@@ -4085,9 +4095,9 @@ function Vl(e) {
|
|
|
4085
4095
|
errorTypes: i,
|
|
4086
4096
|
styleNonce: o,
|
|
4087
4097
|
shadowDOMTarget: l,
|
|
4088
|
-
hideDisabledQueries:
|
|
4089
|
-
} = e, [
|
|
4090
|
-
new
|
|
4098
|
+
hideDisabledQueries: u
|
|
4099
|
+
} = e, [f] = z.useState(
|
|
4100
|
+
new Vl({
|
|
4091
4101
|
client: t,
|
|
4092
4102
|
queryFlavor: "React Query",
|
|
4093
4103
|
version: "5",
|
|
@@ -4098,26 +4108,26 @@ function Vl(e) {
|
|
|
4098
4108
|
errorTypes: i,
|
|
4099
4109
|
styleNonce: o,
|
|
4100
4110
|
shadowDOMTarget: l,
|
|
4101
|
-
hideDisabledQueries:
|
|
4111
|
+
hideDisabledQueries: u
|
|
4102
4112
|
})
|
|
4103
4113
|
);
|
|
4104
4114
|
return z.useEffect(() => {
|
|
4105
|
-
|
|
4106
|
-
}, [t,
|
|
4107
|
-
s &&
|
|
4108
|
-
}, [s,
|
|
4109
|
-
r &&
|
|
4110
|
-
}, [r,
|
|
4111
|
-
|
|
4112
|
-
}, [a,
|
|
4113
|
-
|
|
4114
|
-
}, [i,
|
|
4115
|
-
|
|
4116
|
-
}), [
|
|
4115
|
+
f.setClient(t);
|
|
4116
|
+
}, [t, f]), z.useEffect(() => {
|
|
4117
|
+
s && f.setButtonPosition(s);
|
|
4118
|
+
}, [s, f]), z.useEffect(() => {
|
|
4119
|
+
r && f.setPosition(r);
|
|
4120
|
+
}, [r, f]), z.useEffect(() => {
|
|
4121
|
+
f.setInitialIsOpen(a || !1);
|
|
4122
|
+
}, [a, f]), z.useEffect(() => {
|
|
4123
|
+
f.setErrorTypes(i || []);
|
|
4124
|
+
}, [i, f]), z.useEffect(() => (n.current && f.mount(n.current), () => {
|
|
4125
|
+
f.unmount();
|
|
4126
|
+
}), [f]), /* @__PURE__ */ c("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
|
|
4117
4127
|
}
|
|
4118
|
-
function
|
|
4128
|
+
function $l(e) {
|
|
4119
4129
|
const t = W(e.client), n = z.useRef(null), { errorTypes: s, styleNonce: r, shadowDOMTarget: a, hideDisabledQueries: i } = e, [o] = z.useState(
|
|
4120
|
-
new
|
|
4130
|
+
new Hl({
|
|
4121
4131
|
client: t,
|
|
4122
4132
|
queryFlavor: "React Query",
|
|
4123
4133
|
version: "5",
|
|
@@ -4152,23 +4162,23 @@ function Hl(e) {
|
|
|
4152
4162
|
}
|
|
4153
4163
|
var is = process.env.NODE_ENV !== "development" ? function() {
|
|
4154
4164
|
return null;
|
|
4155
|
-
} :
|
|
4165
|
+
} : Ql;
|
|
4156
4166
|
process.env.NODE_ENV;
|
|
4157
|
-
const
|
|
4167
|
+
const jl = Ee(""), zl = () => {
|
|
4158
4168
|
qn("dynamic-page-selector", {
|
|
4159
4169
|
description: "Dynamic page selector"
|
|
4160
4170
|
}), qn("enable-add-page-dropdown", {
|
|
4161
4171
|
description: "Enable add page dropdown"
|
|
4162
4172
|
});
|
|
4163
|
-
},
|
|
4164
|
-
const e =
|
|
4173
|
+
}, Wl = () => {
|
|
4174
|
+
const e = N(), t = I();
|
|
4165
4175
|
return ae({
|
|
4166
4176
|
queryKey: [E.GET_COLLECTIONS],
|
|
4167
4177
|
staleTime: 1 / 0,
|
|
4168
4178
|
queryFn: async () => t(e, { action: E.GET_COLLECTIONS })
|
|
4169
4179
|
});
|
|
4170
|
-
},
|
|
4171
|
-
const { data: e } = ie(), { data: t } = be(), { data: n } = Re(), s =
|
|
4180
|
+
}, Yl = () => {
|
|
4181
|
+
const { data: e } = ie(), { data: t } = be(), { data: n } = Re(), s = N(), r = I(), a = Q(() => (n == null ? void 0 : n.fallbackLang) || "en", [n == null ? void 0 : n.fallbackLang]);
|
|
4172
4182
|
return X({
|
|
4173
4183
|
mutationFn: async ({ block: i }) => r(s, {
|
|
4174
4184
|
action: E.GET_BLOCK_ASYNC_PROPS,
|
|
@@ -4191,102 +4201,104 @@ const Ql = Ee(""), $l = () => {
|
|
|
4191
4201
|
}
|
|
4192
4202
|
})
|
|
4193
4203
|
});
|
|
4194
|
-
},
|
|
4195
|
-
const [, e] =
|
|
4196
|
-
return
|
|
4204
|
+
}, Jl = () => {
|
|
4205
|
+
const [, e] = le();
|
|
4206
|
+
return j(
|
|
4197
4207
|
(t, n) => {
|
|
4198
4208
|
const r = new URLSearchParams(window.location.search).get("lang"), a = new URLSearchParams({ page: t });
|
|
4199
4209
|
r && a.set("lang", r), window.history.pushState({}, "", `?${a.toString()}`), e(a), window.dispatchEvent(new PopStateEvent("popstate")), n == null || n();
|
|
4200
4210
|
},
|
|
4201
4211
|
[e]
|
|
4202
4212
|
);
|
|
4203
|
-
},
|
|
4204
|
-
const e =
|
|
4205
|
-
return
|
|
4213
|
+
}, Xl = () => {
|
|
4214
|
+
const e = Jl();
|
|
4215
|
+
return j(
|
|
4206
4216
|
({ pageId: t }) => {
|
|
4207
4217
|
e(t);
|
|
4208
4218
|
},
|
|
4209
4219
|
[e]
|
|
4210
4220
|
);
|
|
4211
|
-
},
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
const
|
|
4221
|
+
}, Zl = K(() => import("./digital-asset-manager-CWneIIcn.js")), ec = K(() => import("./save-to-lib-CpFEdU_R.js")), tc = K(() => import("./theme-panel-footer-DscF7mar.js")), nc = K(() => import("./web-preview-sSS97N-o.js"));
|
|
4222
|
+
zl();
|
|
4223
|
+
Ja();
|
|
4224
|
+
Yr(eo);
|
|
4225
|
+
To();
|
|
4226
|
+
Jr(Zl);
|
|
4227
|
+
Xr(ec);
|
|
4228
|
+
const sc = {
|
|
4219
4229
|
role: "",
|
|
4220
4230
|
permissions: null
|
|
4221
4231
|
}, os = (e) => {
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4232
|
+
const { data: t } = oo();
|
|
4233
|
+
hi();
|
|
4234
|
+
const n = On(), { data: s = sc, isFetching: r } = lo(), { data: a, isFetching: i } = Ce(), { data: o, isFetching: l } = Wl(), { data: u, isFetching: f } = Re(), d = r || i || l || f, [h] = le(), g = h.get("page"), { data: A } = ie(), { data: T, isFetching: p } = ro(), { blocks: y } = so(T), { lockingStatus: P, pageLock: w } = Ie(), { data: O, isFetching: B } = ao(), L = to(), { onSave: pe } = co(), { mutateAsync: ye } = Yl(), { getPartialBlocks: U, getPartialBlockBlocks: v } = uo(), { mutateAsync: b } = Ni(), { mutateAsync: Y } = io(), $ = Xl(), [de, bt] = q(!1), Ae = at([]), Be = Q(() => V(u, "theme", {}) || {}, [u]), Ne = he(P) && (w == null ? void 0 : w.status) === "editing", Er = (w == null ? void 0 : w.status) === "checking", xn = p || Er || B;
|
|
4235
|
+
Ae.current = y;
|
|
4236
|
+
const [pr] = te(jl);
|
|
4237
|
+
se(() => {
|
|
4238
|
+
const ne = () => {
|
|
4239
|
+
document.hidden ? bt(!0) : bt(!1);
|
|
4229
4240
|
};
|
|
4230
|
-
return window.addEventListener("visibilitychange",
|
|
4241
|
+
return window.addEventListener("visibilitychange", ne), () => window.removeEventListener("visibilitychange", ne);
|
|
4231
4242
|
}, []);
|
|
4232
|
-
const
|
|
4233
|
-
const
|
|
4234
|
-
return
|
|
4235
|
-
}, [
|
|
4236
|
-
async (
|
|
4237
|
-
[
|
|
4243
|
+
const yr = Q(() => {
|
|
4244
|
+
const ne = {};
|
|
4245
|
+
return s && (ne.permissions = V(s, "permissions", null), ne.role = V(s, "role", "user")), ne;
|
|
4246
|
+
}, [s]), Ar = Q(() => t == null ? void 0 : t.some((ne) => ne.isSiteLibrary), [t]), Tr = j(
|
|
4247
|
+
async (ne, It) => await b({ pageType: ne, query: It }),
|
|
4248
|
+
[b]
|
|
4238
4249
|
);
|
|
4239
4250
|
return /* @__PURE__ */ m(ge, { children: [
|
|
4240
|
-
xn && /* @__PURE__ */ c(Ns, { className: d ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ c(
|
|
4241
|
-
|
|
4251
|
+
xn && /* @__PURE__ */ c(Ns, { className: d ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ c(Mt, { className: `animate-spin text-primary ${d ? "h-6 w-6" : "h-5 w-5"}` }) }),
|
|
4252
|
+
pr && /* @__PURE__ */ c(
|
|
4242
4253
|
H,
|
|
4243
4254
|
{
|
|
4244
|
-
fallback: /* @__PURE__ */ c("div", { className: "absolute inset-0 z-[999999] flex min-h-screen w-screen items-center justify-center bg-gray-100", children: /* @__PURE__ */ c(
|
|
4245
|
-
children: /* @__PURE__ */ c(
|
|
4255
|
+
fallback: /* @__PURE__ */ c("div", { className: "absolute inset-0 z-[999999] flex min-h-screen w-screen items-center justify-center bg-gray-100", children: /* @__PURE__ */ c(Mt, { className: "h-6 w-6 animate-spin text-primary" }) }),
|
|
4256
|
+
children: /* @__PURE__ */ c(nc, {})
|
|
4246
4257
|
}
|
|
4247
4258
|
),
|
|
4248
4259
|
/* @__PURE__ */ c(
|
|
4249
|
-
|
|
4260
|
+
Zr,
|
|
4250
4261
|
{
|
|
4251
|
-
|
|
4252
|
-
|
|
4253
|
-
|
|
4254
|
-
|
|
4262
|
+
_tempProps: { librarySite: Ar },
|
|
4263
|
+
gotoPage: $,
|
|
4264
|
+
collections: o ?? [],
|
|
4265
|
+
getBlockAsyncProps: ye,
|
|
4266
|
+
pageExternalData: O,
|
|
4255
4267
|
themePresets: e.themePresets ?? [],
|
|
4256
|
-
pageId:
|
|
4257
|
-
loading:
|
|
4258
|
-
fallbackLang:
|
|
4259
|
-
languages: (
|
|
4260
|
-
brandingOptions: (
|
|
4268
|
+
pageId: A == null ? void 0 : A.id,
|
|
4269
|
+
loading: p,
|
|
4270
|
+
fallbackLang: n,
|
|
4271
|
+
languages: (u == null ? void 0 : u.languages) || [],
|
|
4272
|
+
brandingOptions: (u == null ? void 0 : u.theme) || {},
|
|
4261
4273
|
translations: e.translations || {},
|
|
4262
4274
|
locale: e.locale || "en",
|
|
4263
4275
|
htmlDir: e.htmlDir || "ltr",
|
|
4264
|
-
autoSave:
|
|
4276
|
+
autoSave: !de && Ne && (e.autoSave ?? !0),
|
|
4265
4277
|
autoSaveInterval: e.autoSaveInterval ?? 15,
|
|
4266
4278
|
onError: e.onError || console.error,
|
|
4267
|
-
getPartialBlockBlocks:
|
|
4268
|
-
getPartialBlocks:
|
|
4269
|
-
blocks:
|
|
4270
|
-
theme:
|
|
4271
|
-
pageTypes:
|
|
4272
|
-
searchPageTypeItems:
|
|
4273
|
-
askAiCallBack:
|
|
4274
|
-
onSave: async ({ blocks:
|
|
4275
|
-
if (!
|
|
4276
|
-
|
|
4277
|
-
const Rn = [...
|
|
4278
|
-
return await
|
|
4279
|
+
getPartialBlockBlocks: v,
|
|
4280
|
+
getPartialBlocks: U,
|
|
4281
|
+
blocks: p ? [] : y,
|
|
4282
|
+
theme: Ur(Be),
|
|
4283
|
+
pageTypes: a,
|
|
4284
|
+
searchPageTypeItems: Tr,
|
|
4285
|
+
askAiCallBack: L,
|
|
4286
|
+
onSave: async ({ blocks: ne, theme: It, needTranslations: Sr }) => {
|
|
4287
|
+
if (!g) return !0;
|
|
4288
|
+
Ae.current = ne;
|
|
4289
|
+
const Rn = [...ne];
|
|
4290
|
+
return await pe({ page: g, blocks: Rn, needTranslations: Sr }), Ae.current = Rn, Br(It, Be) || await Y({ settings: { theme: It } }), !0;
|
|
4279
4291
|
},
|
|
4280
|
-
themePanelComponent:
|
|
4281
|
-
...
|
|
4292
|
+
themePanelComponent: tc,
|
|
4293
|
+
...yr
|
|
4282
4294
|
}
|
|
4283
4295
|
),
|
|
4284
4296
|
/* @__PURE__ */ m("div", { children: [
|
|
4285
|
-
/* @__PURE__ */ c(
|
|
4286
|
-
/* @__PURE__ */ c(
|
|
4297
|
+
/* @__PURE__ */ c(pi, { isFetchingPage: xn }),
|
|
4298
|
+
/* @__PURE__ */ c(yi, {})
|
|
4287
4299
|
] })
|
|
4288
4300
|
] });
|
|
4289
|
-
},
|
|
4301
|
+
}, rc = new Kr({
|
|
4290
4302
|
defaultOptions: {
|
|
4291
4303
|
queries: {
|
|
4292
4304
|
refetchOnWindowFocus: !1,
|
|
@@ -4294,9 +4306,9 @@ const tc = {
|
|
|
4294
4306
|
refetchOnMount: !1
|
|
4295
4307
|
}
|
|
4296
4308
|
}
|
|
4297
|
-
}),
|
|
4309
|
+
}), yu = (e) => {
|
|
4298
4310
|
const [, t] = In(), [n, s] = q(!1);
|
|
4299
|
-
return
|
|
4311
|
+
return se(() => (t(
|
|
4300
4312
|
Pn(e, [
|
|
4301
4313
|
"apiUrl",
|
|
4302
4314
|
"usersApiUrl",
|
|
@@ -4318,16 +4330,16 @@ const tc = {
|
|
|
4318
4330
|
}), [e, t]), n ? V(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ m(ge, { children: [
|
|
4319
4331
|
/* @__PURE__ */ c(os, { ...e }),
|
|
4320
4332
|
/* @__PURE__ */ c(is, {})
|
|
4321
|
-
] }) : /* @__PURE__ */ m(
|
|
4333
|
+
] }) : /* @__PURE__ */ m(Vr, { client: rc, children: [
|
|
4322
4334
|
/* @__PURE__ */ c(os, { ...e }),
|
|
4323
4335
|
/* @__PURE__ */ c(is, {})
|
|
4324
4336
|
] }) : /* @__PURE__ */ c("div", {});
|
|
4325
|
-
},
|
|
4326
|
-
function
|
|
4337
|
+
}, ac = z.lazy(() => import("./nested-path-selector-content-DvIL_EoN.js"));
|
|
4338
|
+
function ic({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
4327
4339
|
const [r, a] = z.useState(!1);
|
|
4328
|
-
return /* @__PURE__ */ m(
|
|
4329
|
-
/* @__PURE__ */ m(
|
|
4330
|
-
/* @__PURE__ */ c(
|
|
4340
|
+
return /* @__PURE__ */ m(pa, { open: r, onOpenChange: a, children: [
|
|
4341
|
+
/* @__PURE__ */ m(jt, { children: [
|
|
4342
|
+
/* @__PURE__ */ c(zt, { asChild: !0, children: /* @__PURE__ */ c(ya, { asChild: !0, children: /* @__PURE__ */ c(
|
|
4331
4343
|
M,
|
|
4332
4344
|
{
|
|
4333
4345
|
size: "sm",
|
|
@@ -4348,10 +4360,10 @@ function rc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4348
4360
|
) })
|
|
4349
4361
|
}
|
|
4350
4362
|
) }) }),
|
|
4351
|
-
/* @__PURE__ */ c(
|
|
4363
|
+
/* @__PURE__ */ c(Wt, { children: "Add field" })
|
|
4352
4364
|
] }),
|
|
4353
4365
|
r && /* @__PURE__ */ c(z.Suspense, { children: /* @__PURE__ */ c(
|
|
4354
|
-
|
|
4366
|
+
ac,
|
|
4355
4367
|
{
|
|
4356
4368
|
data: e,
|
|
4357
4369
|
onSelect: t,
|
|
@@ -4362,18 +4374,18 @@ function rc({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4362
4374
|
) })
|
|
4363
4375
|
] });
|
|
4364
4376
|
}
|
|
4365
|
-
const
|
|
4377
|
+
const Au = () => {
|
|
4366
4378
|
const { savePageAsync: e } = Ge(), t = W();
|
|
4367
|
-
return
|
|
4379
|
+
return j(async () => {
|
|
4368
4380
|
await e(), t.invalidateQueries({ queryKey: [E.GET_DRAFT_PAGE] }), t.invalidateQueries({ queryKey: [E.GET_BUILDER_PAGE_DATA] });
|
|
4369
4381
|
}, [e, t]);
|
|
4370
|
-
},
|
|
4382
|
+
}, Tu = () => {
|
|
4371
4383
|
const e = W();
|
|
4372
|
-
return
|
|
4384
|
+
return j(() => {
|
|
4373
4385
|
e.clear();
|
|
4374
4386
|
}, [e]);
|
|
4375
|
-
},
|
|
4376
|
-
const e =
|
|
4387
|
+
}, Su = () => {
|
|
4388
|
+
const e = N(), t = I(), { data: n } = be(), s = W();
|
|
4377
4389
|
return X({
|
|
4378
4390
|
mutationFn: async (r) => {
|
|
4379
4391
|
if (!(n != null && n.id))
|
|
@@ -4397,7 +4409,7 @@ const pu = () => {
|
|
|
4397
4409
|
console.error("Failed to update metadata");
|
|
4398
4410
|
}
|
|
4399
4411
|
});
|
|
4400
|
-
},
|
|
4412
|
+
}, oc = K(() => import("./digital-asset-manager-CWneIIcn.js")), _u = ({
|
|
4401
4413
|
assetId: e,
|
|
4402
4414
|
assetUrl: t,
|
|
4403
4415
|
onChange: n,
|
|
@@ -4405,11 +4417,11 @@ const pu = () => {
|
|
|
4405
4417
|
placeholder: r = "Select an image",
|
|
4406
4418
|
disabled: a = !1
|
|
4407
4419
|
}) => {
|
|
4408
|
-
const { t: i } =
|
|
4420
|
+
const { t: i } = we(), [o, l] = q(!1), u = () => {
|
|
4409
4421
|
a || l(!0);
|
|
4410
|
-
},
|
|
4422
|
+
}, f = () => {
|
|
4411
4423
|
l(!1);
|
|
4412
|
-
},
|
|
4424
|
+
}, d = (A) => {
|
|
4413
4425
|
const T = Array.isArray(A) ? A[0] : A;
|
|
4414
4426
|
T != null && T.url && n(Pn(T, ["url", "id"])), l(!1);
|
|
4415
4427
|
}, h = () => {
|
|
@@ -4420,7 +4432,7 @@ const pu = () => {
|
|
|
4420
4432
|
g ? /* @__PURE__ */ c("div", { className: "flex h-12 items-center bg-gray-100 px-4", children: /* @__PURE__ */ c("p", { className: "text-xs text-gray-500", children: t }) }) : /* @__PURE__ */ c(
|
|
4421
4433
|
"img",
|
|
4422
4434
|
{
|
|
4423
|
-
onClick:
|
|
4435
|
+
onClick: u,
|
|
4424
4436
|
src: t,
|
|
4425
4437
|
alt: i("Selected image"),
|
|
4426
4438
|
className: "h-auto max-h-[100px] w-full bg-gray-100 object-contain"
|
|
@@ -4436,7 +4448,7 @@ const pu = () => {
|
|
|
4436
4448
|
className: "h-8 w-8 rounded-full bg-white text-red-500",
|
|
4437
4449
|
onClick: h,
|
|
4438
4450
|
disabled: a,
|
|
4439
|
-
children: g ? /* @__PURE__ */ c(zn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(
|
|
4451
|
+
children: g ? /* @__PURE__ */ c(zn, { className: "h-4 w-4" }) : /* @__PURE__ */ c(Va, { className: "h-4 w-4" })
|
|
4440
4452
|
}
|
|
4441
4453
|
),
|
|
4442
4454
|
!g && /* @__PURE__ */ c(
|
|
@@ -4446,7 +4458,7 @@ const pu = () => {
|
|
|
4446
4458
|
variant: "outline",
|
|
4447
4459
|
size: "icon",
|
|
4448
4460
|
className: "h-8 w-8 rounded-full bg-white/80 hover:bg-white/90",
|
|
4449
|
-
onClick:
|
|
4461
|
+
onClick: u,
|
|
4450
4462
|
disabled: a,
|
|
4451
4463
|
children: /* @__PURE__ */ c(Wn, { className: "h-4 w-4" })
|
|
4452
4464
|
}
|
|
@@ -4456,16 +4468,16 @@ const pu = () => {
|
|
|
4456
4468
|
"div",
|
|
4457
4469
|
{
|
|
4458
4470
|
className: `flex cursor-pointer items-center justify-center rounded-md border border-dashed p-6 ${a ? "cursor-not-allowed opacity-50" : "hover:border-gray-400"}`,
|
|
4459
|
-
onClick:
|
|
4471
|
+
onClick: u,
|
|
4460
4472
|
children: /* @__PURE__ */ m("div", { className: "flex flex-col items-center gap-2", children: [
|
|
4461
4473
|
/* @__PURE__ */ c(Wn, { className: "h-10 w-10 text-gray-400" }),
|
|
4462
4474
|
/* @__PURE__ */ c("p", { className: "text-sm text-gray-500", children: r })
|
|
4463
4475
|
] })
|
|
4464
4476
|
}
|
|
4465
4477
|
),
|
|
4466
|
-
/* @__PURE__ */ c(As, { open: o, onOpenChange: l, children: /* @__PURE__ */ m(
|
|
4467
|
-
/* @__PURE__ */ m(
|
|
4468
|
-
/* @__PURE__ */ c(
|
|
4478
|
+
/* @__PURE__ */ c(As, { open: o, onOpenChange: l, children: /* @__PURE__ */ m(Aa, { className: "h-fit w-full max-w-7xl overflow-hidden p-0", children: [
|
|
4479
|
+
/* @__PURE__ */ m(Ta, { className: "hidden border-b px-4 py-2", children: [
|
|
4480
|
+
/* @__PURE__ */ c(Sa, { children: i("Select Image") }),
|
|
4469
4481
|
/* @__PURE__ */ c(
|
|
4470
4482
|
M,
|
|
4471
4483
|
{
|
|
@@ -4473,27 +4485,27 @@ const pu = () => {
|
|
|
4473
4485
|
variant: "ghost",
|
|
4474
4486
|
size: "icon",
|
|
4475
4487
|
className: "absolute right-4 top-2",
|
|
4476
|
-
onClick:
|
|
4488
|
+
onClick: f,
|
|
4477
4489
|
children: /* @__PURE__ */ c(zn, { className: "h-4 w-4" })
|
|
4478
4490
|
}
|
|
4479
4491
|
)
|
|
4480
4492
|
] }),
|
|
4481
4493
|
/* @__PURE__ */ c("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(
|
|
4482
|
-
|
|
4494
|
+
oc,
|
|
4483
4495
|
{
|
|
4484
|
-
close:
|
|
4485
|
-
onSelect:
|
|
4496
|
+
close: f,
|
|
4497
|
+
onSelect: d,
|
|
4486
4498
|
mode: "image",
|
|
4487
4499
|
assetId: e
|
|
4488
4500
|
}
|
|
4489
4501
|
) }) })
|
|
4490
4502
|
] }) })
|
|
4491
4503
|
] });
|
|
4492
|
-
},
|
|
4504
|
+
}, lc = Fr(null), dn = {
|
|
4493
4505
|
didCatch: !1,
|
|
4494
4506
|
error: null
|
|
4495
4507
|
};
|
|
4496
|
-
class
|
|
4508
|
+
class cc extends qr {
|
|
4497
4509
|
constructor(t) {
|
|
4498
4510
|
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = dn;
|
|
4499
4511
|
}
|
|
@@ -4526,7 +4538,7 @@ class oc extends Mr {
|
|
|
4526
4538
|
} = this.state, {
|
|
4527
4539
|
resetKeys: r
|
|
4528
4540
|
} = this.props;
|
|
4529
|
-
if (s && n.error !== null &&
|
|
4541
|
+
if (s && n.error !== null && uc(t.resetKeys, r)) {
|
|
4530
4542
|
var a, i;
|
|
4531
4543
|
(a = (i = this.props).onReset) === null || a === void 0 || a.call(i, {
|
|
4532
4544
|
next: r,
|
|
@@ -4560,7 +4572,7 @@ class oc extends Mr {
|
|
|
4560
4572
|
else
|
|
4561
4573
|
throw i;
|
|
4562
4574
|
}
|
|
4563
|
-
return Fn(
|
|
4575
|
+
return Fn(lc.Provider, {
|
|
4564
4576
|
value: {
|
|
4565
4577
|
didCatch: a,
|
|
4566
4578
|
error: i,
|
|
@@ -4569,11 +4581,11 @@ class oc extends Mr {
|
|
|
4569
4581
|
}, o);
|
|
4570
4582
|
}
|
|
4571
4583
|
}
|
|
4572
|
-
function
|
|
4584
|
+
function uc() {
|
|
4573
4585
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
4574
4586
|
return e.length !== t.length || e.some((n, s) => !Object.is(n, t[s]));
|
|
4575
4587
|
}
|
|
4576
|
-
const
|
|
4588
|
+
const dc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
4577
4589
|
if (!e.trim())
|
|
4578
4590
|
return { isValid: !1, parsed: null, placeholders: [], error: { message: "JSON is empty" } };
|
|
4579
4591
|
try {
|
|
@@ -4590,11 +4602,11 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4590
4602
|
return { isValid: !0, parsed: JSON.parse(s), error: null, placeholders: n };
|
|
4591
4603
|
} catch (a) {
|
|
4592
4604
|
const i = a, o = i.message.match(/position (\d+)/), l = o ? parseInt(o[1]) : void 0;
|
|
4593
|
-
let
|
|
4605
|
+
let u, f;
|
|
4594
4606
|
if (l !== void 0) {
|
|
4595
|
-
const
|
|
4607
|
+
const d = s.substring(0, l).split(`
|
|
4596
4608
|
`);
|
|
4597
|
-
|
|
4609
|
+
u = d.length, f = d[d.length - 1].length + 1;
|
|
4598
4610
|
}
|
|
4599
4611
|
return {
|
|
4600
4612
|
isValid: !1,
|
|
@@ -4602,19 +4614,19 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4602
4614
|
placeholders: n,
|
|
4603
4615
|
error: {
|
|
4604
4616
|
message: i.message,
|
|
4605
|
-
line:
|
|
4606
|
-
column:
|
|
4617
|
+
line: u,
|
|
4618
|
+
column: f,
|
|
4607
4619
|
position: l
|
|
4608
4620
|
}
|
|
4609
4621
|
};
|
|
4610
4622
|
}
|
|
4611
|
-
},
|
|
4623
|
+
}, fc = (e, t) => {
|
|
4612
4624
|
let s = JSON.stringify(e, null, 2);
|
|
4613
4625
|
return t.forEach(({ original: r }, a) => {
|
|
4614
|
-
const i = `"__placeholder_${a}__"`, o = new RegExp(
|
|
4626
|
+
const i = `"__placeholder_${a}__"`, o = new RegExp(dc(i), "g");
|
|
4615
4627
|
s = s.replace(o, r);
|
|
4616
4628
|
}), s;
|
|
4617
|
-
},
|
|
4629
|
+
}, hc = (e, t) => {
|
|
4618
4630
|
if (!e) return "";
|
|
4619
4631
|
let n = JSON.stringify(e, null, 2);
|
|
4620
4632
|
const s = /{{([^{}]+)}}/g;
|
|
@@ -4624,7 +4636,7 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4624
4636
|
n = n.replace(r[0], i);
|
|
4625
4637
|
}
|
|
4626
4638
|
return n;
|
|
4627
|
-
},
|
|
4639
|
+
}, gc = K(() => import("./shared-json-ld-C4Kjka5m.js")), Pu = ({
|
|
4628
4640
|
value: e,
|
|
4629
4641
|
onChange: t,
|
|
4630
4642
|
disabled: n = !1,
|
|
@@ -4634,51 +4646,51 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4634
4646
|
id: i = "json-input",
|
|
4635
4647
|
pageData: o = {},
|
|
4636
4648
|
handleFieldInsert: l,
|
|
4637
|
-
hasJsonLdForSelectedLang:
|
|
4638
|
-
copyJsonLDFromDefaultPage:
|
|
4649
|
+
hasJsonLdForSelectedLang: u,
|
|
4650
|
+
copyJsonLDFromDefaultPage: f
|
|
4639
4651
|
}) => {
|
|
4640
|
-
const [
|
|
4641
|
-
|
|
4652
|
+
const [d, h] = q("edit"), [g, A] = q(null), [T, p] = q(""), y = at(null), [P] = In(), w = i === "jsonLD" && V(P, "features.sharedJsonLD", !1), O = i === "jsonLD" && !u && !!f;
|
|
4653
|
+
se(() => {
|
|
4642
4654
|
e.trim() === "" && t("{}");
|
|
4643
4655
|
}, [e, t]);
|
|
4644
4656
|
const B = (U) => {
|
|
4645
4657
|
if (s) return;
|
|
4646
|
-
const
|
|
4647
|
-
t(
|
|
4648
|
-
},
|
|
4658
|
+
const v = U.target.value;
|
|
4659
|
+
t(v);
|
|
4660
|
+
}, L = (U) => {
|
|
4649
4661
|
if (U.key === "Tab") {
|
|
4650
4662
|
U.preventDefault();
|
|
4651
|
-
const
|
|
4652
|
-
if (
|
|
4653
|
-
const
|
|
4663
|
+
const v = U.currentTarget, b = v.selectionStart, Y = v.selectionEnd;
|
|
4664
|
+
if (b !== Y) {
|
|
4665
|
+
const de = e.substring(b, Y).split(`
|
|
4654
4666
|
`);
|
|
4655
4667
|
if (U.shiftKey) {
|
|
4656
|
-
const
|
|
4657
|
-
`),
|
|
4658
|
-
t(
|
|
4659
|
-
|
|
4668
|
+
const Ae = de.map((Ne) => Ne.startsWith(" ") ? Ne.substring(2) : Ne).join(`
|
|
4669
|
+
`), Be = e.substring(0, b) + Ae + e.substring(Y);
|
|
4670
|
+
t(Be), setTimeout(() => {
|
|
4671
|
+
v.selectionStart = b, v.selectionEnd = b + Ae.length;
|
|
4660
4672
|
}, 0);
|
|
4661
4673
|
} else {
|
|
4662
|
-
const
|
|
4663
|
-
`),
|
|
4664
|
-
t(
|
|
4665
|
-
|
|
4674
|
+
const Ae = de.map((Ne) => ` ${Ne}`).join(`
|
|
4675
|
+
`), Be = e.substring(0, b) + Ae + e.substring(Y);
|
|
4676
|
+
t(Be), setTimeout(() => {
|
|
4677
|
+
v.selectionStart = b, v.selectionEnd = b + Ae.length;
|
|
4666
4678
|
}, 0);
|
|
4667
4679
|
}
|
|
4668
4680
|
} else {
|
|
4669
|
-
const $ = e.substring(0,
|
|
4681
|
+
const $ = e.substring(0, b) + " " + e.substring(Y);
|
|
4670
4682
|
t($), setTimeout(() => {
|
|
4671
|
-
|
|
4683
|
+
v.selectionStart = v.selectionEnd = b + 2;
|
|
4672
4684
|
}, 0);
|
|
4673
4685
|
}
|
|
4674
4686
|
}
|
|
4675
4687
|
};
|
|
4676
|
-
|
|
4688
|
+
se(() => {
|
|
4677
4689
|
const U = ls(e);
|
|
4678
4690
|
if (U.isValid)
|
|
4679
4691
|
if (A(null), U.parsed) {
|
|
4680
|
-
const
|
|
4681
|
-
p(
|
|
4692
|
+
const v = hc(U.parsed, o);
|
|
4693
|
+
p(v);
|
|
4682
4694
|
} else
|
|
4683
4695
|
p("");
|
|
4684
4696
|
else
|
|
@@ -4687,17 +4699,17 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4687
4699
|
const pe = () => {
|
|
4688
4700
|
const U = ls(e);
|
|
4689
4701
|
if (U.isValid && U.parsed) {
|
|
4690
|
-
const
|
|
4691
|
-
t(
|
|
4702
|
+
const v = fc(U.parsed, U.placeholders);
|
|
4703
|
+
t(v);
|
|
4692
4704
|
}
|
|
4693
4705
|
}, ye = () => {
|
|
4694
4706
|
g != null && g.position && y.current && (y.current.focus(), y.current.setSelectionRange(g.position, g.position + 1));
|
|
4695
4707
|
};
|
|
4696
|
-
return /* @__PURE__ */ c(
|
|
4708
|
+
return /* @__PURE__ */ c(cc, { fallback: /* @__PURE__ */ c("div", { children: "Some error" }), children: /* @__PURE__ */ c("div", { className: "space-y-2", children: /* @__PURE__ */ m(_a, { value: d, onValueChange: h, className: "w-full", children: [
|
|
4697
4709
|
/* @__PURE__ */ m("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
4698
|
-
/* @__PURE__ */ m(
|
|
4710
|
+
/* @__PURE__ */ m(Pa, { className: "w-max", children: [
|
|
4699
4711
|
/* @__PURE__ */ m(tn, { value: "edit", className: "flex items-center gap-1", children: [
|
|
4700
|
-
/* @__PURE__ */ c(
|
|
4712
|
+
/* @__PURE__ */ c(Ha, { className: "h-4 w-4" }),
|
|
4701
4713
|
/* @__PURE__ */ c("span", { children: "Edit" })
|
|
4702
4714
|
] }),
|
|
4703
4715
|
/* @__PURE__ */ m(
|
|
@@ -4707,26 +4719,26 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4707
4719
|
className: "flex items-center gap-1",
|
|
4708
4720
|
disabled: !e.trim() || g !== null || O,
|
|
4709
4721
|
children: [
|
|
4710
|
-
/* @__PURE__ */ c(
|
|
4722
|
+
/* @__PURE__ */ c(Qa, { className: "h-4 w-4" }),
|
|
4711
4723
|
/* @__PURE__ */ c("span", { children: "Preview" })
|
|
4712
4724
|
]
|
|
4713
4725
|
}
|
|
4714
4726
|
),
|
|
4715
|
-
|
|
4727
|
+
w && /* @__PURE__ */ m(
|
|
4716
4728
|
tn,
|
|
4717
4729
|
{
|
|
4718
4730
|
value: "shared",
|
|
4719
4731
|
className: "flex items-center gap-1",
|
|
4720
4732
|
disabled: !e.trim() || g !== null,
|
|
4721
4733
|
children: [
|
|
4722
|
-
/* @__PURE__ */ c(
|
|
4734
|
+
/* @__PURE__ */ c($a, { className: "h-4 w-4" }),
|
|
4723
4735
|
/* @__PURE__ */ c("span", { children: "Shared" })
|
|
4724
4736
|
]
|
|
4725
4737
|
}
|
|
4726
4738
|
)
|
|
4727
4739
|
] }),
|
|
4728
|
-
O ? null :
|
|
4729
|
-
|
|
4740
|
+
O ? null : d === "edit" && !s && /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ c(
|
|
4741
|
+
ic,
|
|
4730
4742
|
{
|
|
4731
4743
|
dataType: "value",
|
|
4732
4744
|
data: o ?? {},
|
|
@@ -4735,7 +4747,7 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4735
4747
|
) })
|
|
4736
4748
|
] }),
|
|
4737
4749
|
/* @__PURE__ */ m(nn, { value: "edit", className: "relative mt-0", children: [
|
|
4738
|
-
!O &&
|
|
4750
|
+
!O && d === "edit" && /* @__PURE__ */ c(Dn, { content: "Format JSON", side: "right", showTooltip: !n && !g, children: /* @__PURE__ */ c(
|
|
4739
4751
|
M,
|
|
4740
4752
|
{
|
|
4741
4753
|
type: "button",
|
|
@@ -4744,12 +4756,12 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4744
4756
|
onClick: pe,
|
|
4745
4757
|
className: "absolute right-1 top-1 h-6 w-6 p-1",
|
|
4746
4758
|
disabled: !e.trim() || n || g !== null,
|
|
4747
|
-
children: /* @__PURE__ */ c(
|
|
4759
|
+
children: /* @__PURE__ */ c(ja, {})
|
|
4748
4760
|
}
|
|
4749
4761
|
) }),
|
|
4750
4762
|
O ? /* @__PURE__ */ c("div", { className: "flex h-40 items-center justify-center rounded-md bg-black/20", children: /* @__PURE__ */ m("div", { className: "flex max-w-[400px] flex-col items-center gap-2 rounded-md bg-white p-4 shadow-lg", children: [
|
|
4751
4763
|
/* @__PURE__ */ c("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." }),
|
|
4752
|
-
/* @__PURE__ */ m(M, { type: "button", variant: "default", size: "sm", onClick:
|
|
4764
|
+
/* @__PURE__ */ m(M, { type: "button", variant: "default", size: "sm", onClick: f, children: [
|
|
4753
4765
|
/* @__PURE__ */ c(Ts, {}),
|
|
4754
4766
|
"Copy & Edit from default language"
|
|
4755
4767
|
] })
|
|
@@ -4761,7 +4773,7 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4761
4773
|
name: i,
|
|
4762
4774
|
className: `rounded-md border border-input text-xs ${g ? "border-red-500" : ""}`,
|
|
4763
4775
|
onChange: B,
|
|
4764
|
-
onKeyDown:
|
|
4776
|
+
onKeyDown: L,
|
|
4765
4777
|
value: e,
|
|
4766
4778
|
placeholder: r,
|
|
4767
4779
|
rows: a,
|
|
@@ -4769,9 +4781,9 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4769
4781
|
readOnly: s
|
|
4770
4782
|
}
|
|
4771
4783
|
),
|
|
4772
|
-
g && /* @__PURE__ */ m(
|
|
4773
|
-
/* @__PURE__ */ c(
|
|
4774
|
-
/* @__PURE__ */ m(
|
|
4784
|
+
g && /* @__PURE__ */ m(va, { variant: "destructive", className: "mt-2", children: [
|
|
4785
|
+
/* @__PURE__ */ c(za, { className: "h-4 w-4" }),
|
|
4786
|
+
/* @__PURE__ */ m(wa, { className: "flex flex-col", children: [
|
|
4775
4787
|
/* @__PURE__ */ c("span", { className: "font-medium", children: "Invalid JSON" }),
|
|
4776
4788
|
/* @__PURE__ */ c("span", { className: "text-sm", children: g.message }),
|
|
4777
4789
|
g.line && g.column && /* @__PURE__ */ m("span", { className: "text-sm", children: [
|
|
@@ -4798,169 +4810,123 @@ const cc = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ls = (e) => {
|
|
|
4798
4810
|
/* @__PURE__ */ c(Kn, { rows: a, value: T, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
|
|
4799
4811
|
/* @__PURE__ */ c("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
|
|
4800
4812
|
] }),
|
|
4801
|
-
|
|
4813
|
+
w && /* @__PURE__ */ c(nn, { value: "shared", className: "mt-0", children: /* @__PURE__ */ c(H, { children: /* @__PURE__ */ c(gc, {}) }) })
|
|
4802
4814
|
] }) }) });
|
|
4803
|
-
}, hc = () => {
|
|
4804
|
-
const e = re("getAccessToken");
|
|
4805
|
-
return {
|
|
4806
|
-
getAccessToken: Q(async () => {
|
|
4807
|
-
try {
|
|
4808
|
-
return await e();
|
|
4809
|
-
} catch {
|
|
4810
|
-
return "";
|
|
4811
|
-
}
|
|
4812
|
-
}, [e])
|
|
4813
|
-
};
|
|
4814
|
-
}, _u = () => {
|
|
4815
|
-
const { logout: e } = It(), { getAccessToken: t } = hc();
|
|
4816
|
-
return Q(
|
|
4817
|
-
async ({
|
|
4818
|
-
url: n,
|
|
4819
|
-
method: s = "GET",
|
|
4820
|
-
body: r = {},
|
|
4821
|
-
headers: a = {}
|
|
4822
|
-
}) => {
|
|
4823
|
-
const i = await t();
|
|
4824
|
-
if (!i)
|
|
4825
|
-
throw new Error("No auth token");
|
|
4826
|
-
if (!n)
|
|
4827
|
-
throw new Error("URL is required");
|
|
4828
|
-
try {
|
|
4829
|
-
const o = await fetch(n, {
|
|
4830
|
-
method: s,
|
|
4831
|
-
headers: {
|
|
4832
|
-
"Content-Type": "application/json",
|
|
4833
|
-
Authorization: `Bearer ${i}`,
|
|
4834
|
-
...a
|
|
4835
|
-
},
|
|
4836
|
-
body: JSON.stringify(r)
|
|
4837
|
-
});
|
|
4838
|
-
if (o.status === 401)
|
|
4839
|
-
return console.log("Session expired", o), await e(), window.location.reload(), null;
|
|
4840
|
-
if (o.status === 400)
|
|
4841
|
-
throw new Error((await o.json()).error);
|
|
4842
|
-
return await o.json();
|
|
4843
|
-
} catch (o) {
|
|
4844
|
-
throw console.log("Something went wrong", o), o;
|
|
4845
|
-
}
|
|
4846
|
-
},
|
|
4847
|
-
[e, t]
|
|
4848
|
-
);
|
|
4849
4815
|
};
|
|
4850
4816
|
if (typeof window > "u")
|
|
4851
4817
|
throw new Error("@chaibuilder/pages is not available on the server");
|
|
4852
4818
|
export {
|
|
4853
|
-
|
|
4819
|
+
Jc as $,
|
|
4854
4820
|
E as A,
|
|
4855
4821
|
Ns as B,
|
|
4856
4822
|
js as C,
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4823
|
+
Uo as D,
|
|
4824
|
+
zc as E,
|
|
4825
|
+
Wc as F,
|
|
4860
4826
|
De as G,
|
|
4861
4827
|
En as H,
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4828
|
+
Yc as I,
|
|
4829
|
+
Qc as J,
|
|
4830
|
+
nu as K,
|
|
4831
|
+
Nt as L,
|
|
4832
|
+
lt as M,
|
|
4833
|
+
iu as N,
|
|
4834
|
+
su as O,
|
|
4835
|
+
au as P,
|
|
4836
|
+
bo as Q,
|
|
4837
|
+
sl as R,
|
|
4838
|
+
Zc as S,
|
|
4873
4839
|
Dn as T,
|
|
4874
4840
|
pn as U,
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4841
|
+
Xo as V,
|
|
4842
|
+
uu as W,
|
|
4843
|
+
du as X,
|
|
4844
|
+
nl as Y,
|
|
4845
|
+
fu as Z,
|
|
4846
|
+
hu as _,
|
|
4847
|
+
io as a,
|
|
4848
|
+
Hc as a0,
|
|
4849
|
+
ru as a1,
|
|
4884
4850
|
Z as a2,
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4851
|
+
Po as a3,
|
|
4852
|
+
Ml as a4,
|
|
4853
|
+
Xc as a5,
|
|
4854
|
+
Dt as a6,
|
|
4855
|
+
Eu as a7,
|
|
4856
|
+
cu as a8,
|
|
4857
|
+
lu as a9,
|
|
4858
|
+
Vc as aA,
|
|
4859
|
+
Fc as aB,
|
|
4860
|
+
Ki as aC,
|
|
4861
|
+
Lc as aD,
|
|
4862
|
+
ws as aE,
|
|
4863
|
+
ao as aF,
|
|
4864
|
+
Ci as aG,
|
|
4899
4865
|
In as aH,
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4866
|
+
_i as aI,
|
|
4867
|
+
ic as aJ,
|
|
4868
|
+
_u as aK,
|
|
4869
|
+
Ic as aL,
|
|
4870
|
+
cc as aM,
|
|
4871
|
+
yu as aN,
|
|
4906
4872
|
be as aO,
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4873
|
+
Tu as aP,
|
|
4874
|
+
Xl as aQ,
|
|
4875
|
+
Au as aR,
|
|
4876
|
+
Su as aS,
|
|
4877
|
+
Yt as aT,
|
|
4878
|
+
lo as aU,
|
|
4879
|
+
Cc as aV,
|
|
4880
|
+
ei as aW,
|
|
4915
4881
|
Rs as aa,
|
|
4916
4882
|
Oe as ab,
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4883
|
+
Zo as ac,
|
|
4884
|
+
ou as ad,
|
|
4885
|
+
tu as ae,
|
|
4886
|
+
eu as af,
|
|
4887
|
+
Gt as ag,
|
|
4888
|
+
jc as ah,
|
|
4889
|
+
ci as ai,
|
|
4890
|
+
gi as aj,
|
|
4891
|
+
N as ak,
|
|
4892
|
+
I as al,
|
|
4893
|
+
Jl as am,
|
|
4894
|
+
Uc as an,
|
|
4929
4895
|
kn as ao,
|
|
4930
4896
|
ie as ap,
|
|
4931
4897
|
rn as aq,
|
|
4932
|
-
|
|
4898
|
+
ce as ar,
|
|
4933
4899
|
Nn as as,
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4900
|
+
Nc as at,
|
|
4901
|
+
Bc as au,
|
|
4902
|
+
qc as av,
|
|
4903
|
+
Pu as aw,
|
|
4938
4904
|
ls as ax,
|
|
4939
|
-
|
|
4940
|
-
|
|
4905
|
+
Mc as ay,
|
|
4906
|
+
Kc as az,
|
|
4941
4907
|
bs as b,
|
|
4942
|
-
|
|
4943
|
-
|
|
4908
|
+
kc as c,
|
|
4909
|
+
Oc as d,
|
|
4944
4910
|
Re as e,
|
|
4945
4911
|
On as f,
|
|
4946
4912
|
xe as g,
|
|
4947
4913
|
Ce as h,
|
|
4948
|
-
|
|
4914
|
+
le as i,
|
|
4949
4915
|
Ps as j,
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4916
|
+
ri as k,
|
|
4917
|
+
Gc as l,
|
|
4918
|
+
Dc as m,
|
|
4919
|
+
xc as n,
|
|
4920
|
+
Rc as o,
|
|
4921
|
+
jl as p,
|
|
4922
|
+
pu as q,
|
|
4957
4923
|
J as r,
|
|
4958
4924
|
$s as s,
|
|
4959
4925
|
an as t,
|
|
4960
4926
|
Cs as u,
|
|
4961
|
-
|
|
4962
|
-
|
|
4927
|
+
gu as v,
|
|
4928
|
+
mu as w,
|
|
4963
4929
|
F as x,
|
|
4964
|
-
|
|
4930
|
+
Wo as y,
|
|
4965
4931
|
Ms as z
|
|
4966
4932
|
};
|