@chaibuilder/sdk 1.2.9 → 1.2.11

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 (102) hide show
  1. package/README.md +10 -12
  2. package/dist/AddBlocks-TSt8uJY4.js +218 -0
  3. package/dist/AddBlocks-k2p8Hy1n.cjs +1 -0
  4. package/dist/BrandingOptions-WyVWfFVz.cjs +1 -0
  5. package/dist/{BrandingOptions-QJJ1y5ez.js → BrandingOptions-uFTyYJZj.js} +18 -22
  6. package/dist/CanvasArea-5erOZYLy.cjs +60 -0
  7. package/dist/{CanvasArea-mlNKmCOh.js → CanvasArea-iRQqpOak.js} +465 -481
  8. package/dist/{utils-AvyFzbPC.js → Class-17XFhL48.js} +15 -16
  9. package/dist/Class-5ARpH_Tu.cjs +1 -0
  10. package/dist/CurrentPage-NzmJloN7.cjs +1 -0
  11. package/dist/{CurrentPage-lBy25sZn.js → CurrentPage-RCxTz9Mc.js} +24 -26
  12. package/dist/{Layers-3Xs4A5i8.js → Layers-tXB5Pwid.js} +124 -158
  13. package/dist/Layers-xDG7oltg.cjs +1 -0
  14. package/dist/PagesPanel-72nzYB1k.cjs +1 -0
  15. package/dist/{PagesPanel--BZhafnt.js → PagesPanel-Jaz9jvye.js} +14 -16
  16. package/dist/{ProjectPanel-YcLkM-DW.js → ProjectPanel--S014Xx3.js} +22 -24
  17. package/dist/ProjectPanel-RU0QvH6e.cjs +1 -0
  18. package/dist/Settings-5EuwaVb3.cjs +1 -0
  19. package/dist/{Settings-TAgX4hov.js → Settings-gjvl5V1k.js} +556 -579
  20. package/dist/{SidePanels-btVQQkVK.js → SidePanels-Fq3kRwR0.js} +54 -51
  21. package/dist/SidePanels-uNCxnGte.cjs +1 -0
  22. package/dist/Topbar-JqW89xI5.cjs +1 -0
  23. package/dist/{Topbar-j4t4AgCq.js → Topbar-m5dbbI1f.js} +15 -17
  24. package/dist/{UnsplashImages-41Y3q5_Q.js → UnsplashImages-GhBD6owT.js} +24 -26
  25. package/dist/UnsplashImages-vACw5hbK.cjs +1 -0
  26. package/dist/UploadImages-PzHdEKHT.cjs +1 -0
  27. package/dist/{UploadImages-xBg-kbKv.js → UploadImages-S1HgxeGb.js} +23 -25
  28. package/dist/{add-page-modal-cm8damU2.js → add-page-modal-2P5hGXOQ.js} +15 -17
  29. package/dist/add-page-modal-GAizM2Jw.cjs +1 -0
  30. package/dist/{confirm-alert-i4pM3mOt.js → confirm-alert-57Xq5foA.js} +12 -14
  31. package/dist/confirm-alert-Uf84DpdR.cjs +1 -0
  32. package/dist/core.cjs +1 -1
  33. package/dist/core.d.ts +13 -58
  34. package/dist/core.js +47 -58
  35. package/dist/defaultTheme-IH19g4fv.cjs +1 -0
  36. package/dist/defaultTheme-YY8mlQS3.js +1055 -0
  37. package/dist/delete-page-modal-MG42FdnU.cjs +1 -0
  38. package/dist/{delete-page-modal-YrIBvfFA.js → delete-page-modal-ix5IjaFW.js} +27 -29
  39. package/dist/email-blocks.cjs +1 -1
  40. package/dist/email-blocks.js +100 -81
  41. package/dist/email.cjs +1 -0
  42. package/dist/email.d.ts +116 -0
  43. package/dist/email.js +79 -0
  44. package/dist/{controls-XPXGHKht.js → empty-slot-MWycClTb.js} +61 -50
  45. package/dist/empty-slot-TF2kd-0X.cjs +1 -0
  46. package/dist/{form-VbouZlAW.cjs → form-KBb3kA8g.cjs} +1 -1
  47. package/dist/{form-OVmsLOrc.js → form-SYcFyACJ.js} +18 -18
  48. package/dist/{index-pZhGT8uT.js → index-Fj3ead-J.js} +4886 -4884
  49. package/dist/index-aiHDvS5v.cjs +1 -0
  50. package/dist/{index-N50dZnlC.cjs → index-cM3eKmlx.cjs} +25 -25
  51. package/dist/index-pNYv0oAF.js +2994 -0
  52. package/dist/lib.cjs +3 -3
  53. package/dist/lib.js +95 -1125
  54. package/dist/page-viewer-Sh99FGYk.cjs +1 -0
  55. package/dist/{page-viewer-feqJr1QI.js → page-viewer-VxqOevr4.js} +15 -17
  56. package/dist/project-general-setting-VTLHa-Ik.cjs +1 -0
  57. package/dist/{project-general-setting-SgagORzW.js → project-general-setting-nWOjPiin.js} +15 -17
  58. package/dist/{project-seo-setting-wxAGEkd_.js → project-seo-setting-70bWTwsB.js} +17 -19
  59. package/dist/project-seo-setting-ENAKc2Dl.cjs +1 -0
  60. package/dist/render.cjs +1 -1
  61. package/dist/render.d.ts +2 -0
  62. package/dist/render.js +111 -70
  63. package/dist/{single-page-detail-dnWMyg6P.js → single-page-detail-3z7TF-Yy.js} +44 -46
  64. package/dist/single-page-detail-6L38HJC4.cjs +1 -0
  65. package/dist/studio.cjs +1 -1
  66. package/dist/studio.js +13 -15
  67. package/dist/ui.cjs +1 -1
  68. package/dist/ui.d.ts +4 -4
  69. package/dist/ui.js +149 -151
  70. package/dist/{useAddBlockByDrop-inkD7Lck.cjs → useAddBlockByDrop-7mUMwNSG.cjs} +1 -1
  71. package/dist/{useAddBlockByDrop-_nwI4W3q.js → useAddBlockByDrop-tjQ5DgiO.js} +1 -1
  72. package/dist/web-blocks.cjs +1 -9
  73. package/dist/web-blocks.js +431 -442
  74. package/package.json +8 -2
  75. package/dist/AddBlocks-tMxKPoen.js +0 -225
  76. package/dist/AddBlocks-x2LkOHSj.cjs +0 -1
  77. package/dist/BrandingOptions-EzT9UYd6.cjs +0 -1
  78. package/dist/CanvasArea-xs4wM64L.cjs +0 -60
  79. package/dist/CurrentPage-aaU4F7wi.cjs +0 -1
  80. package/dist/Layers-eaHy5PK9.cjs +0 -1
  81. package/dist/MarkAsGlobalBlock-BjP-Rqlf.js +0 -88
  82. package/dist/MarkAsGlobalBlock-X5dNmZcb.cjs +0 -1
  83. package/dist/PagesPanel-gGKCV394.cjs +0 -1
  84. package/dist/ProjectPanel-yFJRy0_E.cjs +0 -1
  85. package/dist/Settings-7wlLcvoh.cjs +0 -1
  86. package/dist/SidePanels-5H4j0mIs.cjs +0 -1
  87. package/dist/Topbar-V8xCetWF.cjs +0 -1
  88. package/dist/UnsplashImages-DbHky6cj.cjs +0 -1
  89. package/dist/UploadImages-DnQ95_NW.cjs +0 -1
  90. package/dist/add-page-modal-MwS7iXn_.cjs +0 -1
  91. package/dist/confirm-alert-U7-NcG7G.cjs +0 -1
  92. package/dist/controls-Dy1qa8Dc.cjs +0 -1
  93. package/dist/delete-page-modal-5o4jXu-z.cjs +0 -1
  94. package/dist/functions-Ox_svtKm.cjs +0 -1
  95. package/dist/functions-xIebp8Aw.js +0 -23
  96. package/dist/index-H6vIwGfD.cjs +0 -1
  97. package/dist/index-niHREMmR.js +0 -2938
  98. package/dist/page-viewer-SLt8XgYv.cjs +0 -1
  99. package/dist/project-general-setting-ym0yCdOq.cjs +0 -1
  100. package/dist/project-seo-setting-Snn2nZgS.cjs +0 -1
  101. package/dist/single-page-detail-IPod1o5P.cjs +0 -1
  102. package/dist/utils-PTxFk6qT.cjs +0 -1
@@ -1,32 +1,33 @@
1
- var jt = Object.defineProperty;
2
- var Tt = (e, t, n) => t in e ? jt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var J = (e, t, n) => (Tt(e, typeof t != "symbol" ? t + "" : t, n), n);
1
+ var kt = Object.defineProperty;
2
+ var jt = (e, t, n) => t in e ? kt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
+ var Y = (e, t, n) => (jt(e, typeof t != "symbol" ? t + "" : t, n), n);
4
4
  import { j as r } from "./jsx-runtime-WbnYoNE9.js";
5
- import V, { createElement as be, useCallback as je, useState as q, useEffect as M, Component as Ke, Children as Ct, Suspense as Je, useRef as Oe, useMemo as It } from "react";
6
- import { map as re, includes as Ae, toUpper as pe, round as Et, throttle as Ve, noop as te, isEmpty as K, first as ae, omit as St, pick as Dt, get as D, isString as Te, memoize as Bt, each as _t, find as Ot, filter as Xe, isNull as At } from "lodash-es";
7
- import { ResetIcon as Pe, MobileIcon as Re, LaptopIcon as Pt, DesktopIcon as Rt, DotsVerticalIcon as Mt, EraserIcon as Lt, ZoomInIcon as Nt, DragHandleDots2Icon as Ft, ArrowUpIcon as $t, CopyIcon as Wt, TrashIcon as Ht } from "@radix-ui/react-icons";
8
- import { p as Ce, B as le, X as Ze, aI as qt, aJ as Ut, aK as zt, aL as Yt, aM as Kt, U as Ie, aj as Jt, i as Ee, aN as Vt, aO as Xt, aP as Zt, aQ as Qt, aR as Gt, aS as en, w as tn, j as U, ak as X, E as nn, F as rn, G as on, H as sn, I as an, J as ln, K as cn, L as dn, aq as un, M as pn, V as Qe, aH as ie, aT as fn, $ as Q, ac as hn, aU as G, af as Se, m as Ge, n as gn, k as mn, o as yn, h as et, l as tt, ah as vn, aV as xn, aW as nt, aX as bn, aY as kn, x as wn, aZ as jn, a7 as Tn, a_ as Cn, S as rt } from "./index-niHREMmR.js";
5
+ import K, { createElement as _e, useCallback as ke, useState as $, useEffect as R, Component as Ye, Children as Tt, Suspense as Ke, useRef as Be, useMemo as Ct } from "react";
6
+ import { map as re, includes as Oe, toUpper as pe, round as Et, throttle as Je, noop as te, isEmpty as z, first as ae, omit as It, pick as St, get as D, isString as je, memoize as Dt, each as _t, find as Bt, filter as Ve, isNull as Ot, has as At } from "lodash-es";
7
+ import { ResetIcon as Ae, MobileIcon as Re, LaptopIcon as Rt, DesktopIcon as Pt, DotsVerticalIcon as Mt, EraserIcon as Lt, ZoomInIcon as Nt, DragHandleDots2Icon as Ft, ArrowUpIcon as $t, CopyIcon as Wt, TrashIcon as Ht } from "@radix-ui/react-icons";
8
+ import { m as Ge, B as le, R as Qe, ay as Ut, az as qt, aA as zt, aB as Yt, aC as Kt, M as Te, aa as Jt, i as Ce, aD as Vt, aE as Gt, aF as Qt, aG as Zt, aH as Xt, aI as en, aJ as tn, j as W, ab as J, A as nn, z as rn, C as on, D as sn, E as an, F as ln, G as cn, H as dn, ah as un, N as Ze, ax as ie, aK as pn, W as Z, a3 as fn, aL as X, s as Ee, l as Xe, h as et, k as tt, a8 as hn, aM as gn, aN as nt, aO as mn, aP as yn, t as vn, aQ as xn, $ as bn, aR as wn, S as rt } from "./index-pNYv0oAF.js";
9
9
  import { useTranslation as de } from "react-i18next";
