@chaibuilder/sdk 4.0.0-beta.23 → 4.0.0-beta.25

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 (127) hide show
  1. package/dist/{2SSKDMRQ-SUA5eA2S.js → 2SSKDMRQ-Bk_4y8lw.js} +2 -2
  2. package/dist/{2SSKDMRQ-DVWVGtU8.cjs → 2SSKDMRQ-vWeQ_IyI.cjs} +1 -1
  3. package/dist/{AP7HFJJL-CUN5zddU.cjs → AP7HFJJL-CMPLeI6t.cjs} +1 -1
  4. package/dist/{AP7HFJJL-Co5bLh3I.js → AP7HFJJL-D_mI2XSw.js} +1 -1
  5. package/dist/{IconPicker-Bmz6vXB8.cjs → IconPicker-DB_PpKvH.cjs} +1 -1
  6. package/dist/{IconPicker-BZvFj3cg.js → IconPicker-jc6_JzXf.js} +1 -1
  7. package/dist/{WDYDFRGG-DjCIT9L-.js → WDYDFRGG-B4H3RPcp.js} +2 -2
  8. package/dist/{WDYDFRGG-BpSteEEf.cjs → WDYDFRGG-D7vzbPjk.cjs} +1 -1
  9. package/dist/{active-in-another-tab-DfRJcvAz.js → active-in-another-tab-CDhFxBU7.js} +2 -2
  10. package/dist/{active-in-another-tab-C8-vpt8f.cjs → active-in-another-tab-CMPHyyHE.cjs} +1 -1
  11. package/dist/{add-new-language-page-jZ7Pg0Fv.js → add-new-language-page-BliZ46WW.js} +3 -3
  12. package/dist/{add-new-language-page-B2BEmfil.cjs → add-new-language-page-IbMzbf4v.cjs} +1 -1
  13. package/dist/{add-new-page-DbEBB3w7.cjs → add-new-page-BJJqSKp0.cjs} +1 -1
  14. package/dist/{add-new-page-YZF_XF8X.js → add-new-page-DUCKfyWo.js} +2 -2
  15. package/dist/{ai-panel-content-Bf_ojKwt.cjs → ai-panel-content-DWOqjq3Z.cjs} +1 -1
  16. package/dist/{ai-panel-content-C8ecaQnv.js → ai-panel-content-GeQIaXy8.js} +3 -3
  17. package/dist/{ai-panel-default-lang-DokOmE_Q.cjs → ai-panel-default-lang-DGNDrfam.cjs} +2 -2
  18. package/dist/{ai-panel-default-lang-BC8Gq_jl.js → ai-panel-default-lang-VQsV6KB3.js} +3 -3
  19. package/dist/{ai-panel-other-lang-Ccx1t8pp.cjs → ai-panel-other-lang-DvXF0Nn5.cjs} +1 -1
  20. package/dist/{ai-panel-other-lang-BJ30SL7z.js → ai-panel-other-lang-SuC8jyfr.js} +3 -3
  21. package/dist/{ai-prompt-input-SfeB6a2j.js → ai-prompt-input-CB6iQAmE.js} +1 -1
  22. package/dist/{ai-prompt-input-ED14e6NE.cjs → ai-prompt-input-a8s-JrZb.cjs} +1 -1
  23. package/dist/{ai-translation-prompt-BRRzei71.js → ai-translation-prompt-CoNVDclG.js} +1 -1
  24. package/dist/{ai-translation-prompt-spS-OC6L.cjs → ai-translation-prompt-Qn1Sz4BI.cjs} +1 -1
  25. package/dist/change-password-modal-BtdsU0mm.cjs +1 -0
  26. package/dist/change-password-modal-CMEo8lEm.js +137 -0
  27. package/dist/{code-editor-CYiIxUKp.js → code-editor-CTMQr0aU.js} +1 -1
  28. package/dist/{code-editor-CIqswl5j.cjs → code-editor-CjatfjZe.cjs} +1 -1
  29. package/dist/{continue-editing-in-this-client-B3CnmiZ2.cjs → continue-editing-in-this-client-7swLl0kq.cjs} +1 -1
  30. package/dist/{continue-editing-in-this-client-vICoETHN.js → continue-editing-in-this-client-CNVJZvXQ.js} +2 -2
  31. package/dist/core.cjs +1 -1
  32. package/dist/core.d.ts +1 -0
  33. package/dist/core.js +1 -1
  34. package/dist/{css-import-modal-DautOct0.js → css-import-modal-B3XY8Hzw.js} +1 -1
  35. package/dist/{css-import-modal-CHFZPXXQ.cjs → css-import-modal-D2RqE-V0.cjs} +1 -1
  36. package/dist/{delete-design-token-BmWHk_Ap.js → delete-design-token-DEyYFVHU.js} +1 -1
  37. package/dist/{delete-design-token-D-wGR5qS.cjs → delete-design-token-Dd3b86G7.cjs} +1 -1
  38. package/dist/{delete-page-Dlv8srng.js → delete-page-BSn5mRvk.js} +2 -2
  39. package/dist/{delete-page-D5mzl-ET.cjs → delete-page-BfsmsTek.cjs} +1 -1
  40. package/dist/{design-token-usage-DIszlgJK.cjs → design-token-usage-BY8meqAt.cjs} +1 -1
  41. package/dist/{design-token-usage-hl29qR_q.js → design-token-usage-f20BdlHE.js} +1 -1
  42. package/dist/{digital-asset-manager-v2LfDXwR.cjs → digital-asset-manager-Pi0YiB35.cjs} +1 -1
  43. package/dist/{digital-asset-manager-o_bNl9qj.js → digital-asset-manager-iXt27NlP.js} +3 -3
  44. package/dist/{duplicate-page-BjqgghN0.js → duplicate-page-BuVub6uY.js} +3 -3
  45. package/dist/{duplicate-page-CEuF8dll.cjs → duplicate-page-g5hiQkrZ.cjs} +1 -1
  46. package/dist/{dynamic-page-selector-BWC7kHJ1.js → dynamic-page-selector-NZ-rKLo3.js} +2 -2
  47. package/dist/{dynamic-page-selector-D4EWs4Qd.cjs → dynamic-page-selector-z6UGEjk1.cjs} +1 -1
  48. package/dist/{get-chai-builder-theme-DDVRJQ6Z.js → get-chai-builder-theme-CHXhAcdV.js} +1 -1
  49. package/dist/{get-chai-builder-theme-BApShjRz.cjs → get-chai-builder-theme-CMypjJk8.cjs} +1 -1
  50. package/dist/{image-editor-B1-bjvPd.js → image-editor--WT9183_.js} +1 -1
  51. package/dist/{image-editor-2h5axNuk.cjs → image-editor-C6cZZNbB.cjs} +1 -1
  52. package/dist/index-BGGNVIKx.cjs +5 -0
  53. package/dist/{index-DWGTiEak.cjs → index-CfsIhbT2.cjs} +11 -11
  54. package/dist/{index-BvluH-oT.js → index-ckjNCVor.js} +990 -978
  55. package/dist/{index-BN6yEl-H.js → index-iRqgNs2O.js} +897 -891
  56. package/dist/{json-diff-viewer-WX0GIjq-.js → json-diff-viewer-DAQ-qSHk.js} +2 -2
  57. package/dist/{json-diff-viewer-BjCIlzd7.cjs → json-diff-viewer-DheqS084.cjs} +1 -1
  58. package/dist/{lang-panel-C4x7bcyb.js → lang-panel-DRDPvY1i.js} +3 -3
  59. package/dist/{lang-panel--yfjRDE2.cjs → lang-panel-oLc-QyU4.cjs} +1 -1
  60. package/dist/{manage-design-tokens-DhdwhzQu.cjs → manage-design-tokens-Hu25ejcC.cjs} +1 -1
  61. package/dist/{manage-design-tokens-CRwsErkx.js → manage-design-tokens-rEzXQJRW.js} +2 -2
  62. package/dist/{mark-as-template-DpZSFrLK.js → mark-as-template-BNbn5zQG.js} +2 -2
  63. package/dist/{mark-as-template-BH0W9p2G.cjs → mark-as-template-DEThYoS6.cjs} +1 -1
  64. package/dist/{nested-path-selector-content-BDQmZzlf.js → nested-path-selector-content-BERhs6_L.js} +1 -1
  65. package/dist/{nested-path-selector-content-CHYz7cdB.cjs → nested-path-selector-content-Dz3-bNqT.cjs} +1 -1
  66. package/dist/{no-language-page-content-D0lcCseQ.js → no-language-page-content-CPVIz5rC.js} +2 -2
  67. package/dist/{no-language-page-content-D7btm8zX.cjs → no-language-page-content-CrUkIrUJ.cjs} +1 -1
  68. package/dist/{no-language-page-dialog-sYOmLnpY.cjs → no-language-page-dialog-964r8feg.cjs} +1 -1
  69. package/dist/{no-language-page-dialog-BdW7oXvt.js → no-language-page-dialog-DPDJ6gkQ.js} +2 -2
  70. package/dist/{page-creator-O_QpbMlB.js → page-creator-CDcfL4al.js} +3 -3
  71. package/dist/{page-creator-B-jBAGZl.cjs → page-creator-kvymje2i.cjs} +1 -1
  72. package/dist/{page-lock-CmQKpw1U.js → page-lock-BpUGSiCT.js} +2 -2
  73. package/dist/{page-lock-BrVqfmVm.cjs → page-lock-gOE-Tt7g.cjs} +1 -1
  74. package/dist/{page-locked-dialog-BjeJOXuN.js → page-locked-dialog-UQeYxWz1.js} +2 -2
  75. package/dist/{page-locked-dialog-ChHVSk7X.cjs → page-locked-dialog-aJFtoEzq.cjs} +1 -1
  76. package/dist/{page-manager-new-B90zLpRY.cjs → page-manager-new-DBomYOFT.cjs} +1 -1
  77. package/dist/{page-manager-new-wcsdorbd.js → page-manager-new-Dg02OZtc.js} +22 -22
  78. package/dist/{page-manager-search-and-filter-DY_NsetM.js → page-manager-search-and-filter-CCTh5gkC.js} +2 -2
  79. package/dist/{page-manager-search-and-filter-Bb_Zfpsj.cjs → page-manager-search-and-filter-pWHXOgMJ.cjs} +1 -1
  80. package/dist/{page-revisions-content-CVpi-467.cjs → page-revisions-content-BDY8RXJW.cjs} +1 -1
  81. package/dist/{page-revisions-content-5h39VYXj.js → page-revisions-content-C6YjUAx9.js} +7 -7
  82. package/dist/pages.cjs +1 -1
  83. package/dist/pages.d.ts +1 -0
  84. package/dist/pages.js +12 -12
  85. package/dist/plugin-DH3BDqys.js +251 -0
  86. package/dist/{plugin-BGlQf0iy.cjs → plugin-DO5QAuc1.cjs} +13 -13
  87. package/dist/{publish-pages-content-rrfvXks4.js → publish-pages-content-8MQN9iLc.js} +17 -17
  88. package/dist/{publish-pages-content-BG1GIuIz.cjs → publish-pages-content-DjUd9oWi.cjs} +1 -1
  89. package/dist/render.cjs +1 -1
  90. package/dist/render.d.ts +4 -1
  91. package/dist/render.js +2 -2
  92. package/dist/{rte-widget-modal-29WtCMJs.js → rte-widget-modal-Bj7lxFEs.js} +1 -1
  93. package/dist/{rte-widget-modal-JRoPPuju.cjs → rte-widget-modal-O31cHitM.cjs} +1 -1
  94. package/dist/{save-to-lib-Bm7R2K7j.js → save-to-lib-BMlowHNl.js} +2 -2
  95. package/dist/{save-to-lib-YvzDV5ee.cjs → save-to-lib-vxpiXsok.cjs} +1 -1
  96. package/dist/sdk.css +1 -1
  97. package/dist/{selected-block-display-bdClAekS.cjs → selected-block-display-BjhZTfSL.cjs} +1 -1
  98. package/dist/{selected-block-display-BAulh0Nz.js → selected-block-display-BxHTDLna.js} +2 -2
  99. package/dist/{seo-panel-CT0D3I44.js → seo-panel-197ULlty.js} +2 -2
  100. package/dist/{seo-panel-D9wnaLG-.cjs → seo-panel-MrGhioya.cjs} +1 -1
  101. package/dist/{shared-json-ld-ON6LaybZ.cjs → shared-json-ld-6ovlKZ7L.cjs} +1 -1
  102. package/dist/{shared-json-ld-CuhqVL8H.js → shared-json-ld-B2kfIim8.js} +24 -24
  103. package/dist/{slug-input-DNeh6LBv.js → slug-input-CSqTWSv8.js} +1 -1
  104. package/dist/{slug-input-CxmcQbTR.cjs → slug-input-CV-Dvosn.cjs} +1 -1
  105. package/dist/supabase-actions.cjs +1 -1
  106. package/dist/supabase-actions.d.ts +34 -0
  107. package/dist/supabase-actions.js +231 -192
  108. package/dist/{take-over-request-CrILj_3q.cjs → take-over-request-BFZbLBOK.cjs} +1 -1
  109. package/dist/{take-over-request-BmeR6t3b.js → take-over-request-Ds_-1dOv.js} +2 -2
  110. package/dist/{theme-panel-footer-D4oCAY2G.js → theme-panel-footer-C1f2KMBq.js} +2 -2
  111. package/dist/{theme-panel-footer-BMx5lGB4.cjs → theme-panel-footer-dHh8VGgj.cjs} +1 -1
  112. package/dist/{translation-warning-modal-BNG9m-FC.js → translation-warning-modal-DPdVK3CD.js} +1 -1
  113. package/dist/{translation-warning-modal-ChL7oDO1.cjs → translation-warning-modal-HD8Mlj1e.cjs} +1 -1
  114. package/dist/types.d.ts +1 -0
  115. package/dist/{unmark-as-template-BYiyJloZ.cjs → unmark-as-template-D8wEsu9z.cjs} +1 -1
  116. package/dist/{unmark-as-template-CEEMIY1A.js → unmark-as-template-DLVNotM_.js} +2 -2
  117. package/dist/{unpublish-page-B0aY1JnO.cjs → unpublish-page-Cl2R_dfN.cjs} +1 -1
  118. package/dist/{unpublish-page-Bm20P3TB.js → unpublish-page-ik9a66Rz.js} +2 -2
  119. package/dist/utils.cjs +1 -1
  120. package/dist/utils.js +1 -1
  121. package/dist/web-blocks.cjs +1 -1
  122. package/dist/web-blocks.js +23 -22
  123. package/dist/{web-preview-iQgiotU6.cjs → web-preview-CE39XTw0.cjs} +1 -1
  124. package/dist/{web-preview-BtEn4Vc-.js → web-preview-ztlGD_Xm.js} +1 -1
  125. package/package.json +1 -1
  126. package/dist/index-BJVYKKJq.cjs +0 -5
  127. package/dist/plugin-C-ht41UZ.js +0 -245
