@chaibuilder/sdk 1.1.1 → 1.1.3

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.
Files changed (33) hide show
  1. package/dist/CanvasArea-E0Mu1Cwe.cjs +58 -0
  2. package/dist/{CanvasArea-JzBGfXSp.js → CanvasArea-K9fOlyJl.js} +585 -578
  3. package/dist/{CurrentPage-v7RxefU-.cjs → CurrentPage--5VHTFmg.cjs} +1 -1
  4. package/dist/{CurrentPage-2Hqp8dwp.js → CurrentPage-ZjBcAU3o.js} +1 -1
  5. package/dist/{Layers-1H-MUoKM.cjs → Layers-Qv1k4eqT.cjs} +1 -1
  6. package/dist/{Layers-K_1pMZK5.js → Layers-RfOxPx_V.js} +1 -1
  7. package/dist/{PagesPanel-Qt66yy3K.cjs → PagesPanel-pQjl_qzS.cjs} +1 -1
  8. package/dist/{PagesPanel-uMZT46fo.js → PagesPanel-yOrHqpUR.js} +2 -2
  9. package/dist/{ProjectPanel-nhhdOgSP.js → ProjectPanel-64NTjmau.js} +2 -2
  10. package/dist/{ProjectPanel-g92sgZ-g.cjs → ProjectPanel-U4uQPSn8.cjs} +1 -1
  11. package/dist/{Settings-pYbQsClt.js → Settings-2b17z_GV.js} +126 -128
  12. package/dist/Settings-4XckYyzK.cjs +1 -0
  13. package/dist/{SidePanels-CBkl8HgT.cjs → SidePanels-auE-bKNc.cjs} +1 -1
  14. package/dist/{SidePanels-9AjWdvVI.js → SidePanels-gNBjhSWG.js} +2 -2
  15. package/dist/{add-page-modal-eahhWw2b.cjs → add-page-modal-BREwIMPz.cjs} +1 -1
  16. package/dist/{add-page-modal-Ny4uAvWB.js → add-page-modal-OukBwf5E.js} +1 -1
  17. package/dist/core.cjs +1 -1
  18. package/dist/core.js +1 -1
  19. package/dist/{delete-page-modal-4qrgJQ0x.js → delete-page-modal-RZXdqvje.js} +1 -1
  20. package/dist/{delete-page-modal-07nDpZpj.cjs → delete-page-modal-UWn_sHLC.cjs} +1 -1
  21. package/dist/{index-aDqFUJ8v.js → index-CMHxUxre.js} +2 -2
  22. package/dist/{index-Ua5E0Syv.cjs → index-yo8mH0u8.cjs} +1 -1
  23. package/dist/{page-viewer-1Eb7ypob.js → page-viewer-PZRWwKP6.js} +2 -2
  24. package/dist/{page-viewer-X8h3FMwb.cjs → page-viewer-rPTxX-Lu.cjs} +1 -1
  25. package/dist/{project-general-setting-I4z0C7PE.cjs → project-general-setting-FVlRHFpF.cjs} +1 -1
  26. package/dist/{project-general-setting-TCl_JNdl.js → project-general-setting-UzPhnhWp.js} +1 -1
  27. package/dist/{single-page-detail-sdTzXA5i.cjs → single-page-detail-Ftozh79X.cjs} +1 -1
  28. package/dist/{single-page-detail-W5sW6771.js → single-page-detail-Jb-S30JL.js} +2 -2
  29. package/dist/studio.cjs +1 -1
  30. package/dist/studio.js +1 -1
  31. package/package.json +1 -1
  32. package/dist/CanvasArea-rC2E_4eS.cjs +0 -58
  33. package/dist/Settings-IcmgBZm9.cjs +0 -1
@@ -1,26 +1,26 @@
1
- var yt = Object.defineProperty;
2
- var vt = (t, e, n) => e in t ? yt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var z = (t, e, n) => (vt(t, typeof e != "symbol" ? e + "" : e, n), n);
1
+ var mt = Object.defineProperty;
2
+ var yt = (e, t, n) => t in e ? mt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var z = (e, t, n) => (yt(e, typeof t != "symbol" ? t + "" : t, n), n);
4
4
  import { j as r } from "./jsx-runtime-NV737rRe.js";
5
- import Y, { createElement as xt, useCallback as xe, useState as W, useEffect as M, Component as qe, Children as bt, Suspense as Ue, useRef as Se, useMemo as kt, lazy as wt } from "react";
6
- import { map as ne, includes as Ee, toUpper as de, round as jt, throttle as He, noop as G, isEmpty as U, first as re, omit as Ct, get as B, isString as be, memoize as Tt, each as St, find as Et, filter as ze, isNull as It } from "lodash";
7
- import { ResetIcon as Ie, MobileIcon as De, LaptopIcon as Dt, DesktopIcon as Bt, DotsVerticalIcon as Ot, EraserIcon as At, ZoomInIcon as Rt, DragHandleDots2Icon as Pt, ArrowUpIcon as Mt, CopyIcon as _t, TrashIcon as Lt } from "@radix-ui/react-icons";
8
- import { p as ke, B as se, W as Ye, aM as Nt, aN as Ft, aO as $t, aP as Wt, aQ as qt, R as we, ai as Ut, aR as Ht, aS as zt, aT as Yt, aU as Kt, aV as Vt, aW as Xt, w as Jt, j as H, aj as K, D as Zt, E as Gt, F as Qt, G as en, H as tn, I as nn, J as rn, K as sn, at as on, L as an, U as Ke, aL as te, aX as ln, ab as cn, _ as ie, aY as Q, m as Ve, n as dn, k as un, o as pn, h as Xe, l as Je, ag as fn, aZ as hn, a_ as gn, a$ as mn, x as yn, ae as Ze, a as vn, b0 as xn, b1 as bn, a6 as kn, b2 as wn, i as jn, S as Ge, aA as Cn } from "./index-ORFlyrBx.js";
9
- import { useTranslation as Tn } from "react-i18next";
5
+ import Y, { createElement as vt, useCallback as xe, useState as $, useEffect as M, Component as qe, Children as xt, Suspense as Ue, useRef as Se, useMemo as bt, lazy as wt } from "react";
6
+ import { map as ne, includes as Ee, toUpper as de, round as kt, throttle as He, noop as Z, isEmpty as U, first as re, omit as jt, get as B, isString as be, memoize as Ct, each as Tt, find as St, filter as ze, isNull as Et } from "lodash";
7
+ import { ResetIcon as Ie, MobileIcon as De, LaptopIcon as It, DesktopIcon as Dt, DotsVerticalIcon as Bt, EraserIcon as Ot, ZoomInIcon as At, DragHandleDots2Icon as Pt, ArrowUpIcon as Rt, CopyIcon as Mt, TrashIcon as Lt } from "@radix-ui/react-icons";
8
+ import { p as we, B as se, W as Ye, aM as _t, aN as Nt, aO as Ft, aP as Wt, aQ as $t, R as ke, ai as qt, aR as Ut, aS as Ht, aT as zt, aU as Yt, aV as Kt, aW as Vt, w as Xt, j as H, aj as K, D as Jt, E as Zt, F as Gt, G as Qt, H as en, I as tn, J as nn, K as rn, at as sn, L as on, U as Ke, aL as te, aX as an, ab as ln, _ as ie, aY as Q, m as Ve, n as cn, k as dn, o as un, h as Xe, l as Je, ag as pn, aZ as fn, a_ as hn, a$ as gn, x as mn, ae as Ze, a as yn, b0 as vn, b1 as xn, a6 as bn, b2 as wn, i as kn, S as Ge, aA as jn } from "./index-ORFlyrBx.js";
9
+ import { useTranslation as Cn } from "react-i18next";
10
10
  import { useAtom as F } from "jotai";
11
11
  import Be from "react-dom";
12
- import { g as Sn, S as Oe, a as Qe } from "./MODIFIERS-MLfpKQY1.js";
13
- import { r as et, u as En, B as In, E as Dn } from "./index-aDqFUJ8v.js";
14
- import { Quill as Bn } from "react-quill";
15
- import { u as On } from "./useAddBlockByDrop-UA_Iw_4l.js";
16
- import { useFeature as An } from "flagged";
17
- import { flip as Rn } from "@floating-ui/dom";
18
- import { useFloating as Pn, shift as Mn } from "@floating-ui/react-dom";
19
- import { useDrag as _n } from "react-dnd";
12
+ import { g as Tn, S as Oe, a as Qe } from "./MODIFIERS-MLfpKQY1.js";
13
+ import { r as et, u as Sn, B as En, E as In } from "./index-CMHxUxre.js";
14
+ import { Quill as Dn } from "react-quill";
15
+ import { u as Bn } from "./useAddBlockByDrop-UA_Iw_4l.js";
16
+ import { useFeature as On } from "flagged";
17
+ import { flip as An } from "@floating-ui/dom";
18
+ import { useFloating as Pn, shift as Rn } from "@floating-ui/react-dom";
19
+ import { useDrag as Mn } from "react-dnd";
20
20
  import { useResizeObserver as Ln } from "@react-hookz/web";
21
- import { tailwindcssPaletteGenerator as Nn } from "@bobthered/tailwindcss-palette-generator";
22
- import { Provider as Fn } from "react-wrap-balancer";
23
- import { twMerge as $n } from "tailwind-merge";
21
+ import { tailwindcssPaletteGenerator as _n } from "@bobthered/tailwindcss-palette-generator";
22
+ import { Provider as Nn } from "react-wrap-balancer";
23
+ import { twMerge as Fn } from "tailwind-merge";
24
24
  import { getBlockComponent as Wn } from "@chaibuilder/runtime";
25
25
  import "@radix-ui/react-toggle";
26
26
  import "class-variance-authority";
@@ -62,26 +62,26 @@ import "./tailwind-config-d1VL1lzE.js";
62
62
  import "react-hotkeys-hook";
63
63
  import "sonner";
64
64
  import "lucide-react";
65
- const qn = () => {
66
- const { undoCount: t, redoCount: e, undo: n, redo: i } = ke();
65
+ const $n = () => {
66
+ const { undoCount: e, redoCount: t, undo: n, redo: o } = we();
67
67
  return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
68
- /* @__PURE__ */ r.jsx(se, { disabled: !t, size: "sm", onClick: n, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(Ie, {}) }),
69
- /* @__PURE__ */ r.jsx(se, { disabled: !e, onClick: i, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(Ie, { className: "rotate-180 scale-y-[-1] transform" }) })
68
+ /* @__PURE__ */ r.jsx(se, { disabled: !e, size: "sm", onClick: n, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(Ie, {}) }),
69
+ /* @__PURE__ */ r.jsx(se, { disabled: !t, onClick: o, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(Ie, { className: "rotate-180 scale-y-[-1] transform" }) })
70
70
  ] });
71
71
  };
72
- function Un() {
73
- const [t, e] = Ye(), { t: n } = Tn();
72
+ function qn() {
73
+ const [e, t] = Ye(), { t: n } = Cn();
74
74
  return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
75
- /* @__PURE__ */ r.jsx(Nt, { htmlFor: "dark-mode-switch", children: n("dark_mode") }),
75
+ /* @__PURE__ */ r.jsx(_t, { htmlFor: "dark-mode-switch", children: n("dark_mode") }),
76
76
  /* @__PURE__ */ r.jsxs(
77
- Ft,
77
+ Nt,
78
78
  {
79
79
  id: "dark-mode-switch",
80
- checked: t,
80
+ checked: e,
81
81
  onCheckedChange: () => {
82
- e(!t);
82
+ t(!e);
83
83
  },
84
- className: `${t ? "bg-violet-600" : "bg-violet-300"}
84
+ className: `${e ? "bg-violet-600" : "bg-violet-300"}
85
85
  relative ml-2 inline-flex h-[20px] w-[40px] shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75`,
86
86
  children: [
87
87
  /* @__PURE__ */ r.jsx("span", { className: "sr-only", children: "Use setting" }),
@@ -89,7 +89,7 @@ function Un() {
89
89
  "span",
90
90
  {
91
91
  "aria-hidden": "true",
92
- className: `${t ? "translate-x-5" : "translate-x-0"}
92
+ className: `${e ? "translate-x-5" : "translate-x-0"}
93
93
  pointer-events-none -mt-px inline-block h-[18px] w-[20px] transform rounded-full bg-white shadow-lg ring-0 transition duration-200 ease-in-out`
94
94
  }
95
95
  )
@@ -98,10 +98,10 @@ function Un() {
98
98
  )
99
99
  ] });
100
100
  }