10
- import { useAtom as N } from "jotai";
11
- import Me from "react-dom";
12
- import { g as In } from "./_commonjsHelpers-UyOWmZb0.js";
13
- import { r as ot, u as En, B as Sn, E as Dn } from "./index-pZhGT8uT.js";
14
- import { Quill as Bn } from "react-quill";
15
- import { u as _n } from "./useAddBlockByDrop-_nwI4W3q.js";
10
+ import { useAtom as M } from "jotai";
11
+ import Pe from "react-dom";
12
+ import { g as kn } from "./_commonjsHelpers-UyOWmZb0.js";
13
+ import { r as ot, u as jn, B as Tn, E as Cn } from "./index-Fj3ead-J.js";
14
+ import { Quill as En } from "react-quill";
15
+ import { u as In } from "./useAddBlockByDrop-tjQ5DgiO.js";
16
16
  import { useFeature as st } from "flagged";
17
- import { flip as On } from "@floating-ui/dom";
18
- import { useFloating as An, shift as Pn } from "@floating-ui/react-dom";
19
- import { useResizeObserver as Rn } from "@react-hookz/web";
20
- import { tailwindcssPaletteGenerator as Mn } from "@bobthered/tailwindcss-palette-generator";
21
- import { Provider as Ln } from "react-wrap-balancer";
22
- import { twMerge as Nn } from "tailwind-merge";
23
- import { S as Le, a as it } from "./MODIFIERS-RiXS5Mn1.js";
24
- import { getBlockComponent as at } from "@chaibuilder/runtime";
25
- import { has as Fn } from "lodash";
17
+ import { flip as Sn } from "@floating-ui/dom";
18
+ import { useFloating as Dn, shift as _n } from "@floating-ui/react-dom";
19
+ import { useResizeObserver as Bn } from "@react-hookz/web";
20
+ import { tailwindcssPaletteGenerator as On } from "@bobthered/tailwindcss-palette-generator";
21
+ import { Provider as An } from "react-wrap-balancer";
22
+ import { twMerge as Rn } from "tailwind-merge";
23
+ import { S as Me, a as it } from "./MODIFIERS-RiXS5Mn1.js";
24
+ import { getBlockComponent as Pn } from "@chaibuilder/runtime";
25
+ import "./Functions-7jnEwJyw.js";
26
+ import "clsx";
27
+ import "flat-to-nested";
26
28
  import "@radix-ui/react-toggle";
27
29
  import "class-variance-authority";
28
- import "./utils-AvyFzbPC.js";
29
- import "clsx";
30
+ import "./Class-17XFhL48.js";
30
31
  import "@radix-ui/react-switch";
31
32
  import "@radix-ui/react-slot";
32
33
  import "@radix-ui/react-accordion";
@@ -46,9 +47,6 @@ import "@radix-ui/react-toast";
46
47
  import "cmdk";
47
48
  import "@radix-ui/react-context-menu";
48
49
  import "react-icons-picker";
49
- import "flat-to-nested";
50
- import "./Functions-7jnEwJyw.js";
51
- import "redux-undo";
52
50
  import "i18next";
53
51
  import "react-textarea-autosize";
54
52
  import "react-dnd";
@@ -59,20 +57,20 @@ import "./html-to-json-57841sEK.js";
59
57
  import "himalaya";
60
58
  import "lucide-react";
61
59
  import "./web-blocks.js";
62
- import "./controls-XPXGHKht.js";
63
- const $n = () => {
64
- const { undoCount: e, redoCount: t, undo: n, redo: s } = Ce();
60
+ import "./empty-slot-MWycClTb.js";
61
+ const Mn = () => {
62
+ const { hasUndo: e, hasRedo: t, undo: n, redo: s } = Ge();
65
63
  return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
66
- /* @__PURE__ */ r.jsx(le, { disabled: !e, size: "sm", onClick: n, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(Pe, {}) }),
67
- /* @__PURE__ */ r.jsx(le, { disabled: !t, onClick: s, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(Pe, { className: "rotate-180 scale-y-[-1] transform" }) })
64
+ /* @__PURE__ */ r.jsx(le, { disabled: !e(), size: "sm", onClick: n, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(Ae, {}) }),
65
+ /* @__PURE__ */ r.jsx(le, { disabled: !t(), onClick: s, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(Ae, { className: "rotate-180 scale-y-[-1] transform" }) })
68
66
  ] });
69
67
  };
70
- function Wn() {
71
- const [e, t] = Ze(), { t: n } = de();
68
+ function Ln() {
69
+ const [e, t] = Qe(), { t: n } = de();
72
70
  return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
73
- /* @__PURE__ */ r.jsx(qt, { htmlFor: "dark-mode-switch", children: n("dark_mode") }),
71
+ /* @__PURE__ */ r.jsx(Ut, { htmlFor: "dark-mode-switch", children: n("dark_mode") }),
74
72
  /* @__PURE__ */ r.jsxs(
75
- Ut,
73
+ qt,
76
74
  {
77
75
  id: "dark-mode-switch",
78
76
  checked: e,
@@ -96,7 +94,7 @@ function Wn() {
96
94
  )
97
95
  ] });
98
96
  }
99
- const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
97
+ const Le = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
100
98
  "svg",
101
99
  {
102
100
  className: e ? "rotate-90" : "",
@@ -119,7 +117,7 @@ const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
119
117
  )
120
118
  ]
121
119
  }
122
- ), Hn = [
120
+ ), Nn = [
123
121
  {
124
122
  title: "mobile_xs_title",
125
123
  content: "mobile_xs_content",
@@ -138,31 +136,31 @@ const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
138
136
  title: "tablet_md_title",
139
137
  content: "tablet_md_content",
140
138
  breakpoint: "md",
141
- icon: /* @__PURE__ */ r.jsx(Ne, {}),
139
+ icon: /* @__PURE__ */ r.jsx(Le, {}),
142
140
  width: 800
143
141
  },
144
142
  {
145
143
  title: "tablet_lg_title",
146
144
  content: "tablet_lg_content",
147
145
  breakpoint: "lg",
148
- icon: /* @__PURE__ */ r.jsx(Ne, { landscape: !0 }),
146
+ icon: /* @__PURE__ */ r.jsx(Le, { landscape: !0 }),
149
147
  width: 1024
150
148
  },
151
149
  {
152
150
  title: "desktop_xl_title",
153
151
  content: "desktop_xl_content",
154
152
  breakpoint: "xl",
155
- icon: /* @__PURE__ */ r.jsx(Pt, {}),
153
+ icon: /* @__PURE__ */ r.jsx(Rt, {}),
156
154
  width: 1420
157
155
  },
158
156
  {
159
157
  title: "large_desktop_2xl_title",
160
158
  content: "large_desktop_2xl_content",
161
159
  breakpoint: "2xl",
162
- icon: /* @__PURE__ */ r.jsx(Rt, {}),
160
+ icon: /* @__PURE__ */ r.jsx(Pt, {}),
163
161
  width: 1920
164
162
  }
165
- ], Fe = ({
163
+ ], Ne = ({
166
164
  title: e,
167
165
  content: t,
168
166
  currentBreakpoint: n,
@@ -187,26 +185,26 @@ const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
187
185
  /* @__PURE__ */ r.jsx("p", { className: "text-xs", children: o(t) })
188
186
  ] }) }) })
189
187
  ] });
190
- }, qn = () => {
191
- const [, e, t] = Ie(), [n, s] = Jt(), { t: i } = de(), l = Ee("breakpoints", Hn), d = (o) => {
188
+ }, Fn = () => {
189
+ const [, e, t] = Te(), [n, s] = Jt(), { t: i } = de(), l = Ce("breakpoints", Nn), d = (o) => {
192
190
  n.includes(o) ? n.length > 2 && s(n.filter((c) => c !== o)) : s((c) => [...c, o]);
193
191
  };
194
- return l.length < 4 ? /* @__PURE__ */ r.jsx("div", { className: "flex items-center rounded-md", children: re(l, (o) => /* @__PURE__ */ be(Fe, { ...o, onClick: t, key: o.breakpoint, currentBreakpoint: e })) }) : /* @__PURE__ */ r.jsxs("div", { className: "flex items-center rounded-md", children: [
192
+ return l.length < 4 ? /* @__PURE__ */ r.jsx("div", { className: "flex items-center rounded-md", children: re(l, (o) => /* @__PURE__ */ _e(Ne, { ...o, onClick: t, key: o.breakpoint, currentBreakpoint: e })) }) : /* @__PURE__ */ r.jsxs("div", { className: "flex items-center rounded-md", children: [
195
193
  re(
196
- l.filter((o) => Ae(n, pe(o.breakpoint))),
197
- (o) => /* @__PURE__ */ be(Fe, { ...o, onClick: t, key: o.breakpoint, currentBreakpoint: e })
194
+ l.filter((o) => Oe(n, pe(o.breakpoint))),
195
+ (o) => /* @__PURE__ */ _e(Ne, { ...o, onClick: t, key: o.breakpoint, currentBreakpoint: e })
198
196
  ),
199
197
  /* @__PURE__ */ r.jsxs(Vt, { children: [
200
- /* @__PURE__ */ r.jsx(Xt, { asChild: !0, children: /* @__PURE__ */ r.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ r.jsx(Mt, { className: "scale-90 transform" }) }) }),
201
- /* @__PURE__ */ r.jsxs(Zt, { className: "w-56 border-border text-xs", children: [
202
- /* @__PURE__ */ r.jsx(Qt, { children: i("Breakpoints") }),
203
- /* @__PURE__ */ r.jsx(Gt, {}),
198
+ /* @__PURE__ */ r.jsx(Gt, { asChild: !0, children: /* @__PURE__ */ r.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ r.jsx(Mt, { className: "scale-90 transform" }) }) }),
199
+ /* @__PURE__ */ r.jsxs(Qt, { className: "w-56 border-border text-xs", children: [
200
+ /* @__PURE__ */ r.jsx(Zt, { children: i("Breakpoints") }),
201
+ /* @__PURE__ */ r.jsx(Xt, {}),
204
202
  re(l, (o) => /* @__PURE__ */ r.jsx(
205
203
  en,
206
204
  {
207
205
  disabled: o.breakpoint === "xs",
208
206
  onCheckedChange: () => d(pe(o.breakpoint)),
209
- checked: Ae(n, pe(o.breakpoint)),
207
+ checked: Oe(n, pe(o.breakpoint)),
210
208
  children: i(o.title)
211
209
  },
212
210
  o.breakpoint
@@ -214,10 +212,10 @@ const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
214
212
  ] })
215
213
  ] })
216
214
  ] });
217
- }, Un = () => {
218
- const { t: e } = de(), [t] = tn(), { createSnapshot: n } = Ce(), [, s] = U(), [, i] = X(), l = je(() => {
219
- t([]), s([]), i([]), n();
220
- }, [t, n]);
215
+ }, $n = () => {
216
+ const { t: e } = de(), { setNewBlocks: t } = tn(), [, n] = W(), [, s] = J(), i = ke(() => {
217
+ t([]), n([]), s([]);
218
+ }, [t]);
221
219
  return /* @__PURE__ */ r.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ r.jsxs(nn, { children: [
222
220
  /* @__PURE__ */ r.jsx(rn, { asChild: !0, children: /* @__PURE__ */ r.jsxs(le, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
223
221
  /* @__PURE__ */ r.jsx(Lt, {}),
@@ -231,19 +229,19 @@ const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
231
229
  ] }),
232
230
  /* @__PURE__ */ r.jsxs(cn, { children: [
233
231
  /* @__PURE__ */ r.jsx(dn, { children: e("cancel") }),
234
- /* @__PURE__ */ r.jsx(un, { onClick: l, children: e("yes") })
232
+ /* @__PURE__ */ r.jsx(un, { onClick: i, children: e("yes") })
235
233
  ] })
236
234
  ] })
237
235
  ] }) });
238
- }, zn = () => {
239
- const e = pn("darkMode", !1), [t] = Qe();
236
+ }, Wn = () => {
237
+ const e = Ce("darkMode", !1), [t] = Ze();
240
238
  return /* @__PURE__ */ r.jsxs("div", { className: "flex h-10 items-center justify-between border-b bg-background/70 px-2", children: [
241
239
  /* @__PURE__ */ r.jsxs("div", { className: "flex h-full space-x-2", children: [
242
240
  e ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
243
- /* @__PURE__ */ r.jsx(Wn, {}),
241
+ /* @__PURE__ */ r.jsx(Ln, {}),
244
242
  /* @__PURE__ */ r.jsx(ie, { orientation: "vertical" })
245
243
  ] }) : null,
246
- /* @__PURE__ */ r.jsx(qn, {}),
244
+ /* @__PURE__ */ r.jsx(Fn, {}),
247
245
  /* @__PURE__ */ r.jsx(ie, { orientation: "vertical" }),
248
246
  /* @__PURE__ */ r.jsxs("div", { className: "flex w-12 items-center justify-center gap-x-1 space-x-0 font-medium", children: [
249
247
  /* @__PURE__ */ r.jsx(Nt, { className: "h-3.5 w-3.5 flex-shrink-0" }),
@@ -254,14 +252,14 @@ const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
254
252
  ] })
255
253
  ] }),
256
254
  /* @__PURE__ */ r.jsx(ie, { orientation: "vertical" }),
257
- /* @__PURE__ */ r.jsx($n, {})
255
+ /* @__PURE__ */ r.jsx(Mn, {})
258
256
  ] }),
