@templatical/editor 0.28.1 → 0.29.1

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 (213) hide show
  1. package/LICENSE +84 -31
  2. package/dist/{AiChatSidebar-mZyf81xG.js → AiChatSidebar-DsYJwCLT.js} +14 -14
  3. package/dist/{AiFeatureMenu-wpL2vbbd.js → AiFeatureMenu-CehKC-dh.js} +7 -7
  4. package/dist/{BlockIssueBadge-CavnyR3o.js → BlockIssueBadge-Dhk7Hv4m.js} +5 -5
  5. package/dist/{BlockPreviewCanvas-C4M7JT4x.js → BlockPreviewCanvas-BQZ7aTPr.js} +3 -3
  6. package/dist/{CloudHeaderExtras-fH0cB-Ru.js → CloudHeaderExtras-CaRdlYpY.js} +5 -5
  7. package/dist/{CloudPanels-Davlnzfd.js → CloudPanels-CYqHk1Az.js} +7 -7
  8. package/dist/{CollaboratorBar-BvQZriPA.js → CollaboratorBar-BZi12Mut.js} +4 -4
  9. package/dist/{ColorPicker-OLSFZBBZ.js → ColorPicker-CXPSbnRD.js} +7 -7
  10. package/dist/{CommentsPanel-B4_63eIS.js → CommentsPanel-DnWdgQHg.js} +2 -2
  11. package/dist/{CommentsSidebar-BkBHMXez.js → CommentsSidebar-ZOqmuo4D.js} +16 -16
  12. package/dist/{CountdownBlock-Drr1WErd.js → CountdownBlock-BgNK7fZY.js} +3 -3
  13. package/dist/{CountdownToolbar-D8FsDIfa.js → CountdownToolbar-ByQVLqFF.js} +4 -4
  14. package/dist/{DesignReferenceSidebar-Dp44REBY.js → DesignReferenceSidebar-B9anB-Q0.js} +11 -11
  15. package/dist/{IssuesPanel-C1v3dmoB.js → IssuesPanel-CDk7lUna.js} +8 -8
  16. package/dist/{LoadingTrack-Db9j_aBr.js → LoadingTrack-5KBr5cE8.js} +1 -1
  17. package/dist/{MergeTagModeToggle-CZN0Pr1o.js → MergeTagModeToggle-sBEGugix.js} +5 -5
  18. package/dist/{MergeTagSuggestion-a7Tk8tBB.js → MergeTagSuggestion-DPfXtDzP.js} +57 -41
  19. package/dist/{NumberWithSuffix-C1D0WFrN.js → NumberWithSuffix-C-k0BP1m.js} +1 -1
  20. package/dist/{ParagraphEditor-CGxsm0Mx.js → ParagraphEditor-gbp5gbFv.js} +25 -25
  21. package/dist/{RestoreVersionDialog-BLW8wC1J.js → RestoreVersionDialog-DIHpGfFr.js} +5 -5
  22. package/dist/{RichTextEditorContent-COBy_Q9j.js → RichTextEditorContent-DZ6GiAUi.js} +8 -8
  23. package/dist/{SaveBlockDialog-KWQaS1_q.js → SaveBlockDialog-QSj7tf1p.js} +10 -10
  24. package/dist/{SavedBlocksBrowserModal-Cg8yP_EN.js → SavedBlocksBrowserModal-Bz2xaBzJ.js} +11 -11
  25. package/dist/{SavedBlocksPanels-bept0JjA.js → SavedBlocksPanels-RNgOnK9j.js} +2 -2
  26. package/dist/{SavedBlocksPickBar-Z-YRd488.js → SavedBlocksPickBar-CRmd3sD9.js} +4 -4
  27. package/dist/{TemplateScoringPanel-5zp1qOSl.js → TemplateScoringPanel-CDwlSFEe.js} +15 -15
  28. package/dist/{TestEmailModal-DtJabfkS.js → TestEmailModal-DclmELUc.js} +10 -10
  29. package/dist/{TestEmailPanel-CtFxt5q7.js → TestEmailPanel-4i4n9Kup.js} +2 -2
  30. package/dist/{TitleEditor-BfWPus_C.js → TitleEditor-DMAeSWx3.js} +12 -12
  31. package/dist/{TplModal-DBlMd7h9.js → TplModal-CjuKT36J.js} +5 -5
  32. package/dist/{VersionHistoryMenu-Cg4UKxKc.js → VersionHistoryMenu-B6zAcmAC.js} +8 -8
  33. package/dist/{VersionHistoryPanels-BKjbNEOM.js → VersionHistoryPanels-MqgexkhW.js} +2 -2
  34. package/dist/{VersionPreviewBanner-B0thyJ8F.js → VersionPreviewBanner-CQlSzQ2B.js} +3 -3
  35. package/dist/{blockTypeIcons-CQMkcHo9.js → blockTypeIcons-ejNais7n.js} +2 -2
  36. package/dist/bundle-stats.json +6 -6
  37. package/dist/cdn/chunks/{AiChatSidebar-BQATQ3Tr.js → AiChatSidebar-BE97qqqb.js} +11 -11
  38. package/dist/cdn/chunks/{AiChatSidebar-BQATQ3Tr.js.map → AiChatSidebar-BE97qqqb.js.map} +1 -1
  39. package/dist/cdn/chunks/{AiFeatureMenu-cNoZ0xl_.js → AiFeatureMenu-CNP54HPc.js} +6 -6
  40. package/dist/cdn/chunks/{AiFeatureMenu-cNoZ0xl_.js.map → AiFeatureMenu-CNP54HPc.js.map} +1 -1
  41. package/dist/cdn/chunks/{BlockIssueBadge-CH_3vFw4.js → BlockIssueBadge-Bry71Wjz.js} +5 -5
  42. package/dist/cdn/chunks/{BlockIssueBadge-CH_3vFw4.js.map → BlockIssueBadge-Bry71Wjz.js.map} +1 -1
  43. package/dist/cdn/chunks/{BlockPreviewCanvas-BXVC8-Zj.js → BlockPreviewCanvas-CUEZIwJ4.js} +4 -4
  44. package/dist/cdn/chunks/{BlockPreviewCanvas-BXVC8-Zj.js.map → BlockPreviewCanvas-CUEZIwJ4.js.map} +1 -1
  45. package/dist/cdn/chunks/{CloudHeaderExtras-CUAM2ADe.js → CloudHeaderExtras-Bz--_dKu.js} +5 -5
  46. package/dist/cdn/chunks/{CloudHeaderExtras-CUAM2ADe.js.map → CloudHeaderExtras-Bz--_dKu.js.map} +1 -1
  47. package/dist/cdn/chunks/{CloudPanels-DMnnSIkX.js → CloudPanels-BXcdYgy0.js} +7 -7
  48. package/dist/cdn/chunks/{CloudPanels-DMnnSIkX.js.map → CloudPanels-BXcdYgy0.js.map} +1 -1
  49. package/dist/cdn/chunks/{CollaboratorBar-C6sorNRi.js → CollaboratorBar-CvvoIrKS.js} +5 -5
  50. package/dist/cdn/chunks/{CollaboratorBar-C6sorNRi.js.map → CollaboratorBar-CvvoIrKS.js.map} +1 -1
  51. package/dist/cdn/chunks/{ColorPicker-q1V7ggWI.js → ColorPicker-Ww4xHHMI.js} +7 -7
  52. package/dist/cdn/chunks/{ColorPicker-q1V7ggWI.js.map → ColorPicker-Ww4xHHMI.js.map} +1 -1
  53. package/dist/cdn/chunks/{CommentsPanel-ExfxJZM3.js → CommentsPanel-DjId-XH-.js} +3 -3
  54. package/dist/cdn/chunks/{CommentsPanel-ExfxJZM3.js.map → CommentsPanel-DjId-XH-.js.map} +1 -1
  55. package/dist/cdn/chunks/{CommentsSidebar-CzALURMJ.js → CommentsSidebar-DXXGWSr4.js} +5 -5
  56. package/dist/cdn/chunks/{CommentsSidebar-CzALURMJ.js.map → CommentsSidebar-DXXGWSr4.js.map} +1 -1
  57. package/dist/cdn/chunks/{CountdownBlock-_7TUBqJS.js → CountdownBlock-CWeJBC0L.js} +4 -4
  58. package/dist/cdn/chunks/{CountdownBlock-_7TUBqJS.js.map → CountdownBlock-CWeJBC0L.js.map} +1 -1
  59. package/dist/cdn/chunks/{CountdownToolbar-CkbWSrAH.js → CountdownToolbar-BD90NpY1.js} +5 -5
  60. package/dist/cdn/chunks/{CountdownToolbar-CkbWSrAH.js.map → CountdownToolbar-BD90NpY1.js.map} +1 -1
  61. package/dist/cdn/chunks/{DesignReferenceSidebar-COh0Rx_A.js → DesignReferenceSidebar-DY-laxO5.js} +7 -7
  62. package/dist/cdn/chunks/{DesignReferenceSidebar-COh0Rx_A.js.map → DesignReferenceSidebar-DY-laxO5.js.map} +1 -1
  63. package/dist/cdn/chunks/{IssuesPanel-C1NG0xRI.js → IssuesPanel-iC2hgrXx.js} +6 -6
  64. package/dist/cdn/chunks/{IssuesPanel-C1NG0xRI.js.map → IssuesPanel-iC2hgrXx.js.map} +1 -1
  65. package/dist/cdn/chunks/{LoadingTrack-D_wweXVz.js → LoadingTrack-Cz1sT0wP.js} +2 -2
  66. package/dist/cdn/chunks/{LoadingTrack-D_wweXVz.js.map → LoadingTrack-Cz1sT0wP.js.map} +1 -1
  67. package/dist/cdn/chunks/{MergeTagModeToggle-B1yXCp3D.js → MergeTagModeToggle-BRW3qErZ.js} +5 -5
  68. package/dist/cdn/chunks/{MergeTagModeToggle-B1yXCp3D.js.map → MergeTagModeToggle-BRW3qErZ.js.map} +1 -1
  69. package/dist/cdn/chunks/{MergeTagSuggestion-DqYR3jPA.js → MergeTagSuggestion-VP_nC-8W.js} +3 -3
  70. package/dist/cdn/chunks/{MergeTagSuggestion-DqYR3jPA.js.map → MergeTagSuggestion-VP_nC-8W.js.map} +1 -1
  71. package/dist/cdn/chunks/{NumberWithSuffix-CWvM_I3T.js → NumberWithSuffix-DOG0zHvY.js} +2 -2
  72. package/dist/cdn/chunks/{NumberWithSuffix-CWvM_I3T.js.map → NumberWithSuffix-DOG0zHvY.js.map} +1 -1
  73. package/dist/cdn/chunks/{ParagraphEditor-DPM1hUKo.js → ParagraphEditor-CPVnO48U.js} +27 -27
  74. package/dist/cdn/chunks/{ParagraphEditor-DPM1hUKo.js.map → ParagraphEditor-CPVnO48U.js.map} +1 -1
  75. package/dist/cdn/chunks/{RestoreVersionDialog-Dz0bX5ZZ.js → RestoreVersionDialog--Blx-VKu.js} +5 -5
  76. package/dist/cdn/chunks/{RestoreVersionDialog-Dz0bX5ZZ.js.map → RestoreVersionDialog--Blx-VKu.js.map} +1 -1
  77. package/dist/cdn/chunks/{RichTextEditorContent-nkyIRAyN.js → RichTextEditorContent-DpvOKKH-.js} +7 -7
  78. package/dist/cdn/chunks/{RichTextEditorContent-nkyIRAyN.js.map → RichTextEditorContent-DpvOKKH-.js.map} +1 -1
  79. package/dist/cdn/chunks/{SaveBlockDialog-DYr5yKqy.js → SaveBlockDialog-DXQ2g_38.js} +8 -8
  80. package/dist/cdn/chunks/{SaveBlockDialog-DYr5yKqy.js.map → SaveBlockDialog-DXQ2g_38.js.map} +1 -1
  81. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BUJjcHkw.js → SavedBlocksBrowserModal-DWBvVkuk.js} +9 -9
  82. package/dist/cdn/chunks/{SavedBlocksBrowserModal-BUJjcHkw.js.map → SavedBlocksBrowserModal-DWBvVkuk.js.map} +1 -1
  83. package/dist/cdn/chunks/{SavedBlocksPanels-DFgvmsbj.js → SavedBlocksPanels-GgdpiPUq.js} +3 -3
  84. package/dist/cdn/chunks/{SavedBlocksPanels-DFgvmsbj.js.map → SavedBlocksPanels-GgdpiPUq.js.map} +1 -1
  85. package/dist/cdn/chunks/{SavedBlocksPickBar-Brg8US_n.js → SavedBlocksPickBar-Dyb5xi1B.js} +5 -5
  86. package/dist/cdn/chunks/{SavedBlocksPickBar-Brg8US_n.js.map → SavedBlocksPickBar-Dyb5xi1B.js.map} +1 -1
  87. package/dist/cdn/chunks/{TemplateScoringPanel-DO86BvdQ.js → TemplateScoringPanel-B0YcaJsR.js} +11 -11
  88. package/dist/cdn/chunks/{TemplateScoringPanel-DO86BvdQ.js.map → TemplateScoringPanel-B0YcaJsR.js.map} +1 -1
  89. package/dist/cdn/chunks/{TestEmailModal-DRCcdGvX.js → TestEmailModal-B9SmAIKZ.js} +9 -9
  90. package/dist/cdn/chunks/{TestEmailModal-DRCcdGvX.js.map → TestEmailModal-B9SmAIKZ.js.map} +1 -1
  91. package/dist/cdn/chunks/{TestEmailPanel-BZU5HX2c.js → TestEmailPanel-Q6alElB1.js} +3 -3
  92. package/dist/cdn/chunks/{TestEmailPanel-BZU5HX2c.js.map → TestEmailPanel-Q6alElB1.js.map} +1 -1
  93. package/dist/cdn/chunks/{TitleEditor-CLkXt5RZ.js → TitleEditor-Tudoac5f.js} +12 -12
  94. package/dist/cdn/chunks/{TitleEditor-CLkXt5RZ.js.map → TitleEditor-Tudoac5f.js.map} +1 -1
  95. package/dist/cdn/chunks/{TplModal-BhfPoZ_W.js → TplModal-BNJIFnyj.js} +5 -5
  96. package/dist/cdn/chunks/{TplModal-BhfPoZ_W.js.map → TplModal-BNJIFnyj.js.map} +1 -1
  97. package/dist/cdn/chunks/{VersionHistoryMenu-_DyRYBRP.js → VersionHistoryMenu-DJGcA_RX.js} +5 -5
  98. package/dist/cdn/chunks/{VersionHistoryMenu-_DyRYBRP.js.map → VersionHistoryMenu-DJGcA_RX.js.map} +1 -1
  99. package/dist/cdn/chunks/{VersionHistoryPanels-DGfOOcKV.js → VersionHistoryPanels-Crw5JA89.js} +3 -3
  100. package/dist/cdn/chunks/{VersionHistoryPanels-DGfOOcKV.js.map → VersionHistoryPanels-Crw5JA89.js.map} +1 -1
  101. package/dist/cdn/chunks/{VersionPreviewBanner-FbBmgknN.js → VersionPreviewBanner-C8pfES5A.js} +4 -4
  102. package/dist/cdn/chunks/{VersionPreviewBanner-FbBmgknN.js.map → VersionPreviewBanner-C8pfES5A.js.map} +1 -1
  103. package/dist/cdn/chunks/{blockTypeIcons-o4ammRlm.js → blockTypeIcons-JUwZtKaq.js} +2 -2
  104. package/dist/cdn/chunks/{blockTypeIcons-o4ammRlm.js.map → blockTypeIcons-JUwZtKaq.js.map} +1 -1
  105. package/dist/cdn/chunks/{cloud-CRCcXTc5.js → cloud-C29LPXYn.js} +2 -2
  106. package/dist/cdn/chunks/{cloud-CRCcXTc5.js.map → cloud-C29LPXYn.js.map} +1 -1
  107. package/dist/cdn/chunks/createCloudRuntime-C6MJN7M6.js +443 -0
  108. package/dist/cdn/chunks/createCloudRuntime-C6MJN7M6.js.map +1 -0
  109. package/dist/cdn/chunks/{dist-eKG4m5Wx.js → dist-CgR3inPR.js} +3 -3
  110. package/dist/cdn/chunks/{dist-eKG4m5Wx.js.map → dist-CgR3inPR.js.map} +1 -1
  111. package/dist/cdn/chunks/{dist-2fOlspdg.js → dist-El3fQnfk.js} +4 -4
  112. package/dist/cdn/chunks/{dist-2fOlspdg.js.map → dist-El3fQnfk.js.map} +1 -1
  113. package/dist/cdn/chunks/{draggable-BLMjz0GK.js → draggable-D2vo-aQI.js} +1465 -1435
  114. package/dist/cdn/chunks/draggable-D2vo-aQI.js.map +1 -0
  115. package/dist/cdn/chunks/en-DIwntrh3.js +2 -0
  116. package/dist/cdn/chunks/{extensions-qSqWdFko.js → extensions-BQefRevf.js} +6 -6
  117. package/dist/cdn/chunks/{extensions-qSqWdFko.js.map → extensions-BQefRevf.js.map} +1 -1
  118. package/dist/cdn/chunks/{icons-MeYdeH4P.js → icons-BTdLXRXn.js} +27 -27
  119. package/dist/cdn/chunks/icons-BTdLXRXn.js.map +1 -0
  120. package/dist/cdn/chunks/{keys-D7OpfE2s.js → keys-BJ770Mwm.js} +2 -2
  121. package/dist/cdn/chunks/{keys-D7OpfE2s.js.map → keys-BJ770Mwm.js.map} +1 -1
  122. package/dist/cdn/chunks/{liquid.browser-UlAOKBjI.js → liquid.browser-BPvKXNfO.js} +2 -2
  123. package/dist/cdn/chunks/{liquid.browser-UlAOKBjI.js.map → liquid.browser-BPvKXNfO.js.map} +1 -1
  124. package/dist/cdn/chunks/{src-BxHH_6Yr.js → src-CjSrA_o4.js} +2 -2
  125. package/dist/cdn/chunks/{src-BxHH_6Yr.js.map → src-CjSrA_o4.js.map} +1 -1
  126. package/dist/cdn/chunks/{src-2QDLdUyx.js → src-fxaI2EQc.js} +8 -8
  127. package/dist/cdn/chunks/{src-2QDLdUyx.js.map → src-fxaI2EQc.js.map} +1 -1
  128. package/dist/cdn/chunks/{tiptap-DgH_wKK_.js → tiptap-Bqy-H6CT.js} +3356 -3219
  129. package/dist/cdn/chunks/tiptap-Bqy-H6CT.js.map +1 -0
  130. package/dist/cdn/chunks/{useAliveFlag-C1pwLtPO.js → useAliveFlag-DrXxPV8V.js} +2 -2
  131. package/dist/cdn/chunks/{useAliveFlag-C1pwLtPO.js.map → useAliveFlag-DrXxPV8V.js.map} +1 -1
  132. package/dist/cdn/chunks/{useCloudI18n-D4gzxtqF.js → useCloudI18n-D0AoLV0a.js} +3 -3
  133. package/dist/cdn/chunks/{useCloudI18n-D4gzxtqF.js.map → useCloudI18n-D0AoLV0a.js.map} +1 -1
  134. package/dist/cdn/chunks/{useEditorCore-2ZVOY0Rh.js → useEditorCore-o2emEjgF.js} +448 -424
  135. package/dist/cdn/chunks/useEditorCore-o2emEjgF.js.map +1 -0
  136. package/dist/cdn/chunks/useEditorRoot-BFGRBGts.js +10 -0
  137. package/dist/cdn/chunks/{useEditorRoot-BY-amddA.js.map → useEditorRoot-BFGRBGts.js.map} +1 -1
  138. package/dist/cdn/chunks/{useI18n-DYb1SgLB.js → useI18n-DIhawILp.js} +3 -3
  139. package/dist/cdn/chunks/{useI18n-DYb1SgLB.js.map → useI18n-DIhawILp.js.map} +1 -1
  140. package/dist/cdn/chunks/{useMergeTag-D-SE_XN8.js → useMergeTag-BWt1DQS1.js} +3 -3
  141. package/dist/cdn/chunks/{useMergeTag-D-SE_XN8.js.map → useMergeTag-BWt1DQS1.js.map} +1 -1
  142. package/dist/cdn/chunks/{usePopoverPosition-CJZ6EkS4.js → usePopoverPosition-DkiTLnBm.js} +3 -3
  143. package/dist/cdn/chunks/{usePopoverPosition-CJZ6EkS4.js.map → usePopoverPosition-DkiTLnBm.js.map} +1 -1
  144. package/dist/cdn/chunks/{useScrollToBlock-D6gyIzT1.js → useScrollToBlock-KcSAuXKz.js} +3 -3
  145. package/dist/cdn/chunks/{useScrollToBlock-D6gyIzT1.js.map → useScrollToBlock-KcSAuXKz.js.map} +1 -1
  146. package/dist/cdn/editor.css +1 -1
  147. package/dist/cdn/editor.js +1436 -1427
  148. package/dist/cdn/editor.js.map +1 -1
  149. package/dist/{check-CLfibuQc.js → check-CTe6VejT.js} +1 -1
  150. package/dist/{chevron-down-DamTR8ta.js → chevron-down-BBThVMu-.js} +1 -1
  151. package/dist/{chevron-up-CrV_Ksg-.js → chevron-up-iECwf-Bc.js} +1 -1
  152. package/dist/{circle-alert-BLy-e34e.js → circle-alert-Z_eeykrO.js} +1 -1
  153. package/dist/{clock-DQI6aaFT.js → clock-CEj1c29j.js} +1 -1
  154. package/dist/{cloud-DXFUA8H_.js → cloud-CHHQWdaR.js} +1 -1
  155. package/dist/createCloudRuntime-WwKt9mgb.js +441 -0
  156. package/dist/{createLucideIcon-Cbl3Ma_H.js → createLucideIcon-DphAT3tw.js} +3 -3
  157. package/dist/{dist-Dx-KOuOj.js → dist-9fjN9cuD.js} +2 -2
  158. package/dist/{dist-WE11SQGe.js → dist-BUpBA58N.js} +2 -2
  159. package/dist/{dist-CLc1cpN2.js → dist-BdIwIlKz.js} +6 -5
  160. package/dist/{dist-CQQNoHxz.js → dist-BfcqryVg.js} +2 -2
  161. package/dist/{dist-Dz7KUOSg.js → dist-CaR5TLiM.js} +2 -2
  162. package/dist/{dist-CkSgS-K9.js → dist-CuuPnIMy.js} +3 -3
  163. package/dist/dist-CzMzshfS.js +5 -0
  164. package/dist/{dist-CclsUQ7r.js → dist-D2P8U3p6.js} +2 -2
  165. package/dist/{dist-C145btxT.js → dist-DLaIQ5H5.js} +151 -155
  166. package/dist/{dist-CgXIMxZc.js → dist-DSgmnQ-f.js} +2 -2
  167. package/dist/dist-DTVuNn8M.js +5 -0
  168. package/dist/{dist-D4Jb08yv.js → dist-DifptC-U.js} +2 -2
  169. package/dist/{dist-7Lr_A7Va.js → dist-gWM8H2hz.js} +7 -6
  170. package/dist/{dist-DUn6jY0n.js → dist-nmzPlqlz.js} +2290 -2175
  171. package/dist/{extensions-PJK0gLCL.js → extensions-B4gwZ36u.js} +7 -7
  172. package/dist/{image-up-BVOMy_Fs.js → image-up-W1INxCu8.js} +1 -1
  173. package/dist/index.d.ts +146 -117
  174. package/dist/{info-BKMKasyT.js → info-5t4WYKfh.js} +1 -1
  175. package/dist/{keys-CAor2T5q.js → keys-BJtoezGU.js} +1 -1
  176. package/dist/{liquid.browser-B-rGrnrQ.js → liquid.browser-CJgDDvQz.js} +1 -1
  177. package/dist/{loader-circle-CSGh8n8A.js → loader-circle-DJCZ_JMY.js} +1 -1
  178. package/dist/{message-circle-C6q2Fm_W.js → message-circle-Biu6lHh_.js} +1 -1
  179. package/dist/{pencil-DaTN0HKw.js → pencil-DkPlMca7.js} +1 -1
  180. package/dist/{refresh-cw-Cu4wRQwT.js → refresh-cw-DHbpkkol.js} +1 -1
  181. package/dist/{runtime-dom.esm-bundler-CHEsXNQz.js → runtime-dom.esm-bundler-Co_SPqAz.js} +180 -166
  182. package/dist/{scan-line-O_o657Gv.js → scan-line-DojwGzjU.js} +1 -1
  183. package/dist/{send-GS3soauT.js → send-c6ppcE9I.js} +1 -1
  184. package/dist/{shield-check-B2TzT3Wp.js → shield-check-F9T4ylNK.js} +1 -1
  185. package/dist/{sparkles-CNENcXZl.js → sparkles-D-0OiTZD.js} +1 -1
  186. package/dist/style.css +1 -1
  187. package/dist/templatical-editor.js +835 -826
  188. package/dist/{text-align-start-D0-k8RUf.js → text-align-start-kEEtoRrD.js} +1 -1
  189. package/dist/{trash-2-BE-qGIpG.js → trash-2-DRQzhY9R.js} +1 -1
  190. package/dist/{triangle-alert-DNM2_dyh.js → triangle-alert-Bt4-GU3t.js} +1 -1
  191. package/dist/{upload-Cv2Jx-yM.js → upload-D2wtjvH8.js} +1 -1
  192. package/dist/{useAliveFlag-1yBub211.js → useAliveFlag-AFbwfHlJ.js} +1 -1
  193. package/dist/{useCloudI18n-Dwo7usTl.js → useCloudI18n-BA69BpQ_.js} +2 -2
  194. package/dist/{useEditorCore-DM8vzMZQ.js → useEditorCore-CJp84vJY.js} +1097 -1075
  195. package/dist/{useEditorRoot-CUIzpMYc.js → useEditorRoot-Cdo8Vhxa.js} +2 -2
  196. package/dist/{useI18n-DT_DKupw.js → useI18n-B135ASaG.js} +2 -2
  197. package/dist/{useMergeTag-CcHQCcPN.js → useMergeTag-D1Rsn4BO.js} +2 -2
  198. package/dist/{usePopoverPosition-DaHz1kqb.js → usePopoverPosition-DAOHr_iM.js} +2 -2
  199. package/dist/{useScrollToBlock-C2LYXENK.js → useScrollToBlock-B0Qpjfa4.js} +3 -3
  200. package/dist/{vue.runtime.esm-bundler-CdH_W9qX.js → vue.runtime.esm-bundler-BhOUdXMi.js} +1244 -1204
  201. package/dist/{x-DUPrT6Aa.js → x-YiG-TUGN.js} +1 -1
  202. package/package.json +26 -26
  203. package/dist/cdn/chunks/createCloudRuntime-C-u7oIGa.js +0 -344
  204. package/dist/cdn/chunks/createCloudRuntime-C-u7oIGa.js.map +0 -1
  205. package/dist/cdn/chunks/draggable-BLMjz0GK.js.map +0 -1
  206. package/dist/cdn/chunks/en-C6FKrw69.js +0 -2
  207. package/dist/cdn/chunks/icons-MeYdeH4P.js.map +0 -1
  208. package/dist/cdn/chunks/tiptap-DgH_wKK_.js.map +0 -1
  209. package/dist/cdn/chunks/useEditorCore-2ZVOY0Rh.js.map +0 -1
  210. package/dist/cdn/chunks/useEditorRoot-BY-amddA.js +0 -10
  211. package/dist/createCloudRuntime-BrgMP9gS.js +0 -342
  212. package/dist/dist-D-ulkdvF.js +0 -5
  213. package/dist/dist-Kf9u4ULN.js +0 -5
