@templatical/editor 0.26.2 → 0.27.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 (285) hide show
  1. package/README.md +3 -1
  2. package/dist/{AiChatSidebar-CMBz6Wix.js → AiChatSidebar-iVJDzqjr.js} +60 -60
  3. package/dist/AiFeatureMenu-DvrK-dzj.js +57 -0
  4. package/dist/{BlockIssueBadge-Buk3_6QF.js → BlockIssueBadge-BHysq7XQ.js} +11 -11
  5. package/dist/BlockPreviewCanvas-GZbr0ph5.js +121 -0
  6. package/dist/CloudHeaderExtras-Cx8gFWu2.js +59 -0
  7. package/dist/CloudPanels-D0X449DD.js +227 -0
  8. package/dist/{CollaboratorBar-zvfvE7f-.js → CollaboratorBar-DMSWCrX3.js} +21 -21
  9. package/dist/ColorPicker-DCjFQCAg.js +501 -0
  10. package/dist/CommentsPanel-D5wQB1Kf.js +18 -0
  11. package/dist/CommentsSidebar-BoTIxpLE.js +481 -0
  12. package/dist/{cdn/chunks/CountdownBlock-vLTkTI9e.js → CountdownBlock-BFX8iU90.js} +19 -21
  13. package/dist/{cdn/chunks/CountdownToolbar-DPjcgcVR.js → CountdownToolbar-CSftc9Ma.js} +52 -53
  14. package/dist/{DesignReferenceSidebar-Bx96XFmK.js → DesignReferenceSidebar-DKsx2TiL.js} +72 -71
  15. package/dist/{IssuesPanel-Do7RLXsP.js → IssuesPanel-flKKwKpM.js} +38 -38
  16. package/dist/{LoadingTrack-BexpNuTV.js → LoadingTrack-C2T8ixEL.js} +3 -3
  17. package/dist/{MergeTagModeToggle-P-UguQHc.js → MergeTagModeToggle-PKCoKAoF.js} +43 -43
  18. package/dist/{MergeTagSuggestion-BJ43ihWR.js → MergeTagSuggestion-DGha0WRp.js} +46 -46
  19. package/dist/{cdn/chunks/NumberWithSuffix-BXrRdfq1.js → NumberWithSuffix-DdPCXfKf.js} +42 -44
  20. package/dist/{ParagraphEditor-CLvv5Ija.js → ParagraphEditor-vDU-5y6r.js} +202 -199
  21. package/dist/RestoreVersionDialog-DIn1muFD.js +86 -0
  22. package/dist/{RichTextEditorContent-fbYJXAio.js → RichTextEditorContent-I83k5DtQ.js} +44 -44
  23. package/dist/SaveBlockDialog-C_QvYAeL.js +266 -0
  24. package/dist/{SavedBlocksBrowserModal-KWlaiLlr.js → SavedBlocksBrowserModal-CefWWcdT.js} +116 -115
  25. package/dist/{cdn/chunks/SavedBlocksPanels-e4HyTZ8v.js → SavedBlocksPanels-DnQwO-7O.js} +9 -11
  26. package/dist/{SavedBlocksPickBar-C3h8oL3r.js → SavedBlocksPickBar-BsFubArH.js} +17 -17
  27. package/dist/{TemplateScoringPanel-BZUsb3FD.js → TemplateScoringPanel-Bv_bBsJi.js} +87 -87
  28. package/dist/TestEmailModal-STPWDP79.js +206 -0
  29. package/dist/{cdn/chunks/TestEmailPanel-CZAG1gQE.js → TestEmailPanel-HYVjApKZ.js} +4 -6
  30. package/dist/TitleEditor-DnB0EJ_g.js +198 -0
  31. package/dist/TplModal-chvLhXmC.js +49 -0
  32. package/dist/VersionHistoryMenu-Cq4rH56t.js +155 -0
  33. package/dist/VersionHistoryPanels-D7k_F7-9.js +46 -0
  34. package/dist/VersionPreviewBanner-DthyHe6C.js +38 -0
  35. package/dist/{blockTypeIcons-2_85L_CL.js → blockTypeIcons-B8r4jMBn.js} +6 -6
  36. package/dist/bundle-stats.json +8 -8
  37. package/dist/{ca-D1zgI9fQ.js → ca-Cqg9O8mx.js} +69 -6
  38. package/dist/cdn/chunks/{AiChatSidebar-CQ8KUmNB.js → AiChatSidebar-DTUoBH5a.js} +54 -54
  39. package/dist/cdn/chunks/AiChatSidebar-DTUoBH5a.js.map +1 -0
  40. package/dist/cdn/chunks/AiFeatureMenu-Dyh7mUMB.js +57 -0
  41. package/dist/cdn/chunks/AiFeatureMenu-Dyh7mUMB.js.map +1 -0
  42. package/dist/cdn/chunks/{BlockIssueBadge-BEEY9o2o.js → BlockIssueBadge-UzSSOM_2.js} +13 -13
  43. package/dist/cdn/chunks/{BlockIssueBadge-BEEY9o2o.js.map → BlockIssueBadge-UzSSOM_2.js.map} +1 -1
  44. package/dist/cdn/chunks/{BlockPreviewCanvas-DPtiMsVz.js → BlockPreviewCanvas-DStQFo9P.js} +42 -42
  45. package/dist/cdn/chunks/{BlockPreviewCanvas-DPtiMsVz.js.map → BlockPreviewCanvas-DStQFo9P.js.map} +1 -1
  46. package/dist/cdn/chunks/CloudHeaderExtras-BZVu7dnO.js +60 -0
  47. package/dist/cdn/chunks/CloudHeaderExtras-BZVu7dnO.js.map +1 -0
  48. package/dist/cdn/chunks/CloudPanels-CXbaBKHQ.js +227 -0
  49. package/dist/cdn/chunks/CloudPanels-CXbaBKHQ.js.map +1 -0
  50. package/dist/cdn/chunks/{CollaboratorBar-BF469_AN.js → CollaboratorBar-BH_lZlat.js} +22 -22
  51. package/dist/cdn/chunks/CollaboratorBar-BH_lZlat.js.map +1 -0
  52. package/dist/cdn/chunks/ColorPicker-CStXen0Y.js +502 -0
  53. package/dist/cdn/chunks/ColorPicker-CStXen0Y.js.map +1 -0
  54. package/dist/cdn/chunks/CommentsPanel-jzZ2X0P4.js +20 -0
  55. package/dist/cdn/chunks/CommentsPanel-jzZ2X0P4.js.map +1 -0
  56. package/dist/cdn/chunks/CommentsSidebar-Dxke-vUP.js +460 -0
  57. package/dist/cdn/chunks/CommentsSidebar-Dxke-vUP.js.map +1 -0
  58. package/dist/{CountdownBlock-DuyvGcr8.js → cdn/chunks/CountdownBlock-BYSrJWxg.js} +25 -23
  59. package/dist/cdn/chunks/{CountdownBlock-vLTkTI9e.js.map → CountdownBlock-BYSrJWxg.js.map} +1 -1
  60. package/dist/{CountdownToolbar-CBE9wRaV.js → cdn/chunks/CountdownToolbar-CZPtQIb8.js} +66 -63
  61. package/dist/cdn/chunks/{CountdownToolbar-DPjcgcVR.js.map → CountdownToolbar-CZPtQIb8.js.map} +1 -1
  62. package/dist/cdn/chunks/{DesignReferenceSidebar-B-HFXV0W.js → DesignReferenceSidebar-sZWciECR.js} +64 -64
  63. package/dist/cdn/chunks/DesignReferenceSidebar-sZWciECR.js.map +1 -0
  64. package/dist/cdn/chunks/{IssuesPanel-DKTS4QVb.js → IssuesPanel-CHtetM9i.js} +36 -36
  65. package/dist/cdn/chunks/IssuesPanel-CHtetM9i.js.map +1 -0
  66. package/dist/cdn/chunks/{LoadingTrack-C52ZGL5q.js → LoadingTrack-Dp_QZvAK.js} +3 -3
  67. package/dist/cdn/chunks/{LoadingTrack-C52ZGL5q.js.map → LoadingTrack-Dp_QZvAK.js.map} +1 -1
  68. package/dist/cdn/chunks/{MergeTagModeToggle-DQ79SqQc.js → MergeTagModeToggle-ZwW-5EeN.js} +39 -39
  69. package/dist/cdn/chunks/{MergeTagModeToggle-DQ79SqQc.js.map → MergeTagModeToggle-ZwW-5EeN.js.map} +1 -1
  70. package/dist/cdn/chunks/{MergeTagSuggestion-Dn8dExNa.js → MergeTagSuggestion-DhllqTA3.js} +47 -47
  71. package/dist/cdn/chunks/MergeTagSuggestion-DhllqTA3.js.map +1 -0
  72. package/dist/{NumberWithSuffix-D37ZWiZh.js → cdn/chunks/NumberWithSuffix-yeQLcCyH.js} +37 -35
  73. package/dist/cdn/chunks/NumberWithSuffix-yeQLcCyH.js.map +1 -0
  74. package/dist/cdn/chunks/{ParagraphEditor-Bzcma_Lm.js → ParagraphEditor-BJJ925sx.js} +235 -233
  75. package/dist/cdn/chunks/ParagraphEditor-BJJ925sx.js.map +1 -0
  76. package/dist/cdn/chunks/RestoreVersionDialog-B0Jadu6F.js +87 -0
  77. package/dist/cdn/chunks/RestoreVersionDialog-B0Jadu6F.js.map +1 -0
  78. package/dist/cdn/chunks/{RichTextEditorContent-DtL49Jpo.js → RichTextEditorContent-CfSq2wPR.js} +44 -44
  79. package/dist/cdn/chunks/RichTextEditorContent-CfSq2wPR.js.map +1 -0
  80. package/dist/cdn/chunks/SaveBlockDialog-C1DXh6P9.js +265 -0
  81. package/dist/cdn/chunks/SaveBlockDialog-C1DXh6P9.js.map +1 -0
  82. package/dist/cdn/chunks/{SavedBlocksBrowserModal-C59D4G5C.js → SavedBlocksBrowserModal-BerMxAUt.js} +114 -113
  83. package/dist/cdn/chunks/SavedBlocksBrowserModal-BerMxAUt.js.map +1 -0
  84. package/dist/{SavedBlocksPanels-CQsZvWO_.js → cdn/chunks/SavedBlocksPanels-BUE4lzVP.js} +11 -9
  85. package/dist/cdn/chunks/{SavedBlocksPanels-e4HyTZ8v.js.map → SavedBlocksPanels-BUE4lzVP.js.map} +1 -1
  86. package/dist/cdn/chunks/{SavedBlocksPickBar-DMHxPCM4.js → SavedBlocksPickBar-4HrqQfvl.js} +17 -17
  87. package/dist/cdn/chunks/SavedBlocksPickBar-4HrqQfvl.js.map +1 -0
  88. package/dist/cdn/chunks/{TemplateScoringPanel-NucRtAP0.js → TemplateScoringPanel-Xdkp2EMY.js} +81 -81
  89. package/dist/cdn/chunks/TemplateScoringPanel-Xdkp2EMY.js.map +1 -0
  90. package/dist/cdn/chunks/TestEmailModal-yfmFiavR.js +206 -0
  91. package/dist/cdn/chunks/TestEmailModal-yfmFiavR.js.map +1 -0
  92. package/dist/{TestEmailPanel-B6goIAxT.js → cdn/chunks/TestEmailPanel-DqTDh5ri.js} +6 -4
  93. package/dist/cdn/chunks/{TestEmailPanel-CZAG1gQE.js.map → TestEmailPanel-DqTDh5ri.js.map} +1 -1
  94. package/dist/cdn/chunks/{TitleEditor-D0_LY2Ex.js → TitleEditor-nUAF7fKr.js} +85 -84
  95. package/dist/cdn/chunks/TitleEditor-nUAF7fKr.js.map +1 -0
  96. package/dist/cdn/chunks/TplModal-C0IqikoV.js +50 -0
  97. package/dist/cdn/chunks/TplModal-C0IqikoV.js.map +1 -0
  98. package/dist/cdn/chunks/VersionHistoryMenu-_MAj3qZj.js +148 -0
  99. package/dist/cdn/chunks/VersionHistoryMenu-_MAj3qZj.js.map +1 -0
  100. package/dist/cdn/chunks/VersionHistoryPanels-6Hz9w20W.js +48 -0
  101. package/dist/cdn/chunks/VersionHistoryPanels-6Hz9w20W.js.map +1 -0
  102. package/dist/cdn/chunks/VersionPreviewBanner-D098_6_I.js +40 -0
  103. package/dist/cdn/chunks/VersionPreviewBanner-D098_6_I.js.map +1 -0
  104. package/dist/cdn/chunks/{blockTypeIcons-FXlMM3PL.js → blockTypeIcons-hX_W4dqo.js} +2 -2
  105. package/dist/cdn/chunks/{blockTypeIcons-FXlMM3PL.js.map → blockTypeIcons-hX_W4dqo.js.map} +1 -1
  106. package/dist/cdn/chunks/{ca-D1zgI9fQ.js → ca-Cqg9O8mx.js} +70 -7
  107. package/dist/cdn/chunks/ca-Cqg9O8mx.js.map +1 -0
  108. package/dist/{cloud-qINCmQbn.js → cdn/chunks/cloud-BA0OpRh-.js} +400 -609
  109. package/dist/cdn/chunks/cloud-BA0OpRh-.js.map +1 -0
  110. package/dist/cdn/chunks/createCloudRuntime-DmzV7OnU.js +344 -0
  111. package/dist/cdn/chunks/createCloudRuntime-DmzV7OnU.js.map +1 -0
  112. package/dist/{de-DHra3lvx.js → cdn/chunks/de-BXmeeFbX.js} +71 -6
  113. package/dist/cdn/chunks/de-BXmeeFbX.js.map +1 -0
  114. package/dist/{de-uVoSP1xF.js → cdn/chunks/de-Dbwm2cON.js} +3 -54
  115. package/dist/cdn/chunks/de-Dbwm2cON.js.map +1 -0
  116. package/dist/cdn/chunks/{dist-B2HKGHnc.js → dist-CM8TB0VD.js} +136 -136
  117. package/dist/cdn/chunks/{dist-B2HKGHnc.js.map → dist-CM8TB0VD.js.map} +1 -1
  118. package/dist/cdn/chunks/{dist-C6z8AjBC.js → dist-CYLJiSiH.js} +63 -63
  119. package/dist/cdn/chunks/{dist-C6z8AjBC.js.map → dist-CYLJiSiH.js.map} +1 -1
  120. package/dist/cdn/chunks/{draggable-DCs9qL-b.js → draggable-BfpsXFg7.js} +916 -905
  121. package/dist/cdn/chunks/{draggable-DCs9qL-b.js.map → draggable-BfpsXFg7.js.map} +1 -1
  122. package/dist/cdn/chunks/{en-DlqX2YWZ.js → en-DbBNy67B.js} +70 -7
  123. package/dist/cdn/chunks/en-DbBNy67B.js.map +1 -0
  124. package/dist/{en-CjhsJxb-.js → cdn/chunks/en-Dzw4EqNI.js} +3 -54
  125. package/dist/cdn/chunks/en-Dzw4EqNI.js.map +1 -0
  126. package/dist/cdn/chunks/{es-Cuss2snv.js → es-JUsAjxWu.js} +70 -7
  127. package/dist/cdn/chunks/es-JUsAjxWu.js.map +1 -0
  128. package/dist/cdn/chunks/{extensions-C7h52yuk.js → extensions-CMcVw2uu.js} +81 -67
  129. package/dist/cdn/chunks/extensions-CMcVw2uu.js.map +1 -0
  130. package/dist/{fr-Cm85vB2g.js → cdn/chunks/fr-J3qgXH4h.js} +71 -6
  131. package/dist/cdn/chunks/fr-J3qgXH4h.js.map +1 -0
  132. package/dist/cdn/chunks/{icons-CvYN6zrM.js → icons-C36Ha5VU.js} +11 -11
  133. package/dist/cdn/chunks/{icons-CvYN6zrM.js.map → icons-C36Ha5VU.js.map} +1 -1
  134. package/dist/{keys-fwF3qZax.js → cdn/chunks/keys-CbQuRX85.js} +6 -4
  135. package/dist/cdn/chunks/keys-CbQuRX85.js.map +1 -0
  136. package/dist/cdn/chunks/logger-ByvdoAwq.js +23 -0
  137. package/dist/cdn/chunks/logger-ByvdoAwq.js.map +1 -0
  138. package/dist/cdn/chunks/{nl-dmiIX7oT.js → nl-D_4DkqOi.js} +70 -7
  139. package/dist/cdn/chunks/nl-D_4DkqOi.js.map +1 -0
  140. package/dist/cdn/chunks/preRenderCustomBlocks-CbA3RcAy.js +23 -0
  141. package/dist/cdn/chunks/preRenderCustomBlocks-CbA3RcAy.js.map +1 -0
  142. package/dist/{pt-BR-CTzHTqJD.js → cdn/chunks/pt-BR-BxzQzWGJ.js} +3 -54
  143. package/dist/cdn/chunks/pt-BR-BxzQzWGJ.js.map +1 -0
  144. package/dist/cdn/chunks/{pt-BR-CaIG-7EM.js → pt-BR-KGURyEEQ.js} +70 -7
  145. package/dist/cdn/chunks/pt-BR-KGURyEEQ.js.map +1 -0
  146. package/dist/cdn/chunks/{src-CUKUsRzX.js → src-BOjFLNf7.js} +148 -134
  147. package/dist/cdn/chunks/src-BOjFLNf7.js.map +1 -0
  148. package/dist/cdn/chunks/{src-xkGep9eN.js → src-Dq3fgSIx.js} +1448 -1458
  149. package/dist/cdn/chunks/src-Dq3fgSIx.js.map +1 -0
  150. package/dist/cdn/chunks/styleConstants-ByDqaYj_.js +61 -0
  151. package/dist/cdn/chunks/styleConstants-ByDqaYj_.js.map +1 -0
  152. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js +6 -0
  153. package/dist/cdn/chunks/timeouts-DHPZQ0G3.js.map +1 -0
  154. package/dist/cdn/chunks/{tiptap-C44S1Cmh.js → tiptap-DmpGap5g.js} +40 -40
  155. package/dist/cdn/chunks/{tiptap-C44S1Cmh.js.map → tiptap-DmpGap5g.js.map} +1 -1
  156. package/dist/cdn/chunks/{useAliveFlag-Dxwgo6P4.js → useAliveFlag-Dtm174fG.js} +2 -2
  157. package/dist/cdn/chunks/{useAliveFlag-Dxwgo6P4.js.map → useAliveFlag-Dtm174fG.js.map} +1 -1
  158. package/dist/cdn/chunks/{useCloudI18n-8wkJtuJD.js → useCloudI18n-NVa1aeY8.js} +5 -5
  159. package/dist/cdn/chunks/{useCloudI18n-8wkJtuJD.js.map → useCloudI18n-NVa1aeY8.js.map} +1 -1
  160. package/dist/cdn/chunks/{useEditorCore-CKQ9gmoo.js → useEditorCore-CTu_qZ3W.js} +1434 -1147
  161. package/dist/cdn/chunks/useEditorCore-CTu_qZ3W.js.map +1 -0
  162. package/dist/cdn/chunks/{useI18n-UMs0F71x.js → useI18n-DVWCJJFH.js} +5 -5
  163. package/dist/cdn/chunks/{useI18n-UMs0F71x.js.map → useI18n-DVWCJJFH.js.map} +1 -1
  164. package/dist/cdn/chunks/{useMergeTag-JmXOtpln.js → useMergeTag-BfZBRPQp.js} +4 -4
  165. package/dist/cdn/chunks/{useMergeTag-JmXOtpln.js.map → useMergeTag-BfZBRPQp.js.map} +1 -1
  166. package/dist/cdn/chunks/{usePopoverPosition-cf8Y-ynK.js → usePopoverPosition-BC-HA7TK.js} +3 -3
  167. package/dist/cdn/chunks/{usePopoverPosition-cf8Y-ynK.js.map → usePopoverPosition-BC-HA7TK.js.map} +1 -1
  168. package/dist/cdn/editor.css +1 -1
  169. package/dist/cdn/editor.js +5103 -284
  170. package/dist/cdn/editor.js.map +1 -1
  171. package/dist/{check-On4TSac-.js → check-DZbmkMQe.js} +1 -1
  172. package/dist/{chevron-down-69EiBGoB.js → chevron-down-nYScOLeZ.js} +1 -1
  173. package/dist/{chevron-up-Dh3MG1Dw.js → chevron-up-CpYpDLnc.js} +1 -1
  174. package/dist/{circle-alert-cilwzafX.js → circle-alert-CuuK6thq.js} +1 -1
  175. package/dist/{clock-Dt0APH92.js → clock-DxkrtqOr.js} +1 -1
  176. package/dist/cloud-BAefVBb_.js +1444 -0
  177. package/dist/createCloudRuntime-Bt8W-ajI.js +342 -0
  178. package/dist/{createLucideIcon-C8WzBYCv.js → createLucideIcon-L-wQXW_R.js} +9 -9
  179. package/dist/{cdn/chunks/de-DHra3lvx.js → de-BXmeeFbX.js} +69 -8
  180. package/dist/{cdn/chunks/de-uVoSP1xF.js → de-Dbwm2cON.js} +1 -56
  181. package/dist/dist-B5iReTtK.js +251 -0
  182. package/dist/{dist-Cl8J0IES.js → dist-Ck9roB6K.js} +42 -42
  183. package/dist/{dist-BpKxrUi2.js → dist-CqcGTIiX.js} +46 -46
  184. package/dist/{en-DlqX2YWZ.js → en-DbBNy67B.js} +69 -6
  185. package/dist/{cdn/chunks/en-CjhsJxb-.js → en-Dzw4EqNI.js} +1 -56
  186. package/dist/{es-Cuss2snv.js → es-JUsAjxWu.js} +69 -6
  187. package/dist/{extensions-DzKNPITR.js → extensions-CX87G4aL.js} +71 -57
  188. package/dist/{cdn/chunks/fr-Cm85vB2g.js → fr-J3qgXH4h.js} +69 -8
  189. package/dist/{image-up-Ceggh_R3.js → image-up-DouZRGVt.js} +1 -1
  190. package/dist/index.d.ts +499 -23
  191. package/dist/{info-DO5odBcZ.js → info-puX5V6Iq.js} +1 -1
  192. package/dist/{cdn/chunks/keys-Cmc2Yl3D.js → keys-BxixS0TN.js} +4 -6
  193. package/dist/{list-checks-BSkPKbuI.js → list-checks-jw-ZlvWY.js} +1 -1
  194. package/dist/{loader-circle-bO7o7_HD.js → loader-circle-DqTxB7Kr.js} +1 -1
  195. package/dist/logger-BBlvSn6q.js +21 -0
  196. package/dist/{message-circle-BEkAk65X.js → message-circle-BZ7YpB22.js} +1 -1
  197. package/dist/{nl-dmiIX7oT.js → nl-D_4DkqOi.js} +69 -6
  198. package/dist/{pencil-t6m0EtKL.js → pencil-DmbRhTJu.js} +1 -1
  199. package/dist/preRenderCustomBlocks-BebjKtmw.js +21 -0
  200. package/dist/{cdn/chunks/pt-BR-CTzHTqJD.js → pt-BR-BxzQzWGJ.js} +1 -56
  201. package/dist/{pt-BR-CaIG-7EM.js → pt-BR-KGURyEEQ.js} +69 -6
  202. package/dist/{refresh-cw-CkOYVzK5.js → refresh-cw-OK_O-cL0.js} +1 -1
  203. package/dist/{runtime-dom.esm-bundler-CepEmvwF.js → runtime-dom.esm-bundler-BgKXIPLV.js} +144 -144
  204. package/dist/{scan-line-DwSVj25O.js → scan-line-DyaSTsJ5.js} +1 -1
  205. package/dist/{send-CWsWN8PQ.js → send-B-wasJJC.js} +1 -1
  206. package/dist/{shield-check-qje8Kufw.js → shield-check-DUIyRrTo.js} +1 -1
  207. package/dist/{sparkles-DumaWRW-.js → sparkles-DYEMATWC.js} +1 -1
  208. package/dist/style.css +1 -1
  209. package/dist/styleConstants-ByDqaYj_.js +59 -0
  210. package/dist/templatical-editor.js +5303 -289
  211. package/dist/{text-align-start-Ir8Ah4mT.js → text-align-start-CzjLeBLe.js} +1 -1
  212. package/dist/timeouts-DHPZQ0G3.js +4 -0
  213. package/dist/{trash-2-CklAFCmO.js → trash-2-C0shEPry.js} +1 -1
  214. package/dist/{triangle-alert-BBi4n93g.js → triangle-alert-Fw0ce8oQ.js} +1 -1
  215. package/dist/{upload-sVqqppuv.js → upload-D69C2CBx.js} +3 -4
  216. package/dist/{useAliveFlag-cvyBxHp7.js → useAliveFlag-BGIAZii_.js} +1 -1
  217. package/dist/{useCloudI18n-DKVm6PCa.js → useCloudI18n-CAZTZ9_a.js} +2 -2
  218. package/dist/{useEditorCore-idmPLUeb.js → useEditorCore-B-kONNRw.js} +1604 -1320
  219. package/dist/{useI18n-DoVKdCTH.js → useI18n-BfXff_Sy.js} +2 -2
  220. package/dist/{useMergeTag-CYZk7dZD.js → useMergeTag-Dd4I7kge.js} +3 -3
  221. package/dist/usePopoverPosition-CxhCX3SQ.js +59 -0
  222. package/dist/{vue.runtime.esm-bundler-D1diBMsm.js → vue.runtime.esm-bundler-DzEsDRtY.js} +447 -436
  223. package/dist/{x-Mby7KlhS.js → x-BjTlFqRv.js} +1 -1
  224. package/package.json +7 -7
  225. package/dist/AiFeatureMenu-BY6mubnR.js +0 -63
  226. package/dist/BlockPreviewCanvas-DbNOqSI1.js +0 -121
  227. package/dist/CloudEditor-DEnMNMbm.js +0 -1188
  228. package/dist/ColorPicker-ClETsjA3.js +0 -550
  229. package/dist/CommentsSidebar-CdRCCSDD.js +0 -435
  230. package/dist/SaveBlockDialog-fVp_PwZi.js +0 -265
  231. package/dist/SnapshotHistory-DjA3Ej_i.js +0 -128
  232. package/dist/TestEmailModal-EM0RP_9L.js +0 -205
  233. package/dist/TitleEditor-JEaP9jVF.js +0 -197
  234. package/dist/TplModal-DoneXIj_.js +0 -49
  235. package/dist/cdn/chunks/AiChatSidebar-CQ8KUmNB.js.map +0 -1
  236. package/dist/cdn/chunks/AiFeatureMenu-Cwj8afsi.js +0 -63
  237. package/dist/cdn/chunks/AiFeatureMenu-Cwj8afsi.js.map +0 -1
  238. package/dist/cdn/chunks/CloudEditor-CQ830jJt.js +0 -1166
  239. package/dist/cdn/chunks/CloudEditor-CQ830jJt.js.map +0 -1
  240. package/dist/cdn/chunks/CollaboratorBar-BF469_AN.js.map +0 -1
  241. package/dist/cdn/chunks/ColorPicker-W_UyiVGc.js +0 -552
  242. package/dist/cdn/chunks/ColorPicker-W_UyiVGc.js.map +0 -1
  243. package/dist/cdn/chunks/CommentsSidebar-BLRZRSSC.js +0 -412
  244. package/dist/cdn/chunks/CommentsSidebar-BLRZRSSC.js.map +0 -1
  245. package/dist/cdn/chunks/DesignReferenceSidebar-B-HFXV0W.js.map +0 -1
  246. package/dist/cdn/chunks/IssuesPanel-DKTS4QVb.js.map +0 -1
  247. package/dist/cdn/chunks/MergeTagSuggestion-Dn8dExNa.js.map +0 -1
  248. package/dist/cdn/chunks/NumberWithSuffix-BXrRdfq1.js.map +0 -1
  249. package/dist/cdn/chunks/ParagraphEditor-Bzcma_Lm.js.map +0 -1
  250. package/dist/cdn/chunks/RichTextEditorContent-DtL49Jpo.js.map +0 -1
  251. package/dist/cdn/chunks/SaveBlockDialog-BfNVeXXV.js +0 -264
  252. package/dist/cdn/chunks/SaveBlockDialog-BfNVeXXV.js.map +0 -1
  253. package/dist/cdn/chunks/SavedBlocksBrowserModal-C59D4G5C.js.map +0 -1
  254. package/dist/cdn/chunks/SavedBlocksPickBar-DMHxPCM4.js.map +0 -1
  255. package/dist/cdn/chunks/SnapshotHistory-80tAU_VX.js +0 -121
  256. package/dist/cdn/chunks/SnapshotHistory-80tAU_VX.js.map +0 -1
  257. package/dist/cdn/chunks/TemplateScoringPanel-NucRtAP0.js.map +0 -1
  258. package/dist/cdn/chunks/TestEmailModal-DdWfAGNe.js +0 -205
  259. package/dist/cdn/chunks/TestEmailModal-DdWfAGNe.js.map +0 -1
  260. package/dist/cdn/chunks/TitleEditor-D0_LY2Ex.js.map +0 -1
  261. package/dist/cdn/chunks/TplModal-iCmoKB2k.js +0 -50
  262. package/dist/cdn/chunks/TplModal-iCmoKB2k.js.map +0 -1
  263. package/dist/cdn/chunks/ca-D1zgI9fQ.js.map +0 -1
  264. package/dist/cdn/chunks/cloud-DcC8bPwn.js +0 -1787
  265. package/dist/cdn/chunks/cloud-DcC8bPwn.js.map +0 -1
  266. package/dist/cdn/chunks/de-DHra3lvx.js.map +0 -1
  267. package/dist/cdn/chunks/de-uVoSP1xF.js.map +0 -1
  268. package/dist/cdn/chunks/en-CjhsJxb-.js.map +0 -1
  269. package/dist/cdn/chunks/en-DlqX2YWZ.js.map +0 -1
  270. package/dist/cdn/chunks/es-Cuss2snv.js.map +0 -1
  271. package/dist/cdn/chunks/extensions-C7h52yuk.js.map +0 -1
  272. package/dist/cdn/chunks/fr-Cm85vB2g.js.map +0 -1
  273. package/dist/cdn/chunks/keys-Cmc2Yl3D.js.map +0 -1
  274. package/dist/cdn/chunks/nl-dmiIX7oT.js.map +0 -1
  275. package/dist/cdn/chunks/pt-BR-CTzHTqJD.js.map +0 -1
  276. package/dist/cdn/chunks/pt-BR-CaIG-7EM.js.map +0 -1
  277. package/dist/cdn/chunks/src-CUKUsRzX.js.map +0 -1
  278. package/dist/cdn/chunks/src-xkGep9eN.js.map +0 -1
  279. package/dist/cdn/chunks/styles-CND3ey2g.js +0 -4140
  280. package/dist/cdn/chunks/styles-CND3ey2g.js.map +0 -1
  281. package/dist/cdn/chunks/timeouts-SsLMC4a3.js +0 -6
  282. package/dist/cdn/chunks/timeouts-SsLMC4a3.js.map +0 -1
  283. package/dist/cdn/chunks/useEditorCore-CKQ9gmoo.js.map +0 -1
  284. package/dist/styles-BK36D1sy.js +0 -4318
  285. package/dist/usePopoverPosition-C0dPEF4X.js +0 -308