101
- const Ae = ({ landscape: t = !1 }) => /* @__PURE__ */ r.jsxs(
101
+ const Ae = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
102
102
  "svg",
103
103
  {
104
- className: t ? "rotate-90" : "",
104
+ className: e ? "rotate-90" : "",
105
105
  xmlns: "http://www.w3.org/2000/svg",
106
106
  viewBox: "0 0 13 13",
107
107
  xmlSpace: "preserve",
@@ -121,7 +121,7 @@ const Ae = ({ landscape: t = !1 }) => /* @__PURE__ */ r.jsxs(
121
121
  )
122
122
  ]
123
123
  }
124
- ), Re = [
124
+ ), Pe = [
125
125
  {
126
126
  title: "Mobile (XS)",
127
127
  content: "Styles set here are applied to all screen unless edited at higher breakpoint",
@@ -154,57 +154,57 @@ const Ae = ({ landscape: t = !1 }) => /* @__PURE__ */ r.jsxs(
154
154
  title: "Desktop (XL)",
155
155
  content: "Styles set here are applied at 1280px and up unless edited at higher breakpoint",
156
156
  breakpoint: "xl",
157
- icon: /* @__PURE__ */ r.jsx(Dt, {}),
157
+ icon: /* @__PURE__ */ r.jsx(It, {}),
158
158
  width: 1420
159
159
  },
160
160
  {
161
161
  title: "Large Desktop (2XL)",
162
162
  content: "Styles set here are applied at 1536px and up",
163
163
  breakpoint: "2xl",
164
- icon: /* @__PURE__ */ r.jsx(Bt, {}),
164
+ icon: /* @__PURE__ */ r.jsx(Dt, {}),
165
165
  width: 1920
166
166
  }
167
- ], Hn = ({
168
- title: t,
169
- content: e,
167
+ ], Un = ({
168
+ title: e,
169
+ content: t,
170
170
  currentBreakpoint: n,
171
- breakpoint: i,
172
- width: c,
171
+ breakpoint: o,
172
+ width: l,
173
173
  icon: s,
174
- onClick: a
175
- }) => /* @__PURE__ */ r.jsxs($t, { children: [
174
+ onClick: i
175
+ }) => /* @__PURE__ */ r.jsxs(Ft, { children: [
176
176
  /* @__PURE__ */ r.jsx(Wt, { asChild: !0, children: /* @__PURE__ */ r.jsx(
177
177
  se,
178
178
  {
179
- onClick: () => a(c),
179
+ onClick: () => i(l),
180
180
  size: "sm",
181
- variant: i === n ? "secondary" : "ghost",
181
+ variant: o === n ? "secondary" : "ghost",
182
182
  children: s
183
183
  }
184
184
  ) }),
185
- /* @__PURE__ */ r.jsx(qt, { className: "w-52 border-border", children: /* @__PURE__ */ r.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ r.jsxs("div", { className: "space-y-1", children: [
186
- /* @__PURE__ */ r.jsx("h4", { className: "text-sm font-semibold", children: t }),
187
- /* @__PURE__ */ r.jsx("p", { className: "text-xs", children: e })
185
+ /* @__PURE__ */ r.jsx($t, { className: "w-52 border-border", children: /* @__PURE__ */ r.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ r.jsxs("div", { className: "space-y-1", children: [
186
+ /* @__PURE__ */ r.jsx("h4", { className: "text-sm font-semibold", children: e }),
187
+ /* @__PURE__ */ r.jsx("p", { className: "text-xs", children: t })
188
188
  ] }) }) })
189
- ] }), zn = () => {
190
- const [, t, e] = we(), [n, i] = Ut(), c = (s) => {
191
- n.includes(s) ? n.length > 2 && i(n.filter((a) => a !== s)) : i((a) => [...a, s]);
189
+ ] }), Hn = () => {
190
+ const [, e, t] = ke(), [n, o] = qt(), l = (s) => {
191
+ n.includes(s) ? n.length > 2 && o(n.filter((i) => i !== s)) : o((i) => [...i, s]);
192
192
  };
193
193
  return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center rounded-md", children: [
194
194
  ne(
195
- Re.filter((s) => Ee(n, de(s.breakpoint))),
196
- (s) => /* @__PURE__ */ xt(Hn, { ...s, onClick: e, key: s.breakpoint, currentBreakpoint: t })
195
+ Pe.filter((s) => Ee(n, de(s.breakpoint))),
196
+ (s) => /* @__PURE__ */ vt(Un, { ...s, onClick: t, key: s.breakpoint, currentBreakpoint: e })
197
197
  ),
198
- /* @__PURE__ */ r.jsxs(Ht, { children: [
199
- /* @__PURE__ */ r.jsx(zt, { asChild: !0, children: /* @__PURE__ */ r.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ r.jsx(Ot, { className: "scale-90 transform" }) }) }),
200
- /* @__PURE__ */ r.jsxs(Yt, { className: "w-56 border-border text-xs", children: [
201
- /* @__PURE__ */ r.jsx(Kt, { children: "Breakpoints" }),
202
- /* @__PURE__ */ r.jsx(Vt, {}),
203
- ne(Re, (s) => /* @__PURE__ */ r.jsx(
204
- Xt,
198
+ /* @__PURE__ */ r.jsxs(Ut, { children: [
199
+ /* @__PURE__ */ r.jsx(Ht, { asChild: !0, children: /* @__PURE__ */ r.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ r.jsx(Bt, { className: "scale-90 transform" }) }) }),
200
+ /* @__PURE__ */ r.jsxs(zt, { className: "w-56 border-border text-xs", children: [
201
+ /* @__PURE__ */ r.jsx(Yt, { children: "Breakpoints" }),
202
+ /* @__PURE__ */ r.jsx(Kt, {}),
203
+ ne(Pe, (s) => /* @__PURE__ */ r.jsx(
204
+ Vt,
205
205
  {
206
206
  disabled: s.breakpoint === "xs",
207
- onCheckedChange: () => c(de(s.breakpoint)),
207
+ onCheckedChange: () => l(de(s.breakpoint)),
208
208
  checked: Ee(n, de(s.breakpoint)),
209
209
  children: s.title
210
210
  },
@@ -213,53 +213,53 @@ const Ae = ({ landscape: t = !1 }) => /* @__PURE__ */ r.jsxs(
213
213
  ] })
214
214
  ] })
215
215
  ] });
216
- }, Yn = () => {
217
- const [t] = Jt(), { createSnapshot: e } = ke(), [, n] = H(), [, i] = K(), c = xe(() => {
218
- t([]), n([]), i([]), e();
219
- }, [t, e]);
220
- return /* @__PURE__ */ r.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ r.jsxs(Zt, { children: [
221
- /* @__PURE__ */ r.jsx(Gt, { asChild: !0, children: /* @__PURE__ */ r.jsxs(se, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
222
- /* @__PURE__ */ r.jsx(At, {}),
216
+ }, zn = () => {
217
+ const [e] = Xt(), { createSnapshot: t } = we(), [, n] = H(), [, o] = K(), l = xe(() => {
218
+ e([]), n([]), o([]), t();
219
+ }, [e, t]);
220
+ return /* @__PURE__ */ r.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ r.jsxs(Jt, { children: [
221
+ /* @__PURE__ */ r.jsx(Zt, { asChild: !0, children: /* @__PURE__ */ r.jsxs(se, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
222
+ /* @__PURE__ */ r.jsx(Ot, {}),
223
223
  " Clear"
224
224
  ] }) }),
225
- /* @__PURE__ */ r.jsxs(Qt, { className: "border-border", children: [
226
- /* @__PURE__ */ r.jsxs(en, { children: [
227
- /* @__PURE__ */ r.jsx(tn, { children: "Clear whole canvas?" }),
228
- /* @__PURE__ */ r.jsx(nn, { children: "Are you sure you want to clear the whole canvas?" })
225
+ /* @__PURE__ */ r.jsxs(Gt, { className: "border-border", children: [
226
+ /* @__PURE__ */ r.jsxs(Qt, { children: [
227
+ /* @__PURE__ */ r.jsx(en, { children: "Clear whole canvas?" }),
228
+ /* @__PURE__ */ r.jsx(tn, { children: "Are you sure you want to clear the whole canvas?" })
229
229
  ] }),
230
- /* @__PURE__ */ r.jsxs(rn, { children: [
231
- /* @__PURE__ */ r.jsx(sn, { children: "Cancel" }),
232
- /* @__PURE__ */ r.jsx(on, { onClick: c, children: "Yes" })
230
+ /* @__PURE__ */ r.jsxs(nn, { children: [
231
+ /* @__PURE__ */ r.jsx(rn, { children: "Cancel" }),
232
+ /* @__PURE__ */ r.jsx(sn, { onClick: l, children: "Yes" })
233
233
  ] })
234
234
  ] })
235
235
  ] }) });
236
- }, Kn = () => {
237
- const t = an("darkMode", !1), [e] = Ke();
236
+ }, Yn = () => {
237
+ const e = on("darkMode", !1), [t] = Ke();
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
- t ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
241
- /* @__PURE__ */ r.jsx(Un, {}),
240
+ e ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
241
+ /* @__PURE__ */ r.jsx(qn, {}),
242
242
  /* @__PURE__ */ r.jsx(te, { orientation: "vertical" })
243
243
  ] }) : null,
244
- /* @__PURE__ */ r.jsx(zn, {}),
244
+ /* @__PURE__ */ r.jsx(Hn, {}),
245
245
  /* @__PURE__ */ r.jsx(te, { orientation: "vertical" }),
246
246
  /* @__PURE__ */ r.jsxs("div", { className: "flex w-12 items-center justify-center gap-x-1 space-x-0 font-medium", children: [
247
- /* @__PURE__ */ r.jsx(Rt, { className: "h-3.5 w-3.5 flex-shrink-0" }),
247
+ /* @__PURE__ */ r.jsx(At, { className: "h-3.5 w-3.5 flex-shrink-0" }),
248
248
  " ",
249
249
  /* @__PURE__ */ r.jsxs("div", { className: "text-xs leading-3", children: [
250
- jt(e, 0),
250
+ kt(t, 0),
251
251
  "%"
252
252
  ] })
253
253
  ] }),
254
254
  /* @__PURE__ */ r.jsx(te, { orientation: "vertical" }),
255
- /* @__PURE__ */ r.jsx(qn, {})
255
+ /* @__PURE__ */ r.jsx($n, {})
256
256
  ] }),
257
257
  /* @__PURE__ */ r.jsxs("div", { className: "flex h-full items-center space-x-2", children: [
258
258
  /* @__PURE__ */ r.jsx(te, { orientation: "vertical" }),
259
- /* @__PURE__ */ r.jsx(Yn, {})
259
+ /* @__PURE__ */ r.jsx(zn, {})
260
260
  ] })
261
261
  ] });
262
- }, Vn = `<!doctype html>
262
+ }, Kn = `<!doctype html>
263
263
  <html class="scroll-smooth h-full overflow-y-auto">
264
264
  <head>
265
265
  <meta charset="UTF-8">
@@ -305,24 +305,24 @@ const Ae = ({ landscape: t = !1 }) => /* @__PURE__ */ r.jsxs(
305
305
  <div class="frame-root"></div>
306
306
  <script src="https://cdn.jsdelivr.net/npm/quill@2.0.0/dist/quill.js"><\/script>
307
307
  </body>
308
- </html>`, Xn = (t) => {
309
- const [e] = we(), [, n] = Ke(), [i, c] = W({}), s = xe(() => {
310
- const { width: a, height: l } = t;
311
- if (a < e) {
312
- const f = parseFloat((a / e).toString());
308
+ </html>`, Vn = (e) => {
309
+ const [t] = ke(), [, n] = Ke(), [o, l] = $({}), s = xe(() => {
310
+ const { width: i, height: c } = e;
311
+ if (i < t) {
312
+ const p = parseFloat((i / t).toString());
313
313
  let u = {};
314
- l && (u = { height: l + 2 * l * (1 - f) }), c({
315
- transform: `scale(${f})`,
314
+ c && (u = { height: c + 2 * c * (1 - p) }), l({
315
+ transform: `scale(${p})`,
316
316
  transformOrigin: "top left",
317
317
  ...u,
318
318
  maxWidth: "none"
319
- }), n(f * 100);
319
+ }), n(p * 100);
320
320
  } else
321
- c({}), n(100);
322
- }, [e, t, n]);
321
+ l({}), n(100);
322
+ }, [t, e, n]);
323
323
  return M(() => {
324
324
  s();
325
- }, [e, t, n, s]), i;
325
+ }, [t, e, n, s]), o;
326
326
  };
327
327
  var oe = { exports: {} };
328
328
  /*
@@ -330,30 +330,30 @@ object-assign
330
330
  (c) Sindre Sorhus
331
331
  @license MIT
332
332
  */
333
- var ue, Pe;
334
- function Jn() {
335
- if (Pe)
333
+ var ue, Re;
334
+ function Xn() {
335
+ if (Re)
336
336
  return ue;
337
- Pe = 1;
338
- var t = Object.getOwnPropertySymbols, e = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
339
- function i(s) {
337
+ Re = 1;
338
+ var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
339
+ function o(s) {
340
340
  if (s == null)
341
341
  throw new TypeError("Object.assign cannot be called with null or undefined");
342
342
  return Object(s);
343
343
  }
344
- function c() {
344
+ function l() {
345
345
  try {
346
346
  if (!Object.assign)
347
347
  return !1;
348
348
  var s = new String("abc");
349
349
  if (s[5] = "de", Object.getOwnPropertyNames(s)[0] === "5")
350
350
  return !1;
351
- for (var a = {}, l = 0; l < 10; l++)
352
- a["_" + String.fromCharCode(l)] = l;
353
- var f = Object.getOwnPropertyNames(a).map(function(h) {
354
- return a[h];
351
+ for (var i = {}, c = 0; c < 10; c++)
352
+ i["_" + String.fromCharCode(c)] = c;
353
+ var p = Object.getOwnPropertyNames(i).map(function(h) {
354
+ return i[h];
355
355
  });
356
- if (f.join("") !== "0123456789")
356
+ if (p.join("") !== "0123456789")
357
357
  return !1;
358
358
  var u = {};
359
359
  return "abcdefghijklmnopqrst".split("").forEach(function(h) {
@@ -363,18 +363,18 @@ function Jn() {
363
363
  return !1;
364
364
  }
365
365
  }
366
- return ue = c() ? Object.assign : function(s, a) {
367
- for (var l, f = i(s), u, h = 1; h < arguments.length; h++) {
368
- l = Object(arguments[h]);
369
- for (var p in l)
370
- e.call(l, p) && (f[p] = l[p]);
371
- if (t) {
372
- u = t(l);
366
+ return ue = l() ? Object.assign : function(s, i) {
367
+ for (var c, p = o(s), u, h = 1; h < arguments.length; h++) {
368
+ c = Object(arguments[h]);
369
+ for (var f in c)
370
+ t.call(c, f) && (p[f] = c[f]);
371
+ if (e) {
372
+ u = e(c);
373
373
  for (var v = 0; v < u.length; v++)
374
- n.call(l, u[v]) && (f[u[v]] = l[u[v]]);
374
+ n.call(c, u[v]) && (p[u[v]] = c[u[v]]);
375
375
  }
376
376
  }
377
- return f;
377
+ return p;
378
378
  }, ue;
379
379
  }
380
380
  var pe, Me;
@@ -382,89 +382,89 @@ function je() {
382
382
  if (Me)
383
383
  return pe;
384
384
  Me = 1;
385
- var t = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
386
- return pe = t, pe;
385
+ var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
386
+ return pe = e, pe;
387
387
  }
388
- var fe, _e;
388
+ var fe, Le;
389
389
  function tt() {
390
- return _e || (_e = 1, fe = Function.call.bind(Object.prototype.hasOwnProperty)), fe;
390
+ return Le || (Le = 1, fe = Function.call.bind(Object.prototype.hasOwnProperty)), fe;
391
391
  }
392
- var he, Le;
393
- function Zn() {
394
- if (Le)
392
+ var he, _e;
393
+ function Jn() {
394
+ if (_e)
395
395
  return he;
396
- Le = 1;
397
- var t = function() {
396
+ _e = 1;
397
+ var e = function() {
398
398
  };
399
399
  if (process.env.NODE_ENV !== "production") {
400
- var e = je(), n = {}, i = tt();
401
- t = function(s) {
402
- var a = "Warning: " + s;
403
- typeof console < "u" && console.error(a);
400
+ var t = je(), n = {}, o = tt();
401
+ e = function(s) {
402
+ var i = "Warning: " + s;
403
+ typeof console < "u" && console.error(i);
404
404
  try {
405
- throw new Error(a);
405
+ throw new Error(i);
406
406
  } catch {
407
407
  }
408
408
  };
409
409
  }
410
- function c(s, a, l, f, u) {
410
+ function l(s, i, c, p, u) {
411
411
  if (process.env.NODE_ENV !== "production") {
412
412
  for (var h in s)
413
- if (i(s, h)) {
414
- var p;
413
+ if (o(s, h)) {
414
+ var f;
415
415
  try {
416
416
  if (typeof s[h] != "function") {
417
417
  var v = Error(
418
- (f || "React class") + ": " + l + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[h] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
418
+ (p || "React class") + ": " + c + " type `" + h + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[h] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
419
419
  );
420
420
  throw v.name = "Invariant Violation", v;
421
421
  }
422
- p = s[h](a, h, f, l, null, e);
423
- } catch (R) {
424
- p = R;
422
+ f = s[h](i, h, p, c, null, t);
423
+ } catch (P) {
424
+ f = P;
425
425
  }
426
- if (p && !(p instanceof Error) && t(
427
- (f || "React class") + ": type specification of " + l + " `" + h + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof p + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
428
- ), p instanceof Error && !(p.message in n)) {
429
- n[p.message] = !0;
430
- var w = u ? u() : "";
431
- t(
432
- "Failed " + l + " type: " + p.message + (w ?? "")
426
+ if (f && !(f instanceof Error) && e(
427
+ (p || "React class") + ": type specification of " + c + " `" + h + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof f + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
428
+ ), f instanceof Error && !(f.message in n)) {
429
+ n[f.message] = !0;
430
+ var k = u ? u() : "";
431
+ e(
432
+ "Failed " + c + " type: " + f.message + (k ?? "")
433
433
  );
434
434
  }
435
435
  }
436
436
  }
437
437
  }
438
- return c.resetWarningCache = function() {
438
+ return l.resetWarningCache = function() {
439
439
  process.env.NODE_ENV !== "production" && (n = {});
440
- }, he = c, he;
440
+ }, he = l, he;
441
441
  }
442
442
  var ge, Ne;
443
- function Gn() {
443
+ function Zn() {
444
444
  if (Ne)
445
445
  return ge;
446
446
  Ne = 1;
447
- var t = et, e = Jn(), n = je(), i = tt(), c = Zn(), s = function() {
447
+ var e = et, t = Xn(), n = je(), o = tt(), l = Jn(), s = function() {
448
448
  };
449
- process.env.NODE_ENV !== "production" && (s = function(l) {
450
- var f = "Warning: " + l;
451
- typeof console < "u" && console.error(f);
449
+ process.env.NODE_ENV !== "production" && (s = function(c) {
450
+ var p = "Warning: " + c;
451
+ typeof console < "u" && console.error(p);
452
452
  try {
453
- throw new Error(f);
453
+ throw new Error(p);
454
454
  } catch {
455
455
  }
456
456
  });
457
- function a() {
457
+ function i() {
458
458
  return null;
459
459
  }
460
- return ge = function(l, f) {
460
+ return ge = function(c, p) {
461
461
  var u = typeof Symbol == "function" && Symbol.iterator, h = "@@iterator";
462
- function p(o) {
463
- var d = o && (u && o[u] || o[h]);
462
+ function f(a) {
463
+ var d = a && (u && a[u] || a[h]);
464
464
  if (typeof d == "function")
465
465
  return d;
466
466
  }
467
- var v = "<<anonymous>>", w = {
467
+ var v = "<<anonymous>>", k = {
468
468
  array: m("array"),
469
469
  bigint: m("bigint"),
470
470
  bool: m("boolean"),
@@ -474,30 +474,30 @@ function Gn() {
474
474
  string: m("string"),
475
475
  symbol: m("symbol"),
476
476
  any: V(),
477
- arrayOf: _,
477
+ arrayOf: L,
478
478
  element: le(),
479
479
  elementType: ce(),
480
480
  instanceOf: D,
481
- node: ut(),
481
+ node: dt(),
482
482
  objectOf: N,
483
- oneOf: L,
484
- oneOfType: dt,
485
- shape: pt,
486
- exact: ft
483
+ oneOf: _,
484
+ oneOfType: ct,
485
+ shape: ut,
486
+ exact: pt
487
487
  };
488
- function R(o, d) {
489
- return o === d ? o !== 0 || 1 / o === 1 / d : o !== o && d !== d;
488
+ function P(a, d) {
489
+ return a === d ? a !== 0 || 1 / a === 1 / d : a !== a && d !== d;
490
490
  }
491
- function j(o, d) {
492
- this.message = o, this.data = d && typeof d == "object" ? d : {}, this.stack = "";
491
+ function j(a, d) {
492
+ this.message = a, this.data = d && typeof d == "object" ? d : {}, this.stack = "";
493
493
  }
494
494
  j.prototype = Error.prototype;
495
- function I(o) {
495
+ function I(a) {
496
496
  if (process.env.NODE_ENV !== "production")
497
- var d = {}, k = 0;
498
- function x(C, y, b, T, E, S, P) {
499
- if (T = T || v, S = S || b, P !== n) {
500
- if (f) {
497
+ var d = {}, w = 0;
498
+ function x(C, y, b, T, E, S, R) {
499
+ if (T = T || v, S = S || b, R !== n) {
500
+ if (p) {
501
501
  var O = new Error(
502
502
  "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"
503
503
  );
@@ -505,24 +505,24 @@ function Gn() {
505
505
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
506
506
  var X = T + ":" + b;
507
507
  !d[X] && // Avoid spamming the console because they are often not actionable except for lib authors
508
- k < 3 && (s(
508
+ w < 3 && (s(
509
509
  "You are manually calling a React.PropTypes validation function for the `" + S + "` prop on `" + T + "`. 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."
510
- ), d[X] = !0, k++);
510
+ ), d[X] = !0, w++);
511
511
  }
512
512
  }
513
- return y[b] == null ? C ? y[b] === null ? new j("The " + E + " `" + S + "` is marked as required " + ("in `" + T + "`, but its value is `null`.")) : new j("The " + E + " `" + S + "` is marked as required in " + ("`" + T + "`, but its value is `undefined`.")) : null : o(y, b, T, E, S);
513
+ return y[b] == null ? C ? y[b] === null ? new j("The " + E + " `" + S + "` is marked as required " + ("in `" + T + "`, but its value is `null`.")) : new j("The " + E + " `" + S + "` is marked as required in " + ("`" + T + "`, but its value is `undefined`.")) : null : a(y, b, T, E, S);
514
514
  }
515
515
  var g = x.bind(null, !1);
516
516
  return g.isRequired = x.bind(null, !0), g;
517
517
  }
518
- function m(o) {
519
- function d(k, x, g, C, y, b) {
520
- var T = k[x], E = $(T);
521
- if (E !== o) {
522
- var S = Z(T);
518
+ function m(a) {
519
+ function d(w, x, g, C, y, b) {
520
+ var T = w[x], E = W(T);
521
+ if (E !== a) {
522
+ var S = J(T);
523
523
  return new j(
524
- "Invalid " + C + " `" + y + "` of type " + ("`" + S + "` supplied to `" + g + "`, expected ") + ("`" + o + "`."),
525
- { expectedType: o }
524
+ "Invalid " + C + " `" + y + "` of type " + ("`" + S + "` supplied to `" + g + "`, expected ") + ("`" + a + "`."),
525
+ { expectedType: a }
526
526
  );
527
527
  }
528
528
  return null;
@@ -530,19 +530,19 @@ function Gn() {
530
530
  return I(d);
531
531
  }
532
532
  function V() {
533
- return I(a);
533
+ return I(i);
534
534
  }
535
- function _(o) {
536
- function d(k, x, g, C, y) {
537
- if (typeof o != "function")
535
+ function L(a) {
536
+ function d(w, x, g, C, y) {
537
+ if (typeof a != "function")
538
538
  return new j("Property `" + y + "` of component `" + g + "` has invalid PropType notation inside arrayOf.");
539
- var b = k[x];
539
+ var b = w[x];
540
540
  if (!Array.isArray(b)) {
541
- var T = $(b);
541
+ var T = W(b);
542
542
  return new j("Invalid " + C + " `" + y + "` of type " + ("`" + T + "` supplied to `" + g + "`, expected an array."));
543
543
  }
544
544
  for (var E = 0; E < b.length; E++) {
545
- var S = o(b, E, g, C, y + "[" + E + "]", n);
545
+ var S = a(b, E, g, C, y + "[" + E + "]", n);
546
546
  if (S instanceof Error)
547
547
  return S;
548
548
  }
@@ -551,64 +551,64 @@ function Gn() {
551
551
  return I(d);
552
552
  }
553
553
  function le() {
554
- function o(d, k, x, g, C) {
555
- var y = d[k];
556
- if (!l(y)) {
557
- var b = $(y);
554
+ function a(d, w, x, g, C) {
555
+ var y = d[w];
556
+ if (!c(y)) {
557
+ var b = W(y);
558
558
  return new j("Invalid " + g + " `" + C + "` of type " + ("`" + b + "` supplied to `" + x + "`, expected a single ReactElement."));
559
559
  }
560
560
  return null;
561
561
  }
562
- return I(o);
562
+ return I(a);
563
563
  }
564
564
  function ce() {
565
- function o(d, k, x, g, C) {
566
- var y = d[k];
567
- if (!t.isValidElementType(y)) {
568
- var b = $(y);
565
+ function a(d, w, x, g, C) {
566
+ var y = d[w];
567
+ if (!e.isValidElementType(y)) {
568
+ var b = W(y);
569
569
  return new j("Invalid " + g + " `" + C + "` of type " + ("`" + b + "` supplied to `" + x + "`, expected a single ReactElement type."));
570
570
  }
571
571
  return null;
572
572
  }
573
- return I(o);
573
+ return I(a);
574
574
  }
575
- function D(o) {
576
- function d(k, x, g, C, y) {
577
- if (!(k[x] instanceof o)) {
578
- var b = o.name || v, T = mt(k[x]);
575
+ function D(a) {
576
+ function d(w, x, g, C, y) {
577
+ if (!(w[x] instanceof a)) {
578
+ var b = a.name || v, T = gt(w[x]);
579
579
  return new j("Invalid " + C + " `" + y + "` of type " + ("`" + T + "` supplied to `" + g + "`, expected ") + ("instance of `" + b + "`."));
580
580
  }
581
581
  return null;
582
582
  }
583
583
  return I(d);
584
584
  }
585
- function L(o) {
586
- if (!Array.isArray(o))
585
+ function _(a) {
586
+ if (!Array.isArray(a))
587
587
  return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s(
588
588
  "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])."
589
- ) : s("Invalid argument supplied to oneOf, expected an array.")), a;
590
- function d(k, x, g, C, y) {
591
- for (var b = k[x], T = 0; T < o.length; T++)
592
- if (R(b, o[T]))
589
+ ) : s("Invalid argument supplied to oneOf, expected an array.")), i;
590
+ function d(w, x, g, C, y) {
591
+ for (var b = w[x], T = 0; T < a.length; T++)
592
+ if (P(b, a[T]))
593
593
  return null;
594
- var E = JSON.stringify(o, function(P, O) {
595
- var X = Z(O);
594
+ var E = JSON.stringify(a, function(R, O) {
595
+ var X = J(O);
596
596
  return X === "symbol" ? String(O) : O;
597
597
  });
598
598
  return new j("Invalid " + C + " `" + y + "` of value `" + String(b) + "` " + ("supplied to `" + g + "`, expected one of " + E + "."));
599
599
  }
600
600
  return I(d);
601
601
  }
602
- function N(o) {
603
- function d(k, x, g, C, y) {
604
- if (typeof o != "function")
602
+ function N(a) {
603
+ function d(w, x, g, C, y) {
604
+ if (typeof a != "function")
605
605
  return new j("Property `" + y + "` of component `" + g + "` has invalid PropType notation inside objectOf.");
606
- var b = k[x], T = $(b);
606
+ var b = w[x], T = W(b);
607
607
  if (T !== "object")
608
608
  return new j("Invalid " + C + " `" + y + "` of type " + ("`" + T + "` supplied to `" + g + "`, expected an object."));
609
609
  for (var E in b)
610
- if (i(b, E)) {
611
- var S = o(b, E, g, C, y + "." + E, n);
610
+ if (o(b, E)) {
611
+ var S = a(b, E, g, C, y + "." + E, n);
612
612
  if (S instanceof Error)
613
613
  return S;
614
614
  }
@@ -616,72 +616,72 @@ function Gn() {
616
616
  }
617
617
  return I(d);
618
618
  }
619
- function dt(o) {
620
- if (!Array.isArray(o))
621
- return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), a;
622
- for (var d = 0; d < o.length; d++) {
623
- var k = o[d];
624
- if (typeof k != "function")
619
+ function ct(a) {
620
+ if (!Array.isArray(a))
621
+ return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), i;
622
+ for (var d = 0; d < a.length; d++) {
623
+ var w = a[d];
624
+ if (typeof w != "function")
625
625
  return s(
626
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + gt(k) + " at index " + d + "."
627
- ), a;
626
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ht(w) + " at index " + d + "."
627
+ ), i;
628
628
  }
629
629
  function x(g, C, y, b, T) {
630
- for (var E = [], S = 0; S < o.length; S++) {
631
- var P = o[S], O = P(g, C, y, b, T, n);
630
+ for (var E = [], S = 0; S < a.length; S++) {
631
+ var R = a[S], O = R(g, C, y, b, T, n);
632
632
  if (O == null)
633
633
  return null;
634
- O.data && i(O.data, "expectedType") && E.push(O.data.expectedType);
634
+ O.data && o(O.data, "expectedType") && E.push(O.data.expectedType);
635
635
  }
636
636
  var X = E.length > 0 ? ", expected one of type [" + E.join(", ") + "]" : "";
637
637
  return new j("Invalid " + b + " `" + T + "` supplied to " + ("`" + y + "`" + X + "."));
638
638
  }
639
639
  return I(x);
640
640
  }
641
- function ut() {
642
- function o(d, k, x, g, C) {
643
- return ee(d[k]) ? null : new j("Invalid " + g + " `" + C + "` supplied to " + ("`" + x + "`, expected a ReactNode."));
641
+ function dt() {
642
+ function a(d, w, x, g, C) {
643
+ return ee(d[w]) ? null : new j("Invalid " + g + " `" + C + "` supplied to " + ("`" + x + "`, expected a ReactNode."));
644
644
  }
645
- return I(o);
645
+ return I(a);
646
646
  }
647
- function Te(o, d, k, x, g) {
647
+ function Te(a, d, w, x, g) {
648
648
  return new j(
649
- (o || "React class") + ": " + d + " type `" + k + "." + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + g + "`."
649
+ (a || "React class") + ": " + d + " type `" + w + "." + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + g + "`."
650
650
  );
651
651
  }
652
- function pt(o) {
653
- function d(k, x, g, C, y) {
654
- var b = k[x], T = $(b);
652
+ function ut(a) {
653
+ function d(w, x, g, C, y) {
654
+ var b = w[x], T = W(b);
655
655
  if (T !== "object")
656
656
  return new j("Invalid " + C + " `" + y + "` of type `" + T + "` " + ("supplied to `" + g + "`, expected `object`."));
657
- for (var E in o) {
658
- var S = o[E];
657
+ for (var E in a) {
658
+ var S = a[E];
659
659
  if (typeof S != "function")
660
- return Te(g, C, y, E, Z(S));
661
- var P = S(b, E, g, C, y + "." + E, n);
662
- if (P)
663
- return P;
660
+ return Te(g, C, y, E, J(S));
661
+ var R = S(b, E, g, C, y + "." + E, n);
662
+ if (R)
663
+ return R;
664
664
  }
665
665
  return null;
666
666
  }
667
667
  return I(d);
668
668
  }
669
- function ft(o) {
670
- function d(k, x, g, C, y) {
671
- var b = k[x], T = $(b);
669
+ function pt(a) {
670
+ function d(w, x, g, C, y) {
671
+ var b = w[x], T = W(b);
672
672
  if (T !== "object")
673
673
  return new j("Invalid " + C + " `" + y + "` of type `" + T + "` " + ("supplied to `" + g + "`, expected `object`."));
674
- var E = e({}, k[x], o);
674
+ var E = t({}, w[x], a);
675
675
  for (var S in E) {
676
- var P = o[S];
677
- if (i(o, S) && typeof P != "function")
678
- return Te(g, C, y, S, Z(P));
679
- if (!P)
676
+ var R = a[S];
677
+ if (o(a, S) && typeof R != "function")
678
+ return Te(g, C, y, S, J(R));
679
+ if (!R)
680
680
  return new j(
681
- "Invalid " + C + " `" + y + "` key `" + S + "` supplied to `" + g + "`.\nBad object: " + JSON.stringify(k[x], null, " ") + `
682
- Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
681
+ "Invalid " + C + " `" + y + "` key `" + S + "` supplied to `" + g + "`.\nBad object: " + JSON.stringify(w[x], null, " ") + `
682
+ Valid keys: ` + JSON.stringify(Object.keys(a), null, " ")
683
683
  );
684
- var O = P(b, S, g, C, y + "." + S, n);
684
+ var O = R(b, S, g, C, y + "." + S, n);
685
685
  if (O)
686
686
  return O;
687
687
  }
@@ -689,28 +689,28 @@ Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
689
689
  }
690
690
  return I(d);
691
691
  }
692
- function ee(o) {
693
- switch (typeof o) {
692
+ function ee(a) {
693
+ switch (typeof a) {
694
694
  case "number":
695
695
  case "string":
696
696
  case "undefined":
697
697
  return !0;
698
698
  case "boolean":
699
- return !o;
699
+ return !a;
700
700
  case "object":
701
- if (Array.isArray(o))
702
- return o.every(ee);
703
- if (o === null || l(o))
701
+ if (Array.isArray(a))
702
+ return a.every(ee);
703
+ if (a === null || c(a))
704
704
  return !0;
705
- var d = p(o);
705
+ var d = f(a);
706
706
  if (d) {
707
- var k = d.call(o), x;
708
- if (d !== o.entries) {
709
- for (; !(x = k.next()).done; )
707
+ var w = d.call(a), x;
708
+ if (d !== a.entries) {
709
+ for (; !(x = w.next()).done; )
710
710
  if (!ee(x.value))
711
711
  return !1;
712
712
  } else
713
- for (; !(x = k.next()).done; ) {
713
+ for (; !(x = w.next()).done; ) {
714
714
  var g = x.value;
715
715
  if (g && !ee(g[1]))
716
716
  return !1;
@@ -722,27 +722,27 @@ Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
722
722
  return !1;
723
723
  }
724
724
  }
725
- function ht(o, d) {
726
- return o === "symbol" ? !0 : d ? d["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && d instanceof Symbol : !1;
725
+ function ft(a, d) {
726
+ return a === "symbol" ? !0 : d ? d["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && d instanceof Symbol : !1;
727
727
  }
728
- function $(o) {
729
- var d = typeof o;
730
- return Array.isArray(o) ? "array" : o instanceof RegExp ? "object" : ht(d, o) ? "symbol" : d;
728
+ function W(a) {
729
+ var d = typeof a;
730
+ return Array.isArray(a) ? "array" : a instanceof RegExp ? "object" : ft(d, a) ? "symbol" : d;
731
731
  }
732
- function Z(o) {
733
- if (typeof o > "u" || o === null)
734
- return "" + o;
735
- var d = $(o);
732
+ function J(a) {
733
+ if (typeof a > "u" || a === null)
734
+ return "" + a;
735
+ var d = W(a);
736
736
  if (d === "object") {
737
- if (o instanceof Date)
737
+ if (a instanceof Date)
738
738
  return "date";
739
- if (o instanceof RegExp)
739
+ if (a instanceof RegExp)
740
740
  return "regexp";
741
741
  }
742
742
  return d;
743
743
  }
744
- function gt(o) {
745
- var d = Z(o);
744
+ function ht(a) {
745
+ var d = J(a);
746
746
  switch (d) {
747
747
  case "array":
748
748
  case "object":
@@ -755,73 +755,73 @@ Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
755
755
  return d;
756
756
  }
757
757
  }
758
- function mt(o) {
759
- return !o.constructor || !o.constructor.name ? v : o.constructor.name;
758
+ function gt(a) {
759
+ return !a.constructor || !a.constructor.name ? v : a.constructor.name;
760
760
  }
761
- return w.checkPropTypes = c, w.resetWarningCache = c.resetWarningCache, w.PropTypes = w, w;
761
+ return k.checkPropTypes = l, k.resetWarningCache = l.resetWarningCache, k.PropTypes = k, k;
762
762
  }, ge;
763
763
  }
764
764
  var me, Fe;
765
- function Qn() {
765
+ function Gn() {
766
766
  if (Fe)
767
767
  return me;
768
768
  Fe = 1;
769
- var t = je();
770
- function e() {
769
+ var e = je();
770
+ function t() {
771
771
  }
772
772
  function n() {
773
773
  }
774
- return n.resetWarningCache = e, me = function() {
775
- function i(a, l, f, u, h, p) {
776
- if (p !== t) {
774
+ return n.resetWarningCache = t, me = function() {
775
+ function o(i, c, p, u, h, f) {
776
+ if (f !== e) {
777
777
  var v = new Error(
778
778
  "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"
779
779
  );
780
780
  throw v.name = "Invariant Violation", v;
781
781
  }
782
782
  }
783
- i.isRequired = i;
784
- function c() {
785
- return i;
783
+ o.isRequired = o;
784
+ function l() {
785
+ return o;
786
786
  }
787
787
  var s = {
788
- array: i,
789
- bigint: i,
790
- bool: i,
791
- func: i,
792
- number: i,
793
- object: i,
794
- string: i,
795
- symbol: i,
796
- any: i,
797
- arrayOf: c,
798
- element: i,
799
- elementType: i,
800
- instanceOf: c,
801
- node: i,
802
- objectOf: c,
803
- oneOf: c,
804
- oneOfType: c,
805
- shape: c,
806
- exact: c,
788
+ array: o,
789
+ bigint: o,
790
+ bool: o,
791
+ func: o,
792
+ number: o,
793
+ object: o,
794
+ string: o,
795
+ symbol: o,
796
+ any: o,
797
+ arrayOf: l,
798
+ element: o,
799
+ elementType: o,
800
+ instanceOf: l,
801
+ node: o,
802
+ objectOf: l,
803
+ oneOf: l,
804
+ oneOfType: l,
805
+ shape: l,
806
+ exact: l,
807
807
  checkPropTypes: n,
808
- resetWarningCache: e
808
+ resetWarningCache: t
809
809
  };
810
810
  return s.PropTypes = s, s;
811
811
  }, me;
812
812
  }
813
- var _s = oe.exports;
813
+ var Ls = oe.exports;
814
814
  if (process.env.NODE_ENV !== "production") {
815
- var er = et, tr = !0;
816
- oe.exports = Gn()(er.isElement, tr);
815
+ var Qn = et, er = !0;
816
+ oe.exports = Zn()(Qn.isElement, er);
817
817
  } else
818
- oe.exports = Qn()();
819
- var nr = oe.exports;
820
- const A = /* @__PURE__ */ Sn(nr);
818
+ oe.exports = Gn()();
819
+ var tr = oe.exports;
820
+ const A = /* @__PURE__ */ Tn(tr);
821
821
  let nt, rt;
822
822
  typeof document < "u" && (nt = document);
823
823
  typeof window < "u" && (rt = window);
824
- const st = Y.createContext({ document: nt, window: rt }), ae = () => Y.useContext(st), { Provider: rr, Consumer: Ls } = st;
824
+ const st = Y.createContext({ document: nt, window: rt }), ae = () => Y.useContext(st), { Provider: nr, Consumer: _s } = st;
825
825
  class ot extends qe {
826
826
  componentDidMount() {
827
827
  this.props.contentDidMount();
@@ -830,7 +830,7 @@ class ot extends qe {
830
830
  this.props.contentDidUpdate();
831
831
  }
832
832
  render() {
833
- return bt.only(this.props.children);
833
+ return xt.only(this.props.children);
834
834
  }
835
835
  }
836
836
  z(ot, "propTypes", {
@@ -839,12 +839,12 @@ z(ot, "propTypes", {
839
839
  contentDidUpdate: A.func.isRequired
840
840
  });
841
841
  class ye extends qe {
842
- constructor(n, i) {
843
- super(n, i);
842
+ constructor(n, o) {
843
+ super(n, o);
844
844
  z(this, "setRef", (n) => {
845
845
  this.nodeRef.current = n;
846
- const { forwardedRef: i } = this.props;
847
- typeof i == "function" ? i(n) : i && (i.current = n);
846
+ const { forwardedRef: o } = this.props;
847
+ typeof o == "function" ? o(n) : o && (o.current = n);
848
848
  });
849
849
  z(this, "handleLoad", () => {
850
850
  clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
@@ -875,8 +875,8 @@ class ye extends qe {
875
875
  const n = this.getDoc();
876
876
  if (!n)
877
877
  return null;
878
- const i = this.props.contentDidMount, c = this.props.contentDidUpdate, s = n.defaultView || n.parentView, a = /* @__PURE__ */ r.jsx(ot, { contentDidMount: i, contentDidUpdate: c, children: /* @__PURE__ */ r.jsx(rr, { value: { document: n, window: s }, children: /* @__PURE__ */ r.jsx("div", { className: "frame-content", children: this.props.children }) }) }), l = this.getMountTarget();
879
- return [Be.createPortal(this.props.head, this.getDoc().head), Be.createPortal(a, l)];
878
+ const o = this.props.contentDidMount, l = this.props.contentDidUpdate, s = n.defaultView || n.parentView, i = /* @__PURE__ */ r.jsx(ot, { contentDidMount: o, contentDidUpdate: l, children: /* @__PURE__ */ r.jsx(nr, { value: { document: n, window: s }, children: /* @__PURE__ */ r.jsx("div", { className: "frame-content", children: this.props.children }) }) }), c = this.getMountTarget();
879
+ return [Be.createPortal(this.props.head, this.getDoc().head), Be.createPortal(i, c)];
880
880
  }
881
881
  render() {
882
882
  const n = {
@@ -912,198 +912,205 @@ z(ye, "propTypes", {
912
912
  },
913
913
  initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
914
914
  });
915
- const sr = Y.forwardRef((t, e) => /* @__PURE__ */ r.jsx(ye, { ...t, forwardedRef: e }));
916
- let q = null, J = [], it = null;
917
- function at(t) {
918
- const e = window.getComputedStyle(t), n = parseInt(e.paddingLeft, 10), i = parseInt(e.paddingTop, 10), c = parseInt(e.paddingRight, 10), s = parseInt(e.paddingBottom, 10);
919
- return { paddingLeft: n, paddingTop: i, paddingRight: c, paddingBottom: s };
915
+ const rr = Y.forwardRef((e, t) => /* @__PURE__ */ r.jsx(ye, { ...e, forwardedRef: t }));
916
+ let q = null, G = [], it = null;
917
+ function sr(e) {
918
+ const t = window.getComputedStyle(e), n = parseInt(t.paddingLeft, 10), o = parseInt(t.paddingTop, 10), l = parseInt(t.paddingRight, 10), s = parseInt(t.paddingBottom, 10);
919
+ return { paddingLeft: n, paddingTop: o, paddingRight: l, paddingBottom: s };
920
920
  }
921
- const $e = (t, e, n) => {
921
+ const We = (e, t, n) => {
922
922
  if (!q)
923
923
  return;
924
- const i = t.getBoundingClientRect(), c = q == null ? void 0 : q.getElementById("placeholder"), { paddingLeft: s, paddingTop: a, paddingRight: l, paddingBottom: f } = at(t);
925
- c.style.width = e === "vertical" ? i.width - s - l + "px" : "2px", c.style.height = e === "vertical" ? "5px" : i.height - a - f + "px", c.style.display = "block";
926
- const u = J.reduce(
927
- (h, p) => Math.abs(p - n) < Math.abs(h - n) ? p : h
924
+ const o = e.getBoundingClientRect(), l = q == null ? void 0 : q.getElementById("placeholder"), { paddingLeft: s, paddingTop: i, paddingRight: c, paddingBottom: p } = sr(e);
925
+ l.style.width = t === "vertical" ? o.width - s - c + "px" : "2px", l.style.height = t === "vertical" ? "2px" : o.height - i - p + "px", l.style.display = "block";
926
+ const u = G.reduce(
927
+ (h, f) => Math.abs(f - n) < Math.abs(h - n) ? f : h
928
928
  );
929
- it = J.indexOf(u), c.style.top = t.offsetTop + (e === "vertical" ? u : 0) + "px", c.style.left = t.offsetLeft + (e === "horizontal" ? u : 0) + "px";
930
- }, or = (t) => {
931
- const e = lt(t), n = t.getBoundingClientRect(), i = Array.from(t.children);
932
- i.filter((a) => a.getAttribute("data-dnd") !== "ignore");
933
- const { paddingLeft: c, paddingTop: s } = at(t);
934
- J = [e === "vertical" ? c : s], J = [
935
- ...J,
936
- ...i.map((a) => {
937
- const l = a.getBoundingClientRect();
938
- return e === "vertical" ? l.top - n.top + l.height : l.left - n.left + l.width;
939
- })
940
- ];
929
+ it = G.indexOf(u), t === "vertical" ? (l.style.top = e.offsetTop + u + "px", l.style.left = e.offsetLeft + s + "px") : (l.style.top = e.offsetTop + i + "px", l.style.left = e.offsetLeft + u + "px");
930
+ }, or = (e) => {
931
+ const t = at(e), n = window.getComputedStyle(e), o = t === "horizontal", l = parseInt(n.paddingLeft), s = parseInt(n.paddingTop);
932
+ let i = o ? l : s;
933
+ G = [i], Array.from(e.children).forEach((c) => {
934
+ const p = window.getComputedStyle(c), u = parseInt(
935
+ o ? p.marginLeft + p.marginRight : p.marginTop + p.marginBottom
936
+ ), h = o ? c.offsetWidth : c.offsetHeight;
937
+ G.push(i + h + u), i += h + u;
938
+ });
941
939
  };
942
- function lt(t) {
943
- const e = window.getComputedStyle(t).display, n = e === "block" ? "vertical" : "horizontal";
944
- return e === "flex" && t.style.flexDirection === "column" ? "vertical" : n;
940
+ function at(e) {
941
+ const t = window.getComputedStyle(e).display, n = window.getComputedStyle(e).flexDirection;
942
+ if (t === "flex")
943
+ return n === "column" || n === "column-reverse" ? "vertical" : "horizontal";
944
+ if (t === "grid") {
945
+ const o = window.getComputedStyle(e).gridTemplateRows, l = window.getComputedStyle(e).gridTemplateColumns;
946
+ if (o.includes("auto"))
947
+ return "vertical";
948
+ if (l.includes("auto"))
949
+ return "horizontal";
950
+ }
951
+ return t === "block" ? "vertical" : "horizontal";
945
952
  }
946
- const ir = He((t) => {
947
- const e = t.target, n = lt(e);
953
+ const ir = He((e) => {
954
+ const t = e.target, n = at(t);
948
955
  if (n === "vertical") {
949
- const i = t.clientY - e.offsetTop;
950
- $e(e, n, i);
956
+ const o = e.clientY - t.offsetTop;
957
+ We(t, n, o);
951
958
  } else {
952
- const i = t.clientX - e.offsetLeft;
953
- $e(e, n, i);
959
+ const o = e.clientX - t.offsetLeft;
960
+ We(t, n, o);
954
961
  }
955
- }, 200), ar = (t) => {
956
- t.preventDefault(), t.stopPropagation(), ir(t);
962
+ }, 200), ar = (e) => {
963
+ e.preventDefault(), e.stopPropagation(), ir(e);
957
964
  };
958
- function We() {
959
- const t = q == null ? void 0 : q.getElementById("placeholder");
960
- t.style.display = "none";
965
+ function $e() {
966
+ const e = q == null ? void 0 : q.getElementById("placeholder");
967
+ e.style.display = "none";
961
968
  }
962
969
  const lr = () => {
963
- const { document: t } = ae(), [e, n] = F(ln), i = On(), c = An("dnd");
964
- return q = t, {
965
- isDragging: e,
970
+ const { document: e } = ae(), [t, n] = F(an), o = Bn(), l = On("dnd");
971
+ return q = e, {
972
+ isDragging: t,
966
973
  "data-dnd": "branch",
967
- onDragOver: c ? ar : G,
968
- onDrop: c ? (s) => {
969
- const a = JSON.parse(s.dataTransfer.getData("text/plain"));
970
- let l = s.target.getAttribute("data-block-id");
971
- l === null && (l = s.target.parentElement.getAttribute("data-block-id")), i({ block: a, dropTargetId: l || null, relativeIndex: it }), n(!1), setTimeout(() => We(), 300);
972
- } : G,
973
- onDragEnter: c ? (s) => {
974
- const a = s;
975
- a.stopPropagation(), a.preventDefault(), J = [];
976
- const l = a.target;
977
- or(l), l.classList.add("outline", "outline-blue-500", "outline-4", "-outline-offset-4"), n(!0);
978
- } : G,
979
- onDragLeave: c ? (s) => {
980
- const a = s;
981
- a.stopPropagation(), a.preventDefault(), a.target.classList.remove("outline", "outline-blue-500", "outline-4", "-outline-offset-4");
982
- } : G,
983
- onMouseOut: c ? () => {
984
- n(!1), We();
985
- } : G
974
+ onDragOver: l ? ar : Z,
975
+ onDrop: l ? (s) => {
976
+ const i = JSON.parse(s.dataTransfer.getData("text/plain"));
977
+ let c = s.target.getAttribute("data-block-id");
978
+ c === null && (c = s.target.parentElement.getAttribute("data-block-id")), o({ block: i, dropTargetId: c || null, relativeIndex: it }), n(!1), setTimeout(() => $e(), 300);
979
+ } : Z,
980
+ onDragEnter: l ? (s) => {
981
+ const i = s;
982
+ i.stopPropagation(), i.preventDefault(), G = [];
983
+ const c = i.target;
984
+ or(c), c.classList.add("outline", "outline-green-300", "outline-2", "-outline-offset-2"), n(!0);
985
+ } : Z,
986
+ onDragLeave: l ? (s) => {
987
+ const i = s;
988
+ i.stopPropagation(), i.preventDefault(), i.target.classList.remove("outline", "outline-green-300", "outline-2", "-outline-offset-2");
989
+ } : Z,
990
+ onMouseOut: l ? () => {
991
+ n(!1), $e();
992
+ } : Z
986
993
  };
987
994
  };
988
- function Ce(t) {
989
- return t.getAttribute("data-block-id") ? t : t.closest("[data-block-id]");
995
+ function Ce(e) {
996
+ return e.getAttribute("data-block-id") ? e : e.closest("[data-block-id]");
990
997
  }
991
- function cr(t) {
992
- t.container.innerHTML = "", t.container.parentNode.removeChild(t.container);
993
- var e = document.querySelector(".ql-toolbar");
994
- e && e.parentNode.removeChild(e), t = null;
998
+ function cr(e) {
999
+ e.container.innerHTML = "", e.container.parentNode.removeChild(e.container);
1000
+ var t = document.querySelector(".ql-toolbar");
1001
+ t && t.parentNode.removeChild(t), e = null;
995
1002
  }
996
1003
  const dr = () => {
997
- const t = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], e = cn(), [, n] = H(), [, i] = ie(), [c, s] = F(Q);
998
- return (a) => {
1004
+ const e = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], t = ln(), [, n] = H(), [, o] = ie(), [l, s] = F(Q);
1005
+ return (i) => {
999
1006
  var v;
1000
- if (c)
1007
+ if (l)
1001
1008
  return;
1002
- const l = Ce(a.target), f = l.getAttribute("data-block-type");
1003
- if (!f || !t.includes(f))
1009
+ const c = Ce(i.target), p = c.getAttribute("data-block-type");
1010
+ if (!p || !e.includes(p))
1004
1011
  return;
1005
- const u = l.cloneNode(!0);
1006
- l.style.display = "none", Array.from(u.attributes).forEach((w) => {
1007
- w.name !== "class" && u.removeAttribute(w.name);
1008
- }), f === "Text" && (u.style.display = "inline-block"), l.parentNode.insertBefore(u, l.nextSibling);
1009
- const h = new Bn(u, { placeholder: "Type here..." });
1010
- function p() {
1011
- const w = h.getText(0, h.getLength());
1012
- e([l.getAttribute("data-block-id")], { content: w }), l.removeAttribute("style"), u.removeEventListener("blur", p, !0), cr(h), s(""), i("");
1012
+ const u = c.cloneNode(!0);
1013
+ c.style.display = "none", Array.from(u.attributes).forEach((k) => {
1014
+ k.name !== "class" && u.removeAttribute(k.name);
1015
+ }), p === "Text" && (u.style.display = "inline-block"), c.parentNode.insertBefore(u, c.nextSibling);
1016
+ const h = new Dn(u, { placeholder: "Type here..." });
1017
+ function f() {
1018
+ const k = h.getText(0, h.getLength());
1019
+ t([c.getAttribute("data-block-id")], { content: k }), c.removeAttribute("style"), u.removeEventListener("blur", f, !0), cr(h), s(""), o("");
1013
1020
  }
1014
- u.addEventListener("blur", p, !0), h.focus(), (v = u.querySelector(".ql-clipboard")) == null || v.remove(), n([]), s(l.getAttribute("data-block-id"));
1021
+ u.addEventListener("blur", f, !0), h.focus(), (v = u.querySelector(".ql-clipboard")) == null || v.remove(), n([]), s(c.getAttribute("data-block-id"));
1015
1022
  };
1016
1023
  }, ur = () => {
1017
- const [, t] = K(), [, e] = H(), [n] = F(Q);
1018
- return (i) => {
1024
+ const [, e] = K(), [, t] = H(), [n] = F(Q);
1025
+ return (o) => {
1019
1026
  if (n)
1020
1027
  return;
1021
- i.stopPropagation();
1022
- const c = Ce(i.target);
1023
- if (c.getAttribute("data-block-parent")) {
1024
- const s = c.getAttribute("data-style-prop"), a = c.getAttribute("data-style-id"), l = c.getAttribute("data-block-parent");
1025
- t([{ id: a, prop: s, blockId: l }]), e([l]);
1028
+ o.stopPropagation();
1029
+ const l = Ce(o.target);
1030
+ if (l.getAttribute("data-block-parent")) {
1031
+ const s = l.getAttribute("data-style-prop"), i = l.getAttribute("data-style-id"), c = l.getAttribute("data-block-parent");
1032
+ e([{ id: i, prop: s, blockId: c }]), t([c]);
1026
1033
  } else
1027
- c.getAttribute("data-block-id") && e([c.getAttribute("data-block-id")]);
1034
+ l.getAttribute("data-block-id") && t([l.getAttribute("data-block-id")]);
1028
1035
  };
1029
- }, pr = He((t, e) => {
1030
- const n = Ce(t.target);
1031
- n.getAttribute("data-style-id") && e(n.getAttribute("data-style-id"));
1036
+ }, pr = He((e, t) => {
1037
+ const n = Ce(e.target);
1038
+ n.getAttribute("data-style-id") && t(n.getAttribute("data-style-id"));
1032
1039
  }, 100), fr = () => {
1033
- const [, t] = ie(), [e] = F(Q);
1040
+ const [, e] = ie(), [t] = F(Q);
1034
1041
  return (n) => {
1035
- e || pr(n, t);
1042
+ t || pr(n, e);
1036
1043
  };
1037
- }, hr = ({ children: t }) => {
1038
- const { document: e } = ae(), [n] = H(), [i, c] = K();
1044
+ }, hr = ({ children: e }) => {
1045
+ const { document: t } = ae(), [n] = H(), [o, l] = K();
1039
1046
  M(() => {
1040
1047
  setTimeout(() => {
1041
- if (!U(i))
1048
+ if (!U(o))
1042
1049
  return;
1043
- const u = ct(e, re(n));
1050
+ const u = lt(t, re(n));
1044
1051
  if (u) {
1045
1052
  const h = u.getAttribute("data-style-prop");
1046
1053
  if (h) {
1047
- const p = u.getAttribute("data-style-id"), v = u.getAttribute("data-block-parent");
1048
- c([{ id: p, prop: h, blockId: v }]);
1054
+ const f = u.getAttribute("data-style-id"), v = u.getAttribute("data-block-parent");
1055
+ l([{ id: f, prop: h, blockId: v }]);
1049
1056
  }
1050
1057
  }
1051
1058
  }, 100);
1052
- }, [e, n, c, i]);
1053
- const s = dr(), a = ur(), l = fr(), f = lr();
1059
+ }, [t, n, l, o]);
1060
+ const s = dr(), i = ur(), c = fr(), p = lr();
1054
1061
  return /* @__PURE__ */ r.jsx(
1055
1062
  "div",
1056
1063
  {
1057
1064
  id: "canvas",
1058
- onClick: a,
1065
+ onClick: i,
1059
1066
  onDoubleClick: s,
1060
- onMouseMove: l,
1061
- ...Ct(f, "isDragging"),
1062
- className: "relative h-screen max-w-full " + (f.isDragging ? "dragging" : ""),
1063
- children: t
1067
+ onMouseMove: c,
1068
+ ...jt(p, "isDragging"),
1069
+ className: "relative h-screen max-w-full " + (p.isDragging ? "dragging" : ""),
1070
+ children: e
1064
1071
  }
1065
1072
  );
1066
- }, ct = (t, e) => t.querySelector(`[data-block-id="${e}"]`), gr = () => {
1067
- const { window: t } = ae(), [e, n] = H(), [, i] = K(), { undo: c, redo: s } = ke(), a = Ve(), [, l] = dn(), [, f] = un(), { pasteBlocks: u } = pn(), [, h] = Xe(), p = Je(), { savePage: v } = fn(), [w] = F(Q), [, R] = F(hn), j = (I) => {
1068
- I.key === "Enter" && (I.preventDefault(), e.length === 1 && R(re(e)));
1073
+ }, lt = (e, t) => e.querySelector(`[data-block-id="${t}"]`), gr = () => {
1074
+ const { window: e } = ae(), [t, n] = H(), [, o] = K(), { undo: l, redo: s } = we(), i = Ve(), [, c] = cn(), [, p] = dn(), { pasteBlocks: u } = un(), [, h] = Xe(), f = Je(), { savePage: v } = pn(), [k] = F(Q), [, P] = F(fn), j = (I) => {
1075
+ I.key === "Enter" && (I.preventDefault(), t.length === 1 && P(re(t)));
1069
1076
  };
1070
1077
  return M(() => {
1071
1078
  const I = (m) => {
1072
1079
  if (m.key === "Escape") {
1073
- n([]), i([]);
1080
+ n([]), o([]);
1074
1081
  return;
1075
1082
  }
1076
- if (j(m), !w && (m.key === "Delete" || m.key === "Backspace") && (m.preventDefault(), p(e)), m.ctrlKey || m.metaKey) {
1083
+ if (j(m), !k && (m.key === "Delete" || m.key === "Backspace") && (m.preventDefault(), f(t)), m.ctrlKey || m.metaKey) {
1077
1084
  if (["z", "y", "d", "x", "c", "p", "s", "v"].includes(m.key)) {
1078
- if (w && ["x", "z", "v"].includes(m.key))
1085
+ if (k && ["x", "z", "v"].includes(m.key))
1079
1086
  return !0;
1080
1087
  m.preventDefault();
1081
1088
  }
1082
- m.key === "s" && (m.stopPropagation(), m.preventDefault(), v()), m.key === "z" && c(), m.key === "y" && s(), m.key === "d" && a(e), m.key === "x" && l(e), m.key === "c" && f(e), m.key === "v" && e.length > 0 && u(e[0]);
1089
+ m.key === "s" && (m.stopPropagation(), m.preventDefault(), v()), m.key === "z" && l(), m.key === "y" && s(), m.key === "d" && i(t), m.key === "x" && c(t), m.key === "c" && p(t), m.key === "v" && t.length > 0 && u(t[0]);
1083
1090
  }
1084
1091
  };
1085
- return t.removeEventListener("keydown", I), t.addEventListener("keydown", I), () => {
1086
- t.removeEventListener("keydown", I);
1092
+ return e.removeEventListener("keydown", I), e.addEventListener("keydown", I), () => {
1093
+ e.removeEventListener("keydown", I);
1087
1094
  };
1088
1095
  }, [
1089
- e,
1096
+ t,
1090
1097
  n,
1091
- c,
1092
- p,
1093
- h,
1094
- s,
1095
- a,
1096
1098
  l,
1097
1099
  f,
1100
+ h,
1101
+ s,
1102
+ i,
1103
+ c,
1104
+ p,
1098
1105
  u,
1099
- w,
1106
+ k,
1100
1107
  v,
1101
- t
1108
+ e
1102
1109
  ]), null;
1103
- }, mr = ({ block: t, label: e }) => {
1104
- const [, n] = _n(() => ({
1110
+ }, mr = ({ block: e, label: t }) => {
1111
+ const [, n] = Mn(() => ({
1105
1112
  type: "CANVAS_BLOCK",
1106
- item: t
1113
+ item: e
1107
1114
  }));
1108
1115
  return /* @__PURE__ */ r.jsxs(
1109
1116
  "div",
@@ -1115,72 +1122,72 @@ const dr = () => {
1115
1122
  },
1116
1123
  children: [
1117
1124
  /* @__PURE__ */ r.jsx(Pt, {}),
1118
- e
1125
+ t
1119
1126
  ]
1120
1127
  }
1121
1128
  );
1122
- }, yr = ({ selectedBlockElement: t, block: e }) => {
1123
- const n = Je(), i = Ve(), [, c] = H(), [, s] = K(), { floatingStyles: a, refs: l, update: f } = Pn({
1129
+ }, yr = ({ selectedBlockElement: e, block: t }) => {
1130
+ const n = Je(), o = Ve(), [, l] = H(), [, s] = K(), { floatingStyles: i, refs: c, update: p } = Pn({
1124
1131
  placement: "top-start",
1125
- middleware: [Mn(), Rn()],
1132
+ middleware: [Rn(), An()],
1126
1133
  elements: {
1127
- reference: t
1134
+ reference: e
1128
1135
  }
1129
1136
  });
1130
- Ln(t, () => f(), t !== null);
1131
- const u = B(e, "_parent", null), h = U(B(e, "_name", "")) ? B(e, "_type", "") : B(e, "_name", "");
1132
- return !t || !e ? null : /* @__PURE__ */ r.jsxs(
1137
+ Ln(e, () => p(), e !== null);
1138
+ const u = B(t, "_parent", null), h = U(B(t, "_name", "")) ? B(t, "_type", "") : B(t, "_name", "");
1139
+ return !e || !t ? null : /* @__PURE__ */ r.jsxs(
1133
1140
  "div",
1134
1141
  {
1135
1142
  role: "button",
1136
1143
  tabIndex: 0,
1137
- ref: l.setFloating,
1138
- style: a,
1139
- onClick: (p) => {
1140
- p.stopPropagation(), p.preventDefault();
1144
+ ref: c.setFloating,
1145
+ style: i,
1146
+ onClick: (f) => {
1147
+ f.stopPropagation(), f.preventDefault();
1141
1148
  },
1142
- onKeyDown: (p) => p.stopPropagation(),
1149
+ onKeyDown: (f) => f.stopPropagation(),
1143
1150
  className: "z-50 flex h-6 items-center bg-blue-500 py-2 text-xs text-white",
1144
1151
  children: [
1145
- /* @__PURE__ */ r.jsx(mr, { label: h, block: e }),
1152
+ /* @__PURE__ */ r.jsx(mr, { label: h, block: t }),
1146
1153
  /* @__PURE__ */ r.jsxs("div", { className: "flex gap-2 px-1 ", children: [
1147
1154
  u && /* @__PURE__ */ r.jsx(
1148
- Mt,
1155
+ Rt,
1149
1156
  {
1150
1157
  className: "hover:scale-105 ",
1151
1158
  onClick: () => {
1152
- s([]), c([u]);
1159
+ s([]), l([u]);
1153
1160
  }
1154
1161
  }
1155
1162
  ),
1156
- gn(B(e, "_type", "")) ? /* @__PURE__ */ r.jsx(_t, { className: "hover:scale-105 ", onClick: () => i([e == null ? void 0 : e._id]) }) : null,
1157
- mn(B(e, "_type", "")) ? /* @__PURE__ */ r.jsx(Lt, { className: "hover:scale-105 ", onClick: () => n([e == null ? void 0 : e._id]) }) : null
1163
+ hn(B(t, "_type", "")) ? /* @__PURE__ */ r.jsx(Mt, { className: "hover:scale-105 ", onClick: () => o([t == null ? void 0 : t._id]) }) : null,
1164
+ gn(B(t, "_type", "")) ? /* @__PURE__ */ r.jsx(Lt, { className: "hover:scale-105 ", onClick: () => n([t == null ? void 0 : t._id]) }) : null
1158
1165
  ] })
1159
1166
  ]
1160
1167
  }
1161
1168
  );
1162
- }, vr = ({ model: t }) => {
1163
- const [e] = yn(), [n] = H(), [i] = Ye(), [c] = ie(), [s] = K(), { document: a, window: l } = ae(), [f] = W(a == null ? void 0 : a.getElementById("highlighted-block")), [u] = W(
1164
- a == null ? void 0 : a.getElementById("selected-block")
1165
- ), [h] = W(
1166
- a == null ? void 0 : a.getElementById("selected-styling-block")
1169
+ }, vr = ({ model: e }) => {
1170
+ const [t] = mn(), [n] = H(), [o] = Ye(), [l] = ie(), [s] = K(), { document: i, window: c } = ae(), [p] = $(i == null ? void 0 : i.getElementById("highlighted-block")), [u] = $(
1171
+ i == null ? void 0 : i.getElementById("selected-block")
1172
+ ), [h] = $(
1173
+ i == null ? void 0 : i.getElementById("selected-styling-block")
1167
1174
  );
1168
1175
  M(() => {
1169
- i ? a == null || a.documentElement.classList.add("dark") : a == null || a.documentElement.classList.remove("dark");
1170
- }, [i, a]);
1171
- const p = B(e, "headingFont", "DM Sans"), v = B(e, "bodyFont", "DM Sans");
1176
+ o ? i == null || i.documentElement.classList.add("dark") : i == null || i.documentElement.classList.remove("dark");
1177
+ }, [o, i]);
1178
+ const f = B(t, "headingFont", "DM Sans"), v = B(t, "bodyFont", "DM Sans");
1172
1179
  return M(() => {
1173
- const w = B(e, "primaryColor", "#000"), R = B(e, "secondaryColor", "#FFF"), j = Nn({
1174
- colors: [w, R],
1180
+ const k = B(t, "primaryColor", "#000"), P = B(t, "secondaryColor", "#FFF"), j = _n({
1181
+ colors: [k, P],
1175
1182
  names: ["primary", "secondary"]
1176
1183
  });
1177
- j.primary.DEFAULT = w, j.secondary.DEFAULT = R;
1178
- const I = B(e, "roundedCorners", "0");
1179
- !l || !l.tailwind || (l.tailwind.config = {
1184
+ j.primary.DEFAULT = k, j.secondary.DEFAULT = P;
1185
+ const I = B(t, "roundedCorners", "0");
1186
+ !c || !c.tailwind || (c.tailwind.config = {
1180
1187
  darkMode: "class",
1181
1188
  theme: {
1182
1189
  fontFamily: {
1183
- heading: [p],
1190
+ heading: [f],
1184
1191
  body: [v]
1185
1192
  },
1186
1193
  extend: {
@@ -1192,48 +1199,48 @@ const dr = () => {
1192
1199
  },
1193
1200
  plugins: [
1194
1201
  // @ts-ignore
1195
- l.tailwind.plugin.withOptions(({ prefix: m = "ui" } = {}) => ({ addVariant: V }) => {
1196
- for (const _ of ["open", "checked", "selected", "active", "disabled"])
1197
- V(`${m}-${_}`, [
1198
- `&[data-headlessui-state~="${_}"]`,
1199
- `:where([data-headlessui-state~="${_}"]) &`
1200
- ]), V(`${m}-not-${_}`, [
1201
- `&[data-headlessui-state]:not([data-headlessui-state~="${_}"])`,
1202
- `:where([data-headlessui-state]:not([data-headlessui-state~="${_}"])) &:not([data-headlessui-state])`
1202
+ c.tailwind.plugin.withOptions(({ prefix: m = "ui" } = {}) => ({ addVariant: V }) => {
1203
+ for (const L of ["open", "checked", "selected", "active", "disabled"])
1204
+ V(`${m}-${L}`, [
1205
+ `&[data-headlessui-state~="${L}"]`,
1206
+ `:where([data-headlessui-state~="${L}"]) &`
1207
+ ]), V(`${m}-not-${L}`, [
1208
+ `&[data-headlessui-state]:not([data-headlessui-state~="${L}"])`,
1209
+ `:where([data-headlessui-state]:not([data-headlessui-state~="${L}"])) &:not([data-headlessui-state])`
1203
1210
  ]);
1204
1211
  })
1205
1212
  ]
1206
1213
  });
1207
- }, [e, l, p, v]), M(() => {
1208
- u && (u.textContent = `${ne(n, (w) => `[data-block-id="${w}"]`).join(",")}{
1214
+ }, [t, c, f, v]), M(() => {
1215
+ u && (u.textContent = `${ne(n, (k) => `[data-block-id="${k}"]`).join(",")}{
1209
1216
  outline: 1px solid ${n.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
1210
1217
  }`);
1211
1218
  }, [n, u]), M(() => {
1212
- f && (f.textContent = c ? `[data-style-id="${c}"]{ outline: 1px solid orange !important; outline-offset: -1px;}` : "");
1213
- }, [c, n, f]), M(() => {
1214
- h && (h.textContent = `${ne(s, ({ id: w }) => `[data-style-id="${w}"]`).join(",")}{
1219
+ p && (p.textContent = l ? `[data-style-id="${l}"]{ outline: 1px solid orange !important; outline-offset: -1px;}` : "");
1220
+ }, [l, n, p]), M(() => {
1221
+ h && (h.textContent = `${ne(s, ({ id: k }) => `[data-style-id="${k}"]`).join(",")}{
1215
1222
  outline: 1px solid orange !important; outline-offset: -1px;
1216
1223
  }`);
1217
1224
  }, [s, h]), M(() => {
1218
- if (t === "section")
1225
+ if (e === "section")
1219
1226
  return;
1220
- const w = B(e, "bodyTextLightColor", "#64748b"), R = B(e, "bodyTextDarkColor", "#94a3b8"), j = B(e, "bodyBgLightColor", "#FFFFFF"), I = B(e, "bodyBgDarkColor", "#0f172a");
1221
- a.body.className = `font-body antialiased text-[${w}] bg-[${j}] dark:text-[${R}] dark:bg-[${I}]`;
1222
- }, [e, a, t]), t === "page" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1223
- p && /* @__PURE__ */ r.jsx(
1227
+ const k = B(t, "bodyTextLightColor", "#64748b"), P = B(t, "bodyTextDarkColor", "#94a3b8"), j = B(t, "bodyBgLightColor", "#FFFFFF"), I = B(t, "bodyBgDarkColor", "#0f172a");
1228
+ i.body.className = `font-body antialiased text-[${k}] bg-[${j}] dark:text-[${P}] dark:bg-[${I}]`;
1229
+ }, [t, i, e]), e === "page" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1230
+ f && /* @__PURE__ */ r.jsx(
1224
1231
  "link",
1225
1232
  {
1226
1233
  id: "heading-font",
1227
1234
  rel: "stylesheet",
1228
1235
  type: "text/css",
1229
- href: `https://fonts.googleapis.com/css2?family=${p.replace(
1236
+ href: `https://fonts.googleapis.com/css2?family=${f.replace(
1230
1237
  / /g,
1231
1238
  "+"
1232
1239
  )}:wght@300;400;500;600;700;800;900&display=swap`,
1233
1240
  media: "all"
1234
1241
  }
1235
1242
  ),
1236
- v && p !== v && /* @__PURE__ */ r.jsx(
1243
+ v && f !== v && /* @__PURE__ */ r.jsx(
1237
1244
  "link",
1238
1245
  {
1239
1246
  id: "body-font",
@@ -1246,122 +1253,122 @@ const dr = () => {
1246
1253
  media: "all"
1247
1254
  }
1248
1255
  ),
1249
- p && /* @__PURE__ */ r.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${p}",ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";}` })
1256
+ f && /* @__PURE__ */ r.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${f}",ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";}` })
1250
1257
  ] }) : null;
1251
- }, xr = (t) => {
1252
- const e = {};
1253
- return Object.keys(t).forEach((n) => {
1254
- be(t[n]) && t[n].startsWith(Oe) && (e[n] = t[n].replace(Oe, "").split(","));
1255
- }), e;
1256
- }, br = Tt((t) => {
1257
- const e = t.replace(Qe, "").split(",");
1258
- return $n(e[0], e[1]);
1258
+ }, xr = (e) => {
1259
+ const t = {};
1260
+ return Object.keys(e).forEach((n) => {
1261
+ be(e[n]) && e[n].startsWith(Oe) && (t[n] = e[n].replace(Oe, "").split(","));
1262
+ }), t;
1263
+ }, br = Ct((e) => {
1264
+ const t = e.replace(Qe, "").split(",");
1265
+ return Fn(t[0], t[1]);
1259
1266
  });
1260
- function kr(t, e) {
1261
- return B(t, `${e}_attrs`, {});
1267
+ function wr(e, t) {
1268
+ return B(e, `${t}_attrs`, {});
1262
1269
  }
1263
- function wr(t) {
1264
- const e = {};
1265
- return Object.keys(t).forEach((n) => {
1266
- if (be(t[n]) && t[n].startsWith(Qe)) {
1267
- const i = br(t[n]);
1268
- e[n] = {
1269
- className: i,
1270
+ function kr(e) {
1271
+ const t = {};
1272
+ return Object.keys(e).forEach((n) => {
1273
+ if (be(e[n]) && e[n].startsWith(Qe)) {
1274
+ const o = br(e[n]);
1275
+ t[n] = {
1276
+ className: o,
1270
1277
  "data-style-prop": n,
1271
- "data-block-parent": t._id,
1272
- "data-style-id": `${n}-${t._id}`,
1273
- ...kr(t, n)
1278
+ "data-block-parent": e._id,
1279
+ "data-style-id": `${n}-${e._id}`,
1280
+ ...wr(e, n)
1274
1281
  };
1275
1282
  }
1276
- }), e;
1283
+ }), t;
1277
1284
  }
1278
- function jr(t, e) {
1279
- const n = B(t, "_bindings", {});
1280
- return U(n) ? { ...t } : (St(n, (i, c) => {
1281
- be(i) && B(e, i, null) && (t[c] = B(e, i, null));
1282
- }), t);
1285
+ function jr(e, t) {
1286
+ const n = B(e, "_bindings", {});
1287
+ return U(n) ? { ...e } : (Tt(n, (o, l) => {
1288
+ be(o) && B(t, o, null) && (e[l] = B(t, o, null));
1289
+ }), e);
1283
1290
  }
1284
- function ve({ blocks: t }) {
1285
- const e = Ze(), n = xe((s) => wr(s), []), [i] = En(), [c] = vn(Q);
1291
+ function ve({ blocks: e }) {
1292
+ const t = Ze(), n = xe((s) => kr(s), []), [o] = Sn(), [l] = yn(Q);
1286
1293
  return /* @__PURE__ */ r.jsx(r.Fragment, { children: Y.Children.toArray(
1287
- t.map((s, a) => {
1288
- if (c === s._id)
1294
+ e.map((s, i) => {
1295
+ if (l === s._id)
1289
1296
  return null;
1290
- const l = xr(s), f = {};
1291
- U(l) || Object.keys(l).forEach((v) => {
1292
- f[v] = Y.Children.toArray(
1293
- l[v].map((w) => /* @__PURE__ */ r.jsx(ve, { blocks: [Et(e, { _id: w })] }))
1297
+ const c = xr(s), p = {};
1298
+ U(c) || Object.keys(c).forEach((v) => {
1299
+ p[v] = Y.Children.toArray(
1300
+ c[v].map((k) => /* @__PURE__ */ r.jsx(ve, { blocks: [St(t, { _id: k })] }))
1294
1301
  );
1295
1302
  });
1296
- const u = ze(e, { _parent: s._id });
1297
- f.children = u.length ? /* @__PURE__ */ r.jsx(ve, { blocks: u }) : null;
1298
- const h = Wn(s._type), p = B(h, "component", null);
1299
- return It(p) ? /* @__PURE__ */ r.jsx("noscript", { children: `<!-- ${s == null ? void 0 : s._type} not registered -->` }) : /* @__PURE__ */ r.jsx(Ue, { children: Y.createElement(p, {
1303
+ const u = ze(t, { _parent: s._id });
1304
+ p.children = u.length ? /* @__PURE__ */ r.jsx(ve, { blocks: u }) : null;
1305
+ const h = Wn(s._type), f = B(h, "component", null);
1306
+ return Et(f) ? /* @__PURE__ */ r.jsx("noscript", { children: `<!-- ${s == null ? void 0 : s._type} not registered -->` }) : /* @__PURE__ */ r.jsx(Ue, { children: Y.createElement(f, {
1300
1307
  blockProps: {
1301
1308
  "data-block-id": s._id,
1302
1309
  "data-block-type": s._type,
1303
- "data-dnd": xn(s._type) ? "branch" : "leaf"
1310
+ "data-dnd": vn(s._type) ? "branch" : "leaf"
1304
1311
  },
1305
1312
  inBuilder: !0,
1306
- index: a,
1307
- ...jr(s, i),
1313
+ index: i,
1314
+ ...jr(s, o),
1308
1315
  ...n(s),
1309
- ...f
1316
+ ...p
1310
1317
  }) });
1311
1318
  })
1312
1319
  ) });
1313
1320
  }
1314
1321
  const Cr = () => {
1315
- const t = Ze();
1316
- return /* @__PURE__ */ r.jsx(Fn, { children: U(t) ? null : /* @__PURE__ */ r.jsx(In, { children: /* @__PURE__ */ r.jsx(ve, { blocks: ze(t, (e) => U(e._parent)) }) }) });
1317
- }, Tr = (t, e) => t.querySelector(`[data-style-id="${e}"]`), Sr = () => {
1318
- const [t] = F(bn), [e] = Xe(), [n] = we(), [, i] = H(), c = kn(), [, s] = ie(), a = Se(null), l = Se(null), [f, u] = W({ width: 0, height: 0 }), h = Xn(f), [p, v] = W(0), [w, R] = W([]), [, j] = W([]), [, I] = F(wn), [m, V] = K(), _ = jn("loadingCanvas", !1);
1322
+ const e = Ze();
1323
+ return /* @__PURE__ */ r.jsx(Nn, { children: U(e) ? null : /* @__PURE__ */ r.jsx(En, { children: /* @__PURE__ */ r.jsx(ve, { blocks: ze(e, (t) => U(t._parent)) }) }) });
1324
+ }, Tr = (e, t) => e.querySelector(`[data-style-id="${t}"]`), Sr = () => {
1325
+ const [e] = F(xn), [t] = Xe(), [n] = ke(), [, o] = H(), l = bn(), [, s] = ie(), i = Se(null), c = Se(null), [p, u] = $({ width: 0, height: 0 }), h = Vn(p), [f, v] = $(0), [k, P] = $([]), [, j] = $([]), [, I] = F(wn), [m, V] = K(), L = kn("loadingCanvas", !1);
1319
1326
  M(() => {
1320
- const { clientWidth: D, clientHeight: L } = l.current;
1321
- u({ width: D, height: L }), p === 0 && v(D);
1322
- }, [l, n, p]);
1323
- const le = (D, L = 0) => {
1327
+ const { clientWidth: D, clientHeight: _ } = c.current;
1328
+ u({ width: D, height: _ }), f === 0 && v(D);
1329
+ }, [c, n, f]);
1330
+ const le = (D, _ = 0) => {
1324
1331
  const { top: N } = D.getBoundingClientRect();
1325
- return N + L >= 0 && N - L <= window.innerHeight;
1332
+ return N + _ >= 0 && N - _ <= window.innerHeight;
1326
1333
  };
1327
1334
  M(() => {
1328
- var D, L;
1329
- if (c && c.type !== "Multiple" && a.current) {
1330
- const N = ct(a.current.contentDocument, c._id);
1331
- N && (le(N) || (L = (D = a.current) == null ? void 0 : D.contentWindow) == null || L.scrollTo({ top: N.offsetTop, behavior: "smooth" }), R([N]));
1335
+ var D, _;
1336
+ if (l && l.type !== "Multiple" && i.current) {
1337
+ const N = lt(i.current.contentDocument, l._id);
1338
+ N && (le(N) || (_ = (D = i.current) == null ? void 0 : D.contentWindow) == null || _.scrollTo({ top: N.offsetTop, behavior: "smooth" }), P([N]));
1332
1339
  }
1333
- }, [c]), M(() => {
1334
- if (!U(m) && a.current) {
1340
+ }, [l]), M(() => {
1341
+ if (!U(m) && i.current) {
1335
1342
  const D = Tr(
1336
- a.current.contentDocument,
1343
+ i.current.contentDocument,
1337
1344
  re(m).id
1338
1345
  );
1339
1346
  j(D ? [D] : [null]);
1340
1347
  } else
1341
1348
  j([null]);
1342
1349
  }, [m]);
1343
- const ce = kt(() => {
1344
- let D = Vn;
1345
- return t === "offline" && (D = D.replace(
1350
+ const ce = bt(() => {
1351
+ let D = Kn;
1352
+ return e === "offline" && (D = D.replace(
1346
1353
  "https://old.chaibuilder.com/offline/tailwind.cdn.js",
1347
1354
  "/offline/tailwind.cdn.js"
1348
1355
  ), D = D.replace("https://unpkg.com/aos@next/dist/aos.css", "/offline/aos.css"), D = D.replace("https://unpkg.com/aos@next/dist/aos.js", "/offline/aos.js")), D;
1349
- }, [t]);
1356
+ }, [e]);
1350
1357
  return /* @__PURE__ */ r.jsx(
1351
1358
  "div",
1352
1359
  {
1353
1360
  onClick: () => {
1354
- i([]), V([]);
1361
+ o([]), V([]);
1355
1362
  },
1356
1363
  onMouseLeave: () => setTimeout(() => s(""), 300),
1357
1364
  className: "relative mx-auto h-full w-full",
1358
- style: p > 0 && !U(h) ? { width: e ? "100%" : p } : {},
1359
- ref: l,
1365
+ style: f > 0 && !U(h) ? { width: t ? "100%" : f } : {},
1366
+ ref: c,
1360
1367
  children: /* @__PURE__ */ r.jsxs(
1361
- sr,
1368
+ rr,
1362
1369
  {
1363
- contentDidMount: () => I(a.current),
1364
- ref: a,
1370
+ contentDidMount: () => I(i.current),
1371
+ ref: i,
1365
1372
  id: "canvas-iframe",
1366
1373
  style: { width: `${n}px`, ...h },
1367
1374
  className: "relative mx-auto box-content h-full max-w-full shadow-lg transition-all duration-300 ease-linear",
@@ -1371,12 +1378,12 @@ const Cr = () => {
1371
1378
  /* @__PURE__ */ r.jsx(
1372
1379
  yr,
1373
1380
  {
1374
- block: c,
1375
- selectedBlockElement: re(w)
1381
+ block: l,
1382
+ selectedBlockElement: re(k)
1376
1383
  }
1377
1384
  ),
1378
1385
  /* @__PURE__ */ r.jsx(vr, { model: "page" }),
1379
- /* @__PURE__ */ r.jsx(hr, { children: _ ? /* @__PURE__ */ r.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ r.jsx(Ge, { className: "h-full" }) }) : /* @__PURE__ */ r.jsx(Cr, {}) }),
1386
+ /* @__PURE__ */ r.jsx(hr, { children: L ? /* @__PURE__ */ r.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ r.jsx(Ge, { className: "h-full" }) }) : /* @__PURE__ */ r.jsx(Cr, {}) }),
1380
1387
  /* @__PURE__ */ r.jsx("div", { id: "placeholder", className: "absolute bg-green-500 z-[99999] max-w-full transition-transform" })
1381
1388
  ]
1382
1389
  }
@@ -1384,15 +1391,15 @@ const Cr = () => {
1384
1391
  }
1385
1392
  );
1386
1393
  }, Er = wt(() => import("./AddBlocks-imyQSCbI.js")), Ns = () => {
1387
- const [t, e] = F(Cn);
1394
+ const [e, t] = F(jn);
1388
1395
  return /* @__PURE__ */ r.jsxs("div", { className: "flex h-full w-full flex-col", children: [
1389
- /* @__PURE__ */ r.jsx(Kn, {}),
1396
+ /* @__PURE__ */ r.jsx(Yn, {}),
1390
1397
  /* @__PURE__ */ r.jsxs("div", { className: "relative flex-1 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: [
1391
- /* @__PURE__ */ r.jsx(Ue, { fallback: /* @__PURE__ */ r.jsx(Ge, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(Dn, { children: /* @__PURE__ */ r.jsx(Sr, {}) }) }),
1392
- t ? /* @__PURE__ */ r.jsx(
1398
+ /* @__PURE__ */ r.jsx(Ue, { fallback: /* @__PURE__ */ r.jsx(Ge, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(In, { children: /* @__PURE__ */ r.jsx(Sr, {}) }) }),
1399
+ e ? /* @__PURE__ */ r.jsx(
1393
1400
  "div",
1394
1401
  {
1395
- onClick: () => e(!1),
1402
+ onClick: () => t(!1),
1396
1403
  className: "absolute inset-0 z-50 flex items-center bg-black/30 backdrop-blur-sm",
1397
1404
  children: /* @__PURE__ */ r.jsx(
1398
1405
  "div",