@templatical/editor 0.59.2 → 0.60.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 (311) hide show
  1. package/dist/{AiAltTextPopover-BhWHOOKX.js → AiAltTextPopover-DSA1wiiW.js} +1 -1
  2. package/dist/{AiAltTextReview-CmW7pLmo.js → AiAltTextReview-B9-vfzCj.js} +1 -1
  3. package/dist/{AiChatPanel-CV0mCtad.js → AiChatPanel-DPoq2Til.js} +8 -8
  4. package/dist/{AiPanels-C8M7q_vM.js → AiPanels-UdfhAzzu.js} +1 -1
  5. package/dist/{AiRewriteMenu-DC2ZLH5L.js → AiRewriteMenu-BaeMlSEx.js} +8 -8
  6. package/dist/{BlockIssueBadge-B8sl9BM1.js → BlockIssueBadge-DQ_6NI4p.js} +2 -2
  7. package/dist/{BlockPreviewCanvas-yhOQAQhJ.js → BlockPreviewCanvas-DWDfih6j.js} +19 -44
  8. package/dist/{CloudPanels-CD0lsL0R.js → CloudPanels-ClHDM3ge.js} +3 -3
  9. package/dist/{CollaborationNotices-DrMrP73M.js → CollaborationNotices-PqWv0q8W.js} +1 -1
  10. package/dist/{CollaboratorBar-TsK872uC.js → CollaboratorBar-p-_PWqXW.js} +1 -1
  11. package/dist/{CommentsPanel-BX8JVrXU.js → CommentsPanel-BUo-YhSX.js} +1 -1
  12. package/dist/{CommentsSidebar-BUlseNwL.js → CommentsSidebar-D_Pz7FPz.js} +10 -10
  13. package/dist/{CountdownToolbar-dx3FVRjh.js → CountdownToolbar-DYFSFwkD.js} +4 -4
  14. package/dist/{IssuesPanel-BwnvXxBC.js → IssuesPanel-C7mBrK6a.js} +9 -9
  15. package/dist/{LanguageMenu-Cf5bKocE.js → LanguageMenu-f7js1FF8.js} +12 -12
  16. package/dist/{LocaleNotices-CGEp0pQ8.js → LocaleNotices-CAvDAawJ.js} +2 -2
  17. package/dist/{LogicTagInsertButton-BdDe-vrZ.js → LogicTagInsertButton-Clc3JTg_.js} +16 -16
  18. package/dist/{MediaEditModal-BWOqjEZN.js → MediaEditModal-YXOL0d_y.js} +1 -1
  19. package/dist/{MediaPanels-C-XrldMu.js → MediaPanels-VCv5epgs.js} +1 -1
  20. package/dist/{MergeTagInput-CTTi-eB0.js → MergeTagInput-B5a9noTB.js} +1 -1
  21. package/dist/{MergeTagModeToggle-Bd0svGQm.js → MergeTagModeToggle-D1r2aH5x.js} +4 -4
  22. package/dist/{MergeTagTextarea-DiahMV-3.js → MergeTagTextarea-CA9dPfMH.js} +5 -5
  23. package/dist/{ParagraphEditor-Db1cmj8Y.js → ParagraphEditor-ByzfpepN.js} +43 -43
  24. package/dist/{RestoreVersionDialog-DA1Z0q9Z.js → RestoreVersionDialog-Da5sTCFI.js} +3 -3
  25. package/dist/{RichTextEditorContent-CyO6e4ZG.js → RichTextEditorContent-gnRxu4-L.js} +4 -4
  26. package/dist/{SaveBlockDialog-D7SaFxa_.js → SaveBlockDialog-BM1Fki_2.js} +7 -7
  27. package/dist/{SavedBlocksBrowserModal-B5r3LWWG.js → SavedBlocksBrowserModal-DHOTdJKB.js} +9 -9
  28. package/dist/{SavedBlocksPanels-BH2f7jm-.js → SavedBlocksPanels-BJ2OM0cG.js} +1 -1
  29. package/dist/{SavedBlocksPickBar-B24TScw0.js → SavedBlocksPickBar-C4Bv1K_9.js} +2 -2
  30. package/dist/{TemplateSettings-CuN9Vkl_.js → TemplateSettings-DsaSsCC8.js} +8 -8
  31. package/dist/{TestEmailModal-C4DAaohi.js → TestEmailModal-CMo0cJik.js} +8 -8
  32. package/dist/{TestEmailPanel-DoMcVJSE.js → TestEmailPanel-B2OoOy9K.js} +1 -1
  33. package/dist/{TitleEditor-b5Pr_m9j.js → TitleEditor--gFbrR7V.js} +9 -9
  34. package/dist/{Toolbar-BOf7Y862.js → Toolbar-UXT03-Dc.js} +1003 -792
  35. package/dist/{TplModal-DAcXzBJh.js → TplModal-DkoyIwy1.js} +1 -1
  36. package/dist/{VersionHistoryMenu-TbIGteNi.js → VersionHistoryMenu-D-RCk3oB.js} +5 -5
  37. package/dist/{VersionHistoryPanels-Ia6ipOqG.js → VersionHistoryPanels-TzzRlmqK.js} +1 -1
  38. package/dist/{VersionPreviewBanner-CRfu6quf.js → VersionPreviewBanner-DMg2sw3V.js} +1 -1
  39. package/dist/{WrapperBlock-BZenrXM6.js → WrapperBlock-B4mdW2CP.js} +3 -3
  40. package/dist/{blockTypeIcons-DdYZy8yG.js → blockTypeIcons-MX-xQH_Z.js} +3 -3
  41. package/dist/bundle-stats.json +6 -6
  42. package/dist/{cdn/chunks/ca-YfIxwO1G.js → ca-C8N05sCU.js} +10 -4
  43. package/dist/cdn/chunks/{AiAltTextPopover-CcX_OMUU.js → AiAltTextPopover-BLNN_Pnd.js} +2 -2
  44. package/dist/cdn/chunks/AiAltTextPopover-BLNN_Pnd.js.map +1 -0
  45. package/dist/cdn/chunks/{AiAltTextReview-Dmm3h0jd.js → AiAltTextReview-Db8vSNpe.js} +2 -2
  46. package/dist/cdn/chunks/AiAltTextReview-Db8vSNpe.js.map +1 -0
  47. package/dist/cdn/chunks/{AiChatPanel-DV23DJ-2.js → AiChatPanel-cIT2haLo.js} +2 -2
  48. package/dist/cdn/chunks/AiChatPanel-cIT2haLo.js.map +1 -0
  49. package/dist/cdn/chunks/{AiPanels-CxhOpMAp.js → AiPanels-B4GG8w3J.js} +2 -2
  50. package/dist/cdn/chunks/AiPanels-B4GG8w3J.js.map +1 -0
  51. package/dist/cdn/chunks/{AiRewriteMenu-87-O514r.js → AiRewriteMenu-C34wZVcW.js} +6 -6
  52. package/dist/cdn/chunks/AiRewriteMenu-C34wZVcW.js.map +1 -0
  53. package/dist/cdn/chunks/{BlockIssueBadge-Dp06vQd3.js → BlockIssueBadge-C50pmOMZ.js} +2 -2
  54. package/dist/cdn/chunks/BlockIssueBadge-C50pmOMZ.js.map +1 -0
  55. package/dist/cdn/chunks/{BlockPreviewCanvas-DQGzUvZ5.js → BlockPreviewCanvas-CUOrwkWR.js} +20 -45
  56. package/dist/cdn/chunks/BlockPreviewCanvas-CUOrwkWR.js.map +1 -0
  57. package/dist/cdn/chunks/CloudHeaderExtras-Cd-ePldd.js.map +1 -1
  58. package/dist/cdn/chunks/{CloudPanels-D8fchoYt.js → CloudPanels-BAGDHObm.js} +3 -3
  59. package/dist/cdn/chunks/CloudPanels-BAGDHObm.js.map +1 -0
  60. package/dist/cdn/chunks/{CollaborationNotices-DNEs3g9B.js → CollaborationNotices-CTmjjbHv.js} +2 -2
  61. package/dist/cdn/chunks/CollaborationNotices-CTmjjbHv.js.map +1 -0
  62. package/dist/cdn/chunks/{CollaboratorBar-CN6XAlbn.js → CollaboratorBar-CzHjawjF.js} +2 -2
  63. package/dist/cdn/chunks/CollaboratorBar-CzHjawjF.js.map +1 -0
  64. package/dist/cdn/chunks/{CommentsPanel-CxZ1kFcK.js → CommentsPanel-Dh0_eRBe.js} +2 -2
  65. package/dist/cdn/chunks/CommentsPanel-Dh0_eRBe.js.map +1 -0
  66. package/dist/cdn/chunks/{CommentsSidebar-DCr2mV8b.js → CommentsSidebar-JxZ-O2mY.js} +2 -2
  67. package/dist/cdn/chunks/CommentsSidebar-JxZ-O2mY.js.map +1 -0
  68. package/dist/cdn/chunks/CountdownBlock--hlKE2aj.js.map +1 -1
  69. package/dist/cdn/chunks/{CountdownToolbar-CUTbVPPV.js → CountdownToolbar-BBiK9EaU.js} +5 -5
  70. package/dist/cdn/chunks/CountdownToolbar-BBiK9EaU.js.map +1 -0
  71. package/dist/cdn/chunks/{IssuesPanel-BhcSzwuL.js → IssuesPanel-BtAn12hl.js} +4 -4
  72. package/dist/cdn/chunks/IssuesPanel-BtAn12hl.js.map +1 -0
  73. package/dist/cdn/chunks/{LanguageMenu-6wGhkyFT.js → LanguageMenu-BDldm-Hp.js} +7 -7
  74. package/dist/cdn/chunks/LanguageMenu-BDldm-Hp.js.map +1 -0
  75. package/dist/cdn/chunks/{LocaleNotices-Br92Xueo.js → LocaleNotices-CzrNKR-N.js} +2 -2
  76. package/dist/cdn/chunks/LocaleNotices-CzrNKR-N.js.map +1 -0
  77. package/dist/cdn/chunks/{LogicTagInsertButton-r2EVUtDU.js → LogicTagInsertButton-B4wuPoMa.js} +5 -5
  78. package/dist/cdn/chunks/LogicTagInsertButton-B4wuPoMa.js.map +1 -0
  79. package/dist/cdn/chunks/{MediaEditModal-CfgN7Jyi.js → MediaEditModal-DJ2wxInt.js} +2 -2
  80. package/dist/cdn/chunks/MediaEditModal-DJ2wxInt.js.map +1 -0
  81. package/dist/cdn/chunks/{MediaPanels-Cb5vsgb-.js → MediaPanels-BJawNjr9.js} +2 -2
  82. package/dist/cdn/chunks/MediaPanels-BJawNjr9.js.map +1 -0
  83. package/dist/cdn/chunks/{MergeTagInput-Dh3N6CEV.js → MergeTagInput-DZD-p4nR.js} +2 -2
  84. package/dist/cdn/chunks/MergeTagInput-DZD-p4nR.js.map +1 -0
  85. package/dist/cdn/chunks/{MergeTagModeToggle-D6u3hMrI.js → MergeTagModeToggle-DGuJCgqO.js} +3 -3
  86. package/dist/cdn/chunks/MergeTagModeToggle-DGuJCgqO.js.map +1 -0
  87. package/dist/cdn/chunks/{MergeTagTextarea-BpVtpiNL.js → MergeTagTextarea-BRiaRBr_.js} +7 -7
  88. package/dist/cdn/chunks/MergeTagTextarea-BRiaRBr_.js.map +1 -0
  89. package/dist/cdn/chunks/{ParagraphEditor-DGJmPAC1.js → ParagraphEditor-CPYQXRIc.js} +23 -23
  90. package/dist/cdn/chunks/ParagraphEditor-CPYQXRIc.js.map +1 -0
  91. package/dist/cdn/chunks/{RestoreVersionDialog-D5qeCa0F.js → RestoreVersionDialog-NjbHial9.js} +3 -3
  92. package/dist/cdn/chunks/RestoreVersionDialog-NjbHial9.js.map +1 -0
  93. package/dist/cdn/chunks/{RichTextEditorContent-DyGiXKKI.js → RichTextEditorContent-CtV0Q0SO.js} +4 -4
  94. package/dist/cdn/chunks/RichTextEditorContent-CtV0Q0SO.js.map +1 -0
  95. package/dist/cdn/chunks/{SaveBlockDialog-B0TJYxd8.js → SaveBlockDialog-BZqPkGrE.js} +6 -6
  96. package/dist/cdn/chunks/SaveBlockDialog-BZqPkGrE.js.map +1 -0
  97. package/dist/cdn/chunks/{SavedBlocksBrowserModal-D8Ly7LrA.js → SavedBlocksBrowserModal-CqfyRtlX.js} +6 -6
  98. package/dist/cdn/chunks/SavedBlocksBrowserModal-CqfyRtlX.js.map +1 -0
  99. package/dist/cdn/chunks/{SavedBlocksPanels-Co1cbWR8.js → SavedBlocksPanels-BILHEdkP.js} +2 -2
  100. package/dist/cdn/chunks/SavedBlocksPanels-BILHEdkP.js.map +1 -0
  101. package/dist/cdn/chunks/{SavedBlocksPickBar-DNtVbpm-.js → SavedBlocksPickBar-C9NKqOEU.js} +3 -3
  102. package/dist/cdn/chunks/SavedBlocksPickBar-C9NKqOEU.js.map +1 -0
  103. package/dist/cdn/chunks/{TemplateSettings-BRc878ZF.js → TemplateSettings--_ZfbhnU.js} +6 -6
  104. package/dist/cdn/chunks/TemplateSettings--_ZfbhnU.js.map +1 -0
  105. package/dist/cdn/chunks/{TestEmailModal-CIui7VfS.js → TestEmailModal-CtfoV82K.js} +7 -7
  106. package/dist/cdn/chunks/TestEmailModal-CtfoV82K.js.map +1 -0
  107. package/dist/cdn/chunks/{TestEmailPanel-vKvruW_r.js → TestEmailPanel-NK26SU2u.js} +2 -2
  108. package/dist/cdn/chunks/TestEmailPanel-NK26SU2u.js.map +1 -0
  109. package/dist/cdn/chunks/{TitleEditor-BI-9Nnj3.js → TitleEditor-DXN_aOn0.js} +8 -8
  110. package/dist/cdn/chunks/TitleEditor-DXN_aOn0.js.map +1 -0
  111. package/dist/cdn/chunks/ToggleSwitch-C0w0srN_.js.map +1 -1
  112. package/dist/cdn/chunks/{Toolbar-CYnnArxv.js → Toolbar-HCxD4Ifc.js} +918 -707
  113. package/dist/cdn/chunks/Toolbar-HCxD4Ifc.js.map +1 -0
  114. package/dist/cdn/chunks/{TplModal-B3nZeGWK.js → TplModal-DzHoLmGo.js} +2 -2
  115. package/dist/cdn/chunks/TplModal-DzHoLmGo.js.map +1 -0
  116. package/dist/cdn/chunks/{VersionHistoryMenu-CMGfAKuV.js → VersionHistoryMenu-CVGlUPwS.js} +2 -2
  117. package/dist/cdn/chunks/VersionHistoryMenu-CVGlUPwS.js.map +1 -0
  118. package/dist/cdn/chunks/{VersionHistoryPanels-Bb2ouQg7.js → VersionHistoryPanels-Du8sQry2.js} +2 -2
  119. package/dist/cdn/chunks/VersionHistoryPanels-Du8sQry2.js.map +1 -0
  120. package/dist/cdn/chunks/{VersionPreviewBanner-573UP-g4.js → VersionPreviewBanner-5RFz4AQx.js} +2 -2
  121. package/dist/cdn/chunks/VersionPreviewBanner-5RFz4AQx.js.map +1 -0
  122. package/dist/cdn/chunks/{WrapperBlock-DVu632LD.js → WrapperBlock-DTayPD6Q.js} +4 -4
  123. package/dist/cdn/chunks/WrapperBlock-DTayPD6Q.js.map +1 -0
  124. package/dist/cdn/chunks/{blockTypeIcons-CGxNYHVA.js → blockTypeIcons-BOonB9gK.js} +2 -2
  125. package/dist/cdn/chunks/{blockTypeIcons-CGxNYHVA.js.map → blockTypeIcons-BOonB9gK.js.map} +1 -1
  126. package/dist/{ca-YfIxwO1G.js → cdn/chunks/ca-C8N05sCU.js} +12 -2
  127. package/dist/cdn/chunks/ca-C8N05sCU.js.map +1 -0
  128. package/dist/cdn/chunks/{composables-DY3anqHO.js → composables-BJBr8B4t.js} +611 -592
  129. package/dist/cdn/chunks/composables-BJBr8B4t.js.map +1 -0
  130. package/dist/cdn/chunks/{createCloudRuntime-B5numxlW.js → createCloudRuntime-CUlw09ix.js} +3 -3
  131. package/dist/cdn/chunks/{createCloudRuntime-B5numxlW.js.map → createCloudRuntime-CUlw09ix.js.map} +1 -1
  132. package/dist/{da-CM6DCvRG.js → cdn/chunks/da-Dno_4nGy.js} +12 -2
  133. package/dist/cdn/chunks/da-Dno_4nGy.js.map +1 -0
  134. package/dist/{de-Dugz1zXC.js → cdn/chunks/de-DRR5JSkh.js} +12 -2
  135. package/dist/cdn/chunks/de-DRR5JSkh.js.map +1 -0
  136. package/dist/cdn/chunks/{editor-modal-CXSSZplR.js → editor-modal-BVM_0uoL.js} +4 -4
  137. package/dist/cdn/chunks/editor-modal-BVM_0uoL.js.map +1 -0
  138. package/dist/{en-BykoFuFY.js → cdn/chunks/en-DAcLbbpg.js} +12 -2
  139. package/dist/cdn/chunks/en-DAcLbbpg.js.map +1 -0
  140. package/dist/cdn/chunks/en-DlDEofnd.js +1 -0
  141. package/dist/{es-DaWsTkpj.js → cdn/chunks/es-BcEQLQxe.js} +12 -2
  142. package/dist/cdn/chunks/es-BcEQLQxe.js.map +1 -0
  143. package/dist/cdn/chunks/{extensions-BWVlr8Ga.js → extensions-BPZirXpF.js} +5 -5
  144. package/dist/cdn/chunks/extensions-BPZirXpF.js.map +1 -0
  145. package/dist/{fr-DqwQHtJo.js → cdn/chunks/fr-CNQG7ESr.js} +12 -2
  146. package/dist/cdn/chunks/fr-CNQG7ESr.js.map +1 -0
  147. package/dist/cdn/chunks/{icons-C7vjUBLn.js → icons-CWEBTtbR.js} +23 -23
  148. package/dist/cdn/chunks/{icons-C7vjUBLn.js.map → icons-CWEBTtbR.js.map} +1 -1
  149. package/dist/cdn/chunks/{ja-BH4MS1Ye.js → ja-CMxWxqSH.js} +11 -3
  150. package/dist/cdn/chunks/ja-CMxWxqSH.js.map +1 -0
  151. package/dist/{nl-BQl1_UHv.js → cdn/chunks/nl-BjyYZDkC.js} +12 -2
  152. package/dist/cdn/chunks/nl-BjyYZDkC.js.map +1 -0
  153. package/dist/cdn/chunks/{normalizeMergeTagMarkup-Dw3rFvyd.js → normalizeMergeTagMarkup-CExCfSYI.js} +64 -64
  154. package/dist/cdn/chunks/{normalizeMergeTagMarkup-Dw3rFvyd.js.map → normalizeMergeTagMarkup-CExCfSYI.js.map} +1 -1
  155. package/dist/cdn/chunks/{preRenderCustomBlocks-BGtb8Xbp.js → preRenderCustomBlocks-BLVFtvl8.js} +2 -2
  156. package/dist/cdn/chunks/{preRenderCustomBlocks-BGtb8Xbp.js.map → preRenderCustomBlocks-BLVFtvl8.js.map} +1 -1
  157. package/dist/{pt-BR-eyzmU9Vs.js → cdn/chunks/pt-BR-DC2A3C0v.js} +12 -2
  158. package/dist/cdn/chunks/pt-BR-DC2A3C0v.js.map +1 -0
  159. package/dist/cdn/chunks/{sanitizeHtml-CLRY8s2s.js → sanitizeHtml-Db0S2JVP.js} +2 -2
  160. package/dist/cdn/chunks/{sanitizeHtml-CLRY8s2s.js.map → sanitizeHtml-Db0S2JVP.js.map} +1 -1
  161. package/dist/cdn/chunks/{socialIcons-kYhdXJ9P.js → socialIcons-WD1cjZDr.js} +495 -517
  162. package/dist/cdn/chunks/socialIcons-WD1cjZDr.js.map +1 -0
  163. package/dist/cdn/chunks/{src-DY2kMjoD.js → src-A0kzK-pR.js} +775 -667
  164. package/dist/cdn/chunks/src-A0kzK-pR.js.map +1 -0
  165. package/dist/cdn/chunks/src-C9opbQj_.js +684 -0
  166. package/dist/cdn/chunks/src-C9opbQj_.js.map +1 -0
  167. package/dist/cdn/chunks/{src-BmzzkUf7.js → src-edESkGqO.js} +708 -603
  168. package/dist/cdn/chunks/src-edESkGqO.js.map +1 -0
  169. package/dist/cdn/chunks/{tiptap-B7gxx0aJ.js → tiptap-D9amDW4u.js} +1030 -1027
  170. package/dist/cdn/chunks/tiptap-D9amDW4u.js.map +1 -0
  171. package/dist/cdn/chunks/useLocalizedDisplay-Brdkp3KH.js +33 -0
  172. package/dist/cdn/chunks/{useLocalizedDisplay-B5wMJLru.js.map → useLocalizedDisplay-Brdkp3KH.js.map} +1 -1
  173. package/dist/cdn/chunks/{useLogicTag-0wkSxy3z.js → useLogicTag-CKtQlJDa.js} +2 -2
  174. package/dist/cdn/chunks/{useLogicTag-0wkSxy3z.js.map → useLogicTag-CKtQlJDa.js.map} +1 -1
  175. package/dist/cdn/chunks/{useMergeTag-y3bX8M_6.js → useMergeTag-Dwy3U0PI.js} +2 -2
  176. package/dist/cdn/chunks/{useMergeTag-y3bX8M_6.js.map → useMergeTag-Dwy3U0PI.js.map} +1 -1
  177. package/dist/cdn/chunks/{withCurrentFont-B42BKo9N.js → withCurrentFont-C4pIesdB.js} +2 -2
  178. package/dist/cdn/chunks/{withCurrentFont-B42BKo9N.js.map → withCurrentFont-C4pIesdB.js.map} +1 -1
  179. package/dist/cdn/editor.js +109 -109
  180. package/dist/cdn/editor.js.map +1 -1
  181. package/dist/{check-ErKdPXG6.js → check-C82yyyf1.js} +1 -1
  182. package/dist/{chevron-down-C_vv5fZE.js → chevron-down-BaBVjNbM.js} +1 -1
  183. package/dist/{chevron-right-Cw4GpjFA.js → chevron-right-DkS-bw8X.js} +1 -1
  184. package/dist/{chevron-up-uijYZoph.js → chevron-up-C1KzUIK4.js} +1 -1
  185. package/dist/{circle-exclamation-point-CIYHx5Tw.js → circle-exclamation-point-DsmqtTUQ.js} +1 -1
  186. package/dist/{clock-tnC1IvZk.js → clock-dpIs7vo0.js} +1 -1
  187. package/dist/{composables-CFTH0Nqb.js → composables-DjCuq6RV.js} +1399 -1380
  188. package/dist/{createCloudRuntime-BvWlm_38.js → createCloudRuntime-CiEo0wkr.js} +2 -2
  189. package/dist/{createLucideIcon-CssArtUe.js → createLucideIcon-BSam2AUu.js} +5 -5
  190. package/dist/{cdn/chunks/da-CM6DCvRG.js → da-Dno_4nGy.js} +10 -4
  191. package/dist/{cdn/chunks/de-Dugz1zXC.js → de-DRR5JSkh.js} +10 -4
  192. package/dist/dist-AyAOL8Bj.js +4 -0
  193. package/dist/{dist-BTUMr4Pb.js → dist-BNrGwgev.js} +2 -2
  194. package/dist/{dist-CsplpC_6.js → dist-BPVNNdTv.js} +2 -2
  195. package/dist/{dist-bWIkrMkM.js → dist-C7YLw60i.js} +2 -2
  196. package/dist/{dist-Clfx1JeL.js → dist-CBnAqr27.js} +2 -2
  197. package/dist/{dist-CkHJRChP.js → dist-COvAA64n.js} +2 -2
  198. package/dist/{dist-C-NRkFsp.js → dist-CuRjmtWu.js} +5 -5
  199. package/dist/{dist-HKEDfp__.js → dist-DG_AWt8v.js} +2 -2
  200. package/dist/{dist-CMo4K5So.js → dist-DX_IQgcU.js} +802 -696
  201. package/dist/{dist-DY3WbyCO.js → dist-DYtuc3jc.js} +2 -2
  202. package/dist/dist-DkPTWQuO.js +4 -0
  203. package/dist/{dist-DwpKFWF4.js → dist-DoWk1r7z.js} +77 -74
  204. package/dist/{dist-BlrlMP8f.js → dist-fDsB6dCL.js} +2 -2
  205. package/dist/{editor-modal-BWvxfSj8.js → editor-modal-odubnc9x.js} +15 -15
  206. package/dist/en-CAImT1hl.js +1 -0
  207. package/dist/{cdn/chunks/en-BykoFuFY.js → en-DAcLbbpg.js} +10 -4
  208. package/dist/{cdn/chunks/es-DaWsTkpj.js → es-BcEQLQxe.js} +10 -4
  209. package/dist/{extensions-BPVackEE.js → extensions-C7OLgMEj.js} +73 -73
  210. package/dist/{eye-DK4--qHk.js → eye-CxCHEszj.js} +1 -1
  211. package/dist/{cdn/chunks/fr-DqwQHtJo.js → fr-CNQG7ESr.js} +10 -4
  212. package/dist/{image-B5pJOw5Q.js → image-DvXPzqNd.js} +1 -1
  213. package/dist/index.d.ts +72 -13
  214. package/dist/{info-DKM0_thN.js → info-2KHWaZ2L.js} +1 -1
  215. package/dist/{ja-BH4MS1Ye.js → ja-CMxWxqSH.js} +10 -2
  216. package/dist/{link-BNgTZ_Sw.js → link-_OmrcJMv.js} +1 -1
  217. package/dist/{list-Bqynqm7o.js → list-Dekd7JE8.js} +1 -1
  218. package/dist/{loader-circle-BMc3fVpa.js → loader-circle-D_hT5mFS.js} +1 -1
  219. package/dist/{message-circle-D_TpvAJh.js → message-circle-DDbiG-jz.js} +1 -1
  220. package/dist/{cdn/chunks/nl-BQl1_UHv.js → nl-BjyYZDkC.js} +10 -4
  221. package/dist/{normalizeMergeTagMarkup-PQqrbfmt.js → normalizeMergeTagMarkup-Cv5Wvs5f.js} +45 -45
  222. package/dist/{package-D2fov5PU.js → package-cORUe57D.js} +1 -1
  223. package/dist/{pencil-BNdkJyfY.js → pencil-D67H4fxq.js} +1 -1
  224. package/dist/{plus-CWmBmMx-.js → plus-BpTZAx28.js} +1 -1
  225. package/dist/{preRenderCustomBlocks-Dg5GBNi2.js → preRenderCustomBlocks-6CLw2rP6.js} +3 -3
  226. package/dist/{cdn/chunks/pt-BR-eyzmU9Vs.js → pt-BR-DC2A3C0v.js} +10 -4
  227. package/dist/{refresh-cw-Ryg1j66N.js → refresh-cw-B4T0IFwI.js} +1 -1
  228. package/dist/{rotate-ccw-D8j7gXXv.js → rotate-ccw-BDQgjpuo.js} +1 -1
  229. package/dist/{sanitizeHtml-DVdfdxOz.js → sanitizeHtml-Ru5_-IbM.js} +6 -6
  230. package/dist/{search-CX2JkSHz.js → search-Dp9pkaVt.js} +1 -1
  231. package/dist/{send-BLR1b-p5.js → send-DO9GhgCH.js} +1 -1
  232. package/dist/{smartphone-Co8m0LLg.js → smartphone-CPW3I3hV.js} +1 -1
  233. package/dist/{socialIcons-DBHv_ntg.js → socialIcons-CPBiLTjY.js} +561 -583
  234. package/dist/{sparkles-Dc3Undp5.js → sparkles-CIBjNfij.js} +1 -1
  235. package/dist/{square-CPw_cyX8.js → square-3W65qrrH.js} +1 -1
  236. package/dist/templatical-editor.js +139 -139
  237. package/dist/{text-align-start-2VZGhCiK.js → text-align-start-Bs70tpRU.js} +1 -1
  238. package/dist/{trash-t6XXliVc.js → trash-CTzhAm1o.js} +1 -1
  239. package/dist/{triangle-exclamation-point-_YYWE2ZH.js → triangle-exclamation-point-D_13CuJY.js} +1 -1
  240. package/dist/{upload-BWYXWYHb.js → upload-DFxkP9MI.js} +1 -1
  241. package/dist/useLocalizedDisplay-DfiE-KjV.js +31 -0
  242. package/dist/{useLogicTag-CVOj0VUv.js → useLogicTag-K5CPoMTk.js} +1 -1
  243. package/dist/{useMergeTag-Bams_kam.js → useMergeTag-tsU_Sw2x.js} +3 -3
  244. package/dist/{useScrollToBlock-CwUQ_nKz.js → useScrollToBlock-194ePl4q.js} +1 -1
  245. package/dist/withCurrentFont-C-_IYTqP.js +18 -0
  246. package/dist/{x-CTKOxIyZ.js → x-D7L8mLHJ.js} +1 -1
  247. package/package.json +22 -22
  248. package/dist/cdn/chunks/AiAltTextPopover-CcX_OMUU.js.map +0 -1
  249. package/dist/cdn/chunks/AiAltTextReview-Dmm3h0jd.js.map +0 -1
  250. package/dist/cdn/chunks/AiChatPanel-DV23DJ-2.js.map +0 -1
  251. package/dist/cdn/chunks/AiPanels-CxhOpMAp.js.map +0 -1
  252. package/dist/cdn/chunks/AiRewriteMenu-87-O514r.js.map +0 -1
  253. package/dist/cdn/chunks/BlockIssueBadge-Dp06vQd3.js.map +0 -1
  254. package/dist/cdn/chunks/BlockPreviewCanvas-DQGzUvZ5.js.map +0 -1
  255. package/dist/cdn/chunks/CloudPanels-D8fchoYt.js.map +0 -1
  256. package/dist/cdn/chunks/CollaborationNotices-DNEs3g9B.js.map +0 -1
  257. package/dist/cdn/chunks/CollaboratorBar-CN6XAlbn.js.map +0 -1
  258. package/dist/cdn/chunks/CommentsPanel-CxZ1kFcK.js.map +0 -1
  259. package/dist/cdn/chunks/CommentsSidebar-DCr2mV8b.js.map +0 -1
  260. package/dist/cdn/chunks/CountdownToolbar-CUTbVPPV.js.map +0 -1
  261. package/dist/cdn/chunks/IssuesPanel-BhcSzwuL.js.map +0 -1
  262. package/dist/cdn/chunks/LanguageMenu-6wGhkyFT.js.map +0 -1
  263. package/dist/cdn/chunks/LocaleNotices-Br92Xueo.js.map +0 -1
  264. package/dist/cdn/chunks/LogicTagInsertButton-r2EVUtDU.js.map +0 -1
  265. package/dist/cdn/chunks/MediaEditModal-CfgN7Jyi.js.map +0 -1
  266. package/dist/cdn/chunks/MediaPanels-Cb5vsgb-.js.map +0 -1
  267. package/dist/cdn/chunks/MergeTagInput-Dh3N6CEV.js.map +0 -1
  268. package/dist/cdn/chunks/MergeTagModeToggle-D6u3hMrI.js.map +0 -1
  269. package/dist/cdn/chunks/MergeTagTextarea-BpVtpiNL.js.map +0 -1
  270. package/dist/cdn/chunks/ParagraphEditor-DGJmPAC1.js.map +0 -1
  271. package/dist/cdn/chunks/RestoreVersionDialog-D5qeCa0F.js.map +0 -1
  272. package/dist/cdn/chunks/RichTextEditorContent-DyGiXKKI.js.map +0 -1
  273. package/dist/cdn/chunks/SaveBlockDialog-B0TJYxd8.js.map +0 -1
  274. package/dist/cdn/chunks/SavedBlocksBrowserModal-D8Ly7LrA.js.map +0 -1
  275. package/dist/cdn/chunks/SavedBlocksPanels-Co1cbWR8.js.map +0 -1
  276. package/dist/cdn/chunks/SavedBlocksPickBar-DNtVbpm-.js.map +0 -1
  277. package/dist/cdn/chunks/TemplateSettings-BRc878ZF.js.map +0 -1
  278. package/dist/cdn/chunks/TestEmailModal-CIui7VfS.js.map +0 -1
  279. package/dist/cdn/chunks/TestEmailPanel-vKvruW_r.js.map +0 -1
  280. package/dist/cdn/chunks/TitleEditor-BI-9Nnj3.js.map +0 -1
  281. package/dist/cdn/chunks/Toolbar-CYnnArxv.js.map +0 -1
  282. package/dist/cdn/chunks/TplModal-B3nZeGWK.js.map +0 -1
  283. package/dist/cdn/chunks/VersionHistoryMenu-CMGfAKuV.js.map +0 -1
  284. package/dist/cdn/chunks/VersionHistoryPanels-Bb2ouQg7.js.map +0 -1
  285. package/dist/cdn/chunks/VersionPreviewBanner-573UP-g4.js.map +0 -1
  286. package/dist/cdn/chunks/WrapperBlock-DVu632LD.js.map +0 -1
  287. package/dist/cdn/chunks/ca-YfIxwO1G.js.map +0 -1
  288. package/dist/cdn/chunks/composables-DY3anqHO.js.map +0 -1
  289. package/dist/cdn/chunks/da-CM6DCvRG.js.map +0 -1
  290. package/dist/cdn/chunks/de-Dugz1zXC.js.map +0 -1
  291. package/dist/cdn/chunks/editor-modal-CXSSZplR.js.map +0 -1
  292. package/dist/cdn/chunks/en-BykoFuFY.js.map +0 -1
  293. package/dist/cdn/chunks/en-DYMYt1TN.js +0 -1
  294. package/dist/cdn/chunks/es-DaWsTkpj.js.map +0 -1
  295. package/dist/cdn/chunks/extensions-BWVlr8Ga.js.map +0 -1
  296. package/dist/cdn/chunks/fr-DqwQHtJo.js.map +0 -1
  297. package/dist/cdn/chunks/ja-BH4MS1Ye.js.map +0 -1
  298. package/dist/cdn/chunks/nl-BQl1_UHv.js.map +0 -1
  299. package/dist/cdn/chunks/pt-BR-eyzmU9Vs.js.map +0 -1
  300. package/dist/cdn/chunks/socialIcons-kYhdXJ9P.js.map +0 -1
  301. package/dist/cdn/chunks/src-B7X7x_ST.js +0 -707
  302. package/dist/cdn/chunks/src-B7X7x_ST.js.map +0 -1
  303. package/dist/cdn/chunks/src-BmzzkUf7.js.map +0 -1
  304. package/dist/cdn/chunks/src-DY2kMjoD.js.map +0 -1
  305. package/dist/cdn/chunks/tiptap-B7gxx0aJ.js.map +0 -1
  306. package/dist/cdn/chunks/useLocalizedDisplay-B5wMJLru.js +0 -33
  307. package/dist/dist-CkIeJEsa.js +0 -4
  308. package/dist/dist-eAgG-nCb.js +0 -4
  309. package/dist/en-DvCaYqiR.js +0 -1
  310. package/dist/useLocalizedDisplay-CbFM0cCV.js +0 -31
  311. package/dist/withCurrentFont-y0O5kOLW.js +0 -18
