@templatical/editor 0.32.0 → 0.33.0

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 (136) hide show
  1. package/dist/{AiChatSidebar-ftdKHSR-.js → AiChatSidebar-J7WsHRDS.js} +1 -1
  2. package/dist/{AiFeatureMenu-aNeCRlil.js → AiFeatureMenu-C9mxL_7U.js} +3 -3
  3. package/dist/{BlockIssueBadge-bTDu6W_2.js → BlockIssueBadge-BI6v_eol.js} +2 -2
  4. package/dist/{BlockPreviewCanvas-BsOuOfzB.js → BlockPreviewCanvas-mZIr9mY2.js} +4 -4
  5. package/dist/{CloudHeaderExtras-BNpFohqt.js → CloudHeaderExtras-CLtTtK12.js} +2 -2
  6. package/dist/{CloudPanels-xoGWwqSH.js → CloudPanels-BbLAX1jH.js} +3 -3
  7. package/dist/{CollaboratorBar-mEqXkdEi.js → CollaboratorBar-OBbLOhLK.js} +2 -2
  8. package/dist/{ColorPicker-FL5Vb9bE.js → ColorPicker-Cs7iK01u.js} +3 -3
  9. package/dist/{CommentsPanel-slfi74ng.js → CommentsPanel-G_uNzi1a.js} +1 -1
  10. package/dist/{CommentsSidebar-Dea4spMl.js → CommentsSidebar-DlFlpfkU.js} +2 -2
  11. package/dist/{CountdownBlock-DQTwaRxP.js → CountdownBlock-Bdt8qZi1.js} +1 -1
  12. package/dist/{CountdownToolbar-C7xwJoqh.js → CountdownToolbar-BWLYViOm.js} +2 -2
  13. package/dist/{DesignReferenceSidebar-BtBd7bbz.js → DesignReferenceSidebar-CK_xTLh2.js} +2 -2
  14. package/dist/{IssuesPanel-Ci2H36L2.js → IssuesPanel-DIbJ_jaa.js} +3 -3
  15. package/dist/{MergeTagModeToggle-Cdi_DmVw.js → MergeTagModeToggle-DeI65T5k.js} +2 -2
  16. package/dist/{ParagraphEditor-DQEOFc0K.js → ParagraphEditor-Dr-u72hu.js} +8 -8
  17. package/dist/{RestoreVersionDialog-CHwngBae.js → RestoreVersionDialog-6sBYYt9f.js} +2 -2
  18. package/dist/{RichTextEditorContent-C_9xi7dD.js → RichTextEditorContent-DKLVe6Io.js} +4 -4
  19. package/dist/{SaveBlockDialog-tZqZzPjW.js → SaveBlockDialog-DABN4-Jf.js} +13 -13
  20. package/dist/{SavedBlocksBrowserModal-Bdj3GOD_.js → SavedBlocksBrowserModal-BoylzTEq.js} +6 -6
  21. package/dist/{SavedBlocksPanels-2sBxAH9w.js → SavedBlocksPanels-2np4Yu1H.js} +1 -1
  22. package/dist/{SavedBlocksPickBar-DTjQBR00.js → SavedBlocksPickBar-BM7aTSK2.js} +2 -2
  23. package/dist/{TemplateScoringPanel-B6nHSrBD.js → TemplateScoringPanel-CzWoSM1V.js} +2 -2
  24. package/dist/{TestEmailModal-DuHbzO37.js → TestEmailModal-Cb0n7Dhj.js} +6 -6
  25. package/dist/{TestEmailPanel-TpwP-eK_.js → TestEmailPanel-52HjvuU7.js} +1 -1
  26. package/dist/{TitleEditor-C0JQJu38.js → TitleEditor-_taBpBfB.js} +7 -7
  27. package/dist/{TplModal-BMGmhquu.js → TplModal-CEYnwBBk.js} +3 -3
  28. package/dist/{VersionHistoryMenu-D2x6MMYx.js → VersionHistoryMenu-CsGlLSO8.js} +2 -2
  29. package/dist/{VersionHistoryPanels-aGlUVEGF.js → VersionHistoryPanels-DPmYk00L.js} +1 -1
  30. package/dist/{VersionPreviewBanner-61t3_Z-a.js → VersionPreviewBanner-VGJbEoXj.js} +1 -1
  31. package/dist/{blockTypeIcons-BsNup009.js → blockTypeIcons-IhdBwbxp.js} +1 -1
  32. package/dist/bundle-stats.json +6 -6
  33. package/dist/cdn/chunks/{AiChatSidebar-CqWvtRwB.js → AiChatSidebar-6S5LPyRW.js} +2 -2
  34. package/dist/cdn/chunks/{AiChatSidebar-CqWvtRwB.js.map → AiChatSidebar-6S5LPyRW.js.map} +1 -1
  35. package/dist/cdn/chunks/{AiFeatureMenu-DoFrLcXJ.js → AiFeatureMenu-BHCtjIfV.js} +4 -4
  36. package/dist/cdn/chunks/{AiFeatureMenu-DoFrLcXJ.js.map → AiFeatureMenu-BHCtjIfV.js.map} +1 -1
  37. package/dist/cdn/chunks/{BlockIssueBadge-B_mUH69a.js → BlockIssueBadge-2-os120N.js} +3 -3
  38. package/dist/cdn/chunks/{BlockIssueBadge-B_mUH69a.js.map → BlockIssueBadge-2-os120N.js.map} +1 -1
  39. package/dist/cdn/chunks/{BlockPreviewCanvas-CSIxs7hr.js → BlockPreviewCanvas-CYNs-Yn-.js} +5 -5
  40. package/dist/cdn/chunks/{BlockPreviewCanvas-CSIxs7hr.js.map → BlockPreviewCanvas-CYNs-Yn-.js.map} +1 -1
  41. package/dist/cdn/chunks/{CloudHeaderExtras-Dgtr7WaE.js → CloudHeaderExtras-DrbFk6Fy.js} +3 -3
  42. package/dist/cdn/chunks/{CloudHeaderExtras-Dgtr7WaE.js.map → CloudHeaderExtras-DrbFk6Fy.js.map} +1 -1
  43. package/dist/cdn/chunks/{CloudPanels-B91lUmof.js → CloudPanels-CpzYrAPQ.js} +4 -4
  44. package/dist/cdn/chunks/{CloudPanels-B91lUmof.js.map → CloudPanels-CpzYrAPQ.js.map} +1 -1
  45. package/dist/cdn/chunks/{CollaboratorBar-CQwPWoFu.js → CollaboratorBar-VMTCYn_z.js} +3 -3
  46. package/dist/cdn/chunks/{CollaboratorBar-CQwPWoFu.js.map → CollaboratorBar-VMTCYn_z.js.map} +1 -1
  47. package/dist/cdn/chunks/{ColorPicker-CdrKX48J.js → ColorPicker-B0l_UF8G.js} +4 -4
  48. package/dist/cdn/chunks/{ColorPicker-CdrKX48J.js.map → ColorPicker-B0l_UF8G.js.map} +1 -1
  49. package/dist/cdn/chunks/{CommentsPanel-BJNgTmAA.js → CommentsPanel-CXMMdLrO.js} +2 -2
  50. package/dist/cdn/chunks/{CommentsPanel-BJNgTmAA.js.map → CommentsPanel-CXMMdLrO.js.map} +1 -1
  51. package/dist/cdn/chunks/{CommentsSidebar-D6VIIPhB.js → CommentsSidebar-CGkhAJUW.js} +3 -3
  52. package/dist/cdn/chunks/{CommentsSidebar-D6VIIPhB.js.map → CommentsSidebar-CGkhAJUW.js.map} +1 -1
  53. package/dist/cdn/chunks/{CountdownBlock-BRwXUvGU.js → CountdownBlock-CPe1ulzk.js} +2 -2
  54. package/dist/cdn/chunks/{CountdownBlock-BRwXUvGU.js.map → CountdownBlock-CPe1ulzk.js.map} +1 -1
  55. package/dist/cdn/chunks/{CountdownToolbar-CVaU5WG6.js → CountdownToolbar-D5xyNd5V.js} +3 -3
  56. package/dist/cdn/chunks/{CountdownToolbar-CVaU5WG6.js.map → CountdownToolbar-D5xyNd5V.js.map} +1 -1
  57. package/dist/cdn/chunks/{DesignReferenceSidebar-BvOwE1kg.js → DesignReferenceSidebar-D1NH1WRv.js} +3 -3
  58. package/dist/cdn/chunks/{DesignReferenceSidebar-BvOwE1kg.js.map → DesignReferenceSidebar-D1NH1WRv.js.map} +1 -1
  59. package/dist/cdn/chunks/{IssuesPanel-MJZxkScz.js → IssuesPanel-07SBSZVN.js} +4 -4
  60. package/dist/cdn/chunks/{IssuesPanel-MJZxkScz.js.map → IssuesPanel-07SBSZVN.js.map} +1 -1
  61. package/dist/cdn/chunks/{MergeTagModeToggle-bNuN6PTV.js → MergeTagModeToggle-Bg8eO5nc.js} +3 -3
  62. package/dist/cdn/chunks/{MergeTagModeToggle-bNuN6PTV.js.map → MergeTagModeToggle-Bg8eO5nc.js.map} +1 -1
  63. package/dist/cdn/chunks/{ParagraphEditor-BU8tlFbL.js → ParagraphEditor-x2LTi6DN.js} +9 -9
  64. package/dist/cdn/chunks/{ParagraphEditor-BU8tlFbL.js.map → ParagraphEditor-x2LTi6DN.js.map} +1 -1
  65. package/dist/cdn/chunks/{RestoreVersionDialog-vdRFfyy0.js → RestoreVersionDialog--SjTV0_4.js} +3 -3
  66. package/dist/cdn/chunks/{RestoreVersionDialog-vdRFfyy0.js.map → RestoreVersionDialog--SjTV0_4.js.map} +1 -1
  67. package/dist/cdn/chunks/{RichTextEditorContent-C1-5I8Df.js → RichTextEditorContent-CzdMJ1c9.js} +5 -5
  68. package/dist/cdn/chunks/{RichTextEditorContent-C1-5I8Df.js.map → RichTextEditorContent-CzdMJ1c9.js.map} +1 -1
  69. package/dist/cdn/chunks/{SaveBlockDialog-DWaeqcM8.js → SaveBlockDialog-CS1lqdsQ.js} +6 -6
  70. package/dist/cdn/chunks/{SaveBlockDialog-DWaeqcM8.js.map → SaveBlockDialog-CS1lqdsQ.js.map} +1 -1
  71. package/dist/cdn/chunks/{SavedBlocksBrowserModal-qC7UhW74.js → SavedBlocksBrowserModal-D6nDZ4rq.js} +6 -6
  72. package/dist/cdn/chunks/{SavedBlocksBrowserModal-qC7UhW74.js.map → SavedBlocksBrowserModal-D6nDZ4rq.js.map} +1 -1
  73. package/dist/cdn/chunks/{SavedBlocksPanels-BvtjtdsY.js → SavedBlocksPanels-DdkwvYRR.js} +2 -2
  74. package/dist/cdn/chunks/{SavedBlocksPanels-BvtjtdsY.js.map → SavedBlocksPanels-DdkwvYRR.js.map} +1 -1
  75. package/dist/cdn/chunks/{SavedBlocksPickBar-CxXjF3RN.js → SavedBlocksPickBar-BLQr_6WM.js} +3 -3
  76. package/dist/cdn/chunks/{SavedBlocksPickBar-CxXjF3RN.js.map → SavedBlocksPickBar-BLQr_6WM.js.map} +1 -1
  77. package/dist/cdn/chunks/{TemplateScoringPanel-CroWaWqy.js → TemplateScoringPanel-CDC-JC6C.js} +3 -3
  78. package/dist/cdn/chunks/{TemplateScoringPanel-CroWaWqy.js.map → TemplateScoringPanel-CDC-JC6C.js.map} +1 -1
  79. package/dist/cdn/chunks/{TestEmailModal-iWxAZRRq.js → TestEmailModal-B2LcU11Y.js} +7 -7
  80. package/dist/cdn/chunks/{TestEmailModal-iWxAZRRq.js.map → TestEmailModal-B2LcU11Y.js.map} +1 -1
  81. package/dist/cdn/chunks/{TestEmailPanel-CGUtEuwp.js → TestEmailPanel-ByqDSx8B.js} +2 -2
  82. package/dist/cdn/chunks/{TestEmailPanel-CGUtEuwp.js.map → TestEmailPanel-ByqDSx8B.js.map} +1 -1
  83. package/dist/cdn/chunks/{TitleEditor-DvXUW2j-.js → TitleEditor-DCoulgN8.js} +8 -8
  84. package/dist/cdn/chunks/{TitleEditor-DvXUW2j-.js.map → TitleEditor-DCoulgN8.js.map} +1 -1
  85. package/dist/cdn/chunks/{TplModal-X-qNoLGZ.js → TplModal-CxQDl-tN.js} +4 -4
  86. package/dist/cdn/chunks/{TplModal-X-qNoLGZ.js.map → TplModal-CxQDl-tN.js.map} +1 -1
  87. package/dist/cdn/chunks/{VersionHistoryMenu-yKzwxf7n.js → VersionHistoryMenu-BOy8aMB6.js} +3 -3
  88. package/dist/cdn/chunks/{VersionHistoryMenu-yKzwxf7n.js.map → VersionHistoryMenu-BOy8aMB6.js.map} +1 -1
  89. package/dist/cdn/chunks/{VersionHistoryPanels--hQaanjH.js → VersionHistoryPanels-BPLhzW9c.js} +2 -2
  90. package/dist/cdn/chunks/{VersionHistoryPanels--hQaanjH.js.map → VersionHistoryPanels-BPLhzW9c.js.map} +1 -1
  91. package/dist/cdn/chunks/{VersionPreviewBanner-DWU_SqMd.js → VersionPreviewBanner-CYC9qP2i.js} +2 -2
  92. package/dist/cdn/chunks/{VersionPreviewBanner-DWU_SqMd.js.map → VersionPreviewBanner-CYC9qP2i.js.map} +1 -1
  93. package/dist/cdn/chunks/{createCloudRuntime-DD6ppb71.js → createCloudRuntime-CbSqoOba.js} +2 -2
  94. package/dist/cdn/chunks/{createCloudRuntime-DD6ppb71.js.map → createCloudRuntime-CbSqoOba.js.map} +1 -1
  95. package/dist/cdn/chunks/{extensions-BUPHNpKD.js → extensions-CeP0iOPC.js} +3 -3
  96. package/dist/cdn/chunks/{extensions-BUPHNpKD.js.map → extensions-CeP0iOPC.js.map} +1 -1
  97. package/dist/cdn/chunks/keys-O8clwJ41.js +12 -0
  98. package/dist/cdn/chunks/keys-O8clwJ41.js.map +1 -0
  99. package/dist/cdn/chunks/{src-DtnvR_Hl.js → src-C1lP5sIe.js} +2 -2
  100. package/dist/cdn/chunks/{src-DtnvR_Hl.js.map → src-C1lP5sIe.js.map} +1 -1
  101. package/dist/cdn/chunks/src-CLoCCDfs.js.map +1 -1
  102. package/dist/cdn/chunks/{useCloudI18n-DbsLlCbZ.js → useCloudI18n-ZBEJvkf4.js} +2 -2
  103. package/dist/cdn/chunks/{useCloudI18n-DbsLlCbZ.js.map → useCloudI18n-ZBEJvkf4.js.map} +1 -1
  104. package/dist/cdn/chunks/{useEditorCore-ChlgO2GN.js → useEditorCore-CZxGbZmY.js} +426 -392
  105. package/dist/cdn/chunks/useEditorCore-CZxGbZmY.js.map +1 -0
  106. package/dist/cdn/chunks/{useEditorRoot-BlF1WPeu.js → useEditorRoot-DVV-EsNI.js} +2 -2
  107. package/dist/cdn/chunks/{useEditorRoot-BlF1WPeu.js.map → useEditorRoot-DVV-EsNI.js.map} +1 -1
  108. package/dist/cdn/chunks/{useI18n-BdxNNw6j.js → useI18n-DCbvHv6W.js} +2 -2
  109. package/dist/cdn/chunks/{useI18n-BdxNNw6j.js.map → useI18n-DCbvHv6W.js.map} +1 -1
  110. package/dist/cdn/chunks/{useMergeTag-CI2WUNrR.js → useMergeTag-CbuagYNK.js} +2 -2
  111. package/dist/cdn/chunks/{useMergeTag-CI2WUNrR.js.map → useMergeTag-CbuagYNK.js.map} +1 -1
  112. package/dist/cdn/chunks/{usePopoverPosition-Dw1nTSNx.js → usePopoverPosition-Ozg5iU3y.js} +2 -2
  113. package/dist/cdn/chunks/{usePopoverPosition-Dw1nTSNx.js.map → usePopoverPosition-Ozg5iU3y.js.map} +1 -1
  114. package/dist/cdn/chunks/{useScrollToBlock-BMis3-PR.js → useScrollToBlock-CrUCYsIc.js} +2 -2
  115. package/dist/cdn/chunks/{useScrollToBlock-BMis3-PR.js.map → useScrollToBlock-CrUCYsIc.js.map} +1 -1
  116. package/dist/cdn/editor.css +1 -1
  117. package/dist/cdn/editor.js +934 -880
  118. package/dist/cdn/editor.js.map +1 -1
  119. package/dist/{createCloudRuntime-zNcMjRgb.js → createCloudRuntime-j6a9Z-vL.js} +1 -1
  120. package/dist/{extensions-kOYwOh72.js → extensions-5xeZR9U9.js} +2 -2
  121. package/dist/index.d.ts +41 -0
  122. package/dist/keys-BJJ4hJ4z.js +10 -0
  123. package/dist/style.css +1 -1
  124. package/dist/templatical-editor.js +1282 -1228
  125. package/dist/{useCloudI18n-BlMajbKp.js → useCloudI18n-DaKcDMDz.js} +1 -1
  126. package/dist/{useEditorCore-CwQYCSXO.js → useEditorCore-BWrxHVKW.js} +840 -806
  127. package/dist/{useEditorRoot-C92q8uV-.js → useEditorRoot-E-oxHaEI.js} +1 -1
  128. package/dist/{useI18n-Ce_BRzYv.js → useI18n-DUVIAju4.js} +1 -1
  129. package/dist/{useMergeTag-CrXJ49lr.js → useMergeTag-CuZZeiSE.js} +1 -1
  130. package/dist/{usePopoverPosition-CPk7Twye.js → usePopoverPosition-APlWgXoQ.js} +1 -1
  131. package/dist/{useScrollToBlock-DvpMfWs2.js → useScrollToBlock--AzCOzlg.js} +1 -1
  132. package/package.json +7 -7
  133. package/dist/cdn/chunks/keys-BOn5i9jV.js +0 -12
  134. package/dist/cdn/chunks/keys-BOn5i9jV.js.map +0 -1
  135. package/dist/cdn/chunks/useEditorCore-ChlgO2GN.js.map +0 -1
  136. package/dist/keys-BOhFlHsv.js +0 -10