@@ -3,7 +3,7 @@ var Su = (t, e, n) => e in t ? Nu(t, e, { enumerable: !0, configurable: !0, writ
3
3
  var Zt = (t, e, n) => Su(t, typeof e != "symbol" ? e + "" : e, n);
4
4
  import { jsx as a, jsxs as g, Fragment as Z } from "react/jsx-runtime";
5
5
  import { E as j, z as br, B as te, n as Eu, u as Wo, o as _u, l as Ga, d as Au, G as Ua, s as Ka, v as _s, y as Tu, w as zi, g as Bu, i as Iu, h as Ru } from "./register-chai-top-bar-CX_JkRJn.js";
6
- import { noop as kt, get as S, has as pe, find as ne, filter as ee, flatten as Ot, map as N, includes as Be, without as Lu, compact as go, forEach as yr, keys as Ct, isEmpty as $, set as We, unset as Pu, omit as xr, isString as Vn, chunk as Ou, values as Tt, pick as bo, startsWith as Re, isFunction as tn, isObject as Du, memoize as Mu, each as It, first as Ce, findIndex as sr, throttle as $u, some as Fu, uniq as As, cloneDeep as qr, isArray as Ts, isNull as Bs, split as zu, reject as jr, take as Hu, debounce as Is, startCase as Jt, isNumber as Vu, parseInt as ju, isNaN as Wu, range as Ye, flattenDeep as Rt, toLower as Ja, nth as Hi, findLast as Gu, intersection as Uu, toUpper as Go, kebabCase as Ya, capitalize as Dn, groupBy as Xa, sortBy as Ku, round as Ju, reverse as Yu, camelCase as Xu } from "lodash-es";
6
+ import { noop as kt, get as N, has as pe, find as ne, filter as ee, flatten as Ot, map as C, includes as Be, without as Lu, compact as go, forEach as yr, keys as Ct, isEmpty as $, set as We, unset as Pu, omit as xr, isString as Vn, chunk as Ou, values as Tt, pick as bo, startsWith as Re, isFunction as tn, isObject as Du, memoize as Mu, each as It, first as Ce, findIndex as sr, throttle as $u, some as Fu, uniq as As, cloneDeep as qr, isArray as Ts, isNull as Bs, split as zu, reject as jr, take as Hu, debounce as Is, startCase as Jt, isNumber as Vu, parseInt as ju, isNaN as Wu, range as Ye, flattenDeep as Rt, toLower as Ja, nth as Hi, findLast as Gu, intersection as Uu, toUpper as Go, kebabCase as Ya, capitalize as Dn, groupBy as Xa, sortBy as Ku, round as Ju, reverse as Yu, camelCase as Xu } from "lodash-es";
7
7
  import * as Ae from "@radix-ui/react-dropdown-menu";
8
8
  import { ChevronRightIcon as jn, CheckIcon as vr, CircleIcon as qa, PinTopIcon as qu, PinBottomIcon as Zu, PinLeftIcon as Qu, PinRightIcon as ep, GearIcon as tp, DragHandleDots2Icon as Za, ArrowUpIcon as en, PlusIcon as Xe, CopyIcon as Rs, TrashIcon as Qa, CaretDownIcon as ls, Cross1Icon as qe, FontBoldIcon as np, FontItalicIcon as el, UnderlineIcon as tl, StrikethroughIcon as rp, ListBulletIcon as cs, ValueIcon as op, TextAlignLeftIcon as Vi, TextAlignCenterIcon as ji, TextAlignRightIcon as Wi, Link2Icon as sp, LinkBreak2Icon as nl, EnterFullScreenIcon as ip, Pencil2Icon as yo, MagnifyingGlassIcon as Ls, ChevronLeftIcon as rl, LoopIcon as ol, IdCardIcon as sl, ChevronDownIcon as xn, InfoCircledIcon as Mn, FileIcon as ap, PlusCircledIcon as il, DotsVerticalIcon as xo, TriangleDownIcon as lp, RowSpacingIcon as cp, Cross2Icon as vo, LetterCaseUppercaseIcon as dp, OverlineIcon as up, StretchHorizontallyIcon as pp, AlignRightIcon as fp, AlignCenterHorizontallyIcon as hp, AlignLeftIcon as mp, ArrowLeftIcon as qn, ArrowDownIcon as Tn, ArrowRightIcon as Zn, HeightIcon as rt, WidthIcon as ot, BorderAllIcon as _t, ArrowBottomLeftIcon as gp, ArrowBottomRightIcon as bp, ArrowTopRightIcon as al, ArrowTopLeftIcon as yp, EyeClosedIcon as Zr, EyeOpenIcon as ll, BoxIcon as Ps, MinusIcon as xp, CrossCircledIcon as vp, MobileIcon as Gi, LaptopIcon as wp, DesktopIcon as kp, TokensIcon as Cp, ChevronUpIcon as Np, ReloadIcon as Os, CaretRightIcon as Sp, FrameIcon as Ep, SquareIcon as _p, EraserIcon as cl, DownloadIcon as Ap, CardStackPlusIcon as Tp, CardStackIcon as Ds, ScissorsIcon as Bp, ExclamationTriangleIcon as dl, StackIcon as ul, DoubleArrowDownIcon as Ip, DoubleArrowUpIcon as Rp, ResetIcon as Qr, UploadIcon as Lp, TextIcon as Pp, CornerTopRightIcon as Op, MixerHorizontalIcon as eo, SunIcon as pl, MoonIcon as fl, FaceIcon as Dp, ShuffleIcon as Mp, ChatBubbleIcon as $p, StopIcon as Fp, ZoomInIcon as zp, DotsHorizontalIcon as Hp, LightningBoltIcon as hl } from "@radix-ui/react-icons";
9
9
  import * as V from "react";
@@ -15,7 +15,7 @@ import { isObject as Ki } from "@rjsf/utils";
15
15
  import { g as hn, a as bl, c as ht } from "./common-functions-D2lMFR6K.js";
16
16
  import { splitAtom as yl, atomWithStorage as Qe, useAtomCallback as Up } from "jotai/utils";
17
17
  import { useDebouncedCallback as Ut, useThrottledCallback as mn, useResizeObserver as ds, useDebouncedState as Ji } from "@react-hookz/web";
18
- import { d as xl, e as zs, a as Kp, p as Jp, g as Yp, f as Xp, h as qp } from "./plugin-C-ht41UZ.js";
18
+ import { d as xl, e as zs, a as Kp, p as Jp, g as Yp, f as Xp, h as qp } from "./plugin-DH3BDqys.js";
19
19
  import Zp from "tree-model";
20
20
  import Qp from "undo-manager";
21
21
  import { useTranslation as U, initReactI18next as ef } from "react-i18next";
@@ -212,7 +212,7 @@ const oe = {
212
212
  const e = Oe(t);
213
213
  return e && e.canDelete ? e.canDelete() : !0;
214
214
  }, Qi = (t, { dragSource: e, dropTarget: n }) => {
215
- const r = S(e, "data._type", ""), o = S(n, "data._type", "");
215
+ const r = N(e, "data._type", ""), o = N(n, "data._type", "");
216
216
  return gt(o, r);
217
217
  };
218
218
  import.meta.vitest && describe("canDropBlock Function", () => {
@@ -315,7 +315,7 @@ const Ol = P((t) => {
315
315
  Ol.debugLabel = "structureErrorsByBlockAtom";
316
316
  const ft = Wp(), jf = () => ft.get($e), G = (t, e) => {
317
317
  const n = Ge(Zs);
318
- return M(() => S(n, t, e), [n, t, e]);
318
+ return M(() => N(n, t, e), [n, t, e]);
319
319
  }, Dl = P("");
320
320
  Dl.debugLabel = "selectedLanguageAtom";
321
321
  const Ke = () => {
@@ -332,7 +332,7 @@ const Ke = () => {
332
332
  Co.debugLabel = "selectedBlockIdsAtom";
333
333
  const Ys = P((t) => {
334
334
  const e = t($e), n = t(Co);
335
- return N(
335
+ return C(
336
336
  ee(e, ({ _id: r }) => Be(n, r)),
337
337
  (r) => ({ ...r })
338
338
  );
@@ -344,8 +344,8 @@ const No = P((t) => {
344
344
  return e[0];
345
345
  });
346
346
  No.debugLabel = "selectedBlockAtom";
347
- const de = () => Ge(No), Wf = (t) => S(t, "_parent", null), Gf = P((t) => {
348
- const e = t(Ys), n = N(e, Wf);
347
+ const de = () => Ge(No), Wf = (t) => N(t, "_parent", null), Gf = P((t) => {
348
+ const e = t(Ys), n = C(e, Wf);
349
349
  return ee(t($e), (r) => Be(n, r._id));
350
350
  });
351
351
  Gf.debugLabel = "selectedBlocksParentsAtom";
@@ -378,11 +378,11 @@ const Uf = () => ({
378
378
  );
379
379
  return [t, e, n];
380
380
  }, zl = (t, e, n) => {
381
- const r = Oe(S(n, "_type", ""));
381
+ const r = Oe(N(n, "_type", ""));
382
382
  if (!r) return t;
383
383
  const o = { ...t };
384
384
  return yr(Ct(t), (s) => {
385
- if (Be(S(r, "i18nProps", []), s) && !$(e)) {
385
+ if (Be(N(r, "i18nProps", []), s) && !$(e)) {
386
386
  const i = `${s}-${e}`;
387
387
  We(o, i, t[s]), Pu(o, s);
388
388
  }
@@ -465,10 +465,10 @@ const Vl = () => O(qs), Zf = (t, e, n, r) => {
465
465
  ...m,
466
466
  [t._id]: {
467
467
  status: "loaded",
468
- props: S(f, "items", []),
468
+ props: N(f, "items", []),
469
469
  repeaterItems: t.repeaterItems
470
470
  }
471
- })), s((m) => ({ ...m, status: "loaded", props: { totalItems: S(f, "totalItems") } })), i([t._id], { totalItems: S(f, "totalItems") })) : s((m) => ({ ...m, status: "loaded", props: Ki(f) ? f : {} }));
471
+ })), s((m) => ({ ...m, status: "loaded", props: { totalItems: N(f, "totalItems") } })), i([t._id], { totalItems: N(f, "totalItems") })) : s((m) => ({ ...m, status: "loaded", props: Ki(f) ? f : {} }));
472
472
  }).catch((f) => {
473
473
  u ? (c((m) => ({
474
474
  ...m,
@@ -476,8 +476,8 @@ const Vl = () => O(qs), Zf = (t, e, n, r) => {
476
476
  })), s((m) => ({ ...m, status: "error", error: f, props: {} }))) : s((m) => ({ ...m, status: "error", error: f, props: {} }));
477
477
  })));
478
478
  }, [t == null ? void 0 : t._id, d, u, p, r, e]), {
479
- $loading: S(o, "status") === "loading",
480
- ...t ? S(o, "props", {}) : {}
479
+ $loading: N(o, "status") === "loading",
480
+ ...t ? N(o, "props", {}) : {}
481
481
  };
482
482
  }, Zs = P(null);
483
483
  Zs.debugLabel = "chaiBuilderPropsAtom";
@@ -848,14 +848,14 @@ const lh = () => {
848
848
  e
849
849
  ];
850
850
  }, ch = P(null), dh = () => ({ currentPage: Ge(ch) }), uh = Mu((t) => {
851
- const e = Oe(t), n = S(e, "schema.properties", {});
851
+ const e = Oe(t), n = N(e, "schema.properties", {});
852
852
  return go(
853
- Object.keys(n).map((r) => S(n[r], "builderProp", !1) || S(n[r], "runtime", !1) ? r : null)
853
+ Object.keys(n).map((r) => N(n[r], "builderProp", !1) || N(n[r], "runtime", !1) ? r : null)
854
854
  );
855
855
  }), ph = () => {
856
856
  const [t] = lh(), { currentPage: e } = dh(), [n] = fe();
857
857
  return R(() => {
858
- const r = N(n, (o) => xr(o, uh(o._type)));
858
+ const r = C(n, (o) => xr(o, uh(o._type)));
859
859
  return {
860
860
  currentPage: e,
861
861
  blocks: r
@@ -914,10 +914,10 @@ const yh = (t, e) => e ? t.some((n) => {
914
914
  async (x = !1, v = !1) => {
915
915
  if (m(v))
916
916
  return;
917
- const E = o();
918
- return E != null && E.blocks && p(E.blocks), e("SAVING"), r("SAVING"), h(0), await n({
917
+ const S = o();
918
+ return S != null && S.blocks && p(S.blocks), e("SAVING"), r("SAVING"), h(0), await n({
919
919
  autoSave: x,
920
- blocks: E.blocks,
920
+ blocks: S.blocks,
921
921
  theme: s,
922
922
  needTranslations: f(),
923
923
  designTokens: u
@@ -1254,50 +1254,50 @@ const Ih = P({
1254
1254
  } = Yl();
1255
1255
  return {
1256
1256
  moveBlocks: (f, m, b) => {
1257
- const y = ft.get($e), x = N(f, (E) => {
1258
- const A = y.find((k) => k._id === E)._parent || null, C = y.filter((k) => A ? k._parent === A : !k._parent).map((k) => k._id).indexOf(E);
1259
- return { _id: E, oldParent: A, oldPosition: C };
1260
- }), v = x.find(({ _id: E }) => E === f[0]);
1257
+ const y = ft.get($e), x = C(f, (S) => {
1258
+ const A = y.find((_) => _._id === S)._parent || null, k = y.filter((_) => A ? _._parent === A : !_._parent).map((_) => _._id).indexOf(S);
1259
+ return { _id: S, oldParent: A, oldPosition: k };
1260
+ }), v = x.find(({ _id: S }) => S === f[0]);
1261
1261
  v && v.oldParent === m && v.oldPosition === b || (o(f, m ?? null, b), t({
1262
- undo: () => It(x, ({ _id: E, oldParent: _, oldPosition: A }) => {
1263
- o([E], _ ?? null, A);
1262
+ undo: () => It(x, ({ _id: S, oldParent: E, oldPosition: A }) => {
1263
+ o([S], E ?? null, A);
1264
1264
  }),
1265
1265
  redo: () => o(f, m ?? null, b)
1266
1266
  }));
1267
1267
  },
1268
1268
  addBlocks: (f, m, b) => {
1269
1269
  n(f, m, b), t({
1270
- undo: () => r(N(f, "_id")),
1270
+ undo: () => r(C(f, "_id")),
1271
1271
  redo: () => n(f, m, b)
1272
1272
  });
1273
1273
  },
1274
1274
  removeBlocks: (f) => {
1275
1275
  var v;
1276
- const m = ft.get($e), b = (v = Ce(f)) == null ? void 0 : v._parent, x = m.filter((E) => b ? E._parent === b : !E._parent).indexOf(Ce(f));
1277
- r(N(f, "_id")), t({
1276
+ const m = ft.get($e), b = (v = Ce(f)) == null ? void 0 : v._parent, x = m.filter((S) => b ? S._parent === b : !S._parent).indexOf(Ce(f));
1277
+ r(C(f, "_id")), t({
1278
1278
  undo: () => n(f, b ?? void 0, x),
1279
- redo: () => r(N(f, "_id"))
1279
+ redo: () => r(C(f, "_id"))
1280
1280
  });
1281
1281
  },
1282
1282
  updateBlocks: (f, m, b) => {
1283
1283
  const y = ft.get($e);
1284
1284
  let x = [];
1285
1285
  if (b)
1286
- x = N(f, (v) => ({ _id: v, ...b }));
1286
+ x = C(f, (v) => ({ _id: v, ...b }));
1287
1287
  else {
1288
1288
  const v = Ct(m);
1289
- x = N(f, (E) => {
1290
- const _ = y.find((T) => T._id === E), A = { _id: E };
1291
- return It(v, (T) => A[T] = _[T]), A;
1289
+ x = C(f, (S) => {
1290
+ const E = y.find((B) => B._id === S), A = { _id: S };
1291
+ return It(v, (B) => A[B] = E[B]), A;
1292
1292
  });
1293
1293
  }
1294
- s(N(f, (v) => ({ _id: v, ...m }))), t({
1294
+ s(C(f, (v) => ({ _id: v, ...m }))), t({
1295
1295
  undo: () => s(x),
1296
- redo: () => s(N(f, (v) => ({ _id: v, ...m })))
1296
+ redo: () => s(C(f, (v) => ({ _id: v, ...m })))
1297
1297
  });
1298
1298
  },
1299
1299
  updateBlocksRuntime: (f, m) => {
1300
- s(N(f, (b) => ({ _id: b, ...m })));
1300
+ s(C(f, (b) => ({ _id: b, ...m })));
1301
1301
  },
1302
1302
  setNewBlocks: (f) => {
1303
1303
  const m = ft.get($e);
@@ -1309,9 +1309,9 @@ const Ih = P({
1309
1309
  updateMultipleBlocksProps: (f) => {
1310
1310
  const m = ft.get($e);
1311
1311
  let b = [];
1312
- b = N(f, (y) => {
1313
- const x = Ct(y), v = m.find((_) => _._id === y._id), E = {};
1314
- return It(x, (_) => E[_] = v == null ? void 0 : v[_]), E;
1312
+ b = C(f, (y) => {
1313
+ const x = Ct(y), v = m.find((E) => E._id === y._id), S = {};
1314
+ return It(x, (E) => S[E] = v == null ? void 0 : v[E]), S;
1315
1315
  }), s(f), t({
1316
1316
  undo: () => s(b),
1317
1317
  redo: () => s(f)
@@ -1319,7 +1319,7 @@ const Ih = P({
1319
1319
  }
1320
1320
  };
1321
1321
  }, Rh = ({ block: t, children: e }) => {
1322
- const { t: n } = U(), [r] = fe(), { hasPermission: o } = bt(), s = S(t, "_id"), i = S(t, "_parent"), l = ee(r, (p) => i ? S(p, "_parent") === i : !S(p, "_parent")), c = no(S(t, "_type", "")), d = sr(l, { _id: s }), u = (p) => {
1322
+ const { t: n } = U(), [r] = fe(), { hasPermission: o } = bt(), s = N(t, "_id"), i = N(t, "_parent"), l = ee(r, (p) => i ? N(p, "_parent") === i : !N(p, "_parent")), c = no(N(t, "_type", "")), d = sr(l, { _id: s }), u = (p) => {
1323
1323
  if (p === "CHILD")
1324
1324
  ge.publish(oe.OPEN_ADD_BLOCK, t);
1325
1325
  else {
@@ -1625,18 +1625,18 @@ function qh(t, e, n, r, o) {
1625
1625
  }
1626
1626
  }
1627
1627
  function Zh(t, e, n, r, o) {
1628
- var E, _, A, T;
1628
+ var S, E, A, B;
1629
1629
  const s = t.getAttribute("data-block-id"), i = t.getAttribute("data-block-type") || "Box";
1630
1630
  if (!s)
1631
1631
  return null;
1632
1632
  let l = t.parentElement;
1633
1633
  for (; l && !l.hasAttribute("data-block-id"); )
1634
1634
  l = l.parentElement;
1635
- const c = s === "canvas" ? s : l == null ? void 0 : l.getAttribute("data-block-id"), d = l ? bn(l) : "vertical", u = bn(t), p = Jh(i), h = !p && gt(i, r), f = ((E = o.defaultView) == null ? void 0 : E.scrollY) || 0, m = ((_ = o.defaultView) == null ? void 0 : _.scrollX) || 0;
1635
+ const c = s === "canvas" ? s : l == null ? void 0 : l.getAttribute("data-block-id"), d = l ? bn(l) : "vertical", u = bn(t), p = Jh(i), h = !p && gt(i, r), f = ((S = o.defaultView) == null ? void 0 : S.scrollY) || 0, m = ((E = o.defaultView) == null ? void 0 : E.scrollX) || 0;
1636
1636
  if (s === "canvas" && Gr(t)) {
1637
- const C = Gt(t), k = C[C.length - 1];
1638
- if (k) {
1639
- const w = k.getBoundingClientRect(), B = t.getBoundingClientRect(), L = window.getComputedStyle(t), I = parseFloat(L.paddingLeft) || 0, W = parseFloat(L.paddingRight) || 0, K = B.width - I - W, q = B.left + m + I;
1637
+ const k = Gt(t), _ = k[k.length - 1];
1638
+ if (_) {
1639
+ const w = _.getBoundingClientRect(), T = t.getBoundingClientRect(), L = window.getComputedStyle(t), I = parseFloat(L.paddingLeft) || 0, W = parseFloat(L.paddingRight) || 0, K = T.width - I - W, q = T.left + m + I;
1640
1640
  return {
1641
1641
  position: "after",
1642
1642
  placeholderOrientation: "horizontal",
@@ -1646,8 +1646,8 @@ function Zh(t, e, n, r, o) {
1646
1646
  width: K,
1647
1647
  height: 4
1648
1648
  },
1649
- targetElement: k,
1650
- targetBlockId: k.getAttribute("data-block-id"),
1649
+ targetElement: _,
1650
+ targetBlockId: _.getAttribute("data-block-id"),
1651
1651
  targetParentId: "canvas",
1652
1652
  isEmpty: !1,
1653
1653
  confidence: 1
@@ -1655,44 +1655,44 @@ function Zh(t, e, n, r, o) {
1655
1655
  }
1656
1656
  }
1657
1657
  if (h && !p && Gr(t)) {
1658
- const C = Yh(t, e, n, u);
1659
- if (C) {
1660
- const k = C.before.getBoundingClientRect(), w = C.after.getBoundingClientRect(), B = t.getBoundingClientRect(), L = window.getComputedStyle(t), I = parseFloat(L.paddingLeft) || 0, W = parseFloat(L.paddingRight) || 0, K = Gt(t), q = ci(K, C.before, u);
1658
+ const k = Yh(t, e, n, u);
1659
+ if (k) {
1660
+ const _ = k.before.getBoundingClientRect(), w = k.after.getBoundingClientRect(), T = t.getBoundingClientRect(), L = window.getComputedStyle(t), I = parseFloat(L.paddingLeft) || 0, W = parseFloat(L.paddingRight) || 0, K = Gt(t), q = ci(K, k.before, u);
1661
1661
  let xe = 0;
1662
1662
  if (q.forEach((ve) => {
1663
1663
  const ue = ve.getBoundingClientRect();
1664
1664
  ue.height > xe && (xe = ue.height);
1665
1665
  }), u === "vertical") {
1666
- const ve = B.width - I - W, ue = B.left + m + I;
1666
+ const ve = T.width - I - W, ue = T.left + m + I;
1667
1667
  return {
1668
1668
  position: "after",
1669
1669
  placeholderOrientation: "horizontal",
1670
1670
  rect: {
1671
- top: k.bottom + f,
1671
+ top: _.bottom + f,
1672
1672
  left: ue,
1673
1673
  width: ve,
1674
1674
  height: 4
1675
1675
  },
1676
- targetElement: C.before,
1677
- targetBlockId: C.before.getAttribute("data-block-id"),
1676
+ targetElement: k.before,
1677
+ targetBlockId: k.before.getAttribute("data-block-id"),
1678
1678
  targetParentId: s,
1679
1679
  isGapZone: !0,
1680
1680
  confidence: 1
1681
1681
  // High confidence for gap zones
1682
1682
  };
1683
1683
  } else {
1684
- const ve = k.top + f, ue = xe > 0 ? xe : Math.max(k.height, w.height);
1684
+ const ve = _.top + f, ue = xe > 0 ? xe : Math.max(_.height, w.height);
1685
1685
  return {
1686
1686
  position: "after",
1687
1687
  placeholderOrientation: "vertical",
1688
1688
  rect: {
1689
1689
  top: ve,
1690
- left: k.right + m,
1690
+ left: _.right + m,
1691
1691
  width: 4,
1692
1692
  height: ue
1693
1693
  },
1694
- targetElement: C.before,
1695
- targetBlockId: C.before.getAttribute("data-block-id"),
1694
+ targetElement: k.before,
1695
+ targetBlockId: k.before.getAttribute("data-block-id"),
1696
1696
  targetParentId: s,
1697
1697
  isGapZone: !0,
1698
1698
  confidence: 1
@@ -1701,15 +1701,15 @@ function Zh(t, e, n, r, o) {
1701
1701
  }
1702
1702
  }
1703
1703
  if (l && c) {
1704
- const C = Xh(l, e, n, d);
1705
- if (C) {
1706
- const k = l.getBoundingClientRect(), w = window.getComputedStyle(l), B = parseFloat(w.paddingLeft) || 0, L = parseFloat(w.paddingRight) || 0, I = parseFloat(w.paddingTop) || 0, W = parseFloat(w.paddingBottom) || 0, K = ((A = o.defaultView) == null ? void 0 : A.scrollY) || 0, q = ((T = o.defaultView) == null ? void 0 : T.scrollX) || 0, xe = d === "vertical" ? "horizontal" : "vertical", ve = Zl(l);
1707
- if (C === "start") {
1704
+ const k = Xh(l, e, n, d);
1705
+ if (k) {
1706
+ const _ = l.getBoundingClientRect(), w = window.getComputedStyle(l), T = parseFloat(w.paddingLeft) || 0, L = parseFloat(w.paddingRight) || 0, I = parseFloat(w.paddingTop) || 0, W = parseFloat(w.paddingBottom) || 0, K = ((A = o.defaultView) == null ? void 0 : A.scrollY) || 0, q = ((B = o.defaultView) == null ? void 0 : B.scrollX) || 0, xe = d === "vertical" ? "horizontal" : "vertical", ve = Zl(l);
1707
+ if (k === "start") {
1708
1708
  const ue = Gt(l)[0];
1709
1709
  if (ue) {
1710
1710
  const Me = ue.getBoundingClientRect();
1711
1711
  if (d === "vertical") {
1712
- const tt = k.width - B - L, X = k.left + q + B;
1712
+ const tt = _.width - T - L, X = _.left + q + T;
1713
1713
  return {
1714
1714
  position: "before",
1715
1715
  placeholderOrientation: xe,
@@ -1725,7 +1725,7 @@ function Zh(t, e, n, r, o) {
1725
1725
  confidence: 0.9
1726
1726
  };
1727
1727
  } else {
1728
- const tt = k.top + K + I, X = ve.maxHeight > 0 ? ve.maxHeight : k.height - I - W;
1728
+ const tt = _.top + K + I, X = ve.maxHeight > 0 ? ve.maxHeight : _.height - I - W;
1729
1729
  return {
1730
1730
  position: "before",
1731
1731
  placeholderOrientation: xe,
@@ -1747,7 +1747,7 @@ function Zh(t, e, n, r, o) {
1747
1747
  if (Me) {
1748
1748
  const tt = Me.getBoundingClientRect();
1749
1749
  if (d === "vertical") {
1750
- const X = k.width - B - L, nt = k.left + q + B;
1750
+ const X = _.width - T - L, nt = _.left + q + T;
1751
1751
  return {
1752
1752
  position: "after",
1753
1753
  placeholderOrientation: xe,
@@ -1763,7 +1763,7 @@ function Zh(t, e, n, r, o) {
1763
1763
  confidence: 0.9
1764
1764
  };
1765
1765
  } else {
1766
- const X = k.top + K + I, nt = ve.maxHeight > 0 ? ve.maxHeight : k.height - I - W;
1766
+ const X = _.top + K + I, nt = ve.maxHeight > 0 ? ve.maxHeight : _.height - I - W;
1767
1767
  return {
1768
1768
  position: "after",
1769
1769
  placeholderOrientation: xe,
@@ -1785,12 +1785,12 @@ function Zh(t, e, n, r, o) {
1785
1785
  }
1786
1786
  let b = qh(t, e, n, h, d);
1787
1787
  if (p && b.position === "inside") {
1788
- const C = t.getBoundingClientRect();
1788
+ const k = t.getBoundingClientRect();
1789
1789
  d === "vertical" ? b = {
1790
- position: (n - C.top) / C.height < 0.5 ? "before" : "after",
1790
+ position: (n - k.top) / k.height < 0.5 ? "before" : "after",
1791
1791
  confidence: b.confidence
1792
1792
  } : b = {
1793
- position: (e - C.left) / C.width < 0.5 ? "before" : "after",
1793
+ position: (e - k.left) / k.width < 0.5 ? "before" : "after",
1794
1794
  confidence: b.confidence
1795
1795
  };
1796
1796
  }
@@ -1858,14 +1858,14 @@ function ci(t, e, n) {
1858
1858
  }
1859
1859
  function em(t, e, n, r, o) {
1860
1860
  var I, W;
1861
- const s = t.getBoundingClientRect(), i = window.getComputedStyle(t), l = ((I = o.defaultView) == null ? void 0 : I.scrollY) || 0, c = ((W = o.defaultView) == null ? void 0 : W.scrollX) || 0, d = parseFloat(i.marginTop) || 0, u = parseFloat(i.marginBottom) || 0, p = parseFloat(i.marginLeft) || 0, h = parseFloat(i.marginRight) || 0, f = parseFloat(i.paddingTop) || 0, m = parseFloat(i.paddingBottom) || 0, b = parseFloat(i.paddingLeft) || 0, y = parseFloat(i.paddingRight) || 0, x = e == null ? void 0 : e.getBoundingClientRect(), v = e && parseFloat(window.getComputedStyle(e).paddingLeft) || 0, E = e && parseFloat(window.getComputedStyle(e).paddingRight) || 0, _ = e && parseFloat(window.getComputedStyle(e).paddingTop) || 0, A = e && parseFloat(window.getComputedStyle(e).paddingBottom) || 0, T = e ? Zl(e) : { maxHeight: 0 }, C = e ? bn(e) : "vertical", k = e ? Gt(e) : [], w = ci(k, t, C);
1862
- let B = 0, L = 0;
1861
+ const s = t.getBoundingClientRect(), i = window.getComputedStyle(t), l = ((I = o.defaultView) == null ? void 0 : I.scrollY) || 0, c = ((W = o.defaultView) == null ? void 0 : W.scrollX) || 0, d = parseFloat(i.marginTop) || 0, u = parseFloat(i.marginBottom) || 0, p = parseFloat(i.marginLeft) || 0, h = parseFloat(i.marginRight) || 0, f = parseFloat(i.paddingTop) || 0, m = parseFloat(i.paddingBottom) || 0, b = parseFloat(i.paddingLeft) || 0, y = parseFloat(i.paddingRight) || 0, x = e == null ? void 0 : e.getBoundingClientRect(), v = e && parseFloat(window.getComputedStyle(e).paddingLeft) || 0, S = e && parseFloat(window.getComputedStyle(e).paddingRight) || 0, E = e && parseFloat(window.getComputedStyle(e).paddingTop) || 0, A = e && parseFloat(window.getComputedStyle(e).paddingBottom) || 0, B = e ? Zl(e) : { maxHeight: 0 }, k = e ? bn(e) : "vertical", _ = e ? Gt(e) : [], w = ci(_, t, k);
1862
+ let T = 0, L = 0;
1863
1863
  if (w.forEach((K) => {
1864
1864
  const q = K.getBoundingClientRect();
1865
- q.height > B && (B = q.height), q.width > L && (L = q.width);
1865
+ q.height > T && (T = q.height), q.width > L && (L = q.width);
1866
1866
  }), n === "before")
1867
1867
  if (r === "horizontal") {
1868
- const K = x ? x.width - v - E : s.width, q = x ? x.left + c + v : s.left + c;
1868
+ const K = x ? x.width - v - S : s.width, q = x ? x.left + c + v : s.left + c;
1869
1869
  return {
1870
1870
  top: s.top + l - d - 2,
1871
1871
  left: q,
@@ -1873,7 +1873,7 @@ function em(t, e, n, r, o) {
1873
1873
  height: 4
1874
1874
  };
1875
1875
  } else {
1876
- const K = s.top + l, q = C === "horizontal" && B > 0 ? B : T.maxHeight > 0 ? T.maxHeight : x ? x.height - _ - A : s.height;
1876
+ const K = s.top + l, q = k === "horizontal" && T > 0 ? T : B.maxHeight > 0 ? B.maxHeight : x ? x.height - E - A : s.height;
1877
1877
  return {
1878
1878
  top: K,
1879
1879
  left: s.left + c - p - 2,
@@ -1883,7 +1883,7 @@ function em(t, e, n, r, o) {
1883
1883
  }
1884
1884
  else if (n === "after")
1885
1885
  if (r === "horizontal") {
1886
- const K = x ? x.width - v - E : s.width, q = x ? x.left + c + v : s.left + c;
1886
+ const K = x ? x.width - v - S : s.width, q = x ? x.left + c + v : s.left + c;
1887
1887
  return {
1888
1888
  top: s.bottom + l + u - 2,
1889
1889
  left: q,
@@ -1891,7 +1891,7 @@ function em(t, e, n, r, o) {
1891
1891
  height: 4
1892
1892
  };
1893
1893
  } else {
1894
- const K = s.top + l, q = C === "horizontal" && B > 0 ? B : T.maxHeight > 0 ? T.maxHeight : x ? x.height - _ - A : s.height;
1894
+ const K = s.top + l, q = k === "horizontal" && T > 0 ? T : B.maxHeight > 0 ? B.maxHeight : x ? x.height - E - A : s.height;
1895
1895
  return {
1896
1896
  top: K,
1897
1897
  left: s.right + c + h - 2,
@@ -2013,29 +2013,29 @@ const De = () => O(Ar), nm = () => {
2013
2013
  const x = n.targetBlockId, v = n.targetParentId;
2014
2014
  if (!x)
2015
2015
  return;
2016
- const { parentId: E, index: _, replaceImageUrl: A } = rm(
2016
+ const { parentId: S, index: E, replaceImageUrl: A } = rm(
2017
2017
  o,
2018
2018
  x,
2019
2019
  v,
2020
2020
  n.position,
2021
2021
  t
2022
- ), T = t._id !== void 0;
2022
+ ), B = t._id !== void 0;
2023
2023
  if (A && Ql(t)) {
2024
- m([x], { image: S(t, "blocks.0.image") }), setTimeout(() => {
2024
+ m([x], { image: N(t, "blocks.0.image") }), setTimeout(() => {
2025
2025
  f(h + 1);
2026
2026
  }, 50);
2027
2027
  return;
2028
2028
  }
2029
- if (T)
2030
- l([t._id], E === null ? void 0 : E, _), u(), d([]), c([t._id]);
2029
+ if (B)
2030
+ l([t._id], S === null ? void 0 : S, E), u(), d([]), c([t._id]);
2031
2031
  else {
2032
- const C = t._type || t.type, k = t != null && t.blocks ? tn(t == null ? void 0 : t.blocks) ? wo(t == null ? void 0 : t.blocks()) : t == null ? void 0 : t.blocks : null;
2032
+ const k = t._type || t.type, _ = t != null && t.blocks ? tn(t == null ? void 0 : t.blocks) ? wo(t == null ? void 0 : t.blocks()) : t == null ? void 0 : t.blocks : null;
2033
2033
  i(
2034
- C === "PartialBlock" ? {
2035
- blocks: [{ _type: C, _id: "partial-block", partialBlockId: t.partialBlockId }]
2036
- } : (k == null ? void 0 : k.length) > 0 ? { blocks: [...k] } : { type: C },
2037
- E,
2038
- _
2034
+ k === "PartialBlock" ? {
2035
+ blocks: [{ _type: k, _id: "partial-block", partialBlockId: t.partialBlockId }]
2036
+ } : (_ == null ? void 0 : _.length) > 0 ? { blocks: [..._] } : { type: k },
2037
+ S,
2038
+ E
2039
2039
  );
2040
2040
  }
2041
2041
  setTimeout(() => {
@@ -2068,7 +2068,7 @@ const De = () => O(Ar), nm = () => {
2068
2068
  function rm(t, e, n, r, o) {
2069
2069
  var s, i;
2070
2070
  try {
2071
- if (e === n && ((s = o == null ? void 0 : o.blocks) == null ? void 0 : s.length) === 1 && S(o, "blocks.0._type") === "Image" && ((i = ne(t, { _id: e })) == null ? void 0 : i._type) === "Image")
2071
+ if (e === n && ((s = o == null ? void 0 : o.blocks) == null ? void 0 : s.length) === 1 && N(o, "blocks.0._type") === "Image" && ((i = ne(t, { _id: e })) == null ? void 0 : i._type) === "Image")
2072
2072
  return { parentId: "", index: -1, replaceImageUrl: !0 };
2073
2073
  if (e === "canvas" || r === "inside" && e === "canvas")
2074
2074
  return {
@@ -2165,23 +2165,23 @@ const im = [
2165
2165
  const h = i.defaultView, f = h.innerHeight, m = h.scrollY, b = i.documentElement.scrollHeight;
2166
2166
  c.current = p;
2167
2167
  const y = p, x = f - p;
2168
- let v = !1, E = null, _ = 0;
2169
- if (y < Vt.EDGE_ZONE && m > 0 ? (v = !0, E = "up", _ = y) : x < Vt.EDGE_ZONE && m + f < b && (v = !0, E = "down", _ = x), !v && l.current !== null) {
2168
+ let v = !1, S = null, E = 0;
2169
+ if (y < Vt.EDGE_ZONE && m > 0 ? (v = !0, S = "up", E = y) : x < Vt.EDGE_ZONE && m + f < b && (v = !0, S = "down", E = x), !v && l.current !== null) {
2170
2170
  cancelAnimationFrame(l.current), l.current = null;
2171
2171
  return;
2172
2172
  }
2173
- if (v && E) {
2174
- const A = 1 - _ / Vt.EDGE_ZONE, T = Vt.MIN_SCROLL_SPEED + (Vt.MAX_SCROLL_SPEED - Vt.MIN_SCROLL_SPEED) * A, C = () => {
2173
+ if (v && S) {
2174
+ const A = 1 - E / Vt.EDGE_ZONE, B = Vt.MIN_SCROLL_SPEED + (Vt.MAX_SCROLL_SPEED - Vt.MIN_SCROLL_SPEED) * A, k = () => {
2175
2175
  if (!In || !h) {
2176
2176
  l.current = null;
2177
2177
  return;
2178
2178
  }
2179
- const k = E === "up" ? -T : T;
2180
- h.scrollBy(0, k);
2181
- const w = h.scrollY, B = w > 0, L = w + f < b, I = c.current, W = f - c.current;
2182
- E === "up" && B && I < Vt.EDGE_ZONE || E === "down" && L && W < Vt.EDGE_ZONE ? l.current = requestAnimationFrame(C) : l.current = null;
2179
+ const _ = S === "up" ? -B : B;
2180
+ h.scrollBy(0, _);
2181
+ const w = h.scrollY, T = w > 0, L = w + f < b, I = c.current, W = f - c.current;
2182
+ S === "up" && T && I < Vt.EDGE_ZONE || S === "down" && L && W < Vt.EDGE_ZONE ? l.current = requestAnimationFrame(k) : l.current = null;
2183
2183
  };
2184
- l.current === null && (l.current = requestAnimationFrame(C));
2184
+ l.current === null && (l.current = requestAnimationFrame(k));
2185
2185
  }
2186
2186
  },
2187
2187
  [i]
@@ -2205,59 +2205,59 @@ const im = [
2205
2205
  const x = t._type || t.type;
2206
2206
  if (!x)
2207
2207
  return;
2208
- const v = p.clientX, E = p.clientY;
2209
- if (d(E), !i) return;
2210
- const _ = Zh(f, v, E, x, i);
2211
- if (!_)
2208
+ const v = p.clientX, S = p.clientY;
2209
+ if (d(S), !i) return;
2210
+ const E = Zh(f, v, S, x, i);
2211
+ if (!E)
2212
2212
  return;
2213
2213
  const A = f.getAttribute("data-block-type") || "Box";
2214
- let T = !1;
2215
- const C = im.includes(A);
2214
+ let B = !1;
2215
+ const k = im.includes(A);
2216
2216
  if (A === "Image" && x === "Image" && Ql(t)) {
2217
2217
  o(m), n({
2218
2218
  isVisible: !0,
2219
2219
  isValid: !0,
2220
- position: _.position,
2221
- placeholderOrientation: _.placeholderOrientation,
2220
+ position: E.position,
2221
+ placeholderOrientation: E.placeholderOrientation,
2222
2222
  isEmpty: !0,
2223
2223
  top: f.offsetTop,
2224
- left: _.rect.left,
2224
+ left: E.rect.left,
2225
2225
  width: f.clientWidth,
2226
2226
  height: f.clientHeight,
2227
- targetBlockId: _.targetBlockId,
2228
- targetParentId: _.targetBlockId
2227
+ targetBlockId: E.targetBlockId,
2228
+ targetParentId: E.targetBlockId
2229
2229
  });
2230
2230
  return;
2231
2231
  }
2232
- if (_.position === "inside") {
2233
- if (C || y && !tc(y, m, s))
2232
+ if (E.position === "inside") {
2233
+ if (k || y && !tc(y, m, s))
2234
2234
  return;
2235
- T = gt(A, x);
2235
+ B = gt(A, x);
2236
2236
  } else {
2237
- let w = f.parentElement, B = "Box";
2237
+ let w = f.parentElement, T = "Box";
2238
2238
  for (; w && !w.hasAttribute("data-block-id"); )
2239
2239
  w = w.parentElement;
2240
- if (w && (B = w.getAttribute("data-block-type") || "Box"), y && !sm(y, m, s))
2240
+ if (w && (T = w.getAttribute("data-block-type") || "Box"), y && !sm(y, m, s))
2241
2241
  return;
2242
- T = gt(B, x);
2242
+ B = gt(T, x);
2243
2243
  }
2244
- if (!T)
2244
+ if (!B)
2245
2245
  return;
2246
- o(_.targetParentId);
2247
- const k = _.targetParentId || b || void 0;
2246
+ o(E.targetParentId);
2247
+ const _ = E.targetParentId || b || void 0;
2248
2248
  n({
2249
2249
  isVisible: !0,
2250
2250
  isValid: !0,
2251
- position: _.position,
2252
- placeholderOrientation: _.placeholderOrientation,
2253
- isEmpty: _.isEmpty ?? !1,
2254
- top: _.rect.top,
2255
- left: _.rect.left,
2256
- width: _.rect.width,
2257
- height: _.rect.height,
2258
- targetBlockId: _.targetBlockId,
2259
- targetParentId: k
2260
- }), cm(i), _.targetElement.setAttribute("data-drop-target", "true");
2251
+ position: E.position,
2252
+ placeholderOrientation: E.placeholderOrientation,
2253
+ isEmpty: E.isEmpty ?? !1,
2254
+ top: E.rect.top,
2255
+ left: E.rect.left,
2256
+ width: E.rect.width,
2257
+ height: E.rect.height,
2258
+ targetBlockId: E.targetBlockId,
2259
+ targetParentId: _
2260
+ }), cm(i), E.targetElement.setAttribute("data-drop-target", "true");
2261
2261
  }, 300),
2262
2262
  [i, t, n, r, o, s, d]
2263
2263
  );
@@ -2394,7 +2394,7 @@ const oc = Q.createContext({ document: nc, window: rc }), St = () => Q.useContex
2394
2394
  return "VERTICAL";
2395
2395
  }
2396
2396
  }, sc = (t, e, n) => !!(t && (n === "UP" || n === "LEFT") || e && (n === "DOWN" || n === "RIGHT")), gm = (t, e) => {
2397
- const [n] = fe(), { document: r } = St(), { moveBlocks: o } = ze(), s = S(t, "_id"), i = S(t, "_parent"), l = ee(n, (m) => i ? S(m, "_parent") === i : !S(m, "_parent")), c = (l == null ? void 0 : l.length) <= 1, d = sr(l, { _id: s }), u = d <= 0, p = d + 1 === (l == null ? void 0 : l.length), h = mm(i, s, r), f = R(
2397
+ const [n] = fe(), { document: r } = St(), { moveBlocks: o } = ze(), s = N(t, "_id"), i = N(t, "_parent"), l = ee(n, (m) => i ? N(m, "_parent") === i : !N(m, "_parent")), c = (l == null ? void 0 : l.length) <= 1, d = sr(l, { _id: s }), u = d <= 0, p = d + 1 === (l == null ? void 0 : l.length), h = mm(i, s, r), f = R(
2398
2398
  (m) => {
2399
2399
  sc(u, p, m) || c || (m === "UP" || m === "LEFT" ? o([s], i || void 0, d - 1) : (m === "DOWN" || m === "RIGHT") && o([s], i || void 0, d + 2), e());
2400
2400
  },
@@ -2434,7 +2434,7 @@ const oc = Q.createContext({ document: nc, window: rc }), St = () => Q.useContex
2434
2434
  t,
2435
2435
  (h) => Vn(o) ? h._parent === o : !h._parent
2436
2436
  ).indexOf(l) + 1, p = fs(t, i, o);
2437
- n(p, o ?? void 0, u), s.push(S(p, "0._id", ""));
2437
+ n(p, o ?? void 0, u), s.push(N(p, "0._id", ""));
2438
2438
  }), e(s);
2439
2439
  },
2440
2440
  [t, e]
@@ -2604,9 +2604,9 @@ const wm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], km = (t)
2604
2604
  }),
2605
2605
  Bf({
2606
2606
  boundary: u == null ? void 0 : u.body,
2607
- apply({ availableWidth: _, availableHeight: A, elements: T }) {
2608
- Object.assign(T.floating.style, {
2609
- maxWidth: `${Math.max(200, _)}px`,
2607
+ apply({ availableWidth: E, availableHeight: A, elements: B }) {
2608
+ Object.assign(B.floating.style, {
2609
+ maxWidth: `${Math.max(200, E)}px`,
2610
2610
  maxHeight: `${Math.max(100, A)}px`
2611
2611
  });
2612
2612
  }
@@ -2615,16 +2615,16 @@ const wm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], km = (t)
2615
2615
  elements: { reference: n }
2616
2616
  });
2617
2617
  ds(n, () => y(), n !== null), ds(u == null ? void 0 : u.body, () => y(), (u == null ? void 0 : u.body) !== null);
2618
- const x = S(t, "_parent", null), v = $(S(t, "_name", "")) ? S(t, "_type", "") : S(t, "_name", "");
2618
+ const x = N(t, "_parent", null), v = $(N(t, "_name", "")) ? N(t, "_type", "") : N(t, "_name", "");
2619
2619
  H(() => {
2620
- let _ = null;
2621
- return n ? (_ = setTimeout(() => y(), 500), () => {
2622
- _ && clearTimeout(_);
2620
+ let E = null;
2621
+ return n ? (E = setTimeout(() => y(), 500), () => {
2622
+ E && clearTimeout(E);
2623
2623
  }) : (y(), () => {
2624
- _ && clearTimeout(_);
2624
+ E && clearTimeout(E);
2625
2625
  });
2626
2626
  }, [n, t == null ? void 0 : t._id]);
2627
- const [, E] = ui();
2627
+ const [, S] = ui();
2628
2628
  return !e && (!n || !t || d) ? null : /* @__PURE__ */ a(Z, { children: /* @__PURE__ */ a(
2629
2629
  "div",
2630
2630
  {
@@ -2632,13 +2632,13 @@ const wm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], km = (t)
2632
2632
  tabIndex: 0,
2633
2633
  ref: b.setFloating,
2634
2634
  style: m,
2635
- onClick: (_) => {
2636
- _.stopPropagation(), _.preventDefault();
2635
+ onClick: (E) => {
2636
+ E.stopPropagation(), E.preventDefault();
2637
2637
  },
2638
- onMouseEnter: (_) => {
2639
- _.stopPropagation(), i(null);
2638
+ onMouseEnter: (E) => {
2639
+ E.stopPropagation(), i(null);
2640
2640
  },
2641
- onKeyDown: (_) => _.stopPropagation(),
2641
+ onKeyDown: (E) => E.stopPropagation(),
2642
2642
  className: `isolate z-[999] flex h-6 items-center justify-between bg-blue-500 py-2 text-xs text-white ${e ? "opacity-0" : ""}`,
2643
2643
  children: /* @__PURE__ */ g(Z, { children: [
2644
2644
  /* @__PURE__ */ g("div", { className: "flex items-center", children: [
@@ -2660,7 +2660,7 @@ const wm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], km = (t)
2660
2660
  {
2661
2661
  className: "h-4 w-4 rounded hover:bg-white hover:text-blue-500",
2662
2662
  onClick: () => {
2663
- E("chai-chat-panel"), ge.publish(oe.OPEN_AI_PANEL);
2663
+ S("chai-chat-panel"), ge.publish(oe.OPEN_AI_PANEL);
2664
2664
  }
2665
2665
  }
2666
2666
  ),
@@ -2672,14 +2672,14 @@ const wm = ["Heading", "Paragraph", "Text", "Link", "Span", "Button"], km = (t)
2672
2672
  }
2673
2673
  ),
2674
2674
  !p && /* @__PURE__ */ a(Rh, { block: t, children: /* @__PURE__ */ a(Xe, { className: "h-4 w-4 rounded p-px hover:bg-white hover:text-blue-500" }) }),
2675
- js(S(t, "_type", "")) && c(me.ADD_BLOCK) ? /* @__PURE__ */ a(
2675
+ js(N(t, "_type", "")) && c(me.ADD_BLOCK) ? /* @__PURE__ */ a(
2676
2676
  Rs,
2677
2677
  {
2678
2678
  className: "h-4 w-4 rounded p-px hover:bg-white hover:text-blue-500",
2679
2679
  onClick: () => o([t == null ? void 0 : t._id])
2680
2680
  }
2681
2681
  ) : null,
2682
- Ws(S(t, "_type", "")) && c(me.DELETE_BLOCK) ? /* @__PURE__ */ a(
2682
+ Ws(N(t, "_type", "")) && c(me.DELETE_BLOCK) ? /* @__PURE__ */ a(
2683
2683
  Qa,
2684
2684
  {
2685
2685
  className: "h-4 w-4 rounded p-px hover:bg-white hover:text-blue-500",
@@ -2897,13 +2897,13 @@ const Pm = Q.forwardRef((t, e) => /* @__PURE__ */ a(fc, { ...t, forwardedRef: e
2897
2897
  );
2898
2898
  return [t, r];
2899
2899
  }, mc = P({}), Om = P({}), fi = () => {
2900
- const [t, e] = O(mc), n = R((o) => S(t, o, []), [t]), r = R(() => e({}), [e]);
2900
+ const [t, e] = O(mc), n = R((o) => N(t, o, []), [t]), r = R(() => e({}), [e]);
2901
2901
  return { getPartailBlocks: n, reset: r };
2902
2902
  }, Dm = () => {
2903
- const [t] = fe(), [e, n] = O(mc), [r, o] = O(Om), s = G("getPartialBlockBlocks", async (l) => []), i = M(() => t.filter((l) => l._type === "PartialBlock" || l._type === "GlobalBlock").map((l) => S(l, "partialBlockId", S(l, "globalBlock", ""))), [t]);
2903
+ const [t] = fe(), [e, n] = O(mc), [r, o] = O(Om), s = G("getPartialBlockBlocks", async (l) => []), i = M(() => t.filter((l) => l._type === "PartialBlock" || l._type === "GlobalBlock").map((l) => N(l, "partialBlockId", N(l, "globalBlock", ""))), [t]);
2904
2904
  H(() => {
2905
2905
  yr(i, (l) => {
2906
- pe(e, l) || S(r, `${l}.loading`, !1) || (o((c) => ({ ...c, [l]: { loading: !0, error: null } })), s(l).then((c) => {
2906
+ pe(e, l) || N(r, `${l}.loading`, !1) || (o((c) => ({ ...c, [l]: { loading: !0, error: null } })), s(l).then((c) => {
2907
2907
  n((d) => ({ ...d, [l]: c })), o((d) => ({
2908
2908
  ...d,
2909
2909
  [l]: { loading: !1, error: null }
@@ -3088,14 +3088,18 @@ const Pm = Q.forwardRef((t, e) => /* @__PURE__ */ a(fc, { ...t, forwardedRef: e
3088
3088
  ), xt(
3089
3089
  "ctrl+x,meta+x",
3090
3090
  (f) => {
3091
- f.preventDefault(), $(e) || c(e);
3091
+ const m = window.getSelection();
3092
+ m && m.toString().length > 0 || (f.preventDefault(), $(e) || c(e));
3092
3093
  },
3093
- { ...h, enabled: !$(e), preventDefault: !0 },
3094
+ { ...h, enabled: !$(e) },
3094
3095
  [e, c]
3095
3096
  ), xt(
3096
3097
  "ctrl+c,meta+c",
3097
- () => d(e),
3098
- { ...h, enabled: !$(e), preventDefault: !0 },
3098
+ (f) => {
3099
+ const m = window.getSelection();
3100
+ m && m.toString().length > 0 || (f.preventDefault(), d(e));
3101
+ },
3102
+ { ...h, enabled: !$(e) },
3099
3103
  [e, d]
3100
3104
  ), xt(
3101
3105
  "ctrl+v,meta+v",
@@ -3112,7 +3116,7 @@ const Pm = Q.forwardRef((t, e) => /* @__PURE__ */ a(fc, { ...t, forwardedRef: e
3112
3116
  ), xt(
3113
3117
  "del, backspace",
3114
3118
  (f) => {
3115
- f.preventDefault(), Ws(S(r, "_type", "")) && o(e);
3119
+ f.preventDefault(), Ws(N(r, "_type", "")) && o(e);
3116
3120
  },
3117
3121
  h,
3118
3122
  [e, o]
@@ -3143,8 +3147,8 @@ const Pm = Q.forwardRef((t, e) => /* @__PURE__ */ a(fc, { ...t, forwardedRef: e
3143
3147
  /* @__PURE__ */ a("br", {})
3144
3148
  ] }) : null;
3145
3149
  }, vc = ({ theme: t }) => {
3146
- const e = M(() => Kp(t), [t]);
3147
- return /* @__PURE__ */ a("style", { id: "chai-theme", children: e });
3150
+ const e = M(() => Kp({ theme: t, fontVariables: !0 }), [t]);
3151
+ return /* @__PURE__ */ a("style", { id: "chai-theme", dangerouslySetInnerHTML: { __html: e } });
3148
3152
  }, wc = Qe("darkMode", !1), Tr = () => {
3149
3153
  const [t, e] = O(wc);
3150
3154
  return [t, e];
@@ -3193,20 +3197,20 @@ const Pm = Q.forwardRef((t, e) => /* @__PURE__ */ a(fc, { ...t, forwardedRef: e
3193
3197
  /* @__PURE__ */ a(jm, {})
3194
3198
  ] });
3195
3199
  }, jm = () => {
3196
- const [t] = De(), [e] = re(), n = M(() => `${N(t, ({ id: r }) => `[data-style-id="${r}"]`).join(",")}{
3200
+ const [t] = De(), [e] = re(), n = M(() => `${C(t, ({ id: r }) => `[data-style-id="${r}"]`).join(",")}{
3197
3201
  outline: 1px solid ${e.length > 0 ? "#42a1fc" : "#de8f09"} !important; outline-offset: -1px;
3198
3202
  }`, [t, e]);
3199
3203
  return /* @__PURE__ */ a("style", { id: "selected-styling-blocks", dangerouslySetInnerHTML: { __html: n } });
3200
3204
  }, Wm = () => {
3201
- const [t] = re(), e = M(() => `${N(t, (n) => `[data-block-id="${n}"]`).join(",")}{
3205
+ const [t] = re(), e = M(() => `${C(t, (n) => `[data-block-id="${n}"]`).join(",")}{
3202
3206
  outline: 1px solid #42a1fc !important; outline-offset: -1px;
3203
3207
  }`, [t]);
3204
3208
  return /* @__PURE__ */ a("style", { id: "selected-blocks", dangerouslySetInnerHTML: { __html: e } });
3205
3209
  }, Gm = () => {
3206
3210
  const [t] = Eo(), e = El(), n = M(() => {
3207
3211
  const { heading: s, body: i } = {
3208
- heading: S(t, "fontFamily.heading"),
3209
- body: S(t, "fontFamily.body")
3212
+ heading: N(t, "fontFamily.heading"),
3213
+ body: N(t, "fontFamily.body")
3210
3214
  };
3211
3215
  return e.filter((l) => l.family === s || l.family === i);
3212
3216
  }, [t == null ? void 0 : t.fontFamily, e]), r = M(
@@ -3286,7 +3290,7 @@ const Pm = Q.forwardRef((t, e) => /* @__PURE__ */ a(fc, { ...t, forwardedRef: e
3286
3290
  for (; l; )
3287
3291
  i.push(l), l = ne(t, { _id: l._parent });
3288
3292
  const c = ne(i, { _type: s.block });
3289
- return c && (r[o] = S(c, S(s, "prop"), null)), r;
3293
+ return c && (r[o] = N(c, N(s, "prop"), null)), r;
3290
3294
  },
3291
3295
  {}
3292
3296
  ),
@@ -3296,7 +3300,7 @@ const Pm = Q.forwardRef((t, e) => /* @__PURE__ */ a(fc, { ...t, forwardedRef: e
3296
3300
  const [t, e] = O(Ym);
3297
3301
  return { mode: t, setMode: e };
3298
3302
  }, Xm = ({ children: t, block: e }) => {
3299
- const n = M(() => Oe(e._type), [e._type]), r = S(n, "dataProviderDependencies"), o = S(n, "dataProvider"), s = S(n, "dataProviderMode", "mock"), i = Zf(e, s, r, o);
3303
+ const n = M(() => Oe(e._type), [e._type]), r = N(n, "dataProviderDependencies"), o = N(n, "dataProvider"), s = N(n, "dataProviderMode", "mock"), i = Zf(e, s, r, o);
3300
3304
  return t(i);
3301
3305
  }, qm = () => /* @__PURE__ */ a("div", { className: "flex min-h-[100px] items-center justify-center bg-red-50 p-2 text-center text-red-500", children: "Something went wrong." });
3302
3306
  function Te(...t) {
@@ -3428,7 +3432,7 @@ const ms = ({
3428
3432
  onRemoveHighlightColor: s,
3429
3433
  onClose: i
3430
3434
  }) => {
3431
- const [l] = Tr(), [c] = O(Zm), d = (c == null ? void 0 : c.colors) || {}, u = Object.values(d).map((f) => S(f, l ? "1" : "0")), [p, h] = F("TEXT");
3435
+ const [l] = Tr(), [c] = O(Zm), d = (c == null ? void 0 : c.colors) || {}, u = Object.values(d).map((f) => N(f, l ? "1" : "0")), [p, h] = F("TEXT");
3432
3436
  return /* @__PURE__ */ g("div", { id: "rte-widget-color-picker", className: "px-1", children: [
3433
3437
  /* @__PURE__ */ g("div", { className: "mb-2 flex items-center justify-between rounded-md border bg-muted", children: [
3434
3438
  /* @__PURE__ */ a(
@@ -3469,11 +3473,11 @@ const ms = ({
3469
3473
  )
3470
3474
  ] });
3471
3475
  }, tg = ({ editor: t, from: e, menuRef: n }) => {
3472
- var v, E;
3473
- const r = (v = t == null ? void 0 : t.getAttributes("textStyle")) == null ? void 0 : v.color, o = (E = t == null ? void 0 : t.getAttributes("highlight")) == null ? void 0 : E.color, [s, i] = F(r || "#000000F2"), [l, c] = F(o || "#00000057"), [d, u] = Ji(s, 150), [p, h] = Ji(l, 150), f = (_, A) => {
3474
- A ? (i(_), u(_)) : (t == null || t.chain().setColor(_).run(), i(_));
3475
- }, m = (_, A) => {
3476
- A ? (c(_), h(_)) : (t == null || t.chain().setHighlight({ color: _ }).run(), c(_));
3476
+ var v, S;
3477
+ const r = (v = t == null ? void 0 : t.getAttributes("textStyle")) == null ? void 0 : v.color, o = (S = t == null ? void 0 : t.getAttributes("highlight")) == null ? void 0 : S.color, [s, i] = F(r || "#000000F2"), [l, c] = F(o || "#00000057"), [d, u] = Ji(s, 150), [p, h] = Ji(l, 150), f = (E, A) => {
3478
+ A ? (i(E), u(E)) : (t == null || t.chain().setColor(E).run(), i(E));
3479
+ }, m = (E, A) => {
3480
+ A ? (c(E), h(E)) : (t == null || t.chain().setHighlight({ color: E }).run(), c(E));
3477
3481
  }, b = () => {
3478
3482
  t == null || t.chain().unsetColor().run(), i("#000000F2");
3479
3483
  }, y = () => {
@@ -3503,7 +3507,7 @@ const ms = ({
3503
3507
  ),
3504
3508
  /* @__PURE__ */ a(ls, { className: "h-3 w-3 opacity-50" })
3505
3509
  ] }),
3506
- content: (_) => /* @__PURE__ */ a(
3510
+ content: (E) => /* @__PURE__ */ a(
3507
3511
  eg,
3508
3512
  {
3509
3513
  textColor: s,
@@ -3512,7 +3516,7 @@ const ms = ({
3512
3516
  onChangeHighlightColor: m,
3513
3517
  onRemoveTextColor: b,
3514
3518
  onRemoveHighlightColor: y,
3515
- onClose: _
3519
+ onClose: E
3516
3520
  }
3517
3521
  )
3518
3522
  }
@@ -8024,8 +8028,8 @@ function id(t, e, n, r) {
8024
8028
  if (f.canReplace(f.childCount, f.childCount, b.content)) {
8025
8029
  if (n) {
8026
8030
  let x = z.empty;
8027
- for (let E = m.length - 1; E >= 0; E--)
8028
- x = z.from(m[E].copy(x));
8031
+ for (let S = m.length - 1; S >= 0; S--)
8032
+ x = z.from(m[S].copy(x));
8029
8033
  let v = t.tr.step(new Ze(e.pos - m.length, e.pos + s.nodeSize, e.pos + y, e.pos + s.nodeSize - y, new Y(x, m.length, 0), 0, !0));
8030
8034
  n(v.scrollIntoView());
8031
8035
  }
@@ -8849,9 +8853,9 @@ function ry(t, e, n = {}) {
8849
8853
  t.doc.nodesBetween(f, m, (b, y) => {
8850
8854
  if (!b.isText && !b.marks.length)
8851
8855
  return;
8852
- const x = Math.max(f, y), v = Math.min(m, y + b.nodeSize), E = v - x;
8853
- i += E, l.push(...b.marks.map((_) => ({
8854
- mark: _,
8856
+ const x = Math.max(f, y), v = Math.min(m, y + b.nodeSize), S = v - x;
8857
+ i += S, l.push(...b.marks.map((E) => ({
8858
+ mark: E,
8855
8859
  from: x,
8856
8860
  to: v
8857
8861
  })));
@@ -9007,21 +9011,21 @@ const uy = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
9007
9011
  if (o) {
9008
9012
  let x = z.empty;
9009
9013
  const v = c.index(-1) ? 1 : c.index(-2) ? 2 : 3;
9010
- for (let k = c.depth - v; k >= c.depth - 3; k -= 1)
9011
- x = z.from(c.node(k).copy(x));
9012
- const E = c.indexAfter(-1) < c.node(-2).childCount ? 1 : c.indexAfter(-2) < c.node(-3).childCount ? 2 : 3, _ = {
9014
+ for (let _ = c.depth - v; _ >= c.depth - 3; _ -= 1)
9015
+ x = z.from(c.node(_).copy(x));
9016
+ const S = c.indexAfter(-1) < c.node(-2).childCount ? 1 : c.indexAfter(-2) < c.node(-3).childCount ? 2 : 3, E = {
9013
9017
  ...Kr(h, c.node().type.name, c.node().attrs),
9014
9018
  ...e
9015
- }, A = ((i = l.contentMatch.defaultType) === null || i === void 0 ? void 0 : i.createAndFill(_)) || void 0;
9019
+ }, A = ((i = l.contentMatch.defaultType) === null || i === void 0 ? void 0 : i.createAndFill(E)) || void 0;
9016
9020
  x = x.append(z.from(l.createAndFill(null, A) || void 0));
9017
- const T = c.before(c.depth - (v - 1));
9018
- n.replace(T, c.after(-E), new Y(x, 4 - v, 0));
9019
- let C = -1;
9020
- n.doc.nodesBetween(T, n.doc.content.size, (k, w) => {
9021
- if (C > -1)
9021
+ const B = c.before(c.depth - (v - 1));
9022
+ n.replace(B, c.after(-S), new Y(x, 4 - v, 0));
9023
+ let k = -1;
9024
+ n.doc.nodesBetween(B, n.doc.content.size, (_, w) => {
9025
+ if (k > -1)
9022
9026
  return !1;
9023
- k.isTextblock && k.content.size === 0 && (C = w + 1);
9024
- }), C > -1 && n.setSelection(be.near(n.doc.resolve(C))), n.scrollIntoView();
9027
+ _.isTextblock && _.content.size === 0 && (k = w + 1);
9028
+ }), k > -1 && n.setSelection(be.near(n.doc.resolve(k))), n.scrollIntoView();
9025
9029
  }
9026
9030
  return !0;
9027
9031
  }
@@ -9040,10 +9044,10 @@ const uy = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
9040
9044
  if (!Pt(n.doc, c.pos, 2))
9041
9045
  return !1;
9042
9046
  if (o) {
9043
- const { selection: x, storedMarks: v } = r, { splittableMarks: E } = s.extensionManager, _ = v || x.$to.parentOffset && x.$from.marks();
9044
- if (n.split(c.pos, 2, y).scrollIntoView(), !_ || !o)
9047
+ const { selection: x, storedMarks: v } = r, { splittableMarks: S } = s.extensionManager, E = v || x.$to.parentOffset && x.$from.marks();
9048
+ if (n.split(c.pos, 2, y).scrollIntoView(), !E || !o)
9045
9049
  return !0;
9046
- const A = _.filter((T) => E.includes(T.type.name));
9050
+ const A = E.filter((B) => S.includes(B.type.name));
9047
9051
  n.ensureMarks(A);
9048
9052
  }
9049
9053
  return !0;
@@ -9066,19 +9070,19 @@ const uy = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
9066
9070
  const o = t.doc.nodeAt(r);
9067
9071
  return n.node.type === (o == null ? void 0 : o.type) && Nn(t.doc, r) && t.join(r), !0;
9068
9072
  }, fy = (t, e, n, r = {}) => ({ editor: o, tr: s, state: i, dispatch: l, chain: c, commands: d, can: u }) => {
9069
- const { extensions: p, splittableMarks: h } = o.extensionManager, f = Fe(t, i.schema), m = Fe(e, i.schema), { selection: b, storedMarks: y } = i, { $from: x, $to: v } = b, E = x.blockRange(v), _ = y || b.$to.parentOffset && b.$from.marks();
9070
- if (!E)
9073
+ const { extensions: p, splittableMarks: h } = o.extensionManager, f = Fe(t, i.schema), m = Fe(e, i.schema), { selection: b, storedMarks: y } = i, { $from: x, $to: v } = b, S = x.blockRange(v), E = y || b.$to.parentOffset && b.$from.marks();
9074
+ if (!S)
9071
9075
  return !1;
9072
- const A = Ei((T) => Ca(T.type.name, p))(b);
9073
- if (E.depth >= 1 && A && E.depth - A.depth <= 1) {
9076
+ const A = Ei((B) => Ca(B.type.name, p))(b);
9077
+ if (S.depth >= 1 && A && S.depth - A.depth <= 1) {
9074
9078
  if (A.node.type === f)
9075
9079
  return d.liftListItem(m);
9076
9080
  if (Ca(A.node.type.name, p) && f.validContent(A.node.content) && l)
9077
9081
  return c().command(() => (s.setNodeMarkup(A.pos, f), !0)).command(() => ts(s, f)).command(() => ns(s, f)).run();
9078
9082
  }
9079
- return !n || !_ || !l ? c().command(() => u().wrapInList(f, r) ? !0 : d.clearNodes()).wrapInList(f, r).command(() => ts(s, f)).command(() => ns(s, f)).run() : c().command(() => {
9080
- const T = u().wrapInList(f, r), C = _.filter((k) => h.includes(k.type.name));
9081
- return s.ensureMarks(C), T ? !0 : d.clearNodes();
9083
+ return !n || !E || !l ? c().command(() => u().wrapInList(f, r) ? !0 : d.clearNodes()).wrapInList(f, r).command(() => ts(s, f)).command(() => ns(s, f)).run() : c().command(() => {
9084
+ const B = u().wrapInList(f, r), k = E.filter((_) => h.includes(_.type.name));
9085
+ return s.ensureMarks(k), B ? !0 : d.clearNodes();
9082
9086
  }).wrapInList(f, r).command(() => ts(s, f)).command(() => ns(s, f)).run();
9083
9087
  }, hy = (t, e = {}, n = {}) => ({ state: r, commands: o }) => {
9084
9088
  const { extendEmptyMarkRange: s = !1 } = n, i = Yt(t, r.schema);
@@ -9143,8 +9147,8 @@ const uy = ({ keepMarks: t = !0 } = {}) => ({ tr: e, state: n, dispatch: r, edit
9143
9147
  ...e
9144
9148
  }), i && b.marks.length && b.marks.forEach((x) => {
9145
9149
  if (i === x.type) {
9146
- const v = Math.max(y, d), E = Math.min(y + b.nodeSize, u);
9147
- n.addMark(v, E, i.create({
9150
+ const v = Math.max(y, d), S = Math.min(y + b.nodeSize, u);
9151
+ n.addMark(v, S, i.create({
9148
9152
  ...x.attrs,
9149
9153
  ...e
9150
9154
  }));
@@ -9517,8 +9521,8 @@ const _y = vn(
9517
9521
  if (!s) return;
9518
9522
  const p = u == null ? void 0 : u.relatedTarget, h = s.querySelector(".ProseMirror"), f = s.querySelector(".tippy-box"), m = s.querySelector("#chai-rich-text-menu-bar"), b = h == null ? void 0 : h.contains(p), y = f == null ? void 0 : f.contains(p), x = m == null ? void 0 : m.contains(p), v = window.document.getElementById("rte-widget-color-picker");
9519
9523
  if (!b && !y && !x && !v) {
9520
- const E = (d == null ? void 0 : d.getHTML()) || "";
9521
- n(E);
9524
+ const S = (d == null ? void 0 : d.getHTML()) || "";
9525
+ n(S);
9522
9526
  }
9523
9527
  },
9524
9528
  from: "canvas"
@@ -9621,45 +9625,45 @@ const _y = vn(
9621
9625
  ({ block: t, children: e }) => {
9622
9626
  const n = "content", { document: r } = St(), { editingBlockId: o, editingItemIndex: s, setEditingBlockId: i, setEditingItemIndex: l } = Cn(), [c, d] = F(null), u = ie(null), { clearHighlight: p } = Nt(), h = Ft(), { selectedLang: f } = Ke(), [, m] = re(), b = ie(null), y = o, { blockContent: x, blockType: v } = M(() => {
9623
9627
  var L;
9624
- const C = t._type;
9625
- let k = t[n];
9628
+ const k = t._type;
9629
+ let _ = t[n];
9626
9630
  const w = Oe(t._type);
9627
- return f && ((L = w == null ? void 0 : w.i18nProps) == null ? void 0 : L.includes(n)) && pe(t, `${n}-${f}`) && (k = S(t, `${n}-${f}`)), { blockContent: k, blockType: C };
9628
- }, [t, f]), E = R(
9629
- (C) => {
9631
+ return f && ((L = w == null ? void 0 : w.i18nProps) == null ? void 0 : L.includes(n)) && pe(t, `${n}-${f}`) && (_ = N(t, `${n}-${f}`)), { blockContent: _, blockType: k };
9632
+ }, [t, f]), S = R(
9633
+ (k) => {
9630
9634
  var w;
9631
- const k = C || ((w = u.current) == null ? void 0 : w.innerText);
9632
- h([y], { [n]: k }), d(null), i(""), l(-1), m([]), y && setTimeout(() => m([y]), 100);
9635
+ const _ = k || ((w = u.current) == null ? void 0 : w.innerText);
9636
+ h([y], { [n]: _ }), d(null), i(""), l(-1), m([]), y && setTimeout(() => m([y]), 100);
9633
9637
  },
9634
9638
  [h, y, i, l, m]
9635
- ), _ = Ut(
9636
- (C) => {
9637
- h([y], { [n]: C });
9639
+ ), E = Ut(
9640
+ (k) => {
9641
+ h([y], { [n]: k });
9638
9642
  },
9639
9643
  [y, t, h, f],
9640
9644
  1e3
9641
9645
  ), A = R(
9642
- (C) => {
9643
- C.preventDefault(), y && (b.current = y), E(), setTimeout(() => {
9644
- const k = b.current;
9645
- b.current = null, k && m([k]);
9646
+ (k) => {
9647
+ k.preventDefault(), y && (b.current = y), S(), setTimeout(() => {
9648
+ const _ = b.current;
9649
+ b.current = null, _ && m([_]);
9646
9650
  }, 100);
9647
9651
  },
9648
- [y, E, m]
9652
+ [y, S, m]
9649
9653
  );
9650
9654
  H(() => {
9651
- var B;
9655
+ var T;
9652
9656
  if (!y || !r) return;
9653
- const C = `[data-block-id="${y}"]`, k = s >= 0 ? `[data-block-index="${s}"]` : "", w = r.querySelector(`${C}${k}`);
9654
- w && ((B = w == null ? void 0 : w.classList) == null || B.add("sr-only"), jp(() => d(w)));
9657
+ const k = `[data-block-id="${y}"]`, _ = s >= 0 ? `[data-block-index="${s}"]` : "", w = r.querySelector(`${k}${_}`);
9658
+ w && ((T = w == null ? void 0 : w.classList) == null || T.add("sr-only"), jp(() => d(w)));
9655
9659
  }, [y, v, r, s]);
9656
- const T = M(() => c ? (p(), ["RichText", "Paragraph"].includes(v) ? /* @__PURE__ */ a(
9660
+ const B = M(() => c ? (p(), ["RichText", "Paragraph"].includes(v) ? /* @__PURE__ */ a(
9657
9661
  _y,
9658
9662
  {
9659
9663
  blockContent: x,
9660
9664
  editingElement: c,
9661
- onChange: _,
9662
- onClose: E,
9665
+ onChange: E,
9666
+ onClose: S,
9663
9667
  onEscape: A
9664
9668
  }
9665
9669
  ) : /* @__PURE__ */ a(
@@ -9668,13 +9672,13 @@ const _y = vn(
9668
9672
  editorRef: u,
9669
9673
  blockContent: x,
9670
9674
  editingElement: c,
9671
- onClose: E,
9672
- onChange: _,
9675
+ onClose: S,
9676
+ onChange: E,
9673
9677
  onEscape: A
9674
9678
  }
9675
- )) : null, [c, p, v, x, E, _, A]);
9679
+ )) : null, [c, p, v, x, S, E, A]);
9676
9680
  return /* @__PURE__ */ g(Z, { children: [
9677
- T,
9681
+ B,
9678
9682
  e
9679
9683
  ] });
9680
9684
  },
@@ -9707,7 +9711,7 @@ const _y = vn(
9707
9711
  blockAtom: e,
9708
9712
  children: n
9709
9713
  }) => {
9710
- const { editingBlockId: r, editingItemIndex: o } = Cn(), [s] = O(e), i = M(() => Oe(s._type), [s._type]), { selectedLang: l, fallbackLang: c } = Ke(), d = Jm(), u = Cr(), [p] = O(ai), h = S(i, "component", null), { index: f, key: m } = Wn(yd), { mode: b } = kc(), y = Ge(kr), x = yt(), v = b === "edit", E = Km(), _ = M(
9714
+ const { editingBlockId: r, editingItemIndex: o } = Cn(), [s] = O(e), i = M(() => Oe(s._type), [s._type]), { selectedLang: l, fallbackLang: c } = Ke(), d = Jm(), u = Cr(), [p] = O(ai), h = N(i, "component", null), { index: f, key: m } = Wn(yd), { mode: b } = kc(), y = Ge(kr), x = yt(), v = b === "edit", S = Km(), E = M(
9711
9715
  () => p ? vl(Yi(s, l, i), u, {
9712
9716
  index: f,
9713
9717
  key: m
@@ -9716,10 +9720,10 @@ const _y = vn(
9716
9720
  ), A = M(
9717
9721
  () => Xi(s, !0, y),
9718
9722
  [s, Xi, y]
9719
- ), T = M(
9723
+ ), B = M(
9720
9724
  () => d(s._id, qi(s._type)),
9721
9725
  [s._id, s._type, d, qi]
9722
- ), C = M(() => {
9726
+ ), k = M(() => {
9723
9727
  const W = {
9724
9728
  "data-block-id": s._id,
9725
9729
  "data-block-type": s._type,
@@ -9728,32 +9732,32 @@ const _y = vn(
9728
9732
  return v && x ? {
9729
9733
  ...W,
9730
9734
  draggable: !r,
9731
- onMouseDown: E.onMouseDown,
9732
- onDragStart: E.onDragStart,
9733
- onDragEnd: E.onDragEnd
9735
+ onMouseDown: S.onMouseDown,
9736
+ onDragStart: S.onDragStart,
9737
+ onDragEnd: S.onDragEnd
9734
9738
  } : W;
9735
- }, [s._id, s._type, f, v, x, E, r]), k = M(
9739
+ }, [s._id, s._type, f, v, x, S, r]), _ = M(
9736
9740
  () => ({
9737
- blockProps: C,
9741
+ blockProps: k,
9738
9742
  inBuilder: b === "edit",
9739
9743
  lang: l || c,
9740
9744
  pageData: u,
9741
- ..._,
9745
+ ...E,
9742
9746
  ...A,
9743
- ...T,
9747
+ ...B,
9744
9748
  ...t
9745
9749
  }),
9746
- [b, C, l, c, _, A, T, t]
9747
- ), w = M(() => !By.includes(s._type), [s._type]), B = M(() => S(s, "_show", !0), [s]);
9748
- if (Bs(h) || !B) return null;
9750
+ [b, k, l, c, E, A, B, t]
9751
+ ), w = M(() => !By.includes(s._type), [s._type]), T = M(() => N(s, "_show", !0), [s]);
9752
+ if (Bs(h) || !T) return null;
9749
9753
  let L = /* @__PURE__ */ a(je, { children: fn(h, {
9750
- ...k,
9754
+ ..._,
9751
9755
  children: n({
9752
9756
  _id: s._id,
9753
9757
  _type: s._type,
9754
- ...Ts(_.repeaterItems) ? {
9755
- repeaterItems: nf(_.repeaterItems, s),
9756
- $repeaterItemsKey: _.$repeaterItemsKey
9758
+ ...Ts(E.repeaterItems) ? {
9759
+ repeaterItems: nf(E.repeaterItems, s),
9760
+ $repeaterItemsKey: E.$repeaterItemsKey
9757
9761
  } : {},
9758
9762
  ...s.partialBlockId ? { partialBlockId: s.partialBlockId } : "",
9759
9763
  ...s.globalBlock ? { partialBlockId: s.globalBlock } : ""
@@ -9801,7 +9805,7 @@ const _y = vn(
9801
9805
  (l) => ee(t, (c) => c._parent === l).length > 0,
9802
9806
  [t]
9803
9807
  );
9804
- return (r === "Heading" || r === "Paragraph" || r === "Link") && (s = tf(s)), N(s, (l) => {
9808
+ return (r === "Heading" || r === "Paragraph" || r === "Link") && (s = tf(s)), C(s, (l) => {
9805
9809
  const c = o(l._id);
9806
9810
  return c ? /* @__PURE__ */ a(Xm, { block: l, children: (d) => /* @__PURE__ */ a(Iy, { blockAtom: c, asyncProps: d, children: ({ _id: u, _type: p, partialBlockId: h, repeaterItems: f, $repeaterItemsKey: m }) => p === "Repeater" ? Ts(f) && f.map((b, y) => /* @__PURE__ */ a(yd.Provider, { value: { index: y, key: m }, children: /* @__PURE__ */ a(po, { splitAtoms: n, blocks: t, parent: l._id, type: p }) }, `${u}-${y}`)) : p === "GlobalBlock" || p === "PartialBlock" ? /* @__PURE__ */ a(Gp, { store: ft, children: /* @__PURE__ */ a(Ly, { partialBlockId: h }) }) : i(u) ? /* @__PURE__ */ a(po, { splitAtoms: n, blocks: t, parent: l._id, type: p }) : null }) }, l._id) : null;
9807
9811
  });
@@ -9951,7 +9955,7 @@ const zy = () => {
9951
9955
  /* @__PURE__ */ a("p", { className: "font-semibold", children: t("Oops! Something went wrong.") }),
9952
9956
  /* @__PURE__ */ a("p", { children: t("Please try again.") })
9953
9957
  ] }) });
9954
- }, Vy = P(null), kd = () => O(Vy), jy = Q.lazy(() => import("./code-editor-CYiIxUKp.js")), Wy = () => {
9958
+ }, Vy = P(null), kd = () => O(Vy), jy = Q.lazy(() => import("./code-editor-CTMQr0aU.js")), Wy = () => {
9955
9959
  const [t] = kd(), e = G("onError", kt);
9956
9960
  return /* @__PURE__ */ a("div", { className: "flex h-full max-h-full w-full flex-1 flex-col", children: /* @__PURE__ */ g("div", { className: "relative flex h-full max-h-full flex-col overflow-hidden bg-gray-100/40", children: [
9957
9961
  /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a(Fn, { className: "h-full" }), children: /* @__PURE__ */ a(cn, { fallback: /* @__PURE__ */ a(dr, {}), onError: e, children: /* @__PURE__ */ a(Hy, {}) }) }),
@@ -10146,7 +10150,7 @@ const zy = () => {
10146
10150
  za: "Zhuang, Chuang",
10147
10151
  zu: "Zulu"
10148
10152
  }, Gy = ({ id: t, placeholder: e }) => {
10149
- const { t: n } = U(), [, r] = kd(), { selectedLang: o } = Ke(), s = de(), i = t.replace("root.", ""), l = Oe(s == null ? void 0 : s._type), d = Be(S(l, "i18nProps", []), i) && o ? `${i}-${o}` : i, u = S(s, d, ""), p = M(() => S(Hn, o, o), [o]), h = () => {
10153
+ const { t: n } = U(), [, r] = kd(), { selectedLang: o } = Ke(), s = de(), i = t.replace("root.", ""), l = Oe(s == null ? void 0 : s._type), d = Be(N(l, "i18nProps", []), i) && o ? `${i}-${o}` : i, u = N(s, d, ""), p = M(() => N(Hn, o, o), [o]), h = () => {
10150
10154
  const f = s == null ? void 0 : s._id;
10151
10155
  r({ blockId: f, blockProp: d, placeholder: e, initialCode: u });
10152
10156
  };
@@ -10169,12 +10173,12 @@ const zy = () => {
10169
10173
  /* @__PURE__ */ a(te, { onClick: h, size: "sm", variant: "outline", className: "w-fit", children: n("Open code editor") })
10170
10174
  ] });
10171
10175
  }, Uy = ({ id: t, value: e, onChange: n, onBlur: r }) => {
10172
- const o = G("collections", []), s = de(), i = S(s, "repeaterItems", "").replace(/\{\{(.*)\}\}/g, "$1").replace(Lt, ""), l = ne(o, { id: i }), d = S(l, t === "root.filter" ? "filters" : "sorts", []);
10176
+ const o = G("collections", []), s = de(), i = N(s, "repeaterItems", "").replace(/\{\{(.*)\}\}/g, "$1").replace(Lt, ""), l = ne(o, { id: i }), d = N(l, t === "root.filter" ? "filters" : "sorts", []);
10173
10177
  return /* @__PURE__ */ a("div", { children: /* @__PURE__ */ g("select", { value: e, onChange: (u) => n(u.target.value), onBlur: (u) => r(t, u.target.value), children: [
10174
10178
  /* @__PURE__ */ a("option", { value: "", children: "Select" }),
10175
10179
  d.map((u) => /* @__PURE__ */ a("option", { value: u.id, children: u.name }, u.id))
10176
10180
  ] }) });
10177
- }, Ky = $s(() => import("./IconPicker-BZvFj3cg.js").then((t) => ({ default: t.IconPicker }))), Jy = (t) => {
10181
+ }, Ky = $s(() => import("./IconPicker-jc6_JzXf.js").then((t) => ({ default: t.IconPicker }))), Jy = (t) => {
10178
10182
  try {
10179
10183
  let e = t.replace(/<svg([^>]*)\sheight="[^"]*"([^>]*)>/gi, "<svg$1$2>").replace(/<svg([^>]*)\swidth="[^"]*"([^>]*)>/gi, "<svg$1$2>");
10180
10184
  return e = e.replace(/>\s+</g, "><"), e = e.replace(/\n/g, "").replace(/\s{2,}/g, " "), e = e.replace(/\s+=/g, "=").replace(/=\s+/g, "="), e = e.replace(/<!--[\s\S]*?-->/g, ""), e.trim();
@@ -10287,19 +10291,19 @@ const Vr = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
10287
10291
  const e = ((o = t.split("/").pop()) == null ? void 0 : o.split("?")[0]) || "";
10288
10292
  return [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg", ".bmp", ".ico", ".avif"].some((s) => e.toLowerCase().endsWith(s)) ? e : "";
10289
10293
  }, tx = ({ value: t, onChange: e, id: n, onBlur: r, uiSchema: o }) => {
10290
- const { t: s } = U(), { selectedLang: i } = Ke(), l = de(), c = Ft(), d = Cr(), u = (o == null ? void 0 : o["ui:allowEmpty"]) === !0, p = n.split(".").pop() || "", h = i ? `_${p}Id-${i}` : `_${p}Id`, f = $(i) && (l == null ? void 0 : l._type) === "Image" && pe(l, "assetId"), m = S(l, h, f ? l == null ? void 0 : l.assetId : ""), b = M(() => {
10294
+ const { t: s } = U(), { selectedLang: i } = Ke(), l = de(), c = Ft(), d = Cr(), u = (o == null ? void 0 : o["ui:allowEmpty"]) === !0, p = n.split(".").pop() || "", h = i ? `_${p}Id-${i}` : `_${p}Id`, f = $(i) && (l == null ? void 0 : l._type) === "Image" && pe(l, "assetId"), m = N(l, h, f ? l == null ? void 0 : l.assetId : ""), b = M(() => {
10291
10295
  if (!t || !l || !/\{\{.*?\}\}/.test(t)) return t;
10292
- const A = { ...l, [p]: t }, T = vl(A, d, { index: -1, key: "" });
10293
- return S(T, p, t);
10294
- }, [t, l, d, p]), y = !!m || b !== Vr && b !== "", x = (_) => {
10295
- const A = Ts(_) ? Ce(_) : _;
10296
+ const A = { ...l, [p]: t }, B = vl(A, d, { index: -1, key: "" });
10297
+ return N(B, p, t);
10298
+ }, [t, l, d, p]), y = !!m || b !== Vr && b !== "", x = (E) => {
10299
+ const A = Ts(E) ? Ce(E) : E;
10296
10300
  if (A) {
10297
10301
  e(A == null ? void 0 : A.url);
10298
- const T = A == null ? void 0 : A.width, C = A == null ? void 0 : A.height, k = h.includes("mobile");
10302
+ const B = A == null ? void 0 : A.width, k = A == null ? void 0 : A.height, _ = h.includes("mobile");
10299
10303
  if (l != null && l._id) {
10300
10304
  const w = {
10301
- ...T && { [k ? "mobileWidth" : "width"]: T },
10302
- ...C && { [k ? "mobileHeight" : "height"]: C },
10305
+ ...B && { [_ ? "mobileWidth" : "width"]: B },
10306
+ ...k && { [_ ? "mobileHeight" : "height"]: k },
10303
10307
  ...A.description && { alt: A.description }
10304
10308
  };
10305
10309
  if (We(w, h, A.id), $(w)) return;
@@ -10308,10 +10312,10 @@ const Vr = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
10308
10312
  }
10309
10313
  }, v = R(() => {
10310
10314
  if (e(u ? "" : Vr), l != null && l._id) {
10311
- const A = {}, T = h.includes("mobile");
10312
- We(A, h, ""), We(A, T ? "mobileWidth" : "width", ""), We(A, T ? "mobileHeight" : "height", ""), c([l._id], A);
10315
+ const A = {}, B = h.includes("mobile");
10316
+ We(A, h, ""), We(A, B ? "mobileWidth" : "width", ""), We(A, B ? "mobileHeight" : "height", ""), c([l._id], A);
10313
10317
  }
10314
- }, [l, e, c, h, u]), E = ex(b);
10318
+ }, [l, e, c, h, u]), S = ex(b);
10315
10319
  return /* @__PURE__ */ g("div", { className: "mt-1.5 flex items-start gap-x-3", children: [
10316
10320
  b ? /* @__PURE__ */ g("div", { className: "group relative", children: [
10317
10321
  /* @__PURE__ */ a(
@@ -10342,7 +10346,7 @@ const Vr = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
10342
10346
  ] }) : /* @__PURE__ */ a(Jr, { onSelect: x, mode: "image", assetId: m, children: /* @__PURE__ */ a("div", { className: "h-14 w-14 cursor-pointer rounded-md border border-border bg-[radial-gradient(#AAA,transparent_1px)] duration-300 [background-size:10px_10px]" }) }),
10343
10347
  /* @__PURE__ */ g("div", { className: "flex w-3/5 flex-col", children: [
10344
10348
  /* @__PURE__ */ g(Z, { children: [
10345
- /* @__PURE__ */ a("p", { className: "max-w-[250px] truncate pr-2 text-xs text-gray-400", children: E }),
10349
+ /* @__PURE__ */ a("p", { className: "max-w-[250px] truncate pr-2 text-xs text-gray-400", children: S }),
10346
10350
  /* @__PURE__ */ a(Jr, { onSelect: x, assetId: "", children: /* @__PURE__ */ a("small", { className: "mb-1 h-6 w-full cursor-pointer rounded-md bg-secondary px-1 py-1 text-center text-xs text-secondary-foreground hover:bg-secondary/80", children: !$(b) && b !== Vr ? s("Replace image") : s("Choose image") }) }),
10347
10351
  /* @__PURE__ */ a("div", { className: "text-center text-xs text-gray-400", children: "OR" })
10348
10352
  ] }),
@@ -10357,8 +10361,8 @@ const Vr = "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAwIiBoZWlnaHQ9IjQwMCIgeG
10357
10361
  className: "h-6 text-xs",
10358
10362
  placeholder: s("Enter image URL"),
10359
10363
  value: t === Vr ? "" : t,
10360
- onBlur: ({ target: { value: _ } }) => r(n, _),
10361
- onChange: (_) => e(_.target.value)
10364
+ onBlur: ({ target: { value: E } }) => r(n, E),
10365
+ onChange: (E) => e(E.target.value)
10362
10366
  }
10363
10367
  )
10364
10368
  ] })
@@ -10576,20 +10580,20 @@ const Rd = ({
10576
10580
  }) => {
10577
10581
  const o = Cr(), s = G("flags.dataBinding", !0), i = Jf(), l = de(), c = M(() => {
10578
10582
  if (i.length === 1) return "";
10579
- const p = i.find((m) => m._type === "Repeater"), f = S(p, "repeaterItems", "").replace(/\{\{(.*)\}\}/g, "$1");
10583
+ const p = i.find((m) => m._type === "Repeater"), f = N(p, "repeaterItems", "").replace(/\{\{(.*)\}\}/g, "$1");
10580
10584
  return `${ir}${Re(f, Lt) ? `${f}/${p == null ? void 0 : p._id}` : f}`;
10581
- }, [i]), d = M(() => Ce(S(o, c.replace(ir, ""), [])), [c, o]), u = R(
10585
+ }, [i]), d = M(() => Ce(N(o, c.replace(ir, ""), [])), [c, o]), u = R(
10582
10586
  (p, h) => {
10583
10587
  if (p = $(c) ? p : p.replace(`${c}`, "$index"), h === "array" || h === "object") {
10584
10588
  e(`{{${p}}}`, {}, n);
10585
10589
  return;
10586
10590
  }
10587
- const f = (x) => /[.,!?;:]/.test(x), m = (x, v, E) => {
10588
- let _ = "", A = "";
10589
- const T = v > 0 ? x[v - 1] : "", C = v < x.length ? x[v] : "";
10590
- return v > 0 && (T === "." || !f(T) && T !== " ") && (_ = " "), v < x.length && !f(C) && C !== " " && (A = " "), {
10591
- text: _ + E + A,
10592
- prefixLength: _.length,
10591
+ const f = (x) => /[.,!?;:]/.test(x), m = (x, v, S) => {
10592
+ let E = "", A = "";
10593
+ const B = v > 0 ? x[v - 1] : "", k = v < x.length ? x[v] : "";
10594
+ return v > 0 && (B === "." || !f(B) && B !== " ") && (E = " "), v < x.length && !f(k) && k !== " " && (A = " "), {
10595
+ text: E + S + A,
10596
+ prefixLength: E.length,
10593
10597
  suffixLength: A.length
10594
10598
  };
10595
10599
  }, b = document.getElementById(n);
@@ -10600,28 +10604,28 @@ const Rd = ({
10600
10604
  if (x) {
10601
10605
  const v = `{{${p}}}`;
10602
10606
  x.commands.focus();
10603
- const { from: E, to: _ } = x.state.selection;
10604
- if (E !== _)
10607
+ const { from: S, to: E } = x.state.selection;
10608
+ if (S !== E)
10605
10609
  x.chain().deleteSelection().insertContent(v).run();
10606
10610
  else {
10607
- const { state: T } = x, C = T.selection.from, k = T.doc.textBetween(Math.max(0, C - 1), C), w = T.doc.textBetween(C, Math.min(C + 1, T.doc.content.size));
10608
- let B = "";
10609
- C > 0 && k !== " " && !f(k) && (B = " ");
10611
+ const { state: B } = x, k = B.selection.from, _ = B.doc.textBetween(Math.max(0, k - 1), k), w = B.doc.textBetween(k, Math.min(k + 1, B.doc.content.size));
10612
+ let T = "";
10613
+ k > 0 && _ !== " " && !f(_) && (T = " ");
10610
10614
  let L = "";
10611
- w && w !== " " && !f(w) && (L = " "), x.chain().insertContent(B + v + L).run();
10615
+ w && w !== " " && !f(w) && (L = " "), x.chain().insertContent(T + v + L).run();
10612
10616
  }
10613
10617
  setTimeout(() => e(x.getHTML(), {}, n), 100);
10614
10618
  return;
10615
10619
  }
10616
10620
  } else {
10617
- const x = b, v = x.selectionStart || 0, E = x.value || "", _ = x.selectionEnd || v;
10618
- if (_ > v) {
10619
- const w = `{{${p}}}`, { text: B } = m(E, v, w), L = E.slice(0, v) + B + E.slice(_);
10621
+ const x = b, v = x.selectionStart || 0, S = x.value || "", E = x.selectionEnd || v;
10622
+ if (E > v) {
10623
+ const w = `{{${p}}}`, { text: T } = m(S, v, w), L = S.slice(0, v) + T + S.slice(E);
10620
10624
  e(L, {}, n);
10621
10625
  return;
10622
10626
  }
10623
- const T = `{{${p}}}`, { text: C } = m(E, v, T), k = E.slice(0, v) + C + E.slice(v);
10624
- e(k, {}, n);
10627
+ const B = `{{${p}}}`, { text: k } = m(S, v, B), _ = S.slice(0, v) + k + S.slice(v);
10628
+ e(_, {}, n);
10625
10629
  }
10626
10630
  },
10627
10631
  [n, e, r, l == null ? void 0 : l._id, c]
@@ -10641,14 +10645,14 @@ const Rd = ({
10641
10645
  const { id: e, classNames: n, label: r, children: o, errors: s, help: i, hidden: l, required: c, schema: d, formData: u, onChange: p } = t, { selectedLang: h, fallbackLang: f, languages: m } = Ke(), b = M(
10642
10646
  () => $(m) ? "" : $(h) ? f : h,
10643
10647
  [m, h, f]
10644
- ), y = M(() => S(Hn, b, b), [b]), x = Cr(), v = de(), E = Fs(), _ = M(
10645
- () => S(E, [v == null ? void 0 : v._type, "i18nProps"], []),
10646
- [E, v == null ? void 0 : v._type]
10647
- ), [A, T] = F(null);
10648
+ ), y = M(() => N(Hn, b, b), [b]), x = Cr(), v = de(), S = Fs(), E = M(
10649
+ () => N(S, [v == null ? void 0 : v._type, "i18nProps"], []),
10650
+ [S, v == null ? void 0 : v._type]
10651
+ ), [A, B] = F(null);
10648
10652
  if (l)
10649
10653
  return null;
10650
10654
  if (d.type === "boolean") return /* @__PURE__ */ a("div", { className: n, children: o });
10651
- const k = _ == null ? void 0 : _.includes(e.replace("root.", ""));
10655
+ const _ = E == null ? void 0 : E.includes(e.replace("root.", ""));
10652
10656
  if (d.type === "array") {
10653
10657
  const L = A === e;
10654
10658
  return /* @__PURE__ */ g("div", { className: `${n} relative`, children: [
@@ -10656,7 +10660,7 @@ const Rd = ({
10656
10660
  "label",
10657
10661
  {
10658
10662
  htmlFor: e,
10659
- onClick: () => T(L ? null : e),
10663
+ onClick: () => B(L ? null : e),
10660
10664
  className: "flex cursor-pointer items-center gap-x-1 py-1 leading-tight duration-200 hover:bg-slate-100",
10661
10665
  children: [
10662
10666
  L ? /* @__PURE__ */ a(xn, { className: "h-3 w-3" }) : /* @__PURE__ */ a(jn, { className: "h-3 w-3" }),
@@ -10685,14 +10689,14 @@ const Rd = ({
10685
10689
  ] })
10686
10690
  ] });
10687
10691
  }
10688
- const w = e.replace("root.", ""), B = _.includes(w) && !$(h) && $(u);
10692
+ const w = e.replace("root.", ""), T = E.includes(w) && !$(h) && $(u);
10689
10693
  return /* @__PURE__ */ g("div", { className: n, children: [
10690
10694
  d.title && /* @__PURE__ */ g("div", { className: "flex items-center justify-between", children: [
10691
10695
  /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
10692
10696
  /* @__PURE__ */ g("label", { htmlFor: e, className: d.type === "object" ? "pb-2" : "", children: [
10693
10697
  r,
10694
10698
  " ",
10695
- k && /* @__PURE__ */ g("small", { className: "text-[9px] text-zinc-400", children: [
10699
+ _ && /* @__PURE__ */ g("small", { className: "text-[9px] text-zinc-400", children: [
10696
10700
  " ",
10697
10701
  y
10698
10702
  ] }),
@@ -10704,7 +10708,7 @@ const Rd = ({
10704
10708
  ] }) })
10705
10709
  ] }),
10706
10710
  !d.enum && !d.oneOf && x && /* @__PURE__ */ g("span", { className: "flex items-center space-x-1", children: [
10707
- B ? /* @__PURE__ */ g(Ee, { children: [
10711
+ T ? /* @__PURE__ */ g(Ee, { children: [
10708
10712
  /* @__PURE__ */ a(_e, { asChild: !0, children: /* @__PURE__ */ g(
10709
10713
  "svg",
10710
10714
  {
@@ -10753,45 +10757,45 @@ const Rd = ({
10753
10757
  pageTypes: e,
10754
10758
  onChange: n
10755
10759
  }) => {
10756
- var k;
10757
- const { t: r } = U(), o = G("searchPageTypeItems", (w, B) => []), [s, i] = F(!1), [l, c] = F(!1), [d, u] = F("page"), [p, h] = F(""), [f, m] = F([]), [b, y] = F(-1), x = ie(null), v = (k = e == null ? void 0 : e.find((w) => w.key === d)) == null ? void 0 : k.name;
10760
+ var _;
10761
+ const { t: r } = U(), o = G("searchPageTypeItems", (w, T) => []), [s, i] = F(!1), [l, c] = F(!1), [d, u] = F("page"), [p, h] = F(""), [f, m] = F([]), [b, y] = F(-1), x = ie(null), v = (_ = e == null ? void 0 : e.find((w) => w.key === d)) == null ? void 0 : _.name;
10758
10762
  H(() => {
10759
10763
  if (h(""), m([]), y(-1), c(!1), !t || s || !Re(t, "pageType:")) return;
10760
- const w = zu(t, ":"), B = S(w, 1, "page") || "page";
10761
- u(B), (async () => {
10762
- const L = await o(B, [S(w, 2, "page")]);
10763
- L && Array.isArray(L) && h(S(L, [0, "name"], ""));
10764
+ const w = zu(t, ":"), T = N(w, 1, "page") || "page";
10765
+ u(T), (async () => {
10766
+ const L = await o(T, [N(w, 2, "page")]);
10767
+ L && Array.isArray(L) && h(N(L, [0, "name"], ""));
10764
10768
  })();
10765
10769
  }, [t]);
10766
- const E = Ut(
10770
+ const S = Ut(
10767
10771
  async (w) => {
10768
10772
  if ($(w))
10769
10773
  m([]);
10770
10774
  else {
10771
- const B = await o(d, w);
10772
- m(B);
10775
+ const T = await o(d, w);
10776
+ m(T);
10773
10777
  }
10774
10778
  i(!1), y(-1);
10775
10779
  },
10776
10780
  [d],
10777
10781
  300
10778
- ), _ = (w) => {
10779
- const B = ["pageType", d, w.primaryPage ?? w.id];
10780
- B[1] && (n(B.join(":")), h(w.name), c(!1), m([]), y(-1));
10782
+ ), E = (w) => {
10783
+ const T = ["pageType", d, w.primaryPage ?? w.id];
10784
+ T[1] && (n(T.join(":")), h(w.name), c(!1), m([]), y(-1));
10781
10785
  }, A = (w) => {
10782
10786
  switch (w.key) {
10783
10787
  case "ArrowDown":
10784
- w.preventDefault(), y((B) => B < f.length - 1 ? B + 1 : B);
10788
+ w.preventDefault(), y((T) => T < f.length - 1 ? T + 1 : T);
10785
10789
  break;
10786
10790
  case "ArrowUp":
10787
- w.preventDefault(), y((B) => B > 0 ? B - 1 : B);
10791
+ w.preventDefault(), y((T) => T > 0 ? T - 1 : T);
10788
10792
  break;
10789
10793
  case "Enter":
10790
10794
  if (w.preventDefault(), f.length === 0) return;
10791
- b >= 0 && _(f[b]);
10795
+ b >= 0 && E(f[b]);
10792
10796
  break;
10793
10797
  case "Escape":
10794
- w.preventDefault(), T();
10798
+ w.preventDefault(), B();
10795
10799
  break;
10796
10800
  }
10797
10801
  };
@@ -10801,26 +10805,26 @@ const Rd = ({
10801
10805
  w == null || w.scrollIntoView({ block: "nearest" });
10802
10806
  }
10803
10807
  }, [b]);
10804
- const T = () => {
10808
+ const B = () => {
10805
10809
  h(""), m([]), y(-1), c(!1), n("");
10806
- }, C = (w) => {
10807
- h(w), c(!$(w)), i(!0), E(w);
10810
+ }, k = (w) => {
10811
+ h(w), c(!$(w)), i(!0), S(w);
10808
10812
  };
10809
10813
  return /* @__PURE__ */ g("div", { children: [
10810
- /* @__PURE__ */ a("select", { name: "pageType", value: d, onChange: (w) => u(w.target.value), children: N(e, (w) => /* @__PURE__ */ a("option", { value: w.key, children: w.name }, w.key)) }),
10814
+ /* @__PURE__ */ a("select", { name: "pageType", value: d, onChange: (w) => u(w.target.value), children: C(e, (w) => /* @__PURE__ */ a("option", { value: w.key, children: w.name }, w.key)) }),
10811
10815
  d && /* @__PURE__ */ g("div", { className: "group relative mt-2 flex items-center", children: [
10812
10816
  /* @__PURE__ */ a(
10813
10817
  "input",
10814
10818
  {
10815
10819
  type: "text",
10816
10820
  value: p,
10817
- onChange: (w) => C(w.target.value),
10821
+ onChange: (w) => k(w.target.value),
10818
10822
  onKeyDown: A,
10819
10823
  placeholder: r(`Search ${v ?? ""}`),
10820
10824
  className: "w-full rounded-md border border-gray-300 p-2 pr-16"
10821
10825
  }
10822
10826
  ),
10823
- /* @__PURE__ */ a("div", { className: "absolute bottom-2 right-2 top-3 flex items-center gap-1.5", children: p && /* @__PURE__ */ a("button", { onClick: T, className: "text-gray-400 hover:text-gray-600", title: r("Clear search"), children: /* @__PURE__ */ a(qe, { className: "h-4 w-4" }) }) })
10827
+ /* @__PURE__ */ a("div", { className: "absolute bottom-2 right-2 top-3 flex items-center gap-1.5", children: p && /* @__PURE__ */ a("button", { onClick: B, className: "text-gray-400 hover:text-gray-600", title: r("Clear search"), children: /* @__PURE__ */ a(qe, { className: "h-4 w-4" }) }) })
10824
10828
  ] }),
10825
10829
  (s || !$(f) || l && $(f)) && /* @__PURE__ */ a("div", { className: "absolute z-40 mt-2 max-h-40 w-full max-w-[250px] overflow-y-auto rounded-md border border-border bg-background shadow-lg", children: s ? /* @__PURE__ */ g("div", { className: "space-y-1 p-2", children: [
10826
10830
  /* @__PURE__ */ a("div", { className: "h-6 w-full animate-pulse rounded bg-gray-200" }),
@@ -10830,11 +10834,11 @@ const Rd = ({
10830
10834
  ' "',
10831
10835
  p,
10832
10836
  '"'
10833
- ] }) : /* @__PURE__ */ a("ul", { ref: x, children: N(f == null ? void 0 : f.slice(0, 20), (w, B) => /* @__PURE__ */ g(
10837
+ ] }) : /* @__PURE__ */ a("ul", { ref: x, children: C(f == null ? void 0 : f.slice(0, 20), (w, T) => /* @__PURE__ */ g(
10834
10838
  "li",
10835
10839
  {
10836
- onClick: () => _(w),
10837
- className: `cursor-pointer p-2 text-xs ${t != null && t.includes(w.id) ? "bg-blue-200" : B === b ? "bg-gray-100" : "hover:bg-gray-100"}`,
10840
+ onClick: () => E(w),
10841
+ className: `cursor-pointer p-2 text-xs ${t != null && t.includes(w.id) ? "bg-blue-200" : T === b ? "bg-gray-100" : "hover:bg-gray-100"}`,
10838
10842
  children: [
10839
10843
  w.name,
10840
10844
  " ",
@@ -10853,7 +10857,7 @@ const Rd = ({
10853
10857
  const { t: o } = U(), { type: s = "pageType", href: i = "", target: l = "self" } = e ?? {}, c = G("pageTypes", []), { selectedLang: d, fallbackLang: u, languages: p } = Ke(), h = M(
10854
10858
  () => $(p) ? "" : $(d) ? u : d,
10855
10859
  [p, d, u]
10856
- ), f = M(() => S(Hn, h, h), [h]), m = s === "pageType" && $(c) ? "url" : s;
10860
+ ), f = M(() => N(Hn, h, h), [h]), m = s === "pageType" && $(c) ? "url" : s;
10857
10861
  return /* @__PURE__ */ g("div", { children: [
10858
10862
  /* @__PURE__ */ g("span", { className: "flex items-center justify-between gap-x-2 text-xs font-medium", children: [
10859
10863
  /* @__PURE__ */ g("span", { children: [
@@ -10873,7 +10877,7 @@ const Rd = ({
10873
10877
  )
10874
10878
  ] }),
10875
10879
  /* @__PURE__ */ g("div", { className: "flex flex-col gap-y-1.5", children: [
10876
- /* @__PURE__ */ a("select", { name: "type", value: s, onChange: (b) => n({ ...e, type: b.target.value }), children: N(
10880
+ /* @__PURE__ */ a("select", { name: "type", value: s, onChange: (b) => n({ ...e, type: b.target.value }), children: C(
10877
10881
  [
10878
10882
  ...$(c) ? [] : [{ const: "pageType", title: o("Goto Page") }],
10879
10883
  { const: "url", title: o("Open URL") },
@@ -10989,7 +10993,7 @@ const Bi = () => Ge(Ld), cx = () => {
10989
10993
  ]
10990
10994
  }
10991
10995
  ) });
10992
- }, dx = Q.lazy(() => import("./rte-widget-modal-29WtCMJs.js")), ux = ({ blockId: t, id: e, placeholder: n, value: r, onChange: o, onBlur: s }) => {
10996
+ }, dx = Q.lazy(() => import("./rte-widget-modal-Bj7lxFEs.js")), ux = ({ blockId: t, id: e, placeholder: n, value: r, onChange: o, onBlur: s }) => {
10993
10997
  const i = ie(null), [l, c] = F(!1), d = bd({
10994
10998
  blockId: t,
10995
10999
  value: r,
@@ -11031,23 +11035,23 @@ const Bi = () => Ge(Ld), cx = () => {
11031
11035
  r(s);
11032
11036
  }, [s]), n && n !== e ? /* @__PURE__ */ a(ux, { ...t, blockId: n }, n) : null;
11033
11037
  }, fx = ({ formData: t, onChange: e }) => {
11034
- const [n] = fe(), r = de(), o = Bi(), { addCoreBlock: s } = kn(), [, i] = re(), l = (r == null ? void 0 : r._type) === "Slider" ? r : o, c = ne(n, { _parent: l == null ? void 0 : l._id, _type: "Slides" }), d = ee(n, { _parent: c == null ? void 0 : c._id, _type: "Slide" }), u = (t == null ? void 0 : t.currentSlide) || S(d, "0._id");
11038
+ const [n] = fe(), r = de(), o = Bi(), { addCoreBlock: s } = kn(), [, i] = re(), l = (r == null ? void 0 : r._type) === "Slider" ? r : o, c = ne(n, { _parent: l == null ? void 0 : l._id, _type: "Slides" }), d = ee(n, { _parent: c == null ? void 0 : c._id, _type: "Slide" }), u = (t == null ? void 0 : t.currentSlide) || N(d, "0._id");
11035
11039
  if (H(() => {
11036
11040
  (r == null ? void 0 : r._type) === "Slide" && (t == null ? void 0 : t.currentSlide) !== (r == null ? void 0 : r._id) && e({ ...t, currentSlide: r == null ? void 0 : r._id });
11037
11041
  }, [r]), H(() => {
11038
- d != null && d.length && !ne(d, { _id: t == null ? void 0 : t.currentSlide }) && e({ ...t, currentSlide: S(d, "0._id") });
11042
+ d != null && d.length && !ne(d, { _id: t == null ? void 0 : t.currentSlide }) && e({ ...t, currentSlide: N(d, "0._id") });
11039
11043
  }, [t, d]), !r && !o || !c) return null;
11040
11044
  const p = () => {
11041
11045
  const m = sr(d, { _id: u });
11042
11046
  if (m > -1) {
11043
- const b = (m + 1) % d.length, y = S(d, [b, "_id"]);
11047
+ const b = (m + 1) % d.length, y = N(d, [b, "_id"]);
11044
11048
  if (!y) return;
11045
11049
  e({ ...t, currentSlide: y }), i([y]);
11046
11050
  }
11047
11051
  }, h = () => {
11048
11052
  const m = sr(d, { _id: u });
11049
11053
  if (m > -1) {
11050
- const b = (m - 1 + d.length) % d.length, y = S(d, [b, "_id"]);
11054
+ const b = (m - 1 + d.length) % d.length, y = N(d, [b, "_id"]);
11051
11055
  if (!y) return;
11052
11056
  e({ ...t, currentSlide: y }), i([y]);
11053
11057
  }
@@ -11144,10 +11148,10 @@ const Bi = () => Ge(Ld), cx = () => {
11144
11148
  ] }) })
11145
11149
  ] });
11146
11150
  }, hx = ({ formData: t, onChange: e }) => {
11147
- const n = S(t, "srcsets", []) || [], r = (i, l) => {
11151
+ const n = N(t, "srcsets", []) || [], r = (i, l) => {
11148
11152
  const c = i.target.name, d = i.target.value;
11149
11153
  e({
11150
- srcsets: N(n, (u, p) => p === l ? { ...u, [c]: d } : u)
11154
+ srcsets: C(n, (u, p) => p === l ? { ...u, [c]: d } : u)
11151
11155
  });
11152
11156
  }, o = () => {
11153
11157
  e({ srcsets: [...n, {}] });
@@ -11167,7 +11171,7 @@ const Bi = () => Ge(Ld), cx = () => {
11167
11171
  }
11168
11172
  )
11169
11173
  ] }),
11170
- /* @__PURE__ */ a("div", { className: "space-y-2", children: n.length === 0 ? /* @__PURE__ */ a("div", { className: "rounded border border-dashed border-gray-200 p-2 text-xs italic text-gray-500", children: "Add additional sources to create responsive videos" }) : N(n, (i, l) => /* @__PURE__ */ g("div", { className: "group relative space-y-1.5 rounded border border-gray-200 px-2 pb-1.5", children: [
11174
+ /* @__PURE__ */ a("div", { className: "space-y-2", children: n.length === 0 ? /* @__PURE__ */ a("div", { className: "rounded border border-dashed border-gray-200 p-2 text-xs italic text-gray-500", children: "Add additional sources to create responsive videos" }) : C(n, (i, l) => /* @__PURE__ */ g("div", { className: "group relative space-y-1.5 rounded border border-gray-200 px-2 pb-1.5", children: [
11171
11175
  /* @__PURE__ */ a(
11172
11176
  "button",
11173
11177
  {
@@ -11185,7 +11189,7 @@ const Bi = () => Ge(Ld), cx = () => {
11185
11189
  name: "width",
11186
11190
  placeholder: "Enter width (in px)",
11187
11191
  type: "number",
11188
- value: S(i, "width"),
11192
+ value: N(i, "width"),
11189
11193
  onChange: (c) => r(c, l),
11190
11194
  className: "!placeholder:text-gray-100 !mt-0 !rounded-none !border-0 !p-0 !text-xs"
11191
11195
  }
@@ -11199,7 +11203,7 @@ const Bi = () => Ge(Ld), cx = () => {
11199
11203
  name: "url",
11200
11204
  placeholder: "Enter url",
11201
11205
  className: "!mt-0 !rounded-none !border-0 !p-0 !text-xs !shadow-none",
11202
- value: S(i, "url", ""),
11206
+ value: N(i, "url", ""),
11203
11207
  onChange: (c) => r(c, l)
11204
11208
  }
11205
11209
  )
@@ -11213,7 +11217,7 @@ const Bi = () => Ge(Ld), cx = () => {
11213
11217
  ] }) }), Sa = vn(({ blockId: t, schema: e, uiSchema: n, formData: r, onChange: o }) => {
11214
11218
  const { selectedLang: s } = Ke(), i = Wo("widget"), l = Wo("field"), c = Wo("template"), d = mn(
11215
11219
  async ({ formData: u }, p) => {
11216
- S(u, p) === void 0 && We(u, p, ""), o({ formData: u }, p);
11220
+ N(u, p) === void 0 && We(u, p, ""), o({ formData: u }, p);
11217
11221
  },
11218
11222
  [o, s],
11219
11223
  400
@@ -11265,40 +11269,40 @@ const Bi = () => Ge(Ld), cx = () => {
11265
11269
  }), Ea = (t, e, n) => {
11266
11270
  const r = qr(t);
11267
11271
  return yr(Ct(t), (o) => {
11268
- Be(S(n, "i18nProps", []), o) && !$(e) && (r[o] = S(t, `${o}-${e}`));
11272
+ Be(N(n, "i18nProps", []), o) && !$(e) && (r[o] = N(t, `${o}-${e}`));
11269
11273
  }), r;
11270
11274
  };
11271
11275
  function _a() {
11272
- const { selectedLang: t } = Ke(), e = de(), n = Hl(), r = Ft(), o = Oe(e == null ? void 0 : e._type), s = Ea(e, t, o), [i, l] = F(s), [c, d] = F(!1), u = Bi(), p = Oe(u == null ? void 0 : u._type), h = Ea(u, t, p), f = ({ formData: A }, T, C) => {
11273
- T && (i == null ? void 0 : i._id) === e._id && r([e._id], { [T]: S(A, T) }, C);
11276
+ const { selectedLang: t } = Ke(), e = de(), n = Hl(), r = Ft(), o = Oe(e == null ? void 0 : e._type), s = Ea(e, t, o), [i, l] = F(s), [c, d] = F(!1), u = Bi(), p = Oe(u == null ? void 0 : u._type), h = Ea(u, t, p), f = ({ formData: A }, B, k) => {
11277
+ B && (i == null ? void 0 : i._id) === e._id && r([e._id], { [B]: N(A, B) }, k);
11274
11278
  }, m = R(
11275
- Is(({ formData: A }, T, C) => {
11276
- f({ formData: A }, T, C), l(A);
11279
+ Is(({ formData: A }, B, k) => {
11280
+ f({ formData: A }, B, k), l(A);
11277
11281
  }, 1500),
11278
11282
  [e == null ? void 0 : e._id, t]
11279
- ), b = ({ formData: A }, T) => {
11280
- T && (n([e._id], { [T]: S(A, T) }), m({ formData: A }, T, { [T]: S(i, T) }));
11281
- }, y = ({ formData: A }, T) => {
11282
- T && (n([u._id], { [T]: S(A, T) }), m({ formData: A }, T, { [T]: S(i, T) }));
11283
+ ), b = ({ formData: A }, B) => {
11284
+ B && (n([e._id], { [B]: N(A, B) }), m({ formData: A }, B, { [B]: N(i, B) }));
11285
+ }, y = ({ formData: A }, B) => {
11286
+ B && (n([u._id], { [B]: N(A, B) }), m({ formData: A }, B, { [B]: N(i, B) }));
11283
11287
  }, { schema: x, uiSchema: v } = M(() => {
11284
11288
  const A = e == null ? void 0 : e._type;
11285
11289
  if (!A)
11286
11290
  return { schema: {}, uiSchema: {} };
11287
11291
  try {
11288
- const { schema: T, uiSchema: C } = Ui(A);
11292
+ const { schema: B, uiSchema: k } = Ui(A);
11289
11293
  if (A === "Repeater") {
11290
- const k = S(e, "repeaterItems", "");
11291
- Re(k, `{{${Lt}`) ? (We(C, "filter", { "ui:widget": "collectionSelect" }), We(C, "sort", { "ui:widget": "collectionSelect" })) : (We(C, "filter", { "ui:widget": "hidden" }), We(C, "sort", { "ui:widget": "hidden" }));
11294
+ const _ = N(e, "repeaterItems", "");
11295
+ Re(_, `{{${Lt}`) ? (We(k, "filter", { "ui:widget": "collectionSelect" }), We(k, "sort", { "ui:widget": "collectionSelect" })) : (We(k, "filter", { "ui:widget": "hidden" }), We(k, "sort", { "ui:widget": "hidden" }));
11292
11296
  }
11293
- return { schema: T, uiSchema: C };
11297
+ return { schema: B, uiSchema: k };
11294
11298
  } catch {
11295
11299
  return { schema: {}, uiSchema: {} };
11296
11300
  }
11297
- }, [e]), { wrapperSchema: E, wrapperUiSchema: _ } = M(() => {
11301
+ }, [e]), { wrapperSchema: S, wrapperUiSchema: E } = M(() => {
11298
11302
  if (!u || !(u != null && u._type))
11299
11303
  return { wrapperSchema: {}, wrapperUiSchema: {} };
11300
- const A = u == null ? void 0 : u._type, { schema: T = {}, uiSchema: C = {} } = Ui(A);
11301
- return { wrapperSchema: T, wrapperUiSchema: C };
11304
+ const A = u == null ? void 0 : u._type, { schema: B = {}, uiSchema: k = {} } = Ui(A);
11305
+ return { wrapperSchema: B, wrapperUiSchema: k };
11302
11306
  }, [u]);
11303
11307
  return /* @__PURE__ */ g("div", { className: "no-scrollbar overflow-x-hidden px-px", children: [
11304
11308
  !$(u) && /* @__PURE__ */ g("div", { className: "mb-4 rounded border bg-zinc-100 px-1", children: [
@@ -11326,8 +11330,8 @@ function _a() {
11326
11330
  blockId: u == null ? void 0 : u._id,
11327
11331
  onChange: y,
11328
11332
  formData: h,
11329
- schema: E,
11330
- uiSchema: _
11333
+ schema: S,
11334
+ uiSchema: E
11331
11335
  }
11332
11336
  ) })
11333
11337
  ] }),
@@ -11386,9 +11390,9 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11386
11390
  n.includes(t(i)._id)
11387
11391
  )
11388
11392
  );
11389
- return N(s, (i) => {
11393
+ return C(s, (i) => {
11390
11394
  const l = t(i), c = r;
11391
- let { classes: d, baseClasses: u } = Gn(S(l, o.prop, `${Dt},`));
11395
+ let { classes: d, baseClasses: u } = Gn(N(l, o.prop, `${Dt},`));
11392
11396
  return It(c, (p) => {
11393
11397
  const h = p.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), f = new RegExp(`(^|\\s)${h}(?=\\s|$)`, "g");
11394
11398
  d = d.replace(f, " ").replace(/\s+/g, " ").trim();
@@ -11456,13 +11460,13 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11456
11460
  if (!t) return null;
11457
11461
  const l = Object.keys(t).filter(
11458
11462
  (m) => typeof t[m] == "string" && t[m].startsWith("#styles:")
11459
- ), c = !$(l) && l.length > 1, d = S(t, (f = e[0]) == null ? void 0 : f.prop, ""), { classes: u = "" } = Gn(d) || {}, p = u ? u.split(" ").filter((m) => !$(m)) : [], h = (m) => ne(e, (b) => b.prop === m);
11463
+ ), c = !$(l) && l.length > 1, d = N(t, (f = e[0]) == null ? void 0 : f.prop, ""), { classes: u = "" } = Gn(d) || {}, p = u ? u.split(" ").filter((m) => !$(m)) : [], h = (m) => ne(e, (b) => b.prop === m);
11460
11464
  return /* @__PURE__ */ a(Z, { children: c && /* @__PURE__ */ g("div", { className: "flex flex-wrap gap-1", children: [
11461
11465
  /* @__PURE__ */ g("label", { htmlFor: "block-styling-props", className: "py-1 text-xs", children: [
11462
11466
  s("Style element"),
11463
11467
  ":"
11464
11468
  ] }),
11465
- /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2", children: N(l, (m) => /* @__PURE__ */ g(
11469
+ /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-2", children: C(l, (m) => /* @__PURE__ */ g(
11466
11470
  Ai,
11467
11471
  {
11468
11472
  className: "flex cursor-pointer items-center gap-1 pr-1",
@@ -11599,7 +11603,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11599
11603
  }
11600
11604
  if (["max", "min", "fit"].includes(n)) return { value: t, unit: "class" };
11601
11605
  if (n.includes("/")) {
11602
- const [r, o] = N(n.split("/"), (s) => parseInt(s, 10));
11606
+ const [r, o] = C(n.split("/"), (s) => parseInt(s, 10));
11603
11607
  return { value: e + (r / o * 100).toFixed(2).replace(".00", ""), unit: "%" };
11604
11608
  }
11605
11609
  return Vu(parseFloat(n)) ? { value: `${e + parseFloat(n) * 4}`, unit: "px" } : { value: n, unit: "class" };
@@ -11609,7 +11613,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11609
11613
  const e = t.match(/\[.*\]/g);
11610
11614
  if (e === null)
11611
11615
  return Cx(t);
11612
- const n = S(e, "0", "").replace(/\[|\]/g, ""), r = t.startsWith("-") ? "-" : "", o = Ce(n.match(/\d+.\d+|\d+/g));
11616
+ const n = N(e, "0", "").replace(/\[|\]/g, ""), r = t.startsWith("-") ? "-" : "", o = Ce(n.match(/\d+.\d+|\d+/g));
11613
11617
  return { value: `${r}${o}`, unit: n.replace(o, "") };
11614
11618
  }, Cx = (t) => $(t) ? { value: "", unit: "" } : wx(t), Nx = ({
11615
11619
  unit: t,
@@ -11656,37 +11660,37 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11656
11660
  },
11657
11661
  r
11658
11662
  )) }), Ta = 50, Ex = (t) => {
11659
- const [e, n] = F(!1), [r, o] = F(""), { currentClass: s, onChange: i, classPrefix: l, cssProperty: c, units: d, negative: u } = t, [p, h] = F(c != null && c.toLowerCase().includes("width") ? "%" : d[0]), [f, m] = F(!1), [b, y] = F(""), [x, v] = F(!1), [E, _] = F(!1);
11663
+ const [e, n] = F(!1), [r, o] = F(""), { currentClass: s, onChange: i, classPrefix: l, cssProperty: c, units: d, negative: u } = t, [p, h] = F(c != null && c.toLowerCase().includes("width") ? "%" : d[0]), [f, m] = F(!1), [b, y] = F(""), [x, v] = F(!1), [S, E] = F(!1);
11660
11664
  H(() => {
11661
- const { value: w, unit: B } = kx(s);
11662
- if (B === "") {
11665
+ const { value: w, unit: T } = kx(s);
11666
+ if (T === "") {
11663
11667
  o(w), h(c != null && c.toLowerCase().includes("width") ? "%" : Ce(d));
11664
11668
  return;
11665
11669
  }
11666
- h(B), o(B === "class" || $(w) ? "" : w);
11670
+ h(T), o(T === "class" || $(w) ? "" : w);
11667
11671
  }, [s, c, d]);
11668
- const A = mn((w) => i(w), [i], Ta), T = mn((w) => i(w, !1), [i], Ta), C = R(
11672
+ const A = mn((w) => i(w), [i], Ta), B = mn((w) => i(w, !1), [i], Ta), k = R(
11669
11673
  (w = !1) => {
11670
- const B = Aa(`${r}`, d);
11671
- if (S(B, "error", !1)) {
11674
+ const T = Aa(`${r}`, d);
11675
+ if (N(T, "error", !1)) {
11672
11676
  m(!0);
11673
11677
  return;
11674
11678
  }
11675
- const L = S(B, "unit") !== "" ? S(B, "unit") : p;
11679
+ const L = N(T, "unit") !== "" ? N(T, "unit") : p;
11676
11680
  if (L === "auto" || L === "none") {
11677
11681
  A(`${l}${L}`);
11678
11682
  return;
11679
11683
  }
11680
- if (S(B, "value") === "")
11684
+ if (N(T, "value") === "")
11681
11685
  return;
11682
- const W = `${S(B, "value", "").startsWith("-") ? "-" : ""}${l}[${S(B, "value", "").replace("-", "")}${L === "-" ? "" : L}]`;
11683
- w ? T(W) : A(W);
11686
+ const W = `${N(T, "value", "").startsWith("-") ? "-" : ""}${l}[${N(T, "value", "").replace("-", "")}${L === "-" ? "" : L}]`;
11687
+ w ? B(W) : A(W);
11684
11688
  },
11685
- [A, T, r, p, l, d]
11686
- ), k = R(
11689
+ [A, B, r, p, l, d]
11690
+ ), _ = R(
11687
11691
  (w) => {
11688
- const B = Aa(`${r}`, d);
11689
- if (S(B, "error", !1)) {
11692
+ const T = Aa(`${r}`, d);
11693
+ if (N(T, "error", !1)) {
11690
11694
  m(!0);
11691
11695
  return;
11692
11696
  }
@@ -11694,9 +11698,9 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11694
11698
  A(`${l}${w}`);
11695
11699
  return;
11696
11700
  }
11697
- if (S(B, "value") === "")
11701
+ if (N(T, "value") === "")
11698
11702
  return;
11699
- const L = S(B, "unit") !== "" ? S(B, "unit") : w, W = `${S(B, "value", "").startsWith("-") ? "-" : ""}${l}[${S(B, "value", "").replace("-", "")}${L === "-" ? "" : L}]`;
11703
+ const L = N(T, "unit") !== "" ? N(T, "unit") : w, W = `${N(T, "value", "").startsWith("-") ? "-" : ""}${l}[${N(T, "value", "").replace("-", "")}${L === "-" ? "" : L}]`;
11700
11704
  A(W);
11701
11705
  },
11702
11706
  [A, r, l, d]
@@ -11721,28 +11725,28 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11721
11725
  {
11722
11726
  readOnly: p === "class",
11723
11727
  onKeyPress: (w) => {
11724
- w.key === "Enter" && C();
11728
+ w.key === "Enter" && k();
11725
11729
  },
11726
11730
  onKeyDown: (w) => {
11727
11731
  if (w.keyCode !== 38 && w.keyCode !== 40)
11728
11732
  return;
11729
- w.preventDefault(), _(!0);
11730
- const B = ju(w.target.value);
11731
- let L = Wu(B) ? 0 : B;
11733
+ w.preventDefault(), E(!0);
11734
+ const T = ju(w.target.value);
11735
+ let L = Wu(T) ? 0 : T;
11732
11736
  w.keyCode === 38 && (L += 1), w.keyCode === 40 && (L -= 1);
11733
11737
  const I = `${L}`, K = `${I.startsWith("-") ? "-" : ""}${l}[${I.replace("-", "")}${p === "-" ? "" : p}]`;
11734
- T(K);
11738
+ B(K);
11735
11739
  },
11736
11740
  onKeyUp: (w) => {
11737
- E && (w.preventDefault(), _(!1));
11741
+ S && (w.preventDefault(), E(!1));
11738
11742
  },
11739
- onBlur: () => C(),
11743
+ onBlur: () => k(),
11740
11744
  onChange: (w) => {
11741
11745
  m(!1), o(w.target.value);
11742
11746
  },
11743
11747
  onClick: (w) => {
11744
- var B;
11745
- (B = w == null ? void 0 : w.target) == null || B.select(), n(!1);
11748
+ var T;
11749
+ (T = w == null ? void 0 : w.target) == null || T.select(), n(!1);
11746
11750
  },
11747
11751
  value: x ? b : r,
11748
11752
  className: "h-6 w-14 rounded rounded-r-none border border-transparent bg-background pl-2 text-sm focus-visible:outline-0".concat(
@@ -11770,7 +11774,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11770
11774
  units: d,
11771
11775
  current: p,
11772
11776
  onSelect: (w) => {
11773
- n(!1), h(w), k(w);
11777
+ n(!1), h(w), _(w);
11774
11778
  }
11775
11779
  }
11776
11780
  ) })
@@ -11783,15 +11787,15 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11783
11787
  onDragEnd: (w) => {
11784
11788
  if (y(() => ""), v(!1), $(w))
11785
11789
  return;
11786
- const B = `${w}`, I = `${B.startsWith("-") ? "-" : ""}${l}[${B.replace("-", "")}${p === "-" ? "" : p}]`;
11790
+ const T = `${w}`, I = `${T.startsWith("-") ? "-" : ""}${l}[${T.replace("-", "")}${p === "-" ? "" : p}]`;
11787
11791
  A(I);
11788
11792
  },
11789
11793
  onDrag: (w) => {
11790
11794
  if ($(w))
11791
11795
  return;
11792
11796
  y(w);
11793
- const B = `${w}`, I = `${B.startsWith("-") ? "-" : ""}${l}[${B.replace("-", "")}${p === "-" ? "" : p}]`;
11794
- T(I);
11797
+ const T = `${w}`, I = `${T.startsWith("-") ? "-" : ""}${l}[${T.replace("-", "")}${p === "-" ? "" : p}]`;
11798
+ B(I);
11795
11799
  },
11796
11800
  currentValue: r,
11797
11801
  unit: p,
@@ -11835,7 +11839,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11835
11839
  80,
11836
11840
  96
11837
11841
  ], D = {
11838
- columns: [...Ye(1, 13), "auto", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", ...N(Ye(2, 8), (t) => `${t}xl`)],
11842
+ columns: [...Ye(1, 13), "auto", "3xs", "2xs", "xs", "sm", "md", "lg", "xl", ...C(Ye(2, 8), (t) => `${t}xl`)],
11839
11843
  breakAfter: ["auto", "avoid", "all", "avoid-page", "page", "left", "right", "column"],
11840
11844
  breakInside: ["auto", "avoid", "avoid-page", "avoid-column"],
11841
11845
  display: ["block", "flex", "grid", "inline-block", "inline", "hidden"],
@@ -11873,19 +11877,19 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11873
11877
  regExp: "container"
11874
11878
  },
11875
11879
  columns: {
11876
- classes: N(D.columns, (t) => `columns-${t}`),
11880
+ classes: C(D.columns, (t) => `columns-${t}`),
11877
11881
  regExp: "columns-(auto|[0-9]xl|[0-9]xs|xs|sm|md|lg|xl|\\d+)"
11878
11882
  },
11879
11883
  breakAfter: {
11880
- classes: N(D.breakAfter, (t) => `break-after-${t}`),
11884
+ classes: C(D.breakAfter, (t) => `break-after-${t}`),
11881
11885
  regExp: "break-after-\\S+"
11882
11886
  },
11883
11887
  breakBefore: {
11884
- classes: N(D.breakAfter, (t) => `break-before-${t}`),
11888
+ classes: C(D.breakAfter, (t) => `break-before-${t}`),
11885
11889
  regExp: "break-before-\\S+"
11886
11890
  },
11887
11891
  breakInside: {
11888
- classes: N(D.breakInside, (t) => `break-inside-${t}`),
11892
+ classes: C(D.breakInside, (t) => `break-inside-${t}`),
11889
11893
  regExp: "break-inside-\\S+"
11890
11894
  },
11891
11895
  boxDecoration: {
@@ -11909,7 +11913,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11909
11913
  regExp: "flex-1|flex-auto|flex-initial|flex-none"
11910
11914
  },
11911
11915
  gridColumns: {
11912
- classes: N([...Ye(0, 13), "none"], (t) => `grid-cols-${t}`),
11916
+ classes: C([...Ye(0, 13), "none"], (t) => `grid-cols-${t}`),
11913
11917
  regExp: "grid-cols-(\\d+|none)"
11914
11918
  },
11915
11919
  gridFlow: {
@@ -11917,28 +11921,28 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11917
11921
  regExp: "grid-flow-(row|col|row-dense|col-dense)"
11918
11922
  },
11919
11923
  outlineStyle: {
11920
- classes: N(["none", "dashed", "dotted", "double", "hidden"], (t) => `outline-${t}`),
11924
+ classes: C(["none", "dashed", "dotted", "double", "hidden"], (t) => `outline-${t}`),
11921
11925
  regExp: "outline-(none|dashed|dotted|double|hidden)"
11922
11926
  },
11923
11927
  borderStyle: {
11924
- classes: N(["solid", "dashed", "dotted", "double", "hidden", "none"], (t) => `border-${t}`),
11928
+ classes: C(["solid", "dashed", "dotted", "double", "hidden", "none"], (t) => `border-${t}`),
11925
11929
  regExp: "border-(solid|dashed|dotted|double|hidden|none)"
11926
11930
  },
11927
11931
  overflow: {
11928
- classes: N(D.overflow, (t) => `overflow-${t}`),
11932
+ classes: C(D.overflow, (t) => `overflow-${t}`),
11929
11933
  regExp: `overflow-(${D.overflow.join("|")})`
11930
11934
  },
11931
11935
  overflowX: {
11932
- classes: N(D.overflow, (t) => `overflow-x-${t}`),
11936
+ classes: C(D.overflow, (t) => `overflow-x-${t}`),
11933
11937
  regExp: `overflow-x-(${D.overflow.join("|")})`
11934
11938
  },
11935
11939
  overflowY: {
11936
- classes: N(D.overflow, (t) => `overflow-y-${t}`),
11940
+ classes: C(D.overflow, (t) => `overflow-y-${t}`),
11937
11941
  regExp: `overflow-y-(${D.overflow.join("|")})`
11938
11942
  },
11939
- gridRows: { classes: N([1, 2, 3, 4, 5, 6, "none"], (t) => `grid-rows-${t}`), regExp: "grid-rows-(\\d|none)" },
11943
+ gridRows: { classes: C([1, 2, 3, 4, 5, 6, "none"], (t) => `grid-rows-${t}`), regExp: "grid-rows-(\\d|none)" },
11940
11944
  display: {
11941
- classes: N(D.display, (t) => t.toString()),
11945
+ classes: C(D.display, (t) => t.toString()),
11942
11946
  regExp: `(${D.display.join("|")})`
11943
11947
  },
11944
11948
  float: {
@@ -11954,83 +11958,83 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
11954
11958
  regExp: "isolate|isolation-auto"
11955
11959
  },
11956
11960
  objectFit: {
11957
- classes: N(D.objectFit, (t) => `object-${t}`),
11961
+ classes: C(D.objectFit, (t) => `object-${t}`),
11958
11962
  regExp: "object-(contain|cover|fill|none|scale-down)"
11959
11963
  },
11960
11964
  objectPosition: {
11961
- classes: N(D.objectPosition, (t) => `object-${t}`),
11965
+ classes: C(D.objectPosition, (t) => `object-${t}`),
11962
11966
  regExp: `object-(${D.objectPosition.join("|")})`
11963
11967
  },
11964
11968
  overscroll: {
11965
- classes: N(D.overscroll, (t) => `overscroll-${t}`),
11969
+ classes: C(D.overscroll, (t) => `overscroll-${t}`),
11966
11970
  regExp: `overscroll-(${D.overscroll.join("|")})`
11967
11971
  },
11968
11972
  overscrollX: {
11969
- classes: N(D.overscroll, (t) => `overscroll-x-${t}`),
11973
+ classes: C(D.overscroll, (t) => `overscroll-x-${t}`),
11970
11974
  regExp: `overscroll-x-(${D.overscroll.join("|")})`
11971
11975
  },
11972
11976
  overscrollY: {
11973
- classes: N(D.overscroll, (t) => `overscroll-y-${t}`),
11977
+ classes: C(D.overscroll, (t) => `overscroll-y-${t}`),
11974
11978
  regExp: `overscroll-y-(${D.overscroll.join("|")})`
11975
11979
  },
11976
11980
  inset: {
11977
- classes: N(D.trbl, (t) => `inset-${t}`),
11981
+ classes: C(D.trbl, (t) => `inset-${t}`),
11978
11982
  regExp: "-?inset-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
11979
11983
  },
11980
11984
  insetX: {
11981
- classes: N(D.trbl, (t) => `inset-x-${t}`),
11985
+ classes: C(D.trbl, (t) => `inset-x-${t}`),
11982
11986
  regExp: "-?inset-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
11983
11987
  },
11984
11988
  insetY: {
11985
- classes: N(D.trbl, (t) => `inset-y-${t}`),
11989
+ classes: C(D.trbl, (t) => `inset-y-${t}`),
11986
11990
  regExp: "-?inset-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
11987
11991
  },
11988
11992
  top: {
11989
- classes: N(D.trbl, (t) => `top-${t}`),
11993
+ classes: C(D.trbl, (t) => `top-${t}`),
11990
11994
  regExp: "-?top-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
11991
11995
  },
11992
11996
  topX: {
11993
- classes: N(D.trbl, (t) => `top-x-${t}`),
11997
+ classes: C(D.trbl, (t) => `top-x-${t}`),
11994
11998
  regExp: "-?top-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
11995
11999
  },
11996
12000
  topY: {
11997
- classes: N(D.trbl, (t) => `top-y-${t}`),
12001
+ classes: C(D.trbl, (t) => `top-y-${t}`),
11998
12002
  regExp: "-?top-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
11999
12003
  },
12000
12004
  right: {
12001
- classes: N(D.trbl, (t) => `right-${t}`),
12005
+ classes: C(D.trbl, (t) => `right-${t}`),
12002
12006
  regExp: "-?right-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
12003
12007
  },
12004
12008
  rightX: {
12005
- classes: N(D.trbl, (t) => `right-x-${t}`),
12009
+ classes: C(D.trbl, (t) => `right-x-${t}`),
12006
12010
  regExp: "-?right-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
12007
12011
  },
12008
12012
  rightY: {
12009
- classes: N(D.trbl, (t) => `right-y-${t}`),
12013
+ classes: C(D.trbl, (t) => `right-y-${t}`),
12010
12014
  regExp: "-?right-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
12011
12015
  },
12012
12016
  bottom: {
12013
- classes: N(D.trbl, (t) => `bottom-${t}`),
12017
+ classes: C(D.trbl, (t) => `bottom-${t}`),
12014
12018
  regExp: "-?bottom-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
12015
12019
  },
12016
12020
  bottomX: {
12017
- classes: N(D.trbl, (t) => `bottom-x-${t}`),
12021
+ classes: C(D.trbl, (t) => `bottom-x-${t}`),
12018
12022
  regExp: "-?bottom-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
12019
12023
  },
12020
12024
  bottomY: {
12021
- classes: N(D.trbl, (t) => `bottom-y-${t}`),
12025
+ classes: C(D.trbl, (t) => `bottom-y-${t}`),
12022
12026
  regExp: "-?bottom-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
12023
12027
  },
12024
12028
  left: {
12025
- classes: N(D.trbl, (t) => `left-${t}`),
12029
+ classes: C(D.trbl, (t) => `left-${t}`),
12026
12030
  regExp: "-?left-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
12027
12031
  },
12028
12032
  leftX: {
12029
- classes: N(D.trbl, (t) => `left-x-${t}`),
12033
+ classes: C(D.trbl, (t) => `left-x-${t}`),
12030
12034
  regExp: "-?left-x-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
12031
12035
  },
12032
12036
  leftY: {
12033
- classes: N(D.trbl, (t) => `left-y-${t}`),
12037
+ classes: C(D.trbl, (t) => `left-y-${t}`),
12034
12038
  regExp: "-?left-y-(px|\\d\\/\\d|\\d\\.\\d|\\d+|full|auto|\\[.*\\])"
12035
12039
  },
12036
12040
  visibility: {
@@ -12038,39 +12042,39 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12038
12042
  regExp: "invisible|visible"
12039
12043
  },
12040
12044
  zIndex: {
12041
- classes: N(["0", 10, 20, 30, 40, 50, "auto"], (t) => `z-${t}`),
12045
+ classes: C(["0", 10, 20, 30, 40, 50, "auto"], (t) => `z-${t}`),
12042
12046
  regExp: "-?z-(\\d+|auto|\\[.*\\])"
12043
12047
  },
12044
12048
  // Flex box and grids
12045
12049
  flexBasis: {
12046
- classes: N(D.flexBasis, (t) => `basis-${t}`),
12050
+ classes: C(D.flexBasis, (t) => `basis-${t}`),
12047
12051
  regExp: "basis-(\\d+|\\S+)"
12048
12052
  },
12049
12053
  flexGrow: { classes: ["grow", "grow-0"], regExp: "grow(-0)?" },
12050
12054
  flexShrink: { classes: ["shrink", "shrink-0"], regExp: "shrink(-0)?" },
12051
12055
  // grid
12052
12056
  gridColSpan: {
12053
- classes: ["col-auto", ...N(Ye(1, 13), (t) => `col-span-${t}`), "col-span-full"],
12057
+ classes: ["col-auto", ...C(Ye(1, 13), (t) => `col-span-${t}`), "col-span-full"],
12054
12058
  regExp: "col-(auto|span-(\\d+|full))"
12055
12059
  },
12056
12060
  gridColStart: {
12057
- classes: [...N(Ye(1, 14), (t) => `col-start-${t}`), "col-start-auto"],
12061
+ classes: [...C(Ye(1, 14), (t) => `col-start-${t}`), "col-start-auto"],
12058
12062
  regExp: "col-start-(\\d+|auto)"
12059
12063
  },
12060
12064
  gridColEnd: {
12061
- classes: [...N(Ye(1, 14), (t) => `col-end-${t}`), "col-end-auto"],
12065
+ classes: [...C(Ye(1, 14), (t) => `col-end-${t}`), "col-end-auto"],
12062
12066
  regExp: "col-end-(\\d+|auto)"
12063
12067
  },
12064
12068
  gridRowSpan: {
12065
- classes: ["row-auto", ...N(Ye(1, 7), (t) => `row-span-${t}`), "row-span-full"],
12069
+ classes: ["row-auto", ...C(Ye(1, 7), (t) => `row-span-${t}`), "row-span-full"],
12066
12070
  regExp: "row-(auto|span-(\\d+|full))"
12067
12071
  },
12068
12072
  gridRowStart: {
12069
- classes: [...N(Ye(1, 8), (t) => `row-start-${t}`), "row-start-auto"],
12073
+ classes: [...C(Ye(1, 8), (t) => `row-start-${t}`), "row-start-auto"],
12070
12074
  regExp: "row-start-(\\d+|auto)"
12071
12075
  },
12072
12076
  gridRowEnd: {
12073
- classes: [...N(Ye(1, 8), (t) => `row-end-${t}`), "row-end-auto"],
12077
+ classes: [...C(Ye(1, 8), (t) => `row-end-${t}`), "row-end-auto"],
12074
12078
  regExp: "row-end-(\\d+|auto)"
12075
12079
  },
12076
12080
  gridAutoColumns: {
@@ -12081,9 +12085,9 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12081
12085
  classes: ["auto-rows-auto", "auto-rows-min", "auto-rows-max", "auto-rows-fr"],
12082
12086
  regExp: "auto-rows-(auto|min|max|fr)"
12083
12087
  },
12084
- gap: { classes: N(D.indent, (t) => `gap-${t}`), regExp: "gap-(px|\\d.\\d|\\d|\\[.*\\])" },
12085
- gapX: { classes: N(D.indent, (t) => `gap-x-${t}`), regExp: "gap-x-(px|\\d.\\d|\\d|\\[.*\\])" },
12086
- gapY: { classes: N(D.indent, (t) => `gap-y-${t}`), regExp: "gap-y-(px|\\d.\\d|\\d|\\[.*\\])" },
12088
+ gap: { classes: C(D.indent, (t) => `gap-${t}`), regExp: "gap-(px|\\d.\\d|\\d|\\[.*\\])" },
12089
+ gapX: { classes: C(D.indent, (t) => `gap-x-${t}`), regExp: "gap-x-(px|\\d.\\d|\\d|\\[.*\\])" },
12090
+ gapY: { classes: C(D.indent, (t) => `gap-y-${t}`), regExp: "gap-y-(px|\\d.\\d|\\d|\\[.*\\])" },
12087
12091
  justifyContent: {
12088
12092
  classes: ["justify-start", "justify-end", "justify-center", "justify-between", "justify-around", "justify-evenly"],
12089
12093
  regExp: "justify-(start|end|center|between|around|evenly)"
@@ -12140,19 +12144,19 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12140
12144
  },
12141
12145
  // FIXME: Add drop-shadow class
12142
12146
  dropShadow: {
12143
- classes: N(["sm", "md", "lg", "xl", "2xl", "none"], (t) => `drop-shadow-${t}`),
12147
+ classes: C(["sm", "md", "lg", "xl", "2xl", "none"], (t) => `drop-shadow-${t}`),
12144
12148
  regExp: "drop-shadow-(sm|md|lg|xl|2xl|none)"
12145
12149
  },
12146
12150
  backdropBlur: {
12147
- classes: N(["none", "sm", "md", "lg", "xl", "2xl", "3xl"], (t) => `backdrop-blur-${t}`),
12151
+ classes: C(["none", "sm", "md", "lg", "xl", "2xl", "3xl"], (t) => `backdrop-blur-${t}`),
12148
12152
  regExp: "backdrop-blur-(none|sm|md|lg|xl|2xl|3xl)"
12149
12153
  },
12150
12154
  backdropBrightness: {
12151
- classes: N([0, 50, 75, 90, 95, 100, 105, 110, 125, 150, 200], (t) => `backdrop-brightness-${t}`),
12155
+ classes: C([0, 50, 75, 90, 95, 100, 105, 110, 125, 150, 200], (t) => `backdrop-brightness-${t}`),
12152
12156
  regExp: "backdrop-brightness-(\\d+)"
12153
12157
  },
12154
12158
  backdropContrast: {
12155
- classes: N([0, 50, 75, 100, 125, 150, 200], (t) => `backdrop-contrast-${t}`),
12159
+ classes: C([0, 50, 75, 100, 125, 150, 200], (t) => `backdrop-contrast-${t}`),
12156
12160
  regExp: "backdrop-contrast-(\\d+)"
12157
12161
  },
12158
12162
  backdropGrayScale: {
@@ -12160,7 +12164,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12160
12164
  regExp: "backdrop-grayscale(-0)?"
12161
12165
  },
12162
12166
  backdropHueRotate: {
12163
- classes: N([0, 15, 30, 60, 90, 180], (t) => `backdrop-hue-rotate-${t}`),
12167
+ classes: C([0, 15, 30, 60, 90, 180], (t) => `backdrop-hue-rotate-${t}`),
12164
12168
  regExp: "-?backdrop-hue-rotate-(\\d+)"
12165
12169
  },
12166
12170
  backdropInvert: {
@@ -12168,11 +12172,11 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12168
12172
  regExp: "backdrop-invert(-0)?"
12169
12173
  },
12170
12174
  backdropOpacity: {
12171
- classes: N([0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 95, 100], (t) => `backdrop-opacity-${t}`),
12175
+ classes: C([0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 95, 100], (t) => `backdrop-opacity-${t}`),
12172
12176
  regExp: "backdrop-opacity-(\\d+)"
12173
12177
  },
12174
12178
  backdropSaturate: {
12175
- classes: N([0, 50, 100, 150, 200], (t) => `backdrop-saturate-${t}`),
12179
+ classes: C([0, 50, 100, 150, 200], (t) => `backdrop-saturate-${t}`),
12176
12180
  regExp: "backdrop-saturate-(\\d+)"
12177
12181
  },
12178
12182
  backdropSepia: {
@@ -12184,36 +12188,36 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12184
12188
  regExp: "bg-origin-(border|padding|content)"
12185
12189
  },
12186
12190
  transformOrigin: {
12187
- classes: N(D.origin, (t) => `origin-${t}`),
12191
+ classes: C(D.origin, (t) => `origin-${t}`),
12188
12192
  regExp: "origin-(\\d+|\\S+)"
12189
12193
  },
12190
12194
  // spacing
12191
12195
  padding: {
12192
- classes: N(D.padding, (t) => `p-${t}`),
12196
+ classes: C(D.padding, (t) => `p-${t}`),
12193
12197
  regExp: "p-(\\d+|\\S+|\\[.*\\])"
12194
12198
  },
12195
12199
  paddingX: {
12196
- classes: N(D.padding, (t) => `px-${t}`),
12200
+ classes: C(D.padding, (t) => `px-${t}`),
12197
12201
  regExp: "px-(\\d+|\\S+|\\[.*\\])"
12198
12202
  },
12199
12203
  paddingY: {
12200
- classes: N(D.padding, (t) => `py-${t}`),
12204
+ classes: C(D.padding, (t) => `py-${t}`),
12201
12205
  regExp: "py-(\\d+|\\S+|\\[.*\\])"
12202
12206
  },
12203
12207
  paddingTop: {
12204
- classes: N(D.padding, (t) => `pt-${t}`),
12208
+ classes: C(D.padding, (t) => `pt-${t}`),
12205
12209
  regExp: "pt-(\\d+|\\S+|\\[.*\\])"
12206
12210
  },
12207
12211
  paddingRight: {
12208
- classes: N(D.padding, (t) => `pr-${t}`),
12212
+ classes: C(D.padding, (t) => `pr-${t}`),
12209
12213
  regExp: "pr-(\\d+|\\S+|\\[.*\\])"
12210
12214
  },
12211
12215
  paddingBottom: {
12212
- classes: N(D.padding, (t) => `pb-${t}`),
12216
+ classes: C(D.padding, (t) => `pb-${t}`),
12213
12217
  regExp: "pb-(\\d+|\\S+|\\[.*\\])"
12214
12218
  },
12215
12219
  paddingLeft: {
12216
- classes: N(D.padding, (t) => `pl-${t}`),
12220
+ classes: C(D.padding, (t) => `pl-${t}`),
12217
12221
  regExp: "pl-(\\d+|\\S+|\\[.*\\])"
12218
12222
  },
12219
12223
  textDecorationStyle: {
@@ -12221,7 +12225,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12221
12225
  regExp: "decoration-(solid|double|dotted|dashed|wavy)"
12222
12226
  },
12223
12227
  textDecorationThickness: {
12224
- classes: N(["auto", "from-font", "0", 1, 2, 4, 8], (t) => `decoration-${t}`),
12228
+ classes: C(["auto", "from-font", "0", 1, 2, 4, 8], (t) => `decoration-${t}`),
12225
12229
  regExp: "decoration-(auto|from-font|\\d+|\\S+)"
12226
12230
  },
12227
12231
  fromColor: {
@@ -12229,43 +12233,43 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12229
12233
  regExp: "from-(black|transparent|current|white|__THEME_COLORS_REGEXP__|\\S+-\\d+)"
12230
12234
  },
12231
12235
  margin: {
12232
- classes: N(D.margin, (t) => `m-${t}`),
12236
+ classes: C(D.margin, (t) => `m-${t}`),
12233
12237
  regExp: "-?m-(\\d+|\\S+|\\[.*\\])"
12234
12238
  },
12235
12239
  marginX: {
12236
- classes: N(D.margin, (t) => `mx-${t}`),
12240
+ classes: C(D.margin, (t) => `mx-${t}`),
12237
12241
  regExp: "-?mx-(\\d+|\\S+|\\[.*\\])"
12238
12242
  },
12239
12243
  marginY: {
12240
- classes: N(D.margin, (t) => `my-${t}`),
12244
+ classes: C(D.margin, (t) => `my-${t}`),
12241
12245
  regExp: "-?my-(\\d+|\\S+|\\[.*\\])"
12242
12246
  },
12243
12247
  marginTop: {
12244
- classes: N(D.margin, (t) => `mt-${t}`),
12248
+ classes: C(D.margin, (t) => `mt-${t}`),
12245
12249
  regExp: "-?mt-(\\d+|\\S+|\\[.*\\])"
12246
12250
  },
12247
12251
  marginRight: {
12248
- classes: N(D.margin, (t) => `mr-${t}`),
12252
+ classes: C(D.margin, (t) => `mr-${t}`),
12249
12253
  regExp: "-?mr-(\\d+|\\S+|\\[.*\\])"
12250
12254
  },
12251
12255
  marginBottom: {
12252
- classes: N(D.margin, (t) => `mb-${t}`),
12256
+ classes: C(D.margin, (t) => `mb-${t}`),
12253
12257
  regExp: "-?mb-(\\d+|\\S+|\\[.*\\])"
12254
12258
  },
12255
12259
  marginLeft: {
12256
- classes: N(D.margin, (t) => `ml-${t}`),
12260
+ classes: C(D.margin, (t) => `ml-${t}`),
12257
12261
  regExp: "-?ml-(\\d+|\\S+|\\[.*\\])"
12258
12262
  },
12259
12263
  spaceX: {
12260
- classes: N(D.space, (t) => `space-x-${t}`),
12264
+ classes: C(D.space, (t) => `space-x-${t}`),
12261
12265
  regExp: "-?space-x-(\\d+|\\S+|\\[.*\\])"
12262
12266
  },
12263
12267
  spaceY: {
12264
- classes: N(D.space, (t) => `space-y-${t}`),
12268
+ classes: C(D.space, (t) => `space-y-${t}`),
12265
12269
  regExp: "-?space-y-(\\d+|\\S+|\\[.*\\])"
12266
12270
  },
12267
12271
  boxShadow: {
12268
- classes: N(["sm", "md", "lg", "xl", "2xl", "inner", "none"], (t) => `shadow-${t}`),
12272
+ classes: C(["sm", "md", "lg", "xl", "2xl", "inner", "none"], (t) => `shadow-${t}`),
12269
12273
  regExp: "shadow-(sm|md|lg|xl|2xl|inner|none)"
12270
12274
  },
12271
12275
  // sizing
@@ -12274,11 +12278,11 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12274
12278
  regExp: "min-w-(\\d+|\\S+|\\[.*\\])"
12275
12279
  },
12276
12280
  maxWidth: {
12277
- classes: N(D.maxWidth, (t) => `max-w-${t}`),
12281
+ classes: C(D.maxWidth, (t) => `max-w-${t}`),
12278
12282
  regExp: "max-w-(\\d+|\\S+|\\[.*\\])"
12279
12283
  },
12280
12284
  width: {
12281
- classes: N([...D.width, "full", "screen", "min", "max", "fit"], (t) => `w-${t}`),
12285
+ classes: C([...D.width, "full", "screen", "min", "max", "fit"], (t) => `w-${t}`),
12282
12286
  regExp: "w-(\\d+.\\d+|\\d+|px|auto|full|screen|min|max|fit|\\[.*\\])$"
12283
12287
  },
12284
12288
  minHeight: {
@@ -12286,11 +12290,11 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12286
12290
  regExp: "min-h-(\\d+|\\S+|\\[.*\\])"
12287
12291
  },
12288
12292
  maxHeight: {
12289
- classes: N(D.maxHeight, (t) => `max-h-${t}`),
12293
+ classes: C(D.maxHeight, (t) => `max-h-${t}`),
12290
12294
  regExp: "max-h-(\\d+|\\S+|\\[.*\\])"
12291
12295
  },
12292
12296
  height: {
12293
- classes: N(D.height, (t) => `h-${t}`),
12297
+ classes: C(D.height, (t) => `h-${t}`),
12294
12298
  regExp: "h-(\\d+.\\d+|\\d+|px|auto|full|screen|min|max|fit|\\[.*\\])"
12295
12299
  },
12296
12300
  // typography
@@ -12432,7 +12436,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12432
12436
  regExp: "uppercase|lowercase|capitalize|normal-case"
12433
12437
  },
12434
12438
  textIndent: {
12435
- classes: N(D.indent, (t) => `indent-${t}`),
12439
+ classes: C(D.indent, (t) => `indent-${t}`),
12436
12440
  regExp: "-?indent-(\\d+|\\S+)"
12437
12441
  },
12438
12442
  whitespace: {
@@ -12445,7 +12449,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12445
12449
  },
12446
12450
  content: { classes: ["content-none"], regExp: "content-none" },
12447
12451
  backgroundAttachment: {
12448
- classes: N(["fixed", "local", "scroll"], (t) => `bg-${t}`),
12452
+ classes: C(["fixed", "local", "scroll"], (t) => `bg-${t}`),
12449
12453
  regExp: "bg-(fixed|local|scroll)"
12450
12454
  },
12451
12455
  backgroundColor: {
@@ -12502,63 +12506,63 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12502
12506
  },
12503
12507
  // border
12504
12508
  borderRadiusTopLeft: {
12505
- classes: ["rounded-tl", ...N(D.borderRadius, (t) => `rounded-tl-${t}`)],
12509
+ classes: ["rounded-tl", ...C(D.borderRadius, (t) => `rounded-tl-${t}`)],
12506
12510
  regExp: "rounded-tl-?(\\d+|\\S+)?"
12507
12511
  },
12508
12512
  borderRadiusTopRight: {
12509
- classes: ["rounded-tr", ...N(D.borderRadius, (t) => `rounded-tr-${t}`)],
12513
+ classes: ["rounded-tr", ...C(D.borderRadius, (t) => `rounded-tr-${t}`)],
12510
12514
  regExp: "rounded-tr-?(\\d+|\\S+)?"
12511
12515
  },
12512
12516
  borderRadiusBottomRight: {
12513
- classes: ["rounded-br", ...N(D.borderRadius, (t) => `rounded-br-${t}`)],
12517
+ classes: ["rounded-br", ...C(D.borderRadius, (t) => `rounded-br-${t}`)],
12514
12518
  regExp: "rounded-br-?(\\d+|\\S+)?"
12515
12519
  },
12516
12520
  borderRadiusBottomLeft: {
12517
- classes: ["rounded-bl", ...N(D.borderRadius, (t) => `rounded-bl-${t}`)],
12521
+ classes: ["rounded-bl", ...C(D.borderRadius, (t) => `rounded-bl-${t}`)],
12518
12522
  regExp: "rounded-bl-?(\\d+|\\S+)?"
12519
12523
  },
12520
12524
  borderRadiusTop: {
12521
- classes: ["rounded-t", ...N(D.borderRadius, (t) => `rounded-t-${t}`)],
12525
+ classes: ["rounded-t", ...C(D.borderRadius, (t) => `rounded-t-${t}`)],
12522
12526
  regExp: "rounded-t-?(\\d+|\\S+)?"
12523
12527
  },
12524
12528
  borderRadiusRight: {
12525
- classes: ["rounded-r", ...N(D.borderRadius, (t) => `rounded-r-${t}`)],
12529
+ classes: ["rounded-r", ...C(D.borderRadius, (t) => `rounded-r-${t}`)],
12526
12530
  regExp: "rounded-r-?(\\d+|\\S+)?"
12527
12531
  },
12528
12532
  borderRadiusBottom: {
12529
- classes: ["rounded-b", ...N(D.borderRadius, (t) => `rounded-b-${t}`)],
12533
+ classes: ["rounded-b", ...C(D.borderRadius, (t) => `rounded-b-${t}`)],
12530
12534
  regExp: "rounded-b-?(\\d+|\\S+)?"
12531
12535
  },
12532
12536
  borderRadiusLeft: {
12533
- classes: ["rounded-l", ...N(D.borderRadius, (t) => `rounded-l-${t}`)],
12537
+ classes: ["rounded-l", ...C(D.borderRadius, (t) => `rounded-l-${t}`)],
12534
12538
  regExp: `(rounded-l-(${D.borderRadius.join("|")})|rounded-l$)`
12535
12539
  },
12536
12540
  borderRadius: {
12537
- classes: ["rounded", ...N(D.borderRadius, (t) => `rounded-${t}`)],
12541
+ classes: ["rounded", ...C(D.borderRadius, (t) => `rounded-${t}`)],
12538
12542
  regExp: `(rounded-(${D.borderRadius.join("|")}$)|rounded)`
12539
12543
  },
12540
12544
  borderX: {
12541
- classes: ["border-x", ...N(D.borderWidth, (t) => `border-x-${t}`)],
12545
+ classes: ["border-x", ...C(D.borderWidth, (t) => `border-x-${t}`)],
12542
12546
  regExp: "border-x-?(\\d+|\\S+|\\[.*\\])?"
12543
12547
  },
12544
12548
  borderY: {
12545
- classes: ["border-y", ...N(D.borderWidth, (t) => `border-y-${t}`)],
12549
+ classes: ["border-y", ...C(D.borderWidth, (t) => `border-y-${t}`)],
12546
12550
  regExp: "border-y-?(\\d+|\\S+|\\[.*\\])?"
12547
12551
  },
12548
12552
  borderTop: {
12549
- classes: ["border-t", ...N(D.borderWidth, (t) => `border-t-${t}`)],
12553
+ classes: ["border-t", ...C(D.borderWidth, (t) => `border-t-${t}`)],
12550
12554
  regExp: "border-t-?(\\d+|\\S+|\\[.*\\])?"
12551
12555
  },
12552
12556
  borderRight: {
12553
- classes: ["border-r", ...N(D.borderWidth, (t) => `border-r-${t}`)],
12557
+ classes: ["border-r", ...C(D.borderWidth, (t) => `border-r-${t}`)],
12554
12558
  regExp: "border-r-?(\\d+|\\S+|\\[.*\\])?"
12555
12559
  },
12556
12560
  borderBottom: {
12557
- classes: ["border-b", ...N(D.borderWidth, (t) => `border-b-${t}`)],
12561
+ classes: ["border-b", ...C(D.borderWidth, (t) => `border-b-${t}`)],
12558
12562
  regExp: "border-b-?(\\d+|\\S+|\\[.*\\])?"
12559
12563
  },
12560
12564
  borderLeft: {
12561
- classes: ["border-l", ...N(D.borderWidth, (t) => `border-l-${t}`)],
12565
+ classes: ["border-l", ...C(D.borderWidth, (t) => `border-l-${t}`)],
12562
12566
  regExp: "border-l-?(\\d+|\\S+|\\[.*\\])?"
12563
12567
  },
12564
12568
  borderColor: {
@@ -12566,19 +12570,19 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12566
12570
  regExp: "^border-(black|transparent|current|white|__THEME_COLORS_REGEXP__|\\w+-\\d+|\\[#[0-9a-fA-F]+\\])$"
12567
12571
  },
12568
12572
  border: {
12569
- classes: ["border", ...N(D.borderWidth, (t) => `border-${t}`)],
12573
+ classes: ["border", ...C(D.borderWidth, (t) => `border-${t}`)],
12570
12574
  regExp: "^border(-\\d+|\\[\\d+px\\])?$"
12571
12575
  },
12572
12576
  order: {
12573
- classes: N([...Ye(0, 13), "first", "last", "none"], (t) => `order-${t}`),
12577
+ classes: C([...Ye(0, 13), "first", "last", "none"], (t) => `order-${t}`),
12574
12578
  regExp: "-?order-(\\d+|first|last|none)"
12575
12579
  },
12576
12580
  divideXWidth: {
12577
- classes: N(["0", 2, 4, 8], (t) => `divide-x-${t}`),
12581
+ classes: C(["0", 2, 4, 8], (t) => `divide-x-${t}`),
12578
12582
  regExp: "divide-x-(\\d+|\\[.*\\])"
12579
12583
  },
12580
12584
  divideYWidth: {
12581
- classes: N(["0", 2, 4, 8], (t) => `divide-y-${t}`),
12585
+ classes: C(["0", 2, 4, 8], (t) => `divide-y-${t}`),
12582
12586
  regExp: "divide-y-(\\d+|\\[.*\\])"
12583
12587
  },
12584
12588
  divideColor: {
@@ -12586,15 +12590,15 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12586
12590
  regExp: "divide-(black|transparent|current|white|__THEME_COLORS_REGEXP__|\\S+-\\d+)"
12587
12591
  },
12588
12592
  divideStyle: {
12589
- classes: N(["solid", "dashed", "dotted", "double", "none"], (t) => `divide-${t}`),
12593
+ classes: C(["solid", "dashed", "dotted", "double", "none"], (t) => `divide-${t}`),
12590
12594
  regExp: "divide-(solid|dashed|dotted|double|none)"
12591
12595
  },
12592
12596
  outlineWidth: {
12593
- classes: N([0, 1, 2, 4, 8], (t) => `outline-${t}`),
12597
+ classes: C([0, 1, 2, 4, 8], (t) => `outline-${t}`),
12594
12598
  regExp: "outline-(\\d+)"
12595
12599
  },
12596
12600
  outlineOffset: {
12597
- classes: N([0, 1, 2, 4, 8], (t) => `outline-offset-${t}`),
12601
+ classes: C([0, 1, 2, 4, 8], (t) => `outline-offset-${t}`),
12598
12602
  regExp: "outline-offset-(\\d+)"
12599
12603
  },
12600
12604
  outlineColor: {
@@ -12602,11 +12606,11 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12602
12606
  regExp: "outline-(black|transparent|current|white|__THEME_COLORS_REGEXP__|\\S+-\\d+)"
12603
12607
  },
12604
12608
  ringWidth: {
12605
- classes: N([0, 1, 2, 4, 8, "inset"], (t) => `ring-${t}`),
12609
+ classes: C([0, 1, 2, 4, 8, "inset"], (t) => `ring-${t}`),
12606
12610
  regExp: "ring-(\\d+|inset)"
12607
12611
  },
12608
12612
  ringOffsetWidth: {
12609
- classes: N([0, 1, 2, 4, 8], (t) => `ring-offset-${t}`),
12613
+ classes: C([0, 1, 2, 4, 8], (t) => `ring-offset-${t}`),
12610
12614
  regExp: "ring-offset-(\\d+)"
12611
12615
  },
12612
12616
  ringOffsetColor: {
@@ -12624,28 +12628,28 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12624
12628
  regExp: "shadow-(black|transparent|current|white|__THEME_COLORS_REGEXP__|\\S+-\\d+)"
12625
12629
  },
12626
12630
  opacity: {
12627
- classes: N([0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 95, 100], (t) => `opacity-${t}`),
12631
+ classes: C([0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80, 90, 95, 100], (t) => `opacity-${t}`),
12628
12632
  regExp: "opacity-(\\d+|\\[.*\\])"
12629
12633
  },
12630
12634
  mixBlendMode: {
12631
- classes: N(D.blendEffect, (t) => `mix-blend-${t}`),
12635
+ classes: C(D.blendEffect, (t) => `mix-blend-${t}`),
12632
12636
  regExp: "mix-blend-(\\d+|\\S+)"
12633
12637
  },
12634
12638
  bgBlendMode: {
12635
- classes: N(D.blendEffect, (t) => `bg-blend-${t}`),
12639
+ classes: C(D.blendEffect, (t) => `bg-blend-${t}`),
12636
12640
  regExp: "bg-blend-(\\d+|\\S+)"
12637
12641
  },
12638
12642
  // filters
12639
12643
  blur: {
12640
- classes: N(["none", "sm", "md", "lg", "xl", "2xl", "3xl"], (t) => `blur-${t}`),
12644
+ classes: C(["none", "sm", "md", "lg", "xl", "2xl", "3xl"], (t) => `blur-${t}`),
12641
12645
  regExp: "blur-(none|sm|md|lg|xl|2xl|3xl)"
12642
12646
  },
12643
12647
  brightness: {
12644
- classes: N([0, 50, 75, 90, 95, 100, 105, 110, 125, 150, 200], (t) => `brightness-${t}`),
12648
+ classes: C([0, 50, 75, 90, 95, 100, 105, 110, 125, 150, 200], (t) => `brightness-${t}`),
12645
12649
  regExp: "brightness-(\\d+)"
12646
12650
  },
12647
12651
  contrast: {
12648
- classes: N([0, 50, 75, 100, 125, 150, 200], (t) => `contrast-${t}`),
12652
+ classes: C([0, 50, 75, 100, 125, 150, 200], (t) => `contrast-${t}`),
12649
12653
  regExp: "contrast-(\\d+)"
12650
12654
  },
12651
12655
  grayScale: {
@@ -12653,12 +12657,12 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12653
12657
  regExp: "grayscale(-0)?"
12654
12658
  },
12655
12659
  hueRotate: {
12656
- classes: N([0, 15, 30, 60, 90, 180], (t) => `hue-rotate-${t}`),
12660
+ classes: C([0, 15, 30, 60, 90, 180], (t) => `hue-rotate-${t}`),
12657
12661
  regExp: "-?hue-rotate-(\\d+)"
12658
12662
  },
12659
12663
  invert: { classes: ["invert-0", "invert"], regExp: "invert(-0)?" },
12660
12664
  saturate: {
12661
- classes: N([0, 50, 100, 150, 200], (t) => `saturate-${t}`),
12665
+ classes: C([0, 50, 100, 150, 200], (t) => `saturate-${t}`),
12662
12666
  regExp: "saturate-(\\d+)"
12663
12667
  },
12664
12668
  sepia: { classes: ["sepia-0", "sepia"], regExp: "sepia(-0)?" },
@@ -12676,7 +12680,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12676
12680
  regExp: "transition-(none|all|colors|opacity|shadow|transform)"
12677
12681
  },
12678
12682
  duration: {
12679
- classes: N([75, 100, 150, 200, 300, 500, 700, 1e3], (t) => `duration-${t}`),
12683
+ classes: C([75, 100, 150, 200, 300, 500, 700, 1e3], (t) => `duration-${t}`),
12680
12684
  regExp: "duration-(\\d+|\\[.*\\])"
12681
12685
  },
12682
12686
  transitionEase: {
@@ -12684,7 +12688,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12684
12688
  regExp: "eas(e-linear|e-in|e-out|e-in-out)"
12685
12689
  },
12686
12690
  transitionDelay: {
12687
- classes: N([75, 100, 150, 200, 300, 500, 700, 1e3], (t) => `delay-${t}`),
12691
+ classes: C([75, 100, 150, 200, 300, 500, 700, 1e3], (t) => `delay-${t}`),
12688
12692
  regExp: "delay-(\\d+|\\[.*\\])"
12689
12693
  },
12690
12694
  animation: {
@@ -12692,35 +12696,35 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12692
12696
  regExp: "animate-(none|spin|ping)"
12693
12697
  },
12694
12698
  scaleX: {
12695
- classes: N(D.scale, (t) => `scale-x-${t}`),
12699
+ classes: C(D.scale, (t) => `scale-x-${t}`),
12696
12700
  regExp: "-?scale-x-(\\d+|\\S+|\\[.*\\])"
12697
12701
  },
12698
12702
  scaleY: {
12699
- classes: N(D.scale, (t) => `scale-y-${t}`),
12703
+ classes: C(D.scale, (t) => `scale-y-${t}`),
12700
12704
  regExp: "-?scale-y-(\\d+|\\S+|\\[.*\\])"
12701
12705
  },
12702
12706
  scale: {
12703
- classes: N(D.scale, (t) => `scale-${t}`),
12707
+ classes: C(D.scale, (t) => `scale-${t}`),
12704
12708
  regExp: "-?scale-(\\d+|\\S+|\\[.*\\])"
12705
12709
  },
12706
12710
  rotate: {
12707
- classes: N([0, 1, 2, 3, 6, 12, 45, 90, 180], (t) => `rotate-${t}`),
12711
+ classes: C([0, 1, 2, 3, 6, 12, 45, 90, 180], (t) => `rotate-${t}`),
12708
12712
  regExp: "-?rotate-(\\d+|\\S+|\\[.*\\])"
12709
12713
  },
12710
12714
  translateX: {
12711
- classes: N([0, "px", "0.5", 1], (t) => `translate-x-${t}`),
12715
+ classes: C([0, "px", "0.5", 1], (t) => `translate-x-${t}`),
12712
12716
  regExp: "-?translate-x-(\\d+|\\S+|\\[.*\\])"
12713
12717
  },
12714
12718
  translateY: {
12715
- classes: N([0, "px", "0.5", 1], (t) => `translate-y-${t}`),
12719
+ classes: C([0, "px", "0.5", 1], (t) => `translate-y-${t}`),
12716
12720
  regExp: "-?translate-y-(\\d+|\\S+|\\[.*\\])"
12717
12721
  },
12718
12722
  skewX: {
12719
- classes: N([0, 1, 2, 3, 6, 12], (t) => `skew-x-${t}`),
12723
+ classes: C([0, 1, 2, 3, 6, 12], (t) => `skew-x-${t}`),
12720
12724
  regExp: "-?skew-x-(\\d+|\\S+|\\[.*\\])"
12721
12725
  },
12722
12726
  skewY: {
12723
- classes: N([0, 1, 2, 3, 6, 12], (t) => `skew-y-${t}`),
12727
+ classes: C([0, 1, 2, 3, 6, 12], (t) => `skew-y-${t}`),
12724
12728
  regExp: "-?skew-y-(\\d+|\\S+|\\[.*\\])"
12725
12729
  },
12726
12730
  // interactivity
@@ -12799,13 +12803,13 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12799
12803
  "fuchsia",
12800
12804
  "pink",
12801
12805
  "rose"
12802
- ], Ix = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"], ks = N(Tt(Ax), (t) => t), Rx = Rt([
12803
- ...N(Tx, (t) => Ot(N(ks, (e) => `${e}-${t}`))),
12804
- ...N(
12806
+ ], Ix = ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"], ks = C(Tt(Ax), (t) => t), Rx = Rt([
12807
+ ...C(Tx, (t) => Ot(C(ks, (e) => `${e}-${t}`))),
12808
+ ...C(
12805
12809
  Bx,
12806
- (t) => Rt(N(ks, (e) => Rt(N(Ix, (n) => `${e}-${t}-${n}`))))
12810
+ (t) => Rt(C(ks, (e) => Rt(C(Ix, (n) => `${e}-${t}-${n}`))))
12807
12811
  )
12808
- ]), Lx = N(
12812
+ ]), Lx = C(
12809
12813
  Rt(
12810
12814
  Tt(Pn).map((t) => t.classes).concat(Rx)
12811
12815
  ),
@@ -12816,10 +12820,10 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12816
12820
  const t = Nr(), e = M(() => {
12817
12821
  let n = [];
12818
12822
  if (t.colors) {
12819
- const r = Rt(N(t.colors, ({ items: o }) => Ct(o)));
12820
- n = Rt(N(r, (o) => Ot(N(ks, (s) => `${s}-${o}`))));
12823
+ const r = Rt(C(t.colors, ({ items: o }) => Ct(o)));
12824
+ n = Rt(C(r, (o) => Ot(C(ks, (s) => `${s}-${o}`))));
12821
12825
  }
12822
- return t.fontFamily && (n = [...n, ...N(Ct(t.fontFamily), (r) => `${r}`)]), N(n, (r) => ({ name: r }));
12826
+ return t.fontFamily && (n = [...n, ...C(Ct(t.fontFamily), (r) => `${r}`)]), C(n, (r) => ({ name: r }));
12823
12827
  }, [t]);
12824
12828
  return M(
12825
12829
  () => new Cl([...Lx, ...e], {
@@ -12833,7 +12837,7 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12833
12837
  }, Oo = () => {
12834
12838
  const t = Nr(), e = M(() => {
12835
12839
  if (t.colors) {
12836
- const o = Rt(N(t.colors, ({ items: s }) => Ct(s)));
12840
+ const o = Rt(C(t.colors, ({ items: s }) => Ct(s)));
12837
12841
  It(Pn, (s, i) => {
12838
12842
  We(Pn, `${i}.regExp`, s.regExp.replace("__THEME_COLORS_REGEXP__", o.join("|")));
12839
12843
  });
@@ -12841,17 +12845,17 @@ const bx = P(null, (t, e, { blockIds: n, fullClasses: r }) => {
12841
12845
  return Pn;
12842
12846
  }, [t]), n = R(
12843
12847
  (o, s) => {
12844
- const i = S(e, `${o}.regExp`, "");
12848
+ const i = N(e, `${o}.regExp`, "");
12845
12849
  return s.match(new RegExp(i));
12846
12850
  },
12847
12851
  [e]
12848
12852
  ), r = R(
12849
- (o, s = []) => S(e, `${o}.classes`, s),
12853
+ (o, s = []) => N(e, `${o}.classes`, s),
12850
12854
  [e]
12851
12855
  );
12852
12856
  return { match: n, getClasses: r };
12853
12857
  }, Fd = ({ label: t, property: e, onChange: n }) => {
12854
- const { getClasses: r } = Oo(), o = r(e), s = Lr(e), i = M(() => S(s, "cls", ""), [s]), { canChange: l } = Wn(Rr), c = /\[.*\]/g.test(i);
12858
+ const { getClasses: r } = Oo(), o = r(e), s = Lr(e), i = M(() => N(s, "cls", ""), [s]), { canChange: l } = Wn(Rr), c = /\[.*\]/g.test(i);
12855
12859
  return /* @__PURE__ */ a("div", { className: t ? "w-full rounded" : "grow", children: c ? /* @__PURE__ */ g("div", { className: "flex items-center", children: [
12856
12860
  /* @__PURE__ */ a(br, { className: "w-[70%] rounded py-1", readOnly: !0, value: i }),
12857
12861
  /* @__PURE__ */ g(Ee, { delayDuration: 100, children: [
@@ -12901,7 +12905,7 @@ const Ox = {
12901
12905
  ringColor: "ring",
12902
12906
  ringOffsetColor: "ring-offset"
12903
12907
  }, Dx = ({ property: t, onChange: e }) => {
12904
- const n = Lr(t), r = M(() => S(n, "cls", ""), [n]), { canChange: o } = Wn(Rr), [s, i] = F([]), [l, c] = F({ color: "", shade: "" }), d = r.split("-"), u = S(d, "1", ""), p = S(d, "2", ""), h = R(
12908
+ const n = Lr(t), r = M(() => N(n, "cls", ""), [n]), { canChange: o } = Wn(Rr), [s, i] = F([]), [l, c] = F({ color: "", shade: "" }), d = r.split("-"), u = N(d, "1", ""), p = N(d, "2", ""), h = R(
12905
12909
  (b) => {
12906
12910
  ["current", "inherit", "transparent", "black", "white"].includes(b) ? (i([]), c({ color: b })) : (i(["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"]), c((y) => ({ ...y, color: b, shade: y.shade ? y.shade : "500" })));
12907
12911
  },
@@ -12923,7 +12927,7 @@ const Ox = {
12923
12927
  }, [n]);
12924
12928
  const { match: m } = Oo();
12925
12929
  return H(() => {
12926
- const y = `${S(Ox, t, "")}-${l.color}${l.shade ? `-${l.shade}` : ""}`;
12930
+ const y = `${N(Ox, t, "")}-${l.color}${l.shade ? `-${l.shade}` : ""}`;
12927
12931
  m(t, y) && e(y, t);
12928
12932
  }, [m, l, e, t]), /* @__PURE__ */ g("div", { className: "flex flex-row divide-x divide-solid divide-border rounded-lg border border-transparent text-xs", children: [
12929
12933
  /* @__PURE__ */ a("div", { className: "grow text-center", children: /* @__PURE__ */ a(
@@ -13162,8 +13166,8 @@ const Ox = {
13162
13166
  ] }),
13163
13167
  static: qe
13164
13168
  }, Mx = ({ property: t, onChange: e }) => {
13165
- const { getClasses: n } = Oo(), r = n(t), { canChange: o } = Wn(Rr), s = Lr(t), i = M(() => S(s, "cls", ""), [s]);
13166
- return /* @__PURE__ */ a("div", { className: "flex grow flex-wrap gap-1", children: N(r, (l) => /* @__PURE__ */ g(Ee, { children: [
13169
+ const { getClasses: n } = Oo(), r = n(t), { canChange: o } = Wn(Rr), s = Lr(t), i = M(() => N(s, "cls", ""), [s]);
13170
+ return /* @__PURE__ */ a("div", { className: "flex grow flex-wrap gap-1", children: C(r, (l) => /* @__PURE__ */ g(Ee, { children: [
13167
13171
  /* @__PURE__ */ a(_e, { asChild: !0, children: /* @__PURE__ */ a(
13168
13172
  "button",
13169
13173
  {
@@ -13171,13 +13175,13 @@ const Ox = {
13171
13175
  disabled: !o,
13172
13176
  onClick: () => e(l, t),
13173
13177
  className: `cursor-pointer rounded border border-border p-1 disabled:cursor-not-allowed ${i === l ? "bg-primary text-white" : "disabled:bg-gray-600 disabled:text-gray-400"}`,
13174
- children: Q.createElement(S(zd, l, Ps))
13178
+ children: Q.createElement(N(zd, l, Ps))
13175
13179
  }
13176
13180
  ) }),
13177
13181
  /* @__PURE__ */ a(ke, { children: Jt(Ja(l)) })
13178
13182
  ] })) });
13179
13183
  }, $x = ({ property: t, onChange: e }) => {
13180
- const { canReset: n, canChange: r } = Wn(Rr), o = Lr(t), s = M(() => S(o, "cls", ""), [o]), { getClasses: i } = Oo(), l = i(t, [""]), c = l.indexOf(s) > -1 ? l.indexOf(s) : 0, d = /\[.*\]/g.test(s);
13184
+ const { canReset: n, canChange: r } = Wn(Rr), o = Lr(t), s = M(() => N(o, "cls", ""), [o]), { getClasses: i } = Oo(), l = i(t, [""]), c = l.indexOf(s) > -1 ? l.indexOf(s) : 0, d = /\[.*\]/g.test(s);
13181
13185
  return /* @__PURE__ */ a("div", { className: "flex flex-row divide-x divide-solid divide-border rounded border border-border text-xs", children: d ? /* @__PURE__ */ a("div", { className: "px-2 py-[5px]", children: s }) : /* @__PURE__ */ g(Z, { children: [
13182
13186
  /* @__PURE__ */ a(
13183
13187
  "button",
@@ -13215,11 +13219,11 @@ const Ox = {
13215
13219
  function Fx(t) {
13216
13220
  if ($(t.trim())) return "";
13217
13221
  const e = t.match(/sm:|md:|lg:|xl:|2xl:/g);
13218
- return S(e, 0, "xs").replace(":", "");
13222
+ return N(e, 0, "xs").replace(":", "");
13219
13223
  }
13220
13224
  function zx(t) {
13221
- const e = N(ih, (r) => `${r}:`).join("|"), n = new RegExp(e, "g");
13222
- return S(n.exec(t.trim()), 0, "").replace(":", "");
13225
+ const e = C(ih, (r) => `${r}:`).join("|"), n = new RegExp(e, "g");
13226
+ return N(n.exec(t.trim()), 0, "").replace(":", "");
13223
13227
  }
13224
13228
  function Hx(t) {
13225
13229
  return t.trim().split(":").pop() || "";
@@ -13231,7 +13235,7 @@ function Vx(t) {
13231
13235
  return ss[t];
13232
13236
  let e = "";
13233
13237
  for (const n in Pn) {
13234
- const r = S(Pn, `${n}.regExp`, "");
13238
+ const r = N(Pn, `${n}.regExp`, "");
13235
13239
  if (new RegExp(r, "g").test(t)) {
13236
13240
  e = n, ss[t] = e;
13237
13241
  break;
@@ -13291,8 +13295,8 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13291
13295
  n.includes(t(i)._id)
13292
13296
  )
13293
13297
  ), s = Ce(t(Ar));
13294
- return N(o, (i) => {
13295
- const l = t(i), c = S(l, s.prop, `${Dt},`), { classes: d } = Gn(c);
13298
+ return C(o, (i) => {
13299
+ const l = t(i), c = N(l, s.prop, `${Dt},`), { classes: d } = Gn(c);
13296
13300
  return {
13297
13301
  ids: [l._id],
13298
13302
  props: {
@@ -13320,9 +13324,9 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13320
13324
  return n === -1 ? ["xs"] : e.slice(0, n + 1);
13321
13325
  }, Ux = P((t) => {
13322
13326
  const e = Ce(t(Ar)), n = t(No);
13323
- if (!e || e.blockId !== S(n, "_id", null)) return [];
13324
- const r = S(n, e.prop, `${Dt},`), { classes: o } = Gn(r);
13325
- return ee(N(o.trim().split(" "), Ri), (s) => !Bs(s));
13327
+ if (!e || e.blockId !== N(n, "_id", null)) return [];
13328
+ const r = N(n, e.prop, `${Dt},`), { classes: o } = Gn(r);
13329
+ return ee(C(o.trim().split(" "), Ri), (s) => !Bs(s));
13326
13330
  }), Ba = { xs: 0, sm: 1, md: 2, lg: 3, xl: 4, "2xl": 5 }, Kx = P((t) => {
13327
13331
  const e = t(wd), n = t(Xs), r = t(wc), o = Gx(e);
13328
13332
  let s = ee(t(Ux), { mod: n });
@@ -13339,7 +13343,7 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13339
13343
  xl: 4,
13340
13344
  "2xl": 5
13341
13345
  };
13342
- return n[S(t, "mq", "xs")] <= n[e];
13346
+ return n[N(t, "mq", "xs")] <= n[e];
13343
13347
  }, Xx = {
13344
13348
  width: "w-",
13345
13349
  height: "h-",
@@ -13415,12 +13419,12 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13415
13419
  "2xl": "1536px"
13416
13420
  }, qx = (t) => `${t.toUpperCase()} ${Ia[t] ? `(${Ia[t]} & up)` : ""}`, ho = (t) => {
13417
13421
  const { t: e } = U(), { type: n = "icons", label: r, property: o, onEmitChange: s = () => {
13418
- }, units: i, negative: l = !1 } = t, [c] = Tr(), [d] = Jx(), [, u] = fo(), p = Lr(o), h = Hd(), f = Ii(), [m] = re(), b = M(() => S(p, "fullCls", ""), [p]), y = R(
13419
- (T, C = !0) => {
13420
- const k = { dark: c, mq: u, mod: d, cls: T };
13421
- (c || d !== "") && (k.mq = "xs");
13422
- const w = jx(k);
13423
- h(m, [w], C);
13422
+ }, units: i, negative: l = !1 } = t, [c] = Tr(), [d] = Jx(), [, u] = fo(), p = Lr(o), h = Hd(), f = Ii(), [m] = re(), b = M(() => N(p, "fullCls", ""), [p]), y = R(
13423
+ (B, k = !0) => {
13424
+ const _ = { dark: c, mq: u, mod: d, cls: B };
13425
+ (c || d !== "") && (_.mq = "xs");
13426
+ const w = jx(_);
13427
+ h(m, [w], k);
13424
13428
  },
13425
13429
  [m, c, u, d, o, h]
13426
13430
  ), x = R(() => {
@@ -13429,19 +13433,19 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13429
13433
  H(() => {
13430
13434
  s(v, p);
13431
13435
  }, [v, s, p]);
13432
- const [, , E] = fo(), _ = R(
13433
- (T) => {
13434
- E({
13436
+ const [, , S] = fo(), E = R(
13437
+ (B) => {
13438
+ S({
13435
13439
  xs: 400,
13436
13440
  sm: 640,
13437
13441
  md: 800,
13438
13442
  lg: 1024,
13439
13443
  xl: 1420,
13440
13444
  "2xl": 1920
13441
- }[T]);
13445
+ }[B]);
13442
13446
  },
13443
- [E]
13444
- ), A = S(p, "dark", null) === c && S(p, "mod", null) === d && S(p, "mq", null) === u;
13447
+ [S]
13448
+ ), A = N(p, "dark", null) === c && N(p, "mod", null) === d && N(p, "mq", null) === u;
13445
13449
  return /* @__PURE__ */ a(_x, { canChange: v, canReset: p && A, children: /* @__PURE__ */ g("div", { className: "group flex flex-row items-center py-2 first:pt-0 last:pb-0", children: [
13446
13450
  /* @__PURE__ */ a("div", { className: "relative w-[70px] truncate text-xs text-foreground", children: /* @__PURE__ */ a("span", { className: `text-[11px] ${p && !A ? "text-foreground" : ""}`, children: e(r) }) }),
13447
13451
  /* @__PURE__ */ g("div", { className: "flex flex-row items-center", children: [
@@ -13449,8 +13453,8 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13449
13453
  n === "arbitrary" ? /* @__PURE__ */ a(
13450
13454
  Ex,
13451
13455
  {
13452
- currentClass: S(p, "cls", ""),
13453
- classPrefix: S(Xx, o, ""),
13456
+ currentClass: N(p, "cls", ""),
13457
+ classPrefix: N(Xx, o, ""),
13454
13458
  units: i || [],
13455
13459
  onChange: y,
13456
13460
  negative: l,
@@ -13474,7 +13478,7 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13474
13478
  /* @__PURE__ */ a(ke, { children: /* @__PURE__ */ a("div", { className: "text-right", children: /* @__PURE__ */ g("div", { children: [
13475
13479
  "Current style is set at  ",
13476
13480
  /* @__PURE__ */ g("span", { className: "font-bold", children: [
13477
- qx(S(p, "mq")),
13481
+ qx(N(p, "mq")),
13478
13482
  c && !p.dark ? "(Light mode)" : ""
13479
13483
  ] }),
13480
13484
  /* @__PURE__ */ a("br", {}),
@@ -13482,11 +13486,11 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13482
13486
  "button",
13483
13487
  {
13484
13488
  type: "button",
13485
- onClick: () => _(S(p, "mq")),
13489
+ onClick: () => E(N(p, "mq")),
13486
13490
  className: "block w-full cursor-default text-right font-semibold text-blue-500",
13487
13491
  children: [
13488
13492
  "Switch to ",
13489
- S(p, "mq").toUpperCase()
13493
+ N(p, "mq").toUpperCase()
13490
13494
  ]
13491
13495
  }
13492
13496
  )
@@ -13503,7 +13507,7 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13503
13507
  units: s = Zx,
13504
13508
  negative: i = !1
13505
13509
  }) => {
13506
- const { t: l } = U(), [c, d] = F(e[0].key), u = Do(), p = R((h) => N(u, "property").includes(h), [u]);
13510
+ const { t: l } = U(), [c, d] = F(e[0].key), u = Do(), p = R((h) => C(u, "property").includes(h), [u]);
13507
13511
  return /* @__PURE__ */ g(
13508
13512
  "div",
13509
13513
  {
@@ -13522,7 +13526,7 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13522
13526
  Q.createElement("div", {
13523
13527
  className: p(f) ? "-bottom-1.5 absolute bg-[#3E57F0] h-[2px] left-0 w-full" : ""
13524
13528
  }),
13525
- Q.createElement(S(zd, f, Ps), { className: "text-inherit w-3 h-3" })
13529
+ Q.createElement(N(zd, f, Ps), { className: "text-inherit w-3 h-3" })
13526
13530
  ]
13527
13531
  }
13528
13532
  ) }),
@@ -13545,10 +13549,10 @@ const Wx = P(null, (t, e, { blockIds: n, newClasses: r }) => {
13545
13549
  }, Ra = ({ heading: t, items: e }) => {
13546
13550
  const { t: n } = U(), r = Do(), o = M(() => {
13547
13551
  const s = (c) => Ot(
13548
- c.map((d) => d.styleType === "multiple" ? N(d.options, "key") : d.property)
13552
+ c.map((d) => d.styleType === "multiple" ? C(d.options, "key") : d.property)
13549
13553
  ), i = Ot(
13550
- e.map((c) => c.styleType === "accordion" ? s(c.items) : c.styleType === "multiple" ? N(c.options, "key") : c.property)
13551
- ), l = N(r, "property");
13554
+ e.map((c) => c.styleType === "accordion" ? s(c.items) : c.styleType === "multiple" ? C(c.options, "key") : c.property)
13555
+ ), l = C(r, "property");
13552
13556
  return Uu(i, l).length > 0;
13553
13557
  }, [r, e]);
13554
13558
  return /* @__PURE__ */ g("details", { children: [
@@ -13702,11 +13706,11 @@ const n0 = Qe("selectedBreakpoints", ["XS", "MD", "XL"]), r0 = () => {
13702
13706
  activeButtonClass: o = ""
13703
13707
  }) => {
13704
13708
  const [s, , i] = fo(), [l, c] = _i(), [d, u] = r0(), p = d, h = u, { t: f } = U(), m = G("breakpoints", Ss), b = (v) => {
13705
- p.includes(v) ? p.length > 2 && h(p.filter((E) => E !== v)) : h((E) => [...E, v]);
13709
+ p.includes(v) ? p.length > 2 && h(p.filter((S) => S !== v)) : h((S) => [...S, v]);
13706
13710
  }, y = (v) => {
13707
13711
  e || i(v), c(v);
13708
13712
  }, x = bl(e ? l : s).toLowerCase();
13709
- return m.length < 4 ? /* @__PURE__ */ a("div", { className: "flex items-center rounded-md", children: N(m, (v) => /* @__PURE__ */ fn(
13713
+ return m.length < 4 ? /* @__PURE__ */ a("div", { className: "flex items-center rounded-md", children: C(m, (v) => /* @__PURE__ */ fn(
13710
13714
  Pa,
13711
13715
  {
13712
13716
  canvas: e,
@@ -13716,7 +13720,7 @@ const n0 = Qe("selectedBreakpoints", ["XS", "MD", "XL"]), r0 = () => {
13716
13720
  currentBreakpoint: x
13717
13721
  }
13718
13722
  )) }) : /* @__PURE__ */ g("div", { className: "flex w-full items-center justify-between rounded-md", children: [
13719
- /* @__PURE__ */ a("div", { className: "flex items-center", children: N(
13723
+ /* @__PURE__ */ a("div", { className: "flex items-center", children: C(
13720
13724
  m.filter((v) => Be(p, Go(v.breakpoint))),
13721
13725
  (v) => /* @__PURE__ */ fn(
13722
13726
  Pa,
@@ -13738,13 +13742,13 @@ const n0 = Qe("selectedBreakpoints", ["XS", "MD", "XL"]), r0 = () => {
13738
13742
  /* @__PURE__ */ g(mt, { className: "w-56 border-border text-xs", children: [
13739
13743
  /* @__PURE__ */ a(Al, { children: f("Screen sizes") }),
13740
13744
  /* @__PURE__ */ a(Tl, {}),
13741
- N(m, (v) => /* @__PURE__ */ a(
13745
+ C(m, (v) => /* @__PURE__ */ a(
13742
13746
  _l,
13743
13747
  {
13744
13748
  disabled: v.breakpoint === "xs",
13745
13749
  onCheckedChange: () => b(Go(v.breakpoint)),
13746
13750
  checked: Be(p, Go(v.breakpoint)),
13747
- onSelect: (E) => E.preventDefault(),
13751
+ onSelect: (S) => S.preventDefault(),
13748
13752
  children: f(v.title)
13749
13753
  },
13750
13754
  v.breakpoint
@@ -13792,29 +13796,29 @@ function Wd({
13792
13796
  onRemove: r
13793
13797
  }) {
13794
13798
  var zt;
13795
- const o = ie(null), [s, i] = F(""), [l, c] = F(!1), [d, u] = F(-1), p = ie(!1), [, h] = Gl(), f = Px(), { t: m } = U(), [b] = De(), y = de(), x = Hd(), v = Ii(), [E] = re(), [_, A] = F(""), T = Ge(kr), C = (zt = Ce(b)) == null ? void 0 : zt.prop, { classes: k } = Gn(S(y, C, "")), B = (t === "default" ? k : e ?? "").split(" ").filter((J) => !$(J)), L = M(() => [...B].sort((J, ae) => {
13799
+ const o = ie(null), [s, i] = F(""), [l, c] = F(!1), [d, u] = F(-1), p = ie(!1), [, h] = Gl(), f = Px(), { t: m } = U(), [b] = De(), y = de(), x = Hd(), v = Ii(), [S] = re(), [E, A] = F(""), B = Ge(kr), k = (zt = Ce(b)) == null ? void 0 : zt.prop, { classes: _ } = Gn(N(y, k, "")), T = (t === "default" ? _ : e ?? "").split(" ").filter((J) => !$(J)), L = M(() => [...T].sort((J, ae) => {
13796
13800
  const Ve = J.startsWith(Or), Et = ae.startsWith(Or);
13797
13801
  return Ve && !Et ? -1 : !Ve && Et ? 1 : 0;
13798
- }), [B]), I = G("flags.copyPaste", !0), W = (J) => {
13802
+ }), [T]), I = G("flags.copyPaste", !0), W = (J) => {
13799
13803
  if (J.startsWith(Or)) {
13800
- const ae = T[J];
13804
+ const ae = B[J];
13801
13805
  return ae ? ae.name : J;
13802
13806
  }
13803
13807
  return J;
13804
13808
  }, K = (J) => {
13805
- const ae = Object.entries(T).find(([, Ve]) => Ve.name === J);
13809
+ const ae = Object.entries(B).find(([, Ve]) => Ve.name === J);
13806
13810
  return ae ? `${ae[0]}` : J;
13807
13811
  }, q = () => {
13808
- const J = _.trim().replace(/ +(?= )/g, "").split(" ").map(K);
13809
- t === "designToken" ? tn(n) && n(J) : x(E, J, !0), A("");
13812
+ const J = E.trim().replace(/ +(?= )/g, "").split(" ").map(K);
13813
+ t === "designToken" ? tn(n) && n(J) : x(S, J, !0), A("");
13810
13814
  }, [xe, ve] = F([]), ue = G("flags.designTokens", !0), Me = ({ value: J }) => {
13811
13815
  const ae = J.trim().toLowerCase(), Ve = ae.match(/.+:/g);
13812
13816
  let Et = [], Vo = [];
13813
- if (ue && (ae === "" ? Vo = Object.entries(T).map(([Ht, Xn]) => ({
13817
+ if (ue && (ae === "" ? Vo = Object.entries(B).map(([Ht, Xn]) => ({
13814
13818
  name: Xn.name,
13815
13819
  id: `${Ht}`,
13816
13820
  isDesignToken: !0
13817
- })) : Vo = Object.entries(T).filter(([, Ht]) => Ht.name.toLowerCase().includes(ae)).map(([Ht, Xn]) => ({
13821
+ })) : Vo = Object.entries(B).filter(([, Ht]) => Ht.name.toLowerCase().includes(ae)).map(([Ht, Xn]) => ({
13818
13822
  name: Xn.name,
13819
13823
  id: `${Ht}`,
13820
13824
  isDesignToken: !0
@@ -13826,7 +13830,7 @@ function Wd({
13826
13830
  }));
13827
13831
  } else
13828
13832
  Et = f.search(ae);
13829
- const Cu = [...Vo, ...N(Et, "item")];
13833
+ const Cu = [...Vo, ...C(Et, "item")];
13830
13834
  return ve(Cu);
13831
13835
  }, tt = () => {
13832
13836
  ve([]);
@@ -13841,14 +13845,14 @@ function Wd({
13841
13845
  autoCapitalize: "off",
13842
13846
  spellCheck: !1,
13843
13847
  placeholder: m("Enter classes separated by space"),
13844
- value: _,
13848
+ value: E,
13845
13849
  onFocus: (J) => {
13846
13850
  setTimeout(() => {
13847
13851
  J.target && J.target.select();
13848
13852
  }, 0);
13849
13853
  },
13850
13854
  onKeyDown: (J) => {
13851
- if (J.key === "Enter" && _.trim() !== "") {
13855
+ if (J.key === "Enter" && E.trim() !== "") {
13852
13856
  if (p.current) {
13853
13857
  p.current = !1;
13854
13858
  return;
@@ -13869,16 +13873,16 @@ function Wd({
13869
13873
  onChange: (J, { newValue: ae }) => A(ae),
13870
13874
  className: `w-full rounded-md text-xs px-2 hover:outline-0 bg-background border-border ${t === "default" ? "py-1" : "py-1.5"}`
13871
13875
  }),
13872
- [_, m, o, xe.length]
13876
+ [E, m, o, xe.length]
13873
13877
  ), qt = (J) => {
13874
13878
  const ae = s.trim().replace(/ +(?= )/g, "").split(" ").map(K);
13875
- v(E, [J], !0), x(E, ae, !0), i(""), u(-1);
13879
+ v(S, [J], !0), x(S, ae, !0), i(""), u(-1);
13876
13880
  }, _n = () => {
13877
13881
  if (navigator.clipboard === void 0) {
13878
13882
  Ne.error(m("Clipboard not supported"));
13879
13883
  return;
13880
13884
  }
13881
- navigator.clipboard.writeText(B.join(" ")), Ne.success(m("Classes copied to clipboard")), c(!0), setTimeout(() => c(!1), 2e3);
13885
+ navigator.clipboard.writeText(T.join(" ")), Ne.success(m("Classes copied to clipboard")), c(!0), setTimeout(() => c(!1), 2e3);
13882
13886
  };
13883
13887
  return /* @__PURE__ */ g(
13884
13888
  "div",
@@ -13908,7 +13912,7 @@ function Wd({
13908
13912
  onSuggestionSelected: (J, { suggestionValue: ae }) => {
13909
13913
  p.current = !0;
13910
13914
  const Et = [K(ae)];
13911
- t === "designToken" ? tn(n) && n(Et) : x(E, Et, !0), A("");
13915
+ t === "designToken" ? tn(n) && n(Et) : x(S, Et, !0), A("");
13912
13916
  },
13913
13917
  containerProps: {
13914
13918
  className: "relative h-8 w-full gap-y-1 py-1 border-border text-xs"
@@ -13926,7 +13930,7 @@ function Wd({
13926
13930
  variant: "outline",
13927
13931
  className: `border-border ${t === "default" ? "h-6" : "mt-1 h-7"}`,
13928
13932
  onClick: q,
13929
- disabled: _.trim() === "",
13933
+ disabled: E.trim() === "",
13930
13934
  size: "sm",
13931
13935
  children: /* @__PURE__ */ a(Xe, {})
13932
13936
  }
@@ -13957,7 +13961,7 @@ function Wd({
13957
13961
  "button",
13958
13962
  {
13959
13963
  onDoubleClick: () => {
13960
- A(W(J)), t === "default" ? v(E, [J], !0) : (tn(r) && r(J), A(J)), setTimeout(() => {
13964
+ A(W(J)), t === "default" ? v(S, [J], !0) : (tn(r) && r(J), A(J)), setTimeout(() => {
13961
13965
  o.current && o.current.focus();
13962
13966
  }, 10);
13963
13967
  },
@@ -13968,7 +13972,7 @@ function Wd({
13968
13972
  vo,
13969
13973
  {
13970
13974
  onClick: () => {
13971
- t === "default" ? v(E, [J], !0) : tn(r) && r(J);
13975
+ t === "default" ? v(S, [J], !0) : tn(r) && r(J);
13972
13976
  },
13973
13977
  className: "hidden h-max w-3.5 cursor-pointer rounded bg-gray-100 p-0.5 text-red-500 hover:bg-gray-50 group-hover:block"
13974
13978
  }
@@ -14114,7 +14118,7 @@ function Oa() {
14114
14118
  cssProperty: ""
14115
14119
  }), l = mn(
14116
14120
  (d) => {
14117
- const u = !S(s, "negative", !1), p = S(s, "cssProperty", "");
14121
+ const u = !N(s, "negative", !1), p = N(s, "cssProperty", "");
14118
14122
  let h = parseFloat(s.dragStartValue);
14119
14123
  h = isNaN(h) ? 0 : h;
14120
14124
  let f = c0[s.dragUnit];
@@ -14252,7 +14256,7 @@ const d0 = ({
14252
14256
  gridCols: n = "grid-cols-2",
14253
14257
  disableBlockGroupsSidebar: r = !1
14254
14258
  }) => {
14255
- const o = Fs(), s = Xa(o, "category"), i = As(N(s.core, "group"));
14259
+ const o = Fs(), s = Xa(o, "category"), i = As(C(s.core, "group"));
14256
14260
  return /* @__PURE__ */ a(
14257
14261
  eu,
14258
14262
  {
@@ -14464,7 +14468,7 @@ function b0({
14464
14468
  ] }) : null;
14465
14469
  }
14466
14470
  const y0 = P({}), x0 = (t) => {
14467
- const [e, n] = O(y0), r = M(() => (t == null ? void 0 : t.getBlocksList) || (() => []), [t]), o = S(e, `${t == null ? void 0 : t.id}.blocks`, null), s = S(e, `${t == null ? void 0 : t.id}.loading`, "idle"), i = S(e, `${t == null ? void 0 : t.id}.error`, !1), l = ie("idle");
14471
+ const [e, n] = O(y0), r = M(() => (t == null ? void 0 : t.getBlocksList) || (() => []), [t]), o = N(e, `${t == null ? void 0 : t.id}.blocks`, null), s = N(e, `${t == null ? void 0 : t.id}.loading`, "idle"), i = N(e, `${t == null ? void 0 : t.id}.error`, !1), l = ie("idle");
14468
14472
  H(() => {
14469
14473
  (async () => {
14470
14474
  if (t && !(s === "complete" || l.current === "loading")) {
@@ -14526,24 +14530,24 @@ const y0 = P({}), x0 = (t) => {
14526
14530
  ]
14527
14531
  };
14528
14532
  } else if (e) {
14529
- const E = typeof e == "function" ? await e() : e, _ = to(E);
14530
- if ($(_)) return;
14533
+ const S = typeof e == "function" ? await e() : e, E = to(S);
14534
+ if ($(E)) return;
14531
14535
  v = {
14532
14536
  type: "Box",
14533
- blocks: _,
14534
- name: S(_, "0._type", "Block")
14537
+ blocks: E,
14538
+ name: N(E, "0._type", "Block")
14535
14539
  };
14536
14540
  } else if (n) {
14537
- const E = typeof n == "function" ? await n() : n;
14538
- if ($(E)) return;
14541
+ const S = typeof n == "function" ? await n() : n;
14542
+ if ($(S)) return;
14539
14543
  v = {
14540
14544
  type: "Box",
14541
- blocks: E,
14542
- name: S(E, "0._type", "Block")
14545
+ blocks: S,
14546
+ name: N(S, "0._type", "Block")
14543
14547
  };
14544
14548
  } else if (t) {
14545
- const E = typeof t == "function" ? await t() : t;
14546
- v = typeof E == "object" ? xr(E, ["component", "icon"]) : E;
14549
+ const S = typeof t == "function" ? await t() : t;
14550
+ v = typeof S == "object" ? xr(S, ["component", "icon"]) : S;
14547
14551
  }
14548
14552
  if (!v) return;
14549
14553
  d(x, v, !0), setTimeout(() => {
@@ -14592,7 +14596,7 @@ const Da = ({
14592
14596
  parentId: n = void 0,
14593
14597
  position: r = -1
14594
14598
  }) => {
14595
- const [o, s] = F(!1), i = M(() => (e == null ? void 0 : e.getBlock) || (() => []), [e]), { addCoreBlock: l, addPredefinedBlock: c } = kn(), d = S(t, "name", S(t, "label")), u = S(t, "description", ""), { onDragStart: p, onDragEnd: h } = Jn(), f = yt(), m = R(
14599
+ const [o, s] = F(!1), i = M(() => (e == null ? void 0 : e.getBlock) || (() => []), [e]), { addCoreBlock: l, addPredefinedBlock: c } = kn(), d = N(t, "name", N(t, "label")), u = N(t, "description", ""), { onDragStart: p, onDragEnd: h } = Jn(), f = yt(), m = R(
14596
14600
  async (y) => {
14597
14601
  if (y.stopPropagation(), pe(t, "component")) {
14598
14602
  l(t, n, r), ge.publish(oe.CLOSE_ADD_BLOCK);
@@ -14652,26 +14656,26 @@ const Da = ({
14652
14656
  const I = b.current.search(p).map((W) => W.item);
14653
14657
  m(I);
14654
14658
  }, [p]);
14655
- const y = p.trim() && !$(f) ? f : l || [], x = Xa(y, "group"), [v, E] = F(null);
14659
+ const y = p.trim() && !$(f) ? f : l || [], x = Xa(y, "group"), [v, S] = F(null);
14656
14660
  H(() => {
14657
14661
  if ($(Ct(x))) {
14658
- E(null);
14662
+ S(null);
14659
14663
  return;
14660
14664
  }
14661
14665
  if (!v || !x[v]) {
14662
- E(Ce(Ct(x)) || null);
14666
+ S(Ce(Ct(x)) || null);
14663
14667
  return;
14664
14668
  }
14665
14669
  }, [x, v]);
14666
- const _ = S(x, v || "", []), A = ie(null), { t: T } = U(), C = ie(null);
14670
+ const E = N(x, v || "", []), A = ie(null), { t: B } = U(), k = ie(null);
14667
14671
  H(() => {
14668
14672
  var W;
14669
- const I = (W = C.current) == null ? void 0 : W.querySelector("[data-radix-scroll-area-viewport]");
14673
+ const I = (W = k.current) == null ? void 0 : W.querySelector("[data-radix-scroll-area-viewport]");
14670
14674
  I && I.scrollTo({ top: 0, behavior: "smooth" });
14671
14675
  }, [i, v]);
14672
- const k = (I) => {
14676
+ const _ = (I) => {
14673
14677
  A.current && (clearTimeout(A.current), A.current = null), A.current = setTimeout(() => {
14674
- A.current && E(I);
14678
+ A.current && S(I);
14675
14679
  }, 400);
14676
14680
  }, w = () => {
14677
14681
  i != null && i.id && u(i.id);
@@ -14681,7 +14685,7 @@ const Da = ({
14681
14685
  /* @__PURE__ */ a(Fn, { className: "col-span-3 h-full" }),
14682
14686
  /* @__PURE__ */ a(Fn, { className: "col-span-9 h-full" })
14683
14687
  ] });
14684
- const B = ee(_, (I, W) => W % 2 === 0), L = ee(_, (I, W) => W % 2 === 1);
14688
+ const T = ee(E, (I, W) => W % 2 === 0), L = ee(E, (I, W) => W % 2 === 1);
14685
14689
  return /* @__PURE__ */ a(Z, { children: /* @__PURE__ */ g("div", { className: "flex h-full max-h-full flex-col", children: [
14686
14690
  /* @__PURE__ */ a(Qd, { value: p, setValue: h }),
14687
14691
  /* @__PURE__ */ a("div", { className: "relative flex h-full max-h-full flex-1 overflow-hidden bg-background", children: /* @__PURE__ */ g("div", { className: `flex h-full flex-1 pt-2 ${n ? "flex-col" : ""}`, children: [
@@ -14692,34 +14696,34 @@ const Da = ({
14692
14696
  children: [
14693
14697
  /* @__PURE__ */ a(b0, { library: i == null ? void 0 : i.id, setLibrary: o, uiLibraries: s }),
14694
14698
  /* @__PURE__ */ g("div", { className: "mt-2 flex h-full max-h-full w-full flex-1 flex-col", children: [
14695
- /* @__PURE__ */ a("span", { className: "text-xs font-bold text-gray-500", children: T("Groups") }),
14699
+ /* @__PURE__ */ a("span", { className: "text-xs font-bold text-gray-500", children: B("Groups") }),
14696
14700
  !n && /* @__PURE__ */ a("hr", { className: "mt-1 border-border" }),
14697
14701
  /* @__PURE__ */ a(
14698
14702
  "div",
14699
14703
  {
14700
14704
  className: `no-scrollbar mt-2 h-full max-h-full flex-1 overflow-y-auto ${n ? "" : "pb-20"}`,
14701
- children: $(x) ? /* @__PURE__ */ a("div", { className: "mt-4 flex flex-col items-center justify-center gap-3 p-4 text-center", children: p ? /* @__PURE__ */ a("p", { className: "text-sm", children: T("No matching blocks found") }) : d ? /* @__PURE__ */ g(Z, { children: [
14702
- /* @__PURE__ */ a("p", { className: "text-sm", children: T("Failed to load the UI library. Try again") }),
14705
+ children: $(x) ? /* @__PURE__ */ a("div", { className: "mt-4 flex flex-col items-center justify-center gap-3 p-4 text-center", children: p ? /* @__PURE__ */ a("p", { className: "text-sm", children: B("No matching blocks found") }) : d ? /* @__PURE__ */ g(Z, { children: [
14706
+ /* @__PURE__ */ a("p", { className: "text-sm", children: B("Failed to load the UI library. Try again") }),
14703
14707
  /* @__PURE__ */ g(te, { onClick: w, variant: "outline", size: "sm", className: "gap-2", children: [
14704
14708
  /* @__PURE__ */ a(Os, { className: "h-4 w-4" }),
14705
- T("Retry")
14709
+ B("Retry")
14706
14710
  ] })
14707
- ] }) : /* @__PURE__ */ a("p", { className: "text-sm", children: T("This library is empty") }) }) : n ? /* @__PURE__ */ g(Pi, { value: v ?? "", onValueChange: E, children: [
14708
- /* @__PURE__ */ a(Fo, { className: "w-full", children: /* @__PURE__ */ a(Oi, { placeholder: T("Select a group") }) }),
14709
- /* @__PURE__ */ a(zo, { children: N(x, (I, W) => /* @__PURE__ */ a(Ho, { value: W, children: Dn(T(W.toLowerCase())) }, W)) })
14710
- ] }) : N(x, (I, W) => /* @__PURE__ */ g(
14711
+ ] }) : /* @__PURE__ */ a("p", { className: "text-sm", children: B("This library is empty") }) }) : n ? /* @__PURE__ */ g(Pi, { value: v ?? "", onValueChange: S, children: [
14712
+ /* @__PURE__ */ a(Fo, { className: "w-full", children: /* @__PURE__ */ a(Oi, { placeholder: B("Select a group") }) }),
14713
+ /* @__PURE__ */ a(zo, { children: C(x, (I, W) => /* @__PURE__ */ a(Ho, { value: W, children: Dn(B(W.toLowerCase())) }, W)) })
14714
+ ] }) : C(x, (I, W) => /* @__PURE__ */ g(
14711
14715
  "div",
14712
14716
  {
14713
- onMouseEnter: () => k(W),
14717
+ onMouseEnter: () => _(W),
14714
14718
  onMouseLeave: () => A.current && clearTimeout(A.current),
14715
14719
  role: "button",
14716
- onClick: () => E(W),
14720
+ onClick: () => S(W),
14717
14721
  className: j(
14718
14722
  "flex w-full cursor-pointer items-center justify-between rounded-md p-2 text-sm text-foreground transition-all ease-in-out hover:bg-gray-200 dark:hover:bg-gray-800",
14719
14723
  W === v ? "bg-primary text-primary-foreground hover:bg-primary/80" : ""
14720
14724
  ),
14721
14725
  children: [
14722
- /* @__PURE__ */ a("span", { children: Dn(T(W.toLowerCase())) }),
14726
+ /* @__PURE__ */ a("span", { children: Dn(B(W.toLowerCase())) }),
14723
14727
  /* @__PURE__ */ a(Sp, { className: "ml-2 h-5 w-5" })
14724
14728
  ]
14725
14729
  },
@@ -14734,12 +14738,12 @@ const Da = ({
14734
14738
  /* @__PURE__ */ a("div", { className: `flex h-full max-h-full w-full flex-col border-border ${n ? "" : "border-l"}`, children: /* @__PURE__ */ g(
14735
14739
  mo,
14736
14740
  {
14737
- ref: C,
14741
+ ref: k,
14738
14742
  onMouseEnter: () => A.current && clearTimeout(A.current),
14739
14743
  className: "z-10 flex h-full max-h-full w-full flex-col gap-2 transition-all ease-linear",
14740
14744
  children: [
14741
- $(_) && !$(x) ? /* @__PURE__ */ a("div", { className: "flex h-full flex-col items-center justify-center p-6 text-center", children: /* @__PURE__ */ a("p", { className: "text-sm", children: T("No blocks found in this group") }) }) : /* @__PURE__ */ g("div", { className: `grid w-full gap-2 ${n ? "grid-cols-1 pb-20" : "grid-cols-2 px-2"}`, children: [
14742
- /* @__PURE__ */ a("div", { className: "flex flex-col gap-1", children: B.map((I, W) => /* @__PURE__ */ a(
14745
+ $(E) && !$(x) ? /* @__PURE__ */ a("div", { className: "flex h-full flex-col items-center justify-center p-6 text-center", children: /* @__PURE__ */ a("p", { className: "text-sm", children: B("No blocks found in this group") }) }) : /* @__PURE__ */ g("div", { className: `grid w-full gap-2 ${n ? "grid-cols-1 pb-20" : "grid-cols-2 px-2"}`, children: [
14746
+ /* @__PURE__ */ a("div", { className: "flex flex-col gap-1", children: T.map((I, W) => /* @__PURE__ */ a(
14743
14747
  Da,
14744
14748
  {
14745
14749
  parentId: t,
@@ -14799,21 +14803,21 @@ const Da = ({
14799
14803
  }), p(!0);
14800
14804
  else if (!s && Object.keys(o || {}).length > 0) {
14801
14805
  const f = Object.entries(o).map(([b, y]) => {
14802
- const x = y, v = x.type || "partial", E = Ma(v);
14806
+ const x = y, v = x.type || "partial", S = Ma(v);
14803
14807
  return {
14804
14808
  type: "PartialBlock",
14805
14809
  // Set the type to PartialBlock
14806
14810
  label: Ma(x.name || b),
14807
14811
  description: x.description || "",
14808
14812
  icon: Ep,
14809
- group: E,
14813
+ group: S,
14810
14814
  // Use formatted type as group
14811
14815
  category: "partial",
14812
14816
  partialBlockId: b,
14813
14817
  // Store the original ID as partialBlockId
14814
14818
  _name: x.name
14815
14819
  };
14816
- }), m = As(N(f, "group"));
14820
+ }), m = As(C(f, "group"));
14817
14821
  d({
14818
14822
  blocks: f,
14819
14823
  groups: m,
@@ -14882,13 +14886,13 @@ const Da = ({
14882
14886
  }, 500), () => {
14883
14887
  x.current && x.current.cancel();
14884
14888
  }), []);
14885
- const E = R((I) => {
14889
+ const S = R((I) => {
14886
14890
  y(I), x.current && x.current(I);
14887
- }, []), _ = R(() => {
14891
+ }, []), E = R(() => {
14888
14892
  y(null), x.current && x.current.cancel();
14889
14893
  }, []), A = R((I) => {
14890
14894
  x.current && x.current.cancel(), m(I), y(null);
14891
- }, []), T = M(
14895
+ }, []), B = M(
14892
14896
  () => c ? Tt(e).filter(
14893
14897
  (I) => {
14894
14898
  var W, K;
@@ -14896,36 +14900,36 @@ const Da = ({
14896
14900
  }
14897
14901
  ) : e,
14898
14902
  [e, c]
14899
- ), C = M(
14903
+ ), k = M(
14900
14904
  () => c ? t.filter(
14901
- (I) => jr(ee(Tt(T), { group: I }), { hidden: !0 }).length > 0
14905
+ (I) => jr(ee(Tt(B), { group: I }), { hidden: !0 }).length > 0
14902
14906
  ) : t.filter((I) => jr(ee(Tt(e), { group: I }), { hidden: !0 }).length > 0),
14903
- [e, T, t, c]
14904
- ), k = M(
14905
- () => Ku(C, (I) => $a.indexOf(I) === -1 ? 99 : $a.indexOf(I)),
14906
- [C]
14907
- ), w = M(() => f === "all" ? T : ee(Tt(T), { group: f }), [T, f]), B = M(() => f === "all" ? k : [f], [k, f]);
14907
+ [e, B, t, c]
14908
+ ), _ = M(
14909
+ () => Ku(k, (I) => $a.indexOf(I) === -1 ? 99 : $a.indexOf(I)),
14910
+ [k]
14911
+ ), w = M(() => f === "all" ? B : ee(Tt(B), { group: f }), [B, f]), T = M(() => f === "all" ? _ : [f], [_, f]);
14908
14912
  return /* @__PURE__ */ g("div", { className: "mx-auto flex h-full w-full flex-col", children: [
14909
14913
  /* @__PURE__ */ a(Qd, { value: c, setValue: d }),
14910
14914
  /* @__PURE__ */ g("div", { className: "sticky top-10 flex h-[calc(100%-48px)] overflow-hidden pt-2", children: [
14911
- !s && k.length > 0 && /* @__PURE__ */ a("div", { className: "w-1/4 min-w-[120px] border-r border-border", children: /* @__PURE__ */ a(mo, { className: "h-full", children: /* @__PURE__ */ g("div", { className: "space-y-1", children: [
14915
+ !s && _.length > 0 && /* @__PURE__ */ a("div", { className: "w-1/4 min-w-[120px] border-r border-border", children: /* @__PURE__ */ a(mo, { className: "h-full", children: /* @__PURE__ */ g("div", { className: "space-y-1", children: [
14912
14916
  /* @__PURE__ */ a(
14913
14917
  "button",
14914
14918
  {
14915
14919
  onClick: () => A("all"),
14916
- onMouseEnter: () => E("all"),
14917
- onMouseLeave: _,
14920
+ onMouseEnter: () => S("all"),
14921
+ onMouseLeave: E,
14918
14922
  className: `w-full rounded-md px-2 py-1.5 text-left text-sm font-medium ${f === "all" || b === "all" ? "bg-primary text-primary-foreground" : "hover:bg-primary/50 hover:text-primary-foreground"}`,
14919
14923
  children: i("All")
14920
14924
  },
14921
14925
  "sidebar-all"
14922
14926
  ),
14923
- k.map((I) => /* @__PURE__ */ a(
14927
+ _.map((I) => /* @__PURE__ */ a(
14924
14928
  "button",
14925
14929
  {
14926
14930
  onClick: () => A(I),
14927
- onMouseEnter: () => E(I),
14928
- onMouseLeave: _,
14931
+ onMouseEnter: () => S(I),
14932
+ onMouseLeave: E,
14929
14933
  className: `w-full rounded-md px-2 py-1.5 text-left text-sm ${f === I || b === I ? "bg-primary text-primary-foreground" : "hover:bg-primary/50 hover:text-primary-foreground"}`,
14930
14934
  children: Dn(i(I.toLowerCase()))
14931
14935
  },
@@ -14935,13 +14939,13 @@ const Da = ({
14935
14939
  /* @__PURE__ */ a(
14936
14940
  "div",
14937
14941
  {
14938
- className: `h-full flex-1 overflow-hidden ${!s && k.length > 0 ? "w-3/4" : "w-full"}`,
14939
- children: /* @__PURE__ */ a(mo, { id: "add-blocks-scroll-area", className: "no-scrollbar h-full", children: C.length === 0 && c ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center p-8 text-center text-muted-foreground", children: /* @__PURE__ */ g("p", { children: [
14942
+ className: `h-full flex-1 overflow-hidden ${!s && _.length > 0 ? "w-3/4" : "w-full"}`,
14943
+ children: /* @__PURE__ */ a(mo, { id: "add-blocks-scroll-area", className: "no-scrollbar h-full", children: k.length === 0 && c ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center p-8 text-center text-muted-foreground", children: /* @__PURE__ */ g("p", { children: [
14940
14944
  i("No blocks found matching"),
14941
14945
  ' "',
14942
14946
  c,
14943
14947
  '"'
14944
- ] }) }) : /* @__PURE__ */ a("div", { className: `${s ? "p-0" : "p-4"} space-y-6`, children: B.map((I, W) => /* @__PURE__ */ g("div", { className: "space-y-3", children: [
14948
+ ] }) }) : /* @__PURE__ */ a("div", { className: `${s ? "p-0" : "p-4"} space-y-6`, children: T.map((I, W) => /* @__PURE__ */ g("div", { className: "space-y-3", children: [
14945
14949
  /* @__PURE__ */ a("h3", { className: "px-1 text-sm font-medium", children: Dn(i(I.toLowerCase())) }),
14946
14950
  /* @__PURE__ */ a("div", { className: "grid gap-2 " + o, children: jr(
14947
14951
  f === "all" ? ee(Tt(w), { group: I }) : Tt(w),
@@ -14996,7 +15000,7 @@ const Da = ({
14996
15000
  /* @__PURE__ */ a(lt, { value: "core", className: o ? "h-5 px-2 text-xs" : "", children: s("Blocks") }),
14997
15001
  p && /* @__PURE__ */ a(lt, { value: "partials", className: o ? "h-5 px-2 text-xs" : "", children: s("Partials") }),
14998
15002
  b ? /* @__PURE__ */ a(lt, { value: "html", className: o ? "h-5 px-2 text-xs" : "", children: s("Import") }) : null,
14999
- N(m, (v) => /* @__PURE__ */ a(
15003
+ C(m, (v) => /* @__PURE__ */ a(
15000
15004
  lt,
15001
15005
  {
15002
15006
  value: v.id,
@@ -15026,7 +15030,7 @@ const Da = ({
15026
15030
  }
15027
15031
  ) }) }) }),
15028
15032
  b ? /* @__PURE__ */ a(jt, { value: "html", className: "h-full max-h-full flex-1 pb-20 ", children: /* @__PURE__ */ a(f0, { parentId: n, position: r, fromSidebar: o }) }) : null,
15029
- N(m, (v) => /* @__PURE__ */ a(jt, { value: v.id, children: Q.createElement(v.tabContent, { close: f, parentId: n, position: r }) }, `panel-add-block-${v.id}`))
15033
+ C(m, (v) => /* @__PURE__ */ a(jt, { value: v.id, children: Q.createElement(v.tabContent, { close: f, parentId: n, position: r }) }, `panel-add-block-${v.id}`))
15030
15034
  ]
15031
15035
  }
15032
15036
  )
@@ -15045,7 +15049,7 @@ const Da = ({
15045
15049
  };
15046
15050
  return /* @__PURE__ */ a("div", { style: { ..._0, ...r }, children: /* @__PURE__ */ a("div", { className: "h-0.5 flex-1 rounded-[1px] bg-green-500" }) });
15047
15051
  }), Fa = "h-3 w-3 flex-shrink-0", Di = (t) => {
15048
- const e = Fs(), n = S(e, [t.type, "icon"]);
15052
+ const e = Fs(), n = N(e, [t.type, "icon"]);
15049
15053
  return n ? Q.createElement(n, { className: Fa }) : /* @__PURE__ */ a(_p, { className: Fa });
15050
15054
  }, T0 = vn(function({ children: e, isDragging: n }) {
15051
15055
  return n ? /* @__PURE__ */ a("div", { className: "pointer-events-none fixed left-0 top-0 z-[100] h-full w-full", children: e }) : null;
@@ -15452,17 +15456,17 @@ const uu = () => {
15452
15456
  var Me, tt;
15453
15457
  const { t: r } = U(), o = Ft(), [s] = O(To), { hasPermission: i } = bt();
15454
15458
  let l = null;
15455
- const c = t.children && t.children.length > 0, { highlightBlock: d, clearHighlight: u } = Nt(), p = yt(), { id: h, data: f, isSelected: m, willReceiveDrop: b, isDragging: y, isEditing: x, handleClick: v } = t, E = uu(), _ = M(() => E.getBlockErrors(h), [E, h]), A = S(f, "_show", !0), T = (X) => {
15459
+ const c = t.children && t.children.length > 0, { highlightBlock: d, clearHighlight: u } = Nt(), p = yt(), { id: h, data: f, isSelected: m, willReceiveDrop: b, isDragging: y, isEditing: x, handleClick: v } = t, S = uu(), E = M(() => S.getBlockErrors(h), [S, h]), A = N(f, "_show", !0), B = (X) => {
15456
15460
  X.stopPropagation(), A && t.toggle();
15457
- }, C = (X) => {
15458
- X.isInternal && (l = X.isOpen, X.isOpen && X.close());
15459
15461
  }, k = (X) => {
15462
+ X.isInternal && (l = X.isOpen, X.isOpen && X.close());
15463
+ }, _ = (X) => {
15460
15464
  X.isInternal && l !== null && (l ? X.open() : X.close(), l = null);
15461
- }, [w, B] = O(J0), L = () => {
15465
+ }, [w, T] = O(J0), L = () => {
15462
15466
  var X, nt;
15463
- I(), (X = t.parent) != null && X.isSelected || B((nt = t == null ? void 0 : t.parent) == null ? void 0 : nt.id);
15467
+ I(), (X = t.parent) != null && X.isSelected || T((nt = t == null ? void 0 : t.parent) == null ? void 0 : nt.id);
15464
15468
  }, I = () => {
15465
- B(null);
15469
+ T(null);
15466
15470
  }, W = (X) => {
15467
15471
  I(), X.stopPropagation(), !t.isOpen && A && t.toggle(), v(X);
15468
15472
  };
@@ -15480,7 +15484,7 @@ const uu = () => {
15480
15484
  !(_n.top >= zt.top && _n.left >= zt.left && _n.bottom <= zt.bottom && _n.right <= zt.right) && Xt && (Xt.documentElement.scrollTop = qt.offsetTop - zt.top);
15481
15485
  }, q = (X) => {
15482
15486
  I();
15483
- const nt = S(t, "parent.id");
15487
+ const nt = N(t, "parent.id");
15484
15488
  nt !== "__REACT_ARBORIST_INTERNAL_ROOT__" ? ge.publish(oe.OPEN_ADD_BLOCK, { _id: nt, position: X }) : ge.publish(oe.OPEN_ADD_BLOCK, { position: X });
15485
15489
  };
15486
15490
  if (h === Wr)
@@ -15511,8 +15515,8 @@ const uu = () => {
15511
15515
  style: e,
15512
15516
  "data-node-id": h,
15513
15517
  ref: n,
15514
- onDragStart: () => C(t),
15515
- onDragEnd: () => k(t),
15518
+ onDragStart: () => k(t),
15519
+ onDragEnd: () => _(t),
15516
15520
  onDragOver: (X) => {
15517
15521
  X.preventDefault(), K(h, "yes");
15518
15522
  },
@@ -15523,7 +15527,7 @@ const uu = () => {
15523
15527
  X.preventDefault(), K(h, "no");
15524
15528
  },
15525
15529
  children: [
15526
- i(me.ADD_BLOCK) && !p && (t == null ? void 0 : t.rowIndex) !== null && (t == null ? void 0 : t.rowIndex) !== void 0 && (t == null ? void 0 : t.rowIndex) > 0 && (((Me = t.parent) == null ? void 0 : Me.isOpen) && no(S(t, "parent.data._type")) || ((tt = t == null ? void 0 : t.parent) == null ? void 0 : tt.id) === "__REACT_ARBORIST_INTERNAL_ROOT__") && /* @__PURE__ */ a("div", { className: "group relative ml-5 h-full w-full cursor-pointer", children: /* @__PURE__ */ a(
15530
+ i(me.ADD_BLOCK) && !p && (t == null ? void 0 : t.rowIndex) !== null && (t == null ? void 0 : t.rowIndex) !== void 0 && (t == null ? void 0 : t.rowIndex) > 0 && (((Me = t.parent) == null ? void 0 : Me.isOpen) && no(N(t, "parent.data._type")) || ((tt = t == null ? void 0 : t.parent) == null ? void 0 : tt.id) === "__REACT_ARBORIST_INTERNAL_ROOT__") && /* @__PURE__ */ a("div", { className: "group relative ml-5 h-full w-full cursor-pointer", children: /* @__PURE__ */ a(
15527
15531
  "div",
15528
15532
  {
15529
15533
  onClick: (X) => {
@@ -15553,7 +15557,7 @@ const uu = () => {
15553
15557
  "div",
15554
15558
  {
15555
15559
  className: `flex h-4 w-4 rotate-0 transform cursor-pointer items-center justify-center transition-transform duration-100 ${t.isOpen ? "rotate-90" : ""}`,
15556
- children: c && /* @__PURE__ */ a("button", { onClick: T, type: "button", children: /* @__PURE__ */ a(jn, { className: "h-3 w-3" }) })
15560
+ children: c && /* @__PURE__ */ a("button", { onClick: B, type: "button", children: /* @__PURE__ */ a(jn, { className: "h-3 w-3" }) })
15557
15561
  }
15558
15562
  ),
15559
15563
  /* @__PURE__ */ g(
@@ -15567,7 +15571,7 @@ const uu = () => {
15567
15571
  ue && m && "text-purple-800"
15568
15572
  ),
15569
15573
  children: [
15570
- _.length > 0 ? /* @__PURE__ */ a("div", { className: "text-red-500", children: /* @__PURE__ */ a(dl, { className: "h-3 w-3" }) }) : /* @__PURE__ */ a(Di, { type: f == null ? void 0 : f._type }),
15574
+ E.length > 0 ? /* @__PURE__ */ a("div", { className: "text-red-500", children: /* @__PURE__ */ a(dl, { className: "h-3 w-3" }) }) : /* @__PURE__ */ a(Di, { type: f == null ? void 0 : f._type }),
15571
15575
  x ? /* @__PURE__ */ a(K0, { node: t }) : /* @__PURE__ */ a(
15572
15576
  "div",
15573
15577
  {
@@ -15680,96 +15684,96 @@ const uu = () => {
15680
15684
  const [t] = O(Il), [e, n] = re(), [r] = Bo(), o = Ft(), [, s] = De(), { moveBlocks: i } = ze(), l = Q0(), c = ie(null), [, d] = O(si), { t: u } = U(), [p, h] = F(null), f = () => {
15681
15685
  n([]), s([]);
15682
15686
  }, m = M(() => {
15683
- const C = (w, B) => w.filter((L) => !B.includes(L._id)).map((L) => ({
15687
+ const k = (w, T) => w.filter((L) => !T.includes(L._id)).map((L) => ({
15684
15688
  ...L,
15685
- children: L.children ? C(L.children, B) : []
15689
+ children: L.children ? k(L.children, T) : []
15686
15690
  }));
15687
- return [...C(t, r), { _type: Wr, _id: Wr, children: [] }];
15688
- }, [t, r]), b = ({ id: C, name: k, node: w }) => {
15689
- o([C], { _name: k }, w.data._name);
15690
- }, y = ({ dragIds: C, parentId: k, index: w }) => {
15691
- l(C, k) && i(C, k, w);
15692
- }, x = (C) => {
15693
- if (C.length === 0) return;
15694
- const k = C[0] ? C[0].id : "";
15695
- s([]), n([k]);
15696
- }, v = (C) => {
15697
- var B;
15698
- C.preventDefault(), p && h(null);
15699
- const k = C.target, w = k.getAttribute("data-node-id") || ((B = k.closest("[data-node-id]")) == null ? void 0 : B.getAttribute("data-node-id"));
15700
- w ? (s([]), n([w])) : (s([]), n([]), h({ x: C.clientX, y: C.clientY }));
15701
- }, E = Ut(
15702
- ({ parentNode: C, dragNodes: k }) => {
15691
+ return [...k(t, r), { _type: Wr, _id: Wr, children: [] }];
15692
+ }, [t, r]), b = ({ id: k, name: _, node: w }) => {
15693
+ o([k], { _name: _ }, w.data._name);
15694
+ }, y = ({ dragIds: k, parentId: _, index: w }) => {
15695
+ l(k, _) && i(k, _, w);
15696
+ }, x = (k) => {
15697
+ if (k.length === 0) return;
15698
+ const _ = k[0] ? k[0].id : "";
15699
+ s([]), n([_]);
15700
+ }, v = (k) => {
15701
+ var T;
15702
+ k.preventDefault(), p && h(null);
15703
+ const _ = k.target, w = _.getAttribute("data-node-id") || ((T = _.closest("[data-node-id]")) == null ? void 0 : T.getAttribute("data-node-id"));
15704
+ w ? (s([]), n([w])) : (s([]), n([]), h({ x: k.clientX, y: k.clientY }));
15705
+ }, S = Ut(
15706
+ ({ parentNode: k, dragNodes: _ }) => {
15703
15707
  var w;
15704
- return (C == null ? void 0 : C.data._type) === Wr || !gt(C == null ? void 0 : C.data._type, (w = k[0]) == null ? void 0 : w.data._type);
15708
+ return (k == null ? void 0 : k.data._type) === Wr || !gt(k == null ? void 0 : k.data._type, (w = _[0]) == null ? void 0 : w.data._type);
15705
15709
  },
15706
15710
  [],
15707
15711
  300
15708
- ), _ = (C, k) => {
15709
- if (!C) return !0;
15712
+ ), E = (k, _) => {
15713
+ if (!k) return !0;
15710
15714
  const w = {
15711
- isLeaf: !k.isInternal,
15712
- isClosed: !k.isOpen,
15713
- isOpen: k.isOpen
15715
+ isLeaf: !_.isInternal,
15716
+ isClosed: !_.isOpen,
15717
+ isOpen: _.isOpen
15714
15718
  };
15715
15719
  try {
15716
- let B = C;
15720
+ let T = k;
15717
15721
  return Object.keys(w).forEach((L) => {
15718
15722
  const I = new RegExp(`\\b${L}\\b`, "g");
15719
- B = B.replace(I, String(w[L]));
15720
- }), new Function(`return ${B}`)();
15723
+ T = T.replace(I, String(w[L]));
15724
+ }), new Function(`return ${T}`)();
15721
15725
  } catch {
15722
- return console.warn("Invalid condition expression:", C), !1;
15726
+ return console.warn("Invalid condition expression:", k), !1;
15723
15727
  }
15724
- }, A = (C) => {
15728
+ }, A = (k) => {
15725
15729
  if (!c.current) return;
15726
- const k = c.current, w = k.selectedNodes[0];
15730
+ const _ = c.current, w = _.selectedNodes[0];
15727
15731
  if (!w) return;
15728
15732
  n([w.id]), s([]);
15729
- const B = !w.isInternal, L = !w.isOpen, I = w.isOpen, W = I0.find(
15730
- (K) => K.key === C.key && (!K.when || _(K.when, w))
15733
+ const T = !w.isInternal, L = !w.isOpen, I = w.isOpen, W = I0.find(
15734
+ (K) => K.key === k.key && (!K.when || E(K.when, w))
15731
15735
  );
15732
15736
  if (W)
15733
- switch (C.preventDefault(), W.command) {
15737
+ switch (k.preventDefault(), W.command) {
15734
15738
  case "selectNext":
15735
- P0(k);
15739
+ P0(_);
15736
15740
  break;
15737
15741
  case "selectPrev":
15738
- O0(k);
15742
+ O0(_);
15739
15743
  break;
15740
15744
  case "selectParent":
15741
- D0(k, B || L);
15745
+ D0(_, T || L);
15742
15746
  break;
15743
15747
  case "close":
15744
- $0(k, I);
15748
+ $0(_, I);
15745
15749
  break;
15746
15750
  case "open":
15747
- M0(k, L);
15751
+ M0(_, L);
15748
15752
  break;
15749
15753
  case "selectFirst":
15750
- R0(k);
15754
+ R0(_);
15751
15755
  break;
15752
15756
  case "selectLast":
15753
- L0(k);
15757
+ L0(_);
15754
15758
  break;
15755
15759
  }
15756
15760
  };
15757
15761
  H(() => {
15758
- const C = () => {
15762
+ const k = () => {
15759
15763
  c.current && d(c.current);
15760
15764
  };
15761
- C();
15762
- const k = new MutationObserver(C);
15763
- return k.observe(document.body, { childList: !0, subtree: !0 }), () => k.disconnect();
15765
+ k();
15766
+ const _ = new MutationObserver(k);
15767
+ return _.observe(document.body, { childList: !0, subtree: !0 }), () => _.disconnect();
15764
15768
  }, [d]);
15765
- const { hasPermission: T } = bt();
15769
+ const { hasPermission: B } = bt();
15766
15770
  return $(t) ? /* @__PURE__ */ a("div", { children: /* @__PURE__ */ a("div", { className: "mt-10 flex h-full w-full items-center justify-center p-8", children: /* @__PURE__ */ g("div", { className: "flex flex-col items-center space-y-6 text-center", children: [
15767
15771
  /* @__PURE__ */ a("div", { className: "rounded-full bg-muted p-6", children: /* @__PURE__ */ a(ul, { className: "h-12 w-12 text-muted-foreground" }) }),
15768
15772
  /* @__PURE__ */ g("div", { className: "space-y-2", children: [
15769
15773
  /* @__PURE__ */ a("h3", { className: "text-lg font-semibold text-foreground", children: u("This page is empty") }),
15770
15774
  /* @__PURE__ */ a("p", { className: "max-w-sm text-sm text-muted-foreground", children: u("Get started by adding your first block to begin building your page") })
15771
15775
  ] }),
15772
- T(me.ADD_BLOCK) && /* @__PURE__ */ g(
15776
+ B(me.ADD_BLOCK) && /* @__PURE__ */ g(
15773
15777
  te,
15774
15778
  {
15775
15779
  onClick: () => ge.publish(oe.OPEN_ADD_BLOCK),
@@ -15787,22 +15791,22 @@ const uu = () => {
15787
15791
  {
15788
15792
  id: "outline-view ",
15789
15793
  className: "no-scrollbar h-full overflow-y-auto text-sm",
15790
- onKeyDown: (C) => {
15791
- c.current && !c.current.isEditing && A(C);
15794
+ onKeyDown: (k) => {
15795
+ c.current && !c.current.isEditing && A(k);
15792
15796
  },
15793
15797
  children: [
15794
15798
  /* @__PURE__ */ g("div", { className: "mb-2 flex items-center justify-end gap-x-1 pb-2 text-sm text-muted-foreground", children: [
15795
15799
  /* @__PURE__ */ g(Ee, { children: [
15796
15800
  /* @__PURE__ */ a(_e, { asChild: !0, children: /* @__PURE__ */ a(te, { className: "h-fit p-1", onClick: () => {
15797
- var C;
15798
- return (C = c == null ? void 0 : c.current) == null ? void 0 : C.openAll();
15801
+ var k;
15802
+ return (k = c == null ? void 0 : c.current) == null ? void 0 : k.openAll();
15799
15803
  }, variant: "ghost", size: "sm", children: /* @__PURE__ */ a(Ip, { className: "h-2 w-2" }) }) }),
15800
15804
  /* @__PURE__ */ a(ke, { className: "isolate z-[9999]", children: u("Expand all") })
15801
15805
  ] }),
15802
15806
  /* @__PURE__ */ g(Ee, { children: [
15803
15807
  /* @__PURE__ */ a(_e, { asChild: !0, children: /* @__PURE__ */ a(te, { className: "h-fit p-1", onClick: () => {
15804
- var C;
15805
- return (C = c == null ? void 0 : c.current) == null ? void 0 : C.closeAll();
15808
+ var k;
15809
+ return (k = c == null ? void 0 : c.current) == null ? void 0 : k.closeAll();
15806
15810
  }, variant: "ghost", size: "sm", children: /* @__PURE__ */ a(Rp, { className: "h-2 w-2" }) }) }),
15807
15811
  /* @__PURE__ */ a(ke, { className: "isolate z-[9999]", children: u("Collapse all") })
15808
15812
  ] })
@@ -15856,13 +15860,13 @@ const uu = () => {
15856
15860
  data: [...m],
15857
15861
  renderCursor: A0,
15858
15862
  onSelect: x,
15859
- childrenAccessor: (C) => C.children,
15863
+ childrenAccessor: (k) => k.children,
15860
15864
  width: "100%",
15861
15865
  rowHeight: 25,
15862
15866
  renderDragPreview: B0,
15863
15867
  indent: 10,
15864
15868
  onContextMenu: v,
15865
- disableDrop: E,
15869
+ disableDrop: S,
15866
15870
  idAccessor: "_id",
15867
15871
  children: X0
15868
15872
  }
@@ -16113,7 +16117,7 @@ const tv = ({ value: t, onChange: e, disabled: n }) => {
16113
16117
  "popover-foreground": ["#3d3436", "#f2e9e4"]
16114
16118
  }
16115
16119
  }, cv = $s(
16116
- () => import("./css-import-modal-DautOct0.js").then((t) => ({ default: t.CssImportModal }))
16120
+ () => import("./css-import-modal-B3XY8Hzw.js").then((t) => ({ default: t.CssImportModal }))
16117
16121
  ), hu = "chai-builder-previous-theme", dv = [
16118
16122
  { shadcn_default: ov },
16119
16123
  { twitter_theme: sv },
@@ -16135,138 +16139,140 @@ const tv = ({ value: t, onChange: e, disabled: n }) => {
16135
16139
  console.warn("Failed to clear previous theme from localStorage:", t);
16136
16140
  }
16137
16141
  }, fv = V.memo(({ className: t = "" }) => {
16138
- const [e, n] = Tr(), [r, o] = V.useState(""), [s, i] = V.useState(!1), l = G("themePresets", {}), c = G("themePanelComponent", null), { hasPermission: d } = bt(), u = G("flags.importTheme", !0), p = G("flags.darkMode", !0), h = Kl();
16139
- (!l || l.length === 0) && dv.map((k) => {
16140
- l.push(k);
16142
+ const [e, n] = Tr(), [r, o] = V.useState(""), [s, i] = V.useState(!1), l = G("themePresets", {}), c = G("themePanelComponent", null), { hasPermission: d } = bt(), u = G("flags.importTheme", !0), p = G("flags.darkMode", !0), h = G("flags.fontsInTheme", !1), f = Kl();
16143
+ (!l || l.length === 0) && dv.map((w) => {
16144
+ l.push(w);
16141
16145
  });
16142
- const [f, m] = Eo(), b = Nr(), { t: y } = U(), x = V.useCallback(
16143
- (k) => {
16144
- const w = { ...f };
16145
- uv(w), m(k), h(), Ne.success("Theme updated", {
16146
+ const [m, b] = Eo(), y = Nr(), { t: x } = U(), v = V.useCallback(
16147
+ (w) => {
16148
+ const T = { ...m };
16149
+ uv(T), b(w), f(), Ne.success("Theme updated", {
16146
16150
  action: {
16147
16151
  label: /* @__PURE__ */ g("span", { className: "flex items-center gap-2", children: [
16148
16152
  /* @__PURE__ */ a(Qr, { className: "h-4 w-4" }),
16149
16153
  " Undo"
16150
16154
  ] }),
16151
16155
  onClick: () => {
16152
- m(w), pv(), Ne.dismiss();
16156
+ b(T), pv(), Ne.dismiss();
16153
16157
  }
16154
16158
  },
16155
16159
  closeButton: !0,
16156
16160
  duration: 15e3
16157
16161
  });
16158
16162
  },
16159
- [f, m, h]
16160
- ), v = () => {
16161
- const k = l.find((w) => Object.keys(w)[0] === r);
16162
- if (k) {
16163
- const w = Object.values(k)[0];
16164
- w && typeof w == "object" && "fontFamily" in w && "borderRadius" in w && "colors" in w ? (x(w), o(""), h()) : console.error("Invalid preset structure:", w);
16163
+ [m, b, f]
16164
+ ), S = () => {
16165
+ const w = l.find((T) => Object.keys(T)[0] === r);
16166
+ if (w) {
16167
+ const T = Object.values(w)[0];
16168
+ T && typeof T == "object" && "fontFamily" in T && "borderRadius" in T && "colors" in T ? (v(T), o(""), f()) : console.error("Invalid preset structure:", T);
16165
16169
  } else
16166
16170
  console.error("Preset not found:", r);
16167
- }, E = (k) => {
16168
- x(k), o(""), h();
16169
- }, _ = Ut(
16170
- (k, w) => {
16171
- m(() => ({
16172
- ...f,
16171
+ }, E = (w) => {
16172
+ v(w), o(""), f();
16173
+ }, A = Ut(
16174
+ (w, T) => {
16175
+ b(() => ({
16176
+ ...m,
16173
16177
  fontFamily: {
16174
- ...f.fontFamily,
16175
- [k.replace(/font-/g, "")]: w
16178
+ ...m.fontFamily,
16179
+ [w.replace(/font-/g, "")]: T
16176
16180
  }
16177
- })), h();
16181
+ })), f();
16178
16182
  },
16179
- [f, h],
16183
+ [m, f],
16180
16184
  200
16181
- ), A = V.useCallback(
16182
- (k) => {
16183
- m(() => ({
16184
- ...f,
16185
- borderRadius: `${k}px`
16186
- })), h();
16185
+ ), B = V.useCallback(
16186
+ (w) => {
16187
+ b(() => ({
16188
+ ...m,
16189
+ borderRadius: `${w}px`
16190
+ })), f();
16187
16191
  },
16188
- [f, h]
16189
- ), T = Ut(
16190
- (k, w) => {
16191
- m(() => {
16192
- const B = S(f, `colors.${k}`);
16193
- return e ? We(B, 1, w) : We(B, 0, w), h(), {
16194
- ...f,
16192
+ [m, f]
16193
+ ), k = Ut(
16194
+ (w, T) => {
16195
+ b(() => {
16196
+ const L = N(m, `colors.${w}`);
16197
+ return e ? We(L, 1, T) : We(L, 0, T), f(), {
16198
+ ...m,
16195
16199
  colors: {
16196
- ...f.colors,
16197
- [k]: B
16200
+ ...m.colors,
16201
+ [w]: L
16198
16202
  }
16199
16203
  };
16200
16204
  });
16201
16205
  },
16202
- [f, h],
16206
+ [m, f],
16203
16207
  200
16204
- ), C = (k) => /* @__PURE__ */ a("div", { className: "grid grid-cols-1", children: Object.entries(k.items).map(([w]) => {
16205
- const B = S(f, `colors.${w}.${e ? 1 : 0}`);
16206
- return B ? /* @__PURE__ */ g("div", { id: `theme-${w}`, className: "mt-1 flex items-center gap-x-2", children: [
16208
+ ), _ = (w) => /* @__PURE__ */ a("div", { className: "grid grid-cols-1", children: Object.entries(w.items).map(([T]) => {
16209
+ const L = N(m, `colors.${T}.${e ? 1 : 0}`);
16210
+ return L ? /* @__PURE__ */ g("div", { id: `theme-${T}`, className: "mt-1 flex items-center gap-x-2", children: [
16207
16211
  /* @__PURE__ */ a(
16208
16212
  nv,
16209
16213
  {
16210
- value: B,
16211
- onChange: (L) => T(w, L)
16214
+ value: L,
16215
+ onChange: (I) => k(T, I)
16212
16216
  }
16213
16217
  ),
16214
- /* @__PURE__ */ a(Kt, { className: "text-xs font-normal leading-tight", children: w.split(/(?=[A-Z])/).join(" ").replace(/-/g, " ").split(" ").map((L) => L.charAt(0).toUpperCase() + L.slice(1)).join(" ") + (!w.toLowerCase().includes("foreground") && !w.toLowerCase().includes("border") && !w.toLowerCase().includes("input") && !w.toLowerCase().includes("ring") && !w.toLowerCase().includes("background") ? " Background" : "") })
16215
- ] }, w) : null;
16218
+ /* @__PURE__ */ a(Kt, { className: "text-xs font-normal leading-tight", children: T.split(/(?=[A-Z])/).join(" ").replace(/-/g, " ").split(" ").map((I) => I.charAt(0).toUpperCase() + I.slice(1)).join(" ") + (!T.toLowerCase().includes("foreground") && !T.toLowerCase().includes("border") && !T.toLowerCase().includes("input") && !T.toLowerCase().includes("ring") && !T.toLowerCase().includes("background") ? " Background" : "") })
16219
+ ] }, T) : null;
16216
16220
  }) });
16217
16221
  return d("edit_theme") ? /* @__PURE__ */ g("div", { className: "relative w-full", children: [
16218
16222
  /* @__PURE__ */ g("div", { className: ht("no-scrollbar h-full w-full overflow-y-auto", t), children: [
16219
16223
  l.length > 0 && /* @__PURE__ */ g("div", { className: "mx-0 my-2 flex flex-col gap-1 py-2", children: [
16220
16224
  /* @__PURE__ */ g("div", { className: "flex w-full items-center justify-between", children: [
16221
- /* @__PURE__ */ a(Kt, { className: "text-sm", children: y("Presets") }),
16225
+ /* @__PURE__ */ a(Kt, { className: "text-sm", children: x("Presets") }),
16222
16226
  /* @__PURE__ */ a("div", { className: "flex gap-2", children: u && /* @__PURE__ */ g(te, { className: "px-1", variant: "link", size: "sm", onClick: () => i(!0), children: [
16223
16227
  /* @__PURE__ */ a(Lp, { className: "h-4 w-4" }),
16224
- y("Import theme")
16228
+ x("Import theme")
16225
16229
  ] }) })
16226
16230
  ] }),
16227
16231
  /* @__PURE__ */ g("div", { className: "flex items-center gap-2 px-0", children: [
16228
16232
  /* @__PURE__ */ a("div", { className: "w-[70%]", children: /* @__PURE__ */ g(Pi, { value: r, onValueChange: o, children: [
16229
- /* @__PURE__ */ a(Fo, { className: "h-9 w-full text-sm", children: /* @__PURE__ */ a(Oi, { placeholder: y("Select preset") }) }),
16230
- /* @__PURE__ */ a(zo, { children: Array.isArray(l) && l.map((k) => {
16231
- const w = Object.keys(k)[0], B = w.replaceAll("_", " ");
16232
- return /* @__PURE__ */ a(Ho, { value: w, children: Dn(B) }, w);
16233
+ /* @__PURE__ */ a(Fo, { className: "h-9 w-full text-sm", children: /* @__PURE__ */ a(Oi, { placeholder: x("Select preset") }) }),
16234
+ /* @__PURE__ */ a(zo, { children: Array.isArray(l) && l.map((w) => {
16235
+ const T = Object.keys(w)[0], L = T.replaceAll("_", " ");
16236
+ return /* @__PURE__ */ a(Ho, { value: T, children: Dn(L) }, T);
16233
16237
  }) })
16234
16238
  ] }) }),
16235
- /* @__PURE__ */ a("div", { className: "w-[25%]", children: /* @__PURE__ */ a(te, { className: "w-full text-sm", disabled: !r, onClick: v, children: y("Apply") }) })
16239
+ /* @__PURE__ */ a("div", { className: "w-[25%]", children: /* @__PURE__ */ a(te, { className: "w-full text-sm", disabled: !r, onClick: S, children: x("Apply") }) })
16236
16240
  ] })
16237
16241
  ] }),
16238
16242
  /* @__PURE__ */ a(On, {}),
16239
16243
  /* @__PURE__ */ g("div", { className: ht("my-2 space-y-3", t), children: [
16240
- /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
16241
- /* @__PURE__ */ a(Pp, { className: "h-3 w-3 text-gray-600" }),
16242
- /* @__PURE__ */ a("span", { className: "text-xs font-medium text-gray-700", children: y("Typography") })
16244
+ h && /* @__PURE__ */ g(Z, { children: [
16245
+ /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
16246
+ /* @__PURE__ */ a(Pp, { className: "h-3 w-3 text-gray-600" }),
16247
+ /* @__PURE__ */ a("span", { className: "text-xs font-medium text-gray-700", children: x("Typography") })
16248
+ ] }),
16249
+ (y == null ? void 0 : y.fontFamily) && /* @__PURE__ */ a("div", { className: "space-y-2", children: Object.entries(y.fontFamily).map(([w, T]) => /* @__PURE__ */ a(
16250
+ rv,
16251
+ {
16252
+ label: w,
16253
+ value: m.fontFamily[w.replace(/font-/g, "")] || T[Object.keys(T)[0]],
16254
+ onChange: (L) => A(w, L)
16255
+ },
16256
+ w
16257
+ )) }),
16258
+ /* @__PURE__ */ a(On, {})
16243
16259
  ] }),
16244
- (b == null ? void 0 : b.fontFamily) && /* @__PURE__ */ a("div", { className: "space-y-2", children: Object.entries(b.fontFamily).map(([k, w]) => /* @__PURE__ */ a(
16245
- rv,
16246
- {
16247
- label: k,
16248
- value: f.fontFamily[k.replace(/font-/g, "")] || w[Object.keys(w)[0]],
16249
- onChange: (B) => _(k, B)
16250
- },
16251
- k
16252
- )) }),
16253
- /* @__PURE__ */ a(On, {}),
16254
- (b == null ? void 0 : b.borderRadius) && /* @__PURE__ */ g("div", { className: "space-y-0.5", children: [
16260
+ (y == null ? void 0 : y.borderRadius) && /* @__PURE__ */ g("div", { className: "space-y-0.5", children: [
16255
16261
  /* @__PURE__ */ g("div", { className: "flex items-center justify-between", children: [
16256
16262
  /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
16257
16263
  /* @__PURE__ */ a(Op, { className: "h-3 w-3 text-gray-600" }),
16258
- /* @__PURE__ */ a("span", { className: "text-xs font-medium text-gray-700", children: y("Border Radius") })
16264
+ /* @__PURE__ */ a("span", { className: "text-xs font-medium text-gray-700", children: x("Border Radius") })
16259
16265
  ] }),
16260
- /* @__PURE__ */ a(Ai, { variant: "secondary", className: "text-xs", children: f.borderRadius })
16266
+ /* @__PURE__ */ a(Ai, { variant: "secondary", className: "text-xs", children: m.borderRadius })
16261
16267
  ] }),
16262
- /* @__PURE__ */ a("div", { className: "flex items-center gap-4 py-2", children: /* @__PURE__ */ a(tv, { value: f.borderRadius, onChange: A }) })
16268
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-4 py-2", children: /* @__PURE__ */ a(tv, { value: m.borderRadius, onChange: B }) })
16263
16269
  ] }),
16264
16270
  /* @__PURE__ */ a(On, {}),
16265
- (b == null ? void 0 : b.colors) && /* @__PURE__ */ g("div", { className: "space-y-3", children: [
16271
+ (y == null ? void 0 : y.colors) && /* @__PURE__ */ g("div", { className: "space-y-3", children: [
16266
16272
  /* @__PURE__ */ g("div", { className: "flex items-center justify-between", children: [
16267
16273
  /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
16268
16274
  /* @__PURE__ */ a(eo, { className: "h-3 w-3 text-gray-600" }),
16269
- /* @__PURE__ */ a("span", { className: "text-xs font-medium text-gray-700", children: y("Colors") })
16275
+ /* @__PURE__ */ a("span", { className: "text-xs font-medium text-gray-700", children: x("Colors") })
16270
16276
  ] }),
16271
16277
  p && /* @__PURE__ */ g("div", { className: "flex items-center gap-2", children: [
16272
16278
  /* @__PURE__ */ a(pl, { className: "h-4 w-4" }),
@@ -16274,17 +16280,17 @@ const tv = ({ value: t, onChange: e, disabled: n }) => {
16274
16280
  Pr,
16275
16281
  {
16276
16282
  checked: e,
16277
- onCheckedChange: (k) => n(k),
16278
- "aria-label": y("Toggle dark mode"),
16283
+ onCheckedChange: (w) => n(w),
16284
+ "aria-label": x("Toggle dark mode"),
16279
16285
  className: "mx-1"
16280
16286
  }
16281
16287
  ),
16282
16288
  /* @__PURE__ */ a(fl, { className: "h-4 w-4" })
16283
16289
  ] })
16284
16290
  ] }),
16285
- /* @__PURE__ */ a("div", { className: "space-y-2", children: b.colors.map((k) => C(k)) })
16291
+ /* @__PURE__ */ a("div", { className: "space-y-2", children: y.colors.map((w) => _(w)) })
16286
16292
  ] }),
16287
- /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: y("Loading...") }), children: s && u && /* @__PURE__ */ a(
16293
+ /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: x("Loading...") }), children: s && u && /* @__PURE__ */ a(
16288
16294
  cv,
16289
16295
  {
16290
16296
  open: s,
@@ -16299,7 +16305,7 @@ const tv = ({ value: t, onChange: e, disabled: n }) => {
16299
16305
  /* @__PURE__ */ a("br", {})
16300
16306
  ] }),
16301
16307
  c && /* @__PURE__ */ a("div", { className: "absolute bottom-4 w-full", children: V.createElement(c) })
16302
- ] }) : /* @__PURE__ */ a("div", { className: "relative w-full", children: /* @__PURE__ */ a("div", { className: ht("no-scrollbar h-full w-full overflow-y-auto text-center", t), children: /* @__PURE__ */ a("div", { className: "mt-10 h-full items-center justify-center gap-2 text-muted-foreground", children: /* @__PURE__ */ a("p", { className: "text-sm", children: y("You don't have permission to edit the theme. Please contact your administrator to get access.") }) }) }) });
16308
+ ] }) : /* @__PURE__ */ a("div", { className: "relative w-full", children: /* @__PURE__ */ a("div", { className: ht("no-scrollbar h-full w-full overflow-y-auto text-center", t), children: /* @__PURE__ */ a("div", { className: "mt-10 h-full items-center justify-center gap-2 text-muted-foreground", children: /* @__PURE__ */ a("p", { className: "text-sm", children: x("You don't have permission to edit the theme. Please contact your administrator to get access.") }) }) }) });
16303
16309
  }), hv = "Core", mv = "Import", gv = "Breakpoints", bv = "Clear", yv = "Cancel", xv = "Yes", vv = "Preview", wv = "Settings", kv = "Style", Cv = "Enter SVG code here", Nv = "Remove", Sv = "Choose", Ev = "Cut", _v = "Copy", Av = "Paste", Tv = "Delete", Bv = "classes", Iv = "Theme", Rv = "Outline", Lv = "Copied", Pv = "Stop", Ov = "Edit", Dv = "Tag", Mv = "Value", $v = "URL", Fv = "Images", zv = "Library", Hv = "Blocks", Vv = "Basic", jv = "Media", Wv = "Advanced", Gv = "Form", Uv = "Groups", Kv = "Accordions", Jv = "Buttons", Yv = "Layouts", Xv = "FAQ", qv = "Hero", Zv = "Features", Qv = "Footer", ew = "Navbar", tw = "Icons", nw = "Testimonials", rw = "Blog", ow = "Saved", sw = "Unsaved", iw = "Randomize", aw = "Classes", lw = "All", cw = "Undo", dw = "Redo", uw = "Duplicate", pw = "Close", fw = "Selected", hw = "Select", mw = "Attributes", gw = "apply", bw = "presets", yw = "Orientation", xw = "Color", vw = "Upload", ww = "Apply", kw = "Back", Cw = "Insert", Nw = "Rename", Sw = "Partials", Ew = "Happy", _w = "Sad", Aw = "Retry", Tw = "Canvas is empty", Bw = "Presets", Iw = "No", Rw = "Saving", Lw = { heading_font: "Heading Font", body_font: "Body Font", rounded_corner: "Rounded Corners", primary: "Primary", secondary: "Secondary", background: "Background", text_color: "Text Color", background_dark_mode: "Background (Dark Mode)", text_color_dark_mode: "Text Color (Dark Mode)" }, Pw = { box: "box", tag: "Tag", div: "div", level: "Level", header: "header", footer: "footer", section: "section", article: "article", aside: "aside", main: "main", nav: "navigation", figure: "figure", details: "details", summary: "summary", dialog: "dialog", strike: "strike", caption: "caption", legend: "legend", figcaption: "figure caption", mark: "mark", background_image: "Background Image", label: "Label", default: "default", icon_size: "Icon Size", icon_position: "Icon Position", start: "Start", end: "End", button: "Button", custom_html: "Custom HTML", html_code: "HTML Code", default_snippet: "The HTML snippet goes here...", placeholder: "Enter custom HTML code here", custom_script: "Custom Script", dark_mode: "Dark Mode", divider: "Divider", empty_box: "Empty Box", heading: "Heading", image: "Image", alt: "Alt", width: "Width", height: "Height", video: "Video", span: "Span", content: "Content", icon: "Icon", richtext: "Rich Text", list: "List", list_type: "List Type", listitem: "List Item", link: "Link", list_item: "List Item", none: "None", disc: "Disc", number: "Number", paragraph: "Paragraph", lightbox_link: "Lightbox Link", href: "Link", type: "Type", iframe: "iframe", inline: "inline", ajax: "ajax", autoplay: "Video autoplay", max_width: "Max Width", backdrop_color: "Background Color", gallery_name: "Gallery Name", slot: "Slot", empty_slot: "Empty Slot", text: "Text", video_url: "Video URL", controls: "Show Controls", loop: "Loop", muted: "Muted", checkbox: "Checkbox", required: "Required", checked: "Checked", submit_button: "Submit Button", form: "Form", submit_url: "Submit URL", error_message: "Error Message", success_message: "Success Message", input: "Input", value: "Value", show_label: "Show Label", field_name: "Field Name", radio: "Radio", multiple: "Multiple", options: "Options", select: "Select", multiple_choice: "Multiple Choice", textarea: "Textarea", rows: "Rows" }, Ow = "Add", Dw = "Save", Mw = "Screen", $w = {
16304
16310
  "Add block": "Add Block",
16305
16311
  "Add Block": "Add Block",
@@ -16774,15 +16780,15 @@ const mu = (t, e) => {
16774
16780
  return n = Rt([...n, ...Fw(e, t, n)]), n;
16775
16781
  }, zw = (t, e, n) => go(
16776
16782
  t.map((r) => {
16777
- const o = ["_id", "_type", "_parent"], s = bo(r, o), i = Oe(r._type), l = {}, c = S(i, "aiProps", []);
16783
+ const o = ["_id", "_type", "_parent"], s = bo(r, o), i = Oe(r._type), l = {}, c = N(i, "aiProps", []);
16778
16784
  for (const d in r)
16779
16785
  if (!o.includes(d) && c.includes(d)) {
16780
- const u = S(r, `${d}-${e}`, ""), p = S(r, d, "");
16786
+ const u = N(r, `${d}-${e}`, ""), p = N(r, d, "");
16781
16787
  l[d] = Vn(u) && u.trim() || p, n && (l[d] = p);
16782
16788
  }
16783
16789
  return $(l) ? !1 : (pe(s, "_parent") && $(s._parent) && delete s._parent, { ...s, ...l });
16784
16790
  })
16785
- ), Hw = (t, e, n) => !e || n !== "content" ? t : `${t}. Generate content in ${S(Hn, e, e)} language.`, Vw = P(!1), gu = () => {
16791
+ ), Hw = (t, e, n) => !e || n !== "content" ? t : `${t}. Generate content in ${N(Hn, e, e)} language.`, Vw = P(!1), gu = () => {
16786
16792
  const [t, e] = O(Vw), [n, r] = F(null), o = G("askAiCallBack", kt), s = qf(), i = Yf(), [l] = fe(), { selectedLang: c, fallbackLang: d } = Ke(), u = c.length ? c : d, p = (h, f) => {
16787
16793
  const m = qr(f.find((b) => b._id === h));
16788
16794
  for (const b in m) {
@@ -16801,23 +16807,23 @@ const mu = (t, e) => {
16801
16807
  if (o) {
16802
16808
  e(!0), r(null);
16803
16809
  try {
16804
- const y = c === d ? "" : c, x = m.toLowerCase().includes("translate the content"), v = h === "content" ? zw(qr(mu(f, l)), c, x) : [p(f, l)], E = await o(h, Hw(m, u, h), v, y);
16805
- if (E === void 0) return;
16806
- const { blocks: _, error: A } = E;
16810
+ const y = c === d ? "" : c, x = m.toLowerCase().includes("translate the content"), v = h === "content" ? zw(qr(mu(f, l)), c, x) : [p(f, l)], S = await o(h, Hw(m, u, h), v, y);
16811
+ if (S === void 0) return;
16812
+ const { blocks: E, error: A } = S;
16807
16813
  if (A) {
16808
16814
  r(A);
16809
16815
  return;
16810
16816
  }
16811
16817
  if (h === "styles") {
16812
- const T = _.map((C) => {
16813
- for (const k in C)
16814
- k !== "_id" && (C[k] = `${Dt},${C[k]}`);
16815
- return C;
16818
+ const B = E.map((k) => {
16819
+ for (const _ in k)
16820
+ _ !== "_id" && (k[_] = `${Dt},${k[_]}`);
16821
+ return k;
16816
16822
  });
16817
- i(T);
16823
+ i(B);
16818
16824
  } else
16819
- s(_);
16820
- b && b(E);
16825
+ s(E);
16826
+ b && b(S);
16821
16827
  } catch (y) {
16822
16828
  r(y);
16823
16829
  } finally {
@@ -16881,10 +16887,10 @@ function jw({ onClick: t }) {
16881
16887
  }
16882
16888
  ]];
16883
16889
  return r && r !== o && i.splice(0, 0, {
16884
- name: n("Translate to {{lang}}", { lang: S(Hn, r, r) }),
16890
+ name: n("Translate to {{lang}}", { lang: N(Hn, r, r) }),
16885
16891
  icon: $p,
16886
16892
  prompt: n("Translate the content to {{lang}}. Maintain same tone, style and length.", {
16887
- lang: S(Hn, r, r)
16893
+ lang: N(Hn, r, r)
16888
16894
  })
16889
16895
  }), /* @__PURE__ */ a("div", { className: e ? "pointer-events-none opacity-50" : "", children: /* @__PURE__ */ a("ul", { className: "space-y-1", children: i.map(
16890
16896
  ({ name: l, icon: c, subMenus: d, prompt: u }) => d ? /* @__PURE__ */ g(Td, { children: [
@@ -17093,43 +17099,43 @@ const qw = () => {
17093
17099
  return;
17094
17100
  }
17095
17101
  if (s) {
17096
- const C = [...r, { key: s, value: l }];
17097
- n == null || n(C), o(r), i(""), c(""), h("");
17102
+ const k = [...r, { key: s, value: l }];
17103
+ n == null || n(k), o(r), i(""), c(""), h("");
17098
17104
  }
17099
- }, v = (C) => {
17100
- const k = r.filter((w, B) => B !== C);
17101
- n == null || n(k), o(k);
17102
- }, E = (C) => {
17103
- u(C), i(r[C].key), c(r[C].value);
17104
- }, _ = () => {
17105
+ }, v = (k) => {
17106
+ const _ = r.filter((w, T) => T !== k);
17107
+ n == null || n(_), o(_);
17108
+ }, S = (k) => {
17109
+ u(k), i(r[k].key), c(r[k].value);
17110
+ }, E = () => {
17105
17111
  if (s.startsWith("@")) {
17106
17112
  h(y("Attribute keys cannot start with @"));
17107
17113
  return;
17108
17114
  }
17109
17115
  if (d !== null && s) {
17110
- const C = [...r];
17111
- C[d] = { key: s, value: l }, n == null || n(C), o(C), u(null), i(""), c(""), h("");
17116
+ const k = [...r];
17117
+ k[d] = { key: s, value: l }, n == null || n(k), o(k), u(null), i(""), c(""), h("");
17112
17118
  }
17113
- }, A = (C) => {
17114
- C.key === "Enter" && !C.shiftKey && (C.preventDefault(), d !== null ? _() : x());
17115
- }, T = R((C) => {
17116
- const k = (L) => /[.,!?;:]/.test(L), w = (L, I, W) => {
17119
+ }, A = (k) => {
17120
+ k.key === "Enter" && !k.shiftKey && (k.preventDefault(), d !== null ? E() : x());
17121
+ }, B = R((k) => {
17122
+ const _ = (L) => /[.,!?;:]/.test(L), w = (L, I, W) => {
17117
17123
  let K = "", q = "";
17118
17124
  const xe = I > 0 ? L[I - 1] : "", ve = I < L.length ? L[I] : "";
17119
- return I > 0 && (xe === "." || !k(xe) && xe !== " ") && (K = " "), I < L.length && !k(ve) && ve !== " " && (q = " "), {
17125
+ return I > 0 && (xe === "." || !_(xe) && xe !== " ") && (K = " "), I < L.length && !_(ve) && ve !== " " && (q = " "), {
17120
17126
  text: K + W + q,
17121
17127
  prefixLength: K.length,
17122
17128
  suffixLength: q.length
17123
17129
  };
17124
- }, B = m.current;
17125
- if (B) {
17126
- const L = B.selectionStart || 0, I = B.value || "", W = B.selectionEnd || L;
17130
+ }, T = m.current;
17131
+ if (T) {
17132
+ const L = T.selectionStart || 0, I = T.value || "", W = T.selectionEnd || L;
17127
17133
  if (W > L) {
17128
- const ue = `{{${C}}}`, { text: Me } = w(I, L, ue), tt = I.slice(0, L) + Me + I.slice(W);
17134
+ const ue = `{{${k}}}`, { text: Me } = w(I, L, ue), tt = I.slice(0, L) + Me + I.slice(W);
17129
17135
  c(tt);
17130
17136
  return;
17131
17137
  }
17132
- const q = `{{${C}}}`, { text: xe } = w(I, L, q), ve = I.slice(0, L) + xe + I.slice(L);
17138
+ const q = `{{${k}}}`, { text: xe } = w(I, L, q), ve = I.slice(0, L) + xe + I.slice(L);
17133
17139
  c(ve);
17134
17140
  }
17135
17141
  }, []);
@@ -17137,8 +17143,8 @@ const qw = () => {
17137
17143
  /* @__PURE__ */ g(
17138
17144
  "form",
17139
17145
  {
17140
- onSubmit: (C) => {
17141
- C.preventDefault(), d !== null ? _() : x();
17146
+ onSubmit: (k) => {
17147
+ k.preventDefault(), d !== null ? E() : x();
17142
17148
  },
17143
17149
  className: "space-y-3",
17144
17150
  children: [
@@ -17154,7 +17160,7 @@ const qw = () => {
17154
17160
  id: "attrKey",
17155
17161
  ref: f,
17156
17162
  value: s,
17157
- onChange: (C) => i(C.target.value),
17163
+ onChange: (k) => i(k.target.value),
17158
17164
  placeholder: y("Enter key"),
17159
17165
  className: "py-0 text-xs font-normal leading-tight placeholder:text-slate-400"
17160
17166
  }
@@ -17163,7 +17169,7 @@ const qw = () => {
17163
17169
  /* @__PURE__ */ g("div", { className: "w-full", children: [
17164
17170
  /* @__PURE__ */ g("div", { className: "flex items-center justify-between", children: [
17165
17171
  /* @__PURE__ */ a(Kt, { htmlFor: "attrValue", className: "text-[11px] font-normal text-slate-600", children: y("Value") }),
17166
- !$(b) && /* @__PURE__ */ a(Id, { data: b, onSelect: T })
17172
+ !$(b) && /* @__PURE__ */ a(Id, { data: b, onSelect: B })
17167
17173
  ] }),
17168
17174
  /* @__PURE__ */ a(
17169
17175
  $o,
@@ -17174,7 +17180,7 @@ const qw = () => {
17174
17180
  id: "attrValue",
17175
17181
  ref: m,
17176
17182
  value: l,
17177
- onChange: (C) => c(C.target.value),
17183
+ onChange: (k) => c(k.target.value),
17178
17184
  onKeyDown: A,
17179
17185
  placeholder: y("Enter value"),
17180
17186
  className: "text-xs font-normal leading-tight placeholder:text-slate-400"
@@ -17187,30 +17193,30 @@ const qw = () => {
17187
17193
  ]
17188
17194
  }
17189
17195
  ),
17190
- /* @__PURE__ */ a("div", { className: "space-y-1 py-4", children: r.map((C, k) => /* @__PURE__ */ g("div", { className: "flex items-center justify-between rounded border p-2 text-sm", children: [
17196
+ /* @__PURE__ */ a("div", { className: "space-y-1 py-4", children: r.map((k, _) => /* @__PURE__ */ g("div", { className: "flex items-center justify-between rounded border p-2 text-sm", children: [
17191
17197
  /* @__PURE__ */ g("div", { className: "flex flex-col text-xs leading-tight", children: [
17192
- /* @__PURE__ */ a("span", { className: "truncate text-[12px] font-light text-muted-foreground", children: C.key }),
17193
- /* @__PURE__ */ a("span", { className: "max-w-[200px] text-wrap font-normal", children: C.value.toString() })
17198
+ /* @__PURE__ */ a("span", { className: "truncate text-[12px] font-light text-muted-foreground", children: k.key }),
17199
+ /* @__PURE__ */ a("span", { className: "max-w-[200px] text-wrap font-normal", children: k.value.toString() })
17194
17200
  ] }),
17195
17201
  /* @__PURE__ */ g("div", { className: "flex-shrink-0 text-slate-400", children: [
17196
- /* @__PURE__ */ a(te, { variant: "ghost", size: "icon", className: "h-6 w-6", onClick: () => E(k), children: /* @__PURE__ */ a(yo, { className: "h-3 w-3" }) }),
17197
- /* @__PURE__ */ a(te, { variant: "ghost", size: "icon", className: "h-6 w-6", onClick: () => v(k), children: /* @__PURE__ */ a(qe, { className: "h-3 w-3" }) })
17202
+ /* @__PURE__ */ a(te, { variant: "ghost", size: "icon", className: "h-6 w-6", onClick: () => S(_), children: /* @__PURE__ */ a(yo, { className: "h-3 w-3" }) }),
17203
+ /* @__PURE__ */ a(te, { variant: "ghost", size: "icon", className: "h-6 w-6", onClick: () => v(_), children: /* @__PURE__ */ a(qe, { className: "h-3 w-3" }) })
17198
17204
  ] })
17199
- ] }, k)) })
17205
+ ] }, _)) })
17200
17206
  ] });
17201
17207
  }), Qw = V.memo(() => {
17202
- const t = de(), [e, n] = F([]), [r] = De(), o = Ft(), s = `${S(r, "0.prop")}_attrs`;
17208
+ const t = de(), [e, n] = F([]), [r] = De(), o = Ft(), s = `${N(r, "0.prop")}_attrs`;
17203
17209
  V.useEffect(() => {
17204
- const l = N(S(t, s), (c, d) => ({ key: d, value: c }));
17210
+ const l = C(N(t, s), (c, d) => ({ key: d, value: c }));
17205
17211
  $(l) ? n([]) : n(l);
17206
- }, [S(t, s)]);
17212
+ }, [N(t, s)]);
17207
17213
  const i = V.useCallback(
17208
17214
  (l = []) => {
17209
17215
  if (!t) return;
17210
17216
  const c = {};
17211
17217
  yr(l, (d) => {
17212
17218
  $(d.key) || We(c, d.key, d.value);
17213
- }), o([S(t, "_id")], { [s]: c });
17219
+ }), o([N(t, "_id")], { [s]: c });
17214
17220
  },
17215
17221
  [t, o, s]
17216
17222
  );
@@ -17399,7 +17405,7 @@ const rk = ({ partialBlockId: t }) => {
17399
17405
  }
17400
17406
  )
17401
17407
  ] }) });
17402
- }, sk = Q.lazy(() => import("./manage-design-tokens-CRwsErkx.js")), Wt = 280, ik = ({ isActive: t, show: e }) => /* @__PURE__ */ a(te, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(ul, { className: "h-5 w-5" }) }), ak = ({ isActive: t, show: e }) => yt() && /* @__PURE__ */ a(te, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(il, { className: "h-5 w-5" }) }), lk = ({ isActive: t, show: e }) => G("flags.ai", !1) ? /* @__PURE__ */ a(te, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(Vs, {}) }) : null;
17408
+ }, sk = Q.lazy(() => import("./manage-design-tokens-rEzXQJRW.js")), Wt = 280, ik = ({ isActive: t, show: e }) => /* @__PURE__ */ a(te, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(ul, { className: "h-5 w-5" }) }), ak = ({ isActive: t, show: e }) => yt() && /* @__PURE__ */ a(te, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(il, { className: "h-5 w-5" }) }), lk = ({ isActive: t, show: e }) => G("flags.ai", !1) ? /* @__PURE__ */ a(te, { variant: t ? "default" : "ghost", size: "icon", onClick: e, children: /* @__PURE__ */ a(Vs, {}) }) : null;
17403
17409
  _s("add-block", {
17404
17410
  button: ak,
17405
17411
  label: "Add Blocks",
@@ -17425,35 +17431,35 @@ _s("outline", {
17425
17431
  panel: () => /* @__PURE__ */ a("div", { className: "-mt-8", children: /* @__PURE__ */ a(ev, {}) })
17426
17432
  });
17427
17433
  const ck = () => {
17428
- const t = Tu(), [e, n] = ui(), r = ie("outline"), [o, s] = F(Wt), [i, l] = Gl(), [, c] = Ul(), d = zi("top"), u = zi("bottom"), p = Yu([...u ?? []]), h = R((k) => {
17429
- k.preventDefault();
17434
+ const t = Tu(), [e, n] = ui(), r = ie("outline"), [o, s] = F(Wt), [i, l] = Gl(), [, c] = Ul(), d = zi("top"), u = zi("bottom"), p = Yu([...u ?? []]), h = R((_) => {
17435
+ _.preventDefault();
17430
17436
  }, []), f = M(() => [d].flat(), [d]), m = R(
17431
- (k) => {
17432
- console.log("handleMenuItemClick", k, e), n(e === k ? null : k);
17437
+ (_) => {
17438
+ console.log("handleMenuItemClick", _, e), n(e === _ ? null : _);
17433
17439
  },
17434
17440
  [e, n]
17435
- ), { t: b } = U(), y = M(() => [...d, ...u], [d, u]), x = G("htmlDir", "ltr"), v = ne(y, { id: e }) ?? Ce(y), E = S(v, "width", Wt);
17441
+ ), { t: b } = U(), y = M(() => [...d, ...u], [d, u]), x = G("htmlDir", "ltr"), v = ne(y, { id: e }) ?? Ce(y), S = N(v, "width", Wt);
17436
17442
  H(() => {
17437
17443
  if (e !== null) {
17438
- const k = ne(y, { id: e });
17439
- k && S(k, "view", "standard") === "standard" && (r.current = e, s(S(k, "width", Wt)));
17444
+ const _ = ne(y, { id: e });
17445
+ _ && N(_, "view", "standard") === "standard" && (r.current = e, s(N(_, "width", Wt)));
17440
17446
  }
17441
17447
  }, [e, y]);
17442
- const _ = M(() => {
17448
+ const E = M(() => {
17443
17449
  if (e === null) return 0;
17444
- const k = ne(y, { id: e });
17445
- return S(k, "view", "standard") === "standard" ? E : o;
17446
- }, [e, E, o, y]), A = R(() => {
17450
+ const _ = ne(y, { id: e });
17451
+ return N(_, "view", "standard") === "standard" ? S : o;
17452
+ }, [e, S, o, y]), A = R(() => {
17447
17453
  n(r.current);
17448
- }, [n, e]), T = R(() => {
17454
+ }, [n, e]), B = R(() => {
17449
17455
  n("outline");
17450
17456
  }, [n]);
17451
17457
  H(() => {
17452
17458
  e !== null && !ne(y, { id: e }) && n("outline");
17453
17459
  }, [e, y]);
17454
- const C = R(
17455
- (k) => {
17456
- m(k);
17460
+ const k = R(
17461
+ (_) => {
17462
+ m(_);
17457
17463
  },
17458
17464
  [m]
17459
17465
  );
@@ -17467,24 +17473,24 @@ const ck = () => {
17467
17473
  /* @__PURE__ */ a("div", { className: "flex h-[50px] w-screen items-center border-b border-border", children: /* @__PURE__ */ a(je, { children: /* @__PURE__ */ a(t, {}) }) }),
17468
17474
  /* @__PURE__ */ g("main", { className: "relative flex h-[calc(100vh-56px)] max-w-full flex-1 flex-row", children: [
17469
17475
  /* @__PURE__ */ g("div", { id: "sidebar", className: "flex w-12 flex-col items-center justify-between border-r border-border py-2", children: [
17470
- /* @__PURE__ */ a("div", { className: "flex flex-col gap-y-1", children: f.map((k, w) => /* @__PURE__ */ g(Ee, { children: [
17471
- /* @__PURE__ */ a(_e, { asChild: !0, children: fn(S(k, "button", An), {
17476
+ /* @__PURE__ */ a("div", { className: "flex flex-col gap-y-1", children: f.map((_, w) => /* @__PURE__ */ g(Ee, { children: [
17477
+ /* @__PURE__ */ a(_e, { asChild: !0, children: fn(N(_, "button", An), {
17472
17478
  position: "top",
17473
- panelId: k.id,
17474
- isActive: e === k.id,
17475
- show: () => C(k.id)
17479
+ panelId: _.id,
17480
+ isActive: e === _.id,
17481
+ show: () => k(_.id)
17476
17482
  }) }),
17477
- /* @__PURE__ */ a(ke, { side: "right", children: /* @__PURE__ */ a("p", { children: b(k.label) }) })
17483
+ /* @__PURE__ */ a(ke, { side: "right", children: /* @__PURE__ */ a("p", { children: b(_.label) }) })
17478
17484
  ] }, "button-top-" + w)) }),
17479
17485
  /* @__PURE__ */ a("div", { className: "flex flex-col space-y-1" }),
17480
- /* @__PURE__ */ a("div", { className: "flex flex-col", children: p == null ? void 0 : p.map((k, w) => /* @__PURE__ */ g(Ee, { children: [
17481
- /* @__PURE__ */ a(_e, { asChild: !0, children: fn(S(k, "button", An), {
17486
+ /* @__PURE__ */ a("div", { className: "flex flex-col", children: p == null ? void 0 : p.map((_, w) => /* @__PURE__ */ g(Ee, { children: [
17487
+ /* @__PURE__ */ a(_e, { asChild: !0, children: fn(N(_, "button", An), {
17482
17488
  position: "bottom",
17483
- panelId: k.id,
17484
- isActive: e === k.id,
17485
- show: () => C(k.id)
17489
+ panelId: _.id,
17490
+ isActive: e === _.id,
17491
+ show: () => k(_.id)
17486
17492
  }) }),
17487
- /* @__PURE__ */ a(ke, { side: "right", children: /* @__PURE__ */ a("p", { children: b(k.label) }) })
17493
+ /* @__PURE__ */ a(ke, { side: "right", children: /* @__PURE__ */ a("p", { children: b(_.label) }) })
17488
17494
  ] }, "button-bottom-" + w)) })
17489
17495
  ] }),
17490
17496
  /* @__PURE__ */ a(
@@ -17492,18 +17498,18 @@ const ck = () => {
17492
17498
  {
17493
17499
  id: "left-panel",
17494
17500
  className: "h-full max-h-full border-r border-border",
17495
- initial: { width: _ },
17496
- animate: { width: _ },
17501
+ initial: { width: E },
17502
+ animate: { width: E },
17497
17503
  transition: { duration: 0.3, ease: "easeInOut" },
17498
- children: e !== null && S(v, "view", "standard") === "standard" && /* @__PURE__ */ g("div", { className: "no-scrollbar flex h-full flex-col overflow-hidden px-3 py-2", children: [
17504
+ children: e !== null && N(v, "view", "standard") === "standard" && /* @__PURE__ */ g("div", { className: "no-scrollbar flex h-full flex-col overflow-hidden px-3 py-2", children: [
17499
17505
  /* @__PURE__ */ a(
17500
17506
  "div",
17501
17507
  {
17502
- className: `absolute top-2 flex h-10 items-center space-x-1 py-2 text-base font-bold ${S(v, "isInternal", !1) ? "" : "w-64"}`,
17503
- children: /* @__PURE__ */ a("span", { children: b(S(v, "label", "")) })
17508
+ className: `absolute top-2 flex h-10 items-center space-x-1 py-2 text-base font-bold ${N(v, "isInternal", !1) ? "" : "w-64"}`,
17509
+ children: /* @__PURE__ */ a("span", { children: b(N(v, "label", "")) })
17504
17510
  }
17505
17511
  ),
17506
- /* @__PURE__ */ a("div", { className: "no-scrollbar h-full max-h-full overflow-y-auto pt-10", children: /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: Q.createElement(S(v, "panel", An), {}) }) })
17512
+ /* @__PURE__ */ a("div", { className: "no-scrollbar h-full max-h-full overflow-y-auto pt-10", children: /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: Q.createElement(N(v, "panel", An), {}) }) })
17507
17513
  ] })
17508
17514
  }
17509
17515
  ),
@@ -17566,34 +17572,34 @@ const ck = () => {
17566
17572
  }
17567
17573
  ),
17568
17574
  /* @__PURE__ */ a(qw, {}),
17569
- e !== null && S(v, "view") === "drawer" && /* @__PURE__ */ a(Kw, { open: !0, onOpenChange: () => A(), children: /* @__PURE__ */ g(
17575
+ e !== null && N(v, "view") === "drawer" && /* @__PURE__ */ a(Kw, { open: !0, onOpenChange: () => A(), children: /* @__PURE__ */ g(
17570
17576
  xu,
17571
17577
  {
17572
17578
  side: "left",
17573
17579
  className: "flex flex-col gap-0 p-0 sm:max-w-full",
17574
- style: { width: `${E}px` },
17580
+ style: { width: `${S}px` },
17575
17581
  children: [
17576
17582
  /* @__PURE__ */ a(vu, { className: "border-b border-border px-2 py-2.5", children: /* @__PURE__ */ g(wu, { className: "flex items-center gap-2", children: [
17577
- /* @__PURE__ */ a("span", { className: "inline-block", children: S(v, "icon", null) }),
17578
- /* @__PURE__ */ a("span", { children: b(S(v, "label", "")) })
17583
+ /* @__PURE__ */ a("span", { className: "inline-block", children: N(v, "icon", null) }),
17584
+ /* @__PURE__ */ a("span", { children: b(N(v, "label", "")) })
17579
17585
  ] }) }),
17580
- /* @__PURE__ */ a("div", { className: "h-full max-h-full overflow-y-auto p-4", children: /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: Q.createElement(S(v, "panel", An), {
17581
- close: T
17586
+ /* @__PURE__ */ a("div", { className: "h-full max-h-full overflow-y-auto p-4", children: /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: Q.createElement(N(v, "panel", An), {
17587
+ close: B
17582
17588
  }) }) })
17583
17589
  ]
17584
17590
  }
17585
17591
  ) }),
17586
17592
  " ",
17587
- e !== null && S(v, "view") === "modal" && /* @__PURE__ */ a(Lo, { open: !0, onOpenChange: () => A(), children: /* @__PURE__ */ g(Br, { className: "gap-0 p-0", style: { maxWidth: `${E}px` }, children: [
17593
+ e !== null && N(v, "view") === "modal" && /* @__PURE__ */ a(Lo, { open: !0, onOpenChange: () => A(), children: /* @__PURE__ */ g(Br, { className: "gap-0 p-0", style: { maxWidth: `${S}px` }, children: [
17588
17594
  /* @__PURE__ */ a(Po, { className: "border-b border-border px-2 py-3.5", children: /* @__PURE__ */ g(Ir, { className: "flex items-center gap-2", children: [
17589
- /* @__PURE__ */ a("span", { className: "inline-block", children: S(v, "icon", null) }),
17590
- /* @__PURE__ */ a("span", { children: b(S(v, "label", "")) })
17595
+ /* @__PURE__ */ a("span", { className: "inline-block", children: N(v, "icon", null) }),
17596
+ /* @__PURE__ */ a("span", { children: b(N(v, "label", "")) })
17591
17597
  ] }) }),
17592
- /* @__PURE__ */ a("div", { className: "max-h-[70vh] overflow-y-auto p-4", children: /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: Q.createElement(S(v, "panel", An), {
17593
- close: T
17598
+ /* @__PURE__ */ a("div", { className: "max-h-[70vh] overflow-y-auto p-4", children: /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: Q.createElement(N(v, "panel", An), {
17599
+ close: B
17594
17600
  }) }) })
17595
17601
  ] }) }),
17596
- e !== null && S(v, "view") === "overlay" && /* @__PURE__ */ a(
17602
+ e !== null && N(v, "view") === "overlay" && /* @__PURE__ */ a(
17597
17603
  Dr.div,
17598
17604
  {
17599
17605
  className: "absolute bottom-0 left-12 right-0 top-0 z-50",
@@ -17612,13 +17618,13 @@ const ck = () => {
17612
17618
  children: [
17613
17619
  /* @__PURE__ */ g("div", { className: "flex h-[50px] items-center justify-between border-b border-border p-4", children: [
17614
17620
  /* @__PURE__ */ g("div", { className: "-ml-2 flex items-center gap-2 text-lg font-bold", children: [
17615
- /* @__PURE__ */ a("span", { className: "rtl:ml-2 rtl:inline-block", children: S(v, "icon", null) }),
17616
- /* @__PURE__ */ a("span", { children: b(S(v, "label", "")) })
17621
+ /* @__PURE__ */ a("span", { className: "rtl:ml-2 rtl:inline-block", children: N(v, "icon", null) }),
17622
+ /* @__PURE__ */ a("span", { children: b(N(v, "label", "")) })
17617
17623
  ] }),
17618
17624
  /* @__PURE__ */ a(te, { onClick: () => A(), variant: "ghost", size: "icon", className: "", children: /* @__PURE__ */ a(qe, { className: "h-5 w-5" }) })
17619
17625
  ] }),
17620
- /* @__PURE__ */ a("div", { className: "flex-1 overflow-y-auto p-4", children: /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: Q.createElement(S(v, "panel", An), {
17621
- close: T
17626
+ /* @__PURE__ */ a("div", { className: "flex-1 overflow-y-auto p-4", children: /* @__PURE__ */ a(je, { fallback: /* @__PURE__ */ a("div", { children: "Loading..." }), children: Q.createElement(N(v, "panel", An), {
17627
+ close: B
17622
17628
  }) }) })
17623
17629
  ]
17624
17630
  }
@@ -17674,8 +17680,8 @@ const ck = () => {
17674
17680
  });
17675
17681
  }, h = (m) => {
17676
17682
  if (!i) return;
17677
- const b = m.clientX - c.x, y = m.clientY - c.y, x = m.currentTarget, v = x.offsetWidth, E = x.offsetHeight, _ = window.innerWidth - v, A = window.innerHeight - E, T = Math.max(0, Math.min(b, _)), C = Math.max(0, Math.min(y, A));
17678
- n(T, C);
17683
+ const b = m.clientX - c.x, y = m.clientY - c.y, x = m.currentTarget, v = x.offsetWidth, S = x.offsetHeight, E = window.innerWidth - v, A = window.innerHeight - S, B = Math.max(0, Math.min(b, E)), k = Math.max(0, Math.min(y, A));
17684
+ n(B, k);
17679
17685
  }, f = () => {
17680
17686
  l(!1);
17681
17687
  };
@@ -18007,7 +18013,7 @@ function Xr(t, e = 0) {
18007
18013
  (m, b) => {
18008
18014
  const [y, x] = b.split(":").map((v) => v.trim());
18009
18015
  if (y && x) {
18010
- const v = y.replace(/-([a-z])/g, (E) => E[1].toUpperCase());
18016
+ const v = y.replace(/-([a-z])/g, (S) => S[1].toUpperCase());
18011
18017
  m[v] = x.replace(/['"]/g, "");
18012
18018
  }
18013
18019
  return m;
@@ -18135,16 +18141,16 @@ ${o})
18135
18141
  d(!1);
18136
18142
  let v = s({ blockId: o == null ? void 0 : o._id, additionalCoreBlocks: ["Icon"] });
18137
18143
  v = v.replace(/\s*bid=["'][^"']*["']/g, "");
18138
- const E = t === "ts", {
18139
- jsx: _,
18144
+ const S = t === "ts", {
18145
+ jsx: E,
18140
18146
  html: A,
18141
- componentName: T
18147
+ componentName: B
18142
18148
  } = await Nk({
18143
18149
  selectedBlock: o,
18144
18150
  html: v,
18145
- isTypeScript: E
18151
+ isTypeScript: S
18146
18152
  });
18147
- r({ html: A || "", jsx: _ }), l(T), d(!0);
18153
+ r({ html: A || "", jsx: E }), l(B), d(!0);
18148
18154
  } catch {
18149
18155
  const v = "<div>Export failed. Close the modal and try again.</div>";
18150
18156
  r({ html: v, jsx: v }), Ne.error(e("Failed to generate export HTML"));
@@ -18163,17 +18169,17 @@ ${o})
18163
18169
  },
18164
18170
  [e]
18165
18171
  ), m = (v) => {
18166
- const E = new Blob([v], { type: "text/jsx" }), _ = URL.createObjectURL(E), A = document.createElement("a");
18167
- A.href = _, A.download = u() ?? "", document.body.appendChild(A), A.click(), URL.revokeObjectURL(_), document.body.removeChild(A), Ne.success(e("Export code downloaded successfully!"));
18172
+ const S = new Blob([v], { type: "text/jsx" }), E = URL.createObjectURL(S), A = document.createElement("a");
18173
+ A.href = E, A.download = u() ?? "", document.body.appendChild(A), A.click(), URL.revokeObjectURL(E), document.body.removeChild(A), Ne.success(e("Export code downloaded successfully!"));
18168
18174
  }, b = /* @__PURE__ */ g("span", { children: [
18169
18175
  "Download ",
18170
18176
  /* @__PURE__ */ a("span", { className: "font-mono text-xs font-light text-gray-300", children: u() })
18171
18177
  ] }), y = M(() => {
18172
- const v = { extend: Af() }, E = JSON.stringify(v, null, 2);
18178
+ const v = { extend: Af() }, S = JSON.stringify(v, null, 2);
18173
18179
  return `{
18174
18180
  // Your tailwind config ...
18175
18181
 
18176
- "theme": ${E == null ? void 0 : E.split(`
18182
+ "theme": ${S == null ? void 0 : S.split(`
18177
18183
  `).join(`
18178
18184
  `)},
18179
18185
  }`;
@@ -18253,7 +18259,7 @@ ${o})
18253
18259
  };
18254
18260
  }, Tk = (t, e) => {
18255
18261
  const n = [];
18256
- let r = ne(t, { _id: e }), o = S(r, "_parent", "");
18262
+ let r = ne(t, { _id: e }), o = N(r, "_parent", "");
18257
18263
  for (; Vn(o) && !$(o); )
18258
18264
  n.push(r == null ? void 0 : r._parent), r = ne(t, { _id: o }), o = r == null ? void 0 : r._parent;
18259
18265
  return Ot(n);