@@ -1,32 +1,42 @@
1
- import { A as e, B as t, D as n, Dt as r, E as i, G as a, J as o, L as s, M as c, O as l, Ot as u, P as d, Q as f, S as p, T as m, U as h, V as g, X as _, Y as v, _ as y, b, c as x, d as S, et as C, g as w, h as T, it as E, j as D, k as O, kt as k, l as A, nt as j, q as M, r as N, rt as P, s as F, tt as ee, u as I, v as L, y as te, z as ne } from "./vue.runtime.esm-bundler-CdH_W9qX.js";
2
- import { c as R, o as re, s as ie } from "./runtime-dom.esm-bundler-CHEsXNQz.js";
3
- import { A as ae, B as oe, C as se, D as ce, E as le, F as ue, I as de, L as fe, M as pe, N as me, O as he, P as ge, R as _e, S as ve, T as ye, V as be, _ as xe, a as Se, b as Ce, c as we, d as Te, f as Ee, g as De, h as Oe, i as ke, j as Ae, l as je, m as Me, n as Ne, o as Pe, p as Fe, r as Ie, t as Le, u as Re, v as ze, w as Be, x as Ve, y as He, z as Ue } from "./dist-B1kLn1rs.js";
4
- import { f as We, g as Ge, h as Ke, m as qe } from "./dist-WE11SQGe.js";
5
- import { a as Je, i as Ye, n as Xe, r as Ze } from "./dist-CkSgS-K9.js";
6
- import { A as Qe, B as $e, C as et, D as tt, E as nt, F as rt, H as it, I as at, M as ot, N as st, O as ct, P as lt, S as ut, T as dt, U as ft, V as pt, W as mt, _ as ht, a as gt, b as _t, c as vt, d as yt, f as bt, g as xt, h as St, j as Ct, k as wt, m as Tt, n as Et, o as Dt, p as Ot, r as kt, s as At, u as jt, v as Mt, w as Nt, x as Pt, y as Ft, z as It } from "./keys-CAor2T5q.js";
7
- import { t as Lt } from "./useI18n-DT_DKupw.js";
8
- import { t as Rt } from "./logger-BBlvSn6q.js";
9
- import { a as zt, i as Bt, o as Vt, r as Ht, t as Ut } from "./usePopoverPosition-DaHz1kqb.js";
10
- import { t as Wt } from "./createLucideIcon-Cbl3Ma_H.js";
11
- import { t as Gt } from "./loader-circle-CSGh8n8A.js";
12
- import { t as Kt } from "./message-circle-C6q2Fm_W.js";
13
- import { t as qt } from "./trash-2-BE-qGIpG.js";
14
- import { t as Jt } from "./triangle-alert-DNM2_dyh.js";
15
- import { t as Yt } from "./upload-Cv2Jx-yM.js";
16
- import { t as Xt } from "./LoadingTrack-Db9j_aBr.js";
17
- import { t as Zt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
18
- import { t as Qt } from "./useEditorRoot-CUIzpMYc.js";
19
- import "./useCloudI18n-Dwo7usTl.js";
20
- import { t as $t } from "./useMergeTag-CcHQCcPN.js";
21
- import { t as en } from "./useAliveFlag-1yBub211.js";
1
+ import { A as e, B as t, D as n, Dt as r, E as i, G as a, J as o, L as s, M as c, O as l, Ot as u, P as d, Q as f, S as p, T as m, U as h, V as g, X as _, Y as v, _ as y, b, c as x, d as S, et as C, g as w, h as T, it as E, j as D, k as O, kt as k, l as A, nt as ee, q as j, r as M, rt as N, s as P, tt as te, u as F, v as I, y as ne, z as re } from "./vue.runtime.esm-bundler-BhOUdXMi.js";
2
+ import { c as L, o as ie, s as ae } from "./runtime-dom.esm-bundler-Co_SPqAz.js";
3
+ import { A as oe, B as se, C as ce, D as le, E as ue, F as de, I as fe, L as pe, M as me, N as he, O as ge, P as _e, R as ve, S as ye, T as be, V as xe, _ as Se, a as Ce, b as we, c as Te, d as Ee, f as De, g as Oe, h as ke, i as Ae, j as je, l as Me, m as Ne, n as Pe, o as Fe, p as Ie, r as Le, t as Re, u as ze, v as Be, w as Ve, x as He, y as Ue, z as We } from "./dist-B1kLn1rs.js";
4
+ import { f as Ge, g as Ke, h as qe, m as Je } from "./dist-BUpBA58N.js";
5
+ import { a as Ye, i as Xe, n as Ze, r as Qe } from "./dist-CuuPnIMy.js";
6
+ import { A as $e, B as et, C as tt, D as nt, E as rt, F as it, H as at, I as ot, M as st, N as ct, O as lt, P as ut, S as dt, T as ft, U as pt, V as mt, W as ht, _ as gt, a as _t, b as vt, c as yt, d as bt, f as xt, g as St, h as Ct, j as wt, k as Tt, m as Et, n as Dt, o as Ot, p as kt, r as At, s as jt, u as Mt, v as Nt, w as Pt, x as Ft, y as It, z as Lt } from "./keys-BJtoezGU.js";
7
+ import { t as Rt } from "./useI18n-B135ASaG.js";
8
+ import { t as zt } from "./logger-BBlvSn6q.js";
9
+ import { a as Bt, i as Vt, o as Ht, r as Ut, t as Wt } from "./usePopoverPosition-DAOHr_iM.js";
10
+ import { t as Gt } from "./createLucideIcon-DphAT3tw.js";
11
+ import { t as Kt } from "./loader-circle-DJCZ_JMY.js";
12
+ import { t as qt } from "./message-circle-Biu6lHh_.js";
13
+ import { t as Jt } from "./trash-2-DRQzhY9R.js";
14
+ import { t as Yt } from "./triangle-alert-Bt4-GU3t.js";
15
+ import { t as Xt } from "./upload-D2wtjvH8.js";
16
+ import { t as Zt } from "./LoadingTrack-5KBr5cE8.js";
17
+ import { t as Qt } from "./_plugin-vue_export-helper-B3ysoDQm.js";
18
+ import { t as $t } from "./useEditorRoot-Cdo8Vhxa.js";
19
+ import "./useCloudI18n-BA69BpQ_.js";
20
+ import { t as en } from "./useMergeTag-D1Rsn4BO.js";
21
+ import { t as tn } from "./useAliveFlag-AFbwfHlJ.js";
22
22
  //#region ../core/dist/index.js
23
- function tn(e) {
23
+ function nn(e) {
24
+ return e instanceof Error ? e : Error(String(e), { cause: e });
25
+ }
26
+ function rn(e, t) {
27
+ try {
28
+ t();
29
+ } catch (t) {
30
+ e?.(nn(t));
31
+ }
32
+ }
33
+ function an(e) {
24
34
  return e === "1" ? 1 : e === "3" ? 3 : 2;
25
35
  }
26
- function nn(e) {
36
+ function on(e) {
27
37
  let t = o({
28
38
  template: null,
29
- content: e.content ?? Fe(e.defaultFontFamily, e.templateDefaults),
39
+ content: e.content ?? Ie(e.defaultFontFamily, e.templateDefaults),
30
40
  selectedBlockId: null,
31
41
  viewport: "desktop",
32
42
  darkMode: !1,
@@ -121,7 +131,7 @@ function nn(e) {
121
131
  if (u(n)) return;
122
132
  let r = s(t.content.blocks, n);
123
133
  if (r && r.type === "section") {
124
- if (i < 0 || i >= tn(r.columns)) return;
134
+ if (i < 0 || i >= an(r.columns)) return;
125
135
  r.children[i] = r.children[i] || [];
126
136
  let t = r.children[i];
127
137
  a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
@@ -154,7 +164,7 @@ function nn(e) {
154
164
  let d;
155
165
  if (i) {
156
166
  let e = s(t.content.blocks, i);
157
- if (!e || e.type !== "section" || a < 0 || a >= tn(e.columns)) return;
167
+ if (!e || e.type !== "section" || a < 0 || a >= an(e.columns)) return;
158
168
  e.children[a] = e.children[a] || [], d = e.children[a];
159
169
  } else d = t.content.blocks;
160
170
  let [f] = o.blocks.splice(c, 1);
@@ -164,71 +174,78 @@ function nn(e) {
164
174
  r();
165
175
  }
166
176
  function E(e, t) {
167
- throw new Pe(`[Templatical] Templates: ${e} ${t}`);
177
+ throw new Fe(`[Templatical] Templates: ${e} ${t}`);
168
178
  }
169
179
  function D(t) {
180
+ rn(e.onError, t);
181
+ }
182
+ function O(t) {
170
183
  let { templates: n } = e;
171
184
  return n || E(t, "needs a templates provider. Pass one as `init({ templates })` to enable saving and loading."), n;
172
185
  }
173
- function O(e) {
186
+ function k(e) {
174
187
  t.template && (t.template = {
175
188
  ...t.template,
176
189
  name: e
177
190
  }, r());
178
191
  }
179
- async function k(r) {
180
- let { create: i } = D("create()");
181
- typeof i != "function" && E("create()", "is disabled by the provider — its `create` is `false`."), t.isLoading = !0;
192
+ async function A(r) {
193
+ let i = O("create()"), { create: a } = i;
194
+ typeof a != "function" && E("create()", "is disabled by the provider — its `create` is `false`.");
195
+ let o;
196
+ t.isLoading = !0;
182
197
  try {
183
198
  r?.content && (t.content = r.content);
184
- let e = n, a = await i(r?.name === void 0 ? { content: t.content } : {
199
+ let e = n;
200
+ o = await a(r?.name === void 0 ? { content: t.content } : {
185
201
  name: r.name,
186
202
  content: t.content
187
- });
188
- return t.template = a, n === e && (t.isDirty = !1), a;
203
+ }), t.template = o, n === e && (t.isDirty = !1);
189
204
  } catch (t) {
190
205
  throw e.onError?.(t), t;
191
206
  } finally {
192
207
  t.isLoading = !1;
193
208
  }
209
+ return D(() => i.onCreated?.(o)), o;
194
210
  }
195
- async function A(n) {
196
- let r = D("load()");
211
+ async function ee(n) {
212
+ let r = O("load()"), i;
197
213
  t.isLoading = !0;
198
214
  try {
199
- let e = await r.load(n);
200
- return t.template = e, t.content = e.content, t.isDirty = !1, e;
215
+ i = await r.load(n), t.template = i, t.content = i.content, t.isDirty = !1;
201
216
  } catch (t) {
202
217
  throw e.onError?.(t), t;
203
218
  } finally {
204
219
  t.isLoading = !1;
205
220
  }
206
- }
207
- async function j() {
208
- let { save: r } = D("save()");
209
- typeof r != "function" && E("save()", "is disabled by the provider — its `save` is `false`.");
210
- let i = t.template;
211
- i || E("save()", "has no template loaded. Call create() or load() first.");
212
- let a = i.name === void 0 ? { content: t.content } : {
213
- name: i.name,
221
+ return D(() => r.onLoaded?.(i)), i;
222
+ }
223
+ async function j(r = "api") {
224
+ let i = O("save()"), { save: a } = i;
225
+ typeof a != "function" && E("save()", "is disabled by the provider — its `save` is `false`.");
226
+ let o = t.template;
227
+ o || E("save()", "has no template loaded. Call create() or load() first.");
228
+ let s = o.name === void 0 ? { content: t.content } : {
229
+ name: o.name,
214
230
  content: t.content
215
- };
231
+ }, c;
216
232
  t.isSaving = !0;
217
233
  try {
218
- let e = n, o = await r(i.id, a);
219
- if (t.template?.id === i.id) {
234
+ let e = n;
235
+ if (c = await a(o.id, s), t.template?.id === o.id) {
220
236
  let e = t.template.name;
221
- t.template = e === i.name ? o : {
222
- ...o,
237
+ t.template = e === o.name ? c : {
238
+ ...c,
223
239
  name: e
224
240
  };
225
241
  }
226
- return n === e && (t.isDirty = !1), o;
242
+ n === e && (t.isDirty = !1);
227
243
  } catch (t) {
228
244
  throw e.onError?.(t), t;
229
245
  } finally {
230
246
  t.isSaving = !1;
231
247
  }
248
+ return D(() => i.onSaved?.(c, { trigger: r })), c;
232
249
  }
233
250
  function M() {
234
251
  return t.template?.id !== void 0;
@@ -251,18 +268,18 @@ function nn(e) {
251
268
  moveBlock: w,
252
269
  markDirty: T,
253
270
  findBlockLocation: d,
254
- setName: O,
255
- create: k,
256
- load: A,
271
+ setName: k,
272
+ create: A,
273
+ load: ee,
257
274
  save: j,
258
275
  hasTemplate: M
259
276
  };
260
277
  }
261
- var rn = 50, an = 300, on = 1500;
262
- function sn(e) {
263
- let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = rn } = e, a = _([]), o = _([]), s = _(!1), c = null, l = null, u = g(() => a.value.length > 0), d = g(() => o.value.length > 0);
278
+ var sn = 50, cn = 300, ln = 1500;
279
+ function un(e) {
280
+ let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = sn } = e, a = _([]), o = _([]), s = _(!1), c = null, l = null, u = g(() => a.value.length > 0), d = g(() => o.value.length > 0);
264
281
  function f() {
265
- return Ue(t.value);
282
+ return We(t.value);
266
283
  }
267
284
  function p(e) {
268
285
  a.value.push(e), a.value.length > i && a.value.splice(0, a.value.length - i);
@@ -278,21 +295,21 @@ function sn(e) {
278
295
  if (l && l.blockId === e) {
279
296
  clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
280
297
  l = null;
281
- }, an);
298
+ }, cn);
282
299
  return;
283
300
  }
284
301
  m(), p(f()), o.value = [], l = {
285
302
  blockId: e,
286
303
  timeoutId: setTimeout(() => {
287
304
  l = null;
288
- }, an)
305
+ }, cn)
289
306
  };
290
307
  }
291
308
  }
292
309
  function y() {
293
310
  s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
294
311
  s.value = !1, c = null;
295
- }, on);
312
+ }, ln);
296
313
  }
297
314
  function b() {
298
315
  if (a.value.length === 0) return;
@@ -324,33 +341,33 @@ function sn(e) {
324
341
  destroy: C
325
342
  };
326
343
  }
327
- function cn(e) {
344
+ function dn(e) {
328
345
  e.type === "table" ? e.rows = e.rows.map((e) => ({
329
346
  ...e,
330
- id: ye(),
347
+ id: be(),
331
348
  cells: e.cells.map((e) => ({
332
349
  ...e,
333
- id: ye()
350
+ id: be()
334
351
  }))
335
352
  })) : e.type === "social" ? e.icons = e.icons.map((e) => ({
336
353
  ...e,
337
- id: ye()
354
+ id: be()
338
355
  })) : e.type === "menu" && (e.items = e.items.map((e) => ({
339
356
  ...e,
340
- id: ye()
357
+ id: be()
341
358
  })));
342
359
  }
343
- function ln(e) {
360
+ function fn(e) {
344
361
  let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
345
362
  function o(n, r, a) {
346
- let o = je(n, e.blockDefaults);
363
+ let o = Me(n, e.blockDefaults);
347
364
  return t(o, r, a), i(o.id), o;
348
365
  }
349
366
  function s(e, n, r) {
350
367
  let o = JSON.parse(JSON.stringify(e));
351
- if (o.id = ye(), cn(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
368
+ if (o.id = be(), dn(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
352
369
  let t = JSON.parse(JSON.stringify(e));
353
- return t.id = ye(), cn(t), t;
370
+ return t.id = be(), dn(t), t;
354
371
  }))), n !== void 0 || r !== void 0) t(o, n, r);
355
372
  else {
356
373
  let i = a?.(e.id) ?? null;
@@ -371,9 +388,9 @@ function ln(e) {
371
388
  updateBlockProperty: l
372
389
  };
373
390
  }
374
- var un = 2e3;
375
- function dn(e) {
376
- let { content: t, isDirty: n, onChange: r, debounce: i = un, enabled: a = !0 } = e, o = null, s = !1;
391
+ var pn = 2e3;
392
+ function mn(e) {
393
+ let { content: t, isDirty: n, onChange: r, debounce: i = pn, enabled: a = !0 } = e, o = null, s = !1;
377
394
  function c() {
378
395
  return typeof a == "function" ? a() : a;
379
396
  }
@@ -408,7 +425,7 @@ function dn(e) {
408
425
  destroy: h
409
426
  };
410
427
  }
411
- function fn(e) {
428
+ function hn(e) {
412
429
  let t = o(/* @__PURE__ */ new Set()), n = g(() => t.size > 0);
413
430
  function r(e) {
414
431
  return t.has(e);
@@ -426,7 +443,7 @@ function fn(e) {
426
443
  hasHiddenBlocks: n
427
444
  };
428
445
  }
429
- function pn(e) {
446
+ function gn(e) {
430
447
  let t = _(!1), n = _(!1), r = g(() => !!e.definition.value?.dataSource), i = g(() => r.value && !e.block.value.dataSourceFetched);
431
448
  async function a() {
432
449
  let r = e.definition.value;
@@ -456,7 +473,7 @@ function pn(e) {
456
473
  needsFetch: i
457
474
  };
458
475
  }
459
- function mn(e, t) {
476
+ function _n(e, t) {
460
477
  let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
461
478
  e.addBlock = (r, i, a, o) => {
462
479
  i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
@@ -470,15 +487,15 @@ function mn(e, t) {
470
487
  t.record(), o(e);
471
488
  };
472
489
  }
473
- function hn(e) {
474
- let { provider: t } = e, n = _([]), r = _(!1), i = F(() => {
490
+ function vn(e) {
491
+ let { provider: t } = e, n = _([]), r = _(!1), i = P(() => {
475
492
  let e = /* @__PURE__ */ new Set();
476
493
  for (let t of n.value) {
477
494
  let n = t.category?.trim();
478
495
  n && e.add(n);
479
496
  }
480
497
  return [...e].sort((e, t) => e.localeCompare(t));
481
- }), a = F(() => typeof t.create == "function"), o = F(() => typeof t.update == "function"), s = F(() => typeof t.delete == "function");
498
+ }), a = P(() => typeof t.create == "function"), o = P(() => typeof t.update == "function"), s = P(() => typeof t.delete == "function");
482
499
  function c(e) {
483
500
  return o.value && e.canUpdate !== !1;
484
501
  }
@@ -486,9 +503,12 @@ function hn(e) {
486
503
  return s.value && e.canDelete !== !1;
487
504
  }
488
505
  function u(e, t) {
489
- throw new Pe(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
506
+ throw new Fe(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
507
+ }
508
+ function d(t) {
509
+ rn(e.onError, t);
490
510
  }
491
- async function d(i) {
511
+ async function f(i) {
492
512
  r.value = !0;
493
513
  try {
494
514
  n.value = await t.list(i);
@@ -498,7 +518,7 @@ function hn(e) {
498
518
  r.value = !1;
499
519
  }
500
520
  }
501
- async function f(r, i, a) {
521
+ async function p(r, i, a) {
502
522
  let { create: o } = t;
503
523
  typeof o != "function" && u("create", "disabled by the provider");
504
524
  try {
@@ -510,30 +530,30 @@ function hn(e) {
510
530
  name: r,
511
531
  content: i
512
532
  });
513
- return n.value = [e, ...n.value], e;
533
+ return n.value = [e, ...n.value], d(() => t.onCreated?.(e)), e;
514
534
  } catch (t) {
515
535
  throw e.onError?.(t), t;
516
536
  }
517
537
  }
518
- async function p(r, i) {
538
+ async function m(r, i) {
519
539
  let { update: a } = t;
520
540
  typeof a != "function" && u("update", "disabled by the provider");
521
541
  let o = n.value.find((e) => e.id === r);
522
542
  o && o.canUpdate === !1 && u("update", `not permitted for entry "${r}"`);
523
543
  try {
524
544
  let e = await a(r, i);
525
- return n.value = n.value.map((t) => t.id === r ? e : t), e;
545
+ return n.value = n.value.map((t) => t.id === r ? e : t), d(() => t.onUpdated?.(e)), e;
526
546
  } catch (t) {
527
547
  throw e.onError?.(t), t;
528
548
  }
529
549
  }
530
- async function m(r) {
550
+ async function h(r) {
531
551
  let { delete: i } = t;
532
552
  typeof i != "function" && u("delete", "disabled by the provider");
533
- let a = n.value.find((e) => e.id === r);
553
+ let a = n.value.find((e) => e.id === r) ?? null;
534
554
  a && a.canDelete === !1 && u("delete", `not permitted for entry "${r}"`);
535
555
  try {
536
- await i(r), n.value = n.value.filter((e) => e.id !== r);
556
+ await i(r), n.value = n.value.filter((e) => e.id !== r), a && d(() => t.onDeleted?.(a));
537
557
  } catch (t) {
538
558
  throw e.onError?.(t), t;
539
559
  }
@@ -547,15 +567,15 @@ function hn(e) {
547
567
  canDelete: s,
548
568
  canUpdateBlock: c,
549
569
  canDeleteBlock: l,
550
- load: d,
551
- create: f,
552
- update: p,
553
- remove: m
570
+ load: f,
571
+ create: p,
572
+ update: m,
573
+ remove: h
554
574
  };
555
575
  }
556
- var gn = "templatical:saved-blocks";
557
- function _n(e = {}) {
558
- let t = e.key ?? gn;
576
+ var yn = "templatical:saved-blocks";
577
+ function bn(e = {}) {
578
+ let t = e.key ?? yn;
559
579
  function n() {
560
580
  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.");
561
581
  return localStorage;
@@ -580,7 +600,7 @@ function _n(e = {}) {
580
600
  },
581
601
  async create(e) {
582
602
  let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
583
- id: ye(),
603
+ id: be(),
584
604
  name: e.name,
585
605
  content: e.content,
586
606
  ...e.category ? { category: e.category } : {},
@@ -606,17 +626,20 @@ function _n(e = {}) {
606
626
  }
607
627
  };
608
628
  }
609
- function vn(e) {
610
- let { provider: t, getTemplateId: n } = e, r = _([]), i = _(!1), a = _(void 0), o = _(!1), s = /* @__PURE__ */ new Map(), c = F(() => typeof t.create == "function"), l = F(() => typeof t.restore == "function");
629
+ function xn(e) {
630
+ let { provider: t, getTemplateId: n } = e, r = _([]), i = _(!1), a = _(void 0), o = _(!1), s = /* @__PURE__ */ new Map(), c = P(() => typeof t.create == "function"), l = P(() => typeof t.restore == "function");
611
631
  function u(e) {
612
632
  let t = n();
613
- if (!t) throw new Pe(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
633
+ if (!t) throw new Fe(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
614
634
  return t;
615
635
  }
616
636
  function d(e) {
617
- throw new Pe(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
637
+ throw new Fe(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
618
638
  }
619
- async function f(n) {
639
+ function f(t) {
640
+ rn(e.onError, t);
641
+ }
642
+ async function p(n) {
620
643
  let o = u("list");
621
644
  i.value = !0;
622
645
  try {
@@ -628,11 +651,11 @@ function vn(e) {
628
651
  i.value = !1;
629
652
  }
630
653
  }
631
- function p(e) {
654
+ function m(e) {
632
655
  return e.content ?? s.get(e.id) ?? null;
633
656
  }
634
- async function m(n) {
635
- let r = p(n);
657
+ async function h(n) {
658
+ let r = m(n);
636
659
  if (r) return r;
637
660
  let i = u("get");
638
661
  try {
@@ -642,29 +665,30 @@ function vn(e) {
642
665
  throw e.onError?.(t), t;
643
666
  }
644
667
  }
645
- async function h(n, i) {
668
+ async function g(n, i) {
646
669
  let { create: a } = t;
647
670
  typeof a != "function" && d("create");
648
671
  let o = u("create");
649
672
  try {
650
673
  let e = await a(o, n, i);
651
- return r.value = [e, ...r.value], e;
674
+ return r.value = [e, ...r.value], f(() => t.onCreated?.(e)), e;
652
675
  } catch (t) {
653
676
  throw e.onError?.(t), t;
654
677
  }
655
678
  }
656
- async function g(n) {
679
+ async function v(n) {
657
680
  let { restore: r } = t;
658
681
  typeof r != "function" && d("restore");
659
- let i = u("restore");
682
+ let i = u("restore"), a;
660
683
  o.value = !0;
661
684
  try {
662
- return await r(i, n);
685
+ a = await r(i, n);
663
686
  } catch (t) {
664
687
  throw e.onError?.(t), t;
665
688
  } finally {
666
689
  o.value = !1;
667
690
  }
691
+ return f(() => t.onRestored?.(a)), a;
668
692
  }
669
693
  return {
670
694
  nextCursor: a,
@@ -673,31 +697,31 @@ function vn(e) {
673
697
  isRestoring: o,
674
698
  canCreate: c,
675
699
  canRestore: l,
676
- load: f,
677
- peekContent: p,
678
- resolveContent: m,
679
- create: h,
680
- restore: g
700
+ load: p,
701
+ peekContent: m,
702
+ resolveContent: h,
703
+ create: g,
704
+ restore: v
681
705
  };
682
706
  }
683
- function yn(e) {
684
- let { provider: t, getTemplateId: n, getUser: r } = e, i = _([]), a = _(!1), o = _(!1), s = F(() => typeof t.create == "function"), c = F(() => typeof t.update == "function"), l = F(() => typeof t.delete == "function"), u = F(() => typeof t.setResolved == "function"), d = F(() => i.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), f = F(() => i.value.filter((e) => !e.resolvedAt).length), p = F(() => {
707
+ function Sn(e) {
708
+ let { provider: t, getTemplateId: n, getUser: r } = e, i = _([]), a = _(!1), o = _(!1), s = P(() => typeof t.create == "function"), c = P(() => typeof t.update == "function"), l = P(() => typeof t.delete == "function"), u = P(() => typeof t.setResolved == "function"), d = P(() => i.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), f = P(() => i.value.filter((e) => !e.resolvedAt).length), p = P(() => {
685
709
  let e = /* @__PURE__ */ new Map();
686
710
  for (let t of i.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
687
711
  return e;
688
712
  });
689
713
  function m(e) {
690
714
  let t = n();
691
- if (!t) throw new Pe(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
715
+ if (!t) throw new Fe(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
692
716
  return t;
693
717
  }
694
718
  function h(e) {
695
719
  let t = r();
696
- if (!t) throw new Pe(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
720
+ if (!t) throw new Fe(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
697
721
  return t;
698
722
  }
699
723
  function g(e) {
700
- throw new Pe(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
724
+ throw new Fe(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
701
725
  }
702
726
  function v(e) {
703
727
  for (let t of i.value) {
@@ -710,15 +734,12 @@ function yn(e) {
710
734
  let t = r();
711
735
  return t !== null && e.author.id === t.id;
712
736
  }
713
- function b(t, n) {
714
- e.onComment?.({
715
- type: t,
716
- comment: n
717
- });
737
+ function b(t) {
738
+ let n = nn(t);
739
+ throw e.onError?.(n), n;
718
740
  }
719
741
  function x(t) {
720
- let n = t instanceof Error ? t : Error(String(t), { cause: t });
721
- throw e.onError?.(n), n;
742
+ rn(e.onError, t);
722
743
  }
723
744
  function S(e, t, n) {
724
745
  return [
@@ -727,75 +748,76 @@ function yn(e) {
727
748
  ...e.slice(t + 1)
728
749
  ];
729
750
  }
730
- function C(e) {
751
+ function C(e, t) {
752
+ return e !== void 0 && JSON.stringify(e) === JSON.stringify(t);
753
+ }
754
+ function w(e) {
731
755
  if (e.parentId) {
732
- i.value = i.value.map((t) => {
733
- if (t.id !== e.parentId) return t;
734
- let n = t.replies ?? [], r = n.findIndex((t) => t.id === e.id);
735
- return {
736
- ...t,
737
- replies: r === -1 ? [...n, e] : S(n, r, e)
738
- };
756
+ let t = !1, n = i.value.map((n) => {
757
+ if (n.id !== e.parentId) return n;
758
+ let r = n.replies ?? [], i = r.findIndex((t) => t.id === e.id);
759
+ return i !== -1 && C(r[i], e) ? n : (t = !0, {
760
+ ...n,
761
+ replies: i === -1 ? [...r, e] : S(r, i, e)
762
+ });
739
763
  });
740
- return;
764
+ return t && (i.value = n), t;
741
765
  }
742
766
  let t = i.value.findIndex((t) => t.id === e.id);
743
- if (t === -1) {
744
- i.value = [...i.value, e];
745
- return;
746
- }
747
- i.value = S(i.value, t, {
767
+ if (t === -1) return i.value = [...i.value, e], !0;
768
+ let n = {
748
769
  ...e,
749
770
  replies: e.replies ?? i.value[t].replies
750
- });
771
+ };
772
+ return !C(i.value[t], n) && (i.value = S(i.value, t, n), !0);
751
773
  }
752
- function w(e, t) {
774
+ function T(e, t) {
753
775
  let n = v(e), r = t ?? n?.parentId ?? null;
754
776
  return r ? i.value = i.value.map((t) => t.id === r ? {
755
777
  ...t,
756
778
  replies: (t.replies ?? []).filter((t) => t.id !== e)
757
779
  } : t) : i.value = i.value.filter((t) => t.id !== e), n;
758
780
  }
759
- async function T(e) {
781
+ async function E(e) {
760
782
  let n = m("list");
761
783
  a.value = !0;
762
784
  try {
763
785
  i.value = await t.list(n, e);
764
786
  } catch (e) {
765
- x(e);
787
+ b(e);
766
788
  } finally {
767
789
  a.value = !1;
768
790
  }
769
791
  }
770
- async function E(e) {
792
+ async function D(e) {
771
793
  let { create: n } = t;
772
794
  typeof n != "function" && g("create");
773
795
  let r = m("create");
774
796
  h("create"), o.value = !0;
775
797
  try {
776
- let t = await n(r, e);
777
- return C(t), b("created", t), t;
798
+ let i = await n(r, e);
799
+ return w(i), x(() => t.onCreated?.(i, { origin: "local" })), i;
778
800
  } catch (e) {
779
- x(e);
801
+ b(e);
780
802
  } finally {
781
803
  o.value = !1;
782
804
  }
783
805
  }
784
- async function D(e, n) {
806
+ async function O(e, n) {
785
807
  let { update: r } = t;
786
808
  typeof r != "function" && g("update");
787
809
  let i = m("update");
788
810
  h("update"), o.value = !0;
789
811
  try {
790
- let t = await r(i, e, n);
791
- return C(t), b("updated", t), t;
812
+ let a = await r(i, e, n);
813
+ return w(a), x(() => t.onUpdated?.(a, { origin: "local" })), a;
792
814
  } catch (e) {
793
- x(e);
815
+ b(e);
794
816
  } finally {
795
817
  o.value = !1;
796
818
  }
797
819
  }
798
- async function O(e) {
820
+ async function k(e) {
799
821
  let { delete: n } = t;
800
822
  typeof n != "function" && g("delete");
801
823
  let r = m("delete");
@@ -803,36 +825,36 @@ function yn(e) {
803
825
  let i = v(e);
804
826
  o.value = !0;
805
827
  try {
806
- await n(r, e), w(e), i && b("deleted", i);
828
+ await n(r, e), T(e), i && x(() => t.onDeleted?.(i, { origin: "local" }));
807
829
  } catch (e) {
808
- x(e);
830
+ b(e);
809
831
  } finally {
810
832
  o.value = !1;
811
833
  }
812
834
  }
813
- async function k(e, n) {
835
+ async function A(e, n) {
814
836
  let { setResolved: r } = t;
815
837
  typeof r != "function" && g("setResolved");
816
838
  let i = m("setResolved");
817
839
  h("setResolved"), o.value = !0;
818
840
  try {
819
- let t = await r(i, e, n);
820
- return C(t), b(t.resolvedAt ? "resolved" : "unresolved", t), t;
841
+ let a = await r(i, e, n);
842
+ return w(a), x(() => (a.resolvedAt ? t.onResolved : t.onUnresolved)?.(a, { origin: "local" })), a;
821
843
  } catch (e) {
822
- x(e);
844
+ b(e);
823
845
  } finally {
824
846
  o.value = !1;
825
847
  }
826
848
  }
827
- function A(e) {
828
- C(e), b("created", e);
849
+ function ee(e) {
850
+ w(e) && x(() => t.onCreated?.(e, { origin: "remote" }));
829
851
  }
830
852
  function j(e) {
831
- C(e), b(e.resolvedAt ? "resolved" : "updated", e);
853
+ w(e) && x(() => (e.resolvedAt ? t.onResolved : t.onUpdated)?.(e, { origin: "remote" }));
832
854
  }
833
- function M(e, t) {
834
- let n = w(e, t);
835
- n && b("deleted", n);
855
+ function M(e, n) {
856
+ let r = T(e, n);
857
+ r && x(() => t.onDeleted?.(r, { origin: "remote" }));
836
858
  }
837
859
  return {
838
860
  comments: i,
@@ -845,19 +867,19 @@ function yn(e) {
845
867
  totalCount: d,
846
868
  unresolvedCount: f,
847
869
  commentCountByBlock: p,
848
- load: T,
849
- create: E,
850
- update: D,
851
- remove: O,
852
- setResolved: k,
870
+ load: E,
871
+ create: D,
872
+ update: O,
873
+ remove: k,
874
+ setResolved: A,
853
875
  find: v,
854
876
  isOwn: y,
855
- applyRemoteCreate: A,
877
+ applyRemoteCreate: ee,
856
878
  applyRemoteUpdate: j,
857
879
  applyRemoteDelete: M
858
880
  };
859
881
  }
860
- function bn(e) {
882
+ function Cn(e) {
861
883
  let { comments: t, provider: n, getTemplateId: r } = e, { subscribe: i } = n;
862
884
  if (typeof i != "function") return;
863
885
  let a = null;
@@ -876,31 +898,31 @@ function bn(e) {
876
898
  case "deleted": t.applyRemoteDelete(e.commentId, e.parentId);
877
899
  }
878
900
  }));
879
- }, { immediate: !0 }), M(o);
901
+ }, { immediate: !0 }), j(o);
880
902
  }
881
903
  //#endregion
882
904
  //#region src/utils/activeEditorTracker.ts
883
- var xn = /* @__PURE__ */ new Set(), Sn = 0, Cn = 0;
884
- function wn() {
885
- let e = ++Cn;
886
- return xn.add(e), Sn === 0 && (Sn = e), {
905
+ var wn = /* @__PURE__ */ new Set(), Tn = 0, En = 0;
906
+ function Dn() {
907
+ let e = ++En;
908
+ return wn.add(e), Tn === 0 && (Tn = e), {
887
909
  id: e,
888
- isActive: () => xn.size <= 1 || Sn === e,
910
+ isActive: () => wn.size <= 1 || Tn === e,
889
911
  claim: () => {
890
- Sn = e;
912
+ Tn = e;
891
913
  },
892
914
  dispose: () => {
893
- if (xn.delete(e), Sn === e) {
894
- let e = Array.from(xn);
895
- Sn = e[e.length - 1] ?? 0;
915
+ if (wn.delete(e), Tn === e) {
916
+ let e = Array.from(wn);
917
+ Tn = e[e.length - 1] ?? 0;
896
918
  }
897
919
  }
898
920
  };
899
921
  }
900
922
  //#endregion
901
923
  //#region src/composables/usePreviewResolution.ts
902
- var Tn = 500;
903
- function En(e) {
924
+ var On = 500;
925
+ function kn(e) {
904
926
  let t = typeof e.resolvePreview == "function", n = _(null), r = _(!1), i = _(!1), a = 0, o = null;
905
927
  function c() {
906
928
  o !== null && (clearTimeout(o), o = null);
@@ -911,13 +933,13 @@ function En(e) {
911
933
  let o = ++a;
912
934
  r.value = !0;
913
935
  let s = {
914
- content: Ue(e.getContent()),
936
+ content: We(e.getContent()),
915
937
  ...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
916
938
  };
917
939
  try {
918
940
  let e = await t(s);
919
941
  if (o !== a) return;
920
- if (!ue(e)) {
942
+ if (!de(e)) {
921
943
  i.value = !0;
922
944
  return;
923
945
  }
@@ -937,7 +959,7 @@ function En(e) {
937
959
  }
938
960
  o = setTimeout(() => {
939
961
  o = null, l();
940
- }, Tn);
962
+ }, On);
941
963
  }
942
964
  }
943
965
  return s(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
@@ -946,20 +968,20 @@ function En(e) {
946
968
  return;
947
969
  }
948
970
  u();
949
- }, { immediate: !0 }), M(() => {
971
+ }, { immediate: !0 }), j(() => {
950
972
  c(), a++;
951
973
  }), {
952
974
  isConfigured: t,
953
- content: F(() => n.value ?? e.getContent()),
975
+ content: P(() => n.value ?? e.getContent()),
954
976
  isResolving: r,
955
- isInitialResolve: F(() => r.value && n.value === null),
977
+ isInitialResolve: P(() => r.value && n.value === null),
956
978
  hasFailed: i,
957
- supersedesSamples: F(() => t)
979
+ supersedesSamples: P(() => t)
958
980
  };
959
981
  }
960
982
  //#endregion
961
983
  //#region src/composables/useImageUrlResolver.ts
962
- function Dn(e) {
984
+ function An(e) {
963
985
  let t = o(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
964
986
  function r(e) {
965
987
  return t.get(e);
@@ -992,14 +1014,14 @@ function Dn(e) {
992
1014
  lookup: a
993
1015
  };
994
1016
  }
995
- function On(e) {
996
- let t = p(_t, null), n = F(e);
1017
+ function jn(e) {
1018
+ let t = p(vt, null), n = P(e);
997
1019
  if (!t) return n;
998
1020
  let r;
999
1021
  function i() {
1000
1022
  r !== void 0 && (clearTimeout(r), r = void 0);
1001
1023
  }
1002
- h() && M(i);
1024
+ h() && j(i);
1003
1025
  let a = !0;
1004
1026
  return s(n, (e) => {
1005
1027
  i();
@@ -1013,7 +1035,7 @@ function On(e) {
1013
1035
  r = void 0, t.lookup(e);
1014
1036
  }, 300);
1015
1037
  }
1016
- }, { immediate: !0 }), F(() => {
1038
+ }, { immediate: !0 }), P(() => {
1017
1039
  let e = n.value;
1018
1040
  if (!e) return e;
1019
1041
  let r = t.get(e);
@@ -1022,7 +1044,7 @@ function On(e) {
1022
1044
  }
1023
1045
  //#endregion
1024
1046
  //#region src/composables/useMergeTagPicker.ts
1025
- function kn() {
1047
+ function Mn() {
1026
1048
  let e = _(!1), t = _([]), n = null;
1027
1049
  function r(r) {
1028
1050
  if (n) {
@@ -1037,7 +1059,7 @@ function kn() {
1037
1059
  let i = n;
1038
1060
  n = null, e.value = !1, t.value = [], i && i(r);
1039
1061
  }
1040
- return h() && M(() => {
1062
+ return h() && j(() => {
1041
1063
  if (n) {
1042
1064
  let e = n;
1043
1065
  n = null, e(null);
@@ -1052,7 +1074,7 @@ function kn() {
1052
1074
  }
1053
1075
  //#endregion
1054
1076
  //#region src/composables/useLogicTagPicker.ts
1055
- function An() {
1077
+ function Nn() {
1056
1078
  let e = _(!1), t = _([]), n = _([]), r = null;
1057
1079
  function i(i, a) {
1058
1080
  if (r) {
@@ -1067,7 +1089,7 @@ function An() {
1067
1089
  let a = r;
1068
1090
  r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
1069
1091
  }
1070
- return h() && M(() => {
1092
+ return h() && j(() => {
1071
1093
  if (r) {
1072
1094
  let e = r;
1073
1095
  r = null, e(null);
@@ -1083,17 +1105,17 @@ function An() {
1083
1105
  }
1084
1106
  //#endregion
1085
1107
  //#region src/composables/useTemplateLint.ts
1086
- function jn(e) {
1108
+ function Pn(e) {
1087
1109
  return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
1088
1110
  }
1089
- function Mn(e) {
1090
- let t = _([]), n = _(!1), r = _(!1), i = f(null), a = jn(e.options), o = null, c = !1;
1111
+ function Fn(e) {
1112
+ let t = _([]), n = _(!1), r = _(!1), i = f(null), a = Pn(e.options), o = null, c = !1;
1091
1113
  a || l();
1092
1114
  async function l() {
1093
1115
  try {
1094
1116
  let t = await import("@templatical/quality");
1095
1117
  if (c) return;
1096
- i.value = { lintTemplate: t.lintTemplate }, n.value = !0, u(), o = Ge(e.content, u, {
1118
+ i.value = { lintTemplate: t.lintTemplate }, n.value = !0, u(), o = Ke(e.content, u, {
1097
1119
  debounce: e.debounce ?? 500,
1098
1120
  deep: !0
1099
1121
  });
@@ -1128,17 +1150,17 @@ function Mn(e) {
1128
1150
  }
1129
1151
  //#endregion
1130
1152
  //#region src/utils/blockTypeLabels.ts
1131
- function Nn(e, t) {
1153
+ function In(e, t) {
1132
1154
  return t.blocks[e] ?? e;
1133
1155
  }
1134
- function Pn(e, t, n = []) {
1135
- if (e.type !== "custom") return Nn(e.type, t);
1156
+ function Ln(e, t, n = []) {
1157
+ if (e.type !== "custom") return In(e.type, t);
1136
1158
  let { customType: r } = e;
1137
1159
  return n.find((e) => e.type === r)?.name ?? r;
1138
1160
  }
1139
1161
  //#endregion
1140
1162
  //#region src/composables/useKeyboardReorder.ts
1141
- function Fn(e, t, n = []) {
1163
+ function Rn(e, t, n = []) {
1142
1164
  let r = _(null), i = _(""), a = null;
1143
1165
  function o(t) {
1144
1166
  let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
@@ -1165,7 +1187,7 @@ function Fn(e, t, n = []) {
1165
1187
  let i = o(r);
1166
1188
  if (!i) return "";
1167
1189
  let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
1168
- return a ? Pn(a, t.t, n) : "";
1190
+ return a ? Ln(a, t.t, n) : "";
1169
1191
  }
1170
1192
  function c(t, n) {
1171
1193
  return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
@@ -1234,13 +1256,13 @@ function Fn(e, t, n = []) {
1234
1256
  }
1235
1257
  //#endregion
1236
1258
  //#region src/composables/useUiTheme.ts
1237
- function In(e) {
1238
- let t = Je("(prefers-color-scheme: dark)");
1239
- return { resolvedTheme: F(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
1259
+ function zn(e) {
1260
+ let t = Ye("(prefers-color-scheme: dark)");
1261
+ return { resolvedTheme: P(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
1240
1262
  }
1241
1263
  //#endregion
1242
1264
  //#region src/composables/useThemeStyles.ts
1243
- var Ln = {
1265
+ var Bn = {
1244
1266
  bg: "--tpl-bg",
1245
1267
  bgElevated: "--tpl-bg-elevated",
1246
1268
  bgHover: "--tpl-bg-hover",
@@ -1264,10 +1286,10 @@ var Ln = {
1264
1286
  dangerLight: "--tpl-danger-light",
1265
1287
  canvasBg: "--tpl-canvas-bg"
1266
1288
  };
1267
- function Rn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
1268
- return { themeStyles: F(() => {
1289
+ function Vn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
1290
+ return { themeStyles: P(() => {
1269
1291
  let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
1270
- if (a) for (let [e, t] of Object.entries(Ln)) {
1292
+ if (a) for (let [e, t] of Object.entries(Bn)) {
1271
1293
  let n = a[e];
1272
1294
  n && (r[t] = n);
1273
1295
  }
@@ -1276,18 +1298,18 @@ function Rn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
1276
1298
  }
1277
1299
  //#endregion
1278
1300
  //#region src/composables/useBlockRegistry.ts
1279
- function zn() {
1301
+ function Hn() {
1280
1302
  let e = f(/* @__PURE__ */ new Map());
1281
1303
  function t(t, n) {
1282
- e.value.set(t, n), j(e);
1304
+ e.value.set(t, n), ee(e);
1283
1305
  }
1284
1306
  function n(t, n) {
1285
1307
  let r = `custom:${t.type}`, i = {
1286
1308
  component: n,
1287
- createBlock: () => Ee(t),
1309
+ createBlock: () => De(t),
1288
1310
  definition: t
1289
1311
  };
1290
- e.value.set(r, i), j(e);
1312
+ e.value.set(r, i), ee(e);
1291
1313
  }
1292
1314
  function r(t) {
1293
1315
  if (t.type === "custom") {
@@ -1310,13 +1332,13 @@ function zn() {
1310
1332
  let t = a(e.customType);
1311
1333
  if (!t) return o("Block definition not found");
1312
1334
  try {
1313
- let { Liquid: n } = await import("./liquid.browser-B-rGrnrQ.js");
1335
+ let { Liquid: n } = await import("./liquid.browser-CJgDDvQz.js");
1314
1336
  return await new n({
1315
1337
  strictVariables: !1,
1316
1338
  strictFilters: !1
1317
1339
  }).parseAndRender(t.template, e.fieldValues);
1318
1340
  } catch (t) {
1319
- return Rt.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
1341
+ return zt.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
1320
1342
  }
1321
1343
  }
1322
1344
  function c(t) {
@@ -1334,9 +1356,9 @@ function zn() {
1334
1356
  }
1335
1357
  //#endregion
1336
1358
  //#region src/composables/useCustomBlockStylesheets.ts
1337
- function Bn(e, t) {
1338
- return F(() => {
1339
- let n = Vn(e.value.blocks);
1359
+ function Un(e, t) {
1360
+ return P(() => {
1361
+ let n = Wn(e.value.blocks);
1340
1362
  if (n.size === 0) return [];
1341
1363
  let r = /* @__PURE__ */ new Set(), i = [];
1342
1364
  for (let e of n) {
@@ -1348,81 +1370,81 @@ function Bn(e, t) {
1348
1370
  return i;
1349
1371
  });
1350
1372
  }
1351
- function Vn(e) {
1373
+ function Wn(e) {
1352
1374
  let t = /* @__PURE__ */ new Set();
1353
- return Hn(e, t), t;
1375
+ return Gn(e, t), t;
1354
1376
  }
1355
- function Hn(e, t) {
1377
+ function Gn(e, t) {
1356
1378
  for (let n of e) {
1357
- if (pe(n)) {
1379
+ if (me(n)) {
1358
1380
  t.add(n.customType);
1359
1381
  continue;
1360
1382
  }
1361
1383
  if (n.type === "section") {
1362
1384
  let e = n.children;
1363
1385
  if (!e) continue;
1364
- for (let n of e) Hn(n, t);
1386
+ for (let n of e) Gn(n, t);
1365
1387
  }
1366
1388
  }
1367
1389
  }
1368
1390
  //#endregion
1369
1391
  //#region src/utils/registerBuiltInBlocks.ts
1370
- var Un = [
1392
+ var Kn = [
1371
1393
  {
1372
1394
  type: "section",
1373
- createBlock: He
1395
+ createBlock: Ue
1374
1396
  },
1375
1397
  {
1376
1398
  type: "title",
1377
- createBlock: se
1399
+ createBlock: ce
1378
1400
  },
1379
1401
  {
1380
1402
  type: "paragraph",
1381
- createBlock: ze
1403
+ createBlock: Be
1382
1404
  },
1383
1405
  {
1384
1406
  type: "image",
1385
- createBlock: De
1407
+ createBlock: Oe
1386
1408
  },
1387
1409
  {
1388
1410
  type: "button",
1389
- createBlock: Re
1411
+ createBlock: ze
1390
1412
  },
1391
1413
  {
1392
1414
  type: "divider",
1393
- createBlock: Me
1415
+ createBlock: Ne
1394
1416
  },
1395
1417
  {
1396
1418
  type: "video",
1397
- createBlock: Be
1419
+ createBlock: Ve
1398
1420
  },
1399
1421
  {
1400
1422
  type: "social",
1401
- createBlock: Ce
1423
+ createBlock: we
1402
1424
  },
1403
1425
  {
1404
1426
  type: "menu",
1405
- createBlock: xe
1427
+ createBlock: Se
1406
1428
  },
1407
1429
  {
1408
1430
  type: "table",
1409
- createBlock: ve
1431
+ createBlock: ye
1410
1432
  },
1411
1433
  {
1412
1434
  type: "spacer",
1413
- createBlock: Ve
1435
+ createBlock: He
1414
1436
  },
1415
1437
  {
1416
1438
  type: "html",
1417
- createBlock: Oe
1439
+ createBlock: ke
1418
1440
  },
1419
1441
  {
1420
1442
  type: "countdown",
1421
- createBlock: Te
1443
+ createBlock: Ee
1422
1444
  }
1423
1445
  ];
1424
- function Wn(e, t) {
1425
- for (let n of Un) {
1446
+ function qn(e, t) {
1447
+ for (let n of Kn) {
1426
1448
  let r = t[n.type];
1427
1449
  r && e.registerBuiltIn(n.type, {
1428
1450
  component: r,
@@ -1432,34 +1454,34 @@ function Wn(e, t) {
1432
1454
  }
1433
1455
  //#endregion
1434
1456
  //#region src/utils/resolveHtmlBlockPreview.ts
1435
- function Gn(e) {
1457
+ function Jn(e) {
1436
1458
  return typeof e == "boolean" ? e : e?.enabled ?? !1;
1437
1459
  }
1438
1460
  //#endregion
1439
1461
  //#region src/utils/collectOffPaletteDefaults.ts
1440
- function Kn(e) {
1462
+ function Yn(e) {
1441
1463
  return typeof e == "object" && !!e && !Array.isArray(e);
1442
1464
  }
1443
- function qn(e, t, n) {
1444
- let r = new Set(e.map((e) => Ht(e))), i = [], a = (e, t) => {
1445
- for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Ht(o)) && i.push(`${t}.${n}: ${o}`) : Kn(o) && a(o, `${t}.${n}`);
1465
+ function Xn(e, t, n) {
1466
+ let r = new Set(e.map((e) => Ut(e))), i = [], a = (e, t) => {
1467
+ for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Ut(o)) && i.push(`${t}.${n}: ${o}`) : Yn(o) && a(o, `${t}.${n}`);
1446
1468
  }, o = t;
1447
- for (let [e, t] of Object.entries(Le)) {
1469
+ for (let [e, t] of Object.entries(Re)) {
1448
1470
  let n = o?.[e];
1449
1471
  a({
1450
1472
  ...t,
1451
- ...Kn(n) ? n : {}
1473
+ ...Yn(n) ? n : {}
1452
1474
  }, e);
1453
1475
  }
1454
1476
  return a({
1455
- ...Ne,
1477
+ ...Pe,
1456
1478
  ...n ?? {}
1457
1479
  }, "template"), i;
1458
1480
  }
1459
1481
  //#endregion
1460
1482
  //#region src/utils/resolveFieldColors.ts
1461
- function Jn(e, t) {
1462
- let n = Vt({ presets: e.presets }, zt), r = n.presets.length === 0, i = e.allowCustom ?? t.allowCustom;
1483
+ function Zn(e, t) {
1484
+ let n = Ht({ presets: e.presets }, Bt), r = n.presets.length === 0, i = e.allowCustom ?? t.allowCustom;
1463
1485
  return {
1464
1486
  presets: r ? t.presets : n.presets,
1465
1487
  allowCustom: t.allowCustom !== !1 && i,
@@ -1471,9 +1493,9 @@ function Jn(e, t) {
1471
1493
  }
1472
1494
  //#endregion
1473
1495
  //#region src/utils/collectColorFieldIssues.ts
1474
- function Yn(e, t) {
1496
+ function Qn(e, t) {
1475
1497
  let n = [], r = (r, i) => {
1476
- let a = Jn(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
1498
+ let a = Zn(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
1477
1499
  if (a.invalidPresets.length > 0 && n.push({
1478
1500
  id: s("invalid-presets"),
1479
1501
  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." : "")
@@ -1484,8 +1506,8 @@ function Yn(e, t) {
1484
1506
  id: s("allow-custom-ignored"),
1485
1507
  message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
1486
1508
  }), !a.allowCustom && a.presets.length > 0) {
1487
- let e = r.default ?? "", t = new Set(a.presets.map((e) => Ht(e)));
1488
- e !== "" && !t.has(Ht(e)) && n.push({
1509
+ let e = r.default ?? "", t = new Set(a.presets.map((e) => Ut(e)));
1510
+ e !== "" && !t.has(Ut(e)) && n.push({
1489
1511
  id: s("off-palette-default"),
1490
1512
  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.`
1491
1513
  });
@@ -1497,7 +1519,7 @@ function Yn(e, t) {
1497
1519
  }
1498
1520
  //#endregion
1499
1521
  //#region src/utils/keyboardShortcuts.ts
1500
- function Xn(e) {
1522
+ function $n(e) {
1501
1523
  for (let t of e.composedPath()) {
1502
1524
  if (!(t instanceof HTMLElement)) continue;
1503
1525
  if (t.isContentEditable) return !0;
@@ -1506,18 +1528,18 @@ function Xn(e) {
1506
1528
  }
1507
1529
  return !1;
1508
1530
  }
1509
- function Zn(e, t) {
1531
+ function er(e, t) {
1510
1532
  let n = e.metaKey || e.ctrlKey;
1511
1533
  if (n && e.key.toLowerCase() === "s") {
1512
1534
  e.preventDefault(), t.onSave?.();
1513
1535
  return;
1514
1536
  }
1515
1537
  if (n && e.key.toLowerCase() === "z") {
1516
- if (Xn(e)) return;
1538
+ if ($n(e)) return;
1517
1539
  e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
1518
1540
  return;
1519
1541
  }
1520
- if (t.isPicking?.() && !Xn(e)) {
1542
+ if (t.isPicking?.() && !$n(e)) {
1521
1543
  if (e.key === "Escape") {
1522
1544
  e.preventDefault(), t.onCancelPick?.();
1523
1545
  return;
@@ -1535,11 +1557,11 @@ function Zn(e, t) {
1535
1557
  t.selectBlock(null);
1536
1558
  return;
1537
1559
  }
1538
- (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Xn(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
1560
+ (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !$n(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
1539
1561
  }
1540
1562
  //#endregion
1541
1563
  //#region src/utils/mergeTagLabelSegments.ts
1542
- function Qn(e, t, n, r = !1) {
1564
+ function tr(e, t, n, r = !1) {
1543
1565
  if (!e) return [];
1544
1566
  let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
1545
1567
  for (; (s = i.exec(e)) !== null;) {
@@ -1548,18 +1570,18 @@ function Qn(e, t, n, r = !1) {
1548
1570
  value: e.slice(o, s.index)
1549
1571
  });
1550
1572
  let i = s[0];
1551
- if (ge(i, n)) {
1552
- let e = r ? he(i, t) : void 0;
1573
+ if (_e(i, n)) {
1574
+ let e = r ? ge(i, t) : void 0;
1553
1575
  a.push(e === void 0 ? {
1554
1576
  type: "tag",
1555
- value: ce(i, t)
1577
+ value: le(i, t)
1556
1578
  } : {
1557
1579
  type: "text",
1558
1580
  value: e
1559
1581
  });
1560
- } else me(i, n) ? a.push({
1582
+ } else he(i, n) ? a.push({
1561
1583
  type: "tag",
1562
- value: le(i, n)
1584
+ value: ue(i, n)
1563
1585
  }) : a.push({
1564
1586
  type: "text",
1565
1587
  value: i
@@ -1573,27 +1595,27 @@ function Qn(e, t, n, r = !1) {
1573
1595
  }
1574
1596
  //#endregion
1575
1597
  //#region src/components/MergeTagPreviewText.vue
1576
- var $n = L({
1598
+ var nr = I({
1577
1599
  name: "MergeTagPreviewText",
1578
1600
  props: { text: {
1579
1601
  type: String,
1580
1602
  required: !0
1581
1603
  } },
1582
1604
  setup(e) {
1583
- let t = p(dt, []), n = p(wt, Se.liquid), r = p(ft, null), i = F(() => Qn(e.text, t, n, r?.value ?? !1));
1605
+ let t = p(ft, []), n = p(Tt, Ce.liquid), r = p(pt, null), i = P(() => tr(e.text, t, n, r?.value ?? !1));
1584
1606
  return () => i.value.map((e, t) => e.type === "tag" ? b("span", {
1585
1607
  key: t,
1586
1608
  class: "tpl-merge-tag-label"
1587
1609
  }, e.value) : e.value);
1588
1610
  }
1589
- }), er = ["href"], tr = /* @__PURE__ */ L({
1611
+ }), rr = ["href"], ir = /* @__PURE__ */ I({
1590
1612
  __name: "ButtonBlock",
1591
1613
  props: {
1592
1614
  block: {},
1593
1615
  viewport: {}
1594
1616
  },
1595
1617
  setup(e) {
1596
- let t = e, n = F(() => {
1618
+ let t = e, n = P(() => {
1597
1619
  let e = {
1598
1620
  display: "inline-block",
1599
1621
  padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
@@ -1606,18 +1628,18 @@ var $n = L({
1606
1628
  textAlign: "center"
1607
1629
  };
1608
1630
  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;
1609
- }), r = F(() => ({ textAlign: t.block.align ?? "center" }));
1631
+ }), r = P(() => ({ textAlign: t.block.align ?? "center" }));
1610
1632
  return (t, i) => (O(), S("div", { style: u(r.value) }, [x("a", {
1611
1633
  href: e.block.url || "#",
1612
1634
  style: u(n.value),
1613
1635
  class: "tpl:cursor-default",
1614
- onClick: i[0] ||= R(() => {}, ["prevent"])
1615
- }, [w($n, { text: e.block.text }, null, 8, ["text"])], 12, er)], 4));
1636
+ onClick: i[0] ||= L(() => {}, ["prevent"])
1637
+ }, [w(nr, { text: e.block.text }, null, 8, ["text"])], 12, rr)], 4));
1616
1638
  }
1617
- }), nr = Wt("bookmark", [["path", {
1639
+ }), ar = Gt("bookmark", [["path", {
1618
1640
  d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
1619
1641
  key: "oz39mx"
1620
- }]]), rr = Wt("box", [
1642
+ }]]), or = Gt("box", [
1621
1643
  ["path", {
1622
1644
  d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
1623
1645
  key: "hh9hay"
@@ -1630,13 +1652,13 @@ var $n = L({
1630
1652
  d: "M12 22V12",
1631
1653
  key: "d0xqtd"
1632
1654
  }]
1633
- ]), ir = Wt("code", [["path", {
1655
+ ]), sr = Gt("code", [["path", {
1634
1656
  d: "m16 18 6-6-6-6",
1635
1657
  key: "eg8j8"
1636
1658
  }], ["path", {
1637
1659
  d: "m8 6-6 6 6 6",
1638
1660
  key: "ppft3o"
1639
- }]]), ar = Wt("copy", [["rect", {
1661
+ }]]), cr = Gt("copy", [["rect", {
1640
1662
  width: "14",
1641
1663
  height: "14",
1642
1664
  x: "8",
@@ -1647,7 +1669,7 @@ var $n = L({
1647
1669
  }], ["path", {
1648
1670
  d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
1649
1671
  key: "zix9uf"
1650
- }]]), or = Wt("eye-off", [
1672
+ }]]), lr = Gt("eye-off", [
1651
1673
  ["path", {
1652
1674
  d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
1653
1675
  key: "ct8e1f"
@@ -1664,10 +1686,10 @@ var $n = L({
1664
1686
  d: "m2 2 20 20",
1665
1687
  key: "1ooewy"
1666
1688
  }]
1667
- ]), sr = Wt("funnel", [["path", {
1689
+ ]), ur = Gt("funnel", [["path", {
1668
1690
  d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
1669
1691
  key: "sc7q7i"
1670
- }]]), cr = Wt("grip-vertical", [
1692
+ }]]), dr = Gt("grip-vertical", [
1671
1693
  ["circle", {
1672
1694
  cx: "9",
1673
1695
  cy: "12",
@@ -1704,7 +1726,7 @@ var $n = L({
1704
1726
  r: "1",
1705
1727
  key: "f4zoj3"
1706
1728
  }]
1707
- ]), lr = Wt("image", [
1729
+ ]), fr = Gt("image", [
1708
1730
  ["rect", {
1709
1731
  width: "18",
1710
1732
  height: "18",
@@ -1724,13 +1746,13 @@ var $n = L({
1724
1746
  d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
1725
1747
  key: "1xmnt7"
1726
1748
  }]
1727
- ]), ur = Wt("navigation", [["polygon", {
1749
+ ]), pr = Gt("navigation", [["polygon", {
1728
1750
  points: "3 11 22 2 13 21 11 13 3 11",
1729
1751
  key: "1ltx0t"
1730
- }]]), dr = Wt("puzzle", [["path", {
1752
+ }]]), mr = Gt("puzzle", [["path", {
1731
1753
  d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
1732
1754
  key: "w46dr5"
1733
- }]]), fr = Wt("share-2", [
1755
+ }]]), hr = Gt("share-2", [
1734
1756
  ["circle", {
1735
1757
  cx: "18",
1736
1758
  cy: "5",
@@ -1763,7 +1785,7 @@ var $n = L({
1763
1785
  y2: "10.49",
1764
1786
  key: "1n3mei"
1765
1787
  }]
1766
- ]), pr = Wt("table", [
1788
+ ]), gr = Gt("table", [
1767
1789
  ["path", {
1768
1790
  d: "M12 3v18",
1769
1791
  key: "108xh3"
@@ -1784,7 +1806,7 @@ var $n = L({
1784
1806
  d: "M3 15h18",
1785
1807
  key: "5xshup"
1786
1808
  }]
1787
- ]), mr = Wt("video", [["path", {
1809
+ ]), _r = Gt("video", [["path", {
1788
1810
  d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
1789
1811
  key: "ftymec"
1790
1812
  }], ["rect", {
@@ -1794,18 +1816,18 @@ var $n = L({
1794
1816
  height: "12",
1795
1817
  rx: "2",
1796
1818
  key: "158x01"
1797
- }]]), hr = ["innerHTML"], gr = [
1819
+ }]]), vr = ["innerHTML"], yr = [
1798
1820
  "src",
1799
1821
  "width",
1800
1822
  "height"
1801
- ], _r = /* @__PURE__ */ L({
1823
+ ], br = /* @__PURE__ */ I({
1802
1824
  __name: "CustomBlockIcon",
1803
1825
  props: {
1804
1826
  icon: {},
1805
1827
  size: {}
1806
1828
  },
1807
1829
  setup(e) {
1808
- let t = e, n = F(() => t.size ?? 20), r = F(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = F(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
1830
+ let t = e, n = P(() => t.size ?? 20), r = P(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = P(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
1809
1831
  return (t, a) => r.value ? (O(), S("span", {
1810
1832
  key: 0,
1811
1833
  class: "tpl:inline-flex tpl:items-center tpl:justify-center",
@@ -1814,24 +1836,24 @@ var $n = L({
1814
1836
  height: `${n.value}px`
1815
1837
  }),
1816
1838
  innerHTML: e.icon
1817
- }, null, 12, hr)) : i.value ? (O(), S("img", {
1839
+ }, null, 12, vr)) : i.value ? (O(), S("img", {
1818
1840
  key: 1,
1819
1841
  src: e.icon,
1820
1842
  width: n.value,
1821
1843
  height: n.value,
1822
1844
  class: "tpl:inline-block",
1823
1845
  alt: ""
1824
- }, null, 8, gr)) : (O(), A(P(rr), {
1846
+ }, null, 8, yr)) : (O(), A(N(or), {
1825
1847
  key: 2,
1826
1848
  size: n.value,
1827
1849
  "stroke-width": 1.5
1828
1850
  }, null, 8, ["size"]));
1829
1851
  }
1830
- }), vr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
1831
- function yr(e, t) {
1832
- let n = Qt(), r = null, i = null, a = null;
1852
+ }), xr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
1853
+ function Sr(e, t) {
1854
+ let n = $t(), r = null, i = null, a = null;
1833
1855
  function o() {
1834
- return e.value ? Array.from(e.value.querySelectorAll(vr)).filter((e) => e.offsetParent !== null) : [];
1856
+ return e.value ? Array.from(e.value.querySelectorAll(xr)).filter((e) => e.offsetParent !== null) : [];
1835
1857
  }
1836
1858
  function c(e) {
1837
1859
  if (e.key !== "Tab") return;
@@ -1846,7 +1868,7 @@ function yr(e, t) {
1846
1868
  a = null;
1847
1869
  let t = o();
1848
1870
  t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
1849
- }), i = Ye(e, "keydown", c);
1871
+ }), i = Xe(e, "keydown", c);
1850
1872
  }
1851
1873
  function u(e = {}) {
1852
1874
  let t = e.restoreFocus !== !1;
@@ -1855,15 +1877,15 @@ function yr(e, t) {
1855
1877
  let d = s([t, e], ([e, t]) => {
1856
1878
  e && t ? l() : u();
1857
1879
  }, { flush: "post" });
1858
- M(() => {
1880
+ j(() => {
1859
1881
  d(), u();
1860
1882
  });
1861
1883
  }
1862
1884
  //#endregion
1863
1885
  //#region src/composables/useEmoji.ts
1864
- function br() {
1865
- let [e, t] = Ke(!1), n = f([]), r = !1;
1866
- M(() => {
1886
+ function Cr() {
1887
+ let [e, t] = qe(!1), n = f([]), r = !1;
1888
+ j(() => {
1867
1889
  r = !0;
1868
1890
  }), s(e, async (e) => {
1869
1891
  if (e && n.value.length === 0) {
@@ -1887,7 +1909,7 @@ function br() {
1887
1909
  }
1888
1910
  //#endregion
1889
1911
  //#region src/composables/useFonts.ts
1890
- var xr = [
1912
+ var wr = [
1891
1913
  {
1892
1914
  value: "Arial",
1893
1915
  label: "Arial"
@@ -1916,7 +1938,7 @@ var xr = [
1916
1938
  value: "Courier New",
1917
1939
  label: "Courier New"
1918
1940
  }
1919
- ], Sr = {
1941
+ ], Tr = {
1920
1942
  arial: "Arial, sans-serif",
1921
1943
  helvetica: "Helvetica, sans-serif",
1922
1944
  georgia: "Georgia, serif",
@@ -1924,23 +1946,23 @@ var xr = [
1924
1946
  verdana: "Verdana, sans-serif",
1925
1947
  "trebuchet ms": "'Trebuchet MS', sans-serif",
1926
1948
  "courier new": "'Courier New', monospace"
1927
- }, Cr = "Arial, sans-serif";
1928
- function wr(e) {
1929
- if (e === void 0 || e === !0) return [...xr];
1949
+ }, Er = "Arial, sans-serif";
1950
+ function Dr(e) {
1951
+ if (e === void 0 || e === !0) return [...wr];
1930
1952
  if (e === !1) return [];
1931
1953
  let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
1932
1954
  for (let i of e) {
1933
- let e = i.toLowerCase(), a = xr.find((t) => t.value.toLowerCase() === e);
1955
+ let e = i.toLowerCase(), a = wr.find((t) => t.value.toLowerCase() === e);
1934
1956
  if (!a) {
1935
- r.has(e) || (r.add(e), Rt.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${xr.map((e) => e.value).join(", ")}.`));
1957
+ r.has(e) || (r.add(e), zt.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${wr.map((e) => e.value).join(", ")}.`));
1936
1958
  continue;
1937
1959
  }
1938
1960
  n.has(a.value) || (n.add(a.value), t.push(a));
1939
1961
  }
1940
1962
  return t;
1941
1963
  }
1942
- function Tr(e) {
1943
- let t = _(e?.customFonts ?? []), n = _(!1), r = wr(e?.builtIns), i = F(() => e?.defaultFallback ?? Cr), a = F(() => {
1964
+ function Or(e) {
1965
+ let t = _(e?.customFonts ?? []), n = _(!1), r = Dr(e?.builtIns), i = P(() => e?.defaultFallback ?? Er), a = P(() => {
1944
1966
  let e = [...r], n = t.value.map((e) => ({
1945
1967
  value: e.name,
1946
1968
  label: e.name,
@@ -1951,16 +1973,16 @@ function Tr(e) {
1951
1973
  function o(e) {
1952
1974
  return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
1953
1975
  }
1954
- let s = e?.defaultFont ?? Cr.split(",")[0].trim();
1955
- o(s) || Rt.warn(`config.fonts: new templates seed "${s}", 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.`);
1976
+ let s = e?.defaultFont ?? Er.split(",")[0].trim();
1977
+ o(s) || zt.warn(`config.fonts: new templates seed "${s}", 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.`);
1956
1978
  function c() {
1957
1979
  if (e?.defaultFont && o(e.defaultFont)) {
1958
1980
  let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
1959
1981
  if (t) return t.value;
1960
1982
  }
1961
- return Cr;
1983
+ return Er;
1962
1984
  }
1963
- let l = F(() => c());
1985
+ let l = P(() => c());
1964
1986
  function u(e) {
1965
1987
  if (!e) return i.value;
1966
1988
  let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
@@ -1968,7 +1990,7 @@ function Tr(e) {
1968
1990
  let e = n.fallback ?? i.value;
1969
1991
  return `'${n.name}', ${e}`;
1970
1992
  }
1971
- return Sr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
1993
+ return Tr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
1972
1994
  }
1973
1995
  let d = [], f = !1;
1974
1996
  async function p() {
@@ -1984,7 +2006,7 @@ function Tr(e) {
1984
2006
  t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
1985
2007
  });
1986
2008
  } catch (t) {
1987
- Rt.warn(`Failed to load custom font "${e.name}":`, t);
2009
+ zt.warn(`Failed to load custom font "${e.name}":`, t);
1988
2010
  }
1989
2011
  });
1990
2012
  await Promise.allSettled(e), !f && (n.value = !0);
@@ -1993,7 +2015,7 @@ function Tr(e) {
1993
2015
  for (let e of d) e.remove();
1994
2016
  d.length = 0;
1995
2017
  }
1996
- return h() && M(() => {
2018
+ return h() && j(() => {
1997
2019
  f = !0, m();
1998
2020
  }), {
1999
2021
  fonts: a,
@@ -2009,8 +2031,8 @@ function Tr(e) {
2009
2031
  }
2010
2032
  //#endregion
2011
2033
  //#region src/composables/useLogicTag.ts
2012
- function Er() {
2013
- let e = p(et, []), t = p(ut, []), n = p(wt, Se.liquid), r = p(Qe, null), i = p(Nt, null), a = _(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
2034
+ function kr() {
2035
+ let e = p(tt, []), t = p(dt, []), n = p(Tt, Ce.liquid), r = p($e, null), i = p(Pt, null), a = _(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
2014
2036
  async function c() {
2015
2037
  if (r) {
2016
2038
  a.value = !0;
@@ -2041,12 +2063,12 @@ function Er() {
2041
2063
  }
2042
2064
  //#endregion
2043
2065
  //#region src/utils/mergeTagNodeSpec.ts
2044
- function Dr(e, t, n) {
2045
- return me(e, n) ? {
2066
+ function Ar(e, t, n) {
2067
+ return he(e, n) ? {
2046
2068
  type: "logicMergeTagNode",
2047
2069
  attrs: {
2048
2070
  value: e,
2049
- keyword: le(e, n)
2071
+ keyword: ue(e, n)
2050
2072
  }
2051
2073
  } : {
2052
2074
  type: "mergeTagNode",
@@ -2058,15 +2080,15 @@ function Dr(e, t, n) {
2058
2080
  }
2059
2081
  //#endregion
2060
2082
  //#region src/utils/insertLogicTag.ts
2061
- function Or(e) {
2083
+ function jr(e) {
2062
2084
  return "before" in e && "after" in e;
2063
2085
  }
2064
- function kr(e, t, n) {
2065
- if (!Or(t)) {
2066
- e.chain().focus().insertContent(Dr(t.value, t.label, n)).run();
2086
+ function Mr(e, t, n) {
2087
+ if (!jr(t)) {
2088
+ e.chain().focus().insertContent(Ar(t.value, t.label, n)).run();
2067
2089
  return;
2068
2090
  }
2069
- let r = Dr(t.before, t.label, n), i = Dr(t.after, t.label, n), { from: a, to: o } = e.state.selection;
2091
+ let r = Ar(t.before, t.label, n), i = Ar(t.after, t.label, n), { from: a, to: o } = e.state.selection;
2070
2092
  if (a !== o) {
2071
2093
  e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
2072
2094
  return;
@@ -2075,20 +2097,20 @@ function kr(e, t, n) {
2075
2097
  }
2076
2098
  //#endregion
2077
2099
  //#region src/utils/linkColorExtension.ts
2078
- function Ar(e) {
2100
+ function Nr(e) {
2079
2101
  if (!e) return null;
2080
2102
  let t = e.trim();
2081
2103
  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;
2082
2104
  }
2083
- function jr(e) {
2105
+ function Pr(e) {
2084
2106
  return e.extend({ addAttributes() {
2085
2107
  return {
2086
2108
  ...this.parent?.(),
2087
2109
  color: {
2088
2110
  default: null,
2089
- parseHTML: (e) => Ar(Bt(e.style.color)),
2111
+ parseHTML: (e) => Nr(Vt(e.style.color)),
2090
2112
  renderHTML: (e) => {
2091
- let t = Ar(e.color);
2113
+ let t = Nr(e.color);
2092
2114
  return t ? { style: `color: ${t}` } : {};
2093
2115
  }
2094
2116
  }
@@ -2097,9 +2119,9 @@ function jr(e) {
2097
2119
  }
2098
2120
  //#endregion
2099
2121
  //#region src/composables/useRichTextLinkDialog.ts
2100
- function Mr(e) {
2122
+ function Fr(e) {
2101
2123
  let t = _(!1), n = _(""), r = _(""), i = _(null);
2102
- yr(i, t);
2124
+ Sr(i, t);
2103
2125
  function a() {
2104
2126
  let i = e.value?.getAttributes("link") ?? {};
2105
2127
  n.value = i.href || "", r.value = i.color || "", t.value = !0;
@@ -2108,7 +2130,7 @@ function Mr(e) {
2108
2130
  if (n.value) {
2109
2131
  let t = c(n.value);
2110
2132
  if (t !== null) {
2111
- let n = Ar(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
2133
+ let n = Nr(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
2112
2134
  n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
2113
2135
  }
2114
2136
  }
@@ -2155,10 +2177,10 @@ function Mr(e) {
2155
2177
  }
2156
2178
  //#endregion
2157
2179
  //#region src/composables/useRichTextEditor.ts
2158
- function Nr(e) {
2159
- let t = p(St, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = $t(), { canInsertLogicTag: d, isRequesting: m, requestLogicTag: h } = Er(), g = p(pt, null), v = (a(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", y = ae(l), b = f(null), { showLinkDialog: x, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } = Mr(b), { start: A, stop: j } = qe(() => b.value?.commands.focus("end"), 0, { immediate: !1 }), M = f(null), N = _(!0), P = _(null), F = !1;
2160
- async function ee() {
2161
- P.value = null, N.value = !0;
2180
+ function Ir(e) {
2181
+ let t = p(Ct, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = en(), { canInsertLogicTag: d, isRequesting: m, requestLogicTag: h } = kr(), g = p(mt, null), v = (a(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", y = oe(l), b = f(null), { showLinkDialog: x, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } = Fr(b), { start: A, stop: ee } = Je(() => b.value?.commands.focus("end"), 0, { immediate: !1 }), j = f(null), M = _(!0), N = _(null), P = !1;
2182
+ async function te() {
2183
+ N.value = null, M.value = !0;
2162
2184
  try {
2163
2185
  let { TiptapEditor: r, EC: i, extensions: a } = await e.loadExtensions({
2164
2186
  mergeTags: n,
@@ -2167,8 +2189,8 @@ function Nr(e) {
2167
2189
  autocompleteEnabled: u,
2168
2190
  suggestionEmptyText: v
2169
2191
  });
2170
- if (F) return;
2171
- M.value = i;
2192
+ if (P) return;
2193
+ j.value = i;
2172
2194
  let o = /* @__PURE__ */ new Map();
2173
2195
  a.forEach((e, t) => o.set(e.name, t));
2174
2196
  let s = new r({
@@ -2176,27 +2198,27 @@ function Nr(e) {
2176
2198
  content: e.blockContent(),
2177
2199
  editable: !0,
2178
2200
  onUpdate: ({ editor: n }) => {
2179
- F || t && t.updateBlock(e.blockId(), { content: n.getHTML() });
2201
+ P || t && t.updateBlock(e.blockId(), { content: n.getHTML() });
2180
2202
  }
2181
2203
  });
2182
- if (F) {
2204
+ if (P) {
2183
2205
  s.destroy();
2184
2206
  return;
2185
2207
  }
2186
- b.value = s, N.value = !1, A();
2208
+ b.value = s, M.value = !1, A();
2187
2209
  } catch (t) {
2188
- if (F) return;
2189
- Rt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), P.value = t instanceof Error ? t.message : "Failed to load editor", N.value = !1;
2210
+ if (P) return;
2211
+ zt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), N.value = t instanceof Error ? t.message : "Failed to load editor", M.value = !1;
2190
2212
  }
2191
2213
  }
2192
- function I() {
2193
- b.value?.destroy(), b.value = null, ee();
2214
+ function F() {
2215
+ b.value?.destroy(), b.value = null, te();
2194
2216
  }
2195
- ee();
2196
- let L = s(() => e.blockContent(), (e) => {
2217
+ te();
2218
+ let I = s(() => e.blockContent(), (e) => {
2197
2219
  b.value && b.value.getHTML() !== e && b.value.commands.setContent(e, { emitUpdate: !1 });
2198
2220
  });
2199
- function te(t) {
2221
+ function ne(t) {
2200
2222
  if (o.value || m.value) return;
2201
2223
  let n = t.composedPath(), r = n.find((e) => e instanceof HTMLElement);
2202
2224
  if (!r) return;
@@ -2204,26 +2226,26 @@ function Nr(e) {
2204
2226
  let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
2205
2227
  r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || e.onDone();
2206
2228
  }
2207
- Ye(document, "mousedown", te), i(() => {
2208
- F = !0, L(), j(), b.value?.destroy();
2229
+ Xe(document, "mousedown", ne), i(() => {
2230
+ P = !0, I(), ee(), b.value?.destroy();
2209
2231
  });
2210
- async function ne() {
2232
+ async function re() {
2211
2233
  let e = await c();
2212
- F || (e && b.value ? b.value.chain().focus().insertMergeTag({
2234
+ P || (e && b.value ? b.value.chain().focus().insertMergeTag({
2213
2235
  label: e.label,
2214
2236
  value: e.value
2215
2237
  }).run() : b.value?.commands.focus());
2216
2238
  }
2217
- async function R() {
2239
+ async function L() {
2218
2240
  let e = await h();
2219
- F || (e && b.value ? kr(b.value, e, l) : b.value?.commands.focus());
2241
+ P || (e && b.value ? Mr(b.value, e, l) : b.value?.commands.focus());
2220
2242
  }
2221
2243
  return {
2222
2244
  editor: b,
2223
- EditorContent: M,
2224
- isLoading: N,
2225
- initError: P,
2226
- retry: I,
2245
+ EditorContent: j,
2246
+ isLoading: M,
2247
+ initError: N,
2248
+ retry: F,
2227
2249
  showLinkDialog: x,
2228
2250
  linkUrl: S,
2229
2251
  linkColor: C,
@@ -2239,36 +2261,36 @@ function Nr(e) {
2239
2261
  removeLink: D,
2240
2262
  closeLinkDialog: O,
2241
2263
  handleLinkKeydown: k,
2242
- handleAddMergeTag: ne,
2243
- handleAddLogicTag: R
2264
+ handleAddMergeTag: re,
2265
+ handleAddLogicTag: L
2244
2266
  };
2245
2267
  }
2246
2268
  //#endregion
2247
2269
  //#region src/composables/useSmallScreenNotice.ts
2248
- var Pr = "(max-width: 767px)";
2249
- function Fr(e) {
2250
- let t = Je(Pr);
2270
+ var Lr = "(max-width: 767px)";
2271
+ function Rr(e) {
2272
+ let t = Ye(Lr);
2251
2273
  return {
2252
2274
  isSmallScreen: t,
2253
- showNotice: F(() => (ee(e) ?? !0) && t.value)
2275
+ showNotice: P(() => (te(e) ?? !0) && t.value)
2254
2276
  };
2255
2277
  }
2256
2278
  //#endregion
2257
2279
  //#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
2258
- var Ir = { class: "tpl:w-full" }, Lr = {
2280
+ var zr = { class: "tpl:w-full" }, Br = {
2259
2281
  key: 0,
2260
2282
  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)]"
2261
- }, Rr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, zr = {
2283
+ }, Vr = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Hr = {
2262
2284
  key: 1,
2263
2285
  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)]"
2264
- }, Br = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Vr = {
2286
+ }, Ur = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Wr = {
2265
2287
  key: 2,
2266
2288
  class: "tpl:relative"
2267
- }, Hr = ["innerHTML"], Ur = {
2289
+ }, Gr = ["innerHTML"], Kr = {
2268
2290
  key: 0,
2269
2291
  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]",
2270
2292
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
2271
- }, Wr = /* @__PURE__ */ L({
2293
+ }, qr = /* @__PURE__ */ I({
2272
2294
  __name: "CustomBlock",
2273
2295
  props: {
2274
2296
  block: {},
@@ -2276,19 +2298,19 @@ var Ir = { class: "tpl:w-full" }, Lr = {
2276
2298
  },
2277
2299
  emits: ["fetchData"],
2278
2300
  setup(e, { emit: t }) {
2279
- let r = e, i = t, { t: a } = Lt(), o = p(At, null), c = _(""), l = _(!1), u = F(() => o?.getDefinition(r.block.customType)), d = F(() => !!u.value), { isFetching: f, fetch: m, needsFetch: h, hasDataSource: g } = pn({
2301
+ let r = e, i = t, { t: a } = Rt(), o = p(jt, null), c = _(""), l = _(!1), u = P(() => o?.getDefinition(r.block.customType)), d = P(() => !!u.value), { isFetching: f, fetch: m, needsFetch: h, hasDataSource: g } = gn({
2280
2302
  definition: u,
2281
- block: F(() => r.block),
2303
+ block: P(() => r.block),
2282
2304
  onUpdate: (e, t) => {
2283
2305
  i("fetchData", {
2284
2306
  fieldValues: e,
2285
2307
  dataSourceFetched: t
2286
2308
  });
2287
2309
  }
2288
- }), v = p(dt, []), y = p(ft, null), b = F(() => {
2310
+ }), v = p(ft, []), y = p(pt, null), b = P(() => {
2289
2311
  if (!y?.value) return r.block;
2290
2312
  let e = {};
2291
- for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ? be(n, v) : n;
2313
+ for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ? xe(n, v) : n;
2292
2314
  return {
2293
2315
  ...r.block,
2294
2316
  fieldValues: e
@@ -2305,67 +2327,67 @@ var Ir = { class: "tpl:w-full" }, Lr = {
2305
2327
  }
2306
2328
  }
2307
2329
  }
2308
- let E = We(C, 150);
2330
+ let E = Ge(C, 150);
2309
2331
  return n(() => {
2310
2332
  C();
2311
2333
  }), s(() => r.block.fieldValues, () => {
2312
2334
  E();
2313
2335
  }, { deep: !0 }), s(() => y?.value, () => {
2314
2336
  E();
2315
- }), (e, t) => (O(), S("div", Ir, [d.value ? l.value ? (O(), S("div", zr, [w(P(Jt), {
2337
+ }), (e, t) => (O(), S("div", zr, [d.value ? l.value ? (O(), S("div", Hr, [w(N(Yt), {
2316
2338
  size: 24,
2317
2339
  class: "tpl:text-[var(--tpl-danger)]"
2318
- }), x("span", Br, k(P(a).customBlocks.renderError), 1)])) : (O(), S("div", Vr, [x("div", { innerHTML: c.value }, null, 8, Hr), P(g) && P(h) ? (O(), S("div", Ur, [P(f) ? (O(), A(Xt, {
2340
+ }), x("span", Ur, k(N(a).customBlocks.renderError), 1)])) : (O(), S("div", Wr, [x("div", { innerHTML: c.value }, null, 8, Gr), N(g) && N(h) ? (O(), S("div", Kr, [N(f) ? (O(), A(Zt, {
2319
2341
  key: 1,
2320
2342
  class: "tpl:w-48"
2321
2343
  })) : (O(), S("button", {
2322
2344
  key: 0,
2323
2345
  type: "button",
2324
2346
  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)]",
2325
- onClick: t[0] ||= R((...e) => P(m) && P(m)(...e), ["stop"])
2326
- }, [u.value?.icon ? (O(), A(_r, {
2347
+ onClick: t[0] ||= L((...e) => N(m) && N(m)(...e), ["stop"])
2348
+ }, [u.value?.icon ? (O(), A(br, {
2327
2349
  key: 0,
2328
2350
  icon: u.value.icon,
2329
2351
  size: 16
2330
- }, null, 8, ["icon"])) : I("", !0), T(" " + k(u.value?.dataSource?.label || P(a).customBlocks.dataSource.fetchButton), 1)]))])) : I("", !0)])) : (O(), S("div", Lr, [w(P(dr), {
2352
+ }, null, 8, ["icon"])) : F("", !0), T(" " + k(u.value?.dataSource?.label || N(a).customBlocks.dataSource.fetchButton), 1)]))])) : F("", !0)])) : (O(), S("div", Br, [w(N(mr), {
2331
2353
  size: 24,
2332
2354
  class: "tpl:text-[var(--tpl-warning)]"
2333
- }), x("span", Rr, k(P(a).customBlocks.definitionNotFound), 1)]))]));
2355
+ }), x("span", Vr, k(N(a).customBlocks.definitionNotFound), 1)]))]));
2334
2356
  }
2335
- }), Gr = { class: "tpl:w-full" }, Kr = /* @__PURE__ */ L({
2357
+ }), Jr = { class: "tpl:w-full" }, Yr = /* @__PURE__ */ I({
2336
2358
  __name: "DividerBlock",
2337
2359
  props: {
2338
2360
  block: {},
2339
2361
  viewport: {}
2340
2362
  },
2341
2363
  setup(e) {
2342
- let t = e, n = F(() => ({
2364
+ let t = e, n = P(() => ({
2343
2365
  borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
2344
2366
  width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
2345
2367
  margin: t.block.width === "full" ? "0" : "0 auto"
2346
2368
  }));
2347
- return (e, t) => (O(), S("div", Gr, [x("hr", {
2369
+ return (e, t) => (O(), S("div", Jr, [x("hr", {
2348
2370
  class: "tpl:m-0 tpl:border-none",
2349
2371
  style: u(n.value)
2350
2372
  }, null, 4)]));
2351
2373
  }
2352
- }), qr = { class: "tpl:w-full" }, Jr = ["srcdoc", "title"], Yr = {
2374
+ }), Xr = { class: "tpl:w-full" }, Zr = ["srcdoc", "title"], Qr = {
2353
2375
  key: 1,
2354
2376
  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)]"
2355
- }, Xr = {
2377
+ }, $r = {
2356
2378
  key: 0,
2357
2379
  class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
2358
- }, Zr = {
2380
+ }, ei = {
2359
2381
  key: 1,
2360
2382
  class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
2361
- }, Qr = /* @__PURE__ */ L({
2383
+ }, ti = /* @__PURE__ */ I({
2362
2384
  __name: "HtmlBlock",
2363
2385
  props: {
2364
2386
  block: {},
2365
2387
  viewport: {}
2366
2388
  },
2367
2389
  setup(e) {
2368
- let t = e, { t: n } = Lt(), r = p(Ft, !1), a = F(() => t.block.content.trim().length > 0), o = F(() => r && a.value), c = p(dt, []), l = p(ft, null), d = F(() => l?.value ? be(t.block.content, c) : t.block.content), f = _(null), m = _(60), h = null;
2390
+ let t = e, { t: n } = Rt(), r = p(It, !1), a = P(() => t.block.content.trim().length > 0), o = P(() => r && a.value), c = p(ft, []), l = p(pt, null), d = P(() => l?.value ? xe(t.block.content, c) : t.block.content), f = _(null), m = _(60), h = null;
2369
2391
  function g() {
2370
2392
  let e = f.value?.contentDocument;
2371
2393
  e && (m.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
@@ -2379,46 +2401,46 @@ var Ir = { class: "tpl:w-full" }, Lr = {
2379
2401
  e || (h?.disconnect(), h = null);
2380
2402
  }), i(() => {
2381
2403
  h?.disconnect(), h = null;
2382
- }), (e, t) => (O(), S("div", qr, [o.value ? (O(), S("iframe", {
2404
+ }), (e, t) => (O(), S("div", Xr, [o.value ? (O(), S("iframe", {
2383
2405
  key: 0,
2384
2406
  ref_key: "iframeRef",
2385
2407
  ref: f,
2386
2408
  srcdoc: d.value,
2387
2409
  sandbox: "allow-same-origin",
2388
- title: P(n).html.preview,
2410
+ title: N(n).html.preview,
2389
2411
  class: "tpl:block tpl:w-full tpl:border-0",
2390
2412
  style: u({ height: `${m.value}px` }),
2391
2413
  onLoad: v
2392
- }, null, 44, Jr)) : (O(), S("div", Yr, [w(P(ir), {
2414
+ }, null, 44, Zr)) : (O(), S("div", Qr, [w(N(sr), {
2393
2415
  size: 24,
2394
2416
  class: "tpl:text-[var(--tpl-text-dim)]"
2395
- }), a.value ? (O(), S("span", Xr, k(P(n).html.preview), 1)) : (O(), S("span", Zr, k(P(n).html.empty), 1))]))]));
2417
+ }), a.value ? (O(), S("span", $r, k(N(n).html.preview), 1)) : (O(), S("span", ei, k(N(n).html.empty), 1))]))]));
2396
2418
  }
2397
- }), $r = "image/";
2398
- function ei(e) {
2399
- let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || ee(r), { isOverDropZone: a } = Xe(t, {
2419
+ }), ni = "image/";
2420
+ function ri(e) {
2421
+ let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || te(r), { isOverDropZone: a } = Ze(t, {
2400
2422
  preventDefaultForUnhandled: !0,
2401
2423
  onDrop: (e) => {
2402
2424
  if (!i()) return;
2403
- let t = (e ?? []).filter((e) => e.type.startsWith($r));
2425
+ let t = (e ?? []).filter((e) => e.type.startsWith(ni));
2404
2426
  t.length > 0 && n([t[0]]);
2405
2427
  }
2406
2428
  });
2407
- return { isOver: F(() => i() && a.value) };
2429
+ return { isOver: P(() => i() && a.value) };
2408
2430
  }
2409
2431
  //#endregion
2410
2432
  //#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
2411
- var ti = {
2433
+ var ii = {
2412
2434
  key: 0,
2413
2435
  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)]",
2414
2436
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
2415
- }, ni = ["href"], ri = ["src", "alt"], ii = ["src", "alt"], ai = {
2437
+ }, ai = ["href"], oi = ["src", "alt"], si = ["src", "alt"], ci = {
2416
2438
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
2417
2439
  style: { opacity: "0.7" }
2418
- }, oi = ["href"], si = ["src", "alt"], ci = ["src", "alt"], li = {
2440
+ }, li = ["href"], ui = ["src", "alt"], di = ["src", "alt"], fi = {
2419
2441
  key: 4,
2420
2442
  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)]"
2421
- }, ui = ["aria-label"], di = { key: 1 }, fi = /* @__PURE__ */ L({
2443
+ }, pi = ["aria-label"], mi = { key: 1 }, hi = /* @__PURE__ */ I({
2422
2444
  __name: "ImageBlock",
2423
2445
  props: {
2424
2446
  block: {},
@@ -2426,7 +2448,7 @@ var ti = {
2426
2448
  },
2427
2449
  emits: ["update"],
2428
2450
  setup(e, { emit: t }) {
2429
- let n = e, r = t, { t: i } = Lt(), { syntax: a } = $t(), o = p(Ct, null), s = F(() => !!o), c = en();
2451
+ let n = e, r = t, { t: i } = Rt(), { syntax: a } = en(), o = p(wt, null), s = P(() => !!o), c = tn();
2430
2452
  async function l() {
2431
2453
  let e = await o?.({ accept: ["images"] });
2432
2454
  if (c.alive && e) {
@@ -2434,7 +2456,7 @@ var ti = {
2434
2456
  e.alt && (t.alt = e.alt), r("update", t);
2435
2457
  }
2436
2458
  }
2437
- let d = _(), f = _(!1), m = F(() => s.value && !f.value && !b.value);
2459
+ let d = _(), f = _(!1), m = P(() => s.value && !f.value && !b.value);
2438
2460
  async function h(e) {
2439
2461
  if (o) {
2440
2462
  f.value = !0;
@@ -2453,11 +2475,11 @@ var ti = {
2453
2475
  }
2454
2476
  }
2455
2477
  }
2456
- let { isOver: g } = ei({
2478
+ let { isOver: g } = ri({
2457
2479
  target: d,
2458
2480
  enabled: m,
2459
2481
  onFiles: h
2460
- }), v = F(() => ({ textAlign: n.block.align })), y = F(() => {
2482
+ }), v = P(() => ({ textAlign: n.block.align })), y = P(() => {
2461
2483
  let e = n.block.align;
2462
2484
  return {
2463
2485
  maxWidth: "100%",
@@ -2467,86 +2489,86 @@ var ti = {
2467
2489
  marginLeft: e === "center" || e === "right" ? "auto" : void 0,
2468
2490
  marginRight: e === "center" ? "auto" : void 0
2469
2491
  };
2470
- }), b = F(() => we(n.block.src, a)), C = On(() => b.value ? void 0 : n.block.src), E = On(() => b.value ? n.block.placeholderUrl : void 0);
2492
+ }), b = P(() => Te(n.block.src, a)), C = jn(() => b.value ? void 0 : n.block.src), E = jn(() => b.value ? n.block.placeholderUrl : void 0);
2471
2493
  return (t, n) => (O(), S("div", {
2472
2494
  ref_key: "dropZoneRef",
2473
2495
  ref: d,
2474
2496
  "data-testid": "image-drop-zone",
2475
2497
  class: "tpl:relative tpl:w-full",
2476
2498
  style: u(v.value)
2477
- }, [m.value && (P(g) || f.value) ? (O(), S("div", ti, [f.value ? (O(), S(N, { key: 0 }, [w(P(Gt), {
2499
+ }, [m.value && (N(g) || f.value) ? (O(), S("div", ii, [f.value ? (O(), S(M, { key: 0 }, [w(N(Kt), {
2478
2500
  class: "tpl-spinner",
2479
2501
  size: 20,
2480
2502
  "stroke-width": 2
2481
- }), T(" " + k(P(i).image.uploading), 1)], 64)) : (O(), S(N, { key: 1 }, [w(P(Yt), {
2503
+ }), T(" " + k(N(i).image.uploading), 1)], 64)) : (O(), S(M, { key: 1 }, [w(N(Xt), {
2482
2504
  size: 20,
2483
2505
  "stroke-width": 1.5
2484
- }), T(" " + k(P(i).image.dropToUpload), 1)], 64))])) : I("", !0), e.block.src && b.value && e.block.placeholderUrl ? (O(), S(N, { key: 1 }, [e.block.linkUrl ? (O(), S("a", {
2506
+ }), T(" " + k(N(i).image.dropToUpload), 1)], 64))])) : F("", !0), e.block.src && b.value && e.block.placeholderUrl ? (O(), S(M, { key: 1 }, [e.block.linkUrl ? (O(), S("a", {
2485
2507
  key: 0,
2486
2508
  href: e.block.linkUrl,
2487
2509
  target: "_blank",
2488
2510
  rel: "noopener noreferrer",
2489
- onClick: n[0] ||= R(() => {}, ["prevent"])
2511
+ onClick: n[0] ||= L(() => {}, ["prevent"])
2490
2512
  }, [x("img", {
2491
2513
  class: "tpl:border-0",
2492
2514
  loading: "lazy",
2493
- src: P(E),
2494
- alt: e.block.alt || P(i).image.altTextPlaceholder,
2515
+ src: N(E),
2516
+ alt: e.block.alt || N(i).image.altTextPlaceholder,
2495
2517
  style: u(y.value)
2496
- }, null, 12, ri)], 8, ni)) : (O(), S("img", {
2518
+ }, null, 12, oi)], 8, ai)) : (O(), S("img", {
2497
2519
  key: 1,
2498
2520
  class: "tpl:border-0",
2499
- src: P(E),
2521
+ src: N(E),
2500
2522
  alt: e.block.alt,
2501
2523
  style: u(y.value)
2502
- }, null, 12, ii))], 64)) : e.block.src && b.value ? (O(), S("div", {
2524
+ }, null, 12, si))], 64)) : e.block.src && b.value ? (O(), S("div", {
2503
2525
  key: 2,
2504
2526
  class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
2505
2527
  style: u([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, y.value])
2506
- }, [w(P(lr), {
2528
+ }, [w(N(fr), {
2507
2529
  size: 32,
2508
2530
  "stroke-width": 1.5,
2509
2531
  class: "tpl:text-[var(--tpl-primary)]",
2510
2532
  style: { opacity: "0.5" }
2511
- }), x("span", ai, [w($n, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (O(), S(N, { key: 3 }, [e.block.linkUrl ? (O(), S("a", {
2533
+ }), x("span", ci, [w(nr, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (O(), S(M, { key: 3 }, [e.block.linkUrl ? (O(), S("a", {
2512
2534
  key: 0,
2513
2535
  href: e.block.linkUrl,
2514
2536
  target: "_blank",
2515
2537
  rel: "noopener noreferrer",
2516
- onClick: n[1] ||= R(() => {}, ["prevent"])
2538
+ onClick: n[1] ||= L(() => {}, ["prevent"])
2517
2539
  }, [x("img", {
2518
2540
  class: "tpl:border-0",
2519
2541
  loading: "lazy",
2520
- src: P(C),
2521
- alt: e.block.alt || P(i).image.altTextPlaceholder,
2542
+ src: N(C),
2543
+ alt: e.block.alt || N(i).image.altTextPlaceholder,
2522
2544
  style: u(y.value)
2523
- }, null, 12, si)], 8, oi)) : (O(), S("img", {
2545
+ }, null, 12, ui)], 8, li)) : (O(), S("img", {
2524
2546
  key: 1,
2525
2547
  class: "tpl:border-0",
2526
- src: P(C),
2548
+ src: N(C),
2527
2549
  alt: e.block.alt,
2528
2550
  style: u(y.value)
2529
- }, null, 12, ci))], 64)) : (O(), S("div", li, [s.value ? (O(), S("button", {
2551
+ }, null, 12, di))], 64)) : (O(), S("div", fi, [s.value ? (O(), S("button", {
2530
2552
  key: 0,
2531
- "aria-label": P(i).image.browseMedia,
2553
+ "aria-label": N(i).image.browseMedia,
2532
2554
  class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
2533
- onClick: R(l, ["stop"])
2534
- }, [w(P(lr), {
2555
+ onClick: L(l, ["stop"])
2556
+ }, [w(N(fr), {
2535
2557
  size: 14,
2536
2558
  "stroke-width": 1.5
2537
- }), T(" " + k(P(i).image.browseMedia), 1)], 8, ui)) : (O(), S("span", di, k(P(i).image.clickToAdd), 1))]))], 4));
2559
+ }), T(" " + k(N(i).image.browseMedia), 1)], 8, pi)) : (O(), S("span", mi, k(N(i).image.clickToAdd), 1))]))], 4));
2538
2560
  }
2539
- }), pi = { class: "tpl:w-full" }, mi = ["href"], hi = {
2561
+ }), gi = { class: "tpl:w-full" }, _i = ["href"], vi = {
2540
2562
  key: 1,
2541
2563
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
2542
- }, gi = /* @__PURE__ */ L({
2564
+ }, yi = /* @__PURE__ */ I({
2543
2565
  __name: "MenuBlock",
2544
2566
  props: {
2545
2567
  block: {},
2546
2568
  viewport: {}
2547
2569
  },
2548
2570
  setup(e) {
2549
- let t = e, { t: n } = Lt(), r = F(() => ({
2571
+ let t = e, { t: n } = Rt(), r = P(() => ({
2550
2572
  display: "flex",
2551
2573
  flexWrap: "wrap",
2552
2574
  gap: `0 ${t.block.spacing}px`,
@@ -2554,14 +2576,14 @@ var ti = {
2554
2576
  fontSize: `${t.block.fontSize}px`,
2555
2577
  fontFamily: t.block.fontFamily || "inherit",
2556
2578
  alignItems: "center"
2557
- })), i = F(() => t.block.items.length > 0);
2579
+ })), i = P(() => t.block.items.length > 0);
2558
2580
  function a(e) {
2559
2581
  return e || t.block.linkColor || t.block.color;
2560
2582
  }
2561
- return (t, o) => (O(), S("div", pi, [i.value ? (O(), S("div", {
2583
+ return (t, o) => (O(), S("div", gi, [i.value ? (O(), S("div", {
2562
2584
  key: 0,
2563
2585
  style: u(r.value)
2564
- }, [(O(!0), S(N, null, D(e.block.items, (t, n) => (O(), S(N, { key: t.id }, [x("a", {
2586
+ }, [(O(!0), S(M, null, D(e.block.items, (t, n) => (O(), S(M, { key: t.id }, [x("a", {
2565
2587
  href: t.url || "#",
2566
2588
  class: "tpl:cursor-default tpl:no-underline",
2567
2589
  style: u({
@@ -2569,16 +2591,16 @@ var ti = {
2569
2591
  fontWeight: t.bold ? "bold" : "normal",
2570
2592
  textDecoration: t.underline ? "underline" : "none"
2571
2593
  }),
2572
- onClick: o[0] ||= R(() => {}, ["prevent"])
2573
- }, [w($n, { text: t.text || "..." }, null, 8, ["text"])], 12, mi), n < e.block.items.length - 1 ? (O(), S("span", {
2594
+ onClick: o[0] ||= L(() => {}, ["prevent"])
2595
+ }, [w(nr, { text: t.text || "..." }, null, 8, ["text"])], 12, _i), n < e.block.items.length - 1 ? (O(), S("span", {
2574
2596
  key: 0,
2575
2597
  style: u({
2576
2598
  color: e.block.separatorColor,
2577
2599
  padding: `0 ${e.block.spacing}px`
2578
2600
  })
2579
- }, k(e.block.separator), 5)) : I("", !0)], 64))), 128))], 4)) : (O(), S("div", hi, [w(P(ur), { size: 16 }), x("span", null, k(P(n).menu.addLinks), 1)]))]));
2601
+ }, k(e.block.separator), 5)) : F("", !0)], 64))), 128))], 4)) : (O(), S("div", vi, [w(N(pr), { size: 16 }), x("span", null, k(N(n).menu.addLinks), 1)]))]));
2580
2602
  }
2581
- }), _i = /* @__PURE__ */ new Set([
2603
+ }), bi = /* @__PURE__ */ new Set([
2582
2604
  "http",
2583
2605
  "https",
2584
2606
  "mailto",
@@ -2588,7 +2610,7 @@ var ti = {
2588
2610
  "sms",
2589
2611
  "xmpp",
2590
2612
  "cid"
2591
- ]), vi = /* @__PURE__ */ new Set([
2613
+ ]), xi = /* @__PURE__ */ new Set([
2592
2614
  "SCRIPT",
2593
2615
  "STYLE",
2594
2616
  "IFRAME",
@@ -2598,7 +2620,7 @@ var ti = {
2598
2620
  "META",
2599
2621
  "BASE",
2600
2622
  "FORM"
2601
- ]), yi = /* @__PURE__ */ new Set([
2623
+ ]), Si = /* @__PURE__ */ new Set([
2602
2624
  "href",
2603
2625
  "xlink:href",
2604
2626
  "formaction",
@@ -2607,16 +2629,16 @@ var ti = {
2607
2629
  "background",
2608
2630
  "poster"
2609
2631
  ]);
2610
- function bi(e, t) {
2632
+ function Ci(e, t) {
2611
2633
  let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
2612
2634
  if (!n || n.startsWith("#")) return !0;
2613
2635
  let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
2614
2636
  if (!r) return !0;
2615
2637
  let i = r[1].toLowerCase();
2616
- return _i.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
2638
+ return bi.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
2617
2639
  }
2618
- function xi(e) {
2619
- if (vi.has(e.tagName)) {
2640
+ function wi(e) {
2641
+ if (xi.has(e.tagName)) {
2620
2642
  e.remove();
2621
2643
  return;
2622
2644
  }
@@ -2628,29 +2650,29 @@ function xi(e) {
2628
2650
  e.removeAttribute(n);
2629
2651
  continue;
2630
2652
  }
2631
- if (yi.has(t)) {
2632
- bi(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
2653
+ if (Si.has(t)) {
2654
+ Ci(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
2633
2655
  continue;
2634
2656
  }
2635
2657
  if (t === "src") {
2636
- bi(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
2658
+ Ci(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
2637
2659
  continue;
2638
2660
  }
2639
2661
  t === "srcdoc" && e.removeAttribute(n);
2640
2662
  }
2641
2663
  let n = Array.from(e.children);
2642
- for (let e of n) xi(e);
2664
+ for (let e of n) wi(e);
2643
2665
  }
2644
- function Si(e) {
2666
+ function Ti(e) {
2645
2667
  if (typeof DOMParser > "u") return e;
2646
2668
  let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
2647
- for (let e of n) xi(e);
2669
+ for (let e of n) wi(e);
2648
2670
  return t.innerHTML;
2649
2671
  }
2650
2672
  //#endregion
2651
2673
  //#region src/composables/useEditableTextBlock.ts
2652
- function Ci(e) {
2653
- let t = p(dt, []), n = p(ft, null), { syntax: r } = $t(), i = F(() => n?.value ? oe(e(), t) : fe(e(), t)), a = F(() => Si(de(i.value, r))), o = _(!1), s = _(null), { top: c, left: l } = Ze(s), { toLocal: u } = Ut(), d = F(() => u({
2674
+ function Ei(e) {
2675
+ let t = p(ft, []), n = p(pt, null), { syntax: r } = en(), i = P(() => n?.value ? se(e(), t) : pe(e(), t)), a = P(() => Ti(fe(i.value, r))), o = _(!1), s = _(null), { top: c, left: l } = Qe(s), { toLocal: u } = Wt(), d = P(() => u({
2654
2676
  top: c.value - 8,
2655
2677
  left: l.value
2656
2678
  }));
@@ -2671,24 +2693,24 @@ function Ci(e) {
2671
2693
  }
2672
2694
  //#endregion
2673
2695
  //#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
2674
- var wi = ["innerHTML"], Ti = /* @__PURE__ */ L({
2696
+ var Di = ["innerHTML"], Oi = /* @__PURE__ */ I({
2675
2697
  __name: "ParagraphBlock",
2676
2698
  props: {
2677
2699
  block: {},
2678
2700
  viewport: {}
2679
2701
  },
2680
2702
  setup(e) {
2681
- let t = e, n = y(() => import("./ParagraphEditor-CGxsm0Mx.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Ci(() => t.block.content);
2703
+ let t = e, n = y(() => import("./ParagraphEditor-gbp5gbFv.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Ei(() => t.block.content);
2682
2704
  return (t, l) => (O(), S("div", {
2683
2705
  ref_key: "blockRef",
2684
2706
  ref: i,
2685
2707
  class: "tpl:min-h-[1em] tpl:w-full",
2686
- onDblclick: l[0] ||= (...e) => P(s) && P(s)(...e)
2687
- }, [P(r) ? (O(), A(P(n), {
2708
+ onDblclick: l[0] ||= (...e) => N(s) && N(s)(...e)
2709
+ }, [N(r) ? (O(), A(N(n), {
2688
2710
  key: 0,
2689
2711
  block: e.block,
2690
- "toolbar-position": P(a),
2691
- onDone: P(c)
2712
+ "toolbar-position": N(a),
2713
+ onDone: N(c)
2692
2714
  }, null, 8, [
2693
2715
  "block",
2694
2716
  "toolbar-position",
@@ -2696,55 +2718,55 @@ var wi = ["innerHTML"], Ti = /* @__PURE__ */ L({
2696
2718
  ])) : (O(), S("div", {
2697
2719
  key: 1,
2698
2720
  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",
2699
- innerHTML: P(o)
2700
- }, null, 8, wi))], 544));
2721
+ innerHTML: N(o)
2722
+ }, null, 8, Di))], 544));
2701
2723
  }
2702
2724
  });
2703
2725
  //#endregion
2704
2726
  //#region src/utils/blockComponentResolver.ts
2705
- function Ei(e) {
2727
+ function ki(e) {
2706
2728
  let t = { fontFamily: e.fontFamily };
2707
2729
  return e.textColor && (t.color = e.textColor), e.linkColor && (t["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (t["--tpl-doc-link-underline"] = "underline"), t;
2708
2730
  }
2709
- function Di(e, t, n) {
2731
+ function Ai(e, t, n) {
2710
2732
  if (t) {
2711
2733
  let n = t.getComponent(e);
2712
2734
  if (n) return n;
2713
2735
  }
2714
2736
  return n[e.type] ?? null;
2715
2737
  }
2716
- function Oi(e) {
2738
+ function ji(e) {
2717
2739
  let { padding: t, backgroundColor: n } = e.styles, r = {
2718
2740
  padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
2719
2741
  backgroundColor: n || "transparent"
2720
2742
  };
2721
2743
  return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
2722
2744
  }
2723
- function ki(e) {
2745
+ function Mi(e) {
2724
2746
  if (e.type !== "section" || !e.wrapper) return null;
2725
2747
  let t = e.wrapper, n = {};
2726
2748
  return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
2727
2749
  }
2728
2750
  //#endregion
2729
2751
  //#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
2730
- var Ai = [
2752
+ var Ni = [
2731
2753
  "data-block-id",
2732
2754
  "data-block-type",
2733
2755
  "data-tpl-picked"
2734
- ], ji = ["aria-label"], Mi = [
2756
+ ], Pi = ["aria-label"], Fi = [
2735
2757
  "aria-label",
2736
2758
  "aria-pressed",
2737
2759
  "title"
2738
- ], Ni = ["aria-label", "title"], Pi = ["aria-label", "title"], Fi = ["aria-label", "title"], Ii = {
2760
+ ], Ii = ["aria-label", "title"], Li = ["aria-label", "title"], Ri = ["aria-label", "title"], zi = {
2739
2761
  key: 1,
2740
2762
  class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
2741
- }, Li = { 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)]" }, Ri = {
2763
+ }, Bi = { 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)]" }, Vi = {
2742
2764
  key: 2,
2743
2765
  class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
2744
- }, zi = ["aria-label", "title"], Bi = {
2766
+ }, Hi = ["aria-label", "title"], Ui = {
2745
2767
  key: 3,
2746
2768
  class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
2747
- }, Vi = ["aria-label"], Hi = /*#__PURE__*/ Zt(/* @__PURE__ */ L({
2769
+ }, Wi = ["aria-label"], Gi = /*#__PURE__*/ Qt(/* @__PURE__ */ I({
2748
2770
  __name: "BlockWrapper",
2749
2771
  props: {
2750
2772
  block: {},
@@ -2756,7 +2778,7 @@ var Ai = [
2756
2778
  },
2757
2779
  emits: ["select"],
2758
2780
  setup(e, { emit: t }) {
2759
- let n = y(() => import("./BlockIssueBadge-CavnyR3o.js")), i = e, a = t, { t: o, format: s } = Lt(), l = p(Pt, null), d = _(null), f = F(() => l?.liftedBlockId.value === i.block.id), h = F(() => f.value ? s(o.blockActions.dragLifted, { block: i.block.type }) : o.blockActions.drag);
2781
+ let n = y(() => import("./BlockIssueBadge-Dhk7Hv4m.js")), i = e, a = t, { t: o, format: s } = Rt(), l = p(Ft, null), d = _(null), f = P(() => l?.liftedBlockId.value === i.block.id), h = P(() => f.value ? s(o.blockActions.dragLifted, { block: i.block.type }) : o.blockActions.drag);
2760
2782
  async function g() {
2761
2783
  await m(), d.value?.focus();
2762
2784
  }
@@ -2779,32 +2801,32 @@ var Ai = [
2779
2801
  }
2780
2802
  }
2781
2803
  }
2782
- let b = F(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), C = F(() => i.previewMode === !0 && b.value), E = F(() => i.viewport ? {
2804
+ let b = P(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), C = P(() => i.previewMode === !0 && b.value), E = P(() => i.viewport ? {
2783
2805
  desktop: o.viewport.desktop,
2784
2806
  mobile: o.viewport.mobile
2785
- }[i.viewport] ?? i.viewport : ""), D = F(() => !!i.block.displayCondition), A = p(gt, null), j = p(yt, null), M = p(vt, {}), N = F(() => M.savedBlocks?.isPicking.value === !0), ee = F(() => !i.nested && M.savedBlocks?.isAvailable.value === !0 && M.savedBlocks?.canCreate.value === !0), L = F(() => i.isSelected && !N.value), te = F(() => M.comments?.getBlockCount(i.block.id) ?? 0), ne = F(() => {
2786
- let e = Oi(i.block), t = {
2807
+ }[i.viewport] ?? i.viewport : ""), D = P(() => !!i.block.displayCondition), A = p(_t, null), ee = p(bt, null), j = p(yt, {}), M = P(() => j.savedBlocks?.isPicking.value === !0), te = P(() => !i.nested && j.savedBlocks?.isAvailable.value === !0 && j.savedBlocks?.canCreate.value === !0), I = P(() => i.isSelected && !M.value), ne = P(() => j.comments?.getBlockCount(i.block.id) ?? 0), re = P(() => {
2808
+ let e = ji(i.block), t = {
2787
2809
  padding: e.padding,
2788
2810
  backgroundColor: e.backgroundColor
2789
2811
  };
2790
2812
  return e.borderRadius && (t.borderRadius = e.borderRadius), t;
2791
- }), re = F(() => ki(i.block));
2792
- function ie(e) {
2813
+ }), ie = P(() => Mi(i.block));
2814
+ function ae(e) {
2793
2815
  i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), a("select"));
2794
2816
  }
2795
- function ae() {
2796
- A?.deleteBlock(i.block.id);
2797
- }
2798
2817
  function oe() {
2799
- A?.duplicateBlock(i.block);
2818
+ A?.deleteBlock(i.block.id);
2800
2819
  }
2801
2820
  function se() {
2802
- M.savedBlocks?.startPicking(i.block.id);
2821
+ A?.duplicateBlock(i.block);
2803
2822
  }
2804
2823
  function ce() {
2805
- j?.toggleBlock(i.block.id);
2824
+ j.savedBlocks?.startPicking(i.block.id);
2825
+ }
2826
+ function le() {
2827
+ ee?.toggleBlock(i.block.id);
2806
2828
  }
2807
- return (t, i) => C.value ? I("", !0) : (O(), S("div", {
2829
+ return (t, i) => C.value ? F("", !0) : (O(), S("div", {
2808
2830
  key: 0,
2809
2831
  class: r(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
2810
2832
  "tpl-block--selected": e.isSelected,
@@ -2815,13 +2837,13 @@ var Ai = [
2815
2837
  "data-block-id": e.block.id,
2816
2838
  "data-block-type": e.block.type,
2817
2839
  "data-tpl-picked": e.picked || void 0,
2818
- onClick: ie
2840
+ onClick: ae
2819
2841
  }, [
2820
- w(P(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
2821
- L.value ? (O(), S("div", {
2842
+ w(N(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
2843
+ I.value ? (O(), S("div", {
2822
2844
  key: 0,
2823
2845
  role: "toolbar",
2824
- "aria-label": P(o).blockActions.drag,
2846
+ "aria-label": N(o).blockActions.drag,
2825
2847
  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)]"
2826
2848
  }, [
2827
2849
  x("button", {
@@ -2831,111 +2853,111 @@ var Ai = [
2831
2853
  "aria-label": h.value,
2832
2854
  "aria-pressed": f.value,
2833
2855
  "aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
2834
- title: P(o).blockActions.drag,
2856
+ title: N(o).blockActions.drag,
2835
2857
  onKeydown: v
2836
- }, [w(P(cr), {
2858
+ }, [w(N(dr), {
2837
2859
  size: 14,
2838
2860
  "stroke-width": 1.5
2839
- })], 40, Mi),
2861
+ })], 40, Fi),
2840
2862
  x("button", {
2841
2863
  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",
2842
- "aria-label": P(o).blockActions.duplicate,
2843
- title: P(o).blockActions.duplicate,
2844
- onClick: R(oe, ["stop"])
2845
- }, [w(P(ar), {
2864
+ "aria-label": N(o).blockActions.duplicate,
2865
+ title: N(o).blockActions.duplicate,
2866
+ onClick: L(se, ["stop"])
2867
+ }, [w(N(cr), {
2846
2868
  size: 14,
2847
2869
  "stroke-width": 1.5
2848
- })], 8, Ni),
2849
- ee.value ? (O(), S("button", {
2870
+ })], 8, Ii),
2871
+ te.value ? (O(), S("button", {
2850
2872
  key: 0,
2851
2873
  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",
2852
- "aria-label": P(o).blockActions.saveAsBlock,
2853
- title: P(o).blockActions.saveAsBlock,
2854
- onClick: R(se, ["stop"])
2855
- }, [w(P(nr), {
2874
+ "aria-label": N(o).blockActions.saveAsBlock,
2875
+ title: N(o).blockActions.saveAsBlock,
2876
+ onClick: L(ce, ["stop"])
2877
+ }, [w(N(ar), {
2856
2878
  size: 14,
2857
2879
  "stroke-width": 1.5
2858
- })], 8, Pi)) : I("", !0),
2880
+ })], 8, Li)) : F("", !0),
2859
2881
  x("button", {
2860
2882
  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",
2861
- "aria-label": P(o).blockActions.delete,
2862
- title: P(o).blockActions.delete,
2863
- onClick: R(ae, ["stop"])
2864
- }, [w(P(qt), {
2883
+ "aria-label": N(o).blockActions.delete,
2884
+ title: N(o).blockActions.delete,
2885
+ onClick: L(oe, ["stop"])
2886
+ }, [w(N(Jt), {
2865
2887
  size: 14,
2866
2888
  "stroke-width": 1.5
2867
- })], 8, Fi)
2868
- ], 8, ji)) : I("", !0),
2869
- b.value ? (O(), S("div", Ii, [x("span", Li, [w(P(or), {
2889
+ })], 8, Ri)
2890
+ ], 8, Pi)) : F("", !0),
2891
+ b.value ? (O(), S("div", zi, [x("span", Bi, [w(N(lr), {
2870
2892
  size: 12,
2871
2893
  "stroke-width": 1.5
2872
- }), T(" " + k(P(s)(P(o).blockActions.hiddenOnViewport, { viewport: E.value })), 1)])])) : I("", !0),
2873
- D.value && !b.value ? (O(), S("div", Ri, [x("button", {
2894
+ }), T(" " + k(N(s)(N(o).blockActions.hiddenOnViewport, { viewport: E.value })), 1)])])) : F("", !0),
2895
+ D.value && !b.value ? (O(), S("div", Vi, [x("button", {
2874
2896
  "data-testid": "condition-toggle",
2875
2897
  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)]",
2876
- "aria-label": P(o).blockActions.conditionToggle,
2898
+ "aria-label": N(o).blockActions.conditionToggle,
2877
2899
  title: e.block.displayCondition?.label,
2878
- onClick: R(ce, ["stop"])
2879
- }, [w(P(sr), {
2900
+ onClick: L(le, ["stop"])
2901
+ }, [w(N(ur), {
2880
2902
  size: 12,
2881
2903
  "stroke-width": 2
2882
- })], 8, zi)])) : I("", !0),
2883
- te.value > 0 && !b.value ? (O(), S("div", Bi, [x("button", {
2904
+ })], 8, Hi)])) : F("", !0),
2905
+ ne.value > 0 && !b.value ? (O(), S("div", Ui, [x("button", {
2884
2906
  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)]",
2885
- "aria-label": P(s)(P(o).blockActions.comments, { count: String(te.value) }),
2886
- onClick: i[0] ||= R((t) => P(M).comments?.openForBlock(e.block.id), ["stop"])
2887
- }, [w(P(Kt), {
2907
+ "aria-label": N(s)(N(o).blockActions.comments, { count: String(ne.value) }),
2908
+ onClick: i[0] ||= L((t) => N(j).comments?.openForBlock(e.block.id), ["stop"])
2909
+ }, [w(N(qt), {
2888
2910
  size: 12,
2889
2911
  "stroke-width": 2.5
2890
- }), T(" " + k(te.value), 1)], 8, Vi)])) : I("", !0),
2891
- re.value ? (O(), S("div", {
2912
+ }), T(" " + k(ne.value), 1)], 8, Wi)])) : F("", !0),
2913
+ ie.value ? (O(), S("div", {
2892
2914
  key: 4,
2893
2915
  class: "tpl-section-wrapper",
2894
- style: u(re.value)
2916
+ style: u(ie.value)
2895
2917
  }, [x("div", {
2896
2918
  class: "tpl-block-content",
2897
- style: u(ne.value)
2919
+ style: u(re.value)
2898
2920
  }, [c(t.$slots, "default", {}, void 0, !0)], 4)], 4)) : (O(), S("div", {
2899
2921
  key: 5,
2900
2922
  class: "tpl-block-content",
2901
- style: u(ne.value)
2923
+ style: u(re.value)
2902
2924
  }, [c(t.$slots, "default", {}, void 0, !0)], 4))
2903
- ], 10, Ai));
2925
+ ], 10, Ni));
2904
2926
  }
2905
2927
  }), [["__scopeId", "data-v-096f1d37"]]);
2906
2928
  //#endregion
2907
2929
  //#region src/utils/unwrapParagraph.ts
2908
- function Ui(e) {
2930
+ function Ki(e) {
2909
2931
  let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
2910
2932
  return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
2911
2933
  }
2912
2934
  //#endregion
2913
2935
  //#region src/components/blocks/TitleBlock.vue
2914
- var Wi = /* @__PURE__ */ L({
2936
+ var qi = /* @__PURE__ */ I({
2915
2937
  __name: "TitleBlock",
2916
2938
  props: {
2917
2939
  block: {},
2918
2940
  viewport: {}
2919
2941
  },
2920
2942
  setup(e) {
2921
- let t = e, n = y(() => import("./TitleEditor-BfWPus_C.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Ci(() => t.block.content), l = F(() => {
2943
+ let t = e, n = y(() => import("./TitleEditor-DMAeSWx3.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Ei(() => t.block.content), l = P(() => {
2922
2944
  let e = {
2923
- fontSize: `${Ie[t.block.level]}px`,
2945
+ fontSize: `${Le[t.block.level]}px`,
2924
2946
  textAlign: t.block.textAlign
2925
2947
  };
2926
2948
  return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
2927
- }), f = F(() => `h${t.block.level}`), p = F(() => Ui(o.value));
2949
+ }), f = P(() => `h${t.block.level}`), p = P(() => Ki(o.value));
2928
2950
  return (t, o) => (O(), S("div", {
2929
2951
  ref_key: "blockRef",
2930
2952
  ref: i,
2931
2953
  class: "tpl:min-h-[1em] tpl:w-full",
2932
2954
  style: u(l.value),
2933
- onDblclick: o[0] ||= (...e) => P(s) && P(s)(...e)
2934
- }, [P(r) ? (O(), A(P(n), {
2955
+ onDblclick: o[0] ||= (...e) => N(s) && N(s)(...e)
2956
+ }, [N(r) ? (O(), A(N(n), {
2935
2957
  key: 0,
2936
2958
  block: e.block,
2937
- "toolbar-position": P(a),
2938
- onDone: P(c)
2959
+ "toolbar-position": N(a),
2960
+ onDone: N(c)
2939
2961
  }, null, 8, [
2940
2962
  "block",
2941
2963
  "toolbar-position",
@@ -2950,88 +2972,88 @@ var Wi = /* @__PURE__ */ L({
2950
2972
  });
2951
2973
  //#endregion
2952
2974
  //#region src/utils/sectionColumnDrop.ts
2953
- function Gi(e) {
2975
+ function Ji(e) {
2954
2976
  return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
2955
2977
  }
2956
2978
  //#endregion
2957
2979
  //#region ../../node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
2958
- var Ki = Object.defineProperty, qi = Object.getOwnPropertySymbols, Ji = Object.prototype.hasOwnProperty, Yi = Object.prototype.propertyIsEnumerable, Xi = (e, t, n) => t in e ? Ki(e, t, {
2980
+ var Yi = Object.defineProperty, Xi = Object.getOwnPropertySymbols, Zi = Object.prototype.hasOwnProperty, Qi = Object.prototype.propertyIsEnumerable, $i = (e, t, n) => t in e ? Yi(e, t, {
2959
2981
  enumerable: !0,
2960
2982
  configurable: !0,
2961
2983
  writable: !0,
2962
2984
  value: n
2963
- }) : e[t] = n, Zi = (e, t) => {
2964
- for (var n in t ||= {}) Ji.call(t, n) && Xi(e, n, t[n]);
2965
- if (qi) for (var n of qi(t)) Yi.call(t, n) && Xi(e, n, t[n]);
2985
+ }) : e[t] = n, ea = (e, t) => {
2986
+ for (var n in t ||= {}) Zi.call(t, n) && $i(e, n, t[n]);
2987
+ if (Xi) for (var n of Xi(t)) Qi.call(t, n) && $i(e, n, t[n]);
2966
2988
  return e;
2967
- }, Qi = (e, t) => {
2989
+ }, ta = (e, t) => {
2968
2990
  var n = {};
2969
- for (var r in e) Ji.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
2970
- if (e != null && qi) for (var r of qi(e)) t.indexOf(r) < 0 && Yi.call(e, r) && (n[r] = e[r]);
2991
+ for (var r in e) Zi.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
2992
+ if (e != null && Xi) for (var r of Xi(e)) t.indexOf(r) < 0 && Qi.call(e, r) && (n[r] = e[r]);
2971
2993
  return n;
2972
- }, $i = "[vue-draggable-plus]: ";
2973
- function ea(e) {
2974
- console.warn($i + e);
2994
+ }, na = "[vue-draggable-plus]: ";
2995
+ function ra(e) {
2996
+ console.warn(na + e);
2975
2997
  }
2976
- function ta(e) {
2977
- console.error($i + e);
2998
+ function ia(e) {
2999
+ console.error(na + e);
2978
3000
  }
2979
- function na(e, t, n) {
3001
+ function aa(e, t, n) {
2980
3002
  return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
2981
3003
  }
2982
- function ra(e) {
3004
+ function oa(e) {
2983
3005
  return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
2984
3006
  }
2985
- function ia(e) {
2986
- return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[ra(n)] = e[n]), t), {});
3007
+ function sa(e) {
3008
+ return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[oa(n)] = e[n]), t), {});
2987
3009
  }
2988
- function aa(e, t) {
3010
+ function ca(e, t) {
2989
3011
  return Array.isArray(e) && e.splice(t, 1), e;
2990
3012
  }
2991
- function oa(e, t, n) {
3013
+ function la(e, t, n) {
2992
3014
  return Array.isArray(e) && e.splice(t, 0, n), e;
2993
3015
  }
2994
- function sa(e) {
3016
+ function ua(e) {
2995
3017
  return e === void 0;
2996
3018
  }
2997
- function ca(e) {
3019
+ function da(e) {
2998
3020
  return typeof e == "string";
2999
3021
  }
3000
- function la(e, t, n) {
3022
+ function fa(e, t, n) {
3001
3023
  let r = e.children[n];
3002
3024
  e.insertBefore(t, r);
3003
3025
  }
3004
- function ua(e) {
3026
+ function pa(e) {
3005
3027
  e.parentNode && e.parentNode.removeChild(e);
3006
3028
  }
3007
- function da(e, t = document) {
3029
+ function ma(e, t = document) {
3008
3030
  let n = null;
3009
- return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || ea(`Element not found: ${e}`), n;
3031
+ return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || ra(`Element not found: ${e}`), n;
3010
3032
  }
3011
- function fa(e, t, n = null) {
3033
+ function ha(e, t, n = null) {
3012
3034
  return function(...r) {
3013
3035
  return e.apply(n, r), t.apply(n, r);
3014
3036
  };
3015
3037
  }
3016
- function pa(e, t) {
3017
- let n = Zi({}, e);
3038
+ function ga(e, t) {
3039
+ let n = ea({}, e);
3018
3040
  return Object.keys(t).forEach((r) => {
3019
- n[r] ? n[r] = fa(e[r], t[r]) : n[r] = t[r];
3041
+ n[r] ? n[r] = ha(e[r], t[r]) : n[r] = t[r];
3020
3042
  }), n;
3021
3043
  }
3022
- function ma(e) {
3044
+ function _a(e) {
3023
3045
  return e instanceof HTMLElement;
3024
3046
  }
3025
- function ha(e, t) {
3047
+ function va(e, t) {
3026
3048
  Object.keys(e).forEach((n) => {
3027
3049
  t(n, e[n]);
3028
3050
  });
3029
3051
  }
3030
- function ga(e) {
3052
+ function ya(e) {
3031
3053
  return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
3032
3054
  }
3033
- var _a = Object.assign;
3034
- function va(e, t) {
3055
+ var ba = Object.assign;
3056
+ function xa(e, t) {
3035
3057
  var n = Object.keys(e);
3036
3058
  if (Object.getOwnPropertySymbols) {
3037
3059
  var r = Object.getOwnPropertySymbols(e);
@@ -3041,26 +3063,26 @@ function va(e, t) {
3041
3063
  }
3042
3064
  return n;
3043
3065
  }
3044
- function ya(e) {
3066
+ function Sa(e) {
3045
3067
  for (var t = 1; t < arguments.length; t++) {
3046
3068
  var n = arguments[t] == null ? {} : arguments[t];
3047
- t % 2 ? va(Object(n), !0).forEach(function(t) {
3048
- xa(e, t, n[t]);
3049
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : va(Object(n)).forEach(function(t) {
3069
+ t % 2 ? xa(Object(n), !0).forEach(function(t) {
3070
+ wa(e, t, n[t]);
3071
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : xa(Object(n)).forEach(function(t) {
3050
3072
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
3051
3073
  });
3052
3074
  }
3053
3075
  return e;
3054
3076
  }
3055
- function ba(e) {
3077
+ function Ca(e) {
3056
3078
  "@babel/helpers - typeof";
3057
- return ba = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
3079
+ return Ca = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
3058
3080
  return typeof e;
3059
3081
  } : function(e) {
3060
3082
  return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
3061
- }, ba(e);
3083
+ }, Ca(e);
3062
3084
  }
3063
- function xa(e, t, n) {
3085
+ function wa(e, t, n) {
3064
3086
  return t in e ? Object.defineProperty(e, t, {
3065
3087
  value: n,
3066
3088
  enumerable: !0,
@@ -3068,45 +3090,45 @@ function xa(e, t, n) {
3068
3090
  writable: !0
3069
3091
  }) : e[t] = n, e;
3070
3092
  }
3071
- function Sa() {
3072
- return Sa = Object.assign || function(e) {
3093
+ function Ta() {
3094
+ return Ta = Object.assign || function(e) {
3073
3095
  for (var t = 1; t < arguments.length; t++) {
3074
3096
  var n = arguments[t];
3075
3097
  for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
3076
3098
  }
3077
3099
  return e;
3078
- }, Sa.apply(this, arguments);
3100
+ }, Ta.apply(this, arguments);
3079
3101
  }
3080
- function Ca(e, t) {
3102
+ function Ea(e, t) {
3081
3103
  if (e == null) return {};
3082
3104
  var n = {}, r = Object.keys(e), i, a;
3083
3105
  for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
3084
3106
  return n;
3085
3107
  }
3086
- function wa(e, t) {
3108
+ function Da(e, t) {
3087
3109
  if (e == null) return {};
3088
- var n = Ca(e, t), r, i;
3110
+ var n = Ea(e, t), r, i;
3089
3111
  if (Object.getOwnPropertySymbols) {
3090
3112
  var a = Object.getOwnPropertySymbols(e);
3091
3113
  for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
3092
3114
  }
3093
3115
  return n;
3094
3116
  }
3095
- var Ta = "1.15.2";
3096
- function Ea(e) {
3117
+ var Oa = "1.15.2";
3118
+ function ka(e) {
3097
3119
  if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
3098
3120
  }
3099
- var Da = Ea(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Oa = Ea(/Edge/i), ka = Ea(/firefox/i), Aa = Ea(/safari/i) && !Ea(/chrome/i) && !Ea(/android/i), ja = Ea(/iP(ad|od|hone)/i), Ma = Ea(/chrome/i) && Ea(/android/i), Na = {
3121
+ var Aa = ka(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), ja = ka(/Edge/i), Ma = ka(/firefox/i), Na = ka(/safari/i) && !ka(/chrome/i) && !ka(/android/i), Pa = ka(/iP(ad|od|hone)/i), Fa = ka(/chrome/i) && ka(/android/i), Ia = {
3100
3122
  capture: !1,
3101
3123
  passive: !1
3102
3124
  };
3103
- function z(e, t, n) {
3104
- e.addEventListener(t, n, !Da && Na);
3125
+ function R(e, t, n) {
3126
+ e.addEventListener(t, n, !Aa && Ia);
3105
3127
  }
3106
- function B(e, t, n) {
3107
- e.removeEventListener(t, n, !Da && Na);
3128
+ function z(e, t, n) {
3129
+ e.removeEventListener(t, n, !Aa && Ia);
3108
3130
  }
3109
- function Pa(e, t) {
3131
+ function La(e, t) {
3110
3132
  if (t) {
3111
3133
  if (t[0] === ">" && (t = t.substring(1)), e) try {
3112
3134
  if (e.matches) return e.matches(t);
@@ -3118,22 +3140,22 @@ function Pa(e, t) {
3118
3140
  return !1;
3119
3141
  }
3120
3142
  }
3121
- function Fa(e) {
3143
+ function Ra(e) {
3122
3144
  return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
3123
3145
  }
3124
- function Ia(e, t, n, r) {
3146
+ function za(e, t, n, r) {
3125
3147
  if (e) {
3126
3148
  n ||= document;
3127
3149
  do {
3128
- if (t != null && (t[0] === ">" ? e.parentNode === n && Pa(e, t) : Pa(e, t)) || r && e === n) return e;
3150
+ if (t != null && (t[0] === ">" ? e.parentNode === n && La(e, t) : La(e, t)) || r && e === n) return e;
3129
3151
  if (e === n) break;
3130
- } while (e = Fa(e));
3152
+ } while (e = Ra(e));
3131
3153
  }
3132
3154
  return null;
3133
3155
  }
3134
- var La = /\s+/g;
3135
- function Ra(e, t, n) {
3136
- e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(La, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(La, " "));
3156
+ var Ba = /\s+/g;
3157
+ function B(e, t, n) {
3158
+ e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Ba, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Ba, " "));
3137
3159
  }
3138
3160
  function V(e, t, n) {
3139
3161
  var r = e && e.style;
@@ -3142,7 +3164,7 @@ function V(e, t, n) {
3142
3164
  !(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
3143
3165
  }
3144
3166
  }
3145
- function za(e, t) {
3167
+ function Va(e, t) {
3146
3168
  var n = "";
3147
3169
  if (typeof e == "string") n = e;
3148
3170
  else do {
@@ -3152,7 +3174,7 @@ function za(e, t) {
3152
3174
  var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
3153
3175
  return i && new i(n);
3154
3176
  }
3155
- function Ba(e, t, n) {
3177
+ function Ha(e, t, n) {
3156
3178
  if (e) {
3157
3179
  var r = e.getElementsByTagName(t), i = 0, a = r.length;
3158
3180
  if (n) for (; i < a; i++) n(r[i], i);
@@ -3160,13 +3182,13 @@ function Ba(e, t, n) {
3160
3182
  }
3161
3183
  return [];
3162
3184
  }
3163
- function Va() {
3185
+ function Ua() {
3164
3186
  return document.scrollingElement || document.documentElement;
3165
3187
  }
3166
3188
  function H(e, t, n, r, i) {
3167
3189
  if (!(!e.getBoundingClientRect && e !== window)) {
3168
3190
  var a, o, s, c, l, u, d;
3169
- if (e !== window && e.parentNode && e !== Va() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !Da)) do
3191
+ if (e !== window && e.parentNode && e !== Ua() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !Aa)) do
3170
3192
  if (i && i.getBoundingClientRect && (V(i, "transform") !== "none" || n && V(i, "position") !== "static")) {
3171
3193
  var f = i.getBoundingClientRect();
3172
3194
  o -= f.top + parseInt(V(i, "border-top-width")), s -= f.left + parseInt(V(i, "border-left-width")), c = o + a.height, l = s + a.width;
@@ -3174,7 +3196,7 @@ function H(e, t, n, r, i) {
3174
3196
  }
3175
3197
  while (i = i.parentNode);
3176
3198
  if (r && e !== window) {
3177
- var p = za(i || e), m = p && p.a, h = p && p.d;
3199
+ var p = Va(i || e), m = p && p.a, h = p && p.d;
3178
3200
  p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
3179
3201
  }
3180
3202
  return {
@@ -3187,18 +3209,18 @@ function H(e, t, n, r, i) {
3187
3209
  };
3188
3210
  }
3189
3211
  }
3190
- function Ha(e, t, n) {
3191
- for (var r = Ja(e, !0), i = H(e)[t]; r;) {
3212
+ function Wa(e, t, n) {
3213
+ for (var r = Xa(e, !0), i = H(e)[t]; r;) {
3192
3214
  var a = H(r)[n], o = void 0;
3193
3215
  if (o = i >= a, !o) return r;
3194
- if (r === Va()) break;
3195
- r = Ja(r, !1);
3216
+ if (r === Ua()) break;
3217
+ r = Xa(r, !1);
3196
3218
  }
3197
3219
  return !1;
3198
3220
  }
3199
- function Ua(e, t, n, r) {
3221
+ function Ga(e, t, n, r) {
3200
3222
  for (var i = 0, a = 0, o = e.children; a < o.length;) {
3201
- if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Ia(o[a], n.draggable, e, !1)) {
3223
+ if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && za(o[a], n.draggable, e, !1)) {
3202
3224
  if (i === t) return o[a];
3203
3225
  i++;
3204
3226
  }
@@ -3206,84 +3228,84 @@ function Ua(e, t, n, r) {
3206
3228
  }
3207
3229
  return null;
3208
3230
  }
3209
- function Wa(e, t) {
3210
- for (var n = e.lastElementChild; n && (n === Q.ghost || V(n, "display") === "none" || t && !Pa(n, t));) n = n.previousElementSibling;
3231
+ function Ka(e, t) {
3232
+ for (var n = e.lastElementChild; n && (n === Q.ghost || V(n, "display") === "none" || t && !La(n, t));) n = n.previousElementSibling;
3211
3233
  return n || null;
3212
3234
  }
3213
- function Ga(e, t) {
3235
+ function qa(e, t) {
3214
3236
  var n = 0;
3215
3237
  if (!e || !e.parentNode) return -1;
3216
- for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || Pa(e, t)) && n++;
3238
+ for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || La(e, t)) && n++;
3217
3239
  return n;
3218
3240
  }
3219
- function Ka(e) {
3220
- var t = 0, n = 0, r = Va();
3241
+ function Ja(e) {
3242
+ var t = 0, n = 0, r = Ua();
3221
3243
  if (e) do {
3222
- var i = za(e), a = i.a, o = i.d;
3244
+ var i = Va(e), a = i.a, o = i.d;
3223
3245
  t += e.scrollLeft * a, n += e.scrollTop * o;
3224
3246
  } while (e !== r && (e = e.parentNode));
3225
3247
  return [t, n];
3226
3248
  }
3227
- function qa(e, t) {
3249
+ function Ya(e, t) {
3228
3250
  for (var n in e) if (e.hasOwnProperty(n)) {
3229
3251
  for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
3230
3252
  }
3231
3253
  return -1;
3232
3254
  }
3233
- function Ja(e, t) {
3234
- if (!e || !e.getBoundingClientRect) return Va();
3255
+ function Xa(e, t) {
3256
+ if (!e || !e.getBoundingClientRect) return Ua();
3235
3257
  var n = e, r = !1;
3236
3258
  do
3237
3259
  if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
3238
3260
  var i = V(n);
3239
3261
  if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
3240
- if (!n.getBoundingClientRect || n === document.body) return Va();
3262
+ if (!n.getBoundingClientRect || n === document.body) return Ua();
3241
3263
  if (r || t) return n;
3242
3264
  r = !0;
3243
3265
  }
3244
3266
  }
3245
3267
  while (n = n.parentNode);
3246
- return Va();
3268
+ return Ua();
3247
3269
  }
3248
- function Ya(e, t) {
3270
+ function Za(e, t) {
3249
3271
  if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
3250
3272
  return e;
3251
3273
  }
3252
- function Xa(e, t) {
3274
+ function Qa(e, t) {
3253
3275
  return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
3254
3276
  }
3255
- var Za;
3256
- function Qa(e, t) {
3277
+ var $a;
3278
+ function eo(e, t) {
3257
3279
  return function() {
3258
- if (!Za) {
3280
+ if (!$a) {
3259
3281
  var n = arguments, r = this;
3260
- n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Za = setTimeout(function() {
3261
- Za = void 0;
3282
+ n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), $a = setTimeout(function() {
3283
+ $a = void 0;
3262
3284
  }, t);
3263
3285
  }
3264
3286
  };
3265
3287
  }
3266
- function $a() {
3267
- clearTimeout(Za), Za = void 0;
3288
+ function to() {
3289
+ clearTimeout($a), $a = void 0;
3268
3290
  }
3269
- function eo(e, t, n) {
3291
+ function no(e, t, n) {
3270
3292
  e.scrollLeft += t, e.scrollTop += n;
3271
3293
  }
3272
- function to(e) {
3294
+ function ro(e) {
3273
3295
  var t = window.Polymer, n = window.jQuery || window.Zepto;
3274
3296
  return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
3275
3297
  }
3276
- function no(e, t, n) {
3298
+ function io(e, t, n) {
3277
3299
  var r = {};
3278
3300
  return Array.from(e.children).forEach(function(i) {
3279
- if (!(!Ia(i, t.draggable, e, !1) || i.animated || i === n)) {
3301
+ if (!(!za(i, t.draggable, e, !1) || i.animated || i === n)) {
3280
3302
  var a = H(i);
3281
3303
  r.left = Math.min(r.left ?? 1 / 0, a.left), r.top = Math.min(r.top ?? 1 / 0, a.top), r.right = Math.max(r.right ?? -1 / 0, a.right), r.bottom = Math.max(r.bottom ?? -1 / 0, a.bottom);
3282
3304
  }
3283
3305
  }), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
3284
3306
  }
3285
- var ro = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
3286
- function io() {
3307
+ var ao = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
3308
+ function oo() {
3287
3309
  var e = [], t;
3288
3310
  return {
3289
3311
  captureAnimationState: function() {
@@ -3293,9 +3315,9 @@ function io() {
3293
3315
  target: t,
3294
3316
  rect: H(t)
3295
3317
  });
3296
- var n = ya({}, e[e.length - 1].rect);
3318
+ var n = Sa({}, e[e.length - 1].rect);
3297
3319
  if (t.thisAnimationDuration) {
3298
- var r = za(t, !0);
3320
+ var r = Va(t, !0);
3299
3321
  r && (n.top -= r.f, n.left -= r.e);
3300
3322
  }
3301
3323
  t.fromRect = n;
@@ -3306,7 +3328,7 @@ function io() {
3306
3328
  e.push(t);
3307
3329
  },
3308
3330
  removeAnimationState: function(t) {
3309
- e.splice(qa(e, { target: t }), 1);
3331
+ e.splice(Ya(e, { target: t }), 1);
3310
3332
  },
3311
3333
  animateAll: function(n) {
3312
3334
  var r = this;
@@ -3316,8 +3338,8 @@ function io() {
3316
3338
  }
3317
3339
  var i = !1, a = 0;
3318
3340
  e.forEach(function(e) {
3319
- var t = 0, n = e.target, o = n.fromRect, s = H(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = za(n, !0);
3320
- d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Xa(c, s) && !Xa(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = oo(u, c, l, r.options)), Xa(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
3341
+ var t = 0, n = e.target, o = n.fromRect, s = H(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Va(n, !0);
3342
+ d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Qa(c, s) && !Qa(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = co(u, c, l, r.options)), Qa(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
3321
3343
  n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
3322
3344
  }, t), n.thisAnimationDuration = t);
3323
3345
  }), clearTimeout(t), i ? t = setTimeout(function() {
@@ -3327,26 +3349,26 @@ function io() {
3327
3349
  animate: function(e, t, n, r) {
3328
3350
  if (r) {
3329
3351
  V(e, "transition", ""), V(e, "transform", "");
3330
- var i = za(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
3331
- e.animatingX = !!s, e.animatingY = !!c, V(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = ao(e), V(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), V(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
3352
+ var i = Va(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
3353
+ e.animatingX = !!s, e.animatingY = !!c, V(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = so(e), V(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), V(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
3332
3354
  V(e, "transition", ""), V(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
3333
3355
  }, r);
3334
3356
  }
3335
3357
  }
3336
3358
  };
3337
3359
  }
3338
- function ao(e) {
3360
+ function so(e) {
3339
3361
  return e.offsetWidth;
3340
3362
  }
3341
- function oo(e, t, n, r) {
3363
+ function co(e, t, n, r) {
3342
3364
  return Math.sqrt((t.top - e.top) ** 2 + (t.left - e.left) ** 2) / Math.sqrt((t.top - n.top) ** 2 + (t.left - n.left) ** 2) * r.animation;
3343
3365
  }
3344
- var so = [], co = { initializeByDefault: !0 }, lo = {
3366
+ var lo = [], uo = { initializeByDefault: !0 }, fo = {
3345
3367
  mount: function(e) {
3346
- for (var t in co) co.hasOwnProperty(t) && !(t in e) && (e[t] = co[t]);
3347
- so.forEach(function(t) {
3368
+ for (var t in uo) uo.hasOwnProperty(t) && !(t in e) && (e[t] = uo[t]);
3369
+ lo.forEach(function(t) {
3348
3370
  if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
3349
- }), so.push(e);
3371
+ }), lo.push(e);
3350
3372
  },
3351
3373
  pluginEvent: function(e, t, n) {
3352
3374
  var r = this;
@@ -3354,16 +3376,16 @@ var so = [], co = { initializeByDefault: !0 }, lo = {
3354
3376
  r.eventCanceled = !0;
3355
3377
  };
3356
3378
  var i = e + "Global";
3357
- so.forEach(function(r) {
3358
- t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](ya({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](ya({ sortable: t }, n)));
3379
+ lo.forEach(function(r) {
3380
+ t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Sa({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Sa({ sortable: t }, n)));
3359
3381
  });
3360
3382
  },
3361
3383
  initializePlugins: function(e, t, n, r) {
3362
- for (var i in so.forEach(function(r) {
3384
+ for (var i in lo.forEach(function(r) {
3363
3385
  var i = r.pluginName;
3364
3386
  if (!(!e.options[i] && !r.initializeByDefault)) {
3365
3387
  var a = new r(e, t, e.options);
3366
- a.sortable = e, a.options = e.options, e[i] = a, Sa(n, a.defaults);
3388
+ a.sortable = e, a.options = e.options, e[i] = a, Ta(n, a.defaults);
3367
3389
  }
3368
3390
  }), e.options) if (e.options.hasOwnProperty(i)) {
3369
3391
  var a = this.modifyOption(e, i, e.options[i]);
@@ -3372,56 +3394,56 @@ var so = [], co = { initializeByDefault: !0 }, lo = {
3372
3394
  },
3373
3395
  getEventProperties: function(e, t) {
3374
3396
  var n = {};
3375
- return so.forEach(function(r) {
3376
- typeof r.eventProperties == "function" && Sa(n, r.eventProperties.call(t[r.pluginName], e));
3397
+ return lo.forEach(function(r) {
3398
+ typeof r.eventProperties == "function" && Ta(n, r.eventProperties.call(t[r.pluginName], e));
3377
3399
  }), n;
3378
3400
  },
3379
3401
  modifyOption: function(e, t, n) {
3380
3402
  var r;
3381
- return so.forEach(function(i) {
3403
+ return lo.forEach(function(i) {
3382
3404
  e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
3383
3405
  }), r;
3384
3406
  }
3385
3407
  };
3386
- function uo(e) {
3408
+ function po(e) {
3387
3409
  var t = e.sortable, n = e.rootEl, r = e.name, i = e.targetEl, a = e.cloneEl, o = e.toEl, s = e.fromEl, c = e.oldIndex, l = e.newIndex, u = e.oldDraggableIndex, d = e.newDraggableIndex, f = e.originalEvent, p = e.putSortable, m = e.extraEventProperties;
3388
- if (t ||= n && n[ro], t) {
3410
+ if (t ||= n && n[ao], t) {
3389
3411
  var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
3390
- window.CustomEvent && !Da && !Oa ? h = new CustomEvent(r, {
3412
+ window.CustomEvent && !Aa && !ja ? h = new CustomEvent(r, {
3391
3413
  bubbles: !0,
3392
3414
  cancelable: !0
3393
3415
  }) : (h = document.createEvent("Event"), h.initEvent(r, !0, !0)), h.to = o || n, h.from = s || n, h.item = i || n, h.clone = a, h.oldIndex = c, h.newIndex = l, h.oldDraggableIndex = u, h.newDraggableIndex = d, h.originalEvent = f, h.pullMode = p ? p.lastPutMode : void 0;
3394
- var v = ya(ya({}, m), lo.getEventProperties(r, t));
3416
+ var v = Sa(Sa({}, m), fo.getEventProperties(r, t));
3395
3417
  for (var y in v) h[y] = v[y];
3396
3418
  n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
3397
3419
  }
3398
3420
  }
3399
- var fo = ["evt"], U = function(e, t) {
3400
- var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = wa(n, fo);
3401
- lo.pluginEvent.bind(Q)(e, t, ya({
3421
+ var mo = ["evt"], U = function(e, t) {
3422
+ var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Da(n, mo);
3423
+ fo.pluginEvent.bind(Q)(e, t, Sa({
3402
3424
  dragEl: G,
3403
3425
  parentEl: K,
3404
3426
  ghostEl: q,
3405
3427
  rootEl: J,
3406
- nextEl: po,
3407
- lastDownEl: mo,
3428
+ nextEl: ho,
3429
+ lastDownEl: go,
3408
3430
  cloneEl: Y,
3409
- cloneHidden: ho,
3410
- dragStarted: Ao,
3431
+ cloneHidden: _o,
3432
+ dragStarted: Mo,
3411
3433
  putSortable: X,
3412
3434
  activeSortable: Q.active,
3413
3435
  originalEvent: r,
3414
- oldIndex: go,
3415
- oldDraggableIndex: vo,
3416
- newIndex: _o,
3417
- newDraggableIndex: yo,
3418
- hideGhostForTarget: Jo,
3419
- unhideGhostForTarget: Yo,
3436
+ oldIndex: vo,
3437
+ oldDraggableIndex: bo,
3438
+ newIndex: yo,
3439
+ newDraggableIndex: xo,
3440
+ hideGhostForTarget: Xo,
3441
+ unhideGhostForTarget: Zo,
3420
3442
  cloneNowHidden: function() {
3421
- ho = !0;
3443
+ _o = !0;
3422
3444
  },
3423
3445
  cloneNowShown: function() {
3424
- ho = !1;
3446
+ _o = !1;
3425
3447
  },
3426
3448
  dispatchSortableEvent: function(e) {
3427
3449
  W({
@@ -3433,45 +3455,45 @@ var fo = ["evt"], U = function(e, t) {
3433
3455
  }, i));
3434
3456
  };
3435
3457
  function W(e) {
3436
- uo(ya({
3458
+ po(Sa({
3437
3459
  putSortable: X,
3438
3460
  cloneEl: Y,
3439
3461
  targetEl: G,
3440
3462
  rootEl: J,
3441
- oldIndex: go,
3442
- oldDraggableIndex: vo,
3443
- newIndex: _o,
3444
- newDraggableIndex: yo
3463
+ oldIndex: vo,
3464
+ oldDraggableIndex: bo,
3465
+ newIndex: yo,
3466
+ newDraggableIndex: xo
3445
3467
  }, e));
3446
3468
  }
3447
- var G, K, q, J, po, mo, Y, ho, go, _o, vo, yo, bo, X, xo = !1, So = !1, Co = [], wo, To, Eo, Do, Oo, ko, Ao, jo, Mo, No = !1, Po = !1, Fo, Z, Io = [], Lo = !1, Ro = [], zo = typeof document < "u", Bo = ja, Vo = Oa || Da ? "cssFloat" : "float", Ho = zo && !Ma && !ja && "draggable" in document.createElement("div"), Uo = function() {
3448
- if (zo) {
3449
- if (Da) return !1;
3469
+ var G, K, q, J, ho, go, Y, _o, vo, yo, bo, xo, So, X, Co = !1, wo = !1, To = [], Eo, Do, Oo, ko, Ao, jo, Mo, No, Po, Fo = !1, Io = !1, Lo, Z, Ro = [], zo = !1, Bo = [], Vo = typeof document < "u", Ho = Pa, Uo = ja || Aa ? "cssFloat" : "float", Wo = Vo && !Fa && !Pa && "draggable" in document.createElement("div"), Go = function() {
3470
+ if (Vo) {
3471
+ if (Aa) return !1;
3450
3472
  var e = document.createElement("x");
3451
3473
  return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
3452
3474
  }
3453
- }(), Wo = function(e, t) {
3454
- var n = V(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Ua(e, 0, t), a = Ua(e, 1, t), o = i && V(i), s = a && V(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + H(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + H(a).width;
3475
+ }(), Ko = function(e, t) {
3476
+ var n = V(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Ga(e, 0, t), a = Ga(e, 1, t), o = i && V(i), s = a && V(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + H(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + H(a).width;
3455
3477
  if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
3456
3478
  if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
3457
3479
  if (i && o.float && o.float !== "none") {
3458
3480
  var u = o.float === "left" ? "left" : "right";
3459
3481
  return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
3460
3482
  }
3461
- return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Vo] === "none" || a && n[Vo] === "none" && c + l > r) ? "vertical" : "horizontal";
3462
- }, Go = function(e, t, n) {
3483
+ return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Uo] === "none" || a && n[Uo] === "none" && c + l > r) ? "vertical" : "horizontal";
3484
+ }, qo = function(e, t, n) {
3463
3485
  var r = n ? e.left : e.top, i = n ? e.right : e.bottom, a = n ? e.width : e.height, o = n ? t.left : t.top, s = n ? t.right : t.bottom, c = n ? t.width : t.height;
3464
3486
  return r === o || i === s || r + a / 2 === o + c / 2;
3465
- }, Ko = function(e, t) {
3487
+ }, Jo = function(e, t) {
3466
3488
  var n;
3467
- return Co.some(function(r) {
3468
- var i = r[ro].options.emptyInsertThreshold;
3469
- if (!(!i || Wa(r))) {
3489
+ return To.some(function(r) {
3490
+ var i = r[ao].options.emptyInsertThreshold;
3491
+ if (!(!i || Ka(r))) {
3470
3492
  var a = H(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
3471
3493
  if (o && s) return n = r;
3472
3494
  }
3473
3495
  }), n;
3474
- }, qo = function(e) {
3496
+ }, Yo = function(e) {
3475
3497
  function t(e, n) {
3476
3498
  return function(r, i, a, o) {
3477
3499
  var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
@@ -3484,31 +3506,31 @@ var G, K, q, J, po, mo, Y, ho, go, _o, vo, yo, bo, X, xo = !1, So = !1, Co = [],
3484
3506
  };
3485
3507
  }
3486
3508
  var n = {}, r = e.group;
3487
- (!r || ba(r) != "object") && (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
3488
- }, Jo = function() {
3489
- !Uo && q && V(q, "display", "none");
3490
- }, Yo = function() {
3491
- !Uo && q && V(q, "display", "");
3509
+ (!r || Ca(r) != "object") && (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
3510
+ }, Xo = function() {
3511
+ !Go && q && V(q, "display", "none");
3512
+ }, Zo = function() {
3513
+ !Go && q && V(q, "display", "");
3492
3514
  };
3493
- zo && !Ma && document.addEventListener("click", function(e) {
3494
- if (So) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), So = !1, !1;
3515
+ Vo && !Fa && document.addEventListener("click", function(e) {
3516
+ if (wo) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), wo = !1, !1;
3495
3517
  }, !0);
3496
- var Xo = function(e) {
3518
+ var Qo = function(e) {
3497
3519
  if (G) {
3498
3520
  e = e.touches ? e.touches[0] : e;
3499
- var t = Ko(e.clientX, e.clientY);
3521
+ var t = Jo(e.clientX, e.clientY);
3500
3522
  if (t) {
3501
3523
  var n = {};
3502
3524
  for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
3503
- n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[ro]._onDragOver(n);
3525
+ n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[ao]._onDragOver(n);
3504
3526
  }
3505
3527
  }
3506
- }, Zo = function(e) {
3507
- G && G.parentNode[ro]._isOutsideThisEl(e.target);
3528
+ }, $o = function(e) {
3529
+ G && G.parentNode[ao]._isOutsideThisEl(e.target);
3508
3530
  };
3509
3531
  function Q(e, t) {
3510
3532
  if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
3511
- this.el = e, this.options = t = Sa({}, t), e[ro] = this;
3533
+ this.el = e, this.options = t = Ta({}, t), e[ao] = this;
3512
3534
  var n = {
3513
3535
  group: null,
3514
3536
  sort: !0,
@@ -3521,7 +3543,7 @@ function Q(e, t) {
3521
3543
  invertedSwapThreshold: null,
3522
3544
  removeCloneOnHide: !0,
3523
3545
  direction: function() {
3524
- return Wo(e, this.options);
3546
+ return Ko(e, this.options);
3525
3547
  },
3526
3548
  ghostClass: "sortable-ghost",
3527
3549
  chosenClass: "sortable-chosen",
@@ -3548,17 +3570,17 @@ function Q(e, t) {
3548
3570
  x: 0,
3549
3571
  y: 0
3550
3572
  },
3551
- supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Aa,
3573
+ supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Na,
3552
3574
  emptyInsertThreshold: 5
3553
3575
  };
3554
- for (var r in lo.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
3555
- for (var i in qo(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
3556
- this.nativeDraggable = !t.forceFallback && Ho, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? z(e, "pointerdown", this._onTapStart) : (z(e, "mousedown", this._onTapStart), z(e, "touchstart", this._onTapStart)), this.nativeDraggable && (z(e, "dragover", this), z(e, "dragenter", this)), Co.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Sa(this, io());
3576
+ for (var r in fo.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
3577
+ for (var i in Yo(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
3578
+ this.nativeDraggable = !t.forceFallback && Wo, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? R(e, "pointerdown", this._onTapStart) : (R(e, "mousedown", this._onTapStart), R(e, "touchstart", this._onTapStart)), this.nativeDraggable && (R(e, "dragover", this), R(e, "dragenter", this)), To.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Ta(this, oo());
3557
3579
  }
3558
3580
  Q.prototype = {
3559
3581
  constructor: Q,
3560
3582
  _isOutsideThisEl: function(e) {
3561
- !this.el.contains(e) && e !== this.el && (jo = null);
3583
+ !this.el.contains(e) && e !== this.el && (No = null);
3562
3584
  },
3563
3585
  _getDirection: function(e, t) {
3564
3586
  return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, G) : this.options.direction;
@@ -3566,8 +3588,8 @@ Q.prototype = {
3566
3588
  _onTapStart: function(e) {
3567
3589
  if (e.cancelable) {
3568
3590
  var t = this, n = this.el, r = this.options, i = r.preventOnFilter, a = e.type, o = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (o || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, l = r.filter;
3569
- if (ss(n), !G && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Aa && s && s.tagName.toUpperCase() === "SELECT") && (s = Ia(s, r.draggable, n, !1), !(s && s.animated) && mo !== s)) {
3570
- if (go = Ga(s), vo = Ga(s, r.draggable), typeof l == "function") {
3591
+ if (ls(n), !G && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Na && s && s.tagName.toUpperCase() === "SELECT") && (s = za(s, r.draggable, n, !1), !(s && s.animated) && go !== s)) {
3592
+ if (vo = qa(s), bo = qa(s, r.draggable), typeof l == "function") {
3571
3593
  if (l.call(this, e, s, this)) {
3572
3594
  W({
3573
3595
  sortable: t,
@@ -3580,7 +3602,7 @@ Q.prototype = {
3580
3602
  return;
3581
3603
  }
3582
3604
  } else if (l && (l = l.split(",").some(function(r) {
3583
- if (r = Ia(c, r.trim(), n, !1), r) return W({
3605
+ if (r = za(c, r.trim(), n, !1), r) return W({
3584
3606
  sortable: t,
3585
3607
  rootEl: r,
3586
3608
  name: "filter",
@@ -3592,7 +3614,7 @@ Q.prototype = {
3592
3614
  i && e.cancelable && e.preventDefault();
3593
3615
  return;
3594
3616
  }
3595
- r.handle && !Ia(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
3617
+ r.handle && !za(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
3596
3618
  }
3597
3619
  }
3598
3620
  },
@@ -3600,28 +3622,28 @@ Q.prototype = {
3600
3622
  var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
3601
3623
  if (n && !G && n.parentNode === i) {
3602
3624
  var c = H(n);
3603
- if (J = i, G = n, K = G.parentNode, po = G.nextSibling, mo = n, bo = a.group, Q.dragged = G, wo = {
3625
+ if (J = i, G = n, K = G.parentNode, ho = G.nextSibling, go = n, So = a.group, Q.dragged = G, Eo = {
3604
3626
  target: G,
3605
3627
  clientX: (t || e).clientX,
3606
3628
  clientY: (t || e).clientY
3607
- }, Oo = wo.clientX - c.left, ko = wo.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, G.style["will-change"] = "all", s = function() {
3629
+ }, Ao = Eo.clientX - c.left, jo = Eo.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, G.style["will-change"] = "all", s = function() {
3608
3630
  if (U("delayEnded", r, { evt: e }), Q.eventCanceled) {
3609
3631
  r._onDrop();
3610
3632
  return;
3611
3633
  }
3612
- r._disableDelayedDragEvents(), !ka && r.nativeDraggable && (G.draggable = !0), r._triggerDragStart(e, t), W({
3634
+ r._disableDelayedDragEvents(), !Ma && r.nativeDraggable && (G.draggable = !0), r._triggerDragStart(e, t), W({
3613
3635
  sortable: r,
3614
3636
  name: "choose",
3615
3637
  originalEvent: e
3616
- }), Ra(G, a.chosenClass, !0);
3638
+ }), B(G, a.chosenClass, !0);
3617
3639
  }, a.ignore.split(",").forEach(function(e) {
3618
- Ba(G, e.trim(), es);
3619
- }), z(o, "dragover", Xo), z(o, "mousemove", Xo), z(o, "touchmove", Xo), z(o, "mouseup", r._onDrop), z(o, "touchend", r._onDrop), z(o, "touchcancel", r._onDrop), ka && this.nativeDraggable && (this.options.touchStartThreshold = 4, G.draggable = !0), U("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Oa || Da))) {
3640
+ Ha(G, e.trim(), ns);
3641
+ }), R(o, "dragover", Qo), R(o, "mousemove", Qo), R(o, "touchmove", Qo), R(o, "mouseup", r._onDrop), R(o, "touchend", r._onDrop), R(o, "touchcancel", r._onDrop), Ma && this.nativeDraggable && (this.options.touchStartThreshold = 4, G.draggable = !0), U("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(ja || Aa))) {
3620
3642
  if (Q.eventCanceled) {
3621
3643
  this._onDrop();
3622
3644
  return;
3623
3645
  }
3624
- z(o, "mouseup", r._disableDelayedDrag), z(o, "touchend", r._disableDelayedDrag), z(o, "touchcancel", r._disableDelayedDrag), z(o, "mousemove", r._delayedDragTouchMoveHandler), z(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && z(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
3646
+ R(o, "mouseup", r._disableDelayedDrag), R(o, "touchend", r._disableDelayedDrag), R(o, "touchcancel", r._disableDelayedDrag), R(o, "mousemove", r._delayedDragTouchMoveHandler), R(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && R(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
3625
3647
  } else s();
3626
3648
  }
3627
3649
  },
@@ -3630,25 +3652,25 @@ Q.prototype = {
3630
3652
  Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
3631
3653
  },
3632
3654
  _disableDelayedDrag: function() {
3633
- G && es(G), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
3655
+ G && ns(G), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
3634
3656
  },
3635
3657
  _disableDelayedDragEvents: function() {
3636
3658
  var e = this.el.ownerDocument;
3637
- B(e, "mouseup", this._disableDelayedDrag), B(e, "touchend", this._disableDelayedDrag), B(e, "touchcancel", this._disableDelayedDrag), B(e, "mousemove", this._delayedDragTouchMoveHandler), B(e, "touchmove", this._delayedDragTouchMoveHandler), B(e, "pointermove", this._delayedDragTouchMoveHandler);
3659
+ z(e, "mouseup", this._disableDelayedDrag), z(e, "touchend", this._disableDelayedDrag), z(e, "touchcancel", this._disableDelayedDrag), z(e, "mousemove", this._delayedDragTouchMoveHandler), z(e, "touchmove", this._delayedDragTouchMoveHandler), z(e, "pointermove", this._delayedDragTouchMoveHandler);
3638
3660
  },
3639
3661
  _triggerDragStart: function(e, t) {
3640
- t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? z(document, "pointermove", this._onTouchMove) : t ? z(document, "touchmove", this._onTouchMove) : z(document, "mousemove", this._onTouchMove) : (z(G, "dragend", this), z(J, "dragstart", this._onDragStart));
3662
+ t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? R(document, "pointermove", this._onTouchMove) : t ? R(document, "touchmove", this._onTouchMove) : R(document, "mousemove", this._onTouchMove) : (R(G, "dragend", this), R(J, "dragstart", this._onDragStart));
3641
3663
  try {
3642
- document.selection ? cs(function() {
3664
+ document.selection ? us(function() {
3643
3665
  document.selection.empty();
3644
3666
  }) : window.getSelection().removeAllRanges();
3645
3667
  } catch {}
3646
3668
  },
3647
3669
  _dragStarted: function(e, t) {
3648
- if (xo = !1, J && G) {
3649
- U("dragStarted", this, { evt: t }), this.nativeDraggable && z(document, "dragover", Zo);
3670
+ if (Co = !1, J && G) {
3671
+ U("dragStarted", this, { evt: t }), this.nativeDraggable && R(document, "dragover", $o);
3650
3672
  var n = this.options;
3651
- !e && Ra(G, n.dragClass, !1), Ra(G, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), W({
3673
+ !e && B(G, n.dragClass, !1), B(G, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), W({
3652
3674
  sortable: this,
3653
3675
  name: "start",
3654
3676
  originalEvent: t
@@ -3656,33 +3678,33 @@ Q.prototype = {
3656
3678
  } else this._nulling();
3657
3679
  },
3658
3680
  _emulateDragOver: function() {
3659
- if (To) {
3660
- this._lastX = To.clientX, this._lastY = To.clientY, Jo();
3661
- for (var e = document.elementFromPoint(To.clientX, To.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(To.clientX, To.clientY), e !== t);) t = e;
3662
- if (G.parentNode[ro]._isOutsideThisEl(e), t) do {
3663
- if (t[ro]) {
3681
+ if (Do) {
3682
+ this._lastX = Do.clientX, this._lastY = Do.clientY, Xo();
3683
+ for (var e = document.elementFromPoint(Do.clientX, Do.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Do.clientX, Do.clientY), e !== t);) t = e;
3684
+ if (G.parentNode[ao]._isOutsideThisEl(e), t) do {
3685
+ if (t[ao]) {
3664
3686
  var n = void 0;
3665
- if (n = t[ro]._onDragOver({
3666
- clientX: To.clientX,
3667
- clientY: To.clientY,
3687
+ if (n = t[ao]._onDragOver({
3688
+ clientX: Do.clientX,
3689
+ clientY: Do.clientY,
3668
3690
  target: e,
3669
3691
  rootEl: t
3670
3692
  }), n && !this.options.dragoverBubble) break;
3671
3693
  }
3672
3694
  e = t;
3673
3695
  } while (t = t.parentNode);
3674
- Yo();
3696
+ Zo();
3675
3697
  }
3676
3698
  },
3677
3699
  _onTouchMove: function(e) {
3678
- if (wo) {
3679
- var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q && za(q, !0), o = q && a && a.a, s = q && a && a.d, c = Bo && Z && Ka(Z), l = (i.clientX - wo.clientX + r.x) / (o || 1) + (c ? c[0] - Io[0] : 0) / (o || 1), u = (i.clientY - wo.clientY + r.y) / (s || 1) + (c ? c[1] - Io[1] : 0) / (s || 1);
3680
- if (!Q.active && !xo) {
3700
+ if (Eo) {
3701
+ var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q && Va(q, !0), o = q && a && a.a, s = q && a && a.d, c = Ho && Z && Ja(Z), l = (i.clientX - Eo.clientX + r.x) / (o || 1) + (c ? c[0] - Ro[0] : 0) / (o || 1), u = (i.clientY - Eo.clientY + r.y) / (s || 1) + (c ? c[1] - Ro[1] : 0) / (s || 1);
3702
+ if (!Q.active && !Co) {
3681
3703
  if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
3682
3704
  this._onDragStart(e, !0);
3683
3705
  }
3684
3706
  if (q) {
3685
- a ? (a.e += l - (Eo || 0), a.f += u - (Do || 0)) : a = {
3707
+ a ? (a.e += l - (Oo || 0), a.f += u - (ko || 0)) : a = {
3686
3708
  a: 1,
3687
3709
  b: 0,
3688
3710
  c: 0,
@@ -3691,19 +3713,19 @@ Q.prototype = {
3691
3713
  f: u
3692
3714
  };
3693
3715
  var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
3694
- V(q, "webkitTransform", d), V(q, "mozTransform", d), V(q, "msTransform", d), V(q, "transform", d), Eo = l, Do = u, To = i;
3716
+ V(q, "webkitTransform", d), V(q, "mozTransform", d), V(q, "msTransform", d), V(q, "transform", d), Oo = l, ko = u, Do = i;
3695
3717
  }
3696
3718
  e.cancelable && e.preventDefault();
3697
3719
  }
3698
3720
  },
3699
3721
  _appendGhost: function() {
3700
3722
  if (!q) {
3701
- var e = this.options.fallbackOnBody ? document.body : J, t = H(G, !0, Bo, !0, e), n = this.options;
3702
- if (Bo) {
3723
+ var e = this.options.fallbackOnBody ? document.body : J, t = H(G, !0, Ho, !0, e), n = this.options;
3724
+ if (Ho) {
3703
3725
  for (Z = e; V(Z, "position") === "static" && V(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
3704
- Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = Va()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = Va(), Io = Ka(Z);
3726
+ Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = Ua()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = Ua(), Ro = Ja(Z);
3705
3727
  }
3706
- q = G.cloneNode(!0), Ra(q, n.ghostClass, !1), Ra(q, n.fallbackClass, !0), Ra(q, n.dragClass, !0), V(q, "transition", ""), V(q, "transform", ""), V(q, "box-sizing", "border-box"), V(q, "margin", 0), V(q, "top", t.top), V(q, "left", t.left), V(q, "width", t.width), V(q, "height", t.height), V(q, "opacity", "0.8"), V(q, "position", Bo ? "absolute" : "fixed"), V(q, "zIndex", "100000"), V(q, "pointerEvents", "none"), Q.ghost = q, e.appendChild(q), V(q, "transform-origin", Oo / parseInt(q.style.width) * 100 + "% " + ko / parseInt(q.style.height) * 100 + "%");
3728
+ q = G.cloneNode(!0), B(q, n.ghostClass, !1), B(q, n.fallbackClass, !0), B(q, n.dragClass, !0), V(q, "transition", ""), V(q, "transform", ""), V(q, "box-sizing", "border-box"), V(q, "margin", 0), V(q, "top", t.top), V(q, "left", t.left), V(q, "width", t.width), V(q, "height", t.height), V(q, "opacity", "0.8"), V(q, "position", Ho ? "absolute" : "fixed"), V(q, "zIndex", "100000"), V(q, "pointerEvents", "none"), Q.ghost = q, e.appendChild(q), V(q, "transform-origin", Ao / parseInt(q.style.width) * 100 + "% " + jo / parseInt(q.style.height) * 100 + "%");
3707
3729
  }
3708
3730
  },
3709
3731
  _onDragStart: function(e, t) {
@@ -3712,18 +3734,18 @@ Q.prototype = {
3712
3734
  this._onDrop();
3713
3735
  return;
3714
3736
  }
3715
- U("setupClone", this), Q.eventCanceled || (Y = to(G), Y.removeAttribute("id"), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), Ra(Y, this.options.chosenClass, !1), Q.clone = Y), n.cloneId = cs(function() {
3737
+ U("setupClone", this), Q.eventCanceled || (Y = ro(G), Y.removeAttribute("id"), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), B(Y, this.options.chosenClass, !1), Q.clone = Y), n.cloneId = us(function() {
3716
3738
  U("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || J.insertBefore(Y, G), n._hideClone(), W({
3717
3739
  sortable: n,
3718
3740
  name: "clone"
3719
3741
  }));
3720
- }), !t && Ra(G, i.dragClass, !0), t ? (So = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (B(document, "mouseup", n._onDrop), B(document, "touchend", n._onDrop), B(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, G)), z(document, "drop", n), V(G, "transform", "translateZ(0)")), xo = !0, n._dragStartId = cs(n._dragStarted.bind(n, t, e)), z(document, "selectstart", n), Ao = !0, Aa && V(document.body, "user-select", "none");
3742
+ }), !t && B(G, i.dragClass, !0), t ? (wo = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (z(document, "mouseup", n._onDrop), z(document, "touchend", n._onDrop), z(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, G)), R(document, "drop", n), V(G, "transform", "translateZ(0)")), Co = !0, n._dragStartId = us(n._dragStarted.bind(n, t, e)), R(document, "selectstart", n), Mo = !0, Na && V(document.body, "user-select", "none");
3721
3743
  },
3722
3744
  _onDragOver: function(e) {
3723
- var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = bo === s, u = o.sort, d = X || c, f, p = this, m = !1;
3724
- if (Lo) return;
3745
+ var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = So === s, u = o.sort, d = X || c, f, p = this, m = !1;
3746
+ if (zo) return;
3725
3747
  function h(o, s) {
3726
- U(o, p, ya({
3748
+ U(o, p, Sa({
3727
3749
  evt: e,
3728
3750
  isOwner: l,
3729
3751
  axis: f ? "vertical" : "horizontal",
@@ -3735,7 +3757,7 @@ Q.prototype = {
3735
3757
  target: n,
3736
3758
  completed: _,
3737
3759
  onMove: function(n, i) {
3738
- return $o(J, t, G, r, n, H(n), e, i);
3760
+ return ts(J, t, G, r, n, H(n), e, i);
3739
3761
  },
3740
3762
  changed: v
3741
3763
  }, s));
@@ -3744,50 +3766,50 @@ Q.prototype = {
3744
3766
  h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
3745
3767
  }
3746
3768
  function _(r) {
3747
- return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (Ra(G, X ? X.options.ghostClass : c.options.ghostClass, !1), Ra(G, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
3769
+ return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (B(G, X ? X.options.ghostClass : c.options.ghostClass, !1), B(G, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
3748
3770
  h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
3749
- }), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (jo = null), !o.dragoverBubble && !e.rootEl && n !== document && (G.parentNode[ro]._isOutsideThisEl(e.target), !r && Xo(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
3771
+ }), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (No = null), !o.dragoverBubble && !e.rootEl && n !== document && (G.parentNode[ao]._isOutsideThisEl(e.target), !r && Qo(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
3750
3772
  }
3751
3773
  function v() {
3752
- _o = Ga(G), yo = Ga(G, o.draggable), W({
3774
+ yo = qa(G), xo = qa(G, o.draggable), W({
3753
3775
  sortable: p,
3754
3776
  name: "change",
3755
3777
  toEl: t,
3756
- newIndex: _o,
3757
- newDraggableIndex: yo,
3778
+ newIndex: yo,
3779
+ newDraggableIndex: xo,
3758
3780
  originalEvent: e
3759
3781
  });
3760
3782
  }
3761
- if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Ia(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
3783
+ if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = za(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
3762
3784
  if (G.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
3763
- if (So = !1, c && !o.disabled && (l ? u || (a = K !== J) : X === this || (this.lastPutMode = bo.checkPull(this, c, G, e)) && s.checkPut(this, c, G, e))) {
3785
+ if (wo = !1, c && !o.disabled && (l ? u || (a = K !== J) : X === this || (this.lastPutMode = So.checkPull(this, c, G, e)) && s.checkPut(this, c, G, e))) {
3764
3786
  if (f = this._getDirection(e, n) === "vertical", r = H(G), h("dragOverValid"), Q.eventCanceled) return m;
3765
- if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (po ? J.insertBefore(G, po) : J.appendChild(G)), _(!0);
3766
- var y = Wa(t, o.draggable);
3767
- if (!y || rs(e, f, this) && !y.animated) {
3787
+ if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (ho ? J.insertBefore(G, ho) : J.appendChild(G)), _(!0);
3788
+ var y = Ka(t, o.draggable);
3789
+ if (!y || as(e, f, this) && !y.animated) {
3768
3790
  if (y === G) return _(!1);
3769
- if (y && t === e.target && (n = y), n && (i = H(n)), $o(J, t, G, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(G, y.nextSibling) : t.appendChild(G), K = t, v(), _(!0);
3770
- } else if (y && ns(e, f, this)) {
3771
- var b = Ua(t, 0, o, !0);
3791
+ if (y && t === e.target && (n = y), n && (i = H(n)), ts(J, t, G, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(G, y.nextSibling) : t.appendChild(G), K = t, v(), _(!0);
3792
+ } else if (y && is(e, f, this)) {
3793
+ var b = Ga(t, 0, o, !0);
3772
3794
  if (b === G) return _(!1);
3773
- if (n = b, i = H(n), $o(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
3795
+ if (n = b, i = H(n), ts(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
3774
3796
  } else if (n.parentNode === t) {
3775
3797
  i = H(n);
3776
- var x = 0, S, C = G.parentNode !== t, w = !Go(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Ha(n, "top", "top") || Ha(G, "top", "top"), D = E ? E.scrollTop : void 0;
3777
- jo !== n && (S = i[T], No = !1, Po = !w && o.invertSwap || C), x = is(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Po, jo === n);
3798
+ var x = 0, S, C = G.parentNode !== t, w = !qo(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Wa(n, "top", "top") || Wa(G, "top", "top"), D = E ? E.scrollTop : void 0;
3799
+ No !== n && (S = i[T], Fo = !1, Io = !w && o.invertSwap || C), x = os(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Io, No === n);
3778
3800
  var O;
3779
3801
  if (x !== 0) {
3780
- var k = Ga(G);
3802
+ var k = qa(G);
3781
3803
  do
3782
3804
  k -= x, O = K.children[k];
3783
3805
  while (O && (V(O, "display") === "none" || O === q));
3784
3806
  }
3785
3807
  if (x === 0 || O === n) return _(!1);
3786
- jo = n, Mo = x;
3787
- var A = n.nextElementSibling, j = !1;
3788
- j = x === 1;
3789
- var M = $o(J, t, G, r, n, i, e, j);
3790
- if (M !== !1) return (M === 1 || M === -1) && (j = M === 1), Lo = !0, setTimeout(ts, 30), g(), j && !A ? t.appendChild(G) : n.parentNode.insertBefore(G, j ? A : n), E && eo(E, 0, D - E.scrollTop), K = G.parentNode, S !== void 0 && !Po && (Fo = Math.abs(S - H(n)[T])), v(), _(!0);
3808
+ No = n, Po = x;
3809
+ var A = n.nextElementSibling, ee = !1;
3810
+ ee = x === 1;
3811
+ var j = ts(J, t, G, r, n, i, e, ee);
3812
+ if (j !== !1) return (j === 1 || j === -1) && (ee = j === 1), zo = !0, setTimeout(rs, 30), g(), ee && !A ? t.appendChild(G) : n.parentNode.insertBefore(G, ee ? A : n), E && no(E, 0, D - E.scrollTop), K = G.parentNode, S !== void 0 && !Io && (Lo = Math.abs(S - H(n)[T])), v(), _(!0);
3791
3813
  }
3792
3814
  if (t.contains(G)) return _(!1);
3793
3815
  }
@@ -3795,26 +3817,26 @@ Q.prototype = {
3795
3817
  },
3796
3818
  _ignoreWhileAnimating: null,
3797
3819
  _offMoveEvents: function() {
3798
- B(document, "mousemove", this._onTouchMove), B(document, "touchmove", this._onTouchMove), B(document, "pointermove", this._onTouchMove), B(document, "dragover", Xo), B(document, "mousemove", Xo), B(document, "touchmove", Xo);
3820
+ z(document, "mousemove", this._onTouchMove), z(document, "touchmove", this._onTouchMove), z(document, "pointermove", this._onTouchMove), z(document, "dragover", Qo), z(document, "mousemove", Qo), z(document, "touchmove", Qo);
3799
3821
  },
3800
3822
  _offUpEvents: function() {
3801
3823
  var e = this.el.ownerDocument;
3802
- B(e, "mouseup", this._onDrop), B(e, "touchend", this._onDrop), B(e, "pointerup", this._onDrop), B(e, "touchcancel", this._onDrop), B(document, "selectstart", this);
3824
+ z(e, "mouseup", this._onDrop), z(e, "touchend", this._onDrop), z(e, "pointerup", this._onDrop), z(e, "touchcancel", this._onDrop), z(document, "selectstart", this);
3803
3825
  },
3804
3826
  _onDrop: function(e) {
3805
3827
  var t = this.el, n = this.options;
3806
- if (_o = Ga(G), yo = Ga(G, n.draggable), U("drop", this, { evt: e }), K = G && G.parentNode, _o = Ga(G), yo = Ga(G, n.draggable), Q.eventCanceled) {
3828
+ if (yo = qa(G), xo = qa(G, n.draggable), U("drop", this, { evt: e }), K = G && G.parentNode, yo = qa(G), xo = qa(G, n.draggable), Q.eventCanceled) {
3807
3829
  this._nulling();
3808
3830
  return;
3809
3831
  }
3810
- xo = !1, Po = !1, No = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), ls(this.cloneId), ls(this._dragStartId), this.nativeDraggable && (B(document, "drop", this), B(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Aa && V(document.body, "user-select", ""), V(G, "transform", ""), e && (Ao && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), q && q.parentNode && q.parentNode.removeChild(q), (J === K || X && X.lastPutMode !== "clone") && Y && Y.parentNode && Y.parentNode.removeChild(Y), G && (this.nativeDraggable && B(G, "dragend", this), es(G), G.style["will-change"] = "", Ao && !xo && Ra(G, X ? X.options.ghostClass : this.options.ghostClass, !1), Ra(G, this.options.chosenClass, !1), W({
3832
+ Co = !1, Io = !1, Fo = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), ds(this.cloneId), ds(this._dragStartId), this.nativeDraggable && (z(document, "drop", this), z(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Na && V(document.body, "user-select", ""), V(G, "transform", ""), e && (Mo && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), q && q.parentNode && q.parentNode.removeChild(q), (J === K || X && X.lastPutMode !== "clone") && Y && Y.parentNode && Y.parentNode.removeChild(Y), G && (this.nativeDraggable && z(G, "dragend", this), ns(G), G.style["will-change"] = "", Mo && !Co && B(G, X ? X.options.ghostClass : this.options.ghostClass, !1), B(G, this.options.chosenClass, !1), W({
3811
3833
  sortable: this,
3812
3834
  name: "unchoose",
3813
3835
  toEl: K,
3814
3836
  newIndex: null,
3815
3837
  newDraggableIndex: null,
3816
3838
  originalEvent: e
3817
- }), J === K ? _o !== go && _o >= 0 && (W({
3839
+ }), J === K ? yo !== vo && yo >= 0 && (W({
3818
3840
  sortable: this,
3819
3841
  name: "update",
3820
3842
  toEl: K,
@@ -3824,7 +3846,7 @@ Q.prototype = {
3824
3846
  name: "sort",
3825
3847
  toEl: K,
3826
3848
  originalEvent: e
3827
- })) : (_o >= 0 && (W({
3849
+ })) : (yo >= 0 && (W({
3828
3850
  rootEl: K,
3829
3851
  name: "add",
3830
3852
  toEl: K,
@@ -3846,7 +3868,7 @@ Q.prototype = {
3846
3868
  name: "sort",
3847
3869
  toEl: K,
3848
3870
  originalEvent: e
3849
- })), X && X.save()), Q.active && ((_o == null || _o === -1) && (_o = go, yo = vo), W({
3871
+ })), X && X.save()), Q.active && ((yo == null || yo === -1) && (yo = vo, xo = bo), W({
3850
3872
  sortable: this,
3851
3873
  name: "end",
3852
3874
  toEl: K,
@@ -3854,9 +3876,9 @@ Q.prototype = {
3854
3876
  }), this.save()))), this._nulling();
3855
3877
  },
3856
3878
  _nulling: function() {
3857
- U("nulling", this), J = G = K = q = po = Y = mo = ho = wo = To = Ao = _o = yo = go = vo = jo = Mo = X = bo = Q.dragged = Q.ghost = Q.clone = Q.active = null, Ro.forEach(function(e) {
3879
+ U("nulling", this), J = G = K = q = ho = Y = go = _o = Eo = Do = Mo = yo = xo = vo = bo = No = Po = X = So = Q.dragged = Q.ghost = Q.clone = Q.active = null, Bo.forEach(function(e) {
3858
3880
  e.checked = !0;
3859
- }), Ro.length = Eo = Do = 0;
3881
+ }), Bo.length = Oo = ko = 0;
3860
3882
  },
3861
3883
  handleEvent: function(e) {
3862
3884
  switch (e.type) {
@@ -3866,20 +3888,20 @@ Q.prototype = {
3866
3888
  break;
3867
3889
  case "dragenter":
3868
3890
  case "dragover":
3869
- G && (this._onDragOver(e), Qo(e));
3891
+ G && (this._onDragOver(e), es(e));
3870
3892
  break;
3871
3893
  case "selectstart": e.preventDefault();
3872
3894
  }
3873
3895
  },
3874
3896
  toArray: function() {
3875
- for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Ia(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || os(t));
3897
+ for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], za(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || cs(t));
3876
3898
  return e;
3877
3899
  },
3878
3900
  sort: function(e, t) {
3879
3901
  var n = {}, r = this.el;
3880
3902
  this.toArray().forEach(function(e, t) {
3881
3903
  var i = r.children[t];
3882
- Ia(i, this.options.draggable, r, !1) && (n[e] = i);
3904
+ za(i, this.options.draggable, r, !1) && (n[e] = i);
3883
3905
  }, this), t && this.captureAnimationState(), e.forEach(function(e) {
3884
3906
  n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
3885
3907
  }), t && this.animateAll();
@@ -3889,25 +3911,25 @@ Q.prototype = {
3889
3911
  e && e.set && e.set(this);
3890
3912
  },
3891
3913
  closest: function(e, t) {
3892
- return Ia(e, t || this.options.draggable, this.el, !1);
3914
+ return za(e, t || this.options.draggable, this.el, !1);
3893
3915
  },
3894
3916
  option: function(e, t) {
3895
3917
  var n = this.options;
3896
3918
  if (t === void 0) return n[e];
3897
- var r = lo.modifyOption(this, e, t);
3898
- n[e] = r === void 0 ? t : r, e === "group" && qo(n);
3919
+ var r = fo.modifyOption(this, e, t);
3920
+ n[e] = r === void 0 ? t : r, e === "group" && Yo(n);
3899
3921
  },
3900
3922
  destroy: function() {
3901
3923
  U("destroy", this);
3902
3924
  var e = this.el;
3903
- e[ro] = null, B(e, "mousedown", this._onTapStart), B(e, "touchstart", this._onTapStart), B(e, "pointerdown", this._onTapStart), this.nativeDraggable && (B(e, "dragover", this), B(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
3925
+ e[ao] = null, z(e, "mousedown", this._onTapStart), z(e, "touchstart", this._onTapStart), z(e, "pointerdown", this._onTapStart), this.nativeDraggable && (z(e, "dragover", this), z(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
3904
3926
  e.removeAttribute("draggable");
3905
- }), this._onDrop(), this._disableDelayedDragEvents(), Co.splice(Co.indexOf(this.el), 1), this.el = e = null;
3927
+ }), this._onDrop(), this._disableDelayedDragEvents(), To.splice(To.indexOf(this.el), 1), this.el = e = null;
3906
3928
  },
3907
3929
  _hideClone: function() {
3908
- if (!ho) {
3930
+ if (!_o) {
3909
3931
  if (U("hideClone", this), Q.eventCanceled) return;
3910
- V(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), ho = !0;
3932
+ V(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), _o = !0;
3911
3933
  }
3912
3934
  },
3913
3935
  _showClone: function(e) {
@@ -3915,99 +3937,99 @@ Q.prototype = {
3915
3937
  this._hideClone();
3916
3938
  return;
3917
3939
  }
3918
- if (ho) {
3940
+ if (_o) {
3919
3941
  if (U("showClone", this), Q.eventCanceled) return;
3920
- G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) : po ? J.insertBefore(Y, po) : J.appendChild(Y), this.options.group.revertClone && this.animate(G, Y), V(Y, "display", ""), ho = !1;
3942
+ G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) : ho ? J.insertBefore(Y, ho) : J.appendChild(Y), this.options.group.revertClone && this.animate(G, Y), V(Y, "display", ""), _o = !1;
3921
3943
  }
3922
3944
  }
3923
3945
  };
3924
- function Qo(e) {
3946
+ function es(e) {
3925
3947
  e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
3926
3948
  }
3927
- function $o(e, t, n, r, i, a, o, s) {
3928
- var c, l = e[ro], u = l.options.onMove, d;
3929
- return window.CustomEvent && !Da && !Oa ? c = new CustomEvent("move", {
3949
+ function ts(e, t, n, r, i, a, o, s) {
3950
+ var c, l = e[ao], u = l.options.onMove, d;
3951
+ return window.CustomEvent && !Aa && !ja ? c = new CustomEvent("move", {
3930
3952
  bubbles: !0,
3931
3953
  cancelable: !0
3932
3954
  }) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || H(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
3933
3955
  }
3934
- function es(e) {
3956
+ function ns(e) {
3935
3957
  e.draggable = !1;
3936
3958
  }
3937
- function ts() {
3938
- Lo = !1;
3959
+ function rs() {
3960
+ zo = !1;
3939
3961
  }
3940
- function ns(e, t, n) {
3941
- var r = H(Ua(n.el, 0, n.options, !0)), i = no(n.el, n.options, q), a = 10;
3962
+ function is(e, t, n) {
3963
+ var r = H(Ga(n.el, 0, n.options, !0)), i = io(n.el, n.options, q), a = 10;
3942
3964
  return t ? e.clientX < i.left - a || e.clientY < r.top && e.clientX < r.right : e.clientY < i.top - a || e.clientY < r.bottom && e.clientX < r.left;
3943
3965
  }
3944
- function rs(e, t, n) {
3945
- var r = H(Wa(n.el, n.options.draggable)), i = no(n.el, n.options, q), a = 10;
3966
+ function as(e, t, n) {
3967
+ var r = H(Ka(n.el, n.options.draggable)), i = io(n.el, n.options, q), a = 10;
3946
3968
  return t ? e.clientX > i.right + a || e.clientY > r.bottom && e.clientX > r.left : e.clientY > i.bottom + a || e.clientX > r.right && e.clientY > r.top;
3947
3969
  }
3948
- function is(e, t, n, r, i, a, o, s) {
3970
+ function os(e, t, n, r, i, a, o, s) {
3949
3971
  var c = r ? e.clientY : e.clientX, l = r ? n.height : n.width, u = r ? n.top : n.left, d = r ? n.bottom : n.right, f = !1;
3950
3972
  if (!o) {
3951
- if (s && Fo < l * i) {
3952
- if (!No && (Mo === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (No = !0), No) f = !0;
3953
- else if (Mo === 1 ? c < u + Fo : c > d - Fo) return -Mo;
3954
- } else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return as(t);
3973
+ if (s && Lo < l * i) {
3974
+ if (!Fo && (Po === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Fo = !0), Fo) f = !0;
3975
+ else if (Po === 1 ? c < u + Lo : c > d - Lo) return -Po;
3976
+ } else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return ss(t);
3955
3977
  }
3956
3978
  return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
3957
3979
  }
3958
- function as(e) {
3959
- return Ga(G) < Ga(e) ? 1 : -1;
3980
+ function ss(e) {
3981
+ return qa(G) < qa(e) ? 1 : -1;
3960
3982
  }
3961
- function os(e) {
3983
+ function cs(e) {
3962
3984
  for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
3963
3985
  return r.toString(36);
3964
3986
  }
3965
- function ss(e) {
3966
- Ro.length = 0;
3987
+ function ls(e) {
3988
+ Bo.length = 0;
3967
3989
  for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
3968
3990
  var r = t[n];
3969
- r.checked && Ro.push(r);
3991
+ r.checked && Bo.push(r);
3970
3992
  }
3971
3993
  }
3972
- function cs(e) {
3994
+ function us(e) {
3973
3995
  return setTimeout(e, 0);
3974
3996
  }
3975
- function ls(e) {
3997
+ function ds(e) {
3976
3998
  return clearTimeout(e);
3977
3999
  }
3978
- zo && z(document, "touchmove", function(e) {
3979
- (Q.active || xo) && e.cancelable && e.preventDefault();
4000
+ Vo && R(document, "touchmove", function(e) {
4001
+ (Q.active || Co) && e.cancelable && e.preventDefault();
3980
4002
  }), Q.utils = {
3981
- on: z,
3982
- off: B,
4003
+ on: R,
4004
+ off: z,
3983
4005
  css: V,
3984
- find: Ba,
4006
+ find: Ha,
3985
4007
  is: function(e, t) {
3986
- return !!Ia(e, t, e, !1);
4008
+ return !!za(e, t, e, !1);
3987
4009
  },
3988
- extend: Ya,
3989
- throttle: Qa,
3990
- closest: Ia,
3991
- toggleClass: Ra,
3992
- clone: to,
3993
- index: Ga,
3994
- nextTick: cs,
3995
- cancelNextTick: ls,
3996
- detectDirection: Wo,
3997
- getChild: Ua
4010
+ extend: Za,
4011
+ throttle: eo,
4012
+ closest: za,
4013
+ toggleClass: B,
4014
+ clone: ro,
4015
+ index: qa,
4016
+ nextTick: us,
4017
+ cancelNextTick: ds,
4018
+ detectDirection: Ko,
4019
+ getChild: Ga
3998
4020
  }, Q.get = function(e) {
3999
- return e[ro];
4021
+ return e[ao];
4000
4022
  }, Q.mount = function() {
4001
4023
  var e = [...arguments];
4002
4024
  e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
4003
4025
  if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
4004
- e.utils && (Q.utils = ya(ya({}, Q.utils), e.utils)), lo.mount(e);
4026
+ e.utils && (Q.utils = Sa(Sa({}, Q.utils), e.utils)), fo.mount(e);
4005
4027
  });
4006
4028
  }, Q.create = function(e, t) {
4007
4029
  return new Q(e, t);
4008
- }, Q.version = Ta;
4009
- var $ = [], us, ds, fs = !1, ps, ms, hs, gs;
4010
- function _s() {
4030
+ }, Q.version = Oa;
4031
+ var $ = [], fs, ps, ms = !1, hs, gs, _s, vs;
4032
+ function ys() {
4011
4033
  function e() {
4012
4034
  for (var e in this.defaults = {
4013
4035
  scroll: !0,
@@ -4020,70 +4042,70 @@ function _s() {
4020
4042
  return e.prototype = {
4021
4043
  dragStarted: function(e) {
4022
4044
  var t = e.originalEvent;
4023
- this.sortable.nativeDraggable ? z(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? z(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? z(document, "touchmove", this._handleFallbackAutoScroll) : z(document, "mousemove", this._handleFallbackAutoScroll);
4045
+ this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? R(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? R(document, "touchmove", this._handleFallbackAutoScroll) : R(document, "mousemove", this._handleFallbackAutoScroll);
4024
4046
  },
4025
4047
  dragOverCompleted: function(e) {
4026
4048
  var t = e.originalEvent;
4027
4049
  !this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
4028
4050
  },
4029
4051
  drop: function() {
4030
- this.sortable.nativeDraggable ? B(document, "dragover", this._handleAutoScroll) : (B(document, "pointermove", this._handleFallbackAutoScroll), B(document, "touchmove", this._handleFallbackAutoScroll), B(document, "mousemove", this._handleFallbackAutoScroll)), ys(), vs(), $a();
4052
+ this.sortable.nativeDraggable ? z(document, "dragover", this._handleAutoScroll) : (z(document, "pointermove", this._handleFallbackAutoScroll), z(document, "touchmove", this._handleFallbackAutoScroll), z(document, "mousemove", this._handleFallbackAutoScroll)), xs(), bs(), to();
4031
4053
  },
4032
4054
  nulling: function() {
4033
- hs = ds = us = fs = gs = ps = ms = null, $.length = 0;
4055
+ _s = ps = fs = ms = vs = hs = gs = null, $.length = 0;
4034
4056
  },
4035
4057
  _handleFallbackAutoScroll: function(e) {
4036
4058
  this._handleAutoScroll(e, !0);
4037
4059
  },
4038
4060
  _handleAutoScroll: function(e, t) {
4039
4061
  var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
4040
- if (hs = e, t || this.options.forceAutoScrollFallback || Oa || Da || Aa) {
4041
- bs(e, this.options, a, t);
4042
- var o = Ja(a, !0);
4043
- fs && (!gs || r !== ps || i !== ms) && (gs && ys(), gs = setInterval(function() {
4044
- var a = Ja(document.elementFromPoint(r, i), !0);
4045
- a !== o && (o = a, vs()), bs(e, n.options, a, t);
4046
- }, 10), ps = r, ms = i);
4062
+ if (_s = e, t || this.options.forceAutoScrollFallback || ja || Aa || Na) {
4063
+ Ss(e, this.options, a, t);
4064
+ var o = Xa(a, !0);
4065
+ ms && (!vs || r !== hs || i !== gs) && (vs && xs(), vs = setInterval(function() {
4066
+ var a = Xa(document.elementFromPoint(r, i), !0);
4067
+ a !== o && (o = a, bs()), Ss(e, n.options, a, t);
4068
+ }, 10), hs = r, gs = i);
4047
4069
  } else {
4048
- if (!this.options.bubbleScroll || Ja(a, !0) === Va()) {
4049
- vs();
4070
+ if (!this.options.bubbleScroll || Xa(a, !0) === Ua()) {
4071
+ bs();
4050
4072
  return;
4051
4073
  }
4052
- bs(e, this.options, Ja(a, !1), !1);
4074
+ Ss(e, this.options, Xa(a, !1), !1);
4053
4075
  }
4054
4076
  }
4055
- }, Sa(e, {
4077
+ }, Ta(e, {
4056
4078
  pluginName: "scroll",
4057
4079
  initializeByDefault: !0
4058
4080
  });
4059
4081
  }
4060
- function vs() {
4082
+ function bs() {
4061
4083
  $.forEach(function(e) {
4062
4084
  clearInterval(e.pid);
4063
4085
  }), $ = [];
4064
4086
  }
4065
- function ys() {
4066
- clearInterval(gs);
4087
+ function xs() {
4088
+ clearInterval(vs);
4067
4089
  }
4068
- var bs = Qa(function(e, t, n, r) {
4090
+ var Ss = eo(function(e, t, n, r) {
4069
4091
  if (t.scroll) {
4070
- var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Va(), l = !1, u;
4071
- ds !== n && (ds = n, vs(), us = t.scroll, u = t.scrollFn, us === !0 && (us = Ja(n, !0)));
4072
- var d = 0, f = us;
4092
+ var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Ua(), l = !1, u;
4093
+ ps !== n && (ps = n, bs(), fs = t.scroll, u = t.scrollFn, fs === !0 && (fs = Xa(n, !0)));
4094
+ var d = 0, f = fs;
4073
4095
  do {
4074
4096
  var p = f, m = H(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = V(p), E = p.scrollLeft, D = p.scrollTop;
4075
4097
  p === c ? (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll" || T.overflowX === "visible"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll" || T.overflowY === "visible")) : (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll"));
4076
4098
  var O = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), k = S && (Math.abs(g - a) <= o && D + b < w) - (Math.abs(h - a) <= o && !!D);
4077
4099
  if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
4078
4100
  ($[d].vx != O || $[d].vy != k || $[d].el !== p) && ($[d].el = p, $[d].vx = O, $[d].vy = k, clearInterval($[d].pid), (O != 0 || k != 0) && (l = !0, $[d].pid = setInterval(function() {
4079
- r && this.layer === 0 && Q.active._onTouchMove(hs);
4101
+ r && this.layer === 0 && Q.active._onTouchMove(_s);
4080
4102
  var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
4081
- typeof u == "function" && u.call(Q.dragged.parentNode[ro], n, t, e, hs, $[this.layer].el) !== "continue" || eo($[this.layer].el, n, t);
4103
+ typeof u == "function" && u.call(Q.dragged.parentNode[ao], n, t, e, _s, $[this.layer].el) !== "continue" || no($[this.layer].el, n, t);
4082
4104
  }.bind({ layer: d }), 24))), d++;
4083
- } while (t.bubbleScroll && f !== c && (f = Ja(f, !1)));
4084
- fs = l;
4105
+ } while (t.bubbleScroll && f !== c && (f = Xa(f, !1)));
4106
+ ms = l;
4085
4107
  }
4086
- }, 30), xs = function(e) {
4108
+ }, 30), Cs = function(e) {
4087
4109
  var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
4088
4110
  if (t) {
4089
4111
  var c = n || i;
@@ -4095,8 +4117,8 @@ var bs = Qa(function(e, t, n, r) {
4095
4117
  }));
4096
4118
  }
4097
4119
  };
4098
- function Ss() {}
4099
- Ss.prototype = {
4120
+ function ws() {}
4121
+ ws.prototype = {
4100
4122
  startIndex: null,
4101
4123
  dragStart: function(e) {
4102
4124
  var t = e.oldDraggableIndex;
@@ -4105,72 +4127,72 @@ Ss.prototype = {
4105
4127
  onSpill: function(e) {
4106
4128
  var t = e.dragEl, n = e.putSortable;
4107
4129
  this.sortable.captureAnimationState(), n && n.captureAnimationState();
4108
- var r = Ua(this.sortable.el, this.startIndex, this.options);
4130
+ var r = Ga(this.sortable.el, this.startIndex, this.options);
4109
4131
  r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
4110
4132
  },
4111
- drop: xs
4112
- }, Sa(Ss, { pluginName: "revertOnSpill" });
4113
- function Cs() {}
4114
- Cs.prototype = {
4133
+ drop: Cs
4134
+ }, Ta(ws, { pluginName: "revertOnSpill" });
4135
+ function Ts() {}
4136
+ Ts.prototype = {
4115
4137
  onSpill: function(e) {
4116
4138
  var t = e.dragEl, n = e.putSortable || this.sortable;
4117
4139
  n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
4118
4140
  },
4119
- drop: xs
4120
- }, Sa(Cs, { pluginName: "removeOnSpill" }), Q.mount(new _s()), Q.mount(Cs, Ss);
4121
- function ws(e) {
4141
+ drop: Cs
4142
+ }, Ta(Ts, { pluginName: "removeOnSpill" }), Q.mount(new ys()), Q.mount(Ts, ws);
4143
+ function Es(e) {
4122
4144
  return e == null ? e : JSON.parse(JSON.stringify(e));
4123
4145
  }
4124
- function Ts(e) {
4125
- te() && l(e);
4146
+ function Ds(e) {
4147
+ ne() && l(e);
4126
4148
  }
4127
- function Es(e) {
4128
- te() ? n(e) : m(e);
4149
+ function Os(e) {
4150
+ ne() ? n(e) : m(e);
4129
4151
  }
4130
- var Ds = null, Os = null;
4131
- function ks(e = null, t = null) {
4132
- Ds = e, Os = t;
4152
+ var ks = null, As = null;
4153
+ function js(e = null, t = null) {
4154
+ ks = e, As = t;
4133
4155
  }
4134
- function As() {
4156
+ function Ms() {
4135
4157
  return {
4136
- data: Ds,
4137
- clonedData: Os
4158
+ data: ks,
4159
+ clonedData: As
4138
4160
  };
4139
4161
  }
4140
- var js = Symbol("cloneElement");
4141
- function Ms(...e) {
4142
- let t = te()?.proxy, n = null, r = e[0], [, i, o] = e;
4143
- Array.isArray(P(i)) || (o = i, i = null);
4144
- let c = null, { immediate: l = !0, clone: u = ws, forceFallback: d, fallbackOnBody: f, customUpdate: p } = P(o) ?? {};
4162
+ var Ns = Symbol("cloneElement");
4163
+ function Ps(...e) {
4164
+ let t = ne()?.proxy, n = null, r = e[0], [, i, o] = e;
4165
+ Array.isArray(N(i)) || (o = i, i = null);
4166
+ let c = null, { immediate: l = !0, clone: u = Es, forceFallback: d, fallbackOnBody: f, customUpdate: p } = N(o) ?? {};
4145
4167
  function h(e) {
4146
4168
  let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
4147
4169
  n = d && !f ? o.slice(0, -1) : o;
4148
- let s = P(P(i)?.[r]), c = u(s);
4149
- ks(s, c), a[js] = c;
4170
+ let s = N(N(i)?.[r]), c = u(s);
4171
+ js(s, c), a[Ns] = c;
4150
4172
  }
4151
4173
  function g(e) {
4152
- let t = e.item[js];
4153
- if (!sa(t)) {
4154
- if (ua(e.item), a(i)) {
4155
- let n = [...P(i)];
4156
- i.value = oa(n, e.newDraggableIndex, t);
4174
+ let t = e.item[Ns];
4175
+ if (!ua(t)) {
4176
+ if (pa(e.item), a(i)) {
4177
+ let n = [...N(i)];
4178
+ i.value = la(n, e.newDraggableIndex, t);
4157
4179
  return;
4158
4180
  }
4159
- oa(P(i), e.newDraggableIndex, t);
4181
+ la(N(i), e.newDraggableIndex, t);
4160
4182
  }
4161
4183
  }
4162
4184
  function _(e) {
4163
4185
  let { from: t, item: n, oldIndex: r, oldDraggableIndex: o, pullMode: s, clone: c } = e;
4164
- if (la(t, n, r), s === "clone") {
4165
- ua(c);
4186
+ if (fa(t, n, r), s === "clone") {
4187
+ pa(c);
4166
4188
  return;
4167
4189
  }
4168
4190
  if (a(i)) {
4169
- let e = [...P(i)];
4170
- i.value = aa(e, o);
4191
+ let e = [...N(i)];
4192
+ i.value = ca(e, o);
4171
4193
  return;
4172
4194
  }
4173
- aa(P(i), o);
4195
+ ca(N(i), o);
4174
4196
  }
4175
4197
  function v(e) {
4176
4198
  if (p) {
@@ -4178,12 +4200,12 @@ function Ms(...e) {
4178
4200
  return;
4179
4201
  }
4180
4202
  let { from: t, item: n, oldIndex: r, oldDraggableIndex: o, newDraggableIndex: s } = e;
4181
- if (ua(n), la(t, n, r), a(i)) {
4182
- let e = [...P(i)];
4183
- i.value = na(e, o, s);
4203
+ if (pa(n), fa(t, n, r), a(i)) {
4204
+ let e = [...N(i)];
4205
+ i.value = aa(e, o, s);
4184
4206
  return;
4185
4207
  }
4186
- na(P(i), o, s);
4208
+ aa(N(i), o, s);
4187
4209
  }
4188
4210
  function y(e) {
4189
4211
  let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
@@ -4202,7 +4224,7 @@ function Ms(...e) {
4202
4224
  n = null;
4203
4225
  }
4204
4226
  m(() => {
4205
- if (ks(), o) throw o;
4227
+ if (js(), o) throw o;
4206
4228
  });
4207
4229
  }
4208
4230
  let b = {
@@ -4213,20 +4235,20 @@ function Ms(...e) {
4213
4235
  onEnd: y
4214
4236
  };
4215
4237
  function x(e) {
4216
- let n = P(r);
4217
- return e ||= ca(n) ? da(n, t?.$el) : n, e && !ma(e) && (e = e.$el), e || ta("Root element not found"), e;
4238
+ let n = N(r);
4239
+ return e ||= da(n) ? ma(n, t?.$el) : n, e && !_a(e) && (e = e.$el), e || ia("Root element not found"), e;
4218
4240
  }
4219
4241
  function S() {
4220
- let e = P(o) ?? {}, { immediate: t, clone: n } = e, r = Qi(e, ["immediate", "clone"]);
4221
- return ha(r, (e, t) => {
4222
- ga(e) && (r[e] = (e, ...n) => (_a(e, As()), t(e, ...n)));
4223
- }), pa(i === null ? {} : b, r);
4242
+ let e = N(o) ?? {}, { immediate: t, clone: n } = e, r = ta(e, ["immediate", "clone"]);
4243
+ return va(r, (e, t) => {
4244
+ ya(e) && (r[e] = (e, ...n) => (ba(e, Ms()), t(e, ...n)));
4245
+ }), ga(i === null ? {} : b, r);
4224
4246
  }
4225
4247
  let C = (e) => {
4226
4248
  e = x(e), c && w.destroy(), c = new Q(e, S());
4227
4249
  };
4228
4250
  s(() => o, () => {
4229
- c && ha(S(), (e, t) => {
4251
+ c && va(S(), (e, t) => {
4230
4252
  c?.option(e, t);
4231
4253
  });
4232
4254
  }, { deep: !0 });
@@ -4239,15 +4261,15 @@ function Ms(...e) {
4239
4261
  toArray: () => c?.toArray(),
4240
4262
  closest: (...e) => c?.closest(...e)
4241
4263
  };
4242
- return Es(() => {
4264
+ return Os(() => {
4243
4265
  l && C();
4244
- }), Ts(w.destroy), Zi({
4266
+ }), Ds(w.destroy), ea({
4245
4267
  start: C,
4246
4268
  pause: () => w?.option("disabled", !0),
4247
4269
  resume: () => w?.option("disabled", !1)
4248
4270
  }, w);
4249
4271
  }
4250
- var Ns = [
4272
+ var Fs = [
4251
4273
  "update",
4252
4274
  "start",
4253
4275
  "add",
@@ -4260,7 +4282,7 @@ var Ns = [
4260
4282
  "clone",
4261
4283
  "move",
4262
4284
  "change"
4263
- ], Ps = [
4285
+ ], Is = [
4264
4286
  "clone",
4265
4287
  "animation",
4266
4288
  "ghostClass",
@@ -4304,43 +4326,43 @@ var Ns = [
4304
4326
  "tag",
4305
4327
  "target",
4306
4328
  "customUpdate",
4307
- ...Ns.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
4308
- ], Fs = L({
4329
+ ...Fs.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
4330
+ ], Ls = I({
4309
4331
  name: "VueDraggable",
4310
4332
  model: {
4311
4333
  prop: "modelValue",
4312
4334
  event: "update:modelValue"
4313
4335
  },
4314
- props: Ps,
4315
- emits: ["update:modelValue", ...Ns],
4336
+ props: Is,
4337
+ emits: ["update:modelValue", ...Fs],
4316
4338
  setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
4317
- let a = Ns.reduce((e, t) => {
4339
+ let a = Fs.reduce((e, t) => {
4318
4340
  let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
4319
4341
  return e[r] = (...e) => n(t, ...e), e;
4320
- }, {}), s = F(() => {
4321
- let t = C(e), { modelValue: n } = t, r = Qi(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
4322
- let r = P(n);
4342
+ }, {}), s = P(() => {
4343
+ let t = C(e), { modelValue: n } = t, r = ta(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
4344
+ let r = N(n);
4323
4345
  return r !== void 0 && (e[t] = r), e;
4324
4346
  }, {});
4325
- return Zi(Zi({}, a), ia(Zi(Zi({}, i), o)));
4326
- }), c = F({
4347
+ return ea(ea({}, a), sa(ea(ea({}, i), o)));
4348
+ }), c = P({
4327
4349
  get: () => e.modelValue,
4328
4350
  set: (e) => n("update:modelValue", e)
4329
- }), l = _(), u = o(Ms(e.target || l, c, s));
4351
+ }), l = _(), u = o(Ps(e.target || l, c, s));
4330
4352
  return r(u), () => b(e.tag || "div", { ref: l }, (t?.default)?.call(t, u));
4331
4353
  }
4332
- }), Is = {
4354
+ }), Rs = {
4333
4355
  mounted: "mounted",
4334
4356
  unmounted: "unmounted"
4335
4357
  };
4336
- Is.mounted, Is.unmounted;
4358
+ Rs.mounted, Rs.unmounted;
4337
4359
  //#endregion
4338
4360
  //#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
4339
- var Ls = { class: "tpl:w-full" }, Rs = {
4361
+ var zs = { class: "tpl:w-full" }, Bs = {
4340
4362
  key: 0,
4341
4363
  "data-testid": "section-drop-hint",
4342
4364
  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)]"
4343
- }, zs = /* @__PURE__ */ L({
4365
+ }, Vs = /* @__PURE__ */ I({
4344
4366
  __name: "SectionBlock",
4345
4367
  props: {
4346
4368
  block: {},
@@ -4348,13 +4370,13 @@ var Ls = { class: "tpl:w-full" }, Rs = {
4348
4370
  },
4349
4371
  setup(e) {
4350
4372
  let n = {
4351
- title: Wi,
4352
- paragraph: Ti,
4353
- image: fi,
4354
- button: tr,
4355
- divider: Kr,
4356
- custom: Wr
4357
- }, i = e, { t: a } = Lt(), o = mt(St, "SectionBlock"), s = p(yt, null), c = p(At, null), l = p(vt, {}), f = p(kt, null);
4373
+ title: qi,
4374
+ paragraph: Oi,
4375
+ image: hi,
4376
+ button: ir,
4377
+ divider: Yr,
4378
+ custom: qr
4379
+ }, i = e, { t: a } = Rt(), o = ht(Ct, "SectionBlock"), s = p(bt, null), c = p(jt, null), l = p(yt, {}), f = p(At, null);
4358
4380
  function m(e) {
4359
4381
  let t = l.savedBlocks;
4360
4382
  if (t?.isPicking.value) {
@@ -4363,7 +4385,7 @@ var Ls = { class: "tpl:w-full" }, Rs = {
4363
4385
  }
4364
4386
  o.selectBlock(e);
4365
4387
  }
4366
- let h = F(() => {
4388
+ let h = P(() => {
4367
4389
  switch (i.block.columns) {
4368
4390
  case "2": return ["50%", "50%"];
4369
4391
  case "3": return [
@@ -4375,11 +4397,11 @@ var Ls = { class: "tpl:w-full" }, Rs = {
4375
4397
  case "2-1": return ["66.67%", "33.33%"];
4376
4398
  default: return ["100%"];
4377
4399
  }
4378
- }), g = F(() => {
4400
+ }), g = P(() => {
4379
4401
  let e = h.value.length, t = [...i.block.children];
4380
4402
  for (; t.length < e;) t.push([]);
4381
4403
  return t.slice(0, e);
4382
- }), _ = F(() => i.viewport === "mobile" && i.block.stackOnMobile !== !1);
4404
+ }), _ = P(() => i.viewport === "mobile" && i.block.stackOnMobile !== !1);
4383
4405
  function v(e) {
4384
4406
  return g.value[e] || [];
4385
4407
  }
@@ -4389,7 +4411,7 @@ var Ls = { class: "tpl:w-full" }, Rs = {
4389
4411
  r[e] = n, o.updateBlock(i.block.id, { children: r });
4390
4412
  }
4391
4413
  function b(e) {
4392
- return Di(e, c, n);
4414
+ return Ai(e, c, n);
4393
4415
  }
4394
4416
  function C(e, t) {
4395
4417
  e.type === "custom" && o.updateBlock(e.id, {
@@ -4397,16 +4419,16 @@ var Ls = { class: "tpl:w-full" }, Rs = {
4397
4419
  dataSourceFetched: t.dataSourceFetched
4398
4420
  });
4399
4421
  }
4400
- return (n, i) => (O(), S("div", Ls, [x("div", { class: r(["tpl:flex tpl:gap-0", { "tpl:flex-col": _.value }]) }, [(O(!0), S(N, null, D(g.value, (n, i) => (O(), S("div", {
4422
+ return (n, i) => (O(), S("div", zs, [x("div", { class: r(["tpl:flex tpl:gap-0", { "tpl:flex-col": _.value }]) }, [(O(!0), S(M, null, D(g.value, (n, i) => (O(), S("div", {
4401
4423
  key: i,
4402
4424
  class: r(["tpl:relative tpl:min-h-[60px] tpl:rounded", v(i).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
4403
4425
  style: u({ width: _.value ? "100%" : h.value[i] })
4404
- }, [w(P(Fs), {
4426
+ }, [w(N(Ls), {
4405
4427
  "model-value": v(i),
4406
4428
  group: {
4407
4429
  name: "blocks",
4408
4430
  pull: !0,
4409
- put: (e, t, n) => P(Gi)(n)
4431
+ put: (e, t, n) => N(Ji)(n)
4410
4432
  },
4411
4433
  animation: 150,
4412
4434
  "ghost-class": "tpl-ghost",
@@ -4419,19 +4441,19 @@ var Ls = { class: "tpl:w-full" }, Rs = {
4419
4441
  class: "tpl:min-h-[60px]",
4420
4442
  "onUpdate:modelValue": (e) => y(i, e)
4421
4443
  }, {
4422
- default: ne(() => [(O(!0), S(N, null, D(v(i), (n) => t((O(), S("div", { key: n.id }, [w(Hi, {
4444
+ default: re(() => [(O(!0), S(M, null, D(v(i), (n) => t((O(), S("div", { key: n.id }, [w(Gi, {
4423
4445
  block: n,
4424
- "is-selected": P(o).state.selectedBlockId === n.id,
4446
+ "is-selected": N(o).state.selectedBlockId === n.id,
4425
4447
  viewport: e.viewport,
4426
- "preview-mode": P(o).state.previewMode,
4448
+ "preview-mode": N(o).state.previewMode,
4427
4449
  nested: "",
4428
4450
  onSelect: (e) => m(n.id)
4429
4451
  }, {
4430
- default: ne(() => [(O(), A(d(b(n)), {
4452
+ default: re(() => [(O(), A(d(b(n)), {
4431
4453
  block: n,
4432
4454
  viewport: e.viewport,
4433
4455
  onFetchData: (e) => C(n, e),
4434
- onUpdate: (e) => P(o).updateBlock(n.id, e)
4456
+ onUpdate: (e) => N(o).updateBlock(n.id, e)
4435
4457
  }, null, 40, [
4436
4458
  "block",
4437
4459
  "viewport",
@@ -4445,19 +4467,19 @@ var Ls = { class: "tpl:w-full" }, Rs = {
4445
4467
  "viewport",
4446
4468
  "preview-mode",
4447
4469
  "onSelect"
4448
- ])])), [[re, P(f) === !1 || !P(s)?.isHidden(n.id)]])), 128))]),
4470
+ ])])), [[ie, N(f) === !1 || !N(s)?.isHidden(n.id)]])), 128))]),
4449
4471
  _: 2
4450
4472
  }, 1032, [
4451
4473
  "model-value",
4452
4474
  "group",
4453
4475
  "onUpdate:modelValue"
4454
- ]), v(i).length === 0 ? (O(), S("div", Rs, [x("span", null, k(P(a).section.dropHere), 1)])) : I("", !0)], 6))), 128))], 2)]));
4476
+ ]), v(i).length === 0 ? (O(), S("div", Bs, [x("span", null, k(N(a).section.dropHere), 1)])) : F("", !0)], 6))), 128))], 2)]));
4455
4477
  }
4456
- }), Bs = ke, Vs = {
4478
+ }), Hs = Ae, Us = {
4457
4479
  small: 24,
4458
4480
  medium: 32,
4459
4481
  large: 48
4460
- }, Hs = [
4482
+ }, Ws = [
4461
4483
  "facebook",
4462
4484
  "twitter",
4463
4485
  "instagram",
@@ -4475,11 +4497,11 @@ var Ls = { class: "tpl:w-full" }, Rs = {
4475
4497
  "github",
4476
4498
  "dribbble",
4477
4499
  "behance"
4478
- ], Us = [
4500
+ ], Gs = [
4479
4501
  "width",
4480
4502
  "height",
4481
4503
  "fill"
4482
- ], Ws = ["d"], Gs = /* @__PURE__ */ L({
4504
+ ], Ks = ["d"], qs = /* @__PURE__ */ I({
4483
4505
  __name: "SocialIconSvg",
4484
4506
  props: {
4485
4507
  platform: {},
@@ -4487,7 +4509,7 @@ var Ls = { class: "tpl:w-full" }, Rs = {
4487
4509
  iconSize: {}
4488
4510
  },
4489
4511
  setup(e) {
4490
- let t = e, n = F(() => Bs[t.platform]), r = F(() => Vs[t.iconSize]), i = F(() => {
4512
+ let t = e, n = P(() => Hs[t.platform]), r = P(() => Us[t.iconSize]), i = P(() => {
4491
4513
  let e = {
4492
4514
  display: "inline-flex",
4493
4515
  alignItems: "center",
@@ -4524,40 +4546,40 @@ var Ls = { class: "tpl:w-full" }, Rs = {
4524
4546
  };
4525
4547
  default: return e;
4526
4548
  }
4527
- }), a = F(() => Math.floor(r.value * .6)), o = F(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
4549
+ }), a = P(() => Math.floor(r.value * .6)), o = P(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
4528
4550
  return (e, t) => (O(), S("span", { style: u(i.value) }, [(O(), S("svg", {
4529
4551
  width: a.value,
4530
4552
  height: a.value,
4531
4553
  viewBox: "0 0 24 24",
4532
4554
  fill: o.value,
4533
4555
  xmlns: "http://www.w3.org/2000/svg"
4534
- }, [x("path", { d: n.value.path }, null, 8, Ws)], 8, Us))], 4));
4556
+ }, [x("path", { d: n.value.path }, null, 8, Ks)], 8, Gs))], 4));
4535
4557
  }
4536
- }), Ks = { class: "tpl:w-full" }, qs = ["href"], Js = {
4558
+ }), Js = { class: "tpl:w-full" }, Ys = ["href"], Xs = {
4537
4559
  key: 1,
4538
4560
  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)]"
4539
- }, Ys = /* @__PURE__ */ L({
4561
+ }, Zs = /* @__PURE__ */ I({
4540
4562
  __name: "SocialIconsBlock",
4541
4563
  props: {
4542
4564
  block: {},
4543
4565
  viewport: {}
4544
4566
  },
4545
4567
  setup(e) {
4546
- let t = e, { t: n } = Lt(), r = F(() => ({
4568
+ let t = e, { t: n } = Rt(), r = P(() => ({
4547
4569
  display: "flex",
4548
4570
  flexWrap: "wrap",
4549
4571
  gap: `${t.block.spacing}px`,
4550
4572
  justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
4551
- })), i = F(() => t.block.icons.length > 0);
4552
- return (t, a) => (O(), S("div", Ks, [i.value ? (O(), S("div", {
4573
+ })), i = P(() => t.block.icons.length > 0);
4574
+ return (t, a) => (O(), S("div", Js, [i.value ? (O(), S("div", {
4553
4575
  key: 0,
4554
4576
  style: u(r.value)
4555
- }, [(O(!0), S(N, null, D(e.block.icons, (t) => (O(), S("a", {
4577
+ }, [(O(!0), S(M, null, D(e.block.icons, (t) => (O(), S("a", {
4556
4578
  key: t.id,
4557
4579
  href: t.url || "#",
4558
4580
  class: "tpl:cursor-default",
4559
- onClick: a[0] ||= R(() => {}, ["prevent"])
4560
- }, [w(Gs, {
4581
+ onClick: a[0] ||= L(() => {}, ["prevent"])
4582
+ }, [w(qs, {
4561
4583
  platform: t.platform,
4562
4584
  "icon-style": e.block.iconStyle,
4563
4585
  "icon-size": e.block.iconSize
@@ -4565,44 +4587,44 @@ var Ls = { class: "tpl:w-full" }, Rs = {
4565
4587
  "platform",
4566
4588
  "icon-style",
4567
4589
  "icon-size"
4568
- ])], 8, qs))), 128))], 4)) : (O(), S("div", Js, [w(P(fr), { size: 16 }), x("span", null, k(P(n).social.addIcons), 1)]))]));
4590
+ ])], 8, Ys))), 128))], 4)) : (O(), S("div", Xs, [w(N(hr), { size: 16 }), x("span", null, k(N(n).social.addIcons), 1)]))]));
4569
4591
  }
4570
- }), Xs = { class: "tpl:w-full" }, Zs = {
4592
+ }), Qs = { class: "tpl:w-full" }, $s = {
4571
4593
  key: 0,
4572
4594
  class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
4573
4595
  style: {
4574
4596
  "background-color": "var(--tpl-bg-hover)",
4575
4597
  color: "var(--tpl-text-dim)"
4576
4598
  }
4577
- }, Qs = /* @__PURE__ */ L({
4599
+ }, ec = /* @__PURE__ */ I({
4578
4600
  __name: "SpacerBlock",
4579
4601
  props: {
4580
4602
  block: {},
4581
4603
  viewport: {}
4582
4604
  },
4583
4605
  setup(e) {
4584
- let t = e, n = mt(St, "SpacerBlock"), i = F(() => ({
4606
+ let t = e, n = ht(Ct, "SpacerBlock"), i = P(() => ({
4585
4607
  height: `${t.block.height}px`,
4586
4608
  minHeight: `${t.block.height}px`,
4587
4609
  ...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
4588
4610
  }));
4589
- return (t, a) => (O(), S("div", Xs, [x("div", {
4611
+ return (t, a) => (O(), S("div", Qs, [x("div", {
4590
4612
  style: u(i.value),
4591
- class: r(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !P(n).state.previewMode }])
4592
- }, [P(n).state.previewMode ? I("", !0) : (O(), S("span", Zs, k(e.block.height) + "px ", 1))], 6)]));
4613
+ class: r(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !N(n).state.previewMode }])
4614
+ }, [N(n).state.previewMode ? F("", !0) : (O(), S("span", $s, k(e.block.height) + "px ", 1))], 6)]));
4593
4615
  }
4594
- }), $s = { class: "tpl:w-full" }, ec = { key: 0 }, tc = [
4616
+ }), tc = { class: "tpl:w-full" }, nc = { key: 0 }, rc = [
4595
4617
  "aria-label",
4596
4618
  "data-placeholder",
4597
4619
  "onBlur"
4598
- ], nc = [
4620
+ ], ic = [
4599
4621
  "aria-label",
4600
4622
  "data-placeholder",
4601
4623
  "onBlur"
4602
- ], rc = {
4624
+ ], ac = {
4603
4625
  key: 1,
4604
4626
  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)]"
4605
- }, ic = /*#__PURE__*/ Zt(/* @__PURE__ */ L({
4627
+ }, oc = /*#__PURE__*/ Qt(/* @__PURE__ */ I({
4606
4628
  __name: "TableBlock",
4607
4629
  props: {
4608
4630
  block: {},
@@ -4616,7 +4638,7 @@ var Ls = { class: "tpl:w-full" }, Rs = {
4616
4638
  updated(e, t) {
4617
4639
  t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
4618
4640
  }
4619
- }, r = e, { t: i } = Lt(), a = mt(St, "TableBlock"), o = F(() => r.block.rows.length > 0), s = F(() => {
4641
+ }, r = e, { t: i } = Rt(), a = ht(Ct, "TableBlock"), o = P(() => r.block.rows.length > 0), s = P(() => {
4620
4642
  let e = {
4621
4643
  width: "100%",
4622
4644
  borderCollapse: "collapse",
@@ -4625,15 +4647,15 @@ var Ls = { class: "tpl:w-full" }, Rs = {
4625
4647
  fontFamily: r.block.fontFamily || "inherit"
4626
4648
  };
4627
4649
  return r.block.color && (e.color = r.block.color), e;
4628
- }), c = F(() => ({
4650
+ }), c = P(() => ({
4629
4651
  border: `${r.block.borderWidth}px solid ${r.block.borderColor}`,
4630
4652
  padding: `${r.block.cellPadding}px`,
4631
4653
  textAlign: r.block.textAlign
4632
- })), l = F(() => ({
4654
+ })), l = P(() => ({
4633
4655
  ...c.value,
4634
4656
  fontWeight: "bold",
4635
4657
  backgroundColor: r.block.headerBackgroundColor || "transparent"
4636
- })), d = F(() => r.block.hasHeaderRow && r.block.rows.length > 0 ? r.block.rows[0] : null), f = F(() => r.block.hasHeaderRow ? r.block.rows.slice(1) : r.block.rows);
4658
+ })), d = P(() => r.block.hasHeaderRow && r.block.rows.length > 0 ? r.block.rows[0] : null), f = P(() => r.block.hasHeaderRow ? r.block.rows.slice(1) : r.block.rows);
4637
4659
  function p() {
4638
4660
  a.selectBlock(r.block.id);
4639
4661
  }
@@ -4647,31 +4669,31 @@ var Ls = { class: "tpl:w-full" }, Rs = {
4647
4669
  } : n);
4648
4670
  a.updateBlock(r.block.id, { rows: o });
4649
4671
  }
4650
- return (e, r) => (O(), S("div", $s, [o.value ? (O(), S("table", {
4672
+ return (e, r) => (O(), S("div", tc, [o.value ? (O(), S("table", {
4651
4673
  key: 0,
4652
4674
  style: u(s.value),
4653
4675
  class: "tpl-table-editable"
4654
- }, [d.value ? (O(), S("thead", ec, [x("tr", null, [(O(!0), S(N, null, D(d.value.cells, (e) => t((O(), S("th", {
4676
+ }, [d.value ? (O(), S("thead", nc, [x("tr", null, [(O(!0), S(M, null, D(d.value.cells, (e) => t((O(), S("th", {
4655
4677
  key: e.id,
4656
4678
  style: u(l.value),
4657
- "aria-label": P(i).table.cellPlaceholder,
4679
+ "aria-label": N(i).table.cellPlaceholder,
4658
4680
  contenteditable: "true",
4659
- "data-placeholder": P(i).table.cellPlaceholder,
4681
+ "data-placeholder": N(i).table.cellPlaceholder,
4660
4682
  onBlur: (t) => m(d.value.id, e.id, t),
4661
- onKeydown: r[0] ||= ie(R((e) => e.target.blur(), ["prevent"]), ["enter"]),
4662
- onClick: R(p, ["stop"])
4663
- }, null, 44, tc)), [[n, e.content]])), 128))])])) : I("", !0), x("tbody", null, [(O(!0), S(N, null, D(f.value, (e) => (O(), S("tr", { key: e.id }, [(O(!0), S(N, null, D(e.cells, (a) => t((O(), S("td", {
4683
+ onKeydown: r[0] ||= ae(L((e) => e.target.blur(), ["prevent"]), ["enter"]),
4684
+ onClick: L(p, ["stop"])
4685
+ }, null, 44, rc)), [[n, e.content]])), 128))])])) : F("", !0), x("tbody", null, [(O(!0), S(M, null, D(f.value, (e) => (O(), S("tr", { key: e.id }, [(O(!0), S(M, null, D(e.cells, (a) => t((O(), S("td", {
4664
4686
  key: a.id,
4665
4687
  style: u(c.value),
4666
- "aria-label": P(i).table.cellPlaceholder,
4688
+ "aria-label": N(i).table.cellPlaceholder,
4667
4689
  contenteditable: "true",
4668
- "data-placeholder": P(i).table.cellPlaceholder,
4690
+ "data-placeholder": N(i).table.cellPlaceholder,
4669
4691
  onBlur: (t) => m(e.id, a.id, t),
4670
- onKeydown: r[1] ||= ie(R((e) => e.target.blur(), ["prevent"]), ["enter"]),
4671
- onClick: R(p, ["stop"])
4672
- }, null, 44, nc)), [[n, a.content]])), 128))]))), 128))])], 4)) : (O(), S("div", rc, [w(P(pr), { size: 16 }), x("span", null, k(P(i).table.empty), 1)]))]));
4692
+ onKeydown: r[1] ||= ae(L((e) => e.target.blur(), ["prevent"]), ["enter"]),
4693
+ onClick: L(p, ["stop"])
4694
+ }, null, 44, ic)), [[n, a.content]])), 128))]))), 128))])], 4)) : (O(), S("div", ac, [w(N(gr), { size: 16 }), x("span", null, k(N(i).table.empty), 1)]))]));
4673
4695
  }
4674
- }), [["__scopeId", "data-v-963ac422"]]), ac = /* @__PURE__ */ L({
4696
+ }), [["__scopeId", "data-v-963ac422"]]), sc = /* @__PURE__ */ I({
4675
4697
  __name: "VideoPlayButton",
4676
4698
  props: { hoverEffect: {
4677
4699
  type: Boolean,
@@ -4689,7 +4711,7 @@ var Ls = { class: "tpl:w-full" }, Rs = {
4689
4711
  });
4690
4712
  //#endregion
4691
4713
  //#region src/utils/videoThumbnail.ts
4692
- function oc(e) {
4714
+ function cc(e) {
4693
4715
  if (!e) return {
4694
4716
  platform: "unknown",
4695
4717
  videoId: null,
@@ -4721,25 +4743,25 @@ function oc(e) {
4721
4743
  thumbnailUrl: null
4722
4744
  };
4723
4745
  }
4724
- function sc(e, t) {
4725
- return t || oc(e).thumbnailUrl;
4746
+ function lc(e, t) {
4747
+ return t || cc(e).thumbnailUrl;
4726
4748
  }
4727
4749
  //#endregion
4728
4750
  //#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
4729
- var cc = ["src", "alt"], lc = {
4751
+ var uc = ["src", "alt"], dc = {
4730
4752
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
4731
4753
  style: { opacity: "0.7" }
4732
- }, uc = ["href"], dc = ["src", "alt"], fc = ["src", "alt"], pc = {
4754
+ }, fc = ["href"], pc = ["src", "alt"], mc = ["src", "alt"], hc = {
4733
4755
  key: 3,
4734
4756
  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)]"
4735
- }, mc = /* @__PURE__ */ L({
4757
+ }, gc = /* @__PURE__ */ I({
4736
4758
  __name: "VideoBlock",
4737
4759
  props: {
4738
4760
  block: {},
4739
4761
  viewport: {}
4740
4762
  },
4741
4763
  setup(e) {
4742
- let t = e, { t: n } = Lt(), { syntax: r } = $t(), i = F(() => we(t.block.url, r) || we(t.block.thumbnailUrl, r)), a = On(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = On(() => i.value ? t.block.placeholderUrl : void 0), s = F(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : sc(t.block.url)), c = F(() => ({ textAlign: t.block.align })), l = F(() => {
4764
+ let t = e, { t: n } = Rt(), { syntax: r } = en(), i = P(() => Te(t.block.url, r) || Te(t.block.thumbnailUrl, r)), a = jn(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = jn(() => i.value ? t.block.placeholderUrl : void 0), s = P(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : lc(t.block.url)), c = P(() => ({ textAlign: t.block.align })), l = P(() => {
4743
4765
  let e = t.block.align;
4744
4766
  return {
4745
4767
  maxWidth: "100%",
@@ -4749,7 +4771,7 @@ var cc = ["src", "alt"], lc = {
4749
4771
  marginLeft: e === "center" || e === "right" ? "auto" : void 0,
4750
4772
  marginRight: e === "center" ? "auto" : void 0
4751
4773
  };
4752
- }), d = F(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = F(() => we(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
4774
+ }), d = P(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = P(() => Te(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
4753
4775
  return (t, r) => (O(), S("div", {
4754
4776
  class: "tpl:w-full",
4755
4777
  style: u(c.value)
@@ -4759,32 +4781,32 @@ var cc = ["src", "alt"], lc = {
4759
4781
  style: u(l.value)
4760
4782
  }, [x("img", {
4761
4783
  class: "tpl:w-full tpl:border-0",
4762
- src: P(o),
4784
+ src: N(o),
4763
4785
  alt: e.block.alt,
4764
4786
  style: u(d.value)
4765
- }, null, 12, cc), w(ac)], 4)) : i.value ? (O(), S("div", {
4787
+ }, null, 12, uc), w(sc)], 4)) : i.value ? (O(), S("div", {
4766
4788
  key: 1,
4767
4789
  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)]",
4768
4790
  style: u([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, l.value])
4769
- }, [w(P(mr), {
4791
+ }, [w(N(_r), {
4770
4792
  size: 36,
4771
4793
  "stroke-width": 1.5,
4772
4794
  class: "tpl:text-[var(--tpl-primary)]",
4773
4795
  style: { opacity: "0.5" }
4774
- }), x("span", lc, [w($n, { text: f.value }, null, 8, ["text"])])], 4)) : s.value ? (O(), S(N, { key: 2 }, [e.block.url ? (O(), S("a", {
4796
+ }), x("span", dc, [w(nr, { text: f.value }, null, 8, ["text"])])], 4)) : s.value ? (O(), S(M, { key: 2 }, [e.block.url ? (O(), S("a", {
4775
4797
  key: 0,
4776
4798
  href: e.block.url,
4777
4799
  target: "_blank",
4778
4800
  rel: "noopener noreferrer",
4779
4801
  class: "tpl:group tpl:relative tpl:inline-block",
4780
4802
  style: u(l.value),
4781
- onClick: r[0] ||= R(() => {}, ["prevent"])
4803
+ onClick: r[0] ||= L(() => {}, ["prevent"])
4782
4804
  }, [x("img", {
4783
4805
  class: "tpl:w-full tpl:border-0",
4784
4806
  src: s.value,
4785
4807
  alt: e.block.alt,
4786
4808
  style: u(d.value)
4787
- }, null, 12, dc), w(ac, { "hover-effect": "" })], 12, uc)) : (O(), S("div", {
4809
+ }, null, 12, pc), w(sc, { "hover-effect": "" })], 12, fc)) : (O(), S("div", {
4788
4810
  key: 1,
4789
4811
  class: "tpl:relative tpl:inline-block",
4790
4812
  style: u(l.value)
@@ -4793,51 +4815,51 @@ var cc = ["src", "alt"], lc = {
4793
4815
  src: s.value,
4794
4816
  alt: e.block.alt,
4795
4817
  style: u(d.value)
4796
- }, null, 12, fc), w(ac)], 4))], 64)) : (O(), S("div", pc, [w(P(mr), {
4818
+ }, null, 12, mc), w(sc)], 4))], 64)) : (O(), S("div", hc, [w(N(_r), {
4797
4819
  size: 40,
4798
4820
  "stroke-width": 1.5,
4799
4821
  class: "tpl:text-[var(--tpl-border-light)]"
4800
- }), x("span", null, k(P(n).video.addVideo), 1)]))], 4));
4801
- }
4802
- }), hc = {
4803
- section: zs,
4804
- title: Wi,
4805
- paragraph: Ti,
4806
- image: fi,
4807
- button: tr,
4808
- divider: Kr,
4809
- video: mc,
4810
- social: Ys,
4811
- menu: gi,
4812
- table: ic,
4813
- spacer: Qs,
4814
- html: Qr,
4815
- countdown: y(() => import("./CountdownBlock-Drr1WErd.js"))
4822
+ }), x("span", null, k(N(n).video.addVideo), 1)]))], 4));
4823
+ }
4824
+ }), _c = {
4825
+ section: Vs,
4826
+ title: qi,
4827
+ paragraph: Oi,
4828
+ image: hi,
4829
+ button: ir,
4830
+ divider: Yr,
4831
+ video: gc,
4832
+ social: Zs,
4833
+ menu: yi,
4834
+ table: oc,
4835
+ spacer: ec,
4836
+ html: ti,
4837
+ countdown: y(() => import("./CountdownBlock-BgNK7fZY.js"))
4816
4838
  };
4817
- function gc(t) {
4818
- let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } = Lt(i);
4839
+ function vc(t) {
4840
+ let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } = Rt(i);
4819
4841
  n.setUiTheme(r.uiTheme ?? "auto");
4820
- let { resolvedTheme: l } = In(F(() => n.state.uiTheme)), u = _(r.theme ?? {}), { themeStyles: d } = Rn({
4842
+ let { resolvedTheme: l } = zn(P(() => n.state.uiTheme)), u = _(r.theme ?? {}), { themeStyles: d } = Vn({
4821
4843
  themeOverrides: u,
4822
4844
  resolvedTheme: l,
4823
4845
  extraStyles: () => ({
4824
4846
  "--tpl-drop-text": `"${i.canvas.dropHere}"`,
4825
4847
  ...t.themeExtraStyles?.()
4826
4848
  })
4827
- }), f = sn({
4849
+ }), f = un({
4828
4850
  content: n.content,
4829
4851
  setContent: (e, t) => n.setContent(e, t),
4830
4852
  ...t.historyOptions
4831
4853
  });
4832
- mn(n, f);
4833
- let p = ln({
4854
+ _n(n, f);
4855
+ let p = fn({
4834
4856
  addBlock: n.addBlock,
4835
4857
  removeBlock: n.removeBlock,
4836
4858
  updateBlock: n.updateBlock,
4837
4859
  selectBlock: n.selectBlock,
4838
4860
  findBlockLocation: n.findBlockLocation,
4839
4861
  blockDefaults: r.blockDefaults
4840
- }), m = fn(n), g = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? dn({
4862
+ }), m = hn(n), g = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? mn({
4841
4863
  content: n.content,
4842
4864
  isDirty: () => n.state.isDirty,
4843
4865
  ...t.autoSaveOptions
@@ -4845,28 +4867,28 @@ function gc(t) {
4845
4867
  g && (v = s(f.isNavigating, (e) => {
4846
4868
  e ? g.pause() : g.resume();
4847
4869
  }));
4848
- let y = Fn(n, {
4870
+ let y = Rn(n, {
4849
4871
  t: o,
4850
4872
  format: c
4851
- }, r.customBlocks ?? []), b = Vt(r.colors);
4852
- if (b.allowCustomIgnored && Rt.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 && Rt.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
4853
- let e = qn(b.presets, r.blockDefaults, r.templateDefaults);
4854
- e.length > 0 && Rt.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.`);
4873
+ }, r.customBlocks ?? []), b = Ht(r.colors);
4874
+ if (b.allowCustomIgnored && zt.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 && zt.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
4875
+ let e = Xn(b.presets, r.blockDefaults, r.templateDefaults);
4876
+ e.length > 0 && zt.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.`);
4855
4877
  }
4856
- let x = zn();
4857
- Wn(x, hc);
4878
+ let x = Hn();
4879
+ qn(x, _c);
4858
4880
  let S = /* @__PURE__ */ new Set();
4859
4881
  function C(e) {
4860
4882
  for (let t of e) {
4861
- x.registerCustom(t, Wr);
4862
- for (let e of Yn(t, b)) S.has(e.id) || (S.add(e.id), Rt.warn(e.message));
4883
+ x.registerCustom(t, qr);
4884
+ for (let e of Qn(t, b)) S.has(e.id) || (S.add(e.id), zt.warn(e.message));
4863
4885
  }
4864
4886
  }
4865
4887
  r.customBlocks?.length && C(r.customBlocks);
4866
- let w = wn();
4867
- if (h() && M(w.dispose), t.containerEl) {
4888
+ let w = Dn();
4889
+ if (h() && j(w.dispose), t.containerEl) {
4868
4890
  let e = t.containerEl;
4869
- Ye(document, "pointerdown", (t) => {
4891
+ Xe(document, "pointerdown", (t) => {
4870
4892
  let n = e.value;
4871
4893
  n && (t.composedPath?.() ?? []).includes(n) && w.claim();
4872
4894
  }, { capture: !0 });
@@ -4880,7 +4902,7 @@ function gc(t) {
4880
4902
  g?.flush();
4881
4903
  }
4882
4904
  function E(e) {
4883
- w.isActive() && Zn(e, {
4905
+ w.isActive() && er(e, {
4884
4906
  history: f,
4885
4907
  selectBlock: (e) => n.selectBlock(e),
4886
4908
  getSelectedBlockId: () => n.state.selectedBlockId,
@@ -4892,33 +4914,33 @@ function gc(t) {
4892
4914
  onCancelPick: () => t.capabilities?.savedBlocks?.cancelPicking()
4893
4915
  });
4894
4916
  }
4895
- Ye(document, "keydown", E);
4917
+ Xe(document, "keydown", E);
4896
4918
  let D = _(null);
4897
- e(xt, t.editorRoot ?? document), e(lt, D), e(pt, i), e(St, n), e(Mt, f), e(gt, p), e(yt, m), e(ht, a), e($e, d), e(it, l), e(Dt, r.blockDefaults), e(At, x), e(bt, r.customBlocks ?? []), e(st, r.paletteBlocks), e(Ft, Gn(r.htmlBlockPreview)), e(jt, b), e(Ot, Bn(n.content, x));
4898
- let O = _e(r.mergeTags?.syntax);
4899
- e(dt, r.mergeTags?.tags ?? []), e(wt, O), e(ot, r.mergeTags?.onRequest ?? null), e(nt, r.mergeTags?.autocomplete !== !1);
4900
- let k = _(Ae(r.mergeTags?.tags ?? []));
4901
- e(ct, k);
4902
- let A = En({
4919
+ e(St, t.editorRoot ?? document), e(ut, D), e(mt, i), e(Ct, n), e(Nt, f), e(_t, p), e(bt, m), e(gt, a), e(et, d), e(at, l), e(Ot, r.blockDefaults), e(jt, x), e(xt, r.customBlocks ?? []), e(ct, r.paletteBlocks), e(It, Jn(r.htmlBlockPreview)), e(Mt, b), e(kt, Un(n.content, x));
4920
+ let O = ve(r.mergeTags?.syntax);
4921
+ e(ft, r.mergeTags?.tags ?? []), e(Tt, O), e(st, r.mergeTags?.onRequest ?? null), e(rt, r.mergeTags?.autocomplete !== !1);
4922
+ let k = _(je(r.mergeTags?.tags ?? []));
4923
+ e(lt, k);
4924
+ let A = kn({
4903
4925
  resolvePreview: r.resolvePreview,
4904
4926
  getContent: () => n.content.value,
4905
4927
  isActive: () => n.state.previewMode
4906
4928
  });
4907
- e(rt, A), e(at, r.resolvePreview);
4908
- let j = F(() => !(n.state.previewMode && A.isConfigured));
4909
- e(kt, j);
4910
- let N = kn();
4911
- e(tt, N), e(et, r.logicTags?.tags ?? []), e(ut, r.logicTags?.pairs ?? []), e(Qe, r.logicTags?.onRequest ?? null), e(Nt, An()), e(Ct, r.onRequestMedia ?? null), e(_t, r.resolveImageUrl ? Dn(r.resolveImageUrl) : null), e(Tt, r.displayConditions?.conditions ?? []), e(Et, r.displayConditions?.allowCustom ?? !1), e(vt, t.capabilities ?? {}), e(Pt, y);
4912
- let P = jn(r.lint) ? null : Mn({
4929
+ e(it, A), e(ot, r.resolvePreview);
4930
+ let ee = P(() => !(n.state.previewMode && A.isConfigured));
4931
+ e(At, ee);
4932
+ let M = Mn();
4933
+ e(nt, M), e(tt, r.logicTags?.tags ?? []), e(dt, r.logicTags?.pairs ?? []), e($e, r.logicTags?.onRequest ?? null), e(Pt, Nn()), e(wt, r.onRequestMedia ?? null), e(vt, r.resolveImageUrl ? An(r.resolveImageUrl) : null), e(Et, r.displayConditions?.conditions ?? []), e(Dt, r.displayConditions?.allowCustom ?? !1), e(yt, t.capabilities ?? {}), e(Ft, y);
4934
+ let N = Pn(r.lint) ? null : Fn({
4913
4935
  content: n.content,
4914
4936
  options: r.lint ?? {},
4915
4937
  updateBlock: n.updateBlock,
4916
4938
  updateSettings: n.updateSettings,
4917
4939
  removeBlock: n.removeBlock
4918
4940
  });
4919
- e(It, P);
4920
- function ee() {
4921
- v?.(), P?.destroy(), g?.destroy(), f.destroy();
4941
+ e(Lt, N);
4942
+ function te() {
4943
+ v?.(), N?.destroy(), g?.destroy(), f.destroy();
4922
4944
  }
4923
4945
  return {
4924
4946
  t: o,
@@ -4932,14 +4954,14 @@ function gc(t) {
4932
4954
  themeOverrides: u,
4933
4955
  registry: x,
4934
4956
  keyboardReorder: y,
4935
- templateLint: P,
4957
+ templateLint: N,
4936
4958
  popoverRoot: D,
4937
4959
  mergeTagSampleMode: k,
4938
4960
  previewResolution: A,
4939
- appliesConditionFilter: j,
4961
+ appliesConditionFilter: ee,
4940
4962
  registerCustomBlocks: C,
4941
- destroy: ee
4963
+ destroy: te
4942
4964
  };
4943
4965
  }
4944
4966
  //#endregion
4945
- export { fr as A, Pn as B, jr as C, yr as D, br as E, ar as F, bn as G, En as H, ir as I, nn as J, yn as K, nr as L, lr as M, cr as N, _r as O, or as P, tr as R, Nr as S, Tr as T, un as U, Nn as V, _n as W, vn as X, hn as Y, ei as _, Ys as a, Wr as b, Fs as c, Oi as d, Ei as f, fi as g, gi as h, Qs as i, ur as j, pr as k, Wi as l, Ti as m, mc as n, Hs as o, Di as p, pn as q, ic as r, zs as s, gc as t, Hi as u, Qr as v, Er as w, Fr as x, Kr as y, Jn as z };
4967
+ export { hr as A, Ln as B, Pr as C, Sr as D, Cr as E, cr as F, Cn as G, kn as H, sr as I, on as J, Sn as K, ar as L, fr as M, dr as N, br as O, lr as P, ir as R, Ir as S, Or as T, pn as U, In as V, bn as W, xn as X, vn as Y, ri as _, Zs as a, qr as b, Ls as c, ji as d, ki as f, hi as g, yi as h, ec as i, pr as j, gr as k, qi as l, Oi as m, gc as n, Ws as o, Ai as p, gn as q, oc as r, Vs as s, vc as t, Gi as u, ti as v, kr as w, Rr as x, Yr as y, Zn as z };