@chaibuilder/sdk 1.0.13 → 1.0.15

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 (168) hide show
  1. package/dist/{AddBlocks-H7BZYHUC.js → AddBlocks-eoo1CzaK.js} +114 -111
  2. package/dist/AddBlocks-jU0NwP_s.cjs +3 -0
  3. package/dist/BrandingOptions-WSCFnWAf.cjs +1 -0
  4. package/dist/{BrandingOptions-PAgY-kvj.js → BrandingOptions-_Og7VUHA.js} +57 -41
  5. package/dist/{CanvasArea-zn2ox-5h.js → CanvasArea-cky_d2Lu.js} +517 -519
  6. package/dist/CanvasArea-hT9uHhkz.cjs +46 -0
  7. package/dist/Class-RZuPYbUS.cjs +1 -0
  8. package/dist/{Class-l7qYbuoN.js → Class-nQk08vqd.js} +204 -124
  9. package/dist/{CurrentPage-6Jp4xAWK.js → CurrentPage--OlBwyNE.js} +58 -40
  10. package/dist/CurrentPage-x6Ez11gP.cjs +1 -0
  11. package/dist/Layers-gEA0qWYP.cjs +1 -0
  12. package/dist/{Layers-WkZ48AUm.js → Layers-uzA3QA-4.js} +158 -141
  13. package/dist/MarkAsGlobalBlock-lYL8cO9x.cjs +1 -0
  14. package/dist/MarkAsGlobalBlock-ySc-D4SB.js +84 -0
  15. package/dist/PagesPanel-5t0bV9T2.cjs +1 -0
  16. package/dist/PagesPanel-tH6c9Mnv.js +70 -0
  17. package/dist/ProjectPanel-NdrR6a8t.cjs +1 -0
  18. package/dist/ProjectPanel-Q2-15-In.js +91 -0
  19. package/dist/Settings-DBiwm1hY.cjs +1 -0
  20. package/dist/{Settings-fH8fZKpm.js → Settings-LOqpvQ_1.js} +411 -408
  21. package/dist/SidePanels-8JWYXGqN.cjs +1 -0
  22. package/dist/{SidePanels-w8ZHKJaR.js → SidePanels-F7ccs2Xf.js} +106 -88
  23. package/dist/{Topbar-hm1D_5sb.js → Topbar-lX9OMPwj.js} +47 -45
  24. package/dist/Topbar-qi5ab8rR.cjs +1 -0
  25. package/dist/UnsplashImages-a2r7b3kB.cjs +1 -0
  26. package/dist/{UnsplashImages-gPcBLjgB.js → UnsplashImages-u_QTABzi.js} +56 -44
  27. package/dist/{UploadImages-_ZyUU66E.js → UploadImages-gV5xDHIu.js} +55 -34
  28. package/dist/UploadImages-jLQgLujd.cjs +1 -0
  29. package/dist/add-page-modal-U5ramelz.js +110 -0
  30. package/dist/add-page-modal-tIt3N8jH.cjs +1 -0
  31. package/dist/confirm-alert-ZQ-sxX0X.js +58 -0
  32. package/dist/confirm-alert-z74-fGOT.cjs +1 -0
  33. package/dist/core.cjs +1 -1
  34. package/dist/core.js +99 -124
  35. package/dist/delete-page-modal-5XuSfQT0.cjs +1 -0
  36. package/dist/delete-page-modal-_E87bVUZ.js +89 -0
  37. package/dist/form-Osm1AmO5.cjs +1 -0
  38. package/dist/{form-dVpOAyRl.js → form-zZJyZuNH.js} +12 -12
  39. package/dist/index-2EHcmZqL.js +2947 -0
  40. package/dist/index-RVm8Txnj.js +1149 -0
  41. package/dist/index-_jFEo7h5.cjs +206 -0
  42. package/dist/index-c8zW_D2V.cjs +1 -0
  43. package/dist/index-cU5eyVRU.js +40872 -0
  44. package/dist/index-fwo4wa7u.cjs +1 -0
  45. package/dist/index-gmZcUXyn.js +25 -0
  46. package/dist/index-m2muA80V.cjs +9 -0
  47. package/dist/{jsx-runtime-JYMCiFoE.cjs → jsx-runtime-WKRPbKtm.cjs} +7 -7
  48. package/dist/{jsx-runtime-Sp0orL4X.js → jsx-runtime-qAwJ85SY.js} +109 -106
  49. package/dist/lib.cjs +2 -1
  50. package/dist/lib.js +1333 -71
  51. package/dist/page-viewer-BSc-5M4B.cjs +1 -0
  52. package/dist/{page-viewer-Y4YiaZ_m.js → page-viewer-nLqIs_9w.js} +62 -44
  53. package/dist/project-general-setting-14MA_cX5.cjs +1 -0
  54. package/dist/{project-general-setting-U4S_KlhU.js → project-general-setting-kXh5myAr.js} +46 -36
  55. package/dist/project-seo-setting-POGPEJZ8.cjs +1 -0
  56. package/dist/project-seo-setting-nT1qo1Bb.js +89 -0
  57. package/dist/render.cjs +1 -1
  58. package/dist/render.js +23 -19
  59. package/dist/server.cjs +1 -1
  60. package/dist/server.js +1 -1
  61. package/dist/single-page-detail-EgQd9TSA.cjs +1 -0
  62. package/dist/{single-page-detail-pAxCy_Pe.js → single-page-detail-fV-A6vJR.js} +90 -80
  63. package/dist/studio.cjs +1 -1
  64. package/dist/studio.js +45 -25
  65. package/dist/ui.cjs +1 -1
  66. package/dist/ui.js +156 -357
  67. package/package.json +1 -1
  68. package/dist/AddBlocks-7ACJv8LW.cjs +0 -3
  69. package/dist/BrandingOptions-5j-XszLM.cjs +0 -1
  70. package/dist/CanvasArea-Dnm-yeus.cjs +0 -46
  71. package/dist/ChaiBuilderEditor-BoE-sArB.cjs +0 -163
  72. package/dist/ChaiBuilderEditor-hEuUONQ3.js +0 -27094
  73. package/dist/Class-_uCzl5v1.cjs +0 -1
  74. package/dist/CurrentPage-YMpqOqx7.cjs +0 -1
  75. package/dist/ImagesPanel-6us7hiLN.cjs +0 -1
  76. package/dist/ImagesPanel-oaHOD-Ex.js +0 -27
  77. package/dist/Layers-EzOZdWvd.cjs +0 -1
  78. package/dist/MODIFIERS-DsEzQ3aH.js +0 -73
  79. package/dist/MODIFIERS-Fx6WAZcw.cjs +0 -1
  80. package/dist/MarkAsGlobalBlock-0HubcRkY.js +0 -77
  81. package/dist/MarkAsGlobalBlock-HmeIyLCP.cjs +0 -1
  82. package/dist/PagesPanel-6JuwBLFQ.js +0 -50
  83. package/dist/PagesPanel-zJq8p1ja.cjs +0 -1
  84. package/dist/ProjectPanel-Zml2F8b9.cjs +0 -1
  85. package/dist/ProjectPanel-cu2QSDW9.js +0 -73
  86. package/dist/Settings-lc9PfnmG.cjs +0 -1
  87. package/dist/SidePanels-VH72zFE2.cjs +0 -1
  88. package/dist/Topbar-vQPo9xSY.cjs +0 -1
  89. package/dist/UnsplashImages-BoBBSi1a.cjs +0 -1
  90. package/dist/UploadImages-T6kW0s3G.cjs +0 -1
  91. package/dist/accordion-oPUeqPCZ.js +0 -42
  92. package/dist/accordion-ynvFtV_p.cjs +0 -1
  93. package/dist/add-page-modal--qZSwJuB.cjs +0 -1
  94. package/dist/add-page-modal-bj7qbZuK.js +0 -99
  95. package/dist/alert-dialog-GNfnpqFB.js +0 -64
  96. package/dist/alert-dialog-Mv0-wAvS.cjs +0 -1
  97. package/dist/command-ThdTuUxt.cjs +0 -1
  98. package/dist/command-VHca6CcN.js +0 -97
  99. package/dist/confirm-alert-8EHe0OOd.cjs +0 -1
  100. package/dist/confirm-alert-b0e_BLhF.js +0 -36
  101. package/dist/context-menu-8dC9uGXj.js +0 -122
  102. package/dist/context-menu-IgLbIuth.cjs +0 -1
  103. package/dist/controls-Ni5kEzLz.js +0 -103
  104. package/dist/controls-W97-POR_.cjs +0 -1
  105. package/dist/controls-enQY7NI8.js +0 -118
  106. package/dist/controls-xUKa23ic.cjs +0 -1
  107. package/dist/delete-page-modal-2LuDLEiP.cjs +0 -1
  108. package/dist/delete-page-modal-cnrR8tWH.js +0 -69
  109. package/dist/dialog-S_QbL1iq.cjs +0 -1
  110. package/dist/dialog-jrw9DF1f.js +0 -65
  111. package/dist/dropdown-menu-S03K_fNs.js +0 -164
  112. package/dist/dropdown-menu-sMXR59cB.cjs +0 -1
  113. package/dist/form-nRAvKPQj.cjs +0 -1
  114. package/dist/functions-nNTuSTsR.js +0 -1106
  115. package/dist/functions-pcUZhFJM.js +0 -12
  116. package/dist/functions-sCuB7nvZ.cjs +0 -2
  117. package/dist/functions-uw7QP2kT.cjs +0 -1
  118. package/dist/html-to-json-P6GpbcQX.cjs +0 -1
  119. package/dist/html-to-json-pdHQfRkN.js +0 -178
  120. package/dist/index-HAue58ea.cjs +0 -1
  121. package/dist/index-T4_wfKl5.js +0 -2256
  122. package/dist/index-X9ZgD09V.cjs +0 -1
  123. package/dist/index-ehKdBRUK.js +0 -18
  124. package/dist/label-KaP7MRrs.js +0 -10
  125. package/dist/label-tFm8HZdb.cjs +0 -1
  126. package/dist/link-6o6n2Tnd.js +0 -204
  127. package/dist/link-ece8dZGH.cjs +0 -1
  128. package/dist/page-viewer-IARz6OSp.cjs +0 -1
  129. package/dist/popover-a84pbVhQ.js +0 -23
  130. package/dist/popover-fKjgcRUx.cjs +0 -1
  131. package/dist/project-general-setting-eSl3t-VH.cjs +0 -1
  132. package/dist/project-seo-setting-Ga9v_ECU.js +0 -67
  133. package/dist/project-seo-setting-rankm1z3.cjs +0 -1
  134. package/dist/scroll-area-FiHvy-TZ.cjs +0 -1
  135. package/dist/scroll-area-ewXbxc3n.js +0 -30
  136. package/dist/select-7bjg-rr9.cjs +0 -1
  137. package/dist/select-POGdEDHT.js +0 -75
  138. package/dist/separator-3Civ-6hb.cjs +0 -1
  139. package/dist/separator-SctTn0Qi.js +0 -18
  140. package/dist/single-page-detail-yPgnu2AI.cjs +0 -1
  141. package/dist/skeleton-CU_FIbg3.js +0 -239
  142. package/dist/skeleton-JHP9zwL2.cjs +0 -1
  143. package/dist/tabs-Gb9v5dVb.js +0 -46
  144. package/dist/tabs-iWeaaVrg.cjs +0 -1
  145. package/dist/textarea-1kZEh7ki.cjs +0 -1
  146. package/dist/textarea-b2QvVhrK.js +0 -73
  147. package/dist/toggle-ASJRAaGP.js +0 -30
  148. package/dist/toggle-ehNIPmme.cjs +0 -1
  149. package/dist/useAddBlock-WJc3OgG8.js +0 -86
  150. package/dist/useAddBlock-dCKRFPRU.cjs +0 -1
  151. package/dist/useAllBlocks-6hvuNuyw.cjs +0 -1
  152. package/dist/useAllBlocks-PQKYvs-e.js +0 -20
  153. package/dist/useChaiExternalData-4K9WxANa.js +0 -6
  154. package/dist/useChaiExternalData-DkyBJ81C.cjs +0 -1
  155. package/dist/useDarkMode-ZKCO_gkt.js +0 -23
  156. package/dist/useDarkMode-dV6FM6l-.cjs +0 -1
  157. package/dist/useFeatureSupport-OLwNgEZb.js +0 -16
  158. package/dist/useFeatureSupport-c9IgPW2t.cjs +0 -1
  159. package/dist/useHiddenBlocks-3MsGOJ1s.js +0 -15
  160. package/dist/useHiddenBlocks-oJuQDmTy.cjs +0 -1
  161. package/dist/useLanguage-NKKKaxVM.cjs +0 -1
  162. package/dist/useLanguage-gVC5rxO5.js +0 -216
  163. package/dist/useMarkAsGlobalBlock-X73Vny8u.js +0 -25
  164. package/dist/useMarkAsGlobalBlock-ebBVGHg4.cjs +0 -1
  165. package/dist/useUiLibraries-4hPOi8DI.js +0 -12
  166. package/dist/useUiLibraries-9FhQCpKo.cjs +0 -1
  167. package/dist/utils-dze1SGvB.js +0 -6
  168. package/dist/utils-qK_SjzzV.cjs +0 -1
