@chaibuilder/sdk 1.2.32 → 1.2.34

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 (103) hide show
  1. package/dist/{AddBlocks-0eVRNr1d.js → AddBlocks-RmEkZXdE.js} +37 -33
  2. package/dist/AddBlocks-XYCWUol8.cjs +1 -0
  3. package/dist/{BrandingOptions-yYAznnw2.js → BrandingOptions-TnzCIC7A.js} +37 -31
  4. package/dist/BrandingOptions-qnaKl27s.cjs +1 -0
  5. package/dist/CanvasArea-SeSRWHy0.js +1200 -0
  6. package/dist/CanvasArea-iIwERFUC.cjs +55 -0
  7. package/dist/ChaiBuilderEditor-YqEKonJ_.cjs +206 -0
  8. package/dist/{index-AJalHhkO.js → ChaiBuilderEditor-y1NxvXJ7.js} +24114 -20836
  9. package/dist/{CurrentPage-1v40uk8K.js → CurrentPage-9KDre_9q.js} +19 -19
  10. package/dist/CurrentPage-TNff16tH.cjs +1 -0
  11. package/dist/ListTree-GxCAsv2Y.cjs +1 -0
  12. package/dist/{ListTree-0ZrRreCs.js → ListTree-H2WaKwOs.js} +81 -76
  13. package/dist/PagesPanel-5DRsqV-G.cjs +1 -0
  14. package/dist/{PagesPanel-AxQX-BX2.js → PagesPanel-jHMmJEtv.js} +14 -14
  15. package/dist/ProjectPanel-CDnnGpVo.cjs +1 -0
  16. package/dist/{ProjectPanel-GYdge5v9.js → ProjectPanel-uxhq_D3j.js} +16 -16
  17. package/dist/Settings-nGnVavh4.cjs +1 -0
  18. package/dist/{Settings-9JAzGHau.js → Settings-yqZksAbO.js} +53 -53
  19. package/dist/{SidePanels-bLwsW29O.js → SidePanels-1gwirESt.js} +70 -70
  20. package/dist/SidePanels-33KNaSS3.cjs +1 -0
  21. package/dist/{Topbar-0Ql8pHVc.js → Topbar-NHF8D1di.js} +19 -14
  22. package/dist/Topbar-Wwdd9Flx.cjs +1 -0
  23. package/dist/{UnsplashImages-NYwOOgYa.js → UnsplashImages-LLu2wFeN.js} +26 -21
  24. package/dist/UnsplashImages-lnz6NfSD.cjs +1 -0
  25. package/dist/UploadImages-3nl_4mDf.cjs +1 -0
  26. package/dist/{UploadImages-vpZeW-YW.js → UploadImages-FtvaDyk9.js} +33 -27
  27. package/dist/{add-page-modal-hDyzsEU7.js → add-page-modal-V9DTBMmY.js} +22 -22
  28. package/dist/add-page-modal-sIZk552b.cjs +1 -0
  29. package/dist/confirm-alert-Uzq5XNGt.cjs +1 -0
  30. package/dist/{confirm-alert-FGQKKQJU.js → confirm-alert-sI4pItIN.js} +16 -10
  31. package/dist/{controls-OfJWSEqC.js → controls-VTdJhdSz.js} +44 -41
  32. package/dist/controls-jWJDao88.cjs +1 -0
  33. package/dist/core.cjs +1 -1
  34. package/dist/core.d.ts +9 -0
  35. package/dist/core.js +46 -45
  36. package/dist/delete-page-modal-UminFzYh.cjs +1 -0
  37. package/dist/{delete-page-modal-KxeyBri2.js → delete-page-modal-XrIpujav.js} +15 -15
  38. package/dist/email-blocks.cjs +1 -1
  39. package/dist/email-blocks.js +1 -1
  40. package/dist/email.cjs +1 -1
  41. package/dist/email.d.ts +9 -0
  42. package/dist/email.js +18 -16
  43. package/dist/{form-77dY98bF.js → form-dQQ2tTRZ.js} +7 -7
  44. package/dist/form-q7lxaK3j.cjs +1 -0
  45. package/dist/functions-ge87TVcc.js +30 -0
  46. package/dist/functions-sBiIevFh.cjs +1 -0
  47. package/dist/{index-5zkCTSAM.js → index-OsS2_gM8.js} +28 -29
  48. package/dist/index-eYwpNzUl.cjs +1 -0
  49. package/dist/lib.cjs +2 -2
  50. package/dist/lib.d.ts +2 -0
  51. package/dist/lib.js +12 -10
  52. package/dist/{page-viewer-umQaut1j.js → page-viewer-AoJ5HU6j.js} +21 -21
  53. package/dist/page-viewer-FzhqSyNO.cjs +1 -0
  54. package/dist/project-general-setting-WzJ8U1OW.cjs +1 -0
  55. package/dist/{project-general-setting-uuCemMCU.js → project-general-setting-g3YJYszB.js} +24 -24
  56. package/dist/{project-seo-setting-asvbPQiI.js → project-seo-setting-1sLmV-wv.js} +26 -20
  57. package/dist/project-seo-setting-GuObNafp.cjs +1 -0
  58. package/dist/render.cjs +1 -1
  59. package/dist/render.d.ts +2 -0
  60. package/dist/render.js +55 -53
  61. package/dist/single-page-detail-WGars7Tl.cjs +1 -0
  62. package/dist/{single-page-detail-F6pKWyq1.js → single-page-detail-sQ3BH6Rc.js} +25 -25
  63. package/dist/studio.cjs +1 -1
  64. package/dist/studio.d.ts +9 -0
  65. package/dist/studio.js +13 -13
  66. package/dist/ui.cjs +1 -1
  67. package/dist/ui.js +153 -147
  68. package/dist/useCanvasSettings-QcsmJd9b.cjs +1 -0
  69. package/dist/{useCanvasSettings-ikt217kv.js → useCanvasSettings-XwFRrknO.js} +1 -1
  70. package/dist/web-blocks.cjs +4 -4
  71. package/dist/web-blocks.js +137 -113
  72. package/package.json +9 -3
  73. package/dist/AddBlocks-t0hKDSud.cjs +0 -1
  74. package/dist/BrandingOptions-NVmCxZfD.cjs +0 -1
  75. package/dist/CanvasArea-2b4oSjRx.js +0 -1177
  76. package/dist/CanvasArea-OzyCq6UU.cjs +0 -55
  77. package/dist/CurrentPage-YBMhEBZG.cjs +0 -1
  78. package/dist/ListTree-jPwxgI6R.cjs +0 -1
  79. package/dist/PagesPanel-ivEL9tIQ.cjs +0 -1
  80. package/dist/ProjectPanel-shgvg_yT.cjs +0 -1
  81. package/dist/Settings-MMwEBADN.cjs +0 -1
  82. package/dist/SidePanels-iaaRCUeQ.cjs +0 -1
  83. package/dist/Topbar-CkUhCnSW.cjs +0 -1
  84. package/dist/UnsplashImages-juwtWvXe.cjs +0 -1
  85. package/dist/UploadImages-4_jmnoVi.cjs +0 -1
  86. package/dist/add-page-modal-2ZPjc54F.cjs +0 -1
  87. package/dist/confirm-alert-QRxOc76t.cjs +0 -1
  88. package/dist/controls-KK2oLIa8.cjs +0 -1
  89. package/dist/delete-page-modal--N1nPPIL.cjs +0 -1
  90. package/dist/form-hT5dGoJH.cjs +0 -1
  91. package/dist/functions-I6BoMqqb.js +0 -21
  92. package/dist/functions-r3ExvGGf.cjs +0 -1
  93. package/dist/index-FPBudsRF.cjs +0 -1
  94. package/dist/index-JIcsKKoG.cjs +0 -1
  95. package/dist/index-YpnaudSM.js +0 -63
  96. package/dist/index-ecnGWzh9.cjs +0 -1
  97. package/dist/index-hH5SIZ29.js +0 -3116
  98. package/dist/index-sJ9Uc9UY.cjs +0 -206
  99. package/dist/page-viewer-k-g15j8B.cjs +0 -1
  100. package/dist/project-general-setting-1leAiCJQ.cjs +0 -1
  101. package/dist/project-seo-setting-kDBSOzgX.cjs +0 -1
  102. package/dist/single-page-detail-IFtVxwl5.cjs +0 -1
  103. package/dist/useCanvasSettings-Am2o80hW.cjs +0 -1
