@templatical/editor 0.55.0 → 0.56.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 (299) hide show
  1. package/dist/{AiAltTextPopover-D5QosKvB.js → AiAltTextPopover-CpZ7UeAZ.js} +4 -4
  2. package/dist/{AiAltTextReview-D1W_lrI_.js → AiAltTextReview-LYxvn7Qe.js} +4 -4
  3. package/dist/{AiChatPanel-C8SeEJRP.js → AiChatPanel-Cy05P-iO.js} +56 -56
  4. package/dist/{AiPanels-CR6zphjP.js → AiPanels-CwKmXzyr.js} +1 -1
  5. package/dist/{AiRewriteMenu-BwztoMov.js → AiRewriteMenu-DgqJHnza.js} +13 -13
  6. package/dist/{BlockIssueBadge-DaPTq1RE.js → BlockIssueBadge-CxHJmuOh.js} +5 -5
  7. package/dist/BlockPreviewCanvas-DEmNZkEG.js +154 -0
  8. package/dist/{CloudHeaderExtras-XpjJjn3o.js → CloudHeaderExtras-Cqhw-jMz.js} +1 -1
  9. package/dist/{CloudPanels-Baoaj6Xf.js → CloudPanels-Bmlf05Il.js} +12 -12
  10. package/dist/{CollaborationNotices-Cnx0XHzZ.js → CollaborationNotices-C27GCMvK.js} +8 -8
  11. package/dist/{CollaboratorBar-BaBoNhwB.js → CollaboratorBar-CLQjksX-.js} +2 -2
  12. package/dist/{CommentsPanel-Ck3QmqiC.js → CommentsPanel-B5NqPMmY.js} +1 -1
  13. package/dist/{CommentsSidebar-CHknhOar.js → CommentsSidebar-BDrcrDxS.js} +42 -42
  14. package/dist/{CountdownBlock-BMezkFbJ.js → CountdownBlock-D8dqjm3F.js} +6 -6
  15. package/dist/{CountdownToolbar-CA_gDIdZ.js → CountdownToolbar-IjpCOjCd.js} +30 -30
  16. package/dist/{IssuesPanel-nmFhWG1p.js → IssuesPanel-uwuzeMSW.js} +89 -89
  17. package/dist/LanguageMenu-C-eQ0lFy.js +403 -0
  18. package/dist/{LocaleNotices-WzsYtBRs.js → LocaleNotices-CDK_9D7P.js} +10 -10
  19. package/dist/{LogicTagInsertButton-qZ82VMFx.js → LogicTagInsertButton-BSolF7Fd.js} +24 -24
  20. package/dist/{MediaEditModal-C3U9Mi31.js → MediaEditModal-C8yc9dxt.js} +7 -7
  21. package/dist/{MediaPanels-CGmk9ufe.js → MediaPanels-FI4I8asn.js} +1 -1
  22. package/dist/{MergeTagInput-JJeZbFkD.js → MergeTagInput-B1nl2ZMT.js} +12 -12
  23. package/dist/{MergeTagModeToggle-DDucd1eC.js → MergeTagModeToggle-DXvb80OE.js} +6 -6
  24. package/dist/{MergeTagTextarea-dQ2LRrNB.js → MergeTagTextarea-DJlf3VbS.js} +5 -5
  25. package/dist/{ParagraphEditor-VXYwGoz_.js → ParagraphEditor-Dqco128s.js} +173 -173
  26. package/dist/{RestoreVersionDialog-BibNvAaJ.js → RestoreVersionDialog-hqLCuGV5.js} +12 -12
  27. package/dist/{RichTextEditorContent-CU5EOlM_.js → RichTextEditorContent-xIEF0Y3Z.js} +8 -8
  28. package/dist/{SaveBlockDialog-S9aFi0cy.js → SaveBlockDialog-CQlCP_XC.js} +47 -47
  29. package/dist/{SavedBlocksBrowserModal-DIdn6B0J.js → SavedBlocksBrowserModal-BXA32Fx6.js} +24 -24
  30. package/dist/{SavedBlocksPanels-Cme2M6u8.js → SavedBlocksPanels-BKUzbamj.js} +1 -1
  31. package/dist/{SavedBlocksPickBar-BDmA7r3m.js → SavedBlocksPickBar-BlvF-4UF.js} +9 -9
  32. package/dist/{TemplateSettings-C_LHLm5M.js → TemplateSettings-CYFtR8zv.js} +41 -41
  33. package/dist/{TestEmailModal-CLIRn7eL.js → TestEmailModal-BbaL17HO.js} +20 -20
  34. package/dist/{TestEmailPanel-frdtjC8h.js → TestEmailPanel-DhB1CSpg.js} +1 -1
  35. package/dist/{TitleEditor-D5kC56Jl.js → TitleEditor-3BRl8u5l.js} +22 -22
  36. package/dist/{Toolbar-D904Yw_R.js → Toolbar-pzNIakGM.js} +1090 -856
  37. package/dist/{TplModal-BBdotDf1.js → TplModal-WNuWhHZm.js} +4 -4
  38. package/dist/{VersionHistoryMenu-BnP0EyLl.js → VersionHistoryMenu--T-Qp_mH.js} +17 -17
  39. package/dist/{VersionHistoryPanels-DhagEgOk.js → VersionHistoryPanels-BPubvYIE.js} +1 -1
  40. package/dist/{VersionPreviewBanner-BPP939cD.js → VersionPreviewBanner-ClL3Wkln.js} +7 -7
  41. package/dist/WrapperBlock-CjfCPceb.js +56 -0
  42. package/dist/{blockTypeIcons-CoRQV_hP.js → blockTypeIcons-12OMwVyN.js} +3 -3
  43. package/dist/bundle-stats.json +6 -6
  44. package/dist/{ca-DIkMxYCN.js → ca-BJn8lcJx.js} +8 -0
  45. package/dist/cdn/chunks/{AiAltTextPopover-CUGOPuRo.js → AiAltTextPopover-PFjTrl0y.js} +5 -5
  46. package/dist/cdn/chunks/{AiAltTextPopover-CUGOPuRo.js.map → AiAltTextPopover-PFjTrl0y.js.map} +1 -1
  47. package/dist/cdn/chunks/{AiAltTextReview-B9vm_L-8.js → AiAltTextReview-BMjzvApH.js} +5 -5
  48. package/dist/cdn/chunks/{AiAltTextReview-B9vm_L-8.js.map → AiAltTextReview-BMjzvApH.js.map} +1 -1
  49. package/dist/cdn/chunks/{AiChatPanel-By8Uo1nH.js → AiChatPanel-C2gpq4kP.js} +107 -107
  50. package/dist/cdn/chunks/{AiChatPanel-By8Uo1nH.js.map → AiChatPanel-C2gpq4kP.js.map} +1 -1
  51. package/dist/cdn/chunks/{AiPanels-BblCSkQy.js → AiPanels-Cx3PE2mE.js} +2 -2
  52. package/dist/cdn/chunks/{AiPanels-BblCSkQy.js.map → AiPanels-Cx3PE2mE.js.map} +1 -1
  53. package/dist/cdn/chunks/{AiRewriteMenu-BvV_7tNZ.js → AiRewriteMenu-CnkyjPEu.js} +13 -13
  54. package/dist/cdn/chunks/{AiRewriteMenu-BvV_7tNZ.js.map → AiRewriteMenu-CnkyjPEu.js.map} +1 -1
  55. package/dist/cdn/chunks/{BlockIssueBadge-D3Plo_wt.js → BlockIssueBadge-DncZ-HDf.js} +5 -5
  56. package/dist/cdn/chunks/{BlockIssueBadge-D3Plo_wt.js.map → BlockIssueBadge-DncZ-HDf.js.map} +1 -1
  57. package/dist/cdn/chunks/BlockPreviewCanvas-CCSEzL46.js +156 -0
  58. package/dist/cdn/chunks/BlockPreviewCanvas-CCSEzL46.js.map +1 -0
  59. package/dist/cdn/chunks/{CloudHeaderExtras-BtqdN777.js → CloudHeaderExtras-uUJYJFJ6.js} +2 -2
  60. package/dist/cdn/chunks/{CloudHeaderExtras-BtqdN777.js.map → CloudHeaderExtras-uUJYJFJ6.js.map} +1 -1
  61. package/dist/cdn/chunks/{CloudPanels-CQ0vNgsH.js → CloudPanels-CRztnw4M.js} +4 -4
  62. package/dist/cdn/chunks/{CloudPanels-CQ0vNgsH.js.map → CloudPanels-CRztnw4M.js.map} +1 -1
  63. package/dist/cdn/chunks/{CollaborationNotices-DraFUhyo.js → CollaborationNotices-IuLYT2x7.js} +9 -9
  64. package/dist/cdn/chunks/{CollaborationNotices-DraFUhyo.js.map → CollaborationNotices-IuLYT2x7.js.map} +1 -1
  65. package/dist/cdn/chunks/{CollaboratorBar-0OEH3hrj.js → CollaboratorBar-C1ZI2xwa.js} +3 -3
  66. package/dist/cdn/chunks/{CollaboratorBar-0OEH3hrj.js.map → CollaboratorBar-C1ZI2xwa.js.map} +1 -1
  67. package/dist/cdn/chunks/{CommentsPanel-tZZswofV.js → CommentsPanel-lgjJNrrY.js} +2 -2
  68. package/dist/cdn/chunks/{CommentsPanel-tZZswofV.js.map → CommentsPanel-lgjJNrrY.js.map} +1 -1
  69. package/dist/cdn/chunks/{CommentsSidebar-7Hfl3Hdj.js → CommentsSidebar-DTold7iy.js} +214 -214
  70. package/dist/cdn/chunks/{CommentsSidebar-7Hfl3Hdj.js.map → CommentsSidebar-DTold7iy.js.map} +1 -1
  71. package/dist/cdn/chunks/{CountdownBlock-CjMhMhnv.js → CountdownBlock-8aPSExrv.js} +7 -7
  72. package/dist/cdn/chunks/{CountdownBlock-CjMhMhnv.js.map → CountdownBlock-8aPSExrv.js.map} +1 -1
  73. package/dist/cdn/chunks/{CountdownToolbar-BxW-J7DX.js → CountdownToolbar-CnWQEW5g.js} +50 -50
  74. package/dist/cdn/chunks/{CountdownToolbar-BxW-J7DX.js.map → CountdownToolbar-CnWQEW5g.js.map} +1 -1
  75. package/dist/cdn/chunks/{IssuesPanel-BoHeIjvw.js → IssuesPanel-CrplCzo8.js} +13 -13
  76. package/dist/cdn/chunks/{IssuesPanel-BoHeIjvw.js.map → IssuesPanel-CrplCzo8.js.map} +1 -1
  77. package/dist/cdn/chunks/{LanguageMenu-BnYN5N1h.js → LanguageMenu-B6MNInCL.js} +57 -57
  78. package/dist/cdn/chunks/{LanguageMenu-BnYN5N1h.js.map → LanguageMenu-B6MNInCL.js.map} +1 -1
  79. package/dist/cdn/chunks/{LocaleNotices-8J2DRWeg.js → LocaleNotices-TxeAl8Iq.js} +10 -10
  80. package/dist/cdn/chunks/{LocaleNotices-8J2DRWeg.js.map → LocaleNotices-TxeAl8Iq.js.map} +1 -1
  81. package/dist/cdn/chunks/{LogicTagInsertButton-Bt2PXbQ0.js → LogicTagInsertButton-DvSVx2DB.js} +30 -30
  82. package/dist/cdn/chunks/LogicTagInsertButton-DvSVx2DB.js.map +1 -0
  83. package/dist/cdn/chunks/{MediaEditModal-Dz972UFx.js → MediaEditModal-tGK6htBl.js} +8 -8
  84. package/dist/cdn/chunks/{MediaEditModal-Dz972UFx.js.map → MediaEditModal-tGK6htBl.js.map} +1 -1
  85. package/dist/cdn/chunks/{MediaPanels-C6Hqtp1H.js → MediaPanels-BVrQYz2C.js} +2 -2
  86. package/dist/cdn/chunks/{MediaPanels-C6Hqtp1H.js.map → MediaPanels-BVrQYz2C.js.map} +1 -1
  87. package/dist/cdn/chunks/{MergeTagInput-BELdMRni.js → MergeTagInput-DeuNH3re.js} +13 -13
  88. package/dist/cdn/chunks/{MergeTagInput-BELdMRni.js.map → MergeTagInput-DeuNH3re.js.map} +1 -1
  89. package/dist/cdn/chunks/{MergeTagModeToggle-DKfMDIEF.js → MergeTagModeToggle-D7maMGIM.js} +5 -5
  90. package/dist/cdn/chunks/{MergeTagModeToggle-DKfMDIEF.js.map → MergeTagModeToggle-D7maMGIM.js.map} +1 -1
  91. package/dist/cdn/chunks/{MergeTagTextarea-w6xen3Xh.js → MergeTagTextarea-B2xxIU3e.js} +6 -6
  92. package/dist/cdn/chunks/{MergeTagTextarea-w6xen3Xh.js.map → MergeTagTextarea-B2xxIU3e.js.map} +1 -1
  93. package/dist/cdn/chunks/{ParagraphEditor-Cal9hY3U.js → ParagraphEditor-Bx_Hlw8d.js} +106 -106
  94. package/dist/cdn/chunks/{ParagraphEditor-Cal9hY3U.js.map → ParagraphEditor-Bx_Hlw8d.js.map} +1 -1
  95. package/dist/cdn/chunks/{RestoreVersionDialog-f_ulmASY.js → RestoreVersionDialog-CPrrWTsT.js} +12 -12
  96. package/dist/cdn/chunks/{RestoreVersionDialog-f_ulmASY.js.map → RestoreVersionDialog-CPrrWTsT.js.map} +1 -1
  97. package/dist/cdn/chunks/{RichTextEditorContent-C_v0kS4A.js → RichTextEditorContent-Dze4C9VI.js} +8 -8
  98. package/dist/cdn/chunks/{RichTextEditorContent-C_v0kS4A.js.map → RichTextEditorContent-Dze4C9VI.js.map} +1 -1
  99. package/dist/cdn/chunks/{SaveBlockDialog-C6N9RFls.js → SaveBlockDialog-CXVwnfsy.js} +51 -51
  100. package/dist/cdn/chunks/{SaveBlockDialog-C6N9RFls.js.map → SaveBlockDialog-CXVwnfsy.js.map} +1 -1
  101. package/dist/cdn/chunks/{SavedBlocksBrowserModal-Bl2sl09D.js → SavedBlocksBrowserModal-BDTmenOE.js} +23 -23
  102. package/dist/cdn/chunks/{SavedBlocksBrowserModal-Bl2sl09D.js.map → SavedBlocksBrowserModal-BDTmenOE.js.map} +1 -1
  103. package/dist/cdn/chunks/{SavedBlocksPanels-DqVcmEUK.js → SavedBlocksPanels-B41Rk_v1.js} +2 -2
  104. package/dist/cdn/chunks/{SavedBlocksPanels-DqVcmEUK.js.map → SavedBlocksPanels-B41Rk_v1.js.map} +1 -1
  105. package/dist/cdn/chunks/{SavedBlocksPickBar-DE-J1JVL.js → SavedBlocksPickBar-B97z_rFH.js} +11 -11
  106. package/dist/cdn/chunks/{SavedBlocksPickBar-DE-J1JVL.js.map → SavedBlocksPickBar-B97z_rFH.js.map} +1 -1
  107. package/dist/cdn/chunks/{TemplateSettings-CpoKZ8oV.js → TemplateSettings-YwwRbxPc.js} +102 -102
  108. package/dist/cdn/chunks/{TemplateSettings-CpoKZ8oV.js.map → TemplateSettings-YwwRbxPc.js.map} +1 -1
  109. package/dist/cdn/chunks/{TestEmailModal-DI3z__Bd.js → TestEmailModal-BiFP2Cbx.js} +20 -20
  110. package/dist/cdn/chunks/{TestEmailModal-DI3z__Bd.js.map → TestEmailModal-BiFP2Cbx.js.map} +1 -1
  111. package/dist/cdn/chunks/{TestEmailPanel-Cp5d2YGn.js → TestEmailPanel-BrivPMk2.js} +2 -2
  112. package/dist/cdn/chunks/{TestEmailPanel-Cp5d2YGn.js.map → TestEmailPanel-BrivPMk2.js.map} +1 -1
  113. package/dist/cdn/chunks/{TitleEditor-C2syRLdZ.js → TitleEditor-CzPkkL2s.js} +19 -19
  114. package/dist/cdn/chunks/{TitleEditor-C2syRLdZ.js.map → TitleEditor-CzPkkL2s.js.map} +1 -1
  115. package/dist/cdn/chunks/{Toolbar-NEE8qxYh.js → Toolbar-VH07SzX7.js} +1153 -919
  116. package/dist/cdn/chunks/Toolbar-VH07SzX7.js.map +1 -0
  117. package/dist/cdn/chunks/{TplModal-B1MgvtX8.js → TplModal-DMe6J811.js} +6 -6
  118. package/dist/cdn/chunks/{TplModal-B1MgvtX8.js.map → TplModal-DMe6J811.js.map} +1 -1
  119. package/dist/cdn/chunks/{VersionHistoryMenu-CZury5gU.js → VersionHistoryMenu-DkwbKhBl.js} +16 -16
  120. package/dist/cdn/chunks/{VersionHistoryMenu-CZury5gU.js.map → VersionHistoryMenu-DkwbKhBl.js.map} +1 -1
  121. package/dist/cdn/chunks/{VersionHistoryPanels-Cefd8i_e.js → VersionHistoryPanels-CgxhMRAl.js} +2 -2
  122. package/dist/cdn/chunks/{VersionHistoryPanels-Cefd8i_e.js.map → VersionHistoryPanels-CgxhMRAl.js.map} +1 -1
  123. package/dist/cdn/chunks/{VersionPreviewBanner-C4Ji8nu4.js → VersionPreviewBanner-WVBDBrwQ.js} +8 -8
  124. package/dist/cdn/chunks/{VersionPreviewBanner-C4Ji8nu4.js.map → VersionPreviewBanner-WVBDBrwQ.js.map} +1 -1
  125. package/dist/cdn/chunks/WrapperBlock-CCCIcqe2.js +58 -0
  126. package/dist/cdn/chunks/WrapperBlock-CCCIcqe2.js.map +1 -0
  127. package/dist/cdn/chunks/{blockTypeIcons-Cc6RJ27V.js → blockTypeIcons-CzYA5DF9.js} +2 -2
  128. package/dist/cdn/chunks/{blockTypeIcons-Cc6RJ27V.js.map → blockTypeIcons-CzYA5DF9.js.map} +1 -1
  129. package/dist/cdn/chunks/{ca-DIkMxYCN.js → ca-BJn8lcJx.js} +9 -1
  130. package/dist/cdn/chunks/ca-BJn8lcJx.js.map +1 -0
  131. package/dist/cdn/chunks/composables-D3lsO7Io.js +3101 -0
  132. package/dist/cdn/chunks/composables-D3lsO7Io.js.map +1 -0
  133. package/dist/cdn/chunks/{createCloudRuntime-DJkDGKQ_.js → createCloudRuntime-CE79GB1H.js} +16 -16
  134. package/dist/cdn/chunks/{createCloudRuntime-DJkDGKQ_.js.map → createCloudRuntime-CE79GB1H.js.map} +1 -1
  135. package/dist/{de-Cc6Ue0UD.js → cdn/chunks/de-BLFp3nWx.js} +10 -0
  136. package/dist/cdn/chunks/de-BLFp3nWx.js.map +1 -0
  137. package/dist/cdn/chunks/dist-Cf1pSluo.js +405 -0
  138. package/dist/cdn/chunks/{dist-DqGgijFI.js.map → dist-Cf1pSluo.js.map} +1 -1
  139. package/dist/cdn/chunks/{editor-modal-erQEOHZN.js → editor-modal-CN69NlOK.js} +187 -187
  140. package/dist/cdn/chunks/{editor-modal-erQEOHZN.js.map → editor-modal-CN69NlOK.js.map} +1 -1
  141. package/dist/cdn/chunks/en-Bcz4gS9U.js +1 -0
  142. package/dist/cdn/chunks/{en-BX4FujAQ.js → en-DGGQJGbm.js} +9 -1
  143. package/dist/cdn/chunks/en-DGGQJGbm.js.map +1 -0
  144. package/dist/cdn/chunks/{es-Do5b-MKU.js → es-DTY9qgLv.js} +9 -1
  145. package/dist/cdn/chunks/es-DTY9qgLv.js.map +1 -0
  146. package/dist/cdn/chunks/{extensions-BcwkOjVq.js → extensions-8dlM-fU4.js} +112 -112
  147. package/dist/cdn/chunks/extensions-8dlM-fU4.js.map +1 -0
  148. package/dist/{fr-S1n2Ebzp.js → cdn/chunks/fr-L4FqO9Gp.js} +10 -0
  149. package/dist/cdn/chunks/{fr-S1n2Ebzp.js.map → fr-L4FqO9Gp.js.map} +1 -1
  150. package/dist/cdn/chunks/{icons-Da9GKjPx.js → icons-DHExFLlT.js} +43 -43
  151. package/dist/cdn/chunks/{icons-Da9GKjPx.js.map → icons-DHExFLlT.js.map} +1 -1
  152. package/dist/cdn/chunks/{ja-DLwcq4bA.js → ja-6uOXkh4v.js} +9 -1
  153. package/dist/cdn/chunks/ja-6uOXkh4v.js.map +1 -0
  154. package/dist/cdn/chunks/{keys-CoQtCqNv.js → keys-BUmIvYy3.js} +4 -4
  155. package/dist/cdn/chunks/keys-BUmIvYy3.js.map +1 -0
  156. package/dist/{nl-0JSWaZpT.js → cdn/chunks/nl-DCxuxwNq.js} +10 -0
  157. package/dist/cdn/chunks/nl-DCxuxwNq.js.map +1 -0
  158. package/dist/cdn/chunks/{normalizeMergeTagMarkup-BrGw5jxk.js → normalizeMergeTagMarkup-aWjkotui.js} +67 -67
  159. package/dist/cdn/chunks/normalizeMergeTagMarkup-aWjkotui.js.map +1 -0
  160. package/dist/cdn/chunks/{preRenderCustomBlocks-Cj0XYwuh.js → preRenderCustomBlocks-Dn6dFUwx.js} +4 -4
  161. package/dist/cdn/chunks/{preRenderCustomBlocks-Cj0XYwuh.js.map → preRenderCustomBlocks-Dn6dFUwx.js.map} +1 -1
  162. package/dist/{pt-BR-D3VlIMDZ.js → cdn/chunks/pt-BR-CBkcrebr.js} +10 -0
  163. package/dist/cdn/chunks/pt-BR-CBkcrebr.js.map +1 -0
  164. package/dist/cdn/chunks/{sanitizeHtml-GxJCxKcP.js → sanitizeHtml-B3njfkSy.js} +11 -11
  165. package/dist/cdn/chunks/{sanitizeHtml-GxJCxKcP.js.map → sanitizeHtml-B3njfkSy.js.map} +1 -1
  166. package/dist/cdn/chunks/{socialIcons-B5zrrV8-.js → socialIcons-BFgc3qqJ.js} +354 -341
  167. package/dist/cdn/chunks/{socialIcons-B5zrrV8-.js.map → socialIcons-BFgc3qqJ.js.map} +1 -1
  168. package/dist/cdn/chunks/{src-Diw9SLIe.js → src-C9JWWxAk.js} +419 -423
  169. package/dist/cdn/chunks/src-C9JWWxAk.js.map +1 -0
  170. package/dist/cdn/chunks/src-GgKlXNxy.js +710 -0
  171. package/dist/cdn/chunks/src-GgKlXNxy.js.map +1 -0
  172. package/dist/cdn/chunks/{src-v47QHNmB.js → src-mXG-Of9A.js} +669 -662
  173. package/dist/cdn/chunks/src-mXG-Of9A.js.map +1 -0
  174. package/dist/cdn/chunks/{tiptap-Dipw_zOQ.js → tiptap-C940SvId.js} +3 -3
  175. package/dist/cdn/chunks/{tiptap-Dipw_zOQ.js.map → tiptap-C940SvId.js.map} +1 -1
  176. package/dist/cdn/chunks/{useCloudI18n-Cc5NZqiI.js → useCloudI18n-Xsih9yRH.js} +2 -2
  177. package/dist/cdn/chunks/{useCloudI18n-Cc5NZqiI.js.map → useCloudI18n-Xsih9yRH.js.map} +1 -1
  178. package/dist/cdn/chunks/{useEditorRoot-D_LuZ_hE.js → useEditorRoot-Beau2Z_T.js} +2 -2
  179. package/dist/cdn/chunks/{useEditorRoot-D_LuZ_hE.js.map → useEditorRoot-Beau2Z_T.js.map} +1 -1
  180. package/dist/cdn/chunks/{useI18n-BnJYydPv.js → useI18n-D8s7HtTn.js} +2 -2
  181. package/dist/cdn/chunks/{useI18n-BnJYydPv.js.map → useI18n-D8s7HtTn.js.map} +1 -1
  182. package/dist/cdn/chunks/{useLocalizedDisplay-DekV8qar.js → useLocalizedDisplay-Bgg4qpev.js} +6 -6
  183. package/dist/cdn/chunks/{useLocalizedDisplay-DekV8qar.js.map → useLocalizedDisplay-Bgg4qpev.js.map} +1 -1
  184. package/dist/cdn/chunks/{useLogicTag-Cbp3I7UN.js → useLogicTag-B0PDeDxl.js} +5 -5
  185. package/dist/cdn/chunks/{useLogicTag-Cbp3I7UN.js.map → useLogicTag-B0PDeDxl.js.map} +1 -1
  186. package/dist/cdn/chunks/{useMergeTag-1lrpNyR5.js → useMergeTag-BSU75bKk.js} +8 -8
  187. package/dist/cdn/chunks/{useMergeTag-1lrpNyR5.js.map → useMergeTag-BSU75bKk.js.map} +1 -1
  188. package/dist/cdn/chunks/{usePopoverPosition-BWAXWeBv.js → usePopoverPosition-esO6wjvU.js} +5 -5
  189. package/dist/cdn/chunks/{usePopoverPosition-BWAXWeBv.js.map → usePopoverPosition-esO6wjvU.js.map} +1 -1
  190. package/dist/cdn/chunks/{useScrollToBlock-Ct1AwLD-.js → useScrollToBlock-CJuUu7Xj.js} +2 -2
  191. package/dist/cdn/chunks/{useScrollToBlock-Ct1AwLD-.js.map → useScrollToBlock-CJuUu7Xj.js.map} +1 -1
  192. package/dist/cdn/chunks/{withCurrentFont-DZfmiv8V.js → withCurrentFont-QqBilClC.js} +2 -2
  193. package/dist/cdn/chunks/{withCurrentFont-DZfmiv8V.js.map → withCurrentFont-QqBilClC.js.map} +1 -1
  194. package/dist/cdn/editor.css +1 -1
  195. package/dist/cdn/editor.js +814 -817
  196. package/dist/cdn/editor.js.map +1 -1
  197. package/dist/{check-XMnOOIEC.js → check-CcuCoJDh.js} +1 -1
  198. package/dist/{chevron-down-DmamTEWQ.js → chevron-down-BfYIbFbC.js} +1 -1
  199. package/dist/{chevron-right-BEFXOH27.js → chevron-right-DyjFqY35.js} +1 -1
  200. package/dist/{chevron-up-Dw7woXj8.js → chevron-up-BHEIxuS-.js} +1 -1
  201. package/dist/{circle-alert-BTKC9vkq.js → circle-alert-Tq7kAh9S.js} +1 -1
  202. package/dist/{clock-BVT5u2uG.js → clock-Df0ZiXwQ.js} +1 -1
  203. package/dist/{composables-DPgNn9GZ.js → composables-DreAt_0A.js} +1660 -1620
  204. package/dist/{createCloudRuntime-Bw8TLmQ8.js → createCloudRuntime-CL4tUlDC.js} +15 -15
  205. package/dist/{createLucideIcon-CgDE3xAR.js → createLucideIcon-CfBdtoUw.js} +5 -5
  206. package/dist/{cdn/chunks/de-Cc6Ue0UD.js → de-BLFp3nWx.js} +8 -2
  207. package/dist/{dist-ChOb5XHW.js → dist-0GWMyHtM.js} +1 -1
  208. package/dist/{dist-CBdk1Vcb.js → dist-BMUUt3zJ.js} +284 -277
  209. package/dist/{dist-6DU0me3E.js → dist-B_0FPmoy.js} +1 -1
  210. package/dist/{dist-B8dY8drK.js → dist-BjzK1g4Z.js} +1 -1
  211. package/dist/{dist-54VCNoC0.js → dist-BsumKKh9.js} +1 -1
  212. package/dist/{dist-BWflWcpW.js → dist-C3avsUq9.js} +2 -2
  213. package/dist/{dist-fqSers8_.js → dist-CCLRTtJP.js} +197 -197
  214. package/dist/dist-CiYotUR8.js +406 -0
  215. package/dist/{dist-C3hu_C3w.js → dist-Cr1CLCmx.js} +1 -1
  216. package/dist/{dist-D_XrUEET.js → dist-CsknfjrZ.js} +3 -3
  217. package/dist/{dist-TAv500j6.js → dist-DDytHU_6.js} +1 -1
  218. package/dist/{dist-CcOn7WCo.js → dist-DKV9m4Uu.js} +1 -1
  219. package/dist/{dist-B9a7iVye.js → dist-Dq9VnANT.js} +1 -1
  220. package/dist/{dist-DZ3X-uB8.js → dist-ZrT0vAB6.js} +1 -1
  221. package/dist/{editor-modal-BeX6otLk.js → editor-modal-BD32TXws.js} +107 -107
  222. package/dist/{en-BX4FujAQ.js → en-DGGQJGbm.js} +8 -0
  223. package/dist/en-Dgs_-NBw.js +1 -0
  224. package/dist/{es-Do5b-MKU.js → es-DTY9qgLv.js} +8 -0
  225. package/dist/{extensions-QFAARrjF.js → extensions-DKxHlSd7.js} +385 -385
  226. package/dist/{eye-ByMgHeA_.js → eye-B3psrAqd.js} +1 -1
  227. package/dist/{cdn/chunks/fr-S1n2Ebzp.js → fr-L4FqO9Gp.js} +8 -2
  228. package/dist/{image-Ch8tR35K.js → image-C3yuPDxx.js} +1 -1
  229. package/dist/index.d.ts +60 -12
  230. package/dist/{info-DzSD-Wpk.js → info-DKja7A68.js} +1 -1
  231. package/dist/{ja-DLwcq4bA.js → ja-6uOXkh4v.js} +8 -0
  232. package/dist/{keys-BCqskl51.js → keys-w_VRjoMu.js} +3 -3
  233. package/dist/{link-oDn9AR2w.js → link-DhzPI4Hn.js} +1 -1
  234. package/dist/{list-C5t07dp8.js → list-DVGn7Ik2.js} +1 -1
  235. package/dist/{loader-circle-k6xvKgUB.js → loader-circle-DqKWsMHO.js} +1 -1
  236. package/dist/{message-circle-C23R6OJR.js → message-circle-C4TonoBs.js} +1 -1
  237. package/dist/{cdn/chunks/nl-0JSWaZpT.js → nl-DCxuxwNq.js} +8 -2
  238. package/dist/{normalizeMergeTagMarkup-BS0nRvhq.js → normalizeMergeTagMarkup-Da9JAgx7.js} +75 -75
  239. package/dist/{package-C90eQ7NU.js → package-9OkiEO4S.js} +1 -1
  240. package/dist/{pencil-BK7GrQuA.js → pencil-M9vkOB7C.js} +1 -1
  241. package/dist/{plus-Cr0Mis63.js → plus-DxZiv9YC.js} +1 -1
  242. package/dist/{preRenderCustomBlocks-CiKvKd8V.js → preRenderCustomBlocks-CdqSp2P7.js} +4 -4
  243. package/dist/{cdn/chunks/pt-BR-D3VlIMDZ.js → pt-BR-CBkcrebr.js} +8 -2
  244. package/dist/{refresh-cw-_ZLOIEvA.js → refresh-cw-UY8_sdFG.js} +1 -1
  245. package/dist/{rotate-ccw-CB5wsHwv.js → rotate-ccw-BFTGCpHn.js} +1 -1
  246. package/dist/{sanitizeHtml-USjTyALR.js → sanitizeHtml-wBibnBF4.js} +6 -6
  247. package/dist/{search-BmrQNox8.js → search-RuGJnMEn.js} +1 -1
  248. package/dist/{send-blAsIBBg.js → send-DGB1ar02.js} +1 -1
  249. package/dist/{smartphone-BPpWYrwV.js → smartphone-CVA29CU_.js} +1 -1
  250. package/dist/{socialIcons-NvIg5ahU.js → socialIcons-oo4uL16Y.js} +427 -414
  251. package/dist/{sparkles-OqIxrNp-.js → sparkles-IHfEwEcd.js} +1 -1
  252. package/dist/{square-BP-V7iT-.js → square-_Cl44UU6.js} +1 -1
  253. package/dist/style.css +1 -1
  254. package/dist/templatical-editor.js +922 -925
  255. package/dist/{text-align-start-4mwX2o-F.js → text-align-start-Dqk2Xt_Q.js} +13 -13
  256. package/dist/{trash-B99WixTA.js → trash-Cr7rD5Hh.js} +1 -1
  257. package/dist/{triangle-alert-CHMiDkHa.js → triangle-alert-CKcpwtUj.js} +1 -1
  258. package/dist/{upload-Cp8o-hrN.js → upload-DR9pqVON.js} +1 -1
  259. package/dist/{useCloudI18n-Dh2iydo1.js → useCloudI18n-BczJoFf4.js} +1 -1
  260. package/dist/{useEditorRoot-DY3mgcHm.js → useEditorRoot-BcXKhM_8.js} +1 -1
  261. package/dist/{useI18n-CgtvtF4C.js → useI18n-zeWYtWSv.js} +1 -1
  262. package/dist/useLocalizedDisplay-Cbhx208c.js +31 -0
  263. package/dist/{useLogicTag-D8zgkXfb.js → useLogicTag-B4Zpk3eo.js} +4 -4
  264. package/dist/{useMergeTag-k7Kr0nMd.js → useMergeTag-B5qlq8px.js} +8 -8
  265. package/dist/{usePopoverPosition-VDQjyX_A.js → usePopoverPosition-Br3zt_MQ.js} +4 -4
  266. package/dist/{useScrollToBlock-B35ObCGK.js → useScrollToBlock-BfOzc1Z6.js} +2 -2
  267. package/dist/{withCurrentFont-Bzeg_gfH.js → withCurrentFont-m_PHcOD0.js} +1 -1
  268. package/dist/{x-BIBStNMS.js → x-DZSFHafL.js} +1 -1
  269. package/package.json +10 -10
  270. package/dist/BlockPreviewCanvas-C23A6FRm.js +0 -140
  271. package/dist/LanguageMenu-DcABUYop.js +0 -403
  272. package/dist/WrapperBlock-BAT3T0Cz.js +0 -44
  273. package/dist/cdn/chunks/BlockPreviewCanvas-Dr-xGq6v.js +0 -142
  274. package/dist/cdn/chunks/BlockPreviewCanvas-Dr-xGq6v.js.map +0 -1
  275. package/dist/cdn/chunks/LogicTagInsertButton-Bt2PXbQ0.js.map +0 -1
  276. package/dist/cdn/chunks/Toolbar-NEE8qxYh.js.map +0 -1
  277. package/dist/cdn/chunks/WrapperBlock-DFY-7YSs.js +0 -46
  278. package/dist/cdn/chunks/WrapperBlock-DFY-7YSs.js.map +0 -1
  279. package/dist/cdn/chunks/ca-DIkMxYCN.js.map +0 -1
  280. package/dist/cdn/chunks/composables-nyxwrM27.js +0 -3061
  281. package/dist/cdn/chunks/composables-nyxwrM27.js.map +0 -1
  282. package/dist/cdn/chunks/de-Cc6Ue0UD.js.map +0 -1
  283. package/dist/cdn/chunks/dist-DqGgijFI.js +0 -405
  284. package/dist/cdn/chunks/en-B6tLGRHq.js +0 -1
  285. package/dist/cdn/chunks/en-BX4FujAQ.js.map +0 -1
  286. package/dist/cdn/chunks/es-Do5b-MKU.js.map +0 -1
  287. package/dist/cdn/chunks/extensions-BcwkOjVq.js.map +0 -1
  288. package/dist/cdn/chunks/ja-DLwcq4bA.js.map +0 -1
  289. package/dist/cdn/chunks/keys-CoQtCqNv.js.map +0 -1
  290. package/dist/cdn/chunks/nl-0JSWaZpT.js.map +0 -1
  291. package/dist/cdn/chunks/normalizeMergeTagMarkup-BrGw5jxk.js.map +0 -1
  292. package/dist/cdn/chunks/pt-BR-D3VlIMDZ.js.map +0 -1
  293. package/dist/cdn/chunks/src-Diw9SLIe.js.map +0 -1
  294. package/dist/cdn/chunks/src-UR3AQocX.js +0 -683
  295. package/dist/cdn/chunks/src-UR3AQocX.js.map +0 -1
  296. package/dist/cdn/chunks/src-v47QHNmB.js.map +0 -1
  297. package/dist/dist-0alKVRc_.js +0 -406
  298. package/dist/en-Do0SU6tR.js +0 -1
  299. package/dist/useLocalizedDisplay-LdjosX4w.js +0 -31
