@chaibuilder/sdk 4.0.0-beta.47 → 4.0.0-beta.49
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/{2SSKDMRQ-CVHl6i14.cjs → 2SSKDMRQ-CjvuNdPo.cjs} +1 -1
- package/dist/{2SSKDMRQ-D9rlRpnI.js → 2SSKDMRQ-Dvf9zadl.js} +2 -2
- package/dist/{AP7HFJJL-D18sv0Wh.cjs → AP7HFJJL-DYFttFoI.cjs} +1 -1
- package/dist/{AP7HFJJL-CBrphwP9.js → AP7HFJJL-q4dJdyFs.js} +1 -1
- package/dist/{IconPicker-CSewv0kY.js → IconPicker-Bf163F7t.js} +1 -1
- package/dist/{IconPicker-CxEGCcVZ.cjs → IconPicker-JWhYq2Gp.cjs} +1 -1
- package/dist/{WDYDFRGG-C0G8c0hR.cjs → WDYDFRGG-BEksfGMC.cjs} +1 -1
- package/dist/{WDYDFRGG-BCmjXFs0.js → WDYDFRGG-O9GIrtX0.js} +2 -2
- package/dist/{actions-registery-BQ31lpix.cjs → actions-registery-BHbZHkE3.cjs} +11 -3
- package/dist/{actions-registery-B1VeX52Y.js → actions-registery-gJb_wq2F.js} +25 -13
- package/dist/actions.cjs +1 -1
- package/dist/actions.d.ts +10 -3
- package/dist/actions.js +6 -4
- package/dist/{active-in-another-tab-BhbPijx9.js → active-in-another-tab-B4Ur0JP7.js} +2 -2
- package/dist/{active-in-another-tab-CMmhCRma.cjs → active-in-another-tab-BPdx4lWh.cjs} +1 -1
- package/dist/{add-new-language-page-ChQgjFwb.cjs → add-new-language-page-BfUp5Ua2.cjs} +1 -1
- package/dist/{add-new-language-page-C0sayTSF.js → add-new-language-page-CRR93tLq.js} +3 -3
- package/dist/{add-new-page-DLf5Tfb7.cjs → add-new-page-B8NGK6WS.cjs} +1 -1
- package/dist/{add-new-page-DLKzuaNM.js → add-new-page-Ppy5-y5j.js} +2 -2
- package/dist/ai-panel-default-lang-BXYQye3N.js +333 -0
- package/dist/ai-panel-default-lang-VhgmHFoQ.cjs +3 -0
- package/dist/ai-panel-other-lang-DaCf-cq4.js +148 -0
- package/dist/ai-panel-other-lang-Ds0EXeUC.cjs +1 -0
- package/dist/{ai-prompt-input-DNb1FKXQ.js → ai-prompt-input-7iWk72w5.js} +253 -258
- package/dist/ai-prompt-input-nZ5_Dm7X.cjs +1 -0
- package/dist/{ai-translation-prompt-B2MfzTjb.js → ai-translation-prompt-1OUs1P7n.js} +1 -1
- package/dist/{ai-translation-prompt-CL3yk8K1.cjs → ai-translation-prompt-B16cK-1Q.cjs} +1 -1
- package/dist/{change-password-modal-CbMifP62.js → change-password-modal-CdvJR1Ln.js} +10 -10
- package/dist/{change-password-modal-D_NFPZxI.cjs → change-password-modal-D5eXjiYq.cjs} +1 -1
- package/dist/{code-editor-53rOkfhX.js → code-editor-CyLjDiEp.js} +1 -1
- package/dist/{code-editor-CCsljULB.cjs → code-editor-SWbfFj1E.cjs} +1 -1
- package/dist/{continue-editing-in-this-client-hB4O3CHJ.js → continue-editing-in-this-client-BrSvK-Ay.js} +2 -2
- package/dist/{continue-editing-in-this-client-3QLL7tQH.cjs → continue-editing-in-this-client-Cmi-GkYZ.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +1 -1
- package/dist/{css-import-modal-Bmi3LrEJ.cjs → css-import-modal-Bdwgd05S.cjs} +1 -1
- package/dist/{css-import-modal-DCivkVh2.js → css-import-modal-Be47CBJn.js} +1 -1
- package/dist/{delete-page-BW2NxLZu.js → delete-page-C99K2qzS.js} +15 -15
- package/dist/{delete-page-CxVfKrBz.cjs → delete-page-DLohaU-U.cjs} +1 -1
- package/dist/{design-token-usage-WTVjf9c-.js → design-token-usage-D1lWCJ3L.js} +1 -1
- package/dist/{design-token-usage-5jsa9ojN.cjs → design-token-usage-eY2wQ0l3.cjs} +1 -1
- package/dist/{digital-asset-manager-dNK-BYdI.js → digital-asset-manager-BZMb6sC7.js} +3 -3
- package/dist/{digital-asset-manager-DlFCWUP4.cjs → digital-asset-manager-Z5aJxkq0.cjs} +1 -1
- package/dist/{duplicate-page-BbB2anQO.js → duplicate-page-CDc2X0eW.js} +12 -12
- package/dist/{duplicate-page-0o6G-oY_.cjs → duplicate-page-D5Gtvqdv.cjs} +1 -1
- package/dist/{dynamic-page-selector-Ds3MqxTF.cjs → dynamic-page-selector-DZHhX008.cjs} +1 -1
- package/dist/{dynamic-page-selector-rFO8457w.js → dynamic-page-selector-DvNBXo6o.js} +2 -2
- package/dist/{image-editor-BnVkes6Q.js → image-editor-BBvvi9Vm.js} +1 -1
- package/dist/{image-editor-DqItmbk1.cjs → image-editor-DwhTYkVR.cjs} +1 -1
- package/dist/index-BVwFJWDq.cjs +5 -0
- package/dist/{index-DTNHTRZu.cjs → index-DCJDQs1a.cjs} +8 -8
- package/dist/{index-BYjniKhj.js → index-LBTm1Jmk.js} +838 -806
- package/dist/{index-B7HAfx-2.js → index-OuHV9Ann.js} +16 -9
- package/dist/{json-diff-viewer-B4rnFiN_.cjs → json-diff-viewer-Cb1CmRqP.cjs} +1 -1
- package/dist/{json-diff-viewer-CKlyO9eW.js → json-diff-viewer-DG6qMOBS.js} +6 -6
- package/dist/{lang-panel-YT96E5Xj.js → lang-panel-B3USOxGq.js} +9 -9
- package/dist/{lang-panel-DiVz4Cay.cjs → lang-panel-DxoJ0v4y.cjs} +1 -1
- package/dist/{manage-design-tokens-LwImeKaK.js → manage-design-tokens-6YGIctip.js} +2 -2
- package/dist/{manage-design-tokens-modal-BEElCTcN.cjs → manage-design-tokens-modal-BSSCXH8Y.cjs} +1 -1
- package/dist/{manage-design-tokens-modal-DFVcoyra.js → manage-design-tokens-modal-CzsnN49F.js} +2 -2
- package/dist/{manage-design-tokens-BwrIc6dS.cjs → manage-design-tokens-udLBvkHA.cjs} +1 -1
- package/dist/{mark-as-template-DtDkh6jB.cjs → mark-as-template-B9yLcasI.cjs} +1 -1
- package/dist/{mark-as-template-D2Hpz0IE.js → mark-as-template-CP_F9ZQ4.js} +2 -2
- package/dist/{models-D0RH2u4C.cjs → models-CQaC3EBW.cjs} +1 -1
- package/dist/{models-BCu-p_QK.js → models-DZ9C6CvE.js} +4 -5
- package/dist/{nested-path-selector-content-TqjBbNys.js → nested-path-selector-content-DmtCI3q9.js} +1 -1
- package/dist/{nested-path-selector-content-CJfN8Hhw.cjs → nested-path-selector-content-aTdu-o0e.cjs} +1 -1
- package/dist/{no-language-page-content-CcD-fgMa.cjs → no-language-page-content-C-MCdPXt.cjs} +1 -1
- package/dist/{no-language-page-content-Ce3wniZT.js → no-language-page-content-D8t5dfgh.js} +2 -2
- package/dist/{no-language-page-dialog-CU1zXsYv.js → no-language-page-dialog-C_fHI2zI.js} +2 -2
- package/dist/{no-language-page-dialog-B7fhPdob.cjs → no-language-page-dialog-D4QIAHnE.cjs} +1 -1
- package/dist/{page-creator-C7XEqUx_.cjs → page-creator-Cz_ah-qE.cjs} +1 -1
- package/dist/{page-creator-wg3uymVG.js → page-creator-DKEkuGCO.js} +33 -33
- package/dist/{page-lock-BuVma3e5.js → page-lock-CwZKJ4IE.js} +2 -2
- package/dist/{page-lock-CINb2air.cjs → page-lock-DdCvtA-I.cjs} +1 -1
- package/dist/{page-locked-dialog-s-3ROcy0.cjs → page-locked-dialog-CrTDBoC4.cjs} +1 -1
- package/dist/{page-locked-dialog-C7_1gjO5.js → page-locked-dialog-DqLlooUz.js} +11 -11
- package/dist/{page-manager-new-CKWSLVrb.cjs → page-manager-new-ah6QYar2.cjs} +1 -1
- package/dist/{page-manager-new-zlobCGqL.js → page-manager-new-ttsrxdW9.js} +42 -42
- package/dist/{page-manager-search-and-filter-BaOsl_5u.cjs → page-manager-search-and-filter-D7AupT6_.cjs} +1 -1
- package/dist/{page-manager-search-and-filter-BU_iNmHy.js → page-manager-search-and-filter-bsqZ6wnI.js} +2 -2
- package/dist/{page-revisions-content-BmaNPNoS.cjs → page-revisions-content-B6hsIla7.cjs} +1 -1
- package/dist/{page-revisions-content-D6l_d2jW.js → page-revisions-content-C5O8_Fms.js} +16 -16
- package/dist/pages.cjs +1 -1
- package/dist/pages.d.ts +66 -1
- package/dist/pages.js +19 -19
- package/dist/{publish-pages-content-2LG6JOrm.cjs → publish-pages-content-BrajJUcP.cjs} +1 -1
- package/dist/{publish-pages-content-CQteRtBA.js → publish-pages-content-KZVMHT6V.js} +32 -32
- package/dist/{rte-widget-modal-KzT2hLFt.cjs → rte-widget-modal-CiTwsXTr.cjs} +1 -1
- package/dist/{rte-widget-modal-CFk0Izg5.js → rte-widget-modal-IU8JzPuZ.js} +1 -1
- package/dist/{save-to-lib-D1V3bNZX.js → save-to-lib-DMnv7ENo.js} +50 -50
- package/dist/{save-to-lib-D82Vrekv.cjs → save-to-lib-Dc700Aop.cjs} +1 -1
- package/dist/{selected-block-display-BHx9N14K.cjs → selected-block-display-CAFEOrLV.cjs} +1 -1
- package/dist/{selected-block-display-BbUH5RaW.js → selected-block-display-CidmQ-wz.js} +2 -2
- package/dist/{seo-panel-CyBmGg6k.js → seo-panel-Br8gxDxu.js} +148 -158
- package/dist/{seo-panel-CPsjZLtL.cjs → seo-panel-CMY-adM-.cjs} +2 -2
- package/dist/{shared-json-ld-DyU9wqrE.cjs → shared-json-ld-CMH-eRUq.cjs} +1 -1
- package/dist/{shared-json-ld-SGykyppC.js → shared-json-ld-uvMmwCYp.js} +26 -26
- package/dist/{slug-input-BzpnOdXG.cjs → slug-input-CiHC5l3r.cjs} +1 -1
- package/dist/{slug-input-DpMI4nEB.js → slug-input-DLWTMTsO.js} +1 -1
- package/dist/supabase-actions.cjs +1 -1
- package/dist/supabase-actions.js +1 -1
- package/dist/{take-over-request-wTVLAotu.cjs → take-over-request-IRLgF1dG.cjs} +1 -1
- package/dist/{take-over-request-D97Fg-xB.js → take-over-request-KdR1_h_K.js} +5 -5
- package/dist/{translation-warning-modal-Xk6oYGFS.cjs → translation-warning-modal-CLZ9tC1F.cjs} +1 -1
- package/dist/{translation-warning-modal-Du-CnfyH.js → translation-warning-modal-CzNt6LDO.js} +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/{unmark-as-template-BHk2F0ck.js → unmark-as-template-C5ovsEBP.js} +2 -2
- package/dist/{unmark-as-template-BRnMhh7n.cjs → unmark-as-template-F7TdgWjI.cjs} +1 -1
- package/dist/{unpublish-page-BOEjCHLB.js → unpublish-page-0fR1o0b7.js} +8 -8
- package/dist/{unpublish-page-Bu75lH33.cjs → unpublish-page-CUr8Xub6.cjs} +1 -1
- package/dist/{unpublished-partials-modal-C0_0qNvV.js → unpublished-partials-modal-BhNAub_z.js} +1 -1
- package/dist/{unpublished-partials-modal-BS_GddEG.cjs → unpublished-partials-modal-Cv5R9-hi.cjs} +1 -1
- package/dist/{web-preview-DcOhTGup.cjs → web-preview-CuMYekVJ.cjs} +1 -1
- package/dist/{web-preview-C3bbIF6T.js → web-preview-D9pXonAv.js} +1 -1
- package/package.json +1 -1
- package/dist/ai-panel-default-lang-DsGjoITc.cjs +0 -3
- package/dist/ai-panel-default-lang-Dy_4L5pH.js +0 -317
- package/dist/ai-panel-other-lang-1RYtb71B.js +0 -132
- package/dist/ai-panel-other-lang-CL3coL7Z.cjs +0 -1
- package/dist/ai-prompt-input-BhTL_-mT.cjs +0 -1
- package/dist/index-BeGLwvqs.cjs +0 -5
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
var
|
|
1
|
+
var zr = Object.defineProperty;
|
|
2
2
|
var ls = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var Nn = (e, t, n) =>
|
|
5
|
+
var Yr = (e, t, n) => t in e ? zr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
+
var Nn = (e, t, n) => Yr(e, typeof t != "symbol" ? t + "" : t, n), cs = (e, t, n) => t.has(e) || ls("Cannot " + n);
|
|
7
7
|
var S = (e, t, n) => (cs(e, t, "read from private field"), n ? n.call(e) : t.get(e)), G = (e, t, n) => t.has(e) ? ls("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), v = (e, t, n, s) => (cs(e, t, "write to private field"), s ? s.call(e, n) : t.set(e, n), n);
|
|
8
8
|
import { jsxs as m, jsx as o, Fragment as me } from "react/jsx-runtime";
|
|
9
|
-
import { B as
|
|
10
|
-
import { aI as
|
|
11
|
-
import { ZoomInIcon as
|
|
12
|
-
import { round as
|
|
13
|
-
import { useAtom as pe, atom as Ne, useSetAtom as Xn, useAtomValue as
|
|
14
|
-
import { MoreVertical as js, CopyPlusIcon as
|
|
9
|
+
import { B as x, h as Jr, v as $t, e as us, j as Zr, m as Xr, q as ea, x as ta, D as na, F as sa } from "./register-chai-top-bar-D6GjnauV.js";
|
|
10
|
+
import { aI as ra, a0 as Rn, aJ as aa, aK as ia, aL as oa, aM as la, aN as ca, v as un, w as dn, x as fn, y as Te, af as ua, d as Se, aO as da, ax as Fs, aP as fa, Z as ha, I as Me, aQ as ga, aw as Hs, z as hn, aR as Ks, aS as ma, A as gn, aT as Vs, E as mn, ai as qt, D as zn, ak as Ea, aU as pa, aV as ds, aj as ya, ag as Aa, ah as Ta, aW as Sa, aC as _a, aB as Pa, aD as wa, e as $s, a1 as ba, av as Ia, a2 as Na, at as va, a3 as Ca, a4 as La, au as Ga, a5 as ka, a6 as Da, aX as xa, X as Oa, Y as Ra, f as Ua, g as Ba, ay as Ma, az as Fa, aA as vn, aY as Cn, T as fs } from "./index-OuHV9Ann.js";
|
|
11
|
+
import { ZoomInIcon as Ha, LightningBoltIcon as Ka } from "@radix-ui/react-icons";
|
|
12
|
+
import { round as Va, get as Q, noop as En, keyBy as $a, map as Un, find as ce, values as Yn, reverse as qa, sortBy as Qa, minBy as qs, first as Qs, groupBy as Wa, isEmpty as Ee, compact as At, filter as Jn, uniq as ja, each as za, upperCase as hs, includes as Ya, has as Zn, startCase as Ja, isFunction as Za, isArray as Xa, pick as Ws, cloneDeep as ei } from "lodash-es";
|
|
13
|
+
import { useAtom as pe, atom as Ne, useSetAtom as Xn, useAtomValue as ti } from "jotai";
|
|
14
|
+
import { MoreVertical as js, CopyPlusIcon as ni, Pencil as zs, Power as si, Trash as ri, Loader as Fe, Hash as ai, File as ii, MoreHorizontal as oi, Languages as gs, ChevronDown as Bn, Star as li, Plus as es, History as ci, Palette as ui, Play as di, CheckCircle as fi, Save as hi, Send as ms, Rocket as Es, Eye as Ys, TriangleAlert as gi, ExternalLink as mi, Folder as ps, ChevronRight as Ei, LanguagesIcon as pi, User as yi, X as ys, Trash2 as Ai, ImageIcon as As, Code as Ti, Share2 as Si, FileCode2 as _i, AlertTriangle as Pi } from "lucide-react";
|
|
15
15
|
import { useTranslation as ue } from "react-i18next";
|
|
16
16
|
import * as z from "react";
|
|
17
|
-
import
|
|
18
|
-
import { useQuery as de, useQueryClient as X, useMutation as re, onlineManager as Js, QueryClient as
|
|
19
|
-
import { h as
|
|
20
|
-
import { toast as
|
|
17
|
+
import wi, { useMemo as j, useState as N, useEffect as J, useCallback as K, useRef as le, lazy as M, Suspense as Y, startTransition as Ts, createContext as bi, useContext as Ii } from "react";
|
|
18
|
+
import { useQuery as de, useQueryClient as X, useMutation as re, onlineManager as Js, QueryClient as Ni, QueryClientProvider as vi } from "@tanstack/react-query";
|
|
19
|
+
import { h as Ci } from "./plugin-BSjgGgwo.js";
|
|
20
|
+
import { toast as O } from "sonner";
|
|
21
21
|
import { c as tn } from "./common-functions-D2lMFR6K.js";
|
|
22
|
-
import { ErrorBoundary as
|
|
23
|
-
import { g as
|
|
24
|
-
import { j as
|
|
25
|
-
import { loadWebBlocks as
|
|
26
|
-
import { g as
|
|
27
|
-
const
|
|
28
|
-
const [e] =
|
|
22
|
+
import { ErrorBoundary as Li } from "react-error-boundary";
|
|
23
|
+
import { A as Gi, g as ki } from "./models-DZ9C6CvE.js";
|
|
24
|
+
import { j as Di } from "./core-nSRy3D7z.js";
|
|
25
|
+
import { loadWebBlocks as xi } from "./web-blocks.js";
|
|
26
|
+
import { g as Oi } from "./apply-binding-vAuN-TGV.js";
|
|
27
|
+
const Ri = () => {
|
|
28
|
+
const [e] = ra();
|
|
29
29
|
return /* @__PURE__ */ m("div", { className: "flex w-12 cursor-not-allowed items-center justify-center gap-x-1 space-x-0 font-medium text-gray-400", children: [
|
|
30
|
-
/* @__PURE__ */ o(
|
|
30
|
+
/* @__PURE__ */ o(Ha, { className: "h-3.5 w-3.5 flex-shrink-0" }),
|
|
31
31
|
" ",
|
|
32
32
|
/* @__PURE__ */ m("div", { className: "text-xs leading-3", children: [
|
|
33
|
-
|
|
33
|
+
Va(e, 0),
|
|
34
34
|
"%"
|
|
35
35
|
] })
|
|
36
36
|
] });
|
|
37
|
-
},
|
|
38
|
-
const e = Rn("flags.darkMode", !1), t = Rn("flags.dataBinding", !0), [n, s] = pe(
|
|
37
|
+
}, Ui = () => {
|
|
38
|
+
const e = Rn("flags.darkMode", !1), t = Rn("flags.dataBinding", !0), [n, s] = pe(aa), { t: r } = ue();
|
|
39
39
|
return /* @__PURE__ */ m("div", { className: "flex h-10 items-center justify-between px-2", children: [
|
|
40
|
-
/* @__PURE__ */ o("div", { className: "flex h-full space-x-2", children: e ? /* @__PURE__ */ o(
|
|
40
|
+
/* @__PURE__ */ o("div", { className: "flex h-full space-x-2", children: e ? /* @__PURE__ */ o(ia, {}) : null }),
|
|
41
41
|
/* @__PURE__ */ m("div", { className: "flex h-full items-center space-x-2", children: [
|
|
42
|
-
/* @__PURE__ */ o(
|
|
43
|
-
/* @__PURE__ */ o(
|
|
44
|
-
/* @__PURE__ */ o(
|
|
42
|
+
/* @__PURE__ */ o(oa, { canvas: !0, openDelay: 400, activeButtonClass: "bg-gray-200" }),
|
|
43
|
+
/* @__PURE__ */ o(Ri, {}),
|
|
44
|
+
/* @__PURE__ */ o(la, {})
|
|
45
45
|
] }),
|
|
46
46
|
/* @__PURE__ */ m("div", { className: "flex h-full items-center", children: [
|
|
47
|
-
/* @__PURE__ */ o(
|
|
47
|
+
/* @__PURE__ */ o(ca, {}),
|
|
48
48
|
t ? /* @__PURE__ */ m(un, { children: [
|
|
49
|
-
/* @__PURE__ */ o(dn, { asChild: !0, children: /* @__PURE__ */ o(
|
|
49
|
+
/* @__PURE__ */ o(dn, { asChild: !0, children: /* @__PURE__ */ o(x, { size: "sm", variant: "ghost", className: "size-2 h-7 w-7 rounded-md p-1", children: /* @__PURE__ */ o(js, { className: "h-2 w-2" }) }) }),
|
|
50
50
|
/* @__PURE__ */ o(fn, { className: "w-56 border-border text-xs", children: /* @__PURE__ */ m(Te, { className: "flex items-center gap-2", onSelect: (l) => l.preventDefault(), children: [
|
|
51
|
-
/* @__PURE__ */ o(
|
|
51
|
+
/* @__PURE__ */ o(Ka, { className: "h-4 w-4 text-gray-500" }),
|
|
52
52
|
/* @__PURE__ */ o("span", { className: "flex-1", children: r("Data Binding") }),
|
|
53
|
-
/* @__PURE__ */ o(
|
|
53
|
+
/* @__PURE__ */ o(ua, { checked: n, onCheckedChange: () => s(!n) })
|
|
54
54
|
] }) })
|
|
55
55
|
] }) : null
|
|
56
56
|
] })
|
|
57
57
|
] });
|
|
58
|
-
}, nn = Ne(null),
|
|
58
|
+
}, nn = Ne(null), Bi = Ne({}), pn = () => pe(Bi), ye = (e, t) => {
|
|
59
59
|
const [n] = pn();
|
|
60
60
|
return j(() => Q(n, e, t), [n, e, t]);
|
|
61
|
-
},
|
|
61
|
+
}, C = () => ye("apiUrl", "/chai/api"), Zs = () => ye("realtimeAdapter", null);
|
|
62
62
|
function ve() {
|
|
63
63
|
const [e, t] = N(
|
|
64
64
|
new URLSearchParams(window.location.search)
|
|
@@ -144,8 +144,8 @@ const E = {
|
|
|
144
144
|
...n
|
|
145
145
|
},
|
|
146
146
|
body: JSON.stringify(t)
|
|
147
|
-
}),
|
|
148
|
-
const e = k(), t =
|
|
147
|
+
}), Mi = () => {
|
|
148
|
+
const e = k(), t = C();
|
|
149
149
|
return K(
|
|
150
150
|
async ({
|
|
151
151
|
body: n,
|
|
@@ -156,7 +156,7 @@ const E = {
|
|
|
156
156
|
[e]
|
|
157
157
|
);
|
|
158
158
|
}, k = () => {
|
|
159
|
-
const e = ye("onLogout", En), t = ye("getAccessToken"), n =
|
|
159
|
+
const e = ye("onLogout", En), t = ye("getAccessToken"), n = C();
|
|
160
160
|
return K(
|
|
161
161
|
async (s = n, r, a = {}, i = !1) => {
|
|
162
162
|
const l = await t();
|
|
@@ -185,19 +185,19 @@ const E = {
|
|
|
185
185
|
},
|
|
186
186
|
[e, t]
|
|
187
187
|
);
|
|
188
|
-
},
|
|
188
|
+
}, Fi = Ne(null), er = () => pe(Fi), ts = () => {
|
|
189
189
|
const [e] = er();
|
|
190
190
|
return (e == null ? void 0 : e.slug) || "";
|
|
191
191
|
};
|
|
192
|
-
function
|
|
192
|
+
function Hi(e, t) {
|
|
193
193
|
const [n, s] = N(e);
|
|
194
194
|
return J(() => {
|
|
195
195
|
const r = setTimeout(() => s(e), t);
|
|
196
196
|
return () => clearTimeout(r);
|
|
197
197
|
}, [e, t]), n;
|
|
198
198
|
}
|
|
199
|
-
const
|
|
200
|
-
const { selectedLang: n, fallbackLang: s } = Se(), { data: r } = fe(), a = r == null ? void 0 : r.pageType, i =
|
|
199
|
+
const Ki = ({ query: e, uuid: t }) => {
|
|
200
|
+
const { selectedLang: n, fallbackLang: s } = Se(), { data: r } = fe(), a = r == null ? void 0 : r.pageType, i = C(), l = k(), { data: c, isFetching: d } = de({
|
|
201
201
|
queryKey: [E.GET_DYNAMIC_PAGES, e, a, t],
|
|
202
202
|
staleTime: 3600 * 1e3,
|
|
203
203
|
placeholderData: [],
|
|
@@ -208,8 +208,8 @@ const Bi = ({ query: e, uuid: t }) => {
|
|
|
208
208
|
enabled: !!a
|
|
209
209
|
}), f = j(() => n === "" ? c.filter((u) => u.lang === "" || u.lang === s) : c.filter((u) => u.lang === n), [n, s, c]);
|
|
210
210
|
return { allLangPages: c, data: f, isFetching: d };
|
|
211
|
-
},
|
|
212
|
-
const { selectedLang: e, fallbackLang: t } = Se(), [n, s] = er(), [r, a] = N(""), i =
|
|
211
|
+
}, Vi = () => {
|
|
212
|
+
const { selectedLang: e, fallbackLang: t } = Se(), [n, s] = er(), [r, a] = N(""), i = Hi(r, 500), { allLangPages: l, data: c, isFetching: d } = Ki({ query: i }), f = K((h) => s(h), [s]), u = K((h) => a(h), [a]), g = K(() => {
|
|
213
213
|
if (!n) return;
|
|
214
214
|
const h = !(n != null && n.primaryPage), p = e.length === 0, _ = h ? n == null ? void 0 : n.id : n == null ? void 0 : n.primaryPage, y = l.filter(
|
|
215
215
|
(A) => (A == null ? void 0 : A.primaryPage) === _ || A.id === _
|
|
@@ -228,13 +228,13 @@ const Bi = ({ query: e, uuid: t }) => {
|
|
|
228
228
|
onChangeLanguage: g
|
|
229
229
|
};
|
|
230
230
|
}, He = () => {
|
|
231
|
-
const e =
|
|
231
|
+
const e = C(), t = k();
|
|
232
232
|
return de({
|
|
233
233
|
queryKey: [E.GET_WEBSITE_DRAFT_SETTINGS],
|
|
234
234
|
staleTime: 300 * 1e3,
|
|
235
235
|
placeholderData: {
|
|
236
236
|
languages: [],
|
|
237
|
-
theme:
|
|
237
|
+
theme: Ci,
|
|
238
238
|
appKey: "",
|
|
239
239
|
fallbackLang: "",
|
|
240
240
|
settings: {},
|
|
@@ -249,15 +249,15 @@ const Bi = ({ query: e, uuid: t }) => {
|
|
|
249
249
|
const { data: e } = He();
|
|
250
250
|
return j(() => (e == null ? void 0 : e.fallbackLang) || "en", [e]);
|
|
251
251
|
}, Ke = () => {
|
|
252
|
-
const e = k(), t =
|
|
252
|
+
const e = k(), t = C();
|
|
253
253
|
return de({
|
|
254
254
|
queryKey: [E.GET_WEBSITE_PAGES],
|
|
255
255
|
staleTime: 1e3 * 60 * 5,
|
|
256
256
|
queryFn: async () => e(t, { action: E.GET_WEBSITE_PAGES }) || [],
|
|
257
257
|
placeholderData: (n) => n || []
|
|
258
258
|
});
|
|
259
|
-
},
|
|
260
|
-
const t = k(), n =
|
|
259
|
+
}, $i = (e) => {
|
|
260
|
+
const t = k(), n = C(), s = ns();
|
|
261
261
|
return de({
|
|
262
262
|
queryKey: [E.GET_WEBSITE_PAGES, e, s],
|
|
263
263
|
staleTime: 1e3 * 60 * 5,
|
|
@@ -265,29 +265,29 @@ const Bi = ({ query: e, uuid: t }) => {
|
|
|
265
265
|
queryFn: async () => {
|
|
266
266
|
if (s === e) return {};
|
|
267
267
|
const r = await t(n, { action: E.GET_WEBSITE_PAGES, data: { lang: e } }) || [];
|
|
268
|
-
return
|
|
268
|
+
return $a(
|
|
269
269
|
Un(r, (a) => ({ ...a, lang: e })),
|
|
270
270
|
"primaryPage"
|
|
271
271
|
);
|
|
272
272
|
},
|
|
273
273
|
placeholderData: (r) => r || {}
|
|
274
274
|
});
|
|
275
|
-
},
|
|
275
|
+
}, qi = Ne({ lastSaved: void 0 }), Qi = () => pe(qi), fe = () => {
|
|
276
276
|
const [e] = ve(), t = e.get("page"), { data: n, isFetching: s } = Ke();
|
|
277
277
|
return { data: j(() => ({ ...ce(n, { id: t }) || {} }), [n, t]), isFetching: s };
|
|
278
278
|
}, Ge = () => {
|
|
279
|
-
const [e] = ve(), t = e.get("lang") ?? "", n = e.get("page"), { data: s, isFetching: r } =
|
|
279
|
+
const [e] = ve(), t = e.get("lang") ?? "", n = e.get("page"), { data: s, isFetching: r } = $i(t), { data: a } = Ke();
|
|
280
280
|
return { data: j(
|
|
281
281
|
() => ce([...Yn(s), ...a], t == "" ? { id: n } : { lang: t, primaryPage: n }) || {},
|
|
282
282
|
[s, a, t, n]
|
|
283
283
|
), isFetching: r };
|
|
284
284
|
};
|
|
285
285
|
Ne({});
|
|
286
|
-
const
|
|
286
|
+
const Wi = () => {
|
|
287
287
|
const { data: e } = Ge(), t = ts(), n = ye("getLiveUrl", En), s = e == null ? void 0 : e.slug, r = n(s || "/");
|
|
288
288
|
return t ? r + t : r;
|
|
289
289
|
}, yn = (e) => {
|
|
290
|
-
const t =
|
|
290
|
+
const t = C(), [n] = ve(), s = e ?? n.get("page"), r = k(), { languages: a } = Se();
|
|
291
291
|
return de({
|
|
292
292
|
queryKey: [E.GET_LANGUAGE_PAGES, s],
|
|
293
293
|
staleTime: 1 / 0,
|
|
@@ -299,12 +299,12 @@ const Vi = () => {
|
|
|
299
299
|
action: E.GET_LANGUAGE_PAGES,
|
|
300
300
|
data: { id: s }
|
|
301
301
|
});
|
|
302
|
-
return qa(
|
|
302
|
+
return qa(Qa(i, "primaryPage"));
|
|
303
303
|
},
|
|
304
304
|
enabled: !!s && !!(a != null && a.length)
|
|
305
305
|
});
|
|
306
306
|
}, be = {
|
|
307
|
-
...
|
|
307
|
+
...da,
|
|
308
308
|
//pages
|
|
309
309
|
ADD_PAGE: "add_page",
|
|
310
310
|
EDIT_PAGE: "edit_page",
|
|
@@ -319,17 +319,17 @@ const Vi = () => {
|
|
|
319
319
|
DELETE_REVISION: "delete_revision",
|
|
320
320
|
DELETE_LIBRARY_BLOCK: "delete_library_block"
|
|
321
321
|
}, Ve = () => {
|
|
322
|
-
const e =
|
|
322
|
+
const e = C(), t = k();
|
|
323
323
|
return de({
|
|
324
324
|
queryKey: [E.GET_PAGE_TYPES],
|
|
325
325
|
staleTime: 1 / 0,
|
|
326
326
|
placeholderData: [],
|
|
327
327
|
queryFn: async () => t(e, { action: E.GET_PAGE_TYPES })
|
|
328
328
|
});
|
|
329
|
-
},
|
|
329
|
+
}, ji = (e) => {
|
|
330
330
|
const { data: t } = Ve();
|
|
331
331
|
return j(() => t == null ? void 0 : t.find((n) => n.key === e), [t, e]);
|
|
332
|
-
},
|
|
332
|
+
}, zi = () => {
|
|
333
333
|
const { data: e } = Ke();
|
|
334
334
|
return { searchPages: K(
|
|
335
335
|
async (n, s) => {
|
|
@@ -343,7 +343,7 @@ const Vi = () => {
|
|
|
343
343
|
},
|
|
344
344
|
[e]
|
|
345
345
|
) };
|
|
346
|
-
},
|
|
346
|
+
}, Yi = ({
|
|
347
347
|
page: e,
|
|
348
348
|
setDuplicatePage: t,
|
|
349
349
|
setAddEditPage: n,
|
|
@@ -364,7 +364,7 @@ const Vi = () => {
|
|
|
364
364
|
g.stopPropagation(), t(e);
|
|
365
365
|
},
|
|
366
366
|
children: [
|
|
367
|
-
/* @__PURE__ */ o(
|
|
367
|
+
/* @__PURE__ */ o(ni, { className: "size-3" }),
|
|
368
368
|
"Duplicate page"
|
|
369
369
|
]
|
|
370
370
|
}
|
|
@@ -393,7 +393,7 @@ const Vi = () => {
|
|
|
393
393
|
g.stopPropagation(), s(e);
|
|
394
394
|
},
|
|
395
395
|
children: [
|
|
396
|
-
/* @__PURE__ */ o(
|
|
396
|
+
/* @__PURE__ */ o(si, { className: "size-3" }),
|
|
397
397
|
l("Unpublish")
|
|
398
398
|
]
|
|
399
399
|
}
|
|
@@ -406,53 +406,53 @@ const Vi = () => {
|
|
|
406
406
|
g.stopPropagation(), r(e);
|
|
407
407
|
},
|
|
408
408
|
children: [
|
|
409
|
-
/* @__PURE__ */ o(
|
|
409
|
+
/* @__PURE__ */ o(ri, { className: "size-3" }),
|
|
410
410
|
l("Delete")
|
|
411
411
|
]
|
|
412
412
|
}
|
|
413
413
|
)
|
|
414
414
|
] })
|
|
415
415
|
] });
|
|
416
|
-
},
|
|
416
|
+
}, Ji = (e, t, n) => ((e.includes("THEME") || (t == null ? void 0 : t.theme) !== void 0) && (e.push("THEME"), n && (t != null && t.theme) && n(t.theme)), e), Zi = (e, t, n) => ((e.includes("DESIGN_TOKENS") || (t == null ? void 0 : t.designTokens) !== void 0) && (e.push("DESIGN_TOKENS"), n && t.designTokens && n(t.designTokens)), e), Xi = (e, t, n, s) => {
|
|
417
417
|
let r = (e == null ? void 0 : e.appChanges) || [];
|
|
418
|
-
return r =
|
|
418
|
+
return r = Ji(r, t, n), r = Zi(r, t, s), e ? {
|
|
419
419
|
...e,
|
|
420
420
|
...t,
|
|
421
421
|
appChanges: r
|
|
422
422
|
} : t;
|
|
423
|
-
},
|
|
423
|
+
}, eo = ({ queryClient: e, queryKey: t, data: n, setTheme: s, setDesignTokens: r }) => {
|
|
424
424
|
e.setQueryData(
|
|
425
425
|
t,
|
|
426
|
-
(a) =>
|
|
426
|
+
(a) => Xi(a, n, s, r)
|
|
427
427
|
);
|
|
428
|
-
},
|
|
428
|
+
}, to = (e, t, n, s, r) => e.id === t ? {
|
|
429
429
|
...e,
|
|
430
430
|
designTokens: n,
|
|
431
431
|
links: s,
|
|
432
432
|
partialBlocks: r,
|
|
433
433
|
changes: [{ type: "Page" }]
|
|
434
|
-
} : e,
|
|
434
|
+
} : e, no = ({ queryClient: e, pageId: t, designTokens: n, linkPageIds: s, partialIds: r }) => {
|
|
435
435
|
e.setQueryData([E.GET_WEBSITE_PAGES], (a) => {
|
|
436
436
|
if (!a || !Array.isArray(a)) return a;
|
|
437
437
|
const i = s.join(" | "), l = r.join(" | ");
|
|
438
|
-
return a.map((c) =>
|
|
438
|
+
return a.map((c) => to(c, t, n, i, l));
|
|
439
439
|
});
|
|
440
|
-
},
|
|
441
|
-
t.settings && (
|
|
440
|
+
}, so = (e, t, n, s, r, a, i) => {
|
|
441
|
+
t.settings && (eo({
|
|
442
442
|
queryClient: e,
|
|
443
443
|
queryKey: [E.GET_WEBSITE_DRAFT_SETTINGS],
|
|
444
444
|
data: t.settings,
|
|
445
445
|
setTheme: a,
|
|
446
446
|
setDesignTokens: i
|
|
447
|
-
}), !n && s && (t.settings.theme !== void 0 &&
|
|
447
|
+
}), !n && s && (t.settings.theme !== void 0 && O.success(r("Theme Updated"), {
|
|
448
448
|
description: r("{{userName}} updated the theme", { userName: s }),
|
|
449
449
|
position: "bottom-left"
|
|
450
|
-
}), t.settings.designTokens !== void 0 &&
|
|
450
|
+
}), t.settings.designTokens !== void 0 && O.success(r("Design Tokens Updated"), {
|
|
451
451
|
description: r("{{userName}} updated the design tokens", { userName: s }),
|
|
452
452
|
position: "bottom-left"
|
|
453
453
|
})));
|
|
454
|
-
},
|
|
455
|
-
t.pageId && t.designTokens && t.linkPageIds && t.partialIds &&
|
|
454
|
+
}, ro = (e, t) => {
|
|
455
|
+
t.pageId && t.designTokens && t.linkPageIds && t.partialIds && no({
|
|
456
456
|
queryClient: e,
|
|
457
457
|
pageId: t.pageId,
|
|
458
458
|
designTokens: t.designTokens,
|
|
@@ -463,46 +463,46 @@ const Vi = () => {
|
|
|
463
463
|
...e,
|
|
464
464
|
changes: [],
|
|
465
465
|
online: !0
|
|
466
|
-
} : e,
|
|
466
|
+
} : e, ao = (e, t) => {
|
|
467
467
|
if (!e) return e;
|
|
468
468
|
const s = (e.appChanges || []).filter((r) => !t.includes(r));
|
|
469
469
|
return {
|
|
470
470
|
...e,
|
|
471
471
|
appChanges: s
|
|
472
472
|
};
|
|
473
|
-
},
|
|
473
|
+
}, io = ({ queryClient: e, ids: t }) => {
|
|
474
474
|
e.setQueryData([E.GET_WEBSITE_PAGES], (n) => !n || !Array.isArray(n) ? n : n.map((s) => Ss(s, t))), e.setQueryData([E.GET_LANGUAGE_PAGES], (n) => !n || !Array.isArray(n) ? n : n.map((s) => Ss(s, t))), (t.includes("THEME") || t.includes("DESIGN_TOKENS")) && e.setQueryData(
|
|
475
475
|
[E.GET_WEBSITE_DRAFT_SETTINGS],
|
|
476
|
-
(n) =>
|
|
476
|
+
(n) => ao(n, t)
|
|
477
477
|
);
|
|
478
478
|
}, _s = (e, t) => e.id === t ? {
|
|
479
479
|
...e,
|
|
480
480
|
online: !1
|
|
481
|
-
} : e,
|
|
481
|
+
} : e, oo = ({ queryClient: e, pageId: t, primaryPage: n }) => {
|
|
482
482
|
n ? e.setQueryData([E.GET_LANGUAGE_PAGES, n], (s) => !s || !Array.isArray(s) ? s : s.map((r) => _s(r, t))) : e.setQueryData([E.GET_WEBSITE_PAGES], (s) => !s || !Array.isArray(s) ? s : s.map((r) => _s(r, t)));
|
|
483
|
-
},
|
|
483
|
+
}, lo = (e, t, n, s) => {
|
|
484
484
|
e && t(n, { data: s });
|
|
485
|
-
},
|
|
485
|
+
}, co = (e, t, n, s, r) => {
|
|
486
486
|
const { type: a, data: i, sync: l = !1, userName: c } = e;
|
|
487
487
|
switch (a) {
|
|
488
488
|
case "UPDATE_WEBSITE_DATA":
|
|
489
|
-
|
|
489
|
+
so(t, i, l, c, r, n, s);
|
|
490
490
|
break;
|
|
491
491
|
case "UPDATE_PAGE_DATA":
|
|
492
|
-
|
|
492
|
+
ro(t, i);
|
|
493
493
|
break;
|
|
494
494
|
case "PUBLISH_CHANGES":
|
|
495
|
-
i.ids &&
|
|
495
|
+
i.ids && io({ queryClient: t, ids: i.ids });
|
|
496
496
|
break;
|
|
497
497
|
case "UNPUBLISH_PAGE":
|
|
498
|
-
i.pageId &&
|
|
498
|
+
i.pageId && oo({ queryClient: t, pageId: i.pageId, primaryPage: i.primaryPage });
|
|
499
499
|
break;
|
|
500
500
|
default:
|
|
501
501
|
console.log(r("Unknown sync type"), a);
|
|
502
502
|
}
|
|
503
503
|
return l;
|
|
504
504
|
}, Mt = () => {
|
|
505
|
-
const e = X(), t = rr(), [n, s] = pe(
|
|
505
|
+
const e = X(), t = rr(), [n, s] = pe(fa), [, r] = pe(ha), { t: a } = ue(), i = K(
|
|
506
506
|
(c) => {
|
|
507
507
|
r(c);
|
|
508
508
|
},
|
|
@@ -511,8 +511,8 @@ const Vi = () => {
|
|
|
511
511
|
return {
|
|
512
512
|
handleQuerySync: K(
|
|
513
513
|
(c) => {
|
|
514
|
-
const d =
|
|
515
|
-
|
|
514
|
+
const d = co(c, e, s, i, a);
|
|
515
|
+
lo(d, t, c.type, c.data);
|
|
516
516
|
},
|
|
517
517
|
[e, t, s, i, a]
|
|
518
518
|
)
|
|
@@ -544,7 +544,7 @@ const Vi = () => {
|
|
|
544
544
|
UPDATE_PAGE_DATA: "UPDATE_PAGE_DATA",
|
|
545
545
|
PUBLISH_CHANGES: "PUBLISH_CHANGES",
|
|
546
546
|
UNPUBLISH_PAGE: "UNPUBLISH_PAGE"
|
|
547
|
-
},
|
|
547
|
+
}, uo = ["sync", "join", "leave"], fo = [
|
|
548
548
|
W.FORCE_TAKE_OVER,
|
|
549
549
|
W.TAKE_OVER_REQUEST,
|
|
550
550
|
W.TAKE_OVER_APPROVED,
|
|
@@ -556,54 +556,54 @@ const Vi = () => {
|
|
|
556
556
|
W.UPDATE_PAGE_DATA,
|
|
557
557
|
W.PUBLISH_CHANGES,
|
|
558
558
|
W.UNPUBLISH_PAGE
|
|
559
|
-
],
|
|
560
|
-
const t = {}, n =
|
|
559
|
+
], ho = Ne({}), tr = Ne(null), go = Ne(oe.CHECKING), mo = Ne({}), Eo = (e) => {
|
|
560
|
+
const t = {}, n = Wa(Yn(e).map(Qs).filter(Boolean), "pageId");
|
|
561
561
|
return Object.entries(n).forEach(
|
|
562
|
-
([s, r]) => t[s] =
|
|
562
|
+
([s, r]) => t[s] = qs(r, "onlineAt")
|
|
563
563
|
), t;
|
|
564
|
-
},
|
|
565
|
-
const t =
|
|
564
|
+
}, po = (e) => {
|
|
565
|
+
const t = qs(Yn(e).map(Qs).filter(Boolean), "onlineAt"), n = t == null ? void 0 : t.onlineAt;
|
|
566
566
|
return n ? n - 100 : +/* @__PURE__ */ new Date() - 1e3 * 60 * 60 * 4;
|
|
567
567
|
}, An = () => {
|
|
568
568
|
const { user: e } = ss();
|
|
569
569
|
return e == null ? void 0 : e.id;
|
|
570
|
-
},
|
|
570
|
+
}, yo = () => {
|
|
571
571
|
const { data: e } = He();
|
|
572
572
|
return `WEBSITE:${e == null ? void 0 : e.appKey}`;
|
|
573
573
|
}, Ft = () => {
|
|
574
574
|
const { data: e } = fe();
|
|
575
575
|
return e == null ? void 0 : e.id;
|
|
576
576
|
}, De = crypto.randomUUID();
|
|
577
|
-
let
|
|
578
|
-
const mt = 10,
|
|
579
|
-
const [e, t] = pe(
|
|
577
|
+
let Ln = null;
|
|
578
|
+
const mt = 10, Ao = 1e3, To = 2, So = 16e3, nr = () => {
|
|
579
|
+
const [e, t] = pe(ho);
|
|
580
580
|
return { pageToUser: e, setPageToUser: t };
|
|
581
|
-
},
|
|
582
|
-
const [e, t] = pe(
|
|
581
|
+
}, Ce = () => {
|
|
582
|
+
const [e, t] = pe(go), n = [oe.LOCKED, oe.ACTIVE_IN_ANOTHER_TAB].includes(e), s = [oe.EDITING].includes(e);
|
|
583
583
|
return { pageStatus: e, setPageStatus: t, isLocked: n, isEditing: s };
|
|
584
584
|
}, sr = () => {
|
|
585
|
-
const [e, t] = pe(
|
|
585
|
+
const [e, t] = pe(mo);
|
|
586
586
|
return { pageLockMeta: e, setPageLockMeta: t };
|
|
587
|
-
},
|
|
587
|
+
}, _o = () => {
|
|
588
588
|
const e = Ft(), { pageToUser: t } = nr();
|
|
589
589
|
return j(() => t[e], [t, e]);
|
|
590
590
|
}, rs = () => {
|
|
591
|
-
const e = Zs(), { setPageStatus: t } =
|
|
591
|
+
const e = Zs(), { setPageStatus: t } = Ce(), [n] = pe(tr);
|
|
592
592
|
return J(() => {
|
|
593
|
-
if (clearTimeout(
|
|
594
|
-
return
|
|
593
|
+
if (clearTimeout(Ln), !e)
|
|
594
|
+
return Ln = setTimeout(() => {
|
|
595
595
|
e || t(oe.EDITING);
|
|
596
|
-
}, 500), () => clearTimeout(
|
|
596
|
+
}, 500), () => clearTimeout(Ln);
|
|
597
597
|
}, [e, t]), n;
|
|
598
|
-
},
|
|
599
|
-
const e = Ft(), t = An(), n = rs(), { setPageToUser: s } = nr(), { setPageStatus: r, pageStatus: a } =
|
|
598
|
+
}, Po = () => {
|
|
599
|
+
const e = Ft(), t = An(), n = rs(), { setPageToUser: s } = nr(), { setPageStatus: r, pageStatus: a } = Ce(), i = le(e);
|
|
600
600
|
return J(() => {
|
|
601
601
|
i.current = e;
|
|
602
602
|
}, [e]), K(
|
|
603
603
|
(l) => {
|
|
604
604
|
const c = l || n;
|
|
605
605
|
if (!c) return [];
|
|
606
|
-
const d = c == null ? void 0 : c.presenceState(), f =
|
|
606
|
+
const d = c == null ? void 0 : c.presenceState(), f = Eo(d);
|
|
607
607
|
s(f);
|
|
608
608
|
const u = f[i.current];
|
|
609
609
|
if (!u)
|
|
@@ -619,7 +619,7 @@ const mt = 10, mo = 1e3, Eo = 2, po = 16e3, nr = () => {
|
|
|
619
619
|
[n, s, r, t, a]
|
|
620
620
|
);
|
|
621
621
|
}, rr = () => {
|
|
622
|
-
const e = An(), t = Ft(), n = rs(), s =
|
|
622
|
+
const e = An(), t = Ft(), n = rs(), s = _o(), { setPageLockMeta: r } = sr(), { user: a } = ss(), i = le(t);
|
|
623
623
|
return J(() => {
|
|
624
624
|
i.current = t;
|
|
625
625
|
}, [t]), K(
|
|
@@ -630,8 +630,8 @@ const mt = 10, mo = 1e3, Eo = 2, po = 16e3, nr = () => {
|
|
|
630
630
|
},
|
|
631
631
|
[n, e, s, r, a]
|
|
632
632
|
);
|
|
633
|
-
},
|
|
634
|
-
const e = An(), t = Ft(), n = rs(), { setPageStatus: s } =
|
|
633
|
+
}, wo = () => {
|
|
634
|
+
const e = An(), t = Ft(), n = rs(), { setPageStatus: s } = Ce(), { setPageLockMeta: r } = sr(), a = rr(), i = le(t), { savePageAsync: l } = Me(), { handleQuerySync: c } = Mt();
|
|
635
635
|
return J(() => {
|
|
636
636
|
i.current = t;
|
|
637
637
|
}, [t]), K(
|
|
@@ -663,7 +663,7 @@ const mt = 10, mo = 1e3, Eo = 2, po = 16e3, nr = () => {
|
|
|
663
663
|
break;
|
|
664
664
|
}
|
|
665
665
|
case W.CONTINUE_EDITING_IN_THIS_CLIENT: {
|
|
666
|
-
const g =
|
|
666
|
+
const g = po(n == null ? void 0 : n.presenceState());
|
|
667
667
|
s(oe.CHECKING), await (n == null ? void 0 : n.track({ onlineAt: g, pageId: i.current, userId: e, clientId: De }));
|
|
668
668
|
break;
|
|
669
669
|
}
|
|
@@ -675,18 +675,18 @@ const mt = 10, mo = 1e3, Eo = 2, po = 16e3, nr = () => {
|
|
|
675
675
|
},
|
|
676
676
|
[a, r, s, n, e, l, c]
|
|
677
677
|
);
|
|
678
|
-
},
|
|
679
|
-
const e = Zs(), t = An(), n = Ft(), s =
|
|
678
|
+
}, td = () => {
|
|
679
|
+
const e = Zs(), t = An(), n = Ft(), s = yo(), [r, a] = pe(tr), i = wo(), l = Po(), c = le(i), d = le(l), f = le(null), u = le(!1), g = le(0), h = le(r), p = le(() => {
|
|
680
680
|
});
|
|
681
681
|
J(() => {
|
|
682
682
|
c.current = i, d.current = l, h.current = r;
|
|
683
683
|
}, [i, l, r]);
|
|
684
684
|
const _ = K((y) => {
|
|
685
|
-
|
|
685
|
+
fo.forEach((A) => {
|
|
686
686
|
y.onBroadcast(A, (w) => {
|
|
687
687
|
c.current(A)(w);
|
|
688
688
|
});
|
|
689
|
-
}),
|
|
689
|
+
}), uo.forEach((A) => {
|
|
690
690
|
y.onPresence(A, () => {
|
|
691
691
|
d.current(y);
|
|
692
692
|
});
|
|
@@ -703,8 +703,8 @@ const mt = 10, mo = 1e3, Eo = 2, po = 16e3, nr = () => {
|
|
|
703
703
|
`Attempting to reconnect realtime channel (attempt ${g.current}/${mt})`
|
|
704
704
|
), f.current && (clearTimeout(f.current), f.current = null), h.current && (h.current.unsubscribe(), a(null), h.current = null);
|
|
705
705
|
const y = Math.min(
|
|
706
|
-
|
|
707
|
-
|
|
706
|
+
Ao * Math.pow(To, g.current - 1),
|
|
707
|
+
So
|
|
708
708
|
);
|
|
709
709
|
f.current = setTimeout(() => {
|
|
710
710
|
const A = e.channel(s, {
|
|
@@ -757,8 +757,8 @@ const mt = 10, mo = 1e3, Eo = 2, po = 16e3, nr = () => {
|
|
|
757
757
|
}), () => {
|
|
758
758
|
r && n && r.untrack();
|
|
759
759
|
}), [r, n, t]);
|
|
760
|
-
},
|
|
761
|
-
const [e, t] = N(null), [n, s] = N(null), [r, a] = N(null), [i, l] = N(null), [c, d] = N(null), [f, u] = N(null), { data: g, isFetching: h } = Ge(), { selectedLang: p, fallbackLang: _ } = Se(), { data: I } = yn(), y = I == null ? void 0 : I.find((D) => D.lang === p), { isLocked: A } =
|
|
760
|
+
}, bo = M(() => import("./add-new-page-Ppy5-y5j.js")), Io = M(() => import("./delete-page-C99K2qzS.js")), No = M(() => import("./duplicate-page-CDc2X0eW.js")), vo = M(() => import("./mark-as-template-CP_F9ZQ4.js")), Co = M(() => import("./unmark-as-template-C5ovsEBP.js")), Lo = M(() => import("./unpublish-page-0fR1o0b7.js")), Go = () => {
|
|
761
|
+
const [e, t] = N(null), [n, s] = N(null), [r, a] = N(null), [i, l] = N(null), [c, d] = N(null), [f, u] = N(null), { data: g, isFetching: h } = Ge(), { selectedLang: p, fallbackLang: _ } = Se(), { data: I } = yn(), y = I == null ? void 0 : I.find((D) => D.lang === p), { isLocked: A } = Ce(), w = !(g != null && g.slug), F = Xn(nn);
|
|
762
762
|
if (!g) return null;
|
|
763
763
|
const V = (D) => {
|
|
764
764
|
p.length > 0 && p !== _ ? F({
|
|
@@ -770,19 +770,19 @@ const mt = 10, mo = 1e3, Eo = 2, po = 16e3, nr = () => {
|
|
|
770
770
|
return /* @__PURE__ */ m(me, { children: [
|
|
771
771
|
/* @__PURE__ */ m("div", { className: "flex items-center justify-between rounded px-[2px] transition-colors duration-200", children: [
|
|
772
772
|
/* @__PURE__ */ o("p", { className: "flex h-7 max-w-[200px] items-center truncate rounded px-1 text-xs font-medium", children: h ? /* @__PURE__ */ o(Fe, { className: "h-4 w-4 animate-spin text-slate-400" }) : /* @__PURE__ */ m("span", { className: "flex items-end overflow-hidden text-ellipsis whitespace-nowrap rounded-sm text-xs font-medium", children: [
|
|
773
|
-
w ? /* @__PURE__ */ o(
|
|
773
|
+
w ? /* @__PURE__ */ o(ai, { className: "mr-1 h-4 w-4" }) : /* @__PURE__ */ o(ii, { className: "mr-1 h-4 w-4" }),
|
|
774
774
|
Q(y || g, "name") ?? ""
|
|
775
775
|
] }) }),
|
|
776
776
|
A ? /* @__PURE__ */ o(
|
|
777
|
-
|
|
777
|
+
x,
|
|
778
778
|
{
|
|
779
779
|
variant: "ghost",
|
|
780
780
|
size: "icon",
|
|
781
781
|
className: "h-7 w-7 cursor-not-allowed rounded opacity-50 hover:bg-transparent",
|
|
782
|
-
children: /* @__PURE__ */ o(
|
|
782
|
+
children: /* @__PURE__ */ o(oi, { className: "h-4 w-4" })
|
|
783
783
|
}
|
|
784
784
|
) : /* @__PURE__ */ o(
|
|
785
|
-
|
|
785
|
+
Yi,
|
|
786
786
|
{
|
|
787
787
|
page: g,
|
|
788
788
|
setDuplicatePage: (D) => d(D),
|
|
@@ -790,12 +790,12 @@ const mt = 10, mo = 1e3, Eo = 2, po = 16e3, nr = () => {
|
|
|
790
790
|
setUnpublishPage: (D) => s(D),
|
|
791
791
|
setDeletePage: (D) => t(D),
|
|
792
792
|
isLanguagePage: p.length > 0 && p !== _,
|
|
793
|
-
children: /* @__PURE__ */ o(
|
|
793
|
+
children: /* @__PURE__ */ o(x, { variant: "ghost", size: "icon", className: "h-7 w-7 rounded", children: /* @__PURE__ */ o(js, { className: "h-4 w-4" }) })
|
|
794
794
|
}
|
|
795
795
|
)
|
|
796
796
|
] }),
|
|
797
797
|
f && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(
|
|
798
|
-
|
|
798
|
+
bo,
|
|
799
799
|
{
|
|
800
800
|
closePanel: () => u(null),
|
|
801
801
|
editPage: () => {
|
|
@@ -804,12 +804,12 @@ const mt = 10, mo = 1e3, Eo = 2, po = 16e3, nr = () => {
|
|
|
804
804
|
setAddEditPage: u
|
|
805
805
|
}
|
|
806
806
|
) }),
|
|
807
|
-
e && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(
|
|
808
|
-
n && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(
|
|
809
|
-
r && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(
|
|
810
|
-
i && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(
|
|
807
|
+
e && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(Io, { page: e, onClose: () => t(null) }) }),
|
|
808
|
+
n && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(Lo, { page: n, onClose: () => s(null) }) }),
|
|
809
|
+
r && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(vo, { page: r, onClose: () => a(null) }) }),
|
|
810
|
+
i && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(Co, { page: i, onClose: () => l(null) }) }),
|
|
811
811
|
c && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(
|
|
812
|
-
|
|
812
|
+
No,
|
|
813
813
|
{
|
|
814
814
|
page: c,
|
|
815
815
|
onClose: () => d(null),
|
|
@@ -826,7 +826,7 @@ const mt = 10, mo = 1e3, Eo = 2, po = 16e3, nr = () => {
|
|
|
826
826
|
),
|
|
827
827
|
children: e
|
|
828
828
|
}
|
|
829
|
-
),
|
|
829
|
+
), ko = ({ hasDynamicPage: e }) => /* @__PURE__ */ o(Tt, { children: /* @__PURE__ */ m("div", { className: "flex min-w-[300px] max-w-[400px] flex-col items-center justify-center rounded-lg border bg-white p-4 shadow-lg", children: [
|
|
830
830
|
/* @__PURE__ */ o("h1", { className: "text-lg font-medium", children: e ? "Select a page" : "No pages found" }),
|
|
831
831
|
/* @__PURE__ */ o("p", { className: "pt-2 text-center text-sm font-light text-gray-600", children: e ? "Please select a page from the list in the top header. This will enable you to edit the page." : "Please add a new page" })
|
|
832
832
|
] }) }), Qt = {
|
|
@@ -1018,18 +1018,18 @@ const mt = 10, mo = 1e3, Eo = 2, po = 16e3, nr = () => {
|
|
|
1018
1018
|
za: "Zhuang, Chuang",
|
|
1019
1019
|
zu: "Zulu"
|
|
1020
1020
|
};
|
|
1021
|
-
function
|
|
1021
|
+
function Do(e, t, n = !1) {
|
|
1022
1022
|
const s = e.toString() ? `?${e.toString()}` : "/";
|
|
1023
1023
|
n ? window.history.replaceState(null, "", s) : window.history.pushState({}, "", s), t(e), window.dispatchEvent(new PopStateEvent("popstate"));
|
|
1024
1024
|
}
|
|
1025
|
-
const
|
|
1025
|
+
const xo = M(() => import("./add-new-language-page-CRR93tLq.js")), Oo = () => {
|
|
1026
1026
|
const e = ye("topLeftCorner", null);
|
|
1027
|
-
return e ? /* @__PURE__ */ o("div", { className: "max-h-9 w-full overflow-hidden pr-2", children:
|
|
1028
|
-
},
|
|
1027
|
+
return e ? /* @__PURE__ */ o("div", { className: "max-h-9 w-full overflow-hidden pr-2", children: wi.createElement(e, {}) }) : null;
|
|
1028
|
+
}, Ro = ({
|
|
1029
1029
|
showAdd: e = !0,
|
|
1030
1030
|
goToDefaultLang: t = !1
|
|
1031
1031
|
}) => {
|
|
1032
|
-
const { fallbackLang: n, languages: s, selectedLang: r, setSelectedLang: a } = Se(), i = Ee(r) ? n : r, [, l] = ve(), { isLocked: c } =
|
|
1032
|
+
const { fallbackLang: n, languages: s, selectedLang: r, setSelectedLang: a } = Se(), i = Ee(r) ? n : r, [, l] = ve(), { isLocked: c } = Ce(), { t: d } = ue();
|
|
1033
1033
|
J(() => {
|
|
1034
1034
|
const y = new URLSearchParams(window.location.search), A = y.get("lang");
|
|
1035
1035
|
A && (s.includes(A) ? a(A) : (y.delete("lang"), l(y), a("")));
|
|
@@ -1069,14 +1069,14 @@ const Co = M(() => import("./add-new-language-page-C0sayTSF.js")), Go = () => {
|
|
|
1069
1069
|
}, I = (y) => {
|
|
1070
1070
|
a(y);
|
|
1071
1071
|
const A = new URLSearchParams(window.location.search);
|
|
1072
|
-
y === n ? A.delete("lang") : A.set("lang", y),
|
|
1072
|
+
y === n ? A.delete("lang") : A.set("lang", y), Do(A, l);
|
|
1073
1073
|
};
|
|
1074
|
-
return Ee(s) ? null : c ? /* @__PURE__ */ m(
|
|
1074
|
+
return Ee(s) ? null : c ? /* @__PURE__ */ m(x, { variant: "ghost", size: "sm", className: "ml-px h-max cursor-not-allowed gap-2 py-1.5 opacity-50", children: [
|
|
1075
1075
|
/* @__PURE__ */ o(gs, { className: "h-4 w-4" }),
|
|
1076
1076
|
Q(Qt, i, i),
|
|
1077
1077
|
/* @__PURE__ */ o(Bn, { className: "h-4 w-4" })
|
|
1078
|
-
] }) : t ? /* @__PURE__ */ o(
|
|
1079
|
-
/* @__PURE__ */ o(dn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(
|
|
1078
|
+
] }) : t ? /* @__PURE__ */ o(x, { onClick: () => I(n), variant: "link", size: "sm", children: d("Switch to default language") }) : /* @__PURE__ */ o(me, { children: /* @__PURE__ */ m(un, { children: [
|
|
1079
|
+
/* @__PURE__ */ o(dn, { asChild: !0, className: "focus:outline-none", children: /* @__PURE__ */ m(x, { disabled: !!c, variant: "outline", size: "sm", className: "ml-px h-max gap-2 py-1.5", children: [
|
|
1080
1080
|
/* @__PURE__ */ o(gs, { className: "h-4 w-4" }),
|
|
1081
1081
|
Q(Qt, i, i),
|
|
1082
1082
|
/* @__PURE__ */ o(Bn, { className: "h-4 w-4" })
|
|
@@ -1095,7 +1095,7 @@ const Co = M(() => import("./add-new-language-page-C0sayTSF.js")), Go = () => {
|
|
|
1095
1095
|
children: [
|
|
1096
1096
|
/* @__PURE__ */ o("div", { className: "text-slate-600", children: y.value }),
|
|
1097
1097
|
y.key === n && /* @__PURE__ */ m("small", { className: "flex items-center gap-x-1 text-[9px] leading-none text-orange-500", children: [
|
|
1098
|
-
/* @__PURE__ */ o(
|
|
1098
|
+
/* @__PURE__ */ o(li, { fill: "orange", className: "h-2 w-2" }),
|
|
1099
1099
|
"Primary"
|
|
1100
1100
|
] })
|
|
1101
1101
|
]
|
|
@@ -1104,9 +1104,9 @@ const Co = M(() => import("./add-new-language-page-C0sayTSF.js")), Go = () => {
|
|
|
1104
1104
|
)
|
|
1105
1105
|
),
|
|
1106
1106
|
e && !Ee(p.filter((y) => !y.isLangPageAdded)) && /* @__PURE__ */ m(me, { children: [
|
|
1107
|
-
/* @__PURE__ */ o(
|
|
1107
|
+
/* @__PURE__ */ o(ga, {}),
|
|
1108
1108
|
/* @__PURE__ */ m(
|
|
1109
|
-
|
|
1109
|
+
x,
|
|
1110
1110
|
{
|
|
1111
1111
|
size: "sm",
|
|
1112
1112
|
variant: "ghost",
|
|
@@ -1127,12 +1127,12 @@ const Co = M(() => import("./add-new-language-page-C0sayTSF.js")), Go = () => {
|
|
|
1127
1127
|
] })
|
|
1128
1128
|
] }) });
|
|
1129
1129
|
};
|
|
1130
|
-
function
|
|
1131
|
-
const e =
|
|
1130
|
+
function Uo() {
|
|
1131
|
+
const e = ti(nn), t = Xn(nn);
|
|
1132
1132
|
return /* @__PURE__ */ m("div", { className: "relative z-10 flex items-center justify-end gap-1", children: [
|
|
1133
|
-
/* @__PURE__ */ o(
|
|
1133
|
+
/* @__PURE__ */ o(Oo, {}),
|
|
1134
1134
|
e && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(
|
|
1135
|
-
|
|
1135
|
+
xo,
|
|
1136
1136
|
{
|
|
1137
1137
|
isOpen: !0,
|
|
1138
1138
|
id: e == null ? void 0 : e.id,
|
|
@@ -1144,29 +1144,29 @@ function Do() {
|
|
|
1144
1144
|
) })
|
|
1145
1145
|
] });
|
|
1146
1146
|
}
|
|
1147
|
-
function
|
|
1147
|
+
function Bo() {
|
|
1148
1148
|
return /* @__PURE__ */ o("div", { className: "mt-2 space-y-2", children: Array.from({ length: 5 }).map((e, t) => /* @__PURE__ */ m("div", { className: "flex items-start gap-3 rounded-md border p-2", children: [
|
|
1149
1149
|
/* @__PURE__ */ m("div", { className: "flex-1 space-y-1", children: [
|
|
1150
|
-
/* @__PURE__ */ o(
|
|
1151
|
-
/* @__PURE__ */ o(
|
|
1152
|
-
/* @__PURE__ */ o(
|
|
1150
|
+
/* @__PURE__ */ o(qt, { className: "h-4 w-3/4" }),
|
|
1151
|
+
/* @__PURE__ */ o(qt, { className: "h-3 w-1/2" }),
|
|
1152
|
+
/* @__PURE__ */ o(qt, { className: "mt-1 h-5 w-20" })
|
|
1153
1153
|
] }),
|
|
1154
|
-
/* @__PURE__ */ o(
|
|
1154
|
+
/* @__PURE__ */ o(qt, { className: "h-8 w-8 rounded-full" })
|
|
1155
1155
|
] }, t)) });
|
|
1156
1156
|
}
|
|
1157
|
-
const
|
|
1158
|
-
function
|
|
1157
|
+
const Mo = z.lazy(() => import("./page-revisions-content-C5O8_Fms.js"));
|
|
1158
|
+
function Fo() {
|
|
1159
1159
|
const [e, t] = z.useState(!1);
|
|
1160
1160
|
return /* @__PURE__ */ o(Hs, { children: /* @__PURE__ */ m(hn, { delayDuration: 0, children: [
|
|
1161
1161
|
/* @__PURE__ */ m(Ks, { open: e, onOpenChange: t, children: [
|
|
1162
|
-
/* @__PURE__ */ o(
|
|
1163
|
-
/* @__PURE__ */ m(
|
|
1164
|
-
/* @__PURE__ */ o(
|
|
1162
|
+
/* @__PURE__ */ o(ma, { asChild: !0, children: /* @__PURE__ */ o(gn, { asChild: !0, children: /* @__PURE__ */ m("span", { className: "flex items-center gap-2", children: [
|
|
1163
|
+
/* @__PURE__ */ m(x, { variant: "ghost", size: "icon", className: "h-8 w-8", children: [
|
|
1164
|
+
/* @__PURE__ */ o(ci, { className: "h-4 w-4" }),
|
|
1165
1165
|
/* @__PURE__ */ o("span", { className: "sr-only", children: "View revision history" })
|
|
1166
1166
|
] }),
|
|
1167
1167
|
/* @__PURE__ */ o("div", { className: "h-4 w-px bg-gray-200 dark:bg-gray-700" })
|
|
1168
1168
|
] }) }) }),
|
|
1169
|
-
/* @__PURE__ */ o(Vs, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ o(Y, { fallback: /* @__PURE__ */ o(
|
|
1169
|
+
/* @__PURE__ */ o(Vs, { className: "flex h-[100vh] flex-col", children: e && /* @__PURE__ */ o(Y, { fallback: /* @__PURE__ */ o(Bo, {}), children: /* @__PURE__ */ o(Mo, { isOpen: e }) }) })
|
|
1170
1170
|
] }),
|
|
1171
1171
|
/* @__PURE__ */ o(mn, { side: "bottom", children: /* @__PURE__ */ o("p", { children: "Revision history" }) })
|
|
1172
1172
|
] }) });
|
|
@@ -1179,14 +1179,14 @@ const Gn = ({
|
|
|
1179
1179
|
}) => {
|
|
1180
1180
|
const { hasPermission: r } = Fs();
|
|
1181
1181
|
return e && !r(e) || t && !t.some((a) => r(a)) ? s : n;
|
|
1182
|
-
},
|
|
1182
|
+
}, Ho = {
|
|
1183
1183
|
SLUG_ALREADY_USED: "This slug is already in use. Please choose a different one."
|
|
1184
1184
|
}, ar = () => {
|
|
1185
1185
|
var t;
|
|
1186
1186
|
const [e] = pn();
|
|
1187
1187
|
return ((t = e == null ? void 0 : e.flags) == null ? void 0 : t.revisions) ?? !1;
|
|
1188
|
-
},
|
|
1189
|
-
const e =
|
|
1188
|
+
}, nd = () => {
|
|
1189
|
+
const e = C(), t = X(), n = k(), { data: s } = Ve();
|
|
1190
1190
|
return re({
|
|
1191
1191
|
mutationFn: async (r) => await n(e, {
|
|
1192
1192
|
action: E.CREATE_PAGE,
|
|
@@ -1202,17 +1202,17 @@ const Gn = ({
|
|
|
1202
1202
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1203
1203
|
});
|
|
1204
1204
|
const i = a.template ? `Page created from "${a.template.name}" template` : a.hasSlug === !1 ? "New " + ((l = ce(s, { key: a.pageType })) == null ? void 0 : l.name) + " added successfully" : "New page added successfully";
|
|
1205
|
-
|
|
1205
|
+
O.success(i);
|
|
1206
1206
|
},
|
|
1207
1207
|
onError: (r, a) => {
|
|
1208
1208
|
const i = ce(s, { key: a.pageType });
|
|
1209
|
-
|
|
1210
|
-
description: Q(
|
|
1209
|
+
O.error(`Failed to add new ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1210
|
+
description: Q(Ho, r.message, r.message)
|
|
1211
1211
|
});
|
|
1212
1212
|
}
|
|
1213
1213
|
});
|
|
1214
|
-
},
|
|
1215
|
-
const e =
|
|
1214
|
+
}, sd = () => {
|
|
1215
|
+
const e = C(), t = X(), n = k(), { data: s } = Ge(), { data: r } = Ve();
|
|
1216
1216
|
return re({
|
|
1217
1217
|
mutationFn: async (a) => await n(e, {
|
|
1218
1218
|
action: E.UPDATE_PAGE,
|
|
@@ -1231,13 +1231,13 @@ const Gn = ({
|
|
|
1231
1231
|
},
|
|
1232
1232
|
onError: (a, i) => {
|
|
1233
1233
|
const l = ce(r, { key: i.pageType });
|
|
1234
|
-
|
|
1234
|
+
O.error(`Failed to update ${l != null && l.hasSlug ? "page" : l.name}.`, {
|
|
1235
1235
|
description: a.message
|
|
1236
1236
|
});
|
|
1237
1237
|
}
|
|
1238
1238
|
});
|
|
1239
|
-
},
|
|
1240
|
-
const e =
|
|
1239
|
+
}, rd = () => {
|
|
1240
|
+
const e = C(), t = X(), n = k(), { data: s } = Ve();
|
|
1241
1241
|
return re({
|
|
1242
1242
|
mutationFn: async (r) => n(e, {
|
|
1243
1243
|
action: E.DELETE_PAGE,
|
|
@@ -1245,7 +1245,7 @@ const Gn = ({
|
|
|
1245
1245
|
}),
|
|
1246
1246
|
onSuccess: (r, a) => {
|
|
1247
1247
|
if (r.code === "PAGE_LOCKED") {
|
|
1248
|
-
|
|
1248
|
+
O.error("Delete not allowed", {
|
|
1249
1249
|
description: "Page is currently being edited by another user."
|
|
1250
1250
|
});
|
|
1251
1251
|
return;
|
|
@@ -1260,13 +1260,13 @@ const Gn = ({
|
|
|
1260
1260
|
},
|
|
1261
1261
|
onError: (r, a) => {
|
|
1262
1262
|
const i = ce(s, { key: a.pageType });
|
|
1263
|
-
|
|
1263
|
+
O.error(`Failed to delete ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1264
1264
|
description: r.message
|
|
1265
1265
|
});
|
|
1266
1266
|
}
|
|
1267
1267
|
});
|
|
1268
|
-
},
|
|
1269
|
-
const e =
|
|
1268
|
+
}, ad = () => {
|
|
1269
|
+
const e = C(), t = k(), { data: n } = Ve(), { handleQuerySync: s } = Mt();
|
|
1270
1270
|
return re({
|
|
1271
1271
|
mutationFn: async (r) => t(e, {
|
|
1272
1272
|
action: E.TAKE_OFFLINE,
|
|
@@ -1282,19 +1282,19 @@ const Gn = ({
|
|
|
1282
1282
|
sync: !0
|
|
1283
1283
|
});
|
|
1284
1284
|
const i = ce(n, { key: a.pageType });
|
|
1285
|
-
|
|
1285
|
+
O.success(
|
|
1286
1286
|
i != null && i.hasSlug ? "Page unpublished successfully." : "New " + i.name + " added successfully."
|
|
1287
1287
|
);
|
|
1288
1288
|
},
|
|
1289
1289
|
onError: (r, a) => {
|
|
1290
1290
|
const i = ce(n, { key: a.pageType });
|
|
1291
|
-
|
|
1291
|
+
O.error(`Failed to take offline ${i != null && i.hasSlug ? "page" : i.name}.`, {
|
|
1292
1292
|
description: r.message
|
|
1293
1293
|
});
|
|
1294
1294
|
}
|
|
1295
1295
|
});
|
|
1296
1296
|
}, ir = () => {
|
|
1297
|
-
const e =
|
|
1297
|
+
const e = C(), t = k(), { savePageAsync: n } = Me(), s = ar(), { handleQuerySync: r } = Mt();
|
|
1298
1298
|
return re({
|
|
1299
1299
|
mutationFn: async ({ ids: a }) => (await n(), t(e, {
|
|
1300
1300
|
action: E.PUBLISH_CHANGES,
|
|
@@ -1308,11 +1308,11 @@ const Gn = ({
|
|
|
1308
1308
|
});
|
|
1309
1309
|
},
|
|
1310
1310
|
onError: (a) => {
|
|
1311
|
-
console.log(a),
|
|
1311
|
+
console.log(a), O.error("Failed to publish pages.");
|
|
1312
1312
|
}
|
|
1313
1313
|
});
|
|
1314
|
-
},
|
|
1315
|
-
const e =
|
|
1314
|
+
}, id = () => {
|
|
1315
|
+
const e = C(), t = k(), n = X();
|
|
1316
1316
|
return re({
|
|
1317
1317
|
mutationFn: async (s) => {
|
|
1318
1318
|
var r;
|
|
@@ -1330,14 +1330,14 @@ const Gn = ({
|
|
|
1330
1330
|
onSuccess: () => {
|
|
1331
1331
|
n.invalidateQueries({
|
|
1332
1332
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1333
|
-
}),
|
|
1333
|
+
}), O.success("Page marked as template successfully.");
|
|
1334
1334
|
},
|
|
1335
1335
|
onError: () => {
|
|
1336
|
-
|
|
1336
|
+
O.error("Failed to mark page as template.");
|
|
1337
1337
|
}
|
|
1338
1338
|
});
|
|
1339
|
-
},
|
|
1340
|
-
const e =
|
|
1339
|
+
}, od = () => {
|
|
1340
|
+
const e = C(), t = k(), n = X();
|
|
1341
1341
|
return re({
|
|
1342
1342
|
mutationFn: async (s) => t(e, {
|
|
1343
1343
|
action: E.UNMARK_AS_TEMPLATE,
|
|
@@ -1346,45 +1346,45 @@ const Gn = ({
|
|
|
1346
1346
|
onSuccess: () => {
|
|
1347
1347
|
n.invalidateQueries({
|
|
1348
1348
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1349
|
-
}),
|
|
1349
|
+
}), O.success("Page unmarked as template successfully.");
|
|
1350
1350
|
},
|
|
1351
1351
|
onError: () => {
|
|
1352
|
-
|
|
1352
|
+
O.error("Failed to unmark page as template.");
|
|
1353
1353
|
}
|
|
1354
1354
|
});
|
|
1355
|
-
},
|
|
1356
|
-
const e =
|
|
1355
|
+
}, ld = () => {
|
|
1356
|
+
const e = C(), t = k(), n = X();
|
|
1357
1357
|
return re({
|
|
1358
1358
|
mutationFn: async ({ id: s, slug: r }) => t(e, {
|
|
1359
1359
|
action: E.CHANGE_SLUG,
|
|
1360
1360
|
data: { id: s, slug: r }
|
|
1361
1361
|
}),
|
|
1362
1362
|
onSuccess: (s, { primaryPage: r }) => {
|
|
1363
|
-
|
|
1363
|
+
O.success("Slug changed successfully."), r ? n.invalidateQueries({
|
|
1364
1364
|
queryKey: [E.GET_LANGUAGE_PAGES, r]
|
|
1365
1365
|
}) : n.invalidateQueries({
|
|
1366
1366
|
queryKey: [E.GET_WEBSITE_PAGES]
|
|
1367
1367
|
});
|
|
1368
1368
|
},
|
|
1369
1369
|
onError: () => {
|
|
1370
|
-
|
|
1370
|
+
O.error("Failed to change slug");
|
|
1371
1371
|
}
|
|
1372
1372
|
});
|
|
1373
|
-
},
|
|
1374
|
-
function
|
|
1373
|
+
}, Ko = M(() => import("./publish-pages-content-KZVMHT6V.js"));
|
|
1374
|
+
function Vo({
|
|
1375
1375
|
showModal: e = !1,
|
|
1376
1376
|
onClose: t = () => console.log("Cancelled")
|
|
1377
1377
|
}) {
|
|
1378
1378
|
const { mutate: n, isPending: s } = ir();
|
|
1379
1379
|
return /* @__PURE__ */ o(zn, { open: e, onOpenChange: s ? () => {
|
|
1380
|
-
} : t, children: e && /* @__PURE__ */ o(Y, { fallback: /* @__PURE__ */ o("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ o(
|
|
1380
|
+
} : t, children: e && /* @__PURE__ */ o(Y, { fallback: /* @__PURE__ */ o("div", { className: "h-96 w-96 animate-pulse bg-gray-100" }), children: /* @__PURE__ */ o(Ko, { onClose: t, isPending: s, publishPage: n }) }) });
|
|
1381
1381
|
}
|
|
1382
|
-
const
|
|
1383
|
-
const [e] =
|
|
1382
|
+
const $o = () => {
|
|
1383
|
+
const [e] = Ea(), { data: t } = Ke();
|
|
1384
1384
|
return K(() => {
|
|
1385
1385
|
if (!t)
|
|
1386
1386
|
return { ids: [], names: [], partialBlocksInfo: [] };
|
|
1387
|
-
const s = Jn(e, (c) => c._type === "PartialBlock"), r =
|
|
1387
|
+
const s = Jn(e, (c) => c._type === "PartialBlock"), r = ja(At(s.map((c) => Q(c, "partialBlockId", "")))), a = At(
|
|
1388
1388
|
r.map((c) => {
|
|
1389
1389
|
const d = ce(t, { id: c });
|
|
1390
1390
|
if (!d) return null;
|
|
@@ -1405,16 +1405,16 @@ const Fo = () => {
|
|
|
1405
1405
|
), i = a.map((c) => c.id), l = a.map((c) => c.name);
|
|
1406
1406
|
return { ids: i, names: l, partialBlocksInfo: a };
|
|
1407
1407
|
}, [e, t]);
|
|
1408
|
-
},
|
|
1408
|
+
}, qo = (e) => {
|
|
1409
1409
|
const { fallbackLang: t } = Se(), { data: n } = He(), { data: s, isFetching: r } = yn(), a = j(() => {
|
|
1410
1410
|
const i = { [t]: !0 };
|
|
1411
|
-
return
|
|
1411
|
+
return za(Q(n, "languages"), (l) => {
|
|
1412
1412
|
const c = ce(s, { lang: l });
|
|
1413
1413
|
i[l] = !!c;
|
|
1414
1414
|
}), i;
|
|
1415
1415
|
}, [t, s, n]);
|
|
1416
1416
|
return r || Ee(e) || e && a[e];
|
|
1417
|
-
},
|
|
1417
|
+
}, Qo = () => {
|
|
1418
1418
|
const { data: e, isLoading: t } = He(), n = e == null ? void 0 : e.appChanges, s = n == null ? void 0 : n.includes("THEME"), r = n == null ? void 0 : n.includes("DESIGN_TOKENS");
|
|
1419
1419
|
return {
|
|
1420
1420
|
hasUnpublishedSettings: s || r,
|
|
@@ -1422,12 +1422,12 @@ const Fo = () => {
|
|
|
1422
1422
|
hasUnpublishedDesignToken: r,
|
|
1423
1423
|
isLoading: t
|
|
1424
1424
|
};
|
|
1425
|
-
},
|
|
1425
|
+
}, Wo = {
|
|
1426
1426
|
particleCount: 350,
|
|
1427
1427
|
spread: 120,
|
|
1428
1428
|
origin: { y: 0.6 },
|
|
1429
1429
|
angle: 90
|
|
1430
|
-
},
|
|
1430
|
+
}, jo = {
|
|
1431
1431
|
TOP_RIGHT: {
|
|
1432
1432
|
angle: 225,
|
|
1433
1433
|
origin: { x: 0.9, y: 0 }
|
|
@@ -1436,14 +1436,14 @@ const Fo = () => {
|
|
|
1436
1436
|
angle: 100,
|
|
1437
1437
|
origin: { x: 0.9, y: 0.9 }
|
|
1438
1438
|
}
|
|
1439
|
-
},
|
|
1439
|
+
}, zo = async () => {
|
|
1440
1440
|
const { default: e } = await import("canvas-confetti");
|
|
1441
1441
|
return e;
|
|
1442
1442
|
}, Wt = (e) => {
|
|
1443
|
-
let t =
|
|
1443
|
+
let t = jo[e];
|
|
1444
1444
|
t || (t = {});
|
|
1445
|
-
const n = { ...
|
|
1446
|
-
|
|
1445
|
+
const n = { ...Wo, ...t };
|
|
1446
|
+
zo().then((s) => s(n));
|
|
1447
1447
|
};
|
|
1448
1448
|
function Ht({
|
|
1449
1449
|
children: e,
|
|
@@ -1457,11 +1457,11 @@ function Ht({
|
|
|
1457
1457
|
/* @__PURE__ */ o(mn, { side: n, sideOffset: 10, children: /* @__PURE__ */ o("p", { children: t }) })
|
|
1458
1458
|
] }) }) : e;
|
|
1459
1459
|
}
|
|
1460
|
-
const
|
|
1461
|
-
() => import("./translation-warning-modal-
|
|
1462
|
-
),
|
|
1463
|
-
() => import("./unpublished-partials-modal-
|
|
1464
|
-
), Ps = M(() => import("./json-diff-viewer-
|
|
1460
|
+
const Yo = M(() => import("./unpublish-page-0fR1o0b7.js")), Jo = M(
|
|
1461
|
+
() => import("./translation-warning-modal-CzNt6LDO.js")
|
|
1462
|
+
), Zo = M(
|
|
1463
|
+
() => import("./unpublished-partials-modal-BhNAub_z.js")
|
|
1464
|
+
), Ps = M(() => import("./json-diff-viewer-DG6qMOBS.js")), Xo = () => {
|
|
1465
1465
|
const { t: e } = ue(), { selectedLang: t, fallbackLang: n } = Se(), s = ye("getPreviewUrl", async (g) => g), [r, a] = N(""), { data: i } = fe(), { data: l } = yn(), { data: c } = Ve(), d = j(
|
|
1466
1466
|
() => {
|
|
1467
1467
|
var g;
|
|
@@ -1483,26 +1483,26 @@ const Qo = M(() => import("./unpublish-page-BOEjCHLB.js")), Wo = M(
|
|
|
1483
1483
|
a("");
|
|
1484
1484
|
})();
|
|
1485
1485
|
}, [s, d, i == null ? void 0 : i.pageType, f, i == null ? void 0 : i.id, u]), /* @__PURE__ */ m(me, { children: [
|
|
1486
|
-
/* @__PURE__ */ o(Ht, { content: e("Open preview in new tab"), delayDuration: 0, children: /* @__PURE__ */ o("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ o(
|
|
1486
|
+
/* @__PURE__ */ o(Ht, { content: e("Open preview in new tab"), delayDuration: 0, children: /* @__PURE__ */ o("a", { href: r, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ o(x, { variant: "ghost", size: "sm", className: "gap-2", children: /* @__PURE__ */ o(di, { className: "h-4 w-4" }) }) }) }),
|
|
1487
1487
|
/* @__PURE__ */ o("div", { className: "h-4 w-px bg-gray-200" })
|
|
1488
1488
|
] });
|
|
1489
|
-
},
|
|
1490
|
-
const { t: e } = ue(), [t, n] =
|
|
1489
|
+
}, el = () => {
|
|
1490
|
+
const { t: e } = ue(), [t, n] = pa();
|
|
1491
1491
|
return /* @__PURE__ */ m(me, { children: [
|
|
1492
1492
|
/* @__PURE__ */ o(Ht, { content: e("Theme"), delayDuration: 0, children: /* @__PURE__ */ o(
|
|
1493
|
-
|
|
1493
|
+
x,
|
|
1494
1494
|
{
|
|
1495
1495
|
variant: t === "theme" ? "outline" : "ghost",
|
|
1496
1496
|
size: "icon",
|
|
1497
1497
|
className: "gap-2",
|
|
1498
1498
|
onClick: () => n(t === "theme" ? "block" : "theme"),
|
|
1499
|
-
children: /* @__PURE__ */ o(
|
|
1499
|
+
children: /* @__PURE__ */ o(ui, { className: "h-4 w-4" })
|
|
1500
1500
|
}
|
|
1501
1501
|
) }),
|
|
1502
1502
|
/* @__PURE__ */ o("div", { className: "h-4 w-px bg-gray-200" })
|
|
1503
1503
|
] });
|
|
1504
|
-
},
|
|
1505
|
-
const { t: e } = ue(), [t, n] = N(!1), { isLocked: s } =
|
|
1504
|
+
}, tl = () => {
|
|
1505
|
+
const { t: e } = ue(), [t, n] = N(!1), { isLocked: s } = Ce(), { savePageAsync: r, saveState: a } = Me();
|
|
1506
1506
|
J(() => {
|
|
1507
1507
|
const f = (u) => {
|
|
1508
1508
|
a === "UNSAVED" && (u.preventDefault(), u.returnValue = !1);
|
|
@@ -1518,7 +1518,7 @@ const Qo = M(() => import("./unpublish-page-BOEjCHLB.js")), Wo = M(
|
|
|
1518
1518
|
case "UNSAVED":
|
|
1519
1519
|
return {
|
|
1520
1520
|
tooltipContent: e("Save draft"),
|
|
1521
|
-
buttonIcon: /* @__PURE__ */ o(
|
|
1521
|
+
buttonIcon: /* @__PURE__ */ o(hi, { className: "h-4 w-4" }),
|
|
1522
1522
|
buttonClass: "gap-x-1"
|
|
1523
1523
|
};
|
|
1524
1524
|
case "SAVING":
|
|
@@ -1530,14 +1530,14 @@ const Qo = M(() => import("./unpublish-page-BOEjCHLB.js")), Wo = M(
|
|
|
1530
1530
|
case "SAVED":
|
|
1531
1531
|
return {
|
|
1532
1532
|
tooltipContent: e("Saved"),
|
|
1533
|
-
buttonIcon: /* @__PURE__ */ o(
|
|
1533
|
+
buttonIcon: /* @__PURE__ */ o(fi, { className: "h-4 w-4" }),
|
|
1534
1534
|
buttonClass: "text-green-500 gap-x-1"
|
|
1535
1535
|
};
|
|
1536
1536
|
}
|
|
1537
1537
|
}, [a, e]);
|
|
1538
|
-
return s ? null : /* @__PURE__ */ o(Ht, { content: d, children: /* @__PURE__ */ o(
|
|
1539
|
-
},
|
|
1540
|
-
const { t: e } = ue(), { selectedLang: t } = Se(), { data: n } = Ge(), s =
|
|
1538
|
+
return s ? null : /* @__PURE__ */ o(Ht, { content: d, children: /* @__PURE__ */ o(x, { size: "sm", variant: "ghost", onClick: i, className: `${c}`, children: l }) });
|
|
1539
|
+
}, nl = () => {
|
|
1540
|
+
const { t: e } = ue(), { selectedLang: t } = Se(), { data: n } = Ge(), s = $o(), [r, a] = N(!1), [i, l] = N(!1), [c, d] = N(null), [f, u] = N(!1), { savePageAsync: g } = Me(), [h, p] = N(!1), { hasUnpublishedSettings: _, hasUnpublishedTheme: I, hasUnpublishedDesignToken: y } = Qo(), [A, w] = N(!1), [F, V] = N([]), [D, Z] = N([]), [ee, H] = N(null), { data: T } = fe(), { mutate: b, isPending: R } = ir(), { needTranslations: q } = Me(), he = q(), { buttonText: gt, buttonClassName: _e, isPublished: Ae, hasUnpublishedChanges: Pe } = j(() => {
|
|
1541
1541
|
const ie = T && (T == null ? void 0 : T.online), ge = !Ee(T == null ? void 0 : T.changes);
|
|
1542
1542
|
let Vt = ie ? "hover:bg-green-600 bg-green-500" : "", os = e(ie ? "Published" : "Publish");
|
|
1543
1543
|
return ie && ge && (Vt = "hover:bg-blue-600 bg-blue-500", os = e("Publish")), {
|
|
@@ -1551,11 +1551,11 @@ const Qo = M(() => import("./unpublish-page-BOEjCHLB.js")), Wo = M(
|
|
|
1551
1551
|
p(!0);
|
|
1552
1552
|
return;
|
|
1553
1553
|
}
|
|
1554
|
-
|
|
1554
|
+
qe([n == null ? void 0 : n.id, n == null ? void 0 : n.primaryPage]);
|
|
1555
1555
|
}, wn = (ie) => {
|
|
1556
1556
|
const ge = [n == null ? void 0 : n.id, n == null ? void 0 : n.primaryPage, ...Array.isArray(ie) ? ie : []];
|
|
1557
1557
|
b({ ids: At(ge) }, { onSuccess: () => Wt("TOP_RIGHT") });
|
|
1558
|
-
},
|
|
1558
|
+
}, qe = K(
|
|
1559
1559
|
(ie) => {
|
|
1560
1560
|
const { ids: ge, partialBlocksInfo: Vt } = s();
|
|
1561
1561
|
ge.length > 0 ? (V(ge), Z(Vt), w(!0)) : b({ ids: At(ie) }, { onSuccess: () => Wt("TOP_RIGHT") });
|
|
@@ -1568,14 +1568,14 @@ const Qo = M(() => import("./unpublish-page-BOEjCHLB.js")), Wo = M(
|
|
|
1568
1568
|
}, Qe = K((ie, ge) => {
|
|
1569
1569
|
H({ id: ie, name: ge });
|
|
1570
1570
|
}, []), bn = () => {
|
|
1571
|
-
p(!1),
|
|
1571
|
+
p(!1), qe([n == null ? void 0 : n.id, n == null ? void 0 : n.primaryPage]);
|
|
1572
1572
|
}, In = async () => {
|
|
1573
1573
|
p(!1), await g();
|
|
1574
1574
|
};
|
|
1575
1575
|
return /* @__PURE__ */ m(me, { children: [
|
|
1576
1576
|
/* @__PURE__ */ m("div", { className: "flex", children: [
|
|
1577
1577
|
/* @__PURE__ */ m(
|
|
1578
|
-
|
|
1578
|
+
x,
|
|
1579
1579
|
{
|
|
1580
1580
|
size: "sm",
|
|
1581
1581
|
onClick: Pn,
|
|
@@ -1605,7 +1605,7 @@ const Qo = M(() => import("./unpublish-page-BOEjCHLB.js")), Wo = M(
|
|
|
1605
1605
|
),
|
|
1606
1606
|
/* @__PURE__ */ m(un, { children: [
|
|
1607
1607
|
/* @__PURE__ */ o(dn, { asChild: !0, children: /* @__PURE__ */ m(
|
|
1608
|
-
|
|
1608
|
+
x,
|
|
1609
1609
|
{
|
|
1610
1610
|
size: "sm",
|
|
1611
1611
|
disabled: R || !(T != null && T.id),
|
|
@@ -1630,7 +1630,7 @@ const Qo = M(() => import("./unpublish-page-BOEjCHLB.js")), Wo = M(
|
|
|
1630
1630
|
{
|
|
1631
1631
|
disabled: R,
|
|
1632
1632
|
className: "cursor-pointer text-xs",
|
|
1633
|
-
onClick: () =>
|
|
1633
|
+
onClick: () => qe([T == null ? void 0 : T.id]),
|
|
1634
1634
|
children: [
|
|
1635
1635
|
e("Publish"),
|
|
1636
1636
|
" page"
|
|
@@ -1638,13 +1638,13 @@ const Qo = M(() => import("./unpublish-page-BOEjCHLB.js")), Wo = M(
|
|
|
1638
1638
|
}
|
|
1639
1639
|
),
|
|
1640
1640
|
Ae && /* @__PURE__ */ m(Te, { onClick: () => d(n), className: "cursor-pointer text-xs", children: [
|
|
1641
|
-
/* @__PURE__ */ o(
|
|
1641
|
+
/* @__PURE__ */ o(gi, { className: "mr-0.5 h-3 w-3" }),
|
|
1642
1642
|
e("Unpublish"),
|
|
1643
1643
|
" page ",
|
|
1644
1644
|
t ? `(${hs(t)})` : ""
|
|
1645
1645
|
] }),
|
|
1646
1646
|
_ && /* @__PURE__ */ m(me, { children: [
|
|
1647
|
-
/* @__PURE__ */ o(
|
|
1647
|
+
/* @__PURE__ */ o(ya, { className: "bg-gray-200" }),
|
|
1648
1648
|
/* @__PURE__ */ o(ds, { className: "-mt-1 text-xs font-light text-gray-600", children: e("Unpublished website settings") })
|
|
1649
1649
|
] }),
|
|
1650
1650
|
I && /* @__PURE__ */ o(
|
|
@@ -1676,8 +1676,8 @@ const Qo = M(() => import("./unpublish-page-BOEjCHLB.js")), Wo = M(
|
|
|
1676
1676
|
] })
|
|
1677
1677
|
] })
|
|
1678
1678
|
] }),
|
|
1679
|
-
/* @__PURE__ */ o(
|
|
1680
|
-
c && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(
|
|
1679
|
+
/* @__PURE__ */ o(Vo, { showModal: r, onClose: () => a(!1) }),
|
|
1680
|
+
c && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(Yo, { page: c, onClose: () => d(null) }) }),
|
|
1681
1681
|
f && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(
|
|
1682
1682
|
Ps,
|
|
1683
1683
|
{
|
|
@@ -1690,7 +1690,7 @@ const Qo = M(() => import("./unpublish-page-BOEjCHLB.js")), Wo = M(
|
|
|
1690
1690
|
}
|
|
1691
1691
|
) }),
|
|
1692
1692
|
h && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(
|
|
1693
|
-
|
|
1693
|
+
Jo,
|
|
1694
1694
|
{
|
|
1695
1695
|
isOpen: h,
|
|
1696
1696
|
onClose: In,
|
|
@@ -1699,7 +1699,7 @@ const Qo = M(() => import("./unpublish-page-BOEjCHLB.js")), Wo = M(
|
|
|
1699
1699
|
}
|
|
1700
1700
|
) }),
|
|
1701
1701
|
A && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(
|
|
1702
|
-
|
|
1702
|
+
Zo,
|
|
1703
1703
|
{
|
|
1704
1704
|
isOpen: A,
|
|
1705
1705
|
onClose: ne,
|
|
@@ -1723,23 +1723,23 @@ const Qo = M(() => import("./unpublish-page-BOEjCHLB.js")), Wo = M(
|
|
|
1723
1723
|
}
|
|
1724
1724
|
) })
|
|
1725
1725
|
] });
|
|
1726
|
-
},
|
|
1727
|
-
const { t: e } = ue(), { data: t } = fe(), n =
|
|
1728
|
-
return (t == null ? void 0 : t.online) ? /* @__PURE__ */ o(Ht, { content: e("Open live page"), delayDuration: 0, children: /* @__PURE__ */ o("a", { href: n, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ o(
|
|
1726
|
+
}, sl = () => {
|
|
1727
|
+
const { t: e } = ue(), { data: t } = fe(), n = Wi();
|
|
1728
|
+
return (t == null ? void 0 : t.online) ? /* @__PURE__ */ o(Ht, { content: e("Open live page"), delayDuration: 0, children: /* @__PURE__ */ o("a", { href: n, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ o(x, { variant: "ghost", size: "icon", className: "ml-1 h-8 w-8", children: /* @__PURE__ */ o(mi, { className: "h-4 w-4" }) }) }) }) : null;
|
|
1729
1729
|
};
|
|
1730
|
-
function
|
|
1731
|
-
const { isLocked: e } =
|
|
1730
|
+
function rl() {
|
|
1731
|
+
const { isLocked: e } = Ce(), [t] = ve(), n = t.get("lang"), s = qo(n), r = ar();
|
|
1732
1732
|
return e || !s ? /* @__PURE__ */ o("div", {}) : /* @__PURE__ */ m("div", { className: "flex items-center justify-end gap-1", children: [
|
|
1733
|
-
r && /* @__PURE__ */ o(
|
|
1734
|
-
/* @__PURE__ */ o(Gn, { permission: be.EDIT_THEME, children: /* @__PURE__ */ o(
|
|
1735
|
-
/* @__PURE__ */ o(
|
|
1736
|
-
/* @__PURE__ */ o(Gn, { permission: be.SAVE_PAGE, children: /* @__PURE__ */ o(
|
|
1737
|
-
/* @__PURE__ */ o(Gn, { permission: be.PUBLISH_PAGE, children: /* @__PURE__ */ o(
|
|
1738
|
-
/* @__PURE__ */ o(
|
|
1733
|
+
r && /* @__PURE__ */ o(Fo, {}),
|
|
1734
|
+
/* @__PURE__ */ o(Gn, { permission: be.EDIT_THEME, children: /* @__PURE__ */ o(el, {}) }),
|
|
1735
|
+
/* @__PURE__ */ o(Xo, {}),
|
|
1736
|
+
/* @__PURE__ */ o(Gn, { permission: be.SAVE_PAGE, children: /* @__PURE__ */ o(tl, {}) }),
|
|
1737
|
+
/* @__PURE__ */ o(Gn, { permission: be.PUBLISH_PAGE, children: /* @__PURE__ */ o(nl, {}) }),
|
|
1738
|
+
/* @__PURE__ */ o(sl, {})
|
|
1739
1739
|
] });
|
|
1740
1740
|
}
|
|
1741
|
-
const
|
|
1742
|
-
const { t } = ue(), [n] = ve(), s = n.get("page"), { data: r, isFetching: a } = fe(), { data: i, isFetching: l } = Ke(), [c, d] = N(!1), [f, u] = N(!0), { savePage: g } = Me(), h = !!s && !Ee(r), { isLocked: p } =
|
|
1741
|
+
const al = M(() => import("./page-manager-new-ttsrxdW9.js")), il = ({ children: e }) => {
|
|
1742
|
+
const { t } = ue(), [n] = ve(), s = n.get("page"), { data: r, isFetching: a } = fe(), { data: i, isFetching: l } = Ke(), [c, d] = N(!1), [f, u] = N(!0), { savePage: g } = Me(), h = !!s && !Ee(r), { isLocked: p } = Ce();
|
|
1743
1743
|
J(() => {
|
|
1744
1744
|
!l && i && u(!1);
|
|
1745
1745
|
}, [l, i]);
|
|
@@ -1754,7 +1754,7 @@ const tl = M(() => import("./page-manager-new-zlobCGqL.js")), nl = ({ children:
|
|
|
1754
1754
|
p || g(), d(!0);
|
|
1755
1755
|
},
|
|
1756
1756
|
children: e || /* @__PURE__ */ m(
|
|
1757
|
-
|
|
1757
|
+
x,
|
|
1758
1758
|
{
|
|
1759
1759
|
variant: "ghost",
|
|
1760
1760
|
className: "flex w-full items-center justify-center rounded-md p-2 pl-0",
|
|
@@ -1776,48 +1776,48 @@ const tl = M(() => import("./page-manager-new-zlobCGqL.js")), nl = ({ children:
|
|
|
1776
1776
|
"aria-describedby": "pages-manager-description",
|
|
1777
1777
|
className: `z-50 !min-w-[50vh] !max-w-[800px] border-border p-0 ${h ? "" : "sheet-hide-close-btn"}`,
|
|
1778
1778
|
children: [
|
|
1779
|
-
/* @__PURE__ */ m(
|
|
1780
|
-
/* @__PURE__ */ m(
|
|
1779
|
+
/* @__PURE__ */ m(Aa, { className: "mb-3 px-4 pt-4", children: [
|
|
1780
|
+
/* @__PURE__ */ m(Ta, { className: "flex items-center gap-2 text-sm font-semibold", children: [
|
|
1781
1781
|
/* @__PURE__ */ o("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-primary text-primary-foreground", children: /* @__PURE__ */ o(ps, { className: "h-4 w-4" }) }),
|
|
1782
1782
|
/* @__PURE__ */ m("div", { className: "flex flex-col", children: [
|
|
1783
1783
|
/* @__PURE__ */ o("span", { className: "text-sm font-semibold", children: t("Pages") }),
|
|
1784
1784
|
/* @__PURE__ */ o("span", { id: "pages-manager-description", className: "text-xs font-normal text-muted-foreground", children: t("Manage your site structure") })
|
|
1785
1785
|
] })
|
|
1786
1786
|
] }),
|
|
1787
|
-
/* @__PURE__ */ o(
|
|
1787
|
+
/* @__PURE__ */ o(Sa, { className: "sr-only", children: t("Manage your site structure") })
|
|
1788
1788
|
] }),
|
|
1789
|
-
/* @__PURE__ */ o("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: y && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(
|
|
1789
|
+
/* @__PURE__ */ o("div", { className: "h-[calc(100vh-80px)] overflow-y-auto", children: y && /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(al, { close: () => d(!1) }) }) })
|
|
1790
1790
|
]
|
|
1791
1791
|
}
|
|
1792
1792
|
) })
|
|
1793
1793
|
] });
|
|
1794
|
-
},
|
|
1795
|
-
const { dynamicPage: e, allLangPages: t, isFetching: n } =
|
|
1794
|
+
}, ol = M(() => import("./dynamic-page-selector-DvNBXo6o.js")), ll = () => {
|
|
1795
|
+
const { dynamicPage: e, allLangPages: t, isFetching: n } = Vi(), s = t.length > 0;
|
|
1796
1796
|
return n ? null : /* @__PURE__ */ m("div", { className: "relative", children: [
|
|
1797
|
-
!e && /* @__PURE__ */ o(
|
|
1798
|
-
/* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(
|
|
1797
|
+
!e && /* @__PURE__ */ o(ko, { hasDynamicPage: s }),
|
|
1798
|
+
/* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(ol, {}) })
|
|
1799
1799
|
] });
|
|
1800
|
-
},
|
|
1801
|
-
const { isFetching: e } = Ge(), { data: t, isFetching: n } = fe(), s = Q(t, "dynamic", !1), r =
|
|
1800
|
+
}, cl = () => {
|
|
1801
|
+
const { isFetching: e } = Ge(), { data: t, isFetching: n } = fe(), s = Q(t, "dynamic", !1), r = Jr("dynamic-page-selector"), a = e || n;
|
|
1802
1802
|
return /* @__PURE__ */ m("div", { className: "relative flex items-center", children: [
|
|
1803
1803
|
/* @__PURE__ */ m("div", { className: "flex items-center", children: [
|
|
1804
|
-
/* @__PURE__ */ o("div", { className: tn("flex h-8 items-center", a && "max-w-0 overflow-hidden opacity-0"), children: /* @__PURE__ */ o(
|
|
1805
|
-
/* @__PURE__ */ o(
|
|
1806
|
-
/* @__PURE__ */ o("div", { className: tn("flex h-8 items-center", a && "max-w-0 overflow-hidden opacity-0"), children: /* @__PURE__ */ o(
|
|
1804
|
+
/* @__PURE__ */ o("div", { className: tn("flex h-8 items-center", a && "max-w-0 overflow-hidden opacity-0"), children: /* @__PURE__ */ o(il, {}) }),
|
|
1805
|
+
/* @__PURE__ */ o(Ei, { className: "mx-1 h-3 w-3 flex-shrink-0 text-gray-400" }),
|
|
1806
|
+
/* @__PURE__ */ o("div", { className: tn("flex h-8 items-center", a && "max-w-0 overflow-hidden opacity-0"), children: /* @__PURE__ */ o(Go, {}) })
|
|
1807
1807
|
] }),
|
|
1808
|
-
s && r && /* @__PURE__ */ o(
|
|
1808
|
+
s && r && /* @__PURE__ */ o(ll, {})
|
|
1809
1809
|
] });
|
|
1810
|
-
},
|
|
1810
|
+
}, ul = () => /* @__PURE__ */ m("div", { className: "grid h-full w-full grid-cols-3 items-center px-2", children: [
|
|
1811
1811
|
/* @__PURE__ */ m("div", { className: "flex justify-start", children: [
|
|
1812
|
-
/* @__PURE__ */ o(
|
|
1813
|
-
/* @__PURE__ */ o(
|
|
1812
|
+
/* @__PURE__ */ o(Uo, {}),
|
|
1813
|
+
/* @__PURE__ */ o(cl, {})
|
|
1814
1814
|
] }),
|
|
1815
|
-
/* @__PURE__ */ o("div", { className: "flex justify-center", children: /* @__PURE__ */ o(
|
|
1815
|
+
/* @__PURE__ */ o("div", { className: "flex justify-center", children: /* @__PURE__ */ o(Ui, {}) }),
|
|
1816
1816
|
/* @__PURE__ */ m("div", { className: "flex items-center justify-end", children: [
|
|
1817
|
-
/* @__PURE__ */ o(
|
|
1818
|
-
/* @__PURE__ */ o(
|
|
1817
|
+
/* @__PURE__ */ o(Ro, {}),
|
|
1818
|
+
/* @__PURE__ */ o(rl, {})
|
|
1819
1819
|
] })
|
|
1820
|
-
] }),
|
|
1820
|
+
] }), dl = () => {
|
|
1821
1821
|
const e = X(), { data: t } = de({
|
|
1822
1822
|
queryKey: [E.AI_CONTEXT],
|
|
1823
1823
|
initialData: "",
|
|
@@ -1830,8 +1830,8 @@ const tl = M(() => import("./page-manager-new-zlobCGqL.js")), nl = ({ children:
|
|
|
1830
1830
|
},
|
|
1831
1831
|
[e]
|
|
1832
1832
|
), aiContext: t };
|
|
1833
|
-
},
|
|
1834
|
-
const e =
|
|
1833
|
+
}, fl = () => {
|
|
1834
|
+
const e = C(), { aiContext: t } = dl(), n = k();
|
|
1835
1835
|
return K(
|
|
1836
1836
|
async (s, r, a, i) => n(e, {
|
|
1837
1837
|
action: E.ASK_AI,
|
|
@@ -1839,12 +1839,12 @@ const tl = M(() => import("./page-manager-new-zlobCGqL.js")), nl = ({ children:
|
|
|
1839
1839
|
}),
|
|
1840
1840
|
[e, t, n]
|
|
1841
1841
|
);
|
|
1842
|
-
},
|
|
1842
|
+
}, hl = (e) => j(() => {
|
|
1843
1843
|
if (!e || Ee(e)) return { blocks: [] };
|
|
1844
|
-
const t = Jn(e, (n) => !
|
|
1845
|
-
return { blocks:
|
|
1846
|
-
}, [e]),
|
|
1847
|
-
const [e] = ve(), t = e.get("page"), n =
|
|
1844
|
+
const t = Jn(e, (n) => !Ya(n == null ? void 0 : n._type, "@chai/"));
|
|
1845
|
+
return { blocks: Di(t) };
|
|
1846
|
+
}, [e]), gl = () => {
|
|
1847
|
+
const [e] = ve(), t = e.get("page"), n = C(), s = k(), r = X(), { data: a } = fe(), { data: i } = Ge(), l = ns(), c = ts();
|
|
1848
1848
|
return de({
|
|
1849
1849
|
queryKey: [E.GET_PAGE_ALL_DATA, t, i == null ? void 0 : i.id, c],
|
|
1850
1850
|
staleTime: 1 / 0,
|
|
@@ -1875,8 +1875,8 @@ const tl = M(() => import("./page-manager-new-zlobCGqL.js")), nl = ({ children:
|
|
|
1875
1875
|
},
|
|
1876
1876
|
enabled: !!t && !!(a != null && a.pageType) && !!(i != null && i.id)
|
|
1877
1877
|
});
|
|
1878
|
-
},
|
|
1879
|
-
const e =
|
|
1878
|
+
}, ml = () => {
|
|
1879
|
+
const e = C(), t = k(), { handleQuerySync: n } = Mt();
|
|
1880
1880
|
return re({
|
|
1881
1881
|
mutationFn: async (s) => t(e, {
|
|
1882
1882
|
action: E.UPDATE_WEBSITE_FIELDS,
|
|
@@ -1890,94 +1890,94 @@ const tl = M(() => import("./page-manager-new-zlobCGqL.js")), nl = ({ children:
|
|
|
1890
1890
|
});
|
|
1891
1891
|
},
|
|
1892
1892
|
onError: (s) => {
|
|
1893
|
-
|
|
1893
|
+
O.error("Failed to update website settings", {
|
|
1894
1894
|
description: s.message
|
|
1895
1895
|
});
|
|
1896
1896
|
}
|
|
1897
1897
|
});
|
|
1898
|
-
},
|
|
1899
|
-
const e =
|
|
1898
|
+
}, cd = () => {
|
|
1899
|
+
const e = C(), t = X(), n = k(), { selectedLang: s } = Se();
|
|
1900
1900
|
return re({
|
|
1901
1901
|
mutationFn: async (r) => n(e, { action: E.ADD_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1902
1902
|
onSuccess: () => {
|
|
1903
1903
|
t.invalidateQueries({
|
|
1904
1904
|
queryKey: [E.GET_GLOBAL_JSONLD_ITEMS]
|
|
1905
|
-
}),
|
|
1905
|
+
}), O.success("Schema added successfully.");
|
|
1906
1906
|
},
|
|
1907
1907
|
onError: (r) => {
|
|
1908
|
-
|
|
1908
|
+
O.error("Failed to add schema", {
|
|
1909
1909
|
description: r.message
|
|
1910
1910
|
});
|
|
1911
1911
|
}
|
|
1912
1912
|
});
|
|
1913
|
-
},
|
|
1914
|
-
const e =
|
|
1913
|
+
}, ud = () => {
|
|
1914
|
+
const e = C(), t = X(), n = k(), { selectedLang: s } = Se();
|
|
1915
1915
|
return re({
|
|
1916
1916
|
mutationFn: async (r) => n(e, { action: E.UPDATE_GLOBAL_SCHEMA, data: { ...r, lang: s } }),
|
|
1917
1917
|
onSuccess: () => {
|
|
1918
1918
|
t.invalidateQueries({
|
|
1919
1919
|
queryKey: [E.GET_GLOBAL_JSONLD_ITEMS]
|
|
1920
|
-
}),
|
|
1920
|
+
}), O.success("Schema updated successfully.");
|
|
1921
1921
|
},
|
|
1922
1922
|
onError: (r) => {
|
|
1923
|
-
|
|
1923
|
+
O.error("Failed to update schema", {
|
|
1924
1924
|
description: r.message
|
|
1925
1925
|
});
|
|
1926
1926
|
}
|
|
1927
1927
|
});
|
|
1928
|
-
},
|
|
1929
|
-
const e =
|
|
1928
|
+
}, dd = () => {
|
|
1929
|
+
const e = C(), t = X(), n = k();
|
|
1930
1930
|
return re({
|
|
1931
1931
|
mutationFn: async (s) => n(e, { action: E.DELETE_GLOBAL_SCHEMA, data: { id: s } }),
|
|
1932
1932
|
onSuccess: () => {
|
|
1933
1933
|
t.invalidateQueries({
|
|
1934
1934
|
queryKey: [E.GET_GLOBAL_JSONLD_ITEMS]
|
|
1935
|
-
}),
|
|
1935
|
+
}), O.success("Schema deleted successfully.");
|
|
1936
1936
|
},
|
|
1937
1937
|
onError: (s) => {
|
|
1938
|
-
|
|
1938
|
+
O.error("Failed to delete schema", {
|
|
1939
1939
|
description: s.message
|
|
1940
1940
|
});
|
|
1941
1941
|
}
|
|
1942
1942
|
});
|
|
1943
|
-
},
|
|
1944
|
-
const e =
|
|
1943
|
+
}, fd = () => {
|
|
1944
|
+
const e = C(), t = k();
|
|
1945
1945
|
return re({
|
|
1946
1946
|
mutationFn: async (n) => t(e, { action: E.TOGGLE_PAGE_GLOBAL_SCHEMA, data: n }),
|
|
1947
1947
|
onError: (n) => {
|
|
1948
|
-
|
|
1948
|
+
O.error("Failed to toggle schema", {
|
|
1949
1949
|
description: n.message
|
|
1950
1950
|
});
|
|
1951
1951
|
}
|
|
1952
1952
|
});
|
|
1953
|
-
},
|
|
1954
|
-
const e =
|
|
1953
|
+
}, hd = () => {
|
|
1954
|
+
const e = C(), t = k();
|
|
1955
1955
|
return re({
|
|
1956
1956
|
mutationFn: async (n) => t(e, { action: E.APPLY_SCHEMA_TO_ALL_PAGES, data: { schemaId: n } }),
|
|
1957
1957
|
onSuccess: (n) => {
|
|
1958
|
-
|
|
1958
|
+
O.success(`Schema applied to ${n.count} page(s)`);
|
|
1959
1959
|
},
|
|
1960
1960
|
onError: (n) => {
|
|
1961
|
-
|
|
1961
|
+
O.error("Failed to apply schema to all pages", {
|
|
1962
1962
|
description: n.message
|
|
1963
1963
|
});
|
|
1964
1964
|
}
|
|
1965
1965
|
});
|
|
1966
|
-
},
|
|
1967
|
-
const e =
|
|
1966
|
+
}, gd = () => {
|
|
1967
|
+
const e = C(), t = k();
|
|
1968
1968
|
return re({
|
|
1969
1969
|
mutationFn: async (n) => t(e, { action: E.REMOVE_SCHEMA_FROM_ALL_PAGES, data: { schemaId: n } }),
|
|
1970
1970
|
onSuccess: (n) => {
|
|
1971
|
-
|
|
1971
|
+
O.success(`Schema removed from ${n.count} page(s)`);
|
|
1972
1972
|
},
|
|
1973
1973
|
onError: (n) => {
|
|
1974
|
-
|
|
1974
|
+
O.error("Failed to remove schema from all pages", {
|
|
1975
1975
|
description: n.message
|
|
1976
1976
|
});
|
|
1977
1977
|
}
|
|
1978
1978
|
});
|
|
1979
1979
|
}, or = (e = 300) => {
|
|
1980
|
-
const t = ye("onLogout", En), n = ye("getAccessToken"), s =
|
|
1980
|
+
const t = ye("onLogout", En), n = ye("getAccessToken"), s = C();
|
|
1981
1981
|
return de({
|
|
1982
1982
|
queryKey: ["check-user-access"],
|
|
1983
1983
|
queryFn: async () => {
|
|
@@ -1987,15 +1987,15 @@ const tl = M(() => import("./page-manager-new-zlobCGqL.js")), nl = ({ children:
|
|
|
1987
1987
|
{ Authorization: `Bearer ${r}` }
|
|
1988
1988
|
);
|
|
1989
1989
|
if (i.status === 401)
|
|
1990
|
-
throw console.log("401 Response", i),
|
|
1990
|
+
throw console.log("401 Response", i), O.error("You do not have access to edit this website. Please contact administrator"), await t("UNAUTHORIZED"), new Error("Unauthorized");
|
|
1991
1991
|
return await i.json();
|
|
1992
1992
|
},
|
|
1993
1993
|
refetchInterval: e * 1e3,
|
|
1994
1994
|
refetchIntervalInBackground: !0,
|
|
1995
1995
|
retry: !1
|
|
1996
1996
|
});
|
|
1997
|
-
},
|
|
1998
|
-
const e =
|
|
1997
|
+
}, El = () => {
|
|
1998
|
+
const e = C(), t = k(), [, n] = Qi(), s = X(), { handleQuerySync: r } = Mt();
|
|
1999
1999
|
return { onSave: async ({
|
|
2000
2000
|
page: i,
|
|
2001
2001
|
blocks: l,
|
|
@@ -2026,15 +2026,15 @@ const tl = M(() => import("./page-manager-new-zlobCGqL.js")), nl = ({ children:
|
|
|
2026
2026
|
return console.error(g), new Error("Failed to save blocks");
|
|
2027
2027
|
}
|
|
2028
2028
|
} };
|
|
2029
|
-
},
|
|
2030
|
-
const { data: e } = Ke(), t =
|
|
2029
|
+
}, pl = () => {
|
|
2030
|
+
const { data: e } = Ke(), t = C(), n = k();
|
|
2031
2031
|
return {
|
|
2032
2032
|
getPartialBlocks: K(async () => {
|
|
2033
2033
|
const s = {};
|
|
2034
2034
|
for (const r of e ?? [])
|
|
2035
2035
|
Ee(r == null ? void 0 : r.slug) && (s[r.id] = {
|
|
2036
2036
|
type: r.pageType,
|
|
2037
|
-
name:
|
|
2037
|
+
name: Ja(r.name ?? r.slug),
|
|
2038
2038
|
description: ""
|
|
2039
2039
|
});
|
|
2040
2040
|
return s;
|
|
@@ -2055,7 +2055,7 @@ const tl = M(() => import("./page-manager-new-zlobCGqL.js")), nl = ({ children:
|
|
|
2055
2055
|
[n, t]
|
|
2056
2056
|
)
|
|
2057
2057
|
};
|
|
2058
|
-
},
|
|
2058
|
+
}, yl = M(() => Promise.resolve().then(() => Du)), lr = "chai-chat-panel", Al = ({ className: e = "h-full w-full" }) => /* @__PURE__ */ m("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", version: "1.1", className: e, children: [
|
|
2059
2059
|
/* @__PURE__ */ o("title", { children: "ai" }),
|
|
2060
2060
|
/* @__PURE__ */ o("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ o("g", { id: "icon", fill: "currentColor", transform: "translate(64.000000, 64.000000)", children: /* @__PURE__ */ o(
|
|
2061
2061
|
"path",
|
|
@@ -2064,26 +2064,26 @@ const tl = M(() => import("./page-manager-new-zlobCGqL.js")), nl = ({ children:
|
|
|
2064
2064
|
id: "Combined-Shape"
|
|
2065
2065
|
}
|
|
2066
2066
|
) }) })
|
|
2067
|
-
] }),
|
|
2067
|
+
] }), Tl = ({ isActive: e, show: t }) => Rn("flags.ai", !1) ? /* @__PURE__ */ o(x, { size: "icon", className: "p-0 [&_svg]:size-6", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ o(Al, { className: e ? "h-5 w-5 text-white" : "h-5 w-5 text-primary" }) }) : null, Sl = {
|
|
2068
2068
|
id: lr,
|
|
2069
2069
|
label: "AI Assistant",
|
|
2070
|
-
button:
|
|
2071
|
-
panel:
|
|
2070
|
+
button: Tl,
|
|
2071
|
+
panel: () => /* @__PURE__ */ o(yl, { onSuccess: console.log, onError: console.log, onComplete: console.log }),
|
|
2072
2072
|
position: "top"
|
|
2073
|
-
},
|
|
2073
|
+
}, _l = M(() => import("./lang-panel-B3USOxGq.js")), Pl = ({ isActive: e, show: t }) => {
|
|
2074
2074
|
const { data: n } = He();
|
|
2075
|
-
return !Zn(n, "languages") || !Q(n, "languages", []).length ? null : /* @__PURE__ */ o(
|
|
2076
|
-
}, cr = "lang",
|
|
2075
|
+
return !Zn(n, "languages") || !Q(n, "languages", []).length ? null : /* @__PURE__ */ o(x, { size: "sm", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ o(pi, { className: "h-4 w-4" }) });
|
|
2076
|
+
}, cr = "lang", wl = {
|
|
2077
2077
|
id: cr,
|
|
2078
2078
|
label: "Languages",
|
|
2079
2079
|
position: "top",
|
|
2080
|
-
panel:
|
|
2081
|
-
button:
|
|
2080
|
+
panel: _l,
|
|
2081
|
+
button: Pl,
|
|
2082
2082
|
view: "modal",
|
|
2083
2083
|
width: 400
|
|
2084
|
-
},
|
|
2085
|
-
const { data: n } = fe(), s =
|
|
2086
|
-
return !Zn(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ o(
|
|
2084
|
+
}, bl = M(() => import("./seo-panel-Br8gxDxu.js")), ur = "seo", Il = ({ isActive: e, show: t }) => {
|
|
2085
|
+
const { data: n } = fe(), s = ji(n == null ? void 0 : n.pageType);
|
|
2086
|
+
return !Zn(s, "hasSlug") || !s.hasSlug ? null : /* @__PURE__ */ o(x, { size: "icon", className: "my-1 p-0", onClick: t, variant: e ? "default" : "ghost", children: /* @__PURE__ */ m(
|
|
2087
2087
|
"svg",
|
|
2088
2088
|
{
|
|
2089
2089
|
stroke: "currentColor",
|
|
@@ -2101,45 +2101,45 @@ const tl = M(() => import("./page-manager-new-zlobCGqL.js")), nl = ({ children:
|
|
|
2101
2101
|
]
|
|
2102
2102
|
}
|
|
2103
2103
|
) });
|
|
2104
|
-
},
|
|
2104
|
+
}, Nl = {
|
|
2105
2105
|
id: ur,
|
|
2106
2106
|
label: "SEO",
|
|
2107
|
-
panel:
|
|
2108
|
-
button:
|
|
2107
|
+
panel: bl,
|
|
2108
|
+
button: Il,
|
|
2109
2109
|
position: "top",
|
|
2110
2110
|
width: 600,
|
|
2111
2111
|
view: "modal"
|
|
2112
|
-
},
|
|
2113
|
-
() => import("./change-password-modal-
|
|
2114
|
-
), dr = "user-info",
|
|
2112
|
+
}, vl = M(
|
|
2113
|
+
() => import("./change-password-modal-CdvJR1Ln.js").then((e) => ({ default: e.ChangePasswordModal }))
|
|
2114
|
+
), dr = "user-info", Cl = () => {
|
|
2115
2115
|
const { t: e } = ue(), { user: t, logout: n } = ss(), s = ye("onLogout", En), [r, a] = N(!1);
|
|
2116
|
-
return t ? /* @__PURE__ */ m(
|
|
2117
|
-
/* @__PURE__ */ o(
|
|
2118
|
-
/* @__PURE__ */ m(
|
|
2116
|
+
return t ? /* @__PURE__ */ m(_a, { children: [
|
|
2117
|
+
/* @__PURE__ */ o(Pa, { asChild: !0, children: /* @__PURE__ */ o(x, { variant: "ghost", className: "text-sm font-medium", children: /* @__PURE__ */ o(yi, { className: "h-4 w-4" }) }) }),
|
|
2118
|
+
/* @__PURE__ */ m(wa, { className: "w-auto space-y-2 p-4", children: [
|
|
2119
2119
|
/* @__PURE__ */ o("div", { className: "text-sm font-medium", children: t.name ?? t.email }),
|
|
2120
2120
|
/* @__PURE__ */ o("div", { className: "text-xs text-muted-foreground", children: t.email }),
|
|
2121
|
-
/* @__PURE__ */ o(
|
|
2121
|
+
/* @__PURE__ */ o(x, { variant: "outline", size: "sm", className: "w-full", onClick: () => a(!0), children: e("Change Password") }),
|
|
2122
2122
|
r && /* @__PURE__ */ o(
|
|
2123
2123
|
Y,
|
|
2124
2124
|
{
|
|
2125
|
-
fallback: /* @__PURE__ */ o(zn, { open: r, onOpenChange: a, children: /* @__PURE__ */ o(
|
|
2126
|
-
children: /* @__PURE__ */ o(
|
|
2125
|
+
fallback: /* @__PURE__ */ o(zn, { open: r, onOpenChange: a, children: /* @__PURE__ */ o($s, { className: "sm:max-w-[425px]", children: /* @__PURE__ */ o("div", { className: "flex h-[340px] items-center justify-center", children: /* @__PURE__ */ o(Fe, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }) }) }),
|
|
2126
|
+
children: /* @__PURE__ */ o(vl, { open: r, onOpenChange: a })
|
|
2127
2127
|
}
|
|
2128
2128
|
),
|
|
2129
|
-
/* @__PURE__ */ m(
|
|
2130
|
-
/* @__PURE__ */ o(
|
|
2131
|
-
/* @__PURE__ */ m(
|
|
2132
|
-
/* @__PURE__ */ m(
|
|
2133
|
-
/* @__PURE__ */ o(
|
|
2129
|
+
/* @__PURE__ */ m(ba, { children: [
|
|
2130
|
+
/* @__PURE__ */ o(Ia, { asChild: !0, children: /* @__PURE__ */ o(x, { variant: "outline", size: "sm", className: "w-full", children: e("Logout") }) }),
|
|
2131
|
+
/* @__PURE__ */ m(Na, { children: [
|
|
2132
|
+
/* @__PURE__ */ m(va, { children: [
|
|
2133
|
+
/* @__PURE__ */ o(Ca, { children: e("Are you sure you want to logout?") }),
|
|
2134
2134
|
/* @__PURE__ */ o(La, { children: e("You will be redirected to the login page.") })
|
|
2135
2135
|
] }),
|
|
2136
|
-
/* @__PURE__ */ m(
|
|
2137
|
-
/* @__PURE__ */ o(
|
|
2136
|
+
/* @__PURE__ */ m(Ga, { children: [
|
|
2137
|
+
/* @__PURE__ */ o(ka, { children: e("Cancel") }),
|
|
2138
2138
|
/* @__PURE__ */ o(
|
|
2139
|
-
|
|
2139
|
+
Da,
|
|
2140
2140
|
{
|
|
2141
2141
|
onClick: () => {
|
|
2142
|
-
n(),
|
|
2142
|
+
n(), Za(s) && s();
|
|
2143
2143
|
},
|
|
2144
2144
|
children: e("Logout")
|
|
2145
2145
|
}
|
|
@@ -2149,13 +2149,13 @@ const tl = M(() => import("./page-manager-new-zlobCGqL.js")), nl = ({ children:
|
|
|
2149
2149
|
] })
|
|
2150
2150
|
] })
|
|
2151
2151
|
] }) : null;
|
|
2152
|
-
},
|
|
2152
|
+
}, Ll = {
|
|
2153
2153
|
id: dr,
|
|
2154
2154
|
label: "User Info",
|
|
2155
|
-
button:
|
|
2155
|
+
button: Cl,
|
|
2156
2156
|
position: "bottom"
|
|
2157
|
-
},
|
|
2158
|
-
|
|
2157
|
+
}, Gl = () => {
|
|
2158
|
+
$t(ur, Nl), $t(cr, wl), $t(dr, Ll), $t(lr, Sl);
|
|
2159
2159
|
};
|
|
2160
2160
|
var P = {
|
|
2161
2161
|
context: void 0,
|
|
@@ -2176,29 +2176,29 @@ function ws(e) {
|
|
|
2176
2176
|
function Et(e) {
|
|
2177
2177
|
P.context = e;
|
|
2178
2178
|
}
|
|
2179
|
-
var fr = !1,
|
|
2180
|
-
equals:
|
|
2179
|
+
var fr = !1, kl = (e, t) => e === t, sn = Symbol("solid-proxy"), hr = typeof Proxy == "function", gr = Symbol("solid-track"), rn = {
|
|
2180
|
+
equals: kl
|
|
2181
2181
|
}, mr = _r, ke = 1, an = 2, Er = {
|
|
2182
2182
|
owned: null,
|
|
2183
2183
|
cleanups: null,
|
|
2184
2184
|
context: null,
|
|
2185
2185
|
owner: null
|
|
2186
|
-
}, kn = {},
|
|
2186
|
+
}, kn = {}, L = null, Dn = null, Dl = null, U = null, ae = null, Le = null, Tn = 0;
|
|
2187
2187
|
function Ue(e, t) {
|
|
2188
|
-
const n = U, s =
|
|
2188
|
+
const n = U, s = L, r = e.length === 0, a = t === void 0 ? s : t, i = r ? Er : {
|
|
2189
2189
|
owned: null,
|
|
2190
2190
|
cleanups: null,
|
|
2191
2191
|
context: a ? a.context : null,
|
|
2192
2192
|
owner: a
|
|
2193
2193
|
}, l = r ? e : () => e(() => se(() => _t(i)));
|
|
2194
|
-
|
|
2194
|
+
L = i, U = null;
|
|
2195
2195
|
try {
|
|
2196
2196
|
return Ie(l, !0);
|
|
2197
2197
|
} finally {
|
|
2198
|
-
U = n,
|
|
2198
|
+
U = n, L = s;
|
|
2199
2199
|
}
|
|
2200
2200
|
}
|
|
2201
|
-
function
|
|
2201
|
+
function $(e, t) {
|
|
2202
2202
|
t = t ? Object.assign({}, rn, t) : rn;
|
|
2203
2203
|
const n = {
|
|
2204
2204
|
value: e,
|
|
@@ -2208,7 +2208,7 @@ function q(e, t) {
|
|
|
2208
2208
|
}, s = (r) => (typeof r == "function" && (r = r(n.value)), Sr(n, r));
|
|
2209
2209
|
return [Tr.bind(n), s];
|
|
2210
2210
|
}
|
|
2211
|
-
function
|
|
2211
|
+
function xl(e, t, n) {
|
|
2212
2212
|
const s = Sn(e, t, !0, ke);
|
|
2213
2213
|
ht(s);
|
|
2214
2214
|
}
|
|
@@ -2217,28 +2217,28 @@ function Be(e, t, n) {
|
|
|
2217
2217
|
ht(s);
|
|
2218
2218
|
}
|
|
2219
2219
|
function pr(e, t, n) {
|
|
2220
|
-
mr =
|
|
2220
|
+
mr = Vl;
|
|
2221
2221
|
const s = Sn(e, t, !1, ke);
|
|
2222
|
-
(!n || !n.render) && (s.user = !0),
|
|
2222
|
+
(!n || !n.render) && (s.user = !0), Le ? Le.push(s) : ht(s);
|
|
2223
2223
|
}
|
|
2224
2224
|
function te(e, t, n) {
|
|
2225
2225
|
n = n ? Object.assign({}, rn, n) : rn;
|
|
2226
2226
|
const s = Sn(e, t, !0, 0);
|
|
2227
2227
|
return s.observers = null, s.observerSlots = null, s.comparator = n.equals || void 0, ht(s), Tr.bind(s);
|
|
2228
2228
|
}
|
|
2229
|
-
function
|
|
2229
|
+
function Ol(e) {
|
|
2230
2230
|
return e && typeof e == "object" && "then" in e;
|
|
2231
2231
|
}
|
|
2232
|
-
function
|
|
2232
|
+
function Rl(e, t, n) {
|
|
2233
2233
|
let s, r, a;
|
|
2234
2234
|
s = !0, r = e, a = {};
|
|
2235
2235
|
let i = null, l = kn, c = null, d = !1, f = "initialValue" in a, u = typeof s == "function" && te(s);
|
|
2236
|
-
const g = /* @__PURE__ */ new Set(), [h, p] = (a.storage ||
|
|
2236
|
+
const g = /* @__PURE__ */ new Set(), [h, p] = (a.storage || $)(a.initialValue), [_, I] = $(void 0), [y, A] = $(void 0, {
|
|
2237
2237
|
equals: !1
|
|
2238
|
-
}), [w, F] =
|
|
2238
|
+
}), [w, F] = $(f ? "ready" : "unresolved");
|
|
2239
2239
|
P.context && (c = P.getNextContextId(), a.ssrLoadFrom === "initial" ? l = a.initialValue : P.load && P.has(c) && (l = P.load(c)));
|
|
2240
|
-
function V(T, b, R,
|
|
2241
|
-
return i === T && (i = null,
|
|
2240
|
+
function V(T, b, R, q) {
|
|
2241
|
+
return i === T && (i = null, q !== void 0 && (f = !0), (T === l || b === l) && a.onHydrated && queueMicrotask(() => a.onHydrated(q, {
|
|
2242
2242
|
value: b
|
|
2243
2243
|
})), l = kn, D(b, R)), b;
|
|
2244
2244
|
}
|
|
@@ -2250,7 +2250,7 @@ function kl(e, t, n) {
|
|
|
2250
2250
|
}, !1);
|
|
2251
2251
|
}
|
|
2252
2252
|
function Z() {
|
|
2253
|
-
const T =
|
|
2253
|
+
const T = Fl, b = h(), R = _();
|
|
2254
2254
|
if (R !== void 0 && !i) throw R;
|
|
2255
2255
|
return U && U.user, b;
|
|
2256
2256
|
}
|
|
@@ -2263,7 +2263,7 @@ function kl(e, t, n) {
|
|
|
2263
2263
|
return;
|
|
2264
2264
|
}
|
|
2265
2265
|
let R;
|
|
2266
|
-
const
|
|
2266
|
+
const q = l !== kn ? l : se(() => {
|
|
2267
2267
|
try {
|
|
2268
2268
|
return r(b, {
|
|
2269
2269
|
value: h(),
|
|
@@ -2276,11 +2276,11 @@ function kl(e, t, n) {
|
|
|
2276
2276
|
if (R !== void 0) {
|
|
2277
2277
|
V(i, void 0, Xt(R), b);
|
|
2278
2278
|
return;
|
|
2279
|
-
} else if (!
|
|
2280
|
-
return V(i,
|
|
2281
|
-
return i =
|
|
2279
|
+
} else if (!Ol(q))
|
|
2280
|
+
return V(i, q, void 0, b), q;
|
|
2281
|
+
return i = q, "v" in q ? (q.s === 1 ? V(i, q.v, void 0, b) : V(i, void 0, Xt(q.v), b), q) : (d = !0, queueMicrotask(() => d = !1), Ie(() => {
|
|
2282
2282
|
F(f ? "refreshing" : "pending"), A();
|
|
2283
|
-
}, !1),
|
|
2283
|
+
}, !1), q.then((he) => V(q, he, void 0, b), (he) => V(q, void 0, Xt(he), b)));
|
|
2284
2284
|
}
|
|
2285
2285
|
Object.defineProperties(Z, {
|
|
2286
2286
|
state: {
|
|
@@ -2304,13 +2304,13 @@ function kl(e, t, n) {
|
|
|
2304
2304
|
}
|
|
2305
2305
|
}
|
|
2306
2306
|
});
|
|
2307
|
-
let H =
|
|
2308
|
-
return u ?
|
|
2307
|
+
let H = L;
|
|
2308
|
+
return u ? xl(() => (H = L, ee(!1))) : ee(!1), [Z, {
|
|
2309
2309
|
refetch: (T) => yr(H, () => ee(T)),
|
|
2310
2310
|
mutate: p
|
|
2311
2311
|
}];
|
|
2312
2312
|
}
|
|
2313
|
-
function
|
|
2313
|
+
function md(e) {
|
|
2314
2314
|
return Ie(e, !1);
|
|
2315
2315
|
}
|
|
2316
2316
|
function se(e) {
|
|
@@ -2323,7 +2323,7 @@ function se(e) {
|
|
|
2323
2323
|
U = t;
|
|
2324
2324
|
}
|
|
2325
2325
|
}
|
|
2326
|
-
function
|
|
2326
|
+
function Ed(e, t, n) {
|
|
2327
2327
|
const s = Array.isArray(e);
|
|
2328
2328
|
let r, a = n && n.defer;
|
|
2329
2329
|
return (i) => {
|
|
@@ -2338,49 +2338,49 @@ function cd(e, t, n) {
|
|
|
2338
2338
|
return r = l, c;
|
|
2339
2339
|
};
|
|
2340
2340
|
}
|
|
2341
|
-
function
|
|
2341
|
+
function Ul(e) {
|
|
2342
2342
|
pr(() => se(e));
|
|
2343
2343
|
}
|
|
2344
2344
|
function St(e) {
|
|
2345
|
-
return
|
|
2345
|
+
return L === null || (L.cleanups === null ? L.cleanups = [e] : L.cleanups.push(e)), e;
|
|
2346
2346
|
}
|
|
2347
2347
|
function bs() {
|
|
2348
|
-
return
|
|
2348
|
+
return L;
|
|
2349
2349
|
}
|
|
2350
2350
|
function yr(e, t) {
|
|
2351
|
-
const n =
|
|
2352
|
-
|
|
2351
|
+
const n = L, s = U;
|
|
2352
|
+
L = e, U = null;
|
|
2353
2353
|
try {
|
|
2354
2354
|
return Ie(t, !0);
|
|
2355
2355
|
} catch (r) {
|
|
2356
2356
|
as(r);
|
|
2357
2357
|
} finally {
|
|
2358
|
-
|
|
2358
|
+
L = n, U = s;
|
|
2359
2359
|
}
|
|
2360
2360
|
}
|
|
2361
|
-
function
|
|
2362
|
-
const t = U, n =
|
|
2361
|
+
function Bl(e) {
|
|
2362
|
+
const t = U, n = L;
|
|
2363
2363
|
return Promise.resolve().then(() => {
|
|
2364
|
-
U = t,
|
|
2364
|
+
U = t, L = n;
|
|
2365
2365
|
let s;
|
|
2366
|
-
return Ie(e, !1), U =
|
|
2366
|
+
return Ie(e, !1), U = L = null, s ? s.done : void 0;
|
|
2367
2367
|
});
|
|
2368
2368
|
}
|
|
2369
|
-
var [
|
|
2370
|
-
function
|
|
2371
|
-
return [
|
|
2369
|
+
var [Ml, pd] = /* @__PURE__ */ $(!1);
|
|
2370
|
+
function yd() {
|
|
2371
|
+
return [Ml, Bl];
|
|
2372
2372
|
}
|
|
2373
|
-
function
|
|
2373
|
+
function Ad(e, t) {
|
|
2374
2374
|
const n = Symbol("context");
|
|
2375
2375
|
return {
|
|
2376
2376
|
id: n,
|
|
2377
|
-
Provider:
|
|
2377
|
+
Provider: $l(n),
|
|
2378
2378
|
defaultValue: e
|
|
2379
2379
|
};
|
|
2380
2380
|
}
|
|
2381
|
-
function
|
|
2381
|
+
function Td(e) {
|
|
2382
2382
|
let t;
|
|
2383
|
-
return
|
|
2383
|
+
return L && L.context && (t = L.context[e.id]) !== void 0 ? t : e.defaultValue;
|
|
2384
2384
|
}
|
|
2385
2385
|
function Ar(e) {
|
|
2386
2386
|
const t = te(e), n = te(() => Mn(t()));
|
|
@@ -2389,7 +2389,7 @@ function Ar(e) {
|
|
|
2389
2389
|
return Array.isArray(s) ? s : s != null ? [s] : [];
|
|
2390
2390
|
}, n;
|
|
2391
2391
|
}
|
|
2392
|
-
var
|
|
2392
|
+
var Fl;
|
|
2393
2393
|
function Tr() {
|
|
2394
2394
|
if (this.sources && this.state)
|
|
2395
2395
|
if (this.state === ke) ht(this);
|
|
@@ -2408,7 +2408,7 @@ function Sr(e, t, n) {
|
|
|
2408
2408
|
return (!e.comparator || !e.comparator(s, t)) && (e.value = t, e.observers && e.observers.length && Ie(() => {
|
|
2409
2409
|
for (let r = 0; r < e.observers.length; r += 1) {
|
|
2410
2410
|
const a = e.observers[r], i = Dn && Dn.running;
|
|
2411
|
-
i && Dn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ae.push(a) :
|
|
2411
|
+
i && Dn.disposed.has(a), (i ? !a.tState : !a.state) && (a.pure ? ae.push(a) : Le.push(a), a.observers && Pr(a)), i || (a.state = ke);
|
|
2412
2412
|
}
|
|
2413
2413
|
if (ae.length > 1e6)
|
|
2414
2414
|
throw ae = [], new Error();
|
|
@@ -2418,18 +2418,18 @@ function ht(e) {
|
|
|
2418
2418
|
if (!e.fn) return;
|
|
2419
2419
|
_t(e);
|
|
2420
2420
|
const t = Tn;
|
|
2421
|
-
|
|
2421
|
+
Hl(e, e.value, t);
|
|
2422
2422
|
}
|
|
2423
|
-
function
|
|
2423
|
+
function Hl(e, t, n) {
|
|
2424
2424
|
let s;
|
|
2425
|
-
const r =
|
|
2426
|
-
U =
|
|
2425
|
+
const r = L, a = U;
|
|
2426
|
+
U = L = e;
|
|
2427
2427
|
try {
|
|
2428
2428
|
s = e.fn(t);
|
|
2429
2429
|
} catch (i) {
|
|
2430
2430
|
return e.pure && (e.state = ke, e.owned && e.owned.forEach(_t), e.owned = null), e.updatedAt = n + 1, as(i);
|
|
2431
2431
|
} finally {
|
|
2432
|
-
U = a,
|
|
2432
|
+
U = a, L = r;
|
|
2433
2433
|
}
|
|
2434
2434
|
(!e.updatedAt || e.updatedAt <= n) && (e.updatedAt != null && "observers" in e ? Sr(e, s) : e.value = s, e.updatedAt = n);
|
|
2435
2435
|
}
|
|
@@ -2443,11 +2443,11 @@ function Sn(e, t, n, s = ke, r) {
|
|
|
2443
2443
|
sourceSlots: null,
|
|
2444
2444
|
cleanups: null,
|
|
2445
2445
|
value: t,
|
|
2446
|
-
owner:
|
|
2447
|
-
context:
|
|
2446
|
+
owner: L,
|
|
2447
|
+
context: L ? L.context : null,
|
|
2448
2448
|
pure: n
|
|
2449
2449
|
};
|
|
2450
|
-
return
|
|
2450
|
+
return L === null || L !== Er && (L.owned ? L.owned.push(a) : L.owned = [a]), a;
|
|
2451
2451
|
}
|
|
2452
2452
|
function on(e) {
|
|
2453
2453
|
if (e.state === 0) return;
|
|
@@ -2467,23 +2467,23 @@ function on(e) {
|
|
|
2467
2467
|
function Ie(e, t) {
|
|
2468
2468
|
if (ae) return e();
|
|
2469
2469
|
let n = !1;
|
|
2470
|
-
t || (ae = []),
|
|
2470
|
+
t || (ae = []), Le ? n = !0 : Le = [], Tn++;
|
|
2471
2471
|
try {
|
|
2472
2472
|
const s = e();
|
|
2473
|
-
return
|
|
2473
|
+
return Kl(n), s;
|
|
2474
2474
|
} catch (s) {
|
|
2475
|
-
n || (
|
|
2475
|
+
n || (Le = null), ae = null, as(s);
|
|
2476
2476
|
}
|
|
2477
2477
|
}
|
|
2478
|
-
function
|
|
2478
|
+
function Kl(e) {
|
|
2479
2479
|
if (ae && (_r(ae), ae = null), e) return;
|
|
2480
|
-
const t =
|
|
2481
|
-
|
|
2480
|
+
const t = Le;
|
|
2481
|
+
Le = null, t.length && Ie(() => mr(t), !1);
|
|
2482
2482
|
}
|
|
2483
2483
|
function _r(e) {
|
|
2484
2484
|
for (let t = 0; t < e.length; t++) on(e[t]);
|
|
2485
2485
|
}
|
|
2486
|
-
function
|
|
2486
|
+
function Vl(e) {
|
|
2487
2487
|
let t, n = 0;
|
|
2488
2488
|
for (t = 0; t < e.length; t++) {
|
|
2489
2489
|
const s = e[t];
|
|
@@ -2511,7 +2511,7 @@ function ln(e, t) {
|
|
|
2511
2511
|
function Pr(e) {
|
|
2512
2512
|
for (let t = 0; t < e.observers.length; t += 1) {
|
|
2513
2513
|
const n = e.observers[t];
|
|
2514
|
-
n.state || (n.state = an, n.pure ? ae.push(n) :
|
|
2514
|
+
n.state || (n.state = an, n.pure ? ae.push(n) : Le.push(n), n.observers && Pr(n));
|
|
2515
2515
|
}
|
|
2516
2516
|
}
|
|
2517
2517
|
function _t(e) {
|
|
@@ -2543,7 +2543,7 @@ function Xt(e) {
|
|
|
2543
2543
|
cause: e
|
|
2544
2544
|
});
|
|
2545
2545
|
}
|
|
2546
|
-
function as(e, t =
|
|
2546
|
+
function as(e, t = L) {
|
|
2547
2547
|
throw Xt(e);
|
|
2548
2548
|
}
|
|
2549
2549
|
function Mn(e) {
|
|
@@ -2558,11 +2558,11 @@ function Mn(e) {
|
|
|
2558
2558
|
}
|
|
2559
2559
|
return e;
|
|
2560
2560
|
}
|
|
2561
|
-
function
|
|
2561
|
+
function $l(e, t) {
|
|
2562
2562
|
return function(s) {
|
|
2563
2563
|
let r;
|
|
2564
|
-
return Be(() => r = se(() => (
|
|
2565
|
-
...
|
|
2564
|
+
return Be(() => r = se(() => (L.context = {
|
|
2565
|
+
...L.context,
|
|
2566
2566
|
[e]: s.value
|
|
2567
2567
|
}, Ar(() => s.children))), void 0), r;
|
|
2568
2568
|
};
|
|
@@ -2571,7 +2571,7 @@ var Fn = Symbol("fallback");
|
|
|
2571
2571
|
function cn(e) {
|
|
2572
2572
|
for (let t = 0; t < e.length; t++) e[t]();
|
|
2573
2573
|
}
|
|
2574
|
-
function
|
|
2574
|
+
function ql(e, t, n = {}) {
|
|
2575
2575
|
let s = [], r = [], a = [], i = 0, l = t.length > 1 ? [] : null;
|
|
2576
2576
|
return St(() => cn(a)), () => {
|
|
2577
2577
|
let c = e() || [], d = c.length, f, u;
|
|
@@ -2599,14 +2599,14 @@ function Hl(e, t, n = {}) {
|
|
|
2599
2599
|
});
|
|
2600
2600
|
function g(h) {
|
|
2601
2601
|
if (a[u] = h, l) {
|
|
2602
|
-
const [p, _] =
|
|
2602
|
+
const [p, _] = $(u);
|
|
2603
2603
|
return l[u] = _, t(c[u], p);
|
|
2604
2604
|
}
|
|
2605
2605
|
return t(c[u]);
|
|
2606
2606
|
}
|
|
2607
2607
|
};
|
|
2608
2608
|
}
|
|
2609
|
-
function
|
|
2609
|
+
function Ql(e, t, n = {}) {
|
|
2610
2610
|
let s = [], r = [], a = [], i = [], l = 0, c;
|
|
2611
2611
|
return St(() => cn(a)), () => {
|
|
2612
2612
|
const d = e() || [], f = d.length;
|
|
@@ -2621,7 +2621,7 @@ function Kl(e, t, n = {}) {
|
|
|
2621
2621
|
});
|
|
2622
2622
|
function u(g) {
|
|
2623
2623
|
a[c] = g;
|
|
2624
|
-
const [h, p] =
|
|
2624
|
+
const [h, p] = $(d[c]);
|
|
2625
2625
|
return i[c] = p, t(h, c);
|
|
2626
2626
|
}
|
|
2627
2627
|
};
|
|
@@ -2656,10 +2656,10 @@ var Hn = {
|
|
|
2656
2656
|
return e.keys();
|
|
2657
2657
|
}
|
|
2658
2658
|
};
|
|
2659
|
-
function
|
|
2659
|
+
function xn(e) {
|
|
2660
2660
|
return (e = typeof e == "function" ? e() : e) ? e : {};
|
|
2661
2661
|
}
|
|
2662
|
-
function
|
|
2662
|
+
function Wl() {
|
|
2663
2663
|
for (let e = 0, t = this.length; e < t; ++e) {
|
|
2664
2664
|
const n = this[e]();
|
|
2665
2665
|
if (n !== void 0) return n;
|
|
@@ -2675,18 +2675,18 @@ function br(...e) {
|
|
|
2675
2675
|
return new Proxy({
|
|
2676
2676
|
get(i) {
|
|
2677
2677
|
for (let l = e.length - 1; l >= 0; l--) {
|
|
2678
|
-
const c =
|
|
2678
|
+
const c = xn(e[l])[i];
|
|
2679
2679
|
if (c !== void 0) return c;
|
|
2680
2680
|
}
|
|
2681
2681
|
},
|
|
2682
2682
|
has(i) {
|
|
2683
2683
|
for (let l = e.length - 1; l >= 0; l--)
|
|
2684
|
-
if (i in
|
|
2684
|
+
if (i in xn(e[l])) return !0;
|
|
2685
2685
|
return !1;
|
|
2686
2686
|
},
|
|
2687
2687
|
keys() {
|
|
2688
2688
|
const i = [];
|
|
2689
|
-
for (let l = 0; l < e.length; l++) i.push(...Object.keys(
|
|
2689
|
+
for (let l = 0; l < e.length; l++) i.push(...Object.keys(xn(e[l])));
|
|
2690
2690
|
return [...new Set(i)];
|
|
2691
2691
|
}
|
|
2692
2692
|
}, Hn);
|
|
@@ -2703,7 +2703,7 @@ function br(...e) {
|
|
|
2703
2703
|
s[f] = u.get ? {
|
|
2704
2704
|
enumerable: !0,
|
|
2705
2705
|
configurable: !0,
|
|
2706
|
-
get:
|
|
2706
|
+
get: Wl.bind(n[f] = [u.get.bind(l)])
|
|
2707
2707
|
} : u.value !== void 0 ? u : void 0;
|
|
2708
2708
|
else {
|
|
2709
2709
|
const g = n[f];
|
|
@@ -2718,7 +2718,7 @@ function br(...e) {
|
|
|
2718
2718
|
}
|
|
2719
2719
|
return r;
|
|
2720
2720
|
}
|
|
2721
|
-
function
|
|
2721
|
+
function jl(e, ...t) {
|
|
2722
2722
|
if (hr && sn in e) {
|
|
2723
2723
|
const r = new Set(t.length > 1 ? t.flat() : t[0]), a = t.map((i) => new Proxy({
|
|
2724
2724
|
get(l) {
|
|
@@ -2758,12 +2758,12 @@ function Ir(e) {
|
|
|
2758
2758
|
const s = (r) => {
|
|
2759
2759
|
const a = P.context;
|
|
2760
2760
|
if (a) {
|
|
2761
|
-
const [l, c] =
|
|
2761
|
+
const [l, c] = $();
|
|
2762
2762
|
P.count || (P.count = 0), P.count++, (n || (n = e())).then((d) => {
|
|
2763
2763
|
!P.done && Et(a), P.count--, c(() => d.default), Et();
|
|
2764
2764
|
}), t = l;
|
|
2765
2765
|
} else if (!t) {
|
|
2766
|
-
const [l] =
|
|
2766
|
+
const [l] = Rl(() => (n || (n = e())).then((c) => c.default));
|
|
2767
2767
|
t = l;
|
|
2768
2768
|
}
|
|
2769
2769
|
let i;
|
|
@@ -2777,24 +2777,24 @@ function Ir(e) {
|
|
|
2777
2777
|
};
|
|
2778
2778
|
return s.preload = () => n || ((n = e()).then((r) => t = () => r.default), n), s;
|
|
2779
2779
|
}
|
|
2780
|
-
var
|
|
2781
|
-
function
|
|
2782
|
-
return P.context ? P.getNextContextId() : `cl-${
|
|
2780
|
+
var zl = 0;
|
|
2781
|
+
function Sd() {
|
|
2782
|
+
return P.context ? P.getNextContextId() : `cl-${zl++}`;
|
|
2783
2783
|
}
|
|
2784
2784
|
var Nr = (e) => `Stale read from <${e}>.`;
|
|
2785
|
-
function
|
|
2785
|
+
function _d(e) {
|
|
2786
2786
|
const t = "fallback" in e && {
|
|
2787
2787
|
fallback: () => e.fallback
|
|
2788
2788
|
};
|
|
2789
|
-
return te(
|
|
2789
|
+
return te(ql(() => e.each, e.children, t || void 0));
|
|
2790
2790
|
}
|
|
2791
|
-
function
|
|
2791
|
+
function Pd(e) {
|
|
2792
2792
|
const t = "fallback" in e && {
|
|
2793
2793
|
fallback: () => e.fallback
|
|
2794
2794
|
};
|
|
2795
|
-
return te(
|
|
2795
|
+
return te(Ql(() => e.each, e.children, t || void 0));
|
|
2796
2796
|
}
|
|
2797
|
-
function
|
|
2797
|
+
function wd(e) {
|
|
2798
2798
|
const t = e.keyed, n = te(() => e.when, void 0, void 0), s = t ? n : te(n, void 0, {
|
|
2799
2799
|
equals: (r, a) => !r == !a
|
|
2800
2800
|
});
|
|
@@ -2810,7 +2810,7 @@ function pd(e) {
|
|
|
2810
2810
|
return e.fallback;
|
|
2811
2811
|
}, void 0, void 0);
|
|
2812
2812
|
}
|
|
2813
|
-
function
|
|
2813
|
+
function bd(e) {
|
|
2814
2814
|
const t = Ar(() => e.children), n = te(() => {
|
|
2815
2815
|
const s = t(), r = Array.isArray(s) ? s : [s];
|
|
2816
2816
|
let a = () => {
|
|
@@ -2834,13 +2834,13 @@ function yd(e) {
|
|
|
2834
2834
|
})) : l;
|
|
2835
2835
|
}, void 0, void 0);
|
|
2836
2836
|
}
|
|
2837
|
-
function
|
|
2837
|
+
function Id(e) {
|
|
2838
2838
|
return e;
|
|
2839
2839
|
}
|
|
2840
|
-
var
|
|
2840
|
+
var Yl = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "controls", "default", "disabled", "formnovalidate", "hidden", "indeterminate", "inert", "ismap", "loop", "multiple", "muted", "nomodule", "novalidate", "open", "playsinline", "readonly", "required", "reversed", "seamless", "selected"], Jl = /* @__PURE__ */ new Set(["className", "value", "readOnly", "noValidate", "formNoValidate", "isMap", "noModule", "playsInline", ...Yl]), Zl = /* @__PURE__ */ new Set(["innerHTML", "textContent", "innerText", "children"]), Xl = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2841
2841
|
className: "class",
|
|
2842
2842
|
htmlFor: "for"
|
|
2843
|
-
}),
|
|
2843
|
+
}), ec = /* @__PURE__ */ Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
2844
2844
|
class: "className",
|
|
2845
2845
|
novalidate: {
|
|
2846
2846
|
$: "noValidate",
|
|
@@ -2869,11 +2869,11 @@ var Ql = ["allowfullscreen", "async", "autofocus", "autoplay", "checked", "contr
|
|
|
2869
2869
|
TEXTAREA: 1
|
|
2870
2870
|
}
|
|
2871
2871
|
});
|
|
2872
|
-
function
|
|
2873
|
-
const n =
|
|
2872
|
+
function tc(e, t) {
|
|
2873
|
+
const n = ec[e];
|
|
2874
2874
|
return typeof n == "object" ? n[t] ? n.$ : void 0 : n;
|
|
2875
2875
|
}
|
|
2876
|
-
var
|
|
2876
|
+
var nc = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextmenu", "focusin", "focusout", "input", "keydown", "keyup", "mousedown", "mousemove", "mouseout", "mouseover", "mouseup", "pointerdown", "pointermove", "pointerout", "pointerover", "pointerup", "touchend", "touchmove", "touchstart"]), sc = /* @__PURE__ */ new Set([
|
|
2877
2877
|
"altGlyph",
|
|
2878
2878
|
"altGlyphDef",
|
|
2879
2879
|
"altGlyphItem",
|
|
@@ -2951,11 +2951,11 @@ var Zl = /* @__PURE__ */ new Set(["beforeinput", "click", "dblclick", "contextme
|
|
|
2951
2951
|
"use",
|
|
2952
2952
|
"view",
|
|
2953
2953
|
"vkern"
|
|
2954
|
-
]),
|
|
2954
|
+
]), rc = {
|
|
2955
2955
|
xlink: "http://www.w3.org/1999/xlink",
|
|
2956
2956
|
xml: "http://www.w3.org/XML/1998/namespace"
|
|
2957
|
-
},
|
|
2958
|
-
function
|
|
2957
|
+
}, Nd = (e) => te(() => e());
|
|
2958
|
+
function ac(e, t, n) {
|
|
2959
2959
|
let s = n.length, r = t.length, a = s, i = 0, l = 0, c = t[r - 1].nextSibling, d = null;
|
|
2960
2960
|
for (; i < r || l < a; ) {
|
|
2961
2961
|
if (t[i] === n[l]) {
|
|
@@ -3003,7 +3003,7 @@ function vr(e, t, n, s = {}) {
|
|
|
3003
3003
|
r(), t.textContent = "";
|
|
3004
3004
|
};
|
|
3005
3005
|
}
|
|
3006
|
-
function
|
|
3006
|
+
function vd(e, t, n, s) {
|
|
3007
3007
|
let r;
|
|
3008
3008
|
const a = () => {
|
|
3009
3009
|
const l = document.createElement("template");
|
|
@@ -3011,32 +3011,32 @@ function Sd(e, t, n, s) {
|
|
|
3011
3011
|
}, i = () => (r || (r = a())).cloneNode(!0);
|
|
3012
3012
|
return i.cloneNode = i, i;
|
|
3013
3013
|
}
|
|
3014
|
-
function
|
|
3014
|
+
function ic(e, t = window.document) {
|
|
3015
3015
|
const n = t[pt] || (t[pt] = /* @__PURE__ */ new Set());
|
|
3016
3016
|
for (let s = 0, r = e.length; s < r; s++) {
|
|
3017
3017
|
const a = e[s];
|
|
3018
|
-
n.has(a) || (n.add(a), t.addEventListener(a,
|
|
3018
|
+
n.has(a) || (n.add(a), t.addEventListener(a, Cr));
|
|
3019
3019
|
}
|
|
3020
3020
|
}
|
|
3021
|
-
function
|
|
3021
|
+
function Cd(e = window.document) {
|
|
3022
3022
|
if (e[pt]) {
|
|
3023
|
-
for (let t of e[pt].keys()) e.removeEventListener(t,
|
|
3023
|
+
for (let t of e[pt].keys()) e.removeEventListener(t, Cr);
|
|
3024
3024
|
delete e[pt];
|
|
3025
3025
|
}
|
|
3026
3026
|
}
|
|
3027
3027
|
function Kn(e, t, n) {
|
|
3028
|
-
|
|
3028
|
+
$e(e) || (n == null ? e.removeAttribute(t) : e.setAttribute(t, n));
|
|
3029
3029
|
}
|
|
3030
|
-
function
|
|
3031
|
-
|
|
3030
|
+
function oc(e, t, n, s) {
|
|
3031
|
+
$e(e) || (s == null ? e.removeAttributeNS(t, n) : e.setAttributeNS(t, n, s));
|
|
3032
3032
|
}
|
|
3033
|
-
function
|
|
3034
|
-
|
|
3033
|
+
function lc(e, t, n) {
|
|
3034
|
+
$e(e) || (n ? e.setAttribute(t, "") : e.removeAttribute(t));
|
|
3035
3035
|
}
|
|
3036
|
-
function
|
|
3037
|
-
|
|
3036
|
+
function cc(e, t) {
|
|
3037
|
+
$e(e) || (t == null ? e.removeAttribute("class") : e.className = t);
|
|
3038
3038
|
}
|
|
3039
|
-
function
|
|
3039
|
+
function uc(e, t, n, s) {
|
|
3040
3040
|
if (s)
|
|
3041
3041
|
Array.isArray(n) ? (e[`$$${t}`] = n[0], e[`$$${t}Data`] = n[1]) : e[`$$${t}`] = n;
|
|
3042
3042
|
else if (Array.isArray(n)) {
|
|
@@ -3044,7 +3044,7 @@ function ic(e, t, n, s) {
|
|
|
3044
3044
|
e.addEventListener(t, n[0] = (a) => r.call(e, n[1], a));
|
|
3045
3045
|
} else e.addEventListener(t, n, typeof n != "function" && n);
|
|
3046
3046
|
}
|
|
3047
|
-
function
|
|
3047
|
+
function dc(e, t, n = {}) {
|
|
3048
3048
|
const s = Object.keys(t || {}), r = Object.keys(n);
|
|
3049
3049
|
let a, i;
|
|
3050
3050
|
for (a = 0, i = r.length; a < i; a++) {
|
|
@@ -3057,7 +3057,7 @@ function oc(e, t, n = {}) {
|
|
|
3057
3057
|
}
|
|
3058
3058
|
return n;
|
|
3059
3059
|
}
|
|
3060
|
-
function
|
|
3060
|
+
function fc(e, t, n) {
|
|
3061
3061
|
if (!t) return n ? Kn(e, "style") : t;
|
|
3062
3062
|
const s = e.style;
|
|
3063
3063
|
if (typeof t == "string") return s.cssText = t;
|
|
@@ -3069,18 +3069,18 @@ function lc(e, t, n) {
|
|
|
3069
3069
|
r = t[a], r !== n[a] && (s.setProperty(a, r), n[a] = r);
|
|
3070
3070
|
return n;
|
|
3071
3071
|
}
|
|
3072
|
-
function
|
|
3072
|
+
function hc(e, t = {}, n, s) {
|
|
3073
3073
|
const r = {};
|
|
3074
|
-
return s || Be(() => r.children = Pt(e, t.children, r.children)), Be(() => typeof t.ref == "function" &&
|
|
3074
|
+
return s || Be(() => r.children = Pt(e, t.children, r.children)), Be(() => typeof t.ref == "function" && gc(t.ref, e)), Be(() => mc(e, t, n, !0, r, !0)), r;
|
|
3075
3075
|
}
|
|
3076
|
-
function
|
|
3076
|
+
function gc(e, t, n) {
|
|
3077
3077
|
return se(() => e(t, n));
|
|
3078
3078
|
}
|
|
3079
3079
|
function Vn(e, t, n, s) {
|
|
3080
3080
|
if (n !== void 0 && !s && (s = []), typeof t != "function") return Pt(e, t, s, n);
|
|
3081
3081
|
Be((r) => Pt(e, t(), r, n), s);
|
|
3082
3082
|
}
|
|
3083
|
-
function
|
|
3083
|
+
function mc(e, t, n, s, r = {}, a = !1) {
|
|
3084
3084
|
t || (t = {});
|
|
3085
3085
|
for (const i in r)
|
|
3086
3086
|
if (!(i in t)) {
|
|
@@ -3094,14 +3094,14 @@ function dc(e, t, n, s, r = {}, a = !1) {
|
|
|
3094
3094
|
r[i] = Ns(e, i, l, r[i], n, a, t);
|
|
3095
3095
|
}
|
|
3096
3096
|
}
|
|
3097
|
-
function
|
|
3097
|
+
function Ec(e) {
|
|
3098
3098
|
let t, n;
|
|
3099
|
-
return
|
|
3099
|
+
return !$e() || !(t = P.registry.get(n = yc())) ? e() : (P.completed && P.completed.add(t), P.registry.delete(n), t);
|
|
3100
3100
|
}
|
|
3101
|
-
function
|
|
3101
|
+
function $e(e) {
|
|
3102
3102
|
return !!P.context && !P.done && (!e || e.isConnected);
|
|
3103
3103
|
}
|
|
3104
|
-
function
|
|
3104
|
+
function pc(e) {
|
|
3105
3105
|
return e.toLowerCase().replace(/-([a-z])/g, (t, n) => n.toUpperCase());
|
|
3106
3106
|
}
|
|
3107
3107
|
function Is(e, t, n) {
|
|
@@ -3110,8 +3110,8 @@ function Is(e, t, n) {
|
|
|
3110
3110
|
}
|
|
3111
3111
|
function Ns(e, t, n, s, r, a, i) {
|
|
3112
3112
|
let l, c, d, f, u;
|
|
3113
|
-
if (t === "style") return
|
|
3114
|
-
if (t === "classList") return
|
|
3113
|
+
if (t === "style") return fc(e, n, s);
|
|
3114
|
+
if (t === "classList") return dc(e, n, s);
|
|
3115
3115
|
if (n === s) return s;
|
|
3116
3116
|
if (t === "ref")
|
|
3117
3117
|
a || n(e);
|
|
@@ -3122,28 +3122,28 @@ function Ns(e, t, n, s, r, a, i) {
|
|
|
3122
3122
|
const g = t.slice(10);
|
|
3123
3123
|
s && e.removeEventListener(g, s, !0), n && e.addEventListener(g, n, !0);
|
|
3124
3124
|
} else if (t.slice(0, 2) === "on") {
|
|
3125
|
-
const g = t.slice(2).toLowerCase(), h =
|
|
3125
|
+
const g = t.slice(2).toLowerCase(), h = nc.has(g);
|
|
3126
3126
|
if (!h && s) {
|
|
3127
3127
|
const p = Array.isArray(s) ? s[0] : s;
|
|
3128
3128
|
e.removeEventListener(g, p);
|
|
3129
3129
|
}
|
|
3130
|
-
(h || n) && (
|
|
3130
|
+
(h || n) && (uc(e, g, n, h), h && ic([g]));
|
|
3131
3131
|
} else if (t.slice(0, 5) === "attr:")
|
|
3132
3132
|
Kn(e, t.slice(5), n);
|
|
3133
3133
|
else if (t.slice(0, 5) === "bool:")
|
|
3134
|
-
|
|
3135
|
-
else if ((u = t.slice(0, 5) === "prop:") || (d =
|
|
3134
|
+
lc(e, t.slice(5), n);
|
|
3135
|
+
else if ((u = t.slice(0, 5) === "prop:") || (d = Zl.has(t)) || !r && ((f = tc(t, e.tagName)) || (c = Jl.has(t))) || (l = e.nodeName.includes("-") || "is" in i)) {
|
|
3136
3136
|
if (u)
|
|
3137
3137
|
t = t.slice(5), c = !0;
|
|
3138
|
-
else if (
|
|
3139
|
-
t === "class" || t === "className" ?
|
|
3138
|
+
else if ($e(e)) return n;
|
|
3139
|
+
t === "class" || t === "className" ? cc(e, n) : l && !c && !d ? e[pc(t)] = n : e[f || t] = n;
|
|
3140
3140
|
} else {
|
|
3141
|
-
const g = r && t.indexOf(":") > -1 &&
|
|
3142
|
-
g ?
|
|
3141
|
+
const g = r && t.indexOf(":") > -1 && rc[t.split(":")[0]];
|
|
3142
|
+
g ? oc(e, g, t, n) : Kn(e, Xl[t] || t, n);
|
|
3143
3143
|
}
|
|
3144
3144
|
return n;
|
|
3145
3145
|
}
|
|
3146
|
-
function
|
|
3146
|
+
function Cr(e) {
|
|
3147
3147
|
if (P.registry && P.events && P.events.find(([c, d]) => d === e))
|
|
3148
3148
|
return;
|
|
3149
3149
|
let t = e.target;
|
|
@@ -3180,7 +3180,7 @@ function Lr(e) {
|
|
|
3180
3180
|
a(s);
|
|
3181
3181
|
}
|
|
3182
3182
|
function Pt(e, t, n, s, r) {
|
|
3183
|
-
const a =
|
|
3183
|
+
const a = $e(e);
|
|
3184
3184
|
if (a) {
|
|
3185
3185
|
!n && (n = [...e.childNodes]);
|
|
3186
3186
|
let c = [];
|
|
@@ -3213,7 +3213,7 @@ function Pt(e, t, n, s, r) {
|
|
|
3213
3213
|
}), () => n;
|
|
3214
3214
|
if (Array.isArray(t)) {
|
|
3215
3215
|
const c = [], d = n && Array.isArray(n);
|
|
3216
|
-
if (
|
|
3216
|
+
if ($n(c, t, n, r))
|
|
3217
3217
|
return Be(() => n = Pt(e, c, n, s, !0)), () => n;
|
|
3218
3218
|
if (a) {
|
|
3219
3219
|
if (!c.length) return n;
|
|
@@ -3226,7 +3226,7 @@ function Pt(e, t, n, s, r) {
|
|
|
3226
3226
|
}
|
|
3227
3227
|
if (c.length === 0) {
|
|
3228
3228
|
if (n = We(e, n, s), l) return n;
|
|
3229
|
-
} else d ? n.length === 0 ? vs(e, c, s) :
|
|
3229
|
+
} else d ? n.length === 0 ? vs(e, c, s) : ac(e, n, c) : (n && We(e), vs(e, c));
|
|
3230
3230
|
n = c;
|
|
3231
3231
|
} else if (t.nodeType) {
|
|
3232
3232
|
if (a && t.parentNode) return n = l ? [t] : t;
|
|
@@ -3239,18 +3239,18 @@ function Pt(e, t, n, s, r) {
|
|
|
3239
3239
|
}
|
|
3240
3240
|
return n;
|
|
3241
3241
|
}
|
|
3242
|
-
function
|
|
3242
|
+
function $n(e, t, n, s) {
|
|
3243
3243
|
let r = !1;
|
|
3244
3244
|
for (let a = 0, i = t.length; a < i; a++) {
|
|
3245
3245
|
let l = t[a], c = n && n[e.length], d;
|
|
3246
3246
|
if (!(l == null || l === !0 || l === !1)) if ((d = typeof l) == "object" && l.nodeType)
|
|
3247
3247
|
e.push(l);
|
|
3248
3248
|
else if (Array.isArray(l))
|
|
3249
|
-
r =
|
|
3249
|
+
r = $n(e, l, c) || r;
|
|
3250
3250
|
else if (d === "function")
|
|
3251
3251
|
if (s) {
|
|
3252
3252
|
for (; typeof l == "function"; ) l = l();
|
|
3253
|
-
r =
|
|
3253
|
+
r = $n(e, Array.isArray(l) ? l : [l], Array.isArray(c) ? c : [c]) || r;
|
|
3254
3254
|
} else
|
|
3255
3255
|
e.push(l), r = !0;
|
|
3256
3256
|
else {
|
|
@@ -3278,14 +3278,14 @@ function We(e, t, n, s) {
|
|
|
3278
3278
|
} else e.insertBefore(r, n);
|
|
3279
3279
|
return [r];
|
|
3280
3280
|
}
|
|
3281
|
-
function
|
|
3281
|
+
function yc() {
|
|
3282
3282
|
return P.getNextContextId();
|
|
3283
3283
|
}
|
|
3284
|
-
var
|
|
3285
|
-
function
|
|
3286
|
-
return t ? document.createElementNS(
|
|
3284
|
+
var Ac = "http://www.w3.org/2000/svg";
|
|
3285
|
+
function Lr(e, t = !1) {
|
|
3286
|
+
return t ? document.createElementNS(Ac, e) : document.createElement(e);
|
|
3287
3287
|
}
|
|
3288
|
-
function
|
|
3288
|
+
function Ld(e) {
|
|
3289
3289
|
const {
|
|
3290
3290
|
useShadow: t
|
|
3291
3291
|
} = e, n = document.createTextNode(""), s = () => e.mount || document.body, r = bs();
|
|
@@ -3294,10 +3294,10 @@ function Pd(e) {
|
|
|
3294
3294
|
i && (bs().user = i = !1), a || (a = yr(r, () => te(() => e.children)));
|
|
3295
3295
|
const l = s();
|
|
3296
3296
|
if (l instanceof HTMLHeadElement) {
|
|
3297
|
-
const [c, d] =
|
|
3297
|
+
const [c, d] = $(!1), f = () => d(!0);
|
|
3298
3298
|
Ue((u) => Vn(l, () => c() ? u() : a(), null)), St(f);
|
|
3299
3299
|
} else {
|
|
3300
|
-
const c =
|
|
3300
|
+
const c = Lr(e.isSVG ? "g" : "div", e.isSVG), d = t && c.attachShadow ? c.attachShadow({
|
|
3301
3301
|
mode: "open"
|
|
3302
3302
|
}) : c;
|
|
3303
3303
|
Object.defineProperty(c, "_$host", {
|
|
@@ -3311,7 +3311,7 @@ function Pd(e) {
|
|
|
3311
3311
|
render: !i
|
|
3312
3312
|
}), n;
|
|
3313
3313
|
}
|
|
3314
|
-
function
|
|
3314
|
+
function Tc(e, t) {
|
|
3315
3315
|
const n = te(e);
|
|
3316
3316
|
return te(() => {
|
|
3317
3317
|
const s = n();
|
|
@@ -3319,16 +3319,16 @@ function Ec(e, t) {
|
|
|
3319
3319
|
case "function":
|
|
3320
3320
|
return se(() => s(t));
|
|
3321
3321
|
case "string":
|
|
3322
|
-
const r =
|
|
3323
|
-
return
|
|
3322
|
+
const r = sc.has(s), a = P.context ? Ec() : Lr(s, r);
|
|
3323
|
+
return hc(a, t, r), a;
|
|
3324
3324
|
}
|
|
3325
3325
|
});
|
|
3326
3326
|
}
|
|
3327
|
-
function
|
|
3328
|
-
const [, t] =
|
|
3329
|
-
return
|
|
3327
|
+
function Gd(e) {
|
|
3328
|
+
const [, t] = jl(e, ["component"]);
|
|
3329
|
+
return Tc(() => e.component, t);
|
|
3330
3330
|
}
|
|
3331
|
-
var
|
|
3331
|
+
var Sc = class {
|
|
3332
3332
|
constructor() {
|
|
3333
3333
|
this.keyToValue = /* @__PURE__ */ new Map(), this.valueToKey = /* @__PURE__ */ new Map();
|
|
3334
3334
|
}
|
|
@@ -3346,7 +3346,7 @@ var pc = class {
|
|
|
3346
3346
|
}
|
|
3347
3347
|
}, Gr = class {
|
|
3348
3348
|
constructor(e) {
|
|
3349
|
-
this.generateIdentifier = e, this.kv = new
|
|
3349
|
+
this.generateIdentifier = e, this.kv = new Sc();
|
|
3350
3350
|
}
|
|
3351
3351
|
register(e, t) {
|
|
3352
3352
|
this.kv.getByValue(e) || (t || (t = this.generateIdentifier(e)), this.kv.set(t, e));
|
|
@@ -3360,7 +3360,7 @@ var pc = class {
|
|
|
3360
3360
|
getValue(e) {
|
|
3361
3361
|
return this.kv.getByKey(e);
|
|
3362
3362
|
}
|
|
3363
|
-
},
|
|
3363
|
+
}, _c = class extends Gr {
|
|
3364
3364
|
constructor() {
|
|
3365
3365
|
super((e) => e.name), this.classToAllowedProps = /* @__PURE__ */ new Map();
|
|
3366
3366
|
}
|
|
@@ -3371,7 +3371,7 @@ var pc = class {
|
|
|
3371
3371
|
return this.classToAllowedProps.get(e);
|
|
3372
3372
|
}
|
|
3373
3373
|
};
|
|
3374
|
-
function
|
|
3374
|
+
function Pc(e) {
|
|
3375
3375
|
if ("values" in Object)
|
|
3376
3376
|
return Object.values(e);
|
|
3377
3377
|
const t = [];
|
|
@@ -3379,8 +3379,8 @@ function Ac(e) {
|
|
|
3379
3379
|
e.hasOwnProperty(n) && t.push(e[n]);
|
|
3380
3380
|
return t;
|
|
3381
3381
|
}
|
|
3382
|
-
function
|
|
3383
|
-
const n =
|
|
3382
|
+
function wc(e, t) {
|
|
3383
|
+
const n = Pc(e);
|
|
3384
3384
|
if ("find" in n)
|
|
3385
3385
|
return n.find(t);
|
|
3386
3386
|
const s = n;
|
|
@@ -3396,14 +3396,14 @@ function ft(e, t) {
|
|
|
3396
3396
|
function en(e, t) {
|
|
3397
3397
|
return e.indexOf(t) !== -1;
|
|
3398
3398
|
}
|
|
3399
|
-
function
|
|
3399
|
+
function Cs(e, t) {
|
|
3400
3400
|
for (let n = 0; n < e.length; n++) {
|
|
3401
3401
|
const s = e[n];
|
|
3402
3402
|
if (t(s))
|
|
3403
3403
|
return s;
|
|
3404
3404
|
}
|
|
3405
3405
|
}
|
|
3406
|
-
var
|
|
3406
|
+
var bc = class {
|
|
3407
3407
|
constructor() {
|
|
3408
3408
|
this.transfomers = {};
|
|
3409
3409
|
}
|
|
@@ -3411,12 +3411,12 @@ var Sc = class {
|
|
|
3411
3411
|
this.transfomers[e.name] = e;
|
|
3412
3412
|
}
|
|
3413
3413
|
findApplicable(e) {
|
|
3414
|
-
return
|
|
3414
|
+
return wc(this.transfomers, (t) => t.isApplicable(e));
|
|
3415
3415
|
}
|
|
3416
3416
|
findByName(e) {
|
|
3417
3417
|
return this.transfomers[e];
|
|
3418
3418
|
}
|
|
3419
|
-
},
|
|
3419
|
+
}, Ic = (e) => Object.prototype.toString.call(e).slice(8, -1), kr = (e) => typeof e > "u", Nc = (e) => e === null, wt = (e) => typeof e != "object" || e === null || e === Object.prototype ? !1 : Object.getPrototypeOf(e) === null ? !0 : Object.getPrototypeOf(e) === Object.prototype, qn = (e) => wt(e) && Object.keys(e).length === 0, xe = (e) => Array.isArray(e), vc = (e) => typeof e == "string", Cc = (e) => typeof e == "number" && !isNaN(e), Lc = (e) => typeof e == "boolean", Gc = (e) => e instanceof RegExp, bt = (e) => e instanceof Map, It = (e) => e instanceof Set, Dr = (e) => Ic(e) === "Symbol", kc = (e) => e instanceof Date && !isNaN(e.valueOf()), Dc = (e) => e instanceof Error, Ls = (e) => typeof e == "number" && isNaN(e), xc = (e) => Lc(e) || Nc(e) || kr(e) || Cc(e) || vc(e) || Dr(e), Oc = (e) => typeof e == "bigint", Rc = (e) => e === 1 / 0 || e === -1 / 0, Uc = (e) => ArrayBuffer.isView(e) && !(e instanceof DataView), Bc = (e) => e instanceof URL, xr = (e) => e.replace(/\./g, "\\."), On = (e) => e.map(String).map(xr).join("."), yt = (e) => {
|
|
3420
3420
|
const t = [];
|
|
3421
3421
|
let n = "";
|
|
3422
3422
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -3442,12 +3442,12 @@ function we(e, t, n, s) {
|
|
|
3442
3442
|
untransform: s
|
|
3443
3443
|
};
|
|
3444
3444
|
}
|
|
3445
|
-
var
|
|
3445
|
+
var Or = [
|
|
3446
3446
|
we(kr, "undefined", () => null, () => {
|
|
3447
3447
|
}),
|
|
3448
|
-
we(
|
|
3449
|
-
we(
|
|
3450
|
-
we(
|
|
3448
|
+
we(Oc, "bigint", (e) => e.toString(), (e) => typeof BigInt < "u" ? BigInt(e) : e),
|
|
3449
|
+
we(kc, "Date", (e) => e.toISOString(), (e) => new Date(e)),
|
|
3450
|
+
we(Dc, "Error", (e, t) => {
|
|
3451
3451
|
const n = {
|
|
3452
3452
|
name: e.name,
|
|
3453
3453
|
message: e.message
|
|
@@ -3461,7 +3461,7 @@ var xr = [
|
|
|
3461
3461
|
n[s] = e[s];
|
|
3462
3462
|
}), n;
|
|
3463
3463
|
}),
|
|
3464
|
-
we(
|
|
3464
|
+
we(Gc, "regexp", (e) => "" + e, (e) => {
|
|
3465
3465
|
const t = e.slice(1, e.lastIndexOf("/")), n = e.slice(e.lastIndexOf("/") + 1);
|
|
3466
3466
|
return new RegExp(t, n);
|
|
3467
3467
|
}),
|
|
@@ -3474,9 +3474,9 @@ var xr = [
|
|
|
3474
3474
|
(e) => new Set(e)
|
|
3475
3475
|
),
|
|
3476
3476
|
we(bt, "map", (e) => [...e.entries()], (e) => new Map(e)),
|
|
3477
|
-
we((e) =>
|
|
3477
|
+
we((e) => Ls(e) || Rc(e), "number", (e) => Ls(e) ? "NaN" : e > 0 ? "Infinity" : "-Infinity", Number),
|
|
3478
3478
|
we((e) => e === 0 && 1 / e === -1 / 0, "number", () => "-0", Number),
|
|
3479
|
-
we(
|
|
3479
|
+
we(Bc, "URL", (e) => e.toString(), (e) => new URL(e))
|
|
3480
3480
|
];
|
|
3481
3481
|
function _n(e, t, n, s) {
|
|
3482
3482
|
return {
|
|
@@ -3491,7 +3491,7 @@ var Rr = _n((e, t) => Dr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
3491
3491
|
if (!s)
|
|
3492
3492
|
throw new Error("Trying to deserialize unknown symbol");
|
|
3493
3493
|
return s;
|
|
3494
|
-
}),
|
|
3494
|
+
}), Mc = [
|
|
3495
3495
|
Int8Array,
|
|
3496
3496
|
Uint8Array,
|
|
3497
3497
|
Int16Array,
|
|
@@ -3501,8 +3501,8 @@ var Rr = _n((e, t) => Dr(e) ? !!t.symbolRegistry.getIdentifier(e) : !1, (e, t) =
|
|
|
3501
3501
|
Float32Array,
|
|
3502
3502
|
Float64Array,
|
|
3503
3503
|
Uint8ClampedArray
|
|
3504
|
-
].reduce((e, t) => (e[t.name] = t, e), {}), Ur = _n(
|
|
3505
|
-
const n =
|
|
3504
|
+
].reduce((e, t) => (e[t.name] = t, e), {}), Ur = _n(Uc, (e) => ["typed-array", e.constructor.name], (e) => [...e], (e, t) => {
|
|
3505
|
+
const n = Mc[t[1]];
|
|
3506
3506
|
if (!n)
|
|
3507
3507
|
throw new Error("Trying to deserialize unknown typed array");
|
|
3508
3508
|
return new n(e);
|
|
@@ -3528,25 +3528,25 @@ var Mr = _n(Br, (e, t) => ["class", t.classRegistry.getIdentifier(e.constructor)
|
|
|
3528
3528
|
if (!s)
|
|
3529
3529
|
throw new Error("Trying to deserialize unknown custom value");
|
|
3530
3530
|
return s.deserialize(e);
|
|
3531
|
-
}),
|
|
3532
|
-
const n =
|
|
3531
|
+
}), Fc = [Mr, Rr, Fr, Ur], Gs = (e, t) => {
|
|
3532
|
+
const n = Cs(Fc, (r) => r.isApplicable(e, t));
|
|
3533
3533
|
if (n)
|
|
3534
3534
|
return {
|
|
3535
3535
|
value: n.transform(e, t),
|
|
3536
3536
|
type: n.annotation(e, t)
|
|
3537
3537
|
};
|
|
3538
|
-
const s =
|
|
3538
|
+
const s = Cs(Or, (r) => r.isApplicable(e, t));
|
|
3539
3539
|
if (s)
|
|
3540
3540
|
return {
|
|
3541
3541
|
value: s.transform(e, t),
|
|
3542
3542
|
type: s.annotation
|
|
3543
3543
|
};
|
|
3544
3544
|
}, Hr = {};
|
|
3545
|
-
|
|
3545
|
+
Or.forEach((e) => {
|
|
3546
3546
|
Hr[e.annotation] = e;
|
|
3547
3547
|
});
|
|
3548
|
-
var
|
|
3549
|
-
if (
|
|
3548
|
+
var Hc = (e, t, n) => {
|
|
3549
|
+
if (xe(t))
|
|
3550
3550
|
switch (t[0]) {
|
|
3551
3551
|
case "symbol":
|
|
3552
3552
|
return Rr.untransform(e, t, n);
|
|
@@ -3581,7 +3581,7 @@ function Kr(e) {
|
|
|
3581
3581
|
if (en(e, "constructor"))
|
|
3582
3582
|
throw new Error("constructor is not allowed as a property");
|
|
3583
3583
|
}
|
|
3584
|
-
var
|
|
3584
|
+
var Kc = (e, t) => {
|
|
3585
3585
|
Kr(t);
|
|
3586
3586
|
for (let n = 0; n < t.length; n++) {
|
|
3587
3587
|
const s = t[n];
|
|
@@ -3607,7 +3607,7 @@ var Bc = (e, t) => {
|
|
|
3607
3607
|
let s = e;
|
|
3608
3608
|
for (let a = 0; a < t.length - 1; a++) {
|
|
3609
3609
|
const i = t[a];
|
|
3610
|
-
if (
|
|
3610
|
+
if (xe(s)) {
|
|
3611
3611
|
const l = +i;
|
|
3612
3612
|
s = s[l];
|
|
3613
3613
|
} else if (wt(s))
|
|
@@ -3630,7 +3630,7 @@ var Bc = (e, t) => {
|
|
|
3630
3630
|
}
|
|
3631
3631
|
}
|
|
3632
3632
|
const r = t[t.length - 1];
|
|
3633
|
-
if (
|
|
3633
|
+
if (xe(s) ? s[+r] = n(s[+r]) : wt(s) && (s[r] = n(s[r])), It(s)) {
|
|
3634
3634
|
const a = je(s, +r), i = n(a);
|
|
3635
3635
|
a !== i && (s.delete(a), s.add(i));
|
|
3636
3636
|
}
|
|
@@ -3653,7 +3653,7 @@ var Bc = (e, t) => {
|
|
|
3653
3653
|
function Wn(e, t, n = []) {
|
|
3654
3654
|
if (!e)
|
|
3655
3655
|
return;
|
|
3656
|
-
if (!
|
|
3656
|
+
if (!xe(e)) {
|
|
3657
3657
|
ft(e, (a, i) => Wn(a, t, [...n, ...yt(i)]));
|
|
3658
3658
|
return;
|
|
3659
3659
|
}
|
|
@@ -3662,19 +3662,19 @@ function Wn(e, t, n = []) {
|
|
|
3662
3662
|
Wn(a, t, [...n, ...yt(i)]);
|
|
3663
3663
|
}), t(s, n);
|
|
3664
3664
|
}
|
|
3665
|
-
function
|
|
3665
|
+
function Vc(e, t, n) {
|
|
3666
3666
|
return Wn(t, (s, r) => {
|
|
3667
|
-
e = Qn(e, r, (a) =>
|
|
3667
|
+
e = Qn(e, r, (a) => Hc(a, s, n));
|
|
3668
3668
|
}), e;
|
|
3669
3669
|
}
|
|
3670
|
-
function
|
|
3670
|
+
function $c(e, t) {
|
|
3671
3671
|
function n(s, r) {
|
|
3672
|
-
const a =
|
|
3672
|
+
const a = Kc(e, yt(r));
|
|
3673
3673
|
s.map(yt).forEach((i) => {
|
|
3674
3674
|
e = Qn(e, i, () => a);
|
|
3675
3675
|
});
|
|
3676
3676
|
}
|
|
3677
|
-
if (
|
|
3677
|
+
if (xe(t)) {
|
|
3678
3678
|
const [s, r] = t;
|
|
3679
3679
|
s.forEach((a) => {
|
|
3680
3680
|
e = Qn(e, yt(a), () => e);
|
|
@@ -3683,12 +3683,12 @@ function Fc(e, t) {
|
|
|
3683
3683
|
ft(t, n);
|
|
3684
3684
|
return e;
|
|
3685
3685
|
}
|
|
3686
|
-
var
|
|
3687
|
-
function
|
|
3686
|
+
var qc = (e, t) => wt(e) || xe(e) || bt(e) || It(e) || Br(e, t);
|
|
3687
|
+
function Qc(e, t, n) {
|
|
3688
3688
|
const s = n.get(e);
|
|
3689
3689
|
s ? s.push(t) : n.set(e, [t]);
|
|
3690
3690
|
}
|
|
3691
|
-
function
|
|
3691
|
+
function Wc(e, t) {
|
|
3692
3692
|
const n = {};
|
|
3693
3693
|
let s;
|
|
3694
3694
|
return e.forEach((r) => {
|
|
@@ -3696,20 +3696,20 @@ function Vc(e, t) {
|
|
|
3696
3696
|
return;
|
|
3697
3697
|
t || (r = r.map((l) => l.map(String)).sort((l, c) => l.length - c.length));
|
|
3698
3698
|
const [a, ...i] = r;
|
|
3699
|
-
a.length === 0 ? s = i.map(
|
|
3700
|
-
}), s ?
|
|
3699
|
+
a.length === 0 ? s = i.map(On) : n[On(a)] = i.map(On);
|
|
3700
|
+
}), s ? qn(n) ? [s] : [s, n] : qn(n) ? void 0 : n;
|
|
3701
3701
|
}
|
|
3702
3702
|
var Vr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
3703
|
-
const l =
|
|
3703
|
+
const l = xc(e);
|
|
3704
3704
|
if (!l) {
|
|
3705
|
-
|
|
3705
|
+
Qc(e, r, t);
|
|
3706
3706
|
const h = i.get(e);
|
|
3707
3707
|
if (h)
|
|
3708
3708
|
return s ? {
|
|
3709
3709
|
transformedValue: null
|
|
3710
3710
|
} : h;
|
|
3711
3711
|
}
|
|
3712
|
-
if (!
|
|
3712
|
+
if (!qc(e, n)) {
|
|
3713
3713
|
const h = Gs(e, n), p = h ? {
|
|
3714
3714
|
transformedValue: h.value,
|
|
3715
3715
|
annotations: [h.type]
|
|
@@ -3722,16 +3722,16 @@ var Vr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3722
3722
|
return {
|
|
3723
3723
|
transformedValue: null
|
|
3724
3724
|
};
|
|
3725
|
-
const c = Gs(e, n), d = (c == null ? void 0 : c.value) ?? e, f =
|
|
3725
|
+
const c = Gs(e, n), d = (c == null ? void 0 : c.value) ?? e, f = xe(d) ? [] : {}, u = {};
|
|
3726
3726
|
ft(d, (h, p) => {
|
|
3727
3727
|
if (p === "__proto__" || p === "constructor" || p === "prototype")
|
|
3728
3728
|
throw new Error(`Detected property ${p}. This is a prototype pollution risk, please remove it from your object.`);
|
|
3729
3729
|
const _ = Vr(h, t, n, s, [...r, p], [...a, e], i);
|
|
3730
|
-
f[p] = _.transformedValue,
|
|
3731
|
-
u[
|
|
3730
|
+
f[p] = _.transformedValue, xe(_.annotations) ? u[p] = _.annotations : wt(_.annotations) && ft(_.annotations, (I, y) => {
|
|
3731
|
+
u[xr(p) + "." + y] = I;
|
|
3732
3732
|
});
|
|
3733
3733
|
});
|
|
3734
|
-
const g =
|
|
3734
|
+
const g = qn(u) ? {
|
|
3735
3735
|
transformedValue: f,
|
|
3736
3736
|
annotations: c ? [c.type] : void 0
|
|
3737
3737
|
} : {
|
|
@@ -3740,19 +3740,19 @@ var Vr = (e, t, n, s, r = [], a = [], i = /* @__PURE__ */ new Map()) => {
|
|
|
3740
3740
|
};
|
|
3741
3741
|
return l || i.set(e, g), g;
|
|
3742
3742
|
};
|
|
3743
|
-
function
|
|
3743
|
+
function $r(e) {
|
|
3744
3744
|
return Object.prototype.toString.call(e).slice(8, -1);
|
|
3745
3745
|
}
|
|
3746
3746
|
function ks(e) {
|
|
3747
|
-
return
|
|
3747
|
+
return $r(e) === "Array";
|
|
3748
3748
|
}
|
|
3749
|
-
function
|
|
3750
|
-
if (
|
|
3749
|
+
function jc(e) {
|
|
3750
|
+
if ($r(e) !== "Object")
|
|
3751
3751
|
return !1;
|
|
3752
3752
|
const t = Object.getPrototypeOf(e);
|
|
3753
3753
|
return !!t && t.constructor === Object && t === Object.prototype;
|
|
3754
3754
|
}
|
|
3755
|
-
function
|
|
3755
|
+
function zc(e, t, n, s, r) {
|
|
3756
3756
|
const a = {}.propertyIsEnumerable.call(s, t) ? "enumerable" : "nonenumerable";
|
|
3757
3757
|
a === "enumerable" && (e[t] = n), r && a === "nonenumerable" && Object.defineProperty(e, t, {
|
|
3758
3758
|
value: n,
|
|
@@ -3764,14 +3764,14 @@ function $c(e, t, n, s, r) {
|
|
|
3764
3764
|
function jn(e, t = {}) {
|
|
3765
3765
|
if (ks(e))
|
|
3766
3766
|
return e.map((r) => jn(r, t));
|
|
3767
|
-
if (!
|
|
3767
|
+
if (!jc(e))
|
|
3768
3768
|
return e;
|
|
3769
3769
|
const n = Object.getOwnPropertyNames(e), s = Object.getOwnPropertySymbols(e);
|
|
3770
3770
|
return [...n, ...s].reduce((r, a) => {
|
|
3771
3771
|
if (ks(t.props) && !t.props.includes(a))
|
|
3772
3772
|
return r;
|
|
3773
3773
|
const i = e[a], l = jn(i, t);
|
|
3774
|
-
return
|
|
3774
|
+
return zc(r, a, l, e, t.nonenumerable), r;
|
|
3775
3775
|
}, {});
|
|
3776
3776
|
}
|
|
3777
3777
|
var B = class {
|
|
@@ -3779,7 +3779,7 @@ var B = class {
|
|
|
3779
3779
|
* @param dedupeReferentialEqualities If true, SuperJSON will make sure only one instance of referentially equal objects are serialized and the rest are replaced with `null`.
|
|
3780
3780
|
*/
|
|
3781
3781
|
constructor({ dedupe: e = !1 } = {}) {
|
|
3782
|
-
this.classRegistry = new
|
|
3782
|
+
this.classRegistry = new _c(), this.symbolRegistry = new Gr((t) => t.description ?? ""), this.customTransformerRegistry = new bc(), this.allowedErrorProps = [], this.dedupe = e;
|
|
3783
3783
|
}
|
|
3784
3784
|
serialize(e) {
|
|
3785
3785
|
const t = /* @__PURE__ */ new Map(), n = Vr(e, t, this, this.dedupe), s = {
|
|
@@ -3789,7 +3789,7 @@ var B = class {
|
|
|
3789
3789
|
...s.meta,
|
|
3790
3790
|
values: n.annotations
|
|
3791
3791
|
});
|
|
3792
|
-
const r =
|
|
3792
|
+
const r = Wc(t, this.dedupe);
|
|
3793
3793
|
return r && (s.meta = {
|
|
3794
3794
|
...s.meta,
|
|
3795
3795
|
referentialEqualities: r
|
|
@@ -3798,7 +3798,7 @@ var B = class {
|
|
|
3798
3798
|
deserialize(e) {
|
|
3799
3799
|
const { json: t, meta: n } = e;
|
|
3800
3800
|
let s = jn(t);
|
|
3801
|
-
return n != null && n.values && (s =
|
|
3801
|
+
return n != null && n.values && (s = Vc(s, n.values, this)), n != null && n.referentialEqualities && (s = $c(s, n.referentialEqualities)), s;
|
|
3802
3802
|
}
|
|
3803
3803
|
stringify(e) {
|
|
3804
3804
|
return JSON.stringify(this.serialize(e));
|
|
@@ -3831,44 +3831,44 @@ B.registerClass = B.defaultInstance.registerClass.bind(B.defaultInstance);
|
|
|
3831
3831
|
B.registerSymbol = B.defaultInstance.registerSymbol.bind(B.defaultInstance);
|
|
3832
3832
|
B.registerCustom = B.defaultInstance.registerCustom.bind(B.defaultInstance);
|
|
3833
3833
|
B.allowErrorProps = B.defaultInstance.allowErrorProps.bind(B.defaultInstance);
|
|
3834
|
-
var
|
|
3835
|
-
function
|
|
3834
|
+
var Yc = B.serialize, kd = B.stringify;
|
|
3835
|
+
function Dd(e) {
|
|
3836
3836
|
return e.state.fetchStatus === "fetching" ? "fetching" : e.getObserversCount() ? e.state.fetchStatus === "paused" ? "paused" : e.isStale() ? "stale" : "fresh" : "inactive";
|
|
3837
3837
|
}
|
|
3838
|
-
function
|
|
3838
|
+
function xd(e, t) {
|
|
3839
3839
|
return `${e}${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
3840
3840
|
}
|
|
3841
|
-
function
|
|
3841
|
+
function Od({
|
|
3842
3842
|
queryState: e,
|
|
3843
3843
|
observerCount: t,
|
|
3844
3844
|
isStale: n
|
|
3845
3845
|
}) {
|
|
3846
3846
|
return e.fetchStatus === "fetching" ? "blue" : t ? e.fetchStatus === "paused" ? "purple" : n ? "yellow" : "green" : "gray";
|
|
3847
3847
|
}
|
|
3848
|
-
function
|
|
3848
|
+
function Rd({
|
|
3849
3849
|
status: e,
|
|
3850
3850
|
isPaused: t
|
|
3851
3851
|
}) {
|
|
3852
3852
|
return t ? "purple" : e === "error" ? "red" : e === "pending" ? "yellow" : e === "success" ? "green" : "gray";
|
|
3853
3853
|
}
|
|
3854
|
-
function
|
|
3854
|
+
function Ud(e) {
|
|
3855
3855
|
return e === "fresh" ? "green" : e === "stale" ? "yellow" : e === "paused" ? "purple" : e === "inactive" ? "gray" : "blue";
|
|
3856
3856
|
}
|
|
3857
|
-
var
|
|
3857
|
+
var Bd = (e, t = !1) => {
|
|
3858
3858
|
const {
|
|
3859
3859
|
json: n
|
|
3860
|
-
} =
|
|
3860
|
+
} = Yc(e);
|
|
3861
3861
|
return JSON.stringify(n, null, t ? 2 : void 0);
|
|
3862
|
-
}, zt = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3,
|
|
3863
|
-
status:
|
|
3864
|
-
"query hash":
|
|
3865
|
-
"last updated":
|
|
3866
|
-
}, Yt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Qr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1,
|
|
3867
|
-
status:
|
|
3862
|
+
}, zt = (e) => e.state.fetchStatus !== "idle" ? 0 : e.getObserversCount() ? e.isStale() ? 2 : 1 : 3, Jc = (e, t) => e.queryHash.localeCompare(t.queryHash), qr = (e, t) => e.state.dataUpdatedAt < t.state.dataUpdatedAt ? 1 : -1, Zc = (e, t) => zt(e) === zt(t) ? qr(e, t) : zt(e) > zt(t) ? 1 : -1, Md = {
|
|
3863
|
+
status: Zc,
|
|
3864
|
+
"query hash": Jc,
|
|
3865
|
+
"last updated": qr
|
|
3866
|
+
}, Yt = (e) => e.state.isPaused ? 0 : e.state.status === "error" ? 2 : e.state.status === "pending" ? 1 : 3, Qr = (e, t) => e.state.submittedAt < t.state.submittedAt ? 1 : -1, Xc = (e, t) => Yt(e) === Yt(t) ? Qr(e, t) : Yt(e) > Yt(t) ? 1 : -1, Fd = {
|
|
3867
|
+
status: Xc,
|
|
3868
3868
|
"last updated": Qr
|
|
3869
|
-
},
|
|
3870
|
-
const [e, t] =
|
|
3871
|
-
return
|
|
3869
|
+
}, Hd = (e) => e * parseFloat(getComputedStyle(document.documentElement).fontSize), Kd = () => {
|
|
3870
|
+
const [e, t] = $("dark");
|
|
3871
|
+
return Ul(() => {
|
|
3872
3872
|
const n = window.matchMedia("(prefers-color-scheme: dark)");
|
|
3873
3873
|
t(n.matches ? "dark" : "light");
|
|
3874
3874
|
const s = (r) => {
|
|
@@ -3940,14 +3940,14 @@ var Gd = (e, t = !1) => {
|
|
|
3940
3940
|
if (!e || document.querySelector("#_goober") || (t == null ? void 0 : t.querySelector("#_goober"))) return;
|
|
3941
3941
|
const s = document.createElement("style"), r = document.createTextNode("");
|
|
3942
3942
|
s.appendChild(r), s.id = "_goober", s.setAttribute("nonce", e), t ? t.appendChild(s) : document.head.appendChild(s);
|
|
3943
|
-
}, ze, Nt, vt,
|
|
3943
|
+
}, ze, Nt, vt, Ct, Oe, Lt, Ye, Je, Ze, Xe, et, Gt, tt, nt, kt, Bs, eu = (Bs = class {
|
|
3944
3944
|
constructor(e) {
|
|
3945
3945
|
G(this, ze);
|
|
3946
3946
|
G(this, Nt);
|
|
3947
3947
|
G(this, vt);
|
|
3948
|
-
G(this, Lt);
|
|
3949
|
-
G(this, xe, !1);
|
|
3950
3948
|
G(this, Ct);
|
|
3949
|
+
G(this, Oe, !1);
|
|
3950
|
+
G(this, Lt);
|
|
3951
3951
|
G(this, Ye);
|
|
3952
3952
|
G(this, Je);
|
|
3953
3953
|
G(this, Ze);
|
|
@@ -3971,7 +3971,7 @@ var Gd = (e, t = !1) => {
|
|
|
3971
3971
|
hideDisabledQueries: u,
|
|
3972
3972
|
theme: g
|
|
3973
3973
|
} = e;
|
|
3974
|
-
v(this, ze,
|
|
3974
|
+
v(this, ze, $(t)), v(this, vt, n), v(this, Ct, s), v(this, Nt, r), v(this, Lt, d), v(this, Ye, f), v(this, Je, $(a)), v(this, Ze, $(i)), v(this, Xe, $(l)), v(this, et, $(c)), v(this, Gt, $(u)), v(this, nt, $(g));
|
|
3975
3975
|
}
|
|
3976
3976
|
setButtonPosition(e) {
|
|
3977
3977
|
S(this, Je)[1](e);
|
|
@@ -3992,17 +3992,17 @@ var Gd = (e, t = !1) => {
|
|
|
3992
3992
|
S(this, nt)[1](e);
|
|
3993
3993
|
}
|
|
3994
3994
|
mount(e) {
|
|
3995
|
-
if (S(this,
|
|
3995
|
+
if (S(this, Oe))
|
|
3996
3996
|
throw new Error("Devtools is already mounted");
|
|
3997
3997
|
const t = vr(() => {
|
|
3998
3998
|
const n = this, [s] = S(this, Je), [r] = S(this, Ze), [a] = S(this, Xe), [i] = S(this, et), [l] = S(this, Gt), [c] = S(this, ze), [d] = S(this, nt);
|
|
3999
3999
|
let f;
|
|
4000
|
-
return S(this, tt) ? f = S(this, tt) : (f = Ir(() => import("./WDYDFRGG-
|
|
4000
|
+
return S(this, tt) ? f = S(this, tt) : (f = Ir(() => import("./WDYDFRGG-O9GIrtX0.js")), v(this, tt, f)), Wr(S(this, Lt), S(this, Ye)), wr(f, br({
|
|
4001
4001
|
get queryFlavor() {
|
|
4002
4002
|
return S(n, vt);
|
|
4003
4003
|
},
|
|
4004
4004
|
get version() {
|
|
4005
|
-
return S(n,
|
|
4005
|
+
return S(n, Ct);
|
|
4006
4006
|
},
|
|
4007
4007
|
get onlineManager() {
|
|
4008
4008
|
return S(n, Nt);
|
|
@@ -4034,20 +4034,20 @@ var Gd = (e, t = !1) => {
|
|
|
4034
4034
|
}
|
|
4035
4035
|
}));
|
|
4036
4036
|
}, e);
|
|
4037
|
-
v(this,
|
|
4037
|
+
v(this, Oe, !0), v(this, kt, t);
|
|
4038
4038
|
}
|
|
4039
4039
|
unmount() {
|
|
4040
4040
|
var e;
|
|
4041
|
-
if (!S(this,
|
|
4041
|
+
if (!S(this, Oe))
|
|
4042
4042
|
throw new Error("Devtools is not mounted");
|
|
4043
|
-
(e = S(this, kt)) == null || e.call(this), v(this,
|
|
4043
|
+
(e = S(this, kt)) == null || e.call(this), v(this, Oe, !1);
|
|
4044
4044
|
}
|
|
4045
|
-
}, ze = new WeakMap(), Nt = new WeakMap(), vt = new WeakMap(),
|
|
4045
|
+
}, ze = new WeakMap(), Nt = new WeakMap(), vt = new WeakMap(), Ct = new WeakMap(), Oe = new WeakMap(), Lt = new WeakMap(), Ye = new WeakMap(), Je = new WeakMap(), Ze = new WeakMap(), Xe = new WeakMap(), et = new WeakMap(), Gt = new WeakMap(), tt = new WeakMap(), nt = new WeakMap(), kt = new WeakMap(), Bs), st, Dt, xt, Ot, Re, Rt, rt, at, it, ot, lt, Ut, ct, ut, dt, Bt, Ms, tu = (Ms = class {
|
|
4046
4046
|
constructor(e) {
|
|
4047
4047
|
G(this, st);
|
|
4048
4048
|
G(this, Dt);
|
|
4049
|
-
G(this, Ot);
|
|
4050
4049
|
G(this, xt);
|
|
4050
|
+
G(this, Ot);
|
|
4051
4051
|
G(this, Re, !1);
|
|
4052
4052
|
G(this, Rt);
|
|
4053
4053
|
G(this, rt);
|
|
@@ -4075,7 +4075,7 @@ var Gd = (e, t = !1) => {
|
|
|
4075
4075
|
hideDisabledQueries: g,
|
|
4076
4076
|
theme: h
|
|
4077
4077
|
} = e;
|
|
4078
|
-
v(this, st,
|
|
4078
|
+
v(this, st, $(t)), v(this, xt, n), v(this, Ot, s), v(this, Dt, r), v(this, Rt, d), v(this, rt, f), v(this, at, $(a)), v(this, it, $(i)), v(this, ot, $(l)), v(this, lt, $(c)), v(this, Ut, $(g)), v(this, ct, $(u)), v(this, dt, $(h));
|
|
4079
4079
|
}
|
|
4080
4080
|
setButtonPosition(e) {
|
|
4081
4081
|
S(this, at)[1](e);
|
|
@@ -4104,12 +4104,12 @@ var Gd = (e, t = !1) => {
|
|
|
4104
4104
|
const t = vr(() => {
|
|
4105
4105
|
const n = this, [s] = S(this, at), [r] = S(this, it), [a] = S(this, ot), [i] = S(this, lt), [l] = S(this, Ut), [c] = S(this, st), [d] = S(this, ct), [f] = S(this, dt);
|
|
4106
4106
|
let u;
|
|
4107
|
-
return S(this, ut) ? u = S(this, ut) : (u = Ir(() => import("./2SSKDMRQ-
|
|
4107
|
+
return S(this, ut) ? u = S(this, ut) : (u = Ir(() => import("./2SSKDMRQ-Dvf9zadl.js")), v(this, ut, u)), Wr(S(this, Rt), S(this, rt)), wr(u, br({
|
|
4108
4108
|
get queryFlavor() {
|
|
4109
|
-
return S(n,
|
|
4109
|
+
return S(n, xt);
|
|
4110
4110
|
},
|
|
4111
4111
|
get version() {
|
|
4112
|
-
return S(n,
|
|
4112
|
+
return S(n, Ot);
|
|
4113
4113
|
},
|
|
4114
4114
|
get onlineManager() {
|
|
4115
4115
|
return S(n, Dt);
|
|
@@ -4152,8 +4152,8 @@ var Gd = (e, t = !1) => {
|
|
|
4152
4152
|
throw new Error("Devtools is not mounted");
|
|
4153
4153
|
(e = S(this, Bt)) == null || e.call(this), v(this, Re, !1);
|
|
4154
4154
|
}
|
|
4155
|
-
}, st = new WeakMap(), Dt = new WeakMap(),
|
|
4156
|
-
function
|
|
4155
|
+
}, st = new WeakMap(), Dt = new WeakMap(), xt = new WeakMap(), Ot = new WeakMap(), Re = new WeakMap(), Rt = new WeakMap(), rt = new WeakMap(), at = new WeakMap(), it = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), Ut = new WeakMap(), ct = new WeakMap(), ut = new WeakMap(), dt = new WeakMap(), Bt = new WeakMap(), Ms);
|
|
4156
|
+
function nu(e) {
|
|
4157
4157
|
const t = X(e.client), n = z.useRef(null), {
|
|
4158
4158
|
buttonPosition: s,
|
|
4159
4159
|
position: r,
|
|
@@ -4164,7 +4164,7 @@ function Zc(e) {
|
|
|
4164
4164
|
hideDisabledQueries: d,
|
|
4165
4165
|
theme: f
|
|
4166
4166
|
} = e, [u] = z.useState(
|
|
4167
|
-
new
|
|
4167
|
+
new eu({
|
|
4168
4168
|
client: t,
|
|
4169
4169
|
queryFlavor: "React Query",
|
|
4170
4170
|
version: "5",
|
|
@@ -4195,7 +4195,7 @@ function Zc(e) {
|
|
|
4195
4195
|
u.unmount();
|
|
4196
4196
|
}), [u]), /* @__PURE__ */ o("div", { dir: "ltr", className: "tsqd-parent-container", ref: n });
|
|
4197
4197
|
}
|
|
4198
|
-
function
|
|
4198
|
+
function su(e) {
|
|
4199
4199
|
const t = X(e.client), n = z.useRef(null), {
|
|
4200
4200
|
errorTypes: s,
|
|
4201
4201
|
styleNonce: r,
|
|
@@ -4203,7 +4203,7 @@ function Xc(e) {
|
|
|
4203
4203
|
hideDisabledQueries: i,
|
|
4204
4204
|
theme: l
|
|
4205
4205
|
} = e, [c] = z.useState(
|
|
4206
|
-
new
|
|
4206
|
+
new tu({
|
|
4207
4207
|
client: t,
|
|
4208
4208
|
queryFlavor: "React Query",
|
|
4209
4209
|
version: "5",
|
|
@@ -4241,16 +4241,16 @@ function Xc(e) {
|
|
|
4241
4241
|
}
|
|
4242
4242
|
var Ds = process.env.NODE_ENV !== "development" ? function() {
|
|
4243
4243
|
return null;
|
|
4244
|
-
} :
|
|
4244
|
+
} : nu;
|
|
4245
4245
|
process.env.NODE_ENV;
|
|
4246
|
-
const
|
|
4246
|
+
const ru = Ne(""), au = () => {
|
|
4247
4247
|
us("dynamic-page-selector", {
|
|
4248
4248
|
description: "Dynamic page selector"
|
|
4249
4249
|
}), us("enable-add-page-dropdown", {
|
|
4250
4250
|
description: "Enable add page dropdown"
|
|
4251
4251
|
});
|
|
4252
|
-
},
|
|
4253
|
-
const { data: e } = fe(), { data: t } = Ge(), { data: n } = He(), s =
|
|
4252
|
+
}, iu = () => {
|
|
4253
|
+
const { data: e } = fe(), { data: t } = Ge(), { data: n } = He(), s = C(), r = k(), a = j(() => (n == null ? void 0 : n.fallbackLang) || "en", [n == null ? void 0 : n.fallbackLang]), i = le(/* @__PURE__ */ new Map());
|
|
4254
4254
|
return re({
|
|
4255
4255
|
mutationFn: async ({ block: l }) => {
|
|
4256
4256
|
const c = l._id, d = (t == null ? void 0 : t.lang) || a, f = `${c}:${d}`;
|
|
@@ -4280,7 +4280,7 @@ const eu = Ne(""), tu = () => {
|
|
|
4280
4280
|
}), u;
|
|
4281
4281
|
}
|
|
4282
4282
|
});
|
|
4283
|
-
},
|
|
4283
|
+
}, ou = () => {
|
|
4284
4284
|
const [, e] = ve();
|
|
4285
4285
|
return K(
|
|
4286
4286
|
(t, n) => {
|
|
@@ -4289,8 +4289,8 @@ const eu = Ne(""), tu = () => {
|
|
|
4289
4289
|
},
|
|
4290
4290
|
[e]
|
|
4291
4291
|
);
|
|
4292
|
-
},
|
|
4293
|
-
const e =
|
|
4292
|
+
}, lu = () => {
|
|
4293
|
+
const e = ou();
|
|
4294
4294
|
return K(
|
|
4295
4295
|
({ pageId: t }) => {
|
|
4296
4296
|
e(t);
|
|
@@ -4298,7 +4298,7 @@ const eu = Ne(""), tu = () => {
|
|
|
4298
4298
|
[e]
|
|
4299
4299
|
);
|
|
4300
4300
|
}, is = () => {
|
|
4301
|
-
const e = k(), t =
|
|
4301
|
+
const e = k(), t = C(), n = X();
|
|
4302
4302
|
return de({
|
|
4303
4303
|
queryKey: [E.GET_WEBSITE_DATA],
|
|
4304
4304
|
staleTime: 300 * 1e3,
|
|
@@ -4308,7 +4308,7 @@ const eu = Ne(""), tu = () => {
|
|
|
4308
4308
|
}
|
|
4309
4309
|
});
|
|
4310
4310
|
};
|
|
4311
|
-
function
|
|
4311
|
+
function cu(e) {
|
|
4312
4312
|
const t = {};
|
|
4313
4313
|
for (const n of e)
|
|
4314
4314
|
t[n.id] = {
|
|
@@ -4320,16 +4320,16 @@ function au(e) {
|
|
|
4320
4320
|
};
|
|
4321
4321
|
return t;
|
|
4322
4322
|
}
|
|
4323
|
-
const
|
|
4323
|
+
const uu = () => {
|
|
4324
4324
|
const { data: e } = Ke();
|
|
4325
|
-
return { data: j(() =>
|
|
4326
|
-
},
|
|
4325
|
+
return { data: j(() => cu(e ?? []), [e]) };
|
|
4326
|
+
}, xs = {
|
|
4327
4327
|
async getUILibraryBlock(e, t, n) {
|
|
4328
4328
|
const s = await t(n, {
|
|
4329
4329
|
action: "GET_LIBRARY_ITEM",
|
|
4330
4330
|
data: { id: e.id }
|
|
4331
4331
|
}), r = Q(s, "html", ""), a = Q(s, "blocks", []);
|
|
4332
|
-
return
|
|
4332
|
+
return Xa(a) ? a : Oi(r);
|
|
4333
4333
|
},
|
|
4334
4334
|
async getUILibraryBlocks(e, t, n) {
|
|
4335
4335
|
return (await t(n, {
|
|
@@ -4339,8 +4339,8 @@ const iu = () => {
|
|
|
4339
4339
|
...r
|
|
4340
4340
|
}));
|
|
4341
4341
|
}
|
|
4342
|
-
},
|
|
4343
|
-
const e = k(), t =
|
|
4342
|
+
}, du = () => {
|
|
4343
|
+
const e = k(), t = C(), { data: n } = is(), s = n == null ? void 0 : n.libraries;
|
|
4344
4344
|
return de({
|
|
4345
4345
|
queryKey: [E.UI_LIBRARIES],
|
|
4346
4346
|
staleTime: "static",
|
|
@@ -4349,41 +4349,41 @@ const iu = () => {
|
|
|
4349
4349
|
...a
|
|
4350
4350
|
}));
|
|
4351
4351
|
return r.forEach((a) => {
|
|
4352
|
-
|
|
4352
|
+
Zr(a.id, {
|
|
4353
4353
|
name: a.isSiteLibrary ? a.name + " (Current Site) " : a.name,
|
|
4354
4354
|
description: a.description,
|
|
4355
|
-
getBlocksList: (i) =>
|
|
4356
|
-
getBlock: ({ block: i }) =>
|
|
4355
|
+
getBlocksList: (i) => xs.getUILibraryBlocks(i, e, t),
|
|
4356
|
+
getBlock: ({ block: i }) => xs.getUILibraryBlock(i, e, t)
|
|
4357
4357
|
});
|
|
4358
4358
|
}), r;
|
|
4359
4359
|
}
|
|
4360
4360
|
});
|
|
4361
|
-
},
|
|
4362
|
-
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
const
|
|
4361
|
+
}, fu = M(() => import("./page-lock-CwZKJ4IE.js")), hu = M(() => import("./no-language-page-dialog-C_fHI2zI.js")), gu = M(() => import("./digital-asset-manager-BZMb6sC7.js")), mu = M(() => import("./save-to-lib-DMnv7ENo.js")), Eu = M(() => import("./web-preview-D9pXonAv.js"));
|
|
4362
|
+
au();
|
|
4363
|
+
xi();
|
|
4364
|
+
ta(ul);
|
|
4365
|
+
Gl();
|
|
4366
|
+
Xr(gu);
|
|
4367
|
+
ea(mu);
|
|
4368
|
+
const pu = {
|
|
4369
4369
|
role: "admin",
|
|
4370
4370
|
permissions: null
|
|
4371
|
-
},
|
|
4371
|
+
}, Os = (e) => {
|
|
4372
4372
|
const { isLoading: t } = or();
|
|
4373
|
-
return t ? /* @__PURE__ */ o(Tt, { className: "fixed inset-0 bg-white", children: /* @__PURE__ */ o(Fe, { className: "h-6 w-6 animate-spin text-primary" }) }) : /* @__PURE__ */ o(
|
|
4374
|
-
},
|
|
4373
|
+
return t ? /* @__PURE__ */ o(Tt, { className: "fixed inset-0 bg-white", children: /* @__PURE__ */ o(Fe, { className: "h-6 w-6 animate-spin text-primary" }) }) : /* @__PURE__ */ o(yu, { ...e });
|
|
4374
|
+
}, yu = (e) => {
|
|
4375
4375
|
const { data: t, isFetching: n, isError: s } = is();
|
|
4376
4376
|
return !t || n ? /* @__PURE__ */ o(Tt, { className: "fixed inset-0 bg-white", children: /* @__PURE__ */ o(Fe, { className: "h-6 w-6 animate-spin text-primary" }) }) : s ? /* @__PURE__ */ m(Tt, { className: "fixed inset-0 bg-white", children: [
|
|
4377
4377
|
/* @__PURE__ */ o("p", { children: "Failed to load website data" }),
|
|
4378
|
-
/* @__PURE__ */ o(
|
|
4379
|
-
] }) : /* @__PURE__ */ o(
|
|
4380
|
-
},
|
|
4378
|
+
/* @__PURE__ */ o(x, { onClick: () => window.location.reload(), children: "Retry" })
|
|
4379
|
+
] }) : /* @__PURE__ */ o(Au, { ...e });
|
|
4380
|
+
}, Au = ({ ...e }) => {
|
|
4381
4381
|
var Kt;
|
|
4382
|
-
const { data: t } = is(), { data: n } =
|
|
4382
|
+
const { data: t } = is(), { data: n } = uu(), { data: s } = du(), { collections: r, pageTypes: a, websiteSettings: i } = t, l = j(() => (i == null ? void 0 : i.fallbackLang) || "en", [i]), { data: c, isFetching: d } = or(), f = c || pu, [u] = ve(), g = u.get("page"), { data: h } = fe(), { data: p, isFetching: _ } = gl(), { blocks: I } = hl(((Kt = p == null ? void 0 : p.draftPage) == null ? void 0 : Kt.blocks) ?? []), { pageStatus: y } = Ce(), A = fl(), { onSave: w } = El(), { mutateAsync: F } = iu(), { getPartialBlocks: V, getPartialBlockBlocks: D } = pl(), { searchPages: Z } = zi(), { mutateAsync: ee } = ml(), H = lu(), [T, b] = N(!1), R = le([]), q = j(() => Q(i, "theme", {}) || {}, [i]), he = j(() => Q(i, "languages", []) || [], [i]), gt = j(() => Q(i, "designTokens", {}) || {}, [i]), _e = y === oe.EDITING, Ae = y === oe.CHECKING, Pe = _ || Ae;
|
|
4383
4383
|
J(() => {
|
|
4384
4384
|
R.current = I;
|
|
4385
4385
|
}, [I]);
|
|
4386
|
-
const [Pn] = pe(
|
|
4386
|
+
const [Pn] = pe(ru);
|
|
4387
4387
|
J(() => {
|
|
4388
4388
|
const ne = () => {
|
|
4389
4389
|
document.hidden ? b(!0) : b(!1);
|
|
@@ -4393,21 +4393,21 @@ const hu = {
|
|
|
4393
4393
|
const wn = j(() => {
|
|
4394
4394
|
const ne = {};
|
|
4395
4395
|
return f && (ne.permissions = Q(f, "permissions", null), ne.role = Q(f, "role", "user")), ne.pageExternalData = (p == null ? void 0 : p.builderPageData) ?? {}, ne;
|
|
4396
|
-
}, [f, p]),
|
|
4396
|
+
}, [f, p]), qe = j(() => s == null ? void 0 : s.some((ne) => ne.isSiteLibrary), [s]);
|
|
4397
4397
|
return /* @__PURE__ */ m(me, { children: [
|
|
4398
4398
|
_ && /* @__PURE__ */ o(Tt, { className: d ? "fixed inset-0 bg-white" : "bg-white/75", children: /* @__PURE__ */ o(Fe, { className: `animate-spin text-primary ${d ? "h-6 w-6" : "h-5 w-5"}` }) }),
|
|
4399
4399
|
Pn && /* @__PURE__ */ o(
|
|
4400
4400
|
Y,
|
|
4401
4401
|
{
|
|
4402
4402
|
fallback: /* @__PURE__ */ o("div", { className: "absolute inset-0 z-[999999] flex min-h-screen w-screen items-center justify-center bg-gray-100", children: /* @__PURE__ */ o(Fe, { className: "h-6 w-6 animate-spin text-primary" }) }),
|
|
4403
|
-
children: /* @__PURE__ */ o(
|
|
4403
|
+
children: /* @__PURE__ */ o(Eu, {})
|
|
4404
4404
|
}
|
|
4405
4405
|
),
|
|
4406
4406
|
/* @__PURE__ */ o(
|
|
4407
|
-
|
|
4407
|
+
xa,
|
|
4408
4408
|
{
|
|
4409
4409
|
siteWideUsage: n ?? {},
|
|
4410
|
-
flags: e.flags ? { ...e.flags, librarySite:
|
|
4410
|
+
flags: e.flags ? { ...e.flags, librarySite: qe } : { librarySite: qe },
|
|
4411
4411
|
gotoPage: H,
|
|
4412
4412
|
collections: r ?? [],
|
|
4413
4413
|
getBlockAsyncProps: F,
|
|
@@ -4416,7 +4416,7 @@ const hu = {
|
|
|
4416
4416
|
loading: Pe,
|
|
4417
4417
|
fallbackLang: l,
|
|
4418
4418
|
languages: he,
|
|
4419
|
-
brandingOptions:
|
|
4419
|
+
brandingOptions: q,
|
|
4420
4420
|
designTokens: gt,
|
|
4421
4421
|
translations: e.translations || {},
|
|
4422
4422
|
locale: e.locale || "en",
|
|
@@ -4427,7 +4427,7 @@ const hu = {
|
|
|
4427
4427
|
getPartialBlockBlocks: D,
|
|
4428
4428
|
getPartialBlocks: V,
|
|
4429
4429
|
blocks: _ ? [] : I,
|
|
4430
|
-
theme:
|
|
4430
|
+
theme: ei(q),
|
|
4431
4431
|
pageTypes: a,
|
|
4432
4432
|
searchPageTypeItems: Z,
|
|
4433
4433
|
askAiCallBack: A,
|
|
@@ -4446,12 +4446,12 @@ const hu = {
|
|
|
4446
4446
|
},
|
|
4447
4447
|
onSaveWebsiteData: async ({ type: ne, data: Qe }) => (ne === "THEME" ? await ee({ settings: { theme: Qe } }) : ne === "DESIGN_TOKENS" && await ee({ settings: { designTokens: Qe } }), !0),
|
|
4448
4448
|
...wn,
|
|
4449
|
-
children: /* @__PURE__ */ o(
|
|
4449
|
+
children: /* @__PURE__ */ o(fu, { isFetchingPageData: _ })
|
|
4450
4450
|
}
|
|
4451
4451
|
),
|
|
4452
|
-
/* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(
|
|
4452
|
+
/* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(hu, {}) })
|
|
4453
4453
|
] });
|
|
4454
|
-
},
|
|
4454
|
+
}, Tu = new Ni({
|
|
4455
4455
|
defaultOptions: {
|
|
4456
4456
|
queries: {
|
|
4457
4457
|
refetchOnWindowFocus: !1,
|
|
@@ -4459,7 +4459,7 @@ const hu = {
|
|
|
4459
4459
|
refetchOnMount: !1
|
|
4460
4460
|
}
|
|
4461
4461
|
}
|
|
4462
|
-
}),
|
|
4462
|
+
}), Vd = (e) => {
|
|
4463
4463
|
const [, t] = pn(), [n, s] = N(!1);
|
|
4464
4464
|
return J(() => (t(
|
|
4465
4465
|
Ws(e, [
|
|
@@ -4482,19 +4482,19 @@ const hu = {
|
|
|
4482
4482
|
}, 200), () => {
|
|
4483
4483
|
s(!1), t({});
|
|
4484
4484
|
}), [e, t]), n ? Q(e, "hasReactQueryProvider", !1) === !0 ? /* @__PURE__ */ m(me, { children: [
|
|
4485
|
-
/* @__PURE__ */ o(
|
|
4485
|
+
/* @__PURE__ */ o(Os, { ...e }),
|
|
4486
4486
|
/* @__PURE__ */ o(Ds, {})
|
|
4487
|
-
] }) : /* @__PURE__ */ m(
|
|
4488
|
-
/* @__PURE__ */ o(
|
|
4487
|
+
] }) : /* @__PURE__ */ m(vi, { client: Tu, children: [
|
|
4488
|
+
/* @__PURE__ */ o(Os, { ...e }),
|
|
4489
4489
|
/* @__PURE__ */ o(Ds, {})
|
|
4490
4490
|
] }) : /* @__PURE__ */ o("div", {});
|
|
4491
|
-
},
|
|
4492
|
-
function
|
|
4491
|
+
}, Su = z.lazy(() => import("./nested-path-selector-content-DmtCI3q9.js"));
|
|
4492
|
+
function _u({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
4493
4493
|
const [r, a] = z.useState(!1);
|
|
4494
4494
|
return /* @__PURE__ */ m(Oa, { open: r, onOpenChange: a, children: [
|
|
4495
4495
|
/* @__PURE__ */ m(hn, { children: [
|
|
4496
|
-
/* @__PURE__ */ o(gn, { asChild: !0, children: /* @__PURE__ */ o(
|
|
4497
|
-
|
|
4496
|
+
/* @__PURE__ */ o(gn, { asChild: !0, children: /* @__PURE__ */ o(Ra, { asChild: !0, children: /* @__PURE__ */ o(
|
|
4497
|
+
x,
|
|
4498
4498
|
{
|
|
4499
4499
|
size: "sm",
|
|
4500
4500
|
variant: "outline",
|
|
@@ -4517,7 +4517,7 @@ function yu({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4517
4517
|
/* @__PURE__ */ o(mn, { children: "Add field" })
|
|
4518
4518
|
] }),
|
|
4519
4519
|
r && /* @__PURE__ */ o(z.Suspense, { children: /* @__PURE__ */ o(
|
|
4520
|
-
|
|
4520
|
+
Su,
|
|
4521
4521
|
{
|
|
4522
4522
|
data: e,
|
|
4523
4523
|
onSelect: t,
|
|
@@ -4528,8 +4528,8 @@ function yu({ data: e, onSelect: t, dataType: n = "value", disabled: s = !1 }) {
|
|
|
4528
4528
|
) })
|
|
4529
4529
|
] });
|
|
4530
4530
|
}
|
|
4531
|
-
const
|
|
4532
|
-
const { data: e } = fe(), { data: t } = Ge(), n =
|
|
4531
|
+
const $d = () => {
|
|
4532
|
+
const { data: e } = fe(), { data: t } = Ge(), n = C(), s = k(), r = ns(), a = ts();
|
|
4533
4533
|
return de({
|
|
4534
4534
|
queryKey: [E.GET_BUILDER_PAGE_DATA, t == null ? void 0 : t.id, a],
|
|
4535
4535
|
staleTime: 1 / 0,
|
|
@@ -4558,18 +4558,18 @@ const Ud = () => {
|
|
|
4558
4558
|
}),
|
|
4559
4559
|
enabled: !!(e != null && e.pageType) && !!t.id
|
|
4560
4560
|
});
|
|
4561
|
-
},
|
|
4562
|
-
const { savePageAsync: e } = Me(), t = X(), { isLocked: n } =
|
|
4561
|
+
}, qd = () => {
|
|
4562
|
+
const { savePageAsync: e } = Me(), t = X(), { isLocked: n } = Ce();
|
|
4563
4563
|
return K(async () => {
|
|
4564
4564
|
n || await e(), t.invalidateQueries({ queryKey: [E.GET_DRAFT_PAGE] }), t.invalidateQueries({ queryKey: [E.GET_BUILDER_PAGE_DATA] });
|
|
4565
4565
|
}, [e, t, n]);
|
|
4566
|
-
},
|
|
4566
|
+
}, Qd = () => {
|
|
4567
4567
|
const e = X();
|
|
4568
4568
|
return K(() => {
|
|
4569
4569
|
e.clear();
|
|
4570
4570
|
}, [e]);
|
|
4571
|
-
},
|
|
4572
|
-
const e =
|
|
4571
|
+
}, Wd = () => {
|
|
4572
|
+
const e = C(), t = k(), { data: n } = Ge(), s = X();
|
|
4573
4573
|
return re({
|
|
4574
4574
|
mutationFn: async (r) => {
|
|
4575
4575
|
if (!(n != null && n.id))
|
|
@@ -4593,7 +4593,7 @@ const Ud = () => {
|
|
|
4593
4593
|
console.error("Failed to update metadata");
|
|
4594
4594
|
}
|
|
4595
4595
|
});
|
|
4596
|
-
},
|
|
4596
|
+
}, Pu = M(() => import("./digital-asset-manager-BZMb6sC7.js")), jd = ({
|
|
4597
4597
|
assetId: e,
|
|
4598
4598
|
assetUrl: t,
|
|
4599
4599
|
onChange: n,
|
|
@@ -4624,7 +4624,7 @@ const Ud = () => {
|
|
|
4624
4624
|
),
|
|
4625
4625
|
/* @__PURE__ */ m("div", { className: "absolute right-2 top-2 flex gap-2", children: [
|
|
4626
4626
|
/* @__PURE__ */ o(
|
|
4627
|
-
|
|
4627
|
+
x,
|
|
4628
4628
|
{
|
|
4629
4629
|
type: "button",
|
|
4630
4630
|
variant: "outline",
|
|
@@ -4632,11 +4632,11 @@ const Ud = () => {
|
|
|
4632
4632
|
className: "h-8 w-8 rounded-full bg-white text-red-500",
|
|
4633
4633
|
onClick: g,
|
|
4634
4634
|
disabled: a,
|
|
4635
|
-
children: h ? /* @__PURE__ */ o(ys, { className: "h-4 w-4" }) : /* @__PURE__ */ o(
|
|
4635
|
+
children: h ? /* @__PURE__ */ o(ys, { className: "h-4 w-4" }) : /* @__PURE__ */ o(Ai, { className: "h-4 w-4" })
|
|
4636
4636
|
}
|
|
4637
4637
|
),
|
|
4638
4638
|
!h && /* @__PURE__ */ o(
|
|
4639
|
-
|
|
4639
|
+
x,
|
|
4640
4640
|
{
|
|
4641
4641
|
type: "button",
|
|
4642
4642
|
variant: "outline",
|
|
@@ -4659,11 +4659,11 @@ const Ud = () => {
|
|
|
4659
4659
|
] })
|
|
4660
4660
|
}
|
|
4661
4661
|
),
|
|
4662
|
-
/* @__PURE__ */ o(zn, { open: l, onOpenChange: c, children: /* @__PURE__ */ m(
|
|
4663
|
-
/* @__PURE__ */ m(
|
|
4664
|
-
/* @__PURE__ */ o(
|
|
4662
|
+
/* @__PURE__ */ o(zn, { open: l, onOpenChange: c, children: /* @__PURE__ */ m($s, { className: "h-fit w-full max-w-7xl overflow-hidden p-0", children: [
|
|
4663
|
+
/* @__PURE__ */ m(Ua, { className: "hidden border-b px-4 py-2", children: [
|
|
4664
|
+
/* @__PURE__ */ o(Ba, { children: i("Select Image") }),
|
|
4665
4665
|
/* @__PURE__ */ o(
|
|
4666
|
-
|
|
4666
|
+
x,
|
|
4667
4667
|
{
|
|
4668
4668
|
type: "button",
|
|
4669
4669
|
variant: "ghost",
|
|
@@ -4675,7 +4675,7 @@ const Ud = () => {
|
|
|
4675
4675
|
)
|
|
4676
4676
|
] }),
|
|
4677
4677
|
/* @__PURE__ */ o("div", { className: "h-full flex-1 p-4", children: /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(
|
|
4678
|
-
|
|
4678
|
+
Pu,
|
|
4679
4679
|
{
|
|
4680
4680
|
close: f,
|
|
4681
4681
|
onSelect: u,
|
|
@@ -4685,7 +4685,7 @@ const Ud = () => {
|
|
|
4685
4685
|
) }) })
|
|
4686
4686
|
] }) })
|
|
4687
4687
|
] });
|
|
4688
|
-
},
|
|
4688
|
+
}, wu = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), Rs = (e) => {
|
|
4689
4689
|
if (!e.trim())
|
|
4690
4690
|
return { isValid: !1, parsed: null, placeholders: [], error: { message: "JSON is empty" } };
|
|
4691
4691
|
try {
|
|
@@ -4720,13 +4720,13 @@ const Ud = () => {
|
|
|
4720
4720
|
}
|
|
4721
4721
|
};
|
|
4722
4722
|
}
|
|
4723
|
-
},
|
|
4723
|
+
}, bu = (e, t) => {
|
|
4724
4724
|
let s = JSON.stringify(e, null, 2);
|
|
4725
4725
|
return t.forEach(({ original: r }, a) => {
|
|
4726
|
-
const i = `"__placeholder_${a}__"`, l = new RegExp(
|
|
4726
|
+
const i = `"__placeholder_${a}__"`, l = new RegExp(wu(i), "g");
|
|
4727
4727
|
s = s.replace(l, r);
|
|
4728
4728
|
}), s;
|
|
4729
|
-
},
|
|
4729
|
+
}, Iu = (e, t) => {
|
|
4730
4730
|
if (!e) return "";
|
|
4731
4731
|
let n = JSON.stringify(e, null, 2);
|
|
4732
4732
|
const s = /{{([^{}]+)}}/g;
|
|
@@ -4736,7 +4736,7 @@ const Ud = () => {
|
|
|
4736
4736
|
n = n.replace(r[0], i);
|
|
4737
4737
|
}
|
|
4738
4738
|
return n;
|
|
4739
|
-
},
|
|
4739
|
+
}, Nu = M(() => import("./shared-json-ld-uvMmwCYp.js")), zd = ({
|
|
4740
4740
|
value: e,
|
|
4741
4741
|
onChange: t,
|
|
4742
4742
|
disabled: n = !1,
|
|
@@ -4778,8 +4778,8 @@ const Ud = () => {
|
|
|
4778
4778
|
}, 0);
|
|
4779
4779
|
}
|
|
4780
4780
|
} else {
|
|
4781
|
-
const
|
|
4782
|
-
t(
|
|
4781
|
+
const q = e.substring(0, b) + " " + e.substring(R);
|
|
4782
|
+
t(q), setTimeout(() => {
|
|
4783
4783
|
T.selectionStart = T.selectionEnd = b + 2;
|
|
4784
4784
|
}, 0);
|
|
4785
4785
|
}
|
|
@@ -4789,7 +4789,7 @@ const Ud = () => {
|
|
|
4789
4789
|
const H = Rs(e);
|
|
4790
4790
|
H.isValid ? Ts(() => {
|
|
4791
4791
|
if (p(null), H.parsed) {
|
|
4792
|
-
const T =
|
|
4792
|
+
const T = Iu(H.parsed, l);
|
|
4793
4793
|
I(T);
|
|
4794
4794
|
} else
|
|
4795
4795
|
I("");
|
|
@@ -4800,17 +4800,17 @@ const Ud = () => {
|
|
|
4800
4800
|
const Z = () => {
|
|
4801
4801
|
const H = Rs(e);
|
|
4802
4802
|
if (H.isValid && H.parsed) {
|
|
4803
|
-
const T =
|
|
4803
|
+
const T = bu(H.parsed, H.placeholders);
|
|
4804
4804
|
t(T);
|
|
4805
4805
|
}
|
|
4806
4806
|
}, ee = () => {
|
|
4807
4807
|
h != null && h.position && y.current && (y.current.focus(), y.current.setSelectionRange(h.position, h.position + 1));
|
|
4808
4808
|
};
|
|
4809
|
-
return /* @__PURE__ */ o(
|
|
4809
|
+
return /* @__PURE__ */ o(Li, { fallback: /* @__PURE__ */ o("div", { children: "Some error" }), children: /* @__PURE__ */ o("div", { className: "space-y-2", children: /* @__PURE__ */ m(Ma, { value: u, onValueChange: g, className: "w-full", children: [
|
|
4810
4810
|
/* @__PURE__ */ m("div", { className: "mb-2 flex items-center justify-between", children: [
|
|
4811
|
-
/* @__PURE__ */ m(
|
|
4811
|
+
/* @__PURE__ */ m(Fa, { className: "w-max", children: [
|
|
4812
4812
|
/* @__PURE__ */ m(vn, { value: "edit", className: "flex items-center gap-1", children: [
|
|
4813
|
-
/* @__PURE__ */ o(
|
|
4813
|
+
/* @__PURE__ */ o(Ti, { className: "h-4 w-4" }),
|
|
4814
4814
|
/* @__PURE__ */ o("span", { children: "Edit" })
|
|
4815
4815
|
] }),
|
|
4816
4816
|
/* @__PURE__ */ m(
|
|
@@ -4832,14 +4832,14 @@ const Ud = () => {
|
|
|
4832
4832
|
className: "flex items-center gap-1",
|
|
4833
4833
|
disabled: !e.trim() || h !== null,
|
|
4834
4834
|
children: [
|
|
4835
|
-
/* @__PURE__ */ o(
|
|
4835
|
+
/* @__PURE__ */ o(Si, { className: "h-4 w-4" }),
|
|
4836
4836
|
/* @__PURE__ */ o("span", { children: "Shared" })
|
|
4837
4837
|
]
|
|
4838
4838
|
}
|
|
4839
4839
|
)
|
|
4840
4840
|
] }),
|
|
4841
4841
|
F ? null : u === "edit" && !s && /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ o(
|
|
4842
|
-
|
|
4842
|
+
_u,
|
|
4843
4843
|
{
|
|
4844
4844
|
dataType: "value",
|
|
4845
4845
|
data: l ?? {},
|
|
@@ -4847,9 +4847,9 @@ const Ud = () => {
|
|
|
4847
4847
|
}
|
|
4848
4848
|
) })
|
|
4849
4849
|
] }),
|
|
4850
|
-
/* @__PURE__ */ m(
|
|
4850
|
+
/* @__PURE__ */ m(Cn, { value: "edit", className: "relative mt-0", children: [
|
|
4851
4851
|
!F && u === "edit" && /* @__PURE__ */ o(Ht, { content: "Format JSON", side: "right", showTooltip: !n && !h, children: /* @__PURE__ */ o(
|
|
4852
|
-
|
|
4852
|
+
x,
|
|
4853
4853
|
{
|
|
4854
4854
|
type: "button",
|
|
4855
4855
|
variant: "outline",
|
|
@@ -4857,12 +4857,12 @@ const Ud = () => {
|
|
|
4857
4857
|
onClick: Z,
|
|
4858
4858
|
className: "absolute right-1 top-1 h-6 w-6 p-1",
|
|
4859
4859
|
disabled: !e.trim() || n || h !== null,
|
|
4860
|
-
children: /* @__PURE__ */ o(
|
|
4860
|
+
children: /* @__PURE__ */ o(_i, {})
|
|
4861
4861
|
}
|
|
4862
4862
|
) }),
|
|
4863
4863
|
F ? /* @__PURE__ */ o("div", { className: "flex h-40 items-center justify-center rounded-md bg-black/20", children: /* @__PURE__ */ m("div", { className: "flex max-w-[400px] flex-col items-center gap-2 rounded-md bg-white p-4 shadow-lg", children: [
|
|
4864
4864
|
/* @__PURE__ */ o("div", { className: "max-w-xl text-center text-xs text-gray-500", children: "JSON-LD for is not added for selected language. JSON LD will be used from default language." }),
|
|
4865
|
-
/* @__PURE__ */ m(
|
|
4865
|
+
/* @__PURE__ */ m(x, { type: "button", variant: "default", size: "sm", onClick: f, children: [
|
|
4866
4866
|
/* @__PURE__ */ o(es, {}),
|
|
4867
4867
|
"Copy & Edit from default language"
|
|
4868
4868
|
] })
|
|
@@ -4882,9 +4882,9 @@ const Ud = () => {
|
|
|
4882
4882
|
readOnly: s
|
|
4883
4883
|
}
|
|
4884
4884
|
),
|
|
4885
|
-
h && /* @__PURE__ */ m(
|
|
4886
|
-
/* @__PURE__ */ o(
|
|
4887
|
-
/* @__PURE__ */ m(
|
|
4885
|
+
h && /* @__PURE__ */ m(na, { variant: "destructive", className: "mt-2", children: [
|
|
4886
|
+
/* @__PURE__ */ o(Pi, { className: "h-4 w-4" }),
|
|
4887
|
+
/* @__PURE__ */ m(sa, { className: "flex flex-col", children: [
|
|
4888
4888
|
/* @__PURE__ */ o("span", { className: "font-medium", children: "Invalid JSON" }),
|
|
4889
4889
|
/* @__PURE__ */ o("span", { className: "text-sm", children: h.message }),
|
|
4890
4890
|
h.line && h.column && /* @__PURE__ */ m("span", { className: "text-sm", children: [
|
|
@@ -4894,7 +4894,7 @@ const Ud = () => {
|
|
|
4894
4894
|
h.column
|
|
4895
4895
|
] }),
|
|
4896
4896
|
/* @__PURE__ */ o(
|
|
4897
|
-
|
|
4897
|
+
x,
|
|
4898
4898
|
{
|
|
4899
4899
|
type: "button",
|
|
4900
4900
|
variant: "link",
|
|
@@ -4907,14 +4907,25 @@ const Ud = () => {
|
|
|
4907
4907
|
] })
|
|
4908
4908
|
] })
|
|
4909
4909
|
] }),
|
|
4910
|
-
/* @__PURE__ */ m(
|
|
4910
|
+
/* @__PURE__ */ m(Cn, { value: "preview", className: "mt-0", children: [
|
|
4911
4911
|
/* @__PURE__ */ o(fs, { rows: a, value: _, readOnly: !0, className: "cursor-default bg-muted font-mono text-sm" }),
|
|
4912
4912
|
/* @__PURE__ */ o("p", { className: "mt-1 text-xs text-muted-foreground", children: "This is how the JSON will look after placeholder substitution." })
|
|
4913
4913
|
] }),
|
|
4914
|
-
w && /* @__PURE__ */ o(
|
|
4914
|
+
w && /* @__PURE__ */ o(Cn, { value: "shared", className: "mt-0", children: /* @__PURE__ */ o(Y, { children: /* @__PURE__ */ o(Nu, {}) }) })
|
|
4915
4915
|
] }) }) });
|
|
4916
|
-
},
|
|
4917
|
-
const
|
|
4916
|
+
}, jr = bi(void 0), vu = ({ children: e, config: t }) => {
|
|
4917
|
+
const n = {
|
|
4918
|
+
...t,
|
|
4919
|
+
models: (t == null ? void 0 : t.models) || Gi
|
|
4920
|
+
};
|
|
4921
|
+
return /* @__PURE__ */ o(jr.Provider, { value: n, children: e });
|
|
4922
|
+
}, Cu = () => {
|
|
4923
|
+
const e = Ii(jr);
|
|
4924
|
+
if (e === void 0)
|
|
4925
|
+
throw new Error("useAIConfig must be used within AIConfigProvider");
|
|
4926
|
+
return e;
|
|
4927
|
+
}, Yd = () => ({ models: Cu().models }), Lu = M(() => import("./ai-panel-default-lang-BXYQye3N.js")), Gu = M(() => import("./ai-panel-other-lang-DaCf-cq4.js")), ku = () => {
|
|
4928
|
+
const { t: e } = ue(), [t, n] = N(""), [s, r] = N([]), [a, i] = N(!1), [l, c] = N(null), [d, f] = N(null), [u, g] = N(ki().id), { selectedLang: h, fallbackLang: p } = Se(), _ = Mi(), [I] = ve(), y = I.get("page"), A = (s == null ? void 0 : s.filter((Z) => Z.role === "user").length) >= 4, w = (s == null ? void 0 : s.filter((Z) => Z.role === "user").length) >= 10;
|
|
4918
4929
|
J(() => {
|
|
4919
4930
|
r([]);
|
|
4920
4931
|
}, [h, y]);
|
|
@@ -4931,7 +4942,7 @@ const Ud = () => {
|
|
|
4931
4942
|
l && (l.abort(), c(null)), i(!1), n(""), f(null), r((Z) => {
|
|
4932
4943
|
const ee = Z[Z.length - 1];
|
|
4933
4944
|
return ee && ee.role === "assistant" && ee.isReasoning && ee.isStreaming ? Z.slice(0, -1) : Z;
|
|
4934
|
-
}),
|
|
4945
|
+
}), O.info(e("Generation stopped"));
|
|
4935
4946
|
},
|
|
4936
4947
|
handleReset: F,
|
|
4937
4948
|
setMessages: r,
|
|
@@ -4950,24 +4961,43 @@ const Ud = () => {
|
|
|
4950
4961
|
a && /* @__PURE__ */ o("div", { className: "fixed inset-0 left-0 top-0 z-40 flex h-screen w-screen flex-col items-center justify-center bg-transparent" }),
|
|
4951
4962
|
/* @__PURE__ */ m("div", { className: "flex h-full w-full flex-col", children: [
|
|
4952
4963
|
/* @__PURE__ */ m("div", { className: "flex w-full items-center justify-between", children: [
|
|
4953
|
-
/* @__PURE__ */ o("p", { className: "text-xs text-gray-500", children: e("
|
|
4954
|
-
(s == null ? void 0 : s.length) > 0 && /* @__PURE__ */ o(
|
|
4964
|
+
/* @__PURE__ */ o("p", { className: "text-xs text-gray-500", children: e("Generate with AI") }),
|
|
4965
|
+
(s == null ? void 0 : s.length) > 0 && /* @__PURE__ */ o(x, { variant: "outline", size: "icon", onClick: F, className: "h-6 w-6", disabled: a, children: /* @__PURE__ */ o(es, {}) })
|
|
4955
4966
|
] }),
|
|
4956
4967
|
/* @__PURE__ */ o(
|
|
4957
4968
|
Y,
|
|
4958
4969
|
{
|
|
4959
4970
|
fallback: /* @__PURE__ */ o("div", { className: "flex h-full w-full items-center justify-center text-xs", children: "Loading AI Panel" }),
|
|
4960
|
-
children: h ? /* @__PURE__ */ o(
|
|
4971
|
+
children: h ? /* @__PURE__ */ o(Gu, { ...D, selectedLang: h }) : /* @__PURE__ */ o(Lu, { ...D })
|
|
4961
4972
|
}
|
|
4962
4973
|
)
|
|
4963
4974
|
] })
|
|
4964
4975
|
] });
|
|
4965
|
-
},
|
|
4976
|
+
}, Us = ({
|
|
4977
|
+
models: e,
|
|
4978
|
+
onAIEvent: t,
|
|
4979
|
+
onSuccess: n,
|
|
4980
|
+
onError: s,
|
|
4981
|
+
onComplete: r,
|
|
4982
|
+
context: a,
|
|
4983
|
+
...i
|
|
4984
|
+
}) => {
|
|
4985
|
+
const l = {
|
|
4986
|
+
models: e,
|
|
4987
|
+
onAIEvent: t,
|
|
4988
|
+
onSuccess: n,
|
|
4989
|
+
onError: s,
|
|
4990
|
+
onComplete: r,
|
|
4991
|
+
context: a,
|
|
4992
|
+
...i
|
|
4993
|
+
};
|
|
4994
|
+
return /* @__PURE__ */ o(vu, { config: l, children: /* @__PURE__ */ o(ku, {}) });
|
|
4995
|
+
}, Du = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4966
4996
|
__proto__: null,
|
|
4967
4997
|
AiPanelContent: Us,
|
|
4968
4998
|
default: Us
|
|
4969
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
4970
|
-
const t =
|
|
4999
|
+
}, Symbol.toStringTag, { value: "Module" })), Jd = (e) => {
|
|
5000
|
+
const t = C(), n = k();
|
|
4971
5001
|
return de({
|
|
4972
5002
|
queryKey: [E.GET_CHAI_USER, e],
|
|
4973
5003
|
queryFn: async () => {
|
|
@@ -4981,7 +5011,7 @@ const Ud = () => {
|
|
|
4981
5011
|
staleTime: "static"
|
|
4982
5012
|
});
|
|
4983
5013
|
};
|
|
4984
|
-
class
|
|
5014
|
+
class xu {
|
|
4985
5015
|
constructor(t) {
|
|
4986
5016
|
Nn(this, "channel");
|
|
4987
5017
|
this.channel = t;
|
|
@@ -5026,142 +5056,144 @@ class Nu {
|
|
|
5026
5056
|
return this.channel.presenceState();
|
|
5027
5057
|
}
|
|
5028
5058
|
}
|
|
5029
|
-
class
|
|
5059
|
+
class Ou {
|
|
5030
5060
|
constructor(t) {
|
|
5031
5061
|
Nn(this, "client");
|
|
5032
5062
|
this.client = t;
|
|
5033
5063
|
}
|
|
5034
5064
|
channel(t, n) {
|
|
5035
5065
|
const s = this.client.channel(t, n);
|
|
5036
|
-
return new
|
|
5066
|
+
return new xu(s);
|
|
5037
5067
|
}
|
|
5038
5068
|
}
|
|
5039
|
-
function
|
|
5040
|
-
return new
|
|
5069
|
+
function Zd(e) {
|
|
5070
|
+
return new Ou(e);
|
|
5041
5071
|
}
|
|
5042
5072
|
if (typeof window > "u")
|
|
5043
5073
|
throw new Error("@chaibuilder/pages is not available on the server");
|
|
5044
5074
|
export {
|
|
5045
|
-
|
|
5075
|
+
md as $,
|
|
5046
5076
|
E as A,
|
|
5047
5077
|
Tt as B,
|
|
5048
|
-
|
|
5049
|
-
|
|
5078
|
+
Ul as C,
|
|
5079
|
+
pr as D,
|
|
5050
5080
|
W as E,
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5081
|
+
Ld as F,
|
|
5082
|
+
Nd as G,
|
|
5083
|
+
vd as H,
|
|
5084
|
+
Vn as I,
|
|
5085
|
+
Be as J,
|
|
5086
|
+
cc as K,
|
|
5057
5087
|
Qt as L,
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5088
|
+
Cd as M,
|
|
5089
|
+
ic as N,
|
|
5090
|
+
Td as O,
|
|
5061
5091
|
oe as P,
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5092
|
+
St as Q,
|
|
5093
|
+
Md as R,
|
|
5094
|
+
wd as S,
|
|
5065
5095
|
Ht as T,
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5096
|
+
Fd as U,
|
|
5097
|
+
Ed as V,
|
|
5098
|
+
Kn as W,
|
|
5099
|
+
xd as X,
|
|
5100
|
+
gc as Y,
|
|
5101
|
+
Hd as Z,
|
|
5102
|
+
Sd as _,
|
|
5103
|
+
Ce as a,
|
|
5104
|
+
Us as a$,
|
|
5105
|
+
Dd as a0,
|
|
5106
|
+
Rd as a1,
|
|
5107
|
+
Od as a2,
|
|
5108
|
+
Ud as a3,
|
|
5109
|
+
Bd as a4,
|
|
5110
|
+
_d as a5,
|
|
5111
|
+
se as a6,
|
|
5112
|
+
gr as a7,
|
|
5113
|
+
yd as a8,
|
|
5114
|
+
hc as a9,
|
|
5115
|
+
An as aA,
|
|
5116
|
+
nr as aB,
|
|
5117
|
+
Wt as aC,
|
|
5118
|
+
cd as aD,
|
|
5119
|
+
fd as aE,
|
|
5120
|
+
zd as aF,
|
|
5121
|
+
Rs as aG,
|
|
5122
|
+
ud as aH,
|
|
5123
|
+
hd as aI,
|
|
5124
|
+
gd as aJ,
|
|
5125
|
+
dd as aK,
|
|
5126
|
+
$d as aL,
|
|
5127
|
+
ji as aM,
|
|
5128
|
+
pn as aN,
|
|
5129
|
+
Ro as aO,
|
|
5130
|
+
_u as aP,
|
|
5131
|
+
jd as aQ,
|
|
5132
|
+
Yi as aR,
|
|
5133
|
+
$i as aS,
|
|
5134
|
+
Do as aT,
|
|
5135
|
+
Vd as aU,
|
|
5136
|
+
Ge as aV,
|
|
5137
|
+
Qd as aW,
|
|
5138
|
+
lu as aX,
|
|
5139
|
+
gl as aY,
|
|
5140
|
+
qd as aZ,
|
|
5141
|
+
Wd as a_,
|
|
5142
|
+
br as aa,
|
|
5143
|
+
Ue as ab,
|
|
5144
|
+
Yc as ac,
|
|
5145
|
+
Pd as ad,
|
|
5146
|
+
Jt as ae,
|
|
5147
|
+
uc as af,
|
|
5148
|
+
kd as ag,
|
|
5149
|
+
Id as ah,
|
|
5150
|
+
bd as ai,
|
|
5151
|
+
Zt as aj,
|
|
5152
|
+
jl as ak,
|
|
5153
|
+
Gd as al,
|
|
5154
|
+
xl as am,
|
|
5155
|
+
rr as an,
|
|
5156
|
+
Jd as ao,
|
|
5157
|
+
_o as ap,
|
|
5158
|
+
C as aq,
|
|
5159
|
+
k as ar,
|
|
5160
|
+
ou as as,
|
|
5161
|
+
ld as at,
|
|
5162
|
+
nn as au,
|
|
5163
|
+
fe as av,
|
|
5164
|
+
Gn as aw,
|
|
5165
|
+
be as ax,
|
|
5166
|
+
ye as ay,
|
|
5167
|
+
Qi as az,
|
|
5138
5168
|
sr as b,
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5169
|
+
Zs as b0,
|
|
5170
|
+
ss as b1,
|
|
5171
|
+
or as b2,
|
|
5172
|
+
Mi as b3,
|
|
5173
|
+
Zd as b4,
|
|
5174
|
+
Ou as b5,
|
|
5143
5175
|
ve as c,
|
|
5144
|
-
|
|
5176
|
+
qo as d,
|
|
5145
5177
|
Ke as e,
|
|
5146
|
-
|
|
5147
|
-
|
|
5178
|
+
nd as f,
|
|
5179
|
+
sd as g,
|
|
5148
5180
|
He as h,
|
|
5149
5181
|
ns as i,
|
|
5150
5182
|
yn as j,
|
|
5151
5183
|
Ve as k,
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5157
|
-
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5184
|
+
Yd as l,
|
|
5185
|
+
Cu as m,
|
|
5186
|
+
Vi as n,
|
|
5187
|
+
rd as o,
|
|
5188
|
+
ru as p,
|
|
5189
|
+
uu as q,
|
|
5190
|
+
id as r,
|
|
5191
|
+
od as s,
|
|
5192
|
+
ad as t,
|
|
5193
|
+
td as u,
|
|
5194
|
+
Kd as v,
|
|
5195
|
+
te as w,
|
|
5196
|
+
wr as x,
|
|
5197
|
+
Ad as y,
|
|
5198
|
+
$ as z
|
|
5167
5199
|
};
|