@@ -2,35 +2,35 @@ import { A as e, B as t, E as n, F as r, H as i, I as a, K as o, N as s, P as c,
2
2
  import { A as ee, B as te, C as ne, D as re, E as ie, F as ae, I as oe, L as H, M as se, N as ce, O as le, P as ue, R as de, S as fe, T as pe, U as me, V as he, _ as ge, a as _e, b as ve, d as ye, f as be, g as xe, h as Se, i as U, j as Ce, k as we, l as Te, m as Ee, n as De, nt as Oe, o as ke, p as Ae, r as je, rt as Me, s as Ne, t as W, tt as Pe, u as Fe, w as Ie, z as Le } from "./src-CLoCCDfs.js";
3
3
  import { _ as Re, h as ze, v as Be, y as Ve } from "./dist-BW6Y49zE.js";
4
4
  import { a as G, c as He, i as Ue, r as We } from "./dist-CAFTQ6Y2.js";
5
- import { A as Ge, B as Ke, C as qe, D as Je, E as Ye, F as Xe, G as Ze, H as Qe, I as $e, M as et, N as tt, O as nt, P as rt, S as it, T as K, U as at, V as ot, W as q, _ as st, a as ct, b as lt, c as ut, d as dt, f as ft, g as pt, h as J, j as mt, k as ht, m as gt, n as _t, o as vt, p as yt, r as bt, s as xt, u as St, v as Ct, w as wt, x as Tt, y as Et, z as Dt } from "./keys-BOn5i9jV.js";
5
+ import { A as Ge, B as Ke, C as qe, D as Je, E as Ye, F as Xe, G as K, H as Ze, I as Qe, K as $e, M as et, N as tt, O as nt, P as rt, S as it, T as q, U as at, V as ot, W as st, _ as ct, a as lt, b as ut, c as dt, d as ft, f as pt, g as mt, h as J, j as ht, k as gt, m as _t, n as vt, o as yt, p as bt, r as xt, s as St, u as Ct, v as wt, w as Tt, x as Et, y as Dt, z as Ot } from "./keys-O8clwJ41.js";
6
6
  import "./timeouts-DHPZQ0G3.js";
7
- import { t as Y } from "./useI18n-BdxNNw6j.js";
7
+ import { t as Y } from "./useI18n-DCbvHv6W.js";
8
8
  import { t as X } from "./logger-ByvdoAwq.js";
9
- import { a as Ot, i as kt, o as At, r as Z, t as jt } from "./usePopoverPosition-Dw1nTSNx.js";
10
- import { A as Mt, Bt as Nt, Et as Pt, H as Ft, Ot as It, Tt as Lt, X as Rt, d as zt, ft as Bt, ht as Vt, it as Ht, o as Ut, s as Wt, tt as Gt, u as Kt, v as qt, vt as Jt, zt as Yt } from "./icons-SP5Itd-A.js";
11
- import { t as Xt } from "./LoadingTrack-Cm3TDKb3.js";
12
- import { t as Zt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
13
- import { t as Qt } from "./useEditorRoot-BlF1WPeu.js";
14
- import "./useCloudI18n-DbsLlCbZ.js";
15
- import { t as $t } from "./useMergeTag-CI2WUNrR.js";
16
- import { t as en } from "./useAliveFlag-CT9gjvO_.js";
9
+ import { a as kt, i as At, o as jt, r as Z, t as Mt } from "./usePopoverPosition-Ozg5iU3y.js";
10
+ import { A as Nt, Bt as Pt, Et as Ft, H as It, Ot as Lt, Tt as Rt, X as zt, d as Bt, ft as Vt, ht as Ht, it as Ut, o as Wt, s as Gt, tt as Kt, u as qt, v as Jt, vt as Yt, zt as Xt } from "./icons-SP5Itd-A.js";
11
+ import { t as Zt } from "./LoadingTrack-Cm3TDKb3.js";
12
+ import { t as Qt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
13
+ import { t as $t } from "./useEditorRoot-DVV-EsNI.js";
14
+ import "./useCloudI18n-ZBEJvkf4.js";
15
+ import { t as en } from "./useMergeTag-CbuagYNK.js";
16
+ import { t as tn } from "./useAliveFlag-CT9gjvO_.js";
17
17
  //#region ../core/src/error-reporting.ts
18
- function tn(e) {
18
+ function nn(e) {
19
19
  return e instanceof Error ? e : Error(String(e), { cause: e });
20
20
  }
21
- function nn(e, t) {
21
+ function rn(e, t) {
22
22
  try {
23
23
  t();
24
24
  } catch (t) {
25
- e?.(tn(t));
25
+ e?.(nn(t));
26
26
  }
27
27
  }
28
28
  //#endregion
29
29
  //#region ../core/src/editor.ts
30
- function rn(e) {
30
+ function an(e) {
31
31
  return e === "1" ? 1 : e === "3" ? 3 : 2;
32
32
  }
33
- function an(e) {
33
+ function on(e) {
34
34
  let t = m({
35
35
  template: null,
36
36
  content: e.content ?? de(e.defaultFontFamily, e.templateDefaults),
@@ -128,7 +128,7 @@ function an(e) {
128
128
  if (l(n)) return;
129
129
  let r = o(t.content.blocks, n);
130
130
  if (r && r.type === "section") {
131
- if (i < 0 || i >= rn(r.columns)) return;
131
+ if (i < 0 || i >= an(r.columns)) return;
132
132
  r.children[i] = r.children[i] || [];
133
133
  let t = r.children[i];
134
134
  a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
@@ -161,7 +161,7 @@ function an(e) {
161
161
  let d;
162
162
  if (i) {
163
163
  let e = o(t.content.blocks, i);
164
- if (!e || e.type !== "section" || a < 0 || a >= rn(e.columns)) return;
164
+ if (!e || e.type !== "section" || a < 0 || a >= an(e.columns)) return;
165
165
  e.children[a] = e.children[a] || [], d = e.children[a];
166
166
  } else d = t.content.blocks;
167
167
  let [f] = s.blocks.splice(u, 1);
@@ -174,7 +174,7 @@ function an(e) {
174
174
  throw new W(`[Templatical] Templates: ${e} ${t}`);
175
175
  }
176
176
  function D(t) {
177
- nn(e.onError, t);
177
+ rn(e.onError, t);
178
178
  }
179
179
  function O(t) {
180
180
  let { templates: n } = e;
@@ -274,9 +274,9 @@ function an(e) {
274
274
  }
275
275
  //#endregion
276
276
  //#region ../core/src/history.ts
277
- var on = 50, sn = 300, cn = 1500;
278
- function ln(e) {
279
- let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = on } = e, a = l([]), o = l([]), s = l(!1), c = null, u = null, d = p(() => a.value.length > 0), f = p(() => o.value.length > 0);
277
+ var sn = 50, cn = 300, ln = 1500;
278
+ function un(e) {
279
+ let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = sn } = e, a = l([]), o = l([]), s = l(!1), c = null, u = null, d = p(() => a.value.length > 0), f = p(() => o.value.length > 0);
280
280
  function m() {
281
281
  return ve(t.value);
282
282
  }
@@ -294,21 +294,21 @@ function ln(e) {
294
294
  if (u && u.blockId === e) {
295
295
  clearTimeout(u.timeoutId), u.timeoutId = setTimeout(() => {
296
296
  u = null;
297
- }, sn);
297
+ }, cn);
298
298
  return;
299
299
  }
300
300
  g(), h(m()), o.value = [], u = {
301
301
  blockId: e,
302
302
  timeoutId: setTimeout(() => {
303
303
  u = null;
304
- }, sn)
304
+ }, cn)
305
305
  };
306
306
  }
307
307
  }
308
308
  function y() {
309
309
  s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
310
310
  s.value = !1, c = null;
311
- }, cn);
311
+ }, ln);
312
312
  }
313
313
  function b() {
314
314
  if (a.value.length === 0) return;
@@ -342,7 +342,7 @@ function ln(e) {
342
342
  }
343
343
  //#endregion
344
344
  //#region ../core/src/block-actions.ts
345
- function un(e) {
345
+ function dn(e) {
346
346
  e.type === "table" ? e.rows = e.rows.map((e) => ({
347
347
  ...e,
348
348
  id: H(),
@@ -358,7 +358,7 @@ function un(e) {
358
358
  id: H()
359
359
  })));
360
360
  }
361
- function dn(e) {
361
+ function fn(e) {
362
362
  let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
363
363
  function o(n, r, a) {
364
364
  let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = fe(n, o);
@@ -366,9 +366,9 @@ function dn(e) {
366
366
  }
367
367
  function s(e, n, r) {
368
368
  let o = JSON.parse(JSON.stringify(e));
369
- if (o.id = H(), un(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
369
+ if (o.id = H(), dn(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
370
370
  let t = JSON.parse(JSON.stringify(e));
371
- return t.id = H(), un(t), t;
371
+ return t.id = H(), dn(t), t;
372
372
  }))), n !== void 0 || r !== void 0) t(o, n, r);
373
373
  else {
374
374
  let i = a?.(e.id) ?? null;
@@ -391,9 +391,9 @@ function dn(e) {
391
391
  }
392
392
  //#endregion
393
393
  //#region ../core/src/auto-save.ts
394
- var fn = 2e3;
395
- function pn(e) {
396
- let { content: t, isDirty: n, onChange: r, debounce: i = fn, enabled: a = !0 } = e, o = null, s = !1;
394
+ var pn = 2e3;
395
+ function mn(e) {
396
+ let { content: t, isDirty: n, onChange: r, debounce: i = pn, enabled: a = !0 } = e, o = null, s = !1;
397
397
  function c() {
398
398
  return typeof a == "function" ? a() : a;
399
399
  }
@@ -430,7 +430,7 @@ function pn(e) {
430
430
  }
431
431
  //#endregion
432
432
  //#region ../core/src/condition-preview.ts
433
- function mn(e) {
433
+ function hn(e) {
434
434
  let t = m(/* @__PURE__ */ new Set()), n = p(() => t.size > 0);
435
435
  function r(e) {
436
436
  return t.has(e);
@@ -450,7 +450,7 @@ function mn(e) {
450
450
  }
451
451
  //#endregion
452
452
  //#region ../core/src/data-source-fetch.ts
453
- function hn(e) {
453
+ function gn(e) {
454
454
  let t = l(!1), n = l(!1), r = p(() => !!e.definition.value?.dataSource), i = p(() => r.value && !e.block.value.dataSourceFetched);
455
455
  async function a() {
456
456
  let r = e.definition.value;
@@ -482,7 +482,7 @@ function hn(e) {
482
482
  }
483
483
  //#endregion
484
484
  //#region ../core/src/history-interceptor.ts
485
- function gn(e, t) {
485
+ function _n(e, t) {
486
486
  let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
487
487
  e.addBlock = (r, i, a, o) => {
488
488
  i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
@@ -498,7 +498,7 @@ function gn(e, t) {
498
498
  }
499
499
  //#endregion
500
500
  //#region ../core/src/saved-blocks.ts
501
- function _n(e) {
501
+ function vn(e) {
502
502
  let { provider: t } = e, n = l([]), r = l(!1), i = S(() => {
503
503
  let e = /* @__PURE__ */ new Set();
504
504
  for (let t of n.value) {
@@ -517,7 +517,7 @@ function _n(e) {
517
517
  throw new W(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
518
518
  }
519
519
  function f(t) {
520
- nn(e.onError, t);
520
+ rn(e.onError, t);
521
521
  }
522
522
  async function p(i) {
523
523
  r.value = !0;
@@ -586,9 +586,9 @@ function _n(e) {
586
586
  }
587
587
  //#endregion
588
588
  //#region ../core/src/saved-blocks-local.ts
589
- var vn = "templatical:saved-blocks";
590
- function yn(e = {}) {
591
- let t = e.key ?? vn;
589
+ var yn = "templatical:saved-blocks";
590
+ function bn(e = {}) {
591
+ let t = e.key ?? yn;
592
592
  function n() {
593
593
  if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageSavedBlocksProvider requires a browser environment with localStorage. Supply your own SavedBlocksProvider for server-side or non-browser use.");
594
594
  return localStorage;
@@ -641,7 +641,7 @@ function yn(e = {}) {
641
641
  }
642
642
  //#endregion
643
643
  //#region ../core/src/version-history.ts
644
- function bn(e) {
644
+ function xn(e) {
645
645
  let { provider: t, getTemplateId: n } = e, r = l([]), i = l(!1), a = l(void 0), o = l(!1), s = /* @__PURE__ */ new Map(), c = S(() => typeof t.create == "function"), u = S(() => typeof t.restore == "function");
646
646
  function d(e) {
647
647
  let t = n();
@@ -652,7 +652,7 @@ function bn(e) {
652
652
  throw new W(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
653
653
  }
654
654
  function p(t) {
655
- nn(e.onError, t);
655
+ rn(e.onError, t);
656
656
  }
657
657
  async function m(n) {
658
658
  let o = d("list");
@@ -721,7 +721,7 @@ function bn(e) {
721
721
  }
722
722
  //#endregion
723
723
  //#region ../core/src/comments.ts
724
- function xn(e) {
724
+ function Sn(e) {
725
725
  let { provider: t, getTemplateId: n, getUser: r } = e, i = l([]), a = l(!1), o = l(!1), s = S(() => typeof t.create == "function"), c = S(() => typeof t.update == "function"), u = S(() => typeof t.delete == "function"), d = S(() => typeof t.setResolved == "function"), f = S(() => i.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), p = S(() => i.value.filter((e) => !e.resolvedAt).length), m = S(() => {
726
726
  let e = /* @__PURE__ */ new Map();
727
727
  for (let t of i.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
@@ -752,11 +752,11 @@ function xn(e) {
752
752
  return t !== null && e.author.id === t.id;
753
753
  }
754
754
  function b(t) {
755
- let n = tn(t);
755
+ let n = nn(t);
756
756
  throw e.onError?.(n), n;
757
757
  }
758
758
  function x(t) {
759
- nn(e.onError, t);
759
+ rn(e.onError, t);
760
760
  }
761
761
  function C(e, t, n) {
762
762
  return [
@@ -896,7 +896,7 @@ function xn(e) {
896
896
  applyRemoteDelete: P
897
897
  };
898
898
  }
899
- function Sn(e) {
899
+ function Cn(e) {
900
900
  let { comments: n, provider: r, getTemplateId: i } = e, { subscribe: a } = r;
901
901
  if (typeof a != "function") return;
902
902
  let o = null;
@@ -919,18 +919,18 @@ function Sn(e) {
919
919
  }
920
920
  //#endregion
921
921
  //#region src/utils/activeEditorTracker.ts
922
- var Cn = /* @__PURE__ */ new Set(), Q = 0, wn = 0;
923
- function Tn() {
924
- let e = ++wn;
925
- return Cn.add(e), Q === 0 && (Q = e), {
922
+ var wn = /* @__PURE__ */ new Set(), Q = 0, Tn = 0;
923
+ function En() {
924
+ let e = ++Tn;
925
+ return wn.add(e), Q === 0 && (Q = e), {
926
926
  id: e,
927
- isActive: () => Cn.size <= 1 || Q === e,
927
+ isActive: () => wn.size <= 1 || Q === e,
928
928
  claim: () => {
929
929
  Q = e;
930
930
  },
931
931
  dispose: () => {
932
- if (Cn.delete(e), Q === e) {
933
- let e = Array.from(Cn);
932
+ if (wn.delete(e), Q === e) {
933
+ let e = Array.from(wn);
934
934
  Q = e[e.length - 1] ?? 0;
935
935
  }
936
936
  }
@@ -938,8 +938,8 @@ function Tn() {
938
938
  }
939
939
  //#endregion
940
940
  //#region src/composables/usePreviewResolution.ts
941
- var En = 500;
942
- function Dn(e) {
941
+ var Dn = 500;
942
+ function On(e) {
943
943
  let n = typeof e.resolvePreview == "function", r = l(null), i = l(!1), a = l(!1), o = 0, s = null;
944
944
  function c() {
945
945
  s !== null && (clearTimeout(s), s = null);
@@ -976,7 +976,7 @@ function Dn(e) {
976
976
  }
977
977
  s = setTimeout(() => {
978
978
  s = null, u();
979
- }, En);
979
+ }, Dn);
980
980
  }
981
981
  }
982
982
  return t(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
@@ -998,7 +998,7 @@ function Dn(e) {
998
998
  }
999
999
  //#endregion
1000
1000
  //#region src/composables/useImageUrlResolver.ts
1001
- function On(e) {
1001
+ function kn(e) {
1002
1002
  let t = m(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
1003
1003
  function r(e) {
1004
1004
  return t.get(e);
@@ -1031,8 +1031,8 @@ function On(e) {
1031
1031
  lookup: a
1032
1032
  };
1033
1033
  }
1034
- function kn(e) {
1035
- let r = n(lt, null), i = S(e);
1034
+ function An(e) {
1035
+ let r = n(ut, null), i = S(e);
1036
1036
  if (!r) return i;
1037
1037
  let a;
1038
1038
  function s() {
@@ -1061,7 +1061,7 @@ function kn(e) {
1061
1061
  }
1062
1062
  //#endregion
1063
1063
  //#region src/composables/useMergeTagPicker.ts
1064
- function An() {
1064
+ function jn() {
1065
1065
  let e = l(!1), t = l([]), n = null;
1066
1066
  function r(r) {
1067
1067
  if (n) {
@@ -1091,7 +1091,7 @@ function An() {
1091
1091
  }
1092
1092
  //#endregion
1093
1093
  //#region src/composables/useLogicTagPicker.ts
1094
- function jn() {
1094
+ function Mn() {
1095
1095
  let e = l(!1), t = l([]), n = l([]), r = null;
1096
1096
  function i(i, a) {
1097
1097
  if (r) {
@@ -1122,11 +1122,11 @@ function jn() {
1122
1122
  }
1123
1123
  //#endregion
1124
1124
  //#region src/composables/useTemplateLint.ts
1125
- function Mn(e) {
1125
+ function Nn(e) {
1126
1126
  return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
1127
1127
  }
1128
- function Nn(e) {
1129
- let n = l([]), r = l(!1), i = l(!1), a = x(null), o = Mn(e.options), s = null, c = !1;
1128
+ function Pn(e) {
1129
+ let n = l([]), r = l(!1), i = l(!1), a = x(null), o = Nn(e.options), s = null, c = !1;
1130
1130
  o || u();
1131
1131
  async function u() {
1132
1132
  try {
@@ -1167,17 +1167,17 @@ function Nn(e) {
1167
1167
  }
1168
1168
  //#endregion
1169
1169
  //#region src/utils/blockTypeLabels.ts
1170
- function Pn(e, t) {
1170
+ function Fn(e, t) {
1171
1171
  return t.blocks[e] ?? e;
1172
1172
  }
1173
- function Fn(e, t, n = []) {
1174
- if (e.type !== "custom") return Pn(e.type, t);
1173
+ function In(e, t, n = []) {
1174
+ if (e.type !== "custom") return Fn(e.type, t);
1175
1175
  let { customType: r } = e;
1176
1176
  return n.find((e) => e.type === r)?.name ?? r;
1177
1177
  }
1178
1178
  //#endregion
1179
1179
  //#region src/composables/useKeyboardReorder.ts
1180
- function In(e, t, n = []) {
1180
+ function Ln(e, t, n = []) {
1181
1181
  let r = l(null), i = l(""), a = null;
1182
1182
  function o(t) {
1183
1183
  let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
@@ -1204,7 +1204,7 @@ function In(e, t, n = []) {
1204
1204
  let i = o(r);
1205
1205
  if (!i) return "";
1206
1206
  let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
1207
- return a ? Fn(a, t.t, n) : "";
1207
+ return a ? In(a, t.t, n) : "";
1208
1208
  }
1209
1209
  function c(t, n) {
1210
1210
  return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
@@ -1273,13 +1273,13 @@ function In(e, t, n = []) {
1273
1273
  }
1274
1274
  //#endregion
1275
1275
  //#region src/composables/useUiTheme.ts
1276
- function Ln(e) {
1276
+ function Rn(e) {
1277
1277
  let t = He("(prefers-color-scheme: dark)");
1278
1278
  return { resolvedTheme: S(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
1279
1279
  }
1280
1280
  //#endregion
1281
1281
  //#region src/composables/useThemeStyles.ts
1282
- var Rn = {
1282
+ var zn = {
1283
1283
  bg: "--tpl-bg",
1284
1284
  bgElevated: "--tpl-bg-elevated",
1285
1285
  bgHover: "--tpl-bg-hover",
@@ -1303,10 +1303,10 @@ var Rn = {
1303
1303
  dangerLight: "--tpl-danger-light",
1304
1304
  canvasBg: "--tpl-canvas-bg"
1305
1305
  };
1306
- function zn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
1306
+ function Bn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
1307
1307
  return { themeStyles: S(() => {
1308
1308
  let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
1309
- if (a) for (let [e, t] of Object.entries(Rn)) {
1309
+ if (a) for (let [e, t] of Object.entries(zn)) {
1310
1310
  let n = a[e];
1311
1311
  n && (r[t] = n);
1312
1312
  }
@@ -1315,7 +1315,7 @@ function zn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
1315
1315
  }
1316
1316
  //#endregion
1317
1317
  //#region src/composables/useBlockRegistry.ts
1318
- function Bn() {
1318
+ function Vn() {
1319
1319
  let e = x(/* @__PURE__ */ new Map());
1320
1320
  function t(t, n) {
1321
1321
  e.value.set(t, n), T(e);
@@ -1373,9 +1373,9 @@ function Bn() {
1373
1373
  }
1374
1374
  //#endregion
1375
1375
  //#region src/composables/useCustomBlockStylesheets.ts
1376
- function Vn(e, t) {
1376
+ function Hn(e, t) {
1377
1377
  return S(() => {
1378
- let n = Hn(e.value.blocks);
1378
+ let n = Un(e.value.blocks);
1379
1379
  if (n.size === 0) return [];
1380
1380
  let r = /* @__PURE__ */ new Set(), i = [];
1381
1381
  for (let e of n) {
@@ -1387,11 +1387,11 @@ function Vn(e, t) {
1387
1387
  return i;
1388
1388
  });
1389
1389
  }
1390
- function Hn(e) {
1390
+ function Un(e) {
1391
1391
  let t = /* @__PURE__ */ new Set();
1392
- return Un(e, t), t;
1392
+ return Wn(e, t), t;
1393
1393
  }
1394
- function Un(e, t) {
1394
+ function Wn(e, t) {
1395
1395
  for (let n of e) {
1396
1396
  if (me(n)) {
1397
1397
  t.add(n.customType);
@@ -1400,13 +1400,13 @@ function Un(e, t) {
1400
1400
  if (n.type === "section") {
1401
1401
  let e = n.children;
1402
1402
  if (!e) continue;
1403
- for (let n of e) Un(n, t);
1403
+ for (let n of e) Wn(n, t);
1404
1404
  }
1405
1405
  }
1406
1406
  }
1407
1407
  //#endregion
1408
1408
  //#region src/utils/registerBuiltInBlocks.ts
1409
- var Wn = [
1409
+ var Gn = [
1410
1410
  {
1411
1411
  type: "section",
1412
1412
  createBlock: Ce
@@ -1460,8 +1460,8 @@ var Wn = [
1460
1460
  createBlock: Ie
1461
1461
  }
1462
1462
  ];
1463
- function Gn(e, t) {
1464
- for (let n of Wn) {
1463
+ function Kn(e, t) {
1464
+ for (let n of Gn) {
1465
1465
  let r = t[n.type];
1466
1466
  r && e.registerBuiltIn(n.type, {
1467
1467
  component: r,
@@ -1471,23 +1471,55 @@ function Gn(e, t) {
1471
1471
  }
1472
1472
  //#endregion
1473
1473
  //#region src/utils/resolveHtmlBlockPreview.ts
1474
- function Kn(e) {
1474
+ function qn(e) {
1475
1475
  return typeof e == "boolean" ? e : e?.enabled ?? !1;
1476
1476
  }
1477
1477
  //#endregion
1478
+ //#region src/utils/templateSettingsFields.ts
1479
+ var Jn = {
1480
+ width: "layout",
1481
+ backgroundColor: "appearance",
1482
+ textColor: "appearance",
1483
+ linkColor: "appearance",
1484
+ linkUnderline: "appearance",
1485
+ fontFamily: "appearance",
1486
+ locale: "language",
1487
+ preheaderText: "preheader"
1488
+ }, Yn = Object.keys(Jn);
1489
+ function Xn(e) {
1490
+ return Object.prototype.hasOwnProperty.call(Jn, e);
1491
+ }
1492
+ function Zn(e) {
1493
+ let t = e?.fields;
1494
+ if (t === void 0 || t === !0) return {
1495
+ fields: new Set(Yn),
1496
+ unknown: []
1497
+ };
1498
+ if (t === !1) return {
1499
+ fields: /* @__PURE__ */ new Set(),
1500
+ unknown: []
1501
+ };
1502
+ let n = /* @__PURE__ */ new Set(), r = [];
1503
+ for (let e of t) Xn(e) ? n.add(e) : r.push(String(e));
1504
+ return {
1505
+ fields: n,
1506
+ unknown: r
1507
+ };
1508
+ }
1509
+ //#endregion
1478
1510
  //#region src/utils/collectOffPaletteDefaults.ts
1479
- function qn(e) {
1511
+ function Qn(e) {
1480
1512
  return typeof e == "object" && !!e && !Array.isArray(e);
1481
1513
  }
1482
- function Jn(e, t, n) {
1514
+ function $n(e, t, n) {
1483
1515
  let r = new Set(e.map((e) => Z(e))), i = [], a = (e, t) => {
1484
- for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Z(o)) && i.push(`${t}.${n}: ${o}`) : qn(o) && a(o, `${t}.${n}`);
1516
+ for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Z(o)) && i.push(`${t}.${n}: ${o}`) : Qn(o) && a(o, `${t}.${n}`);
1485
1517
  }, o = t;
1486
1518
  for (let [e, t] of Object.entries(Le)) {
1487
1519
  let n = o?.[e];
1488
1520
  a({
1489
1521
  ...t,
1490
- ...qn(n) ? n : {}
1522
+ ...Qn(n) ? n : {}
1491
1523
  }, e);
1492
1524
  }
1493
1525
  return a({
@@ -1497,7 +1529,7 @@ function Jn(e, t, n) {
1497
1529
  }
1498
1530
  //#endregion
1499
1531
  //#region src/utils/localizedBlockDefaults.ts
1500
- function Yn(e) {
1532
+ function er(e) {
1501
1533
  return {
1502
1534
  title: { content: `<p>${e.blockDefaults.title}</p>` },
1503
1535
  paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
@@ -1506,7 +1538,7 @@ function Yn(e) {
1506
1538
  }
1507
1539
  //#endregion
1508
1540
  //#region src/i18n/index.ts
1509
- var Xn = /* #__PURE__ */ Object.assign({
1541
+ var tr = /* #__PURE__ */ Object.assign({
1510
1542
  "./locales/ca.ts": () => import("./ca-C0hfqt4U.js"),
1511
1543
  "./locales/de.ts": () => import("./de-C6J2Iae8.js"),
1512
1544
  "./locales/en.ts": () => import("./en-BaUYOQi8.js"),
@@ -1514,50 +1546,50 @@ var Xn = /* #__PURE__ */ Object.assign({
1514
1546
  "./locales/fr.ts": () => import("./fr-L8DR73mK.js"),
1515
1547
  "./locales/nl.ts": () => import("./nl-GDWeuX18.js"),
1516
1548
  "./locales/pt-BR.ts": () => import("./pt-BR-B1AVVhWj.js")
1517
- }), Zn = /* #__PURE__ */ Object.assign({
1549
+ }), nr = /* #__PURE__ */ Object.assign({
1518
1550
  "./locales/cloud/de.ts": () => import("./de-BytZwgn6.js"),
1519
1551
  "./locales/cloud/en.ts": () => import("./en-DyOSV0lY.js"),
1520
1552
  "./locales/cloud/pt-BR.ts": () => import("./pt-BR-C1WLSGDh.js")
1521
1553
  });
1522
- function Qn(e) {
1554
+ function rr(e) {
1523
1555
  return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
1524
1556
  }
1525
- var $n = Qn(Xn), er = Qn(Zn);
1526
- function tr(e) {
1557
+ var ir = rr(tr), ar = rr(nr);
1558
+ function or(e) {
1527
1559
  return e.trim().replace(/_/g, "-").toLowerCase();
1528
1560
  }
1529
- function nr(e, t) {
1530
- let n = tr(e);
1531
- return t.find((e) => tr(e) === n);
1561
+ function sr(e, t) {
1562
+ let n = or(e);
1563
+ return t.find((e) => or(e) === n);
1532
1564
  }
1533
- function rr(e) {
1534
- return tr(e).split("-")[0];
1565
+ function cr(e) {
1566
+ return or(e).split("-")[0];
1535
1567
  }
1536
- function ir(e, t) {
1537
- return nr(e, t) ?? nr(rr(e), t);
1568
+ function lr(e, t) {
1569
+ return sr(e, t) ?? sr(cr(e), t);
1538
1570
  }
1539
- function ar(e, t) {
1540
- return ir(e, t) ?? "en";
1571
+ function ur(e, t) {
1572
+ return lr(e, t) ?? "en";
1541
1573
  }
1542
- async function or(e) {
1543
- let t = Xn[`./locales/${ar(e, $n)}.ts`];
1574
+ async function dr(e) {
1575
+ let t = tr[`./locales/${ur(e, ir)}.ts`];
1544
1576
  return (await t()).default;
1545
1577
  }
1546
- async function sr(e) {
1547
- let t = Zn[`./locales/cloud/${ar(e, er)}.ts`];
1578
+ async function fr(e) {
1579
+ let t = nr[`./locales/cloud/${ur(e, ar)}.ts`];
1548
1580
  return (await t()).default;
1549
1581
  }
1550
- function cr(e) {
1551
- return ir(e, $n) !== void 0;
1582
+ function pr(e) {
1583
+ return lr(e, ir) !== void 0;
1552
1584
  }
1553
- function lr(e) {
1554
- return ir(e, er) !== void 0;
1585
+ function mr(e) {
1586
+ return lr(e, ar) !== void 0;
1555
1587
  }
1556
- function ur() {
1557
- return [...$n];
1588
+ function hr() {
1589
+ return [...ir];
1558
1590
  }
1559
- function dr() {
1560
- return [...er];
1591
+ function gr() {
1592
+ return [...ar];
1561
1593
  }
1562
1594
  //#endregion
1563
1595
  //#region src/i18n/contentDefaults.ts
@@ -1618,16 +1650,16 @@ var $ = {
1618
1650
  seconds: "Segons",
1619
1651
  expired: "Aquesta oferta ha caducat"
1620
1652
  }
1621
- }, fr = new Map(Object.keys($).map((e) => [e.toLowerCase(), e]));
1622
- function pr(e) {
1653
+ }, _r = new Map(Object.keys($).map((e) => [e.toLowerCase(), e]));
1654
+ function vr(e) {
1623
1655
  if (!e) return $.en;
1624
- let t = e.trim().replace(/_/g, "-").toLowerCase(), n = fr.get(t);
1656
+ let t = e.trim().replace(/_/g, "-").toLowerCase(), n = _r.get(t);
1625
1657
  if (n) return $[n];
1626
- let r = fr.get(rr(t));
1658
+ let r = _r.get(cr(t));
1627
1659
  return r ? $[r] : $.en;
1628
1660
  }
1629
- function mr(e) {
1630
- let t = pr(e);
1661
+ function yr(e) {
1662
+ let t = vr(e);
1631
1663
  return {
1632
1664
  video: { alt: t.video },
1633
1665
  countdown: {
@@ -1641,8 +1673,8 @@ function mr(e) {
1641
1673
  }
1642
1674
  //#endregion
1643
1675
  //#region src/utils/resolveFieldColors.ts
1644
- function hr(e, t) {
1645
- let n = At({ presets: e.presets }, Ot), r = n.presets.length === 0;
1676
+ function br(e, t) {
1677
+ let n = jt({ presets: e.presets }, kt), r = n.presets.length === 0;
1646
1678
  return {
1647
1679
  presets: r ? t.presets : n.presets,
1648
1680
  allowCustom: t.allowCustom === !1 ? !1 : e.allowCustom ?? t.allowCustom,
@@ -1654,9 +1686,9 @@ function hr(e, t) {
1654
1686
  }
1655
1687
  //#endregion
1656
1688
  //#region src/utils/collectColorFieldIssues.ts
1657
- function gr(e, t) {
1689
+ function xr(e, t) {
1658
1690
  let n = [], r = (r, i) => {
1659
- let a = hr(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
1691
+ let a = br(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
1660
1692
  if (a.invalidPresets.length > 0 && n.push({
1661
1693
  id: s("invalid-presets"),
1662
1694
  message: `${o}: presets skipped invalid entries: ${a.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).` + (a.presetsInherited ? " No valid entries are left, so the field inherits colors.presets." : "")
@@ -1680,7 +1712,7 @@ function gr(e, t) {
1680
1712
  }
1681
1713
  //#endregion
1682
1714
  //#region src/utils/keyboardShortcuts.ts
1683
- function _r(e) {
1715
+ function Sr(e) {
1684
1716
  for (let t of e.composedPath()) {
1685
1717
  if (!(t instanceof HTMLElement)) continue;
1686
1718
  if (t.isContentEditable) return !0;
@@ -1689,18 +1721,18 @@ function _r(e) {
1689
1721
  }
1690
1722
  return !1;
1691
1723
  }
1692
- function vr(e, t) {
1724
+ function Cr(e, t) {
1693
1725
  let n = e.metaKey || e.ctrlKey;
1694
1726
  if (n && e.key.toLowerCase() === "s") {
1695
1727
  e.preventDefault(), t.onSave?.();
1696
1728
  return;
1697
1729
  }
1698
1730
  if (n && e.key.toLowerCase() === "z") {
1699
- if (_r(e)) return;
1731
+ if (Sr(e)) return;
1700
1732
  e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
1701
1733
  return;
1702
1734
  }
1703
- if (t.isPicking?.() && !_r(e)) {
1735
+ if (t.isPicking?.() && !Sr(e)) {
1704
1736
  if (e.key === "Escape") {
1705
1737
  e.preventDefault(), t.onCancelPick?.();
1706
1738
  return;
@@ -1718,11 +1750,11 @@ function vr(e, t) {
1718
1750
  t.selectBlock(null);
1719
1751
  return;
1720
1752
  }
1721
- (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !_r(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
1753
+ (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Sr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
1722
1754
  }
1723
1755
  //#endregion
1724
1756
  //#region src/utils/mergeTagLabelSegments.ts
1725
- function yr(e, t, n, r = !1) {
1757
+ function wr(e, t, n, r = !1) {
1726
1758
  if (!e) return [];
1727
1759
  let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
1728
1760
  for (; (s = i.exec(e)) !== null;) {
@@ -1756,20 +1788,20 @@ function yr(e, t, n, r = !1) {
1756
1788
  }
1757
1789
  //#endregion
1758
1790
  //#region src/components/MergeTagPreviewText.vue
1759
- var br = d({
1791
+ var Tr = d({
1760
1792
  name: "MergeTagPreviewText",
1761
1793
  props: { text: {
1762
1794
  type: String,
1763
1795
  required: !0
1764
1796
  } },
1765
1797
  setup(e) {
1766
- let t = n(K, []), r = n(ht, je.liquid), i = n(q, null), a = S(() => yr(e.text, t, r, i?.value ?? !1));
1798
+ let t = n(q, []), r = n(gt, je.liquid), i = n(K, null), a = S(() => wr(e.text, t, r, i?.value ?? !1));
1767
1799
  return () => a.value.map((e, t) => e.type === "tag" ? z("span", {
1768
1800
  key: t,
1769
1801
  class: "tpl-merge-tag-label"
1770
1802
  }, e.value) : e.value);
1771
1803
  }
1772
- }), xr = ["href"], Sr = /* @__PURE__ */ d({
1804
+ }), Er = ["href"], Dr = /* @__PURE__ */ d({
1773
1805
  __name: "ButtonBlock",
1774
1806
  props: {
1775
1807
  block: {},
@@ -1795,13 +1827,13 @@ var br = d({
1795
1827
  style: k(n.value),
1796
1828
  class: "tpl:cursor-default",
1797
1829
  onClick: i[0] ||= O(() => {}, ["prevent"])
1798
- }, [v(br, { text: e.block.text }, null, 8, ["text"])], 12, xr)], 4));
1830
+ }, [v(Tr, { text: e.block.text }, null, 8, ["text"])], 12, Er)], 4));
1799
1831
  }
1800
- }), Cr = ["innerHTML"], wr = [
1832
+ }), Or = ["innerHTML"], kr = [
1801
1833
  "src",
1802
1834
  "width",
1803
1835
  "height"
1804
- ], Tr = /* @__PURE__ */ d({
1836
+ ], Ar = /* @__PURE__ */ d({
1805
1837
  __name: "CustomBlockIcon",
1806
1838
  props: {
1807
1839
  icon: {},
@@ -1817,24 +1849,24 @@ var br = d({
1817
1849
  height: `${n.value}px`
1818
1850
  }),
1819
1851
  innerHTML: e.icon
1820
- }, null, 12, Cr)) : i.value ? (s(), C("img", {
1852
+ }, null, 12, Or)) : i.value ? (s(), C("img", {
1821
1853
  key: 1,
1822
1854
  src: e.icon,
1823
1855
  width: n.value,
1824
1856
  height: n.value,
1825
1857
  class: "tpl:inline-block",
1826
1858
  alt: ""
1827
- }, null, 8, wr)) : (s(), A(_(Yt), {
1859
+ }, null, 8, kr)) : (s(), A(_(Xt), {
1828
1860
  key: 2,
1829
1861
  size: n.value,
1830
1862
  "stroke-width": 1.5
1831
1863
  }, null, 8, ["size"]));
1832
1864
  }
1833
- }), Er = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
1834
- function Dr(e, n) {
1835
- let r = Qt(), i = null, a = null, o = null;
1865
+ }), jr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
1866
+ function Mr(e, n) {
1867
+ let r = $t(), i = null, a = null, o = null;
1836
1868
  function s() {
1837
- return e.value ? Array.from(e.value.querySelectorAll(Er)).filter((e) => e.offsetParent !== null) : [];
1869
+ return e.value ? Array.from(e.value.querySelectorAll(jr)).filter((e) => e.offsetParent !== null) : [];
1838
1870
  }
1839
1871
  function c(e) {
1840
1872
  if (e.key !== "Tab") return;
@@ -1864,7 +1896,7 @@ function Dr(e, n) {
1864
1896
  }
1865
1897
  //#endregion
1866
1898
  //#region src/composables/useEmoji.ts
1867
- function Or() {
1899
+ function Nr() {
1868
1900
  let [e, n] = Be(!1), r = x([]), i = !1;
1869
1901
  h(() => {
1870
1902
  i = !0;
@@ -1890,7 +1922,7 @@ function Or() {
1890
1922
  }
1891
1923
  //#endregion
1892
1924
  //#region src/composables/useFonts.ts
1893
- var kr = [
1925
+ var Pr = [
1894
1926
  {
1895
1927
  value: "Arial",
1896
1928
  label: "Arial"
@@ -1919,7 +1951,7 @@ var kr = [
1919
1951
  value: "Courier New",
1920
1952
  label: "Courier New"
1921
1953
  }
1922
- ], Ar = {
1954
+ ], Fr = {
1923
1955
  arial: "Arial, sans-serif",
1924
1956
  helvetica: "Helvetica, sans-serif",
1925
1957
  georgia: "Georgia, serif",
@@ -1927,23 +1959,23 @@ var kr = [
1927
1959
  verdana: "Verdana, sans-serif",
1928
1960
  "trebuchet ms": "'Trebuchet MS', sans-serif",
1929
1961
  "courier new": "'Courier New', monospace"
1930
- }, jr = "Arial, sans-serif";
1931
- function Mr(e) {
1932
- if (e === void 0 || e === !0) return [...kr];
1962
+ }, Ir = "Arial, sans-serif";
1963
+ function Lr(e) {
1964
+ if (e === void 0 || e === !0) return [...Pr];
1933
1965
  if (e === !1) return [];
1934
1966
  let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
1935
1967
  for (let i of e) {
1936
- let e = i.toLowerCase(), a = kr.find((t) => t.value.toLowerCase() === e);
1968
+ let e = i.toLowerCase(), a = Pr.find((t) => t.value.toLowerCase() === e);
1937
1969
  if (!a) {
1938
- r.has(e) || (r.add(e), X.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${kr.map((e) => e.value).join(", ")}.`));
1970
+ r.has(e) || (r.add(e), X.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Pr.map((e) => e.value).join(", ")}.`));
1939
1971
  continue;
1940
1972
  }
1941
1973
  n.has(a.value) || (n.add(a.value), t.push(a));
1942
1974
  }
1943
1975
  return t;
1944
1976
  }
1945
- function Nr(e) {
1946
- let t = l(e?.customFonts ?? []), n = l(!1), r = Mr(e?.builtIns), i = S(() => e?.defaultFallback ?? jr), a = S(() => {
1977
+ function Rr(e) {
1978
+ let t = l(e?.customFonts ?? []), n = l(!1), r = Lr(e?.builtIns), i = S(() => e?.defaultFallback ?? Ir), a = S(() => {
1947
1979
  let e = [...r], n = t.value.map((e) => ({
1948
1980
  value: e.name,
1949
1981
  label: e.name,
@@ -1954,20 +1986,20 @@ function Nr(e) {
1954
1986
  function s(e) {
1955
1987
  return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1956
1988
  }
1957
- let c = e?.defaultFont ?? jr.split(",")[0].trim();
1989
+ let c = e?.defaultFont ?? Ir.split(",")[0].trim();
1958
1990
  s(c) || X.warn(`config.fonts: new templates seed "${c}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
1959
1991
  function u() {
1960
1992
  if (e?.defaultFont && s(e.defaultFont)) {
1961
1993
  let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
1962
1994
  if (t) return t.value;
1963
1995
  }
1964
- return jr;
1996
+ return Ir;
1965
1997
  }
1966
1998
  let d = S(() => u());
1967
1999
  function f(e) {
1968
2000
  if (!e) return i.value;
1969
2001
  let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
1970
- return n ? `'${n.name}', ${n.fallback ?? i.value}` : Ar[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
2002
+ return n ? `'${n.name}', ${n.fallback ?? i.value}` : Fr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
1971
2003
  }
1972
2004
  let p = [], m = !1;
1973
2005
  async function g() {
@@ -2008,8 +2040,8 @@ function Nr(e) {
2008
2040
  }
2009
2041
  //#endregion
2010
2042
  //#region src/composables/useLogicTag.ts
2011
- function Pr() {
2012
- let e = n(qe, []), t = n(it, []), r = n(ht, je.liquid), i = n(Ge, null), a = n(wt, null), o = l(!1), s = !!i || e.length > 0 || t.length > 0, c = e.length > 0 || t.length > 0;
2043
+ function zr() {
2044
+ let e = n(qe, []), t = n(it, []), r = n(gt, je.liquid), i = n(Ge, null), a = n(Tt, null), o = l(!1), s = !!i || e.length > 0 || t.length > 0, c = e.length > 0 || t.length > 0;
2013
2045
  async function u() {
2014
2046
  if (i) {
2015
2047
  o.value = !0;
@@ -2040,7 +2072,7 @@ function Pr() {
2040
2072
  }
2041
2073
  //#endregion
2042
2074
  //#region src/utils/mergeTagNodeSpec.ts
2043
- function Fr(e, t, n) {
2075
+ function Br(e, t, n) {
2044
2076
  return ye(e, n) ? {
2045
2077
  type: "logicMergeTagNode",
2046
2078
  attrs: {
@@ -2057,15 +2089,15 @@ function Fr(e, t, n) {
2057
2089
  }
2058
2090
  //#endregion
2059
2091
  //#region src/utils/insertLogicTag.ts
2060
- function Ir(e) {
2092
+ function Vr(e) {
2061
2093
  return "before" in e && "after" in e;
2062
2094
  }
2063
- function Lr(e, t, n) {
2064
- if (!Ir(t)) {
2065
- e.chain().focus().insertContent(Fr(t.value, t.label, n)).run();
2095
+ function Hr(e, t, n) {
2096
+ if (!Vr(t)) {
2097
+ e.chain().focus().insertContent(Br(t.value, t.label, n)).run();
2066
2098
  return;
2067
2099
  }
2068
- let r = Fr(t.before, t.label, n), i = Fr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
2100
+ let r = Br(t.before, t.label, n), i = Br(t.after, t.label, n), { from: a, to: o } = e.state.selection;
2069
2101
  if (a !== o) {
2070
2102
  e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
2071
2103
  return;
@@ -2074,20 +2106,20 @@ function Lr(e, t, n) {
2074
2106
  }
2075
2107
  //#endregion
2076
2108
  //#region src/utils/linkColorExtension.ts
2077
- function Rr(e) {
2109
+ function Ur(e) {
2078
2110
  if (!e) return null;
2079
2111
  let t = e.trim();
2080
2112
  return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
2081
2113
  }
2082
- function zr(e) {
2114
+ function Wr(e) {
2083
2115
  return e.extend({ addAttributes() {
2084
2116
  return {
2085
2117
  ...this.parent?.(),
2086
2118
  color: {
2087
2119
  default: null,
2088
- parseHTML: (e) => Rr(kt(e.style.color)),
2120
+ parseHTML: (e) => Ur(At(e.style.color)),
2089
2121
  renderHTML: (e) => {
2090
- let t = Rr(e.color);
2122
+ let t = Ur(e.color);
2091
2123
  return t ? { style: `color: ${t}` } : {};
2092
2124
  }
2093
2125
  }
@@ -2096,9 +2128,9 @@ function zr(e) {
2096
2128
  }
2097
2129
  //#endregion
2098
2130
  //#region src/composables/useRichTextLinkDialog.ts
2099
- function Br(e) {
2131
+ function Gr(e) {
2100
2132
  let t = l(!1), n = l(""), r = l(""), i = l(null);
2101
- Dr(i, t);
2133
+ Mr(i, t);
2102
2134
  function a() {
2103
2135
  let i = e.value?.getAttributes("link") ?? {};
2104
2136
  n.value = i.href || "", r.value = i.color || "", t.value = !0;
@@ -2107,7 +2139,7 @@ function Br(e) {
2107
2139
  if (n.value) {
2108
2140
  let t = c(n.value);
2109
2141
  if (t !== null) {
2110
- let n = Rr(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
2142
+ let n = Ur(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
2111
2143
  n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
2112
2144
  }
2113
2145
  }
@@ -2154,8 +2186,8 @@ function Br(e) {
2154
2186
  }
2155
2187
  //#endregion
2156
2188
  //#region src/composables/useRichTextEditor.ts
2157
- function Vr(r) {
2158
- let i = n(J, null), { mergeTags: a, canRequestMergeTag: o, isRequesting: s, requestMergeTag: c, syntax: u, autocomplete: d } = $t(), { canInsertLogicTag: f, isRequesting: p, requestLogicTag: m } = Pr(), h = n(ot, null), g = (N(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", _ = Te(u), v = x(null), { showLinkDialog: y, linkUrl: b, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: E, closeLinkDialog: D, handleLinkKeydown: O } = Br(v), { start: k, stop: A } = Re(() => v.value?.commands.focus("end"), 0, { immediate: !1 }), j = x(null), M = l(!0), P = l(null), F = !1;
2189
+ function Kr(r) {
2190
+ let i = n(J, null), { mergeTags: a, canRequestMergeTag: o, isRequesting: s, requestMergeTag: c, syntax: u, autocomplete: d } = en(), { canInsertLogicTag: f, isRequesting: p, requestLogicTag: m } = zr(), h = n(Ze, null), g = (N(h) ? h.value : h)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", _ = Te(u), v = x(null), { showLinkDialog: y, linkUrl: b, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: E, closeLinkDialog: D, handleLinkKeydown: O } = Gr(v), { start: k, stop: A } = Re(() => v.value?.commands.focus("end"), 0, { immediate: !1 }), j = x(null), M = l(!0), P = l(null), F = !1;
2159
2191
  async function I() {
2160
2192
  P.value = null, M.value = !0;
2161
2193
  try {
@@ -2215,7 +2247,7 @@ function Vr(r) {
2215
2247
  }
2216
2248
  async function V() {
2217
2249
  let e = await m();
2218
- F || (e && v.value ? Lr(v.value, e, u) : v.value?.commands.focus());
2250
+ F || (e && v.value ? Hr(v.value, e, u) : v.value?.commands.focus());
2219
2251
  }
2220
2252
  return {
2221
2253
  editor: v,
@@ -2244,9 +2276,9 @@ function Vr(r) {
2244
2276
  }
2245
2277
  //#endregion
2246
2278
  //#region src/composables/useSmallScreenNotice.ts
2247
- var Hr = "(max-width: 767px)";
2248
- function Ur(e) {
2249
- let t = He(Hr);
2279
+ var qr = "(max-width: 767px)";
2280
+ function Jr(e) {
2281
+ let t = He(qr);
2250
2282
  return {
2251
2283
  isSmallScreen: t,
2252
2284
  showNotice: S(() => (P(e) ?? !0) && t.value)
@@ -2254,20 +2286,20 @@ function Ur(e) {
2254
2286
  }
2255
2287
  //#endregion
2256
2288
  //#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
2257
- var Wr = { class: "tpl:w-full" }, Gr = {
2289
+ var Yr = { class: "tpl:w-full" }, Xr = {
2258
2290
  key: 0,
2259
2291
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
2260
- }, Kr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, qr = {
2292
+ }, Zr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Qr = {
2261
2293
  key: 1,
2262
2294
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
2263
- }, Jr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Yr = {
2295
+ }, $r = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ei = {
2264
2296
  key: 2,
2265
2297
  class: "tpl:relative"
2266
- }, Xr = ["innerHTML"], Zr = {
2298
+ }, ti = ["innerHTML"], ni = {
2267
2299
  key: 0,
2268
2300
  class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
2269
2301
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
2270
- }, Qr = /* @__PURE__ */ d({
2302
+ }, ri = /* @__PURE__ */ d({
2271
2303
  __name: "CustomBlock",
2272
2304
  props: {
2273
2305
  block: {},
@@ -2275,7 +2307,7 @@ var Wr = { class: "tpl:w-full" }, Gr = {
2275
2307
  },
2276
2308
  emits: ["fetchData"],
2277
2309
  setup(e, { emit: r }) {
2278
- let i = e, a = r, { t: o } = Y(), c = n(xt, null), u = l(""), d = l(!1), f = S(() => c?.getDefinition(i.block.customType)), p = S(() => !!f.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: y } = hn({
2310
+ let i = e, a = r, { t: o } = Y(), c = n(St, null), u = l(""), d = l(!1), f = S(() => c?.getDefinition(i.block.customType)), p = S(() => !!f.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: y } = gn({
2279
2311
  definition: f,
2280
2312
  block: S(() => i.block),
2281
2313
  onUpdate: (e, t) => {
@@ -2284,7 +2316,7 @@ var Wr = { class: "tpl:w-full" }, Gr = {
2284
2316
  dataSourceFetched: t
2285
2317
  });
2286
2318
  }
2287
- }), b = n(K, []), x = n(q, null), T = S(() => {
2319
+ }), b = n(q, []), x = n(K, null), T = S(() => {
2288
2320
  if (!x?.value) return i.block;
2289
2321
  let e = {};
2290
2322
  for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ? ge(n, b) : n;
@@ -2311,10 +2343,10 @@ var Wr = { class: "tpl:w-full" }, Gr = {
2311
2343
  k();
2312
2344
  }, { deep: !0 }), t(() => x?.value, () => {
2313
2345
  k();
2314
- }), (e, t) => (s(), C("div", Wr, [p.value ? d.value ? (s(), C("div", qr, [v(_(Kt), {
2346
+ }), (e, t) => (s(), C("div", Yr, [p.value ? d.value ? (s(), C("div", Qr, [v(_(qt), {
2315
2347
  size: 24,
2316
2348
  class: "tpl:text-[var(--tpl-danger)]"
2317
- }), M("span", Jr, R(_(o).customBlocks.renderError), 1)])) : (s(), C("div", Yr, [M("div", { innerHTML: u.value }, null, 8, Xr), _(y) && _(g) ? (s(), C("div", Zr, [_(m) ? (s(), A(Xt, {
2349
+ }), M("span", $r, R(_(o).customBlocks.renderError), 1)])) : (s(), C("div", ei, [M("div", { innerHTML: u.value }, null, 8, ti), _(y) && _(g) ? (s(), C("div", ni, [_(m) ? (s(), A(Zt, {
2318
2350
  key: 1,
2319
2351
  class: "tpl:w-48"
2320
2352
  })) : (s(), C("button", {
@@ -2322,16 +2354,16 @@ var Wr = { class: "tpl:w-full" }, Gr = {
2322
2354
  type: "button",
2323
2355
  class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-[var(--tpl-shadow)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:shadow-[var(--tpl-shadow-md)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
2324
2356
  onClick: t[0] ||= O((...e) => _(h) && _(h)(...e), ["stop"])
2325
- }, [f.value?.icon ? (s(), A(Tr, {
2357
+ }, [f.value?.icon ? (s(), A(Ar, {
2326
2358
  key: 0,
2327
2359
  icon: f.value.icon,
2328
2360
  size: 16
2329
- }, null, 8, ["icon"])) : w("", !0), V(" " + R(f.value?.dataSource?.label || _(o).customBlocks.dataSource.fetchButton), 1)]))])) : w("", !0)])) : (s(), C("div", Gr, [v(_(Ft), {
2361
+ }, null, 8, ["icon"])) : w("", !0), V(" " + R(f.value?.dataSource?.label || _(o).customBlocks.dataSource.fetchButton), 1)]))])) : w("", !0)])) : (s(), C("div", Xr, [v(_(It), {
2330
2362
  size: 24,
2331
2363
  class: "tpl:text-[var(--tpl-warning)]"
2332
- }), M("span", Kr, R(_(o).customBlocks.definitionNotFound), 1)]))]));
2364
+ }), M("span", Zr, R(_(o).customBlocks.definitionNotFound), 1)]))]));
2333
2365
  }
2334
- }), $r = { class: "tpl:w-full" }, ei = /* @__PURE__ */ d({
2366
+ }), ii = { class: "tpl:w-full" }, ai = /* @__PURE__ */ d({
2335
2367
  __name: "DividerBlock",
2336
2368
  props: {
2337
2369
  block: {},
@@ -2343,28 +2375,28 @@ var Wr = { class: "tpl:w-full" }, Gr = {
2343
2375
  width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
2344
2376
  margin: t.block.width === "full" ? "0" : "0 auto"
2345
2377
  }));
2346
- return (e, t) => (s(), C("div", $r, [M("hr", {
2378
+ return (e, t) => (s(), C("div", ii, [M("hr", {
2347
2379
  class: "tpl:m-0 tpl:border-none",
2348
2380
  style: k(n.value)
2349
2381
  }, null, 4)]));
2350
2382
  }
2351
- }), ti = { class: "tpl:w-full" }, ni = ["srcdoc", "title"], ri = {
2383
+ }), oi = { class: "tpl:w-full" }, si = ["srcdoc", "title"], ci = {
2352
2384
  key: 1,
2353
2385
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
2354
- }, ii = {
2386
+ }, li = {
2355
2387
  key: 0,
2356
2388
  class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
2357
- }, ai = {
2389
+ }, ui = {
2358
2390
  key: 1,
2359
2391
  class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
2360
- }, oi = /* @__PURE__ */ d({
2392
+ }, di = /* @__PURE__ */ d({
2361
2393
  __name: "HtmlBlock",
2362
2394
  props: {
2363
2395
  block: {},
2364
2396
  viewport: {}
2365
2397
  },
2366
2398
  setup(r) {
2367
- let i = r, { t: a } = Y(), o = n(Et, !1), c = S(() => i.block.content.trim().length > 0), u = S(() => o && c.value), d = n(K, []), f = n(q, null), p = S(() => f?.value ? ge(i.block.content, d) : i.block.content), m = l(null), h = l(60), g = null;
2399
+ let i = r, { t: a } = Y(), o = n(Dt, !1), c = S(() => i.block.content.trim().length > 0), u = S(() => o && c.value), d = n(q, []), f = n(K, null), p = S(() => f?.value ? ge(i.block.content, d) : i.block.content), m = l(null), h = l(60), g = null;
2368
2400
  function y() {
2369
2401
  let e = m.value?.contentDocument;
2370
2402
  e && (h.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
@@ -2378,7 +2410,7 @@ var Wr = { class: "tpl:w-full" }, Gr = {
2378
2410
  e || (g?.disconnect(), g = null);
2379
2411
  }), e(() => {
2380
2412
  g?.disconnect(), g = null;
2381
- }), (e, t) => (s(), C("div", ti, [u.value ? (s(), C("iframe", {
2413
+ }), (e, t) => (s(), C("div", oi, [u.value ? (s(), C("iframe", {
2382
2414
  key: 0,
2383
2415
  ref_key: "iframeRef",
2384
2416
  ref: m,
@@ -2388,18 +2420,18 @@ var Wr = { class: "tpl:w-full" }, Gr = {
2388
2420
  class: "tpl:block tpl:w-full tpl:border-0",
2389
2421
  style: k({ height: `${h.value}px` }),
2390
2422
  onLoad: b
2391
- }, null, 44, ni)) : (s(), C("div", ri, [v(_(It), {
2423
+ }, null, 44, si)) : (s(), C("div", ci, [v(_(Lt), {
2392
2424
  size: 24,
2393
2425
  class: "tpl:text-[var(--tpl-text-dim)]"
2394
- }), c.value ? (s(), C("span", ii, R(_(a).html.preview), 1)) : (s(), C("span", ai, R(_(a).html.empty), 1))]))]));
2426
+ }), c.value ? (s(), C("span", li, R(_(a).html.preview), 1)) : (s(), C("span", ui, R(_(a).html.empty), 1))]))]));
2395
2427
  }
2396
- }), si = "image/";
2397
- function ci(e) {
2428
+ }), fi = "image/";
2429
+ function pi(e) {
2398
2430
  let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || P(r), { isOverDropZone: a } = We(t, {
2399
2431
  preventDefaultForUnhandled: !0,
2400
2432
  onDrop: (e) => {
2401
2433
  if (!i()) return;
2402
- let t = (e ?? []).filter((e) => e.type.startsWith(si));
2434
+ let t = (e ?? []).filter((e) => e.type.startsWith(fi));
2403
2435
  t.length > 0 && n([t[0]]);
2404
2436
  }
2405
2437
  });
@@ -2407,17 +2439,17 @@ function ci(e) {
2407
2439
  }
2408
2440
  //#endregion
2409
2441
  //#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
2410
- var li = {
2442
+ var mi = {
2411
2443
  key: 0,
2412
2444
  class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
2413
2445
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
2414
- }, ui = ["href"], di = ["src", "alt"], fi = ["src", "alt"], pi = {
2446
+ }, hi = ["href"], gi = ["src", "alt"], _i = ["src", "alt"], vi = {
2415
2447
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
2416
2448
  style: { opacity: "0.7" }
2417
- }, mi = ["href"], hi = ["src", "alt"], gi = ["src", "alt"], _i = {
2449
+ }, yi = ["href"], bi = ["src", "alt"], xi = ["src", "alt"], Si = {
2418
2450
  key: 4,
2419
2451
  class: "tpl:flex tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
2420
- }, vi = ["aria-label"], yi = { key: 1 }, bi = /* @__PURE__ */ d({
2452
+ }, Ci = ["aria-label"], wi = { key: 1 }, Ti = /* @__PURE__ */ d({
2421
2453
  __name: "ImageBlock",
2422
2454
  props: {
2423
2455
  block: {},
@@ -2425,7 +2457,7 @@ var li = {
2425
2457
  },
2426
2458
  emits: ["update"],
2427
2459
  setup(e, { emit: t }) {
2428
- let r = e, i = t, { t: a } = Y(), { syntax: o } = $t(), c = n(mt, null), u = S(() => !!c), d = en();
2460
+ let r = e, i = t, { t: a } = Y(), { syntax: o } = en(), c = n(ht, null), u = S(() => !!c), d = tn();
2429
2461
  async function f() {
2430
2462
  let e = await c?.({ accept: ["images"] });
2431
2463
  if (d.alive && e) {
@@ -2452,7 +2484,7 @@ var li = {
2452
2484
  }
2453
2485
  }
2454
2486
  }
2455
- let { isOver: y } = ci({
2487
+ let { isOver: y } = pi({
2456
2488
  target: p,
2457
2489
  enabled: h,
2458
2490
  onFiles: g
@@ -2467,18 +2499,18 @@ var li = {
2467
2499
  marginLeft: e === "center" || e === "right" ? "auto" : void 0,
2468
2500
  marginRight: e === "center" ? "auto" : void 0
2469
2501
  };
2470
- }), T = S(() => U(r.block.src, o)), E = kn(() => T.value ? void 0 : r.block.src), D = kn(() => T.value ? r.block.placeholderUrl : void 0);
2502
+ }), T = S(() => U(r.block.src, o)), E = An(() => T.value ? void 0 : r.block.src), D = An(() => T.value ? r.block.placeholderUrl : void 0);
2471
2503
  return (t, n) => (s(), C("div", {
2472
2504
  ref_key: "dropZoneRef",
2473
2505
  ref: p,
2474
2506
  "data-testid": "image-drop-zone",
2475
2507
  class: "tpl:relative tpl:w-full",
2476
2508
  style: k(b.value)
2477
- }, [h.value && (_(y) || m.value) ? (s(), C("div", li, [m.value ? (s(), C(L, { key: 0 }, [v(_(Ht), {
2509
+ }, [h.value && (_(y) || m.value) ? (s(), C("div", mi, [m.value ? (s(), C(L, { key: 0 }, [v(_(Ut), {
2478
2510
  class: "tpl-spinner",
2479
2511
  size: 20,
2480
2512
  "stroke-width": 2
2481
- }), V(" " + R(_(a).image.uploading), 1)], 64)) : (s(), C(L, { key: 1 }, [v(_(Wt), {
2513
+ }), V(" " + R(_(a).image.uploading), 1)], 64)) : (s(), C(L, { key: 1 }, [v(_(Gt), {
2482
2514
  size: 20,
2483
2515
  "stroke-width": 1.5
2484
2516
  }), V(" " + R(_(a).image.dropToUpload), 1)], 64))])) : w("", !0), e.block.src && T.value && e.block.placeholderUrl ? (s(), C(L, { key: 1 }, [e.block.linkUrl ? (s(), C("a", {
@@ -2493,22 +2525,22 @@ var li = {
2493
2525
  src: _(D),
2494
2526
  alt: e.block.alt || _(a).image.altTextPlaceholder,
2495
2527
  style: k(x.value)
2496
- }, null, 12, di)], 8, ui)) : (s(), C("img", {
2528
+ }, null, 12, gi)], 8, hi)) : (s(), C("img", {
2497
2529
  key: 1,
2498
2530
  class: "tpl:border-0",
2499
2531
  src: _(D),
2500
2532
  alt: e.block.alt,
2501
2533
  style: k(x.value)
2502
- }, null, 12, fi))], 64)) : e.block.src && T.value ? (s(), C("div", {
2534
+ }, null, 12, _i))], 64)) : e.block.src && T.value ? (s(), C("div", {
2503
2535
  key: 2,
2504
2536
  class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
2505
2537
  style: k([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, x.value])
2506
- }, [v(_(Bt), {
2538
+ }, [v(_(Vt), {
2507
2539
  size: 32,
2508
2540
  "stroke-width": 1.5,
2509
2541
  class: "tpl:text-[var(--tpl-primary)]",
2510
2542
  style: { opacity: "0.5" }
2511
- }), M("span", pi, [v(br, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (s(), C(L, { key: 3 }, [e.block.linkUrl ? (s(), C("a", {
2543
+ }), M("span", vi, [v(Tr, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (s(), C(L, { key: 3 }, [e.block.linkUrl ? (s(), C("a", {
2512
2544
  key: 0,
2513
2545
  href: e.block.linkUrl,
2514
2546
  target: "_blank",
@@ -2520,26 +2552,26 @@ var li = {
2520
2552
  src: _(E),
2521
2553
  alt: e.block.alt || _(a).image.altTextPlaceholder,
2522
2554
  style: k(x.value)
2523
- }, null, 12, hi)], 8, mi)) : (s(), C("img", {
2555
+ }, null, 12, bi)], 8, yi)) : (s(), C("img", {
2524
2556
  key: 1,
2525
2557
  class: "tpl:border-0",
2526
2558
  src: _(E),
2527
2559
  alt: e.block.alt,
2528
2560
  style: k(x.value)
2529
- }, null, 12, gi))], 64)) : (s(), C("div", _i, [u.value ? (s(), C("button", {
2561
+ }, null, 12, xi))], 64)) : (s(), C("div", Si, [u.value ? (s(), C("button", {
2530
2562
  key: 0,
2531
2563
  "aria-label": _(a).image.browseMedia,
2532
2564
  class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
2533
2565
  onClick: O(f, ["stop"])
2534
- }, [v(_(Bt), {
2566
+ }, [v(_(Vt), {
2535
2567
  size: 14,
2536
2568
  "stroke-width": 1.5
2537
- }), V(" " + R(_(a).image.browseMedia), 1)], 8, vi)) : (s(), C("span", yi, R(_(a).image.clickToAdd), 1))]))], 4));
2569
+ }), V(" " + R(_(a).image.browseMedia), 1)], 8, Ci)) : (s(), C("span", wi, R(_(a).image.clickToAdd), 1))]))], 4));
2538
2570
  }
2539
- }), xi = { class: "tpl:w-full" }, Si = ["href"], Ci = {
2571
+ }), Ei = { class: "tpl:w-full" }, Di = ["href"], Oi = {
2540
2572
  key: 1,
2541
2573
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
2542
- }, wi = /* @__PURE__ */ d({
2574
+ }, ki = /* @__PURE__ */ d({
2543
2575
  __name: "MenuBlock",
2544
2576
  props: {
2545
2577
  block: {},
@@ -2558,7 +2590,7 @@ var li = {
2558
2590
  function o(e) {
2559
2591
  return e || t.block.linkColor || t.block.color;
2560
2592
  }
2561
- return (t, c) => (s(), C("div", xi, [a.value ? (s(), C("div", {
2593
+ return (t, c) => (s(), C("div", Ei, [a.value ? (s(), C("div", {
2562
2594
  key: 0,
2563
2595
  style: k(i.value)
2564
2596
  }, [(s(!0), C(L, null, r(e.block.items, (t, n) => (s(), C(L, { key: t.id }, [M("a", {
@@ -2570,15 +2602,15 @@ var li = {
2570
2602
  textDecoration: t.underline ? "underline" : "none"
2571
2603
  }),
2572
2604
  onClick: c[0] ||= O(() => {}, ["prevent"])
2573
- }, [v(br, { text: t.text || "..." }, null, 8, ["text"])], 12, Si), n < e.block.items.length - 1 ? (s(), C("span", {
2605
+ }, [v(Tr, { text: t.text || "..." }, null, 8, ["text"])], 12, Di), n < e.block.items.length - 1 ? (s(), C("span", {
2574
2606
  key: 0,
2575
2607
  style: k({
2576
2608
  color: e.block.separatorColor,
2577
2609
  padding: `0 ${e.block.spacing}px`
2578
2610
  })
2579
- }, R(e.block.separator), 5)) : w("", !0)], 64))), 128))], 4)) : (s(), C("div", Ci, [v(_(Rt), { size: 16 }), M("span", null, R(_(n).menu.addLinks), 1)]))]));
2611
+ }, R(e.block.separator), 5)) : w("", !0)], 64))), 128))], 4)) : (s(), C("div", Oi, [v(_(zt), { size: 16 }), M("span", null, R(_(n).menu.addLinks), 1)]))]));
2580
2612
  }
2581
- }), Ti = /* @__PURE__ */ new Set([
2613
+ }), Ai = /* @__PURE__ */ new Set([
2582
2614
  "http",
2583
2615
  "https",
2584
2616
  "mailto",
@@ -2588,7 +2620,7 @@ var li = {
2588
2620
  "sms",
2589
2621
  "xmpp",
2590
2622
  "cid"
2591
- ]), Ei = /* @__PURE__ */ new Set([
2623
+ ]), ji = /* @__PURE__ */ new Set([
2592
2624
  "SCRIPT",
2593
2625
  "STYLE",
2594
2626
  "IFRAME",
@@ -2598,7 +2630,7 @@ var li = {
2598
2630
  "META",
2599
2631
  "BASE",
2600
2632
  "FORM"
2601
- ]), Di = /* @__PURE__ */ new Set([
2633
+ ]), Mi = /* @__PURE__ */ new Set([
2602
2634
  "href",
2603
2635
  "xlink:href",
2604
2636
  "formaction",
@@ -2607,16 +2639,16 @@ var li = {
2607
2639
  "background",
2608
2640
  "poster"
2609
2641
  ]);
2610
- function Oi(e, t) {
2642
+ function Ni(e, t) {
2611
2643
  let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
2612
2644
  if (!n || n.startsWith("#")) return !0;
2613
2645
  let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
2614
2646
  if (!r) return !0;
2615
2647
  let i = r[1].toLowerCase();
2616
- return Ti.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
2648
+ return Ai.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
2617
2649
  }
2618
- function ki(e) {
2619
- if (Ei.has(e.tagName)) {
2650
+ function Pi(e) {
2651
+ if (ji.has(e.tagName)) {
2620
2652
  e.remove();
2621
2653
  return;
2622
2654
  }
@@ -2628,29 +2660,29 @@ function ki(e) {
2628
2660
  e.removeAttribute(n);
2629
2661
  continue;
2630
2662
  }
2631
- if (Di.has(t)) {
2632
- Oi(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
2663
+ if (Mi.has(t)) {
2664
+ Ni(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
2633
2665
  continue;
2634
2666
  }
2635
2667
  if (t === "src") {
2636
- Oi(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
2668
+ Ni(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
2637
2669
  continue;
2638
2670
  }
2639
2671
  t === "srcdoc" && e.removeAttribute(n);
2640
2672
  }
2641
2673
  let n = Array.from(e.children);
2642
- for (let e of n) ki(e);
2674
+ for (let e of n) Pi(e);
2643
2675
  }
2644
- function Ai(e) {
2676
+ function Fi(e) {
2645
2677
  if (typeof DOMParser > "u") return e;
2646
2678
  let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
2647
- for (let e of n) ki(e);
2679
+ for (let e of n) Pi(e);
2648
2680
  return t.innerHTML;
2649
2681
  }
2650
2682
  //#endregion
2651
2683
  //#region src/composables/useEditableTextBlock.ts
2652
- function ji(e) {
2653
- let t = n(K, []), r = n(q, null), { syntax: i } = $t(), a = S(() => r?.value ? xe(e(), t) : Ee(e(), t)), o = S(() => Ai(Ae(a.value, i))), s = l(!1), c = l(null), { top: u, left: d } = Ue(c), { toLocal: f } = jt(), p = S(() => f({
2684
+ function Ii(e) {
2685
+ let t = n(q, []), r = n(K, null), { syntax: i } = en(), a = S(() => r?.value ? xe(e(), t) : Ee(e(), t)), o = S(() => Fi(Ae(a.value, i))), s = l(!1), c = l(null), { top: u, left: d } = Ue(c), { toLocal: f } = Mt(), p = S(() => f({
2654
2686
  top: u.value - 8,
2655
2687
  left: d.value
2656
2688
  }));
@@ -2671,14 +2703,14 @@ function ji(e) {
2671
2703
  }
2672
2704
  //#endregion
2673
2705
  //#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
2674
- var Mi = ["innerHTML"], Ni = /* @__PURE__ */ d({
2706
+ var Li = ["innerHTML"], Ri = /* @__PURE__ */ d({
2675
2707
  __name: "ParagraphBlock",
2676
2708
  props: {
2677
2709
  block: {},
2678
2710
  viewport: {}
2679
2711
  },
2680
2712
  setup(e) {
2681
- let t = e, n = B(() => import("./ParagraphEditor-BU8tlFbL.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = ji(() => t.block.content);
2713
+ let t = e, n = B(() => import("./ParagraphEditor-x2LTi6DN.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = Ii(() => t.block.content);
2682
2714
  return (t, u) => (s(), C("div", {
2683
2715
  ref_key: "blockRef",
2684
2716
  ref: i,
@@ -2697,54 +2729,54 @@ var Mi = ["innerHTML"], Ni = /* @__PURE__ */ d({
2697
2729
  key: 1,
2698
2730
  class: "tpl-text-content tpl:outline-none",
2699
2731
  innerHTML: _(o)
2700
- }, null, 8, Mi))], 544));
2732
+ }, null, 8, Li))], 544));
2701
2733
  }
2702
2734
  });
2703
2735
  //#endregion
2704
2736
  //#region src/utils/blockComponentResolver.ts
2705
- function Pi(e) {
2737
+ function zi(e) {
2706
2738
  let t = { fontFamily: e.fontFamily };
2707
2739
  return e.textColor && (t.color = e.textColor), e.linkColor && (t["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (t["--tpl-doc-link-underline"] = "underline"), t;
2708
2740
  }
2709
- function Fi(e, t, n) {
2741
+ function Bi(e, t, n) {
2710
2742
  if (t) {
2711
2743
  let n = t.getComponent(e);
2712
2744
  if (n) return n;
2713
2745
  }
2714
2746
  return n[e.type] ?? null;
2715
2747
  }
2716
- function Ii(e) {
2748
+ function Vi(e) {
2717
2749
  let { padding: t, backgroundColor: n } = e.styles, r = {
2718
2750
  padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
2719
2751
  backgroundColor: n || "transparent"
2720
2752
  };
2721
2753
  return (e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? Me.paragraphGap : Me.paragraphGap}px`), e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
2722
2754
  }
2723
- function Li(e) {
2755
+ function Hi(e) {
2724
2756
  if (e.type !== "section" || !e.wrapper) return null;
2725
2757
  let t = e.wrapper, n = {};
2726
2758
  return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
2727
2759
  }
2728
2760
  //#endregion
2729
2761
  //#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
2730
- var Ri = [
2762
+ var Ui = [
2731
2763
  "data-block-id",
2732
2764
  "data-block-type",
2733
2765
  "data-tpl-picked"
2734
- ], zi = ["aria-label"], Bi = [
2766
+ ], Wi = ["aria-label"], Gi = [
2735
2767
  "aria-label",
2736
2768
  "aria-pressed",
2737
2769
  "title"
2738
- ], Vi = ["aria-label", "title"], Hi = ["aria-label", "title"], Ui = ["aria-label", "title"], Wi = {
2770
+ ], Ki = ["aria-label", "title"], qi = ["aria-label", "title"], Ji = ["aria-label", "title"], Yi = {
2739
2771
  key: 1,
2740
2772
  class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
2741
- }, Gi = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, Ki = {
2773
+ }, Xi = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, Zi = {
2742
2774
  key: 2,
2743
2775
  class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
2744
- }, qi = ["aria-label", "title"], Ji = {
2776
+ }, Qi = ["aria-label", "title"], $i = {
2745
2777
  key: 3,
2746
2778
  class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
2747
- }, Yi = ["aria-label"], Xi = /*#__PURE__*/ Zt(/* @__PURE__ */ d({
2779
+ }, ea = ["aria-label"], ta = /*#__PURE__*/ Qt(/* @__PURE__ */ d({
2748
2780
  __name: "BlockWrapper",
2749
2781
  props: {
2750
2782
  block: {},
@@ -2756,7 +2788,7 @@ var Ri = [
2756
2788
  },
2757
2789
  emits: ["select"],
2758
2790
  setup(e, { emit: t }) {
2759
- let r = B(() => import("./BlockIssueBadge-B_mUH69a.js")), i = e, o = t, { t: c, format: u } = Y(), d = n(Tt, null), f = l(null), p = S(() => d?.liftedBlockId.value === i.block.id), m = S(() => p.value ? u(c.blockActions.dragLifted, { block: i.block.type }) : c.blockActions.drag);
2791
+ let r = B(() => import("./BlockIssueBadge-2-os120N.js")), i = e, o = t, { t: c, format: u } = Y(), d = n(Et, null), f = l(null), p = S(() => d?.liftedBlockId.value === i.block.id), m = S(() => p.value ? u(c.blockActions.dragLifted, { block: i.block.type }) : c.blockActions.drag);
2760
2792
  async function h() {
2761
2793
  await D(), f.value?.focus();
2762
2794
  }
@@ -2782,7 +2814,7 @@ var Ri = [
2782
2814
  let y = S(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), x = S(() => i.previewMode === !0 && y.value), T = S(() => i.viewport ? {
2783
2815
  desktop: c.viewport.desktop,
2784
2816
  mobile: c.viewport.mobile
2785
- }[i.viewport] ?? i.viewport : ""), E = S(() => !!i.block.displayCondition), A = n(ct, null), j = n(dt, null), N = n(ut, {}), P = S(() => N.savedBlocks?.isPicking.value === !0), F = S(() => !i.nested && N.savedBlocks?.isAvailable.value === !0 && N.savedBlocks?.canCreate.value === !0), I = S(() => i.isSelected && !P.value), L = S(() => N.comments?.getBlockCount(i.block.id) ?? 0), z = S(() => Ii(i.block)), ee = S(() => Li(i.block));
2817
+ }[i.viewport] ?? i.viewport : ""), E = S(() => !!i.block.displayCondition), A = n(lt, null), j = n(ft, null), N = n(dt, {}), P = S(() => N.savedBlocks?.isPicking.value === !0), F = S(() => !i.nested && N.savedBlocks?.isAvailable.value === !0 && N.savedBlocks?.canCreate.value === !0), I = S(() => i.isSelected && !P.value), L = S(() => N.comments?.getBlockCount(i.block.id) ?? 0), z = S(() => Vi(i.block)), ee = S(() => Hi(i.block));
2786
2818
  function te(e) {
2787
2819
  i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), o("select"));
2788
2820
  }
@@ -2827,61 +2859,61 @@ var Ri = [
2827
2859
  "aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
2828
2860
  title: _(c).blockActions.drag,
2829
2861
  onKeydown: g
2830
- }, [v(_(Vt), {
2862
+ }, [v(_(Ht), {
2831
2863
  size: 14,
2832
2864
  "stroke-width": 1.5
2833
- })], 40, Bi),
2865
+ })], 40, Gi),
2834
2866
  M("button", {
2835
2867
  class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
2836
2868
  "aria-label": _(c).blockActions.duplicate,
2837
2869
  title: _(c).blockActions.duplicate,
2838
2870
  onClick: O(re, ["stop"])
2839
- }, [v(_(Pt), {
2871
+ }, [v(_(Ft), {
2840
2872
  size: 14,
2841
2873
  "stroke-width": 1.5
2842
- })], 8, Vi),
2874
+ })], 8, Ki),
2843
2875
  F.value ? (s(), C("button", {
2844
2876
  key: 0,
2845
2877
  class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
2846
2878
  "aria-label": _(c).blockActions.saveAsBlock,
2847
2879
  title: _(c).blockActions.saveAsBlock,
2848
2880
  onClick: O(ie, ["stop"])
2849
- }, [v(_(Nt), {
2881
+ }, [v(_(Pt), {
2850
2882
  size: 14,
2851
2883
  "stroke-width": 1.5
2852
- })], 8, Hi)) : w("", !0),
2884
+ })], 8, qi)) : w("", !0),
2853
2885
  M("button", {
2854
2886
  class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
2855
2887
  "aria-label": _(c).blockActions.delete,
2856
2888
  title: _(c).blockActions.delete,
2857
2889
  onClick: O(ne, ["stop"])
2858
- }, [v(_(zt), {
2890
+ }, [v(_(Bt), {
2859
2891
  size: 14,
2860
2892
  "stroke-width": 1.5
2861
- })], 8, Ui)
2862
- ], 8, zi)) : w("", !0),
2863
- y.value ? (s(), C("div", Wi, [M("span", Gi, [v(_(Lt), {
2893
+ })], 8, Ji)
2894
+ ], 8, Wi)) : w("", !0),
2895
+ y.value ? (s(), C("div", Yi, [M("span", Xi, [v(_(Rt), {
2864
2896
  size: 12,
2865
2897
  "stroke-width": 1.5
2866
2898
  }), V(" " + R(_(u)(_(c).blockActions.hiddenOnViewport, { viewport: T.value })), 1)])])) : w("", !0),
2867
- E.value && !y.value ? (s(), C("div", Ki, [M("button", {
2899
+ E.value && !y.value ? (s(), C("div", Zi, [M("button", {
2868
2900
  "data-testid": "condition-toggle",
2869
2901
  class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
2870
2902
  "aria-label": _(c).blockActions.conditionToggle,
2871
2903
  title: e.block.displayCondition?.label,
2872
2904
  onClick: O(ae, ["stop"])
2873
- }, [v(_(Jt), {
2905
+ }, [v(_(Yt), {
2874
2906
  size: 12,
2875
2907
  "stroke-width": 2
2876
- })], 8, qi)])) : w("", !0),
2877
- L.value > 0 && !y.value ? (s(), C("div", Ji, [M("button", {
2908
+ })], 8, Qi)])) : w("", !0),
2909
+ L.value > 0 && !y.value ? (s(), C("div", $i, [M("button", {
2878
2910
  class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]",
2879
2911
  "aria-label": _(u)(_(c).blockActions.comments, { count: String(L.value) }),
2880
2912
  onClick: n[0] ||= O((t) => _(N).comments?.openForBlock(e.block.id), ["stop"])
2881
- }, [v(_(Gt), {
2913
+ }, [v(_(Kt), {
2882
2914
  size: 12,
2883
2915
  "stroke-width": 2.5
2884
- }), V(" " + R(L.value), 1)], 8, Yi)])) : w("", !0),
2916
+ }), V(" " + R(L.value), 1)], 8, ea)])) : w("", !0),
2885
2917
  ee.value ? (s(), C("div", {
2886
2918
  key: 4,
2887
2919
  class: "tpl-section-wrapper",
@@ -2894,31 +2926,31 @@ var Ri = [
2894
2926
  class: "tpl-block-content",
2895
2927
  style: k(z.value)
2896
2928
  }, [a(t.$slots, "default", {}, void 0, !0)], 4))
2897
- ], 10, Ri));
2929
+ ], 10, Ui));
2898
2930
  }
2899
2931
  }), [["__scopeId", "data-v-2c239048"]]);
2900
2932
  //#endregion
2901
2933
  //#region src/utils/unwrapParagraph.ts
2902
- function Zi(e) {
2934
+ function na(e) {
2903
2935
  let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
2904
2936
  return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
2905
2937
  }
2906
2938
  //#endregion
2907
2939
  //#region src/components/blocks/TitleBlock.vue
2908
- var Qi = /* @__PURE__ */ d({
2940
+ var ra = /* @__PURE__ */ d({
2909
2941
  __name: "TitleBlock",
2910
2942
  props: {
2911
2943
  block: {},
2912
2944
  viewport: {}
2913
2945
  },
2914
2946
  setup(e) {
2915
- let t = e, n = B(() => import("./TitleEditor-DvXUW2j-.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = ji(() => t.block.content), d = S(() => {
2947
+ let t = e, n = B(() => import("./TitleEditor-DCoulgN8.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = Ii(() => t.block.content), d = S(() => {
2916
2948
  let e = {
2917
2949
  fontSize: `${Oe[t.block.level]}px`,
2918
2950
  textAlign: t.block.textAlign
2919
2951
  };
2920
2952
  return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
2921
- }), f = S(() => `h${t.block.level}`), p = S(() => Zi(o.value));
2953
+ }), f = S(() => `h${t.block.level}`), p = S(() => na(o.value));
2922
2954
  return (t, o) => (s(), C("div", {
2923
2955
  ref_key: "blockRef",
2924
2956
  ref: i,
@@ -2944,16 +2976,16 @@ var Qi = /* @__PURE__ */ d({
2944
2976
  });
2945
2977
  //#endregion
2946
2978
  //#region src/utils/sectionColumnDrop.ts
2947
- function $i(e) {
2979
+ function ia(e) {
2948
2980
  return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
2949
2981
  }
2950
2982
  //#endregion
2951
2983
  //#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
2952
- var ea = { class: "tpl:w-full" }, ta = {
2984
+ var aa = { class: "tpl:w-full" }, oa = {
2953
2985
  key: 0,
2954
2986
  "data-testid": "section-drop-hint",
2955
2987
  class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
2956
- }, na = /* @__PURE__ */ d({
2988
+ }, sa = /* @__PURE__ */ d({
2957
2989
  __name: "SectionBlock",
2958
2990
  props: {
2959
2991
  block: {},
@@ -2961,13 +2993,13 @@ var ea = { class: "tpl:w-full" }, ta = {
2961
2993
  },
2962
2994
  setup(e) {
2963
2995
  let t = {
2964
- title: Qi,
2965
- paragraph: Ni,
2966
- image: bi,
2967
- button: Sr,
2968
- divider: ei,
2969
- custom: Qr
2970
- }, a = e, { t: o } = Y(), c = Ze(J, "SectionBlock"), l = n(dt, null), d = n(xt, null), p = n(ut, {}), m = n(bt, null);
2996
+ title: ra,
2997
+ paragraph: Ri,
2998
+ image: Ti,
2999
+ button: Dr,
3000
+ divider: ai,
3001
+ custom: ri
3002
+ }, a = e, { t: o } = Y(), c = $e(J, "SectionBlock"), l = n(ft, null), d = n(St, null), p = n(dt, {}), m = n(xt, null);
2971
3003
  function h(e) {
2972
3004
  let t = p.savedBlocks;
2973
3005
  if (t?.isPicking.value) {
@@ -3002,7 +3034,7 @@ var ea = { class: "tpl:w-full" }, ta = {
3002
3034
  r[e] = n, c.updateBlock(a.block.id, { children: r });
3003
3035
  }
3004
3036
  function D(e) {
3005
- return Fi(e, d, t);
3037
+ return Bi(e, d, t);
3006
3038
  }
3007
3039
  function O(e, t) {
3008
3040
  e.type === "custom" && c.updateBlock(e.id, {
@@ -3010,7 +3042,7 @@ var ea = { class: "tpl:w-full" }, ta = {
3010
3042
  dataSourceFetched: t.dataSourceFetched
3011
3043
  });
3012
3044
  }
3013
- return (t, n) => (s(), C("div", ea, [M("div", { class: b(["tpl:flex tpl:gap-0", { "tpl:flex-col": x.value }]) }, [(s(!0), C(L, null, r(y.value, (t, n) => (s(), C("div", {
3045
+ return (t, n) => (s(), C("div", aa, [M("div", { class: b(["tpl:flex tpl:gap-0", { "tpl:flex-col": x.value }]) }, [(s(!0), C(L, null, r(y.value, (t, n) => (s(), C("div", {
3014
3046
  key: n,
3015
3047
  class: b(["tpl:relative tpl:min-h-[60px] tpl:rounded", T(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
3016
3048
  style: k({ width: x.value ? "100%" : g.value[n] })
@@ -3019,7 +3051,7 @@ var ea = { class: "tpl:w-full" }, ta = {
3019
3051
  group: {
3020
3052
  name: "blocks",
3021
3053
  pull: !0,
3022
- put: (e, t, n) => _($i)(n)
3054
+ put: (e, t, n) => _(ia)(n)
3023
3055
  },
3024
3056
  animation: 150,
3025
3057
  "ghost-class": "tpl-ghost",
@@ -3032,7 +3064,7 @@ var ea = { class: "tpl:w-full" }, ta = {
3032
3064
  class: "tpl:min-h-[60px]",
3033
3065
  "onUpdate:modelValue": (e) => E(n, e)
3034
3066
  }, {
3035
- default: i(() => [(s(!0), C(L, null, r(T(n), (t) => f((s(), C("div", { key: t.id }, [v(Xi, {
3067
+ default: i(() => [(s(!0), C(L, null, r(T(n), (t) => f((s(), C("div", { key: t.id }, [v(ta, {
3036
3068
  block: t,
3037
3069
  "is-selected": _(c).state.selectedBlockId === t.id,
3038
3070
  viewport: e.viewport,
@@ -3064,13 +3096,13 @@ var ea = { class: "tpl:w-full" }, ta = {
3064
3096
  "model-value",
3065
3097
  "group",
3066
3098
  "onUpdate:modelValue"
3067
- ]), T(n).length === 0 ? (s(), C("div", ta, [M("span", null, R(_(o).section.dropHere), 1)])) : w("", !0)], 6))), 128))], 2)]));
3099
+ ]), T(n).length === 0 ? (s(), C("div", oa, [M("span", null, R(_(o).section.dropHere), 1)])) : w("", !0)], 6))), 128))], 2)]));
3068
3100
  }
3069
- }), ra = Pe, ia = {
3101
+ }), ca = Pe, la = {
3070
3102
  small: 24,
3071
3103
  medium: 32,
3072
3104
  large: 48
3073
- }, aa = [
3105
+ }, ua = [
3074
3106
  "facebook",
3075
3107
  "twitter",
3076
3108
  "instagram",
@@ -3088,11 +3120,11 @@ var ea = { class: "tpl:w-full" }, ta = {
3088
3120
  "github",
3089
3121
  "dribbble",
3090
3122
  "behance"
3091
- ], oa = [
3123
+ ], da = [
3092
3124
  "width",
3093
3125
  "height",
3094
3126
  "fill"
3095
- ], sa = ["d"], ca = /* @__PURE__ */ d({
3127
+ ], fa = ["d"], pa = /* @__PURE__ */ d({
3096
3128
  __name: "SocialIconSvg",
3097
3129
  props: {
3098
3130
  platform: {},
@@ -3100,7 +3132,7 @@ var ea = { class: "tpl:w-full" }, ta = {
3100
3132
  iconSize: {}
3101
3133
  },
3102
3134
  setup(e) {
3103
- let t = e, n = S(() => ra[t.platform]), r = S(() => ia[t.iconSize]), i = S(() => {
3135
+ let t = e, n = S(() => ca[t.platform]), r = S(() => la[t.iconSize]), i = S(() => {
3104
3136
  let e = {
3105
3137
  display: "inline-flex",
3106
3138
  alignItems: "center",
@@ -3144,12 +3176,12 @@ var ea = { class: "tpl:w-full" }, ta = {
3144
3176
  viewBox: "0 0 24 24",
3145
3177
  fill: o.value,
3146
3178
  xmlns: "http://www.w3.org/2000/svg"
3147
- }, [M("path", { d: n.value.path }, null, 8, sa)], 8, oa))], 4));
3179
+ }, [M("path", { d: n.value.path }, null, 8, fa)], 8, da))], 4));
3148
3180
  }
3149
- }), la = { class: "tpl:w-full" }, ua = ["href"], da = {
3181
+ }), ma = { class: "tpl:w-full" }, ha = ["href"], ga = {
3150
3182
  key: 1,
3151
3183
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
3152
- }, fa = /* @__PURE__ */ d({
3184
+ }, _a = /* @__PURE__ */ d({
3153
3185
  __name: "SocialIconsBlock",
3154
3186
  props: {
3155
3187
  block: {},
@@ -3162,7 +3194,7 @@ var ea = { class: "tpl:w-full" }, ta = {
3162
3194
  gap: `${t.block.spacing}px`,
3163
3195
  justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
3164
3196
  })), a = S(() => t.block.icons.length > 0);
3165
- return (t, o) => (s(), C("div", la, [a.value ? (s(), C("div", {
3197
+ return (t, o) => (s(), C("div", ma, [a.value ? (s(), C("div", {
3166
3198
  key: 0,
3167
3199
  style: k(i.value)
3168
3200
  }, [(s(!0), C(L, null, r(e.block.icons, (t) => (s(), C("a", {
@@ -3170,7 +3202,7 @@ var ea = { class: "tpl:w-full" }, ta = {
3170
3202
  href: t.url || "#",
3171
3203
  class: "tpl:cursor-default",
3172
3204
  onClick: o[0] ||= O(() => {}, ["prevent"])
3173
- }, [v(ca, {
3205
+ }, [v(pa, {
3174
3206
  platform: t.platform,
3175
3207
  "icon-style": e.block.iconStyle,
3176
3208
  "icon-size": e.block.iconSize
@@ -3178,44 +3210,44 @@ var ea = { class: "tpl:w-full" }, ta = {
3178
3210
  "platform",
3179
3211
  "icon-style",
3180
3212
  "icon-size"
3181
- ])], 8, ua))), 128))], 4)) : (s(), C("div", da, [v(_(Mt), { size: 16 }), M("span", null, R(_(n).social.addIcons), 1)]))]));
3213
+ ])], 8, ha))), 128))], 4)) : (s(), C("div", ga, [v(_(Nt), { size: 16 }), M("span", null, R(_(n).social.addIcons), 1)]))]));
3182
3214
  }
3183
- }), pa = { class: "tpl:w-full" }, ma = {
3215
+ }), va = { class: "tpl:w-full" }, ya = {
3184
3216
  key: 0,
3185
3217
  class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
3186
3218
  style: {
3187
3219
  "background-color": "var(--tpl-bg-hover)",
3188
3220
  color: "var(--tpl-text-dim)"
3189
3221
  }
3190
- }, ha = /* @__PURE__ */ d({
3222
+ }, ba = /* @__PURE__ */ d({
3191
3223
  __name: "SpacerBlock",
3192
3224
  props: {
3193
3225
  block: {},
3194
3226
  viewport: {}
3195
3227
  },
3196
3228
  setup(e) {
3197
- let t = e, n = Ze(J, "SpacerBlock"), r = S(() => ({
3229
+ let t = e, n = $e(J, "SpacerBlock"), r = S(() => ({
3198
3230
  height: `${t.block.height}px`,
3199
3231
  minHeight: `${t.block.height}px`,
3200
3232
  ...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
3201
3233
  }));
3202
- return (t, i) => (s(), C("div", pa, [M("div", {
3234
+ return (t, i) => (s(), C("div", va, [M("div", {
3203
3235
  style: k(r.value),
3204
3236
  class: b(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !_(n).state.previewMode }])
3205
- }, [_(n).state.previewMode ? w("", !0) : (s(), C("span", ma, R(e.block.height) + "px ", 1))], 6)]));
3237
+ }, [_(n).state.previewMode ? w("", !0) : (s(), C("span", ya, R(e.block.height) + "px ", 1))], 6)]));
3206
3238
  }
3207
- }), ga = { class: "tpl:w-full" }, _a = { key: 0 }, va = [
3239
+ }), xa = { class: "tpl:w-full" }, Sa = { key: 0 }, Ca = [
3208
3240
  "aria-label",
3209
3241
  "data-placeholder",
3210
3242
  "onBlur"
3211
- ], ya = [
3243
+ ], wa = [
3212
3244
  "aria-label",
3213
3245
  "data-placeholder",
3214
3246
  "onBlur"
3215
- ], ba = {
3247
+ ], Ta = {
3216
3248
  key: 1,
3217
3249
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
3218
- }, xa = /*#__PURE__*/ Zt(/* @__PURE__ */ d({
3250
+ }, Ea = /*#__PURE__*/ Qt(/* @__PURE__ */ d({
3219
3251
  __name: "TableBlock",
3220
3252
  props: {
3221
3253
  block: {},
@@ -3229,7 +3261,7 @@ var ea = { class: "tpl:w-full" }, ta = {
3229
3261
  updated(e, t) {
3230
3262
  t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
3231
3263
  }
3232
- }, n = e, { t: i } = Y(), a = Ze(J, "TableBlock"), o = S(() => n.block.rows.length > 0), c = S(() => {
3264
+ }, n = e, { t: i } = Y(), a = $e(J, "TableBlock"), o = S(() => n.block.rows.length > 0), c = S(() => {
3233
3265
  let e = {
3234
3266
  width: "100%",
3235
3267
  borderCollapse: "collapse",
@@ -3260,11 +3292,11 @@ var ea = { class: "tpl:w-full" }, ta = {
3260
3292
  } : n);
3261
3293
  a.updateBlock(n.block.id, { rows: o });
3262
3294
  }
3263
- return (e, n) => (s(), C("div", ga, [o.value ? (s(), C("table", {
3295
+ return (e, n) => (s(), C("div", xa, [o.value ? (s(), C("table", {
3264
3296
  key: 0,
3265
3297
  style: k(c.value),
3266
3298
  class: "tpl-table-editable"
3267
- }, [d.value ? (s(), C("thead", _a, [M("tr", null, [(s(!0), C(L, null, r(d.value.cells, (e) => f((s(), C("th", {
3299
+ }, [d.value ? (s(), C("thead", Sa, [M("tr", null, [(s(!0), C(L, null, r(d.value.cells, (e) => f((s(), C("th", {
3268
3300
  key: e.id,
3269
3301
  style: k(u.value),
3270
3302
  "aria-label": _(i).table.cellPlaceholder,
@@ -3273,7 +3305,7 @@ var ea = { class: "tpl:w-full" }, ta = {
3273
3305
  onBlur: (t) => h(d.value.id, e.id, t),
3274
3306
  onKeydown: n[0] ||= y(O((e) => e.target.blur(), ["prevent"]), ["enter"]),
3275
3307
  onClick: O(m, ["stop"])
3276
- }, null, 44, va)), [[t, e.content]])), 128))])])) : w("", !0), M("tbody", null, [(s(!0), C(L, null, r(p.value, (e) => (s(), C("tr", { key: e.id }, [(s(!0), C(L, null, r(e.cells, (r) => f((s(), C("td", {
3308
+ }, null, 44, Ca)), [[t, e.content]])), 128))])])) : w("", !0), M("tbody", null, [(s(!0), C(L, null, r(p.value, (e) => (s(), C("tr", { key: e.id }, [(s(!0), C(L, null, r(e.cells, (r) => f((s(), C("td", {
3277
3309
  key: r.id,
3278
3310
  style: k(l.value),
3279
3311
  "aria-label": _(i).table.cellPlaceholder,
@@ -3282,9 +3314,9 @@ var ea = { class: "tpl:w-full" }, ta = {
3282
3314
  onBlur: (t) => h(e.id, r.id, t),
3283
3315
  onKeydown: n[1] ||= y(O((e) => e.target.blur(), ["prevent"]), ["enter"]),
3284
3316
  onClick: O(m, ["stop"])
3285
- }, null, 44, ya)), [[t, r.content]])), 128))]))), 128))])], 4)) : (s(), C("div", ba, [v(_(qt), { size: 16 }), M("span", null, R(_(i).table.empty), 1)]))]));
3317
+ }, null, 44, wa)), [[t, r.content]])), 128))]))), 128))])], 4)) : (s(), C("div", Ta, [v(_(Jt), { size: 16 }), M("span", null, R(_(i).table.empty), 1)]))]));
3286
3318
  }
3287
- }), [["__scopeId", "data-v-963ac422"]]), Sa = /* @__PURE__ */ d({
3319
+ }), [["__scopeId", "data-v-963ac422"]]), Da = /* @__PURE__ */ d({
3288
3320
  __name: "VideoPlayButton",
3289
3321
  props: { hoverEffect: {
3290
3322
  type: Boolean,
@@ -3302,7 +3334,7 @@ var ea = { class: "tpl:w-full" }, ta = {
3302
3334
  });
3303
3335
  //#endregion
3304
3336
  //#region src/utils/videoThumbnail.ts
3305
- function Ca(e) {
3337
+ function Oa(e) {
3306
3338
  if (!e) return {
3307
3339
  platform: "unknown",
3308
3340
  videoId: null,
@@ -3334,25 +3366,25 @@ function Ca(e) {
3334
3366
  thumbnailUrl: null
3335
3367
  };
3336
3368
  }
3337
- function wa(e, t) {
3338
- return t || Ca(e).thumbnailUrl;
3369
+ function ka(e, t) {
3370
+ return t || Oa(e).thumbnailUrl;
3339
3371
  }
3340
3372
  //#endregion
3341
3373
  //#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
3342
- var Ta = ["src", "alt"], Ea = {
3374
+ var Aa = ["src", "alt"], ja = {
3343
3375
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
3344
3376
  style: { opacity: "0.7" }
3345
- }, Da = ["href"], Oa = ["src", "alt"], ka = ["src", "alt"], Aa = {
3377
+ }, Ma = ["href"], Na = ["src", "alt"], Pa = ["src", "alt"], Fa = {
3346
3378
  key: 3,
3347
3379
  class: "tpl:flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
3348
- }, ja = /* @__PURE__ */ d({
3380
+ }, Ia = /* @__PURE__ */ d({
3349
3381
  __name: "VideoBlock",
3350
3382
  props: {
3351
3383
  block: {},
3352
3384
  viewport: {}
3353
3385
  },
3354
3386
  setup(e) {
3355
- let t = e, { t: n } = Y(), { syntax: r } = $t(), i = S(() => U(t.block.url, r) || U(t.block.thumbnailUrl, r)), a = kn(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = kn(() => i.value ? t.block.placeholderUrl : void 0), c = S(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : wa(t.block.url)), l = S(() => ({ textAlign: t.block.align })), u = S(() => {
3387
+ let t = e, { t: n } = Y(), { syntax: r } = en(), i = S(() => U(t.block.url, r) || U(t.block.thumbnailUrl, r)), a = An(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = An(() => i.value ? t.block.placeholderUrl : void 0), c = S(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : ka(t.block.url)), l = S(() => ({ textAlign: t.block.align })), u = S(() => {
3356
3388
  let e = t.block.align;
3357
3389
  return {
3358
3390
  maxWidth: "100%",
@@ -3375,16 +3407,16 @@ var Ta = ["src", "alt"], Ea = {
3375
3407
  src: _(o),
3376
3408
  alt: e.block.alt,
3377
3409
  style: k(d.value)
3378
- }, null, 12, Ta), v(Sa)], 4)) : i.value ? (s(), C("div", {
3410
+ }, null, 12, Aa), v(Da)], 4)) : i.value ? (s(), C("div", {
3379
3411
  key: 1,
3380
3412
  class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
3381
3413
  style: k([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
3382
- }, [v(_(Ut), {
3414
+ }, [v(_(Wt), {
3383
3415
  size: 36,
3384
3416
  "stroke-width": 1.5,
3385
3417
  class: "tpl:text-[var(--tpl-primary)]",
3386
3418
  style: { opacity: "0.5" }
3387
- }), M("span", Ea, [v(br, { text: f.value }, null, 8, ["text"])])], 4)) : c.value ? (s(), C(L, { key: 2 }, [e.block.url ? (s(), C("a", {
3419
+ }), M("span", ja, [v(Tr, { text: f.value }, null, 8, ["text"])])], 4)) : c.value ? (s(), C(L, { key: 2 }, [e.block.url ? (s(), C("a", {
3388
3420
  key: 0,
3389
3421
  href: e.block.url,
3390
3422
  target: "_blank",
@@ -3397,7 +3429,7 @@ var Ta = ["src", "alt"], Ea = {
3397
3429
  src: c.value,
3398
3430
  alt: e.block.alt,
3399
3431
  style: k(d.value)
3400
- }, null, 12, Oa), v(Sa, { "hover-effect": "" })], 12, Da)) : (s(), C("div", {
3432
+ }, null, 12, Na), v(Da, { "hover-effect": "" })], 12, Ma)) : (s(), C("div", {
3401
3433
  key: 1,
3402
3434
  class: "tpl:relative tpl:inline-block",
3403
3435
  style: k(u.value)
@@ -3406,51 +3438,51 @@ var Ta = ["src", "alt"], Ea = {
3406
3438
  src: c.value,
3407
3439
  alt: e.block.alt,
3408
3440
  style: k(d.value)
3409
- }, null, 12, ka), v(Sa)], 4))], 64)) : (s(), C("div", Aa, [v(_(Ut), {
3441
+ }, null, 12, Pa), v(Da)], 4))], 64)) : (s(), C("div", Fa, [v(_(Wt), {
3410
3442
  size: 40,
3411
3443
  "stroke-width": 1.5,
3412
3444
  class: "tpl:text-[var(--tpl-border-light)]"
3413
3445
  }), M("span", null, R(_(n).video.addVideo), 1)]))], 4));
3414
3446
  }
3415
- }), Ma = {
3416
- section: na,
3417
- title: Qi,
3418
- paragraph: Ni,
3419
- image: bi,
3420
- button: Sr,
3421
- divider: ei,
3422
- video: ja,
3423
- social: fa,
3424
- menu: wi,
3425
- table: xa,
3426
- spacer: ha,
3427
- html: oi,
3428
- countdown: B(() => import("./CountdownBlock-BRwXUvGU.js"))
3447
+ }), La = {
3448
+ section: sa,
3449
+ title: ra,
3450
+ paragraph: Ri,
3451
+ image: Ti,
3452
+ button: Dr,
3453
+ divider: ai,
3454
+ video: Ia,
3455
+ social: _a,
3456
+ menu: ki,
3457
+ table: Ea,
3458
+ spacer: ba,
3459
+ html: di,
3460
+ countdown: B(() => import("./CountdownBlock-CPe1ulzk.js"))
3429
3461
  };
3430
- function Na(e) {
3431
- let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } = Y(i), d = S(() => he(he(Yn(i), mr(n.content.value.settings?.locale)), r.blockDefaults ?? {}));
3462
+ function Ra(e) {
3463
+ let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } = Y(i), d = S(() => he(he(er(i), yr(n.content.value.settings?.locale)), r.blockDefaults ?? {}));
3432
3464
  n.setUiTheme(r.uiTheme ?? "auto");
3433
- let { resolvedTheme: f } = Ln(S(() => n.state.uiTheme)), p = l(r.theme ?? {}), { themeStyles: m } = zn({
3465
+ let { resolvedTheme: f } = Rn(S(() => n.state.uiTheme)), p = l(r.theme ?? {}), { themeStyles: m } = Bn({
3434
3466
  themeOverrides: p,
3435
3467
  resolvedTheme: f,
3436
3468
  extraStyles: () => ({
3437
3469
  "--tpl-drop-text": `"${i.canvas.dropHere}"`,
3438
3470
  ...e.themeExtraStyles?.()
3439
3471
  })
3440
- }), g = ln({
3472
+ }), g = un({
3441
3473
  content: n.content,
3442
3474
  setContent: (e, t) => n.setContent(e, t),
3443
3475
  ...e.historyOptions
3444
3476
  });
3445
- gn(n, g);
3446
- let _ = dn({
3477
+ _n(n, g);
3478
+ let _ = fn({
3447
3479
  addBlock: n.addBlock,
3448
3480
  removeBlock: n.removeBlock,
3449
3481
  updateBlock: n.updateBlock,
3450
3482
  selectBlock: n.selectBlock,
3451
3483
  findBlockLocation: n.findBlockLocation,
3452
3484
  blockDefaults: () => d.value
3453
- }), v = mn(n), y = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? pn({
3485
+ }), v = hn(n), y = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? mn({
3454
3486
  content: n.content,
3455
3487
  isDirty: () => n.state.isDirty,
3456
3488
  ...e.autoSaveOptions
@@ -3458,33 +3490,35 @@ function Na(e) {
3458
3490
  y && (b = t(g.isNavigating, (e) => {
3459
3491
  e ? y.pause() : y.resume();
3460
3492
  }));
3461
- let x = In(n, {
3493
+ let x = Ln(n, {
3462
3494
  t: s,
3463
3495
  format: u
3464
- }, r.customBlocks ?? []), C = At(r.colors);
3496
+ }, r.customBlocks ?? []), C = jt(r.colors);
3465
3497
  if (C.allowCustomIgnored && X.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), C.invalidPresets.length > 0 && X.warn(`config.colors.presets skipped invalid entries: ${C.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), C.allowCustom === !1) {
3466
- let e = Jn(C.presets, r.blockDefaults, r.templateDefaults);
3498
+ let e = $n(C.presets, r.blockDefaults, r.templateDefaults);
3467
3499
  e.length > 0 && X.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
3468
3500
  }
3469
- let w = Bn();
3470
- Gn(w, Ma);
3471
- let T = /* @__PURE__ */ new Set();
3472
- function E(e) {
3501
+ let w = Zn(r.templateSettings);
3502
+ for (let e of w.unknown) X.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${Yn.join(", ")}) — skipping it.`);
3503
+ let T = Vn();
3504
+ Kn(T, La);
3505
+ let E = /* @__PURE__ */ new Set();
3506
+ function D(e) {
3473
3507
  for (let t of e) {
3474
- w.registerCustom(t, Qr);
3475
- for (let e of gr(t, C)) T.has(e.id) || (T.add(e.id), X.warn(e.message));
3508
+ T.registerCustom(t, ri);
3509
+ for (let e of xr(t, C)) E.has(e.id) || (E.add(e.id), X.warn(e.message));
3476
3510
  }
3477
3511
  }
3478
- r.customBlocks?.length && E(r.customBlocks);
3479
- let D = Tn();
3480
- if (o() && h(D.dispose), e.containerEl) {
3512
+ r.customBlocks?.length && D(r.customBlocks);
3513
+ let O = En();
3514
+ if (o() && h(O.dispose), e.containerEl) {
3481
3515
  let t = e.containerEl;
3482
3516
  G(document, "pointerdown", (e) => {
3483
3517
  let n = t.value;
3484
- n && (e.composedPath?.() ?? []).includes(n) && D.claim();
3518
+ n && (e.composedPath?.() ?? []).includes(n) && O.claim();
3485
3519
  }, { capture: !0 });
3486
3520
  }
3487
- function O() {
3521
+ function k() {
3488
3522
  let t = e.capabilities?.templates;
3489
3523
  if (t) {
3490
3524
  t.save();
@@ -3492,46 +3526,46 @@ function Na(e) {
3492
3526
  }
3493
3527
  y?.flush();
3494
3528
  }
3495
- function k(t) {
3496
- D.isActive() && vr(t, {
3529
+ function A(t) {
3530
+ O.isActive() && Cr(t, {
3497
3531
  history: g,
3498
3532
  selectBlock: (e) => n.selectBlock(e),
3499
3533
  getSelectedBlockId: () => n.state.selectedBlockId,
3500
3534
  removeBlock: (e) => n.removeBlock(e),
3501
- onSave: O,
3535
+ onSave: k,
3502
3536
  onBeforeUndo: e.keyboardOptions?.onBeforeUndo,
3503
3537
  isPicking: () => e.capabilities?.savedBlocks?.isPicking.value === !0,
3504
3538
  onConfirmPick: () => e.capabilities?.savedBlocks?.confirmPicking(),
3505
3539
  onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
3506
3540
  });
3507
3541
  }
3508
- G(document, "keydown", k);
3509
- let A = l(null);
3510
- c(pt, e.editorRoot ?? document), c(rt, A), c(ot, i), c(J, n), c(Ct, g), c(ct, _), c(dt, v), c(st, a), c(Ke, m), c(at, f), c(vt, d), c(Qe, r.locale), c(xt, w), c(ft, r.customBlocks ?? []), c(tt, r.paletteBlocks), c(Et, Kn(r.htmlBlockPreview)), c(St, C), c(yt, Vn(n.content, w));
3511
- let j = Se(r.mergeTags?.syntax);
3512
- c(K, r.mergeTags?.tags ?? []), c(ht, j), c(et, r.mergeTags?.onRequest ?? null), c(Ye, r.mergeTags?.autocomplete !== !1);
3513
- let M = l(Fe(r.mergeTags?.tags ?? []));
3514
- c(nt, M);
3515
- let N = Dn({
3542
+ G(document, "keydown", A);
3543
+ let j = l(null);
3544
+ c(mt, e.editorRoot ?? document), c(rt, j), c(Ze, i), c(J, n), c(wt, g), c(lt, _), c(ft, v), c(ct, a), c(ot, m), c(st, f), c(yt, d), c(at, r.locale), c(St, T), c(pt, r.customBlocks ?? []), c(tt, r.paletteBlocks), c(Dt, qn(r.htmlBlockPreview)), c(Ct, C), c(Ke, w.fields), c(bt, Hn(n.content, T));
3545
+ let M = Se(r.mergeTags?.syntax);
3546
+ c(q, r.mergeTags?.tags ?? []), c(gt, M), c(et, r.mergeTags?.onRequest ?? null), c(Ye, r.mergeTags?.autocomplete !== !1);
3547
+ let N = l(Fe(r.mergeTags?.tags ?? []));
3548
+ c(nt, N);
3549
+ let P = On({
3516
3550
  resolvePreview: r.resolvePreview,
3517
3551
  getContent: () => n.content.value,
3518
3552
  isActive: () => n.state.previewMode
3519
3553
  });
3520
- c(Xe, N), c($e, r.resolvePreview);
3521
- let P = S(() => !(n.state.previewMode && N.isConfigured));
3522
- c(bt, P);
3523
- let F = An();
3524
- c(Je, F), c(qe, r.logicTags?.tags ?? []), c(it, r.logicTags?.pairs ?? []), c(Ge, r.logicTags?.onRequest ?? null), c(wt, jn()), c(mt, r.onRequestMedia ?? null), c(lt, r.resolveImageUrl ? On(r.resolveImageUrl) : null), c(gt, r.displayConditions?.conditions ?? []), c(_t, r.displayConditions?.allowCustom ?? !1), c(ut, e.capabilities ?? {}), c(Tt, x);
3525
- let I = Mn(r.lint) ? null : Nn({
3554
+ c(Xe, P), c(Qe, r.resolvePreview);
3555
+ let F = S(() => !(n.state.previewMode && P.isConfigured));
3556
+ c(xt, F);
3557
+ let I = jn();
3558
+ c(Je, I), c(qe, r.logicTags?.tags ?? []), c(it, r.logicTags?.pairs ?? []), c(Ge, r.logicTags?.onRequest ?? null), c(Tt, Mn()), c(ht, r.onRequestMedia ?? null), c(ut, r.resolveImageUrl ? kn(r.resolveImageUrl) : null), c(_t, r.displayConditions?.conditions ?? []), c(vt, r.displayConditions?.allowCustom ?? !1), c(dt, e.capabilities ?? {}), c(Et, x);
3559
+ let L = Nn(r.lint) ? null : Pn({
3526
3560
  content: n.content,
3527
3561
  options: r.lint ?? {},
3528
3562
  updateBlock: n.updateBlock,
3529
3563
  updateSettings: n.updateSettings,
3530
3564
  removeBlock: n.removeBlock
3531
3565
  });
3532
- c(Dt, I);
3533
- function L() {
3534
- b?.(), I?.destroy(), y?.destroy(), g.destroy();
3566
+ c(Ot, L);
3567
+ function R() {
3568
+ b?.(), L?.destroy(), y?.destroy(), g.destroy();
3535
3569
  }
3536
3570
  return {
3537
3571
  t: s,
@@ -3543,18 +3577,18 @@ function Na(e) {
3543
3577
  resolvedTheme: f,
3544
3578
  themeStyles: m,
3545
3579
  themeOverrides: p,
3546
- registry: w,
3580
+ registry: T,
3547
3581
  keyboardReorder: x,
3548
- templateLint: I,
3549
- popoverRoot: A,
3550
- mergeTagSampleMode: M,
3551
- previewResolution: N,
3552
- appliesConditionFilter: P,
3553
- registerCustomBlocks: E,
3554
- destroy: L
3582
+ templateLint: L,
3583
+ popoverRoot: j,
3584
+ mergeTagSampleMode: N,
3585
+ previewResolution: P,
3586
+ appliesConditionFilter: F,
3587
+ registerCustomBlocks: D,
3588
+ destroy: R
3555
3589
  };
3556
3590
  }
3557
3591
  //#endregion
3558
- export { rr as A, Sn as B, Pr as C, Tr as D, Dr as E, sr as F, hn as G, bn as H, or as I, fn as K, Fn as L, ur as M, lr as N, Sr as O, cr as P, Pn as R, zr as S, Or as T, yn as U, xn as V, _n as W, oi as _, fa as a, Ur as b, Qi as c, Pi as d, Fi as f, ci as g, bi as h, ha as i, dr as j, hr as k, Xi as l, wi as m, ja as n, aa as o, Ni as p, an as q, xa as r, na as s, Na as t, Ii as u, ei as v, Nr as w, Vr as x, Qr as y, Dn as z };
3592
+ export { cr as A, Fn as B, zr as C, Ar as D, Mr as E, fr as F, bn as G, Cn as H, dr as I, pn as J, vn as K, Yn as L, hr as M, mr as N, Dr as O, pr as P, Jn as R, Wr as S, Nr as T, Sn as U, On as V, xn as W, on as Y, di as _, _a as a, Jr as b, ra as c, zi as d, Bi as f, pi as g, Ti as h, ba as i, gr as j, br as k, ta as l, ki as m, Ia as n, ua as o, Ri as p, gn as q, Ea as r, sa as s, Ra as t, Vi as u, ai as v, Rr as w, Kr as x, ri as y, In as z };
3559
3593
 
3560
- //# sourceMappingURL=useEditorCore-ChlgO2GN.js.map
3594
+ //# sourceMappingURL=useEditorCore-CZxGbZmY.js.map