@@ -1,12 +1,12 @@
1
1
  import { $ as e, C as t, F as n, H as r, M as i, O as a, Q as o, X as s, Y as c, _ as l, at as u, b as d, ct as f, dt as p, et as m, lt as h, mt as g, ot as _, p as v, pt as y, q as b, rt as x, tt as S, u as C, x as w } from "./draggable-DepKdldn.js";
2
- import { $t as T, At as E, Bt as D, Ct as O, Ft as ee, H as k, Ht as A, I as j, It as te, Jt as M, Lt as N, Mt as ne, Nt as P, Pt as F, Qt as re, Rt as I, U as L, Ut as R, Vt as z, Wt as ie, Xt as B, Yt as ae, Zt as oe, bn as se, dt as V, en as H, h as U, ln as W, m as ce, nn as G, p as le, qt as K, rn as ue, tn as q, v as de, y as fe } from "./src-v47QHNmB.js";
3
- import { at as pe, s as J } from "./icons-Da9GKjPx.js";
4
- import { B as me, C as he, U as ge, u as _e } from "./keys-CoQtCqNv.js";
5
- import { t as ve } from "./useI18n-BnJYydPv.js";
6
- import { r as ye } from "./dist-DqGgijFI.js";
7
- import { i as be, r as xe } from "./usePopoverPosition-BWAXWeBv.js";
2
+ import { $t as T, Ft as E, Gt as D, H as O, Ht as ee, I as k, It as te, Jt as A, Lt as j, Nt as ne, Pt as M, Qt as re, Rt as N, Ut as ie, Vt as P, W as F, Wt as I, Xt as ae, Yt as L, Zt as R, en as z, ft as oe, h as B, in as se, jt as V, m as ce, nn as H, p as le, rn as U, tn as W, un as ue, v as de, wt as G, xn as fe, y as pe, zt as me } from "./src-mXG-Of9A.js";
3
+ import { at as he, s as K } from "./icons-DHExFLlT.js";
4
+ import { B as ge, C as _e, W as ve, u as ye } from "./keys-BUmIvYy3.js";
5
+ import { t as be } from "./useI18n-D8s7HtTn.js";
6
+ import { r as xe } from "./dist-Cf1pSluo.js";
7
+ import { i as Se, r as q } from "./usePopoverPosition-esO6wjvU.js";
8
8
  // ../core/src/localized-edit.ts