@@ -0,0 +1,1200 @@
1
+ var Fe = Object.defineProperty;
2
+ var Pe = (o, s, e) => s in o ? Fe(o, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[s] = e;
3
+ var A = (o, s, e) => (Pe(o, typeof s != "symbol" ? s + "" : s, e), e);
4
+ import { j as r } from "./jsx-runtime-WbnYoNE9.js";
5
+ import _, { createElement as se, useCallback as P, useState as j, useEffect as k, Component as ue, Children as He, Suspense as he, useRef as ne, useMemo as Oe } from "react";
6
+ import { map as F, includes as oe, toUpper as Y, round as ze, noop as T, has as Q, throttle as me, isEmpty as S, first as U, omit as Ue, pick as We, get as f, isString as G, memoize as qe, each as Ke, find as Ye, filter as ge, isNull as Je } from "lodash-es";
7
+ import { ResetIcon as re, MobileIcon as ie, LaptopIcon as Qe, DesktopIcon as Ze, DotsVerticalIcon as Xe, EraserIcon as Ge, ZoomInIcon as Ve, DragHandleDots2Icon as et, ArrowUpIcon as tt, CopyIcon as st, TrashIcon as nt } from "@radix-ui/react-icons";
8
+ import { j as fe, B as W, v as xe, ap as ve, aq as $e, ar as ot, as as rt, at as it, o as V, X as at, h as O, au as lt, av as ct, aw as dt, ax as pt, ay as ut, az as ht, aA as mt, L as C, Y as N, A as gt, a as ft, b as xt, c as vt, d as $t, e as yt, f as bt, g as kt, a3 as wt, aB as jt, p as ye, ao as z, m as Ct, aC as Bt, z as M, Q as St, aD as L, aE as It, i as ee, w as be, E as ke, H as we, V as Dt, aF as At, aG as je, aH as _t, aI as Nt, F as Mt, aJ as Et, aK as Tt, aL as Lt, M as Rt, aM as Ft, ah as Ce, a2 as Pt } from "./ChaiBuilderEditor-y1NxvXJ7.js";
9
+ import { useTranslation as q } from "react-i18next";
10
+ import { useAtom as y } from "jotai";
11
+ import { SparklesIcon as Ht } from "lucide-react";
12
+ import ae from "react-dom";
13
+ import b from "prop-types";
14
+ import { Quill as Ot } from "react-quill";
15
+ import { useFeature as Be } from "flagged";
16
+ import { flip as zt } from "@floating-ui/dom";
17
+ import { useFloating as Ut, shift as Wt } from "@floating-ui/react-dom";
18
+ import { useResizeObserver as qt } from "@react-hookz/web";
19
+ import Kt from "@tailwindcss/typography";
20
+ import Yt from "@tailwindcss/forms";
21
+ import Jt from "@tailwindcss/aspect-ratio";
22
+ import Qt from "tailwindcss-palette-generator";
23
+ import { Provider as Zt } from "react-wrap-balancer";
24
+ import { twMerge as Xt } from "tailwind-merge";
25
+ import { S as le, a as Se } from "./STRINGS--j49GZJP.js";
26
+ import { getBlockComponent as Gt } from "@chaibuilder/runtime";
27
+ import { u as Vt } from "./useCanvasSettings-XwFRrknO.js";
28
+ import "./_commonjsHelpers-UyOWmZb0.js";
29
+ import "clsx";
30
+ import "@radix-ui/react-scroll-area";
31
+ import "i18next";
32
+ import "./Functions-7jnEwJyw.js";
33
+ import "./MODIFIERS-cBT31iqE.js";
34
+ import "@radix-ui/react-toggle";
35
+ import "class-variance-authority";
36
+ import "./Class-6Hz2KzYb.js";
37
+ import "@radix-ui/react-switch";
38
+ import "@radix-ui/react-slot";
39
+ import "@radix-ui/react-accordion";
40
+ import "@radix-ui/react-alert-dialog";
41
+ import "@radix-ui/react-dialog";
42
+ import "@radix-ui/react-label";
43
+ import "@radix-ui/react-tabs";
44
+ import "@radix-ui/react-tooltip";
45
+ import "@radix-ui/react-popover";
46
+ import "@radix-ui/react-menubar";
47
+ import "@radix-ui/react-hover-card";
48
+ import "@radix-ui/react-select";
49
+ import "@radix-ui/react-dropdown-menu";
50
+ import "@radix-ui/react-separator";
51
+ import "@radix-ui/react-toast";
52
+ import "cmdk";
53
+ import "@radix-ui/react-context-menu";
54
+ import "react-icons-picker";
55
+ import "react-hotkeys-hook";
56
+ import "lodash";
57
+ const es = () => {
58
+ const { hasUndo: o, hasRedo: s, undo: e, redo: t } = fe();
59
+ return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
60
+ /* @__PURE__ */ r.jsx(W, { disabled: !o(), size: "sm", onClick: e, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(re, {}) }),
61
+ /* @__PURE__ */ r.jsx(W, { disabled: !s(), onClick: t, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ r.jsx(re, { className: "rotate-180 scale-y-[-1] transform" }) })
62
+ ] });
63
+ };
64
+ function ts() {
65
+ const [o, s] = xe(), { t: e } = q();
66
+ return /* @__PURE__ */ r.jsxs("div", { className: "flex items-center", children: [
67
+ /* @__PURE__ */ r.jsx(ve, { htmlFor: "dark-mode-switch", children: e("dark_mode") }),
68
+ /* @__PURE__ */ r.jsxs(
69
+ $e,
70
+ {
71
+ id: "dark-mode-switch",
72
+ checked: o,
73
+ onCheckedChange: () => {
74
+ s(!o);
75
+ },
76
+ className: `${o ? "bg-violet-600" : "bg-violet-300"}
77
+ 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`,
78
+ children: [
79
+ /* @__PURE__ */ r.jsx("span", { className: "sr-only", children: e("use_setting") }),
80
+ /* @__PURE__ */ r.jsx(
81
+ "span",
82
+ {
83
+ "aria-hidden": "true",
84
+ className: `${o ? "translate-x-5" : "translate-x-0"}
85
+ 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`
86
+ }
87
+ )
88
+ ]
89
+ }
90
+ )
91
+ ] });
92
+ }
93
+ const ce = ({ landscape: o = !1 }) => /* @__PURE__ */ r.jsxs(
94
+ "svg",
95
+ {
96
+ className: o ? "rotate-90" : "",
97
+ xmlns: "http://www.w3.org/2000/svg",
98
+ viewBox: "0 0 13 13",
99
+ xmlSpace: "preserve",
100
+ width: 13,
101
+ height: 13,
102
+ children: [
103
+ /* @__PURE__ */ r.jsx("g", { strokeWidth: 0 }),
104
+ /* @__PURE__ */ r.jsx("g", { strokeLinecap: "round", strokeLinejoin: "round" }),
105
+ /* @__PURE__ */ r.jsx(
106
+ "path",
107
+ {
108
+ d: "M10.65 0H2.349a.851.851 0 0 0-.851.852v11.299c0 .47.382.852.851.852h8.3a.851.851 0 0 0 .851-.852V.852A.851.851 0 0 0 10.65 0zM6.599 12.466a.367.367 0 1 1 0-.735.367.367 0 0 1 0 .735zm3.9-1.267H2.5V1h8.001v10.199z",
109
+ style: {
110
+ fill: "#000"
111
+ }
112
+ }
113
+ )
114
+ ]
115
+ }
116
+ ), ss = [
117
+ {
118
+ title: "mobile_xs_title",
119
+ content: "mobile_xs_content",
120
+ breakpoint: "xs",
121
+ icon: /* @__PURE__ */ r.jsx(ie, {}),
122
+ width: 400
123
+ },
124
+ {
125
+ title: "mobile_sm_title",
126
+ content: "mobile_sm_content",
127
+ breakpoint: "sm",
128
+ icon: /* @__PURE__ */ r.jsx(ie, { className: "rotate-90" }),
129
+ width: 640
130
+ },
131
+ {
132
+ title: "tablet_md_title",
133
+ content: "tablet_md_content",
134
+ breakpoint: "md",
135
+ icon: /* @__PURE__ */ r.jsx(ce, {}),
136
+ width: 800
137
+ },
138
+ {
139
+ title: "tablet_lg_title",
140
+ content: "tablet_lg_content",
141
+ breakpoint: "lg",
142
+ icon: /* @__PURE__ */ r.jsx(ce, { landscape: !0 }),
143
+ width: 1024
144
+ },
145
+ {
146
+ title: "desktop_xl_title",
147
+ content: "desktop_xl_content",
148
+ breakpoint: "xl",
149
+ icon: /* @__PURE__ */ r.jsx(Qe, {}),
150
+ width: 1420
151
+ },
152
+ {
153
+ title: "large_desktop_2xl_title",
154
+ content: "large_desktop_2xl_content",
155
+ breakpoint: "2xl",
156
+ icon: /* @__PURE__ */ r.jsx(Ze, {}),
157
+ width: 1920
158
+ }
159
+ ], de = ({
160
+ title: o,
161
+ content: s,
162
+ currentBreakpoint: e,
163
+ breakpoint: t,
164
+ width: n,
165
+ icon: d,
166
+ onClick: a
167
+ }) => {
168
+ const { t: i } = q();
169
+ return /* @__PURE__ */ r.jsxs(ot, { children: [
170
+ /* @__PURE__ */ r.jsx(rt, { asChild: !0, children: /* @__PURE__ */ r.jsx(
171
+ W,
172
+ {
173
+ onClick: () => a(n),
174
+ size: "sm",
175
+ variant: t === e ? "secondary" : "ghost",
176
+ children: d
177
+ }
178
+ ) }),
179
+ /* @__PURE__ */ r.jsx(it, { 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: [
180
+ /* @__PURE__ */ r.jsx("h4", { className: "text-sm font-semibold", children: i(o) }),
181
+ /* @__PURE__ */ r.jsx("p", { className: "text-xs", children: i(s) })
182
+ ] }) }) })
183
+ ] });
184
+ }, ns = () => {
185
+ const [, o, s] = V(), [e, t] = at(), { t: n } = q(), d = O("breakpoints", ss), a = (i) => {
186
+ e.includes(i) ? e.length > 2 && t(e.filter((l) => l !== i)) : t((l) => [...l, i]);
187
+ };
188
+ return d.length < 4 ? /* @__PURE__ */ r.jsx("div", { className: "flex items-center rounded-md", children: F(d, (i) => /* @__PURE__ */ se(de, { ...i, onClick: s, key: i.breakpoint, currentBreakpoint: o })) }) : /* @__PURE__ */ r.jsxs("div", { className: "flex items-center rounded-md", children: [
189
+ F(
190
+ d.filter((i) => oe(e, Y(i.breakpoint))),
191
+ (i) => /* @__PURE__ */ se(de, { ...i, onClick: s, key: i.breakpoint, currentBreakpoint: o })
192
+ ),
193
+ /* @__PURE__ */ r.jsxs(lt, { children: [
194
+ /* @__PURE__ */ r.jsx(ct, { asChild: !0, children: /* @__PURE__ */ r.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ r.jsx(Xe, { className: "scale-90 transform" }) }) }),
195
+ /* @__PURE__ */ r.jsxs(dt, { className: "w-56 border-border text-xs", children: [
196
+ /* @__PURE__ */ r.jsx(pt, { children: n("Breakpoints") }),
197
+ /* @__PURE__ */ r.jsx(ut, {}),
198
+ F(d, (i) => /* @__PURE__ */ r.jsx(
199
+ ht,
200
+ {
201
+ disabled: i.breakpoint === "xs",
202
+ onCheckedChange: () => a(Y(i.breakpoint)),
203
+ checked: oe(e, Y(i.breakpoint)),
204
+ children: n(i.title)
205
+ },
206
+ i.breakpoint
207
+ ))
208
+ ] })
209
+ ] })
210
+ ] });
211
+ }, os = () => {
212
+ const { t: o } = q(), { setNewBlocks: s } = mt(), [, e] = C(), [, t] = N(), n = P(() => {
213
+ s([]), e([]), t([]);
214
+ }, [s]);
215
+ return /* @__PURE__ */ r.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ r.jsxs(gt, { children: [
216
+ /* @__PURE__ */ r.jsx(ft, { asChild: !0, children: /* @__PURE__ */ r.jsxs(W, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
217
+ /* @__PURE__ */ r.jsx(Ge, {}),
218
+ " ",
219
+ o("clear")
220
+ ] }) }),
221
+ /* @__PURE__ */ r.jsxs(xt, { className: "border-border", children: [
222
+ /* @__PURE__ */ r.jsxs(vt, { children: [
223
+ /* @__PURE__ */ r.jsx($t, { children: o("clear_canvas_title") }),
224
+ /* @__PURE__ */ r.jsx(yt, { children: o("clear_canvas_description") })
225
+ ] }),
226
+ /* @__PURE__ */ r.jsxs(bt, { children: [
227
+ /* @__PURE__ */ r.jsx(kt, { children: o("cancel") }),
228
+ /* @__PURE__ */ r.jsx(wt, { onClick: n, children: o("yes") })
229
+ ] })
230
+ ] })
231
+ ] }) });
232
+ }, rs = () => {
233
+ const [o, s] = y(jt);
234
+ return O("askAiCallBack", null) ? /* @__PURE__ */ r.jsxs("div", { className: "flex items-center space-x-2", children: [
235
+ /* @__PURE__ */ r.jsxs(ve, { htmlFor: "ai-assistant", className: "flex items-center gap-x-1 text-sm text-yellow-600", children: [
236
+ /* @__PURE__ */ r.jsx(Ht, { className: "w-4" }),
237
+ "AI Assistant"
238
+ ] }),
239
+ /* @__PURE__ */ r.jsx(
240
+ $e,
241
+ {
242
+ className: "scale-90",
243
+ checked: o,
244
+ onCheckedChange: (t) => {
245
+ s(t);
246
+ },
247
+ id: "ai-assitantt"
248
+ }
249
+ )
250
+ ] }) : null;
251
+ }, is = () => {
252
+ const o = O("darkMode", !1), [s] = ye();
253
+ return /* @__PURE__ */ r.jsxs("div", { className: "flex h-10 items-center justify-between border-b bg-background/70 px-2", children: [
254
+ /* @__PURE__ */ r.jsxs("div", { className: "flex h-full space-x-2", children: [
255
+ o ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
256
+ /* @__PURE__ */ r.jsx(ts, {}),
257
+ /* @__PURE__ */ r.jsx(z, { orientation: "vertical" })
258
+ ] }) : null,
259
+ /* @__PURE__ */ r.jsx(ns, {}),
260
+ /* @__PURE__ */ r.jsx(z, { orientation: "vertical" }),
261
+ /* @__PURE__ */ r.jsxs("div", { className: "flex w-12 items-center justify-center gap-x-1 space-x-0 font-medium", children: [
262
+ /* @__PURE__ */ r.jsx(Ve, { className: "h-3.5 w-3.5 flex-shrink-0" }),
263
+ " ",
264
+ /* @__PURE__ */ r.jsxs("div", { className: "text-xs leading-3", children: [
265
+ ze(s, 0),
266
+ "%"
267
+ ] })
268
+ ] }),
269
+ /* @__PURE__ */ r.jsx(z, { orientation: "vertical" }),
270
+ /* @__PURE__ */ r.jsx(es, {})
271
+ ] }),
272
+ /* @__PURE__ */ r.jsxs("div", { className: "flex h-full items-center space-x-2", children: [
273
+ /* @__PURE__ */ r.jsx(rs, {}),
274
+ /* @__PURE__ */ r.jsx(z, { orientation: "vertical" }),
275
+ /* @__PURE__ */ r.jsx(os, {})
276
+ ] })
277
+ ] });
278
+ }, as = `<!doctype html>
279
+ <html lang="en" class="scroll-smooth h-full overflow-y-auto">
280
+ <head>
281
+ <meta charset="UTF-8">
282
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
283
+ <script src="https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio"><\/script>
284
+ <style>
285
+ html { height: 100%; overflow:auto; }
286
+ body { height: 100%; }
287
+ .air-highlight{ outline: 1px solid #42a1fc !important; outline-offset: -1px;}
288
+ .air-highlight-multi{ outline: 1px solid #29e503 !important; outline-offset: -1px;}
289
+ body{ -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none;
290
+ -moz-user-select: none;-ms-user-select: none; user-select: none; }
291
+ html{
292
+ -ms-overflow-style: none; /* IE and Edge */
293
+ scrollbar-width: none; /* Firefox */
294
+ }
295
+ /** IMPORTANT: Make fields content editable in SAFARI */
296
+ [contenteditable] {-webkit-user-select: text;user-select: text;}
297
+
298
+ html::-webkit-scrollbar { width: 0 !important }
299
+ .aspect-auto{aspect-ratio: auto;}
300
+ .aspect-square{aspect-ratio: 1/1;}
301
+ .aspect-video{aspect-ratio: 16/9;}
302
+ .dragging [data-dnd="leaf"] { pointer-events: none; } .dragging [data-dnd="leaf"] * { pointer-events: none; }
303
+ .dragging [data-dnd="ignore"], .dragging [data-dnd="ignore"] * { pointer-events: none; }
304
+ a{ pointer-events: none !important; }
305
+ [contenteditable="true"], [contenteditable="true"] * { cursor: text !important; }
306
+ [contenteditable="true"] {
307
+ outline: none;
308
+ box-shadow: 0 0 0px 4px rgba(36, 150, 255, 0.2);
309
+ -webkit-user-select: text;
310
+ -moz-user-select: text;
311
+ user-select: text;
312
+ }
313
+ .frame-root .frame-content { height: 100%; }
314
+ </style>
315
+ <style id="hidden-blocks"></style>
316
+ <style id="selected-block"></style>
317
+ <style id="selected-styling-block"></style>
318
+ <style id="highlighted-block"></style>
319
+ <style id="dragged-block"></style>
320
+
321
+ </head>
322
+ <body class="font-body antialiased h-full">
323
+ <div class="frame-root h-full"></div>
324
+ <script src="https://cdn.jsdelivr.net/npm/quill@2.0.0/dist/quill.js"><\/script>
325
+ </body>
326
+ </html>`, ls = (o) => {
327
+ const [s] = V(), [, e] = ye(), [t, n] = j({}), d = P(() => {
328
+ const { width: a, height: i } = o;
329
+ if (a < s) {
330
+ const l = parseFloat((a / s).toFixed(2).toString());
331
+ let c = {};
332
+ const p = i * l;
333
+ i && (c = {
334
+ // Eureka! This is the formula to calculate the height of the scaled element. Thank you ChatGPT 4
335
+ height: 100 + (i - p) / p * 100 + "%"
336
+ }), n({
337
+ position: "relative",
338
+ top: 0,
339
+ transform: `scale(${l})`,
340
+ transformOrigin: "top left",
341
+ ...c,
342
+ maxWidth: "none"
343
+ }), e(l * 100);
344
+ } else
345
+ n({}), e(100);
346
+ }, [s, o, e]);
347
+ return k(() => {
348
+ d();
349
+ }, [s, o, e, d]), t;
350
+ };
351
+ let Ie, De;
352
+ typeof document < "u" && (Ie = document);
353
+ typeof window < "u" && (De = window);
354
+ const Ae = _.createContext({ document: Ie, window: De }), K = () => _.useContext(Ae), { Provider: cs, Consumer: Rn } = Ae;
355
+ class _e extends ue {
356
+ componentDidMount() {
357
+ this.props.contentDidMount();
358
+ }
359
+ componentDidUpdate() {
360
+ this.props.contentDidUpdate();
361
+ }
362
+ render() {
363
+ return He.only(this.props.children);
364
+ }
365
+ }
366
+ A(_e, "propTypes", {
367
+ children: b.element.isRequired,
368
+ contentDidMount: b.func.isRequired,
369
+ contentDidUpdate: b.func.isRequired
370
+ });
371
+ class Z extends ue {
372
+ constructor(e, t) {
373
+ super(e, t);
374
+ A(this, "setRef", (e) => {
375
+ this.nodeRef.current = e;
376
+ const { forwardedRef: t } = this.props;
377
+ typeof t == "function" ? t(e) : t && (t.current = e);
378
+ });
379
+ A(this, "handleLoad", () => {
380
+ clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
381
+ });
382
+ // In certain situations on a cold cache DOMContentLoaded never gets called
383
+ // fallback to an interval to check if that's the case
384
+ A(this, "loadCheck", () => setInterval(() => {
385
+ this.handleLoad();
386
+ }, 500));
387
+ this._isMounted = !1, this.nodeRef = _.createRef(), this.state = { iframeLoaded: !1 };
388
+ }
389
+ componentDidMount() {
390
+ this._isMounted = !0, this.getDoc() && this.nodeRef.current.contentWindow.addEventListener("DOMContentLoaded", this.handleLoad);
391
+ }
392
+ componentWillUnmount() {
393
+ this._isMounted = !1, this.nodeRef.current.removeEventListener("DOMContentLoaded", this.handleLoad);
394
+ }
395
+ getDoc() {
396
+ return this.nodeRef.current ? this.nodeRef.current.contentDocument : null;
397
+ }
398
+ getMountTarget() {
399
+ const e = this.getDoc();
400
+ return this.props.mountTarget ? e.querySelector(this.props.mountTarget) : e.body.children[0];
401
+ }
402
+ renderFrameContents() {
403
+ if (!this._isMounted)
404
+ return null;
405
+ const e = this.getDoc();
406
+ if (!e)
407
+ return null;
408
+ const t = this.props.contentDidMount, n = this.props.contentDidUpdate, d = e.defaultView || e.parentView, a = /* @__PURE__ */ r.jsx(_e, { contentDidMount: t, contentDidUpdate: n, children: /* @__PURE__ */ r.jsx(cs, { value: { document: e, window: d }, children: /* @__PURE__ */ r.jsx("div", { className: "frame-content", children: this.props.children }) }) }), i = this.getMountTarget();
409
+ return [ae.createPortal(this.props.head, this.getDoc().head), ae.createPortal(a, i)];
410
+ }
411
+ render() {
412
+ const e = {
413
+ ...this.props,
414
+ srcDoc: this.props.initialContent,
415
+ children: void 0
416
+ // The iframe isn't ready so we drop children from props here. #12, #17
417
+ };
418
+ return delete e.head, delete e.initialContent, delete e.mountTarget, delete e.contentDidMount, delete e.contentDidUpdate, delete e.forwardedRef, /* @__PURE__ */ r.jsx("iframe", { ...e, ref: this.setRef, onLoad: this.handleLoad, children: this.state.iframeLoaded && this.renderFrameContents() });
419
+ }
420
+ }
421
+ // React warns when you render directly into the body since browser extensions
422
+ // also inject into the body and can mess up React. For this reason
423
+ // initialContent is expected to have a div inside of the body
424
+ // element that we render react into.
425
+ A(Z, "propTypes", {
426
+ style: b.object,
427
+ // eslint-disable-line
428
+ head: b.node,
429
+ initialContent: b.string,
430
+ mountTarget: b.string,
431
+ contentDidMount: b.func,
432
+ contentDidUpdate: b.func,
433
+ children: b.oneOfType([b.element, b.arrayOf(b.element)])
434
+ }), A(Z, "defaultProps", {
435
+ style: {},
436
+ head: null,
437
+ children: void 0,
438
+ mountTarget: void 0,
439
+ contentDidMount: () => {
440
+ },
441
+ contentDidUpdate: () => {
442
+ },
443
+ initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
444
+ });
445
+ const ds = _.forwardRef((o, s) => /* @__PURE__ */ r.jsx(Z, { ...o, forwardedRef: s })), ps = () => {
446
+ const { addCoreBlock: o } = Ct(), s = O("getExternalPredefinedBlock", T);
447
+ return P(
448
+ async (e) => {
449
+ const { block: t, dropTargetId: n, relativeIndex: d } = e;
450
+ if (Q(t, "format")) {
451
+ const a = await s(t);
452
+ return o({ blocks: a }, n === 0 ? null : n, d);
453
+ }
454
+ return o(t, n === 0 ? null : n, d);
455
+ },
456
+ [o]
457
+ );
458
+ };
459
+ let B = null, H = [], R = null, Ne = null;
460
+ function us(o) {
461
+ const s = window.getComputedStyle(o), e = parseInt(s.paddingLeft, 10), t = parseInt(s.paddingTop, 10), n = parseInt(s.paddingRight, 10), d = parseInt(s.paddingBottom, 10);
462
+ return { paddingLeft: e, paddingTop: t, paddingRight: n, paddingBottom: d };
463
+ }
464
+ const pe = (o, s, e) => {
465
+ if (!B)
466
+ return;
467
+ const t = o.getBoundingClientRect(), n = B == null ? void 0 : B.getElementById("placeholder"), { paddingLeft: d, paddingTop: a, paddingRight: i, paddingBottom: l } = us(o);
468
+ n.style.width = s === "vertical" ? t.width - d - i + "px" : "2px", n.style.height = s === "vertical" ? "2px" : t.height - a - l + "px", n.style.display = "block";
469
+ const c = H.reduce(
470
+ (p, m) => Math.abs(m - e) < Math.abs(p - e) ? m : p
471
+ );
472
+ Ne = H.indexOf(c), s === "vertical" ? (n.style.top = o.offsetTop + c + "px", n.style.left = o.offsetLeft + d + "px") : (n.style.top = o.offsetTop + a + "px", n.style.left = o.offsetLeft + c + "px");
473
+ }, hs = (o) => {
474
+ const s = Me(o), e = window.getComputedStyle(o), t = s === "horizontal", n = parseInt(e.paddingLeft), d = parseInt(e.paddingTop);
475
+ let a = t ? n : d;
476
+ H = [a], Array.from(o.children).forEach((i) => {
477
+ const l = window.getComputedStyle(i), c = parseInt(
478
+ t ? l.marginLeft + l.marginRight : l.marginTop + l.marginBottom
479
+ ), p = t ? i.offsetWidth : i.offsetHeight;
480
+ H.push(a + p + c), a += p + c;
481
+ });
482
+ };
483
+ function Me(o) {
484
+ const s = window.getComputedStyle(o).display, e = window.getComputedStyle(o).flexDirection;
485
+ if (s === "flex")
486
+ return e === "column" || e === "column-reverse" ? "vertical" : "horizontal";
487
+ if (s === "grid") {
488
+ const t = window.getComputedStyle(o).gridTemplateRows, n = window.getComputedStyle(o).gridTemplateColumns;
489
+ if (t.includes("auto"))
490
+ return "vertical";
491
+ if (n.includes("auto"))
492
+ return "horizontal";
493
+ }
494
+ return s === "block" ? "vertical" : "horizontal";
495
+ }
496
+ const ms = me((o) => {
497
+ const s = o.target, e = Me(s);
498
+ if (e === "vertical") {
499
+ const t = o.clientY - s.offsetTop;
500
+ pe(s, e, t);
501
+ } else {
502
+ const t = o.clientX - s.offsetLeft;
503
+ pe(s, e, t);
504
+ }
505
+ }, 200), gs = (o) => {
506
+ o.preventDefault(), o.stopPropagation(), ms(o);
507
+ };
508
+ function J() {
509
+ const o = B == null ? void 0 : B.getElementById("placeholder");
510
+ o.style.display = "none";
511
+ }
512
+ const fs = () => {
513
+ const { document: o } = K(), [s, e] = y(Bt), t = ps(), n = Be("dnd"), [, d] = M(), [, a] = C();
514
+ return B = o, {
515
+ isDragging: s,
516
+ "data-dnd": "branch",
517
+ onDragOver: n ? gs : T,
518
+ onDrop: n ? (i) => {
519
+ R == null || R.classList.remove("outline", "outline-green-300", "outline-2", "-outline-offset-2");
520
+ const l = JSON.parse(i.dataTransfer.getData("text/plain"));
521
+ let c = i.target.getAttribute("data-block-id");
522
+ c === null && (c = i.target.parentElement.getAttribute("data-block-id")), t({ block: l, dropTargetId: c || null, relativeIndex: Ne }), e(!1), J(), setTimeout(() => {
523
+ J();
524
+ }, 300);
525
+ } : T,
526
+ onDragEnter: n ? (i) => {
527
+ const l = i;
528
+ R = l.target, l.stopPropagation(), l.preventDefault(), H = [];
529
+ const c = l.target;
530
+ hs(c), c.classList.add("outline", "outline-green-300", "outline-2", "-outline-offset-2"), e(!0), d(""), a([]);
531
+ } : T,
532
+ onDragLeave: n ? (i) => {
533
+ const l = i;
534
+ R = null, l.stopPropagation(), l.preventDefault(), l.target.classList.remove("outline", "outline-green-300", "outline-2", "-outline-offset-2");
535
+ } : T,
536
+ onMouseOut: n ? () => {
537
+ e(!1), J();
538
+ } : T
539
+ };
540
+ };
541
+ function te(o) {
542
+ return o.getAttribute("data-block-id") ? o : o.closest("[data-block-id]");
543
+ }
544
+ function xs(o) {
545
+ o.container.innerHTML = "", o.container.parentNode.removeChild(o.container);
546
+ var s = document.querySelector(".ql-toolbar");
547
+ s && s.parentNode.removeChild(s), o = null;
548
+ }
549
+ const vs = () => {
550
+ const o = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], s = St(), [, e] = M(), [t, n] = y(L);
551
+ return (d) => {
552
+ var m;
553
+ if (t)
554
+ return;
555
+ const a = te(d.target), i = a.getAttribute("data-block-type");
556
+ if (!i || !o.includes(i))
557
+ return;
558
+ const l = a.cloneNode(!0);
559
+ a.style.display = "none", Array.from(l.attributes).forEach((h) => {
560
+ h.name !== "class" && l.removeAttribute(h.name);
561
+ }), i === "Text" && (l.style.display = "inline-block"), a.parentNode.insertBefore(l, a.nextSibling);
562
+ const c = new Ot(l, { placeholder: "Type here..." });
563
+ function p() {
564
+ const h = c.getText(0, c.getLength());
565
+ s([a.getAttribute("data-block-id")], { content: h }), a.removeAttribute("style"), l.removeEventListener("blur", p, !0), xs(c), n(""), e("");
566
+ }
567
+ l.addEventListener("blur", p, !0), l.addEventListener("keydown", (h) => {
568
+ (h.key === "Enter" || h.key === "Escape") && p();
569
+ }), c.focus(), (m = l.querySelector(".ql-clipboard")) == null || m.remove(), n(a.getAttribute("data-block-id"));
570
+ };
571
+ }, $s = () => {
572
+ const [, o] = N(), [, s] = C(), [, e] = M(), [t] = y(L), [n] = y(It);
573
+ return (d) => {
574
+ if (t)
575
+ return;
576
+ n.closeAll(), d.stopPropagation();
577
+ const a = te(d.target);
578
+ if (a != null && a.getAttribute("data-block-id") && (a == null ? void 0 : a.getAttribute("data-block-id")) === "container") {
579
+ s([]), o([]), e("");
580
+ return;
581
+ }
582
+ if (a != null && a.getAttribute("data-block-parent")) {
583
+ const i = a.getAttribute("data-style-prop"), l = a.getAttribute("data-style-id"), c = a.getAttribute("data-block-parent");
584
+ o([{ id: l, prop: i, blockId: c }]), s([c]);
585
+ } else
586
+ a != null && a.getAttribute("data-block-id") && s([a.getAttribute("data-block-id")]);
587
+ e("");
588
+ };
589
+ }, ys = me((o, s) => {
590
+ const e = te(o.target);
591
+ e != null && e.getAttribute("data-style-id") && s(e.getAttribute("data-style-id"));
592
+ }, 100), bs = () => {
593
+ const [, o] = M(), [s] = y(L);
594
+ return (e) => {
595
+ s || ys(e, o);
596
+ };
597
+ }, ks = ({ children: o }) => {
598
+ const { document: s } = K(), [e] = C(), [t, n] = N();
599
+ k(() => {
600
+ setTimeout(() => {
601
+ if (!S(t))
602
+ return;
603
+ const c = Ee(s, U(e));
604
+ if (c) {
605
+ const p = c.getAttribute("data-style-prop");
606
+ if (p) {
607
+ const m = c.getAttribute("data-style-id"), h = c.getAttribute("data-block-parent");
608
+ n([{ id: m, prop: p, blockId: h }]);
609
+ }
610
+ }
611
+ }, 100);
612
+ }, [s, e, n, t]);
613
+ const d = vs(), a = $s(), i = bs(), l = fs();
614
+ return /* @__PURE__ */ r.jsx(
615
+ "div",
616
+ {
617
+ "data-block-id": "container",
618
+ id: "canvas",
619
+ onClick: a,
620
+ onDoubleClick: d,
621
+ onMouseMove: i,
622
+ ...Ue(l, "isDragging"),
623
+ className: "relative mb-5 h-full max-w-full " + (l.isDragging ? "dragging" : ""),
624
+ children: o
625
+ }
626
+ );
627
+ }, Ee = (o, s) => o.querySelector(`[data-block-id="${s}"]`), ws = () => {
628
+ const { window: o } = K(), [s, e] = C(), [t] = ee(), [, n] = N(), { undo: d, redo: a } = fe(), i = be(), [, l] = ke(), c = we(), { savePage: p } = Dt(), [m] = y(L), [, h] = y(At), v = (g) => {
629
+ g.key === "Enter" && (g.preventDefault(), s.length === 1 && h(U(s)));
630
+ }, w = (g) => {
631
+ const u = t.find(($) => $._id === g);
632
+ return u ? u._parent : null;
633
+ };
634
+ return k(() => {
635
+ const g = (u) => {
636
+ if (u.key === "Escape") {
637
+ e([]), n([]);
638
+ return;
639
+ }
640
+ if (v(u), !m && (u.key === "Delete" || u.key === "Backspace") && (u.preventDefault(), c(s)), u.ctrlKey || u.metaKey) {
641
+ if (u.key === "ArrowUp") {
642
+ u.preventDefault();
643
+ const $ = s.length > 0 ? w(s[0]) : null;
644
+ $ && e([$]);
645
+ }
646
+ if (["z", "y", "d", "x", "c", "p", "s", "v"].includes(u.key)) {
647
+ if (m && ["x", "z", "v"].includes(u.key))
648
+ return !0;
649
+ u.preventDefault();
650
+ }
651
+ u.key === "s" && (u.stopPropagation(), u.preventDefault(), p()), u.key === "z" && d(), u.key === "y" && a(), u.key === "d" && i(s);
652
+ }
653
+ };
654
+ return o.removeEventListener("keydown", g), o.addEventListener("keydown", g), () => {
655
+ o.removeEventListener("keydown", g);
656
+ };
657
+ }, [s, e, d, c, l, a, i, m, p, o]), null;
658
+ }, js = ({ block: o, label: s }) => {
659
+ const [, e] = C(), [, t] = M(), [, n] = y(je), d = Be("dnd");
660
+ return /* @__PURE__ */ r.jsxs(
661
+ "div",
662
+ {
663
+ className: "mr-10 flex cursor-grab items-center space-x-1 px-1",
664
+ draggable: d ? "true" : "false",
665
+ onDragStart: (a) => {
666
+ a.dataTransfer.setData("text/plain", JSON.stringify(We(o, ["_id", "_type"]))), n(o._id), setTimeout(() => {
667
+ e([]), t(null);
668
+ }, 200);
669
+ },
670
+ children: [
671
+ /* @__PURE__ */ r.jsx(et, {}),
672
+ s
673
+ ]
674
+ }
675
+ );
676
+ }, Cs = ({ selectedBlockElement: o, block: s }) => {
677
+ const e = we(), t = be(), [, n] = C(), [, d] = N(), [a] = y(L), { floatingStyles: i, refs: l, update: c } = Ut({
678
+ placement: "top-start",
679
+ middleware: [Wt(), zt()],
680
+ elements: {
681
+ reference: o
682
+ }
683
+ });
684
+ qt(o, () => c(), o !== null);
685
+ const p = f(s, "_parent", null), m = S(f(s, "_name", "")) ? f(s, "_type", "") : f(s, "_name", "");
686
+ return !o || !s || a ? null : /* @__PURE__ */ r.jsx(r.Fragment, { children: /* @__PURE__ */ r.jsxs(
687
+ "div",
688
+ {
689
+ role: "button",
690
+ tabIndex: 0,
691
+ ref: l.setFloating,
692
+ style: i,
693
+ onClick: (h) => {
694
+ h.stopPropagation(), h.preventDefault();
695
+ },
696
+ onKeyDown: (h) => h.stopPropagation(),
697
+ className: "z-[99999] flex h-6 items-center bg-blue-500 py-2 text-xs text-white",
698
+ children: [
699
+ /* @__PURE__ */ r.jsx(js, { label: m, block: s }),
700
+ /* @__PURE__ */ r.jsxs("div", { className: "flex gap-2 px-1", children: [
701
+ p && /* @__PURE__ */ r.jsx(
702
+ tt,
703
+ {
704
+ className: "hover:scale-105",
705
+ onClick: () => {
706
+ d([]), n([p]);
707
+ }
708
+ }
709
+ ),
710
+ _t(f(s, "_type", "")) ? /* @__PURE__ */ r.jsx(st, { className: "hover:scale-105", onClick: () => t([s == null ? void 0 : s._id]) }) : null,
711
+ Nt(f(s, "_type", "")) ? /* @__PURE__ */ r.jsx(nt, { className: "hover:scale-105", onClick: () => e([s == null ? void 0 : s._id]) }) : null
712
+ ] })
713
+ ]
714
+ }
715
+ ) });
716
+ }, Bs = ({ addVariant: o, e: s }) => {
717
+ o("hs-dropdown-open", [
718
+ ({ modifySelectors: e, separator: t }) => {
719
+ e(({ className: n }) => `.hs-dropdown.open > .${s(`hs-dropdown-open${t}${n}`)}`);
720
+ },
721
+ ({ modifySelectors: e, separator: t }) => {
722
+ e(({ className: n }) => `.hs-dropdown.open .hs-dropdown-toggle .${s(`hs-dropdown-open${t}${n}`)}`);
723
+ },
724
+ ({ modifySelectors: e, separator: t }) => {
725
+ e(({ className: n }) => `.hs-dropdown.open > .hs-dropdown-menu > .${s(`hs-dropdown-open${t}${n}`)}`);
726
+ }
727
+ ]), o("hs-removing", ({ modifySelectors: e, separator: t }) => {
728
+ e(({ className: n }) => `.hs-removing.${s(`hs-removing${t}${n}`)}`);
729
+ }), o("hs-tooltip-shown", ({ modifySelectors: e, separator: t }) => {
730
+ e(({ className: n }) => `.hs-tooltip.show .${s(`hs-tooltip-shown${t}${n}`)}`);
731
+ }), o("hs-accordion-active", [
732
+ ({ modifySelectors: e, separator: t }) => {
733
+ e(({ className: n }) => `.hs-accordion.active.${s(`hs-accordion-active${t}${n}`)}`);
734
+ },
735
+ ({ modifySelectors: e, separator: t }) => {
736
+ e(({ className: n }) => `.hs-accordion.active > .${s(`hs-accordion-active${t}${n}`)}`);
737
+ },
738
+ ({ modifySelectors: e, separator: t }) => {
739
+ e(({ className: n }) => `.hs-accordion.active > .hs-accordion-toggle .${s(`hs-accordion-active${t}${n}`)}`);
740
+ },
741
+ ({ modifySelectors: e, separator: t }) => {
742
+ e(({ className: n }) => `.hs-accordion.active > .hs-accordion-heading > .hs-accordion-toggle .${s(
743
+ `hs-accordion-active${t}${n}`
744
+ )}`);
745
+ },
746
+ ({ modifySelectors: e, separator: t }) => {
747
+ e(({ className: n }) => `.hs-accordion.active > .hs-accordion-toggle.${s(`hs-accordion-active${t}${n}`)}`);
748
+ },
749
+ ({ modifySelectors: e, separator: t }) => {
750
+ e(({ className: n }) => `.hs-accordion.active > .hs-accordion-heading > .hs-accordion-toggle.${s(
751
+ `hs-accordion-active${t}${n}`
752
+ )}`);
753
+ }
754
+ ]), o("hs-accordion-selected", ({ modifySelectors: e, separator: t }) => {
755
+ e(({ className: n }) => `.hs-accordion .selected.${s(`hs-accordion-selected${t}${n}`)}`);
756
+ }), o("hs-collapse-open", [
757
+ ({ modifySelectors: e, separator: t }) => {
758
+ e(({ className: n }) => `.hs-collapse.open .${s(`hs-collapse-open${t}${n}`)}`);
759
+ },
760
+ ({ modifySelectors: e, separator: t }) => {
761
+ e(({ className: n }) => `.hs-collapse.open.${s(`hs-collapse-open${t}${n}`)}`);
762
+ },
763
+ ({ modifySelectors: e, separator: t }) => {
764
+ e(({ className: n }) => `.hs-collapse-toggle.open .${s(`hs-collapse-open${t}${n}`)}`);
765
+ },
766
+ ({ modifySelectors: e, separator: t }) => {
767
+ e(({ className: n }) => `.hs-collapse-toggle.open.${s(`hs-collapse-open${t}${n}`)}`);
768
+ }
769
+ ]), o("hs-tab-active", [
770
+ ({ modifySelectors: e, separator: t }) => {
771
+ e(({ className: n }) => `[data-hs-tab].active.${s(`hs-tab-active${t}${n}`)}`);
772
+ },
773
+ ({ modifySelectors: e, separator: t }) => {
774
+ e(({ className: n }) => `[data-hs-tab].active .${s(`hs-tab-active${t}${n}`)}`);
775
+ }
776
+ ]), o("hs-overlay-open", [
777
+ ({ modifySelectors: e, separator: t }) => {
778
+ e(({ className: n }) => `.open.${s(`hs-overlay-open${t}${n}`)}`);
779
+ },
780
+ ({ modifySelectors: e, separator: t }) => {
781
+ e(({ className: n }) => `.open .${s(`hs-overlay-open${t}${n}`)}`);
782
+ }
783
+ ]), o("hs-overlay-layout-open", [
784
+ ({ modifySelectors: e, separator: t }) => {
785
+ e(({ className: n }) => `.hs-overlay-body-open.${s(`hs-overlay-layout-open${t}${n}`)}`);
786
+ },
787
+ ({ modifySelectors: e, separator: t }) => {
788
+ e(({ className: n }) => `.hs-overlay-body-open .${s(`hs-overlay-layout-open${t}${n}`)}`);
789
+ }
790
+ ]), o("hs-overlay-backdrop-open", [
791
+ ({ modifySelectors: e, separator: t }) => {
792
+ e(({ className: n }) => `.hs-overlay-backdrop.${s(`hs-overlay-backdrop-open${t}${n}`)}`);
793
+ },
794
+ ({ modifySelectors: e, separator: t }) => {
795
+ e(({ className: n }) => `.hs-overlay-backdrop .${s(`hs-overlay-backdrop-open${t}${n}`)}`);
796
+ }
797
+ ]), o("hs-scrollspy-active", ({ modifySelectors: e, separator: t }) => {
798
+ e(({ className: n }) => `.active.${s(`hs-scrollspy-active${t}${n}`)}`);
799
+ }), o("hs-carousel-active", [
800
+ ({ modifySelectors: e, separator: t }) => {
801
+ e(({ className: n }) => `.active.${s(`hs-carousel-active${t}${n}`)}`);
802
+ },
803
+ ({ modifySelectors: e, separator: t }) => {
804
+ e(({ className: n }) => `.active .${s(`hs-carousel-active${t}${n}`)}`);
805
+ }
806
+ ]), o("hs-carousel-disabled", [
807
+ ({ modifySelectors: e, separator: t }) => {
808
+ e(({ className: n }) => `.disabled.${s(`hs-carousel${t}disabled${t}${n}`)}`);
809
+ },
810
+ ({ modifySelectors: e, separator: t }) => {
811
+ e(({ className: n }) => `.disabled .${s(`hs-carousel${t}disabled${t}${n}`)}`);
812
+ }
813
+ ]), o("hs-selected", [
814
+ ({ modifySelectors: e, separator: t }) => {
815
+ e(({ className: n }) => `.selected.${s(`hs-selected${t}${n}`)}`);
816
+ },
817
+ ({ modifySelectors: e, separator: t }) => {
818
+ e(({ className: n }) => `.selected .${s(`hs-selected${t}${n}`)}`);
819
+ }
820
+ ]), o("hs-select-disabled", [
821
+ ({ modifySelectors: e, separator: t }) => {
822
+ e(({ className: n }) => `.disabled.${s(`hs-select-disabled${t}${n}`)}`);
823
+ },
824
+ ({ modifySelectors: e, separator: t }) => {
825
+ e(({ className: n }) => `.disabled .${s(`hs-select-disabled${t}${n}`)}`);
826
+ }
827
+ ]), o("hs-select-active", [
828
+ ({ modifySelectors: e, separator: t }) => {
829
+ e(({ className: n }) => `.active.${s(`hs-select-active${t}${n}`)}`);
830
+ },
831
+ ({ modifySelectors: e, separator: t }) => {
832
+ e(({ className: n }) => `.active .${s(`hs-select-active${t}${n}`)}`);
833
+ }
834
+ ]), o("hs-input-number-disabled", [
835
+ ({ modifySelectors: e, separator: t }) => {
836
+ e(({ className: n }) => `.disabled.${s(`hs-input-number-disabled${t}${n}`)}`);
837
+ },
838
+ ({ modifySelectors: e, separator: t }) => {
839
+ e(({ className: n }) => `.disabled .${s(`hs-input-number-disabled${t}${n}`)}`);
840
+ }
841
+ ]), o("hs-pin-input-active", [
842
+ ({ modifySelectors: e, separator: t }) => {
843
+ e(({ className: n }) => `.active.${s(`hs-pin-input-active${t}${n}`)}`);
844
+ },
845
+ ({ modifySelectors: e, separator: t }) => {
846
+ e(({ className: n }) => `.active .${s(`hs-pin-input-active${t}${n}`)}`);
847
+ }
848
+ ]), o("hs-select-opened", [
849
+ ({ modifySelectors: e, separator: t }) => {
850
+ e(({ className: n }) => `.opened.${s(`hs-select-opened${t}${n}`)}`);
851
+ }
852
+ ]), o("hs-password-active", [
853
+ ({ modifySelectors: e, separator: t }) => {
854
+ e(({ className: n }) => `.active.${s(`hs-password-active${t}${n}`)}`);
855
+ },
856
+ ({ modifySelectors: e, separator: t }) => {
857
+ e(({ className: n }) => `.active .${s(`hs-password-active${t}${n}`)}`);
858
+ }
859
+ ]), o("hs-stepper-active", [
860
+ ({ modifySelectors: e, separator: t }) => {
861
+ e(({ className: n }) => `.active.${s(`hs-stepper-active${t}${n}`)}`);
862
+ },
863
+ ({ modifySelectors: e, separator: t }) => {
864
+ e(({ className: n }) => `.active .${s(`hs-stepper-active${t}${n}`)}`);
865
+ }
866
+ ]), o("hs-stepper-success", [
867
+ ({ modifySelectors: e, separator: t }) => {
868
+ e(({ className: n }) => `.success.${s(`hs-stepper-success${t}${n}`)}`);
869
+ },
870
+ ({ modifySelectors: e, separator: t }) => {
871
+ e(({ className: n }) => `.success .${s(`hs-stepper-success${t}${n}`)}`);
872
+ }
873
+ ]), o("hs-stepper-completed", [
874
+ ({ modifySelectors: e, separator: t }) => {
875
+ e(({ className: n }) => `.completed.${s(`hs-stepper-completed${t}${n}`)}`);
876
+ },
877
+ ({ modifySelectors: e, separator: t }) => {
878
+ e(({ className: n }) => `.completed .${s(`hs-stepper-completed${t}${n}`)}`);
879
+ }
880
+ ]), o("hs-stepper-error", [
881
+ ({ modifySelectors: e, separator: t }) => {
882
+ e(({ className: n }) => `.error.${s(`hs-stepper-error${t}${n}`)}`);
883
+ },
884
+ ({ modifySelectors: e, separator: t }) => {
885
+ e(({ className: n }) => `.error .${s(`hs-stepper-error${t}${n}`)}`);
886
+ }
887
+ ]), o("hs-stepper-processed", [
888
+ ({ modifySelectors: e, separator: t }) => {
889
+ e(({ className: n }) => `.processed.${s(`hs-stepper-processed${t}${n}`)}`);
890
+ },
891
+ ({ modifySelectors: e, separator: t }) => {
892
+ e(({ className: n }) => `.processed .${s(`hs-stepper-processed${t}${n}`)}`);
893
+ }
894
+ ]), o("hs-stepper-disabled", [
895
+ ({ modifySelectors: e, separator: t }) => {
896
+ e(({ className: n }) => `.disabled.${s(`hs-stepper-disabled${t}${n}`)}`);
897
+ },
898
+ ({ modifySelectors: e, separator: t }) => {
899
+ e(({ className: n }) => `.disabled .${s(`hs-stepper-disabled${t}${n}`)}`);
900
+ }
901
+ ]), o("hs-stepper-skipped", [
902
+ ({ modifySelectors: e, separator: t }) => {
903
+ e(({ className: n }) => `.skipped.${s(`hs-stepper-skipped${t}${n}`)}`);
904
+ },
905
+ ({ modifySelectors: e, separator: t }) => {
906
+ e(({ className: n }) => `.skipped .${s(`hs-stepper-skipped${t}${n}`)}`);
907
+ }
908
+ ]), o("hs-strong-password", [
909
+ ({ modifySelectors: e, separator: t }) => {
910
+ e(({ className: n }) => `.passed.${s(`hs-strong-password${t}${n}`)}`);
911
+ },
912
+ ({ modifySelectors: e, separator: t }) => {
913
+ e(({ className: n }) => `.passed .${s(`hs-strong-password${t}${n}`)}`);
914
+ }
915
+ ]), o("hs-strong-password-accepted", [
916
+ ({ modifySelectors: e, separator: t }) => {
917
+ e(({ className: n }) => `.accepted.${s(`hs-strong-password-accepted${t}${n}`)}`);
918
+ },
919
+ ({ modifySelectors: e, separator: t }) => {
920
+ e(({ className: n }) => `.accepted .${s(`hs-strong-password-accepted${t}${n}`)}`);
921
+ }
922
+ ]), o("hs-strong-password-active", [
923
+ ({ modifySelectors: e, separator: t }) => {
924
+ e(({ className: n }) => `.active.${s(`hs-strong-password-active${t}${n}`)}`);
925
+ }
926
+ ]), o("hs-combo-box-active", [
927
+ ({ modifySelectors: e, separator: t }) => {
928
+ e(({ className: n }) => `.active .${s(`hs-combo-box-active${t}${n}`)}`);
929
+ },
930
+ ({ modifySelectors: e, separator: t }) => {
931
+ e(({ className: n }) => `.active.${s(`hs-combo-box-active${t}${n}`)}`);
932
+ }
933
+ ]), o("hs-combo-box-selected", [
934
+ ({ modifySelectors: e, separator: t }) => {
935
+ e(({ className: n }) => `.selected .${s(`hs-combo-box-selected${t}${n}`)}`);
936
+ },
937
+ ({ modifySelectors: e, separator: t }) => {
938
+ e(({ className: n }) => `.selected.${s(`hs-combo-box-selected${t}${n}`)}`);
939
+ }
940
+ ]), o("hs-combo-box-tab-active", [
941
+ ({ modifySelectors: e, separator: t }) => {
942
+ e(({ className: n }) => `.active.${s(`hs-combo-box-tab-active${t}${n}`)}`);
943
+ }
944
+ ]), o("hs-apexcharts-tooltip-dark", [
945
+ ({ modifySelectors: e, separator: t }) => {
946
+ e(({ className: n }) => `.dark.${s(`hs-apexcharts-tooltip-dark${t}${n}`)}`);
947
+ }
948
+ ]), o("hs-success", [
949
+ ({ modifySelectors: e, separator: t }) => {
950
+ e(({ className: n }) => `.success .${s(`hs-success${t}${n}`)}`);
951
+ },
952
+ ({ modifySelectors: e, separator: t }) => {
953
+ e(({ className: n }) => `.success.${s(`hs-success${t}${n}`)}`);
954
+ }
955
+ ]), o("hs-error", [
956
+ ({ modifySelectors: e, separator: t }) => {
957
+ e(({ className: n }) => `.error .${s(`hs-error${t}${n}`)}`);
958
+ },
959
+ ({ modifySelectors: e, separator: t }) => {
960
+ e(({ className: n }) => `.error.${s(`hs-error${t}${n}`)}`);
961
+ }
962
+ ]), o("hs-default-mode-active", ({ modifySelectors: e, separator: t }) => {
963
+ e(({ className: n }) => `.default .${s(`hs-default-mode-active${t}${n}`)}`);
964
+ }), o("hs-dark-mode-active", ({ modifySelectors: e, separator: t }) => {
965
+ e(({ className: n }) => `.dark .${s(`hs-dark-mode-active${t}${n}`)}`);
966
+ }), o("hs-auto-mode-active", ({ modifySelectors: e, separator: t }) => {
967
+ e(({ className: n }) => `.auto .${s(`hs-auto-mode-active${t}${n}`)}`);
968
+ });
969
+ }, Ss = ({ model: o }) => {
970
+ const [s] = Mt(), [e] = C(), [t] = xe(), [n] = M(), [d] = N(), [a] = y(je), { document: i, window: l } = K(), [c] = j(i == null ? void 0 : i.getElementById("highlighted-block")), [p] = j(
971
+ i == null ? void 0 : i.getElementById("selected-block")
972
+ ), [m] = j(
973
+ i == null ? void 0 : i.getElementById("selected-styling-block")
974
+ ), [h] = j(i == null ? void 0 : i.getElementById("dragged-block"));
975
+ k(() => {
976
+ t ? i == null || i.documentElement.classList.add("dark") : i == null || i.documentElement.classList.remove("dark");
977
+ }, [t, i]);
978
+ const v = f(s, "headingFont", "DM Sans"), w = f(s, "bodyFont", "DM Sans");
979
+ return k(() => {
980
+ const g = f(s, "primaryColor", "#000"), u = f(s, "secondaryColor", "#FFF"), $ = Qt([
981
+ { color: g, name: "primary" },
982
+ { color: u, name: "secondary" }
983
+ ]), E = f(s, "roundedCorners", "0");
984
+ !l || !l.tailwind || (l.tailwind.config = {
985
+ darkMode: "class",
986
+ theme: {
987
+ extend: {
988
+ fontFamily: {
989
+ heading: [v],
990
+ body: [w]
991
+ },
992
+ borderRadius: {
993
+ global: `${E || "0"}px`
994
+ },
995
+ colors: $
996
+ }
997
+ },
998
+ plugins: [Kt, Yt, Jt, l.tailwind.plugin.withOptions(() => Bs)]
999
+ });
1000
+ }, [s, l, v, w]), k(() => {
1001
+ p && (p.textContent = `${F(e, (g) => `[data-block-id="${g}"]`).join(",")}{
1002
+ outline: 1px solid ${e.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
1003
+ }`);
1004
+ }, [e, p]), k(() => {
1005
+ if (!a) {
1006
+ h.textContent = "";
1007
+ return;
1008
+ }
1009
+ h.textContent = `[data-block-id="${a}"]{ pointer-events: none !important; opacity: 0.2 !important}`;
1010
+ }, [a]), k(() => {
1011
+ c && (c.textContent = n ? `[data-style-id="${n}"]{ outline: 1px solid #42a1fc !important; outline-offset: -1px;}` : "");
1012
+ }, [n, e, c]), k(() => {
1013
+ m && (m.textContent = `${F(d, ({ id: g }) => `[data-style-id="${g}"]`).join(",")}{
1014
+ outline: 1px solid #42a1fc !important; outline-offset: -1px;
1015
+ }`);
1016
+ }, [d, m]), k(() => {
1017
+ const g = f(s, "bodyTextLightColor", "#64748b"), u = f(s, "bodyTextDarkColor", "#94a3b8"), $ = f(s, "bodyBgLightColor", "#FFFFFF"), E = f(s, "bodyBgDarkColor", "#0f172a");
1018
+ i.body.className = `font-body antialiased text-[${g}] bg-[${$}] dark:text-[${u}] dark:bg-[${E}]`;
1019
+ }, [s, i, o]), o === "page" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
1020
+ v && /* @__PURE__ */ r.jsx(
1021
+ "link",
1022
+ {
1023
+ id: "heading-font",
1024
+ rel: "stylesheet",
1025
+ type: "text/css",
1026
+ href: `https://fonts.googleapis.com/css2?family=${v.replace(
1027
+ / /g,
1028
+ "+"
1029
+ )}:wght@300;400;500;600;700;800;900&display=swap`,
1030
+ media: "all"
1031
+ }
1032
+ ),
1033
+ w && v !== w && /* @__PURE__ */ r.jsx(
1034
+ "link",
1035
+ {
1036
+ id: "body-font",
1037
+ rel: "stylesheet",
1038
+ type: "text/css",
1039
+ href: `https://fonts.googleapis.com/css2?family=${w.replace(
1040
+ / /g,
1041
+ "+"
1042
+ )}:wght@300;400;500;600;700;800;900&display=swap`,
1043
+ media: "all"
1044
+ }
1045
+ ),
1046
+ v && /* @__PURE__ */ r.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${v}",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";}` })
1047
+ ] }) : null;
1048
+ }, Is = (o) => {
1049
+ const s = {};
1050
+ return Object.keys(o).forEach((e) => {
1051
+ G(o[e]) && o[e].startsWith(le) && (s[e] = o[e].replace(le, "").split(","));
1052
+ }), s;
1053
+ }, Ds = qe((o) => {
1054
+ const s = o.replace(Se, "").split(",");
1055
+ return Xt(s[0], s[1]);
1056
+ });
1057
+ function As(o, s) {
1058
+ return f(o, `${s}_attrs`, {});
1059
+ }
1060
+ function _s(o) {
1061
+ const s = {};
1062
+ return Object.keys(o).forEach((e) => {
1063
+ if (G(o[e]) && o[e].startsWith(Se)) {
1064
+ const t = Ds(o[e]);
1065
+ s[e] = {
1066
+ className: t,
1067
+ "data-style-prop": e,
1068
+ "data-block-parent": o._id,
1069
+ "data-style-id": `${e}-${o._id}`,
1070
+ ...As(o, e)
1071
+ };
1072
+ }
1073
+ }), s;
1074
+ }
1075
+ function Ns(o, s) {
1076
+ const e = f(o, "_bindings", {});
1077
+ return S(e) ? { ...o } : (Ke(e, (t, n) => {
1078
+ G(t) && f(s, t, null) && (o[n] = f(s, t, null));
1079
+ }), o);
1080
+ }
1081
+ function X({ blocks: o }) {
1082
+ const [s] = ee(), [e] = Vt(), t = P((i) => _s(i), []), [n] = Et(), [d] = y(L), a = P(
1083
+ (i) => i.reduce((l, c) => {
1084
+ const p = f(e, c, {});
1085
+ return { ...l, ...p };
1086
+ }, {}),
1087
+ [e, s]
1088
+ );
1089
+ return /* @__PURE__ */ r.jsx(r.Fragment, { children: _.Children.toArray(
1090
+ o.map((i, l) => {
1091
+ if (d === i._id)
1092
+ return null;
1093
+ const c = Is(i), p = {};
1094
+ S(c) || Object.keys(c).forEach((u) => {
1095
+ p[u] = _.Children.toArray(
1096
+ c[u].map(($) => /* @__PURE__ */ r.jsx(X, { blocks: [Ye(s, { _id: $ })] }))
1097
+ );
1098
+ });
1099
+ const m = ge(s, { _parent: i._id });
1100
+ p.children = m.length ? /* @__PURE__ */ r.jsx(X, { blocks: m }) : null;
1101
+ const h = Gt(i._type), v = f(h, "builderComponent", f(h, "component", null));
1102
+ if (Je(v))
1103
+ return /* @__PURE__ */ r.jsx("noscript", { children: `<!-- ${i == null ? void 0 : i._type} not registered -->` });
1104
+ const w = Q(h, "getBlockStateFrom") ? h == null ? void 0 : h.getBlockStateFrom(i, s) : [], g = a(w);
1105
+ return /* @__PURE__ */ r.jsx(he, { children: _.createElement(v, {
1106
+ blockProps: {
1107
+ "data-block-id": i._id,
1108
+ "data-block-type": i._type,
1109
+ "data-dnd": Q(h, "canAcceptBlock") ? "branch" : "leaf"
1110
+ },
1111
+ index: l,
1112
+ ...Ns(i, n),
1113
+ ...t(i),
1114
+ ...p,
1115
+ inBuilder: !0,
1116
+ blockState: g
1117
+ }) });
1118
+ })
1119
+ ) });
1120
+ }
1121
+ const Ms = () => {
1122
+ const [o] = ee(), s = S(o) ? null : /* @__PURE__ */ r.jsx(Tt, { children: /* @__PURE__ */ r.jsx(X, { blocks: ge(o, (e) => S(e._parent)) }) });
1123
+ return /* @__PURE__ */ r.jsx(Zt, { children: s });
1124
+ }, Es = (o, s) => o.querySelector(`[data-style-id="${s}"]`), Ts = () => {
1125
+ const [o] = y(Lt), [s] = ke(), [e] = V(), [, t] = C(), n = Rt(), [, d] = M(), a = ne(null), i = ne(null), [l, c] = j({ width: 0, height: 0 }), p = ls(l), [m, h] = j(0), [v, w] = j([]), [, g] = j([]), [, u] = y(Ft), [$, E] = N(), Te = O("loading", !1);
1126
+ k(() => {
1127
+ const { clientWidth: x, clientHeight: I } = i.current;
1128
+ c({ width: x, height: I }), m === 0 && h(x);
1129
+ }, [i, e, m]);
1130
+ const Le = (x, I = 0) => {
1131
+ const { top: D } = x.getBoundingClientRect();
1132
+ return D + I >= 0 && D - I <= window.innerHeight;
1133
+ };
1134
+ k(() => {
1135
+ var x, I;
1136
+ if (n && n.type !== "Multiple" && a.current) {
1137
+ const D = Ee(a.current.contentDocument, n._id);
1138
+ D && (Le(D) || (I = (x = a.current) == null ? void 0 : x.contentWindow) == null || I.scrollTo({ top: D.offsetTop, behavior: "smooth" }), w([D]));
1139
+ }
1140
+ }, [n]), k(() => {
1141
+ if (!S($) && a.current) {
1142
+ const x = Es(
1143
+ a.current.contentDocument,
1144
+ U($).id
1145
+ );
1146
+ g(x ? [x] : [null]);
1147
+ } else
1148
+ g([null]);
1149
+ }, [$]);
1150
+ const Re = Oe(() => {
1151
+ let x = as;
1152
+ return o === "offline" && (x = x.replace(
1153
+ "https://old.chaibuilder.com/offline/tailwind.cdn.js",
1154
+ "/offline/tailwind.cdn.js"
1155
+ ), x = x.replace("https://unpkg.com/aos@next/dist/aos.css", "/offline/aos.css"), x = x.replace("https://unpkg.com/aos@next/dist/aos.js", "/offline/aos.js")), x;
1156
+ }, [o]);
1157
+ return /* @__PURE__ */ r.jsx(
1158
+ "div",
1159
+ {
1160
+ onClick: () => {
1161
+ t([]), E([]);
1162
+ },
1163
+ onMouseLeave: () => setTimeout(() => d(""), 300),
1164
+ className: "relative mx-auto h-full w-full overflow-hidden",
1165
+ style: m > 0 && !S(p) ? { width: s ? "100%" : m } : {},
1166
+ ref: i,
1167
+ children: /* @__PURE__ */ r.jsxs(
1168
+ ds,
1169
+ {
1170
+ contentDidMount: () => u(a.current),
1171
+ ref: a,
1172
+ id: "canvas-iframe",
1173
+ style: { width: `${e}px`, ...p },
1174
+ className: "relative mx-auto box-content h-full max-w-full shadow-lg transition-all duration-300 ease-linear",
1175
+ initialContent: Re,
1176
+ children: [
1177
+ /* @__PURE__ */ r.jsx(ws, {}),
1178
+ /* @__PURE__ */ r.jsx(
1179
+ Cs,
1180
+ {
1181
+ block: n,
1182
+ selectedBlockElement: U(v)
1183
+ }
1184
+ ),
1185
+ /* @__PURE__ */ r.jsx(Ss, { model: "page" }),
1186
+ /* @__PURE__ */ r.jsx(ks, { children: Te ? /* @__PURE__ */ r.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ r.jsx(Ce, { className: "h-full" }) }) : /* @__PURE__ */ r.jsx(Ms, {}) }),
1187
+ /* @__PURE__ */ r.jsx("br", {}),
1188
+ /* @__PURE__ */ r.jsx("div", { id: "placeholder", className: "absolute z-[99999] max-w-full bg-green-500 transition-transform" })
1189
+ ]
1190
+ }
1191
+ )
1192
+ }
1193
+ );
1194
+ }, Fn = () => /* @__PURE__ */ r.jsxs("div", { className: "flex h-full w-full flex-col", children: [
1195
+ /* @__PURE__ */ r.jsx(is, {}),
1196
+ /* @__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(he, { fallback: /* @__PURE__ */ r.jsx(Ce, { className: "h-full" }), children: /* @__PURE__ */ r.jsx(Pt, { children: /* @__PURE__ */ r.jsx(Ts, {}) }) }) })
1197
+ ] });
1198
+ export {
1199
+ Fn as default
1200
+ };