@chaibuilder/sdk 1.2.17 → 1.2.18
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/{AddBlocks-7TF41ISQ.cjs → AddBlocks-5Q5w5lPJ.cjs} +1 -1
- package/dist/{AddBlocks--SllKzEG.js → AddBlocks-uCdu9Xpr.js} +1 -1
- package/dist/{BrandingOptions-IqtZrxqX.js → BrandingOptions-JbHRN7V5.js} +7 -7
- package/dist/{BrandingOptions-uKE1vuWd.cjs → BrandingOptions-xrGQI1Kn.cjs} +1 -1
- package/dist/{CanvasArea-T1XNnB7d.js → CanvasArea-aWzbzB9p.js} +3 -3
- package/dist/{CanvasArea-iLUw-tom.cjs → CanvasArea-oUIvLfdq.cjs} +1 -1
- package/dist/{CurrentPage-TCduhO-X.js → CurrentPage-AlOLPG4o.js} +3 -3
- package/dist/{CurrentPage-N5hSL1xB.cjs → CurrentPage-atmd8UrZ.cjs} +1 -1
- package/dist/{Outline-3IPrK7F-.js → Outline-oGoAdnBw.js} +3 -3
- package/dist/{Outline-g4TXJ-hK.cjs → Outline-uMUTwN-R.cjs} +1 -1
- package/dist/{PagesPanel-7goyNL8t.js → PagesPanel-VbSQHEu_.js} +4 -4
- package/dist/{PagesPanel-qI3sijis.cjs → PagesPanel-nN3QUwXp.cjs} +1 -1
- package/dist/{ProjectPanel-bMllQ4_a.cjs → ProjectPanel-UIEFhref.cjs} +1 -1
- package/dist/{ProjectPanel-CdPFwsXg.js → ProjectPanel-fqux215P.js} +4 -4
- package/dist/{Settings-8f4ivm4-.cjs → Settings-8qUW0Iow.cjs} +1 -1
- package/dist/{Settings-pva9XRUC.js → Settings-IhWI1ice.js} +2 -2
- package/dist/{SidePanels-7HqZM4-j.cjs → SidePanels-cOHgPE9y.cjs} +1 -1
- package/dist/{SidePanels-u5QXQrWL.js → SidePanels-lMCXrchR.js} +3 -3
- package/dist/{Topbar-S3zgo3N8.js → Topbar-DYiisBtw.js} +1 -1
- package/dist/{Topbar-poeqjjZb.cjs → Topbar-vLD-rWl5.cjs} +1 -1
- package/dist/{UnsplashImages-BOypn-e5.cjs → UnsplashImages-1JWfKlBc.cjs} +1 -1
- package/dist/{UnsplashImages-132gZ842.js → UnsplashImages-lGLcqo4M.js} +1 -1
- package/dist/{UploadImages-tr54Ik1I.js → UploadImages-06m6vjbL.js} +1 -1
- package/dist/{UploadImages-giiNNHKq.cjs → UploadImages-T4MYMOhW.cjs} +1 -1
- package/dist/{add-page-modal-AsP5g0Fp.js → add-page-modal-mEbIXSKX.js} +4 -4
- package/dist/{add-page-modal-ajpd-Gmw.cjs → add-page-modal-niwhffYL.cjs} +1 -1
- package/dist/{confirm-alert-dYoU1ln_.js → confirm-alert-YETlIRpE.js} +1 -1
- package/dist/{confirm-alert-bw0VBgoG.cjs → confirm-alert-ZpEIxh3X.cjs} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.d.ts +2 -2
- package/dist/core.js +2 -2
- package/dist/{delete-page-modal-_Hy6ls6b.js → delete-page-modal-J_SmPWrw.js} +3 -3
- package/dist/{delete-page-modal-H4JOWYZe.cjs → delete-page-modal-sOqRlmKb.cjs} +1 -1
- package/dist/email.cjs +1 -1
- package/dist/email.d.ts +2 -2
- package/dist/email.js +2 -2
- package/dist/{form-f13cs-An.js → form-2xJcQs_Y.js} +1 -1
- package/dist/{form-jzX2YXUO.cjs → form-Y0Vb4m04.cjs} +1 -1
- package/dist/{index-4xyhDki2.cjs → index-3TQsdso6.cjs} +1 -1
- package/dist/{index-ugsWasKp.js → index-627XtO9e.js} +3 -3
- package/dist/{index-eyVVbA05.js → index-LF3KXx4u.js} +2 -2
- package/dist/index-T3wfa1kz.cjs +1 -0
- package/dist/{index-MaXiXghQ.js → index-ZBqiaKhx.js} +350 -350
- package/dist/{index-0JU8vPT_.cjs → index-ZwpjuB-N.cjs} +2 -2
- package/dist/{page-viewer-Xj9v8mji.cjs → page-viewer-6UDraUKW.cjs} +1 -1
- package/dist/{page-viewer-P5Im9RfR.js → page-viewer-7u0SWWmO.js} +4 -4
- package/dist/{project-general-setting--5DT1RoW.cjs → project-general-setting-AW5Vtmgx.cjs} +1 -1
- package/dist/{project-general-setting-R3pVVXmY.js → project-general-setting-SqC85J7F.js} +4 -4
- package/dist/{project-seo-setting-pGpm3-6U.js → project-seo-setting-TlQherop.js} +2 -2
- package/dist/{project-seo-setting-3DzzF83_.cjs → project-seo-setting-cWiNZcxW.cjs} +1 -1
- package/dist/{single-page-detail-m-THVQnz.js → single-page-detail-ClZYIdSO.js} +5 -5
- package/dist/{single-page-detail-nJzGUDym.cjs → single-page-detail-kJUW6FE9.cjs} +1 -1
- package/dist/studio.cjs +1 -1
- package/dist/studio.d.ts +2 -2
- package/dist/studio.js +3 -3
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +1 -1
- package/dist/{useAddBlockByDrop-6qaL4Ufz.cjs → useAddBlockByDrop-E343zoB3.cjs} +1 -1
- package/dist/{useAddBlockByDrop-vGme3brY.js → useAddBlockByDrop-sPX4lN-O.js} +1 -1
- package/package.json +1 -1
- package/dist/index-MQH3blB-.cjs +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import * as m from "react";
|
|
2
|
-
import tt, { createContext as
|
|
3
|
-
import { has as pe, get as F, flatten as ne, filter as M, omit as Oe, isEmpty as ve, isString as Et, find as te, map as R, each as ue, set as Se, includes as q, isUndefined as Nr, without as Ot, forIn as Lt, isObject as
|
|
4
|
-
import { g as ce, a as
|
|
2
|
+
import tt, { createContext as Ms, useContext as Ds, useRef as vr, createElement as yr, useReducer as Es, useEffect as Ce, useDebugValue as Os, useCallback as L, useMemo as Ls, useState as _e, Suspense as vt } from "react";
|
|
3
|
+
import { has as pe, get as F, flatten as ne, filter as M, omit as Oe, isEmpty as ve, isString as Et, find as te, map as R, each as ue, set as Se, includes as q, isUndefined as Nr, without as Ot, forIn as Lt, isObject as zs, first as Q, noop as Vs, keys as $s, startsWith as zt, isNull as qe, pick as yt, sortBy as wt } from "lodash-es";
|
|
4
|
+
import { g as ce, a as Fs } from "./Functions-7jnEwJyw.js";
|
|
5
5
|
import { getBlockComponent as Le } from "@chaibuilder/runtime";
|
|
6
|
-
import { atom as w, useAtomValue as X, useAtom as D, useSetAtom as
|
|
6
|
+
import { atom as w, useAtomValue as X, useAtom as D, useSetAtom as Be } from "jotai";
|
|
7
7
|
import Vt from "flat-to-nested";
|
|
8
8
|
import { a as me, I as $t, S as Ke, B as Je } from "./MODIFIERS-WQdaNvb8.js";
|
|
9
|
-
import { g as
|
|
10
|
-
import { useThrottledCallback as
|
|
9
|
+
import { g as Us } from "./_commonjsHelpers-UyOWmZb0.js";
|
|
10
|
+
import { useThrottledCallback as Ws } from "@react-hookz/web";
|
|
11
11
|
import { j as a } from "./jsx-runtime-WbnYoNE9.js";
|
|
12
12
|
import * as Ft from "@radix-ui/react-toggle";
|
|
13
13
|
import { cva as ge } from "class-variance-authority";
|
|
14
14
|
import { a as d, c as Ie } from "./Class-3k8xjeiM.js";
|
|
15
15
|
import * as Ye from "@radix-ui/react-switch";
|
|
16
|
-
import { Slot as
|
|
16
|
+
import { Slot as Gs } from "@radix-ui/react-slot";
|
|
17
17
|
import * as fe from "@radix-ui/react-accordion";
|
|
18
|
-
import { ChevronDownIcon as
|
|
18
|
+
import { ChevronDownIcon as Hs, Cross2Icon as st, ChevronRightIcon as ot, CheckIcon as ze, DotFilledIcon as nt, CaretSortIcon as qs, MagnifyingGlassIcon as Ks } from "@radix-ui/react-icons";
|
|
19
19
|
import * as U from "@radix-ui/react-alert-dialog";
|
|
20
|
-
import * as
|
|
20
|
+
import * as B from "@radix-ui/react-dialog";
|
|
21
21
|
import * as Ut from "@radix-ui/react-label";
|
|
22
22
|
import * as de from "@radix-ui/react-scroll-area";
|
|
23
23
|
import * as be from "@radix-ui/react-tabs";
|
|
@@ -31,14 +31,14 @@ import * as Wt from "@radix-ui/react-separator";
|
|
|
31
31
|
import * as Y from "@radix-ui/react-toast";
|
|
32
32
|
import { Command as K } from "cmdk";
|
|
33
33
|
import * as P from "@radix-ui/react-context-menu";
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
34
|
+
import Js, { IconPickerItem as Ys } from "react-icons-picker";
|
|
35
|
+
import Qs from "react-dom";
|
|
36
|
+
import Xs from "react-quill";
|
|
37
37
|
import "react-i18next";
|
|
38
38
|
var V = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
39
|
-
let
|
|
39
|
+
let Zs = 0;
|
|
40
40
|
function oe(e, t) {
|
|
41
|
-
const s = `atom${++
|
|
41
|
+
const s = `atom${++Zs}`, o = {
|
|
42
42
|
toString: () => s
|
|
43
43
|
};
|
|
44
44
|
return typeof e == "function" ? o.read = e : (o.init = e, o.read = (n) => n(o), o.write = (n, i, r) => i(
|
|
@@ -46,7 +46,7 @@ function oe(e, t) {
|
|
|
46
46
|
typeof r == "function" ? r(n(o)) : r
|
|
47
47
|
)), t && (o.write = t), o;
|
|
48
48
|
}
|
|
49
|
-
const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new WeakMap(),
|
|
49
|
+
const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new WeakMap(), eo = (e, t) => {
|
|
50
50
|
Ee.set(e, t), e.catch(() => {
|
|
51
51
|
}).finally(() => Ee.delete(e));
|
|
52
52
|
}, Nt = (e, t) => {
|
|
@@ -56,11 +56,11 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new W
|
|
|
56
56
|
e.status = "fulfilled", e.value = t;
|
|
57
57
|
}, jt = (e, t) => {
|
|
58
58
|
e.status = "rejected", e.reason = t;
|
|
59
|
-
},
|
|
59
|
+
}, to = (e) => typeof (e == null ? void 0 : e.then) == "function", Ne = (e, t) => "v" in e && "v" in t && Object.is(e.v, t.v), St = (e, t) => "e" in e && "e" in t && Object.is(e.e, t.e), he = (e) => "v" in e && e.v instanceof Promise, so = (e, t) => "v" in e && "v" in t && e.v.orig && e.v.orig === t.v.orig, Pe = (e) => {
|
|
60
60
|
if ("e" in e)
|
|
61
61
|
throw e.e;
|
|
62
62
|
return e.v;
|
|
63
|
-
},
|
|
63
|
+
}, oo = () => {
|
|
64
64
|
const e = /* @__PURE__ */ new WeakMap(), t = /* @__PURE__ */ new WeakMap(), s = /* @__PURE__ */ new Map();
|
|
65
65
|
let o, n, i;
|
|
66
66
|
(V ? "production" : void 0) !== "production" && (o = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set());
|
|
@@ -71,7 +71,7 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new W
|
|
|
71
71
|
const b = "v" in g ? g.v instanceof Promise ? g.v : Promise.resolve(g.v) : Promise.reject(g.e);
|
|
72
72
|
Nt(v.v, b);
|
|
73
73
|
}
|
|
74
|
-
},
|
|
74
|
+
}, p = (u, g, v) => {
|
|
75
75
|
const b = /* @__PURE__ */ new Map();
|
|
76
76
|
let y = !1;
|
|
77
77
|
v.forEach((h, j) => {
|
|
@@ -82,21 +82,21 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new W
|
|
|
82
82
|
d: (b == null ? void 0 : b.d) || /* @__PURE__ */ new Map(),
|
|
83
83
|
v: g
|
|
84
84
|
};
|
|
85
|
-
if (v &&
|
|
85
|
+
if (v && p(u, y, v), b && Ne(b, y) && b.d === y.d)
|
|
86
86
|
return b;
|
|
87
|
-
if (b && he(b) && he(y) &&
|
|
87
|
+
if (b && he(b) && he(y) && so(b, y)) {
|
|
88
88
|
if (b.d === y.d)
|
|
89
89
|
return b;
|
|
90
90
|
y.v = b.v;
|
|
91
91
|
}
|
|
92
92
|
return c(u, y), y;
|
|
93
|
-
},
|
|
94
|
-
if (
|
|
93
|
+
}, f = (u, g, v, b) => {
|
|
94
|
+
if (to(g)) {
|
|
95
95
|
let y;
|
|
96
96
|
const h = new Promise((j, E) => {
|
|
97
97
|
let S = !1;
|
|
98
98
|
g.then(
|
|
99
|
-
(
|
|
99
|
+
(_) => {
|
|
100
100
|
if (!S) {
|
|
101
101
|
S = !0;
|
|
102
102
|
const A = r(u), ee = l(
|
|
@@ -104,10 +104,10 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new W
|
|
|
104
104
|
h,
|
|
105
105
|
v
|
|
106
106
|
);
|
|
107
|
-
kt(h,
|
|
107
|
+
kt(h, _), j(_), (A == null ? void 0 : A.d) !== ee.d && J(u, ee, A == null ? void 0 : A.d);
|
|
108
108
|
}
|
|
109
109
|
},
|
|
110
|
-
(
|
|
110
|
+
(_) => {
|
|
111
111
|
if (!S) {
|
|
112
112
|
S = !0;
|
|
113
113
|
const A = r(u), ee = l(
|
|
@@ -115,17 +115,17 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new W
|
|
|
115
115
|
h,
|
|
116
116
|
v
|
|
117
117
|
);
|
|
118
|
-
jt(h,
|
|
118
|
+
jt(h, _), E(_), (A == null ? void 0 : A.d) !== ee.d && J(u, ee, A == null ? void 0 : A.d);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
), y = (
|
|
122
|
-
S || (S = !0,
|
|
121
|
+
), y = (_) => {
|
|
122
|
+
S || (S = !0, _.then(
|
|
123
123
|
(A) => kt(h, A),
|
|
124
124
|
(A) => jt(h, A)
|
|
125
|
-
), j(
|
|
125
|
+
), j(_));
|
|
126
126
|
};
|
|
127
127
|
});
|
|
128
|
-
return h.orig = g, h.status = "pending",
|
|
128
|
+
return h.orig = g, h.status = "pending", eo(h, (j) => {
|
|
129
129
|
j && y(j), b == null || b();
|
|
130
130
|
}), l(u, h, v);
|
|
131
131
|
}
|
|
@@ -135,15 +135,15 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new W
|
|
|
135
135
|
d: (b == null ? void 0 : b.d) || /* @__PURE__ */ new Map(),
|
|
136
136
|
e: g
|
|
137
137
|
};
|
|
138
|
-
return v &&
|
|
138
|
+
return v && p(u, y, v), b && St(b, y) && b.d === y.d ? b : (c(u, y), y);
|
|
139
139
|
}, N = (u) => {
|
|
140
140
|
const g = r(u);
|
|
141
|
-
if (g && (g.d.forEach((S,
|
|
142
|
-
|
|
143
|
-
}), Array.from(g.d).every(([S,
|
|
141
|
+
if (g && (g.d.forEach((S, _) => {
|
|
142
|
+
_ !== u && !t.has(_) && N(_);
|
|
143
|
+
}), Array.from(g.d).every(([S, _]) => {
|
|
144
144
|
const A = r(S);
|
|
145
|
-
return S === u || A ===
|
|
146
|
-
A && !he(A) && Ne(A,
|
|
145
|
+
return S === u || A === _ || // TODO This is a hack, we should find a better solution.
|
|
146
|
+
A && !he(A) && Ne(A, _);
|
|
147
147
|
})))
|
|
148
148
|
return g;
|
|
149
149
|
const v = /* @__PURE__ */ new Map();
|
|
@@ -157,8 +157,8 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new W
|
|
|
157
157
|
return v.set(S, void 0), S.init;
|
|
158
158
|
throw new Error("no atom init");
|
|
159
159
|
}
|
|
160
|
-
const
|
|
161
|
-
return v.set(S,
|
|
160
|
+
const _ = N(S);
|
|
161
|
+
return v.set(S, _), Pe(_);
|
|
162
162
|
};
|
|
163
163
|
let h, j;
|
|
164
164
|
const E = {
|
|
@@ -174,7 +174,7 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new W
|
|
|
174
174
|
};
|
|
175
175
|
try {
|
|
176
176
|
const S = u.read(y, E);
|
|
177
|
-
return
|
|
177
|
+
return f(
|
|
178
178
|
u,
|
|
179
179
|
S,
|
|
180
180
|
v,
|
|
@@ -207,12 +207,12 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new W
|
|
|
207
207
|
j == null || j.t.forEach((E) => {
|
|
208
208
|
var S;
|
|
209
209
|
if (E !== h) {
|
|
210
|
-
let
|
|
211
|
-
if (
|
|
210
|
+
let _ = v.get(E);
|
|
211
|
+
if (_ && v.set(E, --_), !_) {
|
|
212
212
|
let A = !!((S = g.get(E)) != null && S.size);
|
|
213
213
|
if (A) {
|
|
214
|
-
const ee = r(E),
|
|
215
|
-
A = !ee || !Ne(ee,
|
|
214
|
+
const ee = r(E), Is = N(E);
|
|
215
|
+
A = !ee || !Ne(ee, Is);
|
|
216
216
|
}
|
|
217
217
|
A || g.forEach((ee) => ee.delete(E));
|
|
218
218
|
}
|
|
@@ -228,14 +228,14 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new W
|
|
|
228
228
|
if (j === u) {
|
|
229
229
|
if (!Fe(j))
|
|
230
230
|
throw new Error("atom not writable");
|
|
231
|
-
const
|
|
232
|
-
(!
|
|
231
|
+
const _ = r(j), A = f(j, E[0]);
|
|
232
|
+
(!_ || !Ne(_, A)) && G(j);
|
|
233
233
|
} else
|
|
234
234
|
S = H(j, ...E);
|
|
235
235
|
if (!v) {
|
|
236
|
-
const
|
|
236
|
+
const _ = ae();
|
|
237
237
|
(V ? "production" : void 0) !== "production" && n.forEach(
|
|
238
|
-
(A) => A({ type: "async-write", flushed:
|
|
238
|
+
(A) => A({ type: "async-write", flushed: _ })
|
|
239
239
|
);
|
|
240
240
|
}
|
|
241
241
|
return S;
|
|
@@ -326,7 +326,7 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new W
|
|
|
326
326
|
dev_get_mounted: (u) => t.get(u),
|
|
327
327
|
dev_restore_atoms: (u) => {
|
|
328
328
|
for (const [v, b] of u)
|
|
329
|
-
Fe(v) && (
|
|
329
|
+
Fe(v) && (f(v, b), G(v));
|
|
330
330
|
const g = ae();
|
|
331
331
|
n.forEach(
|
|
332
332
|
(v) => v({ type: "restore", flushed: g })
|
|
@@ -339,13 +339,13 @@ const Fe = (e) => "init" in e, Ue = (e) => !!e.write, Ee = /* @__PURE__ */ new W
|
|
|
339
339
|
};
|
|
340
340
|
};
|
|
341
341
|
let We;
|
|
342
|
-
const
|
|
343
|
-
var
|
|
344
|
-
const
|
|
345
|
-
const t =
|
|
346
|
-
return (e == null ? void 0 : e.store) || t ||
|
|
342
|
+
const no = () => (We || (We = oo()), We);
|
|
343
|
+
var ao = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
344
|
+
const ro = Ms(void 0), Gt = (e) => {
|
|
345
|
+
const t = Ds(ro);
|
|
346
|
+
return (e == null ? void 0 : e.store) || t || no();
|
|
347
347
|
};
|
|
348
|
-
const
|
|
348
|
+
const io = (e) => typeof (e == null ? void 0 : e.then) == "function", lo = tt.use || ((e) => {
|
|
349
349
|
if (e.status === "pending")
|
|
350
350
|
throw e;
|
|
351
351
|
if (e.status === "fulfilled")
|
|
@@ -359,34 +359,34 @@ const ro = (e) => typeof (e == null ? void 0 : e.then) == "function", io = tt.us
|
|
|
359
359
|
}
|
|
360
360
|
), e);
|
|
361
361
|
});
|
|
362
|
-
function
|
|
363
|
-
const s = Gt(t), [[o, n, i], r] =
|
|
362
|
+
function co(e, t) {
|
|
363
|
+
const s = Gt(t), [[o, n, i], r] = Es(
|
|
364
364
|
(l) => {
|
|
365
|
-
const
|
|
366
|
-
return Object.is(l[0],
|
|
365
|
+
const f = s.get(e);
|
|
366
|
+
return Object.is(l[0], f) && l[1] === s && l[2] === e ? l : [f, s, e];
|
|
367
367
|
},
|
|
368
368
|
void 0,
|
|
369
369
|
() => [s.get(e), s, e]
|
|
370
370
|
);
|
|
371
371
|
let c = o;
|
|
372
372
|
(n !== s || i !== e) && (r(), c = s.get(e));
|
|
373
|
-
const
|
|
373
|
+
const p = t == null ? void 0 : t.delay;
|
|
374
374
|
return Ce(() => {
|
|
375
375
|
const l = s.sub(e, () => {
|
|
376
|
-
if (typeof
|
|
377
|
-
setTimeout(r,
|
|
376
|
+
if (typeof p == "number") {
|
|
377
|
+
setTimeout(r, p);
|
|
378
378
|
return;
|
|
379
379
|
}
|
|
380
380
|
r();
|
|
381
381
|
});
|
|
382
382
|
return r(), l;
|
|
383
|
-
}, [s, e,
|
|
383
|
+
}, [s, e, p]), Os(c), io(c) ? lo(c) : c;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function uo(e, t) {
|
|
386
386
|
const s = Gt(t);
|
|
387
387
|
return L(
|
|
388
388
|
(...n) => {
|
|
389
|
-
if ((
|
|
389
|
+
if ((ao ? "production" : void 0) !== "production" && !("write" in e))
|
|
390
390
|
throw new Error("not writable atom");
|
|
391
391
|
return s.set(e, ...n);
|
|
392
392
|
},
|
|
@@ -395,31 +395,31 @@ function co(e, t) {
|
|
|
395
395
|
}
|
|
396
396
|
function Vr(e, t) {
|
|
397
397
|
return [
|
|
398
|
-
|
|
398
|
+
co(e, t),
|
|
399
399
|
// We do wrong type assertion here, which results in throwing an error.
|
|
400
|
-
|
|
400
|
+
uo(e, t)
|
|
401
401
|
];
|
|
402
402
|
}
|
|
403
403
|
var at = { BASE_URL: "/", MODE: "production", DEV: !1, PROD: !0, SSR: !1 };
|
|
404
404
|
const Ht = Symbol();
|
|
405
|
-
const At = (e, t, s) => (t.has(s) ? t : t.set(s, e())).get(s),
|
|
406
|
-
const o = At(() => /* @__PURE__ */ new WeakMap(),
|
|
405
|
+
const At = (e, t, s) => (t.has(s) ? t : t.set(s, e())).get(s), mo = /* @__PURE__ */ new WeakMap(), fo = (e, t, s) => {
|
|
406
|
+
const o = At(() => /* @__PURE__ */ new WeakMap(), mo, t);
|
|
407
407
|
return At(e, o, s);
|
|
408
|
-
},
|
|
409
|
-
function
|
|
410
|
-
return
|
|
408
|
+
}, po = {}, Ct = (e) => !!e.write, go = (e) => typeof e == "function";
|
|
409
|
+
function bo(e, t) {
|
|
410
|
+
return fo(
|
|
411
411
|
() => {
|
|
412
412
|
const s = /* @__PURE__ */ new WeakMap(), o = (r, c) => {
|
|
413
|
-
let
|
|
414
|
-
if (
|
|
415
|
-
return
|
|
416
|
-
const l = c && s.get(c),
|
|
413
|
+
let p = s.get(r);
|
|
414
|
+
if (p)
|
|
415
|
+
return p;
|
|
416
|
+
const l = c && s.get(c), f = [], x = [];
|
|
417
417
|
return r.forEach((N, k) => {
|
|
418
418
|
const I = t ? t(N) : k;
|
|
419
419
|
x[k] = I;
|
|
420
420
|
const O = l && l.atomList[l.keyList.indexOf(I)];
|
|
421
421
|
if (O) {
|
|
422
|
-
|
|
422
|
+
f[k] = O;
|
|
423
423
|
return;
|
|
424
424
|
}
|
|
425
425
|
const W = (H) => {
|
|
@@ -435,60 +435,60 @@ function go(e, t) {
|
|
|
435
435
|
const le = H(n), J = H(e), re = o(J, le == null ? void 0 : le.arr).keyList.indexOf(I);
|
|
436
436
|
if (re < 0 || re >= J.length)
|
|
437
437
|
throw new Error("splitAtom: index out of bounds for write");
|
|
438
|
-
const u =
|
|
438
|
+
const u = go(Z) ? Z(J[re]) : Z;
|
|
439
439
|
$(e, [
|
|
440
440
|
...J.slice(0, re),
|
|
441
441
|
u,
|
|
442
442
|
...J.slice(re + 1)
|
|
443
443
|
]);
|
|
444
444
|
};
|
|
445
|
-
|
|
446
|
-
}), l && l.keyList.length === x.length && l.keyList.every((N, k) => N === x[k]) ?
|
|
445
|
+
f[k] = Ct(e) ? oe(W, G) : oe(W);
|
|
446
|
+
}), l && l.keyList.length === x.length && l.keyList.every((N, k) => N === x[k]) ? p = l : p = { arr: r, atomList: f, keyList: x }, s.set(r, p), p;
|
|
447
447
|
}, n = oe((r) => {
|
|
448
|
-
const c = r(n),
|
|
449
|
-
return o(
|
|
448
|
+
const c = r(n), p = r(e);
|
|
449
|
+
return o(p, c == null ? void 0 : c.arr);
|
|
450
450
|
});
|
|
451
451
|
(at ? "production" : void 0) !== "production" && (n.debugPrivate = !0), n.init = void 0;
|
|
452
452
|
const i = Ct(e) ? oe(
|
|
453
453
|
(r) => r(n).atomList,
|
|
454
|
-
(r, c,
|
|
455
|
-
switch (
|
|
454
|
+
(r, c, p) => {
|
|
455
|
+
switch (p.type) {
|
|
456
456
|
case "remove": {
|
|
457
|
-
const l = r(i).indexOf(
|
|
457
|
+
const l = r(i).indexOf(p.atom);
|
|
458
458
|
if (l >= 0) {
|
|
459
|
-
const
|
|
459
|
+
const f = r(e);
|
|
460
460
|
c(e, [
|
|
461
|
-
...
|
|
462
|
-
...
|
|
461
|
+
...f.slice(0, l),
|
|
462
|
+
...f.slice(l + 1)
|
|
463
463
|
]);
|
|
464
464
|
}
|
|
465
465
|
break;
|
|
466
466
|
}
|
|
467
467
|
case "insert": {
|
|
468
|
-
const l =
|
|
468
|
+
const l = p.before ? r(i).indexOf(p.before) : r(i).length;
|
|
469
469
|
if (l >= 0) {
|
|
470
|
-
const
|
|
470
|
+
const f = r(e);
|
|
471
471
|
c(e, [
|
|
472
|
-
...
|
|
473
|
-
|
|
474
|
-
...
|
|
472
|
+
...f.slice(0, l),
|
|
473
|
+
p.value,
|
|
474
|
+
...f.slice(l)
|
|
475
475
|
]);
|
|
476
476
|
}
|
|
477
477
|
break;
|
|
478
478
|
}
|
|
479
479
|
case "move": {
|
|
480
|
-
const l = r(i).indexOf(
|
|
481
|
-
if (l >= 0 &&
|
|
480
|
+
const l = r(i).indexOf(p.atom), f = p.before ? r(i).indexOf(p.before) : r(i).length;
|
|
481
|
+
if (l >= 0 && f >= 0) {
|
|
482
482
|
const x = r(e);
|
|
483
|
-
l <
|
|
483
|
+
l < f ? c(e, [
|
|
484
484
|
...x.slice(0, l),
|
|
485
|
-
...x.slice(l + 1,
|
|
485
|
+
...x.slice(l + 1, f),
|
|
486
486
|
x[l],
|
|
487
|
-
...x.slice(
|
|
487
|
+
...x.slice(f)
|
|
488
488
|
]) : c(e, [
|
|
489
|
-
...x.slice(0,
|
|
489
|
+
...x.slice(0, f),
|
|
490
490
|
x[l],
|
|
491
|
-
...x.slice(
|
|
491
|
+
...x.slice(f, l),
|
|
492
492
|
...x.slice(l + 1)
|
|
493
493
|
]);
|
|
494
494
|
}
|
|
@@ -500,7 +500,7 @@ function go(e, t) {
|
|
|
500
500
|
return i;
|
|
501
501
|
},
|
|
502
502
|
e,
|
|
503
|
-
t ||
|
|
503
|
+
t || po
|
|
504
504
|
);
|
|
505
505
|
}
|
|
506
506
|
function $r(e) {
|
|
@@ -523,24 +523,24 @@ function $r(e) {
|
|
|
523
523
|
);
|
|
524
524
|
return o;
|
|
525
525
|
}
|
|
526
|
-
const
|
|
527
|
-
function
|
|
526
|
+
const xo = (e) => typeof (e == null ? void 0 : e.then) == "function";
|
|
527
|
+
function ho(e) {
|
|
528
528
|
let t, s;
|
|
529
529
|
const o = {
|
|
530
530
|
getItem: (n, i) => {
|
|
531
531
|
var r, c;
|
|
532
|
-
const
|
|
533
|
-
if (
|
|
532
|
+
const p = (f) => {
|
|
533
|
+
if (f = f || "", t !== f) {
|
|
534
534
|
try {
|
|
535
|
-
s = JSON.parse(
|
|
535
|
+
s = JSON.parse(f);
|
|
536
536
|
} catch {
|
|
537
537
|
return i;
|
|
538
538
|
}
|
|
539
|
-
t =
|
|
539
|
+
t = f;
|
|
540
540
|
}
|
|
541
541
|
return s;
|
|
542
542
|
}, l = (c = (r = e()) == null ? void 0 : r.getItem(n)) != null ? c : null;
|
|
543
|
-
return
|
|
543
|
+
return xo(l) ? l.then(p) : p(l);
|
|
544
544
|
},
|
|
545
545
|
setItem: (n, i) => {
|
|
546
546
|
var r;
|
|
@@ -555,11 +555,11 @@ function xo(e) {
|
|
|
555
555
|
if (!(e() instanceof window.Storage))
|
|
556
556
|
return () => {
|
|
557
557
|
};
|
|
558
|
-
const c = (
|
|
559
|
-
if (
|
|
558
|
+
const c = (p) => {
|
|
559
|
+
if (p.storageArea === e() && p.key === n) {
|
|
560
560
|
let l;
|
|
561
561
|
try {
|
|
562
|
-
l = JSON.parse(
|
|
562
|
+
l = JSON.parse(p.newValue || "");
|
|
563
563
|
} catch {
|
|
564
564
|
l = r;
|
|
565
565
|
}
|
|
@@ -571,30 +571,30 @@ function xo(e) {
|
|
|
571
571
|
};
|
|
572
572
|
}), o;
|
|
573
573
|
}
|
|
574
|
-
const
|
|
574
|
+
const vo = ho(
|
|
575
575
|
() => typeof window < "u" ? window.localStorage : void 0
|
|
576
576
|
);
|
|
577
|
-
function Re(e, t, s =
|
|
577
|
+
function Re(e, t, s = vo, o) {
|
|
578
578
|
const n = o == null ? void 0 : o.unstable_getOnInit, i = oe(
|
|
579
579
|
n ? s.getItem(e, t) : t
|
|
580
580
|
);
|
|
581
581
|
return (at ? "production" : void 0) !== "production" && (i.debugPrivate = !0), i.onMount = (c) => {
|
|
582
582
|
n || c(s.getItem(e, t));
|
|
583
|
-
let
|
|
584
|
-
return s.subscribe && (
|
|
583
|
+
let p;
|
|
584
|
+
return s.subscribe && (p = s.subscribe(e, c, t)), p;
|
|
585
585
|
}, oe(
|
|
586
586
|
(c) => c(i),
|
|
587
|
-
(c,
|
|
588
|
-
const
|
|
589
|
-
return
|
|
587
|
+
(c, p, l) => {
|
|
588
|
+
const f = typeof l == "function" ? l(c(i)) : l;
|
|
589
|
+
return f === Ht ? (p(i, t), s.removeItem(e)) : f instanceof Promise ? f.then((x) => (p(i, x), s.setItem(e, x))) : (p(i, f), s.setItem(e, f));
|
|
590
590
|
}
|
|
591
591
|
);
|
|
592
592
|
}
|
|
593
593
|
const qt = w(null);
|
|
594
594
|
qt.debugLabel = "chaiBuilderPropsAtom";
|
|
595
|
-
const
|
|
596
|
-
|
|
597
|
-
const Fr = () => !1,
|
|
595
|
+
const yo = w({});
|
|
596
|
+
yo.debugLabel = "chaiExternalDataAtom";
|
|
597
|
+
const Fr = () => !1, wo = (e) => {
|
|
598
598
|
const t = e.replace(me, "").split(",");
|
|
599
599
|
return { baseClasses: t[0], classes: t[1] };
|
|
600
600
|
}, Qe = (e, t) => {
|
|
@@ -602,7 +602,7 @@ const Fr = () => !1, yo = (e) => {
|
|
|
602
602
|
return !0;
|
|
603
603
|
const s = Le(e);
|
|
604
604
|
return s && pe(s, "canAcceptBlock") ? s.canAcceptBlock(t) : !1;
|
|
605
|
-
},
|
|
605
|
+
}, No = (e, t) => {
|
|
606
606
|
const s = Le(t);
|
|
607
607
|
return s && pe(s, "canBeNested") ? s.canBeNested(e) : !0;
|
|
608
608
|
}, Ur = (e) => {
|
|
@@ -615,7 +615,7 @@ const Fr = () => !1, yo = (e) => {
|
|
|
615
615
|
const o = F(t, "data._type", ""), n = F(s, "data._type", "");
|
|
616
616
|
return Qe(n, o);
|
|
617
617
|
};
|
|
618
|
-
const
|
|
618
|
+
const ko = new Vt({ children: "blockNodes" });
|
|
619
619
|
function Kt(e, t, s) {
|
|
620
620
|
const o = M(e, (i) => i._parent === t), n = [];
|
|
621
621
|
for (let i = 0; i < o.length; i++) {
|
|
@@ -635,8 +635,8 @@ function Kt(e, t, s) {
|
|
|
635
635
|
}
|
|
636
636
|
return ne(n);
|
|
637
637
|
}
|
|
638
|
-
function
|
|
639
|
-
let t =
|
|
638
|
+
function jo(e) {
|
|
639
|
+
let t = ko.convert(e.map((s) => Oe(s, ["settings"])));
|
|
640
640
|
return t = !t.type && t.blockNodes ? t.blockNodes : ve(t) ? [] : [t], t;
|
|
641
641
|
}
|
|
642
642
|
const Jt = (e) => {
|
|
@@ -644,30 +644,30 @@ const Jt = (e) => {
|
|
|
644
644
|
return Object.keys(e).forEach((s) => {
|
|
645
645
|
Et(e[s]) && e[s].startsWith("slot") && (t[s] = e[s].replace("slot:", ""));
|
|
646
646
|
}), t;
|
|
647
|
-
},
|
|
647
|
+
}, So = (e, t, s = null) => {
|
|
648
648
|
let o = te(e, { _id: t });
|
|
649
649
|
o = { ...o, oldId: o._id, _id: ce() }, s && (o = { ...o, _parent: s });
|
|
650
650
|
const n = [o];
|
|
651
651
|
M(e, { _parent: t }).length > 0 && n.push(ne(Kt(e, t, o._id)));
|
|
652
652
|
const i = ne(n);
|
|
653
653
|
return R(i, (r) => {
|
|
654
|
-
const c = r,
|
|
655
|
-
return Object.keys(
|
|
656
|
-
const
|
|
657
|
-
c[l] = `slot:${
|
|
654
|
+
const c = r, p = Jt(c);
|
|
655
|
+
return Object.keys(p).length > 0 && Object.keys(p).forEach((l) => {
|
|
656
|
+
const f = te(i, { oldId: p[l].replace("slot:", "") });
|
|
657
|
+
c[l] = `slot:${f._id}`;
|
|
658
658
|
}), Oe(c, ["global", "oldId"]);
|
|
659
659
|
});
|
|
660
660
|
};
|
|
661
661
|
const ie = w([]);
|
|
662
662
|
ie.debugLabel = "presentBlocksAtom";
|
|
663
|
-
const rt =
|
|
663
|
+
const rt = bo(ie);
|
|
664
664
|
rt.debugLabel = "pageBlocksAtomsAtom";
|
|
665
|
-
const
|
|
666
|
-
|
|
667
|
-
const
|
|
668
|
-
|
|
669
|
-
const
|
|
670
|
-
|
|
665
|
+
const Ao = w((e) => jo(e(ie)));
|
|
666
|
+
Ao.debugLabel = "pageBlocksTreeAtom";
|
|
667
|
+
const Co = w("");
|
|
668
|
+
Co.debugLabel = "builderActivePageAtom";
|
|
669
|
+
const _o = w(-1);
|
|
670
|
+
_o.debugLabel = "destinationDropIndexAtom";
|
|
671
671
|
const Yt = w([]);
|
|
672
672
|
Yt.debugLabel = "buildingBlocksAtom";
|
|
673
673
|
const Bo = w((e) => {
|
|
@@ -693,11 +693,11 @@ const ct = w((e) => {
|
|
|
693
693
|
};
|
|
694
694
|
});
|
|
695
695
|
ct.debugLabel = "selectedBlockAtom";
|
|
696
|
-
const
|
|
697
|
-
const t = e(lt), s = R(t,
|
|
696
|
+
const Ro = (e) => F(e, "parent", null), To = w((e) => {
|
|
697
|
+
const t = e(lt), s = R(t, Ro);
|
|
698
698
|
return M(e(ie), (o) => q(s, o._id));
|
|
699
699
|
});
|
|
700
|
-
|
|
700
|
+
To.debugLabel = "selectedBlocksParentsAtom";
|
|
701
701
|
const Qt = w(() => !1);
|
|
702
702
|
Qt.debugLabel = "selectedBlockFlexChildAtom";
|
|
703
703
|
const Xt = w(() => !1);
|
|
@@ -718,7 +718,7 @@ const $e = () => {
|
|
|
718
718
|
[t]
|
|
719
719
|
);
|
|
720
720
|
return [e, t, s];
|
|
721
|
-
},
|
|
721
|
+
}, _t = (e) => {
|
|
722
722
|
switch (e.type) {
|
|
723
723
|
case "singular":
|
|
724
724
|
return e.uiSchema;
|
|
@@ -729,7 +729,7 @@ const $e = () => {
|
|
|
729
729
|
if (q(["slot", "styles"], r.type))
|
|
730
730
|
return;
|
|
731
731
|
const c = i;
|
|
732
|
-
s[c] =
|
|
732
|
+
s[c] = _t(r);
|
|
733
733
|
}), s;
|
|
734
734
|
case "list":
|
|
735
735
|
const { itemProperties: o } = e, n = {
|
|
@@ -740,12 +740,12 @@ const $e = () => {
|
|
|
740
740
|
if (q(["slot", "styles"], r.type))
|
|
741
741
|
return;
|
|
742
742
|
const c = i;
|
|
743
|
-
n.items[c] =
|
|
743
|
+
n.items[c] = _t(r);
|
|
744
744
|
}), n;
|
|
745
745
|
default:
|
|
746
746
|
return {};
|
|
747
747
|
}
|
|
748
|
-
},
|
|
748
|
+
}, Bt = (e) => {
|
|
749
749
|
switch (e.type) {
|
|
750
750
|
case "singular":
|
|
751
751
|
return e.schema;
|
|
@@ -756,11 +756,11 @@ const $e = () => {
|
|
|
756
756
|
properties: {}
|
|
757
757
|
};
|
|
758
758
|
return Object.keys(t).forEach((c) => {
|
|
759
|
-
const
|
|
760
|
-
if (q(["slot", "styles"],
|
|
759
|
+
const p = t[c];
|
|
760
|
+
if (q(["slot", "styles"], p.type))
|
|
761
761
|
return;
|
|
762
762
|
const l = c;
|
|
763
|
-
o.properties[l] =
|
|
763
|
+
o.properties[l] = Bt(p);
|
|
764
764
|
}), o;
|
|
765
765
|
case "list":
|
|
766
766
|
const { itemProperties: n, title: i } = e, r = {
|
|
@@ -772,11 +772,11 @@ const $e = () => {
|
|
|
772
772
|
}
|
|
773
773
|
};
|
|
774
774
|
return Object.keys(n).forEach((c) => {
|
|
775
|
-
const
|
|
776
|
-
if (q(["slot", "styles"],
|
|
775
|
+
const p = n[c];
|
|
776
|
+
if (q(["slot", "styles"], p.type))
|
|
777
777
|
return;
|
|
778
778
|
const l = c;
|
|
779
|
-
r.items.properties[l] =
|
|
779
|
+
r.items.properties[l] = Bt(p), Se(r.items, "title", F(p, "itemTitle", `${i} item`));
|
|
780
780
|
}), r;
|
|
781
781
|
default:
|
|
782
782
|
return {};
|
|
@@ -786,9 +786,9 @@ const $e = () => {
|
|
|
786
786
|
return {};
|
|
787
787
|
const t = {};
|
|
788
788
|
return Object.keys(e).forEach((s) => {
|
|
789
|
-
t[s] =
|
|
789
|
+
t[s] = Io(e[s]);
|
|
790
790
|
}), t;
|
|
791
|
-
},
|
|
791
|
+
}, Po = (e) => {
|
|
792
792
|
if (ve(e.default))
|
|
793
793
|
return [];
|
|
794
794
|
const { itemProperties: t } = e;
|
|
@@ -798,7 +798,7 @@ const $e = () => {
|
|
|
798
798
|
pe(t, i) && F(t[i], "i18n", !1) && (o[i] = $t);
|
|
799
799
|
}), o;
|
|
800
800
|
});
|
|
801
|
-
},
|
|
801
|
+
}, Io = (e) => {
|
|
802
802
|
switch (e.type) {
|
|
803
803
|
case "styles":
|
|
804
804
|
return e.default;
|
|
@@ -810,7 +810,7 @@ const $e = () => {
|
|
|
810
810
|
case "model":
|
|
811
811
|
return es(e.properties);
|
|
812
812
|
case "list":
|
|
813
|
-
return
|
|
813
|
+
return Po(e);
|
|
814
814
|
default:
|
|
815
815
|
return "";
|
|
816
816
|
}
|
|
@@ -827,8 +827,8 @@ var ut = { exports: {} }, Kr = ut.exports;
|
|
|
827
827
|
}
|
|
828
828
|
let s = function() {
|
|
829
829
|
let o = [], n = -1, i = 0, r = !1, c;
|
|
830
|
-
function
|
|
831
|
-
return !l || typeof l[
|
|
830
|
+
function p(l, f) {
|
|
831
|
+
return !l || typeof l[f] != "function" ? this : (r = !0, l[f](), r = !1, this);
|
|
832
832
|
}
|
|
833
833
|
return {
|
|
834
834
|
/**
|
|
@@ -855,8 +855,8 @@ var ut = { exports: {} }, Kr = ut.exports;
|
|
|
855
855
|
let l = o[n];
|
|
856
856
|
if (!l)
|
|
857
857
|
return this;
|
|
858
|
-
const
|
|
859
|
-
for (; l.groupId ===
|
|
858
|
+
const f = l.groupId;
|
|
859
|
+
for (; l.groupId === f && (p(l, "undo"), n -= 1, l = o[n], !(!l || !l.groupId)); )
|
|
860
860
|
;
|
|
861
861
|
return c && c(), this;
|
|
862
862
|
},
|
|
@@ -867,8 +867,8 @@ var ut = { exports: {} }, Kr = ut.exports;
|
|
|
867
867
|
let l = o[n + 1];
|
|
868
868
|
if (!l)
|
|
869
869
|
return this;
|
|
870
|
-
const
|
|
871
|
-
for (; l.groupId ===
|
|
870
|
+
const f = l.groupId;
|
|
871
|
+
for (; l.groupId === f && (p(l, "redo"), n += 1, l = o[n + 1], !(!l || !l.groupId)); )
|
|
872
872
|
;
|
|
873
873
|
return c && c(), this;
|
|
874
874
|
},
|
|
@@ -899,7 +899,7 @@ var ut = { exports: {} }, Kr = ut.exports;
|
|
|
899
899
|
* @returns {array}
|
|
900
900
|
*/
|
|
901
901
|
getCommands: function(l) {
|
|
902
|
-
return l ? o.filter((
|
|
902
|
+
return l ? o.filter((f) => f.groupId === l) : o;
|
|
903
903
|
},
|
|
904
904
|
/**
|
|
905
905
|
* Returns the index of the actions list.
|
|
@@ -920,16 +920,16 @@ var ut = { exports: {} }, Kr = ut.exports;
|
|
|
920
920
|
e.exports ? e.exports = s : window.UndoManager = s;
|
|
921
921
|
})();
|
|
922
922
|
})(ut);
|
|
923
|
-
var
|
|
924
|
-
const
|
|
925
|
-
const [e, t] = D(
|
|
923
|
+
var Mo = ut.exports;
|
|
924
|
+
const Do = /* @__PURE__ */ Us(Mo), Eo = w(Je), Oo = w(null), ts = () => {
|
|
925
|
+
const [e, t] = D(Eo);
|
|
926
926
|
return [
|
|
927
|
-
|
|
927
|
+
zs(e) ? { ...Je, ...e } : Je,
|
|
928
928
|
t
|
|
929
929
|
];
|
|
930
|
-
}, Jr = () => D(
|
|
930
|
+
}, Jr = () => D(Oo), Lo = w(null), zo = () => ({ currentPage: X(Lo) }), ss = new Vt({});
|
|
931
931
|
function Vo(e) {
|
|
932
|
-
let t =
|
|
932
|
+
let t = ss.convert(e);
|
|
933
933
|
return t = !t.type && t.children && t.children.length ? t.children : ve(t) ? [] : [t], t;
|
|
934
934
|
}
|
|
935
935
|
const mt = (e, t) => ne(
|
|
@@ -952,9 +952,9 @@ function ft(e, t = !1) {
|
|
|
952
952
|
} : o.children && o.children.length && ft(o.children);
|
|
953
953
|
}
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function os(e) {
|
|
956
956
|
let t = [], s = M(e, { type: "GlobalBlock" });
|
|
957
|
-
return s.length > 0 && (s = R(s,
|
|
957
|
+
return s.length > 0 && (s = R(s, ns), ue(s, (o) => {
|
|
958
958
|
t = [...t, ...$o(o)];
|
|
959
959
|
})), t;
|
|
960
960
|
}
|
|
@@ -962,29 +962,29 @@ function $o(e) {
|
|
|
962
962
|
let t = [];
|
|
963
963
|
const s = F(Q(e), "parent", null);
|
|
964
964
|
Se(Q(e), "parent", null);
|
|
965
|
-
const o = [
|
|
965
|
+
const o = [ss.convert(as(e))];
|
|
966
966
|
ft(o, !0);
|
|
967
967
|
let n = mt(o, e[0]._id);
|
|
968
|
-
return n = Se(n, "0.parent", s), t = [...t, n, ...
|
|
968
|
+
return n = Se(n, "0.parent", s), t = [...t, n, ...os(n)], t;
|
|
969
969
|
}
|
|
970
|
-
function
|
|
970
|
+
function ns(e) {
|
|
971
971
|
const t = te(Xe, { _id: e._id });
|
|
972
972
|
if (!t)
|
|
973
973
|
return [];
|
|
974
974
|
const s = [t], o = M(Xe, { _parent: e._id });
|
|
975
|
-
return o.length ? ne([...s, ...ne(R(o,
|
|
975
|
+
return o.length ? ne([...s, ...ne(R(o, ns))]) : ne(s);
|
|
976
976
|
}
|
|
977
|
-
const
|
|
977
|
+
const as = (e) => JSON.parse(JSON.stringify(e));
|
|
978
978
|
let Xe = [];
|
|
979
979
|
function Fo(e) {
|
|
980
980
|
Xe = e;
|
|
981
|
-
const t = Vo(
|
|
981
|
+
const t = Vo(as(e));
|
|
982
982
|
ft(t);
|
|
983
|
-
const s = mt(t, null), o =
|
|
983
|
+
const s = mt(t, null), o = os(s), n = {};
|
|
984
984
|
return ue(o, (i) => Se(n, Q(i).blockId, i)), [s, n];
|
|
985
985
|
}
|
|
986
986
|
const Uo = () => {
|
|
987
|
-
const [e] =
|
|
987
|
+
const [e] = ts(), { currentPage: t } = zo(), [s] = we();
|
|
988
988
|
return L(() => {
|
|
989
989
|
const o = R(
|
|
990
990
|
s,
|
|
@@ -999,33 +999,33 @@ const Uo = () => {
|
|
|
999
999
|
}, ke = (e, t = void 0) => {
|
|
1000
1000
|
const s = X(qt);
|
|
1001
1001
|
return F(s, e, t);
|
|
1002
|
-
},
|
|
1003
|
-
|
|
1004
|
-
const Wo = () => D(
|
|
1002
|
+
}, rs = w([]);
|
|
1003
|
+
rs.debugLabel = "dataProvidersAtom";
|
|
1004
|
+
const Wo = () => D(rs), pt = w("SAVED");
|
|
1005
1005
|
pt.debugLabel = "pageSyncStateAtom";
|
|
1006
1006
|
const Yr = () => {
|
|
1007
|
-
const [e, t] = D(pt), s = ke("
|
|
1008
|
-
}), o = ke("
|
|
1009
|
-
}), n = ke("onSyncStatusChange", (
|
|
1010
|
-
}), i = Uo(), [r] = Wo();
|
|
1011
|
-
return { savePage:
|
|
1007
|
+
const [e, t] = D(pt), s = ke("onSavePage", async (l) => {
|
|
1008
|
+
}), o = ke("onSave", async (l) => {
|
|
1009
|
+
}), n = ke("onSyncStatusChange", (l) => {
|
|
1010
|
+
}), i = Uo(), [r] = Wo(), [c] = ts();
|
|
1011
|
+
return { savePage: Ws(
|
|
1012
1012
|
async () => {
|
|
1013
1013
|
t("SAVING"), n("SAVING");
|
|
1014
|
-
const
|
|
1015
|
-
return await o({ blocks:
|
|
1014
|
+
const l = i();
|
|
1015
|
+
return await s({ blocks: l.blocks, providers: r }), await o({ blocks: l.blocks, providers: r, brandingOptions: c }), setTimeout(() => {
|
|
1016
1016
|
t("SAVED"), n("SAVED");
|
|
1017
1017
|
}, 100), !0;
|
|
1018
1018
|
},
|
|
1019
|
-
[i, t,
|
|
1019
|
+
[i, t, c, o, n],
|
|
1020
1020
|
5e3
|
|
1021
1021
|
// save only every 5 seconds
|
|
1022
1022
|
), syncState: e, setSyncState: t };
|
|
1023
|
-
}, se = new
|
|
1023
|
+
}, se = new Do();
|
|
1024
1024
|
se.setLimit(50);
|
|
1025
|
-
const
|
|
1025
|
+
const is = () => {
|
|
1026
1026
|
const [, e] = D(pt);
|
|
1027
1027
|
return Ce(() => (se.setCallback(() => e("UNSAVED")), () => {
|
|
1028
|
-
se.setCallback(
|
|
1028
|
+
se.setCallback(Vs);
|
|
1029
1029
|
}), []), {
|
|
1030
1030
|
add: se.add,
|
|
1031
1031
|
undo: se.undo,
|
|
@@ -1053,13 +1053,13 @@ function Go(e, t, s, o) {
|
|
|
1053
1053
|
s && (n = e.filter((c) => c._parent === s));
|
|
1054
1054
|
const i = o !== void 0 ? o : n.length;
|
|
1055
1055
|
let r = e.length;
|
|
1056
|
-
for (let c = 0,
|
|
1056
|
+
for (let c = 0, p = 0; c < e.length; c++)
|
|
1057
1057
|
if (e[c]._parent === s) {
|
|
1058
|
-
if (
|
|
1058
|
+
if (p === i) {
|
|
1059
1059
|
r = c;
|
|
1060
1060
|
break;
|
|
1061
1061
|
}
|
|
1062
|
-
|
|
1062
|
+
p++;
|
|
1063
1063
|
}
|
|
1064
1064
|
return !s && o !== void 0 && o >= n.length && (r = e.length), [...e.slice(0, r), ...t, ...e.slice(r)];
|
|
1065
1065
|
}
|
|
@@ -1089,7 +1089,7 @@ const Ho = () => {
|
|
|
1089
1089
|
}
|
|
1090
1090
|
};
|
|
1091
1091
|
}, we = () => D(ie), xe = () => {
|
|
1092
|
-
const { add: e } =
|
|
1092
|
+
const { add: e } = is(), [t] = we(), {
|
|
1093
1093
|
setNewBlocks: s,
|
|
1094
1094
|
addBlocks: o,
|
|
1095
1095
|
removeBlocks: n,
|
|
@@ -1115,7 +1115,7 @@ const Ho = () => {
|
|
|
1115
1115
|
if (k)
|
|
1116
1116
|
I = R(x, (O) => ({ _id: O, ...k }));
|
|
1117
1117
|
else {
|
|
1118
|
-
const O =
|
|
1118
|
+
const O = $s(N);
|
|
1119
1119
|
I = R(x, (W) => {
|
|
1120
1120
|
const G = t.find(($) => $._id === W), H = { _id: W };
|
|
1121
1121
|
return ue(O, ($) => H[$] = G[$]), H;
|
|
@@ -1203,7 +1203,7 @@ const bt = ge(
|
|
|
1203
1203
|
}
|
|
1204
1204
|
), Yo = m.forwardRef(
|
|
1205
1205
|
({ className: e, variant: t, size: s, asChild: o = !1, ...n }, i) => {
|
|
1206
|
-
const r = o ?
|
|
1206
|
+
const r = o ? Gs : "button";
|
|
1207
1207
|
return /* @__PURE__ */ a.jsx(r, { className: d(bt({ variant: t, size: s, className: e })), ref: i, ...n });
|
|
1208
1208
|
}
|
|
1209
1209
|
);
|
|
@@ -1221,7 +1221,7 @@ const Xo = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
1221
1221
|
...s,
|
|
1222
1222
|
children: [
|
|
1223
1223
|
t,
|
|
1224
|
-
/* @__PURE__ */ a.jsx(
|
|
1224
|
+
/* @__PURE__ */ a.jsx(Hs, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" })
|
|
1225
1225
|
]
|
|
1226
1226
|
}
|
|
1227
1227
|
) }));
|
|
@@ -1277,9 +1277,9 @@ const nn = ge(
|
|
|
1277
1277
|
variant: "default"
|
|
1278
1278
|
}
|
|
1279
1279
|
}
|
|
1280
|
-
), Zr = ({ className: e, variant: t, ...s }) => /* @__PURE__ */ a.jsx("div", { className: d(nn({ variant: t }), e), ...s }), ei = U.Root, ti = U.Trigger,
|
|
1281
|
-
|
|
1282
|
-
const
|
|
1280
|
+
), Zr = ({ className: e, variant: t, ...s }) => /* @__PURE__ */ a.jsx("div", { className: d(nn({ variant: t }), e), ...s }), ei = U.Root, ti = U.Trigger, ls = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(U.Portal, { className: d(e), ...t });
|
|
1281
|
+
ls.displayName = U.Portal.displayName;
|
|
1282
|
+
const cs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1283
1283
|
U.Overlay,
|
|
1284
1284
|
{
|
|
1285
1285
|
className: d(
|
|
@@ -1290,9 +1290,9 @@ const ls = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1290
1290
|
ref: s
|
|
1291
1291
|
}
|
|
1292
1292
|
));
|
|
1293
|
-
|
|
1294
|
-
const an = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs(
|
|
1295
|
-
/* @__PURE__ */ a.jsx(
|
|
1293
|
+
cs.displayName = U.Overlay.displayName;
|
|
1294
|
+
const an = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs(ls, { children: [
|
|
1295
|
+
/* @__PURE__ */ a.jsx(cs, {}),
|
|
1296
1296
|
/* @__PURE__ */ a.jsx(
|
|
1297
1297
|
U.Content,
|
|
1298
1298
|
{
|
|
@@ -1325,10 +1325,10 @@ const mn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1325
1325
|
}
|
|
1326
1326
|
));
|
|
1327
1327
|
mn.displayName = U.Cancel.displayName;
|
|
1328
|
-
const
|
|
1329
|
-
|
|
1330
|
-
const
|
|
1331
|
-
|
|
1328
|
+
const ds = B.Root, fn = B.Trigger, us = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(B.Portal, { className: d(e), ...t });
|
|
1329
|
+
us.displayName = B.Portal.displayName;
|
|
1330
|
+
const ms = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1331
|
+
B.Overlay,
|
|
1332
1332
|
{
|
|
1333
1333
|
ref: s,
|
|
1334
1334
|
className: d(
|
|
@@ -1338,11 +1338,11 @@ const us = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1338
1338
|
...t
|
|
1339
1339
|
}
|
|
1340
1340
|
));
|
|
1341
|
-
|
|
1342
|
-
const xt = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(
|
|
1343
|
-
/* @__PURE__ */ a.jsx(
|
|
1341
|
+
ms.displayName = B.Overlay.displayName;
|
|
1342
|
+
const xt = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(us, { children: [
|
|
1343
|
+
/* @__PURE__ */ a.jsx(ms, {}),
|
|
1344
1344
|
/* @__PURE__ */ a.jsxs(
|
|
1345
|
-
|
|
1345
|
+
B.Content,
|
|
1346
1346
|
{
|
|
1347
1347
|
ref: o,
|
|
1348
1348
|
className: d(
|
|
@@ -1352,7 +1352,7 @@ const xt = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
1352
1352
|
...s,
|
|
1353
1353
|
children: [
|
|
1354
1354
|
t,
|
|
1355
|
-
/* @__PURE__ */ a.jsxs(
|
|
1355
|
+
/* @__PURE__ */ a.jsxs(B.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
|
|
1356
1356
|
/* @__PURE__ */ a.jsx(st, { className: "h-4 w-4" }),
|
|
1357
1357
|
/* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
|
|
1358
1358
|
] })
|
|
@@ -1360,22 +1360,22 @@ const xt = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
1360
1360
|
}
|
|
1361
1361
|
)
|
|
1362
1362
|
] }));
|
|
1363
|
-
xt.displayName =
|
|
1363
|
+
xt.displayName = B.Content.displayName;
|
|
1364
1364
|
const pn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-1.5 text-center sm:text-left", e), ...t });
|
|
1365
1365
|
pn.displayName = "DialogHeader";
|
|
1366
1366
|
const gn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
1367
1367
|
gn.displayName = "DialogFooter";
|
|
1368
1368
|
const bn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1369
|
-
|
|
1369
|
+
B.Title,
|
|
1370
1370
|
{
|
|
1371
1371
|
ref: s,
|
|
1372
1372
|
className: d("text-lg font-semibold leading-none tracking-tight", e),
|
|
1373
1373
|
...t
|
|
1374
1374
|
}
|
|
1375
1375
|
));
|
|
1376
|
-
bn.displayName =
|
|
1377
|
-
const xn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1378
|
-
xn.displayName =
|
|
1376
|
+
bn.displayName = B.Title.displayName;
|
|
1377
|
+
const xn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(B.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
|
|
1378
|
+
xn.displayName = B.Description.displayName;
|
|
1379
1379
|
const hn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx("div", { ref: s, className: d("rounded-xl border bg-card text-card-foreground shadow", e), ...t }));
|
|
1380
1380
|
hn.displayName = "Card";
|
|
1381
1381
|
const vn = m.forwardRef(
|
|
@@ -1425,13 +1425,13 @@ const Cn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1425
1425
|
}
|
|
1426
1426
|
));
|
|
1427
1427
|
Cn.displayName = "Textarea";
|
|
1428
|
-
const
|
|
1428
|
+
const _n = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__ */ a.jsxs(de.Root, { ref: o, className: d("relative overflow-hidden", e), ...s, children: [
|
|
1429
1429
|
/* @__PURE__ */ a.jsx(de.Viewport, { className: "h-full w-full rounded-[inherit]", children: t }),
|
|
1430
|
-
/* @__PURE__ */ a.jsx(
|
|
1430
|
+
/* @__PURE__ */ a.jsx(fs, {}),
|
|
1431
1431
|
/* @__PURE__ */ a.jsx(de.Corner, {})
|
|
1432
1432
|
] }));
|
|
1433
|
-
|
|
1434
|
-
const
|
|
1433
|
+
_n.displayName = de.Root.displayName;
|
|
1434
|
+
const fs = m.forwardRef(({ className: e, orientation: t = "vertical", ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
1435
1435
|
de.ScrollAreaScrollbar,
|
|
1436
1436
|
{
|
|
1437
1437
|
ref: o,
|
|
@@ -1446,8 +1446,8 @@ const ms = m.forwardRef(({ className: e, orientation: t = "vertical", ...s }, o)
|
|
|
1446
1446
|
children: /* @__PURE__ */ a.jsx(de.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
1447
1447
|
}
|
|
1448
1448
|
));
|
|
1449
|
-
|
|
1450
|
-
const
|
|
1449
|
+
fs.displayName = de.ScrollAreaScrollbar.displayName;
|
|
1450
|
+
const Bn = be.Root, ps = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1451
1451
|
be.List,
|
|
1452
1452
|
{
|
|
1453
1453
|
ref: s,
|
|
@@ -1458,7 +1458,7 @@ const _n = be.Root, fs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE_
|
|
|
1458
1458
|
...t
|
|
1459
1459
|
}
|
|
1460
1460
|
));
|
|
1461
|
-
|
|
1461
|
+
ps.displayName = be.List.displayName;
|
|
1462
1462
|
const Ze = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1463
1463
|
be.Trigger,
|
|
1464
1464
|
{
|
|
@@ -1659,7 +1659,7 @@ const gi = z.Root, bi = z.Group, xi = z.Value, Wn = m.forwardRef(({ className: e
|
|
|
1659
1659
|
...s,
|
|
1660
1660
|
children: [
|
|
1661
1661
|
t,
|
|
1662
|
-
/* @__PURE__ */ a.jsx(z.Icon, { asChild: !0, children: /* @__PURE__ */ a.jsx(
|
|
1662
|
+
/* @__PURE__ */ a.jsx(z.Icon, { asChild: !0, children: /* @__PURE__ */ a.jsx(qs, { className: "h-4 w-4 opacity-50" }) })
|
|
1663
1663
|
]
|
|
1664
1664
|
}
|
|
1665
1665
|
));
|
|
@@ -1708,10 +1708,10 @@ const qn = m.forwardRef(({ className: e, children: t, ...s }, o) => /* @__PURE__
|
|
|
1708
1708
|
qn.displayName = z.Item.displayName;
|
|
1709
1709
|
const Kn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(z.Separator, { ref: s, className: d("-mx-1 my-1 h-px bg-muted", e), ...t }));
|
|
1710
1710
|
Kn.displayName = z.Separator.displayName;
|
|
1711
|
-
const hi =
|
|
1712
|
-
|
|
1713
|
-
const
|
|
1714
|
-
|
|
1711
|
+
const hi = B.Root, vi = B.Trigger, yi = B.Close, gs = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx(B.Portal, { className: d(e), ...t });
|
|
1712
|
+
gs.displayName = B.Portal.displayName;
|
|
1713
|
+
const bs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1714
|
+
B.Overlay,
|
|
1715
1715
|
{
|
|
1716
1716
|
className: d(
|
|
1717
1717
|
"fixed inset-0 z-50 bg-background/80 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
@@ -1721,7 +1721,7 @@ const gs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1721
1721
|
ref: s
|
|
1722
1722
|
}
|
|
1723
1723
|
));
|
|
1724
|
-
|
|
1724
|
+
bs.displayName = B.Overlay.displayName;
|
|
1725
1725
|
const Jn = ge(
|
|
1726
1726
|
"fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
1727
1727
|
{
|
|
@@ -1738,26 +1738,26 @@ const Jn = ge(
|
|
|
1738
1738
|
}
|
|
1739
1739
|
}
|
|
1740
1740
|
), Yn = m.forwardRef(
|
|
1741
|
-
({ side: e = "right", className: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
1742
|
-
/* @__PURE__ */ a.jsx(
|
|
1743
|
-
/* @__PURE__ */ a.jsxs(
|
|
1741
|
+
({ side: e = "right", className: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(gs, { children: [
|
|
1742
|
+
/* @__PURE__ */ a.jsx(bs, {}),
|
|
1743
|
+
/* @__PURE__ */ a.jsxs(B.Content, { ref: n, className: d(Jn({ side: e }), t), ...o, children: [
|
|
1744
1744
|
s,
|
|
1745
|
-
/* @__PURE__ */ a.jsxs(
|
|
1745
|
+
/* @__PURE__ */ a.jsxs(B.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
|
|
1746
1746
|
/* @__PURE__ */ a.jsx(st, { className: "h-4 w-4" }),
|
|
1747
1747
|
/* @__PURE__ */ a.jsx("span", { className: "sr-only", children: "Close" })
|
|
1748
1748
|
] })
|
|
1749
1749
|
] })
|
|
1750
1750
|
] })
|
|
1751
1751
|
);
|
|
1752
|
-
Yn.displayName =
|
|
1752
|
+
Yn.displayName = B.Content.displayName;
|
|
1753
1753
|
const Qn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col space-y-2 text-center sm:text-left", e), ...t });
|
|
1754
1754
|
Qn.displayName = "SheetHeader";
|
|
1755
1755
|
const Xn = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2", e), ...t });
|
|
1756
1756
|
Xn.displayName = "SheetFooter";
|
|
1757
|
-
const Zn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1758
|
-
Zn.displayName =
|
|
1759
|
-
const ea = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1760
|
-
ea.displayName =
|
|
1757
|
+
const Zn = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(B.Title, { ref: s, className: d("text-lg font-semibold text-foreground", e), ...t }));
|
|
1758
|
+
Zn.displayName = B.Title.displayName;
|
|
1759
|
+
const ea = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(B.Description, { ref: s, className: d("text-sm text-muted-foreground", e), ...t }));
|
|
1760
|
+
ea.displayName = B.Description.displayName;
|
|
1761
1761
|
const wi = T.Root, Ni = T.Trigger, ki = T.Group, ji = T.Portal, Si = T.Sub, Ai = T.RadioGroup, ta = m.forwardRef(({ className: e, inset: t, children: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
1762
1762
|
T.SubTrigger,
|
|
1763
1763
|
{
|
|
@@ -1949,7 +1949,7 @@ function ga({ ...e }) {
|
|
|
1949
1949
|
update: s
|
|
1950
1950
|
};
|
|
1951
1951
|
}
|
|
1952
|
-
function
|
|
1952
|
+
function xs() {
|
|
1953
1953
|
const [e, t] = m.useState(De);
|
|
1954
1954
|
return m.useEffect(() => (Me.push(t), () => {
|
|
1955
1955
|
const s = Me.indexOf(t);
|
|
@@ -1960,7 +1960,7 @@ function bs() {
|
|
|
1960
1960
|
dismiss: (s) => je({ type: "DISMISS_TOAST", toastId: s })
|
|
1961
1961
|
};
|
|
1962
1962
|
}
|
|
1963
|
-
const ba = Y.Provider,
|
|
1963
|
+
const ba = Y.Provider, hs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1964
1964
|
Y.Viewport,
|
|
1965
1965
|
{
|
|
1966
1966
|
ref: s,
|
|
@@ -1971,7 +1971,7 @@ const ba = Y.Provider, xs = m.forwardRef(({ className: e, ...t }, s) => /* @__PU
|
|
|
1971
1971
|
...t
|
|
1972
1972
|
}
|
|
1973
1973
|
));
|
|
1974
|
-
|
|
1974
|
+
hs.displayName = Y.Viewport.displayName;
|
|
1975
1975
|
const xa = ge(
|
|
1976
1976
|
"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
1977
1977
|
{
|
|
@@ -1985,8 +1985,8 @@ const xa = ge(
|
|
|
1985
1985
|
variant: "default"
|
|
1986
1986
|
}
|
|
1987
1987
|
}
|
|
1988
|
-
),
|
|
1989
|
-
|
|
1988
|
+
), vs = m.forwardRef(({ className: e, variant: t, ...s }, o) => /* @__PURE__ */ a.jsx(Y.Root, { ref: o, className: d(xa({ variant: t }), e), ...s }));
|
|
1989
|
+
vs.displayName = Y.Root.displayName;
|
|
1990
1990
|
const ha = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
1991
1991
|
Y.Action,
|
|
1992
1992
|
{
|
|
@@ -1999,7 +1999,7 @@ const ha = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
1999
1999
|
}
|
|
2000
2000
|
));
|
|
2001
2001
|
ha.displayName = Y.Action.displayName;
|
|
2002
|
-
const
|
|
2002
|
+
const ys = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2003
2003
|
Y.Close,
|
|
2004
2004
|
{
|
|
2005
2005
|
ref: s,
|
|
@@ -2012,26 +2012,26 @@ const vs = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
2012
2012
|
children: /* @__PURE__ */ a.jsx(st, { className: "h-4 w-4" })
|
|
2013
2013
|
}
|
|
2014
2014
|
));
|
|
2015
|
-
|
|
2016
|
-
const
|
|
2017
|
-
|
|
2018
|
-
const
|
|
2019
|
-
|
|
2015
|
+
ys.displayName = Y.Close.displayName;
|
|
2016
|
+
const ws = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Y.Title, { ref: s, className: d("text-sm font-semibold [&+div]:text-xs", e), ...t }));
|
|
2017
|
+
ws.displayName = Y.Title.displayName;
|
|
2018
|
+
const Ns = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(Y.Description, { ref: s, className: d("text-sm opacity-90", e), ...t }));
|
|
2019
|
+
Ns.displayName = Y.Description.displayName;
|
|
2020
2020
|
function Ci() {
|
|
2021
|
-
const { toasts: e } =
|
|
2021
|
+
const { toasts: e } = xs();
|
|
2022
2022
|
return /* @__PURE__ */ a.jsxs(ba, { children: [
|
|
2023
|
-
e.map(({ id: t, title: s, description: o, action: n, ...i }) => /* @__PURE__ */ a.jsxs(
|
|
2023
|
+
e.map(({ id: t, title: s, description: o, action: n, ...i }) => /* @__PURE__ */ a.jsxs(vs, { ...i, children: [
|
|
2024
2024
|
/* @__PURE__ */ a.jsxs("div", { className: "grid gap-1", children: [
|
|
2025
|
-
s && /* @__PURE__ */ a.jsx(
|
|
2026
|
-
o && /* @__PURE__ */ a.jsx(
|
|
2025
|
+
s && /* @__PURE__ */ a.jsx(ws, { children: s }),
|
|
2026
|
+
o && /* @__PURE__ */ a.jsx(Ns, { children: o })
|
|
2027
2027
|
] }),
|
|
2028
2028
|
n,
|
|
2029
|
-
/* @__PURE__ */ a.jsx(
|
|
2029
|
+
/* @__PURE__ */ a.jsx(ys, {})
|
|
2030
2030
|
] }, t)),
|
|
2031
|
-
/* @__PURE__ */ a.jsx(
|
|
2031
|
+
/* @__PURE__ */ a.jsx(hs, {})
|
|
2032
2032
|
] });
|
|
2033
2033
|
}
|
|
2034
|
-
const
|
|
2034
|
+
const _i = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className: d("animate-pulse rounded-md bg-primary/10", e), ...t }), ks = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
2035
2035
|
K,
|
|
2036
2036
|
{
|
|
2037
2037
|
ref: s,
|
|
@@ -2042,9 +2042,9 @@ const Bi = ({ className: e, ...t }) => /* @__PURE__ */ a.jsx("div", { className:
|
|
|
2042
2042
|
...t
|
|
2043
2043
|
}
|
|
2044
2044
|
));
|
|
2045
|
-
|
|
2046
|
-
const
|
|
2047
|
-
/* @__PURE__ */ a.jsx(
|
|
2045
|
+
ks.displayName = K.displayName;
|
|
2046
|
+
const Bi = ({ children: e, ...t }) => /* @__PURE__ */ a.jsx(ds, { ...t, children: /* @__PURE__ */ a.jsx(xt, { className: "overflow-hidden p-0", children: /* @__PURE__ */ a.jsx(ks, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), va = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
2047
|
+
/* @__PURE__ */ a.jsx(Ks, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
2048
2048
|
/* @__PURE__ */ a.jsx(
|
|
2049
2049
|
K.Input,
|
|
2050
2050
|
{
|
|
@@ -2126,7 +2126,7 @@ const Ca = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(
|
|
|
2126
2126
|
}
|
|
2127
2127
|
));
|
|
2128
2128
|
Ca.displayName = P.SubContent.displayName;
|
|
2129
|
-
const
|
|
2129
|
+
const _a = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(P.Portal, { children: /* @__PURE__ */ a.jsx(
|
|
2130
2130
|
P.Content,
|
|
2131
2131
|
{
|
|
2132
2132
|
ref: s,
|
|
@@ -2137,8 +2137,8 @@ const Ba = m.forwardRef(({ className: e, ...t }, s) => /* @__PURE__ */ a.jsx(P.P
|
|
|
2137
2137
|
...t
|
|
2138
2138
|
}
|
|
2139
2139
|
) }));
|
|
2140
|
-
|
|
2141
|
-
const
|
|
2140
|
+
_a.displayName = P.Content.displayName;
|
|
2141
|
+
const Ba = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */ a.jsx(
|
|
2142
2142
|
P.Item,
|
|
2143
2143
|
{
|
|
2144
2144
|
ref: o,
|
|
@@ -2150,7 +2150,7 @@ const _a = m.forwardRef(({ className: e, inset: t, ...s }, o) => /* @__PURE__ */
|
|
|
2150
2150
|
...s
|
|
2151
2151
|
}
|
|
2152
2152
|
));
|
|
2153
|
-
|
|
2153
|
+
Ba.displayName = P.Item.displayName;
|
|
2154
2154
|
const Ra = m.forwardRef(({ className: e, children: t, checked: s, ...o }, n) => /* @__PURE__ */ a.jsxs(
|
|
2155
2155
|
P.CheckboxItem,
|
|
2156
2156
|
{
|
|
@@ -2200,7 +2200,7 @@ Ma.displayName = "ContextMenuShortcut";
|
|
|
2200
2200
|
const Da = (e) => {
|
|
2201
2201
|
try {
|
|
2202
2202
|
const t = document.getElementById("icon-picker-field"), s = document.createElement("div");
|
|
2203
|
-
|
|
2203
|
+
Qs.render(/* @__PURE__ */ a.jsx(Ys, { value: e }), s), t.appendChild(s), s.hidden = !0;
|
|
2204
2204
|
let o = s.innerHTML;
|
|
2205
2205
|
setTimeout(() => t.removeChild(s), 100);
|
|
2206
2206
|
const i = new DOMParser().parseFromString(o, "image/svg+xml"), r = i.querySelector("svg");
|
|
@@ -2226,7 +2226,7 @@ const Da = (e) => {
|
|
|
2226
2226
|
}
|
|
2227
2227
|
),
|
|
2228
2228
|
/* @__PURE__ */ a.jsx(
|
|
2229
|
-
|
|
2229
|
+
Js,
|
|
2230
2230
|
{
|
|
2231
2231
|
value: e ? "BiSolidGrid" : null,
|
|
2232
2232
|
onChange: s,
|
|
@@ -2262,16 +2262,16 @@ const Da = (e) => {
|
|
|
2262
2262
|
}
|
|
2263
2263
|
)
|
|
2264
2264
|
] });
|
|
2265
|
-
}, Ea = tt.lazy(() => import("./UnsplashImages-
|
|
2265
|
+
}, Ea = tt.lazy(() => import("./UnsplashImages-lGLcqo4M.js")), Oa = tt.lazy(() => import("./UploadImages-06m6vjbL.js")), js = ({
|
|
2266
2266
|
isModalView: e = !1,
|
|
2267
2267
|
onSelect: t = () => {
|
|
2268
2268
|
}
|
|
2269
2269
|
}) => {
|
|
2270
|
-
const [s, o] =
|
|
2270
|
+
const [s, o] = _e("upload");
|
|
2271
2271
|
return /* @__PURE__ */ a.jsxs("div", { className: "flex h-full flex-col", children: [
|
|
2272
2272
|
/* @__PURE__ */ a.jsx("div", { className: "flex items-center justify-between rounded-md bg-background/30 p-1", children: /* @__PURE__ */ a.jsx("h1", { className: "px-1 font-semibold", children: e ? "Select or upload images" : "Images" }) }),
|
|
2273
|
-
/* @__PURE__ */ a.jsxs(
|
|
2274
|
-
/* @__PURE__ */ a.jsxs(
|
|
2273
|
+
/* @__PURE__ */ a.jsxs(Bn, { value: s, onValueChange: (n) => o(n), className: "flex h-full w-full flex-col py-2", children: [
|
|
2274
|
+
/* @__PURE__ */ a.jsxs(ps, { className: "w-full", children: [
|
|
2275
2275
|
/* @__PURE__ */ a.jsx(Ze, { value: "upload", className: "w-1/2", children: "Upload" }),
|
|
2276
2276
|
/* @__PURE__ */ a.jsx(Ze, { value: "unsplash", className: "w-1/2", children: "Unsplash" })
|
|
2277
2277
|
] }),
|
|
@@ -2280,14 +2280,14 @@ const Da = (e) => {
|
|
|
2280
2280
|
] });
|
|
2281
2281
|
}, Oi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2282
2282
|
__proto__: null,
|
|
2283
|
-
default:
|
|
2283
|
+
default: js
|
|
2284
2284
|
}, Symbol.toStringTag, { value: "Module" })), Tt = ({ children: e, onSelect: t }) => {
|
|
2285
|
-
const [s, o] =
|
|
2285
|
+
const [s, o] = _e(!1), n = (...i) => {
|
|
2286
2286
|
t.call(void 0, ...i), o(!1);
|
|
2287
2287
|
};
|
|
2288
|
-
return /* @__PURE__ */ a.jsxs(
|
|
2288
|
+
return /* @__PURE__ */ a.jsxs(ds, { open: s, onOpenChange: (i) => o(i), children: [
|
|
2289
2289
|
/* @__PURE__ */ a.jsx(fn, { asChild: !0, children: e }),
|
|
2290
|
-
/* @__PURE__ */ a.jsx(xt, { className: "flex h-3/4 max-w-5xl", children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full", children: /* @__PURE__ */ a.jsx(
|
|
2290
|
+
/* @__PURE__ */ a.jsx(xt, { className: "flex h-3/4 max-w-5xl", children: /* @__PURE__ */ a.jsx("div", { className: "h-full w-full", children: /* @__PURE__ */ a.jsx(js, { isModalView: !0, onSelect: n }) }) })
|
|
2291
2291
|
] });
|
|
2292
2292
|
}, Li = ({ value: e, onChange: t, id: s, onBlur: o }) => /* @__PURE__ */ a.jsxs("div", { className: "mt-1.5 flex items-center gap-x-3", children: [
|
|
2293
2293
|
e ? /* @__PURE__ */ a.jsx("img", { src: e, className: "h-20 w-20 overflow-hidden rounded-md border object-cover", alt: "" }) : /* @__PURE__ */ a.jsx(Tt, { onSelect: t, children: /* @__PURE__ */ a.jsx("div", { className: "h-20 w-20 cursor-pointer rounded-md border bg-[radial-gradient(#AAA,transparent_1px)] duration-300 [background-size:10px_10px] hover:border-gray-400" }) }),
|
|
@@ -2330,7 +2330,7 @@ const Da = (e) => {
|
|
|
2330
2330
|
"image"
|
|
2331
2331
|
];
|
|
2332
2332
|
return typeof window > "u" ? null : /* @__PURE__ */ a.jsx(
|
|
2333
|
-
|
|
2333
|
+
Xs,
|
|
2334
2334
|
{
|
|
2335
2335
|
id: e,
|
|
2336
2336
|
value: s,
|
|
@@ -2343,7 +2343,7 @@ const Da = (e) => {
|
|
|
2343
2343
|
}
|
|
2344
2344
|
);
|
|
2345
2345
|
}, Vi = ({ schema: e, formData: t, onChange: s }) => {
|
|
2346
|
-
const [o, n] =
|
|
2346
|
+
const [o, n] = _e([]), i = ke("getPages", () => []), { type: r = "page", href: c = "", target: p = "self" } = t;
|
|
2347
2347
|
return Ce(() => {
|
|
2348
2348
|
(async () => {
|
|
2349
2349
|
const l = await i();
|
|
@@ -2386,9 +2386,9 @@ const Da = (e) => {
|
|
|
2386
2386
|
"input",
|
|
2387
2387
|
{
|
|
2388
2388
|
type: "checkbox",
|
|
2389
|
-
defaultChecked:
|
|
2389
|
+
defaultChecked: p === "_blank",
|
|
2390
2390
|
className: "cursor-pointer rounded-md border border-border",
|
|
2391
|
-
onChange: () => s({ ...t, target:
|
|
2391
|
+
onChange: () => s({ ...t, target: p === "_blank" ? "_self" : "_blank" })
|
|
2392
2392
|
}
|
|
2393
2393
|
),
|
|
2394
2394
|
/* @__PURE__ */ a.jsx("span", { className: "pt-1 text-xs", children: "Open in new tab" })
|
|
@@ -2396,8 +2396,8 @@ const Da = (e) => {
|
|
|
2396
2396
|
] })
|
|
2397
2397
|
] });
|
|
2398
2398
|
}, $i = () => {
|
|
2399
|
-
const [e] = we(), [, t] = $e(), { addBlocks: s } = xe(), { toast: o } =
|
|
2400
|
-
(r, c,
|
|
2399
|
+
const [e] = we(), [, t] = $e(), { addBlocks: s } = xe(), { toast: o } = xs(), n = L(
|
|
2400
|
+
(r, c, p) => {
|
|
2401
2401
|
var k;
|
|
2402
2402
|
for (let I = 0; I < r.length; I++) {
|
|
2403
2403
|
const { _id: O } = r[I];
|
|
@@ -2407,19 +2407,19 @@ const Da = (e) => {
|
|
|
2407
2407
|
W[G]._parent = r[I]._id;
|
|
2408
2408
|
}
|
|
2409
2409
|
const l = Q(r);
|
|
2410
|
-
let
|
|
2411
|
-
return c && (
|
|
2410
|
+
let f, x;
|
|
2411
|
+
return c && (f = te(e, { _id: c }), r[0]._parent = c, x = c), !(f ? Qe(f._type, l._type) : !0) && f && (r[0]._parent = f._parent, x = f._parent), s(r, x, p), t([(k = Q(r)) == null ? void 0 : k._id]), Q(r);
|
|
2412
2412
|
},
|
|
2413
2413
|
[e, t]
|
|
2414
2414
|
);
|
|
2415
2415
|
return { addCoreBlock: L(
|
|
2416
|
-
(r, c,
|
|
2416
|
+
(r, c, p) => {
|
|
2417
2417
|
if (pe(r, "blocks")) {
|
|
2418
2418
|
const G = r.blocks;
|
|
2419
|
-
return n(G, c,
|
|
2419
|
+
return n(G, c, p);
|
|
2420
2420
|
}
|
|
2421
|
-
const l = ce(),
|
|
2422
|
-
Lt(
|
|
2421
|
+
const l = ce(), f = es(r.props), x = [];
|
|
2422
|
+
Lt(f, (G, H) => {
|
|
2423
2423
|
if (zt(G, Ke)) {
|
|
2424
2424
|
const $ = G.replace(Ke, "");
|
|
2425
2425
|
x.push({
|
|
@@ -2435,10 +2435,10 @@ const Da = (e) => {
|
|
|
2435
2435
|
const N = {
|
|
2436
2436
|
_type: r.type,
|
|
2437
2437
|
_id: l,
|
|
2438
|
-
...
|
|
2438
|
+
...f
|
|
2439
2439
|
};
|
|
2440
2440
|
let k, I;
|
|
2441
|
-
if (c && (k = te(e, { _id: c }), N._parent = c, I = c), !
|
|
2441
|
+
if (c && (k = te(e, { _id: c }), N._parent = c, I = c), !No(k == null ? void 0 : k._type, r.type)) {
|
|
2442
2442
|
o({
|
|
2443
2443
|
variant: "destructive",
|
|
2444
2444
|
title: "Error",
|
|
@@ -2448,7 +2448,7 @@ const Da = (e) => {
|
|
|
2448
2448
|
}
|
|
2449
2449
|
!(k ? Qe(k._type, r.type) : !0) && k && (N._parent = k._parent, I = k._parent);
|
|
2450
2450
|
const W = [N, ...x];
|
|
2451
|
-
return s(W, I,
|
|
2451
|
+
return s(W, I, p), t([N._id]), N;
|
|
2452
2452
|
},
|
|
2453
2453
|
[n, e, t]
|
|
2454
2454
|
), addPredefinedBlock: n };
|
|
@@ -2493,18 +2493,18 @@ function za(e = "", t = "", s = []) {
|
|
|
2493
2493
|
);
|
|
2494
2494
|
const i = [], r = [];
|
|
2495
2495
|
ue(s, (l) => {
|
|
2496
|
-
const
|
|
2496
|
+
const f = Ie(l), x = te(o, yt(f, ["dark", "mq", "mod", "property"]));
|
|
2497
2497
|
if (x && (o = M(
|
|
2498
2498
|
o,
|
|
2499
2499
|
(N) => N.fullCls !== (x == null ? void 0 : x.fullCls)
|
|
2500
|
-
)), i.push(
|
|
2501
|
-
const N = te(n, yt(
|
|
2500
|
+
)), i.push(f), f.mq === "xs" && !f.dark && f.mod === "" && (n = M(n, (N) => N.property !== f.property)), La(o, f) === "baseClasses" && !q(Mt, f.property)) {
|
|
2501
|
+
const N = te(n, yt(f, ["property"]));
|
|
2502
2502
|
x && (n = M(
|
|
2503
2503
|
n,
|
|
2504
2504
|
(k) => k.fullCls !== (N == null ? void 0 : N.fullCls)
|
|
2505
2505
|
)), r.push({
|
|
2506
|
-
...
|
|
2507
|
-
fullCls:
|
|
2506
|
+
...f,
|
|
2507
|
+
fullCls: f.cls,
|
|
2508
2508
|
mq: "xs"
|
|
2509
2509
|
});
|
|
2510
2510
|
}
|
|
@@ -2532,14 +2532,14 @@ const Va = () => D(Te), $a = (e) => {
|
|
|
2532
2532
|
)
|
|
2533
2533
|
), i = Q(e(Te));
|
|
2534
2534
|
return R(n, (r) => {
|
|
2535
|
-
const c = e(r),
|
|
2535
|
+
const c = e(r), p = F(c, i.prop, `${me},`), { baseClasses: l, classes: f } = $a(p);
|
|
2536
2536
|
return {
|
|
2537
2537
|
ids: [c._id],
|
|
2538
|
-
props: { [i.prop]: `${me}${za(
|
|
2538
|
+
props: { [i.prop]: `${me}${za(f, l, o)}` }
|
|
2539
2539
|
};
|
|
2540
2540
|
});
|
|
2541
2541
|
}), Fi = () => {
|
|
2542
|
-
const e =
|
|
2542
|
+
const e = Be(Fa), { updateBlocks: t, updateBlocksRuntime: s } = xe();
|
|
2543
2543
|
return L(
|
|
2544
2544
|
(o, n, i = !1) => {
|
|
2545
2545
|
const r = e({ blockIds: o, newClasses: n });
|
|
@@ -2551,16 +2551,16 @@ const Va = () => D(Te), $a = (e) => {
|
|
|
2551
2551
|
},
|
|
2552
2552
|
[e]
|
|
2553
2553
|
);
|
|
2554
|
-
}, Ua = () => D(Zt),
|
|
2555
|
-
const t = e(
|
|
2556
|
-
return
|
|
2554
|
+
}, Ua = () => D(Zt), Ss = Re("canvasWidth", 800), As = w((e) => {
|
|
2555
|
+
const t = e(Ss);
|
|
2556
|
+
return Fs(t).toLowerCase();
|
|
2557
2557
|
}), Ui = () => {
|
|
2558
|
-
const [e, t] = D(
|
|
2558
|
+
const [e, t] = D(Ss), s = X(As), [o, n] = Ua();
|
|
2559
2559
|
return Ce(() => {
|
|
2560
2560
|
o !== "xs" && n(s);
|
|
2561
2561
|
}, [s, o, n]), [e, s, t];
|
|
2562
|
-
}, Wa = Re("canvasZoom", 100), Wi = () => D(Wa),
|
|
2563
|
-
const [e, t] = D(
|
|
2562
|
+
}, Wa = Re("canvasZoom", 100), Wi = () => D(Wa), Cs = w([]), Ga = () => {
|
|
2563
|
+
const [e, t] = D(Cs), s = Be(ht), o = L(
|
|
2564
2564
|
(n) => {
|
|
2565
2565
|
t(n), s([]);
|
|
2566
2566
|
},
|
|
@@ -2568,15 +2568,15 @@ const Va = () => D(Te), $a = (e) => {
|
|
|
2568
2568
|
);
|
|
2569
2569
|
return [e, o];
|
|
2570
2570
|
}, ht = w([]), Gi = () => {
|
|
2571
|
-
const [e, t] = D(ht), s =
|
|
2571
|
+
const [e, t] = D(ht), s = Be(Cs), o = L(
|
|
2572
2572
|
(n) => {
|
|
2573
2573
|
t(n), s([]);
|
|
2574
2574
|
},
|
|
2575
2575
|
[t, s]
|
|
2576
2576
|
);
|
|
2577
2577
|
return [e, o];
|
|
2578
|
-
},
|
|
2579
|
-
const [e, t] = D(
|
|
2578
|
+
}, _s = Re("darkMode", !1), Hi = () => {
|
|
2579
|
+
const [e, t] = D(_s);
|
|
2580
2580
|
return [e, t];
|
|
2581
2581
|
}, Ha = () => {
|
|
2582
2582
|
const [e] = we(), [, t] = $e(), { addBlocks: s } = xe();
|
|
@@ -2586,11 +2586,11 @@ const Va = () => D(Te), $a = (e) => {
|
|
|
2586
2586
|
ue(o, (r) => {
|
|
2587
2587
|
const c = e.find((N) => N._id === r);
|
|
2588
2588
|
n || (n = c._parent);
|
|
2589
|
-
const
|
|
2589
|
+
const f = M(
|
|
2590
2590
|
e,
|
|
2591
2591
|
(N) => Et(n) ? N._parent === n : !c._parent
|
|
2592
|
-
).indexOf(c) + 1, x =
|
|
2593
|
-
s(x, n,
|
|
2592
|
+
).indexOf(c) + 1, x = So(e, r, n);
|
|
2593
|
+
s(x, n, f), i.push(F(x, "0._id", ""));
|
|
2594
2594
|
}), t(i);
|
|
2595
2595
|
},
|
|
2596
2596
|
[e, t]
|
|
@@ -2616,7 +2616,7 @@ const Va = () => D(Te), $a = (e) => {
|
|
|
2616
2616
|
console.warn("usePasteBlocks is not implemented");
|
|
2617
2617
|
const e = X(ht), [t, s] = Ga(), o = Ha(), n = Ya();
|
|
2618
2618
|
return {
|
|
2619
|
-
canPaste:
|
|
2619
|
+
canPaste: Ls(
|
|
2620
2620
|
() => t.length > 0 || e.length > 0,
|
|
2621
2621
|
[e, t]
|
|
2622
2622
|
),
|
|
@@ -2639,25 +2639,25 @@ const Va = () => D(Te), $a = (e) => {
|
|
|
2639
2639
|
)
|
|
2640
2640
|
);
|
|
2641
2641
|
return R(i, (r) => {
|
|
2642
|
-
const c = e(r),
|
|
2643
|
-
let { classes: l, baseClasses:
|
|
2644
|
-
return ue(
|
|
2642
|
+
const c = e(r), p = o;
|
|
2643
|
+
let { classes: l, baseClasses: f } = wo(F(c, n.prop, "styles:,"));
|
|
2644
|
+
return ue(p, (x) => {
|
|
2645
2645
|
const N = new RegExp(`(^| )${x.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
|
|
2646
2646
|
l = l.replace(N, " ").replace(/ +/g, " ").trim();
|
|
2647
2647
|
const k = Q(x.split(":"));
|
|
2648
|
-
q(["2xl", "xl", "lg", "md", "sm"], k) &&
|
|
2649
|
-
}), ue(
|
|
2648
|
+
q(["2xl", "xl", "lg", "md", "sm"], k) && p.push(x.split(":").pop().trim());
|
|
2649
|
+
}), ue(p, (x) => {
|
|
2650
2650
|
const N = new RegExp(`(^| )${x.replace("[", "\\[").replace("]", "\\]")}($| )`, "g");
|
|
2651
|
-
|
|
2651
|
+
f = f.replace(N, " ").replace(/ +/g, " ").trim();
|
|
2652
2652
|
}), {
|
|
2653
2653
|
ids: [c._id],
|
|
2654
2654
|
props: {
|
|
2655
|
-
[n.prop]: `${me}${
|
|
2655
|
+
[n.prop]: `${me}${f},${l}`
|
|
2656
2656
|
}
|
|
2657
2657
|
};
|
|
2658
2658
|
});
|
|
2659
2659
|
}), Yi = () => {
|
|
2660
|
-
const { updateBlocks: e } = xe(), t =
|
|
2660
|
+
const { updateBlocks: e } = xe(), t = Be(Xa);
|
|
2661
2661
|
return L(
|
|
2662
2662
|
(s, o) => {
|
|
2663
2663
|
const n = t({ blockIds: s, fullClasses: o });
|
|
@@ -2672,7 +2672,7 @@ const Va = () => D(Te), $a = (e) => {
|
|
|
2672
2672
|
const n = F(s, t.prop, `${me},`).replace(me, "").split(",").join(" ");
|
|
2673
2673
|
return M(R(n.trim().split(" "), Ie), (i) => !qe(i));
|
|
2674
2674
|
}), Qi = () => X(Bs), Dt = { xs: 0, sm: 1, md: 2, lg: 3, xl: 4, "2xl": 5 }, Za = w((e) => {
|
|
2675
|
-
const t = e(
|
|
2675
|
+
const t = e(As), s = e(dt), o = e(_s), n = er(t);
|
|
2676
2676
|
let i = M(e(Bs), { mod: s });
|
|
2677
2677
|
return zt(s, "_") || (i = M(i, (r) => n.includes(r.mq))), i = i.sort((r, c) => Dt[r.mq] - Dt[c.mq]), o || (i = M(i, { dark: !1 })), i;
|
|
2678
2678
|
}), er = (e) => {
|
|
@@ -2717,12 +2717,12 @@ const Va = () => D(Te), $a = (e) => {
|
|
|
2717
2717
|
},
|
|
2718
2718
|
[e]
|
|
2719
2719
|
);
|
|
2720
|
-
},
|
|
2720
|
+
}, Rs = {
|
|
2721
2721
|
name: "",
|
|
2722
2722
|
props: {},
|
|
2723
2723
|
modalProps: {},
|
|
2724
2724
|
backdropClose: !0
|
|
2725
|
-
}, tr = w(
|
|
2725
|
+
}, tr = w(Rs), sl = () => {
|
|
2726
2726
|
const [e, t] = D(tr), s = L(
|
|
2727
2727
|
(n, i = {}, r = {}) => {
|
|
2728
2728
|
t({ name: n, props: i, modalProps: r });
|
|
@@ -2731,7 +2731,7 @@ const Va = () => D(Te), $a = (e) => {
|
|
|
2731
2731
|
), o = L(
|
|
2732
2732
|
(...n) => {
|
|
2733
2733
|
F(e, "props.onClose", () => {
|
|
2734
|
-
})(...n), t(
|
|
2734
|
+
})(...n), t(Rs);
|
|
2735
2735
|
},
|
|
2736
2736
|
[t, e]
|
|
2737
2737
|
);
|
|
@@ -2740,8 +2740,8 @@ const Va = () => D(Te), $a = (e) => {
|
|
|
2740
2740
|
openModal: s,
|
|
2741
2741
|
closeModal: o
|
|
2742
2742
|
};
|
|
2743
|
-
}, ol = () => (console.warn("useAllBlocks is deprecated, use useBlocksStore() instead"), X(ie)),
|
|
2744
|
-
|
|
2743
|
+
}, ol = () => (console.warn("useAllBlocks is deprecated, use useBlocksStore() instead"), X(ie)), Ts = w(!1);
|
|
2744
|
+
Ts.debugLabel = "readOnlyModeAtom";
|
|
2745
2745
|
const sr = w(!1);
|
|
2746
2746
|
sr.debugLabel = "advanceStylingOpenAtom";
|
|
2747
2747
|
const or = w("online");
|
|
@@ -2760,29 +2760,29 @@ const cr = w("outline");
|
|
|
2760
2760
|
cr.debugLabel = "activePanelAtom";
|
|
2761
2761
|
const dr = w("");
|
|
2762
2762
|
dr.debugLabel = "showPredefinedBlockCategoryAtom";
|
|
2763
|
-
const
|
|
2764
|
-
|
|
2763
|
+
const Ps = w({ undoCount: 0, redoCount: 0 });
|
|
2764
|
+
Ps.debugLabel = "historyStatesAtom";
|
|
2765
2765
|
const ur = w("");
|
|
2766
2766
|
ur.debugLabel = "inlineEditingActiveAtom";
|
|
2767
2767
|
const mr = w(!1);
|
|
2768
2768
|
mr.debugLabel = "draggingFlagAtom";
|
|
2769
2769
|
const fr = w("");
|
|
2770
2770
|
fr.debugLabel = "draggedBlockIdAtom";
|
|
2771
|
-
const nl = () => X(
|
|
2771
|
+
const nl = () => X(Ts), pr = w(""), gr = w(null), al = () => D(pr), rl = () => D(gr), br = Re("selectedBreakpoints", ["XS", "MD", "XL"]), il = () => {
|
|
2772
2772
|
const [e, t] = D(br);
|
|
2773
2773
|
return [e, t];
|
|
2774
2774
|
}, ll = () => {
|
|
2775
|
-
const e =
|
|
2775
|
+
const e = Be(Ps), { clear: t } = is(), [, s] = $e(), [, o] = Ja(), [, n] = Va();
|
|
2776
2776
|
return () => {
|
|
2777
2777
|
s([]), n([]), o(""), t(), e({ undoCount: 0, redoCount: 0 });
|
|
2778
2778
|
};
|
|
2779
2779
|
}, xr = w([]), cl = () => {
|
|
2780
|
-
const [e, t] =
|
|
2780
|
+
const [e, t] = _e(!1), [s, o] = D(xr), n = ke("getUILibraryBlocks", () => []);
|
|
2781
2781
|
return Ce(() => {
|
|
2782
2782
|
(async () => s.length > 0 || (t(!0), o(await n()), t(!1)))();
|
|
2783
2783
|
}, []), { data: s, isLoading: e };
|
|
2784
2784
|
}, dl = () => {
|
|
2785
|
-
const [e, t] =
|
|
2785
|
+
const [e, t] = _e(null), s = L(async (o) => {
|
|
2786
2786
|
if (!(navigator != null && navigator.clipboard))
|
|
2787
2787
|
return console.warn("Clipboard not supported"), !1;
|
|
2788
2788
|
try {
|
|
@@ -2800,9 +2800,9 @@ export {
|
|
|
2800
2800
|
pt as C,
|
|
2801
2801
|
Fr as D,
|
|
2802
2802
|
we as E,
|
|
2803
|
-
|
|
2803
|
+
ts as F,
|
|
2804
2804
|
qt as G,
|
|
2805
|
-
|
|
2805
|
+
rs as H,
|
|
2806
2806
|
Ci as I,
|
|
2807
2807
|
nl as J,
|
|
2808
2808
|
sl as K,
|
|
@@ -2813,7 +2813,7 @@ export {
|
|
|
2813
2813
|
Gi as P,
|
|
2814
2814
|
dl as Q,
|
|
2815
2815
|
zo as R,
|
|
2816
|
-
|
|
2816
|
+
_i as S,
|
|
2817
2817
|
oi as T,
|
|
2818
2818
|
Ga as U,
|
|
2819
2819
|
Hi as V,
|
|
@@ -2858,13 +2858,13 @@ export {
|
|
|
2858
2858
|
ri as aV,
|
|
2859
2859
|
ii as aW,
|
|
2860
2860
|
Tn as aX,
|
|
2861
|
-
|
|
2861
|
+
ks as aY,
|
|
2862
2862
|
va as aZ,
|
|
2863
2863
|
ya as a_,
|
|
2864
2864
|
rl as aa,
|
|
2865
2865
|
il as ab,
|
|
2866
2866
|
Va as ac,
|
|
2867
|
-
|
|
2867
|
+
ds as ad,
|
|
2868
2868
|
xt as ae,
|
|
2869
2869
|
pn as af,
|
|
2870
2870
|
bn as ag,
|
|
@@ -2881,8 +2881,8 @@ export {
|
|
|
2881
2881
|
Rn as ar,
|
|
2882
2882
|
Zr as as,
|
|
2883
2883
|
cr as at,
|
|
2884
|
-
|
|
2885
|
-
|
|
2884
|
+
Bn as au,
|
|
2885
|
+
ps as av,
|
|
2886
2886
|
Ze as aw,
|
|
2887
2887
|
et as ax,
|
|
2888
2888
|
bi as ay,
|
|
@@ -2892,8 +2892,8 @@ export {
|
|
|
2892
2892
|
Na as b0,
|
|
2893
2893
|
ja as b1,
|
|
2894
2894
|
gn as b2,
|
|
2895
|
-
|
|
2896
|
-
|
|
2895
|
+
Bt as b3,
|
|
2896
|
+
_t as b4,
|
|
2897
2897
|
zi as b5,
|
|
2898
2898
|
Ei as b6,
|
|
2899
2899
|
Li as b7,
|
|
@@ -2901,7 +2901,7 @@ export {
|
|
|
2901
2901
|
Xr as b9,
|
|
2902
2902
|
nn as bA,
|
|
2903
2903
|
yn as bB,
|
|
2904
|
-
|
|
2904
|
+
fs as bC,
|
|
2905
2905
|
Pn as bD,
|
|
2906
2906
|
li as bE,
|
|
2907
2907
|
In as bF,
|
|
@@ -2932,7 +2932,7 @@ export {
|
|
|
2932
2932
|
jn as bd,
|
|
2933
2933
|
si as be,
|
|
2934
2934
|
sr as bf,
|
|
2935
|
-
|
|
2935
|
+
_n as bg,
|
|
2936
2936
|
hn as bh,
|
|
2937
2937
|
vn as bi,
|
|
2938
2938
|
wn as bj,
|
|
@@ -2942,8 +2942,8 @@ export {
|
|
|
2942
2942
|
tn as bn,
|
|
2943
2943
|
sn as bo,
|
|
2944
2944
|
dr as bp,
|
|
2945
|
-
|
|
2946
|
-
|
|
2945
|
+
Ba as bq,
|
|
2946
|
+
_a as br,
|
|
2947
2947
|
Ri as bs,
|
|
2948
2948
|
Ti as bt,
|
|
2949
2949
|
Jr as bu,
|
|
@@ -2963,9 +2963,9 @@ export {
|
|
|
2963
2963
|
ta as c7,
|
|
2964
2964
|
Ai as c8,
|
|
2965
2965
|
pa as c9,
|
|
2966
|
-
|
|
2966
|
+
xs as ca,
|
|
2967
2967
|
ga as cb,
|
|
2968
|
-
|
|
2968
|
+
Bi as cc,
|
|
2969
2969
|
Sa as cd,
|
|
2970
2970
|
ka as ce,
|
|
2971
2971
|
Ra as cf,
|
|
@@ -2987,10 +2987,10 @@ export {
|
|
|
2987
2987
|
ke as h,
|
|
2988
2988
|
Gt as i,
|
|
2989
2989
|
Vr as j,
|
|
2990
|
-
|
|
2990
|
+
oo as k,
|
|
2991
2991
|
oe as l,
|
|
2992
|
-
|
|
2993
|
-
|
|
2992
|
+
uo as m,
|
|
2993
|
+
co as n,
|
|
2994
2994
|
Re as o,
|
|
2995
2995
|
$r as p,
|
|
2996
2996
|
Ji as q,
|
|
@@ -2998,9 +2998,9 @@ export {
|
|
|
2998
2998
|
Qr as s,
|
|
2999
2999
|
Ha as t,
|
|
3000
3000
|
ll as u,
|
|
3001
|
-
|
|
3001
|
+
is as v,
|
|
3002
3002
|
ie as w,
|
|
3003
|
-
|
|
3003
|
+
yo as x,
|
|
3004
3004
|
Wo as y,
|
|
3005
3005
|
Yr as z
|
|
3006
3006
|
};
|