9
- var Y = (e) => typeof e == "object" && !!e && !Array.isArray(e), Se = (e) => Array.isArray(e) && e.length > 0 && e.every((e) => Y(e) && typeof e.id == "string"), Ce = /* @__PURE__ */ new Set([
9
+ var J = (e) => typeof e == "object" && !!e && !Array.isArray(e), Ce = (e) => Array.isArray(e) && e.length > 0 && e.every((e) => J(e) && typeof e.id == "string"), we = /* @__PURE__ */ new Set([
10
10
  "id",
11
11
  "type",
12
12
  "children",
@@ -14,41 +14,41 @@ var Y = (e) => typeof e == "object" && !!e && !Array.isArray(e), Se = (e) => Arr
14
14
  "l10n",
15
15
  "renderedHtml"
16
16
  ]);
17
- function we(e, t, n) {
17
+ function Te(e, t, n) {
18
18
  let r = /* @__PURE__ */ new Set();
19
19
  for (let i of n) {
20
- if (!A(i)) continue;
21
- let n = i.split("."), a = n.pop(), o = n.join("."), s = B(e, i), c = t;
20
+ if (!ie(i)) continue;
21
+ let n = i.split("."), a = n.pop(), o = n.join("."), s = R(e, i), c = t;
22
22
  for (let [t, i] of n.entries()) {
23
23
  let a = n.slice(0, t + 1).join(".");
24
- s !== void 0 && Y(c) && B(c, i) === void 0 && Y(B(e, a)) && (c[i] = {}, r.add(a)), c = B(c, i);
24
+ s !== void 0 && J(c) && R(c, i) === void 0 && J(R(e, a)) && (c[i] = {}, r.add(a)), c = R(c, i);
25
25
  }
26
26
  if (Array.isArray(c)) {
27
- let e = c.findIndex((e) => Y(e) && e.id === a);
27
+ let e = c.findIndex((e) => J(e) && e.id === a);
28
28
  if (e < 0) continue;
29
- s === void 0 ? c.splice(e, 1) : c[e] = G(s);
30
- } else Y(c) && (s === void 0 ? delete c[a] : c[a] = G(s), o && Object.keys(c).length === 0 && B(e, o) === void 0 && we(e, t, [o]));
29
+ s === void 0 ? c.splice(e, 1) : c[e] = U(s);
30
+ } else J(c) && (s === void 0 ? delete c[a] : c[a] = U(s), o && Object.keys(c).length === 0 && R(e, o) === void 0 && Te(e, t, [o]));
31
31
  }
32
32
  return r;
33
33
  }
34
- function Te(e, t, n, r, i = !0, a = /* @__PURE__ */ new Set()) {
35
- if (Y(e) && Y(t) && !a.has(n)) for (let o of /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])) (n || !Ce.has(o)) && Te(e[o], t[o], n ? `${n}.${o}` : o, r, i, a);
36
- else if (i && Se(e) && Se(t)) for (let o of t) {
34
+ function Y(e, t, n, r, i = !0, a = /* @__PURE__ */ new Set()) {
35
+ if (J(e) && J(t) && !a.has(n)) for (let o of /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)])) (n || !we.has(o)) && Y(e[o], t[o], n ? `${n}.${o}` : o, r, i, a);
36
+ else if (i && Ce(e) && Ce(t)) for (let o of t) {
37
37
  if (o.id.includes(".")) continue;
38
38
  let t = e.find((e) => e.id === o.id);
39
- t && Te(t, o, `${n}.${o.id}`, r, i, a);
39
+ t && Y(t, o, `${n}.${o.id}`, r, i, a);
40
40
  }
41
- else q(e, t) || r.set(n, t);
41
+ else H(e, t) || r.set(n, t);
42
42
  }
