@chaibuilder/pages 0.4.3 → 0.4.6
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/{B4MFY5CR-DrGviCw5.js → B4MFY5CR-94OKrKm9.js} +1 -1
- package/dist/{B4MFY5CR-ltRrvUNj.cjs → B4MFY5CR-CJ_zQjzE.cjs} +1 -1
- package/dist/{HO4MOOFI-Dae3TzOP.cjs → HO4MOOFI-BHGee8_h.cjs} +1 -1
- package/dist/{HO4MOOFI-Ckm2pyGV.js → HO4MOOFI-CRSNiC7G.js} +2 -2
- package/dist/{HUY7CZI3-BDpIMk8f.js → HUY7CZI3-DfVfYgpJ.js} +2 -2
- package/dist/{HUY7CZI3-CZ7fG1E4.cjs → HUY7CZI3-DpGRfHvo.cjs} +1 -1
- package/dist/asset-metadata-editor-CEFwXx62.js +91 -0
- package/dist/asset-metadata-editor-YXDey62L.cjs +1 -0
- package/dist/digital-asset-manager-B3G7kQ5a.cjs +1 -0
- package/dist/digital-asset-manager-DS4mu-dP.js +462 -0
- package/dist/image-editor-CwVua57o.js +102 -0
- package/dist/image-editor-D8wu5UNM.cjs +1 -0
- package/dist/index-Dhwd3gtU.cjs +2 -0
- package/dist/{index-BSqqTOmR.js → index-Dq_xGZ55.js} +986 -971
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +8 -8
- package/dist/pages.css +1 -1
- package/dist/server.cjs +1 -1
- package/dist/server.d.ts +44 -4
- package/dist/server.js +152 -98
- package/package.json +6 -6
- package/dist/index-D6CGQLYq.cjs +0 -2
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
var
|
|
1
|
+
var ks = (e) => {
|
|
2
2
|
throw TypeError(e);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var Ls = (e, t, n) => t.has(e) || ks("Cannot " + n);
|
|
5
|
+
var R = (e, t, n) => (Ls(e, t, "read from private field"), n ? n.call(e) : t.get(e)), se = (e, t, n) => t.has(e) ? ks("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), ee = (e, t, n, s) => (Ls(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
6
6
|
import { jsx as r, jsxs as u, Fragment as be } from "react/jsx-runtime";
|
|
7
|
-
import { get as te, isEmpty as me, reverse as Ra, sortBy as
|
|
8
|
-
import { useAtom as
|
|
7
|
+
import { get as te, isEmpty as me, reverse as Ra, sortBy as Oa, each as Ba, find as fe, set as Ma, has as nn, startsWith as Rt, isEqual as is, map as Fe, toLower as Dt, trim as Fa, filter as Te, startCase as It, groupBy as qa, compact as Nn, includes as Mt, concat as Zs, endsWith as Js, orderBy as mn, first as Ha, uniq as Ka, debounce as Va, pick as er, keys as ja, pickBy as $a, isArray as za, cloneDeep as Wa, isString as Ds } from "lodash-es";
|
|
8
|
+
import { useAtom as Dn, atom as ls } from "jotai";
|
|
9
9
|
import * as ce from "react";
|
|
10
|
-
import
|
|
11
|
-
import { useQueryClient as Se, useQuery as Ne, useMutation as Ae, onlineManager as
|
|
10
|
+
import tr, { useMemo as W, useCallback as _e, useState as P, useEffect as we, useRef as ct, Suspense as Ya, lazy as Qa } from "react";
|
|
11
|
+
import { useQueryClient as Se, useQuery as Ne, useMutation as Ae, onlineManager as nr, QueryClient as Xa, QueryClientProvider as Za } from "@tanstack/react-query";
|
|
12
12
|
import { toast as j } from "sonner";
|
|
13
|
-
import { useLanguages as ut, useUpdateBlocksPropsRealtime as
|
|
14
|
-
import { Card as
|
|
15
|
-
import { LockIcon as
|
|
16
|
-
import { format as
|
|
17
|
-
import { useRegisteredChaiBlocks as
|
|
18
|
-
import { z as
|
|
19
|
-
import { loadWebBlocks as
|
|
13
|
+
import { useLanguages as ut, useUpdateBlocksPropsRealtime as sr, PERMISSIONS as Ja, usePartailBlocksStore as ei, usePermissions as sn, useLibraryBlocks as ti, useTheme as ni, mergeClasses as si, useSavePage as rr, useRightPanel as ri, useBlocksStore as ai, getBlocksFromHTML as ii, useTranslation as li, useSidebarActivePanel as oi, registerChaiSidebarPanel as zn, registerChaiTopBar as ci, registerChaiMediaManager as ui, registerChaiSaveToLibrary as di, ChaiBuilderEditor as hi } from "@chaibuilder/sdk";
|
|
14
|
+
import { Card as os, CardHeader as cs, CardTitle as us, CardContent as ds, CardFooter as hs, Button as _, AlertDialog as ar, AlertDialogTrigger as ir, AlertDialogContent as lr, AlertDialogHeader as or, AlertDialogTitle as cr, AlertDialogDescription as ur, AlertDialogFooter as dr, AlertDialogCancel as hr, AlertDialogAction as mr, Popover as fr, PopoverTrigger as gr, PopoverContent as pr, Input as ye, Label as X, Dialog as He, DialogContent as Ke, DialogHeader as Ve, DialogTitle as je, DialogDescription as Ye, Alert as yr, DialogFooter as et, DropdownMenu as rn, DropdownMenuTrigger as an, DropdownMenuContent as ln, DropdownMenuItem as De, Textarea as Gt, Select as mi, SelectTrigger as fi, SelectValue as gi, SelectContent as pi, SelectItem as yi, Badge as qn, Sheet as vr, SheetContent as Er, SheetHeader as br, SheetTitle as wr, Separator as vi, TooltipProvider as Sr, Tooltip as ms, SheetTrigger as Ei, TooltipTrigger as fs, ScrollArea as bi, TooltipContent as gs, Skeleton as fn, DropdownMenuSeparator as wi, CardDescription as Si, Command as Ni, CommandInput as Ai, CommandList as xi, CommandEmpty as Ti, CommandGroup as Ci, CommandItem as Gs, AlertDescription as Pi, Accordion as _i, AccordionItem as gn, AccordionTrigger as pn, AccordionContent as yn, HoverCard as Ii, HoverCardTrigger as ki, HoverCardContent as Li } from "@chaibuilder/sdk/ui";
|
|
15
|
+
import { LockIcon as Nr, UserIcon as Di, AlertTriangleIcon as Gi, Trash2 as Ar, Plus as ps, ImageIcon as xr, X as Tr, AlertCircle as Cr, StarIcon as Ui, MoreHorizontal as ys, PencilIcon as Ri, Power as Pr, TrashIcon as Oi, Tag as Bi, File as on, Search as Mi, StarsIcon as Fi, Globe as qi, Pencil as Hi, Trash as vs, SquareLibrary as Us, Logs as Ki, Loader as _r, Languages as Vi, ChevronDown as Ir, Star as ji, History as Rs, ArrowUpRight as $i, Clock as zi, Undo2 as kr, CloudOff as Wi, Edit as Yi, Save as Lr, GlobeIcon as Qi, Eye as Dr, Palette as Xi, CheckCircle as Zi, Send as Os, Rocket as Bs, Settings as Ji, ExternalLink as el, EyeOff as tl, Loader2 as Gr, LanguagesIcon as nl, DatabaseIcon as sl, ChevronLeft as rl, ChevronRight as al, User as il } from "lucide-react";
|
|
16
|
+
import { format as Gn, formatDistanceToNow as ll } from "date-fns";
|
|
17
|
+
import { useRegisteredChaiBlocks as ol, getDefaultBlockProps as cl } from "@chaibuilder/runtime";
|
|
18
|
+
import { z as An } from "zod";
|
|
19
|
+
import { loadWebBlocks as ul } from "@chaibuilder/sdk/web-blocks";
|
|
20
20
|
const qe = {
|
|
21
21
|
ab: "Abkhazian",
|
|
22
22
|
aa: "Afar",
|
|
@@ -246,8 +246,13 @@ const qe = {
|
|
|
246
246
|
DELETE_LIBRARY_ITEM: "DELETE_LIBRARY_ITEM",
|
|
247
247
|
MARK_AS_TEMPLATE: "MARK_AS_TEMPLATE",
|
|
248
248
|
UNMARK_AS_TEMPLATE: "UNMARK_AS_TEMPLATE",
|
|
249
|
-
GET_TEMPLATES_BY_TYPE: "GET_TEMPLATES_BY_TYPE"
|
|
250
|
-
|
|
249
|
+
GET_TEMPLATES_BY_TYPE: "GET_TEMPLATES_BY_TYPE",
|
|
250
|
+
// DAM Actions
|
|
251
|
+
UPLOAD_ASSET: "UPLOAD_ASSET",
|
|
252
|
+
DELETE_ASSET: "DELETE_ASSET",
|
|
253
|
+
UPDATE_ASSET: "UPDATE_ASSET",
|
|
254
|
+
GET_ASSETS: "GET_ASSETS"
|
|
255
|
+
}, ke = "chaibuilder", Es = async (e, t, n = {}) => await fetch(e, {
|
|
251
256
|
method: "POST",
|
|
252
257
|
headers: {
|
|
253
258
|
"Content-Type": "application/json",
|
|
@@ -258,34 +263,34 @@ const qe = {
|
|
|
258
263
|
if (import.meta.vitest) {
|
|
259
264
|
const { it: e, expect: t } = import.meta.vitest;
|
|
260
265
|
e("should fetch API", async () => {
|
|
261
|
-
const n = await
|
|
266
|
+
const n = await Es("/v1/api/chai", {
|
|
262
267
|
action: "test"
|
|
263
268
|
});
|
|
264
269
|
t(n).toBeDefined();
|
|
265
270
|
});
|
|
266
271
|
}
|
|
267
|
-
let
|
|
268
|
-
function
|
|
269
|
-
const n = `atom${++
|
|
272
|
+
let dl = 0;
|
|
273
|
+
function Ms(e, t) {
|
|
274
|
+
const n = `atom${++dl}`, s = {
|
|
270
275
|
toString() {
|
|
271
276
|
return n;
|
|
272
277
|
}
|
|
273
278
|
};
|
|
274
|
-
return typeof e == "function" ? s.read = e : (s.init = e, s.read =
|
|
279
|
+
return typeof e == "function" ? s.read = e : (s.init = e, s.read = hl, s.write = ml), t && (s.write = t), s;
|
|
275
280
|
}
|
|
276
|
-
function
|
|
281
|
+
function hl(e) {
|
|
277
282
|
return e(this);
|
|
278
283
|
}
|
|
279
|
-
function
|
|
284
|
+
function ml(e, t, n) {
|
|
280
285
|
return t(
|
|
281
286
|
this,
|
|
282
287
|
typeof n == "function" ? n(e(this)) : n
|
|
283
288
|
);
|
|
284
289
|
}
|
|
285
|
-
const
|
|
290
|
+
const fl = Symbol(
|
|
286
291
|
""
|
|
287
|
-
),
|
|
288
|
-
function
|
|
292
|
+
), gl = (e) => typeof (e == null ? void 0 : e.then) == "function";
|
|
293
|
+
function pl(e = () => {
|
|
289
294
|
try {
|
|
290
295
|
return window.localStorage;
|
|
291
296
|
} catch {
|
|
@@ -308,7 +313,7 @@ function ml(e = () => {
|
|
|
308
313
|
}
|
|
309
314
|
return a;
|
|
310
315
|
}, y = (d = (g = e()) == null ? void 0 : g.getItem(c)) != null ? d : null;
|
|
311
|
-
return
|
|
316
|
+
return gl(y) ? y.then(w) : w(y);
|
|
312
317
|
},
|
|
313
318
|
setItem: (c, h) => {
|
|
314
319
|
var g;
|
|
@@ -347,25 +352,25 @@ function ml(e = () => {
|
|
|
347
352
|
};
|
|
348
353
|
}), o && (i.subscribe = l(o)), i;
|
|
349
354
|
}
|
|
350
|
-
const
|
|
351
|
-
function
|
|
352
|
-
const a =
|
|
355
|
+
const yl = pl();
|
|
356
|
+
function vl(e, t, n = yl, s) {
|
|
357
|
+
const a = Ms(
|
|
353
358
|
t
|
|
354
359
|
);
|
|
355
360
|
return a.onMount = (l) => {
|
|
356
361
|
l(n.getItem(e, t));
|
|
357
362
|
let o;
|
|
358
363
|
return n.subscribe && (o = n.subscribe(e, l, t)), o;
|
|
359
|
-
},
|
|
364
|
+
}, Ms(
|
|
360
365
|
(l) => l(a),
|
|
361
366
|
(l, o, c) => {
|
|
362
367
|
const h = typeof c == "function" ? c(l(a)) : c;
|
|
363
|
-
return h ===
|
|
368
|
+
return h === fl ? (o(a, t), n.removeItem(e)) : h instanceof Promise ? h.then((g) => (o(a, g), n.setItem(e, g))) : (o(a, h), n.setItem(e, h));
|
|
364
369
|
}
|
|
365
370
|
);
|
|
366
371
|
}
|
|
367
|
-
const
|
|
368
|
-
const [e, t] =
|
|
372
|
+
const El = vl("__chai_user", null), st = () => {
|
|
373
|
+
const [e, t] = Dn(El);
|
|
369
374
|
return {
|
|
370
375
|
isLoggedIn: !!e,
|
|
371
376
|
user: e,
|
|
@@ -374,8 +379,8 @@ const pl = gl("__chai_user", null), st = () => {
|
|
|
374
379
|
t(null);
|
|
375
380
|
}
|
|
376
381
|
};
|
|
377
|
-
},
|
|
378
|
-
const { user: e, setUser: t, logout: n } = st(), s =
|
|
382
|
+
}, bl = () => {
|
|
383
|
+
const { user: e, setUser: t, logout: n } = st(), s = Un(), a = Se();
|
|
379
384
|
return Ne({
|
|
380
385
|
queryKey: ["refresh_token"],
|
|
381
386
|
queryFn: async () => {
|
|
@@ -405,8 +410,8 @@ const pl = gl("__chai_user", null), st = () => {
|
|
|
405
410
|
retry: !1,
|
|
406
411
|
enabled: !1
|
|
407
412
|
});
|
|
408
|
-
},
|
|
409
|
-
const { user: e } = st(), t = dt("onSessionExpired"), n =
|
|
413
|
+
}, Wu = () => {
|
|
414
|
+
const { user: e } = st(), t = dt("onSessionExpired"), n = W(
|
|
410
415
|
() => e == null ? void 0 : e.accessToken,
|
|
411
416
|
[e == null ? void 0 : e.accessToken]
|
|
412
417
|
);
|
|
@@ -438,15 +443,15 @@ const pl = gl("__chai_user", null), st = () => {
|
|
|
438
443
|
[n, t]
|
|
439
444
|
);
|
|
440
445
|
}, $ = () => {
|
|
441
|
-
const { user: e } = st(), t =
|
|
446
|
+
const { user: e } = st(), t = W(
|
|
442
447
|
() => e == null ? void 0 : e.accessToken,
|
|
443
448
|
[e == null ? void 0 : e.accessToken]
|
|
444
|
-
), { refetch: n } =
|
|
449
|
+
), { refetch: n } = bl();
|
|
445
450
|
return _e(
|
|
446
451
|
async (s, a, i = {}) => {
|
|
447
452
|
if (t)
|
|
448
453
|
try {
|
|
449
|
-
const l = te(a, "action", "").toLowerCase(), o = await
|
|
454
|
+
const l = te(a, "action", "").toLowerCase(), o = await Es(
|
|
450
455
|
s + (l ? `?action=${l}` : ""),
|
|
451
456
|
a,
|
|
452
457
|
{
|
|
@@ -463,7 +468,7 @@ const pl = gl("__chai_user", null), st = () => {
|
|
|
463
468
|
},
|
|
464
469
|
[t, n]
|
|
465
470
|
);
|
|
466
|
-
},
|
|
471
|
+
}, Ur = () => {
|
|
467
472
|
const e = Q(), t = Se(), n = $();
|
|
468
473
|
return Ae({
|
|
469
474
|
mutationFn: async (s) => n(e, { action: I.RELEASE_LOCK, data: s }),
|
|
@@ -492,7 +497,7 @@ const pl = gl("__chai_user", null), st = () => {
|
|
|
492
497
|
});
|
|
493
498
|
}
|
|
494
499
|
});
|
|
495
|
-
},
|
|
500
|
+
}, wl = () => {
|
|
496
501
|
const e = Q(), t = Se(), n = $();
|
|
497
502
|
return Ae({
|
|
498
503
|
mutationFn: async (s) => n(e, { action: I.UPDATE_WEBSITE_DATA, data: s }),
|
|
@@ -508,7 +513,7 @@ const pl = gl("__chai_user", null), st = () => {
|
|
|
508
513
|
}
|
|
509
514
|
});
|
|
510
515
|
};
|
|
511
|
-
function
|
|
516
|
+
function Ue() {
|
|
512
517
|
const [e, t] = P(
|
|
513
518
|
new URLSearchParams(window.location.search)
|
|
514
519
|
);
|
|
@@ -521,16 +526,16 @@ function Re() {
|
|
|
521
526
|
};
|
|
522
527
|
}, []), [e, t];
|
|
523
528
|
}
|
|
524
|
-
const
|
|
525
|
-
const [e] =
|
|
529
|
+
const Sl = ls({}), Or = () => Dn(Sl), Nl = () => {
|
|
530
|
+
const [e] = Ue(), t = e.get("page"), n = ct(""), { mutate: s } = Ur();
|
|
526
531
|
we(() => {
|
|
527
532
|
!me(n.current) && t !== n.current && s({ id: n.current }), n.current = t;
|
|
528
533
|
}, [t, s, n]);
|
|
529
534
|
}, dt = (e, t) => {
|
|
530
|
-
const [n] =
|
|
535
|
+
const [n] = Or();
|
|
531
536
|
return te(n, e, t);
|
|
532
|
-
}, Q = () => dt("apiUrl", "/chai/api"),
|
|
533
|
-
const e = Q(), [t] =
|
|
537
|
+
}, Q = () => dt("apiUrl", "/chai/api"), Un = () => dt("usersApiUrl", "/chai/users"), cn = () => {
|
|
538
|
+
const e = Q(), [t] = Ue(), n = t.get("page"), s = $();
|
|
534
539
|
return Ne({
|
|
535
540
|
queryKey: [ke, I.GET_LANGUAGE_PAGES, n],
|
|
536
541
|
initialData: [],
|
|
@@ -540,7 +545,7 @@ const El = as({}), Ur = () => Ln(El), bl = () => {
|
|
|
540
545
|
action: I.GET_LANGUAGE_PAGES,
|
|
541
546
|
data: { id: n }
|
|
542
547
|
});
|
|
543
|
-
return Ra(
|
|
548
|
+
return Ra(Oa(a, "primaryPage"));
|
|
544
549
|
},
|
|
545
550
|
enabled: !!n
|
|
546
551
|
});
|
|
@@ -558,16 +563,16 @@ const El = as({}), Ur = () => Ln(El), bl = () => {
|
|
|
558
563
|
data: { draft: !0 }
|
|
559
564
|
})
|
|
560
565
|
});
|
|
561
|
-
},
|
|
562
|
-
const { fallbackLang: t } = ut(), { data: n } = un(), { data: s, isFetching: a } = cn(), i =
|
|
566
|
+
}, Br = (e) => {
|
|
567
|
+
const { fallbackLang: t } = ut(), { data: n } = un(), { data: s, isFetching: a } = cn(), i = W(() => {
|
|
563
568
|
const l = { [t]: !0 };
|
|
564
|
-
return
|
|
569
|
+
return Ba(te(n, "languages"), (o) => {
|
|
565
570
|
const c = fe(s, { lang: o });
|
|
566
571
|
l[o] = !!c;
|
|
567
572
|
}), l;
|
|
568
573
|
}, [t, s, n]);
|
|
569
574
|
return a || me(e) || e && i[e];
|
|
570
|
-
},
|
|
575
|
+
}, bs = () => {
|
|
571
576
|
const e = Se(), { data: t } = Ne({
|
|
572
577
|
queryKey: ["chaibuilder", I.AI_CONTEXT],
|
|
573
578
|
initialData: "",
|
|
@@ -586,14 +591,14 @@ const El = as({}), Ur = () => Ln(El), bl = () => {
|
|
|
586
591
|
staleTime: 1e3 * 60 * 5,
|
|
587
592
|
queryFn: async () => e(t, { action: I.GET_WEBSITE_PAGES }) || []
|
|
588
593
|
});
|
|
589
|
-
},
|
|
590
|
-
const [e] =
|
|
591
|
-
return { data:
|
|
594
|
+
}, Al = ls({ lastSaved: void 0 }), ws = () => Dn(Al), Re = () => {
|
|
595
|
+
const [e] = Ue(), t = e.get("page"), { data: n, isFetching: s } = Rn();
|
|
596
|
+
return { data: W(
|
|
592
597
|
() => fe(n, { id: t }) || {},
|
|
593
598
|
[n, t]
|
|
594
599
|
), isFetching: s };
|
|
595
600
|
}, dn = (e) => {
|
|
596
|
-
const t =
|
|
601
|
+
const t = Un(), n = $();
|
|
597
602
|
return Ne({
|
|
598
603
|
queryKey: [ke, "chaiUserInfo", e],
|
|
599
604
|
queryFn: async () => await n(t, {
|
|
@@ -602,15 +607,15 @@ const El = as({}), Ur = () => Ln(El), bl = () => {
|
|
|
602
607
|
}),
|
|
603
608
|
enabled: !!e && e !== "EXPIRED"
|
|
604
609
|
});
|
|
605
|
-
},
|
|
606
|
-
const [e] =
|
|
607
|
-
return
|
|
610
|
+
}, xl = ls(void 0), hn = () => {
|
|
611
|
+
const [e] = Ue(), t = e.get("page"), { user: n } = st(), [s, a] = Dn(xl);
|
|
612
|
+
return W(() => ({
|
|
608
613
|
isLocked: t && (n == null ? void 0 : n.id) !== s,
|
|
609
614
|
currentEditor: s,
|
|
610
615
|
setCurrentEditor: (i) => a(i)
|
|
611
616
|
}), [n == null ? void 0 : n.id, s, t, a]);
|
|
612
|
-
},
|
|
613
|
-
const [e] =
|
|
617
|
+
}, Mr = () => {
|
|
618
|
+
const [e] = Ue(), t = e.get("page"), n = Q(), { setAiContext: s } = bs(), { setCurrentEditor: a } = hn(), [, i] = ws(), l = $();
|
|
614
619
|
return Ne({
|
|
615
620
|
queryKey: [ke, I.GET_DRAFT_PAGE, t],
|
|
616
621
|
staleTime: 1 / 0,
|
|
@@ -627,7 +632,7 @@ const El = as({}), Ur = () => Ln(El), bl = () => {
|
|
|
627
632
|
},
|
|
628
633
|
enabled: !!t
|
|
629
634
|
});
|
|
630
|
-
},
|
|
635
|
+
}, Fr = ({
|
|
631
636
|
pageType: e,
|
|
632
637
|
lang: t
|
|
633
638
|
}) => {
|
|
@@ -642,7 +647,7 @@ const El = as({}), Ur = () => Ln(El), bl = () => {
|
|
|
642
647
|
enabled: !!e && !!t
|
|
643
648
|
});
|
|
644
649
|
};
|
|
645
|
-
function
|
|
650
|
+
function Tl({
|
|
646
651
|
avatar: e,
|
|
647
652
|
name: t,
|
|
648
653
|
email: n,
|
|
@@ -650,12 +655,12 @@ function Nl({
|
|
|
650
655
|
currentEditor: a
|
|
651
656
|
}) {
|
|
652
657
|
const [i, l] = P(!1);
|
|
653
|
-
return /* @__PURE__ */ r("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ u(
|
|
654
|
-
/* @__PURE__ */ r(
|
|
655
|
-
/* @__PURE__ */ r(
|
|
658
|
+
return /* @__PURE__ */ r("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ u(os, { className: "w-full max-w-md mx-auto", children: [
|
|
659
|
+
/* @__PURE__ */ r(cs, { className: "space-y-1", children: /* @__PURE__ */ u(us, { className: "flex items-center gap-2 text-2xl", children: [
|
|
660
|
+
/* @__PURE__ */ r(Nr, { className: "w-6 h-6 text-yellow-500" }),
|
|
656
661
|
a === "EXPIRED" ? "Editing access timed out" : "Page locked for editing"
|
|
657
662
|
] }) }),
|
|
658
|
-
/* @__PURE__ */ r(
|
|
663
|
+
/* @__PURE__ */ r(ds, { className: "grid gap-4", children: a === "EXPIRED" ? /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r("p", { children: "Your editing access has been paused due to inactivity. Please refresh the page to continue" }) }) : /* @__PURE__ */ u("div", { children: [
|
|
659
664
|
/* @__PURE__ */ u("div", { className: "flex items-center space-x-4", children: [
|
|
660
665
|
e ? /* @__PURE__ */ r(
|
|
661
666
|
"img",
|
|
@@ -664,7 +669,7 @@ function Nl({
|
|
|
664
669
|
alt: t,
|
|
665
670
|
className: "w-12 h-12 border border-gray-300 rounded-full"
|
|
666
671
|
}
|
|
667
|
-
) : /* @__PURE__ */ r(
|
|
672
|
+
) : /* @__PURE__ */ r(Di, { className: "w-12 h-12 p-2 border border-gray-300 rounded-full" }),
|
|
668
673
|
/* @__PURE__ */ u("div", { className: "space-y-1", children: [
|
|
669
674
|
/* @__PURE__ */ r("h3", { className: "font-semibold", children: t }),
|
|
670
675
|
n && /* @__PURE__ */ r("p", { className: "text-sm text-muted-foreground", children: n })
|
|
@@ -672,7 +677,7 @@ function Nl({
|
|
|
672
677
|
] }),
|
|
673
678
|
/* @__PURE__ */ r("div", { className: "text-sm mt-4", children: /* @__PURE__ */ r("p", { children: "This user is currently editing the page. You cannot make changes." }) })
|
|
674
679
|
] }) }),
|
|
675
|
-
/* @__PURE__ */ r(
|
|
680
|
+
/* @__PURE__ */ r(hs, { children: a === "EXPIRED" ? /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
|
|
676
681
|
_,
|
|
677
682
|
{
|
|
678
683
|
className: "w-full",
|
|
@@ -680,17 +685,17 @@ function Nl({
|
|
|
680
685
|
variant: "destructive",
|
|
681
686
|
children: "Refresh"
|
|
682
687
|
}
|
|
683
|
-
) }) : /* @__PURE__ */ u(
|
|
684
|
-
/* @__PURE__ */ r(
|
|
688
|
+
) }) : /* @__PURE__ */ u(ar, { open: i, onOpenChange: l, children: [
|
|
689
|
+
/* @__PURE__ */ r(ir, { asChild: !0, children: /* @__PURE__ */ u("span", { className: "flex flex-col items-center", children: [
|
|
685
690
|
/* @__PURE__ */ r(_, { className: "w-full", variant: "destructive", children: "Take Over" }),
|
|
686
691
|
/* @__PURE__ */ r("p", { className: "mt-2 text-xs text-muted-foreground", children: "If you need to edit, you can take over the lock, but be aware that the other user might lose unsaved changes." })
|
|
687
692
|
] }) }),
|
|
688
|
-
/* @__PURE__ */ u(
|
|
689
|
-
/* @__PURE__ */ u(
|
|
690
|
-
/* @__PURE__ */ r(
|
|
691
|
-
/* @__PURE__ */ u(
|
|
693
|
+
/* @__PURE__ */ u(lr, { className: "z-[99]", children: [
|
|
694
|
+
/* @__PURE__ */ u(or, { children: [
|
|
695
|
+
/* @__PURE__ */ r(cr, { children: "Are you sure you want to take over?" }),
|
|
696
|
+
/* @__PURE__ */ u(ur, { children: [
|
|
692
697
|
/* @__PURE__ */ u("span", { className: "flex items-center space-x-2 text-yellow-500", children: [
|
|
693
|
-
/* @__PURE__ */ r(
|
|
698
|
+
/* @__PURE__ */ r(Gi, { className: "w-5 h-5" }),
|
|
694
699
|
/* @__PURE__ */ r("span", { children: "This action might cause the other user to lose unsaved changes." })
|
|
695
700
|
] }),
|
|
696
701
|
/* @__PURE__ */ r("br", {}),
|
|
@@ -701,9 +706,9 @@ function Nl({
|
|
|
701
706
|
] })
|
|
702
707
|
] })
|
|
703
708
|
] }),
|
|
704
|
-
/* @__PURE__ */ u(
|
|
705
|
-
/* @__PURE__ */ r(
|
|
706
|
-
/* @__PURE__ */ r(
|
|
709
|
+
/* @__PURE__ */ u(dr, { children: [
|
|
710
|
+
/* @__PURE__ */ r(hr, { children: "Cancel" }),
|
|
711
|
+
/* @__PURE__ */ r(mr, { onClick: () => {
|
|
707
712
|
l(!1), s();
|
|
708
713
|
}, children: "Yes, Take Over" })
|
|
709
714
|
] })
|
|
@@ -711,12 +716,12 @@ function Nl({
|
|
|
711
716
|
] }) })
|
|
712
717
|
] }) });
|
|
713
718
|
}
|
|
714
|
-
const
|
|
715
|
-
const { isLocked: e, currentEditor: t } = hn(), { data: n } = dn(t), [s] =
|
|
719
|
+
const Cl = () => {
|
|
720
|
+
const { isLocked: e, currentEditor: t } = hn(), { data: n } = dn(t), [s] = Ue(), a = s.get("page"), { mutate: i } = Ur(), { isFetching: l } = Mr(), o = _e(() => {
|
|
716
721
|
i({ id: a });
|
|
717
722
|
}, [a, i]);
|
|
718
723
|
return !e || l ? /* @__PURE__ */ r("div", { className: "" }) : /* @__PURE__ */ r(
|
|
719
|
-
|
|
724
|
+
Tl,
|
|
720
725
|
{
|
|
721
726
|
...n,
|
|
722
727
|
name: (n == null ? void 0 : n.name) || "Unknown User",
|
|
@@ -725,8 +730,8 @@ const Al = () => {
|
|
|
725
730
|
onTakeOver: o
|
|
726
731
|
}
|
|
727
732
|
);
|
|
728
|
-
},
|
|
729
|
-
const [e, t] =
|
|
733
|
+
}, Pl = () => {
|
|
734
|
+
const [e, t] = Ue(), n = e.get("lang"), s = Br(n), { setSelectedLang: a } = ut(), i = () => {
|
|
730
735
|
const o = new URLSearchParams(window.location.search);
|
|
731
736
|
o.delete("lang");
|
|
732
737
|
const c = o.toString(), h = `${window.location.pathname}${c ? `?${c}` : ""}`;
|
|
@@ -734,21 +739,21 @@ const Al = () => {
|
|
|
734
739
|
};
|
|
735
740
|
if (s) return null;
|
|
736
741
|
const l = te(qe, n);
|
|
737
|
-
return /* @__PURE__ */ r("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ u(
|
|
738
|
-
/* @__PURE__ */ r(
|
|
739
|
-
/* @__PURE__ */ r(
|
|
742
|
+
return /* @__PURE__ */ r("div", { className: "fixed bottom-0 left-0 right-0 z-[20] flex items-center justify-center w-screen top-14 bg-black/30 backdrop-blur-sm", children: /* @__PURE__ */ u(os, { className: "w-full max-w-md mx-auto", children: [
|
|
743
|
+
/* @__PURE__ */ r(cs, { className: "space-y-1", children: /* @__PURE__ */ u(us, { className: "flex items-center gap-2 text-2xl", children: [
|
|
744
|
+
/* @__PURE__ */ r(Nr, { className: "w-6 h-6 text-yellow-500" }),
|
|
740
745
|
'Page missing for "',
|
|
741
746
|
l,
|
|
742
747
|
'" language.'
|
|
743
748
|
] }) }),
|
|
744
|
-
/* @__PURE__ */ r(
|
|
749
|
+
/* @__PURE__ */ r(ds, { className: "grid gap-4", children: /* @__PURE__ */ u("div", { children: [
|
|
745
750
|
'Page is not available in the "',
|
|
746
751
|
l,
|
|
747
752
|
'" language. Either create the page in the "',
|
|
748
753
|
l,
|
|
749
754
|
'" language or switch to the base language.'
|
|
750
755
|
] }) }),
|
|
751
|
-
/* @__PURE__ */ r(
|
|
756
|
+
/* @__PURE__ */ r(hs, { children: /* @__PURE__ */ r(
|
|
752
757
|
_,
|
|
753
758
|
{
|
|
754
759
|
onClick: i,
|
|
@@ -758,7 +763,7 @@ const Al = () => {
|
|
|
758
763
|
}
|
|
759
764
|
) })
|
|
760
765
|
] }) });
|
|
761
|
-
},
|
|
766
|
+
}, _l = (e) => {
|
|
762
767
|
const t = Q(), n = $();
|
|
763
768
|
return Ae({
|
|
764
769
|
mutationFn: async (s) => n(t, {
|
|
@@ -774,7 +779,7 @@ const Al = () => {
|
|
|
774
779
|
});
|
|
775
780
|
}
|
|
776
781
|
});
|
|
777
|
-
},
|
|
782
|
+
}, Il = (e) => {
|
|
778
783
|
const t = Q(), n = $();
|
|
779
784
|
return Ne({
|
|
780
785
|
queryKey: [ke, "uiBlockDetails", e],
|
|
@@ -795,7 +800,7 @@ const Al = () => {
|
|
|
795
800
|
},
|
|
796
801
|
retry: !1
|
|
797
802
|
});
|
|
798
|
-
},
|
|
803
|
+
}, kl = (e) => {
|
|
799
804
|
const t = Q(), n = $();
|
|
800
805
|
return Ae({
|
|
801
806
|
mutationFn: async (s) => n(t, {
|
|
@@ -811,7 +816,7 @@ const Al = () => {
|
|
|
811
816
|
});
|
|
812
817
|
}
|
|
813
818
|
});
|
|
814
|
-
},
|
|
819
|
+
}, Ll = ({
|
|
815
820
|
blockId: e,
|
|
816
821
|
libBlockId: t,
|
|
817
822
|
isOpen: n,
|
|
@@ -819,11 +824,11 @@ const Al = () => {
|
|
|
819
824
|
blockName: a,
|
|
820
825
|
trigger: i
|
|
821
826
|
}) => {
|
|
822
|
-
const [l, o] = P(!1), c =
|
|
827
|
+
const [l, o] = P(!1), c = sr(), h = kl(() => {
|
|
823
828
|
c([e], { _libBlockId: void 0 }), j.success("Block deleted successfully"), o(!1), s();
|
|
824
829
|
});
|
|
825
|
-
return /* @__PURE__ */ u(
|
|
826
|
-
/* @__PURE__ */ r(
|
|
830
|
+
return /* @__PURE__ */ u(fr, { open: n, onOpenChange: (w) => !w && s(), children: [
|
|
831
|
+
/* @__PURE__ */ r(gr, { asChild: !0, children: i || /* @__PURE__ */ u(
|
|
827
832
|
_,
|
|
828
833
|
{
|
|
829
834
|
type: "button",
|
|
@@ -832,13 +837,13 @@ const Al = () => {
|
|
|
832
837
|
onClick: (w) => w.preventDefault(),
|
|
833
838
|
disabled: l,
|
|
834
839
|
children: [
|
|
835
|
-
/* @__PURE__ */ r(
|
|
840
|
+
/* @__PURE__ */ r(Ar, { className: "h-4 w-4 mr-2" }),
|
|
836
841
|
"Delete"
|
|
837
842
|
]
|
|
838
843
|
}
|
|
839
844
|
) }),
|
|
840
845
|
/* @__PURE__ */ r(
|
|
841
|
-
|
|
846
|
+
pr,
|
|
842
847
|
{
|
|
843
848
|
className: "w-72 p-4 z-[9999]",
|
|
844
849
|
sideOffset: 5,
|
|
@@ -885,7 +890,7 @@ const Al = () => {
|
|
|
885
890
|
}
|
|
886
891
|
)
|
|
887
892
|
] });
|
|
888
|
-
},
|
|
893
|
+
}, Dl = ({
|
|
889
894
|
blockId: e,
|
|
890
895
|
libBlockId: t,
|
|
891
896
|
blockName: n,
|
|
@@ -895,7 +900,7 @@ const Al = () => {
|
|
|
895
900
|
}) => {
|
|
896
901
|
const [l, o] = P(!1);
|
|
897
902
|
return /* @__PURE__ */ r(
|
|
898
|
-
|
|
903
|
+
Ll,
|
|
899
904
|
{
|
|
900
905
|
blockId: e,
|
|
901
906
|
libBlockId: t,
|
|
@@ -913,14 +918,14 @@ const Al = () => {
|
|
|
913
918
|
className: a,
|
|
914
919
|
onClick: () => o(!0),
|
|
915
920
|
children: [
|
|
916
|
-
/* @__PURE__ */ r(
|
|
921
|
+
/* @__PURE__ */ r(Ar, { className: "h-4 w-4 mr-2" }),
|
|
917
922
|
"Delete"
|
|
918
923
|
]
|
|
919
924
|
}
|
|
920
925
|
)
|
|
921
926
|
}
|
|
922
927
|
);
|
|
923
|
-
},
|
|
928
|
+
}, Gl = () => {
|
|
924
929
|
const e = Q(), t = $(), n = Se(), {
|
|
925
930
|
data: s = [],
|
|
926
931
|
isLoading: a,
|
|
@@ -962,8 +967,8 @@ const Al = () => {
|
|
|
962
967
|
createGroup: l,
|
|
963
968
|
isCreating: o
|
|
964
969
|
};
|
|
965
|
-
},
|
|
966
|
-
const [n, s] = P(!1), [a, i] = P(""), l = ct(null), { groups: o } =
|
|
970
|
+
}, Ul = ({ value: e, onChange: t }) => {
|
|
971
|
+
const [n, s] = P(!1), [a, i] = P(""), l = ct(null), { groups: o } = Gl(), [c, h] = P([
|
|
967
972
|
{ id: "hero", name: "Hero" },
|
|
968
973
|
{ id: "feature", name: "Feature" },
|
|
969
974
|
{ id: "footer", name: "Footer" },
|
|
@@ -991,7 +996,7 @@ const Al = () => {
|
|
|
991
996
|
{ id: "stats", name: "Stats" },
|
|
992
997
|
{ id: "team", name: "Team" },
|
|
993
998
|
{ id: "timeline", name: "Timeline" }
|
|
994
|
-
]), g =
|
|
999
|
+
]), g = W(
|
|
995
1000
|
() => [
|
|
996
1001
|
...o,
|
|
997
1002
|
...c.filter(
|
|
@@ -1061,17 +1066,17 @@ const Al = () => {
|
|
|
1061
1066
|
size: "icon",
|
|
1062
1067
|
variant: "outline",
|
|
1063
1068
|
onClick: () => s(!0),
|
|
1064
|
-
children: /* @__PURE__ */ r(
|
|
1069
|
+
children: /* @__PURE__ */ r(ps, { className: "h-4 w-4" })
|
|
1065
1070
|
}
|
|
1066
1071
|
)
|
|
1067
1072
|
] });
|
|
1068
|
-
},
|
|
1073
|
+
}, Rl = 1 * 1024 * 1024, Ol = ({ value: e, onChange: t }) => {
|
|
1069
1074
|
const [n, s] = P(!1), a = ct(null), i = _e(
|
|
1070
1075
|
(c) => {
|
|
1071
1076
|
var g;
|
|
1072
1077
|
const h = (g = c.target.files) == null ? void 0 : g[0];
|
|
1073
1078
|
if (h) {
|
|
1074
|
-
if (h.size >
|
|
1079
|
+
if (h.size > Rl) {
|
|
1075
1080
|
j.error("File too large", {
|
|
1076
1081
|
description: `Maximum file size is 1mb. Selected file is ${(h.size / 1024 / 1024).toFixed(2)}MB.`
|
|
1077
1082
|
}), a.current && (a.current.value = "");
|
|
@@ -1119,7 +1124,7 @@ const Al = () => {
|
|
|
1119
1124
|
/* @__PURE__ */ r("div", { className: "animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full" }),
|
|
1120
1125
|
"Uploading..."
|
|
1121
1126
|
] }) : /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
|
|
1122
|
-
/* @__PURE__ */ r(
|
|
1127
|
+
/* @__PURE__ */ r(xr, { className: "h-4 w-4" }),
|
|
1123
1128
|
"Select image"
|
|
1124
1129
|
] })
|
|
1125
1130
|
}
|
|
@@ -1133,7 +1138,7 @@ const Al = () => {
|
|
|
1133
1138
|
onClick: () => {
|
|
1134
1139
|
t(""), a.current && (a.current.value = "");
|
|
1135
1140
|
},
|
|
1136
|
-
children: /* @__PURE__ */ r(
|
|
1141
|
+
children: /* @__PURE__ */ r(Tr, { className: "h-4 w-4" })
|
|
1137
1142
|
}
|
|
1138
1143
|
)
|
|
1139
1144
|
] }),
|
|
@@ -1147,7 +1152,7 @@ const Al = () => {
|
|
|
1147
1152
|
) })
|
|
1148
1153
|
] });
|
|
1149
1154
|
}, ue = {
|
|
1150
|
-
...
|
|
1155
|
+
...Ja,
|
|
1151
1156
|
//pages
|
|
1152
1157
|
ADD_PAGE: "add_page",
|
|
1153
1158
|
EDIT_PAGE: "edit_page",
|
|
@@ -1182,25 +1187,25 @@ const Al = () => {
|
|
|
1182
1187
|
ADD_MEDIA: "add_media",
|
|
1183
1188
|
EDIT_MEDIA: "edit_media",
|
|
1184
1189
|
DELETE_MEDIA: "delete_media"
|
|
1185
|
-
},
|
|
1186
|
-
const { blocks: t, close: n, blockId: s } = e, { getPartailBlocks: a } =
|
|
1190
|
+
}, Bl = (e) => {
|
|
1191
|
+
const { blocks: t, close: n, blockId: s } = e, { getPartailBlocks: a } = ei(), i = t.find((N) => N._id === s), l = i == null ? void 0 : i._libBlockId, o = !!l, c = W(() => t.some(
|
|
1187
1192
|
(N) => N._type === "PartialBlock" || N._type === "GlobalBlock"
|
|
1188
|
-
), [t]), h =
|
|
1193
|
+
), [t]), h = W(() => {
|
|
1189
1194
|
let N = [];
|
|
1190
1195
|
for (const C of t)
|
|
1191
1196
|
if (C._type === "PartialBlock" || C._type === "GlobalBlock") {
|
|
1192
1197
|
const D = a(C.partialBlockId);
|
|
1193
|
-
|
|
1198
|
+
Ma(D, "0._parent", C._parent), N = [...N, ...D];
|
|
1194
1199
|
} else
|
|
1195
1200
|
N.push(C);
|
|
1196
1201
|
return N;
|
|
1197
|
-
}, [t, a]), [g, d] = P(""), [w, y] = P(""), [p, S] = P(""), [v, x] = P(""), [G, E] = P({}), [b, T] = P(!1), [
|
|
1202
|
+
}, [t, a]), [g, d] = P(""), [w, y] = P(""), [p, S] = P(""), [v, x] = P(""), [G, E] = P({}), [b, T] = P(!1), [U, J] = P(o), [ie, k] = P(!1), { hasPermission: q } = sn(), A = q(ue.DELETE_LIBRARY_BLOCK), M = sr(), ne = () => {
|
|
1198
1203
|
M([s], { _libBlockId: void 0 }), j.success("Block delinked from library"), n();
|
|
1199
1204
|
}, {
|
|
1200
1205
|
data: he,
|
|
1201
1206
|
isLoading: z,
|
|
1202
1207
|
isError: de
|
|
1203
|
-
} =
|
|
1208
|
+
} = Il(l);
|
|
1204
1209
|
we(() => {
|
|
1205
1210
|
de && o && (k(!0), J(!1));
|
|
1206
1211
|
}, [de, o]), we(() => {
|
|
@@ -1212,7 +1217,7 @@ const Al = () => {
|
|
|
1212
1217
|
const F = () => {
|
|
1213
1218
|
const N = {};
|
|
1214
1219
|
return g.trim() ? g.length < 2 && (N.name = "Name must be at least 2 characters") : N.name = "Name is required", w || (N.group = "Group is required"), E(N), Object.keys(N).length === 0 && !c;
|
|
1215
|
-
}, { resetLibrary: Ee } =
|
|
1220
|
+
}, { resetLibrary: Ee } = ti({ id: "" }), Qe = _l(
|
|
1216
1221
|
(N) => {
|
|
1217
1222
|
o || M([s], { _libBlockId: N.id }), j.success(`Block ${o ? "updated" : "saved"} successfully`), Ee(N.library), n();
|
|
1218
1223
|
}
|
|
@@ -1230,7 +1235,7 @@ const Al = () => {
|
|
|
1230
1235
|
...o ? { id: l } : {}
|
|
1231
1236
|
});
|
|
1232
1237
|
}, m = Qe.isPending;
|
|
1233
|
-
return
|
|
1238
|
+
return U || z ? /* @__PURE__ */ r("div", { className: "flex items-center justify-center p-8", children: /* @__PURE__ */ r("div", { className: "h-8 w-8 animate-spin rounded-full border-4 border-primary border-t-transparent" }) }) : ie ? /* @__PURE__ */ u("div", { className: "p-6 space-y-4", children: [
|
|
1234
1239
|
/* @__PURE__ */ r("div", { className: "text-destructive font-medium", children: "Block Not Found" }),
|
|
1235
1240
|
/* @__PURE__ */ r("p", { className: "text-sm text-muted-foreground", children: "This block could not be found on the server. It may have been deleted." }),
|
|
1236
1241
|
/* @__PURE__ */ u("div", { className: "flex justify-end gap-2 pt-4", children: [
|
|
@@ -1239,7 +1244,7 @@ const Al = () => {
|
|
|
1239
1244
|
] })
|
|
1240
1245
|
] }) : /* @__PURE__ */ u("div", { children: [
|
|
1241
1246
|
c && /* @__PURE__ */ u("div", { className: "mb-4 p-3 border border-destructive/50 bg-destructive/10 text-destructive rounded-md flex items-start gap-2", children: [
|
|
1242
|
-
/* @__PURE__ */ r(
|
|
1247
|
+
/* @__PURE__ */ r(Cr, { className: "h-5 w-5 flex-shrink-0 mt-0.5" }),
|
|
1243
1248
|
/* @__PURE__ */ u("div", { children: [
|
|
1244
1249
|
/* @__PURE__ */ r("p", { className: "font-medium", children: "Partial Blocks Detected" }),
|
|
1245
1250
|
/* @__PURE__ */ r("p", { className: "text-xs mt-1", children: "This block contains one or more Partial Blocks. Partial blocks will be merged into the library block" })
|
|
@@ -1276,7 +1281,7 @@ const Al = () => {
|
|
|
1276
1281
|
children: "Group"
|
|
1277
1282
|
}
|
|
1278
1283
|
),
|
|
1279
|
-
/* @__PURE__ */ r(
|
|
1284
|
+
/* @__PURE__ */ r(Ul, { value: w, onChange: y }),
|
|
1280
1285
|
G.group && /* @__PURE__ */ r("p", { className: "text-xs text-destructive", children: G.group })
|
|
1281
1286
|
] }),
|
|
1282
1287
|
/* @__PURE__ */ u("div", { className: "space-y-2", children: [
|
|
@@ -1294,12 +1299,12 @@ const Al = () => {
|
|
|
1294
1299
|
] }),
|
|
1295
1300
|
/* @__PURE__ */ u("div", { className: "space-y-2", children: [
|
|
1296
1301
|
/* @__PURE__ */ r(X, { htmlFor: "previewImage", children: "Preview Image (optional)" }),
|
|
1297
|
-
/* @__PURE__ */ r(
|
|
1302
|
+
/* @__PURE__ */ r(Ol, { value: v, onChange: x }),
|
|
1298
1303
|
/* @__PURE__ */ r("p", { className: "text-xs text-muted-foreground", children: "max 1mb" })
|
|
1299
1304
|
] }),
|
|
1300
1305
|
/* @__PURE__ */ u("div", { className: "flex justify-end gap-2 pt-2", children: [
|
|
1301
1306
|
o && A && /* @__PURE__ */ r(
|
|
1302
|
-
|
|
1307
|
+
Dl,
|
|
1303
1308
|
{
|
|
1304
1309
|
blockId: s,
|
|
1305
1310
|
libBlockId: l,
|
|
@@ -1371,7 +1376,7 @@ const Al = () => {
|
|
|
1371
1376
|
GLOBAL_BLOCK_PUBLISH_SUCCESS: "Global block published successfully.",
|
|
1372
1377
|
PAGES_PUBLISH_SUCCESS: "Your changes have been published successfully.",
|
|
1373
1378
|
SLUG_CHANGE_SUCCESS: "Slug changed successfully."
|
|
1374
|
-
},
|
|
1379
|
+
}, Ml = {
|
|
1375
1380
|
SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
|
|
1376
1381
|
}, Ie = () => {
|
|
1377
1382
|
const e = Q(), t = $();
|
|
@@ -1380,13 +1385,13 @@ const Al = () => {
|
|
|
1380
1385
|
initialData: [],
|
|
1381
1386
|
queryFn: async () => t(e, { action: I.GET_PAGE_TYPES })
|
|
1382
1387
|
});
|
|
1383
|
-
},
|
|
1388
|
+
}, Fl = (e) => {
|
|
1384
1389
|
const { data: t } = Ie();
|
|
1385
|
-
return
|
|
1390
|
+
return W(
|
|
1386
1391
|
() => t == null ? void 0 : t.find((n) => n.key === e),
|
|
1387
1392
|
[t, e]
|
|
1388
1393
|
);
|
|
1389
|
-
},
|
|
1394
|
+
}, ql = () => {
|
|
1390
1395
|
const e = Q(), t = $();
|
|
1391
1396
|
return Ae({
|
|
1392
1397
|
mutationFn: async ({ pageType: n, query: s }) => {
|
|
@@ -1403,7 +1408,7 @@ const Al = () => {
|
|
|
1403
1408
|
}
|
|
1404
1409
|
}
|
|
1405
1410
|
});
|
|
1406
|
-
},
|
|
1411
|
+
}, qr = () => {
|
|
1407
1412
|
const e = Q(), t = Se(), n = $(), { data: s } = Ie();
|
|
1408
1413
|
return Ae({
|
|
1409
1414
|
mutationFn: async (a) => (a.template && console.log("Creating page from template:", a.template), n(e, { action: I.CREATE_PAGE, data: a })),
|
|
@@ -1422,12 +1427,12 @@ const Al = () => {
|
|
|
1422
1427
|
j.error(
|
|
1423
1428
|
`Failed to add new ${l != null && l.hasSlug ? "page" : l.name}.`,
|
|
1424
1429
|
{
|
|
1425
|
-
description: te(
|
|
1430
|
+
description: te(Ml, a.message, a.message)
|
|
1426
1431
|
}
|
|
1427
1432
|
);
|
|
1428
1433
|
}
|
|
1429
1434
|
});
|
|
1430
|
-
},
|
|
1435
|
+
}, Ss = () => {
|
|
1431
1436
|
const e = Q(), t = Se(), n = $(), { data: s } = Ie();
|
|
1432
1437
|
return Ae({
|
|
1433
1438
|
mutationFn: async (a) => await n(e, {
|
|
@@ -1451,7 +1456,7 @@ const Al = () => {
|
|
|
1451
1456
|
);
|
|
1452
1457
|
}
|
|
1453
1458
|
});
|
|
1454
|
-
},
|
|
1459
|
+
}, Hl = () => {
|
|
1455
1460
|
const e = Q(), t = Se(), n = $(), { data: s } = Ie();
|
|
1456
1461
|
return Ae({
|
|
1457
1462
|
mutationFn: async (a) => n(e, {
|
|
@@ -1481,7 +1486,7 @@ const Al = () => {
|
|
|
1481
1486
|
);
|
|
1482
1487
|
}
|
|
1483
1488
|
});
|
|
1484
|
-
},
|
|
1489
|
+
}, Kl = () => {
|
|
1485
1490
|
const e = Q(), t = Se(), n = $(), { data: s } = Ie();
|
|
1486
1491
|
return Ae({
|
|
1487
1492
|
mutationFn: async (a) => n(e, {
|
|
@@ -1509,8 +1514,8 @@ const Al = () => {
|
|
|
1509
1514
|
);
|
|
1510
1515
|
}
|
|
1511
1516
|
});
|
|
1512
|
-
},
|
|
1513
|
-
const e = Q(), t = $(), n = Se(), { data: s } =
|
|
1517
|
+
}, Ns = () => {
|
|
1518
|
+
const e = Q(), t = $(), n = Se(), { data: s } = Re();
|
|
1514
1519
|
return Ae({
|
|
1515
1520
|
mutationFn: async ({ ids: a }) => t(e, {
|
|
1516
1521
|
action: I.PUBLISH_CHANGES,
|
|
@@ -1525,7 +1530,7 @@ const Al = () => {
|
|
|
1525
1530
|
j.error("Failed to publish pages.");
|
|
1526
1531
|
}
|
|
1527
1532
|
});
|
|
1528
|
-
},
|
|
1533
|
+
}, Vl = () => {
|
|
1529
1534
|
const e = Q(), t = $(), n = Se();
|
|
1530
1535
|
return Ae({
|
|
1531
1536
|
mutationFn: async (s) => {
|
|
@@ -1548,7 +1553,7 @@ const Al = () => {
|
|
|
1548
1553
|
j.error("Failed to mark page as template.");
|
|
1549
1554
|
}
|
|
1550
1555
|
});
|
|
1551
|
-
},
|
|
1556
|
+
}, jl = () => {
|
|
1552
1557
|
const e = Q(), t = $(), n = Se();
|
|
1553
1558
|
return Ae({
|
|
1554
1559
|
mutationFn: async (s) => t(e, {
|
|
@@ -1562,7 +1567,7 @@ const Al = () => {
|
|
|
1562
1567
|
j.error("Failed to unmark page as template.");
|
|
1563
1568
|
}
|
|
1564
1569
|
});
|
|
1565
|
-
},
|
|
1570
|
+
}, $l = () => {
|
|
1566
1571
|
const e = Q(), t = $(), n = Se();
|
|
1567
1572
|
return Ae({
|
|
1568
1573
|
mutationFn: async ({ id: s, slug: a }) => t(e, {
|
|
@@ -1581,7 +1586,7 @@ const Al = () => {
|
|
|
1581
1586
|
}
|
|
1582
1587
|
});
|
|
1583
1588
|
};
|
|
1584
|
-
var
|
|
1589
|
+
var As = {};
|
|
1585
1590
|
(function e(t, n, s, a) {
|
|
1586
1591
|
var i = !!(t.Worker && t.Blob && t.Promise && t.OffscreenCanvas && t.OffscreenCanvasRenderingContext2D && t.HTMLCanvasElement && t.HTMLCanvasElement.prototype.transferControlToOffscreen && t.URL && t.URL.createObjectURL), l = typeof Path2D == "function" && typeof DOMMatrix == "function", o = function() {
|
|
1587
1592
|
if (!t.OffscreenCanvas)
|
|
@@ -1749,7 +1754,7 @@ var Ss = {};
|
|
|
1749
1754
|
b: E(m.substring(4, 6))
|
|
1750
1755
|
};
|
|
1751
1756
|
}
|
|
1752
|
-
function
|
|
1757
|
+
function U(f) {
|
|
1753
1758
|
var m = v(f, "origin", Object);
|
|
1754
1759
|
return m.x = v(m, "x", Number), m.y = v(m, "y", Number), m;
|
|
1755
1760
|
}
|
|
@@ -1827,8 +1832,8 @@ var Ss = {};
|
|
|
1827
1832
|
} else if (m.shape === "circle")
|
|
1828
1833
|
f.ellipse ? f.ellipse(m.x, m.y, Math.abs(H - C) * m.ovalScalar, Math.abs(K - D) * m.ovalScalar, Math.PI / 10 * m.wobble, 0, 2 * Math.PI) : q(f, m.x, m.y, Math.abs(H - C) * m.ovalScalar, Math.abs(K - D) * m.ovalScalar, Math.PI / 10 * m.wobble, 0, 2 * Math.PI);
|
|
1829
1834
|
else if (m.shape === "star")
|
|
1830
|
-
for (var
|
|
1831
|
-
Me = m.x + Math.cos(
|
|
1835
|
+
for (var Y = Math.PI / 2 * 3, Le = 4 * m.scalar, Be = 8 * m.scalar, Me = m.x, Xe = m.y, rt = 5, $e = Math.PI / rt; rt--; )
|
|
1836
|
+
Me = m.x + Math.cos(Y) * Be, Xe = m.y + Math.sin(Y) * Be, f.lineTo(Me, Xe), Y += $e, Me = m.x + Math.cos(Y) * Le, Xe = m.y + Math.sin(Y) * Le, f.lineTo(Me, Xe), Y += $e;
|
|
1832
1837
|
else
|
|
1833
1838
|
f.moveTo(Math.floor(m.x), Math.floor(m.y)), f.lineTo(Math.floor(m.wobbleX), Math.floor(D)), f.lineTo(Math.floor(H), Math.floor(K)), f.lineTo(Math.floor(C), Math.floor(m.wobbleY));
|
|
1834
1839
|
return f.closePath(), f.fill(), m.tick < m.totalTicks;
|
|
@@ -1858,29 +1863,29 @@ var Ss = {};
|
|
|
1858
1863
|
}
|
|
1859
1864
|
function he(f, m) {
|
|
1860
1865
|
var N = !f, C = !!v(m || {}, "resize"), D = !1, H = v(m, "disableForReducedMotion", Boolean), K = i && !!v(m || {}, "useWorker"), L = K ? w() : null, V = N ? J : ie, le = f && L ? !!f.__confetti_initialized : !1, ge = typeof matchMedia == "function" && matchMedia("(prefers-reduced-motion)").matches, oe;
|
|
1861
|
-
function pe(
|
|
1862
|
-
for (var Me = v(
|
|
1863
|
-
|
|
1866
|
+
function pe(Y, Le, Be) {
|
|
1867
|
+
for (var Me = v(Y, "particleCount", x), Xe = v(Y, "angle", Number), rt = v(Y, "spread", Number), $e = v(Y, "startVelocity", Number), Pa = v(Y, "decay", Number), _a = v(Y, "gravity", Number), Ia = v(Y, "drift", Number), Cs = v(Y, "colors", b), ka = v(Y, "ticks", Number), Ps = v(Y, "shapes"), La = v(Y, "scalar"), Da = !!v(Y, "flat"), _s = U(Y), Is = Me, Fn = [], Ga = f.width * _s.x, Ua = f.height * _s.y; Is--; )
|
|
1868
|
+
Fn.push(
|
|
1864
1869
|
A({
|
|
1865
|
-
x:
|
|
1866
|
-
y:
|
|
1870
|
+
x: Ga,
|
|
1871
|
+
y: Ua,
|
|
1867
1872
|
angle: Xe,
|
|
1868
1873
|
spread: rt,
|
|
1869
1874
|
startVelocity: $e,
|
|
1870
|
-
color:
|
|
1871
|
-
shape:
|
|
1872
|
-
ticks:
|
|
1873
|
-
decay:
|
|
1874
|
-
gravity:
|
|
1875
|
-
drift:
|
|
1876
|
-
scalar:
|
|
1877
|
-
flat:
|
|
1875
|
+
color: Cs[Is % Cs.length],
|
|
1876
|
+
shape: Ps[G(0, Ps.length)],
|
|
1877
|
+
ticks: ka,
|
|
1878
|
+
decay: Pa,
|
|
1879
|
+
gravity: _a,
|
|
1880
|
+
drift: Ia,
|
|
1881
|
+
scalar: La,
|
|
1882
|
+
flat: Da
|
|
1878
1883
|
})
|
|
1879
1884
|
);
|
|
1880
|
-
return oe ? oe.addFettis(
|
|
1885
|
+
return oe ? oe.addFettis(Fn) : (oe = ne(f, Fn, V, Le, Be), oe.promise);
|
|
1881
1886
|
}
|
|
1882
|
-
function xe(
|
|
1883
|
-
var Le = H || v(
|
|
1887
|
+
function xe(Y) {
|
|
1888
|
+
var Le = H || v(Y, "disableForReducedMotion", Boolean), Be = v(Y, "zIndex", Number);
|
|
1884
1889
|
if (Le && ge)
|
|
1885
1890
|
return h(function($e) {
|
|
1886
1891
|
$e();
|
|
@@ -1912,7 +1917,7 @@ var Ss = {};
|
|
|
1912
1917
|
function rt() {
|
|
1913
1918
|
oe = null, C && (D = !1, t.removeEventListener("resize", Xe)), N && f && (document.body.contains(f) && document.body.removeChild(f), f = null, le = !1);
|
|
1914
1919
|
}
|
|
1915
|
-
return C && !D && (D = !0, t.addEventListener("resize", Xe, !1)), L ? L.fire(
|
|
1920
|
+
return C && !D && (D = !0, t.addEventListener("resize", Xe, !1)), L ? L.fire(Y, Me, rt) : pe(Y, Me, rt);
|
|
1916
1921
|
}
|
|
1917
1922
|
return xe.reset = function() {
|
|
1918
1923
|
L && L.reset(), oe && oe.reset();
|
|
@@ -1943,8 +1948,8 @@ var Ss = {};
|
|
|
1943
1948
|
var C = new Path2D(m), D = document.createElement("canvas"), H = D.getContext("2d");
|
|
1944
1949
|
if (!N) {
|
|
1945
1950
|
for (var K = 1e3, L = K, V = K, le = 0, ge = 0, oe, pe, xe = 0; xe < K; xe += 2)
|
|
1946
|
-
for (var
|
|
1947
|
-
H.isPointInPath(C, xe,
|
|
1951
|
+
for (var Y = 0; Y < K; Y += 2)
|
|
1952
|
+
H.isPointInPath(C, xe, Y, "nonzero") && (L = Math.min(L, xe), V = Math.min(V, Y), le = Math.max(le, xe), ge = Math.max(ge, Y));
|
|
1948
1953
|
oe = le - L, pe = ge - V;
|
|
1949
1954
|
var Le = 10, Be = Math.min(Le / oe, Le / pe);
|
|
1950
1955
|
N = [
|
|
@@ -1967,8 +1972,8 @@ var Ss = {};
|
|
|
1967
1972
|
typeof f == "string" ? m = f : (m = f.text, N = "scalar" in f ? f.scalar : N, D = "fontFamily" in f ? f.fontFamily : D, C = "color" in f ? f.color : C);
|
|
1968
1973
|
var H = 10 * N, K = "" + H + "px " + D, L = new OffscreenCanvas(H, H), V = L.getContext("2d");
|
|
1969
1974
|
V.font = K;
|
|
1970
|
-
var le = V.measureText(m), ge = Math.ceil(le.actualBoundingBoxRight + le.actualBoundingBoxLeft), oe = Math.ceil(le.actualBoundingBoxAscent + le.actualBoundingBoxDescent), pe = 2, xe = le.actualBoundingBoxLeft + pe,
|
|
1971
|
-
ge += pe + pe, oe += pe + pe, L = new OffscreenCanvas(ge, oe), V = L.getContext("2d"), V.font = K, V.fillStyle = C, V.fillText(m, xe,
|
|
1975
|
+
var le = V.measureText(m), ge = Math.ceil(le.actualBoundingBoxRight + le.actualBoundingBoxLeft), oe = Math.ceil(le.actualBoundingBoxAscent + le.actualBoundingBoxDescent), pe = 2, xe = le.actualBoundingBoxLeft + pe, Y = le.actualBoundingBoxAscent + pe;
|
|
1976
|
+
ge += pe + pe, oe += pe + pe, L = new OffscreenCanvas(ge, oe), V = L.getContext("2d"), V.font = K, V.fillStyle = C, V.fillText(m, xe, Y);
|
|
1972
1977
|
var Le = 1 / N;
|
|
1973
1978
|
return {
|
|
1974
1979
|
type: "bitmap",
|
|
@@ -1984,15 +1989,15 @@ var Ss = {};
|
|
|
1984
1989
|
}, n.exports.create = he, n.exports.shapeFromPath = Ee, n.exports.shapeFromText = Qe;
|
|
1985
1990
|
})(/* @__PURE__ */ function() {
|
|
1986
1991
|
return typeof window < "u" ? window : typeof self < "u" ? self : this || {};
|
|
1987
|
-
}(),
|
|
1988
|
-
const
|
|
1989
|
-
|
|
1990
|
-
const
|
|
1992
|
+
}(), As, !1);
|
|
1993
|
+
const zl = As.exports;
|
|
1994
|
+
As.exports.create;
|
|
1995
|
+
const Wl = {
|
|
1991
1996
|
particleCount: 350,
|
|
1992
1997
|
spread: 120,
|
|
1993
1998
|
origin: { y: 0.6 },
|
|
1994
1999
|
angle: 90
|
|
1995
|
-
},
|
|
2000
|
+
}, Yl = {
|
|
1996
2001
|
TOP_RIGHT: {
|
|
1997
2002
|
angle: 225,
|
|
1998
2003
|
origin: { x: 0.9, y: 0 }
|
|
@@ -2001,13 +2006,13 @@ const jl = {
|
|
|
2001
2006
|
angle: 100,
|
|
2002
2007
|
origin: { x: 0.9, y: 0.9 }
|
|
2003
2008
|
}
|
|
2004
|
-
},
|
|
2005
|
-
let t =
|
|
2009
|
+
}, Tn = (e) => {
|
|
2010
|
+
let t = Yl[e];
|
|
2006
2011
|
t || (t = {});
|
|
2007
|
-
const n = { ...
|
|
2008
|
-
|
|
2009
|
-
},
|
|
2010
|
-
const [e] =
|
|
2012
|
+
const n = { ...Wl, ...t };
|
|
2013
|
+
zl(n);
|
|
2014
|
+
}, Ql = () => {
|
|
2015
|
+
const [e] = ni(), { mutate: t, isPending: n } = Ns(), { mutateAsync: s, isPending: a } = Rr();
|
|
2011
2016
|
return /* @__PURE__ */ u("div", { className: "bg-white py-3 flex items-center justify-center gap-x-3 border-t", children: [
|
|
2012
2017
|
/* @__PURE__ */ r(
|
|
2013
2018
|
_,
|
|
@@ -2031,7 +2036,7 @@ const jl = {
|
|
|
2031
2036
|
{ ids: ["THEME"] },
|
|
2032
2037
|
{
|
|
2033
2038
|
onSuccess: () => {
|
|
2034
|
-
|
|
2039
|
+
Tn("BOTTOM_RIGHT");
|
|
2035
2040
|
}
|
|
2036
2041
|
}
|
|
2037
2042
|
);
|
|
@@ -2040,12 +2045,12 @@ const jl = {
|
|
|
2040
2045
|
}
|
|
2041
2046
|
)
|
|
2042
2047
|
] });
|
|
2043
|
-
},
|
|
2048
|
+
}, Xl = ({
|
|
2044
2049
|
page: e,
|
|
2045
2050
|
onClose: t
|
|
2046
2051
|
}) => {
|
|
2047
|
-
const [n, s] = P(e.slug || ""), { mutate: a, isPending: i } =
|
|
2048
|
-
if (g.preventDefault(), !(e != null && e.primaryPage) && Object.keys(qe).some((y) => n === `/${y}` ||
|
|
2052
|
+
const [n, s] = P(e.slug || ""), { mutate: a, isPending: i } = $l(), { data: l } = Ie(), o = fe(l, { key: e == null ? void 0 : e.pageType }), c = (g) => {
|
|
2053
|
+
if (g.preventDefault(), !(e != null && e.primaryPage) && Object.keys(qe).some((y) => n === `/${y}` || Rt(n, `/${y}/`))) {
|
|
2049
2054
|
j.error("Error", {
|
|
2050
2055
|
description: "Slugs cannot start with a language code for primary page"
|
|
2051
2056
|
});
|
|
@@ -2056,8 +2061,8 @@ const jl = {
|
|
|
2056
2061
|
return /* @__PURE__ */ r(He, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { children: [
|
|
2057
2062
|
/* @__PURE__ */ u(Ve, { children: [
|
|
2058
2063
|
/* @__PURE__ */ r(je, { children: "Change Slug" }),
|
|
2059
|
-
/* @__PURE__ */ r(Ye, { className: "text-xs", children: /* @__PURE__ */ u(
|
|
2060
|
-
/* @__PURE__ */ r(
|
|
2064
|
+
/* @__PURE__ */ r(Ye, { className: "text-xs", children: /* @__PURE__ */ u(yr, { variant: "destructive", className: "mt-2", children: [
|
|
2065
|
+
/* @__PURE__ */ r(Cr, { className: "h-4 w-4" }),
|
|
2061
2066
|
"Changing the slug may have impact on your SEO. Please proceed with caution."
|
|
2062
2067
|
] }) })
|
|
2063
2068
|
] }),
|
|
@@ -2095,7 +2100,7 @@ const jl = {
|
|
|
2095
2100
|
value: n,
|
|
2096
2101
|
onChange: (g) => {
|
|
2097
2102
|
const d = g.target.value;
|
|
2098
|
-
|
|
2103
|
+
Rt(d, `/${h}`) && s(d);
|
|
2099
2104
|
},
|
|
2100
2105
|
className: "col-span-3",
|
|
2101
2106
|
required: !0,
|
|
@@ -2110,18 +2115,18 @@ const jl = {
|
|
|
2110
2115
|
_,
|
|
2111
2116
|
{
|
|
2112
2117
|
type: "submit",
|
|
2113
|
-
disabled: i || !
|
|
2118
|
+
disabled: i || !Rt(n, `/${h}`) || is(e == null ? void 0 : e.slug, n),
|
|
2114
2119
|
children: i ? "Changing..." : "Change Slug"
|
|
2115
2120
|
}
|
|
2116
2121
|
) })
|
|
2117
2122
|
] })
|
|
2118
2123
|
] }) });
|
|
2119
2124
|
};
|
|
2120
|
-
function
|
|
2125
|
+
function Hr({
|
|
2121
2126
|
page: e,
|
|
2122
2127
|
onClose: t
|
|
2123
2128
|
}) {
|
|
2124
|
-
const [, n] =
|
|
2129
|
+
const [, n] = Ue(), { mutate: s, isPending: a } = Hl(), { data: i } = Ie(), l = () => {
|
|
2125
2130
|
s(e, {
|
|
2126
2131
|
onSuccess: () => {
|
|
2127
2132
|
e != null && e.primaryPage || (window.history.replaceState(null, "", "/"), n(new URLSearchParams({})), window.dispatchEvent(new PopStateEvent("popstate"))), t();
|
|
@@ -2169,11 +2174,11 @@ const Oe = ({
|
|
|
2169
2174
|
}) => {
|
|
2170
2175
|
const { hasPermission: a } = sn();
|
|
2171
2176
|
return e && !a(e) || t && !t.some((i) => a(i)) ? s : n;
|
|
2172
|
-
},
|
|
2177
|
+
}, xs = ({
|
|
2173
2178
|
page: e,
|
|
2174
2179
|
onClose: t
|
|
2175
2180
|
}) => {
|
|
2176
|
-
const { mutate: n, isPending: s } =
|
|
2181
|
+
const { mutate: n, isPending: s } = Kl(), a = async () => {
|
|
2177
2182
|
n(e, { onSuccess: t });
|
|
2178
2183
|
};
|
|
2179
2184
|
return /* @__PURE__ */ r(He, { open: !!e, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { children: [
|
|
@@ -2199,12 +2204,12 @@ const Oe = ({
|
|
|
2199
2204
|
)
|
|
2200
2205
|
] })
|
|
2201
2206
|
] }) });
|
|
2202
|
-
},
|
|
2207
|
+
}, Kr = ({
|
|
2203
2208
|
langProps: e,
|
|
2204
2209
|
onClose: t,
|
|
2205
2210
|
languages: n
|
|
2206
2211
|
}) => {
|
|
2207
|
-
const { data: s } =
|
|
2212
|
+
const { data: s } = Re(), { data: a } = Ie(), [i, l] = P(e.name || ""), [o, c] = P(e.edit ? e.lang : ""), [h, g] = P(e.edit ? e.slug : ""), { mutate: d, isPending: w } = qr(), { mutate: y, isPending: p } = Ss(), S = W(
|
|
2208
2213
|
() => a == null ? void 0 : a.find(
|
|
2209
2214
|
(E) => E.key === e.pageType
|
|
2210
2215
|
),
|
|
@@ -2273,7 +2278,7 @@ const Oe = ({
|
|
|
2273
2278
|
value: h,
|
|
2274
2279
|
onChange: (E) => {
|
|
2275
2280
|
const b = E.target.value;
|
|
2276
|
-
|
|
2281
|
+
Rt(b, `/${o}`) && g(Dt(Fa(b)));
|
|
2277
2282
|
},
|
|
2278
2283
|
className: "col-span-3",
|
|
2279
2284
|
required: !0,
|
|
@@ -2289,14 +2294,14 @@ const Oe = ({
|
|
|
2289
2294
|
_,
|
|
2290
2295
|
{
|
|
2291
2296
|
type: "submit",
|
|
2292
|
-
disabled: x || !i || !o || !v && !
|
|
2297
|
+
disabled: x || !i || !o || !v && !Rt(h, `/${o}`),
|
|
2293
2298
|
children: x ? e.edit ? B.UPDATING : B.ADDING : e.edit ? B.UPDATE : B.ADD_NEW_LANGUAGE
|
|
2294
2299
|
}
|
|
2295
2300
|
) })
|
|
2296
2301
|
] })
|
|
2297
2302
|
] }) });
|
|
2298
|
-
},
|
|
2299
|
-
const [e, t] = P(null), { selectedLang: n, fallbackLang: s, setSelectedLang: a } = ut(), { data: i, isFetching: l } = cn(), { data: o } =
|
|
2303
|
+
}, Zl = () => {
|
|
2304
|
+
const [e, t] = P(null), { selectedLang: n, fallbackLang: s, setSelectedLang: a } = ut(), { data: i, isFetching: l } = cn(), { data: o } = Re(), [c, h] = P(null), [g, d] = P(null), [w, y] = P(null), { data: p } = un(), S = Te(
|
|
2300
2305
|
te(p, "languages") || ["en"],
|
|
2301
2306
|
(v) => !fe(i, { lang: v }) && v !== te(p, "fallbackLang")
|
|
2302
2307
|
);
|
|
@@ -2346,7 +2351,7 @@ const Oe = ({
|
|
|
2346
2351
|
] })
|
|
2347
2352
|
] }),
|
|
2348
2353
|
E ? /* @__PURE__ */ u("div", { className: "flex items-center text-[11px] text-orange-500 gap-x-1", children: [
|
|
2349
|
-
/* @__PURE__ */ r(
|
|
2354
|
+
/* @__PURE__ */ r(Ui, { fill: "orange", className: "w-3 h-3" }),
|
|
2350
2355
|
/* @__PURE__ */ r("b", { children: " Primary" })
|
|
2351
2356
|
] }) : /* @__PURE__ */ r("div", { className: "flex items-center gap-x-3", children: /* @__PURE__ */ r(
|
|
2352
2357
|
Oe,
|
|
@@ -2368,7 +2373,7 @@ const Oe = ({
|
|
|
2368
2373
|
variant: "ghost",
|
|
2369
2374
|
size: "sm",
|
|
2370
2375
|
className: "h-8 w-8 p-0",
|
|
2371
|
-
children: /* @__PURE__ */ r(
|
|
2376
|
+
children: /* @__PURE__ */ r(ys, { className: "h-4 w-4" })
|
|
2372
2377
|
}
|
|
2373
2378
|
)
|
|
2374
2379
|
}
|
|
@@ -2391,7 +2396,7 @@ const Oe = ({
|
|
|
2391
2396
|
T.stopPropagation(), t({ ...v, edit: !0 });
|
|
2392
2397
|
},
|
|
2393
2398
|
children: [
|
|
2394
|
-
/* @__PURE__ */ r(
|
|
2399
|
+
/* @__PURE__ */ r(Ri, { className: "size-3" }),
|
|
2395
2400
|
B.EDIT
|
|
2396
2401
|
]
|
|
2397
2402
|
}
|
|
@@ -2410,7 +2415,7 @@ const Oe = ({
|
|
|
2410
2415
|
T.stopPropagation(), d(v);
|
|
2411
2416
|
},
|
|
2412
2417
|
children: [
|
|
2413
|
-
/* @__PURE__ */ r(
|
|
2418
|
+
/* @__PURE__ */ r(Pr, { className: "size-3" }),
|
|
2414
2419
|
B.UNPUBLISH
|
|
2415
2420
|
]
|
|
2416
2421
|
}
|
|
@@ -2429,7 +2434,7 @@ const Oe = ({
|
|
|
2429
2434
|
T.stopPropagation(), h(v);
|
|
2430
2435
|
},
|
|
2431
2436
|
children: [
|
|
2432
|
-
/* @__PURE__ */ r(
|
|
2437
|
+
/* @__PURE__ */ r(Oi, { className: "size-3" }),
|
|
2433
2438
|
B.DELETE
|
|
2434
2439
|
]
|
|
2435
2440
|
}
|
|
@@ -2468,23 +2473,23 @@ const Oe = ({
|
|
|
2468
2473
|
}
|
|
2469
2474
|
) }) }),
|
|
2470
2475
|
e && /* @__PURE__ */ r(
|
|
2471
|
-
|
|
2476
|
+
Kr,
|
|
2472
2477
|
{
|
|
2473
2478
|
languages: S,
|
|
2474
2479
|
langProps: e,
|
|
2475
2480
|
onClose: () => t(null)
|
|
2476
2481
|
}
|
|
2477
2482
|
),
|
|
2478
|
-
c && /* @__PURE__ */ r(
|
|
2483
|
+
c && /* @__PURE__ */ r(Hr, { page: c, onClose: () => h(null) }),
|
|
2479
2484
|
g && /* @__PURE__ */ r(
|
|
2480
|
-
|
|
2485
|
+
xs,
|
|
2481
2486
|
{
|
|
2482
2487
|
page: g,
|
|
2483
2488
|
onClose: () => d(null)
|
|
2484
2489
|
}
|
|
2485
2490
|
),
|
|
2486
2491
|
w && /* @__PURE__ */ r(
|
|
2487
|
-
|
|
2492
|
+
Xl,
|
|
2488
2493
|
{
|
|
2489
2494
|
page: w,
|
|
2490
2495
|
onClose: () => y(null)
|
|
@@ -2492,14 +2497,14 @@ const Oe = ({
|
|
|
2492
2497
|
)
|
|
2493
2498
|
] });
|
|
2494
2499
|
};
|
|
2495
|
-
function
|
|
2500
|
+
function Jl({
|
|
2496
2501
|
pages: e,
|
|
2497
2502
|
selectedParentId: t,
|
|
2498
2503
|
onChange: n,
|
|
2499
2504
|
className: s = "w-full rounded-md border border-gray-300 px-3 py-2",
|
|
2500
2505
|
id: a = "parentPage"
|
|
2501
2506
|
}) {
|
|
2502
|
-
const i =
|
|
2507
|
+
const i = W(() => !e || e.length === 0 ? [] : e.filter((g) => !me(g.slug)).filter((g) => g.slug !== "/").sort((g, d) => g.slug.localeCompare(d.slug)), [e]), l = (h) => Math.max(0, (h.match(/\//g) || []).length - 1), o = (h) => " ".repeat(h), c = (h) => {
|
|
2503
2508
|
if (h === "/") return "/";
|
|
2504
2509
|
const g = h.split("/").filter(Boolean);
|
|
2505
2510
|
return g.length <= 1 ? `/${g[0] || ""}` : `/${g[g.length - 1]}`;
|
|
@@ -2531,7 +2536,7 @@ function Ql({
|
|
|
2531
2536
|
)
|
|
2532
2537
|
] });
|
|
2533
2538
|
}
|
|
2534
|
-
const
|
|
2539
|
+
const eo = ({
|
|
2535
2540
|
templates: e,
|
|
2536
2541
|
selectedTemplateId: t,
|
|
2537
2542
|
onSelectTemplate: n,
|
|
@@ -2579,13 +2584,13 @@ const Xl = ({
|
|
|
2579
2584
|
/* @__PURE__ */ r("div", { className: "p-2 text-xs text-gray-500 bg-gray-50 border-t", children: "Template preview" })
|
|
2580
2585
|
] })
|
|
2581
2586
|
] });
|
|
2582
|
-
},
|
|
2587
|
+
}, to = () => {
|
|
2583
2588
|
const e = Q(), t = $();
|
|
2584
2589
|
return Ne({
|
|
2585
2590
|
queryKey: [ke, I.GET_LIBRARIES],
|
|
2586
2591
|
queryFn: async () => await t(e, { action: I.GET_LIBRARIES }) || []
|
|
2587
2592
|
});
|
|
2588
|
-
},
|
|
2593
|
+
}, no = (e) => {
|
|
2589
2594
|
const t = Q(), n = $();
|
|
2590
2595
|
return Ne({
|
|
2591
2596
|
queryKey: [ke, I.GET_TEMPLATES_BY_TYPE, e],
|
|
@@ -2598,28 +2603,28 @@ const Xl = ({
|
|
|
2598
2603
|
return (e ? Te(s, { pageType: e }) : s) || [];
|
|
2599
2604
|
}
|
|
2600
2605
|
});
|
|
2601
|
-
},
|
|
2602
|
-
const { data: t = [], isLoading: n } =
|
|
2606
|
+
}, so = (e) => {
|
|
2607
|
+
const { data: t = [], isLoading: n } = no(e), { data: s = [], isLoading: a } = to(), i = W(() => n || a ? [] : t.map((o) => {
|
|
2603
2608
|
const c = fe(s, { id: o.library });
|
|
2604
2609
|
return {
|
|
2605
2610
|
...o,
|
|
2606
2611
|
libraryName: (c == null ? void 0 : c.type) !== "shared" ? "Site Library" : (c == null ? void 0 : c.name) + " Library",
|
|
2607
2612
|
libraryType: c == null ? void 0 : c.type
|
|
2608
2613
|
};
|
|
2609
|
-
}), [t, s, n, a]), l =
|
|
2614
|
+
}), [t, s, n, a]), l = W(() => qa(i, "libraryName"), [i]);
|
|
2610
2615
|
return {
|
|
2611
2616
|
data: i,
|
|
2612
2617
|
groupedData: l,
|
|
2613
2618
|
isLoading: n || a
|
|
2614
2619
|
};
|
|
2615
2620
|
};
|
|
2616
|
-
function
|
|
2621
|
+
function ro({
|
|
2617
2622
|
addEditPage: e,
|
|
2618
2623
|
additionalPageTypes: t = [],
|
|
2619
2624
|
close: n
|
|
2620
2625
|
}) {
|
|
2621
2626
|
var Ee, Qe;
|
|
2622
|
-
const s = !!(e != null && e.id), { data: a } = Rn(), { mutate: i, isPending: l } =
|
|
2627
|
+
const s = !!(e != null && e.id), { data: a } = Rn(), { mutate: i, isPending: l } = qr(), { mutate: o, isPending: c } = Ss(), [h, g] = P(null), [d, w] = P(
|
|
2623
2628
|
(e == null ? void 0 : e.pageType) ?? "page"
|
|
2624
2629
|
), [y, p] = P(
|
|
2625
2630
|
t.find(
|
|
@@ -2629,18 +2634,18 @@ function to({
|
|
|
2629
2634
|
(e == null ? void 0 : e.parent) ?? ""
|
|
2630
2635
|
), [x, G] = P((e == null ? void 0 : e.name) ?? ""), [E, b] = P(
|
|
2631
2636
|
((e == null ? void 0 : e.slug) ?? "").split("/").pop() || ""
|
|
2632
|
-
), [T,
|
|
2637
|
+
), [T, U] = P(
|
|
2633
2638
|
(e == null ? void 0 : e.dynamic) ?? !1
|
|
2634
|
-
), [J, ie] = P(""), { data: k, isLoading: q } =
|
|
2639
|
+
), [J, ie] = P(""), { data: k, isLoading: q } = so(d), A = l || c, M = t.find(
|
|
2635
2640
|
(f) => f.key === d
|
|
2636
2641
|
), ne = (f) => {
|
|
2637
|
-
w(f), v(""), b(""),
|
|
2642
|
+
w(f), v(""), b(""), U(!1), ie(""), p(
|
|
2638
2643
|
t.find(
|
|
2639
2644
|
(m) => m.key === f
|
|
2640
2645
|
)
|
|
2641
2646
|
);
|
|
2642
2647
|
}, he = (f) => {
|
|
2643
|
-
|
|
2648
|
+
U(f), f && b("");
|
|
2644
2649
|
}, z = (f) => {
|
|
2645
2650
|
if (v(f), f && f !== "none") {
|
|
2646
2651
|
const m = a == null ? void 0 : a.find(
|
|
@@ -2777,7 +2782,7 @@ function to({
|
|
|
2777
2782
|
!s && (y == null ? void 0 : y.hasSlug) && k.length > 0 && /* @__PURE__ */ u("div", { className: "space-y-1", children: [
|
|
2778
2783
|
/* @__PURE__ */ r(X, { className: "text-sm mb-1 block", children: "Template" }),
|
|
2779
2784
|
/* @__PURE__ */ r(
|
|
2780
|
-
|
|
2785
|
+
eo,
|
|
2781
2786
|
{
|
|
2782
2787
|
templates: k,
|
|
2783
2788
|
selectedTemplateId: J,
|
|
@@ -2787,7 +2792,7 @@ function to({
|
|
|
2787
2792
|
)
|
|
2788
2793
|
] }),
|
|
2789
2794
|
/* @__PURE__ */ r(
|
|
2790
|
-
|
|
2795
|
+
Jl,
|
|
2791
2796
|
{
|
|
2792
2797
|
pages: a,
|
|
2793
2798
|
selectedParentId: S,
|
|
@@ -2889,7 +2894,7 @@ function to({
|
|
|
2889
2894
|
}
|
|
2890
2895
|
);
|
|
2891
2896
|
}
|
|
2892
|
-
const
|
|
2897
|
+
const ao = ({
|
|
2893
2898
|
addEditPage: e,
|
|
2894
2899
|
setAddEditPage: t
|
|
2895
2900
|
}) => {
|
|
@@ -2903,7 +2908,7 @@ const no = ({
|
|
|
2903
2908
|
/* @__PURE__ */ r(Ye, { children: s ? "Update your page name" : "Enter details to create a new page" })
|
|
2904
2909
|
] }),
|
|
2905
2910
|
/* @__PURE__ */ r(
|
|
2906
|
-
|
|
2911
|
+
ro,
|
|
2907
2912
|
{
|
|
2908
2913
|
addEditPage: e,
|
|
2909
2914
|
close: () => t(void 0),
|
|
@@ -2911,18 +2916,18 @@ const no = ({
|
|
|
2911
2916
|
}
|
|
2912
2917
|
)
|
|
2913
2918
|
] }) });
|
|
2914
|
-
},
|
|
2919
|
+
}, io = 1 * 1024 * 1024, lo = ({
|
|
2915
2920
|
page: e,
|
|
2916
2921
|
onClose: t
|
|
2917
2922
|
}) => {
|
|
2918
|
-
const [n, s] = P(!1), [a, i] = P(""), [l, o] = P(""), [c, h] = P(!1), g = ct(null), d =
|
|
2923
|
+
const [n, s] = P(!1), [a, i] = P(""), [l, o] = P(""), [c, h] = P(!1), g = ct(null), d = Vl(), { data: w } = Ie(), y = w == null ? void 0 : w.find(
|
|
2919
2924
|
(E) => E.key === e.pageType
|
|
2920
2925
|
), p = (y == null ? void 0 : y.name) || It(e.pageType), S = _e(
|
|
2921
2926
|
(E) => {
|
|
2922
2927
|
var T;
|
|
2923
2928
|
const b = (T = E.target.files) == null ? void 0 : T[0];
|
|
2924
2929
|
if (b) {
|
|
2925
|
-
if (b.size >
|
|
2930
|
+
if (b.size > io) {
|
|
2926
2931
|
j.error("File too large", {
|
|
2927
2932
|
description: `Maximum file size is 1MB. Selected file is ${(b.size / 1024).toFixed(2)}KB.`
|
|
2928
2933
|
}), g.current && (g.current.value = "");
|
|
@@ -2930,13 +2935,13 @@ const no = ({
|
|
|
2930
2935
|
}
|
|
2931
2936
|
try {
|
|
2932
2937
|
h(!0);
|
|
2933
|
-
const
|
|
2934
|
-
|
|
2935
|
-
o(
|
|
2936
|
-
},
|
|
2937
|
-
} catch (
|
|
2938
|
-
console.error("Error reading file:",
|
|
2939
|
-
description:
|
|
2938
|
+
const U = new FileReader();
|
|
2939
|
+
U.onloadend = () => {
|
|
2940
|
+
o(U.result), h(!1);
|
|
2941
|
+
}, U.readAsDataURL(b);
|
|
2942
|
+
} catch (U) {
|
|
2943
|
+
console.error("Error reading file:", U), h(!1), j.error("Failed to process image", {
|
|
2944
|
+
description: U instanceof Error ? U.message : "Unknown error"
|
|
2940
2945
|
});
|
|
2941
2946
|
}
|
|
2942
2947
|
}
|
|
@@ -2978,7 +2983,7 @@ const no = ({
|
|
|
2978
2983
|
/* @__PURE__ */ u("div", { className: "space-y-4 mb-4 text-xs", children: [
|
|
2979
2984
|
/* @__PURE__ */ u("div", { className: "p-4 border rounded bg-slate-50 space-y-3", children: [
|
|
2980
2985
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-2", children: [
|
|
2981
|
-
/* @__PURE__ */ r(
|
|
2986
|
+
/* @__PURE__ */ r(Bi, { className: "w-4 h-4 text-slate-500" }),
|
|
2982
2987
|
/* @__PURE__ */ r("span", { className: "font-medium text-slate-500", children: "Page Name:" }),
|
|
2983
2988
|
/* @__PURE__ */ r("span", { className: "font-semibold", children: It(e.name) })
|
|
2984
2989
|
] }),
|
|
@@ -3028,7 +3033,7 @@ const no = ({
|
|
|
3028
3033
|
/* @__PURE__ */ r("div", { className: "animate-spin h-4 w-4 border-2 border-current border-t-transparent rounded-full" }),
|
|
3029
3034
|
"Uploading..."
|
|
3030
3035
|
] }) : /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
|
|
3031
|
-
/* @__PURE__ */ r(
|
|
3036
|
+
/* @__PURE__ */ r(xr, { className: "h-4 w-4" }),
|
|
3032
3037
|
"Select image"
|
|
3033
3038
|
] })
|
|
3034
3039
|
}
|
|
@@ -3040,7 +3045,7 @@ const no = ({
|
|
|
3040
3045
|
variant: "outline",
|
|
3041
3046
|
size: "icon",
|
|
3042
3047
|
onClick: v,
|
|
3043
|
-
children: /* @__PURE__ */ r(
|
|
3048
|
+
children: /* @__PURE__ */ r(Tr, { className: "h-4 w-4" })
|
|
3044
3049
|
}
|
|
3045
3050
|
)
|
|
3046
3051
|
] }),
|
|
@@ -3076,11 +3081,11 @@ const no = ({
|
|
|
3076
3081
|
}
|
|
3077
3082
|
)
|
|
3078
3083
|
] }) });
|
|
3079
|
-
},
|
|
3084
|
+
}, oo = ({
|
|
3080
3085
|
page: e,
|
|
3081
3086
|
onClose: t
|
|
3082
3087
|
}) => {
|
|
3083
|
-
const [n, s] = P(!1), a =
|
|
3088
|
+
const [n, s] = P(!1), a = jl();
|
|
3084
3089
|
return /* @__PURE__ */ r(He, { open: !0, onOpenChange: t, children: /* @__PURE__ */ u(Ke, { children: [
|
|
3085
3090
|
/* @__PURE__ */ u(Ve, { children: [
|
|
3086
3091
|
/* @__PURE__ */ r(je, { children: "Unmark as template" }),
|
|
@@ -3115,7 +3120,7 @@ const no = ({
|
|
|
3115
3120
|
}
|
|
3116
3121
|
)
|
|
3117
3122
|
] }) });
|
|
3118
|
-
},
|
|
3123
|
+
}, Hn = ({
|
|
3119
3124
|
parentSlug: e,
|
|
3120
3125
|
page: t,
|
|
3121
3126
|
active: n,
|
|
@@ -3126,10 +3131,10 @@ const no = ({
|
|
|
3126
3131
|
setMarkAsTemplate: o,
|
|
3127
3132
|
setUnmarkAsTemplate: c
|
|
3128
3133
|
}) => {
|
|
3129
|
-
const { data: h } = Ie(), { hasPermission: g } = sn(), d =
|
|
3134
|
+
const { data: h } = Ie(), { hasPermission: g } = sn(), d = W(
|
|
3130
3135
|
() => fe(h, { key: t.pageType }),
|
|
3131
3136
|
[h, t.pageType]
|
|
3132
|
-
), w = te(t, "slug").replace(e, "") || "/", y = !g(ue.EDIT_PAGE) && !g(ue.DELETE_PAGE) && !g(ue.UNPUBLISH_PAGE), p =
|
|
3137
|
+
), w = te(t, "slug", "").replace(e, "") || "/", y = !g(ue.EDIT_PAGE) && !g(ue.DELETE_PAGE) && !g(ue.UNPUBLISH_PAGE), p = W(() => !!t.isTemplate, [t.isTemplate]), S = W(
|
|
3133
3138
|
() => !!(d != null && d.hasSlug),
|
|
3134
3139
|
[d == null ? void 0 : d.hasSlug]
|
|
3135
3140
|
);
|
|
@@ -3140,13 +3145,13 @@ const no = ({
|
|
|
3140
3145
|
className: `rounded flex p-1.5 items-center justify-between leading-none duration-300 cursor-pointer px-3 py-1.5 ${n ? "bg-gray-200" : "hover:bg-gray-100"}`,
|
|
3141
3146
|
children: [
|
|
3142
3147
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-x-2", children: [
|
|
3143
|
-
t.dynamic ? /* @__PURE__ */ r("div", { className: "w-4 h-4 text-slate-500 stroke-[1]", children: /* @__PURE__ */ r(
|
|
3148
|
+
t.dynamic ? /* @__PURE__ */ r("div", { className: "w-4 h-4 text-slate-500 stroke-[1]", children: /* @__PURE__ */ r(Fi, { className: "w-4 h-4 text-yellow-400" }) }) : d != null && d.icon ? /* @__PURE__ */ r(
|
|
3144
3149
|
"div",
|
|
3145
3150
|
{
|
|
3146
3151
|
className: "w-4 h-4 text-slate-500 stroke-[1]",
|
|
3147
3152
|
dangerouslySetInnerHTML: { __html: d.icon }
|
|
3148
3153
|
}
|
|
3149
|
-
) : d != null && d.hasSlug ? /* @__PURE__ */ r(on, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ r(
|
|
3154
|
+
) : d != null && d.hasSlug ? /* @__PURE__ */ r(on, { className: "w-4 h-4 text-slate-500 stroke-[1]" }) : /* @__PURE__ */ r(qi, { className: "w-4 h-4 text-slate-500 stroke-[1]" }),
|
|
3150
3155
|
/* @__PURE__ */ r(
|
|
3151
3156
|
"div",
|
|
3152
3157
|
{
|
|
@@ -3155,17 +3160,17 @@ const no = ({
|
|
|
3155
3160
|
),
|
|
3156
3161
|
/* @__PURE__ */ r("span", { className: "font-light leading-none truncate text-slate-800", children: It(t.name) ?? "" }),
|
|
3157
3162
|
d != null && d.hasSlug ? /* @__PURE__ */ u(
|
|
3158
|
-
|
|
3163
|
+
qn,
|
|
3159
3164
|
{
|
|
3160
3165
|
variant: "outline",
|
|
3161
3166
|
className: `ml-2 text-xs max-w-full leading-tight py-px font-normal rounded-full text-gray-400 border ${n ? "border-gray-300" : "border-gray-200"}`,
|
|
3162
3167
|
children: [
|
|
3163
3168
|
w,
|
|
3164
|
-
t.dynamic && /* @__PURE__ */ r("span", { className: "text-xs font-light leading-none text-slate-500", children:
|
|
3169
|
+
t.dynamic && /* @__PURE__ */ r("span", { className: "text-xs font-light leading-none text-slate-500", children: Js(w, "/") ? `${d == null ? void 0 : d.dynamicSlug}` : `/${d == null ? void 0 : d.dynamicSlug}` })
|
|
3165
3170
|
]
|
|
3166
3171
|
}
|
|
3167
3172
|
) : /* @__PURE__ */ r(
|
|
3168
|
-
|
|
3173
|
+
qn,
|
|
3169
3174
|
{
|
|
3170
3175
|
variant: "outline",
|
|
3171
3176
|
className: `ml-2 text-xs max-w-full leading-tight py-px font-normal rounded-full text-gray-400 border ${n ? "border-gray-300" : "border-gray-200"}`,
|
|
@@ -3173,7 +3178,7 @@ const no = ({
|
|
|
3173
3178
|
}
|
|
3174
3179
|
),
|
|
3175
3180
|
p && /* @__PURE__ */ r(
|
|
3176
|
-
|
|
3181
|
+
qn,
|
|
3177
3182
|
{
|
|
3178
3183
|
variant: "outline",
|
|
3179
3184
|
className: "ml-2 text-xs py-0 font-normal text-blue-500 border border-blue-200 bg-blue-50",
|
|
@@ -3182,7 +3187,7 @@ const no = ({
|
|
|
3182
3187
|
)
|
|
3183
3188
|
] }),
|
|
3184
3189
|
/* @__PURE__ */ r("div", { className: "flex items-center space-x-4", children: !y && /* @__PURE__ */ u(rn, { children: [
|
|
3185
|
-
/* @__PURE__ */ r(an, { asChild: !0, onClick: (v) => v.stopPropagation(), children: /* @__PURE__ */ r(
|
|
3190
|
+
/* @__PURE__ */ r(an, { asChild: !0, onClick: (v) => v.stopPropagation(), children: /* @__PURE__ */ r(ys, { className: "h-4 w-4 hover:stroke-[3]" }) }),
|
|
3186
3191
|
/* @__PURE__ */ u(ln, { align: "end", className: "text-sm", children: [
|
|
3187
3192
|
g(ue.EDIT_PAGE) && /* @__PURE__ */ u(
|
|
3188
3193
|
De,
|
|
@@ -3195,7 +3200,7 @@ const no = ({
|
|
|
3195
3200
|
});
|
|
3196
3201
|
},
|
|
3197
3202
|
children: [
|
|
3198
|
-
/* @__PURE__ */ r(
|
|
3203
|
+
/* @__PURE__ */ r(Hi, { className: "size-3" }),
|
|
3199
3204
|
"Edit"
|
|
3200
3205
|
]
|
|
3201
3206
|
}
|
|
@@ -3208,7 +3213,7 @@ const no = ({
|
|
|
3208
3213
|
v.stopPropagation(), a(t);
|
|
3209
3214
|
},
|
|
3210
3215
|
children: [
|
|
3211
|
-
/* @__PURE__ */ r(
|
|
3216
|
+
/* @__PURE__ */ r(Pr, { className: "size-3" }),
|
|
3212
3217
|
B.UNPUBLISH
|
|
3213
3218
|
]
|
|
3214
3219
|
}
|
|
@@ -3221,7 +3226,7 @@ const no = ({
|
|
|
3221
3226
|
v.stopPropagation(), i(t);
|
|
3222
3227
|
},
|
|
3223
3228
|
children: [
|
|
3224
|
-
/* @__PURE__ */ r(
|
|
3229
|
+
/* @__PURE__ */ r(vs, { className: "size-3" }),
|
|
3225
3230
|
B.DELETE
|
|
3226
3231
|
]
|
|
3227
3232
|
}
|
|
@@ -3234,7 +3239,7 @@ const no = ({
|
|
|
3234
3239
|
v.stopPropagation(), c(t);
|
|
3235
3240
|
},
|
|
3236
3241
|
children: [
|
|
3237
|
-
/* @__PURE__ */ r(
|
|
3242
|
+
/* @__PURE__ */ r(Us, { className: "size-3" }),
|
|
3238
3243
|
B.UNMARK_AS_TEMPLATE
|
|
3239
3244
|
]
|
|
3240
3245
|
}
|
|
@@ -3246,7 +3251,7 @@ const no = ({
|
|
|
3246
3251
|
v.stopPropagation(), o(t);
|
|
3247
3252
|
},
|
|
3248
3253
|
children: [
|
|
3249
|
-
/* @__PURE__ */ r(
|
|
3254
|
+
/* @__PURE__ */ r(Us, { className: "size-3" }),
|
|
3250
3255
|
B.MARK_AS_TEMPLATE
|
|
3251
3256
|
]
|
|
3252
3257
|
}
|
|
@@ -3256,19 +3261,19 @@ const no = ({
|
|
|
3256
3261
|
]
|
|
3257
3262
|
}
|
|
3258
3263
|
);
|
|
3259
|
-
},
|
|
3260
|
-
const [, t] = P([]), [n, s] = P(""), [a, i] = P(null), [l, o] = P(null), [c, h] = P(null), [g, d] = P(null), [w, y] = P(null), { data: p, isFetching: S } = Rn(), [v, x] = P(""), { hasPermission: G } = sn(), [E, b] =
|
|
3264
|
+
}, co = ({ close: e }) => {
|
|
3265
|
+
const [, t] = P([]), [n, s] = P(""), [a, i] = P(null), [l, o] = P(null), [c, h] = P(null), [g, d] = P(null), [w, y] = P(null), { data: p, isFetching: S } = Rn(), [v, x] = P(""), { hasPermission: G } = sn(), [E, b] = Ue(), T = E.get("page"), { data: U } = Ie(), J = _e(
|
|
3261
3266
|
(A) => {
|
|
3262
3267
|
var M;
|
|
3263
|
-
return (M = fe(
|
|
3268
|
+
return (M = fe(U, { key: A })) == null ? void 0 : M.hasSlug;
|
|
3264
3269
|
},
|
|
3265
|
-
[
|
|
3270
|
+
[U]
|
|
3266
3271
|
);
|
|
3267
3272
|
we(() => {
|
|
3268
3273
|
if (!me(v)) return;
|
|
3269
3274
|
const A = sessionStorage.getItem("pageTypeFilter") || "all";
|
|
3270
|
-
!me(
|
|
3271
|
-
}, [
|
|
3275
|
+
!me(U) && A && (fe(U, { key: A }) ? x(A) : x("all"));
|
|
3276
|
+
}, [U, v]);
|
|
3272
3277
|
const ie = (A) => {
|
|
3273
3278
|
x(A), sessionStorage.setItem("pageTypeFilter", A);
|
|
3274
3279
|
}, k = _e(
|
|
@@ -3284,10 +3289,12 @@ const no = ({
|
|
|
3284
3289
|
A && (A != null && A.pageType) ? t((M) => [...M, A == null ? void 0 : A.pageType]) : (window.history.replaceState(null, "", "/"), b(new URLSearchParams({})), window.dispatchEvent(new PopStateEvent("popstate")));
|
|
3285
3290
|
}
|
|
3286
3291
|
}, [p, T, S, b]);
|
|
3287
|
-
const q =
|
|
3288
|
-
const A =
|
|
3292
|
+
const q = W(() => {
|
|
3293
|
+
const A = Nn(
|
|
3294
|
+
Te(p, (F) => me(n) ? !0 : Mt(Dt(F == null ? void 0 : F.name), Dt(n)) || Mt(Dt(F == null ? void 0 : F.slug), Dt(n)))
|
|
3295
|
+
);
|
|
3289
3296
|
if (v !== "all")
|
|
3290
|
-
return Te(A, { pageType: v });
|
|
3297
|
+
return Nn(Te(A, { pageType: v }));
|
|
3291
3298
|
const M = /* @__PURE__ */ new Map();
|
|
3292
3299
|
A.forEach((F) => {
|
|
3293
3300
|
M.set(F.id, { ...F, children: [] });
|
|
@@ -3309,13 +3316,13 @@ const no = ({
|
|
|
3309
3316
|
he,
|
|
3310
3317
|
(F) => J(F.pageType)
|
|
3311
3318
|
).sort((F, Ee) => F.name.localeCompare(Ee.name));
|
|
3312
|
-
return
|
|
3319
|
+
return Nn([...de, ...z, ...ne]);
|
|
3313
3320
|
}, [p, J, n, v]);
|
|
3314
3321
|
return /* @__PURE__ */ u("div", { className: "flex flex-col justify-between h-full", children: [
|
|
3315
3322
|
/* @__PURE__ */ u("div", { className: "flex flex-col h-full space-y-6", children: [
|
|
3316
3323
|
/* @__PURE__ */ u("div", { className: "relative flex item-center gap-x-4", children: [
|
|
3317
3324
|
/* @__PURE__ */ r(
|
|
3318
|
-
|
|
3325
|
+
Mi,
|
|
3319
3326
|
{
|
|
3320
3327
|
strokeWidth: 2.5,
|
|
3321
3328
|
className: "absolute left-3 top-2.5 h-4 w-4 text-gray-400"
|
|
@@ -3330,17 +3337,17 @@ const no = ({
|
|
|
3330
3337
|
onChange: (A) => s(A.target.value)
|
|
3331
3338
|
}
|
|
3332
3339
|
),
|
|
3333
|
-
!me(v) && /* @__PURE__ */ u(
|
|
3340
|
+
!me(v) && /* @__PURE__ */ u(mi, { value: v, onValueChange: ie, children: [
|
|
3334
3341
|
/* @__PURE__ */ r(
|
|
3335
|
-
|
|
3342
|
+
fi,
|
|
3336
3343
|
{
|
|
3337
3344
|
className: `${v === "all" ? "bg-gray-50 hover:bg-gray-100" : "bg-gray-100 hover:bg-gray-50"} min-w-[120px] h-max p-0 py-1 pl-2 pr-1 top-1.5 -mt-px absolute text-gray-600 right-1.5 w-max text-xs whitespace-nowrap ring-0 focus:ring-0 shadow-none`,
|
|
3338
|
-
children: /* @__PURE__ */ r(
|
|
3345
|
+
children: /* @__PURE__ */ r(gi, { placeholder: "Select page type" })
|
|
3339
3346
|
}
|
|
3340
3347
|
),
|
|
3341
|
-
/* @__PURE__ */ r(
|
|
3342
|
-
|
|
3343
|
-
(A) => /* @__PURE__ */ r(
|
|
3348
|
+
/* @__PURE__ */ r(pi, { align: "end", children: Fe(
|
|
3349
|
+
Zs([{ key: "all", name: "All" }], U),
|
|
3350
|
+
(A) => /* @__PURE__ */ r(yi, { value: te(A, "key"), children: te(A, "name") })
|
|
3344
3351
|
) })
|
|
3345
3352
|
] })
|
|
3346
3353
|
] }),
|
|
@@ -3355,7 +3362,7 @@ const no = ({
|
|
|
3355
3362
|
"Empty List!",
|
|
3356
3363
|
/* @__PURE__ */ r("span", { className: "font-light", children: "Add new page to start" })
|
|
3357
3364
|
] }) : /* @__PURE__ */ r("div", { className: "text-sm text-slate-700 space-y-2 h-[70vh] overflow-y-auto", children: Fe(q, (A) => me(A == null ? void 0 : A.children) ? /* @__PURE__ */ r(
|
|
3358
|
-
|
|
3365
|
+
Hn,
|
|
3359
3366
|
{
|
|
3360
3367
|
changeActivePage: k,
|
|
3361
3368
|
setUnpublishPage: o,
|
|
@@ -3369,7 +3376,7 @@ const no = ({
|
|
|
3369
3376
|
A.id
|
|
3370
3377
|
) : /* @__PURE__ */ u("div", { className: "border-0", children: [
|
|
3371
3378
|
/* @__PURE__ */ r(
|
|
3372
|
-
|
|
3379
|
+
Hn,
|
|
3373
3380
|
{
|
|
3374
3381
|
changeActivePage: k,
|
|
3375
3382
|
setUnpublishPage: o,
|
|
@@ -3384,7 +3391,7 @@ const no = ({
|
|
|
3384
3391
|
/* @__PURE__ */ r("div", { className: "pt-2 pl-6 bg-white", children: Fe(te(A, "children", []), (M) => {
|
|
3385
3392
|
const ne = T === te(M, "id");
|
|
3386
3393
|
return /* @__PURE__ */ r(
|
|
3387
|
-
|
|
3394
|
+
Hn,
|
|
3388
3395
|
{
|
|
3389
3396
|
parentSlug: A.slug,
|
|
3390
3397
|
changeActivePage: k,
|
|
@@ -3413,47 +3420,47 @@ const no = ({
|
|
|
3413
3420
|
});
|
|
3414
3421
|
},
|
|
3415
3422
|
children: [
|
|
3416
|
-
/* @__PURE__ */ r(
|
|
3423
|
+
/* @__PURE__ */ r(ps, { className: "w-4 h-4" }),
|
|
3417
3424
|
" Add New"
|
|
3418
3425
|
]
|
|
3419
3426
|
}
|
|
3420
3427
|
),
|
|
3421
3428
|
c && /* @__PURE__ */ r(
|
|
3422
|
-
|
|
3429
|
+
ao,
|
|
3423
3430
|
{
|
|
3424
3431
|
editPage: k,
|
|
3425
3432
|
addEditPage: c,
|
|
3426
3433
|
setAddEditPage: h
|
|
3427
3434
|
}
|
|
3428
3435
|
),
|
|
3429
|
-
a && /* @__PURE__ */ r(
|
|
3436
|
+
a && /* @__PURE__ */ r(Hr, { page: a, onClose: () => i(null) }),
|
|
3430
3437
|
l && /* @__PURE__ */ r(
|
|
3431
|
-
|
|
3438
|
+
xs,
|
|
3432
3439
|
{
|
|
3433
3440
|
page: l,
|
|
3434
3441
|
onClose: () => o(null)
|
|
3435
3442
|
}
|
|
3436
3443
|
),
|
|
3437
3444
|
g && /* @__PURE__ */ r(
|
|
3438
|
-
|
|
3445
|
+
lo,
|
|
3439
3446
|
{
|
|
3440
3447
|
page: g,
|
|
3441
3448
|
onClose: () => d(null)
|
|
3442
3449
|
}
|
|
3443
3450
|
),
|
|
3444
3451
|
w && /* @__PURE__ */ r(
|
|
3445
|
-
|
|
3452
|
+
oo,
|
|
3446
3453
|
{
|
|
3447
3454
|
page: w,
|
|
3448
3455
|
onClose: () => y(null)
|
|
3449
3456
|
}
|
|
3450
3457
|
)
|
|
3451
3458
|
] });
|
|
3452
|
-
},
|
|
3459
|
+
}, uo = () => {
|
|
3453
3460
|
const e = dt("logo", null);
|
|
3454
|
-
return e ? /* @__PURE__ */ r("div", { className: "w-full max-h-9 overflow-hidden pr-2", children:
|
|
3455
|
-
},
|
|
3456
|
-
const [e] =
|
|
3461
|
+
return e ? /* @__PURE__ */ r("div", { className: "w-full max-h-9 overflow-hidden pr-2", children: tr.createElement(e, {}) }) : null;
|
|
3462
|
+
}, ho = () => {
|
|
3463
|
+
const [e] = Ue(), t = e.get("page"), { data: n, isFetching: s } = Re(), [a, i] = P(!1), l = !!t && !me(n), o = !t || !s && me(n) || a;
|
|
3457
3464
|
return /* @__PURE__ */ u(be, { children: [
|
|
3458
3465
|
/* @__PURE__ */ u(
|
|
3459
3466
|
_,
|
|
@@ -3462,48 +3469,48 @@ const no = ({
|
|
|
3462
3469
|
className: "flex items-center w-full space-x-2 py-1",
|
|
3463
3470
|
onClick: () => i(!0),
|
|
3464
3471
|
children: [
|
|
3465
|
-
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(
|
|
3472
|
+
/* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(Ki, { className: "h-4 w-4" }) }),
|
|
3466
3473
|
/* @__PURE__ */ u("span", { className: "truncate leading-tight flex items-center max-w-[200px]", children: [
|
|
3467
3474
|
/* @__PURE__ */ r("span", { className: "text-slate-600 pr-1 font-light", children: "Editing:" }),
|
|
3468
|
-
s ? /* @__PURE__ */ r(
|
|
3475
|
+
s ? /* @__PURE__ */ r(_r, { className: "h-4 w-4 animate-spin text-slate-400 ml-2" }) : It(te(n, "name")) ?? ""
|
|
3469
3476
|
] })
|
|
3470
3477
|
]
|
|
3471
3478
|
},
|
|
3472
3479
|
"template-viewer"
|
|
3473
3480
|
),
|
|
3474
3481
|
/* @__PURE__ */ r(
|
|
3475
|
-
|
|
3482
|
+
vr,
|
|
3476
3483
|
{
|
|
3477
3484
|
open: o,
|
|
3478
3485
|
onOpenChange: (c) => !c && l && i(!1),
|
|
3479
3486
|
children: /* @__PURE__ */ u(
|
|
3480
|
-
|
|
3487
|
+
Er,
|
|
3481
3488
|
{
|
|
3482
3489
|
side: "left",
|
|
3483
3490
|
className: `!max-w-screen-md z-50 border-border w-full ${l ? "" : "sheet-hide-close-btn"}`,
|
|
3484
3491
|
children: [
|
|
3485
|
-
/* @__PURE__ */ r(
|
|
3492
|
+
/* @__PURE__ */ r(br, { className: "mb-3", children: /* @__PURE__ */ u(wr, { className: "text-sm flex items-center gap-2 font-semibold", children: [
|
|
3486
3493
|
/* @__PURE__ */ r("div", { className: "p-2 rounded-md bg-primary text-primary-foreground", children: /* @__PURE__ */ r(on, { className: "w-6 h-6" }) }),
|
|
3487
3494
|
/* @__PURE__ */ u("div", { className: "flex flex-col", children: [
|
|
3488
3495
|
/* @__PURE__ */ r("span", { className: "text-sm font-semibold", children: "Pages" }),
|
|
3489
3496
|
/* @__PURE__ */ r("span", { className: "text-xs text-muted-foreground", children: "Manage your site structure" })
|
|
3490
3497
|
] })
|
|
3491
3498
|
] }) }),
|
|
3492
|
-
/* @__PURE__ */ r("div", { className: "h-[calc(100vh-100px)] overflow-y-auto", children: /* @__PURE__ */ r(
|
|
3499
|
+
/* @__PURE__ */ r("div", { className: "h-[calc(100vh-100px)] overflow-y-auto", children: /* @__PURE__ */ r(co, { close: () => i(!1) }) })
|
|
3493
3500
|
]
|
|
3494
3501
|
}
|
|
3495
3502
|
)
|
|
3496
3503
|
}
|
|
3497
3504
|
)
|
|
3498
3505
|
] });
|
|
3499
|
-
},
|
|
3500
|
-
const { fallbackLang: e, languages: t, selectedLang: n, setSelectedLang: s } = ut(), a = me(n) ? e : n, [, i] =
|
|
3506
|
+
}, mo = () => {
|
|
3507
|
+
const { fallbackLang: e, languages: t, selectedLang: n, setSelectedLang: s } = ut(), a = me(n) ? e : n, [, i] = Ue();
|
|
3501
3508
|
we(() => {
|
|
3502
3509
|
const p = new URLSearchParams(window.location.search), S = p.get("lang");
|
|
3503
3510
|
S && (t.includes(S) ? s(S) : (p.delete("lang"), i(p), s("")));
|
|
3504
3511
|
}, [t, i, s]);
|
|
3505
|
-
const [l, o] = P(null), { data: c } =
|
|
3506
|
-
const p =
|
|
3512
|
+
const [l, o] = P(null), { data: c } = Re(), { data: h } = un(), { data: g, isFetching: d } = cn(), w = W(() => {
|
|
3513
|
+
const p = Nn(
|
|
3507
3514
|
Fe(te(h, "languages"), (S) => {
|
|
3508
3515
|
const v = fe(g, { lang: S });
|
|
3509
3516
|
return {
|
|
@@ -3531,9 +3538,9 @@ const no = ({
|
|
|
3531
3538
|
return me(t) || d ? null : /* @__PURE__ */ u(be, { children: [
|
|
3532
3539
|
/* @__PURE__ */ u(rn, { children: [
|
|
3533
3540
|
/* @__PURE__ */ r(an, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ u(_, { variant: "ghost", size: "sm", className: "gap-2", children: [
|
|
3534
|
-
/* @__PURE__ */ r(
|
|
3541
|
+
/* @__PURE__ */ r(Vi, { className: "w-4 h-4" }),
|
|
3535
3542
|
te(qe, a, a),
|
|
3536
|
-
/* @__PURE__ */ r(
|
|
3543
|
+
/* @__PURE__ */ r(Ir, { className: "w-4 h-4" })
|
|
3537
3544
|
] }) }),
|
|
3538
3545
|
/* @__PURE__ */ u(ln, { className: "border-border space-y-1", children: [
|
|
3539
3546
|
Fe(
|
|
@@ -3541,7 +3548,7 @@ const no = ({
|
|
|
3541
3548
|
(p) => /* @__PURE__ */ u(
|
|
3542
3549
|
De,
|
|
3543
3550
|
{
|
|
3544
|
-
className:
|
|
3551
|
+
className: si(
|
|
3545
3552
|
"flex cursor-pointer items-center justify-between text-xs font-medium text-gray-800",
|
|
3546
3553
|
p.key === a && "!bg-gray-200 text-gray-700"
|
|
3547
3554
|
),
|
|
@@ -3553,7 +3560,7 @@ const no = ({
|
|
|
3553
3560
|
{
|
|
3554
3561
|
className: "text-[9px] flex items-center gap-x-1 text-orange-500 leading-none",
|
|
3555
3562
|
children: [
|
|
3556
|
-
/* @__PURE__ */ r(
|
|
3563
|
+
/* @__PURE__ */ r(ji, { fill: "orange", className: "w-2 h-2" }),
|
|
3557
3564
|
"Primary"
|
|
3558
3565
|
]
|
|
3559
3566
|
}
|
|
@@ -3564,7 +3571,7 @@ const no = ({
|
|
|
3564
3571
|
)
|
|
3565
3572
|
),
|
|
3566
3573
|
!me(w.filter((p) => !p.isLangPageAdded)) && /* @__PURE__ */ u(be, { children: [
|
|
3567
|
-
/* @__PURE__ */ r(
|
|
3574
|
+
/* @__PURE__ */ r(vi, {}),
|
|
3568
3575
|
/* @__PURE__ */ u(
|
|
3569
3576
|
_,
|
|
3570
3577
|
{
|
|
@@ -3581,7 +3588,7 @@ const no = ({
|
|
|
3581
3588
|
},
|
|
3582
3589
|
className: "hover:bg-slate-300 duration-200 font-normal text-xs hover:text-slate-800",
|
|
3583
3590
|
children: [
|
|
3584
|
-
/* @__PURE__ */ r(
|
|
3591
|
+
/* @__PURE__ */ r(ps, { className: "w-3 h-3 mr-1" }),
|
|
3585
3592
|
" Add Langauge"
|
|
3586
3593
|
]
|
|
3587
3594
|
}
|
|
@@ -3590,7 +3597,7 @@ const no = ({
|
|
|
3590
3597
|
] })
|
|
3591
3598
|
] }),
|
|
3592
3599
|
l && /* @__PURE__ */ r(
|
|
3593
|
-
|
|
3600
|
+
Kr,
|
|
3594
3601
|
{
|
|
3595
3602
|
languages: t,
|
|
3596
3603
|
langProps: l,
|
|
@@ -3599,14 +3606,14 @@ const no = ({
|
|
|
3599
3606
|
)
|
|
3600
3607
|
] });
|
|
3601
3608
|
};
|
|
3602
|
-
function
|
|
3609
|
+
function fo() {
|
|
3603
3610
|
return /* @__PURE__ */ u("div", { className: "flex relative z-10 items-center justify-end gap-1", children: [
|
|
3604
|
-
/* @__PURE__ */ r(
|
|
3605
|
-
/* @__PURE__ */ r(
|
|
3606
|
-
/* @__PURE__ */ r(
|
|
3611
|
+
/* @__PURE__ */ r(uo, {}),
|
|
3612
|
+
/* @__PURE__ */ r(ho, {}),
|
|
3613
|
+
/* @__PURE__ */ r(mo, {})
|
|
3607
3614
|
] });
|
|
3608
3615
|
}
|
|
3609
|
-
function
|
|
3616
|
+
function go(e) {
|
|
3610
3617
|
const t = Q(), n = $();
|
|
3611
3618
|
return Ne({
|
|
3612
3619
|
queryKey: [ke, "revisions", e],
|
|
@@ -3619,7 +3626,7 @@ function ho(e) {
|
|
|
3619
3626
|
staleTime: 0
|
|
3620
3627
|
});
|
|
3621
3628
|
}
|
|
3622
|
-
const
|
|
3629
|
+
const po = () => {
|
|
3623
3630
|
const e = Q(), t = $(), n = Se();
|
|
3624
3631
|
return Ae({
|
|
3625
3632
|
mutationFn: async (s) => await t(e, {
|
|
@@ -3630,7 +3637,7 @@ const mo = () => {
|
|
|
3630
3637
|
n.invalidateQueries({ queryKey: ["revisions"] });
|
|
3631
3638
|
}
|
|
3632
3639
|
});
|
|
3633
|
-
},
|
|
3640
|
+
}, yo = () => {
|
|
3634
3641
|
const e = Q(), t = $(), n = Se();
|
|
3635
3642
|
return Ae({
|
|
3636
3643
|
mutationFn: async ({
|
|
@@ -3645,48 +3652,48 @@ const mo = () => {
|
|
|
3645
3652
|
}
|
|
3646
3653
|
});
|
|
3647
3654
|
};
|
|
3648
|
-
function
|
|
3649
|
-
const { data: e } =
|
|
3655
|
+
function vo() {
|
|
3656
|
+
const { data: e } = Re(), { saveState: t } = rr(), [n] = ws();
|
|
3650
3657
|
return e ? /* @__PURE__ */ r("div", { className: "flex items-start gap-3 rounded-md border p-2 hover:bg-accent/50 bg-primary/5 mb-4", children: /* @__PURE__ */ u("div", { className: "flex-1 space-y-1", children: [
|
|
3651
3658
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ r("p", { className: "text-sm flex items-center gap-1 font-medium leading-none", children: /* @__PURE__ */ r("span", { className: "font-bold", children: "Currently editing" }) }) }),
|
|
3652
3659
|
/* @__PURE__ */ r("div", { className: "flex items-center text-xs text-muted-foreground", children: !me(n.lastSaved) && /* @__PURE__ */ u("span", { children: [
|
|
3653
3660
|
"Last updated",
|
|
3654
3661
|
" ",
|
|
3655
|
-
|
|
3662
|
+
ll(new Date(n.lastSaved), {
|
|
3656
3663
|
addSuffix: !0
|
|
3657
3664
|
})
|
|
3658
3665
|
] }) }),
|
|
3659
3666
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-2 pt-0.5", children: [
|
|
3660
3667
|
/* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-amber-500/10 px-1.5 py-0.5 text-xs text-amber-600", children: [
|
|
3661
|
-
/* @__PURE__ */ r(
|
|
3668
|
+
/* @__PURE__ */ r(Yi, { className: "h-3 w-3" }),
|
|
3662
3669
|
/* @__PURE__ */ r("span", { children: "Draft" })
|
|
3663
3670
|
] }),
|
|
3664
3671
|
t === "UNSAVED" ? /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-red-500/10 px-1.5 py-0.5 text-xs text-red-600", children: [
|
|
3665
|
-
/* @__PURE__ */ r(
|
|
3672
|
+
/* @__PURE__ */ r(Lr, { className: "h-3 w-3" }),
|
|
3666
3673
|
/* @__PURE__ */ r("span", { children: " Unsaved changes" })
|
|
3667
3674
|
] }) : null
|
|
3668
3675
|
] })
|
|
3669
3676
|
] }) }) : null;
|
|
3670
3677
|
}
|
|
3671
|
-
function
|
|
3672
|
-
const [e, t] = ce.useState(!1), [n, s] = ce.useState(null), [a, i] = ce.useState(!1), [l, o] = ce.useState(!1), { data: c } =
|
|
3678
|
+
function Eo() {
|
|
3679
|
+
const [e, t] = ce.useState(!1), [n, s] = ce.useState(null), [a, i] = ce.useState(!1), [l, o] = ce.useState(!1), { data: c } = Re(), {
|
|
3673
3680
|
data: h,
|
|
3674
3681
|
isFetching: g,
|
|
3675
3682
|
error: d,
|
|
3676
3683
|
refetch: w
|
|
3677
|
-
} =
|
|
3684
|
+
} = go(c == null ? void 0 : c.id), { mutate: y, isPending: p } = po(), { mutate: S, isPending: v } = yo(), x = Se(), G = (U) => {
|
|
3678
3685
|
n && S(
|
|
3679
|
-
{ revisionId: n.uid, discardCurrent:
|
|
3686
|
+
{ revisionId: n.uid, discardCurrent: U },
|
|
3680
3687
|
{
|
|
3681
3688
|
onSuccess: () => {
|
|
3682
3689
|
i(!1), s(null), x.invalidateQueries({ queryKey: [I.GET_DRAFT_PAGE] });
|
|
3683
3690
|
}
|
|
3684
3691
|
}
|
|
3685
3692
|
);
|
|
3686
|
-
}, E = (
|
|
3687
|
-
s(
|
|
3688
|
-
}, b = (
|
|
3689
|
-
s(
|
|
3693
|
+
}, E = (U) => {
|
|
3694
|
+
s(U), i(!0);
|
|
3695
|
+
}, b = (U) => {
|
|
3696
|
+
s(U), o(!0);
|
|
3690
3697
|
}, T = () => {
|
|
3691
3698
|
n && y(n.uid, {
|
|
3692
3699
|
onSuccess: () => {
|
|
@@ -3697,49 +3704,49 @@ function po() {
|
|
|
3697
3704
|
return we(() => {
|
|
3698
3705
|
e && w();
|
|
3699
3706
|
}, [e, w]), /* @__PURE__ */ u(be, { children: [
|
|
3700
|
-
/* @__PURE__ */ r(
|
|
3701
|
-
/* @__PURE__ */ u(
|
|
3702
|
-
/* @__PURE__ */ r(
|
|
3707
|
+
/* @__PURE__ */ r(Sr, { children: /* @__PURE__ */ u(ms, { children: [
|
|
3708
|
+
/* @__PURE__ */ u(vr, { open: e, onOpenChange: t, children: [
|
|
3709
|
+
/* @__PURE__ */ r(Ei, { asChild: !0, children: /* @__PURE__ */ r(fs, { asChild: !0, children: /* @__PURE__ */ u("span", { className: "flex items-center gap-2", children: [
|
|
3703
3710
|
/* @__PURE__ */ u(_, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
|
|
3704
|
-
/* @__PURE__ */ r(
|
|
3711
|
+
/* @__PURE__ */ r(Rs, { className: "h-4 w-4" }),
|
|
3705
3712
|
/* @__PURE__ */ r("span", { className: "sr-only", children: "View revision history" })
|
|
3706
3713
|
] }),
|
|
3707
3714
|
/* @__PURE__ */ r("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
|
|
3708
3715
|
] }) }) }),
|
|
3709
|
-
/* @__PURE__ */ u(
|
|
3710
|
-
/* @__PURE__ */ u(
|
|
3711
|
-
/* @__PURE__ */ u(
|
|
3712
|
-
/* @__PURE__ */ r(
|
|
3716
|
+
/* @__PURE__ */ u(Er, { className: "sm:max-w-md p-4", children: [
|
|
3717
|
+
/* @__PURE__ */ u(br, { className: "pb-2", children: [
|
|
3718
|
+
/* @__PURE__ */ u(wr, { className: "flex items-center gap-2", children: [
|
|
3719
|
+
/* @__PURE__ */ r(Rs, { className: "h-5 w-5" }),
|
|
3713
3720
|
"Revision History"
|
|
3714
3721
|
] }),
|
|
3715
3722
|
(c == null ? void 0 : c.createdAt) && /* @__PURE__ */ u("p", { className: "text-xs text-muted-foreground mt-1", children: [
|
|
3716
3723
|
"Page created on",
|
|
3717
3724
|
" ",
|
|
3718
|
-
|
|
3725
|
+
Gn(
|
|
3719
3726
|
new Date(c.createdAt),
|
|
3720
3727
|
"MMM d, yyyy 'at' h:mm a"
|
|
3721
3728
|
)
|
|
3722
3729
|
] })
|
|
3723
3730
|
] }),
|
|
3724
|
-
/* @__PURE__ */ r(
|
|
3725
|
-
/* @__PURE__ */ r(
|
|
3726
|
-
h == null ? void 0 : h.map((
|
|
3727
|
-
|
|
3731
|
+
/* @__PURE__ */ r(bi, { className: "h-[calc(100vh-6rem)] pr-2", children: g ? /* @__PURE__ */ r(bo, {}) : d ? /* @__PURE__ */ r("div", { className: "p-4 text-center text-sm text-muted-foreground", children: "Failed to load revisions. Please try again." }) : /* @__PURE__ */ u("div", { className: "mt-2 space-y-2", children: [
|
|
3732
|
+
/* @__PURE__ */ r(vo, {}),
|
|
3733
|
+
h == null ? void 0 : h.map((U) => /* @__PURE__ */ r(
|
|
3734
|
+
wo,
|
|
3728
3735
|
{
|
|
3729
|
-
revision:
|
|
3730
|
-
isLatest:
|
|
3731
|
-
onRestore: () => E(
|
|
3732
|
-
onDelete: () => b(
|
|
3736
|
+
revision: U,
|
|
3737
|
+
isLatest: U.uid === "current",
|
|
3738
|
+
onRestore: () => E(U),
|
|
3739
|
+
onDelete: () => b(U)
|
|
3733
3740
|
},
|
|
3734
|
-
|
|
3741
|
+
U.uid
|
|
3735
3742
|
))
|
|
3736
3743
|
] }) })
|
|
3737
3744
|
] })
|
|
3738
3745
|
] }),
|
|
3739
|
-
/* @__PURE__ */ r(
|
|
3746
|
+
/* @__PURE__ */ r(gs, { side: "bottom", children: /* @__PURE__ */ r("p", { children: "Revision history" }) })
|
|
3740
3747
|
] }) }),
|
|
3741
3748
|
/* @__PURE__ */ r(
|
|
3742
|
-
|
|
3749
|
+
No,
|
|
3743
3750
|
{
|
|
3744
3751
|
open: a,
|
|
3745
3752
|
onOpenChange: i,
|
|
@@ -3749,7 +3756,7 @@ function po() {
|
|
|
3749
3756
|
}
|
|
3750
3757
|
),
|
|
3751
3758
|
/* @__PURE__ */ r(
|
|
3752
|
-
|
|
3759
|
+
Ao,
|
|
3753
3760
|
{
|
|
3754
3761
|
open: l,
|
|
3755
3762
|
onOpenChange: o,
|
|
@@ -3760,7 +3767,7 @@ function po() {
|
|
|
3760
3767
|
)
|
|
3761
3768
|
] });
|
|
3762
3769
|
}
|
|
3763
|
-
function
|
|
3770
|
+
function bo() {
|
|
3764
3771
|
return /* @__PURE__ */ r("div", { className: "space-y-2 mt-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ u("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
|
|
3765
3772
|
/* @__PURE__ */ u("div", { className: "flex-1 space-y-1", children: [
|
|
3766
3773
|
/* @__PURE__ */ r(fn, { className: "h-4 w-3/4" }),
|
|
@@ -3770,7 +3777,7 @@ function yo() {
|
|
|
3770
3777
|
/* @__PURE__ */ r(fn, { className: "h-8 w-8 rounded-full" })
|
|
3771
3778
|
] }, t)) });
|
|
3772
3779
|
}
|
|
3773
|
-
function
|
|
3780
|
+
function wo({
|
|
3774
3781
|
revision: e,
|
|
3775
3782
|
isLatest: t,
|
|
3776
3783
|
onRestore: n,
|
|
@@ -3791,12 +3798,12 @@ function vo({
|
|
|
3791
3798
|
"Live"
|
|
3792
3799
|
] })
|
|
3793
3800
|
] }) }),
|
|
3794
|
-
/* @__PURE__ */ r("div", { className: "flex items-center text-xs text-muted-foreground", children: /* @__PURE__ */ r("span", { children:
|
|
3801
|
+
/* @__PURE__ */ r("div", { className: "flex items-center text-xs text-muted-foreground", children: /* @__PURE__ */ r("span", { children: Gn(e.createdAt, "MMM d, h:mm a") }) }),
|
|
3795
3802
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 pt-0.5", children: e.type === "published" ? /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-green-500/10 px-1.5 py-0.5 text-xs text-green-600", children: [
|
|
3796
|
-
/* @__PURE__ */ r(
|
|
3803
|
+
/* @__PURE__ */ r($i, { className: "h-3 w-3" }),
|
|
3797
3804
|
/* @__PURE__ */ r("span", { children: "Published" })
|
|
3798
3805
|
] }) : /* @__PURE__ */ u("div", { className: "flex items-center gap-1 rounded-full bg-amber-500/10 px-1.5 py-0.5 text-xs text-amber-600", children: [
|
|
3799
|
-
/* @__PURE__ */ r(
|
|
3806
|
+
/* @__PURE__ */ r(zi, { className: "h-3 w-3" }),
|
|
3800
3807
|
/* @__PURE__ */ r("span", { children: "Draft" })
|
|
3801
3808
|
] }) })
|
|
3802
3809
|
] }),
|
|
@@ -3808,7 +3815,7 @@ function vo({
|
|
|
3808
3815
|
ue.DELETE_REVISION
|
|
3809
3816
|
],
|
|
3810
3817
|
children: /* @__PURE__ */ r(
|
|
3811
|
-
|
|
3818
|
+
So,
|
|
3812
3819
|
{
|
|
3813
3820
|
revision: e,
|
|
3814
3821
|
onRestore: n,
|
|
@@ -3819,30 +3826,30 @@ function vo({
|
|
|
3819
3826
|
)
|
|
3820
3827
|
] });
|
|
3821
3828
|
}
|
|
3822
|
-
function
|
|
3829
|
+
function So({
|
|
3823
3830
|
revision: e,
|
|
3824
3831
|
onRestore: t,
|
|
3825
3832
|
onDelete: n
|
|
3826
3833
|
}) {
|
|
3827
3834
|
return /* @__PURE__ */ u(rn, { children: [
|
|
3828
3835
|
/* @__PURE__ */ r(an, { asChild: !0, children: /* @__PURE__ */ u(_, { variant: "ghost", size: "icon", className: "h-7 w-7 -mr-1", children: [
|
|
3829
|
-
/* @__PURE__ */ r(
|
|
3836
|
+
/* @__PURE__ */ r(ys, { className: "h-4 w-4" }),
|
|
3830
3837
|
/* @__PURE__ */ r("span", { className: "sr-only", children: "More options" })
|
|
3831
3838
|
] }) }),
|
|
3832
3839
|
/* @__PURE__ */ u(ln, { align: "end", className: "text-xs", children: [
|
|
3833
3840
|
/* @__PURE__ */ r(Oe, { permission: ue.RESTORE_REVISION, children: /* @__PURE__ */ u(De, { onClick: t, className: "cursor-pointer", children: [
|
|
3834
|
-
/* @__PURE__ */ r(
|
|
3841
|
+
/* @__PURE__ */ r(kr, { className: "mr-2 h-4 w-4" }),
|
|
3835
3842
|
/* @__PURE__ */ r("span", { children: "Restore this version" })
|
|
3836
3843
|
] }) }),
|
|
3837
3844
|
/* @__PURE__ */ r(Oe, { permission: ue.DELETE_REVISION, children: e.uid !== "current" && /* @__PURE__ */ u(be, { children: [
|
|
3838
|
-
/* @__PURE__ */ r(
|
|
3845
|
+
/* @__PURE__ */ r(wi, {}),
|
|
3839
3846
|
/* @__PURE__ */ u(
|
|
3840
3847
|
De,
|
|
3841
3848
|
{
|
|
3842
3849
|
onClick: n,
|
|
3843
3850
|
className: "cursor-pointer text-destructive",
|
|
3844
3851
|
children: [
|
|
3845
|
-
/* @__PURE__ */ r(
|
|
3852
|
+
/* @__PURE__ */ r(vs, { className: "mr-2 h-4 w-4" }),
|
|
3846
3853
|
/* @__PURE__ */ r("span", { children: "Delete this version" })
|
|
3847
3854
|
]
|
|
3848
3855
|
}
|
|
@@ -3851,7 +3858,7 @@ function Eo({
|
|
|
3851
3858
|
] })
|
|
3852
3859
|
] });
|
|
3853
3860
|
}
|
|
3854
|
-
function
|
|
3861
|
+
function No({
|
|
3855
3862
|
open: e,
|
|
3856
3863
|
onOpenChange: t,
|
|
3857
3864
|
revision: n,
|
|
@@ -3874,7 +3881,7 @@ function bo({
|
|
|
3874
3881
|
n.uid.substring(0, 8),
|
|
3875
3882
|
" ",
|
|
3876
3883
|
"from ",
|
|
3877
|
-
|
|
3884
|
+
Gn(n.createdAt, "MMM d, yyyy 'at' h:mm a"),
|
|
3878
3885
|
" by",
|
|
3879
3886
|
" ",
|
|
3880
3887
|
l
|
|
@@ -3893,7 +3900,7 @@ function bo({
|
|
|
3893
3900
|
/* @__PURE__ */ r("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
|
|
3894
3901
|
"Saving as draft..."
|
|
3895
3902
|
] }) : /* @__PURE__ */ u(be, { children: [
|
|
3896
|
-
/* @__PURE__ */ r(
|
|
3903
|
+
/* @__PURE__ */ r(Wi, { className: "mr-2 h-4 w-4" }),
|
|
3897
3904
|
"Save as draft"
|
|
3898
3905
|
] })
|
|
3899
3906
|
}
|
|
@@ -3909,7 +3916,7 @@ function bo({
|
|
|
3909
3916
|
/* @__PURE__ */ r("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
|
|
3910
3917
|
"Discarding current..."
|
|
3911
3918
|
] }) : /* @__PURE__ */ u(be, { children: [
|
|
3912
|
-
/* @__PURE__ */ r(
|
|
3919
|
+
/* @__PURE__ */ r(kr, { className: "mr-2 h-4 w-4" }),
|
|
3913
3920
|
"Discard current"
|
|
3914
3921
|
] })
|
|
3915
3922
|
}
|
|
@@ -3919,7 +3926,7 @@ function bo({
|
|
|
3919
3926
|
}
|
|
3920
3927
|
) : null;
|
|
3921
3928
|
}
|
|
3922
|
-
function
|
|
3929
|
+
function Ao({
|
|
3923
3930
|
open: e,
|
|
3924
3931
|
onOpenChange: t,
|
|
3925
3932
|
revision: n,
|
|
@@ -3942,7 +3949,7 @@ function wo({
|
|
|
3942
3949
|
n.uid.substring(0, 8),
|
|
3943
3950
|
" from",
|
|
3944
3951
|
" ",
|
|
3945
|
-
|
|
3952
|
+
Gn(n.createdAt, "MMM d, yyyy 'at' h:mm a"),
|
|
3946
3953
|
" by",
|
|
3947
3954
|
" ",
|
|
3948
3955
|
l
|
|
@@ -3971,7 +3978,7 @@ function wo({
|
|
|
3971
3978
|
/* @__PURE__ */ r("span", { className: "mr-2 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent" }),
|
|
3972
3979
|
"Deleting..."
|
|
3973
3980
|
] }) : /* @__PURE__ */ u(be, { children: [
|
|
3974
|
-
/* @__PURE__ */ r(
|
|
3981
|
+
/* @__PURE__ */ r(vs, { className: "mr-2 h-4 w-4" }),
|
|
3975
3982
|
"Delete Revision"
|
|
3976
3983
|
] })
|
|
3977
3984
|
}
|
|
@@ -3981,57 +3988,57 @@ function wo({
|
|
|
3981
3988
|
}
|
|
3982
3989
|
) : null;
|
|
3983
3990
|
}
|
|
3984
|
-
const
|
|
3991
|
+
const xo = () => {
|
|
3985
3992
|
const e = Q(), t = $();
|
|
3986
3993
|
return Ne({
|
|
3987
3994
|
queryKey: [ke, I.GET_CHANGES],
|
|
3988
3995
|
queryFn: async () => t(e, { action: I.GET_CHANGES })
|
|
3989
3996
|
});
|
|
3990
|
-
},
|
|
3997
|
+
}, To = ({ currentEditor: e }) => {
|
|
3991
3998
|
const { data: t } = dn(e);
|
|
3992
3999
|
return t == null ? void 0 : t.name;
|
|
3993
4000
|
};
|
|
3994
|
-
function
|
|
4001
|
+
function Co({
|
|
3995
4002
|
showModal: e = !1,
|
|
3996
4003
|
onClose: t = () => console.log("Cancelled")
|
|
3997
4004
|
}) {
|
|
3998
|
-
const [n, s] = P([]), { data: a, isFetching: i } =
|
|
4005
|
+
const [n, s] = P([]), { data: a, isFetching: i } = xo(), { data: l } = Ie(), o = _e(
|
|
3999
4006
|
(b) => {
|
|
4000
4007
|
var T;
|
|
4001
4008
|
return (T = fe(l, { key: b })) == null ? void 0 : T.hasSlug;
|
|
4002
4009
|
},
|
|
4003
4010
|
[l]
|
|
4004
|
-
), c =
|
|
4011
|
+
), c = W(
|
|
4005
4012
|
() => Te(l, (b) => !o(b.key)).map(
|
|
4006
4013
|
(b) => b.key
|
|
4007
4014
|
),
|
|
4008
4015
|
[o, l]
|
|
4009
|
-
), h =
|
|
4016
|
+
), h = W(
|
|
4010
4017
|
() => Te(a, (b) => !c.includes(b.pageType)),
|
|
4011
4018
|
[a, c]
|
|
4012
|
-
), g =
|
|
4019
|
+
), g = W(
|
|
4013
4020
|
() => Te(a, (b) => c.includes(b.pageType)),
|
|
4014
4021
|
[a, c]
|
|
4015
|
-
), d =
|
|
4022
|
+
), d = W(
|
|
4016
4023
|
() => fe(a, { pageType: "theme", id: "THEME" }),
|
|
4017
4024
|
[a]
|
|
4018
|
-
), { mutate: w, isPending: y } =
|
|
4025
|
+
), { mutate: w, isPending: y } = Ns();
|
|
4019
4026
|
we(() => {
|
|
4020
4027
|
const b = Fe(Te(a, { online: !0 }), "id");
|
|
4021
4028
|
d && b.push(d == null ? void 0 : d.id), s(b);
|
|
4022
4029
|
}, [a, d]);
|
|
4023
4030
|
const p = n.length === (a == null ? void 0 : a.length), S = (b) => {
|
|
4024
4031
|
s(
|
|
4025
|
-
(T) => Mt(T, b) ? Te(T, (
|
|
4032
|
+
(T) => Mt(T, b) ? Te(T, (U) => U !== b) : Zs(T, b)
|
|
4026
4033
|
);
|
|
4027
4034
|
}, v = () => {
|
|
4028
4035
|
s(p ? [] : Fe(a, "id"));
|
|
4029
4036
|
}, x = () => {
|
|
4030
4037
|
w(
|
|
4031
|
-
{ ids:
|
|
4038
|
+
{ ids: Ka(n) },
|
|
4032
4039
|
{
|
|
4033
4040
|
onSuccess: () => {
|
|
4034
|
-
t(),
|
|
4041
|
+
t(), Tn("CENTER_CENTER");
|
|
4035
4042
|
}
|
|
4036
4043
|
}
|
|
4037
4044
|
);
|
|
@@ -4039,7 +4046,7 @@ function Ao({
|
|
|
4039
4046
|
if (b === "theme") return "Theme";
|
|
4040
4047
|
const T = fe(l, { key: b });
|
|
4041
4048
|
return T ? T == null ? void 0 : T.name : b;
|
|
4042
|
-
}, E =
|
|
4049
|
+
}, E = W(() => {
|
|
4043
4050
|
const b = [
|
|
4044
4051
|
{ label: "Updated", top: "pt-2" },
|
|
4045
4052
|
...mn(Te(h, { online: !0 }), "pageType"),
|
|
@@ -4048,8 +4055,8 @@ function Ao({
|
|
|
4048
4055
|
{ label: "Offline", top: "pt-6" },
|
|
4049
4056
|
...mn(Te(h, { online: !1 }), "pageType"),
|
|
4050
4057
|
...mn(Te(g, { online: !1 }), "pageType")
|
|
4051
|
-
],
|
|
4052
|
-
return [...b, ...
|
|
4058
|
+
], U = d ? [{ label: "Theme", top: "pt-6" }, d] : [];
|
|
4059
|
+
return [...b, ...U, ...T];
|
|
4053
4060
|
}, [h, g, d]);
|
|
4054
4061
|
return /* @__PURE__ */ r(He, { open: e, onOpenChange: y ? () => {
|
|
4055
4062
|
} : t, children: /* @__PURE__ */ u(Ke, { className: "max-w-4xl max-h-[80%] flex flex-col", children: [
|
|
@@ -4124,7 +4131,7 @@ function Ao({
|
|
|
4124
4131
|
}
|
|
4125
4132
|
),
|
|
4126
4133
|
" ",
|
|
4127
|
-
o(b.pageType) ? /* @__PURE__ */ r(on, { className: "w-4 h-4" }) : /* @__PURE__ */ r(
|
|
4134
|
+
o(b.pageType) ? /* @__PURE__ */ r(on, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Qi, { className: "w-4 h-4" }),
|
|
4128
4135
|
b.name,
|
|
4129
4136
|
b.slug && /* @__PURE__ */ u("span", { className: "text-xs text-gray-500", children: [
|
|
4130
4137
|
"(",
|
|
@@ -4136,7 +4143,7 @@ function Ao({
|
|
|
4136
4143
|
"-",
|
|
4137
4144
|
" ",
|
|
4138
4145
|
/* @__PURE__ */ r(
|
|
4139
|
-
|
|
4146
|
+
To,
|
|
4140
4147
|
{
|
|
4141
4148
|
currentEditor: b.currentEditor
|
|
4142
4149
|
}
|
|
@@ -4149,7 +4156,7 @@ function Ao({
|
|
|
4149
4156
|
),
|
|
4150
4157
|
/* @__PURE__ */ r("td", { className: "px-2", children: b.lang }),
|
|
4151
4158
|
/* @__PURE__ */ r("td", { className: "px-2", children: G(b == null ? void 0 : b.pageType) }),
|
|
4152
|
-
/* @__PURE__ */ r("td", { className: "px-4 text-right", children:
|
|
4159
|
+
/* @__PURE__ */ r("td", { className: "px-4 text-right", children: Ha(b.changes) || "" })
|
|
4153
4160
|
]
|
|
4154
4161
|
},
|
|
4155
4162
|
b == null ? void 0 : b.id
|
|
@@ -4169,7 +4176,7 @@ function Ao({
|
|
|
4169
4176
|
] })
|
|
4170
4177
|
] }) });
|
|
4171
4178
|
}
|
|
4172
|
-
const
|
|
4179
|
+
const Po = () => {
|
|
4173
4180
|
const e = $(), t = Q();
|
|
4174
4181
|
return Ne({
|
|
4175
4182
|
queryKey: [I.GET_WEBSITE_DATA],
|
|
@@ -4180,8 +4187,8 @@ const xo = () => {
|
|
|
4180
4187
|
})
|
|
4181
4188
|
});
|
|
4182
4189
|
};
|
|
4183
|
-
function
|
|
4184
|
-
const { data: t, isFetching: n } =
|
|
4190
|
+
function _o({ onClose: e }) {
|
|
4191
|
+
const { data: t, isFetching: n } = Po(), { mutateAsync: s, isPending: a } = wl(), i = dt("settingComponent", null), l = Va(async (o) => (await s({ data: o }), !0), 300);
|
|
4185
4192
|
return i ? /* @__PURE__ */ r(He, { open: !0, onOpenChange: e, children: /* @__PURE__ */ u(Ke, { className: "w-full", children: [
|
|
4186
4193
|
/* @__PURE__ */ r(Ve, { children: /* @__PURE__ */ r(je, { children: "Website Settings" }) }),
|
|
4187
4194
|
n ? /* @__PURE__ */ u("div", { className: "w-full space-y-3 py-4", children: [
|
|
@@ -4191,7 +4198,7 @@ function To({ onClose: e }) {
|
|
|
4191
4198
|
/* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
|
|
4192
4199
|
/* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" }),
|
|
4193
4200
|
/* @__PURE__ */ r("div", { className: "w-full h-8 rounded bg-gray-300 animate-pulse" })
|
|
4194
|
-
] }) : /* @__PURE__ */ r("div", { children:
|
|
4201
|
+
] }) : /* @__PURE__ */ r("div", { children: tr.createElement(i, {
|
|
4195
4202
|
data: t || {},
|
|
4196
4203
|
onSave: a ? () => {
|
|
4197
4204
|
} : l,
|
|
@@ -4200,17 +4207,17 @@ function To({ onClose: e }) {
|
|
|
4200
4207
|
}) })
|
|
4201
4208
|
] }) }) : null;
|
|
4202
4209
|
}
|
|
4203
|
-
function
|
|
4210
|
+
function Vr({
|
|
4204
4211
|
children: e,
|
|
4205
4212
|
content: t
|
|
4206
4213
|
}) {
|
|
4207
|
-
return /* @__PURE__ */ r(
|
|
4208
|
-
/* @__PURE__ */ r(
|
|
4209
|
-
/* @__PURE__ */ r(
|
|
4214
|
+
return /* @__PURE__ */ r(Sr, { children: /* @__PURE__ */ u(ms, { children: [
|
|
4215
|
+
/* @__PURE__ */ r(fs, { asChild: !0, children: e }),
|
|
4216
|
+
/* @__PURE__ */ r(gs, { side: "bottom", sideOffset: 10, children: /* @__PURE__ */ r("p", { children: t }) })
|
|
4210
4217
|
] }) });
|
|
4211
4218
|
}
|
|
4212
|
-
const
|
|
4213
|
-
const { selectedLang: e } = ut(), t = dt("getPreviewUrl", async (g) => g), [n, s] = P(""), { data: a, isFetching: i } =
|
|
4219
|
+
const Io = () => {
|
|
4220
|
+
const { selectedLang: e } = ut(), t = dt("getPreviewUrl", async (g) => g), [n, s] = P(""), { data: a, isFetching: i } = Re(), { data: l } = cn(), { data: o } = Ie(), c = W(
|
|
4214
4221
|
() => {
|
|
4215
4222
|
var g;
|
|
4216
4223
|
return (g = l == null ? void 0 : l.find((d) => (d == null ? void 0 : d.lang) === e)) == null ? void 0 : g.slug;
|
|
@@ -4232,27 +4239,27 @@ const Co = () => {
|
|
|
4232
4239
|
s("");
|
|
4233
4240
|
})();
|
|
4234
4241
|
}, [t, c]), !n || !h(a == null ? void 0 : a.pageType) || i ? null : /* @__PURE__ */ r(be, { children: /* @__PURE__ */ r("a", { href: n, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ u(_, { variant: "ghost", size: "sm", className: "gap-2", children: [
|
|
4235
|
-
/* @__PURE__ */ r(
|
|
4242
|
+
/* @__PURE__ */ r(Dr, { className: "w-4 h-4" }),
|
|
4236
4243
|
" ",
|
|
4237
4244
|
B.PREVIEW
|
|
4238
4245
|
] }) }) });
|
|
4239
|
-
},
|
|
4240
|
-
const [e, t] =
|
|
4246
|
+
}, ko = () => {
|
|
4247
|
+
const [e, t] = ri();
|
|
4241
4248
|
return /* @__PURE__ */ u(be, { children: [
|
|
4242
|
-
/* @__PURE__ */ r(
|
|
4249
|
+
/* @__PURE__ */ r(Vr, { content: B.THEME, children: /* @__PURE__ */ r(
|
|
4243
4250
|
_,
|
|
4244
4251
|
{
|
|
4245
4252
|
variant: e === "theme" ? "outline" : "ghost",
|
|
4246
4253
|
size: "icon",
|
|
4247
4254
|
className: "gap-2",
|
|
4248
4255
|
onClick: () => t(e === "theme" ? "block" : "theme"),
|
|
4249
|
-
children: /* @__PURE__ */ r(
|
|
4256
|
+
children: /* @__PURE__ */ r(Xi, { className: "w-4 h-4" })
|
|
4250
4257
|
}
|
|
4251
4258
|
) }),
|
|
4252
4259
|
/* @__PURE__ */ r("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
|
|
4253
4260
|
] });
|
|
4254
|
-
},
|
|
4255
|
-
const [e, t] = P(!1), { isLocked: n } = hn(), { savePage: s, saveState: a } =
|
|
4261
|
+
}, Lo = () => {
|
|
4262
|
+
const [e, t] = P(!1), { isLocked: n } = hn(), { savePage: s, saveState: a } = rr();
|
|
4256
4263
|
we(() => {
|
|
4257
4264
|
const g = (d) => {
|
|
4258
4265
|
a === "UNSAVED" && (d.preventDefault(), d.returnValue = !1);
|
|
@@ -4267,27 +4274,27 @@ const Co = () => {
|
|
|
4267
4274
|
we(() => {
|
|
4268
4275
|
a === "SAVED" && t(!1);
|
|
4269
4276
|
}, [a]);
|
|
4270
|
-
const l =
|
|
4277
|
+
const l = W(() => {
|
|
4271
4278
|
if (a === "SAVED" || a === "UNSAVED") return a;
|
|
4272
4279
|
if (a === "SAVING") return e ? a : "SAVED";
|
|
4273
|
-
}, [e, a]), { buttonIcon: o, buttonClass: c, tooltipContent: h } =
|
|
4280
|
+
}, [e, a]), { buttonIcon: o, buttonClass: c, tooltipContent: h } = W(() => {
|
|
4274
4281
|
switch (l) {
|
|
4275
4282
|
case "UNSAVED":
|
|
4276
4283
|
return {
|
|
4277
4284
|
tooltipContent: B.SAVEDRAFT,
|
|
4278
|
-
buttonIcon: /* @__PURE__ */ r(
|
|
4285
|
+
buttonIcon: /* @__PURE__ */ r(Lr, { className: "w-4 h-4" }),
|
|
4279
4286
|
buttonClass: "flex items-center gap-x-1 leading-tight"
|
|
4280
4287
|
};
|
|
4281
4288
|
case "SAVING":
|
|
4282
4289
|
return {
|
|
4283
4290
|
tooltipContent: B.SAVING,
|
|
4284
|
-
buttonIcon: /* @__PURE__ */ r(
|
|
4291
|
+
buttonIcon: /* @__PURE__ */ r(_r, { className: "w-4 h-4 animate-spin" }),
|
|
4285
4292
|
buttonClass: "flex items-center gap-x-1 leading-tight"
|
|
4286
4293
|
};
|
|
4287
4294
|
case "SAVED":
|
|
4288
4295
|
return {
|
|
4289
4296
|
tooltipContent: B.SAVED,
|
|
4290
|
-
buttonIcon: /* @__PURE__ */ r(
|
|
4297
|
+
buttonIcon: /* @__PURE__ */ r(Zi, { className: "w-4 h-4" }),
|
|
4291
4298
|
buttonClass: "text-green-500 flex items-center gap-x-1 leading-tight"
|
|
4292
4299
|
};
|
|
4293
4300
|
}
|
|
@@ -4306,8 +4313,8 @@ const Co = () => {
|
|
|
4306
4313
|
]
|
|
4307
4314
|
}
|
|
4308
4315
|
);
|
|
4309
|
-
},
|
|
4310
|
-
const [e, t] = P(!1), [n, s] = P(!1), [a, i] = P(null), { data: l } =
|
|
4316
|
+
}, Do = () => {
|
|
4317
|
+
const [e, t] = P(!1), [n, s] = P(!1), [a, i] = P(null), { data: l } = Re(), { mutate: o, isPending: c } = Ns(), [h] = ai(), { buttonText: g, buttonClassName: d, isPublished: w } = W(() => {
|
|
4311
4318
|
const p = l && (l == null ? void 0 : l.online);
|
|
4312
4319
|
return {
|
|
4313
4320
|
buttonClassName: p ? "hover:bg-green-600 bg-green-500" : "",
|
|
@@ -4326,7 +4333,7 @@ const Co = () => {
|
|
|
4326
4333
|
const p = ((v = (S = h == null ? void 0 : h.filter((x) => (x == null ? void 0 : x._type) === "GlobalBlock")) == null ? void 0 : S.map((x) => x == null ? void 0 : x.globalBlock)) == null ? void 0 : v.filter((x) => typeof x == "string")) || [];
|
|
4327
4334
|
o(
|
|
4328
4335
|
{ ids: [l == null ? void 0 : l.id, ...p] },
|
|
4329
|
-
{ onSuccess: () =>
|
|
4336
|
+
{ onSuccess: () => Tn("TOP_RIGHT") }
|
|
4330
4337
|
);
|
|
4331
4338
|
},
|
|
4332
4339
|
disabled: c || !(l != null && l.id),
|
|
@@ -4338,14 +4345,14 @@ const Co = () => {
|
|
|
4338
4345
|
"span",
|
|
4339
4346
|
{
|
|
4340
4347
|
className: `flex items-center transition-transform duration-300 ease-in-out ${n ? "-translate-y-10" : ""}`,
|
|
4341
|
-
children: w ? /* @__PURE__ */ r(
|
|
4348
|
+
children: w ? /* @__PURE__ */ r(Os, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Bs, { className: "w-4 h-4" })
|
|
4342
4349
|
}
|
|
4343
4350
|
),
|
|
4344
4351
|
/* @__PURE__ */ r(
|
|
4345
4352
|
"span",
|
|
4346
4353
|
{
|
|
4347
4354
|
className: `absolute inset-0 flex items-center left-3 transition-transform duration-300 ease-in-out ${n ? "" : "translate-y-10"}`,
|
|
4348
|
-
children: w ? /* @__PURE__ */ r(
|
|
4355
|
+
children: w ? /* @__PURE__ */ r(Bs, { className: "w-4 h-4" }) : /* @__PURE__ */ r(Os, { className: "w-4 h-4" })
|
|
4349
4356
|
}
|
|
4350
4357
|
),
|
|
4351
4358
|
/* @__PURE__ */ r("span", { children: g })
|
|
@@ -4359,7 +4366,7 @@ const Co = () => {
|
|
|
4359
4366
|
size: "sm",
|
|
4360
4367
|
disabled: c || !(l != null && l.id),
|
|
4361
4368
|
className: `px-2 text-white border-l border-white/50 rounded-l-none ${d}`,
|
|
4362
|
-
children: /* @__PURE__ */ r(
|
|
4369
|
+
children: /* @__PURE__ */ r(Ir, { className: "w-4 h-4" })
|
|
4363
4370
|
}
|
|
4364
4371
|
) }),
|
|
4365
4372
|
/* @__PURE__ */ u(ln, { align: "end", className: "w-36", children: [
|
|
@@ -4370,7 +4377,7 @@ const Co = () => {
|
|
|
4370
4377
|
className: "text-xs cursor-pointer",
|
|
4371
4378
|
onClick: () => o(
|
|
4372
4379
|
{ ids: [l == null ? void 0 : l.id] },
|
|
4373
|
-
{ onSuccess: () =>
|
|
4380
|
+
{ onSuccess: () => Tn("TOP_RIGHT") }
|
|
4374
4381
|
),
|
|
4375
4382
|
children: [
|
|
4376
4383
|
B.PUBLISH,
|
|
@@ -4403,33 +4410,33 @@ const Co = () => {
|
|
|
4403
4410
|
] })
|
|
4404
4411
|
] })
|
|
4405
4412
|
] }),
|
|
4406
|
-
/* @__PURE__ */ r(
|
|
4413
|
+
/* @__PURE__ */ r(Co, { showModal: e, onClose: () => t(!1) }),
|
|
4407
4414
|
a && /* @__PURE__ */ r(
|
|
4408
|
-
|
|
4415
|
+
xs,
|
|
4409
4416
|
{
|
|
4410
4417
|
page: a,
|
|
4411
4418
|
onClose: () => i(null)
|
|
4412
4419
|
}
|
|
4413
4420
|
)
|
|
4414
4421
|
] });
|
|
4415
|
-
},
|
|
4422
|
+
}, Go = () => {
|
|
4416
4423
|
const e = dt("settingComponent", null), [t, n] = P(!1);
|
|
4417
4424
|
return e ? /* @__PURE__ */ u(be, { children: [
|
|
4418
|
-
/* @__PURE__ */ r(
|
|
4425
|
+
/* @__PURE__ */ r(Vr, { content: B.WEBSITEDATA, children: /* @__PURE__ */ r(
|
|
4419
4426
|
_,
|
|
4420
4427
|
{
|
|
4421
4428
|
variant: "ghost",
|
|
4422
4429
|
size: "icon",
|
|
4423
4430
|
className: "gap-2",
|
|
4424
4431
|
onClick: () => n(!0),
|
|
4425
|
-
children: /* @__PURE__ */ r(
|
|
4432
|
+
children: /* @__PURE__ */ r(Ji, { className: "w-4 h-4" })
|
|
4426
4433
|
}
|
|
4427
4434
|
) }),
|
|
4428
|
-
t && /* @__PURE__ */ r(
|
|
4435
|
+
t && /* @__PURE__ */ r(_o, { onClose: () => n(!1) }),
|
|
4429
4436
|
/* @__PURE__ */ r("div", { className: "w-px h-4 bg-gray-200 dark:bg-gray-700" })
|
|
4430
4437
|
] }) : null;
|
|
4431
|
-
},
|
|
4432
|
-
const { data: e } =
|
|
4438
|
+
}, Uo = () => {
|
|
4439
|
+
const { data: e } = Re(), t = e && (e == null ? void 0 : e.online), { data: n } = Ie();
|
|
4433
4440
|
return _e(
|
|
4434
4441
|
(a) => {
|
|
4435
4442
|
var i;
|
|
@@ -4445,29 +4452,29 @@ const Co = () => {
|
|
|
4445
4452
|
size: "sm",
|
|
4446
4453
|
className: "flex items-center gap-1",
|
|
4447
4454
|
children: [
|
|
4448
|
-
/* @__PURE__ */ r(
|
|
4455
|
+
/* @__PURE__ */ r(el, { className: "w-4 h-4" }),
|
|
4449
4456
|
/* @__PURE__ */ r("span", { className: "hidden sm:inline", children: B.OPEN })
|
|
4450
4457
|
]
|
|
4451
4458
|
}
|
|
4452
4459
|
) : null;
|
|
4453
4460
|
};
|
|
4454
|
-
function
|
|
4455
|
-
const { isLocked: e } = hn(), [t] =
|
|
4461
|
+
function Ro() {
|
|
4462
|
+
const { isLocked: e } = hn(), [t] = Ue(), n = t.get("lang"), s = Br(n);
|
|
4456
4463
|
return e || !s ? null : /* @__PURE__ */ u("div", { className: "flex items-center justify-end gap-1", children: [
|
|
4457
|
-
/* @__PURE__ */ r(
|
|
4458
|
-
/* @__PURE__ */ r(Oe, { permission: ue.EDIT_THEME, children: /* @__PURE__ */ r(
|
|
4459
|
-
/* @__PURE__ */ r(Oe, { permission: ue.EDIT_SETTINGS, children: /* @__PURE__ */ r(
|
|
4460
|
-
/* @__PURE__ */ r(
|
|
4461
|
-
/* @__PURE__ */ r(Oe, { permission: ue.SAVE_PAGE, children: /* @__PURE__ */ r(
|
|
4462
|
-
/* @__PURE__ */ r(Oe, { permission: ue.PUBLISH_PAGE, children: /* @__PURE__ */ r(
|
|
4463
|
-
/* @__PURE__ */ r(
|
|
4464
|
+
/* @__PURE__ */ r(Eo, {}),
|
|
4465
|
+
/* @__PURE__ */ r(Oe, { permission: ue.EDIT_THEME, children: /* @__PURE__ */ r(ko, {}) }),
|
|
4466
|
+
/* @__PURE__ */ r(Oe, { permission: ue.EDIT_SETTINGS, children: /* @__PURE__ */ r(Go, {}) }),
|
|
4467
|
+
/* @__PURE__ */ r(Io, {}),
|
|
4468
|
+
/* @__PURE__ */ r(Oe, { permission: ue.SAVE_PAGE, children: /* @__PURE__ */ r(Lo, {}) }),
|
|
4469
|
+
/* @__PURE__ */ r(Oe, { permission: ue.PUBLISH_PAGE, children: /* @__PURE__ */ r(Do, {}) }),
|
|
4470
|
+
/* @__PURE__ */ r(Uo, {})
|
|
4464
4471
|
] });
|
|
4465
4472
|
}
|
|
4466
|
-
const
|
|
4467
|
-
/* @__PURE__ */ r(
|
|
4468
|
-
/* @__PURE__ */ r(
|
|
4469
|
-
] }),
|
|
4470
|
-
const e = Q(), { aiContext: t } =
|
|
4473
|
+
const Oo = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-center justify-between w-full", children: [
|
|
4474
|
+
/* @__PURE__ */ r(fo, {}),
|
|
4475
|
+
/* @__PURE__ */ r(Ro, {})
|
|
4476
|
+
] }), Bo = () => {
|
|
4477
|
+
const e = Q(), { aiContext: t } = bs(), n = $();
|
|
4471
4478
|
return _e(
|
|
4472
4479
|
async (s, a, i, l) => n(e, {
|
|
4473
4480
|
action: I.ASK_AI,
|
|
@@ -4475,35 +4482,35 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4475
4482
|
}),
|
|
4476
4483
|
[e, t, n]
|
|
4477
4484
|
);
|
|
4478
|
-
},
|
|
4485
|
+
}, Mo = (e, t) => t.map((n) => {
|
|
4479
4486
|
if (nn(e, n._type)) {
|
|
4480
|
-
const s =
|
|
4487
|
+
const s = cl(n._type);
|
|
4481
4488
|
return {
|
|
4482
4489
|
...s,
|
|
4483
|
-
...
|
|
4484
|
-
...
|
|
4490
|
+
...er(n, [
|
|
4491
|
+
...ja(s),
|
|
4485
4492
|
"_type",
|
|
4486
4493
|
"_id",
|
|
4487
4494
|
"_name",
|
|
4488
4495
|
"_parent",
|
|
4489
4496
|
"_bindings"
|
|
4490
4497
|
]),
|
|
4491
|
-
|
|
4498
|
+
...$a(n, (a, i) => Js(i, "_attrs")),
|
|
4492
4499
|
...n
|
|
4493
4500
|
};
|
|
4494
4501
|
}
|
|
4495
4502
|
return n;
|
|
4496
|
-
}),
|
|
4497
|
-
const t =
|
|
4498
|
-
return
|
|
4503
|
+
}), Fo = (e) => {
|
|
4504
|
+
const t = ol();
|
|
4505
|
+
return W(() => {
|
|
4499
4506
|
if (!e || me(e)) return { blocks: [] };
|
|
4500
4507
|
const n = Te(
|
|
4501
4508
|
e,
|
|
4502
4509
|
(s) => !Mt(s == null ? void 0 : s._type, "@chai/")
|
|
4503
4510
|
);
|
|
4504
|
-
return { blocks:
|
|
4511
|
+
return { blocks: Mo(t, n) };
|
|
4505
4512
|
}, [e, t]);
|
|
4506
|
-
},
|
|
4513
|
+
}, qo = () => {
|
|
4507
4514
|
const e = Q(), t = $();
|
|
4508
4515
|
return Ne({
|
|
4509
4516
|
queryKey: [ke, "uiLibraries"],
|
|
@@ -4512,8 +4519,8 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4512
4519
|
...s
|
|
4513
4520
|
}))
|
|
4514
4521
|
});
|
|
4515
|
-
},
|
|
4516
|
-
const e =
|
|
4522
|
+
}, Ho = () => {
|
|
4523
|
+
const e = Un(), t = $(), { user: n } = st(), s = n == null ? void 0 : n.id;
|
|
4517
4524
|
return Ne({
|
|
4518
4525
|
queryKey: [ke, "permissions", s],
|
|
4519
4526
|
queryFn: () => t(e, {
|
|
@@ -4522,14 +4529,14 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4522
4529
|
}),
|
|
4523
4530
|
enabled: !!s
|
|
4524
4531
|
});
|
|
4525
|
-
},
|
|
4526
|
-
const e = Q(), t = $(), { setCurrentEditor: n } = hn(), [, s] =
|
|
4532
|
+
}, Ko = () => {
|
|
4533
|
+
const e = Q(), t = $(), { setCurrentEditor: n } = hn(), [, s] = ws();
|
|
4527
4534
|
return { getUILibraryBlock: async (o, c) => {
|
|
4528
4535
|
const h = await t(e, {
|
|
4529
4536
|
action: "GET_LIBRARY_ITEM",
|
|
4530
4537
|
data: { id: c.id }
|
|
4531
4538
|
}), g = te(h, "html", ""), d = te(h, "blocks", []);
|
|
4532
|
-
return
|
|
4539
|
+
return za(d) ? d : ii(g);
|
|
4533
4540
|
}, getUILibraryBlocks: async (o) => {
|
|
4534
4541
|
try {
|
|
4535
4542
|
return (await t(e, {
|
|
@@ -4560,7 +4567,7 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4560
4567
|
return console.error(h), new Error("Failed to save blocks");
|
|
4561
4568
|
}
|
|
4562
4569
|
} };
|
|
4563
|
-
},
|
|
4570
|
+
}, Vo = () => {
|
|
4564
4571
|
const { data: e } = Rn(), t = Q(), n = $();
|
|
4565
4572
|
return {
|
|
4566
4573
|
getPartialBlocks: _e(async () => {
|
|
@@ -4589,16 +4596,16 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4589
4596
|
[n, t]
|
|
4590
4597
|
)
|
|
4591
4598
|
};
|
|
4592
|
-
},
|
|
4593
|
-
email:
|
|
4594
|
-
password:
|
|
4595
|
-
}),
|
|
4599
|
+
}, Fs = An.object({
|
|
4600
|
+
email: An.string().email({ message: "Please enter a valid email address" }),
|
|
4601
|
+
password: An.string().min(6, { message: "Password must be at least 6 characters" })
|
|
4602
|
+
}), jo = ({
|
|
4596
4603
|
onLoginSuccess: e
|
|
4597
4604
|
}) => {
|
|
4598
|
-
const t =
|
|
4605
|
+
const t = Un(), [n, s] = P(""), [a, i] = P(""), [l, o] = P({}), [c, h] = P(!1), [g, d] = P(""), w = Ae({
|
|
4599
4606
|
mutationFn: async (S) => {
|
|
4600
4607
|
d("");
|
|
4601
|
-
const v = await
|
|
4608
|
+
const v = await Es(t, {
|
|
4602
4609
|
action: "LOGIN",
|
|
4603
4610
|
data: S
|
|
4604
4611
|
});
|
|
@@ -4622,10 +4629,10 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4622
4629
|
S.preventDefault(), o({});
|
|
4623
4630
|
const v = { email: n, password: a };
|
|
4624
4631
|
try {
|
|
4625
|
-
const x =
|
|
4632
|
+
const x = Fs.parse(v);
|
|
4626
4633
|
w.mutate(x);
|
|
4627
4634
|
} catch (x) {
|
|
4628
|
-
if (x instanceof
|
|
4635
|
+
if (x instanceof An.ZodError) {
|
|
4629
4636
|
const G = x.errors.reduce((E, b) => {
|
|
4630
4637
|
const T = b.path[0];
|
|
4631
4638
|
return E[T] = b.message, E;
|
|
@@ -4633,13 +4640,13 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4633
4640
|
o(G);
|
|
4634
4641
|
}
|
|
4635
4642
|
}
|
|
4636
|
-
}, p =
|
|
4637
|
-
return /* @__PURE__ */ r("div", { className: "flex justify-center items-center min-h-screen bg-slate-50", children: /* @__PURE__ */ u(
|
|
4638
|
-
/* @__PURE__ */ u(
|
|
4639
|
-
/* @__PURE__ */ r(
|
|
4640
|
-
/* @__PURE__ */ r(
|
|
4643
|
+
}, p = Fs.safeParse({ email: n, password: a }).success;
|
|
4644
|
+
return /* @__PURE__ */ r("div", { className: "flex justify-center items-center min-h-screen bg-slate-50", children: /* @__PURE__ */ u(os, { className: "w-full max-w-md", children: [
|
|
4645
|
+
/* @__PURE__ */ u(cs, { children: [
|
|
4646
|
+
/* @__PURE__ */ r(us, { className: "text-2xl", children: "Sign in" }),
|
|
4647
|
+
/* @__PURE__ */ r(Si, { children: "Enter your credentials to sign in to visual builder" })
|
|
4641
4648
|
] }),
|
|
4642
|
-
/* @__PURE__ */ r(
|
|
4649
|
+
/* @__PURE__ */ r(ds, { children: /* @__PURE__ */ u("form", { onSubmit: y, className: "space-y-4", children: [
|
|
4643
4650
|
/* @__PURE__ */ u("div", { className: "space-y-1", children: [
|
|
4644
4651
|
/* @__PURE__ */ r(X, { htmlFor: "email", children: "Email" }),
|
|
4645
4652
|
/* @__PURE__ */ r(
|
|
@@ -4675,7 +4682,7 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4675
4682
|
type: "button",
|
|
4676
4683
|
className: "absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",
|
|
4677
4684
|
onClick: () => h(!c),
|
|
4678
|
-
children: c ? /* @__PURE__ */ r(
|
|
4685
|
+
children: c ? /* @__PURE__ */ r(tl, { className: "h-4 w-4" }) : /* @__PURE__ */ r(Dr, { className: "h-4 w-4" })
|
|
4679
4686
|
}
|
|
4680
4687
|
)
|
|
4681
4688
|
] }),
|
|
@@ -4689,13 +4696,13 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4689
4696
|
className: "w-full",
|
|
4690
4697
|
disabled: !p || w.isPending,
|
|
4691
4698
|
children: w.isPending ? /* @__PURE__ */ u(be, { children: [
|
|
4692
|
-
/* @__PURE__ */ r(
|
|
4699
|
+
/* @__PURE__ */ r(Gr, { className: "mr-2 h-4 w-4 animate-spin" }),
|
|
4693
4700
|
"Logging in..."
|
|
4694
4701
|
] }) : "Login"
|
|
4695
4702
|
}
|
|
4696
4703
|
)
|
|
4697
4704
|
] }) }),
|
|
4698
|
-
/* @__PURE__ */ u(
|
|
4705
|
+
/* @__PURE__ */ u(hs, { className: "flex flex-col justify-center", children: [
|
|
4699
4706
|
/* @__PURE__ */ u("p", { className: "text-sm text-muted-foreground", children: [
|
|
4700
4707
|
"Forgot your password?",
|
|
4701
4708
|
" ",
|
|
@@ -4736,28 +4743,32 @@ const Go = () => /* @__PURE__ */ u("div", { className: "flex px-2 h-full items-c
|
|
|
4736
4743
|
] })
|
|
4737
4744
|
] })
|
|
4738
4745
|
] }) });
|
|
4739
|
-
}
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4746
|
+
};
|
|
4747
|
+
let Wn = jo;
|
|
4748
|
+
const $o = () => W(() => Wn, [Wn]), Yu = (e) => {
|
|
4749
|
+
Wn = e;
|
|
4750
|
+
}, zo = () => {
|
|
4751
|
+
const { setUser: e } = st(), t = $o();
|
|
4752
|
+
return /* @__PURE__ */ r(Ya, { fallback: /* @__PURE__ */ r("div", { children: "Loading..." }), children: /* @__PURE__ */ r(
|
|
4753
|
+
t,
|
|
4743
4754
|
{
|
|
4744
|
-
onLoginSuccess: (
|
|
4745
|
-
e(
|
|
4755
|
+
onLoginSuccess: (n) => {
|
|
4756
|
+
e(n);
|
|
4746
4757
|
}
|
|
4747
4758
|
}
|
|
4748
|
-
);
|
|
4749
|
-
},
|
|
4759
|
+
) });
|
|
4760
|
+
}, Wo = ({
|
|
4750
4761
|
isActive: e,
|
|
4751
4762
|
show: t
|
|
4752
4763
|
}) => {
|
|
4753
4764
|
const { data: n } = un();
|
|
4754
|
-
return !nn(n, "languages") || !te(n, "languages", []).length ? null : /* @__PURE__ */ r(_, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ r(
|
|
4755
|
-
},
|
|
4756
|
-
id:
|
|
4765
|
+
return !nn(n, "languages") || !te(n, "languages", []).length ? null : /* @__PURE__ */ r(_, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ r(nl, { className: "w-4 h-4" }) });
|
|
4766
|
+
}, jr = "lang", Yo = {
|
|
4767
|
+
id: jr,
|
|
4757
4768
|
label: "Languages",
|
|
4758
4769
|
position: "top",
|
|
4759
|
-
panel:
|
|
4760
|
-
button:
|
|
4770
|
+
panel: Zl,
|
|
4771
|
+
button: Wo,
|
|
4761
4772
|
view: "modal",
|
|
4762
4773
|
width: 400
|
|
4763
4774
|
};
|
|
@@ -4787,9 +4798,9 @@ function Ze({
|
|
|
4787
4798
|
value: S,
|
|
4788
4799
|
type: g(S)
|
|
4789
4800
|
})).filter((p) => n === "value" ? p.type === "value" || p.type === "object" : n === "array" ? p.type === "array" || p.type === "object" : n === "object" ? p.type === "object" : !0), [c, n]);
|
|
4790
|
-
return /* @__PURE__ */ u(
|
|
4791
|
-
/* @__PURE__ */ u(
|
|
4792
|
-
/* @__PURE__ */ r(
|
|
4801
|
+
return /* @__PURE__ */ u(fr, { open: a, onOpenChange: i, children: [
|
|
4802
|
+
/* @__PURE__ */ u(ms, { children: [
|
|
4803
|
+
/* @__PURE__ */ r(fs, { asChild: !0, children: /* @__PURE__ */ r(gr, { asChild: !0, children: /* @__PURE__ */ r(
|
|
4793
4804
|
_,
|
|
4794
4805
|
{
|
|
4795
4806
|
size: "sm",
|
|
@@ -4798,29 +4809,29 @@ function Ze({
|
|
|
4798
4809
|
role: "combobox",
|
|
4799
4810
|
"aria-expanded": a,
|
|
4800
4811
|
disabled: s,
|
|
4801
|
-
children: /* @__PURE__ */ r(
|
|
4812
|
+
children: /* @__PURE__ */ r(sl, { className: "h-3 w-3" })
|
|
4802
4813
|
}
|
|
4803
4814
|
) }) }),
|
|
4804
|
-
/* @__PURE__ */ r(
|
|
4815
|
+
/* @__PURE__ */ r(gs, { children: "Add field" })
|
|
4805
4816
|
] }),
|
|
4806
|
-
/* @__PURE__ */ r(
|
|
4807
|
-
/* @__PURE__ */ r(
|
|
4808
|
-
/* @__PURE__ */ u(
|
|
4809
|
-
/* @__PURE__ */ r(
|
|
4810
|
-
/* @__PURE__ */ u(
|
|
4817
|
+
/* @__PURE__ */ r(pr, { className: "w-[200px] z-[9999] p-0", children: /* @__PURE__ */ u(Ni, { children: [
|
|
4818
|
+
/* @__PURE__ */ r(Ai, { className: "border-none", placeholder: "Search..." }),
|
|
4819
|
+
/* @__PURE__ */ u(xi, { children: [
|
|
4820
|
+
/* @__PURE__ */ r(Ti, { children: "No option found." }),
|
|
4821
|
+
/* @__PURE__ */ u(Ci, { children: [
|
|
4811
4822
|
l.length > 0 && /* @__PURE__ */ u(
|
|
4812
|
-
|
|
4823
|
+
Gs,
|
|
4813
4824
|
{
|
|
4814
4825
|
onSelect: w,
|
|
4815
4826
|
className: "flex items-center text-sm",
|
|
4816
4827
|
children: [
|
|
4817
|
-
/* @__PURE__ */ r(
|
|
4828
|
+
/* @__PURE__ */ r(rl, { className: "w-4 h-4 mr-2" }),
|
|
4818
4829
|
"Back"
|
|
4819
4830
|
]
|
|
4820
4831
|
}
|
|
4821
4832
|
),
|
|
4822
4833
|
y.map((p) => /* @__PURE__ */ u(
|
|
4823
|
-
|
|
4834
|
+
Gs,
|
|
4824
4835
|
{
|
|
4825
4836
|
onSelect: () => d(p),
|
|
4826
4837
|
className: "flex items-center justify-between",
|
|
@@ -4839,7 +4850,7 @@ function Ze({
|
|
|
4839
4850
|
children: "Select"
|
|
4840
4851
|
}
|
|
4841
4852
|
),
|
|
4842
|
-
(p.type === "object" || p.type === "array") && /* @__PURE__ */ r("div", { className: "p-1 rounded hover:bg-muted cursor-pointer", children: /* @__PURE__ */ r(
|
|
4853
|
+
(p.type === "object" || p.type === "array") && /* @__PURE__ */ r("div", { className: "p-1 rounded hover:bg-muted cursor-pointer", children: /* @__PURE__ */ r(al, { className: "w-4 h-4 opacity-50" }) })
|
|
4843
4854
|
] })
|
|
4844
4855
|
]
|
|
4845
4856
|
},
|
|
@@ -4850,10 +4861,10 @@ function Ze({
|
|
|
4850
4861
|
] }) })
|
|
4851
4862
|
] });
|
|
4852
4863
|
}
|
|
4853
|
-
const
|
|
4864
|
+
const Qo = () => {
|
|
4854
4865
|
const { selectedLang: e } = ut(), { data: t, isFetching: n } = cn();
|
|
4855
|
-
return { data:
|
|
4856
|
-
},
|
|
4866
|
+
return { data: W(() => fe(t, { lang: e || "" }) || {}, [t, e]), isFetching: n };
|
|
4867
|
+
}, Xo = (e, t) => {
|
|
4857
4868
|
const n = e.selectionStart || 0, s = e.selectionEnd || 0, a = e.value, i = a.substring(0, n), l = a.substring(s);
|
|
4858
4869
|
let o = !1;
|
|
4859
4870
|
if (n > 0 && i.length > 0) {
|
|
@@ -4871,11 +4882,11 @@ const $o = () => {
|
|
|
4871
4882
|
value: w,
|
|
4872
4883
|
newCursorPos: y
|
|
4873
4884
|
};
|
|
4874
|
-
},
|
|
4875
|
-
const { t: e } =
|
|
4885
|
+
}, $r = () => {
|
|
4886
|
+
const { t: e } = li(), { selectedLang: t, fallbackLang: n, languages: s } = ut(), [, a] = oi(), { data: i } = Re(), { data: l } = Fr({
|
|
4876
4887
|
lang: t || n,
|
|
4877
4888
|
pageType: i == null ? void 0 : i.pageType
|
|
4878
|
-
}), { data: o, isFetching: c } =
|
|
4889
|
+
}), { data: o, isFetching: c } = Qo(), h = o == null ? void 0 : o.seo, g = ct(
|
|
4879
4890
|
null
|
|
4880
4891
|
), [d, w] = P({
|
|
4881
4892
|
title: "",
|
|
@@ -4890,7 +4901,7 @@ const $o = () => {
|
|
|
4890
4901
|
searchDescription: "",
|
|
4891
4902
|
jsonLD: "",
|
|
4892
4903
|
...h
|
|
4893
|
-
}), y = ct({ initial: d, updated: d }), p = t.length ? t : n, { mutate: S, isPending: v } =
|
|
4904
|
+
}), y = ct({ initial: d, updated: d }), p = t.length ? t : n, { mutate: S, isPending: v } = Ss(), x = v, { hasPermission: G } = sn(), E = G(ue.EDIT_SEO);
|
|
4894
4905
|
we(() => {
|
|
4895
4906
|
!c && h && w({
|
|
4896
4907
|
title: "",
|
|
@@ -4922,7 +4933,7 @@ const $o = () => {
|
|
|
4922
4933
|
ogTitle: d.title,
|
|
4923
4934
|
ogDescription: d.description
|
|
4924
4935
|
});
|
|
4925
|
-
},
|
|
4936
|
+
}, U = () => {
|
|
4926
4937
|
w({
|
|
4927
4938
|
...d,
|
|
4928
4939
|
searchTitle: d.ogTitle,
|
|
@@ -4931,7 +4942,7 @@ const $o = () => {
|
|
|
4931
4942
|
}, J = (k, q) => {
|
|
4932
4943
|
const A = document.getElementById(q);
|
|
4933
4944
|
if (A) {
|
|
4934
|
-
const { value: M, newCursorPos: ne } =
|
|
4945
|
+
const { value: M, newCursorPos: ne } = Xo(
|
|
4935
4946
|
A,
|
|
4936
4947
|
k
|
|
4937
4948
|
);
|
|
@@ -4969,7 +4980,7 @@ const $o = () => {
|
|
|
4969
4980
|
w(q), y.current.updated = q;
|
|
4970
4981
|
};
|
|
4971
4982
|
return /* @__PURE__ */ u("div", { className: "relative h-full flex flex-col", children: [
|
|
4972
|
-
!E && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ r(
|
|
4983
|
+
!E && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-10 backdrop-blur-sm flex items-center justify-center", children: /* @__PURE__ */ r(yr, { variant: "default", className: "w-[80%] max-w-md text-xs", children: /* @__PURE__ */ r(Pi, { children: e(
|
|
4973
4984
|
"You don't have permission to edit SEO settings. Contact your administrator for access."
|
|
4974
4985
|
) }) }) }),
|
|
4975
4986
|
/* @__PURE__ */ u("div", { className: "flex-grow overflow-y-auto no-scrollbar px-2", children: [
|
|
@@ -4984,7 +4995,7 @@ const $o = () => {
|
|
|
4984
4995
|
")"
|
|
4985
4996
|
] })
|
|
4986
4997
|
] }),
|
|
4987
|
-
/* @__PURE__ */ r("form", { className: "space-y-8", children: /* @__PURE__ */ u(
|
|
4998
|
+
/* @__PURE__ */ r("form", { className: "space-y-8", children: /* @__PURE__ */ u(_i, { type: "multiple", defaultValue: ["page"], children: [
|
|
4988
4999
|
/* @__PURE__ */ u(gn, { value: "page", children: [
|
|
4989
5000
|
/* @__PURE__ */ r(pn, { className: "font-semibold text-slate-700", children: e("SEO") }),
|
|
4990
5001
|
/* @__PURE__ */ r(yn, { className: "pt-2", children: /* @__PURE__ */ u("div", { className: "space-y-4", children: [
|
|
@@ -5210,7 +5221,7 @@ const $o = () => {
|
|
|
5210
5221
|
type: "button",
|
|
5211
5222
|
variant: "outline",
|
|
5212
5223
|
size: "sm",
|
|
5213
|
-
onClick:
|
|
5224
|
+
onClick: U,
|
|
5214
5225
|
disabled: !E,
|
|
5215
5226
|
children: e("Copy from OG Settings")
|
|
5216
5227
|
}
|
|
@@ -5306,18 +5317,18 @@ const $o = () => {
|
|
|
5306
5317
|
size: "lg",
|
|
5307
5318
|
variant: "default",
|
|
5308
5319
|
onClick: b,
|
|
5309
|
-
disabled:
|
|
5320
|
+
disabled: is(y.current.initial, d) || x || !E,
|
|
5310
5321
|
children: e(v ? "Saving..." : "Save")
|
|
5311
5322
|
}
|
|
5312
5323
|
) })
|
|
5313
5324
|
] });
|
|
5314
5325
|
};
|
|
5315
|
-
|
|
5316
|
-
const
|
|
5326
|
+
$r.displayName = "SeoPanel";
|
|
5327
|
+
const zr = "seo", Zo = ({
|
|
5317
5328
|
isActive: e,
|
|
5318
5329
|
show: t
|
|
5319
5330
|
}) => {
|
|
5320
|
-
const { data: n } =
|
|
5331
|
+
const { data: n } = Re(), s = Fl(n == null ? void 0 : n.pageType);
|
|
5321
5332
|
return !nn(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ r(
|
|
5322
5333
|
_,
|
|
5323
5334
|
{
|
|
@@ -5340,73 +5351,73 @@ const $r = "seo", Wo = ({
|
|
|
5340
5351
|
)
|
|
5341
5352
|
}
|
|
5342
5353
|
);
|
|
5343
|
-
},
|
|
5344
|
-
id:
|
|
5354
|
+
}, Jo = {
|
|
5355
|
+
id: zr,
|
|
5345
5356
|
label: "SEO",
|
|
5346
|
-
panel:
|
|
5347
|
-
button:
|
|
5357
|
+
panel: $r,
|
|
5358
|
+
button: Zo,
|
|
5348
5359
|
position: "top",
|
|
5349
5360
|
view: "modal",
|
|
5350
5361
|
width: 600
|
|
5351
|
-
},
|
|
5352
|
-
|
|
5353
|
-
},
|
|
5362
|
+
}, ec = () => {
|
|
5363
|
+
zn(zr, Jo), zn(jr, Yo);
|
|
5364
|
+
}, tc = "user-info", nc = () => {
|
|
5354
5365
|
const { user: e, logout: t } = st();
|
|
5355
|
-
return e ? /* @__PURE__ */ u(
|
|
5356
|
-
/* @__PURE__ */ r(
|
|
5357
|
-
/* @__PURE__ */ u(
|
|
5366
|
+
return e ? /* @__PURE__ */ u(Ii, { children: [
|
|
5367
|
+
/* @__PURE__ */ r(ki, { asChild: !0, children: /* @__PURE__ */ r(_, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ r(il, { className: "w-4 h-4" }) }) }),
|
|
5368
|
+
/* @__PURE__ */ u(Li, { className: "w-auto p-4 space-y-2", children: [
|
|
5358
5369
|
/* @__PURE__ */ r("div", { className: "text-sm font-medium", children: e.name ?? e.email }),
|
|
5359
5370
|
/* @__PURE__ */ r("div", { className: "text-xs text-muted-foreground", children: e.email }),
|
|
5360
|
-
/* @__PURE__ */ u(
|
|
5361
|
-
/* @__PURE__ */ r(
|
|
5362
|
-
/* @__PURE__ */ u(
|
|
5363
|
-
/* @__PURE__ */ u(
|
|
5364
|
-
/* @__PURE__ */ r(
|
|
5365
|
-
/* @__PURE__ */ r(
|
|
5371
|
+
/* @__PURE__ */ u(ar, { children: [
|
|
5372
|
+
/* @__PURE__ */ r(ir, { asChild: !0, children: /* @__PURE__ */ r(_, { variant: "outline", size: "sm", className: "w-full", children: "Logout" }) }),
|
|
5373
|
+
/* @__PURE__ */ u(lr, { children: [
|
|
5374
|
+
/* @__PURE__ */ u(or, { children: [
|
|
5375
|
+
/* @__PURE__ */ r(cr, { children: "Are you sure you want to logout?" }),
|
|
5376
|
+
/* @__PURE__ */ r(ur, { children: "You will be redirected to the login page." })
|
|
5366
5377
|
] }),
|
|
5367
|
-
/* @__PURE__ */ u(
|
|
5368
|
-
/* @__PURE__ */ r(
|
|
5369
|
-
/* @__PURE__ */ r(
|
|
5378
|
+
/* @__PURE__ */ u(dr, { children: [
|
|
5379
|
+
/* @__PURE__ */ r(hr, { children: "Cancel" }),
|
|
5380
|
+
/* @__PURE__ */ r(mr, { onClick: () => t(), children: "Logout" })
|
|
5370
5381
|
] })
|
|
5371
5382
|
] })
|
|
5372
5383
|
] })
|
|
5373
5384
|
] })
|
|
5374
5385
|
] }) : null;
|
|
5375
|
-
},
|
|
5376
|
-
id:
|
|
5386
|
+
}, sc = {
|
|
5387
|
+
id: tc,
|
|
5377
5388
|
label: "User Info",
|
|
5378
|
-
button:
|
|
5389
|
+
button: nc,
|
|
5379
5390
|
position: "bottom"
|
|
5380
|
-
}
|
|
5391
|
+
};
|
|
5381
5392
|
var O = {
|
|
5382
5393
|
context: void 0,
|
|
5383
5394
|
registry: void 0,
|
|
5384
5395
|
effects: void 0,
|
|
5385
5396
|
done: !1,
|
|
5386
5397
|
getContextId() {
|
|
5387
|
-
return
|
|
5398
|
+
return qs(this.context.count);
|
|
5388
5399
|
},
|
|
5389
5400
|
getNextContextId() {
|
|
5390
|
-
return
|
|
5401
|
+
return qs(this.context.count++);
|
|
5391
5402
|
}
|
|
5392
5403
|
};
|
|
5393
|
-
function
|
|
5404
|
+
function qs(e) {
|
|
5394
5405
|
const t = String(e), n = t.length - 1;
|
|
5395
5406
|
return O.context.id + (n ? String.fromCharCode(96 + n) : "") + t;
|
|
5396
5407
|
}
|
|
5397
|
-
function
|
|
5408
|
+
function Ut(e) {
|
|
5398
5409
|
O.context = e;
|
|
5399
5410
|
}
|
|
5400
|
-
var
|
|
5401
|
-
equals:
|
|
5402
|
-
},
|
|
5411
|
+
var rc = (e, t) => e === t, Cn = Symbol("solid-proxy"), Wr = typeof Proxy == "function", Yr = Symbol("solid-track"), Pn = {
|
|
5412
|
+
equals: rc
|
|
5413
|
+
}, Qr = na, tt = 1, _n = 2, Xr = {
|
|
5403
5414
|
owned: null,
|
|
5404
5415
|
cleanups: null,
|
|
5405
5416
|
context: null,
|
|
5406
5417
|
owner: null
|
|
5407
|
-
},
|
|
5418
|
+
}, Kn = {}, Z = null, Vn = null, ac = null, re = null, Pe = null, Je = null, On = 0;
|
|
5408
5419
|
function lt(e, t) {
|
|
5409
|
-
const n = re, s = Z, a = e.length === 0, i = t === void 0 ? s : t, l = a ?
|
|
5420
|
+
const n = re, s = Z, a = e.length === 0, i = t === void 0 ? s : t, l = a ? Xr : {
|
|
5410
5421
|
owned: null,
|
|
5411
5422
|
cleanups: null,
|
|
5412
5423
|
context: i ? i.context : null,
|
|
@@ -5420,40 +5431,40 @@ function lt(e, t) {
|
|
|
5420
5431
|
}
|
|
5421
5432
|
}
|
|
5422
5433
|
function ve(e, t) {
|
|
5423
|
-
t = t ? Object.assign({},
|
|
5434
|
+
t = t ? Object.assign({}, Pn, t) : Pn;
|
|
5424
5435
|
const n = {
|
|
5425
5436
|
value: e,
|
|
5426
5437
|
observers: null,
|
|
5427
5438
|
observerSlots: null,
|
|
5428
5439
|
comparator: t.equals || void 0
|
|
5429
|
-
}, s = (a) => (typeof a == "function" && (a = a(n.value)),
|
|
5430
|
-
return [
|
|
5440
|
+
}, s = (a) => (typeof a == "function" && (a = a(n.value)), ta(n, a));
|
|
5441
|
+
return [ea.bind(n), s];
|
|
5431
5442
|
}
|
|
5432
|
-
function
|
|
5433
|
-
const s =
|
|
5443
|
+
function ic(e, t, n) {
|
|
5444
|
+
const s = Bn(e, t, !0, tt);
|
|
5434
5445
|
Lt(s);
|
|
5435
5446
|
}
|
|
5436
5447
|
function ot(e, t, n) {
|
|
5437
|
-
const s =
|
|
5448
|
+
const s = Bn(e, t, !1, tt);
|
|
5438
5449
|
Lt(s);
|
|
5439
5450
|
}
|
|
5440
|
-
function
|
|
5441
|
-
|
|
5442
|
-
const s =
|
|
5451
|
+
function Zr(e, t, n) {
|
|
5452
|
+
Qr = pc;
|
|
5453
|
+
const s = Bn(e, t, !1, tt);
|
|
5443
5454
|
(!n || !n.render) && (s.user = !0), Je ? Je.push(s) : Lt(s);
|
|
5444
5455
|
}
|
|
5445
5456
|
function Ge(e, t, n) {
|
|
5446
|
-
n = n ? Object.assign({},
|
|
5447
|
-
const s =
|
|
5448
|
-
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, Lt(s),
|
|
5457
|
+
n = n ? Object.assign({}, Pn, n) : Pn;
|
|
5458
|
+
const s = Bn(e, t, !0, 0);
|
|
5459
|
+
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, Lt(s), ea.bind(s);
|
|
5449
5460
|
}
|
|
5450
|
-
function
|
|
5461
|
+
function lc(e) {
|
|
5451
5462
|
return e && typeof e == "object" && "then" in e;
|
|
5452
5463
|
}
|
|
5453
|
-
function
|
|
5464
|
+
function oc(e, t, n) {
|
|
5454
5465
|
let s, a, i;
|
|
5455
5466
|
arguments.length === 1 ? (s = !0, a = e, i = {}) : (s = e, a = t, i = {});
|
|
5456
|
-
let l = null, o =
|
|
5467
|
+
let l = null, o = Kn, c = null, h = !1, g = "initialValue" in i, d = typeof s == "function" && Ge(s);
|
|
5457
5468
|
const w = /* @__PURE__ */ new Set(), [y, p] = (i.storage || ve)(i.initialValue), [S, v] = ve(void 0), [x, G] = ve(void 0, {
|
|
5458
5469
|
equals: !1
|
|
5459
5470
|
}), [E, b] = ve(g ? "ready" : "unresolved");
|
|
@@ -5463,9 +5474,9 @@ function ac(e, t, n) {
|
|
|
5463
5474
|
() => i.onHydrated(M, {
|
|
5464
5475
|
value: q
|
|
5465
5476
|
})
|
|
5466
|
-
), o =
|
|
5477
|
+
), o = Kn, U(q, A)), q;
|
|
5467
5478
|
}
|
|
5468
|
-
function
|
|
5479
|
+
function U(k, q) {
|
|
5469
5480
|
We(() => {
|
|
5470
5481
|
q === void 0 && p(() => k), b(q !== void 0 ? "errored" : g ? "ready" : "unresolved"), v(q);
|
|
5471
5482
|
for (const A of w.keys())
|
|
@@ -5474,7 +5485,7 @@ function ac(e, t, n) {
|
|
|
5474
5485
|
}, !1);
|
|
5475
5486
|
}
|
|
5476
5487
|
function J() {
|
|
5477
|
-
const k =
|
|
5488
|
+
const k = mc, q = y(), A = S();
|
|
5478
5489
|
if (A !== void 0 && !l)
|
|
5479
5490
|
throw A;
|
|
5480
5491
|
return re && re.user, q;
|
|
@@ -5488,17 +5499,17 @@ function ac(e, t, n) {
|
|
|
5488
5499
|
T(l, Ce(y));
|
|
5489
5500
|
return;
|
|
5490
5501
|
}
|
|
5491
|
-
const A = o !==
|
|
5502
|
+
const A = o !== Kn ? o : Ce(
|
|
5492
5503
|
() => a(q, {
|
|
5493
5504
|
value: y(),
|
|
5494
5505
|
refetching: k
|
|
5495
5506
|
})
|
|
5496
5507
|
);
|
|
5497
|
-
return
|
|
5508
|
+
return lc(A) ? (l = A, "value" in A ? (A.status === "success" ? T(l, A.value, void 0, q) : T(l, void 0, Yn(A.value), q), A) : (h = !0, queueMicrotask(() => h = !1), We(() => {
|
|
5498
5509
|
b(g ? "refreshing" : "pending"), G();
|
|
5499
5510
|
}, !1), A.then(
|
|
5500
5511
|
(M) => T(A, M, void 0, q),
|
|
5501
|
-
(M) => T(A, void 0,
|
|
5512
|
+
(M) => T(A, void 0, Yn(M), q)
|
|
5502
5513
|
))) : (T(l, A, void 0, q), A);
|
|
5503
5514
|
}
|
|
5504
5515
|
return Object.defineProperties(J, {
|
|
@@ -5524,7 +5535,7 @@ function ac(e, t, n) {
|
|
|
5524
5535
|
return y();
|
|
5525
5536
|
}
|
|
5526
5537
|
}
|
|
5527
|
-
}), d ?
|
|
5538
|
+
}), d ? ic(() => ie(!1)) : ie(!1), [
|
|
5528
5539
|
J,
|
|
5529
5540
|
{
|
|
5530
5541
|
refetch: ie,
|
|
@@ -5532,7 +5543,7 @@ function ac(e, t, n) {
|
|
|
5532
5543
|
}
|
|
5533
5544
|
];
|
|
5534
5545
|
}
|
|
5535
|
-
function
|
|
5546
|
+
function Qu(e) {
|
|
5536
5547
|
return We(e, !1);
|
|
5537
5548
|
}
|
|
5538
5549
|
function Ce(e) {
|
|
@@ -5546,7 +5557,7 @@ function Ce(e) {
|
|
|
5546
5557
|
re = t;
|
|
5547
5558
|
}
|
|
5548
5559
|
}
|
|
5549
|
-
function
|
|
5560
|
+
function Xu(e, t, n) {
|
|
5550
5561
|
const s = Array.isArray(e);
|
|
5551
5562
|
let a, i = n && n.defer;
|
|
5552
5563
|
return (l) => {
|
|
@@ -5563,27 +5574,27 @@ function $u(e, t, n) {
|
|
|
5563
5574
|
return a = o, c;
|
|
5564
5575
|
};
|
|
5565
5576
|
}
|
|
5566
|
-
function
|
|
5567
|
-
|
|
5577
|
+
function cc(e) {
|
|
5578
|
+
Zr(() => Ce(e));
|
|
5568
5579
|
}
|
|
5569
5580
|
function Ft(e) {
|
|
5570
5581
|
return Z === null || (Z.cleanups === null ? Z.cleanups = [e] : Z.cleanups.push(e)), e;
|
|
5571
5582
|
}
|
|
5572
|
-
function
|
|
5583
|
+
function Hs() {
|
|
5573
5584
|
return Z;
|
|
5574
5585
|
}
|
|
5575
|
-
function
|
|
5586
|
+
function uc(e, t) {
|
|
5576
5587
|
const n = Z, s = re;
|
|
5577
5588
|
Z = e, re = null;
|
|
5578
5589
|
try {
|
|
5579
5590
|
return We(t, !0);
|
|
5580
5591
|
} catch (a) {
|
|
5581
|
-
|
|
5592
|
+
Ts(a);
|
|
5582
5593
|
} finally {
|
|
5583
5594
|
Z = n, re = s;
|
|
5584
5595
|
}
|
|
5585
5596
|
}
|
|
5586
|
-
function
|
|
5597
|
+
function dc(e) {
|
|
5587
5598
|
const t = re, n = Z;
|
|
5588
5599
|
return Promise.resolve().then(() => {
|
|
5589
5600
|
re = t, Z = n;
|
|
@@ -5591,37 +5602,37 @@ function oc(e) {
|
|
|
5591
5602
|
return We(e, !1), re = Z = null, s ? s.done : void 0;
|
|
5592
5603
|
});
|
|
5593
5604
|
}
|
|
5594
|
-
var [
|
|
5595
|
-
function
|
|
5596
|
-
return [
|
|
5605
|
+
var [hc, Zu] = /* @__PURE__ */ ve(!1);
|
|
5606
|
+
function Ju() {
|
|
5607
|
+
return [hc, dc];
|
|
5597
5608
|
}
|
|
5598
|
-
function
|
|
5609
|
+
function ed(e, t) {
|
|
5599
5610
|
const n = Symbol("context");
|
|
5600
5611
|
return {
|
|
5601
5612
|
id: n,
|
|
5602
|
-
Provider:
|
|
5613
|
+
Provider: yc(n),
|
|
5603
5614
|
defaultValue: e
|
|
5604
5615
|
};
|
|
5605
5616
|
}
|
|
5606
|
-
function
|
|
5617
|
+
function td(e) {
|
|
5607
5618
|
let t;
|
|
5608
5619
|
return Z && Z.context && (t = Z.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
5609
5620
|
}
|
|
5610
|
-
function
|
|
5611
|
-
const t = Ge(e), n = Ge(() =>
|
|
5621
|
+
function Jr(e) {
|
|
5622
|
+
const t = Ge(e), n = Ge(() => Qn(t()));
|
|
5612
5623
|
return n.toArray = () => {
|
|
5613
5624
|
const s = n();
|
|
5614
5625
|
return Array.isArray(s) ? s : s != null ? [s] : [];
|
|
5615
5626
|
}, n;
|
|
5616
5627
|
}
|
|
5617
|
-
var
|
|
5618
|
-
function
|
|
5628
|
+
var mc;
|
|
5629
|
+
function ea() {
|
|
5619
5630
|
if (this.sources && this.state)
|
|
5620
5631
|
if (this.state === tt)
|
|
5621
5632
|
Lt(this);
|
|
5622
5633
|
else {
|
|
5623
5634
|
const e = Pe;
|
|
5624
|
-
Pe = null, We(() =>
|
|
5635
|
+
Pe = null, We(() => kn(this), !1), Pe = e;
|
|
5625
5636
|
}
|
|
5626
5637
|
if (re) {
|
|
5627
5638
|
const e = this.observers ? this.observers.length : 0;
|
|
@@ -5629,12 +5640,12 @@ function Jr() {
|
|
|
5629
5640
|
}
|
|
5630
5641
|
return this.value;
|
|
5631
5642
|
}
|
|
5632
|
-
function
|
|
5643
|
+
function ta(e, t, n) {
|
|
5633
5644
|
let s = e.value;
|
|
5634
5645
|
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && We(() => {
|
|
5635
5646
|
for (let a = 0; a < e.observers.length; a += 1) {
|
|
5636
|
-
const i = e.observers[a], l =
|
|
5637
|
-
l &&
|
|
5647
|
+
const i = e.observers[a], l = Vn && Vn.running;
|
|
5648
|
+
l && Vn.disposed.has(i), (l ? !i.tState : !i.state) && (i.pure ? Pe.push(i) : Je.push(i), i.observers && sa(i)), l || (i.state = tt);
|
|
5638
5649
|
}
|
|
5639
5650
|
if (Pe.length > 1e6)
|
|
5640
5651
|
throw Pe = [], new Error();
|
|
@@ -5644,27 +5655,27 @@ function Lt(e) {
|
|
|
5644
5655
|
if (!e.fn)
|
|
5645
5656
|
return;
|
|
5646
5657
|
qt(e);
|
|
5647
|
-
const t =
|
|
5648
|
-
|
|
5658
|
+
const t = On;
|
|
5659
|
+
fc(
|
|
5649
5660
|
e,
|
|
5650
5661
|
e.value,
|
|
5651
5662
|
t
|
|
5652
5663
|
);
|
|
5653
5664
|
}
|
|
5654
|
-
function
|
|
5665
|
+
function fc(e, t, n) {
|
|
5655
5666
|
let s;
|
|
5656
5667
|
const a = Z, i = re;
|
|
5657
5668
|
re = Z = e;
|
|
5658
5669
|
try {
|
|
5659
5670
|
s = e.fn(t);
|
|
5660
5671
|
} catch (l) {
|
|
5661
|
-
return e.pure && (e.state = tt, e.owned && e.owned.forEach(qt), e.owned = null), e.updatedAt = n + 1,
|
|
5672
|
+
return e.pure && (e.state = tt, e.owned && e.owned.forEach(qt), e.owned = null), e.updatedAt = n + 1, Ts(l);
|
|
5662
5673
|
} finally {
|
|
5663
5674
|
re = i, Z = a;
|
|
5664
5675
|
}
|
|
5665
|
-
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ?
|
|
5676
|
+
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? ta(e, s) : e.value = s, e.updatedAt = n);
|
|
5666
5677
|
}
|
|
5667
|
-
function
|
|
5678
|
+
function Bn(e, t, n, s = tt, a) {
|
|
5668
5679
|
const i = {
|
|
5669
5680
|
fn: e,
|
|
5670
5681
|
state: s,
|
|
@@ -5678,78 +5689,78 @@ function On(e, t, n, s = tt, a) {
|
|
|
5678
5689
|
context: Z ? Z.context : null,
|
|
5679
5690
|
pure: n
|
|
5680
5691
|
};
|
|
5681
|
-
return Z === null || Z !==
|
|
5692
|
+
return Z === null || Z !== Xr && (Z.owned ? Z.owned.push(i) : Z.owned = [i]), i;
|
|
5682
5693
|
}
|
|
5683
|
-
function
|
|
5694
|
+
function In(e) {
|
|
5684
5695
|
if (e.state === 0)
|
|
5685
5696
|
return;
|
|
5686
|
-
if (e.state ===
|
|
5687
|
-
return
|
|
5697
|
+
if (e.state === _n)
|
|
5698
|
+
return kn(e);
|
|
5688
5699
|
if (e.suspense && Ce(e.suspense.inFallback))
|
|
5689
5700
|
return e.suspense.effects.push(e);
|
|
5690
5701
|
const t = [e];
|
|
5691
|
-
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt <
|
|
5702
|
+
for (; (e = e.owner) && (!e.updatedAt || e.updatedAt < On); )
|
|
5692
5703
|
e.state && t.push(e);
|
|
5693
5704
|
for (let n = t.length - 1; n >= 0; n--)
|
|
5694
5705
|
if (e = t[n], e.state === tt)
|
|
5695
5706
|
Lt(e);
|
|
5696
|
-
else if (e.state ===
|
|
5707
|
+
else if (e.state === _n) {
|
|
5697
5708
|
const s = Pe;
|
|
5698
|
-
Pe = null, We(() =>
|
|
5709
|
+
Pe = null, We(() => kn(e, t[0]), !1), Pe = s;
|
|
5699
5710
|
}
|
|
5700
5711
|
}
|
|
5701
5712
|
function We(e, t) {
|
|
5702
5713
|
if (Pe)
|
|
5703
5714
|
return e();
|
|
5704
5715
|
let n = !1;
|
|
5705
|
-
t || (Pe = []), Je ? n = !0 : Je = [],
|
|
5716
|
+
t || (Pe = []), Je ? n = !0 : Je = [], On++;
|
|
5706
5717
|
try {
|
|
5707
5718
|
const s = e();
|
|
5708
|
-
return
|
|
5719
|
+
return gc(n), s;
|
|
5709
5720
|
} catch (s) {
|
|
5710
|
-
n || (Je = null), Pe = null,
|
|
5721
|
+
n || (Je = null), Pe = null, Ts(s);
|
|
5711
5722
|
}
|
|
5712
5723
|
}
|
|
5713
|
-
function
|
|
5714
|
-
if (Pe && (
|
|
5724
|
+
function gc(e) {
|
|
5725
|
+
if (Pe && (na(Pe), Pe = null), e)
|
|
5715
5726
|
return;
|
|
5716
5727
|
const t = Je;
|
|
5717
|
-
Je = null, t.length && We(() =>
|
|
5728
|
+
Je = null, t.length && We(() => Qr(t), !1);
|
|
5718
5729
|
}
|
|
5719
|
-
function
|
|
5730
|
+
function na(e) {
|
|
5720
5731
|
for (let t = 0; t < e.length; t++)
|
|
5721
|
-
|
|
5732
|
+
In(e[t]);
|
|
5722
5733
|
}
|
|
5723
|
-
function
|
|
5734
|
+
function pc(e) {
|
|
5724
5735
|
let t, n = 0;
|
|
5725
5736
|
for (t = 0; t < e.length; t++) {
|
|
5726
5737
|
const s = e[t];
|
|
5727
|
-
s.user ? e[n++] = s :
|
|
5738
|
+
s.user ? e[n++] = s : In(s);
|
|
5728
5739
|
}
|
|
5729
5740
|
if (O.context) {
|
|
5730
5741
|
if (O.count) {
|
|
5731
5742
|
O.effects || (O.effects = []), O.effects.push(...e.slice(0, n));
|
|
5732
5743
|
return;
|
|
5733
5744
|
}
|
|
5734
|
-
|
|
5745
|
+
Ut();
|
|
5735
5746
|
}
|
|
5736
5747
|
for (O.effects && (O.done || !O.count) && (e = [...O.effects, ...e], n += O.effects.length, delete O.effects), t = 0; t < n; t++)
|
|
5737
|
-
|
|
5748
|
+
In(e[t]);
|
|
5738
5749
|
}
|
|
5739
|
-
function
|
|
5750
|
+
function kn(e, t) {
|
|
5740
5751
|
e.state = 0;
|
|
5741
5752
|
for (let n = 0; n < e.sources.length; n += 1) {
|
|
5742
5753
|
const s = e.sources[n];
|
|
5743
5754
|
if (s.sources) {
|
|
5744
5755
|
const a = s.state;
|
|
5745
|
-
a === tt ? s !== t && (!s.updatedAt || s.updatedAt <
|
|
5756
|
+
a === tt ? s !== t && (!s.updatedAt || s.updatedAt < On) && In(s) : a === _n && kn(s, t);
|
|
5746
5757
|
}
|
|
5747
5758
|
}
|
|
5748
5759
|
}
|
|
5749
|
-
function
|
|
5760
|
+
function sa(e) {
|
|
5750
5761
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
5751
5762
|
const n = e.observers[t];
|
|
5752
|
-
n.state || (n.state =
|
|
5763
|
+
n.state || (n.state = _n, n.pure ? Pe.push(n) : Je.push(n), n.observers && sa(n));
|
|
5753
5764
|
}
|
|
5754
5765
|
}
|
|
5755
5766
|
function qt(e) {
|
|
@@ -5779,52 +5790,52 @@ function qt(e) {
|
|
|
5779
5790
|
}
|
|
5780
5791
|
e.state = 0;
|
|
5781
5792
|
}
|
|
5782
|
-
function
|
|
5793
|
+
function Yn(e) {
|
|
5783
5794
|
return e instanceof Error ? e : new Error(typeof e == "string" ? e : "Unknown error", {
|
|
5784
5795
|
cause: e
|
|
5785
5796
|
});
|
|
5786
5797
|
}
|
|
5787
|
-
function
|
|
5788
|
-
throw
|
|
5798
|
+
function Ts(e, t = Z) {
|
|
5799
|
+
throw Yn(e);
|
|
5789
5800
|
}
|
|
5790
|
-
function
|
|
5801
|
+
function Qn(e) {
|
|
5791
5802
|
if (typeof e == "function" && !e.length)
|
|
5792
|
-
return
|
|
5803
|
+
return Qn(e());
|
|
5793
5804
|
if (Array.isArray(e)) {
|
|
5794
5805
|
const t = [];
|
|
5795
5806
|
for (let n = 0; n < e.length; n++) {
|
|
5796
|
-
const s =
|
|
5807
|
+
const s = Qn(e[n]);
|
|
5797
5808
|
Array.isArray(s) ? t.push.apply(t, s) : t.push(s);
|
|
5798
5809
|
}
|
|
5799
5810
|
return t;
|
|
5800
5811
|
}
|
|
5801
5812
|
return e;
|
|
5802
5813
|
}
|
|
5803
|
-
function
|
|
5814
|
+
function yc(e, t) {
|
|
5804
5815
|
return function(s) {
|
|
5805
5816
|
let a;
|
|
5806
5817
|
return ot(
|
|
5807
5818
|
() => a = Ce(() => (Z.context = {
|
|
5808
5819
|
...Z.context,
|
|
5809
5820
|
[e]: s.value
|
|
5810
|
-
},
|
|
5821
|
+
}, Jr(() => s.children))),
|
|
5811
5822
|
void 0
|
|
5812
5823
|
), a;
|
|
5813
5824
|
};
|
|
5814
5825
|
}
|
|
5815
|
-
var
|
|
5816
|
-
function
|
|
5826
|
+
var Xn = Symbol("fallback");
|
|
5827
|
+
function Ln(e) {
|
|
5817
5828
|
for (let t = 0; t < e.length; t++)
|
|
5818
5829
|
e[t]();
|
|
5819
5830
|
}
|
|
5820
|
-
function
|
|
5831
|
+
function vc(e, t, n = {}) {
|
|
5821
5832
|
let s = [], a = [], i = [], l = 0, o = t.length > 1 ? [] : null;
|
|
5822
|
-
return Ft(() =>
|
|
5833
|
+
return Ft(() => Ln(i)), () => {
|
|
5823
5834
|
let c = e() || [], h = c.length, g, d;
|
|
5824
|
-
return c[
|
|
5835
|
+
return c[Yr], Ce(() => {
|
|
5825
5836
|
let y, p, S, v, x, G, E, b, T;
|
|
5826
5837
|
if (h === 0)
|
|
5827
|
-
l !== 0 && (
|
|
5838
|
+
l !== 0 && (Ln(i), i = [], s = [], a = [], l = 0, o && (o = [])), n.fallback && (s = [Xn], a[0] = lt((U) => (i[0] = U, n.fallback())), l = 1);
|
|
5828
5839
|
else if (l === 0) {
|
|
5829
5840
|
for (a = new Array(h), d = 0; d < h; d++)
|
|
5830
5841
|
s[d] = c[d], a[d] = lt(w);
|
|
@@ -5853,14 +5864,14 @@ function gc(e, t, n = {}) {
|
|
|
5853
5864
|
}
|
|
5854
5865
|
};
|
|
5855
5866
|
}
|
|
5856
|
-
function
|
|
5867
|
+
function Ec(e, t, n = {}) {
|
|
5857
5868
|
let s = [], a = [], i = [], l = [], o = 0, c;
|
|
5858
|
-
return Ft(() =>
|
|
5869
|
+
return Ft(() => Ln(i)), () => {
|
|
5859
5870
|
const h = e() || [], g = h.length;
|
|
5860
|
-
return h[
|
|
5871
|
+
return h[Yr], Ce(() => {
|
|
5861
5872
|
if (g === 0)
|
|
5862
|
-
return o !== 0 && (
|
|
5863
|
-
for (s[0] ===
|
|
5873
|
+
return o !== 0 && (Ln(i), i = [], s = [], a = [], o = 0, l = []), n.fallback && (s = [Xn], a[0] = lt((w) => (i[0] = w, n.fallback())), o = 1), a;
|
|
5874
|
+
for (s[0] === Xn && (i[0](), i = [], s = [], a = [], o = 0), c = 0; c < g; c++)
|
|
5864
5875
|
c < s.length && s[c] !== h[c] ? l[c](() => h[c]) : c >= s.length && (a[c] = lt(d));
|
|
5865
5876
|
for (; c < s.length; c++)
|
|
5866
5877
|
i[c]();
|
|
@@ -5873,18 +5884,18 @@ function pc(e, t, n = {}) {
|
|
|
5873
5884
|
}
|
|
5874
5885
|
};
|
|
5875
5886
|
}
|
|
5876
|
-
function
|
|
5887
|
+
function ra(e, t) {
|
|
5877
5888
|
return Ce(() => e(t || {}));
|
|
5878
5889
|
}
|
|
5879
5890
|
function vn() {
|
|
5880
5891
|
return !0;
|
|
5881
5892
|
}
|
|
5882
|
-
var
|
|
5893
|
+
var Zn = {
|
|
5883
5894
|
get(e, t, n) {
|
|
5884
|
-
return t ===
|
|
5895
|
+
return t === Cn ? n : e.get(t);
|
|
5885
5896
|
},
|
|
5886
5897
|
has(e, t) {
|
|
5887
|
-
return t ===
|
|
5898
|
+
return t === Cn ? !0 : e.has(t);
|
|
5888
5899
|
},
|
|
5889
5900
|
set: vn,
|
|
5890
5901
|
deleteProperty: vn,
|
|
@@ -5903,46 +5914,46 @@ var Qn = {
|
|
|
5903
5914
|
return e.keys();
|
|
5904
5915
|
}
|
|
5905
5916
|
};
|
|
5906
|
-
function
|
|
5917
|
+
function jn(e) {
|
|
5907
5918
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
5908
5919
|
}
|
|
5909
|
-
function
|
|
5920
|
+
function bc() {
|
|
5910
5921
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
5911
5922
|
const n = this[e]();
|
|
5912
5923
|
if (n !== void 0)
|
|
5913
5924
|
return n;
|
|
5914
5925
|
}
|
|
5915
5926
|
}
|
|
5916
|
-
function
|
|
5927
|
+
function aa(...e) {
|
|
5917
5928
|
let t = !1;
|
|
5918
5929
|
for (let l = 0; l < e.length; l++) {
|
|
5919
5930
|
const o = e[l];
|
|
5920
|
-
t = t || !!o &&
|
|
5931
|
+
t = t || !!o && Cn in o, e[l] = typeof o == "function" ? (t = !0, Ge(o)) : o;
|
|
5921
5932
|
}
|
|
5922
|
-
if (
|
|
5933
|
+
if (Wr && t)
|
|
5923
5934
|
return new Proxy(
|
|
5924
5935
|
{
|
|
5925
5936
|
get(l) {
|
|
5926
5937
|
for (let o = e.length - 1; o >= 0; o--) {
|
|
5927
|
-
const c =
|
|
5938
|
+
const c = jn(e[o])[l];
|
|
5928
5939
|
if (c !== void 0)
|
|
5929
5940
|
return c;
|
|
5930
5941
|
}
|
|
5931
5942
|
},
|
|
5932
5943
|
has(l) {
|
|
5933
5944
|
for (let o = e.length - 1; o >= 0; o--)
|
|
5934
|
-
if (l in
|
|
5945
|
+
if (l in jn(e[o]))
|
|
5935
5946
|
return !0;
|
|
5936
5947
|
return !1;
|
|
5937
5948
|
},
|
|
5938
5949
|
keys() {
|
|
5939
5950
|
const l = [];
|
|
5940
5951
|
for (let o = 0; o < e.length; o++)
|
|
5941
|
-
l.push(...Object.keys(
|
|
5952
|
+
l.push(...Object.keys(jn(e[o])));
|
|
5942
5953
|
return [...new Set(l)];
|
|
5943
5954
|
}
|
|
5944
5955
|
},
|
|
5945
|
-
|
|
5956
|
+
Zn
|
|
5946
5957
|
);
|
|
5947
5958
|
const n = {}, s = /* @__PURE__ */ Object.create(null);
|
|
5948
5959
|
for (let l = e.length - 1; l >= 0; l--) {
|
|
@@ -5959,7 +5970,7 @@ function ra(...e) {
|
|
|
5959
5970
|
s[g] = d.get ? {
|
|
5960
5971
|
enumerable: !0,
|
|
5961
5972
|
configurable: !0,
|
|
5962
|
-
get:
|
|
5973
|
+
get: bc.bind(n[g] = [d.get.bind(o)])
|
|
5963
5974
|
} : d.value !== void 0 ? d : void 0;
|
|
5964
5975
|
else {
|
|
5965
5976
|
const w = n[g];
|
|
@@ -5974,8 +5985,8 @@ function ra(...e) {
|
|
|
5974
5985
|
}
|
|
5975
5986
|
return a;
|
|
5976
5987
|
}
|
|
5977
|
-
function
|
|
5978
|
-
if (
|
|
5988
|
+
function wc(e, ...t) {
|
|
5989
|
+
if (Wr && Cn in e) {
|
|
5979
5990
|
const a = new Set(t.length > 1 ? t.flat() : t[0]), i = t.map((l) => new Proxy(
|
|
5980
5991
|
{
|
|
5981
5992
|
get(o) {
|
|
@@ -5988,7 +5999,7 @@ function vc(e, ...t) {
|
|
|
5988
5999
|
return l.filter((o) => o in e);
|
|
5989
6000
|
}
|
|
5990
6001
|
},
|
|
5991
|
-
|
|
6002
|
+
Zn
|
|
5992
6003
|
));
|
|
5993
6004
|
return i.push(
|
|
5994
6005
|
new Proxy(
|
|
@@ -6003,7 +6014,7 @@ function vc(e, ...t) {
|
|
|
6003
6014
|
return Object.keys(e).filter((l) => !a.has(l));
|
|
6004
6015
|
}
|
|
6005
6016
|
},
|
|
6006
|
-
|
|
6017
|
+
Zn
|
|
6007
6018
|
)
|
|
6008
6019
|
), i;
|
|
6009
6020
|
}
|
|
@@ -6017,17 +6028,17 @@ function vc(e, ...t) {
|
|
|
6017
6028
|
}
|
|
6018
6029
|
return [...s, n];
|
|
6019
6030
|
}
|
|
6020
|
-
function
|
|
6031
|
+
function ia(e) {
|
|
6021
6032
|
let t, n;
|
|
6022
6033
|
const s = (a) => {
|
|
6023
6034
|
const i = O.context;
|
|
6024
6035
|
if (i) {
|
|
6025
6036
|
const [o, c] = ve();
|
|
6026
6037
|
O.count || (O.count = 0), O.count++, (n || (n = e())).then((h) => {
|
|
6027
|
-
!O.done &&
|
|
6038
|
+
!O.done && Ut(i), O.count--, c(() => h.default), Ut();
|
|
6028
6039
|
}), t = o;
|
|
6029
6040
|
} else if (!t) {
|
|
6030
|
-
const [o] =
|
|
6041
|
+
const [o] = oc(() => (n || (n = e())).then((c) => c.default));
|
|
6031
6042
|
t = o;
|
|
6032
6043
|
}
|
|
6033
6044
|
let l;
|
|
@@ -6036,32 +6047,32 @@ function aa(e) {
|
|
|
6036
6047
|
if (!i || O.done)
|
|
6037
6048
|
return l(a);
|
|
6038
6049
|
const o = O.context;
|
|
6039
|
-
|
|
6050
|
+
Ut(i);
|
|
6040
6051
|
const c = l(a);
|
|
6041
|
-
return
|
|
6052
|
+
return Ut(o), c;
|
|
6042
6053
|
}) : ""
|
|
6043
6054
|
);
|
|
6044
6055
|
};
|
|
6045
6056
|
return s.preload = () => n || ((n = e()).then((a) => t = () => a.default), n), s;
|
|
6046
6057
|
}
|
|
6047
|
-
var
|
|
6048
|
-
function
|
|
6049
|
-
return O.context ? O.getNextContextId() : `cl-${
|
|
6058
|
+
var Sc = 0;
|
|
6059
|
+
function nd() {
|
|
6060
|
+
return O.context ? O.getNextContextId() : `cl-${Sc++}`;
|
|
6050
6061
|
}
|
|
6051
|
-
var
|
|
6052
|
-
function
|
|
6062
|
+
var la = (e) => `Stale read from <${e}>.`;
|
|
6063
|
+
function sd(e) {
|
|
6053
6064
|
const t = "fallback" in e && {
|
|
6054
6065
|
fallback: () => e.fallback
|
|
6055
6066
|
};
|
|
6056
|
-
return Ge(
|
|
6067
|
+
return Ge(vc(() => e.each, e.children, t || void 0));
|
|
6057
6068
|
}
|
|
6058
|
-
function
|
|
6069
|
+
function rd(e) {
|
|
6059
6070
|
const t = "fallback" in e && {
|
|
6060
6071
|
fallback: () => e.fallback
|
|
6061
6072
|
};
|
|
6062
|
-
return Ge(
|
|
6073
|
+
return Ge(Ec(() => e.each, e.children, t || void 0));
|
|
6063
6074
|
}
|
|
6064
|
-
function
|
|
6075
|
+
function ad(e) {
|
|
6065
6076
|
const t = e.keyed, n = Ge(() => e.when, void 0, {
|
|
6066
6077
|
equals: (s, a) => t ? s === a : !s == !a
|
|
6067
6078
|
});
|
|
@@ -6074,7 +6085,7 @@ function ed(e) {
|
|
|
6074
6085
|
() => a(
|
|
6075
6086
|
t ? s : () => {
|
|
6076
6087
|
if (!Ce(n))
|
|
6077
|
-
throw
|
|
6088
|
+
throw la("Show");
|
|
6078
6089
|
return e.when;
|
|
6079
6090
|
}
|
|
6080
6091
|
)
|
|
@@ -6086,9 +6097,9 @@ function ed(e) {
|
|
|
6086
6097
|
void 0
|
|
6087
6098
|
);
|
|
6088
6099
|
}
|
|
6089
|
-
function
|
|
6100
|
+
function id(e) {
|
|
6090
6101
|
let t = !1;
|
|
6091
|
-
const n = (i, l) => (t ? i[1] === l[1] : !i[1] == !l[1]) && i[2] === l[2], s =
|
|
6102
|
+
const n = (i, l) => (t ? i[1] === l[1] : !i[1] == !l[1]) && i[2] === l[2], s = Jr(() => e.children), a = Ge(
|
|
6092
6103
|
() => {
|
|
6093
6104
|
let i = s();
|
|
6094
6105
|
Array.isArray(i) || (i = [i]);
|
|
@@ -6114,7 +6125,7 @@ function td(e) {
|
|
|
6114
6125
|
() => c(
|
|
6115
6126
|
t ? l : () => {
|
|
6116
6127
|
if (Ce(a)[0] !== i)
|
|
6117
|
-
throw
|
|
6128
|
+
throw la("Match");
|
|
6118
6129
|
return o.when;
|
|
6119
6130
|
}
|
|
6120
6131
|
)
|
|
@@ -6124,10 +6135,10 @@ function td(e) {
|
|
|
6124
6135
|
void 0
|
|
6125
6136
|
);
|
|
6126
6137
|
}
|
|
6127
|
-
function
|
|
6138
|
+
function ld(e) {
|
|
6128
6139
|
return e;
|
|
6129
6140
|
}
|
|
6130
|
-
var
|
|
6141
|
+
var Nc = [
|
|
6131
6142
|
"allowfullscreen",
|
|
6132
6143
|
"async",
|
|
6133
6144
|
"autofocus",
|
|
@@ -6153,7 +6164,7 @@ var bc = [
|
|
|
6153
6164
|
"reversed",
|
|
6154
6165
|
"seamless",
|
|
6155
6166
|
"selected"
|
|
6156
|
-
],
|
|
6167
|
+
], Ac = /* @__PURE__ */ new Set([
|
|
6157
6168
|
"className",
|
|
6158
6169
|
"value",
|
|
6159
6170
|
"readOnly",
|
|
@@ -6161,16 +6172,16 @@ var bc = [
|
|
|
6161
6172
|
"isMap",
|
|
6162
6173
|
"noModule",
|
|
6163
6174
|
"playsInline",
|
|
6164
|
-
...
|
|
6165
|
-
]),
|
|
6175
|
+
...Nc
|
|
6176
|
+
]), xc = /* @__PURE__ */ new Set([
|
|
6166
6177
|
"innerHTML",
|
|
6167
6178
|
"textContent",
|
|
6168
6179
|
"innerText",
|
|
6169
6180
|
"children"
|
|
6170
|
-
]),
|
|
6181
|
+
]), Tc = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
6171
6182
|
className: "class",
|
|
6172
6183
|
htmlFor: "for"
|
|
6173
|
-
}),
|
|
6184
|
+
}), Cc = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
6174
6185
|
class: "className",
|
|
6175
6186
|
formnovalidate: {
|
|
6176
6187
|
$: "formNoValidate",
|
|
@@ -6195,11 +6206,11 @@ var bc = [
|
|
|
6195
6206
|
TEXTAREA: 1
|
|
6196
6207
|
}
|
|
6197
6208
|
});
|
|
6198
|
-
function
|
|
6199
|
-
const n =
|
|
6209
|
+
function Pc(e, t) {
|
|
6210
|
+
const n = Cc[e];
|
|
6200
6211
|
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
6201
6212
|
}
|
|
6202
|
-
var
|
|
6213
|
+
var _c = /* @__PURE__ */ new Set([
|
|
6203
6214
|
"beforeinput",
|
|
6204
6215
|
"click",
|
|
6205
6216
|
"dblclick",
|
|
@@ -6222,7 +6233,7 @@ var Tc = /* @__PURE__ */ new Set([
|
|
|
6222
6233
|
"touchend",
|
|
6223
6234
|
"touchmove",
|
|
6224
6235
|
"touchstart"
|
|
6225
|
-
]),
|
|
6236
|
+
]), Ic = /* @__PURE__ */ new Set([
|
|
6226
6237
|
"altGlyph",
|
|
6227
6238
|
"altGlyphDef",
|
|
6228
6239
|
"altGlyphItem",
|
|
@@ -6300,11 +6311,11 @@ var Tc = /* @__PURE__ */ new Set([
|
|
|
6300
6311
|
"use",
|
|
6301
6312
|
"view",
|
|
6302
6313
|
"vkern"
|
|
6303
|
-
]),
|
|
6314
|
+
]), kc = {
|
|
6304
6315
|
xlink: "http://www.w3.org/1999/xlink",
|
|
6305
6316
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
6306
6317
|
};
|
|
6307
|
-
function
|
|
6318
|
+
function Lc(e, t, n) {
|
|
6308
6319
|
let s = n.length, a = t.length, i = s, l = 0, o = 0, c = t[a - 1].nextSibling, h = null;
|
|
6309
6320
|
for (; l < a || o < i; ) {
|
|
6310
6321
|
if (t[l] === n[o]) {
|
|
@@ -6350,15 +6361,15 @@ function _c(e, t, n) {
|
|
|
6350
6361
|
}
|
|
6351
6362
|
}
|
|
6352
6363
|
var Ot = "_$DX_DELEGATE";
|
|
6353
|
-
function
|
|
6364
|
+
function oa(e, t, n, s = {}) {
|
|
6354
6365
|
let a;
|
|
6355
6366
|
return lt((i) => {
|
|
6356
|
-
a = i, t === document ? e() :
|
|
6367
|
+
a = i, t === document ? e() : es(t, e(), t.firstChild ? null : void 0, n);
|
|
6357
6368
|
}, s.owner), () => {
|
|
6358
6369
|
a(), t.textContent = "";
|
|
6359
6370
|
};
|
|
6360
6371
|
}
|
|
6361
|
-
function
|
|
6372
|
+
function od(e, t, n) {
|
|
6362
6373
|
let s;
|
|
6363
6374
|
const a = () => {
|
|
6364
6375
|
const l = document.createElement("template");
|
|
@@ -6366,33 +6377,33 @@ function sd(e, t, n) {
|
|
|
6366
6377
|
}, i = () => (s || (s = a())).cloneNode(!0);
|
|
6367
6378
|
return i.cloneNode = i, i;
|
|
6368
6379
|
}
|
|
6369
|
-
function
|
|
6380
|
+
function Dc(e, t = window.document) {
|
|
6370
6381
|
const n = t[Ot] || (t[Ot] = /* @__PURE__ */ new Set());
|
|
6371
6382
|
for (let s = 0, a = e.length; s < a; s++) {
|
|
6372
6383
|
const i = e[s];
|
|
6373
|
-
n.has(i) || (n.add(i), t.addEventListener(i,
|
|
6384
|
+
n.has(i) || (n.add(i), t.addEventListener(i, ca));
|
|
6374
6385
|
}
|
|
6375
6386
|
}
|
|
6376
|
-
function
|
|
6387
|
+
function cd(e = window.document) {
|
|
6377
6388
|
if (e[Ot]) {
|
|
6378
6389
|
for (let t of e[Ot].keys())
|
|
6379
|
-
e.removeEventListener(t,
|
|
6390
|
+
e.removeEventListener(t, ca);
|
|
6380
6391
|
delete e[Ot];
|
|
6381
6392
|
}
|
|
6382
6393
|
}
|
|
6383
|
-
function
|
|
6394
|
+
function Jn(e, t, n) {
|
|
6384
6395
|
ht(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
6385
6396
|
}
|
|
6386
|
-
function
|
|
6397
|
+
function Gc(e, t, n, s) {
|
|
6387
6398
|
ht(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
|
|
6388
6399
|
}
|
|
6389
|
-
function
|
|
6400
|
+
function Uc(e, t, n) {
|
|
6390
6401
|
ht(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
|
|
6391
6402
|
}
|
|
6392
|
-
function
|
|
6403
|
+
function Rc(e, t) {
|
|
6393
6404
|
ht(e) || (t == null ? e.removeAttribute("class") : e.className = t);
|
|
6394
6405
|
}
|
|
6395
|
-
function
|
|
6406
|
+
function Oc(e, t, n, s) {
|
|
6396
6407
|
if (s)
|
|
6397
6408
|
Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
6398
6409
|
else if (Array.isArray(n)) {
|
|
@@ -6401,22 +6412,22 @@ function Gc(e, t, n, s) {
|
|
|
6401
6412
|
} else
|
|
6402
6413
|
e.addEventListener(t, n, typeof n != "function" && n);
|
|
6403
6414
|
}
|
|
6404
|
-
function
|
|
6415
|
+
function Bc(e, t, n = {}) {
|
|
6405
6416
|
const s = Object.keys(t || {}), a = Object.keys(n);
|
|
6406
6417
|
let i, l;
|
|
6407
6418
|
for (i = 0, l = a.length; i < l; i++) {
|
|
6408
6419
|
const o = a[i];
|
|
6409
|
-
!o || o === "undefined" || t[o] || (
|
|
6420
|
+
!o || o === "undefined" || t[o] || (Ks(e, o, !1), delete n[o]);
|
|
6410
6421
|
}
|
|
6411
6422
|
for (i = 0, l = s.length; i < l; i++) {
|
|
6412
6423
|
const o = s[i], c = !!t[o];
|
|
6413
|
-
!o || o === "undefined" || n[o] === c || !c || (
|
|
6424
|
+
!o || o === "undefined" || n[o] === c || !c || (Ks(e, o, !0), n[o] = c);
|
|
6414
6425
|
}
|
|
6415
6426
|
return n;
|
|
6416
6427
|
}
|
|
6417
|
-
function
|
|
6428
|
+
function Mc(e, t, n) {
|
|
6418
6429
|
if (!t)
|
|
6419
|
-
return n ?
|
|
6430
|
+
return n ? Jn(e, "style") : t;
|
|
6420
6431
|
const s = e.style;
|
|
6421
6432
|
if (typeof t == "string")
|
|
6422
6433
|
return s.cssText = t;
|
|
@@ -6428,56 +6439,56 @@ function Uc(e, t, n) {
|
|
|
6428
6439
|
a = t[i], a !== n[i] && (s.setProperty(i, a), n[i] = a);
|
|
6429
6440
|
return n;
|
|
6430
6441
|
}
|
|
6431
|
-
function
|
|
6442
|
+
function Fc(e, t = {}, n, s) {
|
|
6432
6443
|
const a = {};
|
|
6433
6444
|
return s || ot(
|
|
6434
6445
|
() => a.children = Ht(e, t.children, a.children)
|
|
6435
|
-
), ot(() => typeof t.ref == "function" &&
|
|
6446
|
+
), ot(() => typeof t.ref == "function" && qc(t.ref, e)), ot(() => Hc(e, t, n, !0, a, !0)), a;
|
|
6436
6447
|
}
|
|
6437
|
-
function
|
|
6448
|
+
function qc(e, t, n) {
|
|
6438
6449
|
return Ce(() => e(t, n));
|
|
6439
6450
|
}
|
|
6440
|
-
function
|
|
6451
|
+
function es(e, t, n, s) {
|
|
6441
6452
|
if (n !== void 0 && !s && (s = []), typeof t != "function")
|
|
6442
6453
|
return Ht(e, t, s, n);
|
|
6443
6454
|
ot((a) => Ht(e, t(), a, n), s);
|
|
6444
6455
|
}
|
|
6445
|
-
function
|
|
6456
|
+
function Hc(e, t, n, s, a = {}, i = !1) {
|
|
6446
6457
|
t || (t = {});
|
|
6447
6458
|
for (const l in a)
|
|
6448
6459
|
if (!(l in t)) {
|
|
6449
6460
|
if (l === "children")
|
|
6450
6461
|
continue;
|
|
6451
|
-
a[l] =
|
|
6462
|
+
a[l] = Vs(e, l, null, a[l], n, i, t);
|
|
6452
6463
|
}
|
|
6453
6464
|
for (const l in t) {
|
|
6454
6465
|
if (l === "children")
|
|
6455
6466
|
continue;
|
|
6456
6467
|
const o = t[l];
|
|
6457
|
-
a[l] =
|
|
6468
|
+
a[l] = Vs(e, l, o, a[l], n, i, t);
|
|
6458
6469
|
}
|
|
6459
6470
|
}
|
|
6460
|
-
function
|
|
6471
|
+
function Kc(e) {
|
|
6461
6472
|
let t, n;
|
|
6462
|
-
return !ht() || !(t = O.registry.get(n =
|
|
6473
|
+
return !ht() || !(t = O.registry.get(n = jc())) ? e() : (O.completed && O.completed.add(t), O.registry.delete(n), t);
|
|
6463
6474
|
}
|
|
6464
6475
|
function ht(e) {
|
|
6465
6476
|
return !!O.context && !O.done && (!e || e.isConnected);
|
|
6466
6477
|
}
|
|
6467
|
-
function
|
|
6478
|
+
function Vc(e) {
|
|
6468
6479
|
return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
6469
6480
|
}
|
|
6470
|
-
function
|
|
6481
|
+
function Ks(e, t, n) {
|
|
6471
6482
|
const s = t.trim().split(/\s+/);
|
|
6472
6483
|
for (let a = 0, i = s.length; a < i; a++)
|
|
6473
6484
|
e.classList.toggle(s[a], n);
|
|
6474
6485
|
}
|
|
6475
|
-
function
|
|
6486
|
+
function Vs(e, t, n, s, a, i, l) {
|
|
6476
6487
|
let o, c, h, g, d;
|
|
6477
6488
|
if (t === "style")
|
|
6478
|
-
return
|
|
6489
|
+
return Mc(e, n, s);
|
|
6479
6490
|
if (t === "classList")
|
|
6480
|
-
return
|
|
6491
|
+
return Bc(e, n, s);
|
|
6481
6492
|
if (n === s)
|
|
6482
6493
|
return s;
|
|
6483
6494
|
if (t === "ref")
|
|
@@ -6489,29 +6500,29 @@ function Hs(e, t, n, s, a, i, l) {
|
|
|
6489
6500
|
const w = t.slice(10);
|
|
6490
6501
|
s && e.removeEventListener(w, s, !0), n && e.addEventListener(w, n, !0);
|
|
6491
6502
|
} else if (t.slice(0, 2) === "on") {
|
|
6492
|
-
const w = t.slice(2).toLowerCase(), y =
|
|
6503
|
+
const w = t.slice(2).toLowerCase(), y = _c.has(w);
|
|
6493
6504
|
if (!y && s) {
|
|
6494
6505
|
const p = Array.isArray(s) ? s[0] : s;
|
|
6495
6506
|
e.removeEventListener(w, p);
|
|
6496
6507
|
}
|
|
6497
|
-
(y || n) && (
|
|
6508
|
+
(y || n) && (Oc(e, w, n, y), y && Dc([w]));
|
|
6498
6509
|
} else if (t.slice(0, 5) === "attr:")
|
|
6499
|
-
|
|
6510
|
+
Jn(e, t.slice(5), n);
|
|
6500
6511
|
else if (t.slice(0, 5) === "bool:")
|
|
6501
|
-
|
|
6502
|
-
else if ((d = t.slice(0, 5) === "prop:") || (h =
|
|
6512
|
+
Uc(e, t.slice(5), n);
|
|
6513
|
+
else if ((d = t.slice(0, 5) === "prop:") || (h = xc.has(t)) || !a && ((g = Pc(t, e.tagName)) || (c = Ac.has(t))) || (o = e.nodeName.includes("-") || "is" in l)) {
|
|
6503
6514
|
if (d)
|
|
6504
6515
|
t = t.slice(5), c = !0;
|
|
6505
6516
|
else if (ht(e))
|
|
6506
6517
|
return n;
|
|
6507
|
-
t === "class" || t === "className" ?
|
|
6518
|
+
t === "class" || t === "className" ? Rc(e, n) : o && !c && !h ? e[Vc(t)] = n : e[g || t] = n;
|
|
6508
6519
|
} else {
|
|
6509
|
-
const w = a && t.indexOf(":") > -1 &&
|
|
6510
|
-
w ?
|
|
6520
|
+
const w = a && t.indexOf(":") > -1 && kc[t.split(":")[0]];
|
|
6521
|
+
w ? Gc(e, w, t, n) : Jn(e, Tc[t] || t, n);
|
|
6511
6522
|
}
|
|
6512
6523
|
return n;
|
|
6513
6524
|
}
|
|
6514
|
-
function
|
|
6525
|
+
function ca(e) {
|
|
6515
6526
|
if (O.registry && O.events && O.events.find(([c, h]) => h === e))
|
|
6516
6527
|
return;
|
|
6517
6528
|
let t = e.target;
|
|
@@ -6588,7 +6599,7 @@ function Ht(e, t, n, s, a) {
|
|
|
6588
6599
|
}), () => n;
|
|
6589
6600
|
if (Array.isArray(t)) {
|
|
6590
6601
|
const c = [], h = n && Array.isArray(n);
|
|
6591
|
-
if (
|
|
6602
|
+
if (ts(c, t, n, a))
|
|
6592
6603
|
return ot(() => n = Ht(e, c, n, s, !0)), () => n;
|
|
6593
6604
|
if (i) {
|
|
6594
6605
|
if (!c.length)
|
|
@@ -6606,7 +6617,7 @@ function Ht(e, t, n, s, a) {
|
|
|
6606
6617
|
if (c.length === 0) {
|
|
6607
6618
|
if (n = mt(e, n, s), o)
|
|
6608
6619
|
return n;
|
|
6609
|
-
} else h ? n.length === 0 ?
|
|
6620
|
+
} else h ? n.length === 0 ? js(e, c, s) : Lc(e, n, c) : (n && mt(e), js(e, c));
|
|
6610
6621
|
n = c;
|
|
6611
6622
|
} else if (t.nodeType) {
|
|
6612
6623
|
if (i && t.parentNode)
|
|
@@ -6621,7 +6632,7 @@ function Ht(e, t, n, s, a) {
|
|
|
6621
6632
|
}
|
|
6622
6633
|
return n;
|
|
6623
6634
|
}
|
|
6624
|
-
function
|
|
6635
|
+
function ts(e, t, n, s) {
|
|
6625
6636
|
let a = !1;
|
|
6626
6637
|
for (let i = 0, l = t.length; i < l; i++) {
|
|
6627
6638
|
let o = t[i], c = n && n[e.length], h;
|
|
@@ -6629,12 +6640,12 @@ function Jn(e, t, n, s) {
|
|
|
6629
6640
|
if ((h = typeof o) == "object" && o.nodeType)
|
|
6630
6641
|
e.push(o);
|
|
6631
6642
|
else if (Array.isArray(o))
|
|
6632
|
-
a =
|
|
6643
|
+
a = ts(e, o, c) || a;
|
|
6633
6644
|
else if (h === "function")
|
|
6634
6645
|
if (s) {
|
|
6635
6646
|
for (; typeof o == "function"; )
|
|
6636
6647
|
o = o();
|
|
6637
|
-
a =
|
|
6648
|
+
a = ts(
|
|
6638
6649
|
e,
|
|
6639
6650
|
Array.isArray(o) ? o : [o],
|
|
6640
6651
|
Array.isArray(c) ? c : [c]
|
|
@@ -6648,7 +6659,7 @@ function Jn(e, t, n, s) {
|
|
|
6648
6659
|
}
|
|
6649
6660
|
return a;
|
|
6650
6661
|
}
|
|
6651
|
-
function
|
|
6662
|
+
function js(e, t, n = null) {
|
|
6652
6663
|
for (let s = 0, a = t.length; s < a; s++)
|
|
6653
6664
|
e.insertBefore(t[s], n);
|
|
6654
6665
|
}
|
|
@@ -6670,25 +6681,25 @@ function mt(e, t, n, s) {
|
|
|
6670
6681
|
e.insertBefore(a, n);
|
|
6671
6682
|
return [a];
|
|
6672
6683
|
}
|
|
6673
|
-
function
|
|
6684
|
+
function jc() {
|
|
6674
6685
|
return O.getNextContextId();
|
|
6675
6686
|
}
|
|
6676
|
-
var
|
|
6677
|
-
function
|
|
6678
|
-
return t ? document.createElementNS(
|
|
6687
|
+
var $c = "http://www.w3.org/2000/svg";
|
|
6688
|
+
function ua(e, t = !1) {
|
|
6689
|
+
return t ? document.createElementNS($c, e) : document.createElement(e);
|
|
6679
6690
|
}
|
|
6680
|
-
function
|
|
6681
|
-
const { useShadow: t } = e, n = document.createTextNode(""), s = () => e.mount || document.body, a =
|
|
6691
|
+
function ud(e) {
|
|
6692
|
+
const { useShadow: t } = e, n = document.createTextNode(""), s = () => e.mount || document.body, a = Hs();
|
|
6682
6693
|
let i, l = !!O.context;
|
|
6683
|
-
return
|
|
6694
|
+
return Zr(
|
|
6684
6695
|
() => {
|
|
6685
|
-
l && (
|
|
6696
|
+
l && (Hs().user = l = !1), i || (i = uc(a, () => Ge(() => e.children)));
|
|
6686
6697
|
const o = s();
|
|
6687
6698
|
if (o instanceof HTMLHeadElement) {
|
|
6688
6699
|
const [c, h] = ve(!1), g = () => h(!0);
|
|
6689
|
-
lt((d) =>
|
|
6700
|
+
lt((d) => es(o, () => c() ? d() : i(), null)), Ft(g);
|
|
6690
6701
|
} else {
|
|
6691
|
-
const c =
|
|
6702
|
+
const c = ua(e.isSVG ? "g" : "div", e.isSVG), h = t && c.attachShadow ? c.attachShadow({
|
|
6692
6703
|
mode: "open"
|
|
6693
6704
|
}) : c;
|
|
6694
6705
|
Object.defineProperty(c, "_$host", {
|
|
@@ -6696,7 +6707,7 @@ function ad(e) {
|
|
|
6696
6707
|
return n.parentNode;
|
|
6697
6708
|
},
|
|
6698
6709
|
configurable: !0
|
|
6699
|
-
}),
|
|
6710
|
+
}), es(h, i), o.appendChild(c), e.ref && e.ref(c), Ft(() => o.removeChild(c));
|
|
6700
6711
|
}
|
|
6701
6712
|
},
|
|
6702
6713
|
void 0,
|
|
@@ -6705,20 +6716,20 @@ function ad(e) {
|
|
|
6705
6716
|
}
|
|
6706
6717
|
), n;
|
|
6707
6718
|
}
|
|
6708
|
-
function
|
|
6709
|
-
const [t, n] =
|
|
6719
|
+
function dd(e) {
|
|
6720
|
+
const [t, n] = wc(e, ["component"]), s = Ge(() => t.component);
|
|
6710
6721
|
return Ge(() => {
|
|
6711
6722
|
const a = s();
|
|
6712
6723
|
switch (typeof a) {
|
|
6713
6724
|
case "function":
|
|
6714
6725
|
return Ce(() => a(n));
|
|
6715
6726
|
case "string":
|
|
6716
|
-
const i =
|
|
6717
|
-
return
|
|
6727
|
+
const i = Ic.has(a), l = O.context ? Kc() : ua(a, i);
|
|
6728
|
+
return Fc(l, n, i), l;
|
|
6718
6729
|
}
|
|
6719
6730
|
});
|
|
6720
6731
|
}
|
|
6721
|
-
var
|
|
6732
|
+
var zc = class {
|
|
6722
6733
|
constructor() {
|
|
6723
6734
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
6724
6735
|
}
|
|
@@ -6734,9 +6745,9 @@ var Vc = class {
|
|
|
6734
6745
|
clear() {
|
|
6735
6746
|
this.keyToValue.clear(), this.valueToKey.clear();
|
|
6736
6747
|
}
|
|
6737
|
-
},
|
|
6748
|
+
}, da = class {
|
|
6738
6749
|
constructor(e) {
|
|
6739
|
-
this.generateIdentifier = e, this.kv = new
|
|
6750
|
+
this.generateIdentifier = e, this.kv = new zc();
|
|
6740
6751
|
}
|
|
6741
6752
|
register(e, t) {
|
|
6742
6753
|
this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
|
|
@@ -6750,7 +6761,7 @@ var Vc = class {
|
|
|
6750
6761
|
getValue(e) {
|
|
6751
6762
|
return this.kv.getByKey(e);
|
|
6752
6763
|
}
|
|
6753
|
-
},
|
|
6764
|
+
}, Wc = class extends da {
|
|
6754
6765
|
constructor() {
|
|
6755
6766
|
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
6756
6767
|
}
|
|
@@ -6761,7 +6772,7 @@ var Vc = class {
|
|
|
6761
6772
|
return this.classToAllowedProps.get(e);
|
|
6762
6773
|
}
|
|
6763
6774
|
};
|
|
6764
|
-
function
|
|
6775
|
+
function Yc(e) {
|
|
6765
6776
|
if ("values" in Object)
|
|
6766
6777
|
return Object.values(e);
|
|
6767
6778
|
const t = [];
|
|
@@ -6769,8 +6780,8 @@ function $c(e) {
|
|
|
6769
6780
|
e.hasOwnProperty(n) && t.push(e[n]);
|
|
6770
6781
|
return t;
|
|
6771
6782
|
}
|
|
6772
|
-
function
|
|
6773
|
-
const n =
|
|
6783
|
+
function Qc(e, t) {
|
|
6784
|
+
const n = Yc(e);
|
|
6774
6785
|
if ("find" in n)
|
|
6775
6786
|
return n.find(t);
|
|
6776
6787
|
const s = n;
|
|
@@ -6783,17 +6794,17 @@ function zc(e, t) {
|
|
|
6783
6794
|
function kt(e, t) {
|
|
6784
6795
|
Object.entries(e).forEach(([n, s]) => t(s, n));
|
|
6785
6796
|
}
|
|
6786
|
-
function
|
|
6797
|
+
function xn(e, t) {
|
|
6787
6798
|
return e.indexOf(t) !== -1;
|
|
6788
6799
|
}
|
|
6789
|
-
function
|
|
6800
|
+
function $s(e, t) {
|
|
6790
6801
|
for (let n = 0; n < e.length; n++) {
|
|
6791
6802
|
const s = e[n];
|
|
6792
6803
|
if (t(s))
|
|
6793
6804
|
return s;
|
|
6794
6805
|
}
|
|
6795
6806
|
}
|
|
6796
|
-
var
|
|
6807
|
+
var Xc = class {
|
|
6797
6808
|
constructor() {
|
|
6798
6809
|
this.transfomers = {};
|
|
6799
6810
|
}
|
|
@@ -6801,12 +6812,12 @@ var Wc = class {
|
|
|
6801
6812
|
this.transfomers[e.name] = e;
|
|
6802
6813
|
}
|
|
6803
6814
|
findApplicable(e) {
|
|
6804
|
-
return
|
|
6815
|
+
return Qc(this.transfomers, (t) => t.isApplicable(e));
|
|
6805
6816
|
}
|
|
6806
6817
|
findByName(e) {
|
|
6807
6818
|
return this.transfomers[e];
|
|
6808
6819
|
}
|
|
6809
|
-
},
|
|
6820
|
+
}, Zc = (e) => Object.prototype.toString.call(e).slice(8, -1), ha = (e) => typeof e > "u", Jc = (e) => e === null, Kt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, ns = (e) => Kt(e) && Object.keys(e).length === 0, nt = (e) => Array.isArray(e), eu = (e) => typeof e == "string", tu = (e) => typeof e == "number" && !isNaN(e), nu = (e) => typeof e == "boolean", su = (e) => e instanceof RegExp, Vt = (e) => e instanceof Map, jt = (e) => e instanceof Set, ma = (e) => Zc(e) === "Symbol", ru = (e) => e instanceof Date && !isNaN(e.valueOf()), au = (e) => e instanceof Error, zs = (e) => typeof e == "number" && isNaN(e), iu = (e) => nu(e) || Jc(e) || ha(e) || tu(e) || eu(e) || ma(e), lu = (e) => typeof e == "bigint", ou = (e) => e === 1 / 0 || e === -1 / 0, cu = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), uu = (e) => e instanceof URL, fa = (e) => e.replace(/\./g, "\\."), $n = (e) => e.map(String).map(fa).join("."), Bt = (e) => {
|
|
6810
6821
|
const t = [];
|
|
6811
6822
|
let n = "";
|
|
6812
6823
|
for (let a = 0; a < e.length; a++) {
|
|
@@ -6832,12 +6843,12 @@ function ze(e, t, n, s) {
|
|
|
6832
6843
|
untransform: s
|
|
6833
6844
|
};
|
|
6834
6845
|
}
|
|
6835
|
-
var
|
|
6836
|
-
ze(
|
|
6846
|
+
var ga = [
|
|
6847
|
+
ze(ha, "undefined", () => null, () => {
|
|
6837
6848
|
}),
|
|
6838
|
-
ze(
|
|
6839
|
-
ze(
|
|
6840
|
-
ze(
|
|
6849
|
+
ze(lu, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
6850
|
+
ze(ru, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
6851
|
+
ze(au, "Error", (e, t) => {
|
|
6841
6852
|
const n = {
|
|
6842
6853
|
name: e.name,
|
|
6843
6854
|
message: e.message
|
|
@@ -6851,7 +6862,7 @@ var fa = [
|
|
|
6851
6862
|
n[s] = e[s];
|
|
6852
6863
|
}), n;
|
|
6853
6864
|
}),
|
|
6854
|
-
ze(
|
|
6865
|
+
ze(su, "regexp", (e) => "" + e, (e) => {
|
|
6855
6866
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
6856
6867
|
return new RegExp(t, n);
|
|
6857
6868
|
}),
|
|
@@ -6864,11 +6875,11 @@ var fa = [
|
|
|
6864
6875
|
(e) => new Set(e)
|
|
6865
6876
|
),
|
|
6866
6877
|
ze(Vt, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
6867
|
-
ze((e) =>
|
|
6878
|
+
ze((e) => zs(e) || ou(e), "number", (e) => zs(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
6868
6879
|
ze((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
6869
|
-
ze(
|
|
6880
|
+
ze(uu, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
6870
6881
|
];
|
|
6871
|
-
function
|
|
6882
|
+
function Mn(e, t, n, s) {
|
|
6872
6883
|
return {
|
|
6873
6884
|
isApplicable: e,
|
|
6874
6885
|
annotation: t,
|
|
@@ -6876,12 +6887,12 @@ function Bn(e, t, n, s) {
|
|
|
6876
6887
|
untransform: s
|
|
6877
6888
|
};
|
|
6878
6889
|
}
|
|
6879
|
-
var
|
|
6890
|
+
var pa = Mn((e, t) => ma(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) => ["symbol", t.symbolRegistry.getIdentifier(e)], (e) => e.description, (e, t, n) => {
|
|
6880
6891
|
const s = n.symbolRegistry.getValue(t[1]);
|
|
6881
6892
|
if (!s)
|
|
6882
6893
|
throw new Error("Trying to deserialize unknown symbol");
|
|
6883
6894
|
return s;
|
|
6884
|
-
}),
|
|
6895
|
+
}), du = [
|
|
6885
6896
|
Int8Array,
|
|
6886
6897
|
Uint8Array,
|
|
6887
6898
|
Int16Array,
|
|
@@ -6891,16 +6902,16 @@ var ga = Bn((e, t) => ha(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
6891
6902
|
Float32Array,
|
|
6892
6903
|
Float64Array,
|
|
6893
6904
|
Uint8ClampedArray
|
|
6894
|
-
].reduce((e, t) => (e[t.name] = t, e), {}),
|
|
6895
|
-
const n =
|
|
6905
|
+
].reduce((e, t) => (e[t.name] = t, e), {}), ya = Mn(cu, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
6906
|
+
const n = du[t[1]];
|
|
6896
6907
|
if (!n)
|
|
6897
6908
|
throw new Error("Trying to deserialize unknown typed array");
|
|
6898
6909
|
return new n(e);
|
|
6899
6910
|
});
|
|
6900
|
-
function
|
|
6911
|
+
function va(e, t) {
|
|
6901
6912
|
return e != null && e.constructor ? !!t.classRegistry.getIdentifier(e.constructor) : !1;
|
|
6902
6913
|
}
|
|
6903
|
-
var
|
|
6914
|
+
var Ea = Mn(va, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)], (e, t) => {
|
|
6904
6915
|
const n = t.classRegistry.getAllowedProps(e.constructor);
|
|
6905
6916
|
if (!n)
|
|
6906
6917
|
return { ...e };
|
|
@@ -6913,44 +6924,44 @@ var va = Bn(ya, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
6913
6924
|
if (!s)
|
|
6914
6925
|
throw new Error("Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564");
|
|
6915
6926
|
return Object.assign(Object.create(s.prototype), e);
|
|
6916
|
-
}),
|
|
6927
|
+
}), ba = Mn((e, t) => !!t.customTransformerRegistry.findApplicable(e), (e, t) => ["custom", t.customTransformerRegistry.findApplicable(e).name], (e, t) => t.customTransformerRegistry.findApplicable(e).serialize(e), (e, t, n) => {
|
|
6917
6928
|
const s = n.customTransformerRegistry.findByName(t[1]);
|
|
6918
6929
|
if (!s)
|
|
6919
6930
|
throw new Error("Trying to deserialize unknown custom value");
|
|
6920
6931
|
return s.deserialize(e);
|
|
6921
|
-
}),
|
|
6922
|
-
const n =
|
|
6932
|
+
}), hu = [Ea, pa, ba, ya], Ws = (e, t) => {
|
|
6933
|
+
const n = $s(hu, (a) => a.isApplicable(e, t));
|
|
6923
6934
|
if (n)
|
|
6924
6935
|
return {
|
|
6925
6936
|
value: n.transform(e, t),
|
|
6926
6937
|
type: n.annotation(e, t)
|
|
6927
6938
|
};
|
|
6928
|
-
const s =
|
|
6939
|
+
const s = $s(ga, (a) => a.isApplicable(e, t));
|
|
6929
6940
|
if (s)
|
|
6930
6941
|
return {
|
|
6931
6942
|
value: s.transform(e, t),
|
|
6932
6943
|
type: s.annotation
|
|
6933
6944
|
};
|
|
6934
|
-
},
|
|
6935
|
-
|
|
6936
|
-
|
|
6945
|
+
}, wa = {};
|
|
6946
|
+
ga.forEach((e) => {
|
|
6947
|
+
wa[e.annotation] = e;
|
|
6937
6948
|
});
|
|
6938
|
-
var
|
|
6949
|
+
var mu = (e, t, n) => {
|
|
6939
6950
|
if (nt(t))
|
|
6940
6951
|
switch (t[0]) {
|
|
6941
6952
|
case "symbol":
|
|
6942
|
-
return
|
|
6953
|
+
return pa.untransform(e, t, n);
|
|
6943
6954
|
case "class":
|
|
6944
|
-
return va.untransform(e, t, n);
|
|
6945
|
-
case "custom":
|
|
6946
6955
|
return Ea.untransform(e, t, n);
|
|
6956
|
+
case "custom":
|
|
6957
|
+
return ba.untransform(e, t, n);
|
|
6947
6958
|
case "typed-array":
|
|
6948
|
-
return
|
|
6959
|
+
return ya.untransform(e, t, n);
|
|
6949
6960
|
default:
|
|
6950
6961
|
throw new Error("Unknown transformation: " + t);
|
|
6951
6962
|
}
|
|
6952
6963
|
else {
|
|
6953
|
-
const s =
|
|
6964
|
+
const s = wa[t];
|
|
6954
6965
|
if (!s)
|
|
6955
6966
|
throw new Error("Unknown transformation: " + t);
|
|
6956
6967
|
return s.untransform(e, n);
|
|
@@ -6961,16 +6972,16 @@ var uu = (e, t, n) => {
|
|
|
6961
6972
|
n.next(), t--;
|
|
6962
6973
|
return n.next().value;
|
|
6963
6974
|
};
|
|
6964
|
-
function
|
|
6965
|
-
if (
|
|
6975
|
+
function Sa(e) {
|
|
6976
|
+
if (xn(e, "__proto__"))
|
|
6966
6977
|
throw new Error("__proto__ is not allowed as a property");
|
|
6967
|
-
if (
|
|
6978
|
+
if (xn(e, "prototype"))
|
|
6968
6979
|
throw new Error("prototype is not allowed as a property");
|
|
6969
|
-
if (
|
|
6980
|
+
if (xn(e, "constructor"))
|
|
6970
6981
|
throw new Error("constructor is not allowed as a property");
|
|
6971
6982
|
}
|
|
6972
|
-
var
|
|
6973
|
-
|
|
6983
|
+
var fu = (e, t) => {
|
|
6984
|
+
Sa(t);
|
|
6974
6985
|
for (let n = 0; n < t.length; n++) {
|
|
6975
6986
|
const s = t[n];
|
|
6976
6987
|
if (jt(e))
|
|
@@ -6989,8 +7000,8 @@ var du = (e, t) => {
|
|
|
6989
7000
|
e = e[s];
|
|
6990
7001
|
}
|
|
6991
7002
|
return e;
|
|
6992
|
-
},
|
|
6993
|
-
if (
|
|
7003
|
+
}, ss = (e, t, n) => {
|
|
7004
|
+
if (Sa(t), t.length === 0)
|
|
6994
7005
|
return n(e);
|
|
6995
7006
|
let s = e;
|
|
6996
7007
|
for (let i = 0; i < t.length - 1; i++) {
|
|
@@ -7038,45 +7049,45 @@ var du = (e, t) => {
|
|
|
7038
7049
|
}
|
|
7039
7050
|
return e;
|
|
7040
7051
|
};
|
|
7041
|
-
function
|
|
7052
|
+
function rs(e, t, n = []) {
|
|
7042
7053
|
if (!e)
|
|
7043
7054
|
return;
|
|
7044
7055
|
if (!nt(e)) {
|
|
7045
|
-
kt(e, (i, l) =>
|
|
7056
|
+
kt(e, (i, l) => rs(i, t, [...n, ...Bt(l)]));
|
|
7046
7057
|
return;
|
|
7047
7058
|
}
|
|
7048
7059
|
const [s, a] = e;
|
|
7049
7060
|
a && kt(a, (i, l) => {
|
|
7050
|
-
|
|
7061
|
+
rs(i, t, [...n, ...Bt(l)]);
|
|
7051
7062
|
}), t(s, n);
|
|
7052
7063
|
}
|
|
7053
|
-
function
|
|
7054
|
-
return
|
|
7055
|
-
e =
|
|
7064
|
+
function gu(e, t, n) {
|
|
7065
|
+
return rs(t, (s, a) => {
|
|
7066
|
+
e = ss(e, a, (i) => mu(i, s, n));
|
|
7056
7067
|
}), e;
|
|
7057
7068
|
}
|
|
7058
|
-
function
|
|
7069
|
+
function pu(e, t) {
|
|
7059
7070
|
function n(s, a) {
|
|
7060
|
-
const i =
|
|
7071
|
+
const i = fu(e, Bt(a));
|
|
7061
7072
|
s.map(Bt).forEach((l) => {
|
|
7062
|
-
e =
|
|
7073
|
+
e = ss(e, l, () => i);
|
|
7063
7074
|
});
|
|
7064
7075
|
}
|
|
7065
7076
|
if (nt(t)) {
|
|
7066
7077
|
const [s, a] = t;
|
|
7067
7078
|
s.forEach((i) => {
|
|
7068
|
-
e =
|
|
7079
|
+
e = ss(e, Bt(i), () => e);
|
|
7069
7080
|
}), a && kt(a, n);
|
|
7070
7081
|
} else
|
|
7071
7082
|
kt(t, n);
|
|
7072
7083
|
return e;
|
|
7073
7084
|
}
|
|
7074
|
-
var
|
|
7075
|
-
function
|
|
7085
|
+
var yu = (e, t) => Kt(e) || nt(e) || Vt(e) || jt(e) || va(e, t);
|
|
7086
|
+
function vu(e, t, n) {
|
|
7076
7087
|
const s = n.get(e);
|
|
7077
7088
|
s ? s.push(t) : n.set(e, [t]);
|
|
7078
7089
|
}
|
|
7079
|
-
function
|
|
7090
|
+
function Eu(e, t) {
|
|
7080
7091
|
const n = {};
|
|
7081
7092
|
let s;
|
|
7082
7093
|
return e.forEach((a) => {
|
|
@@ -7084,21 +7095,21 @@ function pu(e, t) {
|
|
|
7084
7095
|
return;
|
|
7085
7096
|
t || (a = a.map((o) => o.map(String)).sort((o, c) => o.length - c.length));
|
|
7086
7097
|
const [i, ...l] = a;
|
|
7087
|
-
i.length === 0 ? s = l.map(
|
|
7088
|
-
}), s ?
|
|
7098
|
+
i.length === 0 ? s = l.map($n) : n[$n(i)] = l.map($n);
|
|
7099
|
+
}), s ? ns(n) ? [s] : [s, n] : ns(n) ? void 0 : n;
|
|
7089
7100
|
}
|
|
7090
|
-
var
|
|
7091
|
-
const o =
|
|
7101
|
+
var Na = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
|
|
7102
|
+
const o = iu(e);
|
|
7092
7103
|
if (!o) {
|
|
7093
|
-
|
|
7104
|
+
vu(e, a, t);
|
|
7094
7105
|
const y = l.get(e);
|
|
7095
7106
|
if (y)
|
|
7096
7107
|
return s ? {
|
|
7097
7108
|
transformedValue: null
|
|
7098
7109
|
} : y;
|
|
7099
7110
|
}
|
|
7100
|
-
if (!
|
|
7101
|
-
const y =
|
|
7111
|
+
if (!yu(e, n)) {
|
|
7112
|
+
const y = Ws(e, n), p = y ? {
|
|
7102
7113
|
transformedValue: y.value,
|
|
7103
7114
|
annotations: [y.type]
|
|
7104
7115
|
} : {
|
|
@@ -7106,20 +7117,20 @@ var Sa = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
|
|
|
7106
7117
|
};
|
|
7107
7118
|
return o || l.set(e, p), p;
|
|
7108
7119
|
}
|
|
7109
|
-
if (
|
|
7120
|
+
if (xn(i, e))
|
|
7110
7121
|
return {
|
|
7111
7122
|
transformedValue: null
|
|
7112
7123
|
};
|
|
7113
|
-
const c =
|
|
7124
|
+
const c = Ws(e, n), h = (c == null ? void 0 : c.value) ?? e, g = nt(h) ? [] : {}, d = {};
|
|
7114
7125
|
kt(h, (y, p) => {
|
|
7115
7126
|
if (p === "__proto__" || p === "constructor" || p === "prototype")
|
|
7116
7127
|
throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
|
|
7117
|
-
const S =
|
|
7128
|
+
const S = Na(y, t, n, s, [...a, p], [...i, e], l);
|
|
7118
7129
|
g[p] = S.transformedValue, nt(S.annotations) ? d[p] = S.annotations : Kt(S.annotations) && kt(S.annotations, (v, x) => {
|
|
7119
|
-
d[
|
|
7130
|
+
d[fa(p) + "." + x] = v;
|
|
7120
7131
|
});
|
|
7121
7132
|
});
|
|
7122
|
-
const w =
|
|
7133
|
+
const w = ns(d) ? {
|
|
7123
7134
|
transformedValue: g,
|
|
7124
7135
|
annotations: c ? [c.type] : void 0
|
|
7125
7136
|
} : {
|
|
@@ -7128,19 +7139,19 @@ var Sa = (e, t, n, s, a = [], i = [], l = /* @__PURE__ */ new Map()) => {
|
|
|
7128
7139
|
};
|
|
7129
7140
|
return o || l.set(e, w), w;
|
|
7130
7141
|
};
|
|
7131
|
-
function
|
|
7142
|
+
function Aa(e) {
|
|
7132
7143
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
7133
7144
|
}
|
|
7134
|
-
function
|
|
7135
|
-
return
|
|
7145
|
+
function Ys(e) {
|
|
7146
|
+
return Aa(e) === "Array";
|
|
7136
7147
|
}
|
|
7137
|
-
function
|
|
7138
|
-
if (
|
|
7148
|
+
function bu(e) {
|
|
7149
|
+
if (Aa(e) !== "Object")
|
|
7139
7150
|
return !1;
|
|
7140
7151
|
const t = Object.getPrototypeOf(e);
|
|
7141
7152
|
return !!t && t.constructor === Object && t === Object.prototype;
|
|
7142
7153
|
}
|
|
7143
|
-
function
|
|
7154
|
+
function wu(e, t, n, s, a) {
|
|
7144
7155
|
const i = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
|
|
7145
7156
|
i === "enumerable" && (e[t] = n), a && i === "nonenumerable" && Object.defineProperty(e, t, {
|
|
7146
7157
|
value: n,
|
|
@@ -7149,17 +7160,17 @@ function vu(e, t, n, s, a) {
|
|
|
7149
7160
|
configurable: !0
|
|
7150
7161
|
});
|
|
7151
7162
|
}
|
|
7152
|
-
function
|
|
7153
|
-
if (
|
|
7154
|
-
return e.map((a) =>
|
|
7155
|
-
if (!
|
|
7163
|
+
function as(e, t = {}) {
|
|
7164
|
+
if (Ys(e))
|
|
7165
|
+
return e.map((a) => as(a, t));
|
|
7166
|
+
if (!bu(e))
|
|
7156
7167
|
return e;
|
|
7157
7168
|
const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
|
|
7158
7169
|
return [...n, ...s].reduce((a, i) => {
|
|
7159
|
-
if (
|
|
7170
|
+
if (Ys(t.props) && !t.props.includes(i))
|
|
7160
7171
|
return a;
|
|
7161
|
-
const l = e[i], o =
|
|
7162
|
-
return
|
|
7172
|
+
const l = e[i], o = as(l, t);
|
|
7173
|
+
return wu(a, i, o, e, t.nonenumerable), a;
|
|
7163
7174
|
}, {});
|
|
7164
7175
|
}
|
|
7165
7176
|
var ae = class {
|
|
@@ -7167,17 +7178,17 @@ var ae = class {
|
|
|
7167
7178
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
7168
7179
|
*/
|
|
7169
7180
|
constructor({ dedupe: e = !1 } = {}) {
|
|
7170
|
-
this.classRegistry = new
|
|
7181
|
+
this.classRegistry = new Wc(), this.symbolRegistry = new da((t) => t.description ?? ""), this.customTransformerRegistry = new Xc(), this.allowedErrorProps = [], this.dedupe = e;
|
|
7171
7182
|
}
|
|
7172
7183
|
serialize(e) {
|
|
7173
|
-
const t = /* @__PURE__ */ new Map(), n =
|
|
7184
|
+
const t = /* @__PURE__ */ new Map(), n = Na(e, t, this, this.dedupe), s = {
|
|
7174
7185
|
json: n.transformedValue
|
|
7175
7186
|
};
|
|
7176
7187
|
n.annotations && (s.meta = {
|
|
7177
7188
|
...s.meta,
|
|
7178
7189
|
values: n.annotations
|
|
7179
7190
|
});
|
|
7180
|
-
const a =
|
|
7191
|
+
const a = Eu(t, this.dedupe);
|
|
7181
7192
|
return a && (s.meta = {
|
|
7182
7193
|
...s.meta,
|
|
7183
7194
|
referentialEqualities: a
|
|
@@ -7185,8 +7196,8 @@ var ae = class {
|
|
|
7185
7196
|
}
|
|
7186
7197
|
deserialize(e) {
|
|
7187
7198
|
const { json: t, meta: n } = e;
|
|
7188
|
-
let s =
|
|
7189
|
-
return n != null && n.values && (s =
|
|
7199
|
+
let s = as(t);
|
|
7200
|
+
return n != null && n.values && (s = gu(s, n.values, this)), n != null && n.referentialEqualities && (s = pu(s, n.referentialEqualities)), s;
|
|
7190
7201
|
}
|
|
7191
7202
|
stringify(e) {
|
|
7192
7203
|
return JSON.stringify(this.serialize(e));
|
|
@@ -7219,44 +7230,44 @@ ae.registerClass = ae.defaultInstance.registerClass.bind(ae.defaultInstance);
|
|
|
7219
7230
|
ae.registerSymbol = ae.defaultInstance.registerSymbol.bind(ae.defaultInstance);
|
|
7220
7231
|
ae.registerCustom = ae.defaultInstance.registerCustom.bind(ae.defaultInstance);
|
|
7221
7232
|
ae.allowErrorProps = ae.defaultInstance.allowErrorProps.bind(ae.defaultInstance);
|
|
7222
|
-
var
|
|
7223
|
-
function
|
|
7233
|
+
var Su = ae.serialize, hd = ae.stringify;
|
|
7234
|
+
function md(e) {
|
|
7224
7235
|
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
7225
7236
|
}
|
|
7226
|
-
function
|
|
7237
|
+
function fd(e, t) {
|
|
7227
7238
|
return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
7228
7239
|
}
|
|
7229
|
-
function
|
|
7240
|
+
function gd({
|
|
7230
7241
|
queryState: e,
|
|
7231
7242
|
observerCount: t,
|
|
7232
7243
|
isStale: n
|
|
7233
7244
|
}) {
|
|
7234
7245
|
return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
|
|
7235
7246
|
}
|
|
7236
|
-
function
|
|
7247
|
+
function pd({
|
|
7237
7248
|
status: e,
|
|
7238
7249
|
isPaused: t
|
|
7239
7250
|
}) {
|
|
7240
7251
|
return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
|
|
7241
7252
|
}
|
|
7242
|
-
function
|
|
7253
|
+
function yd(e) {
|
|
7243
7254
|
return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
|
|
7244
7255
|
}
|
|
7245
|
-
var
|
|
7256
|
+
var vd = (e, t = !1) => {
|
|
7246
7257
|
const {
|
|
7247
7258
|
json: n
|
|
7248
|
-
} =
|
|
7259
|
+
} = Su(e);
|
|
7249
7260
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
7250
|
-
}, En = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3,
|
|
7251
|
-
status:
|
|
7252
|
-
"query hash":
|
|
7253
|
-
"last updated": Aa
|
|
7254
|
-
}, bn = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, xa = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Su = (e, t) => bn(e) === bn(t) ? xa(e, t) : bn(e) > bn(t) ? 1 : -1, gd = {
|
|
7255
|
-
status: Su,
|
|
7261
|
+
}, En = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, Nu = (e, t) => e.queryHash.localeCompare(t.queryHash), xa = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, Au = (e, t) => En(e) === En(t) ? xa(e, t) : En(e) > En(t) ? 1 : -1, Ed = {
|
|
7262
|
+
status: Au,
|
|
7263
|
+
"query hash": Nu,
|
|
7256
7264
|
"last updated": xa
|
|
7257
|
-
},
|
|
7265
|
+
}, bn = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Ta = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, xu = (e, t) => bn(e) === bn(t) ? Ta(e, t) : bn(e) > bn(t) ? 1 : -1, bd = {
|
|
7266
|
+
status: xu,
|
|
7267
|
+
"last updated": Ta
|
|
7268
|
+
}, wd = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Sd = () => {
|
|
7258
7269
|
const [e, t] = ve("dark");
|
|
7259
|
-
return
|
|
7270
|
+
return cc(() => {
|
|
7260
7271
|
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
7261
7272
|
t(n.matches ? "dark" : "light");
|
|
7262
7273
|
const s = (a) => {
|
|
@@ -7324,12 +7335,12 @@ var md = (e, t = !1) => {
|
|
|
7324
7335
|
return n[s] = Sn(n[s], a), n;
|
|
7325
7336
|
}
|
|
7326
7337
|
return e;
|
|
7327
|
-
},
|
|
7338
|
+
}, Ca = (e, t) => {
|
|
7328
7339
|
if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober")))
|
|
7329
7340
|
return;
|
|
7330
7341
|
const s = document.createElement("style"), a = document.createTextNode("");
|
|
7331
7342
|
s.appendChild(a), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
|
|
7332
|
-
}, gt, $t, zt, Wt, at, Yt, pt, yt, vt, Et, bt, wt, Qt,
|
|
7343
|
+
}, gt, $t, zt, Wt, at, Yt, pt, yt, vt, Et, bt, wt, Qt, Qs, Tu = (Qs = class {
|
|
7333
7344
|
constructor(e) {
|
|
7334
7345
|
se(this, gt);
|
|
7335
7346
|
se(this, $t);
|
|
@@ -7359,38 +7370,38 @@ var md = (e, t = !1) => {
|
|
|
7359
7370
|
ee(this, gt, ve(t)), ee(this, zt, n), ee(this, Wt, s), ee(this, $t, a), ee(this, Yt, h), ee(this, pt, g), ee(this, yt, ve(i)), ee(this, vt, ve(l)), ee(this, Et, ve(o)), ee(this, bt, ve(c));
|
|
7360
7371
|
}
|
|
7361
7372
|
setButtonPosition(e) {
|
|
7362
|
-
|
|
7373
|
+
R(this, yt)[1](e);
|
|
7363
7374
|
}
|
|
7364
7375
|
setPosition(e) {
|
|
7365
|
-
|
|
7376
|
+
R(this, vt)[1](e);
|
|
7366
7377
|
}
|
|
7367
7378
|
setInitialIsOpen(e) {
|
|
7368
|
-
|
|
7379
|
+
R(this, Et)[1](e);
|
|
7369
7380
|
}
|
|
7370
7381
|
setErrorTypes(e) {
|
|
7371
|
-
|
|
7382
|
+
R(this, bt)[1](e);
|
|
7372
7383
|
}
|
|
7373
7384
|
setClient(e) {
|
|
7374
|
-
|
|
7385
|
+
R(this, gt)[1](e);
|
|
7375
7386
|
}
|
|
7376
7387
|
mount(e) {
|
|
7377
|
-
if (
|
|
7388
|
+
if (R(this, at))
|
|
7378
7389
|
throw new Error("Devtools is already mounted");
|
|
7379
|
-
const t =
|
|
7380
|
-
const n = this, [s] =
|
|
7390
|
+
const t = oa(() => {
|
|
7391
|
+
const n = this, [s] = R(this, yt), [a] = R(this, vt), [i] = R(this, Et), [l] = R(this, bt), [o] = R(this, gt);
|
|
7381
7392
|
let c;
|
|
7382
|
-
return
|
|
7393
|
+
return R(this, wt) ? c = R(this, wt) : (c = ia(() => import("./HO4MOOFI-CRSNiC7G.js")), ee(this, wt, c)), Ca(R(this, Yt), R(this, pt)), ra(c, aa({
|
|
7383
7394
|
get queryFlavor() {
|
|
7384
|
-
return
|
|
7395
|
+
return R(n, zt);
|
|
7385
7396
|
},
|
|
7386
7397
|
get version() {
|
|
7387
|
-
return
|
|
7398
|
+
return R(n, Wt);
|
|
7388
7399
|
},
|
|
7389
7400
|
get onlineManager() {
|
|
7390
|
-
return
|
|
7401
|
+
return R(n, $t);
|
|
7391
7402
|
},
|
|
7392
7403
|
get shadowDOMTarget() {
|
|
7393
|
-
return
|
|
7404
|
+
return R(n, pt);
|
|
7394
7405
|
}
|
|
7395
7406
|
}, {
|
|
7396
7407
|
get client() {
|
|
@@ -7414,11 +7425,11 @@ var md = (e, t = !1) => {
|
|
|
7414
7425
|
}
|
|
7415
7426
|
unmount() {
|
|
7416
7427
|
var e;
|
|
7417
|
-
if (!
|
|
7428
|
+
if (!R(this, at))
|
|
7418
7429
|
throw new Error("Devtools is not mounted");
|
|
7419
|
-
(e =
|
|
7430
|
+
(e = R(this, Qt)) == null || e.call(this), ee(this, at, !1);
|
|
7420
7431
|
}
|
|
7421
|
-
}, gt = new WeakMap(), $t = new WeakMap(), zt = new WeakMap(), Wt = new WeakMap(), at = new WeakMap(), Yt = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), vt = new WeakMap(), Et = new WeakMap(), bt = new WeakMap(), wt = new WeakMap(), Qt = new WeakMap(),
|
|
7432
|
+
}, gt = new WeakMap(), $t = new WeakMap(), zt = new WeakMap(), Wt = new WeakMap(), at = new WeakMap(), Yt = new WeakMap(), pt = new WeakMap(), yt = new WeakMap(), vt = new WeakMap(), Et = new WeakMap(), bt = new WeakMap(), wt = new WeakMap(), Qt = new WeakMap(), Qs), St, Xt, Zt, Jt, it, en, Nt, At, xt, Tt, Ct, Pt, _t, tn, Xs, Cu = (Xs = class {
|
|
7422
7433
|
constructor(e) {
|
|
7423
7434
|
se(this, St);
|
|
7424
7435
|
se(this, Xt);
|
|
@@ -7450,41 +7461,41 @@ var md = (e, t = !1) => {
|
|
|
7450
7461
|
ee(this, St, ve(t)), ee(this, Zt, n), ee(this, Jt, s), ee(this, Xt, a), ee(this, en, h), ee(this, Nt, g), ee(this, At, ve(i)), ee(this, xt, ve(l)), ee(this, Tt, ve(o)), ee(this, Ct, ve(c)), ee(this, Pt, ve(d));
|
|
7451
7462
|
}
|
|
7452
7463
|
setButtonPosition(e) {
|
|
7453
|
-
|
|
7464
|
+
R(this, At)[1](e);
|
|
7454
7465
|
}
|
|
7455
7466
|
setPosition(e) {
|
|
7456
|
-
|
|
7467
|
+
R(this, xt)[1](e);
|
|
7457
7468
|
}
|
|
7458
7469
|
setInitialIsOpen(e) {
|
|
7459
|
-
|
|
7470
|
+
R(this, Tt)[1](e);
|
|
7460
7471
|
}
|
|
7461
7472
|
setErrorTypes(e) {
|
|
7462
|
-
|
|
7473
|
+
R(this, Ct)[1](e);
|
|
7463
7474
|
}
|
|
7464
7475
|
setClient(e) {
|
|
7465
|
-
|
|
7476
|
+
R(this, St)[1](e);
|
|
7466
7477
|
}
|
|
7467
7478
|
setOnClose(e) {
|
|
7468
|
-
|
|
7479
|
+
R(this, Pt)[1](() => e);
|
|
7469
7480
|
}
|
|
7470
7481
|
mount(e) {
|
|
7471
|
-
if (
|
|
7482
|
+
if (R(this, it))
|
|
7472
7483
|
throw new Error("Devtools is already mounted");
|
|
7473
|
-
const t =
|
|
7474
|
-
const n = this, [s] =
|
|
7484
|
+
const t = oa(() => {
|
|
7485
|
+
const n = this, [s] = R(this, At), [a] = R(this, xt), [i] = R(this, Tt), [l] = R(this, Ct), [o] = R(this, St), [c] = R(this, Pt);
|
|
7475
7486
|
let h;
|
|
7476
|
-
return
|
|
7487
|
+
return R(this, _t) ? h = R(this, _t) : (h = ia(() => import("./HUY7CZI3-DfVfYgpJ.js")), ee(this, _t, h)), Ca(R(this, en), R(this, Nt)), ra(h, aa({
|
|
7477
7488
|
get queryFlavor() {
|
|
7478
|
-
return
|
|
7489
|
+
return R(n, Zt);
|
|
7479
7490
|
},
|
|
7480
7491
|
get version() {
|
|
7481
|
-
return
|
|
7492
|
+
return R(n, Jt);
|
|
7482
7493
|
},
|
|
7483
7494
|
get onlineManager() {
|
|
7484
|
-
return
|
|
7495
|
+
return R(n, Xt);
|
|
7485
7496
|
},
|
|
7486
7497
|
get shadowDOMTarget() {
|
|
7487
|
-
return
|
|
7498
|
+
return R(n, Nt);
|
|
7488
7499
|
}
|
|
7489
7500
|
}, {
|
|
7490
7501
|
get client() {
|
|
@@ -7511,12 +7522,12 @@ var md = (e, t = !1) => {
|
|
|
7511
7522
|
}
|
|
7512
7523
|
unmount() {
|
|
7513
7524
|
var e;
|
|
7514
|
-
if (!
|
|
7525
|
+
if (!R(this, it))
|
|
7515
7526
|
throw new Error("Devtools is not mounted");
|
|
7516
|
-
(e =
|
|
7527
|
+
(e = R(this, tn)) == null || e.call(this), ee(this, it, !1);
|
|
7517
7528
|
}
|
|
7518
|
-
}, St = new WeakMap(), Xt = new WeakMap(), Zt = new WeakMap(), Jt = new WeakMap(), it = new WeakMap(), en = new WeakMap(), Nt = new WeakMap(), At = new WeakMap(), xt = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Pt = new WeakMap(), _t = new WeakMap(), tn = new WeakMap(),
|
|
7519
|
-
function
|
|
7529
|
+
}, St = new WeakMap(), Xt = new WeakMap(), Zt = new WeakMap(), Jt = new WeakMap(), it = new WeakMap(), en = new WeakMap(), Nt = new WeakMap(), At = new WeakMap(), xt = new WeakMap(), Tt = new WeakMap(), Ct = new WeakMap(), Pt = new WeakMap(), _t = new WeakMap(), tn = new WeakMap(), Xs);
|
|
7530
|
+
function Pu(e) {
|
|
7520
7531
|
const t = Se(e.client), n = ce.useRef(null), {
|
|
7521
7532
|
buttonPosition: s,
|
|
7522
7533
|
position: a,
|
|
@@ -7525,11 +7536,11 @@ function xu(e) {
|
|
|
7525
7536
|
styleNonce: o,
|
|
7526
7537
|
shadowDOMTarget: c
|
|
7527
7538
|
} = e, [h] = ce.useState(
|
|
7528
|
-
new
|
|
7539
|
+
new Tu({
|
|
7529
7540
|
client: t,
|
|
7530
7541
|
queryFlavor: "React Query",
|
|
7531
7542
|
version: "5",
|
|
7532
|
-
onlineManager:
|
|
7543
|
+
onlineManager: nr,
|
|
7533
7544
|
buttonPosition: s,
|
|
7534
7545
|
position: a,
|
|
7535
7546
|
initialIsOpen: i,
|
|
@@ -7552,13 +7563,13 @@ function xu(e) {
|
|
|
7552
7563
|
h.unmount();
|
|
7553
7564
|
}), [h]), /* @__PURE__ */ r("div", { className: "tsqd-parent-container", ref: n });
|
|
7554
7565
|
}
|
|
7555
|
-
function
|
|
7566
|
+
function _u(e) {
|
|
7556
7567
|
const t = Se(e.client), n = ce.useRef(null), { errorTypes: s, styleNonce: a, shadowDOMTarget: i } = e, [l] = ce.useState(
|
|
7557
|
-
new
|
|
7568
|
+
new Cu({
|
|
7558
7569
|
client: t,
|
|
7559
7570
|
queryFlavor: "React Query",
|
|
7560
7571
|
version: "5",
|
|
7561
|
-
onlineManager:
|
|
7572
|
+
onlineManager: nr,
|
|
7562
7573
|
buttonPosition: "bottom-left",
|
|
7563
7574
|
position: "bottom",
|
|
7564
7575
|
initialIsOpen: !0,
|
|
@@ -7586,49 +7597,52 @@ function Tu(e) {
|
|
|
7586
7597
|
}
|
|
7587
7598
|
);
|
|
7588
7599
|
}
|
|
7589
|
-
var
|
|
7600
|
+
var Iu = process.env.NODE_ENV !== "development" ? function() {
|
|
7590
7601
|
return null;
|
|
7591
|
-
} :
|
|
7602
|
+
} : Pu;
|
|
7592
7603
|
process.env.NODE_ENV;
|
|
7593
|
-
|
|
7594
|
-
|
|
7595
|
-
|
|
7596
|
-
|
|
7597
|
-
|
|
7598
|
-
|
|
7599
|
-
|
|
7600
|
-
|
|
7604
|
+
const ku = Qa(
|
|
7605
|
+
() => import("./digital-asset-manager-DS4mu-dP.js")
|
|
7606
|
+
);
|
|
7607
|
+
ul();
|
|
7608
|
+
ec();
|
|
7609
|
+
ci(Oo);
|
|
7610
|
+
ui(ku);
|
|
7611
|
+
di(Bl);
|
|
7612
|
+
zn("user-info", sc);
|
|
7613
|
+
const Lu = (e) => {
|
|
7614
|
+
const t = ct([]), [n] = Ue(), s = n.get("page"), a = n.get("lang"), { data: i } = Re(), {
|
|
7601
7615
|
data: l = {
|
|
7602
7616
|
role: "",
|
|
7603
7617
|
permissions: null
|
|
7604
7618
|
}
|
|
7605
|
-
} =
|
|
7619
|
+
} = Ho(), { data: o } = qo(), { data: c, isFetching: h } = Mr(), { blocks: g } = Fo(c), { data: d } = un(), { data: w } = Ie(), { mutateAsync: y } = Rr(), p = Bo(), { getUILibraryBlock: S, getUILibraryBlocks: v, onSave: x } = Ko(), { getPartialBlocks: G, getPartialBlockBlocks: E } = Vo(), { aiContext: b, setAiContext: T } = bs(), { mutateAsync: U } = ql(), [J, ie] = P(!1), k = W(
|
|
7606
7620
|
() => (d == null ? void 0 : d.fallbackLang) || "en",
|
|
7607
7621
|
[d]
|
|
7608
|
-
), { data: q } =
|
|
7622
|
+
), { data: q } = Fr({
|
|
7609
7623
|
pageType: i == null ? void 0 : i.pageType,
|
|
7610
7624
|
lang: a || k
|
|
7611
7625
|
});
|
|
7612
|
-
|
|
7626
|
+
Nl(), we(() => {
|
|
7613
7627
|
const z = () => {
|
|
7614
7628
|
document.hidden ? ie(!0) : ie(!1);
|
|
7615
7629
|
};
|
|
7616
7630
|
return window.addEventListener("visibilitychange", z), () => window.removeEventListener("visibilitychange", z);
|
|
7617
7631
|
}, []), t.current = g;
|
|
7618
|
-
const A =
|
|
7632
|
+
const A = W(() => {
|
|
7619
7633
|
const z = {};
|
|
7620
7634
|
return l && (z.permissions = te(l, "permissions", null), z.role = te(l, "role", "user")), z;
|
|
7621
|
-
}, [l]), M =
|
|
7622
|
-
async (z, de) => await
|
|
7623
|
-
[
|
|
7624
|
-
), he =
|
|
7635
|
+
}, [l]), M = W(() => o, [o]), ne = _e(
|
|
7636
|
+
async (z, de) => await U({ pageType: z, query: de }),
|
|
7637
|
+
[U]
|
|
7638
|
+
), he = W(
|
|
7625
7639
|
() => te(d, "theme", {}) || {},
|
|
7626
7640
|
[d]
|
|
7627
7641
|
);
|
|
7628
7642
|
return /* @__PURE__ */ u(be, { children: [
|
|
7629
|
-
h && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-50 flex items-center justify-center w-screen h-screen bg-white/30", children: /* @__PURE__ */ r("div", { className: "flex items-center justify-center bg-white rounded-full size-10", children: /* @__PURE__ */ r(
|
|
7643
|
+
h && /* @__PURE__ */ r("div", { className: "absolute inset-0 z-50 flex items-center justify-center w-screen h-screen bg-white/30", children: /* @__PURE__ */ r("div", { className: "flex items-center justify-center bg-white rounded-full size-10", children: /* @__PURE__ */ r(Gr, { className: "size-5 animate-spin" }) }) }),
|
|
7630
7644
|
/* @__PURE__ */ r(
|
|
7631
|
-
|
|
7645
|
+
hi,
|
|
7632
7646
|
{
|
|
7633
7647
|
pageExternalData: q,
|
|
7634
7648
|
themePresets: e.themePresets ?? [],
|
|
@@ -7646,7 +7660,7 @@ const Pu = (e) => {
|
|
|
7646
7660
|
getPartialBlockBlocks: E,
|
|
7647
7661
|
getPartialBlocks: G,
|
|
7648
7662
|
blocks: h ? [] : g,
|
|
7649
|
-
theme:
|
|
7663
|
+
theme: Wa(he),
|
|
7650
7664
|
getUILibraryBlock: S,
|
|
7651
7665
|
getUILibraryBlocks: v,
|
|
7652
7666
|
uiLibraries: M,
|
|
@@ -7656,7 +7670,7 @@ const Pu = (e) => {
|
|
|
7656
7670
|
if (!s) return !0;
|
|
7657
7671
|
const de = t.current, F = {
|
|
7658
7672
|
_type: "@chai/ai-context",
|
|
7659
|
-
_value:
|
|
7673
|
+
_value: Ds(z) ? z : ""
|
|
7660
7674
|
}, Ee = [...de, F];
|
|
7661
7675
|
return await x({ page: s, blocks: Ee }), T(z), !0;
|
|
7662
7676
|
},
|
|
@@ -7667,30 +7681,30 @@ const Pu = (e) => {
|
|
|
7667
7681
|
t.current = z;
|
|
7668
7682
|
const F = {
|
|
7669
7683
|
_type: "@chai/ai-context",
|
|
7670
|
-
_value:
|
|
7684
|
+
_value: Ds(b) ? b : ""
|
|
7671
7685
|
}, Ee = [...z, F];
|
|
7672
|
-
return await x({ page: s, blocks: Ee }), t.current = Ee,
|
|
7686
|
+
return await x({ page: s, blocks: Ee }), t.current = Ee, is(de, he) || await y({ settings: { theme: de } }), !0;
|
|
7673
7687
|
},
|
|
7674
|
-
themePanelComponent:
|
|
7688
|
+
themePanelComponent: Ql,
|
|
7675
7689
|
...A
|
|
7676
7690
|
}
|
|
7677
7691
|
),
|
|
7678
7692
|
/* @__PURE__ */ u("div", { children: [
|
|
7679
|
-
/* @__PURE__ */ r(
|
|
7680
|
-
/* @__PURE__ */ r(
|
|
7693
|
+
/* @__PURE__ */ r(Cl, {}),
|
|
7694
|
+
/* @__PURE__ */ r(Pl, {})
|
|
7681
7695
|
] })
|
|
7682
7696
|
] });
|
|
7683
|
-
},
|
|
7697
|
+
}, Du = new Xa({
|
|
7684
7698
|
defaultOptions: {
|
|
7685
7699
|
queries: {
|
|
7686
7700
|
refetchOnWindowFocus: !1,
|
|
7687
7701
|
refetchOnReconnect: !1
|
|
7688
7702
|
}
|
|
7689
7703
|
}
|
|
7690
|
-
}),
|
|
7691
|
-
const { isLoggedIn: t } = st(), [, n] =
|
|
7704
|
+
}), Nd = (e) => {
|
|
7705
|
+
const { isLoggedIn: t } = st(), [, n] = Or(), [s, a] = P(!1);
|
|
7692
7706
|
return we(() => (n(
|
|
7693
|
-
|
|
7707
|
+
er(e, [
|
|
7694
7708
|
"apiUrl",
|
|
7695
7709
|
"usersApiUrl",
|
|
7696
7710
|
"getPreviewUrl",
|
|
@@ -7704,73 +7718,74 @@ const Pu = (e) => {
|
|
|
7704
7718
|
a(!0);
|
|
7705
7719
|
}, 200), () => {
|
|
7706
7720
|
a(!1), n({});
|
|
7707
|
-
}), [e, n]), s ? /* @__PURE__ */ u(
|
|
7708
|
-
t ? /* @__PURE__ */ r(
|
|
7709
|
-
/* @__PURE__ */ r(
|
|
7721
|
+
}), [e, n]), s ? /* @__PURE__ */ u(Za, { client: Du, children: [
|
|
7722
|
+
t ? /* @__PURE__ */ r(Lu, { ...e }) : /* @__PURE__ */ r(zo, {}),
|
|
7723
|
+
/* @__PURE__ */ r(Iu, {})
|
|
7710
7724
|
] }) : /* @__PURE__ */ r("div", {});
|
|
7711
|
-
}, Ed = (e) => {
|
|
7712
7725
|
};
|
|
7713
7726
|
if (typeof window > "u")
|
|
7714
7727
|
throw new Error("@chaibuilder/pages is not available on the server");
|
|
7715
7728
|
export {
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7729
|
+
Yr as $,
|
|
7730
|
+
vd as A,
|
|
7731
|
+
Qu as B,
|
|
7732
|
+
cd as C,
|
|
7733
|
+
dd as D,
|
|
7721
7734
|
Ce as E,
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7735
|
+
sd as F,
|
|
7736
|
+
ic as G,
|
|
7737
|
+
Su as H,
|
|
7738
|
+
rd as I,
|
|
7726
7739
|
wn as J,
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7740
|
+
wd as K,
|
|
7741
|
+
fd as L,
|
|
7742
|
+
md as M,
|
|
7730
7743
|
lt as N,
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
|
|
7744
|
+
Oc as O,
|
|
7745
|
+
ud as P,
|
|
7746
|
+
hd as Q,
|
|
7747
|
+
ld as R,
|
|
7748
|
+
ad as S,
|
|
7749
|
+
id as T,
|
|
7737
7750
|
Sn as U,
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
+
Ju as V,
|
|
7752
|
+
Q as W,
|
|
7753
|
+
$ as X,
|
|
7754
|
+
I as Y,
|
|
7755
|
+
Nd as Z,
|
|
7756
|
+
Oe as _,
|
|
7757
|
+
ra as a,
|
|
7758
|
+
Yu as a0,
|
|
7759
|
+
Re as a1,
|
|
7760
|
+
cn as a2,
|
|
7761
|
+
Rn as a3,
|
|
7762
|
+
un as a4,
|
|
7763
|
+
Ho as a5,
|
|
7764
|
+
Wu as a6,
|
|
7765
|
+
dn as a7,
|
|
7751
7766
|
ve as b,
|
|
7752
7767
|
Ge as c,
|
|
7753
|
-
|
|
7754
|
-
|
|
7755
|
-
|
|
7756
|
-
|
|
7757
|
-
|
|
7758
|
-
|
|
7768
|
+
Dc as d,
|
|
7769
|
+
Zr as e,
|
|
7770
|
+
aa as f,
|
|
7771
|
+
Sd as g,
|
|
7772
|
+
wc as h,
|
|
7773
|
+
ed as i,
|
|
7759
7774
|
ot as j,
|
|
7760
|
-
|
|
7761
|
-
|
|
7762
|
-
|
|
7775
|
+
Jn as k,
|
|
7776
|
+
nd as l,
|
|
7777
|
+
bd as m,
|
|
7763
7778
|
Ft as n,
|
|
7764
|
-
|
|
7765
|
-
|
|
7766
|
-
|
|
7767
|
-
|
|
7768
|
-
|
|
7769
|
-
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
|
|
7773
|
-
|
|
7774
|
-
|
|
7775
|
-
|
|
7779
|
+
Xu as o,
|
|
7780
|
+
cc as p,
|
|
7781
|
+
qc as q,
|
|
7782
|
+
es as r,
|
|
7783
|
+
Ed as s,
|
|
7784
|
+
od as t,
|
|
7785
|
+
td as u,
|
|
7786
|
+
Rc as v,
|
|
7787
|
+
gd as w,
|
|
7788
|
+
pd as x,
|
|
7789
|
+
Fc as y,
|
|
7790
|
+
yd as z
|
|
7776
7791
|
};
|