@@ -1,80 +1,77 @@
1
- var ut = Object.defineProperty;
2
- var pt = (n, t, r) => t in n ? ut(n, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[t] = r;
3
- var U = (n, t, r) => (pt(n, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { j as e } from "./jsx-runtime-Sp0orL4X.js";
5
- import z, { useMemo as Me, useEffect as R, createElement as ft, useCallback as V, useState as $, Component as Ne, Children as ht, Suspense as Le, useRef as we, lazy as mt } from "react";
6
- import { each as ue, find as Fe, map as Q, includes as ke, toUpper as se, round as yt, isEmpty as q, first as ee, get as A, memoize as gt, filter as We, isNull as vt, isString as me } from "lodash";
7
- import { ResetIcon as Ce, DotsVerticalIcon as xt, MobileIcon as Te, LaptopIcon as bt, DesktopIcon as jt, EraserIcon as wt, ZoomInIcon as kt, ArrowUpIcon as Ct, CopyIcon as Tt, TrashIcon as Et, DragHandleDots2Icon as St } from "@radix-ui/react-icons";
8
- import { B as te, u as Dt, S as $e } from "./skeleton-CU_FIbg3.js";
9
- import { t as Ot, a as ye, s as It, l as H, q as K, y as qe, e as Ue, d as At, b as Bt, h as Pt, i as ze, k as He, p as Rt, z as _t, A as Mt, j as Nt, g as ge, B as Lt, m as Ft, D as Wt, x as $t, E as qt } from "./ChaiBuilderEditor-hEuUONQ3.js";
10
- import { useTranslation as Ke } from "react-i18next";
11
- import { S as G } from "./separator-SctTn0Qi.js";
12
- import { a as Ye, u as ve } from "./useDarkMode-ZKCO_gkt.js";
13
- import { S as Ut, D as zt, c as Ht, d as Kt, h as Yt, i as Vt, f as Xt, H as Jt, a as Zt, b as Gt } from "./dropdown-menu-S03K_fNs.js";
14
- import { L as Qt } from "./label-KaP7MRrs.js";
15
- import { b as en, u as tn, a as Ve } from "./useFeatureSupport-OLwNgEZb.js";
16
- import { A as nn, a as rn, b as sn, c as on, e as an, f as ln, d as cn, h as dn, g as un } from "./alert-dialog-GNfnpqFB.js";
1
+ var at = Object.defineProperty;
2
+ var lt = (n, t, r) => t in n ? at(n, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[t] = r;
3
+ var q = (n, t, r) => (lt(n, typeof t != "symbol" ? t + "" : t, r), r);
4
+ import { j as e } from "./jsx-runtime-qAwJ85SY.js";
5
+ import z, { createElement as ct, useCallback as V, useState as F, useEffect as _, Component as _e, Children as dt, Suspense as Me, useRef as je, useMemo as ut, lazy as pt } from "react";
6
+ import { map as Q, includes as we, toUpper as oe, round as ft, isEmpty as U, first as ee, get as A, isString as he, memoize as ht, each as mt, find as yt, filter as Ne, isNull as gt } from "lodash";
7
+ import { ResetIcon as ke, MobileIcon as Ce, LaptopIcon as vt, DesktopIcon as xt, DotsVerticalIcon as bt, EraserIcon as jt, ZoomInIcon as wt, DragHandleDots2Icon as kt, ArrowUpIcon as Ct, CopyIcon as Tt, TrashIcon as Et } from "@radix-ui/react-icons";
8
+ import { p as me, B as te, W as Le, aM as St, aN as Ot, aO as Dt, aP as It, aQ as At, R as ye, ai as Bt, aR as Pt, aS as Rt, aT as _t, aU as Mt, aV as Nt, aW as Lt, w as Wt, j as H, aj as Y, D as $t, E as Ft, F as Ut, G as qt, H as zt, I as Ht, J as Yt, K as Kt, at as Vt, L as Xt, U as We, aL as G, m as $e, n as Jt, k as Zt, o as Gt, h as Fe, l as Ue, ag as Qt, aX as en, aY as tn, aZ as nn, a_ as rn, x as sn, _ as ge, ae as qe, a$ as on, a6 as an, b0 as ln, i as cn, S as ze, aA as dn } from "./index-2EHcmZqL.js";
9
+ import { useTranslation as He } from "react-i18next";
17
10
  import { useAtom as J } from "jotai";
18
- import { flip as pn } from "@floating-ui/dom";
19
- import { useFloating as fn, shift as hn } from "@floating-ui/react-dom";
20
- import { useDrag as mn } from "react-dnd";
21
- import { c as yn, a as gn, u as Xe } from "./useAllBlocks-PQKYvs-e.js";
22
- import { useResizeObserver as vn } from "@react-hookz/web";
23
- import { tailwindcssPaletteGenerator as xn } from "@bobthered/tailwindcss-palette-generator";
24
- import { Provider as bn } from "react-wrap-balancer";
25
- import { twMerge as jn } from "tailwind-merge";
26
- import { g as wn, S as Je, a as Ee } from "./MODIFIERS-DsEzQ3aH.js";
27
- import { A as kn, h as Cn } from "./index-ehKdBRUK.js";
28
- import { u as Ze } from "./useChaiExternalData-4K9WxANa.js";
29
- import Se from "react-dom";
30
- import "@radix-ui/react-slot";
11
+ import Te from "react-dom";
12
+ import { g as un, S as Ee, a as Ye } from "./Class-nQk08vqd.js";
13
+ import { r as Ke, u as pn, B as fn, E as hn } from "./index-cU5eyVRU.js";
14
+ import { flip as mn } from "@floating-ui/dom";
15
+ import { useFloating as yn, shift as gn } from "@floating-ui/react-dom";
16
+ import { useDrag as vn } from "react-dnd";
17
+ import { useResizeObserver as xn } from "@react-hookz/web";
18
+ import { tailwindcssPaletteGenerator as bn } from "@bobthered/tailwindcss-palette-generator";
19
+ import { Provider as jn } from "react-wrap-balancer";
20
+ import { twMerge as wn } from "tailwind-merge";
21
+ import { h as kn } from "./index-gmZcUXyn.js";
22
+ import "@radix-ui/react-toggle";
31
23
  import "class-variance-authority";
32
- import "./utils-dze1SGvB.js";
33
- import "clsx";
24
+ import "@radix-ui/react-switch";
25
+ import "@radix-ui/react-slot";
26
+ import "@radix-ui/react-accordion";
27
+ import "@radix-ui/react-alert-dialog";
28
+ import "@radix-ui/react-dialog";
29
+ import "@radix-ui/react-label";
30
+ import "@radix-ui/react-scroll-area";
31
+ import "@radix-ui/react-tabs";
34
32
  import "@radix-ui/react-tooltip";
33
+ import "@radix-ui/react-popover";
34
+ import "@radix-ui/react-menubar";
35
+ import "@radix-ui/react-hover-card";
36
+ import "@radix-ui/react-select";
37
+ import "@radix-ui/react-dropdown-menu";
38
+ import "@radix-ui/react-separator";
35
39
  import "@radix-ui/react-toast";
36
- import "@radix-ui/react-scroll-area";
40
+ import "cmdk";
41
+ import "@radix-ui/react-context-menu";
42
+ import "react-icons-picker";
43
+ import "react-quill";
44
+ import "flat-to-nested";
45
+ import "redux-undo";
46
+ import "clsx";
37
47
  import "i18next";
48
+ import "./index-RVm8Txnj.js";
49
+ import "./lib.js";
50
+ import "himalaya";
51
+ import "@mhsdesign/jit-browser-tailwindcss";
52
+ import "@tailwindcss/forms";
53
+ import "@tailwindcss/typography";
54
+ import "@tailwindcss/aspect-ratio";
55
+ import "@tailwindcss/line-clamp";
56
+ import "react-textarea-autosize";
38
57
  import "flagged";
39
58
  import "@minoru/react-dnd-treeview";
40
59
  import "react-hotkeys-hook";
41
- import "flat-to-nested";
42
- import "./functions-pcUZhFJM.js";
43
- import "redux-undo";
44
- import "@radix-ui/react-separator";
45
- import "@radix-ui/react-switch";
46
- import "@radix-ui/react-hover-card";
47
- import "@radix-ui/react-dropdown-menu";
48
- import "@radix-ui/react-label";
49
- import "@radix-ui/react-alert-dialog";
50
- const Tn = () => Me(() => kn(), []), En = ({ children: n }) => {
51
- const [, t] = Ze(), [r] = Ot(), a = Tn();
52
- return R(() => (t({}), ue(r, (c) => {
53
- const s = Fe(a, { providerKey: c.providerKey });
54
- if (s) {
55
- const i = (s == null ? void 0 : s.mockFn) || (s == null ? void 0 : s.dataFn);
56
- i && i(c.args).then(
57
- (d) => t((y) => ({ ...y, [c.providerKey]: d }))
58
- );
59
- }
60
- }), () => {
61
- ue(r, (c) => {
62
- t((s) => (delete s[c.providerKey], s));
63
- });
64
- }), [a, r, t]), /* @__PURE__ */ e.jsx(e.Fragment, { children: n });
65
- }, Sn = () => {
66
- const { undoCount: n, redoCount: t, undo: r, redo: a } = ye();
60
+ import "sonner";
61
+ import "lucide-react";
62
+ const Cn = () => {
63
+ const { undoCount: n, redoCount: t, undo: r, redo: a } = me();
67
64
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
68
- /* @__PURE__ */ e.jsx(te, { disabled: !n, size: "sm", onClick: r, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ e.jsx(Ce, {}) }),
69
- /* @__PURE__ */ e.jsx(te, { disabled: !t, onClick: a, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ e.jsx(Ce, { className: "rotate-180 scale-y-[-1] transform" }) })
65
+ /* @__PURE__ */ e.jsx(te, { disabled: !n, size: "sm", onClick: r, className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ e.jsx(ke, {}) }),
66
+ /* @__PURE__ */ e.jsx(te, { disabled: !t, onClick: a, size: "sm", className: "rounded-full", variant: "ghost", children: /* @__PURE__ */ e.jsx(ke, { className: "rotate-180 scale-y-[-1] transform" }) })
70
67
  ] });
71
68
  };
72
- function Dn() {
73
- const [n, t] = Ye(), { t: r } = Ke();
69
+ function Tn() {
70
+ const [n, t] = Le(), { t: r } = He();
74
71
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
75
- /* @__PURE__ */ e.jsx(Qt, { htmlFor: "dark-mode-switch", children: r("dark_mode") }),
72
+ /* @__PURE__ */ e.jsx(St, { htmlFor: "dark-mode-switch", children: r("dark_mode") }),
76
73
  /* @__PURE__ */ e.jsxs(
77
- Ut,
74
+ Ot,
78
75
  {
79
76
  id: "dark-mode-switch",
80
77
  checked: n,
@@ -98,7 +95,7 @@ function Dn() {
98
95
  )
99
96
  ] });
100
97
  }
101
- const De = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
98
+ const Se = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
102
99
  "svg",
103
100
  {
104
101
  className: n ? "rotate-90" : "",
@@ -126,140 +123,140 @@ const De = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
126
123
  title: "Mobile (XS)",
127
124
  content: "Styles set here are applied to all screen unless edited at higher breakpoint",
128
125
  breakpoint: "xs",
129
- icon: /* @__PURE__ */ e.jsx(Te, {}),
126
+ icon: /* @__PURE__ */ e.jsx(Ce, {}),
130
127
  width: 400
131
128
  },
132
129
  {
133
130
  title: "Mobile landscape (SM)",
134
131
  content: "Styles set here are applied at 640px and up unless edited at higher breakpoint",
135
132
  breakpoint: "sm",
136
- icon: /* @__PURE__ */ e.jsx(Te, { className: "rotate-90" }),
133
+ icon: /* @__PURE__ */ e.jsx(Ce, { className: "rotate-90" }),
137
134
  width: 640
138
135
  },
139
136
  {
140
137
  title: "Tablet (MD)",
141
138
  content: "Styles set here are applied at 768px and up",
142
139
  breakpoint: "md",
143
- icon: /* @__PURE__ */ e.jsx(De, {}),
140
+ icon: /* @__PURE__ */ e.jsx(Se, {}),
144
141
  width: 800
145
142
  },
146
143
  {
147
144
  title: "Tablet Landscape (LG)",
148
145
  content: "Styles set here are applied at 1024px and up unless edited at higher breakpoint",
149
146
  breakpoint: "lg",
150
- icon: /* @__PURE__ */ e.jsx(De, { landscape: !0 }),
147
+ icon: /* @__PURE__ */ e.jsx(Se, { landscape: !0 }),
151
148
  width: 1024
152
149
  },
153
150
  {
154
151
  title: "Desktop (XL)",
155
152
  content: "Styles set here are applied at 1280px and up unless edited at higher breakpoint",
156
153
  breakpoint: "xl",
157
- icon: /* @__PURE__ */ e.jsx(bt, {}),
154
+ icon: /* @__PURE__ */ e.jsx(vt, {}),
158
155
  width: 1420
159
156
  },
160
157
  {
161
158
  title: "Large Desktop (2XL)",
162
159
  content: "Styles set here are applied at 1536px and up",
163
160
  breakpoint: "2xl",
164
- icon: /* @__PURE__ */ e.jsx(jt, {}),
161
+ icon: /* @__PURE__ */ e.jsx(xt, {}),
165
162
  width: 1920
166
163
  }
167
- ], On = ({
164
+ ], En = ({
168
165
  title: n,
169
166
  content: t,
170
167
  currentBreakpoint: r,
171
168
  breakpoint: a,
172
169
  width: c,
173
- icon: s,
170
+ icon: o,
174
171
  onClick: i
175
- }) => /* @__PURE__ */ e.jsxs(Jt, { children: [
176
- /* @__PURE__ */ e.jsx(Zt, { asChild: !0, children: /* @__PURE__ */ e.jsx(
172
+ }) => /* @__PURE__ */ e.jsxs(Dt, { children: [
173
+ /* @__PURE__ */ e.jsx(It, { asChild: !0, children: /* @__PURE__ */ e.jsx(
177
174
  te,
178
175
  {
179
176
  onClick: () => i(c),
180
177
  size: "sm",
181
178
  variant: a === r ? "secondary" : "ghost",
182
- children: s
179
+ children: o
183
180
  }
184
181
  ) }),
185
- /* @__PURE__ */ e.jsx(Gt, { className: "w-52 border-border", children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
182
+ /* @__PURE__ */ e.jsx(At, { className: "w-52 border-border", children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
186
183
  /* @__PURE__ */ e.jsx("h4", { className: "text-sm font-semibold", children: n }),
187
184
  /* @__PURE__ */ e.jsx("p", { className: "text-xs", children: t })
188
185
  ] }) }) })
189
- ] }), In = () => {
190
- const [, n, t] = ve(), [r, a] = en(), c = (s) => {
191
- r.includes(s) ? r.length > 2 && a(r.filter((i) => i !== s)) : a((i) => [...i, s]);
186
+ ] }), Sn = () => {
187
+ const [, n, t] = ye(), [r, a] = Bt(), c = (o) => {
188
+ r.includes(o) ? r.length > 2 && a(r.filter((i) => i !== o)) : a((i) => [...i, o]);
192
189
  };
193
190
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center rounded-md", children: [
194
191
  Q(
195
- Oe.filter((s) => ke(r, se(s.breakpoint))),
196
- (s) => /* @__PURE__ */ ft(On, { ...s, onClick: t, key: s.breakpoint, currentBreakpoint: n })
192
+ Oe.filter((o) => we(r, oe(o.breakpoint))),
193
+ (o) => /* @__PURE__ */ ct(En, { ...o, onClick: t, key: o.breakpoint, currentBreakpoint: n })
197
194
  ),
198
- /* @__PURE__ */ e.jsxs(zt, { children: [
199
- /* @__PURE__ */ e.jsx(Ht, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ e.jsx(xt, { className: "scale-90 transform" }) }) }),
200
- /* @__PURE__ */ e.jsxs(Kt, { className: "w-56 border-border text-xs", children: [
201
- /* @__PURE__ */ e.jsx(Yt, { children: "Breakpoints" }),
202
- /* @__PURE__ */ e.jsx(Vt, {}),
203
- Q(Oe, (s) => /* @__PURE__ */ e.jsx(
204
- Xt,
195
+ /* @__PURE__ */ e.jsxs(Pt, { children: [
196
+ /* @__PURE__ */ e.jsx(Rt, { asChild: !0, children: /* @__PURE__ */ e.jsx("span", { className: "cursor-pointer px-2.5 hover:opacity-80", children: /* @__PURE__ */ e.jsx(bt, { className: "scale-90 transform" }) }) }),
197
+ /* @__PURE__ */ e.jsxs(_t, { className: "w-56 border-border text-xs", children: [
198
+ /* @__PURE__ */ e.jsx(Mt, { children: "Breakpoints" }),
199
+ /* @__PURE__ */ e.jsx(Nt, {}),
200
+ Q(Oe, (o) => /* @__PURE__ */ e.jsx(
201
+ Lt,
205
202
  {
206
- disabled: s.breakpoint === "xs",
207
- onCheckedChange: () => c(se(s.breakpoint)),
208
- checked: ke(r, se(s.breakpoint)),
209
- children: s.title
203
+ disabled: o.breakpoint === "xs",
204
+ onCheckedChange: () => c(oe(o.breakpoint)),
205
+ checked: we(r, oe(o.breakpoint)),
206
+ children: o.title
210
207
  },
211
- s.breakpoint
208
+ o.breakpoint
212
209
  ))
213
210
  ] })
214
211
  ] })
215
212
  ] });
216
- }, An = () => {
217
- const [n] = It(), { createSnapshot: t } = ye(), [, r] = H(), [, a] = K(), c = V(() => {
213
+ }, On = () => {
214
+ const [n] = Wt(), { createSnapshot: t } = me(), [, r] = H(), [, a] = Y(), c = V(() => {
218
215
  n([]), r([]), a([]), t();
219
216
  }, [n, t]);
220
- return /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ e.jsxs(nn, { children: [
221
- /* @__PURE__ */ e.jsx(rn, { asChild: !0, children: /* @__PURE__ */ e.jsxs(te, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
222
- /* @__PURE__ */ e.jsx(wt, {}),
217
+ return /* @__PURE__ */ e.jsx("div", { className: "flex items-center", children: /* @__PURE__ */ e.jsxs($t, { children: [
218
+ /* @__PURE__ */ e.jsx(Ft, { asChild: !0, children: /* @__PURE__ */ e.jsxs(te, { size: "sm", variant: "ghost", className: "flex items-center gap-x-1", children: [
219
+ /* @__PURE__ */ e.jsx(jt, {}),
223
220
  " Clear"
224
221
  ] }) }),
225
- /* @__PURE__ */ e.jsxs(sn, { className: "border-border", children: [
226
- /* @__PURE__ */ e.jsxs(on, { children: [
227
- /* @__PURE__ */ e.jsx(an, { children: "Clear whole canvas?" }),
228
- /* @__PURE__ */ e.jsx(ln, { children: "Are you sure you want to clear the whole canvas?" })
222
+ /* @__PURE__ */ e.jsxs(Ut, { className: "border-border", children: [
223
+ /* @__PURE__ */ e.jsxs(qt, { children: [
224
+ /* @__PURE__ */ e.jsx(zt, { children: "Clear whole canvas?" }),
225
+ /* @__PURE__ */ e.jsx(Ht, { children: "Are you sure you want to clear the whole canvas?" })
229
226
  ] }),
230
- /* @__PURE__ */ e.jsxs(cn, { children: [
231
- /* @__PURE__ */ e.jsx(dn, { children: "Cancel" }),
232
- /* @__PURE__ */ e.jsx(un, { onClick: c, children: "Yes" })
227
+ /* @__PURE__ */ e.jsxs(Yt, { children: [
228
+ /* @__PURE__ */ e.jsx(Kt, { children: "Cancel" }),
229
+ /* @__PURE__ */ e.jsx(Vt, { onClick: c, children: "Yes" })
233
230
  ] })
234
231
  ] })
235
232
  ] }) });
236
- }, Bn = () => {
237
- const n = tn("darkMode", !1), [t] = Ve();
233
+ }, Dn = () => {
234
+ const n = Xt("darkMode", !1), [t] = We();
238
235
  return /* @__PURE__ */ e.jsxs("div", { className: "flex h-10 items-center justify-between border-b bg-background/70 px-2", children: [
239
236
  /* @__PURE__ */ e.jsxs("div", { className: "flex h-full space-x-2", children: [
240
237
  n ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
241
- /* @__PURE__ */ e.jsx(Dn, {}),
238
+ /* @__PURE__ */ e.jsx(Tn, {}),
242
239
  /* @__PURE__ */ e.jsx(G, { orientation: "vertical" })
243
240
  ] }) : null,
244
- /* @__PURE__ */ e.jsx(In, {}),
241
+ /* @__PURE__ */ e.jsx(Sn, {}),
245
242
  /* @__PURE__ */ e.jsx(G, { orientation: "vertical" }),
246
243
  /* @__PURE__ */ e.jsxs("div", { className: "flex w-12 items-center justify-center gap-x-1 space-x-0 font-medium", children: [
247
- /* @__PURE__ */ e.jsx(kt, { className: "h-3.5 w-3.5 flex-shrink-0" }),
244
+ /* @__PURE__ */ e.jsx(wt, { className: "h-3.5 w-3.5 flex-shrink-0" }),
248
245
  " ",
249
246
  /* @__PURE__ */ e.jsxs("div", { className: "text-xs leading-3", children: [
250
- yt(t, 0),
247
+ ft(t, 0),
251
248
  "%"
252
249
  ] })
253
250
  ] }),
254
251
  /* @__PURE__ */ e.jsx(G, { orientation: "vertical" }),
255
- /* @__PURE__ */ e.jsx(Sn, {})
252
+ /* @__PURE__ */ e.jsx(Cn, {})
256
253
  ] }),
257
254
  /* @__PURE__ */ e.jsxs("div", { className: "flex h-full items-center space-x-2", children: [
258
255
  /* @__PURE__ */ e.jsx(G, { orientation: "vertical" }),
259
- /* @__PURE__ */ e.jsx(An, {})
256
+ /* @__PURE__ */ e.jsx(On, {})
260
257
  ] })
261
258
  ] });
262
- }, Pn = `<!doctype html>
259
+ }, In = `<!doctype html>
263
260
  <html class="scroll-smooth h-full overflow-y-auto">
264
261
  <head>
265
262
  <meta charset="UTF-8">
@@ -293,101 +290,101 @@ const De = ({ landscape: n = !1 }) => /* @__PURE__ */ e.jsxs(
293
290
  <body class="font-body antialiased h-full">
294
291
  <div class="frame-root"></div>
295
292
  </body>
296
- </html>`, Rn = (n) => {
297
- const [t] = ve(), [, r] = Ve(), [a, c] = $({}), s = V(() => {
298
- const { width: i, height: d } = n;
293
+ </html>`, An = (n) => {
294
+ const [t] = ye(), [, r] = We(), [a, c] = F({}), o = V(() => {
295
+ const { width: i, height: p } = n;
299
296
  if (i < t) {
300
- const y = parseFloat((i / t).toString());
297
+ const g = parseFloat((i / t).toString());
301
298
  let b = {};
302
- d && (b = { height: d + 2 * d * (1 - y) }), c({
303
- transform: `scale(${y})`,
299
+ p && (b = { height: p + 2 * p * (1 - g) }), c({
300
+ transform: `scale(${g})`,
304
301
  transformOrigin: "top left",
305
302
  ...b,
306
303
  maxWidth: "none"
307
- }), r(y * 100);
304
+ }), r(g * 100);
308
305
  } else
309
306
  c({}), r(100);
310
307
  }, [t, n, r]);
311
- return R(() => {
312
- s();
313
- }, [t, n, r, s]), a;
308
+ return _(() => {
309
+ o();
310
+ }, [t, n, r, o]), a;
314
311
  };
315
- var pe = { exports: {} };
312
+ var ne = { exports: {} };
316
313
  /*
317
314
  object-assign
318
315
  (c) Sindre Sorhus
319
316
  @license MIT
320
317
  */
321
- var oe, Ie;
322
- function _n() {
323
- if (Ie)
324
- return oe;
325
- Ie = 1;
318
+ var ie, De;
319
+ function Bn() {
320
+ if (De)
321
+ return ie;
322
+ De = 1;
326
323
  var n = Object.getOwnPropertySymbols, t = Object.prototype.hasOwnProperty, r = Object.prototype.propertyIsEnumerable;
327
- function a(s) {
328
- if (s == null)
324
+ function a(o) {
325
+ if (o == null)
329
326
  throw new TypeError("Object.assign cannot be called with null or undefined");
330
- return Object(s);
327
+ return Object(o);
331
328
  }
332
329
  function c() {
333
330
  try {
334
331
  if (!Object.assign)
335
332
  return !1;
336
- var s = new String("abc");
337
- if (s[5] = "de", Object.getOwnPropertyNames(s)[0] === "5")
333
+ var o = new String("abc");
334
+ if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5")
338
335
  return !1;
339
- for (var i = {}, d = 0; d < 10; d++)
340
- i["_" + String.fromCharCode(d)] = d;
341
- var y = Object.getOwnPropertyNames(i).map(function(p) {
342
- return i[p];
336
+ for (var i = {}, p = 0; p < 10; p++)
337
+ i["_" + String.fromCharCode(p)] = p;
338
+ var g = Object.getOwnPropertyNames(i).map(function(u) {
339
+ return i[u];
343
340
  });
344
- if (y.join("") !== "0123456789")
341
+ if (g.join("") !== "0123456789")
345
342
  return !1;
346
343
  var b = {};
347
- return "abcdefghijklmnopqrst".split("").forEach(function(p) {
348
- b[p] = p;
344
+ return "abcdefghijklmnopqrst".split("").forEach(function(u) {
345
+ b[u] = u;
349
346
  }), Object.keys(Object.assign({}, b)).join("") === "abcdefghijklmnopqrst";
350
347
  } catch {
351
348
  return !1;
352
349
  }
353
350
  }
354
- return oe = c() ? Object.assign : function(s, i) {
355
- for (var d, y = a(s), b, p = 1; p < arguments.length; p++) {
356
- d = Object(arguments[p]);
357
- for (var u in d)
358
- t.call(d, u) && (y[u] = d[u]);
351
+ return ie = c() ? Object.assign : function(o, i) {
352
+ for (var p, g = a(o), b, u = 1; u < arguments.length; u++) {
353
+ p = Object(arguments[u]);
354
+ for (var d in p)
355
+ t.call(p, d) && (g[d] = p[d]);
359
356
  if (n) {
360
- b = n(d);
357
+ b = n(p);
361
358
  for (var m = 0; m < b.length; m++)
362
- r.call(d, b[m]) && (y[b[m]] = d[b[m]]);
359
+ r.call(p, b[m]) && (g[b[m]] = p[b[m]]);
363
360
  }
364
361
  }
365
- return y;
366
- }, oe;
362
+ return g;
363
+ }, ie;
367
364
  }
368
- var ie, Ae;
369
- function xe() {
370
- if (Ae)
371
- return ie;
372
- Ae = 1;
365
+ var ae, Ie;
366
+ function ve() {
367
+ if (Ie)
368
+ return ae;
369
+ Ie = 1;
373
370
  var n = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
374
- return ie = n, ie;
371
+ return ae = n, ae;
375
372
  }
376
- var ae, Be;
377
- function Ge() {
378
- return Be || (Be = 1, ae = Function.call.bind(Object.prototype.hasOwnProperty)), ae;
373
+ var le, Ae;
374
+ function Ve() {
375
+ return Ae || (Ae = 1, le = Function.call.bind(Object.prototype.hasOwnProperty)), le;
379
376
  }
380
- var le, Pe;
381
- function Mn() {
382
- if (Pe)
383
- return le;
384
- Pe = 1;
377
+ var ce, Be;
378
+ function Pn() {
379
+ if (Be)
380
+ return ce;
381
+ Be = 1;
385
382
  var n = function() {
386
383
  };
387
384
  if (process.env.NODE_ENV !== "production") {
388
- var t = xe(), r = {}, a = Ge();
389
- n = function(s) {
390
- var i = "Warning: " + s;
385
+ var t = ve(), r = {}, a = Ve();
386
+ n = function(o) {
387
+ var i = "Warning: " + o;
391
388
  typeof console < "u" && console.error(i);
392
389
  try {
393
390
  throw new Error(i);
@@ -395,29 +392,29 @@ function Mn() {
395
392
  }
396
393
  };
397
394
  }
398
- function c(s, i, d, y, b) {
395
+ function c(o, i, p, g, b) {
399
396
  if (process.env.NODE_ENV !== "production") {
400
- for (var p in s)
401
- if (a(s, p)) {
402
- var u;
397
+ for (var u in o)
398
+ if (a(o, u)) {
399
+ var d;
403
400
  try {
404
- if (typeof s[p] != "function") {
401
+ if (typeof o[u] != "function") {
405
402
  var m = Error(
406
- (y || "React class") + ": " + d + " type `" + p + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[p] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
403
+ (g || "React class") + ": " + p + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
407
404
  );
408
405
  throw m.name = "Invariant Violation", m;
409
406
  }
410
- u = s[p](i, p, y, d, null, t);
411
- } catch (O) {
412
- u = O;
407
+ d = o[u](i, u, g, p, null, t);
408
+ } catch (D) {
409
+ d = D;
413
410
  }
414
- if (u && !(u instanceof Error) && n(
415
- (y || "React class") + ": type specification of " + d + " `" + p + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof u + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
416
- ), u instanceof Error && !(u.message in r)) {
417
- r[u.message] = !0;
411
+ if (d && !(d instanceof Error) && n(
412
+ (g || "React class") + ": type specification of " + p + " `" + u + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof d + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
413
+ ), d instanceof Error && !(d.message in r)) {
414
+ r[d.message] = !0;
418
415
  var k = b ? b() : "";
419
416
  n(
420
- "Failed " + d + " type: " + u.message + (k ?? "")
417
+ "Failed " + p + " type: " + d.message + (k ?? "")
421
418
  );
422
419
  }
423
420
  }
@@ -425,30 +422,30 @@ function Mn() {
425
422
  }
426
423
  return c.resetWarningCache = function() {
427
424
  process.env.NODE_ENV !== "production" && (r = {});
428
- }, le = c, le;
425
+ }, ce = c, ce;
429
426
  }
430
- var ce, Re;
431
- function Nn() {
432
- if (Re)
433
- return ce;
434
- Re = 1;
435
- var n = qe, t = _n(), r = xe(), a = Ge(), c = Mn(), s = function() {
427
+ var de, Pe;
428
+ function Rn() {
429
+ if (Pe)
430
+ return de;
431
+ Pe = 1;
432
+ var n = Ke, t = Bn(), r = ve(), a = Ve(), c = Pn(), o = function() {
436
433
  };
437
- process.env.NODE_ENV !== "production" && (s = function(d) {
438
- var y = "Warning: " + d;
439
- typeof console < "u" && console.error(y);
434
+ process.env.NODE_ENV !== "production" && (o = function(p) {
435
+ var g = "Warning: " + p;
436
+ typeof console < "u" && console.error(g);
440
437
  try {
441
- throw new Error(y);
438
+ throw new Error(g);
442
439
  } catch {
443
440
  }
444
441
  });
445
442
  function i() {
446
443
  return null;
447
444
  }
448
- return ce = function(d, y) {
449
- var b = typeof Symbol == "function" && Symbol.iterator, p = "@@iterator";
450
- function u(o) {
451
- var l = o && (b && o[b] || o[p]);
445
+ return de = function(p, g) {
446
+ var b = typeof Symbol == "function" && Symbol.iterator, u = "@@iterator";
447
+ function d(s) {
448
+ var l = s && (b && s[b] || s[u]);
452
449
  if (typeof l == "function")
453
450
  return l;
454
451
  }
@@ -461,76 +458,76 @@ function Nn() {
461
458
  object: f("object"),
462
459
  string: f("string"),
463
460
  symbol: f("symbol"),
464
- any: F(),
461
+ any: W(),
465
462
  arrayOf: M,
466
- element: ne(),
467
- elementType: re(),
463
+ element: re(),
464
+ elementType: se(),
468
465
  instanceOf: I,
469
- node: ot(),
466
+ node: tt(),
470
467
  objectOf: L,
471
468
  oneOf: N,
472
- oneOfType: st,
473
- shape: it,
474
- exact: at
469
+ oneOfType: et,
470
+ shape: nt,
471
+ exact: rt
475
472
  };
476
- function O(o, l) {
477
- return o === l ? o !== 0 || 1 / o === 1 / l : o !== o && l !== l;
473
+ function D(s, l) {
474
+ return s === l ? s !== 0 || 1 / s === 1 / l : s !== s && l !== l;
478
475
  }
479
- function w(o, l) {
480
- this.message = o, this.data = l && typeof l == "object" ? l : {}, this.stack = "";
476
+ function w(s, l) {
477
+ this.message = s, this.data = l && typeof l == "object" ? l : {}, this.stack = "";
481
478
  }
482
479
  w.prototype = Error.prototype;
483
- function S(o) {
480
+ function S(s) {
484
481
  if (process.env.NODE_ENV !== "production")
485
482
  var l = {}, j = 0;
486
- function v(C, g, x, T, D, E, _) {
487
- if (T = T || m, E = E || x, _ !== r) {
488
- if (y) {
483
+ function v(C, y, x, T, O, E, R) {
484
+ if (T = T || m, E = E || x, R !== r) {
485
+ if (g) {
489
486
  var B = new Error(
490
487
  "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"
491
488
  );
492
489
  throw B.name = "Invariant Violation", B;
493
490
  } else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
494
- var Y = T + ":" + x;
495
- !l[Y] && // Avoid spamming the console because they are often not actionable except for lib authors
496
- j < 3 && (s(
491
+ var K = T + ":" + x;
492
+ !l[K] && // Avoid spamming the console because they are often not actionable except for lib authors
493
+ j < 3 && (o(
497
494
  "You are manually calling a React.PropTypes validation function for the `" + E + "` 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."
498
- ), l[Y] = !0, j++);
495
+ ), l[K] = !0, j++);
499
496
  }
500
497
  }
501
- return g[x] == null ? C ? g[x] === null ? new w("The " + D + " `" + E + "` is marked as required " + ("in `" + T + "`, but its value is `null`.")) : new w("The " + D + " `" + E + "` is marked as required in " + ("`" + T + "`, but its value is `undefined`.")) : null : o(g, x, T, D, E);
498
+ return y[x] == null ? C ? y[x] === null ? new w("The " + O + " `" + E + "` is marked as required " + ("in `" + T + "`, but its value is `null`.")) : new w("The " + O + " `" + E + "` is marked as required in " + ("`" + T + "`, but its value is `undefined`.")) : null : s(y, x, T, O, E);
502
499
  }
503
500
  var h = v.bind(null, !1);
504
501
  return h.isRequired = v.bind(null, !0), h;
505
502
  }
506
- function f(o) {
507
- function l(j, v, h, C, g, x) {
508
- var T = j[v], D = W(T);
509
- if (D !== o) {
503
+ function f(s) {
504
+ function l(j, v, h, C, y, x) {
505
+ var T = j[v], O = $(T);
506
+ if (O !== s) {
510
507
  var E = X(T);
511
508
  return new w(
512
- "Invalid " + C + " `" + g + "` of type " + ("`" + E + "` supplied to `" + h + "`, expected ") + ("`" + o + "`."),
513
- { expectedType: o }
509
+ "Invalid " + C + " `" + y + "` of type " + ("`" + E + "` supplied to `" + h + "`, expected ") + ("`" + s + "`."),
510
+ { expectedType: s }
514
511
  );
515
512
  }
516
513
  return null;
517
514
  }
518
515
  return S(l);
519
516
  }
520
- function F() {
517
+ function W() {
521
518
  return S(i);
522
519
  }
523
- function M(o) {
524
- function l(j, v, h, C, g) {
525
- if (typeof o != "function")
526
- return new w("Property `" + g + "` of component `" + h + "` has invalid PropType notation inside arrayOf.");
520
+ function M(s) {
521
+ function l(j, v, h, C, y) {
522
+ if (typeof s != "function")
523
+ return new w("Property `" + y + "` of component `" + h + "` has invalid PropType notation inside arrayOf.");
527
524
  var x = j[v];
528
525
  if (!Array.isArray(x)) {
529
- var T = W(x);
530
- return new w("Invalid " + C + " `" + g + "` of type " + ("`" + T + "` supplied to `" + h + "`, expected an array."));
526
+ var T = $(x);
527
+ return new w("Invalid " + C + " `" + y + "` of type " + ("`" + T + "` supplied to `" + h + "`, expected an array."));
531
528
  }
532
- for (var D = 0; D < x.length; D++) {
533
- var E = o(x, D, h, C, g + "[" + D + "]", r);
529
+ for (var O = 0; O < x.length; O++) {
530
+ var E = s(x, O, h, C, y + "[" + O + "]", r);
534
531
  if (E instanceof Error)
535
532
  return E;
536
533
  }
@@ -538,65 +535,65 @@ function Nn() {
538
535
  }
539
536
  return S(l);
540
537
  }
541
- function ne() {
542
- function o(l, j, v, h, C) {
543
- var g = l[j];
544
- if (!d(g)) {
545
- var x = W(g);
538
+ function re() {
539
+ function s(l, j, v, h, C) {
540
+ var y = l[j];
541
+ if (!p(y)) {
542
+ var x = $(y);
546
543
  return new w("Invalid " + h + " `" + C + "` of type " + ("`" + x + "` supplied to `" + v + "`, expected a single ReactElement."));
547
544
  }
548
545
  return null;
549
546
  }
550
- return S(o);
547
+ return S(s);
551
548
  }
552
- function re() {
553
- function o(l, j, v, h, C) {
554
- var g = l[j];
555
- if (!n.isValidElementType(g)) {
556
- var x = W(g);
549
+ function se() {
550
+ function s(l, j, v, h, C) {
551
+ var y = l[j];
552
+ if (!n.isValidElementType(y)) {
553
+ var x = $(y);
557
554
  return new w("Invalid " + h + " `" + C + "` of type " + ("`" + x + "` supplied to `" + v + "`, expected a single ReactElement type."));
558
555
  }
559
556
  return null;
560
557
  }
561
- return S(o);
558
+ return S(s);
562
559
  }
563
- function I(o) {
564
- function l(j, v, h, C, g) {
565
- if (!(j[v] instanceof o)) {
566
- var x = o.name || m, T = dt(j[v]);
567
- return new w("Invalid " + C + " `" + g + "` of type " + ("`" + T + "` supplied to `" + h + "`, expected ") + ("instance of `" + x + "`."));
560
+ function I(s) {
561
+ function l(j, v, h, C, y) {
562
+ if (!(j[v] instanceof s)) {
563
+ var x = s.name || m, T = it(j[v]);
564
+ return new w("Invalid " + C + " `" + y + "` of type " + ("`" + T + "` supplied to `" + h + "`, expected ") + ("instance of `" + x + "`."));
568
565
  }
569
566
  return null;
570
567
  }
571
568
  return S(l);
572
569
  }
573
- function N(o) {
574
- if (!Array.isArray(o))
575
- return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s(
570
+ function N(s) {
571
+ if (!Array.isArray(s))
572
+ return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
576
573
  "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])."
577
- ) : s("Invalid argument supplied to oneOf, expected an array.")), i;
578
- function l(j, v, h, C, g) {
579
- for (var x = j[v], T = 0; T < o.length; T++)
580
- if (O(x, o[T]))
574
+ ) : o("Invalid argument supplied to oneOf, expected an array.")), i;
575
+ function l(j, v, h, C, y) {
576
+ for (var x = j[v], T = 0; T < s.length; T++)
577
+ if (D(x, s[T]))
581
578
  return null;
582
- var D = JSON.stringify(o, function(_, B) {
583
- var Y = X(B);
584
- return Y === "symbol" ? String(B) : B;
579
+ var O = JSON.stringify(s, function(R, B) {
580
+ var K = X(B);
581
+ return K === "symbol" ? String(B) : B;
585
582
  });
586
- return new w("Invalid " + C + " `" + g + "` of value `" + String(x) + "` " + ("supplied to `" + h + "`, expected one of " + D + "."));
583
+ return new w("Invalid " + C + " `" + y + "` of value `" + String(x) + "` " + ("supplied to `" + h + "`, expected one of " + O + "."));
587
584
  }
588
585
  return S(l);
589
586
  }
590
- function L(o) {
591
- function l(j, v, h, C, g) {
592
- if (typeof o != "function")
593
- return new w("Property `" + g + "` of component `" + h + "` has invalid PropType notation inside objectOf.");
594
- var x = j[v], T = W(x);
587
+ function L(s) {
588
+ function l(j, v, h, C, y) {
589
+ if (typeof s != "function")
590
+ return new w("Property `" + y + "` of component `" + h + "` has invalid PropType notation inside objectOf.");
591
+ var x = j[v], T = $(x);
595
592
  if (T !== "object")
596
- return new w("Invalid " + C + " `" + g + "` of type " + ("`" + T + "` supplied to `" + h + "`, expected an object."));
597
- for (var D in x)
598
- if (a(x, D)) {
599
- var E = o(x, D, h, C, g + "." + D, r);
593
+ return new w("Invalid " + C + " `" + y + "` of type " + ("`" + T + "` supplied to `" + h + "`, expected an object."));
594
+ for (var O in x)
595
+ if (a(x, O)) {
596
+ var E = s(x, O, h, C, y + "." + O, r);
600
597
  if (E instanceof Error)
601
598
  return E;
602
599
  }
@@ -604,72 +601,72 @@ function Nn() {
604
601
  }
605
602
  return S(l);
606
603
  }
607
- function st(o) {
608
- if (!Array.isArray(o))
609
- return process.env.NODE_ENV !== "production" && s("Invalid argument supplied to oneOfType, expected an instance of array."), i;
610
- for (var l = 0; l < o.length; l++) {
611
- var j = o[l];
604
+ function et(s) {
605
+ if (!Array.isArray(s))
606
+ return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), i;
607
+ for (var l = 0; l < s.length; l++) {
608
+ var j = s[l];
612
609
  if (typeof j != "function")
613
- return s(
614
- "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ct(j) + " at index " + l + "."
610
+ return o(
611
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ot(j) + " at index " + l + "."
615
612
  ), i;
616
613
  }
617
- function v(h, C, g, x, T) {
618
- for (var D = [], E = 0; E < o.length; E++) {
619
- var _ = o[E], B = _(h, C, g, x, T, r);
614
+ function v(h, C, y, x, T) {
615
+ for (var O = [], E = 0; E < s.length; E++) {
616
+ var R = s[E], B = R(h, C, y, x, T, r);
620
617
  if (B == null)
621
618
  return null;
622
- B.data && a(B.data, "expectedType") && D.push(B.data.expectedType);
619
+ B.data && a(B.data, "expectedType") && O.push(B.data.expectedType);
623
620
  }
624
- var Y = D.length > 0 ? ", expected one of type [" + D.join(", ") + "]" : "";
625
- return new w("Invalid " + x + " `" + T + "` supplied to " + ("`" + g + "`" + Y + "."));
621
+ var K = O.length > 0 ? ", expected one of type [" + O.join(", ") + "]" : "";
622
+ return new w("Invalid " + x + " `" + T + "` supplied to " + ("`" + y + "`" + K + "."));
626
623
  }
627
624
  return S(v);
628
625
  }
629
- function ot() {
630
- function o(l, j, v, h, C) {
626
+ function tt() {
627
+ function s(l, j, v, h, C) {
631
628
  return Z(l[j]) ? null : new w("Invalid " + h + " `" + C + "` supplied to " + ("`" + v + "`, expected a ReactNode."));
632
629
  }
633
- return S(o);
630
+ return S(s);
634
631
  }
635
- function je(o, l, j, v, h) {
632
+ function be(s, l, j, v, h) {
636
633
  return new w(
637
- (o || "React class") + ": " + l + " type `" + j + "." + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + h + "`."
634
+ (s || "React class") + ": " + l + " type `" + j + "." + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + h + "`."
638
635
  );
639
636
  }
640
- function it(o) {
641
- function l(j, v, h, C, g) {
642
- var x = j[v], T = W(x);
637
+ function nt(s) {
638
+ function l(j, v, h, C, y) {
639
+ var x = j[v], T = $(x);
643
640
  if (T !== "object")
644
- return new w("Invalid " + C + " `" + g + "` of type `" + T + "` " + ("supplied to `" + h + "`, expected `object`."));
645
- for (var D in o) {
646
- var E = o[D];
641
+ return new w("Invalid " + C + " `" + y + "` of type `" + T + "` " + ("supplied to `" + h + "`, expected `object`."));
642
+ for (var O in s) {
643
+ var E = s[O];
647
644
  if (typeof E != "function")
648
- return je(h, C, g, D, X(E));
649
- var _ = E(x, D, h, C, g + "." + D, r);
650
- if (_)
651
- return _;
645
+ return be(h, C, y, O, X(E));
646
+ var R = E(x, O, h, C, y + "." + O, r);
647
+ if (R)
648
+ return R;
652
649
  }
653
650
  return null;
654
651
  }
655
652
  return S(l);
656
653
  }
657
- function at(o) {
658
- function l(j, v, h, C, g) {
659
- var x = j[v], T = W(x);
654
+ function rt(s) {
655
+ function l(j, v, h, C, y) {
656
+ var x = j[v], T = $(x);
660
657
  if (T !== "object")
661
- return new w("Invalid " + C + " `" + g + "` of type `" + T + "` " + ("supplied to `" + h + "`, expected `object`."));
662
- var D = t({}, j[v], o);
663
- for (var E in D) {
664
- var _ = o[E];
665
- if (a(o, E) && typeof _ != "function")
666
- return je(h, C, g, E, X(_));
667
- if (!_)
658
+ return new w("Invalid " + C + " `" + y + "` of type `" + T + "` " + ("supplied to `" + h + "`, expected `object`."));
659
+ var O = t({}, j[v], s);
660
+ for (var E in O) {
661
+ var R = s[E];
662
+ if (a(s, E) && typeof R != "function")
663
+ return be(h, C, y, E, X(R));
664
+ if (!R)
668
665
  return new w(
669
- "Invalid " + C + " `" + g + "` key `" + E + "` supplied to `" + h + "`.\nBad object: " + JSON.stringify(j[v], null, " ") + `
670
- Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
666
+ "Invalid " + C + " `" + y + "` key `" + E + "` supplied to `" + h + "`.\nBad object: " + JSON.stringify(j[v], null, " ") + `
667
+ Valid keys: ` + JSON.stringify(Object.keys(s), null, " ")
671
668
  );
672
- var B = _(x, E, h, C, g + "." + E, r);
669
+ var B = R(x, E, h, C, y + "." + E, r);
673
670
  if (B)
674
671
  return B;
675
672
  }
@@ -677,23 +674,23 @@ Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
677
674
  }
678
675
  return S(l);
679
676
  }
680
- function Z(o) {
681
- switch (typeof o) {
677
+ function Z(s) {
678
+ switch (typeof s) {
682
679
  case "number":
683
680
  case "string":
684
681
  case "undefined":
685
682
  return !0;
686
683
  case "boolean":
687
- return !o;
684
+ return !s;
688
685
  case "object":
689
- if (Array.isArray(o))
690
- return o.every(Z);
691
- if (o === null || d(o))
686
+ if (Array.isArray(s))
687
+ return s.every(Z);
688
+ if (s === null || p(s))
692
689
  return !0;
693
- var l = u(o);
690
+ var l = d(s);
694
691
  if (l) {
695
- var j = l.call(o), v;
696
- if (l !== o.entries) {
692
+ var j = l.call(s), v;
693
+ if (l !== s.entries) {
697
694
  for (; !(v = j.next()).done; )
698
695
  if (!Z(v.value))
699
696
  return !1;
@@ -710,27 +707,27 @@ Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
710
707
  return !1;
711
708
  }
712
709
  }
713
- function lt(o, l) {
714
- return o === "symbol" ? !0 : l ? l["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && l instanceof Symbol : !1;
710
+ function st(s, l) {
711
+ return s === "symbol" ? !0 : l ? l["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && l instanceof Symbol : !1;
715
712
  }
716
- function W(o) {
717
- var l = typeof o;
718
- return Array.isArray(o) ? "array" : o instanceof RegExp ? "object" : lt(l, o) ? "symbol" : l;
713
+ function $(s) {
714
+ var l = typeof s;
715
+ return Array.isArray(s) ? "array" : s instanceof RegExp ? "object" : st(l, s) ? "symbol" : l;
719
716
  }
720
- function X(o) {
721
- if (typeof o > "u" || o === null)
722
- return "" + o;
723
- var l = W(o);
717
+ function X(s) {
718
+ if (typeof s > "u" || s === null)
719
+ return "" + s;
720
+ var l = $(s);
724
721
  if (l === "object") {
725
- if (o instanceof Date)
722
+ if (s instanceof Date)
726
723
  return "date";
727
- if (o instanceof RegExp)
724
+ if (s instanceof RegExp)
728
725
  return "regexp";
729
726
  }
730
727
  return l;
731
728
  }
732
- function ct(o) {
733
- var l = X(o);
729
+ function ot(s) {
730
+ var l = X(s);
734
731
  switch (l) {
735
732
  case "array":
736
733
  case "object":
@@ -743,25 +740,25 @@ Valid keys: ` + JSON.stringify(Object.keys(o), null, " ")
743
740
  return l;
744
741
  }
745
742
  }
746
- function dt(o) {
747
- return !o.constructor || !o.constructor.name ? m : o.constructor.name;
743
+ function it(s) {
744
+ return !s.constructor || !s.constructor.name ? m : s.constructor.name;
748
745
  }
749
746
  return k.checkPropTypes = c, k.resetWarningCache = c.resetWarningCache, k.PropTypes = k, k;
750
- }, ce;
747
+ }, de;
751
748
  }
752
- var de, _e;
753
- function Ln() {
754
- if (_e)
755
- return de;
756
- _e = 1;
757
- var n = xe();
749
+ var ue, Re;
750
+ function _n() {
751
+ if (Re)
752
+ return ue;
753
+ Re = 1;
754
+ var n = ve();
758
755
  function t() {
759
756
  }
760
757
  function r() {
761
758
  }
762
- return r.resetWarningCache = t, de = function() {
763
- function a(i, d, y, b, p, u) {
764
- if (u !== n) {
759
+ return r.resetWarningCache = t, ue = function() {
760
+ function a(i, p, g, b, u, d) {
761
+ if (d !== n) {
765
762
  var m = new Error(
766
763
  "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"
767
764
  );
@@ -772,7 +769,7 @@ function Ln() {
772
769
  function c() {
773
770
  return a;
774
771
  }
775
- var s = {
772
+ var o = {
776
773
  array: a,
777
774
  bigint: a,
778
775
  bool: a,
@@ -795,21 +792,22 @@ function Ln() {
795
792
  checkPropTypes: r,
796
793
  resetWarningCache: t
797
794
  };
798
- return s.PropTypes = s, s;
799
- }, de;
795
+ return o.PropTypes = o, o;
796
+ }, ue;
800
797
  }
798
+ var as = ne.exports;
801
799
  if (process.env.NODE_ENV !== "production") {
802
- var Fn = qe, Wn = !0;
803
- pe.exports = Nn()(Fn.isElement, Wn);
800
+ var Mn = Ke, Nn = !0;
801
+ ne.exports = Rn()(Mn.isElement, Nn);
804
802
  } else
805
- pe.exports = Ln()();
806
- var $n = pe.exports;
807
- const P = /* @__PURE__ */ wn($n);
808
- let Qe, et;
809
- typeof document < "u" && (Qe = document);
810
- typeof window < "u" && (et = window);
811
- const tt = z.createContext({ document: Qe, window: et }), be = () => z.useContext(tt), { Provider: qn, Consumer: Gr } = tt;
812
- class nt extends Ne {
803
+ ne.exports = _n()();
804
+ var Ln = ne.exports;
805
+ const P = /* @__PURE__ */ un(Ln);
806
+ let Xe, Je;
807
+ typeof document < "u" && (Xe = document);
808
+ typeof window < "u" && (Je = window);
809
+ const Ze = z.createContext({ document: Xe, window: Je }), xe = () => z.useContext(Ze), { Provider: Wn, Consumer: ls } = Ze;
810
+ class Ge extends _e {
813
811
  componentDidMount() {
814
812
  this.props.contentDidMount();
815
813
  }
@@ -817,28 +815,28 @@ class nt extends Ne {
817
815
  this.props.contentDidUpdate();
818
816
  }
819
817
  render() {
820
- return ht.only(this.props.children);
818
+ return dt.only(this.props.children);
821
819
  }
822
820
  }
823
- U(nt, "propTypes", {
821
+ q(Ge, "propTypes", {
824
822
  children: P.element.isRequired,
825
823
  contentDidMount: P.func.isRequired,
826
824
  contentDidUpdate: P.func.isRequired
827
825
  });
828
- class fe extends Ne {
826
+ class pe extends _e {
829
827
  constructor(r, a) {
830
828
  super(r, a);
831
- U(this, "setRef", (r) => {
829
+ q(this, "setRef", (r) => {
832
830
  this.nodeRef.current = r;
833
831
  const { forwardedRef: a } = this.props;
834
832
  typeof a == "function" ? a(r) : a && (a.current = r);
835
833
  });
836
- U(this, "handleLoad", () => {
834
+ q(this, "handleLoad", () => {
837
835
  clearInterval(this.loadCheck), this.state.iframeLoaded || this.setState({ iframeLoaded: !0 });
838
836
  });
839
837
  // In certain situations on a cold cache DOMContentLoaded never gets called
840
838
  // fallback to an interval to check if that's the case
841
- U(this, "loadCheck", () => setInterval(() => {
839
+ q(this, "loadCheck", () => setInterval(() => {
842
840
  this.handleLoad();
843
841
  }, 500));
844
842
  this._isMounted = !1, this.nodeRef = z.createRef(), this.state = { iframeLoaded: !1 };
@@ -862,8 +860,8 @@ class fe extends Ne {
862
860
  const r = this.getDoc();
863
861
  if (!r)
864
862
  return null;
865
- const a = this.props.contentDidMount, c = this.props.contentDidUpdate, s = r.defaultView || r.parentView, i = /* @__PURE__ */ e.jsx(nt, { contentDidMount: a, contentDidUpdate: c, children: /* @__PURE__ */ e.jsx(qn, { value: { document: r, window: s }, children: /* @__PURE__ */ e.jsx("div", { className: "frame-content", children: this.props.children }) }) }), d = this.getMountTarget();
866
- return [Se.createPortal(this.props.head, this.getDoc().head), Se.createPortal(i, d)];
863
+ const a = this.props.contentDidMount, c = this.props.contentDidUpdate, o = r.defaultView || r.parentView, i = /* @__PURE__ */ e.jsx(Ge, { contentDidMount: a, contentDidUpdate: c, children: /* @__PURE__ */ e.jsx(Wn, { value: { document: r, window: o }, children: /* @__PURE__ */ e.jsx("div", { className: "frame-content", children: this.props.children }) }) }), p = this.getMountTarget();
864
+ return [Te.createPortal(this.props.head, this.getDoc().head), Te.createPortal(i, p)];
867
865
  }
868
866
  render() {
869
867
  const r = {
@@ -879,7 +877,7 @@ class fe extends Ne {
879
877
  // also inject into the body and can mess up React. For this reason
880
878
  // initialContent is expected to have a div inside of the body
881
879
  // element that we render react into.
882
- U(fe, "propTypes", {
880
+ q(pe, "propTypes", {
883
881
  style: P.object,
884
882
  // eslint-disable-line
885
883
  head: P.node,
@@ -888,7 +886,7 @@ U(fe, "propTypes", {
888
886
  contentDidMount: P.func,
889
887
  contentDidUpdate: P.func,
890
888
  children: P.oneOfType([P.element, P.arrayOf(P.element)])
891
- }), U(fe, "defaultProps", {
889
+ }), q(pe, "defaultProps", {
892
890
  style: {},
893
891
  head: null,
894
892
  children: void 0,
@@ -899,39 +897,39 @@ U(fe, "propTypes", {
899
897
  },
900
898
  initialContent: '<!DOCTYPE html><html><head></head><body><div class="frame-root"></div></body></html>'
901
899
  });
902
- const Un = z.forwardRef((n, t) => /* @__PURE__ */ e.jsx(fe, { ...n, forwardedRef: t })), zn = ({ children: n }) => {
903
- const { document: t } = be(), [r] = H(), [a, c] = K();
904
- return R(() => {
900
+ const $n = z.forwardRef((n, t) => /* @__PURE__ */ e.jsx(pe, { ...n, forwardedRef: t })), Fn = ({ children: n }) => {
901
+ const { document: t } = xe(), [r] = H(), [a, c] = Y();
902
+ return _(() => {
905
903
  setTimeout(() => {
906
- if (!q(a))
904
+ if (!U(a))
907
905
  return;
908
- const s = rt(t, ee(r));
909
- if (s) {
910
- const i = s.getAttribute("data-style-prop");
906
+ const o = Qe(t, ee(r));
907
+ if (o) {
908
+ const i = o.getAttribute("data-style-prop");
911
909
  if (i) {
912
- const d = s.getAttribute("data-style-id"), y = s.getAttribute("data-block-parent");
913
- c([{ id: d, prop: i, blockId: y }]);
910
+ const p = o.getAttribute("data-style-id"), g = o.getAttribute("data-block-parent");
911
+ c([{ id: p, prop: i, blockId: g }]);
914
912
  }
915
913
  }
916
914
  }, 100);
917
915
  }, [t, r, c, a]), /* @__PURE__ */ e.jsx("div", { id: "canvas", className: "relative h-screen max-w-full outline-2", children: n });
918
- }, rt = (n, t) => n.querySelector(`[data-block-id="${t}"]`), Hn = () => {
919
- const { window: n } = be(), [t, r] = H(), [, a] = K(), { undo: c, redo: s } = ye(), i = Ue(), [, d] = At(), [, y] = Bt(), { pasteBlocks: b } = Pt(), [, p] = ze(), u = He(), { savePage: m } = Rt(), [k] = J(_t), [, O] = J(Mt), w = (S) => {
920
- S.key === "Enter" && (S.preventDefault(), t.length === 1 && O(ee(t)));
916
+ }, Qe = (n, t) => n.querySelector(`[data-block-id="${t}"]`), Un = () => {
917
+ const { window: n } = xe(), [t, r] = H(), [, a] = Y(), { undo: c, redo: o } = me(), i = $e(), [, p] = Jt(), [, g] = Zt(), { pasteBlocks: b } = Gt(), [, u] = Fe(), d = Ue(), { savePage: m } = Qt(), [k] = J(en), [, D] = J(tn), w = (S) => {
918
+ S.key === "Enter" && (S.preventDefault(), t.length === 1 && D(ee(t)));
921
919
  };
922
- return R(() => {
920
+ return _(() => {
923
921
  const S = (f) => {
924
922
  if (f.key === "Escape") {
925
923
  r([]), a([]);
926
924
  return;
927
925
  }
928
- if (w(f), !k && (f.key === "Delete" || f.key === "Backspace") && (f.preventDefault(), u(t)), f.ctrlKey || f.metaKey) {
926
+ if (w(f), !k && (f.key === "Delete" || f.key === "Backspace") && (f.preventDefault(), d(t)), f.ctrlKey || f.metaKey) {
929
927
  if (["z", "y", "d", "x", "c", "p", "s", "v"].includes(f.key)) {
930
928
  if (k && ["x", "z", "v"].includes(f.key))
931
929
  return !0;
932
930
  f.preventDefault();
933
931
  }
934
- f.key === "s" && (f.stopPropagation(), f.preventDefault(), m()), f.key === "z" && c(), f.key === "y" && s(), f.key === "d" && i(t), f.key === "x" && d(t), f.key === "c" && y(t), f.key === "v" && t.length > 0 && b(t[0]);
932
+ f.key === "s" && (f.stopPropagation(), f.preventDefault(), m()), f.key === "z" && c(), f.key === "y" && o(), f.key === "d" && i(t), f.key === "x" && p(t), f.key === "c" && g(t), f.key === "v" && t.length > 0 && b(t[0]);
935
933
  }
936
934
  };
937
935
  return n.removeEventListener("keydown", S), n.addEventListener("keydown", S), () => {
@@ -941,19 +939,19 @@ const Un = z.forwardRef((n, t) => /* @__PURE__ */ e.jsx(fe, { ...n, forwardedRef
941
939
  t,
942
940
  r,
943
941
  c,
942
+ d,
944
943
  u,
945
- p,
946
- s,
944
+ o,
947
945
  i,
948
- d,
949
- y,
946
+ p,
947
+ g,
950
948
  b,
951
949
  k,
952
950
  m,
953
951
  n
954
952
  ]), null;
955
- }, Kn = ({ block: n, label: t }) => {
956
- const [, r] = mn(() => ({
953
+ }, qn = ({ block: n, label: t }) => {
954
+ const [, r] = vn(() => ({
957
955
  type: "CANVAS_BLOCK",
958
956
  item: n
959
957
  }));
@@ -966,73 +964,73 @@ const Un = z.forwardRef((n, t) => /* @__PURE__ */ e.jsx(fe, { ...n, forwardedRef
966
964
  console.log("drag start");
967
965
  },
968
966
  children: [
969
- /* @__PURE__ */ e.jsx(St, {}),
967
+ /* @__PURE__ */ e.jsx(kt, {}),
970
968
  t
971
969
  ]
972
970
  }
973
971
  );
974
- }, Yn = ({ selectedBlockElement: n, block: t }) => {
975
- const r = He(), a = Ue(), [, c] = H(), [, s] = K(), { floatingStyles: i, refs: d, update: y } = fn({
972
+ }, zn = ({ selectedBlockElement: n, block: t }) => {
973
+ const r = Ue(), a = $e(), [, c] = H(), [, o] = Y(), { floatingStyles: i, refs: p, update: g } = yn({
976
974
  placement: "top-start",
977
- middleware: [hn(), pn()],
975
+ middleware: [gn(), mn()],
978
976
  elements: {
979
977
  reference: n
980
978
  }
981
979
  });
982
- vn(n, () => y(), n !== null);
983
- const b = A(t, "_parent", null), p = q(A(t, "_name", "")) ? A(t, "_type", "") : A(t, "_name", "");
980
+ xn(n, () => g(), n !== null);
981
+ const b = A(t, "_parent", null), u = U(A(t, "_name", "")) ? A(t, "_type", "") : A(t, "_name", "");
984
982
  return !n || !t ? null : /* @__PURE__ */ e.jsxs(
985
983
  "div",
986
984
  {
987
985
  role: "button",
988
986
  tabIndex: 0,
989
- ref: d.setFloating,
987
+ ref: p.setFloating,
990
988
  style: i,
991
- onClick: (u) => {
992
- u.stopPropagation(), u.preventDefault();
989
+ onClick: (d) => {
990
+ d.stopPropagation(), d.preventDefault();
993
991
  },
994
- onKeyDown: (u) => u.stopPropagation(),
992
+ onKeyDown: (d) => d.stopPropagation(),
995
993
  className: "z-50 flex h-6 items-center bg-blue-500 py-2 text-xs text-white",
996
994
  children: [
997
- /* @__PURE__ */ e.jsx(Kn, { label: p, block: t }),
995
+ /* @__PURE__ */ e.jsx(qn, { label: u, block: t }),
998
996
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2 px-1 ", children: [
999
997
  b && /* @__PURE__ */ e.jsx(
1000
998
  Ct,
1001
999
  {
1002
1000
  className: "hover:scale-105 ",
1003
1001
  onClick: () => {
1004
- s([]), c([b]);
1002
+ o([]), c([b]);
1005
1003
  }
1006
1004
  }
1007
1005
  ),
1008
- yn(A(t, "_type", "")) ? /* @__PURE__ */ e.jsx(Tt, { className: "hover:scale-105 ", onClick: () => a([t == null ? void 0 : t._id]) }) : null,
1009
- gn(A(t, "_type", "")) ? /* @__PURE__ */ e.jsx(Et, { className: "hover:scale-105 ", onClick: () => r([t == null ? void 0 : t._id]) }) : null
1006
+ nn(A(t, "_type", "")) ? /* @__PURE__ */ e.jsx(Tt, { className: "hover:scale-105 ", onClick: () => a([t == null ? void 0 : t._id]) }) : null,
1007
+ rn(A(t, "_type", "")) ? /* @__PURE__ */ e.jsx(Et, { className: "hover:scale-105 ", onClick: () => r([t == null ? void 0 : t._id]) }) : null
1010
1008
  ] })
1011
1009
  ]
1012
1010
  }
1013
1011
  );
1014
- }, Vn = ({ model: n }) => {
1015
- const [t] = Nt(), [r] = H(), [a] = Ye(), [c] = ge(), [s] = K(), { document: i, window: d } = be(), [y] = $(i == null ? void 0 : i.getElementById("highlighted-block")), [b] = $(
1012
+ }, Hn = ({ model: n }) => {
1013
+ const [t] = sn(), [r] = H(), [a] = Le(), [c] = ge(), [o] = Y(), { document: i, window: p } = xe(), [g] = F(i == null ? void 0 : i.getElementById("highlighted-block")), [b] = F(
1016
1014
  i == null ? void 0 : i.getElementById("selected-block")
1017
- ), [p] = $(
1015
+ ), [u] = F(
1018
1016
  i == null ? void 0 : i.getElementById("selected-styling-block")
1019
1017
  );
1020
- R(() => {
1018
+ _(() => {
1021
1019
  a ? i == null || i.documentElement.classList.add("dark") : i == null || i.documentElement.classList.remove("dark");
1022
1020
  }, [a, i]);
1023
- const u = A(t, "headingFont", "DM Sans"), m = A(t, "bodyFont", "DM Sans");
1024
- return R(() => {
1025
- const k = A(t, "primaryColor", "#000"), O = A(t, "secondaryColor", "#FFF"), w = xn({
1026
- colors: [k, O],
1021
+ const d = A(t, "headingFont", "DM Sans"), m = A(t, "bodyFont", "DM Sans");
1022
+ return _(() => {
1023
+ const k = A(t, "primaryColor", "#000"), D = A(t, "secondaryColor", "#FFF"), w = bn({
1024
+ colors: [k, D],
1027
1025
  names: ["primary", "secondary"]
1028
1026
  });
1029
- w.primary.DEFAULT = k, w.secondary.DEFAULT = O;
1027
+ w.primary.DEFAULT = k, w.secondary.DEFAULT = D;
1030
1028
  const S = A(t, "roundedCorners", "0");
1031
- !d || !d.tailwind || (d.tailwind.config = {
1029
+ !p || !p.tailwind || (p.tailwind.config = {
1032
1030
  darkMode: "class",
1033
1031
  theme: {
1034
1032
  fontFamily: {
1035
- heading: [u],
1033
+ heading: [d],
1036
1034
  body: [m]
1037
1035
  },
1038
1036
  extend: {
@@ -1044,48 +1042,48 @@ const Un = z.forwardRef((n, t) => /* @__PURE__ */ e.jsx(fe, { ...n, forwardedRef
1044
1042
  },
1045
1043
  plugins: [
1046
1044
  // @ts-ignore
1047
- d.tailwind.plugin.withOptions(({ prefix: f = "ui" } = {}) => ({ addVariant: F }) => {
1045
+ p.tailwind.plugin.withOptions(({ prefix: f = "ui" } = {}) => ({ addVariant: W }) => {
1048
1046
  for (const M of ["open", "checked", "selected", "active", "disabled"])
1049
- F(`${f}-${M}`, [
1047
+ W(`${f}-${M}`, [
1050
1048
  `&[data-headlessui-state~="${M}"]`,
1051
1049
  `:where([data-headlessui-state~="${M}"]) &`
1052
- ]), F(`${f}-not-${M}`, [
1050
+ ]), W(`${f}-not-${M}`, [
1053
1051
  `&[data-headlessui-state]:not([data-headlessui-state~="${M}"])`,
1054
1052
  `:where([data-headlessui-state]:not([data-headlessui-state~="${M}"])) &:not([data-headlessui-state])`
1055
1053
  ]);
1056
1054
  })
1057
1055
  ]
1058
1056
  });
1059
- }, [t, d, u, m]), R(() => {
1057
+ }, [t, p, d, m]), _(() => {
1060
1058
  b && (b.textContent = `${Q(r, (k) => `[data-block-id="${k}"]`).join(",")}{
1061
1059
  outline: 1px solid ${r.length === 1 ? "#42a1fc" : "orange"} !important; outline-offset: -1px;
1062
1060
  }`);
1063
- }, [r, b]), R(() => {
1064
- y && (y.textContent = c ? `[data-style-id="${c}"]{ outline: 1px solid orange !important; outline-offset: -1px;}` : "");
1065
- }, [c, r, y]), R(() => {
1066
- p && (p.textContent = `${Q(s, ({ id: k }) => `[data-style-id="${k}"]`).join(",")}{
1061
+ }, [r, b]), _(() => {
1062
+ g && (g.textContent = c ? `[data-style-id="${c}"]{ outline: 1px solid orange !important; outline-offset: -1px;}` : "");
1063
+ }, [c, r, g]), _(() => {
1064
+ u && (u.textContent = `${Q(o, ({ id: k }) => `[data-style-id="${k}"]`).join(",")}{
1067
1065
  outline: 1px solid orange !important; outline-offset: -1px;
1068
1066
  }`);
1069
- }, [s, p]), R(() => {
1067
+ }, [o, u]), _(() => {
1070
1068
  if (n === "section")
1071
1069
  return;
1072
- const k = A(t, "bodyTextLightColor", "#64748b"), O = A(t, "bodyTextDarkColor", "#94a3b8"), w = A(t, "bodyBgLightColor", "#FFFFFF"), S = A(t, "bodyBgDarkColor", "#0f172a");
1073
- i.body.className = `font-body antialiased text-[${k}] bg-[${w}] dark:text-[${O}] dark:bg-[${S}]`;
1070
+ const k = A(t, "bodyTextLightColor", "#64748b"), D = A(t, "bodyTextDarkColor", "#94a3b8"), w = A(t, "bodyBgLightColor", "#FFFFFF"), S = A(t, "bodyBgDarkColor", "#0f172a");
1071
+ i.body.className = `font-body antialiased text-[${k}] bg-[${w}] dark:text-[${D}] dark:bg-[${S}]`;
1074
1072
  }, [t, i, n]), n === "page" ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1075
- u && /* @__PURE__ */ e.jsx(
1073
+ d && /* @__PURE__ */ e.jsx(
1076
1074
  "link",
1077
1075
  {
1078
1076
  id: "heading-font",
1079
1077
  rel: "stylesheet",
1080
1078
  type: "text/css",
1081
- href: `https://fonts.googleapis.com/css2?family=${u.replace(
1079
+ href: `https://fonts.googleapis.com/css2?family=${d.replace(
1082
1080
  / /g,
1083
1081
  "+"
1084
1082
  )}:wght@300;400;500;600;700;800;900&display=swap`,
1085
1083
  media: "all"
1086
1084
  }
1087
1085
  ),
1088
- m && u !== m && /* @__PURE__ */ e.jsx(
1086
+ m && d !== m && /* @__PURE__ */ e.jsx(
1089
1087
  "link",
1090
1088
  {
1091
1089
  id: "body-font",
@@ -1098,125 +1096,125 @@ const Un = z.forwardRef((n, t) => /* @__PURE__ */ e.jsx(fe, { ...n, forwardedRef
1098
1096
  media: "all"
1099
1097
  }
1100
1098
  ),
1101
- u && /* @__PURE__ */ e.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${u}",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";}` })
1099
+ d && /* @__PURE__ */ e.jsx("style", { children: `h1,h2,h3,h4,h5,h6{font-family: "${d}",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";}` })
1102
1100
  ] }) : null;
1103
- }, Xn = () => {
1104
- const { t: n } = Ke();
1101
+ }, Yn = () => {
1102
+ const { t: n } = He();
1105
1103
  return /* @__PURE__ */ e.jsx("div", { className: "my-auto py-24 text-center text-gray-600 dark:text-white", children: /* @__PURE__ */ e.jsx("h1", { className: "mb-10 text-4xl ", children: n("canvas_empty") }) });
1106
- }, Jn = (n) => {
1104
+ }, Kn = (n) => {
1107
1105
  const t = {};
1108
1106
  return Object.keys(n).forEach((r) => {
1109
- me(n[r]) && n[r].startsWith(Ee) && (t[r] = n[r].replace(Ee, "").split(","));
1107
+ he(n[r]) && n[r].startsWith(Ee) && (t[r] = n[r].replace(Ee, "").split(","));
1110
1108
  }), t;
1111
- }, Zn = gt((n) => {
1112
- const t = n.replace(Je, "").split(",");
1113
- return jn(t[0], t[1]);
1109
+ }, Vn = ht((n) => {
1110
+ const t = n.replace(Ye, "").split(",");
1111
+ return wn(t[0], t[1]);
1114
1112
  });
1115
- function Gn(n, t) {
1113
+ function Xn(n, t) {
1116
1114
  return A(n, `${t}_attrs`, {});
1117
1115
  }
1118
- function Qn(n, t, r, a) {
1116
+ function Jn(n, t, r, a) {
1119
1117
  const c = {};
1120
- return Object.keys(n).forEach((s) => {
1121
- if (me(n[s]) && n[s].startsWith(Je)) {
1122
- const i = Zn(n[s]);
1123
- c[s] = {
1118
+ return Object.keys(n).forEach((o) => {
1119
+ if (he(n[o]) && n[o].startsWith(Ye)) {
1120
+ const i = Vn(n[o]);
1121
+ c[o] = {
1124
1122
  className: i,
1125
- "data-style-prop": s,
1123
+ "data-style-prop": o,
1126
1124
  "data-block-parent": n._id,
1127
- "data-style-id": `${s}-${n._id}`,
1125
+ "data-style-id": `${o}-${n._id}`,
1128
1126
  onMouseEnter: t,
1129
1127
  onMouseLeave: r,
1130
1128
  onClick: a,
1131
- ...Gn(n, s)
1129
+ ...Xn(n, o)
1132
1130
  };
1133
1131
  }
1134
1132
  }), c;
1135
1133
  }
1136
- function er(n, t) {
1134
+ function Zn(n, t) {
1137
1135
  const r = A(n, "_bindings", {});
1138
- return q(r) ? { ...n } : (ue(r, (a, c) => {
1139
- me(a) && A(t, a, null) && (n[c] = A(t, a, null));
1136
+ return U(r) ? { ...n } : (mt(r, (a, c) => {
1137
+ he(a) && A(t, a, null) && (n[c] = A(t, a, null));
1140
1138
  }), n);
1141
1139
  }
1142
- function he({ blocks: n }) {
1143
- const t = Xe(), [, r] = ge(), [, a] = K(), [, c] = H(), s = V(
1144
- (p) => {
1140
+ function fe({ blocks: n }) {
1141
+ const t = qe(), [, r] = ge(), [, a] = Y(), [, c] = H(), o = V(
1142
+ (u) => {
1145
1143
  var m;
1146
- const u = (m = p.currentTarget) == null ? void 0 : m.getAttribute("data-style-id");
1147
- r(u || ""), p.stopPropagation();
1144
+ const d = (m = u.currentTarget) == null ? void 0 : m.getAttribute("data-style-id");
1145
+ r(d || ""), u.stopPropagation();
1148
1146
  },
1149
1147
  [r]
1150
1148
  ), i = V(
1151
- (p) => {
1152
- r(""), p.stopPropagation();
1149
+ (u) => {
1150
+ r(""), u.stopPropagation();
1153
1151
  },
1154
1152
  [r]
1155
- ), d = V(
1156
- (p) => {
1157
- p.stopPropagation();
1158
- const u = p.currentTarget;
1159
- if (u.getAttribute("data-block-parent")) {
1160
- const m = u.getAttribute("data-style-prop"), k = u.getAttribute("data-style-id"), O = u.getAttribute("data-block-parent");
1161
- a([{ id: k, prop: m, blockId: O }]), c([O]);
1162
- } else if (u.getAttribute("data-block-id") && (c([u.getAttribute("data-block-id")]), u.getAttribute("data-block-parent"))) {
1163
- const m = u.getAttribute("data-style-prop"), k = u.getAttribute("data-style-id"), O = u.getAttribute("data-block-parent");
1164
- a([{ id: k, prop: m, blockId: O }]);
1153
+ ), p = V(
1154
+ (u) => {
1155
+ u.stopPropagation();
1156
+ const d = u.currentTarget;
1157
+ if (d.getAttribute("data-block-parent")) {
1158
+ const m = d.getAttribute("data-style-prop"), k = d.getAttribute("data-style-id"), D = d.getAttribute("data-block-parent");
1159
+ a([{ id: k, prop: m, blockId: D }]), c([D]);
1160
+ } else if (d.getAttribute("data-block-id") && (c([d.getAttribute("data-block-id")]), d.getAttribute("data-block-parent"))) {
1161
+ const m = d.getAttribute("data-style-prop"), k = d.getAttribute("data-style-id"), D = d.getAttribute("data-block-parent");
1162
+ a([{ id: k, prop: m, blockId: D }]);
1165
1163
  }
1166
1164
  },
1167
1165
  [a, c]
1168
- ), y = V(
1169
- (p) => Qn(p, s, i, d),
1170
- [d, s, i]
1171
- ), [b] = Ze();
1166
+ ), g = V(
1167
+ (u) => Jn(u, o, i, p),
1168
+ [p, o, i]
1169
+ ), [b] = pn();
1172
1170
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: z.Children.toArray(
1173
- n.map((p, u) => {
1174
- const m = Jn(p), k = {};
1175
- q(m) || Object.keys(m).forEach((f) => {
1171
+ n.map((u, d) => {
1172
+ const m = Kn(u), k = {};
1173
+ U(m) || Object.keys(m).forEach((f) => {
1176
1174
  k[f] = z.Children.toArray(
1177
- m[f].map((F) => /* @__PURE__ */ e.jsx(he, { blocks: [Fe(t, { _id: F })] }))
1175
+ m[f].map((W) => /* @__PURE__ */ e.jsx(fe, { blocks: [yt(t, { _id: W })] }))
1178
1176
  );
1179
1177
  });
1180
- const O = We(t, { _parent: p._id });
1181
- k.children = O.length ? /* @__PURE__ */ e.jsx(he, { blocks: O }) : null;
1182
- const w = Cn(p._type), S = A(w, "component", null);
1183
- return vt(S) ? /* @__PURE__ */ e.jsx("noscript", { children: `<!-- ${p == null ? void 0 : p._type} not registered -->` }) : /* @__PURE__ */ e.jsx(Le, { children: z.createElement(S, {
1178
+ const D = Ne(t, { _parent: u._id });
1179
+ k.children = D.length ? /* @__PURE__ */ e.jsx(fe, { blocks: D }) : null;
1180
+ const w = kn(u._type), S = A(w, "component", null);
1181
+ return gt(S) ? /* @__PURE__ */ e.jsx("noscript", { children: `<!-- ${u == null ? void 0 : u._type} not registered -->` }) : /* @__PURE__ */ e.jsx(Me, { children: z.createElement(S, {
1184
1182
  blockProps: {
1185
- onClick: d,
1186
- "data-block-id": p._id,
1187
- "data-block-type": p._type
1183
+ onClick: p,
1184
+ "data-block-id": u._id,
1185
+ "data-block-type": u._type
1188
1186
  },
1189
1187
  inBuilder: !0,
1190
- index: u,
1191
- ...er(p, b),
1192
- ...y(p),
1188
+ index: d,
1189
+ ...Zn(u, b),
1190
+ ...g(u),
1193
1191
  ...k
1194
1192
  }) });
1195
1193
  })
1196
1194
  ) });
1197
1195
  }
1198
- const tr = () => {
1199
- const n = Xe();
1200
- return /* @__PURE__ */ e.jsx(bn, { children: q(n) ? /* @__PURE__ */ e.jsx(Xn, {}) : /* @__PURE__ */ e.jsx(En, { children: /* @__PURE__ */ e.jsx(he, { blocks: We(n, (t) => q(t._parent)) }) }) });
1201
- }, nr = (n, t) => n.querySelector(`[data-style-id="${t}"]`), rr = () => {
1202
- const [n] = J(Lt), [t] = ze(), [r] = ve(), [, a] = H(), c = Ft(), [, s] = ge(), i = we(null), d = we(null), [y, b] = $({ width: 0, height: 0 }), p = Rn(y), [u, m] = $(0), [k, O] = $([]), [, w] = $([]), [, S] = J(Wt), [f, F] = K(), M = Dt("loadingCanvas", !1);
1203
- R(() => {
1204
- const { clientWidth: I, clientHeight: N } = d.current;
1205
- b({ width: I, height: N }), u === 0 && m(I);
1206
- }, [d, r, u]);
1207
- const ne = (I, N = 0) => {
1196
+ const Gn = () => {
1197
+ const n = qe();
1198
+ return /* @__PURE__ */ e.jsx(jn, { children: U(n) ? /* @__PURE__ */ e.jsx(Yn, {}) : /* @__PURE__ */ e.jsx(fn, { children: /* @__PURE__ */ e.jsx(fe, { blocks: Ne(n, (t) => U(t._parent)) }) }) });
1199
+ }, Qn = (n, t) => n.querySelector(`[data-style-id="${t}"]`), er = () => {
1200
+ const [n] = J(on), [t] = Fe(), [r] = ye(), [, a] = H(), c = an(), [, o] = ge(), i = je(null), p = je(null), [g, b] = F({ width: 0, height: 0 }), u = An(g), [d, m] = F(0), [k, D] = F([]), [, w] = F([]), [, S] = J(ln), [f, W] = Y(), M = cn("loadingCanvas", !1);
1201
+ _(() => {
1202
+ const { clientWidth: I, clientHeight: N } = p.current;
1203
+ b({ width: I, height: N }), d === 0 && m(I);
1204
+ }, [p, r, d]);
1205
+ const re = (I, N = 0) => {
1208
1206
  const { top: L } = I.getBoundingClientRect();
1209
1207
  return L + N >= 0 && L - N <= window.innerHeight;
1210
1208
  };
1211
- R(() => {
1209
+ _(() => {
1212
1210
  var I, N;
1213
1211
  if (c && c.type !== "Multiple" && i.current) {
1214
- const L = rt(i.current.contentDocument, c._id);
1215
- L && (ne(L) || (N = (I = i.current) == null ? void 0 : I.contentWindow) == null || N.scrollTo({ top: L.offsetTop, behavior: "smooth" }), O([L]));
1212
+ const L = Qe(i.current.contentDocument, c._id);
1213
+ L && (re(L) || (N = (I = i.current) == null ? void 0 : I.contentWindow) == null || N.scrollTo({ top: L.offsetTop, behavior: "smooth" }), D([L]));
1216
1214
  }
1217
- }, [c]), R(() => {
1218
- if (!q(f) && i.current) {
1219
- const I = nr(
1215
+ }, [c]), _(() => {
1216
+ if (!U(f) && i.current) {
1217
+ const I = Qn(
1220
1218
  i.current.contentDocument,
1221
1219
  ee(f).id
1222
1220
  );
@@ -1224,8 +1222,8 @@ const tr = () => {
1224
1222
  } else
1225
1223
  w([null]);
1226
1224
  }, [f]);
1227
- const re = Me(() => {
1228
- let I = Pn;
1225
+ const se = ut(() => {
1226
+ let I = In;
1229
1227
  return n === "offline" && (I = I.replace(
1230
1228
  "https://old.chaibuilder.com/offline/tailwind.cdn.js",
1231
1229
  "/offline/tailwind.cdn.js"
@@ -1235,33 +1233,33 @@ const tr = () => {
1235
1233
  "div",
1236
1234
  {
1237
1235
  onClick: () => {
1238
- a([]), F([]);
1236
+ a([]), W([]);
1239
1237
  },
1240
- onMouseLeave: () => setTimeout(() => s(""), 300),
1238
+ onMouseLeave: () => setTimeout(() => o(""), 300),
1241
1239
  className: "relative mx-auto h-full w-full",
1242
- style: u > 0 && !q(p) ? { width: t ? "100%" : u } : {},
1243
- ref: d,
1240
+ style: d > 0 && !U(u) ? { width: t ? "100%" : d } : {},
1241
+ ref: p,
1244
1242
  children: /* @__PURE__ */ e.jsxs(
1245
- Un,
1243
+ $n,
1246
1244
  {
1247
1245
  contentDidMount: () => S(i.current),
1248
1246
  ref: i,
1249
1247
  id: "canvas-iframe",
1250
- style: { width: `${r}px`, ...p },
1248
+ style: { width: `${r}px`, ...u },
1251
1249
  className: "relative mx-auto box-content h-full max-w-full shadow-md transition-all duration-300 ease-linear",
1252
- initialContent: re,
1250
+ initialContent: se,
1253
1251
  children: [
1254
- /* @__PURE__ */ e.jsx(Hn, {}),
1252
+ /* @__PURE__ */ e.jsx(Un, {}),
1255
1253
  /* @__PURE__ */ e.jsx(
1256
- Yn,
1254
+ zn,
1257
1255
  {
1258
1256
  block: c,
1259
1257
  selectedBlockElement: ee(k)
1260
1258
  }
1261
1259
  ),
1262
- /* @__PURE__ */ e.jsx(Vn, { model: "page" }),
1263
- /* @__PURE__ */ e.jsxs(zn, { children: [
1264
- M ? /* @__PURE__ */ e.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ e.jsx($e, { className: "h-full" }) }) : /* @__PURE__ */ e.jsx(tr, {}),
1260
+ /* @__PURE__ */ e.jsx(Hn, { model: "page" }),
1261
+ /* @__PURE__ */ e.jsxs(Fn, { children: [
1262
+ M ? /* @__PURE__ */ e.jsx("div", { className: "h-full p-4", children: /* @__PURE__ */ e.jsx(ze, { className: "h-full" }) }) : /* @__PURE__ */ e.jsx(Gn, {}),
1265
1263
  /* @__PURE__ */ e.jsx("div", { className: "h-60" })
1266
1264
  ] })
1267
1265
  ]
@@ -1269,12 +1267,12 @@ const tr = () => {
1269
1267
  )
1270
1268
  }
1271
1269
  );
1272
- }, sr = mt(() => import("./AddBlocks-H7BZYHUC.js")), Qr = () => {
1273
- const [n, t] = J($t);
1270
+ }, tr = pt(() => import("./AddBlocks-eoo1CzaK.js")), cs = () => {
1271
+ const [n, t] = J(dn);
1274
1272
  return /* @__PURE__ */ e.jsxs("div", { className: "flex h-full w-full flex-col", children: [
1275
- /* @__PURE__ */ e.jsx(Bn, {}),
1273
+ /* @__PURE__ */ e.jsx(Dn, {}),
1276
1274
  /* @__PURE__ */ e.jsxs("div", { className: "relative flex-1 overflow-hidden bg-slate-800/80 px-2 bg-[linear-gradient(to_right,#EEE_0.5px,transparent_0.5px),linear-gradient(to_bottom,#EEE_0.5px,transparent_0.5px)] bg-[size:12px_12px]", children: [
1277
- /* @__PURE__ */ e.jsx(Le, { fallback: /* @__PURE__ */ e.jsx($e, { className: "h-full" }), children: /* @__PURE__ */ e.jsx(qt, { children: /* @__PURE__ */ e.jsx(rr, {}) }) }),
1275
+ /* @__PURE__ */ e.jsx(Me, { fallback: /* @__PURE__ */ e.jsx(ze, { className: "h-full" }), children: /* @__PURE__ */ e.jsx(hn, { children: /* @__PURE__ */ e.jsx(er, {}) }) }),
1278
1276
  n ? /* @__PURE__ */ e.jsx(
1279
1277
  "div",
1280
1278
  {
@@ -1285,7 +1283,7 @@ const tr = () => {
1285
1283
  {
1286
1284
  onClick: (r) => r.stopPropagation(),
1287
1285
  className: "mx-auto h-[90%] w-[90%] max-w-3xl rounded-md bg-white p-4 shadow-lg shadow-black/10 xl:w-[65%]",
1288
- children: /* @__PURE__ */ e.jsx(sr, {})
1286
+ children: /* @__PURE__ */ e.jsx(tr, {})
1289
1287
  }
1290
1288
  )
1291
1289
  }
@@ -1294,5 +1292,5 @@ const tr = () => {
1294
1292
  ] });
1295
1293
  };
1296
1294
  export {
1297
- Qr as default
1295
+ cs as default
1298
1296
  };