@@ -0,0 +1,684 @@
1
+ import { An as e, At as t, Ct as n, Dn as r, Dt as i, En as a, It as o, Jt as s, Kt as c, L as l, Mn as u, Mt as d, On as f, Ot as p, Sn as m, St as h, Tt as g, Vt as _, Yt as v, _t as y, a as b, bt as x, ft as S, h as C, hn as ee, i as te, in as ne, jn as re, jt as ie, kn as ae, kt as oe, m as se, o as ce, p as le, qt as ue, st as w, ut as de, wt as fe, xn as pe, xt as me, yt as he } from "./src-A0kzK-pR.js";
2
+ // ../renderer/src/render-context.ts
3
+ var T = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
4
+ name: "@templatical/renderer",
5
+ description: "Render Templatical email templates to MJML",
6
+ version: "0.60.1",
7
+ bugs: "https://github.com/templatical/sdk/issues",
8
+ dependencies: { "@templatical/types": "workspace:*" },
9
+ devDependencies: {
10
+ "@jsquash/oxipng": "^2.3.0",
11
+ "@resvg/resvg-js": "^2.6.2",
12
+ liquidjs: "^10.30.1",
13
+ mjml: "^5.4.1",
14
+ "mjml-browser": "^5.4.1",
15
+ typescript: "^6.0.3",
16
+ vitest: "^5.1.0"
17
+ },
18
+ exports: { ".": {
19
+ types: "./dist/index.d.ts",
20
+ import: "./dist/index.js"
21
+ } },
22
+ files: ["dist", "assets"],
23
+ homepage: "https://templatical.com",
24
+ keywords: [
25
+ "email",
26
+ "email-template",
27
+ "html-email",
28
+ "mjml",
29
+ "renderer",
30
+ "templatical"
31
+ ],
32
+ license: "MIT",
33
+ module: "./dist/index.js",
34
+ publishConfig: { access: "public" },
35
+ repository: {
36
+ type: "git",
37
+ url: "git+https://github.com/templatical/sdk.git",
38
+ directory: "packages/renderer"
39
+ },
40
+ scripts: {
41
+ build: "tsdown && node scripts/rasterize-social.mjs",
42
+ test: "vitest run --config vitest.config.ts",
43
+ typecheck: "tsc --noEmit"
44
+ },
45
+ type: "module",
46
+ types: "./dist/index.d.ts"
47
+ }.version}/assets/social`, ge = class e {
48
+ containerWidth;
49
+ customFonts;
50
+ defaultFallbackFont;
51
+ allowHtmlBlocks;
52
+ customBlockHtml;
53
+ socialIconsBaseUrl;
54
+ blockRenderers;
55
+ contentDirection;
56
+ contentWidth;
57
+ constructor(e, t, n, r, i = /* @__PURE__ */ new Map(), a = T, o = {}, s = "ltr", c) {
58
+ this.containerWidth = e, this.customFonts = t, this.defaultFallbackFont = n, this.allowHtmlBlocks = r, this.customBlockHtml = i, this.socialIconsBaseUrl = a, this.blockRenderers = o, this.contentDirection = s, this.contentWidth = c ?? e;
59
+ }
60
+ withContainerWidth(t, n = t) {
61
+ return new e(t, this.customFonts, this.defaultFallbackFont, this.allowHtmlBlocks, this.customBlockHtml, this.socialIconsBaseUrl, this.blockRenderers, this.contentDirection, n);
62
+ }
63
+ resolveFontFamily(e) {
64
+ return te(e, {
65
+ customFonts: this.customFonts,
66
+ defaultFallback: this.defaultFallbackFont
67
+ });
68
+ }
69
+ }, E = {
70
+ "&": "&",
71
+ "<": "&lt;",
72
+ ">": "&gt;",
73
+ "\"": "&quot;",
74
+ "'": "&#039;"
75
+ }, _e = /[&<>"']/g;
76
+ function D(e) {
77
+ return e === "" ? "" : e.replace(_e, (e) => E[e] ?? e);
78
+ }
79
+ function O(e) {
80
+ return e === "" ? "" : e.replace(_e, (e) => E[e] ?? e);
81
+ }
82
+ function k(e) {
83
+ return e === "" ? "" : O(e.replace(/[;{}\r\n]/g, ""));
84
+ }
85
+ var ve = /[&<>"]/g;
86
+ function A(e) {
87
+ return e.replace(ve, (e) => E[e] ?? e);
88
+ }
89
+ // ../renderer/src/visibility.ts
90
+ function j(e) {
91
+ let t = e.visibility;
92
+ return t ? !t.desktop && !t.mobile : !1;
93
+ }
94
+ function M(e, t = []) {
95
+ let n = [N(e), ...t].filter((e) => e !== "").join(" ");
96
+ return n === "" ? "" : ` css-class="${O(n)}"`;
97
+ }
98
+ function N(e) {
99
+ let t = e.visibility;
100
+ if (!t) return "";
101
+ let n = [];
102
+ return t.desktop || n.push("tpl-hide-desktop"), t.mobile || n.push("tpl-hide-mobile"), n.join(" ");
103
+ }
104
+ // ../renderer/src/unrenderable.ts
105
+ var P = "templatical:unrenderable-block";
106
+ function F(e) {
107
+ return e.replace(/[<>]/g, "").replace(/-{2,}/g, "-");
108
+ }
109
+ function I(e) {
110
+ return JSON.stringify(String(e)).slice(1, -1);
111
+ }
112
+ function L(e) {
113
+ return console.warn(`[Templatical] No renderer for block type "${I(e.type)}" (id: ${I(e.id)}). A placeholder comment was emitted in its place. Pass a \`blockRenderers\` entry for this type to render it.`), `<mj-raw><!-- ${P} type="${F(e.type)}" id="${F(e.id)}" --></mj-raw>`;
114
+ }
115
+ // ../renderer/src/padding.ts
116
+ function R(e) {
117
+ return O(`${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`);
118
+ }
119
+ // ../renderer/src/utils.ts
120
+ function z(e, t) {
121
+ return e ? ` ${t === "native" ? "background-color" : "container-background-color"}="${k(e)}"` : "";
122
+ }
123
+ function ye(e) {
124
+ return typeof e != "number" || !Number.isFinite(e) || e <= 0 ? "" : ` height="${e}px"`;
125
+ }
126
+ function B(t, n) {
127
+ let r = (e) => Math.trunc(e ?? 0), i = (t) => e(t) === null ? 0 : Math.trunc(t.width);
128
+ return r(t?.left) + r(t?.right) + i(n?.left) + i(n?.right);
129
+ }
130
+ function V(e, t) {
131
+ if (e.fluidOnMobile === !0) return " fluid-on-mobile=\"true\"";
132
+ if (e.fluidOnMobile === !1) return "";
133
+ let n = Math.floor(t.contentWidth) - B(e.styles.padding, e.border);
134
+ return e.width === "full" || e.width >= n ? " fluid-on-mobile=\"true\"" : "";
135
+ }
136
+ function H(e) {
137
+ return Object.entries(re(e)).map(([e, t]) => ` ${e}="${k(t)}"`).join("");
138
+ }
139
+ function U(e) {
140
+ let t = u(e);
141
+ return t === null ? "" : ` border-radius="${k(t)}"`;
142
+ }
143
+ function be(e) {
144
+ let t = c(e);
145
+ return t === null ? "" : ` background-url="${O(t.url)}" background-size="${k(t.size)}" background-position="${k(t.position)}" background-repeat="${k(t.repeat)}"`;
146
+ }
147
+ // ../renderer/src/rich-text.ts
148
+ var W = "tpl-rich-text";
149
+ function G(e) {
150
+ return `${W}-${e}`;
151
+ }
152
+ function xe(e, t = "ltr") {
153
+ let n = r, i = `.${W}`, a = [...new Set(e)].sort((e, t) => e - t).flatMap((e) => {
154
+ let t = `.${G(e)}`;
155
+ return [`${t} p { margin: 0 0 ${e}px; }`, `${t} p:last-child { margin-bottom: 0; }`];
156
+ }), o = t === "rtl" ? "padding-right" : "padding-left";
157
+ return [
158
+ ...a,
159
+ `${i} ul, ${i} ol { margin: ${n.listMarginY}px 0; ${o}: ${n.listPaddingLeft}px; }`,
160
+ `${i} li { margin: ${n.listItemMarginY}px 0; }`
161
+ ].join("\n ");
162
+ }
163
+ function K(e) {
164
+ return e ?? r.paragraphGap;
165
+ }
166
+ function Se(e) {
167
+ let t = [r.paragraphGap], n = (e) => {
168
+ if (e.type === "paragraph" && t.push(K(e.paragraphSpacing)), g(e)) for (let t of e.children) for (let e of t) n(e);
169
+ else if (d(e)) for (let t of e.children) n(t);
170
+ };
171
+ for (let t of e) n(t);
172
+ return t;
173
+ }
174
+ var Ce = {
175
+ apos: "'",
176
+ quot: "\"",
177
+ nbsp: "\xA0"
178
+ }, we = /&(?:#(\d+)|#x([0-9a-f]+)|(apos|quot|nbsp));/gi, Te = /[a-z]/i, q = /[ \t\n\f\r]/;
179
+ function Ee(e, t, n, r, i) {
180
+ let a;
181
+ if (i !== void 0) a = Ce[i.toLowerCase()];
182
+ else {
183
+ let t = Number(n ?? `0x${r}`);
184
+ if (!(t > 0 && t <= 1114111 && !(t >= 55296 && t <= 57343))) return e;
185
+ a = String.fromCodePoint(t);
186
+ }
187
+ return a === "&" ? "&amp;" : a === "<" || a === ">" ? e : a === t ? t === "\"" ? "'" : "\"" : a;
188
+ }
189
+ function De(e) {
190
+ let t = 1;
191
+ for (; t < e.length && !q.test(e[t]) && e[t] !== "/";) t++;
192
+ for (; t < e.length;) {
193
+ for (; t < e.length && (q.test(e[t]) || e[t] === "/");) t++;
194
+ let n = t;
195
+ for (; t < e.length && !/[\s=/]/.test(e[t]);) t++;
196
+ let r = e.slice(n, t).toLowerCase();
197
+ if (r === "") {
198
+ t++;
199
+ continue;
200
+ }
201
+ for (; t < e.length && q.test(e[t]);) t++;
202
+ if (e[t] !== "=") continue;
203
+ for (t++; t < e.length && q.test(e[t]);) t++;
204
+ let i = e[t];
205
+ if (i === "\"" || i === "'") {
206
+ let n = e.indexOf(i, t + 1);
207
+ if (n === -1) return e;
208
+ if (r === "style") {
209
+ let r = e.slice(t + 1, n).replace(we, (e, t, n, r) => Ee(e, i, t, n, r));
210
+ return `${e.slice(0, t + 1)}${r}${e.slice(n)}`;
211
+ }
212
+ t = n + 1;
213
+ } else for (; t < e.length && !q.test(e[t]);) t++;
214
+ }
215
+ return e;
216
+ }
217
+ function Oe(e) {
218
+ if (!e.includes("&")) return e;
219
+ let t = "", n = 0, r = e.indexOf("<");
220
+ for (; r !== -1;) {
221
+ if (!Te.test(e.charAt(r + 1))) {
222
+ r = e.indexOf("<", r + 1);
223
+ continue;
224
+ }
225
+ let i = de(e, r + 1);
226
+ if (i === -1) break;
227
+ let a = e.slice(r, i), o = De(a);
228
+ o !== a && (t += e.slice(n, r) + o, n = i), r = e.indexOf("<", i);
229
+ }
230
+ return t + e.slice(n);
231
+ }
232
+ // ../renderer/src/renderers/title.ts
233
+ function ke(e, t) {
234
+ if (j(e)) return "";
235
+ let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = Ae(Oe(b(w(e.content)))), o = a[e.level] ?? a[2], s = e.color ? `\n color="${O(e.color)}"` : "", c = O(e.textAlign), l = je(e.fontFamily, t), u = M(e, [W, G(K(void 0))]), d = `h${a[e.level] ? e.level : 2}`;
236
+ return `<mj-text
237
+ font-size="${o}px"${s}
238
+ align="${c}"
239
+ line-height="${f}"
240
+ padding="${n}"${r}${l}${u}
241
+ ><${d} style="margin:0;font-size:inherit;color:inherit;line-height:inherit;font-weight:700">${i}</${d}></mj-text>`;
242
+ }
243
+ function Ae(e) {
244
+ let t = /^\s*<p\b/.exec(e);
245
+ if (!t) return e;
246
+ let n = de(e, t[0].length);
247
+ if (n === -1) return e;
248
+ let r = /<\/p>\s*$/.exec(e);
249
+ if (!r || r.index <= n) return e;
250
+ let i = e.slice(n + 1, r.index);
251
+ return /<\/p>\s*<p\b/i.test(i) ? e : i;
252
+ }
253
+ function je(e, t) {
254
+ return e ? ` font-family="${A(t.resolveFontFamily(e))}"` : "";
255
+ }
256
+ // ../renderer/src/renderers/paragraph.ts
257
+ function Me(e, t) {
258
+ if (j(e) || ce(e.content)) return "";
259
+ let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = Oe(b(w(e.content))), a = M(e, [W, G(K(e.paragraphSpacing))]);
260
+ return `<mj-text
261
+ line-height="1.5"${t.contentDirection === "rtl" ? "\n align=\"right\"" : ""}
262
+ padding="${n}"${r}${a}
263
+ >${i}</mj-text>`;
264
+ }
265
+ // ../renderer/src/renderers/image.ts
266
+ function Ne(e, t) {
267
+ if (j(e) || e.src === "") return "";
268
+ let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = O(e.width === "full" ? t.containerWidth + "px" : e.width + "px"), a = ye(e.height), o = V(e, t), s = M(e), c = U(e.borderRadius), l = H(e.border), u = "";
269
+ e.linkUrl && (u = ` href="${O(e.linkUrl)}"`, e.linkOpenInNewTab && (u += " target=\"_blank\" rel=\"noopener\""));
270
+ let d = O(e.src), f = e.decorative === !0;
271
+ return `<mj-image
272
+ src="${d}"
273
+ alt="${f ? "" : O(e.alt)}"
274
+ width="${i}"${a}${o}
275
+ align="${O(e.align)}"
276
+ padding="${n}"${r}${l}${c}${u}${s}${f ? " role=\"presentation\"" : ""}
277
+ />`;
278
+ }
279
+ // ../renderer/src/renderers/button.ts
280
+ var J = "tpl-button-full";
281
+ function Pe(e, t) {
282
+ if (j(e)) return "";
283
+ let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = R(e.buttonPadding), a = e.url === "" ? "" : O(e.url), o = a === "" ? "" : ` href="${a}"`, s = Fe(e.backgroundColor), c = O(e.textColor), l = e.fontSize, u = Ie(e.fontWeight), d = O(Re(e.borderRadius)), f = D(e.text), p = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", h = Le(e.fontFamily, t), g = ze(e.width), _ = M(e, e.width === "full" || typeof e.width == "string" && pe(e.width) !== null ? [J] : []), v = H(e.border), y = O(e.align ?? "center");
284
+ return `<mj-button${o}${p}
285
+ background-color="${s}"
286
+ color="${c}"
287
+ font-size="${O(String(l))}px"
288
+ line-height="${m(ae(e) * 100)}%"
289
+ font-weight="${u}"
290
+ border-radius="${d}"${v}
291
+ inner-padding="${i}"
292
+ align="${y}"
293
+ padding="${n}"${r}${h}${g}${_}
294
+ >${f}</mj-button>`;
295
+ }
296
+ function Fe(e) {
297
+ return e.trim() === "" ? "transparent" : O(e);
298
+ }
299
+ function Ie(e) {
300
+ return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
301
+ }
302
+ function Le(e, t) {
303
+ return e ? ` font-family="${A(t.resolveFontFamily(e))}"` : "";
304
+ }
305
+ function Re(e) {
306
+ return typeof e == "number" ? `${e}px` : u(e) ?? "0px";
307
+ }
308
+ function ze(e) {
309
+ return e === void 0 ? "" : e === "full" || typeof e == "number" ? ` width="${O(e === "full" ? "100%" : `${e}px`)}"` : pe(e) === null ? "" : ` width="${O(e)}"`;
310
+ }
311
+ // ../renderer/src/renderers/divider.ts
312
+ function Be(e, t) {
313
+ if (j(e)) return "";
314
+ let n = R(e.styles.padding), r = e.styles.backgroundColor ? ` container-background-color="${O(e.styles.backgroundColor)}"` : "", i = e.width === "full" ? "100%" : typeof e.width == "number" ? `${e.width}px` : e.width, a = e.thickness, o = O(e.lineStyle), s = O(e.color), c = M(e);
315
+ return `<mj-divider
316
+ border-width="${O(String(a))}px"
317
+ border-style="${o}"
318
+ border-color="${s}"
319
+ width="${O(i)}"
320
+ padding="${n}"${r}${c}
321
+ />`;
322
+ }
323
+ // ../renderer/src/renderers/spacer.ts
324
+ function Ve(e, t) {
325
+ if (j(e)) return "";
326
+ let n = e.height, r = e.styles.backgroundColor ? ` container-background-color="${O(e.styles.backgroundColor)}"` : "", i = M(e);
327
+ return `<mj-spacer height="${O(String(n))}px" padding="0"${r}${i} />`;
328
+ }
329
+ // ../renderer/src/renderers/html.ts
330
+ function He(e, t) {
331
+ if (j(e) || !t.allowHtmlBlocks) return "";
332
+ let n = e.content;
333
+ if (n === "") return "";
334
+ let r = M(e);
335
+ return `<mj-text padding="${R(e.styles.padding)}"${z(e.styles.backgroundColor, "container")}${r}>
336
+ ${n}
337
+ </mj-text>`;
338
+ }
339
+ // ../renderer/src/renderers/social.ts
340
+ var Ue = "tpl-social-custom";
341
+ function We(e) {
342
+ let t = e.imageUrl;
343
+ return typeof t == "string" && t.trim() !== "";
344
+ }
345
+ function Ge(e) {
346
+ let t = e.alt;
347
+ return typeof t == "string" ? t : "";
348
+ }
349
+ function Ke(e, t) {
350
+ if (j(e)) return "";
351
+ let n = e.icons.filter((e) => e.platform !== "custom" || We(e));
352
+ if (n.length === 0) return "";
353
+ let r = R(e.styles.padding), i = e.styles.backgroundColor ? ` container-background-color="${O(e.styles.backgroundColor)}"` : "", a = M(e), s = O(e.align), c = e.iconSize, l = e.iconStyle, u = O(o(l, e.iconTone)), d = e.spacing, f;
354
+ switch (c) {
355
+ case "small":
356
+ f = 24;
357
+ break;
358
+ case "large":
359
+ f = 48;
360
+ break;
361
+ default: f = 32;
362
+ }
363
+ let p;
364
+ switch (l) {
365
+ case "circle":
366
+ p = "50%";
367
+ break;
368
+ case "rounded":
369
+ p = "8px";
370
+ break;
371
+ case "square":
372
+ p = "0";
373
+ break;
374
+ default: p = "4px";
375
+ }
376
+ let m = n.length;
377
+ return `<mj-social
378
+ mode="horizontal"
379
+ align="${s}"
380
+ icon-padding="0"
381
+ padding="${r}"${i}${a}
382
+ >
383
+ ${n.map((e, n) => {
384
+ let r = O(e.url), i = n === m - 1 ? 0 : d, a = `0 ${O(String(i))}px 0 0`;
385
+ if (e.platform === "custom") return `<mj-social-element src="${O(e.imageUrl)}" alt="${O(Ge(e))}" href="${r}" icon-size="${f}px" padding="${a}" border-radius="0" background-color="transparent" css-class="${Ue}"></mj-social-element>`;
386
+ let o = O(e.platform);
387
+ return `<mj-social-element src="${`${t.socialIconsBaseUrl}/${u}/${o}.png`}" href="${r}" icon-size="${f}px" padding="${a}" border-radius="${p}" background-color="transparent"></mj-social-element>`;
388
+ }).join("\n")}
389
+ </mj-social>`;
390
+ }
391
+ // ../renderer/src/renderers/menu.ts
392
+ function qe(e, t) {
393
+ if (j(e) || e.items.length === 0) return "";
394
+ let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = M(e), a = Xe(e.fontFamily, t), o = O(e.textAlign), s = e.fontSize, c = e.color ? `\n color="${O(e.color)}"` : "", l = Je(e);
395
+ return `<mj-text
396
+ font-size="${O(String(s))}px"${c}
397
+ align="${o}"
398
+ line-height="1.5"
399
+ padding="${n}"${r}${a}${i}
400
+ >${l}</mj-text>`;
401
+ }
402
+ function Je(e) {
403
+ let t = e.items, n = D(e.separator), r = k(e.separatorColor), i = e.spacing, a = e.linkColor ?? e.color, o = [], s = t.length;
404
+ for (let e = 0; e < s; e++) o.push(Ye(t[e], a)), e < s - 1 && o.push(`<span style="color: ${r}; padding: 0 ${k(String(i))}px;">${n}</span>`);
405
+ return o.join("");
406
+ }
407
+ function Ye(e, t) {
408
+ let n = D(e.text), r = O(e.url), i = e.color ?? t, a = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", o = ["text-decoration: none"];
409
+ return i && o.unshift(`color: ${k(i)}`), e.bold && o.push("font-weight: bold"), e.underline && o.push("text-decoration: underline"), `<a href="${r}" style="${o.join("; ")}"${a}>${n}</a>`;
410
+ }
411
+ function Xe(e, t) {
412
+ return e ? ` font-family="${A(t.resolveFontFamily(e))}"` : "";
413
+ }
414
+ // ../renderer/src/renderers/table.ts
415
+ function Ze(e, t) {
416
+ if (j(e) || e.rows.length === 0) return "";
417
+ let n = R(e.styles.padding), r = z(e.styles.backgroundColor, "container"), i = M(e), a = tt(e.fontFamily, t), o = e.fontSize, s = e.color ? `\n color="${O(e.color)}"` : "", c = O(e.textAlign), l = Qe(e);
418
+ return `<mj-text
419
+ font-size="${O(String(o))}px"${s}
420
+ align="${c}"
421
+ line-height="1.5"
422
+ padding="${n}"${r}${a}${i}
423
+ >${l}</mj-text>`;
424
+ }
425
+ function Qe(e) {
426
+ let t = k(e.borderColor), n = e.borderWidth, r = "";
427
+ for (let i = 0; i < e.rows.length; i++) {
428
+ let a = e.rows[i];
429
+ r += $e(a, e, e.hasHeaderRow && i === 0, t, n);
430
+ }
431
+ return `<table style="width: 100%; border-collapse: collapse;">${r}</table>`;
432
+ }
433
+ function $e(e, t, n, r, i) {
434
+ let a = "";
435
+ for (let o of e.cells) a += et(o, t, n, r, i);
436
+ return `<tr>${a}</tr>`;
437
+ }
438
+ function et(e, t, n, r, i) {
439
+ let a = t.cellPadding, o = [`border: ${k(String(i))}px solid ${r}`, `padding: ${k(String(a))}px`];
440
+ n && (o.push("font-weight: bold"), t.headerBackgroundColor && o.push(`background-color: ${k(t.headerBackgroundColor)}`));
441
+ let s = o.join("; "), c = D(w(e.content)), l = n ? "th" : "td";
442
+ return `<${l} style="${s}">${c}</${l}>`;
443
+ }
444
+ function tt(e, t) {
445
+ return e ? ` font-family="${A(t.resolveFontFamily(e))}"` : "";
446
+ }
447
+ // ../renderer/src/renderers/custom.ts
448
+ function nt(e, t) {
449
+ if (j(e)) return "";
450
+ let n = t.customBlockHtml.get(e.id) ?? e.renderedHtml;
451
+ if (!n || n === "") return "";
452
+ let r = M(e);
453
+ return `<mj-text padding="${R(e.styles.padding)}"${z(e.styles.backgroundColor, "container")}${r}>
454
+ ${n}
455
+ </mj-text>`;
456
+ }
457
+ // ../renderer/src/columns.ts
458
+ function rt(e) {
459
+ return Object.hasOwn(ue, e) ? ue[e] : [100];
460
+ }
461
+ function it(e) {
462
+ return rt(e).map((e) => `${e}%`);
463
+ }
464
+ function at(e, t) {
465
+ switch (e) {
466
+ case "3": return [
467
+ t / 3,
468
+ t / 3,
469
+ t / 3
470
+ ];
471
+ case "1-2": return [t / 3, t * 2 / 3];
472
+ case "2-1": return [t * 2 / 3, t / 3];
473
+ default: return rt(e).map((e) => t * e / 100);
474
+ }
475
+ }
476
+ // ../renderer/src/hero-geometry.ts
477
+ function ot(e, t, n) {
478
+ let r = Math.max(1, Math.round(t)), i = e.aspectRatio === null ? null : Math.max(1, Math.round(r * e.aspectRatio)), a = Math.max(e.height === "image" ? i ?? r : e.height, Math.trunc(n.top) + Math.trunc(n.bottom));
479
+ return {
480
+ mode: "fixed-height",
481
+ height: a,
482
+ backgroundWidth: r,
483
+ backgroundHeight: i ?? a
484
+ };
485
+ }
486
+ // ../renderer/src/display-condition.ts
487
+ function Y(e, t) {
488
+ if (t === "") return "";
489
+ let n = e.displayCondition;
490
+ return n ? `<mj-raw>${n.before}</mj-raw>
491
+ ` + t + `
492
+ <mj-raw>${n.after}</mj-raw>` : t;
493
+ }
494
+ // ../renderer/src/renderers/section.ts
495
+ function st(e, t, n) {
496
+ if (j(e)) return "";
497
+ let r = _(e);
498
+ if (r?.applied) return ct(e, r, t, n);
499
+ let i = e.columns, a = v(e), o = a.map((e) => `${e}%`), c = e.columnWidths !== void 0 && s(e) === null ? a.map((e) => t.containerWidth * e / 100) : at(i, t.containerWidth), l = Math.floor(t.contentWidth) - B(e.styles.padding, e.border), u = o.map((e) => Math.floor(l * parseFloat(e) / 100)), d = R(e.styles.padding), f = z(e.styles.backgroundColor, "native"), p = be(e.backgroundImage), m = M(e), h = U(e.borderRadius), y = H(e.border), b = t.contentDirection === "rtl" ? " direction=\"rtl\"" : "", x = e.children, S = [];
500
+ for (let e = 0; e < x.length; e++) {
501
+ let r = x[e], i = o[e] ?? "100%", a = Math.floor(c[e] ?? t.containerWidth), s = lt(r, t.allowHtmlBlocks).filter((e) => !g(e)), d = t.withContainerWidth(a, u[e] ?? l), f = s.map((e) => Y(e, n(e, d))).filter((e) => e !== "").join("\n");
502
+ S.push(`<mj-column width="${i}"${b}>
503
+ ${f === "" ? "<mj-text>&nbsp;</mj-text>" : f}
504
+ </mj-column>`);
505
+ }
506
+ let C = S.join("\n");
507
+ return `<mj-section${f}${p} padding="${d}"${y}${h}${m}${b}>
508
+ ${e.stackOnMobile === !1 && S.length > 1 ? `<mj-group${b}>
509
+ ${C}
510
+ </mj-group>` : C}
511
+ </mj-section>`;
512
+ }
513
+ function ct(e, t, n, r) {
514
+ let i = Math.floor(n.contentWidth), a = ot(t, i, e.styles.padding), o = z(e.styles.backgroundColor, "native") || " background-color=\"transparent\"", s = R(e.styles.padding), c = U(e.borderRadius), l = M(e), u = n.withContainerWidth(i, i - B(e.styles.padding)), d = lt(e.children[0] ?? [], n.allowHtmlBlocks).filter((e) => !g(e)).map((e) => Y(e, r(e, u))).filter((e) => e !== "").join("\n");
515
+ return `<mj-hero mode="${a.mode}" height="${a.height}px" background-url="${O(t.image.url)}" background-width="${a.backgroundWidth}px" background-height="${a.backgroundHeight}px" background-position="${O(t.image.position)}"${o} padding="${s}" vertical-align="${O(t.verticalAlign)}"${c}${l}>
516
+ ${d}
517
+ </mj-hero>`;
518
+ }
519
+ function lt(e, t) {
520
+ return t ? e : e.filter((e) => e.type !== "html");
521
+ }
522
+ // ../renderer/src/renderers/video.ts
523
+ function ut(e, t) {
524
+ if (t) return t;
525
+ if (!e) return null;
526
+ for (let t of [/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]{11})/, /youtube\.com\/shorts\/([a-zA-Z0-9_-]{11})/]) {
527
+ let n = e.match(t);
528
+ if (n) return `https://img.youtube.com/vi/${n[1]}/maxresdefault.jpg`;
529
+ }
530
+ let n = e.match(/vimeo\.com\/(?:video\/)?(\d+)/);
531
+ return n ? `https://vumbnail.com/${n[1]}.jpg` : null;
532
+ }
533
+ function dt(e, t) {
534
+ if (j(e)) return "";
535
+ let n = ut(e.url, e.thumbnailUrl);
536
+ if (!n) return "";
537
+ let r = R(e.styles.padding), i = z(e.styles.backgroundColor, "container"), a = O(e.width === "full" ? t.containerWidth + "px" : e.width + "px"), o = ye(e.height), s = V(e, t), c = M(e);
538
+ return `<mj-image
539
+ src="${O(n)}"
540
+ alt="${O(e.alt)}"
541
+ width="${a}"${o}${s}
542
+ align="${O(e.align)}"
543
+ padding="${r}"
544
+ href="${O(e.url)}"
545
+ target="_blank"
546
+ rel="noopener"${i}${c}
547
+ />`;
548
+ }
549
+ // ../renderer/src/renderers/index.ts
550
+ function X(e, r) {
551
+ let a = r.blockRenderers[e.type];
552
+ return a ? a(e, r) : g(e) ? st(e, r, X) : t(e) ? ke(e, r) : fe(e) ? Me(e, r) : h(e) ? Ne(e, r) : y(e) ? Pe(e, r) : x(e) ? Be(e, r) : p(e) ? Ve(e, r) : me(e) ? He(e, r) : i(e) ? Ke(e, r) : n(e) ? qe(e, r) : oe(e) ? Ze(e, r) : ie(e) ? dt(e, r) : he(e) ? nt(e, r) : j(e) ? "" : L(e);
553
+ }
554
+ // ../renderer/src/index.ts
555
+ var ft = `.${J} a { display: block !important; }`;
556
+ async function pt(e, t) {
557
+ if (t?.customBlocks !== void 0 && t.renderCustomBlock !== void 0) throw TypeError("[Templatical] customBlocks cannot be combined with renderCustomBlock");
558
+ if (t?.customBlocks !== void 0 && t.getCustomBlockStylesheet !== void 0) throw TypeError("[Templatical] customBlocks cannot be combined with getCustomBlockStylesheet");
559
+ let n = t?.locale ?? ne(e), r = ee(e, n), i = t?.layout ? le(ee(t.layout, n, { missing: "default" }), r) : (se(r), C(r), r), a = t?.customFonts ?? [], o = t?.defaultFallbackFont ?? "Arial, sans-serif", s = t?.allowHtmlBlocks ?? !0, c = _t(t?.socialIconsBaseUrl ?? T), l = t?.customBlocks === void 0 ? await bt(i, t?.renderCustomBlock) : await xt(i, t.customBlocks, t.liquidjs), u = St(i, t?.getCustomBlockStylesheet, t?.customBlocks === void 0 ? void 0 : new Map(t.customBlocks.map((e) => [e.type, e]))), d = S(i.settings), f = new ge(i.settings.width, a, o, s, l, c, t?.blockRenderers ?? {}, d), p = Q(i.blocks, s), m = f.resolveFontFamily(i.settings.fontFamily), h = /[<>]/.test(i.settings.backgroundColor) ? "transparent" : i.settings.backgroundColor, g = i.settings.textColor ? ` color="${O(i.settings.textColor)}"` : "", _ = i.settings.linkColor ? k(i.settings.linkColor) : "inherit", v = i.settings.linkUnderline ? "underline" : "none", y = p.map((e) => mt(e, f)).filter((e) => e !== "").join("\n"), b = yt(a), x = vt(i.settings.preheaderText);
560
+ return `<mjml lang="${O(i.settings.locale)}" dir="${O(d)}">
561
+ <mj-head>${x}
562
+ <mj-attributes>
563
+ <mj-all font-family="${A(m)}" />
564
+ <mj-text font-size="14px"${g} />
565
+ <mj-section padding="0" />
566
+ <mj-column padding="0" />
567
+ </mj-attributes>${b}
568
+ <mj-style inline="inline">
569
+ ${xe(Se(p), d)}
570
+ ${ft}
571
+ </mj-style>
572
+ <mj-style>
573
+ a { color: ${_}; text-decoration: ${v}; }
574
+ @media only screen and (max-width: 480px) {
575
+ .tpl-hide-mobile { display: none !important; mso-hide: all !important; }
576
+ }
577
+ @media only screen and (min-width: 481px) {
578
+ .tpl-hide-desktop { display: none !important; mso-hide: all !important; }
579
+ }
580
+ </mj-style>${Ct(u)}
581
+ </mj-head>
582
+ <mj-body width="${O(String(f.containerWidth))}px" background-color="${k(h)}">
583
+ ${y}
584
+ </mj-body>
585
+ </mjml>`;
586
+ }
587
+ function mt(e, t) {
588
+ if (d(e)) {
589
+ let n = Z(t, e.styles.padding);
590
+ return Y(e, ht(Q(e.children, t.allowHtmlBlocks).map((e) => mt(e, n)).filter((e) => e !== "").join("\n"), {
591
+ backgroundColor: e.styles.backgroundColor,
592
+ padding: e.styles.padding,
593
+ borderRadius: e.borderRadius,
594
+ backgroundImage: e.backgroundImage,
595
+ fullWidth: e.fullWidth
596
+ }, t.contentDirection));
597
+ }
598
+ if (g(e)) {
599
+ let n = X(e, e.wrapper ? Z(t, e.wrapper.padding) : t);
600
+ return Y(e, e.wrapper && n !== "" ? ht(n, e.wrapper, t.contentDirection) : n);
601
+ }
602
+ return Y(e, gt(X(e, t), t.contentDirection));
603
+ }
604
+ function Z(e, t) {
605
+ return e.withContainerWidth(e.containerWidth, Math.floor(e.contentWidth) - B(t));
606
+ }
607
+ function ht(e, t, n) {
608
+ return `<mj-wrapper${z(t.backgroundColor, "native")}${be(t.backgroundImage)}${` padding="${t.padding ? R(t.padding) : "0"}"`}${t.fullWidth ? "" : U(t.borderRadius)}${t.fullWidth ? " full-width=\"full-width\"" : ""}${n === "rtl" ? " direction=\"rtl\"" : ""}>
609
+ ${e}
610
+ </mj-wrapper>`;
611
+ }
612
+ function gt(e, t) {
613
+ if (e === "") return "";
614
+ let n = t === "rtl" ? " direction=\"rtl\"" : "";
615
+ return `<mj-section${n}>
616
+ <mj-column${n}>
617
+ ${e}
618
+ </mj-column>
619
+ </mj-section>`;
620
+ }
621
+ function _t(e) {
622
+ return e.endsWith("/") ? e.slice(0, -1) : e;
623
+ }
624
+ function vt(e) {
625
+ if (!e) return "";
626
+ let t = e.trim();
627
+ return t === "" ? "" : `\n <mj-preview>${D(t)}</mj-preview>`;
628
+ }
629
+ function yt(e) {
630
+ return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${O(e.name)}" href="${O(e.url)}" />`).join("");
631
+ }
632
+ function Q(e, t) {
633
+ return t ? e : e.filter((e) => e.type !== "html");
634
+ }
635
+ async function bt(e, t) {
636
+ let n = /* @__PURE__ */ new Map();
637
+ if (!t) return n;
638
+ let r = [];
639
+ if ($(e.blocks, r), r.length === 0) return n;
640
+ let i = await Promise.all(r.map((e) => t(e)));
641
+ for (let e = 0; e < r.length; e++) n.set(r[e].id, i[e]);
642
+ return n;
643
+ }
644
+ async function xt(e, t, n) {
645
+ let r = /* @__PURE__ */ new Map(), i = [];
646
+ if ($(e.blocks, i), i.length === 0) return r;
647
+ if (typeof n?.Liquid != "function") throw TypeError("[Templatical] customBlocks requires the liquidjs option: import * as liquidjs from \"liquidjs\" and pass { customBlocks, liquidjs }.");
648
+ let a = l(n), o = new Map(t.map((e) => [e.type, e])), s = await Promise.all(i.map(async (e) => {
649
+ let t = o.get(e.customType);
650
+ return t ? String(await a.parseAndRender(t.template, e.fieldValues)) : void 0;
651
+ }));
652
+ for (let e = 0; e < i.length; e++) {
653
+ let t = s[e];
654
+ t !== void 0 && r.set(i[e].id, t);
655
+ }
656
+ return r;
657
+ }
658
+ function $(e, t) {
659
+ for (let n of e) if (he(n)) t.push(n);
660
+ else if (g(n)) for (let e of n.children) $(e, t);
661
+ else d(n) && $(n.children, t);
662
+ }
663
+ function St(e, t, n) {
664
+ let r = [];
665
+ if ($(e.blocks, r), r.length === 0) return [];
666
+ let i = /* @__PURE__ */ new Map();
667
+ if (!t) for (let e of r) e.renderedStylesheet && !i.has(e.customType) && i.set(e.customType, e.renderedStylesheet);
668
+ let a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = [];
669
+ for (let e of r) {
670
+ if (a.has(e.customType)) continue;
671
+ a.add(e.customType);
672
+ let r = n?.get(e.customType), c = t ? t(e.customType) : r ? r.stylesheet : i.get(e.customType);
673
+ if (!c) continue;
674
+ let l = c.trim();
675
+ l === "" || o.has(l) || (o.add(l), s.push(l));
676
+ }
677
+ return s;
678
+ }
679
+ function Ct(e) {
680
+ return e.length === 0 ? "" : e.map((e) => `\n <mj-style>\n${e.replaceAll("<", "\\3c ")}\n </mj-style>`).join("");
681
+ }
682
+ export { J as BUTTON_FULL_WIDTH_CSS_CLASS, T as DEFAULT_SOCIAL_ICONS_BASE_URL, W as RICH_TEXT_CSS_CLASS, ge as RenderContext, P as UNRENDERABLE_MARKER_PREFIX, w as convertMergeTagsToValues, O as escapeAttr, D as escapeHtml, V as fluidOnMobileAttr, M as getCssClassAttr, N as getCssClasses, it as getWidthPercentages, at as getWidthPixels, j as isHiddenOnAll, X as renderBlock, pt as renderToMjml, L as renderUnrenderableBlock, K as resolveParagraphGap, G as richTextGapClass, R as toPaddingString };
683
+
684
+ //# sourceMappingURL=src-C9opbQj_.js.map