@@ -1,55 +1,63 @@
1
- import { $ as e, A as t, C as n, F as r, G as i, H as a, J as o, K as s, L as c, M as l, N as u, O as d, P as f, T as p, U as m, V as h, X as g, Y as _, Z as v, at as y, b, c as x, ct as S, f as C, g as w, h as T, it as E, k as D, l as O, lt as k, m as A, nt as j, p as M, rt as N, s as P, st as F, t as ee, u as I, v as L, x as R, y as z, z as B } from "./draggable-DCs9qL-b.js";
2
- import "./timeouts-SsLMC4a3.js";
3
- import { A as te, B as ne, C as re, D as ie, E as ae, F as oe, H as se, I as ce, L as V, M as le, N as ue, O as de, P as fe, R as pe, S as me, T as he, _ as ge, a as _e, b as ve, d as ye, et as be, f as xe, g as Se, h as Ce, i as H, j as we, k as Te, l as Ee, m as De, n as Oe, o as ke, p as Ae, r as je, s as Me, t as Ne, tt as Pe, u as Fe, w as Ie, z as Le } from "./src-B_QJduQD.js";
4
- import { _ as Re, h as ze, v as Be, y as Ve } from "./dist-C6z8AjBC.js";
5
- import { a as U, c as He, i as Ue, r as We } from "./dist-B2HKGHnc.js";
6
- import { A as Ge, B as Ke, C as qe, D as Je, E as W, F as Ye, G as Xe, H as Ze, I as Qe, L as $e, M as et, N as tt, O as nt, P as rt, S as it, T as at, U as ot, V as st, W as G, _ as ct, a as lt, b as ut, c as dt, f as ft, g as K, h as pt, 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 } from "./keys-Cmc2Yl3D.js";
7
- import { t as q } from "./useI18n-UMs0F71x.js";
8
- import { a as Dt, i as Ot, o as kt, r as J, t as At } from "./usePopoverPosition-cf8Y-ynK.js";
9
- import { A as jt, Bt as Mt, Et as Nt, H as Pt, Ot as Ft, Tt as It, X as Lt, d as Rt, ft as zt, ht as Bt, it as Vt, o as Ht, s as Ut, tt as Wt, u as Gt, v as Kt, vt as qt, zt as Jt } from "./icons-CvYN6zrM.js";
10
- import { t as Yt } from "./LoadingTrack-C52ZGL5q.js";
11
- import { t as Xt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
12
- import "./useCloudI18n-8wkJtuJD.js";
13
- import { t as Y } from "./useMergeTag-JmXOtpln.js";
14
- import { t as Zt } from "./useAliveFlag-Dxwgo6P4.js";
1
+ 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, Q as l, R as u, S as d, U as f, W as p, X as m, Y as h, Z as g, at as _, b as v, c as y, ct as b, et as x, f as S, g as C, h as w, it as T, j as E, k as D, l as O, lt as k, m as A, ot as j, p as M, q as N, rt as P, s as F, t as I, u as L, ut as R, w as z, x as B, y as V } from "./draggable-BfpsXFg7.js";
2
+ import { A as ee, B as te, C as ne, D as re, E as ie, F as ae, H as oe, I as se, L as H, M as ce, N as le, O as ue, P as de, R as fe, S as pe, T as me, _ as he, a as ge, b as _e, d as ve, et 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, o as Oe, p as ke, r as Ae, s as je, t as W, tt as Me, u as Ne, w as Pe, z as Fe } from "./src-B_QJduQD.js";
3
+ import { _ as Ie, h as Le, v as Re, y as ze } from "./dist-CYLJiSiH.js";
4
+ import { a as G, c as Be, i as Ve, r as He } from "./dist-CM8TB0VD.js";
5
+ import { A as Ue, B as We, C as Ge, D as Ke, E as qe, F as Je, H as Ye, I as Xe, M as Ze, N as Qe, O as $e, P as et, S as tt, T as K, U as q, V as nt, W as rt, _ as it, a as at, b as ot, c as st, d as ct, f as lt, g as ut, h as J, j as dt, k as ft, m as pt, n as mt, o as ht, p as gt, r as _t, s as vt, u as yt, v as bt, w as xt, x as St, y as Ct, z as wt } from "./keys-CbQuRX85.js";
6
+ import "./timeouts-DHPZQ0G3.js";
7
+ import { t as Y } from "./useI18n-DVWCJJFH.js";
8
+ import { t as X } from "./logger-ByvdoAwq.js";
9
+ import { a as Tt, i as Et, o as Dt, r as Z, t as Ot } from "./usePopoverPosition-BC-HA7TK.js";
10
+ import { A as kt, Bt as At, Et as jt, H as Mt, Ot as Nt, Tt as Pt, X as Ft, d as It, ft as Lt, ht as Rt, it as zt, o as Bt, s as Vt, tt as Ht, u as Ut, v as Wt, vt as Gt, zt as Kt } from "./icons-C36Ha5VU.js";
11
+ import { t as qt } from "./LoadingTrack-Dp_QZvAK.js";
12
+ import { t as Jt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
13
+ import "./useCloudI18n-NVa1aeY8.js";
14
+ import { t as Q } from "./useMergeTag-BfZBRPQp.js";
15
+ import { t as Yt } from "./useAliveFlag-Dtm174fG.js";
15
16
  //#region ../core/src/editor.ts
16
- function Qt(e) {
17
+ function Xt(e) {
17
18
  return e === "1" ? 1 : e === "3" ? 3 : 2;
18
19
  }
19
- function $t(e) {
20
- let t = _({
21
- content: e.content ?? pe(e.defaultFontFamily, e.templateDefaults),
20
+ function Zt(e) {
21
+ let t = m({
22
+ template: null,
23
+ content: e.content ?? fe(e.defaultFontFamily, e.templateDefaults),
22
24
  selectedBlockId: null,
23
25
  viewport: "desktop",
24
26
  darkMode: !1,
25
27
  previewMode: !1,
26
28
  isDirty: !1,
29
+ isSaving: !1,
30
+ isLoading: !1,
27
31
  uiTheme: "auto"
28
- }), n = m({
32
+ }), n = 0;
33
+ function r() {
34
+ t.isDirty = !0, n++;
35
+ }
36
+ let i = p({
29
37
  get: () => t.content,
30
38
  set: (e) => {
31
- t.content = e, t.isDirty = !0;
39
+ t.content = e, r();
32
40
  }
33
- }), r = m(() => t.selectedBlockId ? i(t.content.blocks, t.selectedBlockId) : null);
34
- function i(e, t) {
41
+ }), a = p(() => t.selectedBlockId ? o(t.content.blocks, t.selectedBlockId) : null);
42
+ function o(e, t) {
35
43
  for (let n of e) {
36
44
  if (n.id === t) return n;
37
45
  if (n.type === "section") for (let e of n.children) {
38
- let n = i(e, t);
46
+ let n = o(e, t);
39
47
  if (n) return n;
40
48
  }
41
49
  }
42
50
  return null;
43
51
  }
44
- function a(e, t) {
45
- if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) a(e, t);
52
+ function s(e, t) {
53
+ if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) s(e, t);
46
54
  }
47
- function o(e, t, n = { blocks: e }) {
55
+ function c(e, t, n = { blocks: e }) {
48
56
  for (let r = 0; r < e.length; r++) {
49
57
  let i = e[r];
50
58
  if (i.id === t) return n;
51
59
  if (i.type === "section") for (let e = 0; e < i.children.length; e++) {
52
- let n = o(i.children[e], t, {
60
+ let n = c(i.children[e], t, {
53
61
  blocks: i.children[e],
54
62
  sectionId: i.id,
55
63
  columnIndex: e
@@ -59,11 +67,11 @@ function $t(e) {
59
67
  }
60
68
  return null;
61
69
  }
62
- function s(t) {
70
+ function l(t) {
63
71
  return e.lockedBlocks?.value.has(t) ?? !1;
64
72
  }
65
- function c(e) {
66
- let n = o(t.content.blocks, e);
73
+ function u(e) {
74
+ let n = c(t.content.blocks, e);
67
75
  if (!n) return null;
68
76
  let r = n.blocks.findIndex((t) => t.id === e);
69
77
  return r === -1 ? null : {
@@ -72,200 +80,275 @@ function $t(e) {
72
80
  index: r
73
81
  };
74
82
  }
75
- function l(e, n = !0) {
76
- t.content = e, n && (t.isDirty = !0);
83
+ function d(e, n = !0) {
84
+ t.content = e, n && r();
77
85
  }
78
- function u(e) {
79
- e && s(e) || (t.selectedBlockId = e);
86
+ function f(e) {
87
+ e && l(e) || (t.selectedBlockId = e);
80
88
  }
81
- function d(e) {
89
+ function h(e) {
82
90
  t.viewport = e;
83
91
  }
84
- function f(e) {
92
+ function _(e) {
85
93
  t.darkMode = e;
86
94
  }
87
- function p(e) {
95
+ function v(e) {
88
96
  t.uiTheme = e;
89
97
  }
90
- function h(e) {
98
+ function y(e) {
91
99
  t.previewMode = e, e && (t.selectedBlockId = null);
92
100
  }
93
- function v(e, n) {
94
- if (s(e)) return;
95
- let r = i(t.content.blocks, e);
96
- r && (Object.assign(r, n), t.isDirty = !0);
101
+ function b(e, n) {
102
+ if (l(e)) return;
103
+ let i = o(t.content.blocks, e);
104
+ i && (Object.assign(i, n), r());
97
105
  }
98
- function y(e) {
106
+ function x(e) {
99
107
  t.content.settings = {
100
108
  ...t.content.settings,
101
109
  ...e
102
- }, t.isDirty = !0;
110
+ }, r();
103
111
  }
104
- function b(e, n, r = 0, a) {
112
+ function S(e, n, i = 0, a) {
105
113
  if (!(n && e.type === "section")) {
106
114
  if (n) {
107
- if (s(n)) return;
108
- let o = i(t.content.blocks, n);
109
- if (o && o.type === "section") {
110
- if (r < 0 || r >= Qt(o.columns)) return;
111
- o.children[r] = o.children[r] || [];
112
- let t = o.children[r];
115
+ if (l(n)) return;
116
+ let r = o(t.content.blocks, n);
117
+ if (r && r.type === "section") {
118
+ if (i < 0 || i >= Xt(r.columns)) return;
119
+ r.children[i] = r.children[i] || [];
120
+ let t = r.children[i];
113
121
  a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
114
122
  }
115
123
  } else a !== void 0 && a < t.content.blocks.length ? t.content.blocks.splice(a, 0, e) : t.content.blocks.push(e);
116
- t.isDirty = !0;
124
+ r();
117
125
  }
118
126
  }
119
- function x(e) {
120
- if (s(e)) return;
121
- let n = o(t.content.blocks, e);
127
+ function C(e) {
128
+ if (l(e)) return;
129
+ let n = c(t.content.blocks, e);
122
130
  if (n) {
123
- let r = n.blocks.findIndex((t) => t.id === e);
124
- if (r !== -1) {
125
- let [e] = n.blocks.splice(r, 1);
131
+ let i = n.blocks.findIndex((t) => t.id === e);
132
+ if (i !== -1) {
133
+ let [e] = n.blocks.splice(i, 1);
126
134
  if (t.selectedBlockId) {
127
135
  let n = /* @__PURE__ */ new Set();
128
- a(e, n), n.has(t.selectedBlockId) && (t.selectedBlockId = null);
136
+ s(e, n), n.has(t.selectedBlockId) && (t.selectedBlockId = null);
129
137
  }
130
- t.isDirty = !0;
138
+ r();
131
139
  }
132
140
  }
133
141
  }
134
- function S(e, n, r, a = 0) {
135
- if (s(e) || r && s(r)) return;
136
- let c = o(t.content.blocks, e);
137
- if (!c) return;
138
- let l = c.blocks.findIndex((t) => t.id === e);
139
- if (l === -1 || r && c.blocks[l].type === "section") return;
140
- let u;
141
- if (r) {
142
- let e = i(t.content.blocks, r);
143
- if (!e || e.type !== "section" || a < 0 || a >= Qt(e.columns)) return;
144
- e.children[a] = e.children[a] || [], u = e.children[a];
145
- } else u = t.content.blocks;
146
- let [d] = c.blocks.splice(l, 1);
147
- u.splice(n, 0, d), t.isDirty = !0;
142
+ function w(e, n, i, a = 0) {
143
+ if (l(e) || i && l(i)) return;
144
+ let s = c(t.content.blocks, e);
145
+ if (!s) return;
146
+ let u = s.blocks.findIndex((t) => t.id === e);
147
+ if (u === -1 || i && s.blocks[u].type === "section") return;
148
+ let d;
149
+ if (i) {
150
+ let e = o(t.content.blocks, i);
151
+ if (!e || e.type !== "section" || a < 0 || a >= Xt(e.columns)) return;
152
+ e.children[a] = e.children[a] || [], d = e.children[a];
153
+ } else d = t.content.blocks;
154
+ let [f] = s.blocks.splice(u, 1);
155
+ d.splice(n, 0, f), r();
156
+ }
157
+ function T() {
158
+ r();
159
+ }
160
+ function E(e, t) {
161
+ throw new W(`[Templatical] Templates: ${e} ${t}`);
162
+ }
163
+ function D(t) {
164
+ let { templates: n } = e;
165
+ return n || E(t, "needs a templates provider. Pass one as `init({ templates })` to enable saving and loading."), n;
166
+ }
167
+ function O(e) {
168
+ t.template && (t.template = {
169
+ ...t.template,
170
+ name: e
171
+ }, r());
172
+ }
173
+ async function k(r) {
174
+ let { create: i } = D("create()");
175
+ typeof i != "function" && E("create()", "is disabled by the provider — its `create` is `false`."), t.isLoading = !0;
176
+ try {
177
+ r?.content && (t.content = r.content);
178
+ let e = n, a = await i(r?.name === void 0 ? { content: t.content } : {
179
+ name: r.name,
180
+ content: t.content
181
+ });
182
+ return t.template = a, n === e && (t.isDirty = !1), a;
183
+ } catch (t) {
184
+ throw e.onError?.(t), t;
185
+ } finally {
186
+ t.isLoading = !1;
187
+ }
148
188
  }
149
- function C() {
150
- t.isDirty = !0;
189
+ async function A(n) {
190
+ let r = D("load()");
191
+ t.isLoading = !0;
192
+ try {
193
+ let e = await r.load(n);
194
+ return t.template = e, t.content = e.content, t.isDirty = !1, e;
195
+ } catch (t) {
196
+ throw e.onError?.(t), t;
197
+ } finally {
198
+ t.isLoading = !1;
199
+ }
200
+ }
201
+ async function j() {
202
+ let { save: r } = D("save()");
203
+ typeof r != "function" && E("save()", "is disabled by the provider — its `save` is `false`.");
204
+ let i = t.template;
205
+ i || E("save()", "has no template loaded. Call create() or load() first.");
206
+ let a = i.name === void 0 ? { content: t.content } : {
207
+ name: i.name,
208
+ content: t.content
209
+ };
210
+ t.isSaving = !0;
211
+ try {
212
+ let e = n, o = await r(i.id, a);
213
+ if (t.template?.id === i.id) {
214
+ let e = t.template.name;
215
+ t.template = e === i.name ? o : {
216
+ ...o,
217
+ name: e
218
+ };
219
+ }
220
+ return n === e && (t.isDirty = !1), o;
221
+ } catch (t) {
222
+ throw e.onError?.(t), t;
223
+ } finally {
224
+ t.isSaving = !1;
225
+ }
226
+ }
227
+ function M() {
228
+ return t.template?.id !== void 0;
151
229
  }
152
230
  return {
153
231
  state: g(t),
154
- content: n,
155
- selectedBlock: r,
156
- isBlockLocked: s,
157
- setContent: l,
158
- selectBlock: u,
159
- setViewport: d,
160
- setDarkMode: f,
161
- setUiTheme: p,
162
- setPreviewMode: h,
163
- updateBlock: v,
164
- updateSettings: y,
165
- addBlock: b,
166
- removeBlock: x,
167
- moveBlock: S,
168
- markDirty: C,
169
- findBlockLocation: c
232
+ content: i,
233
+ selectedBlock: a,
234
+ isBlockLocked: l,
235
+ setContent: d,
236
+ selectBlock: f,
237
+ setViewport: h,
238
+ setDarkMode: _,
239
+ setUiTheme: v,
240
+ setPreviewMode: y,
241
+ updateBlock: b,
242
+ updateSettings: x,
243
+ addBlock: S,
244
+ removeBlock: C,
245
+ moveBlock: w,
246
+ markDirty: T,
247
+ findBlockLocation: u,
248
+ setName: O,
249
+ create: k,
250
+ load: A,
251
+ save: j,
252
+ hasTemplate: M
170
253
  };
171
254
  }
172
255
  //#endregion
173
256
  //#region ../core/src/history.ts
174
- var en = 50, tn = 300, nn = 1500;
175
- function rn(e) {
176
- let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = en } = e, a = v([]), o = v([]), s = v(!1), c = null, l = null, u = m(() => a.value.length > 0), d = m(() => o.value.length > 0);
177
- function f() {
178
- return ve(t.value);
257
+ var Qt = 50, $t = 300, en = 1500;
258
+ function tn(e) {
259
+ let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = Qt } = e, a = l([]), o = l([]), s = l(!1), c = null, u = null, d = p(() => a.value.length > 0), f = p(() => o.value.length > 0);
260
+ function m() {
261
+ return _e(t.value);
179
262
  }
180
- function p(e) {
263
+ function h(e) {
181
264
  a.value.push(e), a.value.length > i && a.value.splice(0, a.value.length - i);
182
265
  }
183
- function h() {
184
- l &&= (clearTimeout(l.timeoutId), null);
185
- }
186
266
  function g() {
187
- r?.() || (h(), p(f()), o.value = []);
267
+ u &&= (clearTimeout(u.timeoutId), null);
188
268
  }
189
- function _(e) {
269
+ function _() {
270
+ r?.() || (g(), h(m()), o.value = []);
271
+ }
272
+ function v(e) {
190
273
  if (!r?.()) {
191
- if (l && l.blockId === e) {
192
- clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
193
- l = null;
194
- }, tn);
274
+ if (u && u.blockId === e) {
275
+ clearTimeout(u.timeoutId), u.timeoutId = setTimeout(() => {
276
+ u = null;
277
+ }, $t);
195
278
  return;
196
279
  }
197
- h(), p(f()), o.value = [], l = {
280
+ g(), h(m()), o.value = [], u = {
198
281
  blockId: e,
199
282
  timeoutId: setTimeout(() => {
200
- l = null;
201
- }, tn)
283
+ u = null;
284
+ }, $t)
202
285
  };
203
286
  }
204
287
  }
205
288
  function y() {
206
289
  s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
207
290
  s.value = !1, c = null;
208
- }, nn);
291
+ }, en);
209
292
  }
210
293
  function b() {
211
294
  if (a.value.length === 0) return;
212
- h();
295
+ g();
213
296
  let e = a.value.pop();
214
- o.value.push(f()), n(e, !0), y();
297
+ o.value.push(m()), n(e, !0), y();
215
298
  }
216
299
  function x() {
217
300
  if (o.value.length === 0) return;
218
- h();
301
+ g();
219
302
  let e = o.value.pop();
220
- a.value.push(f()), n(e, !0), y();
303
+ a.value.push(m()), n(e, !0), y();
221
304
  }
222
305
  function S() {
223
- a.value = [], o.value = [], h();
306
+ a.value = [], o.value = [], g();
224
307
  }
225
308
  function C() {
226
309
  S(), c &&= (clearTimeout(c), null);
227
310
  }
228
311
  return {
229
- canUndo: u,
230
- canRedo: d,
312
+ canUndo: d,
313
+ canRedo: f,
231
314
  isNavigating: s,
232
315
  undo: b,
233
316
  redo: x,
234
- record: g,
235
- recordDebounced: _,
317
+ record: _,
318
+ recordDebounced: v,
236
319
  clear: S,
237
320
  destroy: C
238
321
  };
239
322
  }
240
323
  //#endregion
241
324
  //#region ../core/src/block-actions.ts
242
- function an(e) {
325
+ function nn(e) {
243
326
  e.type === "table" ? e.rows = e.rows.map((e) => ({
244
327
  ...e,
245
- id: V(),
328
+ id: H(),
246
329
  cells: e.cells.map((e) => ({
247
330
  ...e,
248
- id: V()
331
+ id: H()
249
332
  }))
250
333
  })) : e.type === "social" ? e.icons = e.icons.map((e) => ({
251
334
  ...e,
252
- id: V()
335
+ id: H()
253
336
  })) : e.type === "menu" && (e.items = e.items.map((e) => ({
254
337
  ...e,
255
- id: V()
338
+ id: H()
256
339
  })));
257
340
  }
258
- function on(e) {
341
+ function rn(e) {
259
342
  let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
260
343
  function o(n, r, a) {
261
- let o = me(n, e.blockDefaults);
344
+ let o = pe(n, e.blockDefaults);
262
345
  return t(o, r, a), i(o.id), o;
263
346
  }
264
347
  function s(e, n, r) {
265
348
  let o = JSON.parse(JSON.stringify(e));
266
- if (o.id = V(), an(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
349
+ if (o.id = H(), nn(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
267
350
  let t = JSON.parse(JSON.stringify(e));
268
- return t.id = V(), an(t), t;
351
+ return t.id = H(), nn(t), t;
269
352
  }))), n !== void 0 || r !== void 0) t(o, n, r);
270
353
  else {
271
354
  let i = a?.(e.id) ?? null;
@@ -288,8 +371,9 @@ function on(e) {
288
371
  }
289
372
  //#endregion
290
373
  //#region ../core/src/auto-save.ts
291
- function sn(e) {
292
- let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
374
+ var an = 2e3;
375
+ function on(e) {
376
+ let { content: t, isDirty: n, onChange: r, debounce: i = an, enabled: a = !0 } = e, o = null, s = !1;
293
377
  function c() {
294
378
  return typeof a == "function" ? a() : a;
295
379
  }
@@ -310,7 +394,7 @@ function sn(e) {
310
394
  o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
311
395
  }, i));
312
396
  }
313
- let m = y(t, () => {
397
+ let m = j(t, () => {
314
398
  p();
315
399
  }, { deep: !0 });
316
400
  function h() {
@@ -326,8 +410,8 @@ function sn(e) {
326
410
  }
327
411
  //#endregion
328
412
  //#region ../core/src/condition-preview.ts
329
- function cn(e) {
330
- let t = _(/* @__PURE__ */ new Set()), n = m(() => t.size > 0);
413
+ function sn(e) {
414
+ let t = m(/* @__PURE__ */ new Set()), n = p(() => t.size > 0);
331
415
  function r(e) {
332
416
  return t.has(e);
333
417
  }
@@ -346,8 +430,8 @@ function cn(e) {
346
430
  }
347
431
  //#endregion
348
432
  //#region ../core/src/data-source-fetch.ts
349
- function ln(e) {
350
- let t = v(!1), n = v(!1), r = m(() => !!e.definition.value?.dataSource), i = m(() => r.value && !e.block.value.dataSourceFetched);
433
+ function cn(e) {
434
+ let t = l(!1), n = l(!1), r = p(() => !!e.definition.value?.dataSource), i = p(() => r.value && !e.block.value.dataSourceFetched);
351
435
  async function a() {
352
436
  let r = e.definition.value;
353
437
  if (r?.dataSource) {
@@ -378,7 +462,7 @@ function ln(e) {
378
462
  }
379
463
  //#endregion
380
464
  //#region ../core/src/history-interceptor.ts
381
- function un(e, t) {
465
+ function ln(e, t) {
382
466
  let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
383
467
  e.addBlock = (r, i, a, o) => {
384
468
  i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
@@ -394,25 +478,25 @@ function un(e, t) {
394
478
  }
395
479
  //#endregion
396
480
  //#region ../core/src/saved-blocks.ts
397
- function dn(e) {
398
- let { provider: t } = e, n = v([]), r = v(!1), i = C(() => {
481
+ function un(e) {
482
+ let { provider: t } = e, n = l([]), r = l(!1), i = S(() => {
399
483
  let e = /* @__PURE__ */ new Set();
400
484
  for (let t of n.value) {
401
485
  let n = t.category?.trim();
402
486
  n && e.add(n);
403
487
  }
404
488
  return [...e].sort((e, t) => e.localeCompare(t));
405
- }), a = C(() => typeof t.create == "function"), o = C(() => typeof t.update == "function"), s = C(() => typeof t.delete == "function");
489
+ }), a = S(() => typeof t.create == "function"), o = S(() => typeof t.update == "function"), s = S(() => typeof t.delete == "function");
406
490
  function c(e) {
407
491
  return o.value && e.canUpdate !== !1;
408
492
  }
409
- function l(e) {
493
+ function u(e) {
410
494
  return s.value && e.canDelete !== !1;
411
495
  }
412
- function u(e, t) {
413
- throw new Ne(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
496
+ function d(e, t) {
497
+ throw new W(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
414
498
  }
415
- async function d(i) {
499
+ async function f(i) {
416
500
  r.value = !0;
417
501
  try {
418
502
  n.value = await t.list(i);
@@ -422,9 +506,9 @@ function dn(e) {
422
506
  r.value = !1;
423
507
  }
424
508
  }
425
- async function f(r, i, a) {
509
+ async function p(r, i, a) {
426
510
  let { create: o } = t;
427
- typeof o != "function" && u("create", "disabled by the provider");
511
+ typeof o != "function" && d("create", "disabled by the provider");
428
512
  try {
429
513
  let e = await o(a ? {
430
514
  name: r,
@@ -439,11 +523,11 @@ function dn(e) {
439
523
  throw e.onError?.(t), t;
440
524
  }
441
525
  }
442
- async function p(r, i) {
526
+ async function m(r, i) {
443
527
  let { update: a } = t;
444
- typeof a != "function" && u("update", "disabled by the provider");
528
+ typeof a != "function" && d("update", "disabled by the provider");
445
529
  let o = n.value.find((e) => e.id === r);
446
- o && o.canUpdate === !1 && u("update", `not permitted for entry "${r}"`);
530
+ o && o.canUpdate === !1 && d("update", `not permitted for entry "${r}"`);
447
531
  try {
448
532
  let e = await a(r, i);
449
533
  return n.value = n.value.map((t) => t.id === r ? e : t), e;
@@ -451,11 +535,11 @@ function dn(e) {
451
535
  throw e.onError?.(t), t;
452
536
  }
453
537
  }
454
- async function m(r) {
538
+ async function h(r) {
455
539
  let { delete: i } = t;
456
- typeof i != "function" && u("delete", "disabled by the provider");
540
+ typeof i != "function" && d("delete", "disabled by the provider");
457
541
  let a = n.value.find((e) => e.id === r);
458
- a && a.canDelete === !1 && u("delete", `not permitted for entry "${r}"`);
542
+ a && a.canDelete === !1 && d("delete", `not permitted for entry "${r}"`);
459
543
  try {
460
544
  await i(r), n.value = n.value.filter((e) => e.id !== r);
461
545
  } catch (t) {
@@ -470,18 +554,18 @@ function dn(e) {
470
554
  canUpdate: o,
471
555
  canDelete: s,
472
556
  canUpdateBlock: c,
473
- canDeleteBlock: l,
474
- load: d,
475
- create: f,
476
- update: p,
477
- remove: m
557
+ canDeleteBlock: u,
558
+ load: f,
559
+ create: p,
560
+ update: m,
561
+ remove: h
478
562
  };
479
563
  }
480
564
  //#endregion
481
565
  //#region ../core/src/saved-blocks-local.ts
482
- var fn = "templatical:saved-blocks";
483
- function pn(e = {}) {
484
- let t = e.key ?? fn;
566
+ var dn = "templatical:saved-blocks";
567
+ function fn(e = {}) {
568
+ let t = e.key ?? dn;
485
569
  function n() {
486
570
  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.");
487
571
  return localStorage;
@@ -506,7 +590,7 @@ function pn(e = {}) {
506
590
  },
507
591
  async create(e) {
508
592
  let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
509
- id: V(),
593
+ id: H(),
510
594
  name: e.name,
511
595
  content: e.content,
512
596
  ...e.category ? { category: e.category } : {},
@@ -533,88 +617,364 @@ function pn(e = {}) {
533
617
  };
534
618
  }
535
619
  //#endregion
620
+ //#region ../core/src/version-history.ts
621
+ function pn(e) {
622
+ 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");
623
+ function d(e) {
624
+ let t = n();
625
+ if (!t) throw new W(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
626
+ return t;
627
+ }
628
+ function f(e) {
629
+ 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.`);
630
+ }
631
+ async function p(n) {
632
+ let o = d("list");
633
+ i.value = !0;
634
+ try {
635
+ let e = await t.list(o, n);
636
+ r.value = e.versions, a.value = e.nextCursor;
637
+ } catch (t) {
638
+ throw e.onError?.(t), t;
639
+ } finally {
640
+ i.value = !1;
641
+ }
642
+ }
643
+ function m(e) {
644
+ return e.content ?? s.get(e.id) ?? null;
645
+ }
646
+ async function h(n) {
647
+ let r = m(n);
648
+ if (r) return r;
649
+ let i = d("get");
650
+ try {
651
+ let e = await t.get(i, n.id);
652
+ return s.set(n.id, e), e;
653
+ } catch (t) {
654
+ throw e.onError?.(t), t;
655
+ }
656
+ }
657
+ async function g(n, i) {
658
+ let { create: a } = t;
659
+ typeof a != "function" && f("create");
660
+ let o = d("create");
661
+ try {
662
+ let e = await a(o, n, i);
663
+ return r.value = [e, ...r.value], e;
664
+ } catch (t) {
665
+ throw e.onError?.(t), t;
666
+ }
667
+ }
668
+ async function _(n) {
669
+ let { restore: r } = t;
670
+ typeof r != "function" && f("restore");
671
+ let i = d("restore");
672
+ o.value = !0;
673
+ try {
674
+ return await r(i, n);
675
+ } catch (t) {
676
+ throw e.onError?.(t), t;
677
+ } finally {
678
+ o.value = !1;
679
+ }
680
+ }
681
+ return {
682
+ nextCursor: a,
683
+ versions: r,
684
+ isLoading: i,
685
+ isRestoring: o,
686
+ canCreate: c,
687
+ canRestore: u,
688
+ load: p,
689
+ peekContent: m,
690
+ resolveContent: h,
691
+ create: g,
692
+ restore: _
693
+ };
694
+ }
695
+ //#endregion
696
+ //#region ../core/src/comments.ts
697
+ function mn(e) {
698
+ 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(() => {
699
+ let e = /* @__PURE__ */ new Map();
700
+ for (let t of i.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
701
+ return e;
702
+ });
703
+ function h(e) {
704
+ let t = n();
705
+ if (!t) throw new W(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
706
+ return t;
707
+ }
708
+ function g(e) {
709
+ let t = r();
710
+ if (!t) throw new W(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
711
+ return t;
712
+ }
713
+ function _(e) {
714
+ throw new W(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
715
+ }
716
+ function v(e) {
717
+ for (let t of i.value) {
718
+ if (t.id === e) return t;
719
+ for (let n of t.replies ?? []) if (n.id === e) return n;
720
+ }
721
+ return null;
722
+ }
723
+ function y(e) {
724
+ let t = r();
725
+ return t !== null && e.author.id === t.id;
726
+ }
727
+ function b(t, n) {
728
+ e.onComment?.({
729
+ type: t,
730
+ comment: n
731
+ });
732
+ }
733
+ function x(t) {
734
+ let n = t instanceof Error ? t : Error(String(t), { cause: t });
735
+ throw e.onError?.(n), n;
736
+ }
737
+ function C(e, t, n) {
738
+ return [
739
+ ...e.slice(0, t),
740
+ n,
741
+ ...e.slice(t + 1)
742
+ ];
743
+ }
744
+ function w(e) {
745
+ if (e.parentId) {
746
+ i.value = i.value.map((t) => {
747
+ if (t.id !== e.parentId) return t;
748
+ let n = t.replies ?? [], r = n.findIndex((t) => t.id === e.id);
749
+ return {
750
+ ...t,
751
+ replies: r === -1 ? [...n, e] : C(n, r, e)
752
+ };
753
+ });
754
+ return;
755
+ }
756
+ let t = i.value.findIndex((t) => t.id === e.id);
757
+ if (t === -1) {
758
+ i.value = [...i.value, e];
759
+ return;
760
+ }
761
+ i.value = C(i.value, t, {
762
+ ...e,
763
+ replies: e.replies ?? i.value[t].replies
764
+ });
765
+ }
766
+ function T(e, t) {
767
+ let n = v(e), r = t ?? n?.parentId ?? null;
768
+ return r ? i.value = i.value.map((t) => t.id === r ? {
769
+ ...t,
770
+ replies: (t.replies ?? []).filter((t) => t.id !== e)
771
+ } : t) : i.value = i.value.filter((t) => t.id !== e), n;
772
+ }
773
+ async function E(e) {
774
+ let n = h("list");
775
+ a.value = !0;
776
+ try {
777
+ i.value = await t.list(n, e);
778
+ } catch (e) {
779
+ x(e);
780
+ } finally {
781
+ a.value = !1;
782
+ }
783
+ }
784
+ async function D(e) {
785
+ let { create: n } = t;
786
+ typeof n != "function" && _("create");
787
+ let r = h("create");
788
+ g("create"), o.value = !0;
789
+ try {
790
+ let t = await n(r, e);
791
+ return w(t), b("created", t), t;
792
+ } catch (e) {
793
+ x(e);
794
+ } finally {
795
+ o.value = !1;
796
+ }
797
+ }
798
+ async function O(e, n) {
799
+ let { update: r } = t;
800
+ typeof r != "function" && _("update");
801
+ let i = h("update");
802
+ g("update"), o.value = !0;
803
+ try {
804
+ let t = await r(i, e, n);
805
+ return w(t), b("updated", t), t;
806
+ } catch (e) {
807
+ x(e);
808
+ } finally {
809
+ o.value = !1;
810
+ }
811
+ }
812
+ async function k(e) {
813
+ let { delete: n } = t;
814
+ typeof n != "function" && _("delete");
815
+ let r = h("delete");
816
+ g("delete");
817
+ let i = v(e);
818
+ o.value = !0;
819
+ try {
820
+ await n(r, e), T(e), i && b("deleted", i);
821
+ } catch (e) {
822
+ x(e);
823
+ } finally {
824
+ o.value = !1;
825
+ }
826
+ }
827
+ async function A(e, n) {
828
+ let { setResolved: r } = t;
829
+ typeof r != "function" && _("setResolved");
830
+ let i = h("setResolved");
831
+ g("setResolved"), o.value = !0;
832
+ try {
833
+ let t = await r(i, e, n);
834
+ return w(t), b(t.resolvedAt ? "resolved" : "unresolved", t), t;
835
+ } catch (e) {
836
+ x(e);
837
+ } finally {
838
+ o.value = !1;
839
+ }
840
+ }
841
+ function j(e) {
842
+ w(e), b("created", e);
843
+ }
844
+ function M(e) {
845
+ w(e), b(e.resolvedAt ? "resolved" : "updated", e);
846
+ }
847
+ function N(e, t) {
848
+ let n = T(e, t);
849
+ n && b("deleted", n);
850
+ }
851
+ return {
852
+ comments: i,
853
+ isLoading: a,
854
+ isSubmitting: o,
855
+ canCreate: s,
856
+ canUpdate: c,
857
+ canDelete: u,
858
+ canResolve: d,
859
+ totalCount: f,
860
+ unresolvedCount: p,
861
+ commentCountByBlock: m,
862
+ load: E,
863
+ create: D,
864
+ update: O,
865
+ remove: k,
866
+ setResolved: A,
867
+ find: v,
868
+ isOwn: y,
869
+ applyRemoteCreate: j,
870
+ applyRemoteUpdate: M,
871
+ applyRemoteDelete: N
872
+ };
873
+ }
874
+ function hn(e) {
875
+ let { comments: n, provider: r, getTemplateId: i } = e, { subscribe: a } = r;
876
+ if (typeof a != "function") return;
877
+ let o = null;
878
+ function s() {
879
+ o?.(), o = null;
880
+ }
881
+ t(() => i(), (e) => {
882
+ s(), e && (o = a(e, (e) => {
883
+ switch (e.type) {
884
+ case "created":
885
+ n.applyRemoteCreate(e.comment);
886
+ break;
887
+ case "updated":
888
+ n.applyRemoteUpdate(e.comment);
889
+ break;
890
+ case "deleted": n.applyRemoteDelete(e.commentId, e.parentId);
891
+ }
892
+ }));
893
+ }, { immediate: !0 }), h(s);
894
+ }
895
+ //#endregion
536
896
  //#region src/utils/activeEditorTracker.ts
537
- var X = /* @__PURE__ */ new Set(), Z = 0, mn = 0;
538
- function hn() {
539
- let e = ++mn;
540
- return X.add(e), Z === 0 && (Z = e), {
897
+ var gn = /* @__PURE__ */ new Set(), $ = 0, _n = 0;
898
+ function vn() {
899
+ let e = ++_n;
900
+ return gn.add(e), $ === 0 && ($ = e), {
541
901
  id: e,
542
- isActive: () => X.size <= 1 || Z === e,
902
+ isActive: () => gn.size <= 1 || $ === e,
543
903
  claim: () => {
544
- Z = e;
904
+ $ = e;
545
905
  },
546
906
  dispose: () => {
547
- if (X.delete(e), Z === e) {
548
- let e = Array.from(X);
549
- Z = e[e.length - 1] ?? 0;
907
+ if (gn.delete(e), $ === e) {
908
+ let e = Array.from(gn);
909
+ $ = e[e.length - 1] ?? 0;
550
910
  }
551
911
  }
552
912
  };
553
913
  }
554
914
  //#endregion
555
915
  //#region src/composables/usePreviewResolution.ts
556
- var gn = 500;
557
- function _n(e) {
558
- let t = typeof e.resolvePreview == "function", n = v(null), r = v(!1), i = v(!1), a = 0, s = null;
916
+ var yn = 500;
917
+ function bn(e) {
918
+ let n = typeof e.resolvePreview == "function", r = l(null), i = l(!1), a = l(!1), o = 0, s = null;
559
919
  function c() {
560
920
  s !== null && (clearTimeout(s), s = null);
561
921
  }
562
- async function l() {
922
+ async function u() {
563
923
  let t = e.resolvePreview;
564
924
  if (!t) return;
565
- let o = ++a;
566
- r.value = !0;
925
+ let n = ++o;
926
+ i.value = !0;
567
927
  let s = {
568
- content: ve(e.getContent()),
928
+ content: _e(e.getContent()),
569
929
  ...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
570
930
  };
571
931
  try {
572
932
  let e = await t(s);
573
- if (o !== a) return;
574
- if (!Oe(e)) {
575
- i.value = !0;
933
+ if (n !== o) return;
934
+ if (!De(e)) {
935
+ a.value = !0;
576
936
  return;
577
937
  }
578
- n.value = e, i.value = !1;
938
+ r.value = e, a.value = !1;
579
939
  } catch {
580
- if (o !== a) return;
581
- i.value = !0;
940
+ if (n !== o) return;
941
+ a.value = !0;
582
942
  } finally {
583
- o === a && (r.value = !1);
943
+ n === o && (i.value = !1);
584
944
  }
585
945
  }
586
- function u() {
587
- if (t) {
588
- if (c(), n.value === null) {
589
- l();
946
+ function d() {
947
+ if (n) {
948
+ if (c(), r.value === null) {
949
+ u();
590
950
  return;
591
951
  }
592
952
  s = setTimeout(() => {
593
- s = null, l();
594
- }, gn);
953
+ s = null, u();
954
+ }, yn);
595
955
  }
596
956
  }
597
- return B(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
957
+ return t(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
598
958
  if (!e) {
599
- c(), a++, r.value = !1, n.value = null, i.value = !1;
959
+ c(), o++, i.value = !1, r.value = null, a.value = !1;
600
960
  return;
601
961
  }
602
- u();
603
- }, { immediate: !0 }), o(() => {
604
- c(), a++;
962
+ d();
963
+ }, { immediate: !0 }), h(() => {
964
+ c(), o++;
605
965
  }), {
606
- isConfigured: t,
607
- content: C(() => n.value ?? e.getContent()),
608
- isResolving: r,
609
- isInitialResolve: C(() => r.value && n.value === null),
610
- hasFailed: i,
611
- supersedesSamples: C(() => t)
966
+ isConfigured: n,
967
+ content: S(() => r.value ?? e.getContent()),
968
+ isResolving: i,
969
+ isInitialResolve: S(() => i.value && r.value === null),
970
+ hasFailed: a,
971
+ supersedesSamples: S(() => n)
612
972
  };
613
973
  }
614
974
  //#endregion
615
975
  //#region src/composables/useImageUrlResolver.ts
616
- function vn(e) {
617
- let t = _(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
976
+ function xn(e) {
977
+ let t = m(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
618
978
  function r(e) {
619
979
  return t.get(e);
620
980
  }
@@ -646,38 +1006,38 @@ function vn(e) {
646
1006
  lookup: a
647
1007
  };
648
1008
  }
649
- function Q(e) {
650
- let t = p(Tt, null), n = C(e);
651
- if (!t) return n;
652
- let r;
653
- function a() {
654
- r !== void 0 && (clearTimeout(r), r = void 0);
655
- }
656
- i() && o(a);
657
- let s = !0;
658
- return B(n, (e) => {
659
- a();
660
- let n = s;
661
- if (s = !1, !(!e || t.has(e))) {
662
- if (n) {
663
- t.lookup(e);
1009
+ function Sn(e) {
1010
+ let r = n(ot, null), i = S(e);
1011
+ if (!r) return i;
1012
+ let a;
1013
+ function s() {
1014
+ a !== void 0 && (clearTimeout(a), a = void 0);
1015
+ }
1016
+ o() && h(s);
1017
+ let c = !0;
1018
+ return t(i, (e) => {
1019
+ s();
1020
+ let t = c;
1021
+ if (c = !1, !(!e || r.has(e))) {
1022
+ if (t) {
1023
+ r.lookup(e);
664
1024
  return;
665
1025
  }
666
- r = setTimeout(() => {
667
- r = void 0, t.lookup(e);
1026
+ a = setTimeout(() => {
1027
+ a = void 0, r.lookup(e);
668
1028
  }, 300);
669
1029
  }
670
- }, { immediate: !0 }), C(() => {
671
- let e = n.value;
1030
+ }, { immediate: !0 }), S(() => {
1031
+ let e = i.value;
672
1032
  if (!e) return e;
673
- let r = t.get(e);
674
- return typeof r == "string" && r.length > 0 ? r : e;
1033
+ let t = r.get(e);
1034
+ return typeof t == "string" && t.length > 0 ? t : e;
675
1035
  });
676
1036
  }
677
1037
  //#endregion
678
1038
  //#region src/composables/useMergeTagPicker.ts
679
- function yn() {
680
- let e = v(!1), t = v([]), n = null;
1039
+ function Cn() {
1040
+ let e = l(!1), t = l([]), n = null;
681
1041
  function r(r) {
682
1042
  if (n) {
683
1043
  let e = n;
@@ -687,11 +1047,11 @@ function yn() {
687
1047
  n = e;
688
1048
  });
689
1049
  }
690
- function a(r) {
1050
+ function i(r) {
691
1051
  let i = n;
692
1052
  n = null, e.value = !1, t.value = [], i && i(r);
693
1053
  }
694
- return i() && o(() => {
1054
+ return o() && h(() => {
695
1055
  if (n) {
696
1056
  let e = n;
697
1057
  n = null, e(null);
@@ -701,14 +1061,14 @@ function yn() {
701
1061
  isOpen: e,
702
1062
  tags: t,
703
1063
  open: r,
704
- resolve: a
1064
+ resolve: i
705
1065
  };
706
1066
  }
707
1067
  //#endregion
708
1068
  //#region src/composables/useLogicTagPicker.ts
709
- function bn() {
710
- let e = v(!1), t = v([]), n = v([]), r = null;
711
- function a(i, a) {
1069
+ function wn() {
1070
+ let e = l(!1), t = l([]), n = l([]), r = null;
1071
+ function i(i, a) {
712
1072
  if (r) {
713
1073
  let e = r;
714
1074
  r = null, e(null);
@@ -717,11 +1077,11 @@ function bn() {
717
1077
  r = e;
718
1078
  });
719
1079
  }
720
- function s(i) {
1080
+ function a(i) {
721
1081
  let a = r;
722
1082
  r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
723
1083
  }
724
- return i() && o(() => {
1084
+ return o() && h(() => {
725
1085
  if (r) {
726
1086
  let e = r;
727
1087
  r = null, e(null);
@@ -731,24 +1091,24 @@ function bn() {
731
1091
  isOpen: e,
732
1092
  tags: t,
733
1093
  pairs: n,
734
- open: a,
735
- resolve: s
1094
+ open: i,
1095
+ resolve: a
736
1096
  };
737
1097
  }
738
1098
  //#endregion
739
1099
  //#region src/composables/useTemplateLint.ts
740
- function xn(e) {
1100
+ function Tn(e) {
741
1101
  return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
742
1102
  }
743
- function Sn(t) {
744
- let n = v([]), r = v(!1), i = v(!1), a = e(null), o = xn(t.options), s = null, c = !1;
745
- o || l();
746
- async function l() {
1103
+ function En(e) {
1104
+ let n = l([]), r = l(!1), i = l(!1), a = x(null), o = Tn(e.options), s = null, c = !1;
1105
+ o || u();
1106
+ async function u() {
747
1107
  try {
748
- let e = await import("./src-Cx70q30o.js");
1108
+ let t = await import("./src-Cx70q30o.js");
749
1109
  if (c) return;
750
- a.value = { lintTemplate: e.lintTemplate }, r.value = !0, u(), s = Ve(t.content, u, {
751
- debounce: t.debounce ?? 500,
1110
+ a.value = { lintTemplate: t.lintTemplate }, r.value = !0, d(), s = ze(e.content, d, {
1111
+ debounce: e.debounce ?? 500,
752
1112
  deep: !0
753
1113
  });
754
1114
  } catch {
@@ -756,44 +1116,44 @@ function Sn(t) {
756
1116
  i.value = !0;
757
1117
  }
758
1118
  }
759
- function u() {
760
- a.value && (n.value = a.value.lintTemplate(t.content.value, t.options));
1119
+ function d() {
1120
+ a.value && (n.value = a.value.lintTemplate(e.content.value, e.options));
761
1121
  }
762
- let d = B(() => t.options, () => {
763
- a.value && u();
1122
+ let f = t(() => e.options, () => {
1123
+ a.value && d();
764
1124
  }, { deep: !0 });
765
- function f(e) {
766
- e.fix && e.fix.apply({
767
- updateBlock: t.updateBlock,
768
- updateSettings: t.updateSettings,
769
- removeBlock: t.removeBlock
1125
+ function p(t) {
1126
+ t.fix && t.fix.apply({
1127
+ updateBlock: e.updateBlock,
1128
+ updateSettings: e.updateSettings,
1129
+ removeBlock: e.removeBlock
770
1130
  });
771
1131
  }
772
- function p() {
773
- c = !0, s?.(), d();
1132
+ function m() {
1133
+ c = !0, s?.(), f();
774
1134
  }
775
1135
  return {
776
1136
  issues: n,
777
1137
  ready: r,
778
1138
  unavailable: i,
779
- applyFix: f,
780
- destroy: p
1139
+ applyFix: p,
1140
+ destroy: m
781
1141
  };
782
1142
  }
783
1143
  //#endregion
784
1144
  //#region src/utils/blockTypeLabels.ts
785
- function Cn(e, t) {
1145
+ function Dn(e, t) {
786
1146
  return t.blocks[e] ?? e;
787
1147
  }
788
- function wn(e, t, n = []) {
789
- if (e.type !== "custom") return Cn(e.type, t);
1148
+ function On(e, t, n = []) {
1149
+ if (e.type !== "custom") return Dn(e.type, t);
790
1150
  let { customType: r } = e;
791
1151
  return n.find((e) => e.type === r)?.name ?? r;
792
1152
  }
793
1153
  //#endregion
794
1154
  //#region src/composables/useKeyboardReorder.ts
795
- function Tn(e, t, n = []) {
796
- let r = v(null), i = v(""), a = null;
1155
+ function kn(e, t, n = []) {
1156
+ let r = l(null), i = l(""), a = null;
797
1157
  function o(t) {
798
1158
  let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
799
1159
  if (r !== -1) return {
@@ -819,56 +1179,56 @@ function Tn(e, t, n = []) {
819
1179
  let i = o(r);
820
1180
  if (!i) return "";
821
1181
  let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
822
- return a ? wn(a, t.t, n) : "";
1182
+ return a ? On(a, t.t, n) : "";
823
1183
  }
824
1184
  function c(t, n) {
825
1185
  return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
826
1186
  }
827
- function l(e) {
1187
+ function u(e) {
828
1188
  i.value = "", queueMicrotask(() => {
829
1189
  i.value = e;
830
1190
  });
831
1191
  }
832
- function u(e) {
1192
+ function d(e) {
833
1193
  return r.value === e;
834
1194
  }
835
- function d(e) {
1195
+ function f(e) {
836
1196
  let n = o(e);
837
- n && (r.value = e, a = n, l(t.format(t.t.blockActions.lifted, {
1197
+ n && (r.value = e, a = n, u(t.format(t.t.blockActions.lifted, {
838
1198
  block: s(e),
839
1199
  position: String(n.index + 1),
840
1200
  total: String(n.total)
841
1201
  })));
842
1202
  }
843
- function f(n, r) {
1203
+ function p(n, r) {
844
1204
  let i = o(n);
845
1205
  if (!i) return;
846
1206
  let a = i.index + r;
847
- a < 0 || a >= i.total || (e.moveBlock(n, a, i.sectionId, i.columnIndex), l(t.format(t.t.blockActions.moved, {
1207
+ a < 0 || a >= i.total || (e.moveBlock(n, a, i.sectionId, i.columnIndex), u(t.format(t.t.blockActions.moved, {
848
1208
  block: s(n),
849
1209
  position: String(a + 1),
850
1210
  total: String(i.total)
851
1211
  })));
852
1212
  }
853
- function p(e) {
854
- f(e, -1);
855
- }
856
1213
  function m(e) {
857
- f(e, 1);
1214
+ p(e, -1);
858
1215
  }
859
1216
  function h(e) {
1217
+ p(e, 1);
1218
+ }
1219
+ function g(e) {
860
1220
  let n = o(e);
861
- n && l(t.format(t.t.blockActions.dropped, {
1221
+ n && u(t.format(t.t.blockActions.dropped, {
862
1222
  block: s(e),
863
1223
  position: String(n.index + 1),
864
1224
  total: String(n.total)
865
1225
  })), r.value = null, a = null;
866
1226
  }
867
- function g() {
1227
+ function _() {
868
1228
  let n = r.value;
869
1229
  if (n && a) {
870
1230
  let r = o(n);
871
- r && (r && (r.sectionId !== a.sectionId || r.columnIndex !== a.columnIndex) || r && r.index !== a.index) && e.moveBlock(n, a.index, a.sectionId, a.columnIndex), l(t.format(t.t.blockActions.cancelled, {
1231
+ r && (r && (r.sectionId !== a.sectionId || r.columnIndex !== a.columnIndex) || r && r.index !== a.index) && e.moveBlock(n, a.index, a.sectionId, a.columnIndex), u(t.format(t.t.blockActions.cancelled, {
872
1232
  block: s(n),
873
1233
  position: String(a.index + 1)
874
1234
  }));
@@ -878,23 +1238,23 @@ function Tn(e, t, n = []) {
878
1238
  return {
879
1239
  liftedBlockId: r,
880
1240
  announcement: i,
881
- isLifted: u,
882
- lift: d,
883
- cancel: g,
884
- moveUp: p,
885
- moveDown: m,
886
- drop: h
1241
+ isLifted: d,
1242
+ lift: f,
1243
+ cancel: _,
1244
+ moveUp: m,
1245
+ moveDown: h,
1246
+ drop: g
887
1247
  };
888
1248
  }
889
1249
  //#endregion
890
1250
  //#region src/composables/useUiTheme.ts
891
- function En(e) {
892
- let t = He("(prefers-color-scheme: dark)");
893
- return { resolvedTheme: C(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
1251
+ function An(e) {
1252
+ let t = Be("(prefers-color-scheme: dark)");
1253
+ return { resolvedTheme: S(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
894
1254
  }
895
1255
  //#endregion
896
1256
  //#region src/composables/useThemeStyles.ts
897
- var Dn = {
1257
+ var jn = {
898
1258
  bg: "--tpl-bg",
899
1259
  bgElevated: "--tpl-bg-elevated",
900
1260
  bgHover: "--tpl-bg-hover",
@@ -918,10 +1278,10 @@ var Dn = {
918
1278
  dangerLight: "--tpl-danger-light",
919
1279
  canvasBg: "--tpl-canvas-bg"
920
1280
  };
921
- function On({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
922
- return { themeStyles: C(() => {
1281
+ function Mn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
1282
+ return { themeStyles: S(() => {
923
1283
  let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
924
- if (a) for (let [e, t] of Object.entries(Dn)) {
1284
+ if (a) for (let [e, t] of Object.entries(jn)) {
925
1285
  let n = a[e];
926
1286
  n && (r[t] = n);
927
1287
  }
@@ -929,60 +1289,40 @@ function On({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
929
1289
  }) };
930
1290
  }
931
1291
  //#endregion
932
- //#region src/utils/logger.ts
933
- var kn = "[Templatical]";
934
- function An() {
935
- return typeof process < "u" && !0;
936
- }
937
- var $ = {
938
- warn(...e) {
939
- console.warn(kn, ...e);
940
- },
941
- error(...e) {
942
- console.error(kn, ...e);
943
- },
944
- debug(...e) {
945
- An() || console.debug(kn, ...e);
946
- },
947
- info(...e) {
948
- An() || console.info(kn, ...e);
949
- }
950
- };
951
- //#endregion
952
1292
  //#region src/composables/useBlockRegistry.ts
953
- function jn() {
954
- let t = e(/* @__PURE__ */ new Map());
955
- function n(e, n) {
956
- t.value.set(e, n), N(t);
957
- }
958
- function r(e, n) {
959
- let r = `custom:${e.type}`;
960
- t.value.set(r, {
1293
+ function Nn() {
1294
+ let e = x(/* @__PURE__ */ new Map());
1295
+ function t(t, n) {
1296
+ e.value.set(t, n), T(e);
1297
+ }
1298
+ function n(t, n) {
1299
+ let r = `custom:${t.type}`;
1300
+ e.value.set(r, {
961
1301
  component: n,
962
- createBlock: () => he(e),
963
- definition: e
964
- }), N(t);
1302
+ createBlock: () => me(t),
1303
+ definition: t
1304
+ }), T(e);
965
1305
  }
966
- function i(e) {
967
- if (e.type === "custom") {
968
- let n = `custom:${e.customType}`;
969
- return t.value.get(n)?.component;
1306
+ function r(t) {
1307
+ if (t.type === "custom") {
1308
+ let n = `custom:${t.customType}`;
1309
+ return e.value.get(n)?.component;
970
1310
  }
971
- return t.value.get(e.type)?.component;
1311
+ return e.value.get(t.type)?.component;
972
1312
  }
973
- function a(e) {
974
- return t.value.get(e)?.createBlock();
1313
+ function i(t) {
1314
+ return e.value.get(t)?.createBlock();
975
1315
  }
976
- function o(e) {
977
- let n = `custom:${e}`;
978
- return t.value.get(n)?.definition;
1316
+ function a(t) {
1317
+ let n = `custom:${t}`;
1318
+ return e.value.get(n)?.definition;
979
1319
  }
980
- function s(e) {
1320
+ function o(e) {
981
1321
  return `<div style="color: var(--tpl-text-muted); padding: 16px; text-align: center; border: 1px dashed var(--tpl-border); border-radius: var(--tpl-radius-sm); font-family: var(--tpl-font-family); font-size: 14px;">${e}</div>`;
982
1322
  }
983
- async function c(e) {
984
- let t = o(e.customType);
985
- if (!t) return s("Block definition not found");
1323
+ async function s(e) {
1324
+ let t = a(e.customType);
1325
+ if (!t) return o("Block definition not found");
986
1326
  try {
987
1327
  let { Liquid: n } = await import("./liquid.browser-UlAOKBjI.js");
988
1328
  return await new n({
@@ -990,27 +1330,27 @@ function jn() {
990
1330
  strictFilters: !1
991
1331
  }).parseAndRender(t.template, e.fieldValues);
992
1332
  } catch (t) {
993
- return $.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
1333
+ return X.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
994
1334
  }
995
1335
  }
996
- function l(e) {
997
- return t.value.has(e);
1336
+ function c(t) {
1337
+ return e.value.has(t);
998
1338
  }
999
1339
  return {
1000
- registerBuiltIn: n,
1001
- registerCustom: r,
1002
- getComponent: i,
1003
- createBlock: a,
1004
- getDefinition: o,
1005
- renderCustomBlock: c,
1006
- isRegistered: l
1340
+ registerBuiltIn: t,
1341
+ registerCustom: n,
1342
+ getComponent: r,
1343
+ createBlock: i,
1344
+ getDefinition: a,
1345
+ renderCustomBlock: s,
1346
+ isRegistered: c
1007
1347
  };
1008
1348
  }
1009
1349
  //#endregion
1010
1350
  //#region src/composables/useCustomBlockStylesheets.ts
1011
- function Mn(e, t) {
1012
- return C(() => {
1013
- let n = Nn(e.value.blocks);
1351
+ function Pn(e, t) {
1352
+ return S(() => {
1353
+ let n = Fn(e.value.blocks);
1014
1354
  if (n.size === 0) return [];
1015
1355
  let r = /* @__PURE__ */ new Set(), i = [];
1016
1356
  for (let e of n) {
@@ -1022,81 +1362,81 @@ function Mn(e, t) {
1022
1362
  return i;
1023
1363
  });
1024
1364
  }
1025
- function Nn(e) {
1365
+ function Fn(e) {
1026
1366
  let t = /* @__PURE__ */ new Set();
1027
- return Pn(e, t), t;
1367
+ return In(e, t), t;
1028
1368
  }
1029
- function Pn(e, t) {
1369
+ function In(e, t) {
1030
1370
  for (let n of e) {
1031
- if (se(n)) {
1371
+ if (oe(n)) {
1032
1372
  t.add(n.customType);
1033
1373
  continue;
1034
1374
  }
1035
1375
  if (n.type === "section") {
1036
1376
  let e = n.children;
1037
1377
  if (!e) continue;
1038
- for (let n of e) Pn(n, t);
1378
+ for (let n of e) In(n, t);
1039
1379
  }
1040
1380
  }
1041
1381
  }
1042
1382
  //#endregion
1043
1383
  //#region src/utils/registerBuiltInBlocks.ts
1044
- var Fn = [
1384
+ var Ln = [
1045
1385
  {
1046
1386
  type: "section",
1047
- createBlock: we
1387
+ createBlock: Ce
1048
1388
  },
1049
1389
  {
1050
1390
  type: "title",
1051
- createBlock: oe
1391
+ createBlock: ae
1052
1392
  },
1053
1393
  {
1054
1394
  type: "paragraph",
1055
- createBlock: te
1395
+ createBlock: ee
1056
1396
  },
1057
1397
  {
1058
1398
  type: "image",
1059
- createBlock: de
1399
+ createBlock: ue
1060
1400
  },
1061
1401
  {
1062
1402
  type: "button",
1063
- createBlock: re
1403
+ createBlock: ne
1064
1404
  },
1065
1405
  {
1066
1406
  type: "divider",
1067
- createBlock: ae
1407
+ createBlock: ie
1068
1408
  },
1069
1409
  {
1070
1410
  type: "video",
1071
- createBlock: ce
1411
+ createBlock: se
1072
1412
  },
1073
1413
  {
1074
1414
  type: "social",
1075
- createBlock: le
1415
+ createBlock: ce
1076
1416
  },
1077
1417
  {
1078
1418
  type: "menu",
1079
- createBlock: Te
1419
+ createBlock: we
1080
1420
  },
1081
1421
  {
1082
1422
  type: "table",
1083
- createBlock: fe
1423
+ createBlock: de
1084
1424
  },
1085
1425
  {
1086
1426
  type: "spacer",
1087
- createBlock: ue
1427
+ createBlock: le
1088
1428
  },
1089
1429
  {
1090
1430
  type: "html",
1091
- createBlock: ie
1431
+ createBlock: re
1092
1432
  },
1093
1433
  {
1094
1434
  type: "countdown",
1095
- createBlock: Ie
1435
+ createBlock: Pe
1096
1436
  }
1097
1437
  ];
1098
- function In(e, t) {
1099
- for (let n of Fn) {
1438
+ function Rn(e, t) {
1439
+ for (let n of Ln) {
1100
1440
  let r = t[n.type];
1101
1441
  r && e.registerBuiltIn(n.type, {
1102
1442
  component: r,
@@ -1106,34 +1446,34 @@ function In(e, t) {
1106
1446
  }
1107
1447
  //#endregion
1108
1448
  //#region src/utils/resolveHtmlBlockPreview.ts
1109
- function Ln(e) {
1449
+ function zn(e) {
1110
1450
  return typeof e == "boolean" ? e : e?.enabled ?? !1;
1111
1451
  }
1112
1452
  //#endregion
1113
1453
  //#region src/utils/collectOffPaletteDefaults.ts
1114
- function Rn(e) {
1454
+ function Bn(e) {
1115
1455
  return typeof e == "object" && !!e && !Array.isArray(e);
1116
1456
  }
1117
- function zn(e, t, n) {
1118
- let r = new Set(e.map((e) => J(e))), i = [], a = (e, t) => {
1119
- for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(J(o)) && i.push(`${t}.${n}: ${o}`) : Rn(o) && a(o, `${t}.${n}`);
1457
+ function Vn(e, t, n) {
1458
+ let r = new Set(e.map((e) => Z(e))), i = [], a = (e, t) => {
1459
+ 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}`) : Bn(o) && a(o, `${t}.${n}`);
1120
1460
  }, o = t;
1121
- for (let [e, t] of Object.entries(Le)) {
1461
+ for (let [e, t] of Object.entries(Fe)) {
1122
1462
  let n = o?.[e];
1123
1463
  a({
1124
1464
  ...t,
1125
- ...Rn(n) ? n : {}
1465
+ ...Bn(n) ? n : {}
1126
1466
  }, e);
1127
1467
  }
1128
1468
  return a({
1129
- ...ne,
1469
+ ...te,
1130
1470
  ...n ?? {}
1131
1471
  }, "template"), i;
1132
1472
  }
1133
1473
  //#endregion
1134
1474
  //#region src/utils/resolveFieldColors.ts
1135
- function Bn(e, t) {
1136
- let n = kt({ presets: e.presets }, Dt), r = n.presets.length === 0;
1475
+ function Hn(e, t) {
1476
+ let n = Dt({ presets: e.presets }, Tt), r = n.presets.length === 0;
1137
1477
  return {
1138
1478
  presets: r ? t.presets : n.presets,
1139
1479
  allowCustom: t.allowCustom === !1 ? !1 : e.allowCustom ?? t.allowCustom,
@@ -1145,9 +1485,9 @@ function Bn(e, t) {
1145
1485
  }
1146
1486
  //#endregion
1147
1487
  //#region src/utils/collectColorFieldIssues.ts
1148
- function Vn(e, t) {
1488
+ function Un(e, t) {
1149
1489
  let n = [], r = (r, i) => {
1150
- let a = Bn(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
1490
+ let a = Hn(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
1151
1491
  if (a.invalidPresets.length > 0 && n.push({
1152
1492
  id: s("invalid-presets"),
1153
1493
  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." : "")
@@ -1158,8 +1498,8 @@ function Vn(e, t) {
1158
1498
  id: s("allow-custom-ignored"),
1159
1499
  message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
1160
1500
  }), !a.allowCustom && a.presets.length > 0) {
1161
- let e = r.default ?? "", t = new Set(a.presets.map((e) => J(e)));
1162
- e !== "" && !t.has(J(e)) && n.push({
1501
+ let e = r.default ?? "", t = new Set(a.presets.map((e) => Z(e)));
1502
+ e !== "" && !t.has(Z(e)) && n.push({
1163
1503
  id: s("off-palette-default"),
1164
1504
  message: `${o} locks custom colours, but its default ${e} falls outside the field's presets: ${a.presets.join(", ")}. New blocks start on a colour the picker can't reselect — set the default from the same palette.`
1165
1505
  });
@@ -1171,7 +1511,7 @@ function Vn(e, t) {
1171
1511
  }
1172
1512
  //#endregion
1173
1513
  //#region src/utils/keyboardShortcuts.ts
1174
- function Hn(e) {
1514
+ function Wn(e) {
1175
1515
  for (let t of e.composedPath()) {
1176
1516
  if (!(t instanceof HTMLElement)) continue;
1177
1517
  if (t.isContentEditable) return !0;
@@ -1180,18 +1520,18 @@ function Hn(e) {
1180
1520
  }
1181
1521
  return !1;
1182
1522
  }
1183
- function Un(e, t) {
1523
+ function Gn(e, t) {
1184
1524
  let n = e.metaKey || e.ctrlKey;
1185
1525
  if (n && e.key.toLowerCase() === "s") {
1186
1526
  e.preventDefault(), t.onSave?.();
1187
1527
  return;
1188
1528
  }
1189
1529
  if (n && e.key.toLowerCase() === "z") {
1190
- if (Hn(e)) return;
1530
+ if (Wn(e)) return;
1191
1531
  e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
1192
1532
  return;
1193
1533
  }
1194
- if (t.isPicking?.() && !Hn(e)) {
1534
+ if (t.isPicking?.() && !Wn(e)) {
1195
1535
  if (e.key === "Escape") {
1196
1536
  e.preventDefault(), t.onCancelPick?.();
1197
1537
  return;
@@ -1209,11 +1549,11 @@ function Un(e, t) {
1209
1549
  t.selectBlock(null);
1210
1550
  return;
1211
1551
  }
1212
- (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Hn(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
1552
+ (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Wn(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
1213
1553
  }
1214
1554
  //#endregion
1215
1555
  //#region src/utils/mergeTagLabelSegments.ts
1216
- function Wn(e, t, n, r = !1) {
1556
+ function Kn(e, t, n, r = !1) {
1217
1557
  if (!e) return [];
1218
1558
  let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
1219
1559
  for (; (s = i.exec(e)) !== null;) {
@@ -1222,18 +1562,18 @@ function Wn(e, t, n, r = !1) {
1222
1562
  value: e.slice(o, s.index)
1223
1563
  });
1224
1564
  let i = s[0];
1225
- if (xe(i, n)) {
1226
- let e = r ? Me(i, t) : void 0;
1565
+ if (be(i, n)) {
1566
+ let e = r ? je(i, t) : void 0;
1227
1567
  a.push(e === void 0 ? {
1228
1568
  type: "tag",
1229
- value: ke(i, t)
1569
+ value: Oe(i, t)
1230
1570
  } : {
1231
1571
  type: "text",
1232
1572
  value: e
1233
1573
  });
1234
- } else ye(i, n) ? a.push({
1574
+ } else ve(i, n) ? a.push({
1235
1575
  type: "tag",
1236
- value: _e(i, n)
1576
+ value: ge(i, n)
1237
1577
  }) : a.push({
1238
1578
  type: "text",
1239
1579
  value: i
@@ -1247,27 +1587,27 @@ function Wn(e, t, n, r = !1) {
1247
1587
  }
1248
1588
  //#endregion
1249
1589
  //#region src/components/MergeTagPreviewText.vue
1250
- var Gn = R({
1590
+ var qn = d({
1251
1591
  name: "MergeTagPreviewText",
1252
1592
  props: { text: {
1253
1593
  type: String,
1254
1594
  required: !0
1255
1595
  } },
1256
1596
  setup(e) {
1257
- let t = p(W, []), r = p(Ge, je.liquid), i = p(G, null), a = C(() => Wn(e.text, t, r, i?.value ?? !1));
1258
- return () => a.value.map((e, t) => e.type === "tag" ? n("span", {
1597
+ let t = n(K, []), r = n(ft, Ae.liquid), i = n(q, null), a = S(() => Kn(e.text, t, r, i?.value ?? !1));
1598
+ return () => a.value.map((e, t) => e.type === "tag" ? z("span", {
1259
1599
  key: t,
1260
1600
  class: "tpl-merge-tag-label"
1261
1601
  }, e.value) : e.value);
1262
1602
  }
1263
- }), Kn = ["href"], qn = /* @__PURE__ */ R({
1603
+ }), Jn = ["href"], Yn = /* @__PURE__ */ d({
1264
1604
  __name: "ButtonBlock",
1265
1605
  props: {
1266
1606
  block: {},
1267
1607
  viewport: {}
1268
1608
  },
1269
1609
  setup(e) {
1270
- let t = e, n = C(() => {
1610
+ let t = e, n = S(() => {
1271
1611
  let e = {
1272
1612
  display: "inline-block",
1273
1613
  padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
@@ -1280,42 +1620,42 @@ var Gn = R({
1280
1620
  textAlign: "center"
1281
1621
  };
1282
1622
  return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
1283
- }), r = C(() => ({ textAlign: t.block.align ?? "center" }));
1284
- return (t, i) => (l(), w("div", { style: S(r.value) }, [M("a", {
1623
+ }), r = S(() => ({ textAlign: t.block.align ?? "center" }));
1624
+ return (t, i) => (s(), C("div", { style: k(r.value) }, [M("a", {
1285
1625
  href: e.block.url || "#",
1286
- style: S(n.value),
1626
+ style: k(n.value),
1287
1627
  class: "tpl:cursor-default",
1288
1628
  onClick: i[0] ||= O(() => {}, ["prevent"])
1289
- }, [z(Gn, { text: e.block.text }, null, 8, ["text"])], 12, Kn)], 4));
1629
+ }, [v(qn, { text: e.block.text }, null, 8, ["text"])], 12, Jn)], 4));
1290
1630
  }
1291
- }), Jn = ["innerHTML"], Yn = [
1631
+ }), Xn = ["innerHTML"], Zn = [
1292
1632
  "src",
1293
1633
  "width",
1294
1634
  "height"
1295
- ], Xn = /* @__PURE__ */ R({
1635
+ ], Qn = /* @__PURE__ */ d({
1296
1636
  __name: "CustomBlockIcon",
1297
1637
  props: {
1298
1638
  icon: {},
1299
1639
  size: {}
1300
1640
  },
1301
1641
  setup(e) {
1302
- let t = e, n = C(() => t.size ?? 20), r = C(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = C(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
1303
- return (t, a) => r.value ? (l(), w("span", {
1642
+ let t = e, n = S(() => t.size ?? 20), r = S(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = S(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
1643
+ return (t, a) => r.value ? (s(), C("span", {
1304
1644
  key: 0,
1305
1645
  class: "tpl:inline-flex tpl:items-center tpl:justify-center",
1306
- style: S({
1646
+ style: k({
1307
1647
  width: `${n.value}px`,
1308
1648
  height: `${n.value}px`
1309
1649
  }),
1310
1650
  innerHTML: e.icon
1311
- }, null, 12, Jn)) : i.value ? (l(), w("img", {
1651
+ }, null, 12, Xn)) : i.value ? (s(), C("img", {
1312
1652
  key: 1,
1313
1653
  src: e.icon,
1314
1654
  width: n.value,
1315
1655
  height: n.value,
1316
1656
  class: "tpl:inline-block",
1317
1657
  alt: ""
1318
- }, null, 8, Yn)) : (l(), A(E(Jt), {
1658
+ }, null, 8, Zn)) : (s(), A(_(Kt), {
1319
1659
  key: 2,
1320
1660
  size: n.value,
1321
1661
  "stroke-width": 1.5
@@ -1324,50 +1664,50 @@ var Gn = R({
1324
1664
  });
1325
1665
  //#endregion
1326
1666
  //#region src/composables/useEditorRoot.ts
1327
- function Zn() {
1328
- return p(ct, document) ?? document;
1667
+ function $n() {
1668
+ return n(ut, document) ?? document;
1329
1669
  }
1330
1670
  //#endregion
1331
1671
  //#region src/composables/useFocusTrap.ts
1332
- var Qn = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
1333
- function $n(e, t) {
1334
- let n = Zn(), r = null, i = null, a = null;
1672
+ var er = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
1673
+ function tr(e, n) {
1674
+ let r = $n(), i = null, a = null, o = null;
1335
1675
  function s() {
1336
- return e.value ? Array.from(e.value.querySelectorAll(Qn)).filter((e) => e.offsetParent !== null) : [];
1676
+ return e.value ? Array.from(e.value.querySelectorAll(er)).filter((e) => e.offsetParent !== null) : [];
1337
1677
  }
1338
1678
  function c(e) {
1339
1679
  if (e.key !== "Tab") return;
1340
1680
  let t = s();
1341
1681
  if (t.length === 0) return;
1342
- let r = t[0], i = t[t.length - 1];
1343
- e.shiftKey ? n.activeElement === r && (e.preventDefault(), i.focus()) : n.activeElement === i && (e.preventDefault(), r.focus());
1682
+ let n = t[0], i = t[t.length - 1];
1683
+ e.shiftKey ? r.activeElement === n && (e.preventDefault(), i.focus()) : r.activeElement === i && (e.preventDefault(), n.focus());
1344
1684
  }
1345
1685
  function l() {
1346
- let t = i !== null || a !== null;
1347
- t && u({ restoreFocus: !1 }), t || (r = n.activeElement), a = requestAnimationFrame(() => {
1348
- a = null;
1686
+ let t = a !== null || o !== null;
1687
+ t && u({ restoreFocus: !1 }), t || (i = r.activeElement), o = requestAnimationFrame(() => {
1688
+ o = null;
1349
1689
  let t = s();
1350
1690
  t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
1351
- }), i = U(e, "keydown", c);
1691
+ }), a = G(e, "keydown", c);
1352
1692
  }
1353
1693
  function u(e = {}) {
1354
1694
  let t = e.restoreFocus !== !1;
1355
- a !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(a), a = null), i?.(), i = null, t && r && r.focus && (r.focus(), r = null);
1695
+ o !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(o), o = null), a?.(), a = null, t && i && i.focus && (i.focus(), i = null);
1356
1696
  }
1357
- let d = B([t, e], ([e, t]) => {
1697
+ let d = t([n, e], ([e, t]) => {
1358
1698
  e && t ? l() : u();
1359
1699
  }, { flush: "post" });
1360
- o(() => {
1700
+ h(() => {
1361
1701
  d(), u();
1362
1702
  });
1363
1703
  }
1364
1704
  //#endregion
1365
1705
  //#region src/composables/useEmoji.ts
1366
- function er() {
1367
- let [t, n] = Be(!1), r = e([]), i = !1;
1368
- o(() => {
1706
+ function nr() {
1707
+ let [e, n] = Re(!1), r = x([]), i = !1;
1708
+ h(() => {
1369
1709
  i = !0;
1370
- }), B(t, async (e) => {
1710
+ }), t(e, async (e) => {
1371
1711
  if (e && r.value.length === 0) {
1372
1712
  let { emojiCategories: e } = await import("./emojiData-6m0DBh7O.js");
1373
1713
  if (i) return;
@@ -1377,69 +1717,19 @@ function er() {
1377
1717
  function a() {
1378
1718
  n();
1379
1719
  }
1380
- function s() {
1381
- t.value = !1;
1720
+ function o() {
1721
+ e.value = !1;
1382
1722
  }
1383
1723
  return {
1384
1724
  categories: r,
1385
- isOpen: t,
1725
+ isOpen: e,
1386
1726
  toggle: a,
1387
- close: s
1388
- };
1389
- }
1390
- //#endregion
1391
- //#region src/composables/useDragDrop.ts
1392
- function tr(e) {
1393
- let { onBlockMove: t, onBlockAdd: n } = e, r = v(!1), i = v(null), a = v(null);
1394
- function o(e) {
1395
- r.value = !0, i.value = e;
1396
- }
1397
- function s() {
1398
- r.value = !1, i.value = null, a.value = null;
1399
- }
1400
- function c(e) {
1401
- a.value = e;
1402
- }
1403
- function l(e, r, a, o) {
1404
- i.value && (e.findIndex((e) => e.id === i.value.id) === -1 ? n(i.value, a, o) : t(i.value.id, r, a, o), s());
1405
- }
1406
- function u(e, n, i) {
1407
- return {
1408
- group: e,
1409
- animation: 150,
1410
- ghostClass: "tpl-ghost",
1411
- dragClass: "tpl-drag",
1412
- handle: ".tpl-drag-handle",
1413
- onStart: (e) => {
1414
- e.item.dataset.blockId && (r.value = !0);
1415
- },
1416
- onEnd: () => {
1417
- s();
1418
- },
1419
- onAdd: (e) => {
1420
- let r = e.item.dataset.blockId;
1421
- r && t(r, e.newIndex, n, i);
1422
- },
1423
- onUpdate: (e) => {
1424
- let r = e.item.dataset.blockId;
1425
- r && t(r, e.newIndex, n, i);
1426
- }
1427
- };
1428
- }
1429
- return {
1430
- isDragging: r,
1431
- draggedBlock: i,
1432
- dropTargetId: a,
1433
- startDrag: o,
1434
- endDrag: s,
1435
- setDropTarget: c,
1436
- handleDrop: l,
1437
- getSortableOptions: u
1727
+ close: o
1438
1728
  };
1439
1729
  }
1440
1730
  //#endregion
1441
1731
  //#region src/composables/useFonts.ts
1442
- var nr = [
1732
+ var rr = [
1443
1733
  {
1444
1734
  value: "Arial",
1445
1735
  label: "Arial"
@@ -1468,7 +1758,7 @@ var nr = [
1468
1758
  value: "Courier New",
1469
1759
  label: "Courier New"
1470
1760
  }
1471
- ], rr = {
1761
+ ], ir = {
1472
1762
  arial: "Arial, sans-serif",
1473
1763
  helvetica: "Helvetica, sans-serif",
1474
1764
  georgia: "Georgia, serif",
@@ -1476,118 +1766,104 @@ var nr = [
1476
1766
  verdana: "Verdana, sans-serif",
1477
1767
  "trebuchet ms": "'Trebuchet MS', sans-serif",
1478
1768
  "courier new": "'Courier New', monospace"
1479
- }, ir = "Arial, sans-serif";
1480
- function ar(e) {
1481
- if (e === void 0 || e === !0) return [...nr];
1769
+ }, ar = "Arial, sans-serif";
1770
+ function or(e) {
1771
+ if (e === void 0 || e === !0) return [...rr];
1482
1772
  if (e === !1) return [];
1483
1773
  let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
1484
1774
  for (let i of e) {
1485
- let e = i.toLowerCase(), a = nr.find((t) => t.value.toLowerCase() === e);
1775
+ let e = i.toLowerCase(), a = rr.find((t) => t.value.toLowerCase() === e);
1486
1776
  if (!a) {
1487
- r.has(e) || (r.add(e), $.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${nr.map((e) => e.value).join(", ")}.`));
1777
+ r.has(e) || (r.add(e), X.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${rr.map((e) => e.value).join(", ")}.`));
1488
1778
  continue;
1489
1779
  }
1490
1780
  n.has(a.value) || (n.add(a.value), t.push(a));
1491
1781
  }
1492
1782
  return t;
1493
1783
  }
1494
- function or(e) {
1495
- let t = v(e?.customFonts ?? []), n = v(!0), r = v(!1), a = ar(e?.builtIns), s = C(() => e?.defaultFallback ?? ir);
1496
- function c(e) {
1497
- n.value = e;
1498
- }
1499
- let l = C(() => {
1500
- let e = [...a];
1501
- if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
1502
- let r = t.value.map((e) => ({
1784
+ function sr(e) {
1785
+ let t = l(e?.customFonts ?? []), n = l(!1), r = or(e?.builtIns), i = S(() => e?.defaultFallback ?? ar), a = S(() => {
1786
+ let e = [...r], n = t.value.map((e) => ({
1503
1787
  value: e.name,
1504
1788
  label: e.name,
1505
1789
  isCustom: !0
1506
- })), i = [...e, ...r];
1790
+ })), i = [...e, ...n];
1507
1791
  return i.sort((e, t) => e.label.localeCompare(t.label)), i;
1508
1792
  });
1509
- function u(e) {
1510
- return l.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1511
- }
1512
- let d = e?.defaultFont ?? ir.split(",")[0].trim();
1513
- u(d) || $.warn(`config.fonts: new templates seed "${d}", 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.`);
1514
- function f(e) {
1515
- return nr.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1793
+ function s(e) {
1794
+ return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1516
1795
  }
1517
- function p() {
1518
- if (e?.defaultFont) {
1519
- if (!n.value && !f(e.defaultFont)) return ir;
1520
- if (u(e.defaultFont)) {
1521
- let t = l.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
1522
- if (t) return t.value;
1523
- }
1796
+ let c = e?.defaultFont ?? ar.split(",")[0].trim();
1797
+ 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.`);
1798
+ function u() {
1799
+ if (e?.defaultFont && s(e.defaultFont)) {
1800
+ let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
1801
+ if (t) return t.value;
1524
1802
  }
1525
- return ir;
1803
+ return ar;
1526
1804
  }
1527
- let m = C(() => p());
1528
- function h(e) {
1529
- if (!e) return s.value;
1805
+ let d = S(() => u());
1806
+ function f(e) {
1807
+ if (!e) return i.value;
1530
1808
  let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
1531
- return n ? `'${n.name}', ${n.fallback ?? s.value}` : rr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${s.value}`);
1809
+ return n ? `'${n.name}', ${n.fallback ?? i.value}` : ir[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
1532
1810
  }
1533
- let g = [], _ = !1;
1534
- async function y() {
1811
+ let p = [], m = !1;
1812
+ async function g() {
1535
1813
  if (t.value.length === 0) {
1536
- _ || (r.value = !0);
1814
+ m || (n.value = !0);
1537
1815
  return;
1538
1816
  }
1539
1817
  let e = t.value.map(async (e) => {
1540
1818
  try {
1541
1819
  if (document.querySelector(`link[data-custom-font="${CSS.escape(e.name)}"]`)) return;
1542
1820
  let t = document.createElement("link");
1543
- t.rel = "stylesheet", t.href = e.url, t.setAttribute("data-custom-font", e.name), g.push(t), await new Promise((n, r) => {
1821
+ t.rel = "stylesheet", t.href = e.url, t.setAttribute("data-custom-font", e.name), p.push(t), await new Promise((n, r) => {
1544
1822
  t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
1545
1823
  });
1546
1824
  } catch (t) {
1547
- $.warn(`Failed to load custom font "${e.name}":`, t);
1825
+ X.warn(`Failed to load custom font "${e.name}":`, t);
1548
1826
  }
1549
1827
  });
1550
- await Promise.allSettled(e), !_ && (r.value = !0);
1828
+ await Promise.allSettled(e), !m && (n.value = !0);
1551
1829
  }
1552
- function b() {
1553
- for (let e of g) e.remove();
1554
- g.length = 0;
1830
+ function _() {
1831
+ for (let e of p) e.remove();
1832
+ p.length = 0;
1555
1833
  }
1556
- return i() && o(() => {
1557
- _ = !0, b();
1834
+ return o() && h(() => {
1835
+ m = !0, _();
1558
1836
  }), {
1559
- fonts: l,
1560
- defaultFont: m,
1561
- defaultFallback: s,
1837
+ fonts: a,
1838
+ defaultFont: d,
1839
+ defaultFallback: i,
1562
1840
  customFonts: t,
1563
- customFontsEnabled: n,
1564
- isLoaded: r,
1565
- setCustomFontsEnabled: c,
1566
- loadCustomFonts: y,
1567
- cleanupFontLinks: b,
1568
- getFontWithFallback: h,
1569
- getDefaultFont: p
1841
+ isLoaded: n,
1842
+ loadCustomFonts: g,
1843
+ cleanupFontLinks: _,
1844
+ getFontWithFallback: f,
1845
+ getDefaultFont: u
1570
1846
  };
1571
1847
  }
1572
1848
  //#endregion
1573
1849
  //#region src/composables/useLogicTag.ts
1574
- function sr() {
1575
- let e = p(wt, []), t = p(qe, []), n = p(Ge, je.liquid), r = p(mt, null), i = p(at, null), a = v(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
1576
- async function c() {
1577
- if (r) {
1578
- a.value = !0;
1850
+ function cr() {
1851
+ let e = n(Ge, []), t = n(tt, []), r = n(ft, Ae.liquid), i = n(Ue, null), a = n(xt, null), o = l(!1), s = !!i || e.length > 0 || t.length > 0, c = e.length > 0 || t.length > 0;
1852
+ async function u() {
1853
+ if (i) {
1854
+ o.value = !0;
1579
1855
  try {
1580
- return await r();
1856
+ return await i();
1581
1857
  } finally {
1582
- a.value = !1;
1858
+ o.value = !1;
1583
1859
  }
1584
1860
  }
1585
- if (i && s) {
1586
- a.value = !0;
1861
+ if (a && c) {
1862
+ o.value = !0;
1587
1863
  try {
1588
- return await i.open(e, t);
1864
+ return await a.open(e, t);
1589
1865
  } finally {
1590
- a.value = !1;
1866
+ o.value = !1;
1591
1867
  }
1592
1868
  }
1593
1869
  return null;
@@ -1595,20 +1871,20 @@ function sr() {
1595
1871
  return {
1596
1872
  logicTags: e,
1597
1873
  logicPairs: t,
1598
- syntax: n,
1599
- canInsertLogicTag: o,
1600
- isRequesting: a,
1601
- requestLogicTag: c
1874
+ syntax: r,
1875
+ canInsertLogicTag: s,
1876
+ isRequesting: o,
1877
+ requestLogicTag: u
1602
1878
  };
1603
1879
  }
1604
1880
  //#endregion
1605
1881
  //#region src/utils/mergeTagNodeSpec.ts
1606
- function cr(e, t, n) {
1607
- return ye(e, n) ? {
1882
+ function lr(e, t, n) {
1883
+ return ve(e, n) ? {
1608
1884
  type: "logicMergeTagNode",
1609
1885
  attrs: {
1610
1886
  value: e,
1611
- keyword: _e(e, n)
1887
+ keyword: ge(e, n)
1612
1888
  }
1613
1889
  } : {
1614
1890
  type: "mergeTagNode",
@@ -1620,15 +1896,15 @@ function cr(e, t, n) {
1620
1896
  }
1621
1897
  //#endregion
1622
1898
  //#region src/utils/insertLogicTag.ts
1623
- function lr(e) {
1899
+ function ur(e) {
1624
1900
  return "before" in e && "after" in e;
1625
1901
  }
1626
- function ur(e, t, n) {
1627
- if (!lr(t)) {
1628
- e.chain().focus().insertContent(cr(t.value, t.label, n)).run();
1902
+ function dr(e, t, n) {
1903
+ if (!ur(t)) {
1904
+ e.chain().focus().insertContent(lr(t.value, t.label, n)).run();
1629
1905
  return;
1630
1906
  }
1631
- let r = cr(t.before, t.label, n), i = cr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
1907
+ let r = lr(t.before, t.label, n), i = lr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
1632
1908
  if (a !== o) {
1633
1909
  e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
1634
1910
  return;
@@ -1637,20 +1913,20 @@ function ur(e, t, n) {
1637
1913
  }
1638
1914
  //#endregion
1639
1915
  //#region src/utils/linkColorExtension.ts
1640
- function dr(e) {
1916
+ function fr(e) {
1641
1917
  if (!e) return null;
1642
1918
  let t = e.trim();
1643
1919
  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;
1644
1920
  }
1645
- function fr(e) {
1921
+ function pr(e) {
1646
1922
  return e.extend({ addAttributes() {
1647
1923
  return {
1648
1924
  ...this.parent?.(),
1649
1925
  color: {
1650
1926
  default: null,
1651
- parseHTML: (e) => dr(Ot(e.style.color)),
1927
+ parseHTML: (e) => fr(Et(e.style.color)),
1652
1928
  renderHTML: (e) => {
1653
- let t = dr(e.color);
1929
+ let t = fr(e.color);
1654
1930
  return t ? { style: `color: ${t}` } : {};
1655
1931
  }
1656
1932
  }
@@ -1659,9 +1935,9 @@ function fr(e) {
1659
1935
  }
1660
1936
  //#endregion
1661
1937
  //#region src/composables/useRichTextLinkDialog.ts
1662
- function pr(e) {
1663
- let t = v(!1), n = v(""), r = v(""), i = v(null);
1664
- $n(i, t);
1938
+ function mr(e) {
1939
+ let t = l(!1), n = l(""), r = l(""), i = l(null);
1940
+ tr(i, t);
1665
1941
  function a() {
1666
1942
  let i = e.value?.getAttributes("link") ?? {};
1667
1943
  n.value = i.href || "", r.value = i.color || "", t.value = !0;
@@ -1670,11 +1946,11 @@ function pr(e) {
1670
1946
  if (n.value) {
1671
1947
  let t = c(n.value);
1672
1948
  if (t !== null) {
1673
- let n = dr(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
1949
+ let n = fr(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
1674
1950
  n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
1675
1951
  }
1676
1952
  }
1677
- u();
1953
+ d();
1678
1954
  }
1679
1955
  let s = /* @__PURE__ */ new Set([
1680
1956
  "http",
@@ -1694,14 +1970,14 @@ function pr(e) {
1694
1970
  let n = /^([a-z][a-z0-9+.-]*):/i.exec(t);
1695
1971
  return n ? s.has(n[1].toLowerCase()) ? t : null : `https://${t}`;
1696
1972
  }
1697
- function l() {
1698
- e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), u();
1699
- }
1700
1973
  function u() {
1974
+ e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), d();
1975
+ }
1976
+ function d() {
1701
1977
  t.value = !1, n.value = "", r.value = "";
1702
1978
  }
1703
- function d(e) {
1704
- e.key === "Enter" ? (e.preventDefault(), o()) : e.key === "Escape" && u();
1979
+ function f(e) {
1980
+ e.key === "Enter" ? (e.preventDefault(), o()) : e.key === "Escape" && d();
1705
1981
  }
1706
1982
  return {
1707
1983
  showLinkDialog: t,
@@ -1710,277 +1986,277 @@ function pr(e) {
1710
1986
  linkDialogRef: i,
1711
1987
  openLinkDialog: a,
1712
1988
  insertLink: o,
1713
- removeLink: l,
1714
- closeLinkDialog: u,
1715
- handleLinkKeydown: d
1989
+ removeLink: u,
1990
+ closeLinkDialog: d,
1991
+ handleLinkKeydown: f
1716
1992
  };
1717
1993
  }
1718
1994
  //#endregion
1719
1995
  //#region src/composables/useRichTextEditor.ts
1720
- function mr(t) {
1721
- let n = p(K, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: c, autocomplete: l } = Y(), { canInsertLogicTag: u, isRequesting: d, requestLogicTag: f } = sr(), m = p(Ze, null), h = (s(m) ? m.value : m)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", g = Ee(c), _ = e(null), { showLinkDialog: y, linkUrl: b, linkColor: x, linkDialogRef: S, openLinkDialog: C, insertLink: w, removeLink: T, closeLinkDialog: E, handleLinkKeydown: O } = pr(_), { start: k, stop: A } = Re(() => _.value?.commands.focus("end"), 0, { immediate: !1 }), j = e(null), M = v(!0), N = v(null), P = !1;
1722
- async function F() {
1723
- N.value = null, M.value = !0;
1996
+ function hr(r) {
1997
+ let i = n(J, null), { mergeTags: a, canRequestMergeTag: o, isRequesting: s, requestMergeTag: c, syntax: u, autocomplete: d } = Q(), { canInsertLogicTag: f, isRequesting: p, requestLogicTag: m } = cr(), h = n(nt, 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 } = mr(v), { start: k, stop: A } = Ie(() => v.value?.commands.focus("end"), 0, { immediate: !1 }), j = x(null), M = l(!0), P = l(null), F = !1;
1998
+ async function I() {
1999
+ P.value = null, M.value = !0;
1724
2000
  try {
1725
- let { TiptapEditor: e, EC: i, extensions: a } = await t.loadExtensions({
1726
- mergeTags: r,
1727
- syntax: c,
1728
- triggerChar: g,
1729
- autocompleteEnabled: l,
1730
- suggestionEmptyText: h
2001
+ let { TiptapEditor: e, EC: t, extensions: n } = await r.loadExtensions({
2002
+ mergeTags: a,
2003
+ syntax: u,
2004
+ triggerChar: _,
2005
+ autocompleteEnabled: d,
2006
+ suggestionEmptyText: g
1731
2007
  });
1732
- if (P) return;
1733
- j.value = i;
2008
+ if (F) return;
2009
+ j.value = t;
1734
2010
  let o = /* @__PURE__ */ new Map();
1735
- a.forEach((e, t) => o.set(e.name, t));
2011
+ n.forEach((e, t) => o.set(e.name, t));
1736
2012
  let s = new e({
1737
- extensions: a.filter((e, t) => o.get(e.name) === t),
1738
- content: t.blockContent(),
2013
+ extensions: n.filter((e, t) => o.get(e.name) === t),
2014
+ content: r.blockContent(),
1739
2015
  editable: !0,
1740
2016
  onUpdate: ({ editor: e }) => {
1741
- P || n && n.updateBlock(t.blockId(), { content: e.getHTML() });
2017
+ F || i && i.updateBlock(r.blockId(), { content: e.getHTML() });
1742
2018
  }
1743
2019
  });
1744
- if (P) {
2020
+ if (F) {
1745
2021
  s.destroy();
1746
2022
  return;
1747
2023
  }
1748
- _.value = s, M.value = !1, k();
2024
+ v.value = s, M.value = !1, k();
1749
2025
  } catch (e) {
1750
- if (P) return;
1751
- $.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), N.value = e instanceof Error ? e.message : "Failed to load editor", M.value = !1;
2026
+ if (F) return;
2027
+ X.error(`[${r.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), P.value = e instanceof Error ? e.message : "Failed to load editor", M.value = !1;
1752
2028
  }
1753
2029
  }
1754
- function ee() {
1755
- _.value?.destroy(), _.value = null, F();
2030
+ function L() {
2031
+ v.value?.destroy(), v.value = null, I();
1756
2032
  }
1757
- F();
1758
- let I = B(() => t.blockContent(), (e) => {
1759
- _.value && _.value.getHTML() !== e && _.value.commands.setContent(e, { emitUpdate: !1 });
2033
+ I();
2034
+ let R = t(() => r.blockContent(), (e) => {
2035
+ v.value && v.value.getHTML() !== e && v.value.commands.setContent(e, { emitUpdate: !1 });
1760
2036
  });
1761
- function L(e) {
1762
- if (a.value || d.value) return;
1763
- let n = e.composedPath(), r = n.find((e) => e instanceof HTMLElement);
1764
- if (!r) return;
1765
- t.onClickOutsideSideEffect?.(r);
1766
- let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
1767
- r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || t.onDone();
1768
- }
1769
- U(document, "mousedown", L), D(() => {
1770
- P = !0, I(), A(), _.value?.destroy();
2037
+ function z(e) {
2038
+ if (s.value || p.value) return;
2039
+ let t = e.composedPath(), n = t.find((e) => e instanceof HTMLElement);
2040
+ if (!n) return;
2041
+ r.onClickOutsideSideEffect?.(n);
2042
+ let i = t.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
2043
+ n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog") || i || r.onDone();
2044
+ }
2045
+ G(document, "mousedown", z), e(() => {
2046
+ F = !0, R(), A(), v.value?.destroy();
1771
2047
  });
1772
- async function R() {
1773
- let e = await o();
1774
- P || (e && _.value ? _.value.chain().focus().insertMergeTag({
2048
+ async function B() {
2049
+ let e = await c();
2050
+ F || (e && v.value ? v.value.chain().focus().insertMergeTag({
1775
2051
  label: e.label,
1776
2052
  value: e.value
1777
- }).run() : _.value?.commands.focus());
2053
+ }).run() : v.value?.commands.focus());
1778
2054
  }
1779
- async function z() {
1780
- let e = await f();
1781
- P || (e && _.value ? ur(_.value, e, c) : _.value?.commands.focus());
2055
+ async function V() {
2056
+ let e = await m();
2057
+ F || (e && v.value ? dr(v.value, e, u) : v.value?.commands.focus());
1782
2058
  }
1783
2059
  return {
1784
- editor: _,
2060
+ editor: v,
1785
2061
  EditorContent: j,
1786
2062
  isLoading: M,
1787
- initError: N,
1788
- retry: ee,
2063
+ initError: P,
2064
+ retry: L,
1789
2065
  showLinkDialog: y,
1790
2066
  linkUrl: b,
1791
- linkColor: x,
1792
- linkDialogRef: S,
1793
- mergeTags: r,
1794
- canRequestMergeTag: i,
1795
- isRequestingMergeTag: a,
1796
- syntax: c,
1797
- canInsertLogicTag: u,
1798
- isRequestingLogicTag: d,
1799
- openLinkDialog: C,
1800
- insertLink: w,
1801
- removeLink: T,
1802
- closeLinkDialog: E,
2067
+ linkColor: S,
2068
+ linkDialogRef: C,
2069
+ mergeTags: a,
2070
+ canRequestMergeTag: o,
2071
+ isRequestingMergeTag: s,
2072
+ syntax: u,
2073
+ canInsertLogicTag: f,
2074
+ isRequestingLogicTag: p,
2075
+ openLinkDialog: w,
2076
+ insertLink: T,
2077
+ removeLink: E,
2078
+ closeLinkDialog: D,
1803
2079
  handleLinkKeydown: O,
1804
- handleAddMergeTag: R,
1805
- handleAddLogicTag: z
2080
+ handleAddMergeTag: B,
2081
+ handleAddLogicTag: V
1806
2082
  };
1807
2083
  }
1808
2084
  //#endregion
1809
2085
  //#region src/composables/useSmallScreenNotice.ts
1810
- var hr = "(max-width: 767px)";
1811
- function gr(e) {
1812
- let t = He(hr);
2086
+ var gr = "(max-width: 767px)";
2087
+ function _r(e) {
2088
+ let t = Be(gr);
1813
2089
  return {
1814
2090
  isSmallScreen: t,
1815
- showNotice: C(() => (j(e) ?? !0) && t.value)
2091
+ showNotice: S(() => (P(e) ?? !0) && t.value)
1816
2092
  };
1817
2093
  }
1818
2094
  //#endregion
1819
2095
  //#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
1820
- var _r = { class: "tpl:w-full" }, vr = {
2096
+ var vr = { class: "tpl:w-full" }, yr = {
1821
2097
  key: 0,
1822
2098
  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)]"
1823
- }, yr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, br = {
2099
+ }, br = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, xr = {
1824
2100
  key: 1,
1825
2101
  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)]"
1826
- }, xr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Sr = {
2102
+ }, Sr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Cr = {
1827
2103
  key: 2,
1828
2104
  class: "tpl:relative"
1829
- }, Cr = ["innerHTML"], wr = {
2105
+ }, wr = ["innerHTML"], Tr = {
1830
2106
  key: 0,
1831
2107
  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]",
1832
2108
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
1833
- }, Tr = /* @__PURE__ */ R({
2109
+ }, Er = /* @__PURE__ */ d({
1834
2110
  __name: "CustomBlock",
1835
2111
  props: {
1836
2112
  block: {},
1837
2113
  viewport: {}
1838
2114
  },
1839
2115
  emits: ["fetchData"],
1840
- setup(e, { emit: n }) {
1841
- let r = e, i = n, { t: a } = q(), o = p(xt, null), s = v(""), c = v(!1), u = C(() => o?.getDefinition(r.block.customType)), d = C(() => !!u.value), { isFetching: f, fetch: m, needsFetch: h, hasDataSource: g } = ln({
1842
- definition: u,
1843
- block: C(() => r.block),
2116
+ setup(e, { emit: r }) {
2117
+ let i = e, a = r, { t: o } = Y(), c = n(vt, 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 } = cn({
2118
+ definition: f,
2119
+ block: S(() => i.block),
1844
2120
  onUpdate: (e, t) => {
1845
- i("fetchData", {
2121
+ a("fetchData", {
1846
2122
  fieldValues: e,
1847
2123
  dataSourceFetched: t
1848
2124
  });
1849
2125
  }
1850
- }), _ = p(W, []), y = p(G, null), b = C(() => {
1851
- if (!y?.value) return r.block;
2126
+ }), b = n(K, []), x = n(q, null), T = S(() => {
2127
+ if (!x?.value) return i.block;
1852
2128
  let e = {};
1853
- for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ? ge(n, _) : n;
2129
+ for (let [t, n] of Object.entries(i.block.fieldValues)) e[t] = typeof n == "string" ? he(n, b) : n;
1854
2130
  return {
1855
- ...r.block,
2131
+ ...i.block,
1856
2132
  fieldValues: e
1857
2133
  };
1858
2134
  });
1859
- async function x() {
1860
- if (o) {
1861
- c.value = !1;
2135
+ async function D() {
2136
+ if (c) {
2137
+ d.value = !1;
1862
2138
  try {
1863
- let e = await o.renderCustomBlock(b.value);
1864
- e.includes("Template render error:") && (c.value = !0), s.value = e;
2139
+ let e = await c.renderCustomBlock(T.value);
2140
+ e.includes("Template render error:") && (d.value = !0), u.value = e;
1865
2141
  } catch {
1866
- c.value = !0, s.value = "";
2142
+ d.value = !0, u.value = "";
1867
2143
  }
1868
2144
  }
1869
2145
  }
1870
- let S = ze(x, 150);
1871
- return t(() => {
1872
- x();
1873
- }), B(() => r.block.fieldValues, () => {
1874
- S();
1875
- }, { deep: !0 }), B(() => y?.value, () => {
1876
- S();
1877
- }), (e, t) => (l(), w("div", _r, [d.value ? c.value ? (l(), w("div", br, [z(E(Gt), {
2146
+ let k = Le(D, 150);
2147
+ return E(() => {
2148
+ D();
2149
+ }), t(() => i.block.fieldValues, () => {
2150
+ k();
2151
+ }, { deep: !0 }), t(() => x?.value, () => {
2152
+ k();
2153
+ }), (e, t) => (s(), C("div", vr, [p.value ? d.value ? (s(), C("div", xr, [v(_(Ut), {
1878
2154
  size: 24,
1879
2155
  class: "tpl:text-[var(--tpl-danger)]"
1880
- }), M("span", xr, k(E(a).customBlocks.renderError), 1)])) : (l(), w("div", Sr, [M("div", { innerHTML: s.value }, null, 8, Cr), E(g) && E(h) ? (l(), w("div", wr, [E(f) ? (l(), A(Yt, {
2156
+ }), M("span", Sr, R(_(o).customBlocks.renderError), 1)])) : (s(), C("div", Cr, [M("div", { innerHTML: u.value }, null, 8, wr), _(y) && _(g) ? (s(), C("div", Tr, [_(m) ? (s(), A(qt, {
1881
2157
  key: 1,
1882
2158
  class: "tpl:w-48"
1883
- })) : (l(), w("button", {
2159
+ })) : (s(), C("button", {
1884
2160
  key: 0,
1885
2161
  type: "button",
1886
- 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-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
1887
- onClick: t[0] ||= O((...e) => E(m) && E(m)(...e), ["stop"])
1888
- }, [u.value?.icon ? (l(), A(Xn, {
2162
+ 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)]",
2163
+ onClick: t[0] ||= O((...e) => _(h) && _(h)(...e), ["stop"])
2164
+ }, [f.value?.icon ? (s(), A(Qn, {
1889
2165
  key: 0,
1890
- icon: u.value.icon,
2166
+ icon: f.value.icon,
1891
2167
  size: 16
1892
- }, null, 8, ["icon"])) : T("", !0), L(" " + k(u.value?.dataSource?.label || E(a).customBlocks.dataSource.fetchButton), 1)]))])) : T("", !0)])) : (l(), w("div", vr, [z(E(Pt), {
2168
+ }, null, 8, ["icon"])) : w("", !0), V(" " + R(f.value?.dataSource?.label || _(o).customBlocks.dataSource.fetchButton), 1)]))])) : w("", !0)])) : (s(), C("div", yr, [v(_(Mt), {
1893
2169
  size: 24,
1894
2170
  class: "tpl:text-[var(--tpl-warning)]"
1895
- }), M("span", yr, k(E(a).customBlocks.definitionNotFound), 1)]))]));
2171
+ }), M("span", br, R(_(o).customBlocks.definitionNotFound), 1)]))]));
1896
2172
  }
1897
- }), Er = { class: "tpl:w-full" }, Dr = /* @__PURE__ */ R({
2173
+ }), Dr = { class: "tpl:w-full" }, Or = /* @__PURE__ */ d({
1898
2174
  __name: "DividerBlock",
1899
2175
  props: {
1900
2176
  block: {},
1901
2177
  viewport: {}
1902
2178
  },
1903
2179
  setup(e) {
1904
- let t = e, n = C(() => ({
2180
+ let t = e, n = S(() => ({
1905
2181
  borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
1906
2182
  width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
1907
2183
  margin: t.block.width === "full" ? "0" : "0 auto"
1908
2184
  }));
1909
- return (e, t) => (l(), w("div", Er, [M("hr", {
2185
+ return (e, t) => (s(), C("div", Dr, [M("hr", {
1910
2186
  class: "tpl:m-0 tpl:border-none",
1911
- style: S(n.value)
2187
+ style: k(n.value)
1912
2188
  }, null, 4)]));
1913
2189
  }
1914
- }), Or = { class: "tpl:w-full" }, kr = ["srcdoc", "title"], Ar = {
2190
+ }), kr = { class: "tpl:w-full" }, Ar = ["srcdoc", "title"], jr = {
1915
2191
  key: 1,
1916
2192
  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)]"
1917
- }, jr = {
2193
+ }, Mr = {
1918
2194
  key: 0,
1919
2195
  class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
1920
- }, Mr = {
2196
+ }, Nr = {
1921
2197
  key: 1,
1922
2198
  class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
1923
- }, Nr = /* @__PURE__ */ R({
2199
+ }, Pr = /* @__PURE__ */ d({
1924
2200
  __name: "HtmlBlock",
1925
2201
  props: {
1926
2202
  block: {},
1927
2203
  viewport: {}
1928
2204
  },
1929
- setup(e) {
1930
- let t = e, { t: n } = q(), r = p(ut, !1), i = C(() => t.block.content.trim().length > 0), a = C(() => r && i.value), o = p(W, []), s = p(G, null), c = C(() => s?.value ? ge(t.block.content, o) : t.block.content), u = v(null), d = v(60), f = null;
1931
- function m() {
1932
- let e = u.value?.contentDocument;
1933
- e && (d.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
1934
- }
1935
- function h() {
1936
- f?.disconnect(), f = null, m();
1937
- let e = u.value?.contentDocument?.documentElement;
1938
- e && typeof ResizeObserver < "u" && (f = new ResizeObserver(() => m()), f.observe(e));
1939
- }
1940
- return B(a, (e) => {
1941
- e || (f?.disconnect(), f = null);
1942
- }), D(() => {
1943
- f?.disconnect(), f = null;
1944
- }), (e, t) => (l(), w("div", Or, [a.value ? (l(), w("iframe", {
2205
+ setup(r) {
2206
+ let i = r, { t: a } = Y(), o = n(Ct, !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 ? he(i.block.content, d) : i.block.content), m = l(null), h = l(60), g = null;
2207
+ function y() {
2208
+ let e = m.value?.contentDocument;
2209
+ e && (h.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
2210
+ }
2211
+ function b() {
2212
+ g?.disconnect(), g = null, y();
2213
+ let e = m.value?.contentDocument?.documentElement;
2214
+ e && typeof ResizeObserver < "u" && (g = new ResizeObserver(() => y()), g.observe(e));
2215
+ }
2216
+ return t(u, (e) => {
2217
+ e || (g?.disconnect(), g = null);
2218
+ }), e(() => {
2219
+ g?.disconnect(), g = null;
2220
+ }), (e, t) => (s(), C("div", kr, [u.value ? (s(), C("iframe", {
1945
2221
  key: 0,
1946
2222
  ref_key: "iframeRef",
1947
- ref: u,
1948
- srcdoc: c.value,
2223
+ ref: m,
2224
+ srcdoc: p.value,
1949
2225
  sandbox: "allow-same-origin",
1950
- title: E(n).html.preview,
2226
+ title: _(a).html.preview,
1951
2227
  class: "tpl:block tpl:w-full tpl:border-0",
1952
- style: S({ height: `${d.value}px` }),
1953
- onLoad: h
1954
- }, null, 44, kr)) : (l(), w("div", Ar, [z(E(Ft), {
2228
+ style: k({ height: `${h.value}px` }),
2229
+ onLoad: b
2230
+ }, null, 44, Ar)) : (s(), C("div", jr, [v(_(Nt), {
1955
2231
  size: 24,
1956
2232
  class: "tpl:text-[var(--tpl-text-dim)]"
1957
- }), i.value ? (l(), w("span", jr, k(E(n).html.preview), 1)) : (l(), w("span", Mr, k(E(n).html.empty), 1))]))]));
2233
+ }), c.value ? (s(), C("span", Mr, R(_(a).html.preview), 1)) : (s(), C("span", Nr, R(_(a).html.empty), 1))]))]));
1958
2234
  }
1959
- }), Pr = "image/";
1960
- function Fr(e) {
1961
- let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || j(r), { isOverDropZone: a } = We(t, {
2235
+ }), Fr = "image/";
2236
+ function Ir(e) {
2237
+ let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || P(r), { isOverDropZone: a } = He(t, {
1962
2238
  preventDefaultForUnhandled: !0,
1963
2239
  onDrop: (e) => {
1964
2240
  if (!i()) return;
1965
- let t = (e ?? []).filter((e) => e.type.startsWith(Pr));
2241
+ let t = (e ?? []).filter((e) => e.type.startsWith(Fr));
1966
2242
  t.length > 0 && n([t[0]]);
1967
2243
  }
1968
2244
  });
1969
- return { isOver: C(() => i() && a.value) };
2245
+ return { isOver: S(() => i() && a.value) };
1970
2246
  }
1971
2247
  //#endregion
1972
2248
  //#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
1973
- var Ir = {
2249
+ var Lr = {
1974
2250
  key: 0,
1975
2251
  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)]",
1976
2252
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
1977
- }, Lr = ["href"], Rr = ["src", "alt"], zr = ["src", "alt"], Br = {
2253
+ }, Rr = ["href"], zr = ["src", "alt"], Br = ["src", "alt"], Vr = {
1978
2254
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
1979
2255
  style: { opacity: "0.7" }
1980
- }, Vr = ["href"], Hr = ["src", "alt"], Ur = ["src", "alt"], Wr = {
2256
+ }, Hr = ["href"], Ur = ["src", "alt"], Wr = ["src", "alt"], Gr = {
1981
2257
  key: 4,
1982
2258
  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)]"
1983
- }, Gr = ["aria-label"], Kr = { key: 1 }, qr = /* @__PURE__ */ R({
2259
+ }, Kr = ["aria-label"], qr = { key: 1 }, Jr = /* @__PURE__ */ d({
1984
2260
  __name: "ImageBlock",
1985
2261
  props: {
1986
2262
  block: {},
@@ -1988,61 +2264,61 @@ var Ir = {
1988
2264
  },
1989
2265
  emits: ["update"],
1990
2266
  setup(e, { emit: t }) {
1991
- let n = e, r = t, { t: i } = q(), { syntax: a } = Y(), o = p(et, null), s = C(() => !!o), c = Zt();
1992
- async function u() {
1993
- let e = await o?.({ accept: ["images"] });
1994
- if (c.alive && e) {
2267
+ let r = e, i = t, { t: a } = Y(), { syntax: o } = Q(), c = n(dt, null), u = S(() => !!c), d = Yt();
2268
+ async function f() {
2269
+ let e = await c?.({ accept: ["images"] });
2270
+ if (d.alive && e) {
1995
2271
  let t = { src: e.url };
1996
- e.alt && (t.alt = e.alt), r("update", t);
2272
+ e.alt && (t.alt = e.alt), i("update", t);
1997
2273
  }
1998
2274
  }
1999
- let d = v(), f = v(!1), m = C(() => s.value && !f.value && !b.value);
2000
- async function h(e) {
2001
- if (o) {
2002
- f.value = !0;
2275
+ let p = l(), m = l(!1), h = S(() => u.value && !m.value && !T.value);
2276
+ async function g(e) {
2277
+ if (c) {
2278
+ m.value = !0;
2003
2279
  try {
2004
- let t = await o({
2280
+ let t = await c({
2005
2281
  accept: ["images"],
2006
2282
  files: e
2007
2283
  });
2008
- if (!c.alive) return;
2284
+ if (!d.alive) return;
2009
2285
  if (t) {
2010
2286
  let e = { src: t.url };
2011
- t.alt && (e.alt = t.alt), r("update", e);
2287
+ t.alt && (e.alt = t.alt), i("update", e);
2012
2288
  }
2013
2289
  } finally {
2014
- c.alive && (f.value = !1);
2290
+ d.alive && (m.value = !1);
2015
2291
  }
2016
2292
  }
2017
2293
  }
2018
- let { isOver: g } = Fr({
2019
- target: d,
2020
- enabled: m,
2021
- onFiles: h
2022
- }), _ = C(() => ({ textAlign: n.block.align })), y = C(() => {
2023
- let e = n.block.align;
2294
+ let { isOver: y } = Ir({
2295
+ target: p,
2296
+ enabled: h,
2297
+ onFiles: g
2298
+ }), b = S(() => ({ textAlign: r.block.align })), x = S(() => {
2299
+ let e = r.block.align;
2024
2300
  return {
2025
2301
  maxWidth: "100%",
2026
- width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
2302
+ width: r.block.width === "full" ? "100%" : `${r.block.width}px`,
2027
2303
  display: "block",
2028
2304
  marginLeft: e === "center" || e === "right" ? "auto" : void 0,
2029
2305
  marginRight: e === "center" ? "auto" : void 0
2030
2306
  };
2031
- }), b = C(() => H(n.block.src, a)), x = Q(() => b.value ? void 0 : n.block.src), D = Q(() => b.value ? n.block.placeholderUrl : void 0);
2032
- return (t, n) => (l(), w("div", {
2307
+ }), T = S(() => U(r.block.src, o)), E = Sn(() => T.value ? void 0 : r.block.src), D = Sn(() => T.value ? r.block.placeholderUrl : void 0);
2308
+ return (t, n) => (s(), C("div", {
2033
2309
  ref_key: "dropZoneRef",
2034
- ref: d,
2310
+ ref: p,
2035
2311
  "data-testid": "image-drop-zone",
2036
2312
  class: "tpl:relative tpl:w-full",
2037
- style: S(_.value)
2038
- }, [m.value && (E(g) || f.value) ? (l(), w("div", Ir, [f.value ? (l(), w(I, { key: 0 }, [z(E(Vt), {
2313
+ style: k(b.value)
2314
+ }, [h.value && (_(y) || m.value) ? (s(), C("div", Lr, [m.value ? (s(), C(L, { key: 0 }, [v(_(zt), {
2039
2315
  class: "tpl-spinner",
2040
2316
  size: 20,
2041
2317
  "stroke-width": 2
2042
- }), L(" " + k(E(i).image.uploading), 1)], 64)) : (l(), w(I, { key: 1 }, [z(E(Ut), {
2318
+ }), V(" " + R(_(a).image.uploading), 1)], 64)) : (s(), C(L, { key: 1 }, [v(_(Vt), {
2043
2319
  size: 20,
2044
2320
  "stroke-width": 1.5
2045
- }), L(" " + k(E(i).image.dropToUpload), 1)], 64))])) : T("", !0), e.block.src && b.value && e.block.placeholderUrl ? (l(), w(I, { key: 1 }, [e.block.linkUrl ? (l(), w("a", {
2321
+ }), 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", {
2046
2322
  key: 0,
2047
2323
  href: e.block.linkUrl,
2048
2324
  target: "_blank",
@@ -2051,25 +2327,25 @@ var Ir = {
2051
2327
  }, [M("img", {
2052
2328
  class: "tpl:border-0",
2053
2329
  loading: "lazy",
2054
- src: E(D),
2055
- alt: e.block.alt || E(i).image.altTextPlaceholder,
2056
- style: S(y.value)
2057
- }, null, 12, Rr)], 8, Lr)) : (l(), w("img", {
2330
+ src: _(D),
2331
+ alt: e.block.alt || _(a).image.altTextPlaceholder,
2332
+ style: k(x.value)
2333
+ }, null, 12, zr)], 8, Rr)) : (s(), C("img", {
2058
2334
  key: 1,
2059
2335
  class: "tpl:border-0",
2060
- src: E(D),
2336
+ src: _(D),
2061
2337
  alt: e.block.alt,
2062
- style: S(y.value)
2063
- }, null, 12, zr))], 64)) : e.block.src && b.value ? (l(), w("div", {
2338
+ style: k(x.value)
2339
+ }, null, 12, Br))], 64)) : e.block.src && T.value ? (s(), C("div", {
2064
2340
  key: 2,
2065
2341
  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)]",
2066
- style: S([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, y.value])
2067
- }, [z(E(zt), {
2342
+ style: k([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, x.value])
2343
+ }, [v(_(Lt), {
2068
2344
  size: 32,
2069
2345
  "stroke-width": 1.5,
2070
2346
  class: "tpl:text-[var(--tpl-primary)]",
2071
2347
  style: { opacity: "0.5" }
2072
- }), M("span", Br, [z(Gn, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (l(), w(I, { key: 3 }, [e.block.linkUrl ? (l(), w("a", {
2348
+ }), M("span", Vr, [v(qn, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (s(), C(L, { key: 3 }, [e.block.linkUrl ? (s(), C("a", {
2073
2349
  key: 0,
2074
2350
  href: e.block.linkUrl,
2075
2351
  target: "_blank",
@@ -2078,36 +2354,36 @@ var Ir = {
2078
2354
  }, [M("img", {
2079
2355
  class: "tpl:border-0",
2080
2356
  loading: "lazy",
2081
- src: E(x),
2082
- alt: e.block.alt || E(i).image.altTextPlaceholder,
2083
- style: S(y.value)
2084
- }, null, 12, Hr)], 8, Vr)) : (l(), w("img", {
2357
+ src: _(E),
2358
+ alt: e.block.alt || _(a).image.altTextPlaceholder,
2359
+ style: k(x.value)
2360
+ }, null, 12, Ur)], 8, Hr)) : (s(), C("img", {
2085
2361
  key: 1,
2086
2362
  class: "tpl:border-0",
2087
- src: E(x),
2363
+ src: _(E),
2088
2364
  alt: e.block.alt,
2089
- style: S(y.value)
2090
- }, null, 12, Ur))], 64)) : (l(), w("div", Wr, [s.value ? (l(), w("button", {
2365
+ style: k(x.value)
2366
+ }, null, 12, Wr))], 64)) : (s(), C("div", Gr, [u.value ? (s(), C("button", {
2091
2367
  key: 0,
2092
- "aria-label": E(i).image.browseMedia,
2093
- 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:duration-150 tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
2094
- onClick: O(u, ["stop"])
2095
- }, [z(E(zt), {
2368
+ "aria-label": _(a).image.browseMedia,
2369
+ 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)]",
2370
+ onClick: O(f, ["stop"])
2371
+ }, [v(_(Lt), {
2096
2372
  size: 14,
2097
2373
  "stroke-width": 1.5
2098
- }), L(" " + k(E(i).image.browseMedia), 1)], 8, Gr)) : (l(), w("span", Kr, k(E(i).image.clickToAdd), 1))]))], 4));
2374
+ }), V(" " + R(_(a).image.browseMedia), 1)], 8, Kr)) : (s(), C("span", qr, R(_(a).image.clickToAdd), 1))]))], 4));
2099
2375
  }
2100
- }), Jr = { class: "tpl:w-full" }, Yr = ["href"], Xr = {
2376
+ }), Yr = { class: "tpl:w-full" }, Xr = ["href"], Zr = {
2101
2377
  key: 1,
2102
2378
  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)]"
2103
- }, Zr = /* @__PURE__ */ R({
2379
+ }, Qr = /* @__PURE__ */ d({
2104
2380
  __name: "MenuBlock",
2105
2381
  props: {
2106
2382
  block: {},
2107
2383
  viewport: {}
2108
2384
  },
2109
2385
  setup(e) {
2110
- let t = e, { t: n } = q(), r = C(() => ({
2386
+ let t = e, { t: n } = Y(), i = S(() => ({
2111
2387
  display: "flex",
2112
2388
  flexWrap: "wrap",
2113
2389
  gap: `0 ${t.block.spacing}px`,
@@ -2115,31 +2391,31 @@ var Ir = {
2115
2391
  fontSize: `${t.block.fontSize}px`,
2116
2392
  fontFamily: t.block.fontFamily || "inherit",
2117
2393
  alignItems: "center"
2118
- })), i = C(() => t.block.items.length > 0);
2119
- function a(e) {
2394
+ })), a = S(() => t.block.items.length > 0);
2395
+ function o(e) {
2120
2396
  return e || t.block.linkColor || t.block.color;
2121
2397
  }
2122
- return (t, o) => (l(), w("div", Jr, [i.value ? (l(), w("div", {
2398
+ return (t, c) => (s(), C("div", Yr, [a.value ? (s(), C("div", {
2123
2399
  key: 0,
2124
- style: S(r.value)
2125
- }, [(l(!0), w(I, null, f(e.block.items, (t, n) => (l(), w(I, { key: t.id }, [M("a", {
2400
+ style: k(i.value)
2401
+ }, [(s(!0), C(L, null, r(e.block.items, (t, n) => (s(), C(L, { key: t.id }, [M("a", {
2126
2402
  href: t.url || "#",
2127
2403
  class: "tpl:cursor-default tpl:no-underline",
2128
- style: S({
2129
- color: a(t.color),
2404
+ style: k({
2405
+ color: o(t.color),
2130
2406
  fontWeight: t.bold ? "bold" : "normal",
2131
2407
  textDecoration: t.underline ? "underline" : "none"
2132
2408
  }),
2133
- onClick: o[0] ||= O(() => {}, ["prevent"])
2134
- }, [z(Gn, { text: t.text || "..." }, null, 8, ["text"])], 12, Yr), n < e.block.items.length - 1 ? (l(), w("span", {
2409
+ onClick: c[0] ||= O(() => {}, ["prevent"])
2410
+ }, [v(qn, { text: t.text || "..." }, null, 8, ["text"])], 12, Xr), n < e.block.items.length - 1 ? (s(), C("span", {
2135
2411
  key: 0,
2136
- style: S({
2412
+ style: k({
2137
2413
  color: e.block.separatorColor,
2138
2414
  padding: `0 ${e.block.spacing}px`
2139
2415
  })
2140
- }, k(e.block.separator), 5)) : T("", !0)], 64))), 128))], 4)) : (l(), w("div", Xr, [z(E(Lt), { size: 16 }), M("span", null, k(E(n).menu.addLinks), 1)]))]));
2416
+ }, R(e.block.separator), 5)) : w("", !0)], 64))), 128))], 4)) : (s(), C("div", Zr, [v(_(Ft), { size: 16 }), M("span", null, R(_(n).menu.addLinks), 1)]))]));
2141
2417
  }
2142
- }), Qr = /* @__PURE__ */ new Set([
2418
+ }), $r = /* @__PURE__ */ new Set([
2143
2419
  "http",
2144
2420
  "https",
2145
2421
  "mailto",
@@ -2149,7 +2425,7 @@ var Ir = {
2149
2425
  "sms",
2150
2426
  "xmpp",
2151
2427
  "cid"
2152
- ]), $r = /* @__PURE__ */ new Set([
2428
+ ]), ei = /* @__PURE__ */ new Set([
2153
2429
  "SCRIPT",
2154
2430
  "STYLE",
2155
2431
  "IFRAME",
@@ -2159,7 +2435,7 @@ var Ir = {
2159
2435
  "META",
2160
2436
  "BASE",
2161
2437
  "FORM"
2162
- ]), ei = /* @__PURE__ */ new Set([
2438
+ ]), ti = /* @__PURE__ */ new Set([
2163
2439
  "href",
2164
2440
  "xlink:href",
2165
2441
  "formaction",
@@ -2168,16 +2444,16 @@ var Ir = {
2168
2444
  "background",
2169
2445
  "poster"
2170
2446
  ]);
2171
- function ti(e, t) {
2447
+ function ni(e, t) {
2172
2448
  let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
2173
2449
  if (!n || n.startsWith("#")) return !0;
2174
2450
  let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
2175
2451
  if (!r) return !0;
2176
2452
  let i = r[1].toLowerCase();
2177
- return Qr.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
2453
+ return $r.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
2178
2454
  }
2179
- function ni(e) {
2180
- if ($r.has(e.tagName)) {
2455
+ function ri(e) {
2456
+ if (ei.has(e.tagName)) {
2181
2457
  e.remove();
2182
2458
  return;
2183
2459
  }
@@ -2189,123 +2465,123 @@ function ni(e) {
2189
2465
  e.removeAttribute(n);
2190
2466
  continue;
2191
2467
  }
2192
- if (ei.has(t)) {
2193
- ti(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
2468
+ if (ti.has(t)) {
2469
+ ni(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
2194
2470
  continue;
2195
2471
  }
2196
2472
  if (t === "src") {
2197
- ti(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
2473
+ ni(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
2198
2474
  continue;
2199
2475
  }
2200
2476
  t === "srcdoc" && e.removeAttribute(n);
2201
2477
  }
2202
2478
  let n = Array.from(e.children);
2203
- for (let e of n) ni(e);
2479
+ for (let e of n) ri(e);
2204
2480
  }
2205
- function ri(e) {
2481
+ function ii(e) {
2206
2482
  if (typeof DOMParser > "u") return e;
2207
2483
  let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
2208
- for (let e of n) ni(e);
2484
+ for (let e of n) ri(e);
2209
2485
  return t.innerHTML;
2210
2486
  }
2211
2487
  //#endregion
2212
2488
  //#region src/composables/useEditableTextBlock.ts
2213
- function ii(e) {
2214
- let t = p(W, []), n = p(G, null), { syntax: r } = Y(), i = C(() => n?.value ? Se(e(), t) : De(e(), t)), a = C(() => ri(Ae(i.value, r))), o = v(!1), s = v(null), { top: c, left: l } = Ue(s), { toLocal: u } = At(), d = C(() => u({
2215
- top: c.value - 8,
2216
- left: l.value
2489
+ function ai(e) {
2490
+ let t = n(K, []), r = n(q, null), { syntax: i } = Q(), a = S(() => r?.value ? xe(e(), t) : Ee(e(), t)), o = S(() => ii(ke(a.value, i))), s = l(!1), c = l(null), { top: u, left: d } = Ve(c), { toLocal: f } = Ot(), p = S(() => f({
2491
+ top: u.value - 8,
2492
+ left: d.value
2217
2493
  }));
2218
- function f() {
2219
- o.value = !0;
2220
- }
2221
2494
  function m() {
2222
- o.value = !1;
2495
+ s.value = !0;
2496
+ }
2497
+ function h() {
2498
+ s.value = !1;
2223
2499
  }
2224
2500
  return {
2225
- isEditing: o,
2226
- blockRef: s,
2227
- toolbarPosition: d,
2228
- resolvedContent: a,
2229
- handleDoubleClick: f,
2230
- handleEditorDone: m
2501
+ isEditing: s,
2502
+ blockRef: c,
2503
+ toolbarPosition: p,
2504
+ resolvedContent: o,
2505
+ handleDoubleClick: m,
2506
+ handleEditorDone: h
2231
2507
  };
2232
2508
  }
2233
2509
  //#endregion
2234
2510
  //#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
2235
- var ai = ["innerHTML"], oi = /* @__PURE__ */ R({
2511
+ var oi = ["innerHTML"], si = /* @__PURE__ */ d({
2236
2512
  __name: "ParagraphBlock",
2237
2513
  props: {
2238
2514
  block: {},
2239
2515
  viewport: {}
2240
2516
  },
2241
2517
  setup(e) {
2242
- let t = e, n = b(() => import("./ParagraphEditor-Bzcma_Lm.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ii(() => t.block.content);
2243
- return (t, u) => (l(), w("div", {
2518
+ let t = e, n = B(() => import("./ParagraphEditor-BJJ925sx.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = ai(() => t.block.content);
2519
+ return (t, u) => (s(), C("div", {
2244
2520
  ref_key: "blockRef",
2245
2521
  ref: i,
2246
2522
  class: "tpl:min-h-[1em] tpl:w-full",
2247
- onDblclick: u[0] ||= (...e) => E(s) && E(s)(...e)
2248
- }, [E(r) ? (l(), A(E(n), {
2523
+ onDblclick: u[0] ||= (...e) => _(c) && _(c)(...e)
2524
+ }, [_(r) ? (s(), A(_(n), {
2249
2525
  key: 0,
2250
2526
  block: e.block,
2251
- "toolbar-position": E(a),
2252
- onDone: E(c)
2527
+ "toolbar-position": _(a),
2528
+ onDone: _(l)
2253
2529
  }, null, 8, [
2254
2530
  "block",
2255
2531
  "toolbar-position",
2256
2532
  "onDone"
2257
- ])) : (l(), w("div", {
2533
+ ])) : (s(), C("div", {
2258
2534
  key: 1,
2259
2535
  class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
2260
- innerHTML: E(o)
2261
- }, null, 8, ai))], 544));
2536
+ innerHTML: _(o)
2537
+ }, null, 8, oi))], 544));
2262
2538
  }
2263
2539
  });
2264
2540
  //#endregion
2265
2541
  //#region src/utils/blockComponentResolver.ts
2266
- function si(e) {
2542
+ function ci(e) {
2267
2543
  let t = { fontFamily: e.fontFamily };
2268
2544
  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;
2269
2545
  }
2270
- function ci(e, t, n) {
2546
+ function li(e, t, n) {
2271
2547
  if (t) {
2272
2548
  let n = t.getComponent(e);
2273
2549
  if (n) return n;
2274
2550
  }
2275
2551
  return n[e.type] ?? null;
2276
2552
  }
2277
- function li(e) {
2553
+ function ui(e) {
2278
2554
  let { padding: t, backgroundColor: n } = e.styles, r = {
2279
2555
  padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
2280
2556
  backgroundColor: n || "transparent"
2281
2557
  };
2282
2558
  return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
2283
2559
  }
2284
- function ui(e) {
2560
+ function di(e) {
2285
2561
  if (e.type !== "section" || !e.wrapper) return null;
2286
2562
  let t = e.wrapper, n = {};
2287
2563
  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;
2288
2564
  }
2289
2565
  //#endregion
2290
2566
  //#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
2291
- var di = [
2567
+ var fi = [
2292
2568
  "data-block-id",
2293
2569
  "data-block-type",
2294
2570
  "data-tpl-picked"
2295
- ], fi = ["aria-label"], pi = [
2571
+ ], pi = ["aria-label"], mi = [
2296
2572
  "aria-label",
2297
2573
  "aria-pressed",
2298
2574
  "title"
2299
- ], mi = ["aria-label", "title"], hi = ["aria-label", "title"], gi = ["aria-label", "title"], _i = {
2575
+ ], hi = ["aria-label", "title"], gi = ["aria-label", "title"], _i = ["aria-label", "title"], vi = {
2300
2576
  key: 1,
2301
2577
  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"
2302
- }, vi = { 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)]" }, yi = {
2578
+ }, yi = { 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)]" }, bi = {
2303
2579
  key: 2,
2304
2580
  class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
2305
- }, bi = ["aria-label", "title"], xi = {
2581
+ }, xi = ["aria-label", "title"], Si = {
2306
2582
  key: 3,
2307
2583
  class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
2308
- }, Si = ["aria-label"], Ci = /*#__PURE__*/ Xt(/* @__PURE__ */ R({
2584
+ }, Ci = ["aria-label"], wi = /*#__PURE__*/ Jt(/* @__PURE__ */ d({
2309
2585
  __name: "BlockWrapper",
2310
2586
  props: {
2311
2587
  block: {},
@@ -2317,191 +2593,191 @@ var di = [
2317
2593
  },
2318
2594
  emits: ["select"],
2319
2595
  setup(e, { emit: t }) {
2320
- let n = b(() => import("./BlockIssueBadge-BEEY9o2o.js")), i = e, a = t, { t: o, format: s } = q(), c = p(it, null), u = v(null), f = C(() => c?.liftedBlockId.value === i.block.id), m = C(() => f.value ? s(o.blockActions.dragLifted, { block: i.block.type }) : o.blockActions.drag);
2596
+ let r = B(() => import("./BlockIssueBadge-UzSSOM_2.js")), i = e, o = t, { t: c, format: u } = Y(), d = n(St, 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);
2321
2597
  async function h() {
2322
- await d(), u.value?.focus();
2598
+ await D(), f.value?.focus();
2323
2599
  }
2324
2600
  function g(e) {
2325
- if (c) {
2601
+ if (d) {
2326
2602
  if (e.key === " " || e.key === "Enter") {
2327
- e.preventDefault(), e.stopPropagation(), f.value ? c.drop(i.block.id) : c.lift(i.block.id);
2603
+ e.preventDefault(), e.stopPropagation(), p.value ? d.drop(i.block.id) : d.lift(i.block.id);
2328
2604
  return;
2329
2605
  }
2330
- if (f.value) {
2606
+ if (p.value) {
2331
2607
  if (e.key === "Escape") {
2332
- e.preventDefault(), e.stopPropagation(), c.cancel(), h();
2608
+ e.preventDefault(), e.stopPropagation(), d.cancel(), h();
2333
2609
  return;
2334
2610
  }
2335
2611
  if (e.key === "ArrowUp") {
2336
- e.preventDefault(), e.stopPropagation(), c.moveUp(i.block.id), h();
2612
+ e.preventDefault(), e.stopPropagation(), d.moveUp(i.block.id), h();
2337
2613
  return;
2338
2614
  }
2339
- e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), c.moveDown(i.block.id), h());
2615
+ e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), d.moveDown(i.block.id), h());
2340
2616
  }
2341
2617
  }
2342
2618
  }
2343
- let _ = C(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), y = C(() => i.previewMode === !0 && _.value), x = C(() => i.viewport ? {
2344
- desktop: o.viewport.desktop,
2345
- mobile: o.viewport.mobile
2346
- }[i.viewport] ?? i.viewport : ""), D = C(() => !!i.block.displayCondition), A = p(lt, null), j = p(ft, null), N = p(dt, {}), P = C(() => N.savedBlocks?.isPicking.value === !0), ee = C(() => !i.nested && N.savedBlocks?.isAvailable.value === !0 && N.savedBlocks?.canCreate.value === !0), I = C(() => i.isSelected && !P.value), R = C(() => N.comments?.getBlockCount(i.block.id) ?? 0), B = C(() => {
2347
- let e = li(i.block), t = {
2619
+ 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 ? {
2620
+ desktop: c.viewport.desktop,
2621
+ mobile: c.viewport.mobile
2622
+ }[i.viewport] ?? i.viewport : ""), E = S(() => !!i.block.displayCondition), A = n(at, null), j = n(ct, null), N = n(st, {}), 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(() => {
2623
+ let e = ui(i.block), t = {
2348
2624
  padding: e.padding,
2349
2625
  backgroundColor: e.backgroundColor
2350
2626
  };
2351
2627
  return e.borderRadius && (t.borderRadius = e.borderRadius), t;
2352
- }), te = C(() => ui(i.block));
2353
- function ne(e) {
2354
- i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), a("select"));
2628
+ }), ee = S(() => di(i.block));
2629
+ function te(e) {
2630
+ i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), o("select"));
2355
2631
  }
2356
- function re() {
2632
+ function ne() {
2357
2633
  A?.deleteBlock(i.block.id);
2358
2634
  }
2359
- function ie() {
2635
+ function re() {
2360
2636
  A?.duplicateBlock(i.block);
2361
2637
  }
2362
- function ae() {
2638
+ function ie() {
2363
2639
  N.savedBlocks?.startPicking(i.block.id);
2364
2640
  }
2365
- function oe() {
2641
+ function ae() {
2366
2642
  j?.toggleBlock(i.block.id);
2367
2643
  }
2368
- return (t, i) => y.value ? T("", !0) : (l(), w("div", {
2644
+ return (t, n) => x.value ? w("", !0) : (s(), C("div", {
2369
2645
  key: 0,
2370
- class: F(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
2646
+ class: b(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
2371
2647
  "tpl-block--selected": e.isSelected,
2372
2648
  "tpl-block--picked": e.picked,
2373
2649
  "tpl-block--idle": !e.isSelected && !e.picked,
2374
- "tpl-block--lifted": f.value
2650
+ "tpl-block--lifted": p.value
2375
2651
  }]),
2376
2652
  "data-block-id": e.block.id,
2377
2653
  "data-block-type": e.block.type,
2378
2654
  "data-tpl-picked": e.picked || void 0,
2379
- onClick: ne
2655
+ onClick: te
2380
2656
  }, [
2381
- z(E(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
2382
- I.value ? (l(), w("div", {
2657
+ v(_(r), { "block-id": e.block.id }, null, 8, ["block-id"]),
2658
+ I.value ? (s(), C("div", {
2383
2659
  key: 0,
2384
2660
  role: "toolbar",
2385
- "aria-label": E(o).blockActions.drag,
2661
+ "aria-label": _(c).blockActions.drag,
2386
2662
  class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
2387
2663
  }, [
2388
2664
  M("button", {
2389
2665
  ref_key: "dragButtonRef",
2390
- ref: u,
2391
- class: "tpl-block-btn tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-grab tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150 tpl:active:cursor-grabbing",
2666
+ ref: f,
2667
+ class: "tpl-block-btn tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-grab tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:active:cursor-grabbing",
2392
2668
  "aria-label": m.value,
2393
- "aria-pressed": f.value,
2669
+ "aria-pressed": p.value,
2394
2670
  "aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
2395
- title: E(o).blockActions.drag,
2671
+ title: _(c).blockActions.drag,
2396
2672
  onKeydown: g
2397
- }, [z(E(Bt), {
2673
+ }, [v(_(Rt), {
2398
2674
  size: 14,
2399
2675
  "stroke-width": 1.5
2400
- })], 40, pi),
2676
+ })], 40, mi),
2401
2677
  M("button", {
2402
- 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 tpl:duration-150",
2403
- "aria-label": E(o).blockActions.duplicate,
2404
- title: E(o).blockActions.duplicate,
2405
- onClick: O(ie, ["stop"])
2406
- }, [z(E(Nt), {
2678
+ 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",
2679
+ "aria-label": _(c).blockActions.duplicate,
2680
+ title: _(c).blockActions.duplicate,
2681
+ onClick: O(re, ["stop"])
2682
+ }, [v(_(jt), {
2407
2683
  size: 14,
2408
2684
  "stroke-width": 1.5
2409
- })], 8, mi),
2410
- ee.value ? (l(), w("button", {
2685
+ })], 8, hi),
2686
+ F.value ? (s(), C("button", {
2411
2687
  key: 0,
2412
- 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 tpl:duration-150",
2413
- "aria-label": E(o).blockActions.saveAsBlock,
2414
- title: E(o).blockActions.saveAsBlock,
2415
- onClick: O(ae, ["stop"])
2416
- }, [z(E(Mt), {
2688
+ 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",
2689
+ "aria-label": _(c).blockActions.saveAsBlock,
2690
+ title: _(c).blockActions.saveAsBlock,
2691
+ onClick: O(ie, ["stop"])
2692
+ }, [v(_(At), {
2417
2693
  size: 14,
2418
2694
  "stroke-width": 1.5
2419
- })], 8, hi)) : T("", !0),
2695
+ })], 8, gi)) : w("", !0),
2420
2696
  M("button", {
2421
- 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 tpl:duration-150",
2422
- "aria-label": E(o).blockActions.delete,
2423
- title: E(o).blockActions.delete,
2424
- onClick: O(re, ["stop"])
2425
- }, [z(E(Rt), {
2697
+ 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",
2698
+ "aria-label": _(c).blockActions.delete,
2699
+ title: _(c).blockActions.delete,
2700
+ onClick: O(ne, ["stop"])
2701
+ }, [v(_(It), {
2426
2702
  size: 14,
2427
2703
  "stroke-width": 1.5
2428
- })], 8, gi)
2429
- ], 8, fi)) : T("", !0),
2430
- _.value ? (l(), w("div", _i, [M("span", vi, [z(E(It), {
2704
+ })], 8, _i)
2705
+ ], 8, pi)) : w("", !0),
2706
+ y.value ? (s(), C("div", vi, [M("span", yi, [v(_(Pt), {
2431
2707
  size: 12,
2432
2708
  "stroke-width": 1.5
2433
- }), L(" " + k(E(s)(E(o).blockActions.hiddenOnViewport, { viewport: x.value })), 1)])])) : T("", !0),
2434
- D.value && !_.value ? (l(), w("div", yi, [M("button", {
2709
+ }), V(" " + R(_(u)(_(c).blockActions.hiddenOnViewport, { viewport: T.value })), 1)])])) : w("", !0),
2710
+ E.value && !y.value ? (s(), C("div", bi, [M("button", {
2435
2711
  "data-testid": "condition-toggle",
2436
- 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:duration-150 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
2437
- "aria-label": E(o).blockActions.conditionToggle,
2712
+ 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)]",
2713
+ "aria-label": _(c).blockActions.conditionToggle,
2438
2714
  title: e.block.displayCondition?.label,
2439
- onClick: O(oe, ["stop"])
2440
- }, [z(E(qt), {
2715
+ onClick: O(ae, ["stop"])
2716
+ }, [v(_(Gt), {
2441
2717
  size: 12,
2442
2718
  "stroke-width": 2
2443
- })], 8, bi)])) : T("", !0),
2444
- R.value > 0 && !_.value ? (l(), w("div", xi, [M("button", {
2445
- 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:duration-150 tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]",
2446
- "aria-label": E(s)(E(o).blockActions.comments, { count: String(R.value) }),
2447
- onClick: i[0] ||= O((t) => E(N).comments?.openForBlock(e.block.id), ["stop"])
2448
- }, [z(E(Wt), {
2719
+ })], 8, xi)])) : w("", !0),
2720
+ L.value > 0 && !y.value ? (s(), C("div", Si, [M("button", {
2721
+ 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)]",
2722
+ "aria-label": _(u)(_(c).blockActions.comments, { count: String(L.value) }),
2723
+ onClick: n[0] ||= O((t) => _(N).comments?.openForBlock(e.block.id), ["stop"])
2724
+ }, [v(_(Ht), {
2449
2725
  size: 12,
2450
2726
  "stroke-width": 2.5
2451
- }), L(" " + k(R.value), 1)], 8, Si)])) : T("", !0),
2452
- te.value ? (l(), w("div", {
2727
+ }), V(" " + R(L.value), 1)], 8, Ci)])) : w("", !0),
2728
+ ee.value ? (s(), C("div", {
2453
2729
  key: 4,
2454
2730
  class: "tpl-section-wrapper",
2455
- style: S(te.value)
2731
+ style: k(ee.value)
2456
2732
  }, [M("div", {
2457
2733
  class: "tpl-block-content",
2458
- style: S(B.value)
2459
- }, [r(t.$slots, "default", {}, void 0, !0)], 4)], 4)) : (l(), w("div", {
2734
+ style: k(z.value)
2735
+ }, [a(t.$slots, "default", {}, void 0, !0)], 4)], 4)) : (s(), C("div", {
2460
2736
  key: 5,
2461
2737
  class: "tpl-block-content",
2462
- style: S(B.value)
2463
- }, [r(t.$slots, "default", {}, void 0, !0)], 4))
2464
- ], 10, di));
2738
+ style: k(z.value)
2739
+ }, [a(t.$slots, "default", {}, void 0, !0)], 4))
2740
+ ], 10, fi));
2465
2741
  }
2466
- }), [["__scopeId", "data-v-8e4583ee"]]);
2742
+ }), [["__scopeId", "data-v-096f1d37"]]);
2467
2743
  //#endregion
2468
2744
  //#region src/utils/unwrapParagraph.ts
2469
- function wi(e) {
2745
+ function Ti(e) {
2470
2746
  let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
2471
2747
  return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
2472
2748
  }
2473
2749
  //#endregion
2474
2750
  //#region src/components/blocks/TitleBlock.vue
2475
- var Ti = /* @__PURE__ */ R({
2751
+ var Ei = /* @__PURE__ */ d({
2476
2752
  __name: "TitleBlock",
2477
2753
  props: {
2478
2754
  block: {},
2479
2755
  viewport: {}
2480
2756
  },
2481
2757
  setup(e) {
2482
- let t = e, n = b(() => import("./TitleEditor-D0_LY2Ex.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: u } = ii(() => t.block.content), d = C(() => {
2758
+ let t = e, n = B(() => import("./TitleEditor-nUAF7fKr.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: c, handleEditorDone: l } = ai(() => t.block.content), d = S(() => {
2483
2759
  let e = {
2484
- fontSize: `${Pe[t.block.level]}px`,
2760
+ fontSize: `${Me[t.block.level]}px`,
2485
2761
  textAlign: t.block.textAlign
2486
2762
  };
2487
2763
  return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
2488
- }), f = C(() => `h${t.block.level}`), p = C(() => wi(o.value));
2489
- return (t, o) => (l(), w("div", {
2764
+ }), f = S(() => `h${t.block.level}`), p = S(() => Ti(o.value));
2765
+ return (t, o) => (s(), C("div", {
2490
2766
  ref_key: "blockRef",
2491
2767
  ref: i,
2492
2768
  class: "tpl:min-h-[1em] tpl:w-full",
2493
- style: S(d.value),
2494
- onDblclick: o[0] ||= (...e) => E(s) && E(s)(...e)
2495
- }, [E(r) ? (l(), A(E(n), {
2769
+ style: k(d.value),
2770
+ onDblclick: o[0] ||= (...e) => _(c) && _(c)(...e)
2771
+ }, [_(r) ? (s(), A(_(n), {
2496
2772
  key: 0,
2497
2773
  block: e.block,
2498
- "toolbar-position": E(a),
2499
- onDone: E(u)
2774
+ "toolbar-position": _(a),
2775
+ onDone: _(l)
2500
2776
  }, null, 8, [
2501
2777
  "block",
2502
2778
  "toolbar-position",
2503
2779
  "onDone"
2504
- ])) : (l(), A(c(f.value), {
2780
+ ])) : (s(), A(u(f.value), {
2505
2781
  key: 1,
2506
2782
  class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-tight tpl:outline-none [&_a]:tpl:underline [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0",
2507
2783
  style: { color: "inherit" },
@@ -2511,16 +2787,16 @@ var Ti = /* @__PURE__ */ R({
2511
2787
  });
2512
2788
  //#endregion
2513
2789
  //#region src/utils/sectionColumnDrop.ts
2514
- function Ei(e) {
2790
+ function Di(e) {
2515
2791
  return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
2516
2792
  }
2517
2793
  //#endregion
2518
2794
  //#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
2519
- var Di = { class: "tpl:w-full" }, Oi = {
2795
+ var Oi = { class: "tpl:w-full" }, ki = {
2520
2796
  key: 0,
2521
2797
  "data-testid": "section-drop-hint",
2522
2798
  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)]"
2523
- }, ki = /* @__PURE__ */ R({
2799
+ }, Ai = /* @__PURE__ */ d({
2524
2800
  __name: "SectionBlock",
2525
2801
  props: {
2526
2802
  block: {},
@@ -2528,23 +2804,23 @@ var Di = { class: "tpl:w-full" }, Oi = {
2528
2804
  },
2529
2805
  setup(e) {
2530
2806
  let t = {
2531
- title: Ti,
2532
- paragraph: oi,
2533
- image: qr,
2534
- button: qn,
2535
- divider: Dr,
2536
- custom: Tr
2537
- }, n = e, { t: r } = q(), i = Xe(K, "SectionBlock"), o = p(ft, null), s = p(xt, null), u = p(dt, {}), d = p(bt, null);
2538
- function m(e) {
2539
- let t = u.savedBlocks;
2807
+ title: Ei,
2808
+ paragraph: si,
2809
+ image: Jr,
2810
+ button: Yn,
2811
+ divider: Or,
2812
+ custom: Er
2813
+ }, a = e, { t: o } = Y(), c = rt(J, "SectionBlock"), l = n(ct, null), d = n(vt, null), p = n(st, {}), m = n(_t, null);
2814
+ function h(e) {
2815
+ let t = p.savedBlocks;
2540
2816
  if (t?.isPicking.value) {
2541
- t.togglePick(n.block.id);
2817
+ t.togglePick(a.block.id);
2542
2818
  return;
2543
2819
  }
2544
- i.selectBlock(e);
2820
+ c.selectBlock(e);
2545
2821
  }
2546
- let g = C(() => {
2547
- switch (n.block.columns) {
2822
+ let g = S(() => {
2823
+ switch (a.block.columns) {
2548
2824
  case "2": return ["50%", "50%"];
2549
2825
  case "3": return [
2550
2826
  "33.33%",
@@ -2555,38 +2831,38 @@ var Di = { class: "tpl:w-full" }, Oi = {
2555
2831
  case "2-1": return ["66.67%", "33.33%"];
2556
2832
  default: return ["100%"];
2557
2833
  }
2558
- }), _ = C(() => {
2559
- let e = g.value.length, t = [...n.block.children];
2834
+ }), y = S(() => {
2835
+ let e = g.value.length, t = [...a.block.children];
2560
2836
  for (; t.length < e;) t.push([]);
2561
2837
  return t.slice(0, e);
2562
- }), v = C(() => n.viewport === "mobile" && n.block.stackOnMobile !== !1);
2563
- function y(e) {
2564
- return _.value[e] || [];
2838
+ }), x = S(() => a.viewport === "mobile" && a.block.stackOnMobile !== !1);
2839
+ function T(e) {
2840
+ return y.value[e] || [];
2565
2841
  }
2566
- function b(e, t) {
2567
- let r = t.map((e) => JSON.parse(JSON.stringify(e))), a = [...n.block.children];
2568
- for (; a.length <= e;) a.push([]);
2569
- a[e] = r, i.updateBlock(n.block.id, { children: a });
2842
+ function E(e, t) {
2843
+ let n = t.map((e) => JSON.parse(JSON.stringify(e))), r = [...a.block.children];
2844
+ for (; r.length <= e;) r.push([]);
2845
+ r[e] = n, c.updateBlock(a.block.id, { children: r });
2570
2846
  }
2571
- function x(e) {
2572
- return ci(e, s, t);
2847
+ function D(e) {
2848
+ return li(e, d, t);
2573
2849
  }
2574
- function D(e, t) {
2575
- e.type === "custom" && i.updateBlock(e.id, {
2850
+ function O(e, t) {
2851
+ e.type === "custom" && c.updateBlock(e.id, {
2576
2852
  fieldValues: t.fieldValues,
2577
2853
  dataSourceFetched: t.dataSourceFetched
2578
2854
  });
2579
2855
  }
2580
- return (t, n) => (l(), w("div", Di, [M("div", { class: F(["tpl:flex tpl:gap-0", { "tpl:flex-col": v.value }]) }, [(l(!0), w(I, null, f(_.value, (t, n) => (l(), w("div", {
2856
+ return (t, n) => (s(), C("div", Oi, [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", {
2581
2857
  key: n,
2582
- class: F(["tpl:relative tpl:min-h-[60px] tpl:rounded", y(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
2583
- style: S({ width: v.value ? "100%" : g.value[n] })
2584
- }, [z(E(ee), {
2585
- "model-value": y(n),
2858
+ class: b(["tpl:relative tpl:min-h-[60px] tpl:rounded", T(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
2859
+ style: k({ width: x.value ? "100%" : g.value[n] })
2860
+ }, [v(_(I), {
2861
+ "model-value": T(n),
2586
2862
  group: {
2587
2863
  name: "blocks",
2588
2864
  pull: !0,
2589
- put: (e, t, n) => E(Ei)(n)
2865
+ put: (e, t, n) => _(Di)(n)
2590
2866
  },
2591
2867
  animation: 150,
2592
2868
  "ghost-class": "tpl-ghost",
@@ -2597,21 +2873,21 @@ var Di = { class: "tpl:w-full" }, Oi = {
2597
2873
  "empty-insert-threshold": 20,
2598
2874
  "force-fallback": !0,
2599
2875
  class: "tpl:min-h-[60px]",
2600
- "onUpdate:modelValue": (e) => b(n, e)
2876
+ "onUpdate:modelValue": (e) => E(n, e)
2601
2877
  }, {
2602
- default: h(() => [(l(!0), w(I, null, f(y(n), (t) => a((l(), w("div", { key: t.id }, [z(Ci, {
2878
+ default: i(() => [(s(!0), C(L, null, r(T(n), (t) => f((s(), C("div", { key: t.id }, [v(wi, {
2603
2879
  block: t,
2604
- "is-selected": E(i).state.selectedBlockId === t.id,
2880
+ "is-selected": _(c).state.selectedBlockId === t.id,
2605
2881
  viewport: e.viewport,
2606
- "preview-mode": E(i).state.previewMode,
2882
+ "preview-mode": _(c).state.previewMode,
2607
2883
  nested: "",
2608
- onSelect: (e) => m(t.id)
2884
+ onSelect: (e) => h(t.id)
2609
2885
  }, {
2610
- default: h(() => [(l(), A(c(x(t)), {
2886
+ default: i(() => [(s(), A(u(D(t)), {
2611
2887
  block: t,
2612
2888
  viewport: e.viewport,
2613
- onFetchData: (e) => D(t, e),
2614
- onUpdate: (e) => E(i).updateBlock(t.id, e)
2889
+ onFetchData: (e) => O(t, e),
2890
+ onUpdate: (e) => _(c).updateBlock(t.id, e)
2615
2891
  }, null, 40, [
2616
2892
  "block",
2617
2893
  "viewport",
@@ -2625,19 +2901,19 @@ var Di = { class: "tpl:w-full" }, Oi = {
2625
2901
  "viewport",
2626
2902
  "preview-mode",
2627
2903
  "onSelect"
2628
- ])])), [[P, E(d) === !1 || !E(o)?.isHidden(t.id)]])), 128))]),
2904
+ ])])), [[F, _(m) === !1 || !_(l)?.isHidden(t.id)]])), 128))]),
2629
2905
  _: 2
2630
2906
  }, 1032, [
2631
2907
  "model-value",
2632
2908
  "group",
2633
2909
  "onUpdate:modelValue"
2634
- ]), y(n).length === 0 ? (l(), w("div", Oi, [M("span", null, k(E(r).section.dropHere), 1)])) : T("", !0)], 6))), 128))], 2)]));
2910
+ ]), T(n).length === 0 ? (s(), C("div", ki, [M("span", null, R(_(o).section.dropHere), 1)])) : w("", !0)], 6))), 128))], 2)]));
2635
2911
  }
2636
- }), Ai = be, ji = {
2912
+ }), ji = ye, Mi = {
2637
2913
  small: 24,
2638
2914
  medium: 32,
2639
2915
  large: 48
2640
- }, Mi = [
2916
+ }, Ni = [
2641
2917
  "facebook",
2642
2918
  "twitter",
2643
2919
  "instagram",
@@ -2655,11 +2931,11 @@ var Di = { class: "tpl:w-full" }, Oi = {
2655
2931
  "github",
2656
2932
  "dribbble",
2657
2933
  "behance"
2658
- ], Ni = [
2934
+ ], Pi = [
2659
2935
  "width",
2660
2936
  "height",
2661
2937
  "fill"
2662
- ], Pi = ["d"], Fi = /* @__PURE__ */ R({
2938
+ ], Fi = ["d"], Ii = /* @__PURE__ */ d({
2663
2939
  __name: "SocialIconSvg",
2664
2940
  props: {
2665
2941
  platform: {},
@@ -2667,7 +2943,7 @@ var Di = { class: "tpl:w-full" }, Oi = {
2667
2943
  iconSize: {}
2668
2944
  },
2669
2945
  setup(e) {
2670
- let t = e, n = C(() => Ai[t.platform]), r = C(() => ji[t.iconSize]), i = C(() => {
2946
+ let t = e, n = S(() => ji[t.platform]), r = S(() => Mi[t.iconSize]), i = S(() => {
2671
2947
  let e = {
2672
2948
  display: "inline-flex",
2673
2949
  alignItems: "center",
@@ -2704,40 +2980,40 @@ var Di = { class: "tpl:w-full" }, Oi = {
2704
2980
  };
2705
2981
  default: return e;
2706
2982
  }
2707
- }), a = C(() => Math.floor(r.value * .6)), o = C(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
2708
- return (e, t) => (l(), w("span", { style: S(i.value) }, [(l(), w("svg", {
2983
+ }), a = S(() => Math.floor(r.value * .6)), o = S(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
2984
+ return (e, t) => (s(), C("span", { style: k(i.value) }, [(s(), C("svg", {
2709
2985
  width: a.value,
2710
2986
  height: a.value,
2711
2987
  viewBox: "0 0 24 24",
2712
2988
  fill: o.value,
2713
2989
  xmlns: "http://www.w3.org/2000/svg"
2714
- }, [M("path", { d: n.value.path }, null, 8, Pi)], 8, Ni))], 4));
2990
+ }, [M("path", { d: n.value.path }, null, 8, Fi)], 8, Pi))], 4));
2715
2991
  }
2716
- }), Ii = { class: "tpl:w-full" }, Li = ["href"], Ri = {
2992
+ }), Li = { class: "tpl:w-full" }, Ri = ["href"], zi = {
2717
2993
  key: 1,
2718
2994
  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)]"
2719
- }, zi = /* @__PURE__ */ R({
2995
+ }, Bi = /* @__PURE__ */ d({
2720
2996
  __name: "SocialIconsBlock",
2721
2997
  props: {
2722
2998
  block: {},
2723
2999
  viewport: {}
2724
3000
  },
2725
3001
  setup(e) {
2726
- let t = e, { t: n } = q(), r = C(() => ({
3002
+ let t = e, { t: n } = Y(), i = S(() => ({
2727
3003
  display: "flex",
2728
3004
  flexWrap: "wrap",
2729
3005
  gap: `${t.block.spacing}px`,
2730
3006
  justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
2731
- })), i = C(() => t.block.icons.length > 0);
2732
- return (t, a) => (l(), w("div", Ii, [i.value ? (l(), w("div", {
3007
+ })), a = S(() => t.block.icons.length > 0);
3008
+ return (t, o) => (s(), C("div", Li, [a.value ? (s(), C("div", {
2733
3009
  key: 0,
2734
- style: S(r.value)
2735
- }, [(l(!0), w(I, null, f(e.block.icons, (t) => (l(), w("a", {
3010
+ style: k(i.value)
3011
+ }, [(s(!0), C(L, null, r(e.block.icons, (t) => (s(), C("a", {
2736
3012
  key: t.id,
2737
3013
  href: t.url || "#",
2738
3014
  class: "tpl:cursor-default",
2739
- onClick: a[0] ||= O(() => {}, ["prevent"])
2740
- }, [z(Fi, {
3015
+ onClick: o[0] ||= O(() => {}, ["prevent"])
3016
+ }, [v(Ii, {
2741
3017
  platform: t.platform,
2742
3018
  "icon-style": e.block.iconStyle,
2743
3019
  "icon-size": e.block.iconSize
@@ -2745,44 +3021,44 @@ var Di = { class: "tpl:w-full" }, Oi = {
2745
3021
  "platform",
2746
3022
  "icon-style",
2747
3023
  "icon-size"
2748
- ])], 8, Li))), 128))], 4)) : (l(), w("div", Ri, [z(E(jt), { size: 16 }), M("span", null, k(E(n).social.addIcons), 1)]))]));
3024
+ ])], 8, Ri))), 128))], 4)) : (s(), C("div", zi, [v(_(kt), { size: 16 }), M("span", null, R(_(n).social.addIcons), 1)]))]));
2749
3025
  }
2750
- }), Bi = { class: "tpl:w-full" }, Vi = {
3026
+ }), Vi = { class: "tpl:w-full" }, Hi = {
2751
3027
  key: 0,
2752
3028
  class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
2753
3029
  style: {
2754
3030
  "background-color": "var(--tpl-bg-hover)",
2755
3031
  color: "var(--tpl-text-dim)"
2756
3032
  }
2757
- }, Hi = /* @__PURE__ */ R({
3033
+ }, Ui = /* @__PURE__ */ d({
2758
3034
  __name: "SpacerBlock",
2759
3035
  props: {
2760
3036
  block: {},
2761
3037
  viewport: {}
2762
3038
  },
2763
3039
  setup(e) {
2764
- let t = e, n = Xe(K, "SpacerBlock"), r = C(() => ({
3040
+ let t = e, n = rt(J, "SpacerBlock"), r = S(() => ({
2765
3041
  height: `${t.block.height}px`,
2766
3042
  minHeight: `${t.block.height}px`,
2767
3043
  ...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
2768
3044
  }));
2769
- return (t, i) => (l(), w("div", Bi, [M("div", {
2770
- style: S(r.value),
2771
- class: F(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !E(n).state.previewMode }])
2772
- }, [E(n).state.previewMode ? T("", !0) : (l(), w("span", Vi, k(e.block.height) + "px ", 1))], 6)]));
3045
+ return (t, i) => (s(), C("div", Vi, [M("div", {
3046
+ style: k(r.value),
3047
+ class: b(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !_(n).state.previewMode }])
3048
+ }, [_(n).state.previewMode ? w("", !0) : (s(), C("span", Hi, R(e.block.height) + "px ", 1))], 6)]));
2773
3049
  }
2774
- }), Ui = { class: "tpl:w-full" }, Wi = { key: 0 }, Gi = [
3050
+ }), Wi = { class: "tpl:w-full" }, Gi = { key: 0 }, Ki = [
2775
3051
  "aria-label",
2776
3052
  "data-placeholder",
2777
3053
  "onBlur"
2778
- ], Ki = [
3054
+ ], qi = [
2779
3055
  "aria-label",
2780
3056
  "data-placeholder",
2781
3057
  "onBlur"
2782
- ], qi = {
3058
+ ], Ji = {
2783
3059
  key: 1,
2784
3060
  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)]"
2785
- }, Ji = /*#__PURE__*/ Xt(/* @__PURE__ */ R({
3061
+ }, Yi = /*#__PURE__*/ Jt(/* @__PURE__ */ d({
2786
3062
  __name: "TableBlock",
2787
3063
  props: {
2788
3064
  block: {},
@@ -2796,7 +3072,7 @@ var Di = { class: "tpl:w-full" }, Oi = {
2796
3072
  updated(e, t) {
2797
3073
  t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
2798
3074
  }
2799
- }, n = e, { t: r } = q(), i = Xe(K, "TableBlock"), o = C(() => n.block.rows.length > 0), s = C(() => {
3075
+ }, n = e, { t: i } = Y(), a = rt(J, "TableBlock"), o = S(() => n.block.rows.length > 0), c = S(() => {
2800
3076
  let e = {
2801
3077
  width: "100%",
2802
3078
  borderCollapse: "collapse",
@@ -2805,60 +3081,60 @@ var Di = { class: "tpl:w-full" }, Oi = {
2805
3081
  fontFamily: n.block.fontFamily || "inherit"
2806
3082
  };
2807
3083
  return n.block.color && (e.color = n.block.color), e;
2808
- }), c = C(() => ({
3084
+ }), l = S(() => ({
2809
3085
  border: `${n.block.borderWidth}px solid ${n.block.borderColor}`,
2810
3086
  padding: `${n.block.cellPadding}px`,
2811
3087
  textAlign: n.block.textAlign
2812
- })), u = C(() => ({
2813
- ...c.value,
3088
+ })), u = S(() => ({
3089
+ ...l.value,
2814
3090
  fontWeight: "bold",
2815
3091
  backgroundColor: n.block.headerBackgroundColor || "transparent"
2816
- })), d = C(() => n.block.hasHeaderRow && n.block.rows.length > 0 ? n.block.rows[0] : null), p = C(() => n.block.hasHeaderRow ? n.block.rows.slice(1) : n.block.rows);
3092
+ })), d = S(() => n.block.hasHeaderRow && n.block.rows.length > 0 ? n.block.rows[0] : null), p = S(() => n.block.hasHeaderRow ? n.block.rows.slice(1) : n.block.rows);
2817
3093
  function m() {
2818
- i.selectBlock(n.block.id);
3094
+ a.selectBlock(n.block.id);
2819
3095
  }
2820
3096
  function h(e, t, r) {
2821
- let a = r.target.innerText.trim(), o = n.block.rows.map((n) => n.id === e ? {
3097
+ let i = r.target.innerText.trim(), o = n.block.rows.map((n) => n.id === e ? {
2822
3098
  ...n,
2823
3099
  cells: n.cells.map((e) => e.id === t ? {
2824
3100
  ...e,
2825
- content: a
3101
+ content: i
2826
3102
  } : e)
2827
3103
  } : n);
2828
- i.updateBlock(n.block.id, { rows: o });
3104
+ a.updateBlock(n.block.id, { rows: o });
2829
3105
  }
2830
- return (e, n) => (l(), w("div", Ui, [o.value ? (l(), w("table", {
3106
+ return (e, n) => (s(), C("div", Wi, [o.value ? (s(), C("table", {
2831
3107
  key: 0,
2832
- style: S(s.value),
3108
+ style: k(c.value),
2833
3109
  class: "tpl-table-editable"
2834
- }, [d.value ? (l(), w("thead", Wi, [M("tr", null, [(l(!0), w(I, null, f(d.value.cells, (e) => a((l(), w("th", {
3110
+ }, [d.value ? (s(), C("thead", Gi, [M("tr", null, [(s(!0), C(L, null, r(d.value.cells, (e) => f((s(), C("th", {
2835
3111
  key: e.id,
2836
- style: S(u.value),
2837
- "aria-label": E(r).table.cellPlaceholder,
3112
+ style: k(u.value),
3113
+ "aria-label": _(i).table.cellPlaceholder,
2838
3114
  contenteditable: "true",
2839
- "data-placeholder": E(r).table.cellPlaceholder,
3115
+ "data-placeholder": _(i).table.cellPlaceholder,
2840
3116
  onBlur: (t) => h(d.value.id, e.id, t),
2841
- onKeydown: n[0] ||= x(O((e) => e.target.blur(), ["prevent"]), ["enter"]),
3117
+ onKeydown: n[0] ||= y(O((e) => e.target.blur(), ["prevent"]), ["enter"]),
2842
3118
  onClick: O(m, ["stop"])
2843
- }, null, 44, Gi)), [[t, e.content]])), 128))])])) : T("", !0), M("tbody", null, [(l(!0), w(I, null, f(p.value, (e) => (l(), w("tr", { key: e.id }, [(l(!0), w(I, null, f(e.cells, (i) => a((l(), w("td", {
2844
- key: i.id,
2845
- style: S(c.value),
2846
- "aria-label": E(r).table.cellPlaceholder,
3119
+ }, null, 44, Ki)), [[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", {
3120
+ key: r.id,
3121
+ style: k(l.value),
3122
+ "aria-label": _(i).table.cellPlaceholder,
2847
3123
  contenteditable: "true",
2848
- "data-placeholder": E(r).table.cellPlaceholder,
2849
- onBlur: (t) => h(e.id, i.id, t),
2850
- onKeydown: n[1] ||= x(O((e) => e.target.blur(), ["prevent"]), ["enter"]),
3124
+ "data-placeholder": _(i).table.cellPlaceholder,
3125
+ onBlur: (t) => h(e.id, r.id, t),
3126
+ onKeydown: n[1] ||= y(O((e) => e.target.blur(), ["prevent"]), ["enter"]),
2851
3127
  onClick: O(m, ["stop"])
2852
- }, null, 44, Ki)), [[t, i.content]])), 128))]))), 128))])], 4)) : (l(), w("div", qi, [z(E(Kt), { size: 16 }), M("span", null, k(E(r).table.empty), 1)]))]));
3128
+ }, null, 44, qi)), [[t, r.content]])), 128))]))), 128))])], 4)) : (s(), C("div", Ji, [v(_(Wt), { size: 16 }), M("span", null, R(_(i).table.empty), 1)]))]));
2853
3129
  }
2854
- }), [["__scopeId", "data-v-963ac422"]]), Yi = /* @__PURE__ */ R({
3130
+ }), [["__scopeId", "data-v-963ac422"]]), Xi = /* @__PURE__ */ d({
2855
3131
  __name: "VideoPlayButton",
2856
3132
  props: { hoverEffect: {
2857
3133
  type: Boolean,
2858
3134
  default: !1
2859
3135
  } },
2860
3136
  setup(e) {
2861
- return (t, n) => (l(), w("div", { class: F(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...n[0] ||= [M("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-white/90 tpl:shadow-lg" }, [M("svg", {
3137
+ return (t, n) => (s(), C("div", { class: b(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...n[0] ||= [M("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[color-mix(in_srgb,var(--tpl-bg)_90%,transparent)] tpl:shadow-[var(--tpl-shadow-lg)]" }, [M("svg", {
2862
3138
  class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
2863
3139
  width: "28",
2864
3140
  height: "28",
@@ -2869,7 +3145,7 @@ var Di = { class: "tpl:w-full" }, Oi = {
2869
3145
  });
2870
3146
  //#endregion
2871
3147
  //#region src/utils/videoThumbnail.ts
2872
- function Xi(e) {
3148
+ function Zi(e) {
2873
3149
  if (!e) return {
2874
3150
  platform: "unknown",
2875
3151
  videoId: null,
@@ -2901,25 +3177,25 @@ function Xi(e) {
2901
3177
  thumbnailUrl: null
2902
3178
  };
2903
3179
  }
2904
- function Zi(e, t) {
2905
- return t || Xi(e).thumbnailUrl;
3180
+ function Qi(e, t) {
3181
+ return t || Zi(e).thumbnailUrl;
2906
3182
  }
2907
3183
  //#endregion
2908
3184
  //#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
2909
- var Qi = ["src", "alt"], $i = {
3185
+ var $i = ["src", "alt"], ea = {
2910
3186
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
2911
3187
  style: { opacity: "0.7" }
2912
- }, ea = ["href"], ta = ["src", "alt"], na = ["src", "alt"], ra = {
3188
+ }, ta = ["href"], na = ["src", "alt"], ra = ["src", "alt"], ia = {
2913
3189
  key: 3,
2914
3190
  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)]"
2915
- }, ia = /* @__PURE__ */ R({
3191
+ }, aa = /* @__PURE__ */ d({
2916
3192
  __name: "VideoBlock",
2917
3193
  props: {
2918
3194
  block: {},
2919
3195
  viewport: {}
2920
3196
  },
2921
3197
  setup(e) {
2922
- let t = e, { t: n } = q(), { syntax: r } = Y(), i = C(() => H(t.block.url, r) || H(t.block.thumbnailUrl, r)), a = Q(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Q(() => i.value ? t.block.placeholderUrl : void 0), s = C(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : Zi(t.block.url)), c = C(() => ({ textAlign: t.block.align })), u = C(() => {
3198
+ let t = e, { t: n } = Y(), { syntax: r } = Q(), i = S(() => U(t.block.url, r) || U(t.block.thumbnailUrl, r)), a = Sn(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Sn(() => i.value ? t.block.placeholderUrl : void 0), c = S(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : Qi(t.block.url)), l = S(() => ({ textAlign: t.block.align })), u = S(() => {
2923
3199
  let e = t.block.align;
2924
3200
  return {
2925
3201
  maxWidth: "100%",
@@ -2928,185 +3204,196 @@ var Qi = ["src", "alt"], $i = {
2928
3204
  marginLeft: e === "center" || e === "right" ? "auto" : void 0,
2929
3205
  marginRight: e === "center" ? "auto" : void 0
2930
3206
  };
2931
- }), d = C(() => H(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
2932
- return (t, r) => (l(), w("div", {
3207
+ }), d = S(() => U(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
3208
+ return (t, r) => (s(), C("div", {
2933
3209
  class: "tpl:w-full",
2934
- style: S(c.value)
2935
- }, [i.value && e.block.placeholderUrl ? (l(), w("div", {
3210
+ style: k(l.value)
3211
+ }, [i.value && e.block.placeholderUrl ? (s(), C("div", {
2936
3212
  key: 0,
2937
3213
  class: "tpl:relative tpl:inline-block",
2938
- style: S(u.value)
3214
+ style: k(u.value)
2939
3215
  }, [M("img", {
2940
3216
  class: "tpl:w-full tpl:border-0",
2941
- src: E(o),
3217
+ src: _(o),
2942
3218
  alt: e.block.alt
2943
- }, null, 8, Qi), z(Yi)], 4)) : i.value ? (l(), w("div", {
3219
+ }, null, 8, $i), v(Xi)], 4)) : i.value ? (s(), C("div", {
2944
3220
  key: 1,
2945
3221
  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)]",
2946
- style: S([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
2947
- }, [z(E(Ht), {
3222
+ style: k([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
3223
+ }, [v(_(Bt), {
2948
3224
  size: 36,
2949
3225
  "stroke-width": 1.5,
2950
3226
  class: "tpl:text-[var(--tpl-primary)]",
2951
3227
  style: { opacity: "0.5" }
2952
- }), M("span", $i, [z(Gn, { text: d.value }, null, 8, ["text"])])], 4)) : s.value ? (l(), w(I, { key: 2 }, [e.block.url ? (l(), w("a", {
3228
+ }), M("span", ea, [v(qn, { text: d.value }, null, 8, ["text"])])], 4)) : c.value ? (s(), C(L, { key: 2 }, [e.block.url ? (s(), C("a", {
2953
3229
  key: 0,
2954
3230
  href: e.block.url,
2955
3231
  target: "_blank",
2956
3232
  rel: "noopener noreferrer",
2957
3233
  class: "tpl:group tpl:relative tpl:inline-block",
2958
- style: S(u.value),
3234
+ style: k(u.value),
2959
3235
  onClick: r[0] ||= O(() => {}, ["prevent"])
2960
3236
  }, [M("img", {
2961
3237
  class: "tpl:w-full tpl:border-0",
2962
- src: s.value,
3238
+ src: c.value,
2963
3239
  alt: e.block.alt
2964
- }, null, 8, ta), z(Yi, { "hover-effect": "" })], 12, ea)) : (l(), w("div", {
3240
+ }, null, 8, na), v(Xi, { "hover-effect": "" })], 12, ta)) : (s(), C("div", {
2965
3241
  key: 1,
2966
3242
  class: "tpl:relative tpl:inline-block",
2967
- style: S(u.value)
3243
+ style: k(u.value)
2968
3244
  }, [M("img", {
2969
3245
  class: "tpl:w-full tpl:border-0",
2970
- src: s.value,
3246
+ src: c.value,
2971
3247
  alt: e.block.alt
2972
- }, null, 8, na), z(Yi)], 4))], 64)) : (l(), w("div", ra, [z(E(Ht), {
3248
+ }, null, 8, ra), v(Xi)], 4))], 64)) : (s(), C("div", ia, [v(_(Bt), {
2973
3249
  size: 40,
2974
3250
  "stroke-width": 1.5,
2975
3251
  class: "tpl:text-[var(--tpl-border-light)]"
2976
- }), M("span", null, k(E(n).video.addVideo), 1)]))], 4));
2977
- }
2978
- }), aa = {
2979
- section: ki,
2980
- title: Ti,
2981
- paragraph: oi,
2982
- image: qr,
2983
- button: qn,
2984
- divider: Dr,
2985
- video: ia,
2986
- social: zi,
2987
- menu: Zr,
2988
- table: Ji,
2989
- spacer: Hi,
2990
- html: Nr,
2991
- countdown: b(() => import("./CountdownBlock-vLTkTI9e.js"))
3252
+ }), M("span", null, R(_(n).video.addVideo), 1)]))], 4));
3253
+ }
3254
+ }), oa = {
3255
+ section: Ai,
3256
+ title: Ei,
3257
+ paragraph: si,
3258
+ image: Jr,
3259
+ button: Yn,
3260
+ divider: Or,
3261
+ video: aa,
3262
+ social: Bi,
3263
+ menu: Qr,
3264
+ table: Yi,
3265
+ spacer: Ui,
3266
+ html: Pr,
3267
+ countdown: B(() => import("./CountdownBlock-BYSrJWxg.js"))
2992
3268
  };
2993
- function oa(e) {
2994
- let { editor: t, config: n, translations: r, fontsManager: a } = e, { t: s, format: c } = q(r);
2995
- t.setUiTheme(n.uiTheme ?? "auto");
2996
- let { resolvedTheme: l } = En(C(() => t.state.uiTheme)), d = v(n.theme ?? {}), { themeStyles: f } = On({
2997
- themeOverrides: d,
2998
- resolvedTheme: l,
2999
- extraStyles: e.themeExtraStyles
3000
- }), p = rn({
3001
- content: t.content,
3002
- setContent: (e, n) => t.setContent(e, n),
3269
+ function sa(e) {
3270
+ let { editor: n, config: r, translations: i, fontsManager: a } = e, { t: s, format: u } = Y(i);
3271
+ n.setUiTheme(r.uiTheme ?? "auto");
3272
+ let { resolvedTheme: d } = An(S(() => n.state.uiTheme)), f = l(r.theme ?? {}), { themeStyles: p } = Mn({
3273
+ themeOverrides: f,
3274
+ resolvedTheme: d,
3275
+ extraStyles: () => ({
3276
+ "--tpl-drop-text": `"${i.canvas.dropHere}"`,
3277
+ ...e.themeExtraStyles?.()
3278
+ })
3279
+ }), m = tn({
3280
+ content: n.content,
3281
+ setContent: (e, t) => n.setContent(e, t),
3003
3282
  ...e.historyOptions
3004
3283
  });
3005
- un(t, p);
3006
- let m = on({
3007
- addBlock: t.addBlock,
3008
- removeBlock: t.removeBlock,
3009
- updateBlock: t.updateBlock,
3010
- selectBlock: t.selectBlock,
3011
- findBlockLocation: t.findBlockLocation,
3012
- blockDefaults: n.blockDefaults
3013
- }), h = cn(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? sn({
3014
- content: t.content,
3015
- isDirty: () => t.state.isDirty,
3284
+ ln(n, m);
3285
+ let g = rn({
3286
+ addBlock: n.addBlock,
3287
+ removeBlock: n.removeBlock,
3288
+ updateBlock: n.updateBlock,
3289
+ selectBlock: n.selectBlock,
3290
+ findBlockLocation: n.findBlockLocation,
3291
+ blockDefaults: r.blockDefaults
3292
+ }), _ = sn(n), v = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? on({
3293
+ content: n.content,
3294
+ isDirty: () => n.state.isDirty,
3016
3295
  ...e.autoSaveOptions
3017
- }) : null, _ = null;
3018
- g && (_ = B(p.isNavigating, (e) => {
3019
- e ? g.pause() : g.resume();
3296
+ }) : null, y = null;
3297
+ v && (y = t(m.isNavigating, (e) => {
3298
+ e ? v.pause() : v.resume();
3020
3299
  }));
3021
- let y = Tn(t, {
3300
+ let b = kn(n, {
3022
3301
  t: s,
3023
- format: c
3024
- }, n.customBlocks ?? []), b = kt(n.colors);
3025
- if (b.allowCustomIgnored && $.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), b.invalidPresets.length > 0 && $.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
3026
- let e = zn(b.presets, n.blockDefaults, n.templateDefaults);
3027
- e.length > 0 && $.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.`);
3028
- }
3029
- let x = jn();
3030
- In(x, aa);
3031
- let S = /* @__PURE__ */ new Set();
3032
- function w(e) {
3302
+ format: u
3303
+ }, r.customBlocks ?? []), x = Dt(r.colors);
3304
+ if (x.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."), x.invalidPresets.length > 0 && X.warn(`config.colors.presets skipped invalid entries: ${x.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), x.allowCustom === !1) {
3305
+ let e = Vn(x.presets, r.blockDefaults, r.templateDefaults);
3306
+ 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.`);
3307
+ }
3308
+ let C = Nn();
3309
+ Rn(C, oa);
3310
+ let w = /* @__PURE__ */ new Set();
3311
+ function T(e) {
3033
3312
  for (let t of e) {
3034
- x.registerCustom(t, Tr);
3035
- for (let e of Vn(t, b)) S.has(e.id) || (S.add(e.id), $.warn(e.message));
3313
+ C.registerCustom(t, Er);
3314
+ for (let e of Un(t, x)) w.has(e.id) || (w.add(e.id), X.warn(e.message));
3036
3315
  }
3037
3316
  }
3038
- n.customBlocks?.length && w(n.customBlocks);
3039
- let T = hn();
3040
- if (i() && o(T.dispose), e.containerEl) {
3317
+ r.customBlocks?.length && T(r.customBlocks);
3318
+ let E = vn();
3319
+ if (o() && h(E.dispose), e.containerEl) {
3041
3320
  let t = e.containerEl;
3042
- U(document, "pointerdown", (e) => {
3321
+ G(document, "pointerdown", (e) => {
3043
3322
  let n = t.value;
3044
- n && (e.composedPath?.() ?? []).includes(n) && T.claim();
3323
+ n && (e.composedPath?.() ?? []).includes(n) && E.claim();
3045
3324
  }, { capture: !0 });
3046
3325
  }
3047
- function E(r) {
3048
- T.isActive() && Un(r, {
3049
- history: p,
3050
- selectBlock: (e) => t.selectBlock(e),
3051
- getSelectedBlockId: () => t.state.selectedBlockId,
3052
- removeBlock: (e) => t.removeBlock(e),
3053
- onSave: n.onSave,
3326
+ function D() {
3327
+ let t = e.capabilities?.templates;
3328
+ if (t) {
3329
+ t.save();
3330
+ return;
3331
+ }
3332
+ v?.flush();
3333
+ }
3334
+ function O(t) {
3335
+ E.isActive() && Gn(t, {
3336
+ history: m,
3337
+ selectBlock: (e) => n.selectBlock(e),
3338
+ getSelectedBlockId: () => n.state.selectedBlockId,
3339
+ removeBlock: (e) => n.removeBlock(e),
3340
+ onSave: D,
3054
3341
  onBeforeUndo: e.keyboardOptions?.onBeforeUndo,
3055
3342
  isPicking: () => e.capabilities?.savedBlocks?.isPicking.value === !0,
3056
3343
  onConfirmPick: () => e.capabilities?.savedBlocks?.confirmPicking(),
3057
3344
  onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
3058
3345
  });
3059
3346
  }
3060
- U(document, "keydown", E);
3061
- let D = v(null);
3062
- u(ct, e.editorRoot ?? document), u(Ye, D), u(Ze, r), u(K, t), u(Et, p), u(lt, m), u(ft, h), u(Ct, a), u(st, f), u(ot, l), u(vt, n.blockDefaults), u(xt, x), u(yt, n.customBlocks ?? []), u(rt, n.paletteBlocks), u(ut, Ln(n.htmlBlockPreview)), u(St, b), u(gt, Mn(t.content, x));
3063
- let O = Ce(n.mergeTags?.syntax);
3064
- u(W, n.mergeTags?.tags ?? []), u(Ge, O), u(tt, n.mergeTags?.onRequest ?? null), u(Je, n.mergeTags?.autocomplete !== !1);
3065
- let k = v(Fe(n.mergeTags?.tags ?? []));
3066
- u(ht, k);
3067
- let A = _n({
3068
- resolvePreview: n.resolvePreview,
3069
- getContent: () => t.content.value,
3070
- isActive: () => t.state.previewMode
3347
+ G(document, "keydown", O);
3348
+ let k = l(null);
3349
+ c(ut, e.editorRoot ?? document), c(et, k), c(nt, i), c(J, n), c(bt, m), c(at, g), c(ct, _), c(it, a), c(We, p), c(Ye, d), c(ht, r.blockDefaults), c(vt, C), c(lt, r.customBlocks ?? []), c(Qe, r.paletteBlocks), c(Ct, zn(r.htmlBlockPreview)), c(yt, x), c(gt, Pn(n.content, C));
3350
+ let A = Se(r.mergeTags?.syntax);
3351
+ c(K, r.mergeTags?.tags ?? []), c(ft, A), c(Ze, r.mergeTags?.onRequest ?? null), c(qe, r.mergeTags?.autocomplete !== !1);
3352
+ let j = l(Ne(r.mergeTags?.tags ?? []));
3353
+ c($e, j);
3354
+ let M = bn({
3355
+ resolvePreview: r.resolvePreview,
3356
+ getContent: () => n.content.value,
3357
+ isActive: () => n.state.previewMode
3071
3358
  });
3072
- u(Qe, A), u($e, n.resolvePreview);
3073
- let j = C(() => !(t.state.previewMode && A.isConfigured));
3074
- u(bt, j);
3075
- let M = yn();
3076
- u(nt, M), u(wt, n.logicTags?.tags ?? []), u(qe, n.logicTags?.pairs ?? []), u(mt, n.logicTags?.onRequest ?? null), u(at, bn()), u(et, n.onRequestMedia ?? null), u(Tt, n.resolveImageUrl ? vn(n.resolveImageUrl) : null), u(pt, n.displayConditions?.conditions ?? []), u(_t, n.displayConditions?.allowCustom ?? !1), u(dt, e.capabilities ?? {}), u(it, y);
3077
- let N = xn(n.lint) ? null : Sn({
3078
- content: t.content,
3079
- options: n.lint ?? {},
3080
- updateBlock: t.updateBlock,
3081
- updateSettings: t.updateSettings,
3082
- removeBlock: t.removeBlock
3359
+ c(Je, M), c(Xe, r.resolvePreview);
3360
+ let N = S(() => !(n.state.previewMode && M.isConfigured));
3361
+ c(_t, N);
3362
+ let P = Cn();
3363
+ c(Ke, P), c(Ge, r.logicTags?.tags ?? []), c(tt, r.logicTags?.pairs ?? []), c(Ue, r.logicTags?.onRequest ?? null), c(xt, wn()), c(dt, r.onRequestMedia ?? null), c(ot, r.resolveImageUrl ? xn(r.resolveImageUrl) : null), c(pt, r.displayConditions?.conditions ?? []), c(mt, r.displayConditions?.allowCustom ?? !1), c(st, e.capabilities ?? {}), c(St, b);
3364
+ let F = Tn(r.lint) ? null : En({
3365
+ content: n.content,
3366
+ options: r.lint ?? {},
3367
+ updateBlock: n.updateBlock,
3368
+ updateSettings: n.updateSettings,
3369
+ removeBlock: n.removeBlock
3083
3370
  });
3084
- u(Ke, N);
3085
- function P() {
3086
- _?.(), N?.destroy(), g?.destroy(), p.destroy();
3371
+ c(wt, F);
3372
+ function I() {
3373
+ y?.(), F?.destroy(), v?.destroy(), m.destroy();
3087
3374
  }
3088
3375
  return {
3089
3376
  t: s,
3090
- format: c,
3091
- history: p,
3092
- blockActions: m,
3093
- conditionPreview: h,
3094
- autoSave: g,
3095
- resolvedTheme: l,
3096
- themeStyles: f,
3097
- themeOverrides: d,
3098
- registry: x,
3099
- keyboardReorder: y,
3100
- templateLint: N,
3101
- popoverRoot: D,
3102
- mergeTagSampleMode: k,
3103
- previewResolution: A,
3104
- appliesConditionFilter: j,
3105
- registerCustomBlocks: w,
3106
- destroy: P
3377
+ format: u,
3378
+ history: m,
3379
+ blockActions: g,
3380
+ conditionPreview: _,
3381
+ autoSave: v,
3382
+ resolvedTheme: d,
3383
+ themeStyles: p,
3384
+ themeOverrides: f,
3385
+ registry: C,
3386
+ keyboardReorder: b,
3387
+ templateLint: F,
3388
+ popoverRoot: k,
3389
+ mergeTagSampleMode: j,
3390
+ previewResolution: M,
3391
+ appliesConditionFilter: N,
3392
+ registerCustomBlocks: T,
3393
+ destroy: I
3107
3394
  };
3108
3395
  }
3109
3396
  //#endregion
3110
- export { Bn as A, sr as C, $n as D, er as E, pn as F, dn as I, ln as L, wn as M, Cn as N, Xn as O, _n as P, $t as R, fr as S, tr as T, Nr as _, zi as a, gr as b, Ti as c, si as d, ci as f, Fr as g, qr as h, Hi as i, $ as j, qn as k, Ci as l, Zr as m, ia as n, Mi as o, oi as p, Ji as r, ki as s, oa as t, li as u, Dr as v, or as w, mr as x, Tr as y };
3397
+ export { On as A, Zt as B, cr as C, Qn as D, tr as E, pn as F, fn as I, un as L, bn as M, hn as N, Yn as O, mn as P, cn as R, pr as S, nr as T, Pr as _, Bi as a, _r as b, Ei as c, ci as d, li as f, Ir as g, Jr as h, Ui as i, Dn as j, Hn as k, wi as l, Qr as m, aa as n, Ni as o, si as p, Yi as r, Ai as s, sa as t, ui as u, Or as v, sr as w, hr as x, Er as y, an as z };
3111
3398
 
3112
- //# sourceMappingURL=useEditorCore-CKQ9gmoo.js.map
3399
+ //# sourceMappingURL=useEditorCore-CTu_qZ3W.js.map