@chaibuilder/sdk 1.1.7 → 1.1.9

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