@chaibuilder/sdk 1.1.8 → 1.1.9
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-EBCXennD.cjs → AddBlocks-Et_v-kdv.cjs} +1 -1
- package/dist/{AddBlocks-a2VUDT5t.js → AddBlocks-VR2XGlgQ.js} +1 -1
- package/dist/{BrandingOptions-uU1nNRzP.js → BrandingOptions-SXbo_LEP.js} +69 -54
- package/dist/BrandingOptions-bZn4TXCB.cjs +1 -0
- package/dist/{CanvasArea-qr3Iv0Xx.js → CanvasArea-h4l0r7Ql.js} +420 -412
- package/dist/{CanvasArea-0dMH8DLY.cjs → CanvasArea-xBMxzh_r.cjs} +7 -7
- package/dist/{CurrentPage-XW_-vuBP.js → CurrentPage-2YpnE3z7.js} +2 -2
- package/dist/{CurrentPage-xRSxWOUz.cjs → CurrentPage-YGM6tLCg.cjs} +1 -1
- package/dist/{Layers-fvXADkdU.cjs → Layers-HZApEk-h.cjs} +1 -1
- package/dist/{Layers-urjdDTKB.js → Layers-Twu9zS3g.js} +4 -4
- package/dist/{MarkAsGlobalBlock-vWOYzFKX.js → MarkAsGlobalBlock-QTujTxNj.js} +1 -1
- package/dist/{MarkAsGlobalBlock-E_w2sPGA.cjs → MarkAsGlobalBlock-u8N_7PBX.cjs} +1 -1
- package/dist/{PagesPanel-SkDUfIP1.cjs → PagesPanel-W68J0fFD.cjs} +1 -1
- package/dist/{PagesPanel-ID_Vm6CO.js → PagesPanel-iRgy80Z4.js} +3 -3
- package/dist/{ProjectPanel-tbw24HmR.cjs → ProjectPanel-agiWUiVb.cjs} +1 -1
- package/dist/{ProjectPanel-_XAgk4uz.js → ProjectPanel-bl_zr1Zy.js} +3 -3
- package/dist/{Settings-b5UJ1CbF.js → Settings-qw8xQXnk.js} +2 -2
- package/dist/{Settings-CchIkXh7.cjs → Settings-veyss6AT.cjs} +1 -1
- package/dist/{SidePanels-BH-IFPaj.js → SidePanels-8tNhVPvi.js} +55 -56
- package/dist/{SidePanels-cPyWHJGN.cjs → SidePanels-BrItHT9y.cjs} +1 -1
- package/dist/{Topbar-b9Vt5SLF.cjs → Topbar-21E00R1y.cjs} +1 -1
- package/dist/{Topbar-oZ167R8x.js → Topbar-pbqGE6Xy.js} +1 -1
- package/dist/{UnsplashImages-dMdYJI8B.cjs → UnsplashImages-J2kiowyR.cjs} +1 -1
- package/dist/{UnsplashImages-yN_5vrmM.js → UnsplashImages-qm48rQ85.js} +1 -1
- package/dist/{UploadImages-yVZs49iB.js → UploadImages-0hJF9pBC.js} +1 -1
- package/dist/{UploadImages-2h2MuCU2.cjs → UploadImages-Hvetk6zO.cjs} +1 -1
- package/dist/{add-page-modal-ZvUYpd4h.js → add-page-modal-R2AAoK3R.js} +3 -3
- package/dist/{add-page-modal-FSnagas1.cjs → add-page-modal-U7Vh5_3P.cjs} +1 -1
- package/dist/{confirm-alert-4bi7bxtP.cjs → confirm-alert-5io1ceQF.cjs} +1 -1
- package/dist/{confirm-alert-iNzeta1I.js → confirm-alert-wEcYtKUU.js} +1 -1
- package/dist/core.cjs +1 -1
- package/dist/core.js +2 -2
- package/dist/{delete-page-modal-4MVbQbIE.js → delete-page-modal-69BK9Amt.js} +2 -2
- package/dist/{delete-page-modal-DAFOspX2.cjs → delete-page-modal-6ogwTW2k.cjs} +1 -1
- package/dist/{form-dmyeQkyn.js → form-_0bVd6F-.js} +1 -1
- package/dist/{form-wY4tsyip.cjs → form-uP2ot_6S.cjs} +1 -1
- package/dist/{index-LOLasIJD.js → index-ebo_5bTI.js} +3 -3
- package/dist/{index-rhyb2TB9.cjs → index-qLYDvpSi.cjs} +2 -2
- package/dist/index-uu0QwUDN.cjs +1 -0
- package/dist/{index-bKgIzodL.js → index-wmzVWtmw.js} +146 -158
- package/dist/{page-viewer-r_ZdpaXh.js → page-viewer-L4MKYffF.js} +3 -3
- package/dist/{page-viewer-V6dlnIHN.cjs → page-viewer-t7cGqLNI.cjs} +1 -1
- package/dist/{project-general-setting-6kSqNVU3.js → project-general-setting-ixBlo6KH.js} +3 -3
- package/dist/{project-general-setting-Dh5ki1wJ.cjs → project-general-setting-sfh80XRT.cjs} +1 -1
- package/dist/{project-seo-setting-dRUW-Zmp.js → project-seo-setting-iJW4zDZz.js} +2 -2
- package/dist/{project-seo-setting-57XXrUTn.cjs → project-seo-setting-pOIFrso5.cjs} +1 -1
- package/dist/{single-page-detail-E3QAv3RO.cjs → single-page-detail-4KlhF5AH.cjs} +1 -1
- package/dist/{single-page-detail-LTirOwox.js → single-page-detail-OwDaEcUN.js} +4 -4
- package/dist/studio.cjs +1 -1
- package/dist/studio.js +2 -2
- package/dist/ui.cjs +1 -1
- package/dist/ui.js +1 -1
- package/dist/{useAddBlockByDrop-qOKe8QVt.cjs → useAddBlockByDrop-3RSPGnwT.cjs} +1 -1
- package/dist/{useAddBlockByDrop-LM3owe-j.js → useAddBlockByDrop-Vcz4iQCH.js} +1 -1
- package/package.json +1 -1
- package/dist/BrandingOptions-kjj0QNch.cjs +0 -1
- package/dist/index-U_pW4Tkc.cjs +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
var xt = Object.defineProperty;
|
|
2
2
|
var bt = (e, t, n) => t in e ? xt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
-
var
|
|
3
|
+
var J = (e, t, n) => (bt(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
import { j as r } from "./jsx-runtime-NV737rRe.js";
|
|
5
|
-
import
|
|
6
|
-
import { map as ie, includes as
|
|
7
|
-
import { ResetIcon as
|
|
8
|
-
import { p as je, B as le, W as
|
|
5
|
+
import X, { createElement as wt, useCallback as we, useState as U, useEffect as _, Component as Ue, Children as kt, Suspense as ze, useRef as De, useMemo as jt, lazy as Ct } from "react";
|
|
6
|
+
import { map as ie, includes as Be, toUpper as ue, round as Tt, throttle as Ye, noop as ee, isEmpty as K, first as ae, omit as St, pick as It, get as O, isString as ke, memoize as Et, each as Dt, find as Bt, filter as Ke, isNull as Ot } from "lodash";
|
|
7
|
+
import { ResetIcon as Oe, MobileIcon as Ae, LaptopIcon as At, DesktopIcon as Pt, DotsVerticalIcon as Rt, EraserIcon as Mt, ZoomInIcon as _t, DragHandleDots2Icon as Lt, ArrowUpIcon as Nt, CopyIcon as $t, TrashIcon as Ft } from "@radix-ui/react-icons";
|
|
8
|
+
import { p as je, B as le, W as Je, aI as Wt, aJ as Ht, aK as qt, aL as Ut, aM as zt, R as Ce, ai as Yt, aN as Kt, aO as Jt, aP as Xt, aQ as Vt, aR as Zt, aS as Gt, w as Qt, j as W, aj as V, D as en, E as tn, F as nn, G as rn, H as sn, I as on, J as an, K as ln, ap as cn, L as dn, U as Xe, aH as oe, aT as un, _ as G, ab as pn, aU as re, ae as Te, m as Ve, n as fn, k as hn, o as gn, h as Ze, l as Ge, ag as mn, aV as yn, aW as Qe, aX as vn, aY as xn, x as bn, a as wn, aZ as kn, a_ as jn, a6 as Cn, a$ as Tn, i as Sn, S as et, aw as In } from "./index-wmzVWtmw.js";
|
|
9
9
|
import { useTranslation as En } from "react-i18next";
|
|
10
|
-
import { useAtom as
|
|
11
|
-
import
|
|
12
|
-
import { g as Dn, S as
|
|
13
|
-
import { r as nt, u as Bn, B as On, E as An } from "./index-
|
|
10
|
+
import { useAtom as $ } from "jotai";
|
|
11
|
+
import Pe from "react-dom";
|
|
12
|
+
import { g as Dn, S as Re, a as tt } from "./MODIFIERS-MLfpKQY1.js";
|
|
13
|
+
import { r as nt, u as Bn, B as On, E as An } from "./index-ebo_5bTI.js";
|
|
14
14
|
import { Quill as Pn } from "react-quill";
|
|
15
|
-
import { u as Rn } from "./useAddBlockByDrop-
|
|
15
|
+
import { u as Rn } from "./useAddBlockByDrop-Vcz4iQCH.js";
|
|
16
16
|
import { useFeature as rt } from "flagged";
|
|
17
17
|
import { flip as Mn } from "@floating-ui/dom";
|
|
18
18
|
import { useFloating as _n, shift as Ln } from "@floating-ui/react-dom";
|
|
@@ -65,12 +65,12 @@ import "lucide-react";
|
|
|
65
65
|
const qn = () => {
|
|
66
66
|
const { undoCount: e, redoCount: t, undo: n, redo: i } = je();
|
|
67
67
|
return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
|
|
68
|
-
/* @__PURE__ */ r.jsx(le, { disabled: !e, size: "sm", onClick: n, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(
|
|
69
|
-
/* @__PURE__ */ r.jsx(le, { disabled: !t, onClick: i, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(
|
|
68
|
+
/* @__PURE__ */ r.jsx(le, { disabled: !e, size: "sm", onClick: n, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(Oe, {}) }),
|
|
69
|
+
/* @__PURE__ */ r.jsx(le, { disabled: !t, onClick: i, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(Oe, { className: "rotate-180 scale-y-[-1] transform" }) })
|
|
70
70
|
] });
|
|
71
71
|
};
|
|
72
72
|
function Un() {
|
|
73
|
-
const [e, t] =
|
|
73
|
+
const [e, t] = Je(), { t: n } = En();
|
|
74
74
|
return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
|
|
75
75
|
/* @__PURE__ */ r.jsx(Wt, { htmlFor: "dark-mode-switch", children: n("dark_mode") }),
|
|
76
76
|
/* @__PURE__ */ r.jsxs(
|
|
@@ -98,7 +98,7 @@ function Un() {
|
|
|
98
98
|
)
|
|
99
99
|
] });
|
|
100
100
|
}
|
|
101
|
-
const
|
|
101
|
+
const Me = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
102
102
|
"svg",
|
|
103
103
|
{
|
|
104
104
|
className: e ? "rotate-90" : "",
|
|
@@ -121,33 +121,33 @@ const Re = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
121
121
|
)
|
|
122
122
|
]
|
|
123
123
|
}
|
|
124
|
-
),
|
|
124
|
+
), _e = [
|
|
125
125
|
{
|
|
126
126
|
title: "Mobile (XS)",
|
|
127
127
|
content: "Styles set here are applied to all screen unless edited at higher breakpoint",
|
|
128
128
|
breakpoint: "xs",
|
|
129
|
-
icon: /* @__PURE__ */ r.jsx(
|
|
129
|
+
icon: /* @__PURE__ */ r.jsx(Ae, {}),
|
|
130
130
|
width: 400
|
|
131
131
|
},
|
|
132
132
|
{
|
|
133
133
|
title: "Mobile landscape (SM)",
|
|
134
134
|
content: "Styles set here are applied at 640px and up unless edited at higher breakpoint",
|
|
135
135
|
breakpoint: "sm",
|
|
136
|
-
icon: /* @__PURE__ */ r.jsx(
|
|
136
|
+
icon: /* @__PURE__ */ r.jsx(Ae, { className: "rotate-90" }),
|
|
137
137
|
width: 640
|
|
138
138
|
},
|
|
139
139
|
{
|
|
140
140
|
title: "Tablet (MD)",
|
|
141
141
|
content: "Styles set here are applied at 768px and up",
|
|
142
142
|
breakpoint: "md",
|
|
143
|
-
icon: /* @__PURE__ */ r.jsx(
|
|
143
|
+
icon: /* @__PURE__ */ r.jsx(Me, {}),
|
|
144
144
|
width: 800
|
|
145
145
|
},
|
|
146
146
|
{
|
|
147
147
|
title: "Tablet Landscape (LG)",
|
|
148
148
|
content: "Styles set here are applied at 1024px and up unless edited at higher breakpoint",
|
|
149
149
|
breakpoint: "lg",
|
|
150
|
-
icon: /* @__PURE__ */ r.jsx(
|
|
150
|
+
icon: /* @__PURE__ */ r.jsx(Me, { landscape: !0 }),
|
|
151
151
|
width: 1024
|
|
152
152
|
},
|
|
153
153
|
{
|
|
@@ -169,14 +169,14 @@ const Re = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
169
169
|
content: t,
|
|
170
170
|
currentBreakpoint: n,
|
|
171
171
|
breakpoint: i,
|
|
172
|
-
width:
|
|
172
|
+
width: l,
|
|
173
173
|
icon: o,
|
|
174
174
|
onClick: d
|
|
175
175
|
}) => /* @__PURE__ */ r.jsxs(qt, { children: [
|
|
176
176
|
/* @__PURE__ */ r.jsx(Ut, { asChild: !0, children: /* @__PURE__ */ r.jsx(
|
|
177
177
|
le,
|
|
178
178
|
{
|
|
179
|
-
onClick: () => d(
|
|
179
|
+
onClick: () => d(l),
|
|
180
180
|
size: "sm",
|
|
181
181
|
variant: i === n ? "secondary" : "ghost",
|
|
182
182
|
children: o
|
|
@@ -187,12 +187,12 @@ const Re = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
187
187
|
/* @__PURE__ */ r.jsx("p", { className: "text-xs", children: t })
|
|
188
188
|
] }) }) })
|
|
189
189
|
] }), Yn = () => {
|
|
190
|
-
const [, e, t] = Ce(), [n, i] = Yt(),
|
|
190
|
+
const [, e, t] = Ce(), [n, i] = Yt(), l = (o) => {
|
|
191
191
|
n.includes(o) ? n.length > 2 && i(n.filter((d) => d !== o)) : i((d) => [...d, o]);
|
|
192
192
|
};
|
|
193
193
|
return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center rounded-md", children: [
|
|
194
194
|
ie(
|
|
195
|
-
|
|
195
|
+
_e.filter((o) => Be(n, ue(o.breakpoint))),
|
|
196
196
|
(o) => /* @__PURE__ */ wt(zn, { ...o, onClick: t, key: o.breakpoint, currentBreakpoint: e })
|
|
197
197
|
),
|
|
198
198
|
/* @__PURE__ */ r.jsxs(Kt, { children: [
|
|
@@ -200,12 +200,12 @@ const Re = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
200
200
|
/* @__PURE__ */ r.jsxs(Xt, { className: "w-56 border-border text-xs", children: [
|
|
201
201
|
/* @__PURE__ */ r.jsx(Vt, { children: "Breakpoints" }),
|
|
202
202
|
/* @__PURE__ */ r.jsx(Zt, {}),
|
|
203
|
-
ie(
|
|
203
|
+
ie(_e, (o) => /* @__PURE__ */ r.jsx(
|
|
204
204
|
Gt,
|
|
205
205
|
{
|
|
206
206
|
disabled: o.breakpoint === "xs",
|
|
207
|
-
onCheckedChange: () =>
|
|
208
|
-
checked:
|
|
207
|
+
onCheckedChange: () => l(ue(o.breakpoint)),
|
|
208
|
+
checked: Be(n, ue(o.breakpoint)),
|
|
209
209
|
children: o.title
|
|
210
210
|
},
|
|
211
211
|
o.breakpoint
|
|
@@ -214,7 +214,7 @@ const Re = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
214
214
|
] })
|
|
215
215
|
] });
|
|
216
216
|
}, Kn = () => {
|
|
217
|
-
const [e] = Qt(), { createSnapshot: t } = je(), [, n] =
|
|
217
|
+
const [e] = Qt(), { createSnapshot: t } = je(), [, n] = W(), [, i] = V(), l = we(() => {
|
|
218
218
|
e([]), n([]), i([]), t();
|
|
219
219
|
}, [e, t]);
|
|
220
220
|
return /* @__PURE__ */ r.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ r.jsxs(en, { children: [
|
|
@@ -229,12 +229,12 @@ const Re = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
229
229
|
] }),
|
|
230
230
|
/* @__PURE__ */ r.jsxs(an, { children: [
|
|
231
231
|
/* @__PURE__ */ r.jsx(ln, { children: "Cancel" }),
|
|
232
|
-
/* @__PURE__ */ r.jsx(cn, { onClick:
|
|
232
|
+
/* @__PURE__ */ r.jsx(cn, { onClick: l, children: "Yes" })
|
|
233
233
|
] })
|
|
234
234
|
] })
|
|
235
235
|
] }) });
|
|
236
236
|
}, Jn = () => {
|
|
237
|
-
const e = dn("darkMode", !1), [t] =
|
|
237
|
+
const e = dn("darkMode", !1), [t] = Xe();
|
|
238
238
|
return /* @__PURE__ */ r.jsxs("div", { className: "flex h-10 items-center justify-between border-b bg-background/70 px-2", children: [
|
|
239
239
|
/* @__PURE__ */ r.jsxs("div", { className: "flex h-full space-x-2", children: [
|
|
240
240
|
e ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
@@ -307,21 +307,21 @@ const Re = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
|
|
|
307
307
|
<script src="https://cdn.jsdelivr.net/npm/quill@2.0.0/dist/quill.js"><\/script>
|
|
308
308
|
</body>
|
|
309
309
|
</html>`, Vn = (e) => {
|
|
310
|
-
const [t] = Ce(), [, n] =
|
|
310
|
+
const [t] = Ce(), [, n] = Xe(), [i, l] = U({}), o = we(() => {
|
|
311
311
|
const { width: d, height: s } = e;
|
|
312
312
|
if (d < t) {
|
|
313
313
|
const u = parseFloat((d / t).toString());
|
|
314
314
|
let c = {};
|
|
315
|
-
s && (c = { height: s + 2 * s * (1 - u) }),
|
|
315
|
+
s && (c = { height: s + 2 * s * (1 - u) }), l({
|
|
316
316
|
transform: `scale(${u})`,
|
|
317
317
|
transformOrigin: "top left",
|
|
318
318
|
...c,
|
|
319
319
|
maxWidth: "none"
|
|
320
320
|
}), n(u * 100);
|
|
321
321
|
} else
|
|
322
|
-
|
|
322
|
+
l({}), n(100);
|
|
323
323
|
}, [t, e, n]);
|
|
324
|
-
return
|
|
324
|
+
return _(() => {
|
|
325
325
|
o();
|
|
326
326
|
}, [t, e, n, o]), i;
|
|
327
327
|
};
|
|
@@ -331,18 +331,18 @@ object-assign
|
|
|
331
331
|
(c) Sindre Sorhus
|
|
332
332
|
@license MIT
|
|
333
333
|
*/
|
|
334
|
-
var pe,
|
|
334
|
+
var pe, Le;
|
|
335
335
|
function Zn() {
|
|
336
|
-
if (
|
|
336
|
+
if (Le)
|
|
337
337
|
return pe;
|
|
338
|
-
|
|
338
|
+
Le = 1;
|
|
339
339
|
var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
|
|
340
340
|
function i(o) {
|
|
341
341
|
if (o == null)
|
|
342
342
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
343
343
|
return Object(o);
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function l() {
|
|
346
346
|
try {
|
|
347
347
|
if (!Object.assign)
|
|
348
348
|
return !1;
|
|
@@ -364,41 +364,41 @@ function Zn() {
|
|
|
364
364
|
return !1;
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
|
-
return pe =
|
|
367
|
+
return pe = l() ? Object.assign : function(o, d) {
|
|
368
368
|
for (var s, u = i(o), c, f = 1; f < arguments.length; f++) {
|
|
369
369
|
s = Object(arguments[f]);
|
|
370
370
|
for (var h in s)
|
|
371
371
|
t.call(s, h) && (u[h] = s[h]);
|
|
372
372
|
if (e) {
|
|
373
373
|
c = e(s);
|
|
374
|
-
for (var
|
|
375
|
-
n.call(s, c[
|
|
374
|
+
for (var w = 0; w < c.length; w++)
|
|
375
|
+
n.call(s, c[w]) && (u[c[w]] = s[c[w]]);
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
378
|
return u;
|
|
379
379
|
}, pe;
|
|
380
380
|
}
|
|
381
|
-
var fe,
|
|
382
|
-
function
|
|
383
|
-
if (
|
|
381
|
+
var fe, Ne;
|
|
382
|
+
function Se() {
|
|
383
|
+
if (Ne)
|
|
384
384
|
return fe;
|
|
385
|
-
|
|
385
|
+
Ne = 1;
|
|
386
386
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
387
387
|
return fe = e, fe;
|
|
388
388
|
}
|
|
389
|
-
var he,
|
|
389
|
+
var he, $e;
|
|
390
390
|
function st() {
|
|
391
|
-
return
|
|
391
|
+
return $e || ($e = 1, he = Function.call.bind(Object.prototype.hasOwnProperty)), he;
|
|
392
392
|
}
|
|
393
|
-
var ge,
|
|
393
|
+
var ge, Fe;
|
|
394
394
|
function Gn() {
|
|
395
|
-
if (
|
|
395
|
+
if (Fe)
|
|
396
396
|
return ge;
|
|
397
|
-
|
|
397
|
+
Fe = 1;
|
|
398
398
|
var e = function() {
|
|
399
399
|
};
|
|
400
400
|
if (process.env.NODE_ENV !== "production") {
|
|
401
|
-
var t =
|
|
401
|
+
var t = Se(), n = {}, i = st();
|
|
402
402
|
e = function(o) {
|
|
403
403
|
var d = "Warning: " + o;
|
|
404
404
|
typeof console < "u" && console.error(d);
|
|
@@ -408,21 +408,21 @@ function Gn() {
|
|
|
408
408
|
}
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
|
-
function
|
|
411
|
+
function l(o, d, s, u, c) {
|
|
412
412
|
if (process.env.NODE_ENV !== "production") {
|
|
413
413
|
for (var f in o)
|
|
414
414
|
if (i(o, f)) {
|
|
415
415
|
var h;
|
|
416
416
|
try {
|
|
417
417
|
if (typeof o[f] != "function") {
|
|
418
|
-
var
|
|
418
|
+
var w = Error(
|
|
419
419
|
(u || "React class") + ": " + s + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
420
420
|
);
|
|
421
|
-
throw
|
|
421
|
+
throw w.name = "Invariant Violation", w;
|
|
422
422
|
}
|
|
423
423
|
h = o[f](d, f, u, s, null, t);
|
|
424
|
-
} catch (
|
|
425
|
-
h =
|
|
424
|
+
} catch (P) {
|
|
425
|
+
h = P;
|
|
426
426
|
}
|
|
427
427
|
if (h && !(h instanceof Error) && e(
|
|
428
428
|
(u || "React class") + ": type specification of " + s + " `" + f + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof h + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
@@ -436,16 +436,16 @@ function Gn() {
|
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
438
|
}
|
|
439
|
-
return
|
|
439
|
+
return l.resetWarningCache = function() {
|
|
440
440
|
process.env.NODE_ENV !== "production" && (n = {});
|
|
441
|
-
}, ge =
|
|
441
|
+
}, ge = l, ge;
|
|
442
442
|
}
|
|
443
|
-
var me,
|
|
443
|
+
var me, We;
|
|
444
444
|
function Qn() {
|
|
445
|
-
if (
|
|
445
|
+
if (We)
|
|
446
446
|
return me;
|
|
447
|
-
|
|
448
|
-
var e = nt, t = Zn(), n =
|
|
447
|
+
We = 1;
|
|
448
|
+
var e = nt, t = Zn(), n = Se(), i = st(), l = Gn(), o = function() {
|
|
449
449
|
};
|
|
450
450
|
process.env.NODE_ENV !== "production" && (o = function(s) {
|
|
451
451
|
var u = "Warning: " + s;
|
|
@@ -460,90 +460,90 @@ function Qn() {
|
|
|
460
460
|
}
|
|
461
461
|
return me = function(s, u) {
|
|
462
462
|
var c = typeof Symbol == "function" && Symbol.iterator, f = "@@iterator";
|
|
463
|
-
function h(
|
|
464
|
-
var p =
|
|
463
|
+
function h(a) {
|
|
464
|
+
var p = a && (c && a[c] || a[f]);
|
|
465
465
|
if (typeof p == "function")
|
|
466
466
|
return p;
|
|
467
467
|
}
|
|
468
|
-
var
|
|
469
|
-
array:
|
|
470
|
-
bigint:
|
|
471
|
-
bool:
|
|
472
|
-
func:
|
|
473
|
-
number:
|
|
474
|
-
object:
|
|
475
|
-
string:
|
|
476
|
-
symbol:
|
|
477
|
-
any:
|
|
478
|
-
arrayOf:
|
|
479
|
-
element:
|
|
480
|
-
elementType:
|
|
481
|
-
instanceOf:
|
|
468
|
+
var w = "<<anonymous>>", S = {
|
|
469
|
+
array: D("array"),
|
|
470
|
+
bigint: D("bigint"),
|
|
471
|
+
bool: D("boolean"),
|
|
472
|
+
func: D("function"),
|
|
473
|
+
number: D("number"),
|
|
474
|
+
object: D("object"),
|
|
475
|
+
string: D("string"),
|
|
476
|
+
symbol: D("symbol"),
|
|
477
|
+
any: A(),
|
|
478
|
+
arrayOf: k,
|
|
479
|
+
element: N(),
|
|
480
|
+
elementType: F(),
|
|
481
|
+
instanceOf: B,
|
|
482
482
|
node: ft(),
|
|
483
|
-
objectOf:
|
|
484
|
-
oneOf:
|
|
483
|
+
objectOf: q,
|
|
484
|
+
oneOf: H,
|
|
485
485
|
oneOfType: pt,
|
|
486
486
|
shape: ht,
|
|
487
487
|
exact: gt
|
|
488
488
|
};
|
|
489
|
-
function
|
|
490
|
-
return
|
|
489
|
+
function P(a, p) {
|
|
490
|
+
return a === p ? a !== 0 || 1 / a === 1 / p : a !== a && p !== p;
|
|
491
491
|
}
|
|
492
|
-
function
|
|
493
|
-
this.message =
|
|
492
|
+
function x(a, p) {
|
|
493
|
+
this.message = a, this.data = p && typeof p == "object" ? p : {}, this.stack = "";
|
|
494
494
|
}
|
|
495
|
-
|
|
496
|
-
function E(
|
|
495
|
+
x.prototype = Error.prototype;
|
|
496
|
+
function E(a) {
|
|
497
497
|
if (process.env.NODE_ENV !== "production")
|
|
498
|
-
var p = {},
|
|
499
|
-
function
|
|
500
|
-
if (C = C ||
|
|
498
|
+
var p = {}, b = 0;
|
|
499
|
+
function y(j, m, v, C, I, T, L) {
|
|
500
|
+
if (C = C || w, T = T || v, L !== n) {
|
|
501
501
|
if (u) {
|
|
502
|
-
var
|
|
502
|
+
var R = new Error(
|
|
503
503
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
504
504
|
);
|
|
505
|
-
throw
|
|
505
|
+
throw R.name = "Invariant Violation", R;
|
|
506
506
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
507
|
-
var Z = C + ":" +
|
|
507
|
+
var Z = C + ":" + v;
|
|
508
508
|
!p[Z] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
509
|
-
|
|
509
|
+
b < 3 && (o(
|
|
510
510
|
"You are manually calling a React.PropTypes validation function for the `" + T + "` prop on `" + C + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
511
|
-
), p[Z] = !0,
|
|
511
|
+
), p[Z] = !0, b++);
|
|
512
512
|
}
|
|
513
513
|
}
|
|
514
|
-
return
|
|
514
|
+
return m[v] == null ? j ? m[v] === null ? new x("The " + I + " `" + T + "` is marked as required " + ("in `" + C + "`, but its value is `null`.")) : new x("The " + I + " `" + T + "` is marked as required in " + ("`" + C + "`, but its value is `undefined`.")) : null : a(m, v, C, I, T);
|
|
515
515
|
}
|
|
516
|
-
var
|
|
517
|
-
return
|
|
516
|
+
var g = y.bind(null, !1);
|
|
517
|
+
return g.isRequired = y.bind(null, !0), g;
|
|
518
518
|
}
|
|
519
|
-
function
|
|
520
|
-
function p(
|
|
521
|
-
var C =
|
|
522
|
-
if (I !==
|
|
519
|
+
function D(a) {
|
|
520
|
+
function p(b, y, g, j, m, v) {
|
|
521
|
+
var C = b[y], I = z(C);
|
|
522
|
+
if (I !== a) {
|
|
523
523
|
var T = Q(C);
|
|
524
|
-
return new
|
|
525
|
-
"Invalid " + j + " `" +
|
|
526
|
-
{ expectedType:
|
|
524
|
+
return new x(
|
|
525
|
+
"Invalid " + j + " `" + m + "` of type " + ("`" + T + "` supplied to `" + g + "`, expected ") + ("`" + a + "`."),
|
|
526
|
+
{ expectedType: a }
|
|
527
527
|
);
|
|
528
528
|
}
|
|
529
529
|
return null;
|
|
530
530
|
}
|
|
531
531
|
return E(p);
|
|
532
532
|
}
|
|
533
|
-
function
|
|
533
|
+
function A() {
|
|
534
534
|
return E(d);
|
|
535
535
|
}
|
|
536
|
-
function
|
|
537
|
-
function p(
|
|
538
|
-
if (typeof
|
|
539
|
-
return new
|
|
540
|
-
var
|
|
541
|
-
if (!Array.isArray(
|
|
542
|
-
var C =
|
|
543
|
-
return new
|
|
536
|
+
function k(a) {
|
|
537
|
+
function p(b, y, g, j, m) {
|
|
538
|
+
if (typeof a != "function")
|
|
539
|
+
return new x("Property `" + m + "` of component `" + g + "` has invalid PropType notation inside arrayOf.");
|
|
540
|
+
var v = b[y];
|
|
541
|
+
if (!Array.isArray(v)) {
|
|
542
|
+
var C = z(v);
|
|
543
|
+
return new x("Invalid " + j + " `" + m + "` of type " + ("`" + C + "` supplied to `" + g + "`, expected an array."));
|
|
544
544
|
}
|
|
545
|
-
for (var I = 0; I <
|
|
546
|
-
var T =
|
|
545
|
+
for (var I = 0; I < v.length; I++) {
|
|
546
|
+
var T = a(v, I, g, j, m + "[" + I + "]", n);
|
|
547
547
|
if (T instanceof Error)
|
|
548
548
|
return T;
|
|
549
549
|
}
|
|
@@ -551,65 +551,65 @@ function Qn() {
|
|
|
551
551
|
}
|
|
552
552
|
return E(p);
|
|
553
553
|
}
|
|
554
|
-
function
|
|
555
|
-
function
|
|
556
|
-
var
|
|
557
|
-
if (!s(
|
|
558
|
-
var
|
|
559
|
-
return new
|
|
554
|
+
function N() {
|
|
555
|
+
function a(p, b, y, g, j) {
|
|
556
|
+
var m = p[b];
|
|
557
|
+
if (!s(m)) {
|
|
558
|
+
var v = z(m);
|
|
559
|
+
return new x("Invalid " + g + " `" + j + "` of type " + ("`" + v + "` supplied to `" + y + "`, expected a single ReactElement."));
|
|
560
560
|
}
|
|
561
561
|
return null;
|
|
562
562
|
}
|
|
563
|
-
return E(
|
|
563
|
+
return E(a);
|
|
564
564
|
}
|
|
565
|
-
function
|
|
566
|
-
function
|
|
567
|
-
var
|
|
568
|
-
if (!e.isValidElementType(
|
|
569
|
-
var
|
|
570
|
-
return new
|
|
565
|
+
function F() {
|
|
566
|
+
function a(p, b, y, g, j) {
|
|
567
|
+
var m = p[b];
|
|
568
|
+
if (!e.isValidElementType(m)) {
|
|
569
|
+
var v = z(m);
|
|
570
|
+
return new x("Invalid " + g + " `" + j + "` of type " + ("`" + v + "` supplied to `" + y + "`, expected a single ReactElement type."));
|
|
571
571
|
}
|
|
572
572
|
return null;
|
|
573
573
|
}
|
|
574
|
-
return E(
|
|
574
|
+
return E(a);
|
|
575
575
|
}
|
|
576
|
-
function
|
|
577
|
-
function p(
|
|
578
|
-
if (!(
|
|
579
|
-
var
|
|
580
|
-
return new
|
|
576
|
+
function B(a) {
|
|
577
|
+
function p(b, y, g, j, m) {
|
|
578
|
+
if (!(b[y] instanceof a)) {
|
|
579
|
+
var v = a.name || w, C = vt(b[y]);
|
|
580
|
+
return new x("Invalid " + j + " `" + m + "` of type " + ("`" + C + "` supplied to `" + g + "`, expected ") + ("instance of `" + v + "`."));
|
|
581
581
|
}
|
|
582
582
|
return null;
|
|
583
583
|
}
|
|
584
584
|
return E(p);
|
|
585
585
|
}
|
|
586
|
-
function
|
|
587
|
-
if (!Array.isArray(
|
|
586
|
+
function H(a) {
|
|
587
|
+
if (!Array.isArray(a))
|
|
588
588
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
|
|
589
589
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
590
590
|
) : o("Invalid argument supplied to oneOf, expected an array.")), d;
|
|
591
|
-
function p(
|
|
592
|
-
for (var
|
|
593
|
-
if (
|
|
591
|
+
function p(b, y, g, j, m) {
|
|
592
|
+
for (var v = b[y], C = 0; C < a.length; C++)
|
|
593
|
+
if (P(v, a[C]))
|
|
594
594
|
return null;
|
|
595
|
-
var I = JSON.stringify(
|
|
596
|
-
var Z = Q(
|
|
597
|
-
return Z === "symbol" ? String(
|
|
595
|
+
var I = JSON.stringify(a, function(L, R) {
|
|
596
|
+
var Z = Q(R);
|
|
597
|
+
return Z === "symbol" ? String(R) : R;
|
|
598
598
|
});
|
|
599
|
-
return new
|
|
599
|
+
return new x("Invalid " + j + " `" + m + "` of value `" + String(v) + "` " + ("supplied to `" + g + "`, expected one of " + I + "."));
|
|
600
600
|
}
|
|
601
601
|
return E(p);
|
|
602
602
|
}
|
|
603
|
-
function
|
|
604
|
-
function p(
|
|
605
|
-
if (typeof
|
|
606
|
-
return new
|
|
607
|
-
var
|
|
603
|
+
function q(a) {
|
|
604
|
+
function p(b, y, g, j, m) {
|
|
605
|
+
if (typeof a != "function")
|
|
606
|
+
return new x("Property `" + m + "` of component `" + g + "` has invalid PropType notation inside objectOf.");
|
|
607
|
+
var v = b[y], C = z(v);
|
|
608
608
|
if (C !== "object")
|
|
609
|
-
return new
|
|
610
|
-
for (var I in
|
|
611
|
-
if (i(
|
|
612
|
-
var T =
|
|
609
|
+
return new x("Invalid " + j + " `" + m + "` of type " + ("`" + C + "` supplied to `" + g + "`, expected an object."));
|
|
610
|
+
for (var I in v)
|
|
611
|
+
if (i(v, I)) {
|
|
612
|
+
var T = a(v, I, g, j, m + "." + I, n);
|
|
613
613
|
if (T instanceof Error)
|
|
614
614
|
return T;
|
|
615
615
|
}
|
|
@@ -617,103 +617,103 @@ function Qn() {
|
|
|
617
617
|
}
|
|
618
618
|
return E(p);
|
|
619
619
|
}
|
|
620
|
-
function pt(
|
|
621
|
-
if (!Array.isArray(
|
|
620
|
+
function pt(a) {
|
|
621
|
+
if (!Array.isArray(a))
|
|
622
622
|
return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), d;
|
|
623
|
-
for (var p = 0; p <
|
|
624
|
-
var
|
|
625
|
-
if (typeof
|
|
623
|
+
for (var p = 0; p < a.length; p++) {
|
|
624
|
+
var b = a[p];
|
|
625
|
+
if (typeof b != "function")
|
|
626
626
|
return o(
|
|
627
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + yt(
|
|
627
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + yt(b) + " at index " + p + "."
|
|
628
628
|
), d;
|
|
629
629
|
}
|
|
630
|
-
function
|
|
631
|
-
for (var I = [], T = 0; T <
|
|
632
|
-
var
|
|
633
|
-
if (
|
|
630
|
+
function y(g, j, m, v, C) {
|
|
631
|
+
for (var I = [], T = 0; T < a.length; T++) {
|
|
632
|
+
var L = a[T], R = L(g, j, m, v, C, n);
|
|
633
|
+
if (R == null)
|
|
634
634
|
return null;
|
|
635
|
-
|
|
635
|
+
R.data && i(R.data, "expectedType") && I.push(R.data.expectedType);
|
|
636
636
|
}
|
|
637
637
|
var Z = I.length > 0 ? ", expected one of type [" + I.join(", ") + "]" : "";
|
|
638
|
-
return new
|
|
638
|
+
return new x("Invalid " + v + " `" + C + "` supplied to " + ("`" + m + "`" + Z + "."));
|
|
639
639
|
}
|
|
640
|
-
return E(
|
|
640
|
+
return E(y);
|
|
641
641
|
}
|
|
642
642
|
function ft() {
|
|
643
|
-
function
|
|
644
|
-
return se(p[
|
|
643
|
+
function a(p, b, y, g, j) {
|
|
644
|
+
return se(p[b]) ? null : new x("Invalid " + g + " `" + j + "` supplied to " + ("`" + y + "`, expected a ReactNode."));
|
|
645
645
|
}
|
|
646
|
-
return E(
|
|
646
|
+
return E(a);
|
|
647
647
|
}
|
|
648
|
-
function
|
|
649
|
-
return new
|
|
650
|
-
(
|
|
648
|
+
function Ee(a, p, b, y, g) {
|
|
649
|
+
return new x(
|
|
650
|
+
(a || "React class") + ": " + p + " type `" + b + "." + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + g + "`."
|
|
651
651
|
);
|
|
652
652
|
}
|
|
653
|
-
function ht(
|
|
654
|
-
function p(
|
|
655
|
-
var
|
|
653
|
+
function ht(a) {
|
|
654
|
+
function p(b, y, g, j, m) {
|
|
655
|
+
var v = b[y], C = z(v);
|
|
656
656
|
if (C !== "object")
|
|
657
|
-
return new
|
|
658
|
-
for (var I in
|
|
659
|
-
var T =
|
|
657
|
+
return new x("Invalid " + j + " `" + m + "` of type `" + C + "` " + ("supplied to `" + g + "`, expected `object`."));
|
|
658
|
+
for (var I in a) {
|
|
659
|
+
var T = a[I];
|
|
660
660
|
if (typeof T != "function")
|
|
661
|
-
return
|
|
662
|
-
var
|
|
663
|
-
if (
|
|
664
|
-
return
|
|
661
|
+
return Ee(g, j, m, I, Q(T));
|
|
662
|
+
var L = T(v, I, g, j, m + "." + I, n);
|
|
663
|
+
if (L)
|
|
664
|
+
return L;
|
|
665
665
|
}
|
|
666
666
|
return null;
|
|
667
667
|
}
|
|
668
668
|
return E(p);
|
|
669
669
|
}
|
|
670
|
-
function gt(
|
|
671
|
-
function p(
|
|
672
|
-
var
|
|
670
|
+
function gt(a) {
|
|
671
|
+
function p(b, y, g, j, m) {
|
|
672
|
+
var v = b[y], C = z(v);
|
|
673
673
|
if (C !== "object")
|
|
674
|
-
return new
|
|
675
|
-
var I = t({},
|
|
674
|
+
return new x("Invalid " + j + " `" + m + "` of type `" + C + "` " + ("supplied to `" + g + "`, expected `object`."));
|
|
675
|
+
var I = t({}, b[y], a);
|
|
676
676
|
for (var T in I) {
|
|
677
|
-
var
|
|
678
|
-
if (i(
|
|
679
|
-
return
|
|
680
|
-
if (!
|
|
681
|
-
return new
|
|
682
|
-
"Invalid " + j + " `" +
|
|
683
|
-
Valid keys: ` + JSON.stringify(Object.keys(
|
|
677
|
+
var L = a[T];
|
|
678
|
+
if (i(a, T) && typeof L != "function")
|
|
679
|
+
return Ee(g, j, m, T, Q(L));
|
|
680
|
+
if (!L)
|
|
681
|
+
return new x(
|
|
682
|
+
"Invalid " + j + " `" + m + "` key `" + T + "` supplied to `" + g + "`.\nBad object: " + JSON.stringify(b[y], null, " ") + `
|
|
683
|
+
Valid keys: ` + JSON.stringify(Object.keys(a), null, " ")
|
|
684
684
|
);
|
|
685
|
-
var
|
|
686
|
-
if (
|
|
687
|
-
return
|
|
685
|
+
var R = L(v, T, g, j, m + "." + T, n);
|
|
686
|
+
if (R)
|
|
687
|
+
return R;
|
|
688
688
|
}
|
|
689
689
|
return null;
|
|
690
690
|
}
|
|
691
691
|
return E(p);
|
|
692
692
|
}
|
|
693
|
-
function se(
|
|
694
|
-
switch (typeof
|
|
693
|
+
function se(a) {
|
|
694
|
+
switch (typeof a) {
|
|
695
695
|
case "number":
|
|
696
696
|
case "string":
|
|
697
697
|
case "undefined":
|
|
698
698
|
return !0;
|
|
699
699
|
case "boolean":
|
|
700
|
-
return !
|
|
700
|
+
return !a;
|
|
701
701
|
case "object":
|
|
702
|
-
if (Array.isArray(
|
|
703
|
-
return
|
|
704
|
-
if (
|
|
702
|
+
if (Array.isArray(a))
|
|
703
|
+
return a.every(se);
|
|
704
|
+
if (a === null || s(a))
|
|
705
705
|
return !0;
|
|
706
|
-
var p = h(
|
|
706
|
+
var p = h(a);
|
|
707
707
|
if (p) {
|
|
708
|
-
var
|
|
709
|
-
if (p !==
|
|
710
|
-
for (; !(
|
|
711
|
-
if (!se(
|
|
708
|
+
var b = p.call(a), y;
|
|
709
|
+
if (p !== a.entries) {
|
|
710
|
+
for (; !(y = b.next()).done; )
|
|
711
|
+
if (!se(y.value))
|
|
712
712
|
return !1;
|
|
713
713
|
} else
|
|
714
|
-
for (; !(
|
|
715
|
-
var
|
|
716
|
-
if (
|
|
714
|
+
for (; !(y = b.next()).done; ) {
|
|
715
|
+
var g = y.value;
|
|
716
|
+
if (g && !se(g[1]))
|
|
717
717
|
return !1;
|
|
718
718
|
}
|
|
719
719
|
} else
|
|
@@ -723,27 +723,27 @@ Valid keys: ` + JSON.stringify(Object.keys(l), null, " ")
|
|
|
723
723
|
return !1;
|
|
724
724
|
}
|
|
725
725
|
}
|
|
726
|
-
function mt(
|
|
727
|
-
return
|
|
726
|
+
function mt(a, p) {
|
|
727
|
+
return a === "symbol" ? !0 : p ? p["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && p instanceof Symbol : !1;
|
|
728
728
|
}
|
|
729
|
-
function
|
|
730
|
-
var p = typeof
|
|
731
|
-
return Array.isArray(
|
|
729
|
+
function z(a) {
|
|
730
|
+
var p = typeof a;
|
|
731
|
+
return Array.isArray(a) ? "array" : a instanceof RegExp ? "object" : mt(p, a) ? "symbol" : p;
|
|
732
732
|
}
|
|
733
|
-
function Q(
|
|
734
|
-
if (typeof
|
|
735
|
-
return "" +
|
|
736
|
-
var p =
|
|
733
|
+
function Q(a) {
|
|
734
|
+
if (typeof a > "u" || a === null)
|
|
735
|
+
return "" + a;
|
|
736
|
+
var p = z(a);
|
|
737
737
|
if (p === "object") {
|
|
738
|
-
if (
|
|
738
|
+
if (a instanceof Date)
|
|
739
739
|
return "date";
|
|
740
|
-
if (
|
|
740
|
+
if (a instanceof RegExp)
|
|
741
741
|
return "regexp";
|
|
742
742
|
}
|
|
743
743
|
return p;
|
|
744
744
|
}
|
|
745
|
-
function yt(
|
|
746
|
-
var p = Q(
|
|
745
|
+
function yt(a) {
|
|
746
|
+
var p = Q(a);
|
|
747
747
|
switch (p) {
|
|
748
748
|
case "array":
|
|
749
749
|
case "object":
|
|
@@ -756,18 +756,18 @@ Valid keys: ` + JSON.stringify(Object.keys(l), null, " ")
|
|
|
756
756
|
return p;
|
|
757
757
|
}
|
|
758
758
|
}
|
|
759
|
-
function vt(
|
|
760
|
-
return !
|
|
759
|
+
function vt(a) {
|
|
760
|
+
return !a.constructor || !a.constructor.name ? w : a.constructor.name;
|
|
761
761
|
}
|
|
762
|
-
return S.checkPropTypes =
|
|
762
|
+
return S.checkPropTypes = l, S.resetWarningCache = l.resetWarningCache, S.PropTypes = S, S;
|
|
763
763
|
}, me;
|
|
764
764
|
}
|
|
765
|
-
var ye,
|
|
765
|
+
var ye, He;
|
|
766
766
|
function er() {
|
|
767
|
-
if (
|
|
767
|
+
if (He)
|
|
768
768
|
return ye;
|
|
769
|
-
|
|
770
|
-
var e =
|
|
769
|
+
He = 1;
|
|
770
|
+
var e = Se();
|
|
771
771
|
function t() {
|
|
772
772
|
}
|
|
773
773
|
function n() {
|
|
@@ -775,14 +775,14 @@ function er() {
|
|
|
775
775
|
return n.resetWarningCache = t, ye = function() {
|
|
776
776
|
function i(d, s, u, c, f, h) {
|
|
777
777
|
if (h !== e) {
|
|
778
|
-
var
|
|
778
|
+
var w = new Error(
|
|
779
779
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
780
780
|
);
|
|
781
|
-
throw
|
|
781
|
+
throw w.name = "Invariant Violation", w;
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
784
|
i.isRequired = i;
|
|
785
|
-
function
|
|
785
|
+
function l() {
|
|
786
786
|
return i;
|
|
787
787
|
}
|
|
788
788
|
var o = {
|
|
@@ -795,16 +795,16 @@ function er() {
|
|
|
795
795
|
string: i,
|
|
796
796
|
symbol: i,
|
|
797
797
|
any: i,
|
|
798
|
-
arrayOf:
|
|
798
|
+
arrayOf: l,
|
|
799
799
|
element: i,
|
|
800
800
|
elementType: i,
|
|
801
|
-
instanceOf:
|
|
801
|
+
instanceOf: l,
|
|
802
802
|
node: i,
|
|
803
|
-
objectOf:
|
|
804
|
-
oneOf:
|
|
805
|
-
oneOfType:
|
|
806
|
-
shape:
|
|
807
|
-
exact:
|
|
803
|
+
objectOf: l,
|
|
804
|
+
oneOf: l,
|
|
805
|
+
oneOfType: l,
|
|
806
|
+
shape: l,
|
|
807
|
+
exact: l,
|
|
808
808
|
checkPropTypes: n,
|
|
809
809
|
resetWarningCache: t
|
|
810
810
|
};
|
|
@@ -818,12 +818,12 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
818
818
|
} else
|
|
819
819
|
ce.exports = er()();
|
|
820
820
|
var rr = ce.exports;
|
|
821
|
-
const
|
|
821
|
+
const M = /* @__PURE__ */ Dn(rr);
|
|
822
822
|
let ot, it;
|
|
823
823
|
typeof document < "u" && (ot = document);
|
|
824
824
|
typeof window < "u" && (it = window);
|
|
825
|
-
const at =
|
|
826
|
-
class lt extends
|
|
825
|
+
const at = X.createContext({ document: ot, window: it }), de = () => X.useContext(at), { Provider: sr, Consumer: $s } = at;
|
|
826
|
+
class lt extends Ue {
|
|
827
827
|
componentDidMount() {
|
|
828
828
|
this.props.contentDidMount();
|
|
829
829
|
}
|
|
@@ -834,28 +834,28 @@ class lt extends qe {
|
|
|
834
834
|
return kt.only(this.props.children);
|
|
835
835
|
}
|
|
836
836
|
}
|
|
837
|
-
|
|
838
|
-
children:
|
|
839
|
-
contentDidMount:
|
|
840
|
-
contentDidUpdate:
|
|
837
|
+
J(lt, "propTypes", {
|
|
838
|
+
children: M.element.isRequired,
|
|
839
|
+
contentDidMount: M.func.isRequired,
|
|
840
|
+
contentDidUpdate: M.func.isRequired
|
|
841
841
|
});
|
|
842
|
-
class xe extends
|
|
842
|
+
class xe extends Ue {
|
|
843
843
|
constructor(n, i) {
|
|
844
844
|
super(n, i);
|
|
845
|
-
|
|
845
|
+
J(this, "setRef", (n) => {
|
|
846
846
|
this.nodeRef.current = n;
|
|
847
847
|
const { forwardedRef: i } = this.props;
|
|
848
848
|
typeof i == "function" ? i(n) : i && (i.current = n);
|
|
849
849
|
});
|
|
850
|
-
|
|
850
|
+
J(this, "handleLoad", () => {
|
|
851
851
|
clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
|
|
852
852
|
});
|
|
853
853
|
// In certain situations on a cold cache DOMContentLoaded never gets called
|
|
854
854
|
// fallback to an interval to check if that's the case
|
|
855
|
-
|
|
855
|
+
J(this, "loadCheck", () => setInterval(() => {
|
|
856
856
|
this.handleLoad();
|
|
857
857
|
}, 500));
|
|
858
|
-
this._isMounted = !1, this.nodeRef =
|
|
858
|
+
this._isMounted = !1, this.nodeRef = X.createRef(), this.state = { iframeLoaded: !1 };
|
|
859
859
|
}
|
|
860
860
|
componentDidMount() {
|
|
861
861
|
this._isMounted = !0, this.getDoc() && this.nodeRef.current.contentWindow.addEventListener("DOMContentLoaded", this.handleLoad);
|
|
@@ -876,8 +876,8 @@ class xe extends qe {
|
|
|
876
876
|
const n = this.getDoc();
|
|
877
877
|
if (!n)
|
|
878
878
|
return null;
|
|
879
|
-
const i = this.props.contentDidMount,
|
|
880
|
-
return [
|
|
879
|
+
const i = this.props.contentDidMount, l = this.props.contentDidUpdate, o = n.defaultView || n.parentView, d = /* @__PURE__ */ r.jsx(lt, { contentDidMount: i, contentDidUpdate: l, children: /* @__PURE__ */ r.jsx(sr, { value: { document: n, window: o }, children: /* @__PURE__ */ r.jsx("div", { className: "frame-content", children: this.props.children }) }) }), s = this.getMountTarget();
|
|
880
|
+
return [Pe.createPortal(this.props.head, this.getDoc().head), Pe.createPortal(d, s)];
|
|
881
881
|
}
|
|
882
882
|
render() {
|
|
883
883
|
const n = {
|
|
@@ -893,16 +893,16 @@ class xe extends qe {
|
|
|
893
893
|
// also inject into the body and can mess up React. For this reason
|
|
894
894
|
// initialContent is expected to have a div inside of the body
|
|
895
895
|
// element that we render react into.
|
|
896
|
-
|
|
897
|
-
style:
|
|
896
|
+
J(xe, "propTypes", {
|
|
897
|
+
style: M.object,
|
|
898
898
|
// eslint-disable-line
|
|
899
|
-
head:
|
|
900
|
-
initialContent:
|
|
901
|
-
mountTarget:
|
|
902
|
-
contentDidMount:
|
|
903
|
-
contentDidUpdate:
|
|
904
|
-
children:
|
|
905
|
-
}),
|
|
899
|
+
head: M.node,
|
|
900
|
+
initialContent: M.string,
|
|
901
|
+
mountTarget: M.string,
|
|
902
|
+
contentDidMount: M.func,
|
|
903
|
+
contentDidUpdate: M.func,
|
|
904
|
+
children: M.oneOfType([M.element, M.arrayOf(M.element)])
|
|
905
|
+
}), J(xe, "defaultProps", {
|
|
906
906
|
style: {},
|
|
907
907
|
head: null,
|
|
908
908
|
children: void 0,
|
|
@@ -913,24 +913,24 @@ Y(xe, "propTypes", {
|
|
|
913
913
|
},
|
|
914
914
|
initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
|
|
915
915
|
});
|
|
916
|
-
const or =
|
|
917
|
-
let
|
|
916
|
+
const or = X.forwardRef((e, t) => /* @__PURE__ */ r.jsx(xe, { ...e, forwardedRef: t }));
|
|
917
|
+
let Y = null, ne = [], te = null, ct = null;
|
|
918
918
|
function ir(e) {
|
|
919
|
-
const t = window.getComputedStyle(e), n = parseInt(t.paddingLeft, 10), i = parseInt(t.paddingTop, 10),
|
|
920
|
-
return { paddingLeft: n, paddingTop: i, paddingRight:
|
|
919
|
+
const t = window.getComputedStyle(e), n = parseInt(t.paddingLeft, 10), i = parseInt(t.paddingTop, 10), l = parseInt(t.paddingRight, 10), o = parseInt(t.paddingBottom, 10);
|
|
920
|
+
return { paddingLeft: n, paddingTop: i, paddingRight: l, paddingBottom: o };
|
|
921
921
|
}
|
|
922
|
-
const
|
|
923
|
-
if (!
|
|
922
|
+
const qe = (e, t, n) => {
|
|
923
|
+
if (!Y)
|
|
924
924
|
return;
|
|
925
|
-
const i = e.getBoundingClientRect(),
|
|
926
|
-
|
|
925
|
+
const i = e.getBoundingClientRect(), l = Y == null ? void 0 : Y.getElementById("placeholder"), { paddingLeft: o, paddingTop: d, paddingRight: s, paddingBottom: u } = ir(e);
|
|
926
|
+
l.style.width = t === "vertical" ? i.width - o - s + "px" : "2px", l.style.height = t === "vertical" ? "2px" : i.height - d - u + "px", l.style.display = "block";
|
|
927
927
|
const c = ne.reduce(
|
|
928
928
|
(f, h) => Math.abs(h - n) < Math.abs(f - n) ? h : f
|
|
929
929
|
);
|
|
930
|
-
ct = ne.indexOf(c), t === "vertical" ? (
|
|
930
|
+
ct = ne.indexOf(c), t === "vertical" ? (l.style.top = e.offsetTop + c + "px", l.style.left = e.offsetLeft + o + "px") : (l.style.top = e.offsetTop + d + "px", l.style.left = e.offsetLeft + c + "px");
|
|
931
931
|
}, ar = (e) => {
|
|
932
|
-
const t = dt(e), n = window.getComputedStyle(e), i = t === "horizontal",
|
|
933
|
-
let d = i ?
|
|
932
|
+
const t = dt(e), n = window.getComputedStyle(e), i = t === "horizontal", l = parseInt(n.paddingLeft), o = parseInt(n.paddingTop);
|
|
933
|
+
let d = i ? l : o;
|
|
934
934
|
ne = [d], Array.from(e.children).forEach((s) => {
|
|
935
935
|
const u = window.getComputedStyle(s), c = parseInt(
|
|
936
936
|
i ? u.marginLeft + u.marginRight : u.marginTop + u.marginBottom
|
|
@@ -943,37 +943,37 @@ function dt(e) {
|
|
|
943
943
|
if (t === "flex")
|
|
944
944
|
return n === "column" || n === "column-reverse" ? "vertical" : "horizontal";
|
|
945
945
|
if (t === "grid") {
|
|
946
|
-
const i = window.getComputedStyle(e).gridTemplateRows,
|
|
946
|
+
const i = window.getComputedStyle(e).gridTemplateRows, l = window.getComputedStyle(e).gridTemplateColumns;
|
|
947
947
|
if (i.includes("auto"))
|
|
948
948
|
return "vertical";
|
|
949
|
-
if (
|
|
949
|
+
if (l.includes("auto"))
|
|
950
950
|
return "horizontal";
|
|
951
951
|
}
|
|
952
952
|
return t === "block" ? "vertical" : "horizontal";
|
|
953
953
|
}
|
|
954
|
-
const lr =
|
|
954
|
+
const lr = Ye((e) => {
|
|
955
955
|
const t = e.target, n = dt(t);
|
|
956
956
|
if (n === "vertical") {
|
|
957
957
|
const i = e.clientY - t.offsetTop;
|
|
958
|
-
|
|
958
|
+
qe(t, n, i);
|
|
959
959
|
} else {
|
|
960
960
|
const i = e.clientX - t.offsetLeft;
|
|
961
|
-
|
|
961
|
+
qe(t, n, i);
|
|
962
962
|
}
|
|
963
963
|
}, 200), cr = (e) => {
|
|
964
964
|
e.preventDefault(), e.stopPropagation(), lr(e);
|
|
965
965
|
};
|
|
966
966
|
function ve() {
|
|
967
|
-
const e =
|
|
967
|
+
const e = Y == null ? void 0 : Y.getElementById("placeholder");
|
|
968
968
|
e.style.display = "none";
|
|
969
969
|
}
|
|
970
970
|
const dr = () => {
|
|
971
|
-
const { document: e } = de(), [t, n] =
|
|
972
|
-
return
|
|
971
|
+
const { document: e } = de(), [t, n] = $(un), i = Rn(), l = rt("dnd"), [, o] = G(), [, d] = W();
|
|
972
|
+
return Y = e, {
|
|
973
973
|
isDragging: t,
|
|
974
974
|
"data-dnd": "branch",
|
|
975
|
-
onDragOver:
|
|
976
|
-
onDrop:
|
|
975
|
+
onDragOver: l ? cr : ee,
|
|
976
|
+
onDrop: l ? (s) => {
|
|
977
977
|
te == null || te.classList.remove("outline", "outline-green-300", "outline-2", "-outline-offset-2");
|
|
978
978
|
const u = JSON.parse(s.dataTransfer.getData("text/plain"));
|
|
979
979
|
let c = s.target.getAttribute("data-block-id");
|
|
@@ -981,22 +981,22 @@ const dr = () => {
|
|
|
981
981
|
ve();
|
|
982
982
|
}, 300);
|
|
983
983
|
} : ee,
|
|
984
|
-
onDragEnter:
|
|
984
|
+
onDragEnter: l ? (s) => {
|
|
985
985
|
const u = s;
|
|
986
986
|
te = u.target, u.stopPropagation(), u.preventDefault(), ne = [];
|
|
987
987
|
const c = u.target;
|
|
988
988
|
ar(c), c.classList.add("outline", "outline-green-300", "outline-2", "-outline-offset-2"), n(!0), o(""), d([]);
|
|
989
989
|
} : ee,
|
|
990
|
-
onDragLeave:
|
|
990
|
+
onDragLeave: l ? (s) => {
|
|
991
991
|
const u = s;
|
|
992
992
|
te = null, u.stopPropagation(), u.preventDefault(), u.target.classList.remove("outline", "outline-green-300", "outline-2", "-outline-offset-2");
|
|
993
993
|
} : ee,
|
|
994
|
-
onMouseOut:
|
|
994
|
+
onMouseOut: l ? () => {
|
|
995
995
|
n(!1), ve();
|
|
996
996
|
} : ee
|
|
997
997
|
};
|
|
998
998
|
};
|
|
999
|
-
function
|
|
999
|
+
function Ie(e) {
|
|
1000
1000
|
return e.getAttribute("data-block-id") ? e : e.closest("[data-block-id]");
|
|
1001
1001
|
}
|
|
1002
1002
|
function ur(e) {
|
|
@@ -1005,12 +1005,12 @@ function ur(e) {
|
|
|
1005
1005
|
t && t.parentNode.removeChild(t), e = null;
|
|
1006
1006
|
}
|
|
1007
1007
|
const pr = () => {
|
|
1008
|
-
const e = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], t = pn(), [, n] =
|
|
1008
|
+
const e = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], t = pn(), [, n] = W(), [, i] = G(), [l, o] = $(re);
|
|
1009
1009
|
return (d) => {
|
|
1010
|
-
var
|
|
1011
|
-
if (
|
|
1010
|
+
var w;
|
|
1011
|
+
if (l)
|
|
1012
1012
|
return;
|
|
1013
|
-
const s =
|
|
1013
|
+
const s = Ie(d.target), u = s.getAttribute("data-block-type");
|
|
1014
1014
|
if (!u || !e.includes(u))
|
|
1015
1015
|
return;
|
|
1016
1016
|
const c = s.cloneNode(!0);
|
|
@@ -1022,45 +1022,45 @@ const pr = () => {
|
|
|
1022
1022
|
const S = f.getText(0, f.getLength());
|
|
1023
1023
|
t([s.getAttribute("data-block-id")], { content: S }), s.removeAttribute("style"), c.removeEventListener("blur", h, !0), ur(f), o(""), i("");
|
|
1024
1024
|
}
|
|
1025
|
-
c.addEventListener("blur", h, !0), f.focus(), (
|
|
1025
|
+
c.addEventListener("blur", h, !0), f.focus(), (w = c.querySelector(".ql-clipboard")) == null || w.remove(), n([]), o(s.getAttribute("data-block-id"));
|
|
1026
1026
|
};
|
|
1027
1027
|
}, fr = () => {
|
|
1028
|
-
const [, e] =
|
|
1028
|
+
const [, e] = V(), [, t] = W(), [n] = $(re);
|
|
1029
1029
|
return (i) => {
|
|
1030
1030
|
if (n)
|
|
1031
1031
|
return;
|
|
1032
1032
|
i.stopPropagation();
|
|
1033
|
-
const
|
|
1034
|
-
if (
|
|
1035
|
-
const o =
|
|
1033
|
+
const l = Ie(i.target);
|
|
1034
|
+
if (l != null && l.getAttribute("data-block-parent")) {
|
|
1035
|
+
const o = l.getAttribute("data-style-prop"), d = l.getAttribute("data-style-id"), s = l.getAttribute("data-block-parent");
|
|
1036
1036
|
e([{ id: d, prop: o, blockId: s }]), t([s]);
|
|
1037
1037
|
} else
|
|
1038
|
-
|
|
1038
|
+
l != null && l.getAttribute("data-block-id") && t([l.getAttribute("data-block-id")]);
|
|
1039
1039
|
};
|
|
1040
|
-
}, hr =
|
|
1041
|
-
const n =
|
|
1040
|
+
}, hr = Ye((e, t) => {
|
|
1041
|
+
const n = Ie(e.target);
|
|
1042
1042
|
n != null && n.getAttribute("data-style-id") && t(n.getAttribute("data-style-id"));
|
|
1043
1043
|
}, 100), gr = () => {
|
|
1044
|
-
const [, e] = G(), [t] =
|
|
1044
|
+
const [, e] = G(), [t] = $(re);
|
|
1045
1045
|
return (n) => {
|
|
1046
1046
|
t || hr(n, e);
|
|
1047
1047
|
};
|
|
1048
1048
|
}, mr = ({ children: e }) => {
|
|
1049
|
-
const { document: t } = de(), [n] =
|
|
1050
|
-
|
|
1049
|
+
const { document: t } = de(), [n] = W(), [i, l] = V();
|
|
1050
|
+
_(() => {
|
|
1051
1051
|
setTimeout(() => {
|
|
1052
|
-
if (!
|
|
1052
|
+
if (!K(i))
|
|
1053
1053
|
return;
|
|
1054
1054
|
const c = ut(t, ae(n));
|
|
1055
1055
|
if (c) {
|
|
1056
1056
|
const f = c.getAttribute("data-style-prop");
|
|
1057
1057
|
if (f) {
|
|
1058
|
-
const h = c.getAttribute("data-style-id"),
|
|
1059
|
-
|
|
1058
|
+
const h = c.getAttribute("data-style-id"), w = c.getAttribute("data-block-parent");
|
|
1059
|
+
l([{ id: h, prop: f, blockId: w }]);
|
|
1060
1060
|
}
|
|
1061
1061
|
}
|
|
1062
1062
|
}, 100);
|
|
1063
|
-
}, [t, n,
|
|
1063
|
+
}, [t, n, l, i]);
|
|
1064
1064
|
const o = pr(), d = fr(), s = gr(), u = dr();
|
|
1065
1065
|
return /* @__PURE__ */ r.jsx(
|
|
1066
1066
|
"div",
|
|
@@ -1075,51 +1075,59 @@ const pr = () => {
|
|
|
1075
1075
|
}
|
|
1076
1076
|
);
|
|
1077
1077
|
}, ut = (e, t) => e.querySelector(`[data-block-id="${t}"]`), yr = () => {
|
|
1078
|
-
const { window: e } = de(), [t, n] =
|
|
1079
|
-
|
|
1078
|
+
const { window: e } = de(), [t, n] = W(), i = Te(), [, l] = V(), { undo: o, redo: d } = je(), s = Ve(), [, u] = fn(), [, c] = hn(), { pasteBlocks: f } = gn(), [, h] = Ze(), w = Ge(), { savePage: S } = mn(), [P] = $(re), [, x] = $(yn), E = (A) => {
|
|
1079
|
+
A.key === "Enter" && (A.preventDefault(), t.length === 1 && x(ae(t)));
|
|
1080
|
+
}, D = (A) => {
|
|
1081
|
+
const k = i.find((N) => N._id === A);
|
|
1082
|
+
return k ? k._parent : null;
|
|
1080
1083
|
};
|
|
1081
|
-
return
|
|
1082
|
-
const
|
|
1083
|
-
if (
|
|
1084
|
-
n([]),
|
|
1084
|
+
return _(() => {
|
|
1085
|
+
const A = (k) => {
|
|
1086
|
+
if (k.key === "Escape") {
|
|
1087
|
+
n([]), l([]);
|
|
1085
1088
|
return;
|
|
1086
1089
|
}
|
|
1087
|
-
if (
|
|
1088
|
-
if (
|
|
1089
|
-
|
|
1090
|
+
if (E(k), !P && (k.key === "Delete" || k.key === "Backspace") && (k.preventDefault(), w(t)), k.ctrlKey || k.metaKey) {
|
|
1091
|
+
if (k.key === "ArrowUp") {
|
|
1092
|
+
k.preventDefault();
|
|
1093
|
+
const N = t.length > 0 ? D(t[0]) : null;
|
|
1094
|
+
N && n([N]);
|
|
1095
|
+
}
|
|
1096
|
+
if (["z", "y", "d", "x", "c", "p", "s", "v"].includes(k.key)) {
|
|
1097
|
+
if (P && ["x", "z", "v"].includes(k.key))
|
|
1090
1098
|
return !0;
|
|
1091
|
-
|
|
1099
|
+
k.preventDefault();
|
|
1092
1100
|
}
|
|
1093
|
-
|
|
1101
|
+
k.key === "s" && (k.stopPropagation(), k.preventDefault(), S()), k.key === "z" && o(), k.key === "y" && d(), k.key === "d" && s(t), k.key === "x" && u(t), k.key === "c" && c(t), k.key === "v" && t.length > 0 && f(t[0]);
|
|
1094
1102
|
}
|
|
1095
1103
|
};
|
|
1096
|
-
return e.removeEventListener("keydown",
|
|
1097
|
-
e.removeEventListener("keydown",
|
|
1104
|
+
return e.removeEventListener("keydown", A), e.addEventListener("keydown", A), () => {
|
|
1105
|
+
e.removeEventListener("keydown", A);
|
|
1098
1106
|
};
|
|
1099
1107
|
}, [
|
|
1100
1108
|
t,
|
|
1101
1109
|
n,
|
|
1102
|
-
a,
|
|
1103
|
-
h,
|
|
1104
|
-
f,
|
|
1105
1110
|
o,
|
|
1111
|
+
w,
|
|
1112
|
+
h,
|
|
1106
1113
|
d,
|
|
1107
1114
|
s,
|
|
1108
1115
|
u,
|
|
1109
1116
|
c,
|
|
1117
|
+
f,
|
|
1118
|
+
P,
|
|
1110
1119
|
S,
|
|
1111
|
-
k,
|
|
1112
1120
|
e
|
|
1113
1121
|
]), null;
|
|
1114
1122
|
}, vr = ({ block: e, label: t }) => {
|
|
1115
|
-
const [, n] =
|
|
1123
|
+
const [, n] = W(), [, i] = G(), [, l] = $(Qe), o = rt("dnd");
|
|
1116
1124
|
return /* @__PURE__ */ r.jsxs(
|
|
1117
1125
|
"div",
|
|
1118
1126
|
{
|
|
1119
1127
|
className: "mr-10 flex cursor-grab items-center space-x-1 px-1",
|
|
1120
1128
|
draggable: o ? "true" : "false",
|
|
1121
1129
|
onDragStart: (d) => {
|
|
1122
|
-
d.dataTransfer.setData("text/plain", JSON.stringify(It(e, ["_id", "_type"]))),
|
|
1130
|
+
d.dataTransfer.setData("text/plain", JSON.stringify(It(e, ["_id", "_type"]))), l(e._id), setTimeout(() => {
|
|
1123
1131
|
n([]), i(null);
|
|
1124
1132
|
}, 200);
|
|
1125
1133
|
},
|
|
@@ -1130,7 +1138,7 @@ const pr = () => {
|
|
|
1130
1138
|
}
|
|
1131
1139
|
);
|
|
1132
1140
|
}, xr = ({ selectedBlockElement: e, block: t }) => {
|
|
1133
|
-
const n =
|
|
1141
|
+
const n = Ge(), i = Ve(), [, l] = W(), [, o] = V(), { floatingStyles: d, refs: s, update: u } = _n({
|
|
1134
1142
|
placement: "top-start",
|
|
1135
1143
|
middleware: [Ln(), Mn()],
|
|
1136
1144
|
elements: {
|
|
@@ -1138,7 +1146,7 @@ const pr = () => {
|
|
|
1138
1146
|
}
|
|
1139
1147
|
});
|
|
1140
1148
|
Nn(e, () => u(), e !== null);
|
|
1141
|
-
const c =
|
|
1149
|
+
const c = O(t, "_parent", null), f = K(O(t, "_name", "")) ? O(t, "_type", "") : O(t, "_name", "");
|
|
1142
1150
|
return !e || !t ? null : /* @__PURE__ */ r.jsxs(
|
|
1143
1151
|
"div",
|
|
1144
1152
|
{
|
|
@@ -1159,80 +1167,80 @@ const pr = () => {
|
|
|
1159
1167
|
{
|
|
1160
1168
|
className: "hover:scale-105 ",
|
|
1161
1169
|
onClick: () => {
|
|
1162
|
-
o([]),
|
|
1170
|
+
o([]), l([c]);
|
|
1163
1171
|
}
|
|
1164
1172
|
}
|
|
1165
1173
|
),
|
|
1166
|
-
vn(
|
|
1167
|
-
xn(
|
|
1174
|
+
vn(O(t, "_type", "")) ? /* @__PURE__ */ r.jsx($t, { className: "hover:scale-105 ", onClick: () => i([t == null ? void 0 : t._id]) }) : null,
|
|
1175
|
+
xn(O(t, "_type", "")) ? /* @__PURE__ */ r.jsx(Ft, { className: "hover:scale-105 ", onClick: () => n([t == null ? void 0 : t._id]) }) : null
|
|
1168
1176
|
] })
|
|
1169
1177
|
]
|
|
1170
1178
|
}
|
|
1171
1179
|
);
|
|
1172
1180
|
}, br = ({ model: e }) => {
|
|
1173
|
-
const [t] = bn(), [n] =
|
|
1181
|
+
const [t] = bn(), [n] = W(), [i] = Je(), [l] = G(), [o] = V(), [d] = $(Qe), { document: s, window: u } = de(), [c] = U(s == null ? void 0 : s.getElementById("highlighted-block")), [f] = U(
|
|
1174
1182
|
s == null ? void 0 : s.getElementById("selected-block")
|
|
1175
|
-
), [h] =
|
|
1183
|
+
), [h] = U(
|
|
1176
1184
|
s == null ? void 0 : s.getElementById("selected-styling-block")
|
|
1177
|
-
), [
|
|
1178
|
-
|
|
1185
|
+
), [w] = U(s == null ? void 0 : s.getElementById("dragged-block"));
|
|
1186
|
+
_(() => {
|
|
1179
1187
|
i ? s == null || s.documentElement.classList.add("dark") : s == null || s.documentElement.classList.remove("dark");
|
|
1180
1188
|
}, [i, s]);
|
|
1181
|
-
const S =
|
|
1182
|
-
return
|
|
1183
|
-
const
|
|
1184
|
-
colors: [
|
|
1189
|
+
const S = O(t, "headingFont", "DM Sans"), P = O(t, "bodyFont", "DM Sans");
|
|
1190
|
+
return _(() => {
|
|
1191
|
+
const x = O(t, "primaryColor", "#000"), E = O(t, "secondaryColor", "#FFF"), D = $n({
|
|
1192
|
+
colors: [x, E],
|
|
1185
1193
|
names: ["primary", "secondary"]
|
|
1186
1194
|
});
|
|
1187
|
-
|
|
1188
|
-
const
|
|
1195
|
+
D.primary.DEFAULT = x, D.secondary.DEFAULT = E;
|
|
1196
|
+
const A = O(t, "roundedCorners", "0");
|
|
1189
1197
|
!u || !u.tailwind || (u.tailwind.config = {
|
|
1190
1198
|
darkMode: "class",
|
|
1191
1199
|
theme: {
|
|
1192
1200
|
fontFamily: {
|
|
1193
1201
|
heading: [S],
|
|
1194
|
-
body: [
|
|
1202
|
+
body: [P]
|
|
1195
1203
|
},
|
|
1196
1204
|
extend: {
|
|
1197
1205
|
borderRadius: {
|
|
1198
|
-
global: `${
|
|
1206
|
+
global: `${A || "0"}px`
|
|
1199
1207
|
},
|
|
1200
|
-
colors:
|
|
1208
|
+
colors: D
|
|
1201
1209
|
}
|
|
1202
1210
|
},
|
|
1203
1211
|
plugins: [
|
|
1204
1212
|
// @ts-ignore
|
|
1205
|
-
u.tailwind.plugin.withOptions(({ prefix:
|
|
1206
|
-
for (const
|
|
1207
|
-
|
|
1208
|
-
`&[data-headlessui-state~="${
|
|
1209
|
-
`:where([data-headlessui-state~="${
|
|
1210
|
-
]),
|
|
1211
|
-
`&[data-headlessui-state]:not([data-headlessui-state~="${
|
|
1212
|
-
`:where([data-headlessui-state]:not([data-headlessui-state~="${
|
|
1213
|
+
u.tailwind.plugin.withOptions(({ prefix: k = "ui" } = {}) => ({ addVariant: N }) => {
|
|
1214
|
+
for (const F of ["open", "checked", "selected", "active", "disabled"])
|
|
1215
|
+
N(`${k}-${F}`, [
|
|
1216
|
+
`&[data-headlessui-state~="${F}"]`,
|
|
1217
|
+
`:where([data-headlessui-state~="${F}"]) &`
|
|
1218
|
+
]), N(`${k}-not-${F}`, [
|
|
1219
|
+
`&[data-headlessui-state]:not([data-headlessui-state~="${F}"])`,
|
|
1220
|
+
`:where([data-headlessui-state]:not([data-headlessui-state~="${F}"])) &:not([data-headlessui-state])`
|
|
1213
1221
|
]);
|
|
1214
1222
|
})
|
|
1215
1223
|
]
|
|
1216
1224
|
});
|
|
1217
|
-
}, [t, u, S,
|
|
1218
|
-
f && (f.textContent = `${ie(n, (
|
|
1225
|
+
}, [t, u, S, P]), _(() => {
|
|
1226
|
+
f && (f.textContent = `${ie(n, (x) => `[data-block-id="${x}"]`).join(",")}{
|
|
1219
1227
|
outline: 1px solid ${n.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
|
|
1220
1228
|
}`);
|
|
1221
|
-
}, [n, f]),
|
|
1229
|
+
}, [n, f]), _(() => {
|
|
1222
1230
|
if (!d) {
|
|
1223
|
-
|
|
1231
|
+
w.textContent = "";
|
|
1224
1232
|
return;
|
|
1225
1233
|
}
|
|
1226
|
-
|
|
1227
|
-
}, [d]),
|
|
1228
|
-
c && (c.textContent =
|
|
1229
|
-
}, [
|
|
1230
|
-
h && (h.textContent = `${ie(o, ({ id:
|
|
1234
|
+
w.textContent = `[data-block-id="${d}"]{ pointer-events: none !important; opacity: 0.2 !important}`;
|
|
1235
|
+
}, [d]), _(() => {
|
|
1236
|
+
c && (c.textContent = l ? `[data-style-id="${l}"]{ outline: 1px solid #42a1fc !important; outline-offset: -1px;}` : "");
|
|
1237
|
+
}, [l, n, c]), _(() => {
|
|
1238
|
+
h && (h.textContent = `${ie(o, ({ id: x }) => `[data-style-id="${x}"]`).join(",")}{
|
|
1231
1239
|
outline: 1px solid #42a1fc !important; outline-offset: -1px;
|
|
1232
1240
|
}`);
|
|
1233
|
-
}, [o, h]),
|
|
1234
|
-
const
|
|
1235
|
-
s.body.className = `font-body antialiased text-[${
|
|
1241
|
+
}, [o, h]), _(() => {
|
|
1242
|
+
const x = O(t, "bodyTextLightColor", "#64748b"), E = O(t, "bodyTextDarkColor", "#94a3b8"), D = O(t, "bodyBgLightColor", "#FFFFFF"), A = O(t, "bodyBgDarkColor", "#0f172a");
|
|
1243
|
+
s.body.className = `font-body antialiased text-[${x}] bg-[${D}] dark:text-[${E}] dark:bg-[${A}]`;
|
|
1236
1244
|
}, [t, s, e]), e === "page" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1237
1245
|
S && /* @__PURE__ */ r.jsx(
|
|
1238
1246
|
"link",
|
|
@@ -1247,13 +1255,13 @@ const pr = () => {
|
|
|
1247
1255
|
media: "all"
|
|
1248
1256
|
}
|
|
1249
1257
|
),
|
|
1250
|
-
|
|
1258
|
+
P && S !== P && /* @__PURE__ */ r.jsx(
|
|
1251
1259
|
"link",
|
|
1252
1260
|
{
|
|
1253
1261
|
id: "body-font",
|
|
1254
1262
|
rel: "stylesheet",
|
|
1255
1263
|
type: "text/css",
|
|
1256
|
-
href: `https://fonts.googleapis.com/css2?family=${
|
|
1264
|
+
href: `https://fonts.googleapis.com/css2?family=${P.replace(
|
|
1257
1265
|
/ /g,
|
|
1258
1266
|
"+"
|
|
1259
1267
|
)}:wght@300;400;500;600;700;800;900&display=swap`,
|
|
@@ -1265,14 +1273,14 @@ const pr = () => {
|
|
|
1265
1273
|
}, wr = (e) => {
|
|
1266
1274
|
const t = {};
|
|
1267
1275
|
return Object.keys(e).forEach((n) => {
|
|
1268
|
-
ke(e[n]) && e[n].startsWith(
|
|
1276
|
+
ke(e[n]) && e[n].startsWith(Re) && (t[n] = e[n].replace(Re, "").split(","));
|
|
1269
1277
|
}), t;
|
|
1270
1278
|
}, kr = Et((e) => {
|
|
1271
1279
|
const t = e.replace(tt, "").split(",");
|
|
1272
1280
|
return Wn(t[0], t[1]);
|
|
1273
1281
|
});
|
|
1274
1282
|
function jr(e, t) {
|
|
1275
|
-
return
|
|
1283
|
+
return O(e, `${t}_attrs`, {});
|
|
1276
1284
|
}
|
|
1277
1285
|
function Cr(e) {
|
|
1278
1286
|
const t = {};
|
|
@@ -1290,27 +1298,27 @@ function Cr(e) {
|
|
|
1290
1298
|
}), t;
|
|
1291
1299
|
}
|
|
1292
1300
|
function Tr(e, t) {
|
|
1293
|
-
const n =
|
|
1294
|
-
return
|
|
1295
|
-
ke(i) &&
|
|
1301
|
+
const n = O(e, "_bindings", {});
|
|
1302
|
+
return K(n) ? { ...e } : (Dt(n, (i, l) => {
|
|
1303
|
+
ke(i) && O(t, i, null) && (e[l] = O(t, i, null));
|
|
1296
1304
|
}), e);
|
|
1297
1305
|
}
|
|
1298
1306
|
function be({ blocks: e }) {
|
|
1299
|
-
const t =
|
|
1300
|
-
return /* @__PURE__ */ r.jsx(r.Fragment, { children:
|
|
1307
|
+
const t = Te(), n = we((o) => Cr(o), []), [i] = Bn(), [l] = wn(re);
|
|
1308
|
+
return /* @__PURE__ */ r.jsx(r.Fragment, { children: X.Children.toArray(
|
|
1301
1309
|
e.map((o, d) => {
|
|
1302
|
-
if (
|
|
1310
|
+
if (l === o._id)
|
|
1303
1311
|
return null;
|
|
1304
1312
|
const s = wr(o), u = {};
|
|
1305
|
-
|
|
1306
|
-
u[
|
|
1307
|
-
s[
|
|
1313
|
+
K(s) || Object.keys(s).forEach((w) => {
|
|
1314
|
+
u[w] = X.Children.toArray(
|
|
1315
|
+
s[w].map((S) => /* @__PURE__ */ r.jsx(be, { blocks: [Bt(t, { _id: S })] }))
|
|
1308
1316
|
);
|
|
1309
1317
|
});
|
|
1310
|
-
const c =
|
|
1318
|
+
const c = Ke(t, { _parent: o._id });
|
|
1311
1319
|
u.children = c.length ? /* @__PURE__ */ r.jsx(be, { blocks: c }) : null;
|
|
1312
|
-
const f = Hn(o._type), h =
|
|
1313
|
-
return Ot(h) ? /* @__PURE__ */ r.jsx("noscript", { children: `<!-- ${o == null ? void 0 : o._type} not registered -->` }) : /* @__PURE__ */ r.jsx(
|
|
1320
|
+
const f = Hn(o._type), h = O(f, "component", null);
|
|
1321
|
+
return Ot(h) ? /* @__PURE__ */ r.jsx("noscript", { children: `<!-- ${o == null ? void 0 : o._type} not registered -->` }) : /* @__PURE__ */ r.jsx(ze, { children: X.createElement(h, {
|
|
1314
1322
|
blockProps: {
|
|
1315
1323
|
"data-block-id": o._id,
|
|
1316
1324
|
"data-block-type": o._type,
|
|
@@ -1326,50 +1334,50 @@ function be({ blocks: e }) {
|
|
|
1326
1334
|
) });
|
|
1327
1335
|
}
|
|
1328
1336
|
const Sr = () => {
|
|
1329
|
-
const e =
|
|
1330
|
-
return /* @__PURE__ */ r.jsx(Fn, { children:
|
|
1337
|
+
const e = Te();
|
|
1338
|
+
return /* @__PURE__ */ r.jsx(Fn, { children: K(e) ? null : /* @__PURE__ */ r.jsx(On, { children: /* @__PURE__ */ r.jsx(be, { blocks: Ke(e, (t) => K(t._parent)) }) }) });
|
|
1331
1339
|
}, Ir = (e, t) => e.querySelector(`[data-style-id="${t}"]`), Er = () => {
|
|
1332
|
-
const [e] =
|
|
1333
|
-
|
|
1334
|
-
const { clientWidth:
|
|
1335
|
-
c({ width:
|
|
1340
|
+
const [e] = $(jn), [t] = Ze(), [n] = Ce(), [, i] = W(), l = Cn(), [, o] = G(), d = De(null), s = De(null), [u, c] = U({ width: 0, height: 0 }), f = Vn(u), [h, w] = U(0), [S, P] = U([]), [, x] = U([]), [, E] = $(Tn), [D, A] = V(), k = Sn("loadingCanvas", !1);
|
|
1341
|
+
_(() => {
|
|
1342
|
+
const { clientWidth: B, clientHeight: H } = s.current;
|
|
1343
|
+
c({ width: B, height: H }), h === 0 && w(B);
|
|
1336
1344
|
}, [s, n, h]);
|
|
1337
|
-
const
|
|
1338
|
-
const { top:
|
|
1339
|
-
return
|
|
1345
|
+
const N = (B, H = 0) => {
|
|
1346
|
+
const { top: q } = B.getBoundingClientRect();
|
|
1347
|
+
return q + H >= 0 && q - H <= window.innerHeight;
|
|
1340
1348
|
};
|
|
1341
|
-
|
|
1342
|
-
var
|
|
1343
|
-
if (
|
|
1344
|
-
const
|
|
1345
|
-
|
|
1349
|
+
_(() => {
|
|
1350
|
+
var B, H;
|
|
1351
|
+
if (l && l.type !== "Multiple" && d.current) {
|
|
1352
|
+
const q = ut(d.current.contentDocument, l._id);
|
|
1353
|
+
q && (N(q) || (H = (B = d.current) == null ? void 0 : B.contentWindow) == null || H.scrollTo({ top: q.offsetTop, behavior: "smooth" }), P([q]));
|
|
1346
1354
|
}
|
|
1347
|
-
}, [
|
|
1348
|
-
if (!
|
|
1349
|
-
const
|
|
1355
|
+
}, [l]), _(() => {
|
|
1356
|
+
if (!K(D) && d.current) {
|
|
1357
|
+
const B = Ir(
|
|
1350
1358
|
d.current.contentDocument,
|
|
1351
|
-
ae(
|
|
1359
|
+
ae(D).id
|
|
1352
1360
|
);
|
|
1353
|
-
|
|
1361
|
+
x(B ? [B] : [null]);
|
|
1354
1362
|
} else
|
|
1355
|
-
|
|
1356
|
-
}, [
|
|
1357
|
-
const
|
|
1358
|
-
let
|
|
1359
|
-
return e === "offline" && (
|
|
1363
|
+
x([null]);
|
|
1364
|
+
}, [D]);
|
|
1365
|
+
const F = jt(() => {
|
|
1366
|
+
let B = Xn;
|
|
1367
|
+
return e === "offline" && (B = B.replace(
|
|
1360
1368
|
"https://old.chaibuilder.com/offline/tailwind.cdn.js",
|
|
1361
1369
|
"/offline/tailwind.cdn.js"
|
|
1362
|
-
),
|
|
1370
|
+
), B = B.replace("https://unpkg.com/aos@next/dist/aos.css", "/offline/aos.css"), B = B.replace("https://unpkg.com/aos@next/dist/aos.js", "/offline/aos.js")), B;
|
|
1363
1371
|
}, [e]);
|
|
1364
1372
|
return /* @__PURE__ */ r.jsx(
|
|
1365
1373
|
"div",
|
|
1366
1374
|
{
|
|
1367
1375
|
onClick: () => {
|
|
1368
|
-
i([]),
|
|
1376
|
+
i([]), A([]);
|
|
1369
1377
|
},
|
|
1370
1378
|
onMouseLeave: () => setTimeout(() => o(""), 300),
|
|
1371
1379
|
className: "relative mx-auto overflow-hidden h-full w-full",
|
|
1372
|
-
style: h > 0 && !
|
|
1380
|
+
style: h > 0 && !K(f) ? { width: t ? "100%" : h } : {},
|
|
1373
1381
|
ref: s,
|
|
1374
1382
|
children: /* @__PURE__ */ r.jsxs(
|
|
1375
1383
|
or,
|
|
@@ -1379,18 +1387,18 @@ const Sr = () => {
|
|
|
1379
1387
|
id: "canvas-iframe",
|
|
1380
1388
|
style: { width: `${n}px`, ...f },
|
|
1381
1389
|
className: "relative mx-auto box-content max-h-full h-full max-w-full shadow-lg transition-all duration-300 ease-linear",
|
|
1382
|
-
initialContent:
|
|
1390
|
+
initialContent: F,
|
|
1383
1391
|
children: [
|
|
1384
1392
|
/* @__PURE__ */ r.jsx(yr, {}),
|
|
1385
1393
|
/* @__PURE__ */ r.jsx(
|
|
1386
1394
|
xr,
|
|
1387
1395
|
{
|
|
1388
|
-
block:
|
|
1396
|
+
block: l,
|
|
1389
1397
|
selectedBlockElement: ae(S)
|
|
1390
1398
|
}
|
|
1391
1399
|
),
|
|
1392
1400
|
/* @__PURE__ */ r.jsx(br, { model: "page" }),
|
|
1393
|
-
/* @__PURE__ */ r.jsx(mr, { children:
|
|
1401
|
+
/* @__PURE__ */ r.jsx(mr, { children: k ? /* @__PURE__ */ r.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ r.jsx(et, { className: "h-full" }) }) : /* @__PURE__ */ r.jsx(Sr, {}) }),
|
|
1394
1402
|
/* @__PURE__ */ r.jsx("br", {}),
|
|
1395
1403
|
/* @__PURE__ */ r.jsx("div", { id: "placeholder", className: "absolute bg-green-500 z-[99999] max-w-full transition-transform" })
|
|
1396
1404
|
]
|
|
@@ -1398,12 +1406,12 @@ const Sr = () => {
|
|
|
1398
1406
|
)
|
|
1399
1407
|
}
|
|
1400
1408
|
);
|
|
1401
|
-
}, Dr = Ct(() => import("./AddBlocks-
|
|
1402
|
-
const [e, t] =
|
|
1409
|
+
}, Dr = Ct(() => import("./AddBlocks-VR2XGlgQ.js")), Fs = () => {
|
|
1410
|
+
const [e, t] = $(In);
|
|
1403
1411
|
return /* @__PURE__ */ r.jsxs("div", { className: "flex h-full w-full flex-col", children: [
|
|
1404
1412
|
/* @__PURE__ */ r.jsx(Jn, {}),
|
|
1405
1413
|
/* @__PURE__ */ r.jsxs("div", { className: "relative h-full overflow-hidden bg-slate-800/90 px-2 bg-[linear-gradient(to_right,#222_0.5px,transparent_0.5px),linear-gradient(to_bottom,#222_0.5px,transparent_0.5px)] bg-[size:12px_12px]", children: [
|
|
1406
|
-
/* @__PURE__ */ r.jsx(
|
|
1414
|
+
/* @__PURE__ */ r.jsx(ze, { fallback: /* @__PURE__ */ r.jsx(et, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(An, { children: /* @__PURE__ */ r.jsx(Er, {}) }) }),
|
|
1407
1415
|
e ? /* @__PURE__ */ r.jsx(
|
|
1408
1416
|
"div",
|
|
1409
1417
|
{
|