259
257
  /* @__PURE__ */ r.jsxs("div", { className: "flex h-full items-center space-x-2", children: [
260
258
  /* @__PURE__ */ r.jsx(ie, { orientation: "vertical" }),
261
- /* @__PURE__ */ r.jsx(Un, {})
259
+ /* @__PURE__ */ r.jsx($n, {})
262
260
  ] })
263
261
  ] });
264
- }, Yn = `<!doctype html>
262
+ }, Hn = `<!doctype html>
265
263
  <html class="scroll-smooth h-full overflow-y-auto">
266
264
  <head>
267
265
  <meta charset="UTF-8">
@@ -309,8 +307,8 @@ const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
309
307
  <div class="frame-root h-full"></div>
310
308
  <script src="https://cdn.jsdelivr.net/npm/quill@2.0.0/dist/quill.js"><\/script>
311
309
  </body>
312
- </html>`, Kn = (e) => {
313
- const [t] = Ie(), [, n] = Qe(), [s, i] = q({}), l = je(() => {
310
+ </html>`, Un = (e) => {
311
+ const [t] = Te(), [, n] = Ze(), [s, i] = $({}), l = ke(() => {
314
312
  const { width: d, height: o } = e;
315
313
  if (d < t) {
316
314
  const c = parseFloat((d / t).toFixed(2).toString());
@@ -330,7 +328,7 @@ const Ne = ({ landscape: e = !1 }) => /* @__PURE__ */ r.jsxs(
330
328
  } else
331
329
  i({}), n(100);
332
330
  }, [t, e, n]);
333
- return M(() => {
331
+ return R(() => {
334
332
  l();
335
333
  }, [t, e, n, l]), s;
336
334
  };
@@ -340,11 +338,11 @@ object-assign
340
338
  (c) Sindre Sorhus
341
339
  @license MIT
342
340
  */
343
- var fe, $e;
344
- function Jn() {
345
- if ($e)
341
+ var fe, Fe;
342
+ function qn() {
343
+ if (Fe)
346
344
  return fe;
347
- $e = 1;
345
+ Fe = 1;
348
346
  var e = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, n = Object.prototype.propertyIsEnumerable;
349
347
  function s(l) {
350
348
  if (l == null)
@@ -380,34 +378,34 @@ function Jn() {
380
378
  t.call(o, h) && (c[h] = o[h]);
381
379
  if (e) {
382
380
  p = e(o);
383
- for (var g = 0; g < p.length; g++)
384
- n.call(o, p[g]) && (c[p[g]] = o[p[g]]);
381
+ for (var v = 0; v < p.length; v++)
382
+ n.call(o, p[v]) && (c[p[v]] = o[p[v]]);
385
383
  }
386
384
  }
387
385
  return c;
388
386
  }, fe;
389
387
  }
390
- var he, We;
391
- function De() {
392
- if (We)
388
+ var he, $e;
389
+ function Ie() {
390
+ if ($e)
393
391
  return he;
394
- We = 1;
392
+ $e = 1;
395
393
  var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
396
394
  return he = e, he;
397
395
  }
398
- var ge, He;
399
- function lt() {
400
- return He || (He = 1, ge = Function.call.bind(Object.prototype.hasOwnProperty)), ge;
396
+ var ge, We;
397
+ function at() {
398
+ return We || (We = 1, ge = Function.call.bind(Object.prototype.hasOwnProperty)), ge;
401
399
  }
402
- var me, qe;
403
- function Vn() {
404
- if (qe)
400
+ var me, He;
401
+ function zn() {
402
+ if (He)
405
403
  return me;
406
- qe = 1;
404
+ He = 1;
407
405
  var e = function() {
408
406
  };
409
407
  if (process.env.NODE_ENV !== "production") {
410
- var t = De(), n = {}, s = lt();
408
+ var t = Ie(), n = {}, s = at();
411
409
  e = function(l) {
412
410
  var d = "Warning: " + l;
413
411
  typeof console < "u" && console.error(d);
@@ -424,22 +422,22 @@ function Vn() {
424
422
  var h;
425
423
  try {
426
424
  if (typeof l[f] != "function") {
427
- var g = Error(
425
+ var v = Error(
428
426
  (c || "React class") + ": " + o + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof l[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
429
427
  );
430
- throw g.name = "Invariant Violation", g;
428
+ throw v.name = "Invariant Violation", v;
431
429
  }
432
430
  h = l[f](d, f, c, o, null, t);
433
- } catch (A) {
434
- h = A;
431
+ } catch (O) {
432
+ h = O;
435
433
  }
436
434
  if (h && !(h instanceof Error) && e(
437
435
  (c || "React class") + ": type specification of " + o + " `" + 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)."
438
436
  ), h instanceof Error && !(h.message in n)) {
439
437
  n[h.message] = !0;
440
- var E = p ? p() : "";
438
+ var S = p ? p() : "";
441
439
  e(
442
- "Failed " + o + " type: " + h.message + (E ?? "")
440
+ "Failed " + o + " type: " + h.message + (S ?? "")
443
441
  );
444
442
  }
445
443
  }
@@ -450,11 +448,11 @@ function Vn() {
450
448
  }, me = i, me;
451
449
  }
452
450
  var ye, Ue;
453
- function Xn() {
451
+ function Yn() {
454
452
  if (Ue)
455
453
  return ye;
456
454
  Ue = 1;
457
- var e = ot, t = Jn(), n = De(), s = lt(), i = Vn(), l = function() {
455
+ var e = ot, t = qn(), n = Ie(), s = at(), i = zn(), l = function() {
458
456
  };
459
457
  process.env.NODE_ENV !== "production" && (l = function(o) {
460
458
  var c = "Warning: " + o;
@@ -474,230 +472,230 @@ function Xn() {
474
472
  if (typeof u == "function")
475
473
  return u;
476
474
  }
477
- var g = "<<anonymous>>", E = {
478
- array: B("array"),
479
- bigint: B("bigint"),
480
- bool: B("boolean"),
481
- func: B("function"),
482
- number: B("number"),
483
- object: B("object"),
484
- string: B("string"),
485
- symbol: B("symbol"),
486
- any: O(),
487
- arrayOf: w,
488
- element: F(),
489
- elementType: $(),
475
+ var v = "<<anonymous>>", S = {
476
+ array: I("array"),
477
+ bigint: I("bigint"),
478
+ bool: I("boolean"),
479
+ func: I("function"),
480
+ number: I("number"),
481
+ object: I("object"),
482
+ string: I("string"),
483
+ symbol: I("symbol"),
484
+ any: H(),
485
+ arrayOf: V,
486
+ element: G(),
487
+ elementType: L(),
490
488
  instanceOf: _,
491
- node: yt(),
492
- objectOf: H,
493
- oneOf: W,
494
- oneOfType: mt,
495
- shape: vt,
496
- exact: xt
489
+ node: mt(),
490
+ objectOf: F,
491
+ oneOf: N,
492
+ oneOfType: gt,
493
+ shape: yt,
494
+ exact: vt
497
495
  };
498
- function A(a, u) {
496
+ function O(a, u) {
499
497
  return a === u ? a !== 0 || 1 / a === 1 / u : a !== a && u !== u;
500
498
  }
501
- function b(a, u) {
499
+ function m(a, u) {
502
500
  this.message = a, this.data = u && typeof u == "object" ? u : {}, this.stack = "";
503
501
  }
504
- b.prototype = Error.prototype;
505
- function S(a) {
502
+ m.prototype = Error.prototype;
503
+ function g(a) {
506
504
  if (process.env.NODE_ENV !== "production")
507
505
  var u = {}, k = 0;
508
- function v(j, y, x, T, I, C, L) {
509
- if (T = T || g, C = C || x, L !== n) {
506
+ function b(j, x, w, T, E, C, P) {
507
+ if (T = T || v, C = C || w, P !== n) {
510
508
  if (c) {
511
- var P = new Error(
509
+ var B = new Error(
512
510
  "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"
513
511
  );
514
- throw P.name = "Invariant Violation", P;
512
+ throw B.name = "Invariant Violation", B;
515
513
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
516
- var Z = T + ":" + x;
517
- !u[Z] && // Avoid spamming the console because they are often not actionable except for lib authors
514
+ var Q = T + ":" + w;
515
+ !u[Q] && // Avoid spamming the console because they are often not actionable except for lib authors
518
516
  k < 3 && (l(
519
517
  "You are manually calling a React.PropTypes validation function for the `" + C + "` 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."
520
- ), u[Z] = !0, k++);
518
+ ), u[Q] = !0, k++);
521
519
  }
522
520
  }
523
- return y[x] == null ? j ? y[x] === null ? new b("The " + I + " `" + C + "` is marked as required " + ("in `" + T + "`, but its value is `null`.")) : new b("The " + I + " `" + C + "` is marked as required in " + ("`" + T + "`, but its value is `undefined`.")) : null : a(y, x, T, I, C);
521
+ return x[w] == null ? j ? x[w] === null ? new m("The " + E + " `" + C + "` is marked as required " + ("in `" + T + "`, but its value is `null`.")) : new m("The " + E + " `" + C + "` is marked as required in " + ("`" + T + "`, but its value is `undefined`.")) : null : a(x, w, T, E, C);
524
522
  }
525
- var m = v.bind(null, !1);
526
- return m.isRequired = v.bind(null, !0), m;
523
+ var y = b.bind(null, !1);
524
+ return y.isRequired = b.bind(null, !0), y;
527
525
  }
528
- function B(a) {
529
- function u(k, v, m, j, y, x) {
530
- var T = k[v], I = z(T);
531
- if (I !== a) {
526
+ function I(a) {
527
+ function u(k, b, y, j, x, w) {
528
+ var T = k[b], E = U(T);
529
+ if (E !== a) {
532
530
  var C = ee(T);
533
- return new b(
534
- "Invalid " + j + " `" + y + "` of type " + ("`" + C + "` supplied to `" + m + "`, expected ") + ("`" + a + "`."),
531
+ return new m(
532
+ "Invalid " + j + " `" + x + "` of type " + ("`" + C + "` supplied to `" + y + "`, expected ") + ("`" + a + "`."),
535
533
  { expectedType: a }
536
534
  );
537
535
  }
538
536
  return null;
539
537
  }
540
- return S(u);
538
+ return g(u);
541
539
  }
542
- function O() {
543
- return S(d);
540
+ function H() {
541
+ return g(d);
544
542
  }
545
- function w(a) {
546
- function u(k, v, m, j, y) {
543
+ function V(a) {
544
+ function u(k, b, y, j, x) {
547
545
  if (typeof a != "function")
548
- return new b("Property `" + y + "` of component `" + m + "` has invalid PropType notation inside arrayOf.");
549
- var x = k[v];
550
- if (!Array.isArray(x)) {
551
- var T = z(x);
552
- return new b("Invalid " + j + " `" + y + "` of type " + ("`" + T + "` supplied to `" + m + "`, expected an array."));
546
+ return new m("Property `" + x + "` of component `" + y + "` has invalid PropType notation inside arrayOf.");
547
+ var w = k[b];
548
+ if (!Array.isArray(w)) {
549
+ var T = U(w);
550
+ return new m("Invalid " + j + " `" + x + "` of type " + ("`" + T + "` supplied to `" + y + "`, expected an array."));
553
551
  }
554
- for (var I = 0; I < x.length; I++) {
555
- var C = a(x, I, m, j, y + "[" + I + "]", n);
552
+ for (var E = 0; E < w.length; E++) {
553
+ var C = a(w, E, y, j, x + "[" + E + "]", n);
556
554
  if (C instanceof Error)
557
555
  return C;
558
556
  }
559
557
  return null;
560
558
  }
561
- return S(u);
559
+ return g(u);
562
560
  }
563
- function F() {
564
- function a(u, k, v, m, j) {
565
- var y = u[k];
566
- if (!o(y)) {
567
- var x = z(y);
568
- return new b("Invalid " + m + " `" + j + "` of type " + ("`" + x + "` supplied to `" + v + "`, expected a single ReactElement."));
561
+ function G() {
562
+ function a(u, k, b, y, j) {
563
+ var x = u[k];
564
+ if (!o(x)) {
565
+ var w = U(x);
566
+ return new m("Invalid " + y + " `" + j + "` of type " + ("`" + w + "` supplied to `" + b + "`, expected a single ReactElement."));
569
567
  }
570
568
  return null;
571
569
  }
572
- return S(a);
570
+ return g(a);
573
571
  }
574
- function $() {
575
- function a(u, k, v, m, j) {
576
- var y = u[k];
577
- if (!e.isValidElementType(y)) {
578
- var x = z(y);
579
- return new b("Invalid " + m + " `" + j + "` of type " + ("`" + x + "` supplied to `" + v + "`, expected a single ReactElement type."));
572
+ function L() {
573
+ function a(u, k, b, y, j) {
574
+ var x = u[k];
575
+ if (!e.isValidElementType(x)) {
576
+ var w = U(x);
577
+ return new m("Invalid " + y + " `" + j + "` of type " + ("`" + w + "` supplied to `" + b + "`, expected a single ReactElement type."));
580
578
  }
581
579
  return null;
582
580
  }
583
- return S(a);
581
+ return g(a);
584
582
  }
585
583
  function _(a) {
586
- function u(k, v, m, j, y) {
587
- if (!(k[v] instanceof a)) {
588
- var x = a.name || g, T = wt(k[v]);
589
- return new b("Invalid " + j + " `" + y + "` of type " + ("`" + T + "` supplied to `" + m + "`, expected ") + ("instance of `" + x + "`."));
584
+ function u(k, b, y, j, x) {
585
+ if (!(k[b] instanceof a)) {
586
+ var w = a.name || v, T = wt(k[b]);
587
+ return new m("Invalid " + j + " `" + x + "` of type " + ("`" + T + "` supplied to `" + y + "`, expected ") + ("instance of `" + w + "`."));
590
588
  }
591
589
  return null;
592
590
  }
593
- return S(u);
591
+ return g(u);
594
592
  }
595
- function W(a) {
593
+ function N(a) {
596
594
  if (!Array.isArray(a))
597
595
  return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? l(
598
596
  "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])."
599
597
  ) : l("Invalid argument supplied to oneOf, expected an array.")), d;
600
- function u(k, v, m, j, y) {
601
- for (var x = k[v], T = 0; T < a.length; T++)
602
- if (A(x, a[T]))
598
+ function u(k, b, y, j, x) {
599
+ for (var w = k[b], T = 0; T < a.length; T++)
600
+ if (O(w, a[T]))
603
601
  return null;
604
- var I = JSON.stringify(a, function(L, P) {
605
- var Z = ee(P);
606
- return Z === "symbol" ? String(P) : P;
602
+ var E = JSON.stringify(a, function(P, B) {
603
+ var Q = ee(B);
604
+ return Q === "symbol" ? String(B) : B;
607
605
  });
608
- return new b("Invalid " + j + " `" + y + "` of value `" + String(x) + "` " + ("supplied to `" + m + "`, expected one of " + I + "."));
606
+ return new m("Invalid " + j + " `" + x + "` of value `" + String(w) + "` " + ("supplied to `" + y + "`, expected one of " + E + "."));
609
607
  }
610
- return S(u);
608
+ return g(u);
611
609
  }
612
- function H(a) {
613
- function u(k, v, m, j, y) {
610
+ function F(a) {
611
+ function u(k, b, y, j, x) {
614
612
  if (typeof a != "function")
615
- return new b("Property `" + y + "` of component `" + m + "` has invalid PropType notation inside objectOf.");
616
- var x = k[v], T = z(x);
613
+ return new m("Property `" + x + "` of component `" + y + "` has invalid PropType notation inside objectOf.");
614
+ var w = k[b], T = U(w);
617
615
  if (T !== "object")
618
- return new b("Invalid " + j + " `" + y + "` of type " + ("`" + T + "` supplied to `" + m + "`, expected an object."));
619
- for (var I in x)
620
- if (s(x, I)) {
621
- var C = a(x, I, m, j, y + "." + I, n);
616
+ return new m("Invalid " + j + " `" + x + "` of type " + ("`" + T + "` supplied to `" + y + "`, expected an object."));
617
+ for (var E in w)
618
+ if (s(w, E)) {
619
+ var C = a(w, E, y, j, x + "." + E, n);
622
620
  if (C instanceof Error)
623
621
  return C;
624
622
  }
625
623
  return null;
626
624
  }
627
- return S(u);
625
+ return g(u);
628
626
  }
629
- function mt(a) {
627
+ function gt(a) {
630
628
  if (!Array.isArray(a))
631
629
  return process.env.NODE_ENV !== "production" && l("Invalid argument supplied to oneOfType, expected an instance of array."), d;
632
630
  for (var u = 0; u < a.length; u++) {
633
631
  var k = a[u];
634
632
  if (typeof k != "function")
635
633
  return l(
636
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + kt(k) + " at index " + u + "."
634
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + bt(k) + " at index " + u + "."
637
635
  ), d;
638
636
  }
639
- function v(m, j, y, x, T) {
640
- for (var I = [], C = 0; C < a.length; C++) {
641
- var L = a[C], P = L(m, j, y, x, T, n);
642
- if (P == null)
637
+ function b(y, j, x, w, T) {
638
+ for (var E = [], C = 0; C < a.length; C++) {
639
+ var P = a[C], B = P(y, j, x, w, T, n);
640
+ if (B == null)
643
641
  return null;
644
- P.data && s(P.data, "expectedType") && I.push(P.data.expectedType);
642
+ B.data && s(B.data, "expectedType") && E.push(B.data.expectedType);
645
643
  }
646
- var Z = I.length > 0 ? ", expected one of type [" + I.join(", ") + "]" : "";
647
- return new b("Invalid " + x + " `" + T + "` supplied to " + ("`" + y + "`" + Z + "."));
644
+ var Q = E.length > 0 ? ", expected one of type [" + E.join(", ") + "]" : "";
645
+ return new m("Invalid " + w + " `" + T + "` supplied to " + ("`" + x + "`" + Q + "."));
648
646
  }
649
- return S(v);
647
+ return g(b);
650
648
  }
651
- function yt() {
652
- function a(u, k, v, m, j) {
653
- return se(u[k]) ? null : new b("Invalid " + m + " `" + j + "` supplied to " + ("`" + v + "`, expected a ReactNode."));
649
+ function mt() {
650
+ function a(u, k, b, y, j) {
651
+ return se(u[k]) ? null : new m("Invalid " + y + " `" + j + "` supplied to " + ("`" + b + "`, expected a ReactNode."));
654
652
  }
655
- return S(a);
653
+ return g(a);
656
654
  }
657
- function _e(a, u, k, v, m) {
658
- return new b(
659
- (a || "React class") + ": " + u + " type `" + k + "." + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + m + "`."
655
+ function De(a, u, k, b, y) {
656
+ return new m(
657
+ (a || "React class") + ": " + u + " type `" + k + "." + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + y + "`."
660
658
  );
661
659
  }
662
- function vt(a) {
663
- function u(k, v, m, j, y) {
664
- var x = k[v], T = z(x);
660
+ function yt(a) {
661
+ function u(k, b, y, j, x) {
662
+ var w = k[b], T = U(w);
665
663
  if (T !== "object")
666
- return new b("Invalid " + j + " `" + y + "` of type `" + T + "` " + ("supplied to `" + m + "`, expected `object`."));
667
- for (var I in a) {
668
- var C = a[I];
664
+ return new m("Invalid " + j + " `" + x + "` of type `" + T + "` " + ("supplied to `" + y + "`, expected `object`."));
665
+ for (var E in a) {
666
+ var C = a[E];
669
667
  if (typeof C != "function")
670
- return _e(m, j, y, I, ee(C));
671
- var L = C(x, I, m, j, y + "." + I, n);
672
- if (L)
673
- return L;
668
+ return De(y, j, x, E, ee(C));
669
+ var P = C(w, E, y, j, x + "." + E, n);
670
+ if (P)
671
+ return P;
674
672
  }
675
673
  return null;
676
674
  }
677
- return S(u);
675
+ return g(u);
678
676
  }
679
- function xt(a) {
680
- function u(k, v, m, j, y) {
681
- var x = k[v], T = z(x);
677
+ function vt(a) {
678
+ function u(k, b, y, j, x) {
679
+ var w = k[b], T = U(w);
682
680
  if (T !== "object")
683
- return new b("Invalid " + j + " `" + y + "` of type `" + T + "` " + ("supplied to `" + m + "`, expected `object`."));
684
- var I = t({}, k[v], a);
685
- for (var C in I) {
686
- var L = a[C];
687
- if (s(a, C) && typeof L != "function")
688
- return _e(m, j, y, C, ee(L));
689
- if (!L)
690
- return new b(
691
- "Invalid " + j + " `" + y + "` key `" + C + "` supplied to `" + m + "`.\nBad object: " + JSON.stringify(k[v], null, " ") + `
681
+ return new m("Invalid " + j + " `" + x + "` of type `" + T + "` " + ("supplied to `" + y + "`, expected `object`."));
682
+ var E = t({}, k[b], a);
683
+ for (var C in E) {
684
+ var P = a[C];
685
+ if (s(a, C) && typeof P != "function")
686
+ return De(y, j, x, C, ee(P));
687
+ if (!P)
688
+ return new m(
689
+ "Invalid " + j + " `" + x + "` key `" + C + "` supplied to `" + y + "`.\nBad object: " + JSON.stringify(k[b], null, " ") + `
692
690
  Valid keys: ` + JSON.stringify(Object.keys(a), null, " ")
693
691
  );
694
- var P = L(x, C, m, j, y + "." + C, n);
695
- if (P)
696
- return P;
692
+ var B = P(w, C, y, j, x + "." + C, n);
693
+ if (B)
694
+ return B;
697
695
  }
698
696
  return null;
699
697
  }
700
- return S(u);
698
+ return g(u);
701
699
  }
702
700
  function se(a) {
703
701
  switch (typeof a) {
@@ -714,15 +712,15 @@ Valid keys: ` + JSON.stringify(Object.keys(a), null, " ")
714
712
  return !0;
715
713
  var u = h(a);
716
714
  if (u) {
717
- var k = u.call(a), v;
715
+ var k = u.call(a), b;
718
716
  if (u !== a.entries) {
719
- for (; !(v = k.next()).done; )
720
- if (!se(v.value))
717
+ for (; !(b = k.next()).done; )
718
+ if (!se(b.value))
721
719
  return !1;
722
720
  } else
723
- for (; !(v = k.next()).done; ) {
724
- var m = v.value;
725
- if (m && !se(m[1]))
721
+ for (; !(b = k.next()).done; ) {
722
+ var y = b.value;
723
+ if (y && !se(y[1]))
726
724
  return !1;
727
725
  }
728
726
  } else
@@ -732,17 +730,17 @@ Valid keys: ` + JSON.stringify(Object.keys(a), null, " ")
732
730
  return !1;
733
731
  }
734
732
  }
735
- function bt(a, u) {
733
+ function xt(a, u) {
736
734
  return a === "symbol" ? !0 : u ? u["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && u instanceof Symbol : !1;
737
735
  }
738
- function z(a) {
736
+ function U(a) {
739
737
  var u = typeof a;
740
- return Array.isArray(a) ? "array" : a instanceof RegExp ? "object" : bt(u, a) ? "symbol" : u;
738
+ return Array.isArray(a) ? "array" : a instanceof RegExp ? "object" : xt(u, a) ? "symbol" : u;
741
739
  }
742
740
  function ee(a) {
743
741
  if (typeof a > "u" || a === null)
744
742
  return "" + a;
745
- var u = z(a);
743
+ var u = U(a);
746
744
  if (u === "object") {
747
745
  if (a instanceof Date)
748
746
  return "date";
@@ -751,7 +749,7 @@ Valid keys: ` + JSON.stringify(Object.keys(a), null, " ")
751
749
  }
752
750
  return u;
753
751
  }
754
- function kt(a) {
752
+ function bt(a) {
755
753
  var u = ee(a);
756
754
  switch (u) {
757
755
  case "array":
@@ -766,17 +764,17 @@ Valid keys: ` + JSON.stringify(Object.keys(a), null, " ")
766
764
  }
767
765
  }
768
766
  function wt(a) {
769
- return !a.constructor || !a.constructor.name ? g : a.constructor.name;
767
+ return !a.constructor || !a.constructor.name ? v : a.constructor.name;
770
768
  }
771
- return E.checkPropTypes = i, E.resetWarningCache = i.resetWarningCache, E.PropTypes = E, E;
769
+ return S.checkPropTypes = i, S.resetWarningCache = i.resetWarningCache, S.PropTypes = S, S;
772
770
  }, ye;
773
771
  }
774
- var ve, ze;
775
- function Zn() {
776
- if (ze)
772
+ var ve, qe;
773
+ function Kn() {
774
+ if (qe)
777
775
  return ve;
778
- ze = 1;
779
- var e = De();
776
+ qe = 1;
777
+ var e = Ie();
780
778
  function t() {
781
779
  }
782
780
  function n() {
@@ -784,10 +782,10 @@ function Zn() {
784
782
  return n.resetWarningCache = t, ve = function() {
785
783
  function s(d, o, c, p, f, h) {
786
784
  if (h !== e) {
787
- var g = new Error(
785
+ var v = new Error(
788
786
  "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"
789
787
  );
790
- throw g.name = "Invariant Violation", g;
788
+ throw v.name = "Invariant Violation", v;
791
789
  }
792
790
  }
793
791
  s.isRequired = s;
@@ -820,19 +818,19 @@ function Zn() {
820
818
  return l.PropTypes = l, l;
821
819
  }, ve;
822
820
  }
823
- var Ao = ce.exports;
821
+ var Io = ce.exports;
824
822
  if (process.env.NODE_ENV !== "production") {
825
- var Qn = ot, Gn = !0;
826
- ce.exports = Xn()(Qn.isElement, Gn);
823
+ var Jn = ot, Vn = !0;
824
+ ce.exports = Yn()(Jn.isElement, Vn);
827
825
  } else
828
- ce.exports = Zn()();
829
- var er = ce.exports;
830
- const R = /* @__PURE__ */ In(er);
831
- let ct, dt;
832
- typeof document < "u" && (ct = document);
833
- typeof window < "u" && (dt = window);
834
- const ut = V.createContext({ document: ct, window: dt }), ue = () => V.useContext(ut), { Provider: tr, Consumer: Po } = ut;
835
- class pt extends Ke {
826
+ ce.exports = Kn()();
827
+ var Gn = ce.exports;
828
+ const A = /* @__PURE__ */ kn(Gn);
829
+ let lt, ct;
830
+ typeof document < "u" && (lt = document);
831
+ typeof window < "u" && (ct = window);
832
+ const dt = K.createContext({ document: lt, window: ct }), ue = () => K.useContext(dt), { Provider: Qn, Consumer: So } = dt;
833
+ class ut extends Ye {
836
834
  componentDidMount() {
837
835
  this.props.contentDidMount();
838
836
  }
@@ -840,31 +838,31 @@ class pt extends Ke {
840
838
  this.props.contentDidUpdate();
841
839
  }
842
840
  render() {
843
- return Ct.only(this.props.children);
841
+ return Tt.only(this.props.children);
844
842
  }
845
843
  }
846
- J(pt, "propTypes", {
847
- children: R.element.isRequired,
848
- contentDidMount: R.func.isRequired,
849
- contentDidUpdate: R.func.isRequired
844
+ Y(ut, "propTypes", {
845
+ children: A.element.isRequired,
846
+ contentDidMount: A.func.isRequired,
847
+ contentDidUpdate: A.func.isRequired
850
848
  });
851
- class ke extends Ke {
849
+ class be extends Ye {
852
850
  constructor(n, s) {
853
851
  super(n, s);
854
- J(this, "setRef", (n) => {
852
+ Y(this, "setRef", (n) => {
855
853
  this.nodeRef.current = n;
856
854
  const { forwardedRef: s } = this.props;
857
855
  typeof s == "function" ? s(n) : s && (s.current = n);
858
856
  });
859
- J(this, "handleLoad", () => {
857
+ Y(this, "handleLoad", () => {
860
858
  clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
861
859
  });
862
860
  // In certain situations on a cold cache DOMContentLoaded never gets called
863
861
  // fallback to an interval to check if that's the case
864
- J(this, "loadCheck", () => setInterval(() => {
862
+ Y(this, "loadCheck", () => setInterval(() => {
865
863
  this.handleLoad();
866
864
  }, 500));
867
- this._isMounted = !1, this.nodeRef = V.createRef(), this.state = { iframeLoaded: !1 };
865
+ this._isMounted = !1, this.nodeRef = K.createRef(), this.state = { iframeLoaded: !1 };
868
866
  }
869
867
  componentDidMount() {
870
868
  this._isMounted = !0, this.getDoc() && this.nodeRef.current.contentWindow.addEventListener("DOMContentLoaded", this.handleLoad);
@@ -885,8 +883,8 @@ class ke extends Ke {
885
883
  const n = this.getDoc();
886
884
  if (!n)
887
885
  return null;
888
- const s = this.props.contentDidMount, i = this.props.contentDidUpdate, l = n.defaultView || n.parentView, d = /* @__PURE__ */ r.jsx(pt, { contentDidMount: s, contentDidUpdate: i, children: /* @__PURE__ */ r.jsx(tr, { value: { document: n, window: l }, children: /* @__PURE__ */ r.jsx("div", { className: "frame-content", children: this.props.children }) }) }), o = this.getMountTarget();
889
- return [Me.createPortal(this.props.head, this.getDoc().head), Me.createPortal(d, o)];
886
+ const s = this.props.contentDidMount, i = this.props.contentDidUpdate, l = n.defaultView || n.parentView, d = /* @__PURE__ */ r.jsx(ut, { contentDidMount: s, contentDidUpdate: i, children: /* @__PURE__ */ r.jsx(Qn, { value: { document: n, window: l }, children: /* @__PURE__ */ r.jsx("div", { className: "frame-content", children: this.props.children }) }) }), o = this.getMountTarget();
887
+ return [Pe.createPortal(this.props.head, this.getDoc().head), Pe.createPortal(d, o)];
890
888
  }
891
889
  render() {
892
890
  const n = {
@@ -902,16 +900,16 @@ class ke extends Ke {
902
900
  // also inject into the body and can mess up React. For this reason
903
901
  // initialContent is expected to have a div inside of the body
904
902
  // element that we render react into.
905
- J(ke, "propTypes", {
906
- style: R.object,
903
+ Y(be, "propTypes", {
904
+ style: A.object,
907
905
  // eslint-disable-line
908
- head: R.node,
909
- initialContent: R.string,
910
- mountTarget: R.string,
911
- contentDidMount: R.func,
912
- contentDidUpdate: R.func,
913
- children: R.oneOfType([R.element, R.arrayOf(R.element)])
914
- }), J(ke, "defaultProps", {
906
+ head: A.node,
907
+ initialContent: A.string,
908
+ mountTarget: A.string,
909
+ contentDidMount: A.func,
910
+ contentDidUpdate: A.func,
911
+ children: A.oneOfType([A.element, A.arrayOf(A.element)])
912
+ }), Y(be, "defaultProps", {
915
913
  style: {},
916
914
  head: null,
917
915
  children: void 0,
@@ -922,23 +920,23 @@ J(ke, "propTypes", {
922
920
  },
923
921
  initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
924
922
  });
925
- const nr = V.forwardRef((e, t) => /* @__PURE__ */ r.jsx(ke, { ...e, forwardedRef: t }));
926
- let Y = null, oe = [], ne = null, ft = null;
927
- function rr(e) {
923
+ const Zn = K.forwardRef((e, t) => /* @__PURE__ */ r.jsx(be, { ...e, forwardedRef: t }));
924
+ let q = null, oe = [], ne = null, pt = null;
925
+ function Xn(e) {
928
926
  const t = window.getComputedStyle(e), n = parseInt(t.paddingLeft, 10), s = parseInt(t.paddingTop, 10), i = parseInt(t.paddingRight, 10), l = parseInt(t.paddingBottom, 10);
929
927
  return { paddingLeft: n, paddingTop: s, paddingRight: i, paddingBottom: l };
930
928
  }
931
- const Ye = (e, t, n) => {
932
- if (!Y)
929
+ const ze = (e, t, n) => {
930
+ if (!q)
933
931
  return;
934
- const s = e.getBoundingClientRect(), i = Y == null ? void 0 : Y.getElementById("placeholder"), { paddingLeft: l, paddingTop: d, paddingRight: o, paddingBottom: c } = rr(e);
932
+ const s = e.getBoundingClientRect(), i = q == null ? void 0 : q.getElementById("placeholder"), { paddingLeft: l, paddingTop: d, paddingRight: o, paddingBottom: c } = Xn(e);
935
933
  i.style.width = t === "vertical" ? s.width - l - o + "px" : "2px", i.style.height = t === "vertical" ? "2px" : s.height - d - c + "px", i.style.display = "block";
936
934
  const p = oe.reduce(
937
935
  (f, h) => Math.abs(h - n) < Math.abs(f - n) ? h : f
938
936
  );
939
- ft = oe.indexOf(p), t === "vertical" ? (i.style.top = e.offsetTop + p + "px", i.style.left = e.offsetLeft + l + "px") : (i.style.top = e.offsetTop + d + "px", i.style.left = e.offsetLeft + p + "px");
940
- }, or = (e) => {
941
- const t = ht(e), n = window.getComputedStyle(e), s = t === "horizontal", i = parseInt(n.paddingLeft), l = parseInt(n.paddingTop);
937
+ pt = oe.indexOf(p), t === "vertical" ? (i.style.top = e.offsetTop + p + "px", i.style.left = e.offsetLeft + l + "px") : (i.style.top = e.offsetTop + d + "px", i.style.left = e.offsetLeft + p + "px");
938
+ }, er = (e) => {
939
+ const t = ft(e), n = window.getComputedStyle(e), s = t === "horizontal", i = parseInt(n.paddingLeft), l = parseInt(n.paddingTop);
942
940
  let d = s ? i : l;
943
941
  oe = [d], Array.from(e.children).forEach((o) => {
944
942
  const c = window.getComputedStyle(o), p = parseInt(
@@ -947,7 +945,7 @@ const Ye = (e, t, n) => {
947
945
  oe.push(d + f + p), d += f + p;
948
946
  });
949
947
  };
950
- function ht(e) {
948
+ function ft(e) {
951
949
  const t = window.getComputedStyle(e).display, n = window.getComputedStyle(e).flexDirection;
952
950
  if (t === "flex")
953
951
  return n === "column" || n === "column-reverse" ? "vertical" : "horizontal";
@@ -960,33 +958,33 @@ function ht(e) {
960
958
  }
961
959
  return t === "block" ? "vertical" : "horizontal";
962
960
  }
963
- const sr = Ve((e) => {
964
- const t = e.target, n = ht(t);
961
+ const tr = Je((e) => {
962
+ const t = e.target, n = ft(t);
965
963
  if (n === "vertical") {
966
964
  const s = e.clientY - t.offsetTop;
967
- Ye(t, n, s);
965
+ ze(t, n, s);
968
966
  } else {
969
967
  const s = e.clientX - t.offsetLeft;
970
- Ye(t, n, s);
968
+ ze(t, n, s);
971
969
  }
972
- }, 200), ir = (e) => {
973
- e.preventDefault(), e.stopPropagation(), sr(e);
970
+ }, 200), nr = (e) => {
971
+ e.preventDefault(), e.stopPropagation(), tr(e);
974
972
  };
975
973
  function xe() {
976
- const e = Y == null ? void 0 : Y.getElementById("placeholder");
974
+ const e = q == null ? void 0 : q.getElementById("placeholder");
977
975
  e.style.display = "none";
978
976
  }
979
- const ar = () => {
980
- const { document: e } = ue(), [t, n] = N(fn), s = _n(), i = st("dnd"), [, l] = Q(), [, d] = U();
981
- return Y = e, {
977
+ const rr = () => {
978
+ const { document: e } = ue(), [t, n] = M(pn), s = In(), i = st("dnd"), [, l] = Z(), [, d] = W();
979
+ return q = e, {
982
980
  isDragging: t,
983
981
  "data-dnd": "branch",
984
- onDragOver: i ? ir : te,
982
+ onDragOver: i ? nr : te,
985
983
  onDrop: i ? (o) => {
986
984
  ne == null || ne.classList.remove("outline", "outline-green-300", "outline-2", "-outline-offset-2");
987
985
  const c = JSON.parse(o.dataTransfer.getData("text/plain"));
988
986
  let p = o.target.getAttribute("data-block-id");
989
- p === null && (p = o.target.parentElement.getAttribute("data-block-id")), s({ block: c, dropTargetId: p || null, relativeIndex: ft }), n(!1), xe(), setTimeout(() => {
987
+ p === null && (p = o.target.parentElement.getAttribute("data-block-id")), s({ block: c, dropTargetId: p || null, relativeIndex: pt }), n(!1), xe(), setTimeout(() => {
990
988
  xe();
991
989
  }, 300);
992
990
  } : te,
@@ -994,7 +992,7 @@ const ar = () => {
994
992
  const c = o;
995
993
  ne = c.target, c.stopPropagation(), c.preventDefault(), oe = [];
996
994
  const p = c.target;
997
- or(p), p.classList.add("outline", "outline-green-300", "outline-2", "-outline-offset-2"), n(!0), l(""), d([]);
995
+ er(p), p.classList.add("outline", "outline-green-300", "outline-2", "-outline-offset-2"), n(!0), l(""), d([]);
998
996
  } : te,
999
997
  onDragLeave: i ? (o) => {
1000
998
  const c = o;
@@ -1005,72 +1003,72 @@ const ar = () => {
1005
1003
  } : te
1006
1004
  };
1007
1005
  };
1008
- function Be(e) {
1006
+ function Se(e) {
1009
1007
  return e.getAttribute("data-block-id") ? e : e.closest("[data-block-id]");
1010
1008
  }
1011
- function lr(e) {
1009
+ function or(e) {
1012
1010
  e.container.innerHTML = "", e.container.parentNode.removeChild(e.container);
1013
1011
  var t = document.querySelector(".ql-toolbar");
1014
1012
  t && t.parentNode.removeChild(t), e = null;
1015
1013
  }
1016
- const cr = () => {
1017
- const e = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], t = hn(), [, n] = Q(), [s, i] = N(G);
1014
+ const sr = () => {
1015
+ const e = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], t = fn(), [, n] = Z(), [s, i] = M(X);
1018
1016
  return (l) => {
1019
1017
  var h;
1020
1018
  if (s)
1021
1019
  return;
1022
- const d = Be(l.target), o = d.getAttribute("data-block-type");
1020
+ const d = Se(l.target), o = d.getAttribute("data-block-type");
1023
1021
  if (!o || !e.includes(o))
1024
1022
  return;
1025
1023
  const c = d.cloneNode(!0);
1026
- d.style.display = "none", Array.from(c.attributes).forEach((g) => {
1027
- g.name !== "class" && c.removeAttribute(g.name);
1024
+ d.style.display = "none", Array.from(c.attributes).forEach((v) => {
1025
+ v.name !== "class" && c.removeAttribute(v.name);
1028
1026
  }), o === "Text" && (c.style.display = "inline-block"), d.parentNode.insertBefore(c, d.nextSibling);
1029
- const p = new Bn(c, { placeholder: "Type here..." });
1027
+ const p = new En(c, { placeholder: "Type here..." });
1030
1028
  function f() {
1031
- const g = p.getText(0, p.getLength());
1032
- t([d.getAttribute("data-block-id")], { content: g }), d.removeAttribute("style"), c.removeEventListener("blur", f, !0), lr(p), i(""), n("");
1029
+ const v = p.getText(0, p.getLength());
1030
+ t([d.getAttribute("data-block-id")], { content: v }), d.removeAttribute("style"), c.removeEventListener("blur", f, !0), or(p), i(""), n("");
1033
1031
  }
1034
1032
  c.addEventListener("blur", f, !0), p.focus(), (h = c.querySelector(".ql-clipboard")) == null || h.remove(), i(d.getAttribute("data-block-id"));
1035
1033
  };
1036
- }, dr = () => {
1037
- const [, e] = X(), [, t] = U(), [n] = N(G);
1034
+ }, ir = () => {
1035
+ const [, e] = J(), [, t] = W(), [n] = M(X);
1038
1036
  return (s) => {
1039
1037
  if (n)
1040
1038
  return;
1041
1039
  s.stopPropagation();
1042
- const i = Be(s.target);
1040
+ const i = Se(s.target);
1043
1041
  if (i != null && i.getAttribute("data-block-parent")) {
1044
1042
  const l = i.getAttribute("data-style-prop"), d = i.getAttribute("data-style-id"), o = i.getAttribute("data-block-parent");
1045
1043
  e([{ id: d, prop: l, blockId: o }]), t([o]);
1046
1044
  } else
1047
1045
  i != null && i.getAttribute("data-block-id") && t([i.getAttribute("data-block-id")]);
1048
1046
  };
1049
- }, ur = Ve((e, t) => {
1050
- const n = Be(e.target);
1047
+ }, ar = Je((e, t) => {
1048
+ const n = Se(e.target);
1051
1049
  n != null && n.getAttribute("data-style-id") && t(n.getAttribute("data-style-id"));
1052
- }, 100), pr = () => {
1053
- const [, e] = Q(), [t] = N(G);
1050
+ }, 100), lr = () => {
1051
+ const [, e] = Z(), [t] = M(X);
1054
1052
  return (n) => {
1055
- t || ur(n, e);
1053
+ t || ar(n, e);
1056
1054
  };
1057
- }, fr = ({ children: e }) => {
1058
- const { document: t } = ue(), [n] = U(), [s, i] = X();
1059
- M(() => {
1055
+ }, cr = ({ children: e }) => {
1056
+ const { document: t } = ue(), [n] = W(), [s, i] = J();
1057
+ R(() => {
1060
1058
  setTimeout(() => {
1061
- if (!K(s))
1059
+ if (!z(s))
1062
1060
  return;
1063
- const p = gt(t, ae(n));
1061
+ const p = ht(t, ae(n));
1064
1062
  if (p) {
1065
1063
  const f = p.getAttribute("data-style-prop");
1066
1064
  if (f) {
1067
- const h = p.getAttribute("data-style-id"), g = p.getAttribute("data-block-parent");
1068
- i([{ id: h, prop: f, blockId: g }]);
1065
+ const h = p.getAttribute("data-style-id"), v = p.getAttribute("data-block-parent");
1066
+ i([{ id: h, prop: f, blockId: v }]);
1069
1067
  }
1070
1068
  }
1071
1069
  }, 100);
1072
1070
  }, [t, n, i, s]);
1073
- const l = cr(), d = dr(), o = pr(), c = ar();
1071
+ const l = sr(), d = ir(), o = lr(), c = rr();
1074
1072
  return /* @__PURE__ */ r.jsx(
1075
1073
  "div",
1076
1074
  {
@@ -1079,65 +1077,51 @@ const cr = () => {
1079
1077
  onClick: d,
1080
1078
  onDoubleClick: l,
1081
1079
  onMouseMove: o,
1082
- ...St(c, "isDragging"),
1080
+ ...It(c, "isDragging"),
1083
1081
  className: "relative mb-5 h-full max-w-full " + (c.isDragging ? "dragging" : ""),
1084
1082
  children: e
1085
1083
  }
1086
1084
  );
1087
- }, gt = (e, t) => e.querySelector(`[data-block-id="${t}"]`), hr = () => {
1088
- const { window: e } = ue(), [t, n] = U(), s = Se(), [, i] = X(), { undo: l, redo: d } = Ce(), o = Ge(), [, c] = gn(), [, p] = mn(), { pasteBlocks: f } = yn(), [, h] = et(), g = tt(), { savePage: E } = vn(), [A] = N(G), [, b] = N(xn), S = (O) => {
1089
- O.key === "Enter" && (O.preventDefault(), t.length === 1 && b(ae(t)));
1090
- }, B = (O) => {
1091
- const w = s.find((F) => F._id === O);
1092
- return w ? w._parent : null;
1085
+ }, ht = (e, t) => e.querySelector(`[data-block-id="${t}"]`), dr = () => {
1086
+ const { window: e } = ue(), [t, n] = W(), [s] = Ee(), [, i] = J(), { undo: l, redo: d } = Ge(), o = Xe(), [, c] = et(), p = tt(), { savePage: f } = hn(), [h] = M(X), [, v] = M(gn), S = (m) => {
1087
+ m.key === "Enter" && (m.preventDefault(), t.length === 1 && v(ae(t)));
1088
+ }, O = (m) => {
1089
+ const g = s.find((I) => I._id === m);
1090
+ return g ? g._parent : null;
1093
1091
  };
1094
- return M(() => {
1095
- const O = (w) => {
1096
- if (w.key === "Escape") {
1092
+ return R(() => {
1093
+ const m = (g) => {
1094
+ if (g.key === "Escape") {
1097
1095
  n([]), i([]);
1098
1096
  return;
1099
1097
  }
1100
- if (S(w), !A && (w.key === "Delete" || w.key === "Backspace") && (w.preventDefault(), g(t)), w.ctrlKey || w.metaKey) {
1101
- if (w.key === "ArrowUp") {
1102
- w.preventDefault();
1103
- const F = t.length > 0 ? B(t[0]) : null;
1104
- F && n([F]);
1098
+ if (S(g), !h && (g.key === "Delete" || g.key === "Backspace") && (g.preventDefault(), p(t)), g.ctrlKey || g.metaKey) {
1099
+ if (g.key === "ArrowUp") {
1100
+ g.preventDefault();
1101
+ const I = t.length > 0 ? O(t[0]) : null;
1102
+ I && n([I]);
1105
1103
  }
1106
- if (["z", "y", "d", "x", "c", "p", "s", "v"].includes(w.key)) {
1107
- if (A && ["x", "z", "v"].includes(w.key))
1104
+ if (["z", "y", "d", "x", "c", "p", "s", "v"].includes(g.key)) {
1105
+ if (h && ["x", "z", "v"].includes(g.key))
1108
1106
  return !0;
1109
- w.preventDefault();
1107
+ g.preventDefault();
1110
1108
  }
1111
- w.key === "s" && (w.stopPropagation(), w.preventDefault(), E()), w.key === "z" && l(), w.key === "y" && d(), w.key === "d" && o(t), w.key === "x" && c(t), w.key === "c" && p(t), w.key === "v" && t.length > 0 && f(t[0]);
1109
+ g.key === "s" && (g.stopPropagation(), g.preventDefault(), f()), g.key === "z" && l(), g.key === "y" && d(), g.key === "d" && o(t);
1112
1110
  }
1113
1111
  };
1114
- return e.removeEventListener("keydown", O), e.addEventListener("keydown", O), () => {
1115
- e.removeEventListener("keydown", O);
1112
+ return e.removeEventListener("keydown", m), e.addEventListener("keydown", m), () => {
1113
+ e.removeEventListener("keydown", m);
1116
1114
  };
1117
- }, [
1118
- t,
1119
- n,
1120
- l,
1121
- g,
1122
- h,
1123
- d,
1124
- o,
1125
- c,
1126
- p,
1127
- f,
1128
- A,
1129
- E,
1130
- e
1131
- ]), null;
1132
- }, gr = ({ block: e, label: t }) => {
1133
- const [, n] = U(), [, s] = Q(), [, i] = N(nt), l = st("dnd");
1115
+ }, [t, n, l, p, c, d, o, h, f, e]), null;
1116
+ }, ur = ({ block: e, label: t }) => {
1117
+ const [, n] = W(), [, s] = Z(), [, i] = M(nt), l = st("dnd");
1134
1118
  return /* @__PURE__ */ r.jsxs(
1135
1119
  "div",
1136
1120
  {
1137
1121
  className: "mr-10 flex cursor-grab items-center space-x-1 px-1",
1138
1122
  draggable: l ? "true" : "false",
1139
1123
  onDragStart: (d) => {
1140
- d.dataTransfer.setData("text/plain", JSON.stringify(Dt(e, ["_id", "_type"]))), i(e._id), setTimeout(() => {
1124
+ d.dataTransfer.setData("text/plain", JSON.stringify(St(e, ["_id", "_type"]))), i(e._id), setTimeout(() => {
1141
1125
  n([]), s(null);
1142
1126
  }, 200);
1143
1127
  },
@@ -1147,16 +1131,16 @@ const cr = () => {
1147
1131
  ]
1148
1132
  }
1149
1133
  );
1150
- }, mr = ({ selectedBlockElement: e, block: t }) => {
1151
- const n = tt(), s = Ge(), [, i] = U(), [, l] = X(), [d] = N(G), { floatingStyles: o, refs: c, update: p } = An({
1134
+ }, pr = ({ selectedBlockElement: e, block: t }) => {
1135
+ const n = tt(), s = Xe(), [, i] = W(), [, l] = J(), [d] = M(X), { floatingStyles: o, refs: c, update: p } = Dn({
1152
1136
  placement: "top-start",
1153
- middleware: [Pn(), On()],
1137
+ middleware: [_n(), Sn()],
1154
1138
  elements: {
1155
1139
  reference: e
1156
1140
  }
1157
1141
  });
1158
- Rn(e, () => p(), e !== null);
1159
- const f = D(t, "_parent", null), h = K(D(t, "_name", "")) ? D(t, "_type", "") : D(t, "_name", "");
1142
+ Bn(e, () => p(), e !== null);
1143
+ const f = D(t, "_parent", null), h = z(D(t, "_name", "")) ? D(t, "_type", "") : D(t, "_name", "");
1160
1144
  return !e || !t || d ? null : /* @__PURE__ */ r.jsxs(
1161
1145
  "div",
1162
1146
  {
@@ -1164,216 +1148,216 @@ const cr = () => {
1164
1148
  tabIndex: 0,
1165
1149
  ref: c.setFloating,
1166
1150
  style: o,
1167
- onClick: (g) => {
1168
- g.stopPropagation(), g.preventDefault();
1151
+ onClick: (v) => {
1152
+ v.stopPropagation(), v.preventDefault();
1169
1153
  },
1170
- onKeyDown: (g) => g.stopPropagation(),
1171
- className: "z-[99999] flex h-6 items-center bg-blue-500 py-2 text-xs text-white",
1154
+ onKeyDown: (v) => v.stopPropagation(),
1155
+ className: "z-[99999] flex h-6 items-center bg-blue-500 py-2 text-xs text-white",
1172
1156
  children: [
1173
- /* @__PURE__ */ r.jsx(gr, { label: h, block: t }),
1174
- /* @__PURE__ */ r.jsxs("div", { className: "flex gap-2 px-1 ", children: [
1157
+ /* @__PURE__ */ r.jsx(ur, { label: h, block: t }),
1158
+ /* @__PURE__ */ r.jsxs("div", { className: "flex gap-2 px-1", children: [
1175
1159
  f && /* @__PURE__ */ r.jsx(
1176
1160
  $t,
1177
1161
  {
1178
- className: "hover:scale-105 ",
1162
+ className: "hover:scale-105",
1179
1163
  onClick: () => {
1180
1164
  l([]), i([f]);
1181
1165
  }
1182
1166
  }
1183
1167
  ),
1184
- bn(D(t, "_type", "")) ? /* @__PURE__ */ r.jsx(Wt, { className: "hover:scale-105 ", onClick: () => s([t == null ? void 0 : t._id]) }) : null,
1185
- kn(D(t, "_type", "")) ? /* @__PURE__ */ r.jsx(Ht, { className: "hover:scale-105 ", onClick: () => n([t == null ? void 0 : t._id]) }) : null
1168
+ mn(D(t, "_type", "")) ? /* @__PURE__ */ r.jsx(Wt, { className: "hover:scale-105", onClick: () => s([t == null ? void 0 : t._id]) }) : null,
1169
+ yn(D(t, "_type", "")) ? /* @__PURE__ */ r.jsx(Ht, { className: "hover:scale-105", onClick: () => n([t == null ? void 0 : t._id]) }) : null
1186
1170
  ] })
1187
1171
  ]
1188
1172
  }
1189
1173
  );
1190
- }, yr = ({ model: e }) => {
1191
- const [t] = wn(), [n] = U(), [s] = Ze(), [i] = Q(), [l] = X(), [d] = N(nt), { document: o, window: c } = ue(), [p] = q(o == null ? void 0 : o.getElementById("highlighted-block")), [f] = q(
1174
+ }, fr = ({ model: e }) => {
1175
+ const [t] = vn(), [n] = W(), [s] = Qe(), [i] = Z(), [l] = J(), [d] = M(nt), { document: o, window: c } = ue(), [p] = $(o == null ? void 0 : o.getElementById("highlighted-block")), [f] = $(
1192
1176
  o == null ? void 0 : o.getElementById("selected-block")
1193
- ), [h] = q(
1177
+ ), [h] = $(
1194
1178
  o == null ? void 0 : o.getElementById("selected-styling-block")
1195
- ), [g] = q(o == null ? void 0 : o.getElementById("dragged-block"));
1196
- M(() => {
1179
+ ), [v] = $(o == null ? void 0 : o.getElementById("dragged-block"));
1180
+ R(() => {
1197
1181
  s ? o == null || o.documentElement.classList.add("dark") : o == null || o.documentElement.classList.remove("dark");
1198
1182
  }, [s, o]);
1199
- const E = D(t, "headingFont", "DM Sans"), A = D(t, "bodyFont", "DM Sans");
1200
- return M(() => {
1201
- const b = D(t, "primaryColor", "#000"), S = D(t, "secondaryColor", "#FFF"), B = Mn({
1202
- colors: [b, S],
1183
+ const S = D(t, "headingFont", "DM Sans"), O = D(t, "bodyFont", "DM Sans");
1184
+ return R(() => {
1185
+ const m = D(t, "primaryColor", "#000"), g = D(t, "secondaryColor", "#FFF"), I = On({
1186
+ colors: [m, g],
1203
1187
  names: ["primary", "secondary"]
1204
1188
  });
1205
- B.primary.DEFAULT = b, B.secondary.DEFAULT = S;
1206
- const O = D(t, "roundedCorners", "0");
1189
+ I.primary.DEFAULT = m, I.secondary.DEFAULT = g;
1190
+ const H = D(t, "roundedCorners", "0");
1207
1191
  !c || !c.tailwind || (c.tailwind.config = {
1208
1192
  darkMode: "class",
1209
1193
  theme: {
1210
1194
  fontFamily: {
1211
- heading: [E],
1212
- body: [A]
1195
+ heading: [S],
1196
+ body: [O]
1213
1197
  },
1214
1198
  extend: {
1215
1199
  borderRadius: {
1216
- global: `${O || "0"}px`
1200
+ global: `${H || "0"}px`
1217
1201
  },
1218
- colors: B
1202
+ colors: I
1219
1203
  }
1220
1204
  },
1221
1205
  plugins: [
1222
1206
  // @ts-ignore
1223
- c.tailwind.plugin.withOptions(({ prefix: w = "ui" } = {}) => ({ addVariant: F }) => {
1224
- for (const $ of ["open", "checked", "selected", "active", "disabled"])
1225
- F(`${w}-${$}`, [
1226
- `&[data-headlessui-state~="${$}"]`,
1227
- `:where([data-headlessui-state~="${$}"]) &`
1228
- ]), F(`${w}-not-${$}`, [
1229
- `&[data-headlessui-state]:not([data-headlessui-state~="${$}"])`,
1230
- `:where([data-headlessui-state]:not([data-headlessui-state~="${$}"])) &:not([data-headlessui-state])`
1207
+ c.tailwind.plugin.withOptions(({ prefix: V = "ui" } = {}) => ({ addVariant: G }) => {
1208
+ for (const L of ["open", "checked", "selected", "active", "disabled"])
1209
+ G(`${V}-${L}`, [
1210
+ `&[data-headlessui-state~="${L}"]`,
1211
+ `:where([data-headlessui-state~="${L}"]) &`
1212
+ ]), G(`${V}-not-${L}`, [
1213
+ `&[data-headlessui-state]:not([data-headlessui-state~="${L}"])`,
1214
+ `:where([data-headlessui-state]:not([data-headlessui-state~="${L}"])) &:not([data-headlessui-state])`
1231
1215
  ]);
1232
1216
  })
1233
1217
  ]
1234
1218
  });
1235
- }, [t, c, E, A]), M(() => {
1236
- f && (f.textContent = `${re(n, (b) => `[data-block-id="${b}"]`).join(",")}{
1219
+ }, [t, c, S, O]), R(() => {
1220
+ f && (f.textContent = `${re(n, (m) => `[data-block-id="${m}"]`).join(",")}{
1237
1221
  outline: 1px solid ${n.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
1238
1222
  }`);
1239
- }, [n, f]), M(() => {
1223
+ }, [n, f]), R(() => {
1240
1224
  if (!d) {
1241
- g.textContent = "";
1225
+ v.textContent = "";
1242
1226
  return;
1243
1227
  }
1244
- g.textContent = `[data-block-id="${d}"]{ pointer-events: none !important; opacity: 0.2 !important}`;
1245
- }, [d]), M(() => {
1228
+ v.textContent = `[data-block-id="${d}"]{ pointer-events: none !important; opacity: 0.2 !important}`;
1229
+ }, [d]), R(() => {
1246
1230
  p && (p.textContent = i ? `[data-style-id="${i}"]{ outline: 1px solid #42a1fc !important; outline-offset: -1px;}` : "");
1247
- }, [i, n, p]), M(() => {
1248
- h && (h.textContent = `${re(l, ({ id: b }) => `[data-style-id="${b}"]`).join(",")}{
1231
+ }, [i, n, p]), R(() => {
1232
+ h && (h.textContent = `${re(l, ({ id: m }) => `[data-style-id="${m}"]`).join(",")}{
1249
1233
  outline: 1px solid #42a1fc !important; outline-offset: -1px;
1250
1234
  }`);
1251
- }, [l, h]), M(() => {
1252
- const b = D(t, "bodyTextLightColor", "#64748b"), S = D(t, "bodyTextDarkColor", "#94a3b8"), B = D(t, "bodyBgLightColor", "#FFFFFF"), O = D(t, "bodyBgDarkColor", "#0f172a");
1253
- o.body.className = `font-body antialiased text-[${b}] bg-[${B}] dark:text-[${S}] dark:bg-[${O}]`;
1235
+ }, [l, h]), R(() => {
1236
+ const m = D(t, "bodyTextLightColor", "#64748b"), g = D(t, "bodyTextDarkColor", "#94a3b8"), I = D(t, "bodyBgLightColor", "#FFFFFF"), H = D(t, "bodyBgDarkColor", "#0f172a");
1237
+ o.body.className = `font-body antialiased text-[${m}] bg-[${I}] dark:text-[${g}] dark:bg-[${H}]`;
1254
1238
  }, [t, o, e]), e === "page" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1255
- E && /* @__PURE__ */ r.jsx(
1239
+ S && /* @__PURE__ */ r.jsx(
1256
1240
  "link",
1257
1241
  {
1258
1242
  id: "heading-font",
1259
1243
  rel: "stylesheet",
1260
1244
  type: "text/css",
1261
- href: `https://fonts.googleapis.com/css2?family=${E.replace(
1245
+ href: `https://fonts.googleapis.com/css2?family=${S.replace(
1262
1246
  / /g,
1263
1247
  "+"
1264
1248
  )}:wght@300;400;500;600;700;800;900&display=swap`,
1265
1249
  media: "all"
1266
1250
  }
1267
1251
  ),
1268
- A && E !== A && /* @__PURE__ */ r.jsx(
1252
+ O && S !== O && /* @__PURE__ */ r.jsx(
1269
1253
  "link",
1270
1254
  {
1271
1255
  id: "body-font",
1272
1256
  rel: "stylesheet",
1273
1257
  type: "text/css",
1274
- href: `https://fonts.googleapis.com/css2?family=${A.replace(
1258
+ href: `https://fonts.googleapis.com/css2?family=${O.replace(
1275
1259
  / /g,
1276
1260
  "+"
1277
1261
  )}:wght@300;400;500;600;700;800;900&display=swap`,
1278
1262
  media: "all"
1279
1263
  }
1280
1264
  ),
1281
- E && /* @__PURE__ */ r.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${E}",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";}` })
1265
+ S && /* @__PURE__ */ r.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${S}",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";}` })
1282
1266
  ] }) : null;
1283
- }, vr = (e) => {
1267
+ }, hr = (e) => {
1284
1268
  const t = {};
1285
1269
  return Object.keys(e).forEach((n) => {
1286
- Te(e[n]) && e[n].startsWith(Le) && (t[n] = e[n].replace(Le, "").split(","));
1270
+ je(e[n]) && e[n].startsWith(Me) && (t[n] = e[n].replace(Me, "").split(","));
1287
1271
  }), t;
1288
- }, xr = Bt((e) => {
1272
+ }, gr = Dt((e) => {
1289
1273
  const t = e.replace(it, "").split(",");
1290
- return Nn(t[0], t[1]);
1274
+ return Rn(t[0], t[1]);
1291
1275
  });
1292
- function br(e, t) {
1276
+ function mr(e, t) {
1293
1277
  return D(e, `${t}_attrs`, {});
1294
1278
  }
1295
- function kr(e) {
1279
+ function yr(e) {
1296
1280
  const t = {};
1297
1281
  return Object.keys(e).forEach((n) => {
1298
- if (Te(e[n]) && e[n].startsWith(it)) {
1299
- const s = xr(e[n]);
1282
+ if (je(e[n]) && e[n].startsWith(it)) {
1283
+ const s = gr(e[n]);
1300
1284
  t[n] = {
1301
1285
  className: s,
1302
1286
  "data-style-prop": n,
1303
1287
  "data-block-parent": e._id,
1304
1288
  "data-style-id": `${n}-${e._id}`,
1305
- ...br(e, n)
1289
+ ...mr(e, n)
1306
1290
  };
1307
1291
  }
1308
1292
  }), t;
1309
1293
  }
1310
- function wr(e, t) {
1294
+ function vr(e, t) {
1311
1295
  const n = D(e, "_bindings", {});
1312
- return K(n) ? { ...e } : (_t(n, (s, i) => {
1313
- Te(s) && D(t, s, null) && (e[i] = D(t, s, null));
1296
+ return z(n) ? { ...e } : (_t(n, (s, i) => {
1297
+ je(s) && D(t, s, null) && (e[i] = D(t, s, null));
1314
1298
  }), e);
1315
1299
  }
1316
1300
  function we({ blocks: e }) {
1317
- const t = Se(), n = je((l) => kr(l), []), [s] = En(), [i] = N(G);
1318
- return /* @__PURE__ */ r.jsx(r.Fragment, { children: V.Children.toArray(
1301
+ const [t] = Ee(), n = ke((l) => yr(l), []), [s] = jn(), [i] = M(X);
1302
+ return /* @__PURE__ */ r.jsx(r.Fragment, { children: K.Children.toArray(
1319
1303
  e.map((l, d) => {
1320
1304
  if (i === l._id)
1321
1305
  return null;
1322
- const o = vr(l), c = {};
1323
- K(o) || Object.keys(o).forEach((g) => {
1324
- c[g] = V.Children.toArray(
1325
- o[g].map((E) => /* @__PURE__ */ r.jsx(we, { blocks: [Ot(t, { _id: E })] }))
1306
+ const o = hr(l), c = {};
1307
+ z(o) || Object.keys(o).forEach((v) => {
1308
+ c[v] = K.Children.toArray(
1309
+ o[v].map((S) => /* @__PURE__ */ r.jsx(we, { blocks: [Bt(t, { _id: S })] }))
1326
1310
  );
1327
1311
  });
1328
- const p = Xe(t, { _parent: l._id });
1312
+ const p = Ve(t, { _parent: l._id });
1329
1313
  c.children = p.length ? /* @__PURE__ */ r.jsx(we, { blocks: p }) : null;
1330
- const f = at(l._type), h = D(f, "builderComponent", D(f, "component", null));
1331
- return At(h) ? /* @__PURE__ */ r.jsx("noscript", { children: `<!-- ${l == null ? void 0 : l._type} not registered -->` }) : /* @__PURE__ */ r.jsx(Je, { children: V.createElement(h, {
1314
+ const f = Pn(l._type), h = D(f, "builderComponent", D(f, "component", null));
1315
+ return Ot(h) ? /* @__PURE__ */ r.jsx("noscript", { children: `<!-- ${l == null ? void 0 : l._type} not registered -->` }) : /* @__PURE__ */ r.jsx(Ke, { children: K.createElement(h, {
1332
1316
  blockProps: {
1333
1317
  "data-block-id": l._id,
1334
1318
  "data-block-type": l._type,
1335
- "data-dnd": Fn(f, "canAcceptBlock") ? "branch" : "leaf"
1319
+ "data-dnd": At(f, "canAcceptBlock") ? "branch" : "leaf"
1336
1320
  },
1337
1321
  inBuilder: !0,
1338
1322
  index: d,
1339
- ...wr(l, s),
1323
+ ...vr(l, s),
1340
1324
  ...n(l),
1341
1325
  ...c
1342
1326
  }) });
1343
1327
  })
1344
1328
  ) });
1345
1329
  }
1346
- const jr = () => {
1347
- const e = Se(), t = Ee("container", null), n = K(e) ? null : /* @__PURE__ */ r.jsx(Sn, { children: /* @__PURE__ */ r.jsx(we, { blocks: Xe(e, (i) => K(i._parent)) }) }), s = t ? be(at(t).component, {}, n) : n;
1348
- return /* @__PURE__ */ r.jsx(Ln, { children: s });
1349
- }, Tr = (e, t) => e.querySelector(`[data-style-id="${t}"]`), Cr = () => {
1350
- const [e] = N(jn), [t] = et(), [n] = Ie(), [, s] = U(), i = Tn(), [, l] = Q(), d = Oe(null), o = Oe(null), [c, p] = q({ width: 0, height: 0 }), f = Kn(c), [h, g] = q(0), [E, A] = q([]), [, b] = q([]), [, S] = N(Cn), [B, O] = X(), w = Ee("loadingCanvas", !1);
1351
- M(() => {
1352
- const { clientWidth: _, clientHeight: W } = o.current;
1353
- p({ width: _, height: W }), h === 0 && g(_);
1330
+ const xr = () => {
1331
+ const [e] = Ee(), t = z(e) ? null : /* @__PURE__ */ r.jsx(Tn, { children: /* @__PURE__ */ r.jsx(we, { blocks: Ve(e, (n) => z(n._parent)) }) });
1332
+ return /* @__PURE__ */ r.jsx(An, { children: t });
1333
+ }, br = (e, t) => e.querySelector(`[data-style-id="${t}"]`), wr = () => {
1334
+ const [e] = M(xn), [t] = et(), [n] = Te(), [, s] = W(), i = bn(), [, l] = Z(), d = Be(null), o = Be(null), [c, p] = $({ width: 0, height: 0 }), f = Un(c), [h, v] = $(0), [S, O] = $([]), [, m] = $([]), [, g] = M(wn), [I, H] = J(), V = Ce("loadingCanvas", !1);
1335
+ R(() => {
1336
+ const { clientWidth: _, clientHeight: N } = o.current;
1337
+ p({ width: _, height: N }), h === 0 && v(_);
1354
1338
  }, [o, n, h]);
1355
- const F = (_, W = 0) => {
1356
- const { top: H } = _.getBoundingClientRect();
1357
- return H + W >= 0 && H - W <= window.innerHeight;
1339
+ const G = (_, N = 0) => {
1340
+ const { top: F } = _.getBoundingClientRect();
1341
+ return F + N >= 0 && F - N <= window.innerHeight;
1358
1342
  };
1359
- M(() => {
1360
- var _, W;
1343
+ R(() => {
1344
+ var _, N;
1361
1345
  if (i && i.type !== "Multiple" && d.current) {
1362
- const H = gt(d.current.contentDocument, i._id);
1363
- H && (F(H) || (W = (_ = d.current) == null ? void 0 : _.contentWindow) == null || W.scrollTo({ top: H.offsetTop, behavior: "smooth" }), A([H]));
1346
+ const F = ht(d.current.contentDocument, i._id);
1347
+ F && (G(F) || (N = (_ = d.current) == null ? void 0 : _.contentWindow) == null || N.scrollTo({ top: F.offsetTop, behavior: "smooth" }), O([F]));
1364
1348
  }
1365
- }, [i]), M(() => {
1366
- if (!K(B) && d.current) {
1367
- const _ = Tr(
1349
+ }, [i]), R(() => {
1350
+ if (!z(I) && d.current) {
1351
+ const _ = br(
1368
1352
  d.current.contentDocument,
1369
- ae(B).id
1353
+ ae(I).id
1370
1354
  );
1371
- b(_ ? [_] : [null]);
1355
+ m(_ ? [_] : [null]);
1372
1356
  } else
1373
- b([null]);
1374
- }, [B]);
1375
- const $ = It(() => {
1376
- let _ = Yn;
1357
+ m([null]);
1358
+ }, [I]);
1359
+ const L = Ct(() => {
1360
+ let _ = Hn;
1377
1361
  return e === "offline" && (_ = _.replace(
1378
1362
  "https://old.chaibuilder.com/offline/tailwind.cdn.js",
1379
1363
  "/offline/tailwind.cdn.js"
@@ -1383,32 +1367,32 @@ const jr = () => {
1383
1367
  "div",
1384
1368
  {
1385
1369
  onClick: () => {
1386
- s([]), O([]);
1370
+ s([]), H([]);
1387
1371
  },
1388
1372
  onMouseLeave: () => setTimeout(() => l(""), 300),
1389
1373
  className: "relative mx-auto overflow-hidden h-full w-full",
1390
- style: h > 0 && !K(f) ? { width: t ? "100%" : h } : {},
1374
+ style: h > 0 && !z(f) ? { width: t ? "100%" : h } : {},
1391
1375
  ref: o,
1392
1376
  children: /* @__PURE__ */ r.jsxs(
1393
- nr,
1377
+ Zn,
1394
1378
  {
1395
- contentDidMount: () => S(d.current),
1379
+ contentDidMount: () => g(d.current),
1396
1380
  ref: d,
1397
1381
  id: "canvas-iframe",
1398
1382
  style: { width: `${n}px`, ...f },
1399
1383
  className: "relative mx-auto box-content h-full max-w-full shadow-lg transition-all duration-300 ease-linear",
1400
- initialContent: $,
1384
+ initialContent: L,
1401
1385
  children: [
1402
- /* @__PURE__ */ r.jsx(hr, {}),
1386
+ /* @__PURE__ */ r.jsx(dr, {}),
1403
1387
  /* @__PURE__ */ r.jsx(
1404
- mr,
1388
+ pr,
1405
1389
  {
1406
1390
  block: i,
1407
- selectedBlockElement: ae(E)
1391
+ selectedBlockElement: ae(S)
1408
1392
  }
1409
1393
  ),
1410
- /* @__PURE__ */ r.jsx(yr, { model: "page" }),
1411
- /* @__PURE__ */ r.jsx(fr, { children: w ? /* @__PURE__ */ r.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ r.jsx(rt, { className: "h-full" }) }) : /* @__PURE__ */ r.jsx(jr, {}) }),
1394
+ /* @__PURE__ */ r.jsx(fr, { model: "page" }),
1395
+ /* @__PURE__ */ r.jsx(cr, { children: V ? /* @__PURE__ */ r.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ r.jsx(rt, { className: "h-full" }) }) : /* @__PURE__ */ r.jsx(xr, {}) }),
1412
1396
  /* @__PURE__ */ r.jsx("br", {}),
1413
1397
  /* @__PURE__ */ r.jsx("div", { id: "placeholder", className: "absolute bg-green-500 z-[99999] max-w-full transition-transform" })
1414
1398
  ]
@@ -1416,10 +1400,10 @@ const jr = () => {
1416
1400
  )
1417
1401
  }
1418
1402
  );
1419
- }, Ro = () => /* @__PURE__ */ r.jsxs("div", { className: "flex h-full w-full flex-col", children: [
1420
- /* @__PURE__ */ r.jsx(zn, {}),
1421
- /* @__PURE__ */ r.jsx("div", { className: "relative h-full overflow-hidden bg-slate-800/90 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] px-2", children: /* @__PURE__ */ r.jsx(Je, { fallback: /* @__PURE__ */ r.jsx(rt, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(Dn, { children: /* @__PURE__ */ r.jsx(Cr, {}) }) }) })
1403
+ }, Do = () => /* @__PURE__ */ r.jsxs("div", { className: "flex h-full w-full flex-col", children: [
1404
+ /* @__PURE__ */ r.jsx(Wn, {}),
1405
+ /* @__PURE__ */ r.jsx("div", { className: "relative h-full overflow-hidden bg-slate-800/90 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] px-2", children: /* @__PURE__ */ r.jsx(Ke, { fallback: /* @__PURE__ */ r.jsx(rt, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(Cn, { children: /* @__PURE__ */ r.jsx(wr, {}) }) }) })
1422
1406
  ] });
1423
1407
  export {
1424
- Ro as default
1408
+ Do as default
1425
1409
  };