43
43
  function Ee(e, t, n, r = [], i = /* @__PURE__ */ new Set()) {
44
44
  let a = /* @__PURE__ */ new Map();
45
- Te(e, t, "", a, e.type !== "custom", i);
46
- let o = new Set(e.type === "custom" ? T(e, r) : []), s = {}, c = {};
47
- for (let [t, r] of a) if ((e.type === "custom" ? o.has(t) : ie(e.type, t)) && typeof r == "string" && B(e, t) !== void 0) {
45
+ Y(e, t, "", a, e.type !== "custom", i);
46
+ let o = new Set(e.type === "custom" ? z(e, r) : []), s = {}, c = {};
47
+ for (let [t, r] of a) if ((e.type === "custom" ? o.has(t) : D(e.type, t)) && typeof r == "string" && R(e, t) !== void 0) {
48
48
  let i = n?.text?.[t];
49
49
  s[t] = i && i.value === r ? i : {
50
50
  value: r,
51
- sourceHash: re(String(B(e, t) ?? ""))
51
+ sourceHash: T(String(R(e, t) ?? ""))
52
52
  };
53
53
  } else c[t] = r === void 0 ? null : r;
54
54
  let l = {};
@@ -57,8 +57,8 @@ function Ee(e, t, n, r = [], i = /* @__PURE__ */ new Set()) {
57
57
  function De(e, t, n) {
58
58
  let r = !1;
59
59
  function i(e, t, n, a) {
60
- let o = e[n], s = t[n], c = (e) => Array.isArray(e) && e.every((e) => Y(e) && typeof e.id == "string");
61
- if (c(o) && c(s) && (JSON.stringify(o.map((e) => e.id)) !== JSON.stringify(s.map((e) => e.id)) && (r = !0, e[n] = s.map((e) => G(o.find((t) => t.id === e.id) ?? e))), a)) for (let t of s) {
60
+ let o = e[n], s = t[n], c = (e) => Array.isArray(e) && e.every((e) => J(e) && typeof e.id == "string");
61
+ if (c(o) && c(s) && (JSON.stringify(o.map((e) => e.id)) !== JSON.stringify(s.map((e) => e.id)) && (r = !0, e[n] = s.map((e) => U(o.find((t) => t.id === e.id) ?? e))), a)) for (let t of s) {
62
62
  let r = e[n].find((e) => e.id === t.id);
63
63
  r && i(r, t, a);
64
64
  }
@@ -66,7 +66,7 @@ function De(e, t, n) {
66
66
  let a = e, o = t;
67
67
  if (e.type === "menu" && i(a, o, "items"), e.type === "table" && i(a, o, "rows", "cells"), e.type === "social" && i(a, o, "icons"), e.type === "section" && t.type === "section") {
68
68
  let i = (e) => e.map((e) => e.map((e) => e.id));
69
- (e.columns !== t.columns || JSON.stringify(i(e.children)) !== JSON.stringify(i(t.children))) && (r = !0, e.columns = t.columns, e.children = t.children.map((e) => e.map((e) => G(n(e.id) ?? e))));
69
+ (e.columns !== t.columns || JSON.stringify(i(e.children)) !== JSON.stringify(i(t.children))) && (r = !0, e.columns = t.columns, e.children = t.children.map((e) => e.map((e) => U(n(e.id) ?? e))));
70
70
  }
71
71
  return r;
72
72
  }
@@ -75,39 +75,39 @@ function Oe(e, t, n) {
75
75
  let { locale: t, locales: n, l10n: r, ...i } = e;
76
76
  return i;
77
77
  }, i = /* @__PURE__ */ new Map();
78
- Te(r(e), r(t), "", i);
78
+ Y(r(e), r(t), "", i);
79
79
  let a = {};
80
- for (let [t, r] of i) if (I.includes(t) && typeof r == "string" && B(e, t) !== void 0) {
80
+ for (let [t, r] of i) if (me.includes(t) && typeof r == "string" && R(e, t) !== void 0) {
81
81
  let i = n?.text?.[t];
82
82
  (a.text ??= {})[t] = i?.value === r ? i : {
83
83
  value: r,
84
- sourceHash: re(String(B(e, t) ?? ""))
84
+ sourceHash: T(String(R(e, t) ?? ""))
85
85
  };
86
86
  } else (a.set ??= {})[t] = r === void 0 ? null : r;
87
87
  return a;
88
88
  }
89
89
  function ke(e, t, n, r, i, a = []) {
90
- let o = G(e ?? {}), s = [.../* @__PURE__ */ new Set([...a, ...[.../* @__PURE__ */ new Set([
90
+ let o = U(e ?? {}), s = [.../* @__PURE__ */ new Set([...a, ...[.../* @__PURE__ */ new Set([
91
91
  ...Object.keys(t.text ?? {}),
92
92
  ...Object.keys(t.set ?? {}),
93
93
  ...Object.keys(n.text ?? {}),
94
94
  ...Object.keys(n.set ?? {})
95
- ])].filter((e) => !q(t.text?.[e], n.text?.[e]) || !q(t.set?.[e], n.set?.[e]))])], c = Object.keys(e?.set ?? {}).filter((e) => s.some((t) => t.startsWith(`${e}.`)));
95
+ ])].filter((e) => !H(t.text?.[e], n.text?.[e]) || !H(t.set?.[e], n.set?.[e]))])], c = Object.keys(e?.set ?? {}).filter((e) => s.some((t) => t.startsWith(`${e}.`)));
96
96
  for (let e of c) {
97
- let t = B(i, e), n = s.filter((t) => t.startsWith(`${e}.`) && q(B(r, t), B(i, t)));
98
- if (q(t, B(r, e))) delete o.set[e];
99
- else if (n.length && Y(B(r, e)) && Y(t)) {
97
+ let t = R(i, e), n = s.filter((t) => t.startsWith(`${e}.`) && H(R(r, t), R(i, t)));
98
+ if (H(t, R(r, e))) delete o.set[e];
99
+ else if (n.length && J(R(r, e)) && J(t)) {
100
100
  delete o.set[e];
101
101
  let i = (e, t, a) => {
102
102
  if (!n.some((t) => e === t || e.startsWith(`${t}.`))) {
103
- if (Y(t) && Y(a)) for (let n of /* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(a)])) i(`${e}.${n}`, t[n], a[n]);
104
- else if (Y(r) && r.type !== "custom" && Se(t) && Se(a)) for (let n of a) i(`${e}.${n.id}`, t.find((e) => e.id === n.id), n);
105
- else Y(r) && typeof r.type == "string" && R(r, e, a) || o.text?.[e] && o.text[e].value === a || ((o.set ??= {})[e] = a === void 0 ? null : G(a));
103
+ if (J(t) && J(a)) for (let n of /* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(a)])) i(`${e}.${n}`, t[n], a[n]);
104
+ else if (J(r) && r.type !== "custom" && Ce(t) && Ce(a)) for (let n of a) i(`${e}.${n.id}`, t.find((e) => e.id === n.id), n);
105
+ else J(r) && typeof r.type == "string" && I(r, e, a) || o.text?.[e] && o.text[e].value === a || ((o.set ??= {})[e] = a === void 0 ? null : U(a));
106
106
  }
107
107
  };
108
- i(e, B(r, e), t);
109
- } else o.set[e] = t === void 0 ? null : G(t);
110
- for (let t of ["text", "set"]) for (let n of Object.keys(o[t] ?? {})) n.startsWith(`${e}.`) && (q(t === "text" ? o.text[n].value : o.set[n] ?? void 0, B(i, n)) || delete o[t][n]);
108
+ i(e, R(r, e), t);
109
+ } else o.set[e] = t === void 0 ? null : U(t);
110
+ for (let t of ["text", "set"]) for (let n of Object.keys(o[t] ?? {})) n.startsWith(`${e}.`) && (H(t === "text" ? o.text[n].value : o.set[n] ?? void 0, R(i, n)) || delete o[t][n]);
111
111
  }
112
112
  for (let e of s) if (!c.includes(e)) {
113
113
  for (let t of ["text", "set"]) for (let n of Object.keys(o[t] ?? {})) (n === e || n.startsWith(`${e}.`)) && delete o[t][n];
@@ -135,7 +135,7 @@ function je(e, t, n) {
135
135
  ...e.content(),
136
136
  blocks: [o]
137
137
  };
138
- ce(t), U(t);
138
+ ce(t), B(t);
139
139
  }
140
140
  if (t === "removeBlock") return !0;
141
141
  let c = i && n[1] === void 0 && n[2] === void 0, l = c ? s?.targetSectionId : n[t === "moveBlock" ? 2 : 1], u = (c ? s?.columnIndex : n[t === "moveBlock" ? 3 : 2]) ?? 0;
@@ -188,8 +188,8 @@ function Q(e, t) {
188
188
  }
189
189
  // ../core/src/editor.ts
190
190
  function Fe(t) {
191
- let n = t.content ?? V(t.defaultFontFamily, t.templateDefaults);
192
- ce(n), U(n);
191
+ let n = t.content ?? oe(t.defaultFontFamily, t.templateDefaults);
192
+ ce(n), B(n);
193
193
  let r = e({
194
194
  template: null,
195
195
  content: n,
@@ -204,11 +204,11 @@ function Fe(t) {
204
204
  uiTheme: "auto"
205
205
  }), i = u(r, "activeLocale"), a = [];
206
206
  function o(e) {
207
- let t = D(r.content);
208
- if (e === t && (e = null), e !== null && !r.content.settings.locales?.includes(e)) throw new H(`This template has no "${e}" version.`, void 0, "unknown_locale");
207
+ let t = P(r.content);
208
+ if (e === t && (e = null), e !== null && !r.content.settings.locales?.includes(e)) throw new W(`This template has no "${e}" version.`, void 0, "unknown_locale");
209
209
  i.value = e;
210
210
  }
211
- h(() => i.value ?? D(r.content), (e) => Q(t.onError, () => t.onLocaleChange?.(e))), h(() => r.content.settings.locales?.includes(i.value ?? ""), () => {
211
+ h(() => i.value ?? P(r.content), (e) => Q(t.onError, () => t.onLocaleChange?.(e))), h(() => r.content.settings.locales?.includes(i.value ?? ""), () => {
212
212
  i.value && !r.content.settings.locales?.includes(i.value) && o(null);
213
213
  });
214
214
  function s() {
@@ -218,16 +218,16 @@ function Fe(t) {
218
218
  a = e;
219
219
  }
220
220
  function l(e) {
221
- return te(r.content, e, a);
221
+ return j(r.content, e, a);
222
222
  }
223
223
  function d(e, n) {
224
224
  if (!s()) return null;
225
- if (e === "addLocale" && (!z(n) || t.localization && !t.localization.locales.includes(n))) throw new H(`Locale "${n}" is not enabled.`, void 0, "unknown_locale");
226
- let i = G(r.content);
227
- return ee(i, [{
225
+ if (e === "addLocale" && (!ee(n) || t.localization && !t.localization.locales.includes(n))) throw new W(`Locale "${n}" is not enabled.`, void 0, "unknown_locale");
226
+ let i = U(r.content);
227
+ return te(i, [{
228
228
  op: e,
229
229
  locale: n
230
- }]), q(i, r.content) ? null : i;
230
+ }]), H(i, r.content) ? null : i;
231
231
  }
232
232
  function f(e, t) {
233
233
  let n = d(e, t);
@@ -248,17 +248,17 @@ function Fe(t) {
248
248
  }
249
249
  function v(e, t) {
250
250
  let [n, o] = t;
251
- if (!i.value || !s() || F(n)) return null;
251
+ if (!i.value || !s() || I(n)) return null;
252
252
  let c = N(r.content.blocks, n);
253
253
  if (!c) return null;
254
- let l = c.l10n?.[i.value], u = K(c, i.value, D(r.content)), d = Ee(c, u, l, a), f = e === "resetLocaleFields" && Array.isArray(o) ? we(c, u, o) : void 0, p = e === "resetLocaleFields" ? ke(l, d, Ee(c, u, l, a, f), c, u, Array.isArray(o) ? o : []) : G(l ?? {});
254
+ let l = c.l10n?.[i.value], u = A(c, i.value, P(r.content)), d = Ee(c, u, l, a), f = e === "resetLocaleFields" && Array.isArray(o) ? Te(c, u, o) : void 0, p = e === "resetLocaleFields" ? ke(l, d, Ee(c, u, l, a, f), c, u, Array.isArray(o) ? o : []) : U(l ?? {});
255
255
  if (e === "setBlockHidden") o ? p.hidden = !0 : delete p.hidden;
256
256
  else if (e === "resetLocaleFields") o || (delete p.text, delete p.set, delete p.hidden);
257
257
  else for (let e of o) {
258
258
  let t = p.text?.[e];
259
- t && (t.sourceHash = re(String(B(c, e) ?? "")));
259
+ t && (t.sourceHash = T(String(R(c, e) ?? "")));
260
260
  }
261
- return p.text && !Object.keys(p.text).length && delete p.text, p.set && !Object.keys(p.set).length && delete p.set, q(l ?? {}, p) ? null : {
261
+ return p.text && !Object.keys(p.text).length && delete p.text, p.set && !Object.keys(p.set).length && delete p.set, H(l ?? {}, p) ? null : {
262
262
  block: c,
263
263
  layer: p
264
264
  };
@@ -276,16 +276,16 @@ function Fe(t) {
276
276
  function w(e, t) {
277
277
  y("keepTranslations", [e, t]);
278
278
  }
279
- let T = S(0), E = 0, O = 0;
279
+ let E = S(0), D = 0, O = 0;
280
280
  function k() {
281
281
  r.isDirty = !0, O++;
282
282
  }
283
- let A = b({
283
+ let ne = b({
284
284
  get: () => r.content,
285
285
  set: (e) => {
286
286
  r.content = e, k();
287
287
  }
288
- }), j = b(() => r.selectedBlockId ? N(r.content.blocks, r.selectedBlockId) : null);
288
+ }), M = b(() => r.selectedBlockId ? N(r.content.blocks, r.selectedBlockId) : null);
289
289
  function N(e, t) {
290
290
  for (let n of e) {
291
291
  if (n.id === t) return n;
@@ -296,15 +296,15 @@ function Fe(t) {
296
296
  }
297
297
  return null;
298
298
  }
299
- function ne(e, t) {
300
- if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) ne(e, t);
299
+ function ie(e, t) {
300
+ if (t.add(e.id), e.type === "section") for (let n of e.children) for (let e of n) ie(e, t);
301
301
  }
302
- function P(e, t, n = { blocks: e }) {
302
+ function F(e, t, n = { blocks: e }) {
303
303
  for (let r = 0; r < e.length; r++) {
304
304
  let i = e[r];
305
305
  if (i.id === t) return n;
306
306
  if (i.type === "section") for (let e = 0; e < i.children.length; e++) {
307
- let n = P(i.children[e], t, {
307
+ let n = F(i.children[e], t, {
308
308
  blocks: i.children[e],
309
309
  sectionId: i.id,
310
310
  columnIndex: e
@@ -314,7 +314,7 @@ function Fe(t) {
314
314
  }
315
315
  return null;
316
316
  }
317
- function F(e, n = !1) {
317
+ function I(e, n = !1) {
318
318
  let r = i.value ?? t.lockLocale?.value ?? null;
319
319
  for (let [i, a] of t.lockedBlocks?.value ?? []) {
320
320
  let o = a;
@@ -324,8 +324,8 @@ function Fe(t) {
324
324
  }
325
325
  return !1;
326
326
  }
327
- function I(e) {
328
- let t = P(r.content.blocks, e);
327
+ function z(e) {
328
+ let t = F(r.content.blocks, e);
329
329
  if (!t) return null;
330
330
  let n = t.blocks.findIndex((t) => t.id === e);
331
331
  return n === -1 ? null : {
@@ -334,52 +334,52 @@ function Fe(t) {
334
334
  index: n
335
335
  };
336
336
  }
337
- function L(e, t = !0) {
338
- ce(e), U(e), r.content = e, t && k();
337
+ function se(e, t = !0) {
338
+ ce(e), B(e), r.content = e, t && k();
339
339
  }
340
- function R(e) {
341
- e && F(e) || (r.selectedBlockId = e);
340
+ function V(e) {
341
+ e && I(e) || (r.selectedBlockId = e);
342
342
  }
343
- function ie(e) {
343
+ function le(e) {
344
344
  r.viewport = e;
345
345
  }
346
- function se(e) {
346
+ function ue(e) {
347
347
  r.darkMode = e;
348
348
  }
349
- function W(e) {
349
+ function de(e) {
350
350
  r.uiTheme = e;
351
351
  }
352
- function le(e) {
352
+ function G(e) {
353
353
  r.previewMode = e, e && (r.selectedBlockId = null);
354
354
  }
355
- function ue(e, t) {
355
+ function fe(e, t) {
356
356
  if (!s()) return !1;
357
357
  let n = N(r.content.blocks, e);
358
358
  if (!n) return !1;
359
- if ("l10n" in t) throw new H("l10n is immutable in updateBlock.", void 0, "invalid_operation");
359
+ if ("l10n" in t) throw new W("l10n is immutable in updateBlock.", void 0, "invalid_operation");
360
360
  let i = {
361
361
  ...n,
362
362
  ...t
363
363
  };
364
- return !F(e, De(G(n), i, (e) => N(r.content.blocks, e)));
364
+ return !I(e, De(U(n), i, (e) => N(r.content.blocks, e)));
365
365
  }
366
- function de(e, n) {
367
- if (!ue(e, n)) return;
366
+ function pe(e, n) {
367
+ if (!fe(e, n)) return;
368
368
  let o = N(r.content.blocks, e);
369
369
  if (!o) return;
370
370
  let s = i.value;
371
371
  if (s) {
372
- let i = K(o, s, D(r.content)), c = {
372
+ let i = A(o, s, P(r.content)), c = {
373
373
  ...i,
374
374
  ...n
375
- }, l = G(o), u = De(l, c, (e) => N(r.content.blocks, e));
376
- if (F(e, u)) return;
375
+ }, l = U(o), u = De(l, c, (e) => N(r.content.blocks, e));
376
+ if (I(e, u)) return;
377
377
  u && t.onStructureChange?.();
378
- let d = M(l);
378
+ let d = L(l);
379
379
  delete o.l10n, Object.assign(o, d), _(o, ke(o.l10n?.[s], Ee(o, i, o.l10n?.[s], a), Ee(o, c, o.l10n?.[s], a), o, c));
380
380
  } else {
381
- if (F(e, "children" in n || "columns" in n)) return;
382
- let t = M({
381
+ if (I(e, "children" in n || "columns" in n)) return;
382
+ let t = L({
383
383
  ...o,
384
384
  ...n
385
385
  });
@@ -387,20 +387,20 @@ function Fe(t) {
387
387
  }
388
388
  k();
389
389
  }
390
- function fe(e) {
391
- if ("locales" in e || "l10n" in e) throw new H("locales and l10n are immutable in updateSettings.", void 0, "invalid_operation");
392
- if ("locale" in e && e.locale !== D(r.content) && r.content.settings.locales?.length) throw new H("The default locale can't change while language versions exist.", void 0, "invalid_operation");
390
+ function me(e) {
391
+ if ("locales" in e || "l10n" in e) throw new W("locales and l10n are immutable in updateSettings.", void 0, "invalid_operation");
392
+ if ("locale" in e && e.locale !== P(r.content) && r.content.settings.locales?.length) throw new W("The default locale can't change while language versions exist.", void 0, "invalid_operation");
393
393
  }
394
- function pe(e) {
394
+ function he(e) {
395
395
  if (!s()) return;
396
- fe(e);
396
+ me(e);
397
397
  let t = i.value;
398
398
  if (!t) r.content.settings = ae({
399
399
  ...r.content.settings,
400
400
  ...e
401
401
  });
402
402
  else {
403
- let n = r.content.settings, i = oe(r.content, t).settings, a = {
403
+ let n = r.content.settings, i = re(r.content, t).settings, a = {
404
404
  ...i,
405
405
  locale: n.locale,
406
406
  ...e
@@ -412,15 +412,15 @@ function Fe(t) {
412
412
  }
413
413
  k();
414
414
  }
415
- let J = {
415
+ let K = {
416
416
  canEdit: s,
417
417
  content: () => r.content,
418
418
  findBlock: (e) => N(r.content.blocks, e),
419
- findBlockLocation: I,
420
- isBlockLocked: F
419
+ findBlockLocation: z,
420
+ isBlockLocked: I
421
421
  };
422
- function me(e, n, a = 0, o) {
423
- if (je(J, "addBlock", [
422
+ function ge(e, n, a = 0, o) {
423
+ if (je(K, "addBlock", [
424
424
  e,
425
425
  n,
426
426
  a,
@@ -437,29 +437,29 @@ function Fe(t) {
437
437
  i.value && t.onStructureChange?.(), k();
438
438
  }
439
439
  }
440
- function he(e) {
441
- if (!je(J, "removeBlock", [e])) return;
442
- let n = P(r.content.blocks, e);
440
+ function _e(e) {
441
+ if (!je(K, "removeBlock", [e])) return;
442
+ let n = F(r.content.blocks, e);
443
443
  if (n) {
444
444
  let a = n.blocks.findIndex((t) => t.id === e);
445
445
  if (a !== -1) {
446
446
  let [e] = n.blocks.splice(a, 1);
447
447
  if (r.selectedBlockId) {
448
448
  let t = /* @__PURE__ */ new Set();
449
- ne(e, t), t.has(r.selectedBlockId) && (r.selectedBlockId = null);
449
+ ie(e, t), t.has(r.selectedBlockId) && (r.selectedBlockId = null);
450
450
  }
451
451
  i.value && t.onStructureChange?.(), k();
452
452
  }
453
453
  }
454
454
  }
455
- function ge(e, n, a, o = 0) {
456
- if (!je(J, "moveBlock", [
455
+ function ve(e, n, a, o = 0) {
456
+ if (!je(K, "moveBlock", [
457
457
  e,
458
458
  n,
459
459
  a,
460
460
  o
461
461
  ])) return;
462
- let s = P(r.content.blocks, e), c = s.blocks.findIndex((t) => t.id === e), l;
462
+ let s = F(r.content.blocks, e), c = s.blocks.findIndex((t) => t.id === e), l;
463
463
  if (a) {
464
464
  let e = N(r.content.blocks, a);
465
465
  e.children[o] = e.children[o] || [], l = e.children[o];
@@ -467,29 +467,29 @@ function Fe(t) {
467
467
  let [u] = s.blocks.splice(c, 1);
468
468
  l.splice(n, 0, u), i.value && t.onStructureChange?.(), k();
469
469
  }
470
- function _e() {
470
+ function ye() {
471
471
  k();
472
472
  }
473
- function ve(e, t) {
474
- throw new H(`[Templatical] Templates: ${e} ${t}`);
473
+ function be(e, t) {
474
+ throw new W(`[Templatical] Templates: ${e} ${t}`);
475
475
  }
476
- function ye(e) {
476
+ function xe(e) {
477
477
  Q(t.onError, e);
478
478
  }
479
- function be(e) {
479
+ function Se(e) {
480
480
  let { templates: n } = t;
481
- return n || ve(e, "needs a templates provider. Pass one as `init({ templates })` to enable saving and loading."), n;
481
+ return n || be(e, "needs a templates provider. Pass one as `init({ templates })` to enable saving and loading."), n;
482
482
  }
483
- function xe(e) {
483
+ function q(e) {
484
484
  r.template && (r.template = {
485
485
  ...r.template,
486
486
  name: e
487
487
  }, k());
488
488
  }
489
- async function Y(e) {
490
- let n = be("create()"), { create: i } = n;
491
- typeof i != "function" && ve("create()", "is disabled by the provider — its `create` is `false`.");
492
- let a, o = ++E;
489
+ async function J(e) {
490
+ let n = Se("create()"), { create: i } = n;
491
+ typeof i != "function" && be("create()", "is disabled by the provider — its `create` is `false`.");
492
+ let a, o = ++D;
493
493
  r.isLoading = !0;
494
494
  try {
495
495
  e?.content && (r.content = e.content);
@@ -497,32 +497,32 @@ function Fe(t) {
497
497
  a = await i(e?.name === void 0 ? { content: r.content } : {
498
498
  name: e.name,
499
499
  content: r.content
500
- }), r.template = a, O === t && (r.isDirty = !1), T.value++;
500
+ }), r.template = a, O === t && (r.isDirty = !1), E.value++;
501
501
  } catch (e) {
502
502
  throw t.onError?.(e), e;
503
503
  } finally {
504
- E === o && (r.isLoading = !1);
504
+ D === o && (r.isLoading = !1);
505
505
  }
506
- return ye(() => n.onCreated?.(a)), a;
506
+ return xe(() => n.onCreated?.(a)), a;
507
507
  }
508
- async function Se(e, n) {
509
- let i = be("load()"), a, o = ++E;
508
+ async function Ce(e, n) {
509
+ let i = Se("load()"), a, o = ++D;
510
510
  r.isLoading = !0;
511
511
  try {
512
- if (a = await i.load(e), ce(a.content), U(a.content), n && !n()) return a;
513
- r.template = a, r.content = a.content, r.isDirty = !1, T.value++;
512
+ if (a = await i.load(e), ce(a.content), B(a.content), n && !n()) return a;
513
+ r.template = a, r.content = a.content, r.isDirty = !1, E.value++;
514
514
  } catch (e) {
515
515
  throw t.onError?.(e), e;
516
516
  } finally {
517
- E === o && (r.isLoading = !1);
517
+ D === o && (r.isLoading = !1);
518
518
  }
519
- return ye(() => i.onLoaded?.(a)), a;
519
+ return xe(() => i.onLoaded?.(a)), a;
520
520
  }
521
- async function Ce(e = "api") {
522
- let n = be("save()"), { save: i } = n;
523
- typeof i != "function" && ve("save()", "is disabled by the provider — its `save` is `false`.");
521
+ async function we(e = "api") {
522
+ let n = Se("save()"), { save: i } = n;
523
+ typeof i != "function" && be("save()", "is disabled by the provider — its `save` is `false`.");
524
524
  let a = r.template;
525
- a || ve("save()", "has no template loaded. Call create() or load() first.");
525
+ a || be("save()", "has no template loaded. Call create() or load() first.");
526
526
  let o = a.name === void 0 ? { content: r.content } : {
527
527
  name: a.name,
528
528
  content: r.content
@@ -543,16 +543,16 @@ function Fe(t) {
543
543
  } finally {
544
544
  r.isSaving = !1;
545
545
  }
546
- return ye(() => n.onSaved?.(s, { trigger: e })), s;
546
+ return xe(() => n.onSaved?.(s, { trigger: e })), s;
547
547
  }
548
- function Te() {
548
+ function Y() {
549
549
  return r.template?.id !== void 0;
550
550
  }
551
551
  let X = {
552
552
  state: m(r),
553
- loadVersion: m(T),
554
- content: A,
555
- selectedBlock: j,
553
+ loadVersion: m(E),
554
+ content: ne,
555
+ selectedBlock: M,
556
556
  activeLocale: i,
557
557
  setActiveLocale: o,
558
558
  addLocale: p,
@@ -562,34 +562,34 @@ function Fe(t) {
562
562
  keepTranslations: w,
563
563
  setCustomBlockDefinitions: c,
564
564
  createSetDefaultLocaleOperation: l,
565
- isBlockLocked: F,
566
- setContent: L,
567
- selectBlock: R,
568
- setViewport: ie,
569
- setDarkMode: se,
570
- setUiTheme: W,
571
- setPreviewMode: le,
572
- updateBlock: de,
573
- updateSettings: pe,
574
- addBlock: me,
575
- removeBlock: he,
576
- moveBlock: ge,
577
- markDirty: _e,
578
- findBlockLocation: I,
579
- setName: xe,
580
- create: Y,
581
- load: Se,
582
- save: Ce,
583
- hasTemplate: Te
565
+ isBlockLocked: I,
566
+ setContent: se,
567
+ selectBlock: V,
568
+ setViewport: le,
569
+ setDarkMode: ue,
570
+ setUiTheme: de,
571
+ setPreviewMode: G,
572
+ updateBlock: pe,
573
+ updateSettings: he,
574
+ addBlock: ge,
575
+ removeBlock: _e,
576
+ moveBlock: ve,
577
+ markDirty: ye,
578
+ findBlockLocation: z,
579
+ setName: q,
580
+ create: J,
581
+ load: Ce,
582
+ save: we,
583
+ hasTemplate: Y
584
584
  };
585
- return Me(X, (e, t) => Ae(e) ? je(J, e, t) : s() ? e === "updateBlock" ? ue(t[0], t[1]) : (e === "updateSettings" && fe(t[0]), e === "addLocale" || e === "removeLocale" ? d(e, t[0]) !== null : e === "setBlockHidden" || e === "resetLocaleFields" || e === "keepTranslations" ? v(e, t) !== null : !0) : !1), X;
585
+ return Me(X, (e, t) => Ae(e) ? je(K, e, t) : s() ? e === "updateBlock" ? fe(t[0], t[1]) : (e === "updateSettings" && me(t[0]), e === "addLocale" || e === "removeLocale" ? d(e, t[0]) !== null : e === "setBlockHidden" || e === "resetLocaleFields" || e === "keepTranslations" ? v(e, t) !== null : !0) : !1), X;
586
586
  }
587
587
  // ../core/src/history.ts
588
588
  var Ie = 50, Le = 300, Re = 1500;
589
589
  function ze(e) {
590
590
  let { content: t, setContent: n, maxSize: r = Ie } = e, i = S([]), a = S([]), o = S(!1), s = null, c = null, l = b(() => i.value.length > 0), u = b(() => a.value.length > 0);
591
591
  function d() {
592
- return G(t.value);
592
+ return U(t.value);
593
593
  }
594
594
  function f(e) {
595
595
  i.value.push(e), i.value.length > r && i.value.splice(0, i.value.length - r);
@@ -650,7 +650,7 @@ function ze(e) {
650
650
  function Be(e) {
651
651
  let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
652
652
  function o(n, r, a) {
653
- let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = fe(n, o);
653
+ let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = pe(n, o);
654
654
  return t(s, r, a), i(s.id), s;
655
655
  }
656
656
  function s(e, n, r) {
@@ -859,7 +859,7 @@ function et(e) {
859
859
  }
860
860
  function tt(e, t, n) {
861
861
  let r = {}, i = [];
862
- for (let i of Object.keys(t)) n.has(i) || t[i] === void 0 || q(e[i], t[i]) || (r[i] = G(t[i]));
862
+ for (let i of Object.keys(t)) n.has(i) || t[i] === void 0 || H(e[i], t[i]) || (r[i] = U(t[i]));
863
863
  for (let r of Object.keys(e)) n.has(r) || e[r] === void 0 || t[r] === void 0 && i.push(r);
864
864
  return {
865
865
  set: r,
@@ -878,7 +878,7 @@ function nt(e = {}, t = {}) {
878
878
  function rt(e, t) {
879
879
  if (e.settings.locale !== t.settings.locale && (e.settings.locales?.length || t.settings.locales?.length)) return [{
880
880
  op: "setContent",
881
- content: G(t)
881
+ content: U(t)
882
882
  }];
883
883
  let n = $e(e.blocks), r = $e(t.blocks), i = [], a = (e) => {
884
884
  let t = r.get(e), i = n.get(e);
@@ -896,8 +896,8 @@ function rt(e, t) {
896
896
  };
897
897
  for (let t of e.blocks) u(t, "kept");
898
898
  let d = (e) => n.has(e) && !c.has(e), f = (e) => {
899
- let t = G(e);
900
- return t.type === "section" && (t.children = Qe(e).map((e) => Array.isArray(e) ? e.filter((e) => !d(e.id)).map((e) => G(e)) : e)), t;
899
+ let t = U(e);
900
+ return t.type === "section" && (t.children = Qe(e).map((e) => Array.isArray(e) ? e.filter((e) => !d(e.id)).map((e) => U(e)) : e)), t;
901
901
  }, p = (e, t, r) => {
902
902
  let a = Ze(e), o = [], s = [];
903
903
  t.forEach((e, t) => {
@@ -1037,39 +1037,39 @@ function st(e, t, n) {
1037
1037
  Object.keys(n).length ? (e.l10n ??= {})[t] = n : e.l10n && (delete e.l10n[t], Object.keys(e.l10n).length || delete e.l10n);
1038
1038
  }
1039
1039
  function ct(e) {
1040
- let t = G(e);
1040
+ let t = U(e);
1041
1041
  return delete t.l10n, t.type === "section" && (t.children = t.children.map((e) => e.map(ct))), t;
1042
1042
  }
1043
1043
  function lt(e, t, n, r) {
1044
- let i = oe(e, t), a = G(e), o = G(i.settings), s = !1, c = /* @__PURE__ */ new Map(), l = (n, r) => {
1044
+ let i = re(e, t), a = U(e), o = U(i.settings), s = !1, c = /* @__PURE__ */ new Map(), l = (n, r) => {
1045
1045
  for (let [i, a] of $(n)) c.set(i, {
1046
- initial: K(a, t, D(e)),
1046
+ initial: A(a, t, P(e)),
1047
1047
  added: r,
1048
1048
  changed: !1
1049
1049
  });
1050
1050
  };
1051
1051
  l(i.blocks, !1);
1052
1052
  let u = [], d = (e, t, n) => {
1053
- if (t.some((e) => e?.op === "setDefaultLocale")) throw new P("invalid_operation", n, "Changing the default language isn't possible in a language view; switch to the default language.");
1054
- if (t.some((e) => e?.op === "setContent")) throw new P("invalid_operation", n, "Replacing the whole template isn't possible in a language view; switch to the default language.");
1053
+ if (t.some((e) => e?.op === "setDefaultLocale")) throw new M("invalid_operation", n, "Changing the default language isn't possible in a language view; switch to the default language.");
1054
+ if (t.some((e) => e?.op === "setContent")) throw new M("invalid_operation", n, "Replacing the whole template isn't possible in a language view; switch to the default language.");
1055
1055
  try {
1056
- return F(e, t);
1056
+ return E(e, t);
1057
1057
  } catch (e) {
1058
- throw e instanceof P ? new P(e.code, n, e.message, e.blockId) : e;
1058
+ throw e instanceof M ? new M(e.code, n, e.message, e.blockId) : e;
1059
1059
  }
1060
1060
  }, f = (e, t) => {
1061
1061
  a = d(a, e, t), u.push(...e);
1062
1062
  }, p = (e, n) => {
1063
1063
  let o = c.get(e);
1064
1064
  if (!o?.changed) return;
1065
- let s = $(a.blocks).get(e), l = $(i.blocks).get(e), u = G(a), d = it(u, at(u, e).parent), p = G(s);
1065
+ let s = $(a.blocks).get(e), l = $(i.blocks).get(e), u = U(a), d = it(u, at(u, e).parent), p = U(s);
1066
1066
  if (o.added) p = ct(l), p.type === "section" && s.type === "section" && (p.children = s.children, p.columns = s.columns);
1067
1067
  else {
1068
1068
  De(p, p.type === "section" ? {
1069
1069
  ...l,
1070
1070
  children: p.children,
1071
1071
  columns: p.columns
1072
- } : l, (e) => $(a.blocks).get(e) ?? null), p = M(p);
1072
+ } : l, (e) => $(a.blocks).get(e) ?? null), p = L(p);
1073
1073
  let e = p.l10n?.[t];
1074
1074
  st(p, t, ke(e, Ee(p, o.initial, e, r), Ee(p, l, e, r), p, l));
1075
1075
  }
@@ -1092,7 +1092,7 @@ function lt(e, t, n, r) {
1092
1092
  op: "updateBlock",
1093
1093
  blockId: e.blockId,
1094
1094
  set: { columns: i.columns },
1095
- ...e.expect ? { expect: Object.fromEntries(Object.keys(e.expect).map((e) => [e, B(u, e) ?? null])) } : {}
1095
+ ...e.expect ? { expect: Object.fromEntries(Object.keys(e.expect).map((e) => [e, R(u, e) ?? null])) } : {}
1096
1096
  }], n);
1097
1097
  };
1098
1098
  n.forEach((e, t) => {
@@ -1137,7 +1137,7 @@ function lt(e, t, n, r) {
1137
1137
  });
1138
1138
  for (let e of c.keys()) p(e, n.length - 1);
1139
1139
  if (s) {
1140
- let e = G(a), r = e.settings.l10n?.[t];
1140
+ let e = U(a), r = e.settings.l10n?.[t];
1141
1141
  st(e.settings, t, ke(r, Oe(e.settings, o, r), Oe(e.settings, i.settings, r), e.settings, i.settings)), f(rt(a, e), n.length - 1);
1142
1142
  }
1143
1143
  return u;
@@ -1194,14 +1194,14 @@ function St(e) {
1194
1194
  });
1195
1195
  }
1196
1196
  function Ct(e) {
1197
- let { provider: t } = e, n = e.sessionId ?? crypto.randomUUID(), r = e.maxUndo ?? pt, i = typeof t.acquireLock == "function" && typeof t.renewLock == "function" && typeof t.releaseLock == "function", a = x([]), s = x(/* @__PURE__ */ new Map()), l = /* @__PURE__ */ new WeakSet(), u = /* @__PURE__ */ new WeakMap(), d = 0, f = S(null), p = S(null), m = S(0), g = S(0), _ = null, v = null, y = !1, C = !1, w = !1, T = !1, E = null, D = 0, O = !1, k = [], A = null, j = null, te = Promise.resolve(), M = null, N = b(() => (v?.undo.length ?? 0) > 0), re = b(() => (v?.redo.length ?? 0) > 0);
1198
- function I(t) {
1197
+ let { provider: t } = e, n = e.sessionId ?? crypto.randomUUID(), r = e.maxUndo ?? pt, i = typeof t.acquireLock == "function" && typeof t.renewLock == "function" && typeof t.releaseLock == "function", a = x([]), s = x(/* @__PURE__ */ new Map()), l = /* @__PURE__ */ new WeakSet(), u = /* @__PURE__ */ new WeakMap(), d = 0, f = S(null), p = S(null), m = S(0), g = S(0), _ = null, v = null, y = !1, C = !1, w = !1, T = !1, D = null, O = 0, ee = !1, k = [], A = null, j = null, re = Promise.resolve(), N = null, ie = b(() => (v?.undo.length ?? 0) > 0), P = b(() => (v?.redo.length ?? 0) > 0);
1198
+ function F(t) {
1199
1199
  e.onError?.(t instanceof Error ? t : Error(String(t)));
1200
1200
  }
1201
- function L(t, n = v) {
1202
- n !== v || O || e.onNotice?.(t);
1201
+ function I(t, n = v) {
1202
+ n !== v || ee || e.onNotice?.(t);
1203
1203
  }
1204
- function R() {
1204
+ function ae() {
1205
1205
  return {
1206
1206
  locks: [...s.value.values()].map((e) => ({
1207
1207
  blockId: e.blockId,
@@ -1211,87 +1211,87 @@ function Ct(e) {
1211
1211
  session: n
1212
1212
  };
1213
1213
  }
1214
- function z() {
1214
+ function L() {
1215
1215
  g.value++;
1216
1216
  }
1217
- function ie(e, t) {
1217
+ function R(e, t) {
1218
1218
  e.push(t), e.length > r && e.splice(0, e.length - r);
1219
1219
  }
1220
- function B(e) {
1220
+ function z(e) {
1221
1221
  if (!_ || y) return;
1222
1222
  C = !0;
1223
1223
  try {
1224
1224
  let t = _.content.value, n = rt(t, e);
1225
1225
  if (n.length > 0) try {
1226
- ee(t, n);
1226
+ te(t, n);
1227
1227
  } catch {
1228
- _.setContent(G(e), !1);
1228
+ _.setContent(U(e), !1);
1229
1229
  }
1230
- q(_.content.value, e) || _.setContent(G(e), !1);
1230
+ H(_.content.value, e) || _.setContent(U(e), !1);
1231
1231
  } finally {
1232
1232
  C = !1;
1233
1233
  }
1234
1234
  let t = _.state.selectedBlockId;
1235
1235
  t && !bt(e.blocks, t) && _.selectBlock(null);
1236
1236
  }
1237
- function ae() {
1237
+ function oe() {
1238
1238
  C || T || (T = !0, queueMicrotask(() => {
1239
1239
  T = !1, se(!1);
1240
1240
  }));
1241
1241
  }
1242
- function oe() {
1243
- E &&= (clearTimeout(E), null);
1242
+ function B() {
1243
+ D &&= (clearTimeout(D), null);
1244
1244
  }
1245
1245
  function se(e, t = !1) {
1246
1246
  let n = v;
1247
1247
  if (!_ || !n || y || C || _.state.isLoading && !t || _.state.template?.id !== n.templateId) return;
1248
1248
  let r = rt(n.view, _.content.value);
1249
- if (r.length === 0) oe();
1249
+ if (r.length === 0) B();
1250
1250
  else {
1251
1251
  if (!e && xt(r)) {
1252
1252
  let e = Date.now();
1253
- if (E === null && (D = e), e - D < 1e3) {
1254
- E && clearTimeout(E), E = setTimeout(() => {
1255
- E = null, se(!0);
1253
+ if (D === null && (O = e), e - O < 1e3) {
1254
+ D && clearTimeout(D), D = setTimeout(() => {
1255
+ D = null, se(!0);
1256
1256
  }, 300);
1257
1257
  return;
1258
1258
  }
1259
1259
  }
1260
- oe(), H(n, r);
1260
+ B(), ce(n, r);
1261
1261
  }
1262
1262
  }
1263
1263
  function V() {
1264
1264
  se(!0);
1265
1265
  }
1266
- function H(e, t) {
1266
+ function ce(e, t) {
1267
1267
  let n = t, r;
1268
1268
  try {
1269
- r = F(e.view, n, R());
1269
+ r = E(e.view, n, ae());
1270
1270
  } catch (n) {
1271
- if (!(n instanceof P)) throw n;
1272
- B(e.view);
1271
+ if (!(n instanceof M)) throw n;
1272
+ z(e.view);
1273
1273
  let r = n.blockId === void 0 ? void 0 : Ae(n.blockId).find((e) => {
1274
1274
  let r = t[n.opIndex];
1275
1275
  return r.op !== "updateBlockLocale" || e.locale == null || e.locale === r.locale;
1276
1276
  })?.holder;
1277
- L({
1277
+ I({
1278
1278
  type: "editRefused",
1279
1279
  code: n.code,
1280
1280
  ...r ? { holder: r } : {}
1281
- }), n.code === "invalid_operation" && I(n);
1281
+ }), n.code === "invalid_operation" && F(n);
1282
1282
  return;
1283
1283
  }
1284
1284
  let i = _.content.value;
1285
- if (!q(r, i)) {
1286
- I(/* @__PURE__ */ Error("[Templatical] Collaboration: a change couldn't be expressed as block operations, so the whole content was sent.")), n = [{
1285
+ if (!H(r, i)) {
1286
+ F(/* @__PURE__ */ Error("[Templatical] Collaboration: a change couldn't be expressed as block operations, so the whole content was sent.")), n = [{
1287
1287
  op: "setContent",
1288
- content: G(i)
1288
+ content: U(i)
1289
1289
  }];
1290
1290
  try {
1291
- r = F(e.view, n, R());
1291
+ r = E(e.view, n, ae());
1292
1292
  } catch (t) {
1293
- if (!(t instanceof P)) throw t;
1294
- B(e.view), L({
1293
+ if (!(t instanceof M)) throw t;
1294
+ z(e.view), I({
1295
1295
  type: "editRefused",
1296
1296
  code: t.code
1297
1297
  });
@@ -1299,11 +1299,11 @@ function Ct(e) {
1299
1299
  }
1300
1300
  }
1301
1301
  let a = gt({ ops: ne(e.view, n) }, r);
1302
- ie(e.undo, a), e.redo = [], z();
1302
+ R(e.undo, a), e.redo = [], L();
1303
1303
  let o = e.view;
1304
- e.view = r, U(e, n, "edit", a, o);
1304
+ e.view = r, le(e, n, "edit", a, o);
1305
1305
  }
1306
- function U(e, t, n, r, i) {
1306
+ function le(e, t, n, r, i) {
1307
1307
  let a = { dropped: !1 }, o = 0, s = i;
1308
1308
  do {
1309
1309
  let i = t.slice(o, o + mt);
@@ -1317,7 +1317,7 @@ function Ct(e) {
1317
1317
  revision: null,
1318
1318
  ...s && i.some((e) => e.op === "setContent") ? { base: s } : {}
1319
1319
  }), o += mt, s && t.slice(o).some((e) => e.op === "setContent")) try {
1320
- s = F(s, i);
1320
+ s = E(s, i);
1321
1321
  } catch {
1322
1322
  s = null;
1323
1323
  }
@@ -1327,134 +1327,134 @@ function Ct(e) {
1327
1327
  function W(e) {
1328
1328
  if (e.inFlight || w) return;
1329
1329
  let t = e.pending.find((e) => !e.sent);
1330
- t ? (t.sent = !0, e.inFlight = t, ce(e, t, 0)) : pe(e);
1330
+ t ? (t.sent = !0, e.inFlight = t, ue(e, t, 0)) : he(e);
1331
1331
  }
1332
- function ce(e, n, r) {
1332
+ function ue(e, n, r) {
1333
1333
  t.submit(e.templateId, {
1334
1334
  batchId: n.batchId,
1335
1335
  baseRevision: n.baseRevision ??= e.revision,
1336
1336
  ops: n.ops,
1337
1337
  ...n.origin === "ai" ? { origin: "ai" } : {}
1338
1338
  }).then(({ revision: t }) => {
1339
- e.inFlight = null, le(e, n, t), W(e);
1339
+ e.inFlight = null, de(e, n, t), W(e);
1340
1340
  }, (t) => {
1341
- if (_t(t) !== null) e.inFlight = null, fe(e, n, t), W(e);
1341
+ if (_t(t) !== null) e.inFlight = null, me(e, n, t), W(e);
1342
1342
  else if (yt(t)) {
1343
- J(e, t);
1343
+ K(e, t);
1344
1344
  let i = ft[Math.min(r, ft.length - 1)];
1345
1345
  setTimeout(() => {
1346
- O || ce(e, n, r + 1);
1346
+ ee || ue(e, n, r + 1);
1347
1347
  }, i);
1348
- } else e.inFlight = null, I(t), fe(e, n, t), W(e);
1348
+ } else e.inFlight = null, F(t), me(e, n, t), W(e);
1349
1349
  });
1350
1350
  }
1351
- function le(e, t, n) {
1352
- t.revision === null && (t.revision = n, n <= e.revision ? (K(e, t), _e(e)) : (e.own.set(n, t), ge(e)));
1351
+ function de(e, t, n) {
1352
+ t.revision === null && (t.revision = n, n <= e.revision ? (G(e, t), ye(e)) : (e.own.set(n, t), ve(e)));
1353
1353
  }
1354
- function K(e, t) {
1355
- e.pending = e.pending.filter((e) => e !== t), pe(e);
1354
+ function G(e, t) {
1355
+ e.pending = e.pending.filter((e) => e !== t), he(e);
1356
1356
  }
1357
- function ue(e, t) {
1357
+ function fe(e, t) {
1358
1358
  if (t.entry) {
1359
1359
  for (let n of [e.undo, e.redo]) {
1360
1360
  let e = n.indexOf(t.entry);
1361
1361
  e !== -1 && n.splice(e, 1);
1362
1362
  }
1363
- z();
1363
+ L();
1364
1364
  }
1365
1365
  }
1366
- function de(e, t) {
1366
+ function pe(e, t) {
1367
1367
  let n = !t.group.dropped;
1368
- return t.group.dropped = !0, e.pending = e.pending.filter((e) => e.group !== t.group || e.sent), n && ue(e, t), pe(e), n;
1368
+ return t.group.dropped = !0, e.pending = e.pending.filter((e) => e.group !== t.group || e.sent), n && fe(e, t), he(e), n;
1369
1369
  }
1370
- function fe(e, t, n) {
1371
- if (K(e, t), de(e, t)) {
1370
+ function me(e, t, n) {
1371
+ if (G(e, t), pe(e, t)) {
1372
1372
  let r = _t(n) ?? "invalid_operation";
1373
1373
  if (t.origin === "edit" || t.origin === "ai") {
1374
1374
  let t = vt(n);
1375
- L({
1375
+ I({
1376
1376
  type: "editRefused",
1377
1377
  code: r,
1378
1378
  ...t ? { holder: t } : {}
1379
1379
  }, e);
1380
- } else L({
1380
+ } else I({
1381
1381
  type: "undoSkipped",
1382
1382
  code: r
1383
1383
  }, e);
1384
1384
  }
1385
- _e(e), e === v && xe();
1385
+ ye(e), e === v && q();
1386
1386
  }
1387
- function pe(e) {
1387
+ function he(e) {
1388
1388
  if (!(e.pending.length > 0 || e.waiters.length === 0)) for (let t of e.waiters.splice(0)) t.resolve();
1389
1389
  }
1390
- function J(e, t) {
1390
+ function K(e, t) {
1391
1391
  let n = t instanceof Error ? t : Error(String(t));
1392
1392
  for (let t of e.waiters.splice(0)) t.reject(n);
1393
1393
  }
1394
- function me(e, t) {
1394
+ function ge(e, t) {
1395
1395
  if (t.revision <= e.revision) return;
1396
1396
  let n = e.pending.find((e) => e.batchId === t.batchId);
1397
- n ? le(e, n, t.revision) : (e.remote.set(t.revision, t), ge(e));
1397
+ n ? de(e, n, t.revision) : (e.remote.set(t.revision, t), ve(e));
1398
1398
  }
1399
- function he(t, n) {
1399
+ function _e(t, n) {
1400
1400
  let r = n.ops;
1401
1401
  if (e.normalizeRemoteOperations) try {
1402
1402
  r = e.normalizeRemoteOperations(n.ops, t.confirmed);
1403
1403
  } catch (e) {
1404
- I(e);
1404
+ F(e);
1405
1405
  }
1406
1406
  return St(r);
1407
1407
  }
1408
- function ge(t) {
1408
+ function ve(t) {
1409
1409
  let n = [], r = !1;
1410
1410
  for (;;) {
1411
1411
  let e = t.revision + 1, i = t.remote.get(e), a = t.own.get(e);
1412
1412
  if (!i && !a) break;
1413
1413
  try {
1414
- t.confirmed = F(t.confirmed, i ? he(t, i) : a.ops);
1414
+ t.confirmed = E(t.confirmed, i ? _e(t, i) : a.ops);
1415
1415
  } catch {
1416
1416
  if (t.recovering) {
1417
- t.remote.clear(), t.own.clear(), I(/* @__PURE__ */ Error("[Templatical] Collaboration: this editor can't follow the template's changes. Reload the page."));
1417
+ t.remote.clear(), t.own.clear(), F(/* @__PURE__ */ Error("[Templatical] Collaboration: this editor can't follow the template's changes. Reload the page."));
1418
1418
  return;
1419
1419
  }
1420
- Y(t);
1420
+ J(t);
1421
1421
  return;
1422
1422
  }
1423
- t.revision = e, i ? (t.remote.delete(e), n.push(i)) : (t.own.delete(e), a.group.dropped && (r = !0), K(t, a));
1423
+ t.revision = e, i ? (t.remote.delete(e), n.push(i)) : (t.own.delete(e), a.group.dropped && (r = !0), G(t, a));
1424
1424
  }
1425
- if (t === v && (m.value = t.revision), t.remote.size > 0 || t.own.size > 0 ? ye(t) : be(t), (n.length !== 0 || r) && (_e(t), t === v)) for (let t of n) try {
1425
+ if (t === v && (m.value = t.revision), t.remote.size > 0 || t.own.size > 0 ? xe(t) : Se(t), (n.length !== 0 || r) && (ye(t), t === v)) for (let t of n) try {
1426
1426
  e.onRemoteChange?.({
1427
1427
  actor: t.actor,
1428
1428
  ops: t.ops,
1429
1429
  locale: t.ops.find((e) => e.op !== "setDefaultLocale" && "locale" in e)?.locale ?? null
1430
1430
  });
1431
1431
  } catch (e) {
1432
- I(e);
1432
+ F(e);
1433
1433
  }
1434
1434
  }
1435
- function _e(e) {
1435
+ function ye(e) {
1436
1436
  let t = !w;
1437
1437
  w = !0;
1438
1438
  try {
1439
- ve(e);
1439
+ be(e);
1440
1440
  } finally {
1441
1441
  t && (w = !1);
1442
1442
  }
1443
1443
  t && W(e);
1444
1444
  }
1445
- function ve(e) {
1445
+ function be(e) {
1446
1446
  e === v && V();
1447
1447
  let t = e.confirmed;
1448
1448
  for (let n = 0; n < e.pending.length; n++) {
1449
1449
  let r = e.pending[n], i;
1450
- if (r.base && !q(r.base, t)) i = "precondition_failed";
1450
+ if (r.base && !H(r.base, t)) i = "precondition_failed";
1451
1451
  else try {
1452
- t = F(t, r.ops);
1452
+ t = E(t, r.ops);
1453
1453
  continue;
1454
1454
  } catch (e) {
1455
- i = e instanceof P ? e.code : "invalid_operation";
1455
+ i = e instanceof M ? e.code : "invalid_operation";
1456
1456
  }
1457
- r.sent || (de(e, r) && L(r.origin === "edit" || r.origin === "ai" ? {
1457
+ r.sent || (pe(e, r) && I(r.origin === "edit" || r.origin === "ai" ? {
1458
1458
  type: "editRefused",
1459
1459
  code: i
1460
1460
  } : {
@@ -1462,54 +1462,54 @@ function Ct(e) {
1462
1462
  code: i
1463
1463
  }, e), t = e.confirmed, n = -1);
1464
1464
  }
1465
- e.view = t, pe(e), e === v && B(t);
1465
+ e.view = t, he(e), e === v && z(t);
1466
1466
  }
1467
- function ye(e) {
1467
+ function xe(e) {
1468
1468
  e.gapTimer ||= setTimeout(() => {
1469
- e.gapTimer = null, e === v && xe();
1469
+ e.gapTimer = null, e === v && q();
1470
1470
  }, ut);
1471
1471
  }
1472
- function be(e) {
1472
+ function Se(e) {
1473
1473
  e.gapTimer &&= (clearTimeout(e.gapTimer), null);
1474
1474
  }
1475
- function xe() {
1475
+ function q() {
1476
1476
  let e = v;
1477
1477
  return e ? (e.catchingUp ||= (async () => {
1478
1478
  try {
1479
1479
  let n = await t.operationsAfter(e.templateId, e.revision);
1480
1480
  if (e.retired) return;
1481
1481
  if ("resync" in n) {
1482
- await Y(e);
1482
+ await J(e);
1483
1483
  return;
1484
1484
  }
1485
- for (let t of n.batches) me(e, t);
1485
+ for (let t of n.batches) ge(e, t);
1486
1486
  } catch (e) {
1487
- I(e);
1487
+ F(e);
1488
1488
  } finally {
1489
1489
  e.catchingUp = null;
1490
1490
  }
1491
1491
  })(), e.catchingUp) : Promise.resolve();
1492
1492
  }
1493
- async function Y(t) {
1493
+ async function J(t) {
1494
1494
  t.recovering = !0;
1495
1495
  try {
1496
1496
  let n = await e.loadTemplate(t.templateId);
1497
1497
  if (t.retired) return;
1498
1498
  let r = n.revision ?? t.revision;
1499
- t.confirmed = G(n.content), t.revision = r, t.remote = new Map([...t.remote].filter(([e]) => e > r));
1500
- for (let [e, n] of [...t.own]) e <= r && (t.own.delete(e), K(t, n));
1501
- t === v && (m.value = r), _e(t), ge(t);
1499
+ t.confirmed = U(n.content), t.revision = r, t.remote = new Map([...t.remote].filter(([e]) => e > r));
1500
+ for (let [e, n] of [...t.own]) e <= r && (t.own.delete(e), G(t, n));
1501
+ t === v && (m.value = r), ye(t), ve(t);
1502
1502
  } catch (e) {
1503
- I(e);
1503
+ F(e);
1504
1504
  } finally {
1505
1505
  t.recovering = !1;
1506
1506
  }
1507
1507
  }
1508
- function Se(t) {
1508
+ function Ce(t) {
1509
1509
  let n = () => t === v && !t.retired;
1510
1510
  return {
1511
1511
  onBatch: (e) => {
1512
- n() && me(t, e);
1512
+ n() && ge(t, e);
1513
1513
  },
1514
1514
  onResync: (r, i) => {
1515
1515
  if (!(!n() || r <= t.revision)) {
@@ -1519,9 +1519,9 @@ function Ct(e) {
1519
1519
  actor: i
1520
1520
  });
1521
1521
  } catch (e) {
1522
- I(e);
1522
+ F(e);
1523
1523
  }
1524
- xe();
1524
+ q();
1525
1525
  }
1526
1526
  },
1527
1527
  onLock: (e) => {
@@ -1538,19 +1538,19 @@ function Ct(e) {
1538
1538
  }
1539
1539
  };
1540
1540
  }
1541
- function Ce(e, r) {
1541
+ function we(e, r) {
1542
1542
  let i = d;
1543
- t.join(e.templateId, { sessionId: n }, Se(e)).then((t) => {
1544
- e.retired || e !== v ? r || t.leave() : (e.leave = t.leave, Ne(t.locks, !r, i), Z(t.members), t.members.length > 0 && (p.value = "connected"), t.revision > e.revision && xe(), r && Q());
1545
- }, (e) => I(e));
1543
+ t.join(e.templateId, { sessionId: n }, Ce(e)).then((t) => {
1544
+ e.retired || e !== v ? r || t.leave() : (e.leave = t.leave, Ne(t.locks, !r, i), Z(t.members), t.members.length > 0 && (p.value = "connected"), t.revision > e.revision && q(), r && Q());
1545
+ }, (e) => F(e));
1546
1546
  }
1547
- function we(e) {
1548
- let t = G(e.content), n = {
1547
+ function Te(e) {
1548
+ let t = U(e.content), n = {
1549
1549
  templateId: e.id,
1550
1550
  confirmed: t,
1551
1551
  revision: e.revision ?? 0,
1552
1552
  pending: [],
1553
- view: G(t),
1553
+ view: U(t),
1554
1554
  remote: /* @__PURE__ */ new Map(),
1555
1555
  own: /* @__PURE__ */ new Map(),
1556
1556
  inFlight: null,
@@ -1563,17 +1563,17 @@ function Ct(e) {
1563
1563
  redo: [],
1564
1564
  waiters: []
1565
1565
  };
1566
- v = n, m.value = n.revision, z(), Ce(n, !1), _?.state.selectedBlockId && ze(_.state.selectedBlockId), ae();
1566
+ v = n, m.value = n.revision, L(), we(n, !1), _?.state.selectedBlockId && ze(_.state.selectedBlockId), oe();
1567
1567
  }
1568
- function Te(e) {
1569
- e.retired = !0, be(e), e.leave?.(), e.leave = null, J(e, /* @__PURE__ */ Error("[Templatical] The template was closed."));
1568
+ function Y(e) {
1569
+ e.retired = !0, Se(e), e.leave?.(), e.leave = null, K(e, /* @__PURE__ */ Error("[Templatical] The template was closed."));
1570
1570
  }
1571
1571
  function Ee(e, t) {
1572
1572
  let n = p.value;
1573
- p.value = t, t === "connected" && n !== null && n !== "connected" && Ce(e, !0);
1573
+ p.value = t, t === "connected" && n !== null && n !== "connected" && we(e, !0);
1574
1574
  }
1575
1575
  function De(e) {
1576
- v && v.templateId === e?.id || (v &&= (oe(), Te(v), null), a.value = [], s.value = /* @__PURE__ */ new Map(), p.value = null, A = null, Q(), z(), e && we(e));
1576
+ v && v.templateId === e?.id || (v &&= (B(), Y(v), null), a.value = [], s.value = /* @__PURE__ */ new Map(), p.value = null, A = null, Q(), L(), e && Te(e));
1577
1577
  }
1578
1578
  function Oe(e, t) {
1579
1579
  return `${e}\u0000${t ?? ""}`;
@@ -1591,7 +1591,7 @@ function Ct(e) {
1591
1591
  if (e.holder.sessionId === n) return;
1592
1592
  t ? l.add(e) : u.set(e, ++d);
1593
1593
  let r = new Map([...s.value].filter(([, t]) => t.holder.sessionId !== e.holder.sessionId));
1594
- r.set(Oe(e.blockId, e.locale), e), s.value = r, _?.state.selectedBlockId === e.blockId && (f.value === null || e.locale == null || e.locale === f.value) && (_.selectBlock(null), L({
1594
+ r.set(Oe(e.blockId, e.locale), e), s.value = r, _?.state.selectedBlockId === e.blockId && (f.value === null || e.locale == null || e.locale === f.value) && (_.selectBlock(null), I({
1595
1595
  type: "selectionRefused",
1596
1596
  blockId: e.blockId,
1597
1597
  holder: e.holder
@@ -1616,7 +1616,7 @@ function Ct(e) {
1616
1616
  r.size !== s.value.size && (s.value = r);
1617
1617
  }
1618
1618
  function Pe(e) {
1619
- te = te.then(e).catch(I);
1619
+ re = re.then(e).catch(F);
1620
1620
  }
1621
1621
  function Q() {
1622
1622
  i && Pe(async () => {
@@ -1652,12 +1652,12 @@ function Ct(e) {
1652
1652
  holder: n,
1653
1653
  expiresAt: ""
1654
1654
  }, !0) : _?.state.selectedBlockId === e && _.selectBlock(null);
1655
- } else I(t), setTimeout(() => {
1655
+ } else F(t), setTimeout(() => {
1656
1656
  A?.blockId === e && Q();
1657
1657
  }, ft[0]);
1658
1658
  }
1659
1659
  function Le() {
1660
- M ||= setInterval(() => {
1660
+ N ||= setInterval(() => {
1661
1661
  Pe(async () => {
1662
1662
  let e = j;
1663
1663
  if (e) try {
@@ -1667,13 +1667,13 @@ function Ct(e) {
1667
1667
  j = null, Re(), Q();
1668
1668
  return;
1669
1669
  }
1670
- I(e);
1670
+ F(e);
1671
1671
  }
1672
1672
  });
1673
1673
  }, dt);
1674
1674
  }
1675
1675
  function Re() {
1676
- M &&= (clearInterval(M), null);
1676
+ N &&= (clearInterval(N), null);
1677
1677
  }
1678
1678
  function ze(e) {
1679
1679
  V(), v && (A = e ? {
@@ -1691,8 +1691,8 @@ function Ct(e) {
1691
1691
  V();
1692
1692
  let n = (e === "undo" ? t.undo : t.redo).pop();
1693
1693
  if (!n) return;
1694
- if (z(), n.view && !q(n.view, t.view)) {
1695
- L({
1694
+ if (L(), n.view && !H(n.view, t.view)) {
1695
+ I({
1696
1696
  type: "undoSkipped",
1697
1697
  code: "precondition_failed"
1698
1698
  });
@@ -1700,30 +1700,30 @@ function Ct(e) {
1700
1700
  }
1701
1701
  let r;
1702
1702
  try {
1703
- r = F(t.view, n.ops, R());
1703
+ r = E(t.view, n.ops, ae());
1704
1704
  } catch (e) {
1705
- if (!(e instanceof P)) throw e;
1706
- L({
1705
+ if (!(e instanceof M)) throw e;
1706
+ I({
1707
1707
  type: "undoSkipped",
1708
1708
  code: e.code
1709
1709
  });
1710
1710
  return;
1711
1711
  }
1712
1712
  let i = gt({ ops: ne(t.view, n.ops) }, r);
1713
- ie(e === "undo" ? t.redo : t.undo, i);
1713
+ R(e === "undo" ? t.redo : t.undo, i);
1714
1714
  let a = t.view;
1715
- t.view = r, B(r), _?.markDirty(), U(t, n.ops, e, i, a);
1715
+ t.view = r, z(r), _?.markDirty(), le(t, n.ops, e, i, a);
1716
1716
  }
1717
1717
  function He(e, t) {
1718
1718
  let n = v;
1719
1719
  if (!_ || !n || y) return {
1720
1720
  applied: !1,
1721
- error: new P("invalid_operation", 0, "No template is open for editing.")
1721
+ error: new M("invalid_operation", 0, "No template is open for editing.")
1722
1722
  };
1723
1723
  if (t.origin === void 0) try {
1724
- F(_.content.value, e, R());
1724
+ E(_.content.value, e, ae());
1725
1725
  } catch (e) {
1726
- if (e instanceof P) return {
1726
+ if (e instanceof M) return {
1727
1727
  applied: !1,
1728
1728
  error: e
1729
1729
  };
@@ -1732,9 +1732,9 @@ function Ct(e) {
1732
1732
  V();
1733
1733
  let r, i;
1734
1734
  try {
1735
- r = F(n.view, e, R()), i = ne(n.view, e);
1735
+ r = E(n.view, e, ae()), i = ne(n.view, e);
1736
1736
  } catch (e) {
1737
- if (e instanceof P) return {
1737
+ if (e instanceof M) return {
1738
1738
  applied: !1,
1739
1739
  error: e
1740
1740
  };
@@ -1742,15 +1742,15 @@ function Ct(e) {
1742
1742
  }
1743
1743
  let a = n.undo.at(-1), o;
1744
1744
  if (t.origin === "ai" && t.turn !== void 0 && a && a.turn === t.turn) {
1745
- let e = a.view !== void 0 && !q(a.view, n.view);
1745
+ let e = a.view !== void 0 && !H(a.view, n.view);
1746
1746
  a.ops = [...i, ...a.ops], o = e ? a : gt(a, r);
1747
1747
  } else o = gt({
1748
1748
  ops: i,
1749
1749
  ...t.origin === "ai" && t.turn !== void 0 ? { turn: t.turn } : {}
1750
- }, r), ie(n.undo, o);
1751
- n.redo = [], z();
1750
+ }, r), R(n.undo, o);
1751
+ n.redo = [], L();
1752
1752
  let s = n.view;
1753
- return n.view = r, B(r), _.markDirty(), U(n, e, t.origin ?? "edit", o, s), {
1753
+ return n.view = r, z(r), _.markDirty(), le(n, e, t.origin ?? "edit", o, s), {
1754
1754
  applied: !0,
1755
1755
  inverse: i
1756
1756
  };
@@ -1761,14 +1761,14 @@ function Ct(e) {
1761
1761
  if (t.moveBlock && t.findBlockLocation) {
1762
1762
  let n = t.moveBlock, r = (...r) => {
1763
1763
  let i = v, a = i && !y && !C && !e.state.isLoading && e.state.template?.id === i.templateId;
1764
- if (a && se(!0), n(...r), !a || q(i.view, e.content.value)) return;
1764
+ if (a && se(!0), n(...r), !a || H(i.view, e.content.value)) return;
1765
1765
  let o = t.findBlockLocation(r[0]);
1766
1766
  if (!o) return;
1767
1767
  let s = o.targetSectionId ? {
1768
1768
  sectionId: o.targetSectionId,
1769
1769
  column: o.columnIndex ?? 0
1770
1770
  } : null, c = s ? e.content.value.blocks.find((e) => e.id === s.sectionId) : void 0;
1771
- H(i, [{
1771
+ ce(i, [{
1772
1772
  op: "moveBlock",
1773
1773
  blockId: r[0],
1774
1774
  parent: s,
@@ -1779,7 +1779,7 @@ function Ct(e) {
1779
1779
  t.moveBlock === r && (t.moveBlock = n);
1780
1780
  });
1781
1781
  }
1782
- k.push(h(() => e.state.template, (e) => De(e), { immediate: !0 }), h(() => e.content.value, ae, { deep: !0 }), h(() => e.state.selectedBlockId, ze), h(() => e.state.isLoading, (e) => e ? se(!0, !0) : ae())), typeof window < "u" && (window.addEventListener("pagehide", Be), window.addEventListener("blur", V)), c() && o(qe);
1782
+ k.push(h(() => e.state.template, (e) => De(e), { immediate: !0 }), h(() => e.content.value, oe, { deep: !0 }), h(() => e.state.selectedBlockId, ze), h(() => e.state.isLoading, (e) => e ? se(!0, !0) : oe())), typeof window < "u" && (window.addEventListener("pagehide", Be), window.addEventListener("blur", V)), c() && o(qe);
1783
1783
  }
1784
1784
  function We() {
1785
1785
  V();
@@ -1793,13 +1793,13 @@ function Ct(e) {
1793
1793
  V(), y = !0;
1794
1794
  }
1795
1795
  function Ke() {
1796
- y = !1, v && B(v.view);
1796
+ y = !1, v && z(v.view);
1797
1797
  }
1798
1798
  function qe() {
1799
- if (!O) {
1799
+ if (!ee) {
1800
1800
  V();
1801
1801
  for (let e of k.splice(0)) e();
1802
- oe(), Be(), O = !0, v && Te(v), v = null, Re(), typeof window < "u" && (window.removeEventListener("pagehide", Be), window.removeEventListener("blur", V));
1802
+ B(), Be(), ee = !0, v && Y(v), v = null, Re(), typeof window < "u" && (window.removeEventListener("pagehide", Be), window.removeEventListener("blur", V));
1803
1803
  }
1804
1804
  }
1805
1805
  return {
@@ -1811,19 +1811,19 @@ function Ct(e) {
1811
1811
  setLockLocale: je,
1812
1812
  connection: p,
1813
1813
  revision: m,
1814
- canUndo: N,
1815
- canRedo: re,
1814
+ canUndo: ie,
1815
+ canRedo: P,
1816
1816
  attach: Ue,
1817
1817
  undo: () => Ve("undo"),
1818
1818
  redo: () => Ve("redo"),
1819
1819
  clearHistory: () => {
1820
- v && (v.undo = [], v.redo = [], z());
1820
+ v && (v.undo = [], v.redo = [], L());
1821
1821
  },
1822
1822
  flush: V,
1823
1823
  settle: We,
1824
1824
  suspend: Ge,
1825
1825
  resume: Ke,
1826
- catchUp: xe,
1826
+ catchUp: q,
1827
1827
  hasConfirmedBlock: (e) => v ? bt(v.confirmed.blocks, e) : !1,
1828
1828
  applyOperations: He,
1829
1829
  destroy: qe
@@ -1846,7 +1846,7 @@ function wt(e) {
1846
1846
  return s.value && e.canDelete !== !1;
1847
1847
  }
1848
1848
  function u(e, t) {
1849
- throw new H(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
1849
+ throw new W(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
1850
1850
  }
1851
1851
  function d(t) {
1852
1852
  Q(e.onError, t);
@@ -1944,7 +1944,7 @@ function Et(e = {}) {
1944
1944
  },
1945
1945
  async create(e) {
1946
1946
  let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
1947
- id: j(),
1947
+ id: k(),
1948
1948
  name: e.name,
1949
1949
  content: e.content,
1950
1950
  ...e.category ? { category: e.category } : {},
@@ -2011,7 +2011,7 @@ function kt(e = {}) {
2011
2011
  },
2012
2012
  async create(e) {
2013
2013
  let t = await a(e.file), n = (/* @__PURE__ */ new Date()).toISOString(), o = {
2014
- id: j(),
2014
+ id: k(),
2015
2015
  url: t,
2016
2016
  filename: e.filename || e.file.name,
2017
2017
  createdAt: n,
@@ -2051,11 +2051,11 @@ function At(e) {
2051
2051
  let { provider: t, getTemplateId: n } = e, r = S([]), i = S(!1), a = S(void 0), o = S(!1), s = /* @__PURE__ */ new Map(), c = v(() => typeof t.create == "function"), l = v(() => typeof t.restore == "function");
2052
2052
  function u(e) {
2053
2053
  let t = n();
2054
- if (!t) throw new H(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
2054
+ if (!t) throw new W(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
2055
2055
  return t;
2056
2056
  }
2057
2057
  function d(e) {
2058
- throw new H(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
2058
+ throw new W(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
2059
2059
  }
2060
2060
  function f(t) {
2061
2061
  Q(e.onError, t);
@@ -2134,16 +2134,16 @@ function jt(e) {
2134
2134
  });
2135
2135
  function m(e) {
2136
2136
  let t = n();
2137
- if (!t) throw new H(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
2137
+ if (!t) throw new W(`[Templatical] Comments: ${e} needs a template. Call create() or load() first.`);
2138
2138
  return t;
2139
2139
  }
2140
2140
  function h(e) {
2141
2141
  let t = r();
2142
- if (!t) throw new H(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
2142
+ if (!t) throw new W(`[Templatical] Comments: ${e} needs to know who is commenting. Pass init({ user: { id, name } }) — an unattributed comment is not written.`);
2143
2143
  return t;
2144
2144
  }
2145
2145
  function g(e) {
2146
- throw new H(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
2146
+ throw new W(`[Templatical] Comments: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
2147
2147
  }
2148
2148
  function _(e) {
2149
2149
  for (let t of i.value) {
@@ -2254,7 +2254,7 @@ function jt(e) {
2254
2254
  o.value = !1;
2255
2255
  }
2256
2256
  }
2257
- async function A(e, n) {
2257
+ async function te(e, n) {
2258
2258
  let { setResolved: r } = t;
2259
2259
  typeof r != "function" && g("setResolved");
2260
2260
  let i = m("setResolved");
@@ -2268,13 +2268,13 @@ function jt(e) {
2268
2268
  o.value = !1;
2269
2269
  }
2270
2270
  }
2271
- function j(e) {
2271
+ function A(e) {
2272
2272
  T(e) && x(() => t.onCreated?.(e, { origin: "remote" }));
2273
2273
  }
2274
- function te(e) {
2274
+ function j(e) {
2275
2275
  T(e) && x(() => (e.resolvedAt ? t.onResolved : t.onUpdated)?.(e, { origin: "remote" }));
2276
2276
  }
2277
- function M(e, n) {
2277
+ function ne(e, n) {
2278
2278
  let r = E(e, n);
2279
2279
  r && x(() => t.onDeleted?.(r, { origin: "remote" }));
2280
2280
  }
@@ -2293,12 +2293,12 @@ function jt(e) {
2293
2293
  create: O,
2294
2294
  update: ee,
2295
2295
  remove: k,
2296
- setResolved: A,
2296
+ setResolved: te,
2297
2297
  find: _,
2298
2298
  isOwn: y,
2299
- applyRemoteCreate: j,
2300
- applyRemoteUpdate: te,
2301
- applyRemoteDelete: M
2299
+ applyRemoteCreate: A,
2300
+ applyRemoteUpdate: j,
2301
+ applyRemoteDelete: ne
2302
2302
  };
2303
2303
  }
2304
2304
  function Mt(e) {
@@ -2355,7 +2355,7 @@ function Pt(t) {
2355
2355
  };
2356
2356
  }
2357
2357
  function Ft(e) {
2358
- let t = a(he, null), n = v(e);
2358
+ let t = a(_e, null), n = v(e);
2359
2359
  if (!t) return n;
2360
2360
  let i;
2361
2361
  function s() {
@@ -2382,14 +2382,14 @@ function It(e, t) {
2382
2382
  return typeof n == "string" && n.length > 0 ? n : t;
2383
2383
  }
2384
2384
  function Lt(e, t) {
2385
- return typeof e?.url == "string" && L(e.url, t);
2385
+ return typeof e?.url == "string" && F(e.url, t);
2386
2386
  }
2387
2387
  function Rt(e, t) {
2388
2388
  let n = e?.url;
2389
- if (typeof n == "string" && n.trim() !== "") return L(n, t) ? void 0 : n;
2389
+ if (typeof n == "string" && n.trim() !== "") return F(n, t) ? void 0 : n;
2390
2390
  }
2391
2391
  function zt(e) {
2392
- let t = a(me, k.liquid), n = Ft(() => Rt(e(), t));
2392
+ let t = a(ge, O.liquid), n = Ft(() => Rt(e(), t));
2393
2393
  return v(() => Lt(e(), t) ? null : n.value);
2394
2394
  }
2395
2395
  function Bt(e, t, n) {
@@ -2406,7 +2406,7 @@ function Ht(e, t, n = []) {
2406
2406
  }
2407
2407
  // src/utils/resolveFieldColors.ts
2408
2408
  function Ut(e, t) {
2409
- let n = be({ presets: e.presets }, xe), r = n.presets.length === 0;
2409
+ let n = Se({ presets: e.presets }, q), r = n.presets.length === 0;
2410
2410
  return {
2411
2411
  presets: r ? t.presets : n.presets,
2412
2412
  allowCustom: t.allowCustom === !1 ? !1 : e.allowCustom ?? t.allowCustom,
@@ -2466,7 +2466,7 @@ var Xt = /* @__PURE__ */ t({
2466
2466
  size: { default: "field" }
2467
2467
  },
2468
2468
  setup(e) {
2469
- let t = e, { t: r } = ve(), i = {
2469
+ let t = e, { t: r } = be(), i = {
2470
2470
  field: {
2471
2471
  gap: "tpl:gap-1.5",
2472
2472
  icon: 18,
@@ -2481,11 +2481,11 @@ var Xt = /* @__PURE__ */ t({
2481
2481
  return (t, i) => (n(), l("div", {
2482
2482
  class: p(["tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]", a.value.gap]),
2483
2483
  style: y({ backgroundColor: `color-mix(in srgb, var(--tpl-bg) ${a.value.veil}, transparent)` })
2484
- }, [e.uploading ? (n(), l(C, { key: 0 }, [w(f(pe), {
2484
+ }, [e.uploading ? (n(), l(C, { key: 0 }, [w(f(he), {
2485
2485
  class: "tpl-spinner",
2486
2486
  size: a.value.icon,
2487
2487
  "stroke-width": 2
2488
- }, null, 8, ["size"]), d(" " + g(f(r).image.uploading), 1)], 64)) : (n(), l(C, { key: 1 }, [w(f(J), {
2488
+ }, null, 8, ["size"]), d(" " + g(f(r).image.uploading), 1)], 64)) : (n(), l(C, { key: 1 }, [w(f(K), {
2489
2489
  size: a.value.icon,
2490
2490
  "stroke-width": 1.5
2491
2491
  }, null, 8, ["size"]), d(" " + g(f(r).image.dropToUpload), 1)], 64))], 6));
@@ -2501,7 +2501,7 @@ function Zt() {
2501
2501
  // src/composables/useImageDrop.ts
2502
2502
  var Qt = "image/";
2503
2503
  function $t(e) {
2504
- let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || _(r), { isOverDropZone: a } = ye(t, {
2504
+ let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || _(r), { isOverDropZone: a } = xe(t, {
2505
2505
  preventDefaultForUnhandled: !0,
2506
2506
  onDrop: (e) => {
2507
2507
  if (!i()) return;
@@ -2513,7 +2513,7 @@ function $t(e) {
2513
2513
  }
2514
2514
  // src/composables/useMediaDropField.ts
2515
2515
  function en(e) {
2516
- let { target: t, blocked: n, apply: r } = e, i = a(ge, null), o = a(_e, null), s = Zt();
2516
+ let { target: t, blocked: n, apply: r } = e, i = a(ve, null), o = a(ye, null), s = Zt();
2517
2517
  async function c() {
2518
2518
  let e = await i?.({ accept: ["images"] });
2519
2519
  s.alive && e && r(e);
@@ -2558,11 +2558,24 @@ var nn = "width 300ms cubic-bezier(0.34, 1.56, 0.64, 1)", rn = {
2558
2558
  33.33,
2559
2559
  33.34
2560
2560
  ],
2561
+ 4: [
2562
+ 25,
2563
+ 25,
2564
+ 25,
2565
+ 25
2566
+ ],
2561
2567
  "1-2": [33.33, 66.67],
2562
- "2-1": [66.67, 33.33]
2568
+ "2-1": [66.67, 33.33],
2569
+ "1-3": [25, 75],
2570
+ "3-1": [75, 25],
2571
+ "1-2-1": [
2572
+ 25,
2573
+ 50,
2574
+ 25
2575
+ ]
2563
2576
  };
2564
2577
  function an(e, t) {
2565
- let n = (e) => Math.trunc(e ?? 0), r = (e) => se(e) === null ? 0 : Math.trunc(e.width);
2578
+ let n = (e) => Math.trunc(e ?? 0), r = (e) => fe(e) === null ? 0 : Math.trunc(e.width);
2566
2579
  return n(e?.left) + n(e?.right) + r(t?.left) + r(t?.right);
2567
2580
  }
2568
2581
  function on(e, t) {
@@ -2573,23 +2586,23 @@ function sn(e, t) {
2573
2586
  return Math.floor(t) - an(e.styles.padding, n);
2574
2587
  }
2575
2588
  function* cn(e, t) {
2576
- for (let n of e) E(n) ? yield* cn(n.children, on(t, n.styles.padding)) : yield {
2589
+ for (let n of e) V(n) ? yield* cn(n.children, on(t, n.styles.padding)) : yield {
2577
2590
  block: n,
2578
- bandWidth: O(n) && n.wrapper ? on(t, n.wrapper.padding) : t
2591
+ bandWidth: G(n) && n.wrapper ? on(t, n.wrapper.padding) : t
2579
2592
  };
2580
2593
  }
2581
- function ln(e, t, n = D(e)) {
2594
+ function ln(e, t, n = P(e)) {
2582
2595
  if (!t) return e;
2583
2596
  try {
2584
- return le(oe(t, n, { missing: "default" }), e);
2597
+ return le(re(t, n, { missing: "default" }), e);
2585
2598
  } catch {
2586
2599
  return e;
2587
2600
  }
2588
2601
  }
2589
2602
  function un(e, t, n, r) {
2590
2603
  let i = ln(e, n, r);
2591
- for (let { block: e, bandWidth: n } of cn(i.blocks, i.settings.width)) if (O(e)) {
2592
- let r = W(e)?.applied ? void 0 : e.border, i = Math.floor(n) - an(e.styles.padding, r), a = rn[e.columns] ?? [100];
2604
+ for (let { block: e, bandWidth: n } of cn(i.blocks, i.settings.width)) if (G(e)) {
2605
+ let r = ue(e)?.applied ? void 0 : e.border, i = Math.floor(n) - an(e.styles.padding, r), a = rn[e.columns] ?? [100];
2593
2606
  for (let n = 0; n < e.children.length; n++) {
2594
2607
  let r = Math.floor(i * (a[n] ?? 100) / 100), o = e.children[n].find((e) => e.id === t);
2595
2608
  if (o) return sn(o, r);
@@ -2603,14 +2616,14 @@ function dn(e, t, n, r) {
2603
2616
  return null;
2604
2617
  }
2605
2618
  function fn(e) {
2606
- let t = O(e) ? W(e) : null;
2619
+ let t = G(e) ? ue(e) : null;
2607
2620
  return !!t?.applied && t.height === "image";
2608
2621
  }
2609
2622
  function pn(e, t, n, r) {
2610
2623
  if (fn(e)) return (t ? dn(t, e.id, n, r) : null) ?? tn(t?.settings);
2611
2624
  }
2612
2625
  // src/constants/socialIcons.ts
2613
- var mn = ue, hn = {
2626
+ var mn = se, hn = {
2614
2627
  small: 24,
2615
2628
  medium: 32,
2616
2629
  large: 48
@@ -2636,4 +2649,4 @@ var mn = ue, hn = {
2636
2649
  ];
2637
2650
  export { Et as A, ze as B, Bt as C, jt as D, Mt as E, We as F, Ue as I, Ve as L, Ct as M, lt as N, At as O, Ge as P, He as R, Rt as S, Ft as T, Fe as V, Gt as _, fn as a, Vt as b, nn as c, Zt as d, Xt as f, Kt as g, qt as h, un as i, wt as j, kt as k, tn as l, Yt as m, mn as n, pn as o, Jt as p, gn as r, dn as s, hn as t, en as u, Ut as v, zt as w, Pt as x, Ht as y, Be as z };
2638
2651
 
2639
- //# sourceMappingURL=socialIcons-B5zrrV8-.js.map
2652
+ //# sourceMappingURL=socialIcons-BFgc3qqJ.js.map