@templatical/editor 0.54.2 → 0.55.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/dist/{AiAltTextPopover-BBKVJ6HA.js → AiAltTextPopover-D5QosKvB.js} +1 -1
  2. package/dist/{AiAltTextReview-BuVbeQh-.js → AiAltTextReview-D1W_lrI_.js} +1 -1
  3. package/dist/{AiRewriteMenu-ZpYJfm-O.js → AiRewriteMenu-BwztoMov.js} +4 -4
  4. package/dist/{BlockPreviewCanvas-DtOo5y3U.js → BlockPreviewCanvas-C23A6FRm.js} +4 -4
  5. package/dist/{CloudPanels-DQRWMc59.js → CloudPanels-Baoaj6Xf.js} +1 -1
  6. package/dist/{CountdownToolbar-DTpMEDyh.js → CountdownToolbar-CA_gDIdZ.js} +4 -4
  7. package/dist/{IssuesPanel-BZn7-p9e.js → IssuesPanel-nmFhWG1p.js} +1 -1
  8. package/dist/{LanguageMenu-OOmQWVzO.js → LanguageMenu-DcABUYop.js} +3 -3
  9. package/dist/{LogicTagInsertButton-XESwnJia.js → LogicTagInsertButton-qZ82VMFx.js} +284 -279
  10. package/dist/{MergeTagInput-CAsBRoSm.js → MergeTagInput-JJeZbFkD.js} +1 -1
  11. package/dist/{MergeTagModeToggle-bOf27Hg1.js → MergeTagModeToggle-DDucd1eC.js} +1 -1
  12. package/dist/{MergeTagTextarea-DH_6JFui.js → MergeTagTextarea-dQ2LRrNB.js} +2 -2
  13. package/dist/{ParagraphEditor-XGUkV5Uw.js → ParagraphEditor-VXYwGoz_.js} +8 -8
  14. package/dist/{RestoreVersionDialog-C72kWccI.js → RestoreVersionDialog-BibNvAaJ.js} +1 -1
  15. package/dist/{RichTextEditorContent-BZN8KRvR.js → RichTextEditorContent-CU5EOlM_.js} +2 -2
  16. package/dist/{SaveBlockDialog-CKOnTMTU.js → SaveBlockDialog-S9aFi0cy.js} +4 -4
  17. package/dist/{SavedBlocksBrowserModal-BrlNxqDH.js → SavedBlocksBrowserModal-DIdn6B0J.js} +4 -4
  18. package/dist/{SavedBlocksPanels--lPR6gdh.js → SavedBlocksPanels-Cme2M6u8.js} +1 -1
  19. package/dist/{SavedBlocksPickBar-4ON4_KKl.js → SavedBlocksPickBar-BDmA7r3m.js} +1 -1
  20. package/dist/{TemplateSettings-BE0jZmRJ.js → TemplateSettings-C_LHLm5M.js} +4 -4
  21. package/dist/{TestEmailModal-BKmNGrZN.js → TestEmailModal-CLIRn7eL.js} +5 -5
  22. package/dist/{TestEmailPanel-DT1wllX3.js → TestEmailPanel-frdtjC8h.js} +1 -1
  23. package/dist/{TitleEditor-HjVZuUTB.js → TitleEditor-D5kC56Jl.js} +4 -4
  24. package/dist/{Toolbar-BppchV2k.js → Toolbar-D904Yw_R.js} +551 -503
  25. package/dist/{TplModal-BFWOoK8l.js → TplModal-BBdotDf1.js} +1 -1
  26. package/dist/{VersionHistoryPanels-D4yNVLvq.js → VersionHistoryPanels-DhagEgOk.js} +1 -1
  27. package/dist/{WrapperBlock-BUzQTZuu.js → WrapperBlock-BAT3T0Cz.js} +3 -3
  28. package/dist/{blockTypeIcons-D91v9k0x.js → blockTypeIcons-CoRQV_hP.js} +1 -1
  29. package/dist/bundle-stats.json +6 -6
  30. package/dist/{cdn/chunks/ca-DOuIxWRv.js → ca-DIkMxYCN.js} +10 -3
  31. package/dist/cdn/chunks/{AiAltTextPopover-CAI18sdv.js → AiAltTextPopover-CUGOPuRo.js} +2 -2
  32. package/dist/cdn/chunks/{AiAltTextPopover-CAI18sdv.js.map → AiAltTextPopover-CUGOPuRo.js.map} +1 -1
  33. package/dist/cdn/chunks/{AiAltTextReview-CWEyMOF-.js → AiAltTextReview-B9vm_L-8.js} +2 -2
  34. package/dist/cdn/chunks/{AiAltTextReview-CWEyMOF-.js.map → AiAltTextReview-B9vm_L-8.js.map} +1 -1
  35. package/dist/cdn/chunks/{AiRewriteMenu-BEepu1vo.js → AiRewriteMenu-BvV_7tNZ.js} +7 -7
  36. package/dist/cdn/chunks/{AiRewriteMenu-BEepu1vo.js.map → AiRewriteMenu-BvV_7tNZ.js.map} +1 -1
  37. package/dist/cdn/chunks/{BlockPreviewCanvas-B6ndvof2.js → BlockPreviewCanvas-Dr-xGq6v.js} +7 -7
  38. package/dist/cdn/chunks/{BlockPreviewCanvas-B6ndvof2.js.map → BlockPreviewCanvas-Dr-xGq6v.js.map} +1 -1
  39. package/dist/cdn/chunks/{CloudPanels-BGwDb0jB.js → CloudPanels-CQ0vNgsH.js} +2 -2
  40. package/dist/cdn/chunks/{CloudPanels-BGwDb0jB.js.map → CloudPanels-CQ0vNgsH.js.map} +1 -1
  41. package/dist/cdn/chunks/{CountdownToolbar-B-0FsTj-.js → CountdownToolbar-BxW-J7DX.js} +5 -5
  42. package/dist/cdn/chunks/{CountdownToolbar-B-0FsTj-.js.map → CountdownToolbar-BxW-J7DX.js.map} +1 -1
  43. package/dist/cdn/chunks/{IssuesPanel-LyjMBDok.js → IssuesPanel-BoHeIjvw.js} +3 -3
  44. package/dist/cdn/chunks/{IssuesPanel-LyjMBDok.js.map → IssuesPanel-BoHeIjvw.js.map} +1 -1
  45. package/dist/cdn/chunks/{LanguageMenu-CGwMCOQ5.js → LanguageMenu-BnYN5N1h.js} +7 -7
  46. package/dist/cdn/chunks/{LanguageMenu-CGwMCOQ5.js.map → LanguageMenu-BnYN5N1h.js.map} +1 -1
  47. package/dist/cdn/chunks/{LogicTagInsertButton-PDKuo2J3.js → LogicTagInsertButton-Bt2PXbQ0.js} +255 -250
  48. package/dist/cdn/chunks/LogicTagInsertButton-Bt2PXbQ0.js.map +1 -0
  49. package/dist/cdn/chunks/{MergeTagInput-DoQHBJk2.js → MergeTagInput-BELdMRni.js} +2 -2
  50. package/dist/cdn/chunks/{MergeTagInput-DoQHBJk2.js.map → MergeTagInput-BELdMRni.js.map} +1 -1
  51. package/dist/cdn/chunks/{MergeTagModeToggle-Ct5IG4VW.js → MergeTagModeToggle-DKfMDIEF.js} +2 -2
  52. package/dist/cdn/chunks/{MergeTagModeToggle-Ct5IG4VW.js.map → MergeTagModeToggle-DKfMDIEF.js.map} +1 -1
  53. package/dist/cdn/chunks/{MergeTagTextarea-BMsnjphR.js → MergeTagTextarea-w6xen3Xh.js} +5 -5
  54. package/dist/cdn/chunks/{MergeTagTextarea-BMsnjphR.js.map → MergeTagTextarea-w6xen3Xh.js.map} +1 -1
  55. package/dist/cdn/chunks/{ParagraphEditor-CVW-kuHW.js → ParagraphEditor-Cal9hY3U.js} +9 -9
  56. package/dist/cdn/chunks/{ParagraphEditor-CVW-kuHW.js.map → ParagraphEditor-Cal9hY3U.js.map} +1 -1
  57. package/dist/cdn/chunks/{RestoreVersionDialog-7MFZz-Sb.js → RestoreVersionDialog-f_ulmASY.js} +2 -2
  58. package/dist/cdn/chunks/{RestoreVersionDialog-7MFZz-Sb.js.map → RestoreVersionDialog-f_ulmASY.js.map} +1 -1
  59. package/dist/cdn/chunks/{RichTextEditorContent-CiL-SkZg.js → RichTextEditorContent-C_v0kS4A.js} +3 -3
  60. package/dist/cdn/chunks/{RichTextEditorContent-CiL-SkZg.js.map → RichTextEditorContent-C_v0kS4A.js.map} +1 -1
  61. package/dist/cdn/chunks/{SaveBlockDialog-CxdekCYy.js → SaveBlockDialog-C6N9RFls.js} +5 -5
  62. package/dist/cdn/chunks/{SaveBlockDialog-CxdekCYy.js.map → SaveBlockDialog-C6N9RFls.js.map} +1 -1
  63. package/dist/cdn/chunks/{SavedBlocksBrowserModal-D9CAa2U3.js → SavedBlocksBrowserModal-Bl2sl09D.js} +4 -4
  64. package/dist/cdn/chunks/{SavedBlocksBrowserModal-D9CAa2U3.js.map → SavedBlocksBrowserModal-Bl2sl09D.js.map} +1 -1
  65. package/dist/cdn/chunks/{SavedBlocksPanels-jfkYWtss.js → SavedBlocksPanels-DqVcmEUK.js} +2 -2
  66. package/dist/cdn/chunks/{SavedBlocksPanels-jfkYWtss.js.map → SavedBlocksPanels-DqVcmEUK.js.map} +1 -1
  67. package/dist/cdn/chunks/{SavedBlocksPickBar-yaCumC4j.js → SavedBlocksPickBar-DE-J1JVL.js} +2 -2
  68. package/dist/cdn/chunks/{SavedBlocksPickBar-yaCumC4j.js.map → SavedBlocksPickBar-DE-J1JVL.js.map} +1 -1
  69. package/dist/cdn/chunks/{TemplateSettings-SaV2UVh_.js → TemplateSettings-CpoKZ8oV.js} +5 -5
  70. package/dist/cdn/chunks/{TemplateSettings-SaV2UVh_.js.map → TemplateSettings-CpoKZ8oV.js.map} +1 -1
  71. package/dist/cdn/chunks/{TestEmailModal-ByfhP_sm.js → TestEmailModal-DI3z__Bd.js} +8 -8
  72. package/dist/cdn/chunks/{TestEmailModal-ByfhP_sm.js.map → TestEmailModal-DI3z__Bd.js.map} +1 -1
  73. package/dist/cdn/chunks/{TestEmailPanel-CfzpqpDs.js → TestEmailPanel-Cp5d2YGn.js} +2 -2
  74. package/dist/cdn/chunks/{TestEmailPanel-CfzpqpDs.js.map → TestEmailPanel-Cp5d2YGn.js.map} +1 -1
  75. package/dist/cdn/chunks/{TitleEditor-Ceb0YfWv.js → TitleEditor-C2syRLdZ.js} +4 -4
  76. package/dist/cdn/chunks/{TitleEditor-Ceb0YfWv.js.map → TitleEditor-C2syRLdZ.js.map} +1 -1
  77. package/dist/cdn/chunks/{Toolbar-Cv6Rv1S-.js → Toolbar-NEE8qxYh.js} +754 -706
  78. package/dist/cdn/chunks/Toolbar-NEE8qxYh.js.map +1 -0
  79. package/dist/cdn/chunks/{TplModal-DGpGdwgf.js → TplModal-B1MgvtX8.js} +2 -2
  80. package/dist/cdn/chunks/{TplModal-DGpGdwgf.js.map → TplModal-B1MgvtX8.js.map} +1 -1
  81. package/dist/cdn/chunks/{VersionHistoryPanels-BJnHCMAH.js → VersionHistoryPanels-Cefd8i_e.js} +2 -2
  82. package/dist/cdn/chunks/{VersionHistoryPanels-BJnHCMAH.js.map → VersionHistoryPanels-Cefd8i_e.js.map} +1 -1
  83. package/dist/cdn/chunks/{WrapperBlock-C_uE5rPJ.js → WrapperBlock-DFY-7YSs.js} +4 -4
  84. package/dist/cdn/chunks/{WrapperBlock-C_uE5rPJ.js.map → WrapperBlock-DFY-7YSs.js.map} +1 -1
  85. package/dist/{ca-DOuIxWRv.js → cdn/chunks/ca-DIkMxYCN.js} +12 -1
  86. package/dist/cdn/chunks/{ca-DOuIxWRv.js.map → ca-DIkMxYCN.js.map} +1 -1
  87. package/dist/cdn/chunks/{composables-BxikPuC1.js → composables-nyxwrM27.js} +610 -594
  88. package/dist/cdn/chunks/composables-nyxwrM27.js.map +1 -0
  89. package/dist/cdn/chunks/{createCloudRuntime-D2DUaudp.js → createCloudRuntime-DJkDGKQ_.js} +3 -3
  90. package/dist/cdn/chunks/{createCloudRuntime-D2DUaudp.js.map → createCloudRuntime-DJkDGKQ_.js.map} +1 -1
  91. package/dist/{de-DaOUfYBX.js → cdn/chunks/de-Cc6Ue0UD.js} +12 -1
  92. package/dist/cdn/chunks/de-Cc6Ue0UD.js.map +1 -0
  93. package/dist/cdn/chunks/{en-C0pHHMiR.js → en-BX4FujAQ.js} +11 -2
  94. package/dist/cdn/chunks/en-BX4FujAQ.js.map +1 -0
  95. package/dist/{es-CxyEKr6n.js → cdn/chunks/es-Do5b-MKU.js} +12 -1
  96. package/dist/cdn/chunks/es-Do5b-MKU.js.map +1 -0
  97. package/dist/cdn/chunks/{extensions-DuDWpKo7.js → extensions-BcwkOjVq.js} +76 -70
  98. package/dist/cdn/chunks/extensions-BcwkOjVq.js.map +1 -0
  99. package/dist/{fr-CYbamiI6.js → cdn/chunks/fr-S1n2Ebzp.js} +12 -1
  100. package/dist/cdn/chunks/fr-S1n2Ebzp.js.map +1 -0
  101. package/dist/cdn/chunks/{ja-DfaIAoGI.js → ja-DLwcq4bA.js} +11 -2
  102. package/dist/cdn/chunks/ja-DLwcq4bA.js.map +1 -0
  103. package/dist/{nl-DkrB-VKZ.js → cdn/chunks/nl-0JSWaZpT.js} +12 -1
  104. package/dist/cdn/chunks/nl-0JSWaZpT.js.map +1 -0
  105. package/dist/cdn/chunks/{normalizeMergeTagMarkup-Bn_hl4jd.js → normalizeMergeTagMarkup-BrGw5jxk.js} +99 -89
  106. package/dist/cdn/chunks/normalizeMergeTagMarkup-BrGw5jxk.js.map +1 -0
  107. package/dist/cdn/chunks/{preRenderCustomBlocks-C9oavydG.js → preRenderCustomBlocks-Cj0XYwuh.js} +4 -4
  108. package/dist/cdn/chunks/{preRenderCustomBlocks-C9oavydG.js.map → preRenderCustomBlocks-Cj0XYwuh.js.map} +1 -1
  109. package/dist/{pt-BR-CY5Ye7eP.js → cdn/chunks/pt-BR-D3VlIMDZ.js} +12 -1
  110. package/dist/cdn/chunks/pt-BR-D3VlIMDZ.js.map +1 -0
  111. package/dist/cdn/chunks/{sanitizeHtml-DfXoetOm.js → sanitizeHtml-GxJCxKcP.js} +3 -3
  112. package/dist/cdn/chunks/{sanitizeHtml-DfXoetOm.js.map → sanitizeHtml-GxJCxKcP.js.map} +1 -1
  113. package/dist/cdn/chunks/{socialIcons-DPwkrn5v.js → socialIcons-B5zrrV8-.js} +387 -386
  114. package/dist/cdn/chunks/{socialIcons-DPwkrn5v.js.map → socialIcons-B5zrrV8-.js.map} +1 -1
  115. package/dist/cdn/chunks/{src-712f3ofG.js → src-Diw9SLIe.js} +673 -554
  116. package/dist/cdn/chunks/src-Diw9SLIe.js.map +1 -0
  117. package/dist/cdn/chunks/{src-B2tQbzf6.js → src-UR3AQocX.js} +221 -215
  118. package/dist/cdn/chunks/src-UR3AQocX.js.map +1 -0
  119. package/dist/cdn/chunks/{src-ZFw5fg_z.js → src-v47QHNmB.js} +809 -659
  120. package/dist/cdn/chunks/src-v47QHNmB.js.map +1 -0
  121. package/dist/cdn/chunks/useLocalizedDisplay-DekV8qar.js +33 -0
  122. package/dist/cdn/chunks/{useLocalizedDisplay-DiNjT22M.js.map → useLocalizedDisplay-DekV8qar.js.map} +1 -1
  123. package/dist/cdn/chunks/{useLogicTag-SvMW4g00.js → useLogicTag-Cbp3I7UN.js} +2 -2
  124. package/dist/cdn/chunks/{useLogicTag-SvMW4g00.js.map → useLogicTag-Cbp3I7UN.js.map} +1 -1
  125. package/dist/cdn/chunks/{useMergeTag-JLz3Pqcw.js → useMergeTag-1lrpNyR5.js} +4 -4
  126. package/dist/cdn/chunks/{useMergeTag-JLz3Pqcw.js.map → useMergeTag-1lrpNyR5.js.map} +1 -1
  127. package/dist/cdn/chunks/{withCurrentFont-BcoPpkDS.js → withCurrentFont-DZfmiv8V.js} +2 -2
  128. package/dist/cdn/chunks/{withCurrentFont-BcoPpkDS.js.map → withCurrentFont-DZfmiv8V.js.map} +1 -1
  129. package/dist/cdn/editor.js +284 -284
  130. package/dist/cdn/editor.js.map +1 -1
  131. package/dist/{composables-BbPFRlBf.js → composables-DPgNn9GZ.js} +929 -913
  132. package/dist/{createCloudRuntime-Dlrg88gS.js → createCloudRuntime-Bw8TLmQ8.js} +2 -2
  133. package/dist/{cdn/chunks/de-DaOUfYBX.js → de-Cc6Ue0UD.js} +10 -3
  134. package/dist/{dist-C34cYI5S.js → dist-CBdk1Vcb.js} +963 -813
  135. package/dist/{en-C0pHHMiR.js → en-BX4FujAQ.js} +10 -1
  136. package/dist/{cdn/chunks/es-CxyEKr6n.js → es-Do5b-MKU.js} +10 -3
  137. package/dist/{extensions-xCiyqSg7.js → extensions-QFAARrjF.js} +338 -332
  138. package/dist/{cdn/chunks/fr-CYbamiI6.js → fr-S1n2Ebzp.js} +10 -3
  139. package/dist/index.d.ts +14 -1
  140. package/dist/{ja-DfaIAoGI.js → ja-DLwcq4bA.js} +10 -1
  141. package/dist/{cdn/chunks/nl-DkrB-VKZ.js → nl-0JSWaZpT.js} +10 -3
  142. package/dist/{normalizeMergeTagMarkup-C7FGNURu.js → normalizeMergeTagMarkup-BS0nRvhq.js} +89 -79
  143. package/dist/{preRenderCustomBlocks-DvbRa3L3.js → preRenderCustomBlocks-CiKvKd8V.js} +1 -1
  144. package/dist/{cdn/chunks/pt-BR-CY5Ye7eP.js → pt-BR-D3VlIMDZ.js} +10 -3
  145. package/dist/{sanitizeHtml-D_ab7dD6.js → sanitizeHtml-USjTyALR.js} +1 -1
  146. package/dist/{socialIcons-DhAolBjt.js → socialIcons-NvIg5ahU.js} +338 -337
  147. package/dist/templatical-editor.js +41 -41
  148. package/dist/{useLocalizedDisplay-C9MBFUr4.js → useLocalizedDisplay-LdjosX4w.js} +1 -1
  149. package/dist/{useLogicTag-BmuakZBd.js → useLogicTag-D8zgkXfb.js} +1 -1
  150. package/dist/{useMergeTag-DC4a8b_v.js → useMergeTag-k7Kr0nMd.js} +1 -1
  151. package/dist/{withCurrentFont-BSxJai99.js → withCurrentFont-Bzeg_gfH.js} +1 -1
  152. package/package.json +7 -7
  153. package/dist/cdn/chunks/LogicTagInsertButton-PDKuo2J3.js.map +0 -1
  154. package/dist/cdn/chunks/Toolbar-Cv6Rv1S-.js.map +0 -1
  155. package/dist/cdn/chunks/composables-BxikPuC1.js.map +0 -1
  156. package/dist/cdn/chunks/de-DaOUfYBX.js.map +0 -1
  157. package/dist/cdn/chunks/en-C0pHHMiR.js.map +0 -1
  158. package/dist/cdn/chunks/es-CxyEKr6n.js.map +0 -1
  159. package/dist/cdn/chunks/extensions-DuDWpKo7.js.map +0 -1
  160. package/dist/cdn/chunks/fr-CYbamiI6.js.map +0 -1
  161. package/dist/cdn/chunks/ja-DfaIAoGI.js.map +0 -1
  162. package/dist/cdn/chunks/nl-DkrB-VKZ.js.map +0 -1
  163. package/dist/cdn/chunks/normalizeMergeTagMarkup-Bn_hl4jd.js.map +0 -1
  164. package/dist/cdn/chunks/pt-BR-CY5Ye7eP.js.map +0 -1
  165. package/dist/cdn/chunks/src-712f3ofG.js.map +0 -1
  166. package/dist/cdn/chunks/src-B2tQbzf6.js.map +0 -1
  167. package/dist/cdn/chunks/src-ZFw5fg_z.js.map +0 -1
  168. package/dist/cdn/chunks/useLocalizedDisplay-DiNjT22M.js +0 -33
@@ -1,9 +1,9 @@
1
- import { A as e, Ct as t, Dt as n, Et as r, O as i, Ot as a, Q as o, Rt as s, Tt as c, Yt as l, _n as u, _t as d, b as f, bn as p, bt as m, ct as h, fn as g, gn as _, gt as v, hn as y, ht as b, k as ee, nn as te, ot as x, pt as ne, rt as S, sn as re, vn as ie, vt as ae, wt as oe, x as se, xt as C, y as ce, yn as le, yt as ue } from "./src-ZFw5fg_z.js";
1
+ import { At as e, Bt as t, Ct as n, Dt as r, Et as i, L as a, Ot as o, Sn as s, St as c, Tt as l, Zt as u, _n as d, _t as f, a as p, at as m, bn as h, bt as g, ct as _, h as v, ht as y, i as b, in as x, kt as ee, ln as te, m as ne, mn as re, o as ie, p as ae, ut as oe, vn as S, vt as se, xn as ce, xt as le, yn as ue, yt as de } from "./src-v47QHNmB.js";
2
2
  // ../renderer/src/render-context.ts
3
- var w = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
3
+ var C = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
4
4
  name: "@templatical/renderer",
5
5
  description: "Render Templatical email templates to MJML",
6
- version: "0.54.2",
6
+ version: "0.55.0",
7
7
  bugs: "https://github.com/templatical/sdk/issues",
8
8
  dependencies: { "@templatical/types": "workspace:*" },
9
9
  devDependencies: {
@@ -11,6 +11,7 @@ var w = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
11
11
  "@resvg/resvg-js": "^2.6.2",
12
12
  liquidjs: "^10.30.1",
13
13
  mjml: "^5.4.1",
14
+ "mjml-browser": "^5.4.1",
14
15
  typescript: "^6.0.3",
15
16
  vitest: "^5.0.5"
16
17
  },
@@ -45,7 +46,7 @@ var w = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
45
46
  },
46
47
  type: "module",
47
48
  types: "./dist/index.d.ts"
48
- }.version}/assets/social`, de = class e {
49
+ }.version}/assets/social`, w = class e {
49
50
  containerWidth;
50
51
  customFonts;
51
52
  defaultFallbackFont;
@@ -55,14 +56,14 @@ var w = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
55
56
  blockRenderers;
56
57
  contentDirection;
57
58
  contentWidth;
58
- constructor(e, t, n, r, i = /* @__PURE__ */ new Map(), a = w, o = {}, s = "ltr", c) {
59
+ constructor(e, t, n, r, i = /* @__PURE__ */ new Map(), a = C, o = {}, s = "ltr", c) {
59
60
  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;
60
61
  }
61
62
  withContainerWidth(t, n = t) {
62
63
  return new e(t, this.customFonts, this.defaultFallbackFont, this.allowHtmlBlocks, this.customBlockHtml, this.socialIconsBaseUrl, this.blockRenderers, this.contentDirection, n);
63
64
  }
64
65
  resolveFontFamily(e) {
65
- return ce(e, {
66
+ return b(e, {
66
67
  customFonts: this.customFonts,
67
68
  defaultFallback: this.defaultFallbackFont
68
69
  });
@@ -73,72 +74,74 @@ var w = `https://cdn.jsdelivr.net/npm/@templatical/renderer@${{
73
74
  ">": ">",
74
75
  "\"": """,
75
76
  "'": "'"
76
- }, E = /[&<>"']/g;
77
+ }, fe = /[&<>"']/g;
78
+ function E(e) {
79
+ return e === "" ? "" : e.replace(fe, (e) => T[e] ?? e);
80
+ }
77
81
  function D(e) {
78
- return e === "" ? "" : e.replace(E, (e) => T[e] ?? e);
82
+ return e === "" ? "" : e.replace(fe, (e) => T[e] ?? e);
79
83
  }
80
84
  function O(e) {
81
- return e === "" ? "" : e.replace(E, (e) => T[e] ?? e);
85
+ return e === "" ? "" : D(e.replace(/[;{}\r\n]/g, ""));
82
86
  }
87
+ var pe = /[&<>"]/g;
83
88
  function k(e) {
84
- return e === "" ? "" : O(e.replace(/[;{}\r\n]/g, ""));
85
- }
86
- var fe = /[&<>"]/g;
87
- function A(e) {
88
- return e.replace(fe, (e) => T[e] ?? e);
89
+ return e.replace(pe, (e) => T[e] ?? e);
89
90
  }
90
91
  // ../renderer/src/visibility.ts
91
- function j(e) {
92
+ function A(e) {
92
93
  let t = e.visibility;
93
94
  return t ? !t.desktop && !t.mobile : !1;
94
95
  }
95
- function M(e, t = []) {
96
- let n = [N(e), ...t].filter((e) => e !== "").join(" ");
97
- return n === "" ? "" : ` css-class="${O(n)}"`;
96
+ function j(e, t = []) {
97
+ let n = [M(e), ...t].filter((e) => e !== "").join(" ");
98
+ return n === "" ? "" : ` css-class="${D(n)}"`;
98
99
  }
99
- function N(e) {
100
+ function M(e) {
100
101
  let t = e.visibility;
101
102
  if (!t) return "";
102
103
  let n = [];
103
104
  return t.desktop || n.push("tpl-hide-desktop"), t.mobile || n.push("tpl-hide-mobile"), n.join(" ");
104
105
  }
105
106
  // ../renderer/src/unrenderable.ts
106
- var P = "templatical:unrenderable-block";
107
- function F(e) {
107
+ var N = "templatical:unrenderable-block";
108
+ function P(e) {
108
109
  return e.replace(/[<>]/g, "").replace(/-{2,}/g, "-");
109
110
  }
110
- function I(e) {
111
- return console.warn(`[Templatical] No renderer for block type "${e.type}" (id: ${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>`;
111
+ function F(e) {
112
+ return console.warn(`[Templatical] No renderer for block type "${e.type}" (id: ${e.id}). A placeholder comment was emitted in its place. Pass a \`blockRenderers\` entry for this type to render it.`), `<mj-raw><!-- ${N} type="${P(e.type)}" id="${P(e.id)}" --></mj-raw>`;
112
113
  }
113
114
  // ../renderer/src/padding.ts
114
- function L(e) {
115
- return O(`${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`);
115
+ function I(e) {
116
+ return D(`${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`);
116
117
  }
117
118
  // ../renderer/src/utils.ts
118
- function R(e, t) {
119
- return e ? ` ${t === "native" ? "background-color" : "container-background-color"}="${k(e)}"` : "";
119
+ function L(e, t) {
120
+ return e ? ` ${t === "native" ? "background-color" : "container-background-color"}="${O(e)}"` : "";
120
121
  }
121
- function pe(e) {
122
+ function R(e) {
122
123
  return typeof e != "number" || !Number.isFinite(e) || e <= 0 ? "" : ` height="${e}px"`;
123
124
  }
124
125
  function z(e, t) {
125
- let n = (e) => Math.trunc(e ?? 0), r = (e) => ie(e) === null ? 0 : Math.trunc(e.width);
126
+ let n = (e) => Math.trunc(e ?? 0), r = (e) => h(e) === null ? 0 : Math.trunc(e.width);
126
127
  return n(e?.left) + n(e?.right) + r(t?.left) + r(t?.right);
127
128
  }
128
129
  function B(e, t) {
130
+ if (e.fluidOnMobile === !0) return " fluid-on-mobile=\"true\"";
131
+ if (e.fluidOnMobile === !1) return "";
129
132
  let n = Math.floor(t.contentWidth) - z(e.styles.padding, e.border);
130
133
  return e.width === "full" || e.width >= n ? " fluid-on-mobile=\"true\"" : "";
131
134
  }
132
135
  function V(e) {
133
- return Object.entries(le(e)).map(([e, t]) => ` ${e}="${k(t)}"`).join("");
136
+ return Object.entries(ce(e)).map(([e, t]) => ` ${e}="${O(t)}"`).join("");
134
137
  }
135
138
  function H(e) {
136
- let t = p(e);
137
- return t === null ? "" : ` border-radius="${k(t)}"`;
139
+ let t = s(e);
140
+ return t === null ? "" : ` border-radius="${O(t)}"`;
138
141
  }
139
142
  function U(e) {
140
- let t = g(e);
141
- return t === null ? "" : ` background-url="${O(t.url)}" background-size="${k(t.size)}" background-position="${k(t.position)}" background-repeat="${k(t.repeat)}"`;
143
+ let t = re(e);
144
+ return t === null ? "" : ` background-url="${D(t.url)}" background-size="${O(t.size)}" background-position="${O(t.position)}" background-repeat="${O(t.repeat)}"`;
142
145
  }
143
146
  // ../renderer/src/rich-text.ts
144
147
  var W = "tpl-rich-text";
@@ -146,7 +149,7 @@ function G(e) {
146
149
  return `${W}-${e}`;
147
150
  }
148
151
  function me(e, t = "ltr") {
149
- let n = _, r = `.${W}`, i = [...new Set(e)].sort((e, t) => e - t).flatMap((e) => {
152
+ let n = S, r = `.${W}`, i = [...new Set(e)].sort((e, t) => e - t).flatMap((e) => {
150
153
  let t = `.${G(e)}`;
151
154
  return [`${t} p { margin: 0 0 ${e}px; }`, `${t} p:last-child { margin-bottom: 0; }`];
152
155
  }), a = t === "rtl" ? "padding-right" : "padding-left";
@@ -157,15 +160,15 @@ function me(e, t = "ltr") {
157
160
  ].join("\n ");
158
161
  }
159
162
  function K(e) {
160
- return e ?? _.paragraphGap;
163
+ return e ?? S.paragraphGap;
161
164
  }
162
- function he(e) {
163
- let t = [_.paragraphGap], n = (e) => {
164
- if (e.type === "paragraph" && t.push(K(e.paragraphSpacing)), C(e)) for (let t of e.children) for (let e of t) n(e);
165
- else if (a(e)) for (let t of e.children) n(t);
165
+ function he(t) {
166
+ let r = [S.paragraphGap], i = (t) => {
167
+ if (t.type === "paragraph" && r.push(K(t.paragraphSpacing)), n(t)) for (let e of t.children) for (let t of e) i(t);
168
+ else if (e(t)) for (let e of t.children) i(e);
166
169
  };
167
- for (let t of e) n(t);
168
- return t;
170
+ for (let e of t) i(e);
171
+ return r;
169
172
  }
170
173
  var ge = {
171
174
  apos: "'",
@@ -210,7 +213,7 @@ function be(e) {
210
213
  }
211
214
  return e;
212
215
  }
213
- function J(e) {
216
+ function xe(e) {
214
217
  if (!e.includes("&")) return e;
215
218
  let t = "", n = 0, r = e.indexOf("<");
216
219
  for (; r !== -1;) {
@@ -218,7 +221,7 @@ function J(e) {
218
221
  r = e.indexOf("<", r + 1);
219
222
  continue;
220
223
  }
221
- let i = x(e, r + 1);
224
+ let i = _(e, r + 1);
222
225
  if (i === -1) break;
223
226
  let a = e.slice(r, i), o = be(a);
224
227
  o !== a && (t += e.slice(n, r) + o, n = i), r = e.indexOf("<", i);
@@ -226,114 +229,117 @@ function J(e) {
226
229
  return t + e.slice(n);
227
230
  }
228
231
  // ../renderer/src/renderers/title.ts
229
- function xe(e, t) {
230
- if (j(e)) return "";
231
- let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = Se(J(f(S(e.content)))), a = y[e.level] ?? y[2], o = e.color ? `\n color="${O(e.color)}"` : "", s = O(e.textAlign), c = Ce(e.fontFamily, t), l = M(e, [W, G(K(void 0))]), d = `h${y[e.level] ? e.level : 2}`;
232
+ function Se(e, t) {
233
+ if (A(e)) return "";
234
+ let n = I(e.styles.padding), r = L(e.styles.backgroundColor, "container"), i = Ce(xe(p(m(e.content)))), a = d[e.level] ?? d[2], o = e.color ? `\n color="${D(e.color)}"` : "", s = D(e.textAlign), c = we(e.fontFamily, t), l = j(e, [W, G(K(void 0))]), u = `h${d[e.level] ? e.level : 2}`;
232
235
  return `<mj-text
233
236
  font-size="${a}px"${o}
234
237
  align="${s}"
235
- line-height="${u}"
238
+ line-height="${ue}"
236
239
  padding="${n}"${r}${c}${l}
237
- ><${d} style="margin:0;font-size:inherit;color:inherit;line-height:inherit;font-weight:700">${i}</${d}></mj-text>`;
240
+ ><${u} style="margin:0;font-size:inherit;color:inherit;line-height:inherit;font-weight:700">${i}</${u}></mj-text>`;
238
241
  }
239
- function Se(e) {
242
+ function Ce(e) {
240
243
  let t = /^\s*<p\b/.exec(e);
241
244
  if (!t) return e;
242
- let n = x(e, t[0].length);
245
+ let n = _(e, t[0].length);
243
246
  if (n === -1) return e;
244
247
  let r = /<\/p>\s*$/.exec(e);
245
248
  if (!r || r.index <= n) return e;
246
249
  let i = e.slice(n + 1, r.index);
247
250
  return /<\/p>\s*<p\b/i.test(i) ? e : i;
248
251
  }
249
- function Ce(e, t) {
250
- return e ? ` font-family="${A(t.resolveFontFamily(e))}"` : "";
252
+ function we(e, t) {
253
+ return e ? ` font-family="${k(t.resolveFontFamily(e))}"` : "";
251
254
  }
252
255
  // ../renderer/src/renderers/paragraph.ts
253
- function we(e, t) {
254
- if (j(e) || se(e.content)) return "";
255
- let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = J(f(S(e.content))), a = M(e, [W, G(K(e.paragraphSpacing))]);
256
+ function Te(e, t) {
257
+ if (A(e) || ie(e.content)) return "";
258
+ let n = I(e.styles.padding), r = L(e.styles.backgroundColor, "container"), i = xe(p(m(e.content))), a = j(e, [W, G(K(e.paragraphSpacing))]);
256
259
  return `<mj-text
257
260
  line-height="1.5"${t.contentDirection === "rtl" ? "\n align=\"right\"" : ""}
258
261
  padding="${n}"${r}${a}
259
262
  >${i}</mj-text>`;
260
263
  }
261
264
  // ../renderer/src/renderers/image.ts
262
- function Te(e, t) {
263
- if (j(e) || e.src === "") return "";
264
- let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = O(e.width === "full" ? t.containerWidth + "px" : e.width + "px"), a = pe(e.height), o = B(e, t), s = M(e), c = H(e.borderRadius), l = V(e.border), u = "";
265
- e.linkUrl && (u = ` href="${O(e.linkUrl)}"`, e.linkOpenInNewTab && (u += " target=\"_blank\" rel=\"noopener\""));
266
- let d = O(e.src), f = e.decorative === !0;
265
+ function Ee(e, t) {
266
+ if (A(e) || e.src === "") return "";
267
+ let n = I(e.styles.padding), r = L(e.styles.backgroundColor, "container"), i = D(e.width === "full" ? t.containerWidth + "px" : e.width + "px"), a = R(e.height), o = B(e, t), s = j(e), c = H(e.borderRadius), l = V(e.border), u = "";
268
+ e.linkUrl && (u = ` href="${D(e.linkUrl)}"`, e.linkOpenInNewTab && (u += " target=\"_blank\" rel=\"noopener\""));
269
+ let d = D(e.src), f = e.decorative === !0;
267
270
  return `<mj-image
268
271
  src="${d}"
269
- alt="${f ? "" : O(e.alt)}"
272
+ alt="${f ? "" : D(e.alt)}"
270
273
  width="${i}"${a}${o}
271
- align="${O(e.align)}"
274
+ align="${D(e.align)}"
272
275
  padding="${n}"${r}${l}${c}${u}${s}${f ? " role=\"presentation\"" : ""}
273
276
  />`;
274
277
  }
275
278
  // ../renderer/src/renderers/button.ts
276
- var Y = "tpl-button-full";
277
- function Ee(e, t) {
278
- if (j(e)) return "";
279
- let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = L(e.buttonPadding), a = e.url === "" ? "" : O(e.url), o = a === "" ? "" : ` href="${a}"`, s = De(e.backgroundColor), c = O(e.textColor), l = e.fontSize, u = O(ke(e.borderRadius)), d = D(e.text), f = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", p = Oe(e.fontFamily, t), m = Ae(e.width), h = M(e, e.width === "full" ? [Y] : []), g = V(e.border), _ = O(e.align ?? "center");
280
- return `<mj-button${o}${f}
279
+ var J = "tpl-button-full";
280
+ function De(e, t) {
281
+ if (A(e)) return "";
282
+ let n = I(e.styles.padding), r = L(e.styles.backgroundColor, "container"), i = I(e.buttonPadding), a = e.url === "" ? "" : D(e.url), o = a === "" ? "" : ` href="${a}"`, s = Oe(e.backgroundColor), c = D(e.textColor), l = e.fontSize, u = ke(e.fontWeight), d = D(je(e.borderRadius)), f = E(e.text), p = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", m = Ae(e.fontFamily, t), h = Me(e.width), g = j(e, e.width === "full" ? [J] : []), _ = V(e.border), v = D(e.align ?? "center");
283
+ return `<mj-button${o}${p}
281
284
  background-color="${s}"
282
285
  color="${c}"
283
- font-size="${O(String(l))}px"
284
- font-weight="bold"
285
- border-radius="${u}"${g}
286
+ font-size="${D(String(l))}px"
287
+ font-weight="${u}"
288
+ border-radius="${d}"${_}
286
289
  inner-padding="${i}"
287
- align="${_}"
288
- padding="${n}"${r}${p}${m}${h}
289
- >${d}</mj-button>`;
290
- }
291
- function De(e) {
292
- return e.trim() === "" ? "transparent" : O(e);
290
+ align="${v}"
291
+ padding="${n}"${r}${m}${h}${g}
292
+ >${f}</mj-button>`;
293
293
  }
294
- function Oe(e, t) {
295
- return e ? ` font-family="${A(t.resolveFontFamily(e))}"` : "";
294
+ function Oe(e) {
295
+ return e.trim() === "" ? "transparent" : D(e);
296
296
  }
297
297
  function ke(e) {
298
- return typeof e == "number" ? `${e}px` : p(e) ?? "0px";
298
+ return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
299
299
  }
300
- function Ae(e) {
301
- return e === void 0 ? "" : ` width="${O(e === "full" ? "100%" : `${e}px`)}"`;
300
+ function Ae(e, t) {
301
+ return e ? ` font-family="${k(t.resolveFontFamily(e))}"` : "";
302
+ }
303
+ function je(e) {
304
+ return typeof e == "number" ? `${e}px` : s(e) ?? "0px";
305
+ }
306
+ function Me(e) {
307
+ return e === void 0 ? "" : ` width="${D(e === "full" ? "100%" : `${e}px`)}"`;
302
308
  }
303
309
  // ../renderer/src/renderers/divider.ts
304
- function je(e, t) {
305
- if (j(e)) return "";
306
- let n = L(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);
310
+ function Ne(e, t) {
311
+ if (A(e)) return "";
312
+ let n = I(e.styles.padding), r = e.styles.backgroundColor ? ` container-background-color="${D(e.styles.backgroundColor)}"` : "", i = e.width === "full" ? "100%" : typeof e.width == "number" ? `${e.width}px` : e.width, a = e.thickness, o = D(e.lineStyle), s = D(e.color), c = j(e);
307
313
  return `<mj-divider
308
- border-width="${O(String(a))}px"
314
+ border-width="${D(String(a))}px"
309
315
  border-style="${o}"
310
316
  border-color="${s}"
311
- width="${O(i)}"
317
+ width="${D(i)}"
312
318
  padding="${n}"${r}${c}
313
319
  />`;
314
320
  }
315
321
  // ../renderer/src/renderers/spacer.ts
316
- function Me(e, t) {
317
- if (j(e)) return "";
318
- let n = e.height, r = e.styles.backgroundColor ? ` container-background-color="${O(e.styles.backgroundColor)}"` : "", i = M(e);
319
- return `<mj-spacer height="${O(String(n))}px" padding="0"${r}${i} />`;
322
+ function Pe(e, t) {
323
+ if (A(e)) return "";
324
+ let n = e.height, r = e.styles.backgroundColor ? ` container-background-color="${D(e.styles.backgroundColor)}"` : "", i = j(e);
325
+ return `<mj-spacer height="${D(String(n))}px" padding="0"${r}${i} />`;
320
326
  }
321
327
  // ../renderer/src/renderers/html.ts
322
- function Ne(e, t) {
323
- if (j(e) || !t.allowHtmlBlocks) return "";
328
+ function Fe(e, t) {
329
+ if (A(e) || !t.allowHtmlBlocks) return "";
324
330
  let n = e.content;
325
331
  if (n === "") return "";
326
- let r = M(e);
327
- return `<mj-text padding="${L(e.styles.padding)}"${R(e.styles.backgroundColor, "container")}${r}>
332
+ let r = j(e);
333
+ return `<mj-text padding="${I(e.styles.padding)}"${L(e.styles.backgroundColor, "container")}${r}>
328
334
  ${n}
329
335
  </mj-text>`;
330
336
  }
331
337
  // ../renderer/src/renderers/social.ts
332
- function Pe(e, t) {
333
- if (j(e)) return "";
338
+ function Ie(e, t) {
339
+ if (A(e)) return "";
334
340
  let n = e.icons;
335
341
  if (n.length === 0) return "";
336
- let r = L(e.styles.padding), i = e.styles.backgroundColor ? ` container-background-color="${O(e.styles.backgroundColor)}"` : "", a = M(e), o = O(e.align), s = e.iconSize, c = e.iconStyle, l = O(te(c, e.iconTone)), u = e.spacing, d;
342
+ let r = I(e.styles.padding), i = e.styles.backgroundColor ? ` container-background-color="${D(e.styles.backgroundColor)}"` : "", a = j(e), o = D(e.align), s = e.iconSize, c = e.iconStyle, l = D(x(c, e.iconTone)), u = e.spacing, d;
337
343
  switch (s) {
338
344
  case "small":
339
345
  d = 24;
@@ -364,79 +370,79 @@ function Pe(e, t) {
364
370
  padding="${r}"${i}${a}
365
371
  >
366
372
  ${n.map((e, n) => {
367
- let r = O(e.platform), i = O(e.url), a = `${t.socialIconsBaseUrl}/${l}/${r}.png`, o = n === p - 1 ? 0 : u;
368
- return `<mj-social-element src="${a}" href="${i}" icon-size="${d}px" padding="0 ${O(String(o))}px 0 0" border-radius="${f}" background-color="transparent"></mj-social-element>`;
373
+ let r = D(e.platform), i = D(e.url), a = `${t.socialIconsBaseUrl}/${l}/${r}.png`, o = n === p - 1 ? 0 : u;
374
+ return `<mj-social-element src="${a}" href="${i}" icon-size="${d}px" padding="0 ${D(String(o))}px 0 0" border-radius="${f}" background-color="transparent"></mj-social-element>`;
369
375
  }).join("\n")}
370
376
  </mj-social>`;
371
377
  }
372
378
  // ../renderer/src/renderers/menu.ts
373
- function Fe(e, t) {
374
- if (j(e) || e.items.length === 0) return "";
375
- let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = M(e), a = Re(e.fontFamily, t), o = O(e.textAlign), s = e.fontSize, c = e.color ? `\n color="${O(e.color)}"` : "", l = Ie(e);
379
+ function Le(e, t) {
380
+ if (A(e) || e.items.length === 0) return "";
381
+ let n = I(e.styles.padding), r = L(e.styles.backgroundColor, "container"), i = j(e), a = Be(e.fontFamily, t), o = D(e.textAlign), s = e.fontSize, c = e.color ? `\n color="${D(e.color)}"` : "", l = Re(e);
376
382
  return `<mj-text
377
- font-size="${O(String(s))}px"${c}
383
+ font-size="${D(String(s))}px"${c}
378
384
  align="${o}"
379
385
  line-height="1.5"
380
386
  padding="${n}"${r}${a}${i}
381
387
  >${l}</mj-text>`;
382
388
  }
383
- function Ie(e) {
384
- let t = e.items, n = D(e.separator), r = k(e.separatorColor), i = e.spacing, a = e.linkColor ?? e.color, o = [], s = t.length;
385
- for (let e = 0; e < s; e++) o.push(Le(t[e], a)), e < s - 1 && o.push(`<span style="color: ${r}; padding: 0 ${k(String(i))}px;">${n}</span>`);
389
+ function Re(e) {
390
+ let t = e.items, n = E(e.separator), r = O(e.separatorColor), i = e.spacing, a = e.linkColor ?? e.color, o = [], s = t.length;
391
+ for (let e = 0; e < s; e++) o.push(ze(t[e], a)), e < s - 1 && o.push(`<span style="color: ${r}; padding: 0 ${O(String(i))}px;">${n}</span>`);
386
392
  return o.join("");
387
393
  }
388
- function Le(e, t) {
389
- let n = D(e.text), r = O(e.url), i = e.color ?? t, a = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", o = ["text-decoration: none"];
390
- 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>`;
394
+ function ze(e, t) {
395
+ let n = E(e.text), r = D(e.url), i = e.color ?? t, a = e.openInNewTab ? " target=\"_blank\" rel=\"noopener\"" : "", o = ["text-decoration: none"];
396
+ return i && o.unshift(`color: ${O(i)}`), e.bold && o.push("font-weight: bold"), e.underline && o.push("text-decoration: underline"), `<a href="${r}" style="${o.join("; ")}"${a}>${n}</a>`;
391
397
  }
392
- function Re(e, t) {
393
- return e ? ` font-family="${A(t.resolveFontFamily(e))}"` : "";
398
+ function Be(e, t) {
399
+ return e ? ` font-family="${k(t.resolveFontFamily(e))}"` : "";
394
400
  }
395
401
  // ../renderer/src/renderers/table.ts
396
- function ze(e, t) {
397
- if (j(e) || e.rows.length === 0) return "";
398
- let n = L(e.styles.padding), r = R(e.styles.backgroundColor, "container"), i = M(e), a = Ue(e.fontFamily, t), o = e.fontSize, s = e.color ? `\n color="${O(e.color)}"` : "", c = O(e.textAlign), l = Be(e);
402
+ function Ve(e, t) {
403
+ if (A(e) || e.rows.length === 0) return "";
404
+ let n = I(e.styles.padding), r = L(e.styles.backgroundColor, "container"), i = j(e), a = Ge(e.fontFamily, t), o = e.fontSize, s = e.color ? `\n color="${D(e.color)}"` : "", c = D(e.textAlign), l = He(e);
399
405
  return `<mj-text
400
- font-size="${O(String(o))}px"${s}
406
+ font-size="${D(String(o))}px"${s}
401
407
  align="${c}"
402
408
  line-height="1.5"
403
409
  padding="${n}"${r}${a}${i}
404
410
  >${l}</mj-text>`;
405
411
  }
406
- function Be(e) {
407
- let t = k(e.borderColor), n = e.borderWidth, r = "";
412
+ function He(e) {
413
+ let t = O(e.borderColor), n = e.borderWidth, r = "";
408
414
  for (let i = 0; i < e.rows.length; i++) {
409
415
  let a = e.rows[i];
410
- r += Ve(a, e, e.hasHeaderRow && i === 0, t, n);
416
+ r += Ue(a, e, e.hasHeaderRow && i === 0, t, n);
411
417
  }
412
418
  return `<table style="width: 100%; border-collapse: collapse;">${r}</table>`;
413
419
  }
414
- function Ve(e, t, n, r, i) {
420
+ function Ue(e, t, n, r, i) {
415
421
  let a = "";
416
- for (let o of e.cells) a += He(o, t, n, r, i);
422
+ for (let o of e.cells) a += We(o, t, n, r, i);
417
423
  return `<tr>${a}</tr>`;
418
424
  }
419
- function He(e, t, n, r, i) {
420
- let a = t.cellPadding, o = [`border: ${k(String(i))}px solid ${r}`, `padding: ${k(String(a))}px`];
421
- n && (o.push("font-weight: bold"), t.headerBackgroundColor && o.push(`background-color: ${k(t.headerBackgroundColor)}`));
422
- let s = o.join("; "), c = D(S(e.content)), l = n ? "th" : "td";
425
+ function We(e, t, n, r, i) {
426
+ let a = t.cellPadding, o = [`border: ${O(String(i))}px solid ${r}`, `padding: ${O(String(a))}px`];
427
+ n && (o.push("font-weight: bold"), t.headerBackgroundColor && o.push(`background-color: ${O(t.headerBackgroundColor)}`));
428
+ let s = o.join("; "), c = E(m(e.content)), l = n ? "th" : "td";
423
429
  return `<${l} style="${s}">${c}</${l}>`;
424
430
  }
425
- function Ue(e, t) {
426
- return e ? ` font-family="${A(t.resolveFontFamily(e))}"` : "";
431
+ function Ge(e, t) {
432
+ return e ? ` font-family="${k(t.resolveFontFamily(e))}"` : "";
427
433
  }
428
434
  // ../renderer/src/renderers/custom.ts
429
- function We(e, t) {
430
- if (j(e)) return "";
435
+ function Ke(e, t) {
436
+ if (A(e)) return "";
431
437
  let n = t.customBlockHtml.get(e.id) ?? e.renderedHtml;
432
438
  if (!n || n === "") return "";
433
- let r = M(e);
434
- return `<mj-text padding="${L(e.styles.padding)}"${R(e.styles.backgroundColor, "container")}${r}>
439
+ let r = j(e);
440
+ return `<mj-text padding="${I(e.styles.padding)}"${L(e.styles.backgroundColor, "container")}${r}>
435
441
  ${n}
436
442
  </mj-text>`;
437
443
  }
438
444
  // ../renderer/src/columns.ts
439
- function X(e) {
445
+ function qe(e) {
440
446
  switch (e) {
441
447
  case "2": return ["50%", "50%"];
442
448
  case "3": return [
@@ -449,7 +455,7 @@ function X(e) {
449
455
  default: return ["100%"];
450
456
  }
451
457
  }
452
- function Ge(e, t) {
458
+ function Je(e, t) {
453
459
  switch (e) {
454
460
  case "2": return [t * .5, t * .5];
455
461
  case "3": return [
@@ -463,7 +469,7 @@ function Ge(e, t) {
463
469
  }
464
470
  }
465
471
  // ../renderer/src/hero-geometry.ts
466
- function Ke(e, t, n) {
472
+ function Ye(e, t, n) {
467
473
  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));
468
474
  return {
469
475
  mode: "fixed-height",
@@ -473,7 +479,7 @@ function Ke(e, t, n) {
473
479
  };
474
480
  }
475
481
  // ../renderer/src/display-condition.ts
476
- function Z(e, t) {
482
+ function Y(e, t) {
477
483
  if (t === "") return "";
478
484
  let n = e.displayCondition;
479
485
  return n ? `<mj-raw>${n.before}</mj-raw>
@@ -481,35 +487,35 @@ function Z(e, t) {
481
487
  <mj-raw>${n.after}</mj-raw>` : t;
482
488
  }
483
489
  // ../renderer/src/renderers/section.ts
484
- function qe(e, t, n) {
485
- if (j(e)) return "";
486
- let r = re(e);
487
- if (r?.applied) return Je(e, r, t, n);
488
- let i = e.columns, a = X(i), o = Ge(i, t.containerWidth), s = Math.floor(t.contentWidth) - z(e.styles.padding, e.border), c = a.map((e) => Math.floor(s * parseFloat(e) / 100)), l = L(e.styles.padding), u = R(e.styles.backgroundColor, "native"), d = U(e.backgroundImage), f = M(e), p = H(e.borderRadius), m = V(e.border), h = t.contentDirection === "rtl" ? " direction=\"rtl\"" : "", g = e.children, _ = [];
489
- for (let e = 0; e < g.length; e++) {
490
- let r = g[e], i = a[e] ?? "100%", l = Math.floor(o[e] ?? t.containerWidth), u = Ye(r, t.allowHtmlBlocks).filter((e) => !C(e)), d = t.withContainerWidth(l, c[e] ?? s), f = u.map((e) => Z(e, n(e, d))).filter((e) => e !== "").join("\n");
491
- _.push(`<mj-column width="${i}"${h}>
492
- ${f === "" ? "<mj-text>&nbsp;</mj-text>" : f}
490
+ function Xe(e, t, r) {
491
+ if (A(e)) return "";
492
+ let i = te(e);
493
+ if (i?.applied) return Ze(e, i, t, r);
494
+ let a = e.columns, o = qe(a), s = Je(a, t.containerWidth), c = Math.floor(t.contentWidth) - z(e.styles.padding, e.border), l = o.map((e) => Math.floor(c * parseFloat(e) / 100)), u = I(e.styles.padding), d = L(e.styles.backgroundColor, "native"), f = U(e.backgroundImage), p = j(e), m = H(e.borderRadius), h = V(e.border), g = t.contentDirection === "rtl" ? " direction=\"rtl\"" : "", _ = e.children, v = [];
495
+ for (let e = 0; e < _.length; e++) {
496
+ let i = _[e], a = o[e] ?? "100%", u = Math.floor(s[e] ?? t.containerWidth), d = Qe(i, t.allowHtmlBlocks).filter((e) => !n(e)), f = t.withContainerWidth(u, l[e] ?? c), p = d.map((e) => Y(e, r(e, f))).filter((e) => e !== "").join("\n");
497
+ v.push(`<mj-column width="${a}"${g}>
498
+ ${p === "" ? "<mj-text>&nbsp;</mj-text>" : p}
493
499
  </mj-column>`);
494
500
  }
495
- let v = _.join("\n");
496
- return `<mj-section${u}${d} padding="${l}"${m}${p}${f}${h}>
497
- ${e.stackOnMobile === !1 && _.length > 1 ? `<mj-group${h}>
498
- ${v}
499
- </mj-group>` : v}
501
+ let y = v.join("\n");
502
+ return `<mj-section${d}${f} padding="${u}"${h}${m}${p}${g}>
503
+ ${e.stackOnMobile === !1 && v.length > 1 ? `<mj-group${g}>
504
+ ${y}
505
+ </mj-group>` : y}
500
506
  </mj-section>`;
501
507
  }
502
- function Je(e, t, n, r) {
503
- let i = Math.floor(n.contentWidth), a = Ke(t, i, e.styles.padding), o = R(e.styles.backgroundColor, "native") || " background-color=\"transparent\"", s = L(e.styles.padding), c = H(e.borderRadius), l = M(e), u = n.withContainerWidth(i, i - z(e.styles.padding)), d = Ye(e.children[0] ?? [], n.allowHtmlBlocks).filter((e) => !C(e)).map((e) => Z(e, r(e, u))).filter((e) => e !== "").join("\n");
504
- 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}>
505
- ${d}
508
+ function Ze(e, t, r, i) {
509
+ let a = Math.floor(r.contentWidth), o = Ye(t, a, e.styles.padding), s = L(e.styles.backgroundColor, "native") || " background-color=\"transparent\"", c = I(e.styles.padding), l = H(e.borderRadius), u = j(e), d = r.withContainerWidth(a, a - z(e.styles.padding)), f = Qe(e.children[0] ?? [], r.allowHtmlBlocks).filter((e) => !n(e)).map((e) => Y(e, i(e, d))).filter((e) => e !== "").join("\n");
510
+ return `<mj-hero mode="${o.mode}" height="${o.height}px" background-url="${D(t.image.url)}" background-width="${o.backgroundWidth}px" background-height="${o.backgroundHeight}px" background-position="${D(t.image.position)}"${s} padding="${c}" vertical-align="${D(t.verticalAlign)}"${l}${u}>
511
+ ${f}
506
512
  </mj-hero>`;
507
513
  }
508
- function Ye(e, t) {
514
+ function Qe(e, t) {
509
515
  return t ? e : e.filter((e) => e.type !== "html");
510
516
  }
511
517
  // ../renderer/src/renderers/video.ts
512
- function Xe(e, t) {
518
+ function $e(e, t) {
513
519
  if (t) return t;
514
520
  if (!e) return null;
515
521
  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})/]) {
@@ -519,85 +525,85 @@ function Xe(e, t) {
519
525
  let n = e.match(/vimeo\.com\/(?:video\/)?(\d+)/);
520
526
  return n ? `https://vumbnail.com/${n[1]}.jpg` : null;
521
527
  }
522
- function Ze(e, t) {
523
- if (j(e)) return "";
524
- let n = Xe(e.url, e.thumbnailUrl);
528
+ function et(e, t) {
529
+ if (A(e)) return "";
530
+ let n = $e(e.url, e.thumbnailUrl);
525
531
  if (!n) return "";
526
- let r = L(e.styles.padding), i = R(e.styles.backgroundColor, "container"), a = O(e.width === "full" ? t.containerWidth + "px" : e.width + "px"), o = pe(e.height), s = B(e, t), c = M(e);
532
+ let r = I(e.styles.padding), i = L(e.styles.backgroundColor, "container"), a = D(e.width === "full" ? t.containerWidth + "px" : e.width + "px"), o = R(e.height), s = B(e, t), c = j(e);
527
533
  return `<mj-image
528
- src="${O(n)}"
529
- alt="${O(e.alt)}"
534
+ src="${D(n)}"
535
+ alt="${D(e.alt)}"
530
536
  width="${a}"${o}${s}
531
- align="${O(e.align)}"
537
+ align="${D(e.align)}"
532
538
  padding="${r}"
533
- href="${O(e.url)}"
539
+ href="${D(e.url)}"
534
540
  target="_blank"
535
541
  rel="noopener"${i}${c}
536
542
  />`;
537
543
  }
538
544
  // ../renderer/src/renderers/index.ts
539
- function Q(e, i) {
540
- let a = i.blockRenderers[e.type];
541
- return a ? a(e, i) : C(e) ? qe(e, i, Q) : r(e) ? xe(e, i) : m(e) ? we(e, i) : ae(e) ? Te(e, i) : ne(e) ? Ee(e, i) : v(e) ? je(e, i) : oe(e) ? Me(e, i) : d(e) ? Ne(e, i) : t(e) ? Pe(e, i) : ue(e) ? Fe(e, i) : c(e) ? ze(e, i) : n(e) ? Ze(e, i) : b(e) ? We(e, i) : j(e) ? "" : I(e);
545
+ function X(e, t) {
546
+ let a = t.blockRenderers[e.type];
547
+ return a ? a(e, t) : n(e) ? Xe(e, t, X) : o(e) ? Se(e, t) : c(e) ? Te(e, t) : g(e) ? Ee(e, t) : y(e) ? De(e, t) : se(e) ? Ne(e, t) : i(e) ? Pe(e, t) : de(e) ? Fe(e, t) : l(e) ? Ie(e, t) : le(e) ? Le(e, t) : r(e) ? Ve(e, t) : ee(e) ? et(e, t) : f(e) ? Ke(e, t) : A(e) ? "" : F(e);
542
548
  }
543
549
  // ../renderer/src/index.ts
544
- var Qe = `.${Y} a { display: block !important; }`;
545
- async function $e(t, n) {
550
+ var tt = `.${J} a { display: block !important; }`;
551
+ async function nt(e, n) {
546
552
  if (n?.customBlocks !== void 0 && n.renderCustomBlock !== void 0) throw TypeError("[Templatical] customBlocks cannot be combined with renderCustomBlock");
547
553
  if (n?.customBlocks !== void 0 && n.getCustomBlockStylesheet !== void 0) throw TypeError("[Templatical] customBlocks cannot be combined with getCustomBlockStylesheet");
548
- let r = n?.locale ?? s(t), a = l(t, r), o = n?.layout ? i(l(n.layout, r, { missing: "default" }), a) : (ee(a), e(a), a), c = n?.customFonts ?? [], u = n?.defaultFallbackFont ?? "Arial, sans-serif", d = n?.allowHtmlBlocks ?? !0, f = it(n?.socialIconsBaseUrl ?? w), p = n?.customBlocks === void 0 ? await ct(o, n?.renderCustomBlock) : await lt(o, n.customBlocks), m = ut(o, n?.getCustomBlockStylesheet, n?.customBlocks === void 0 ? void 0 : new Map(n.customBlocks.map((e) => [e.type, e]))), g = h(o.settings), _ = new de(o.settings.width, c, u, d, p, f, n?.blockRenderers ?? {}, g), v = st(o.blocks, d), y = _.resolveFontFamily(o.settings.fontFamily), b = /[<>]/.test(o.settings.backgroundColor) ? "transparent" : o.settings.backgroundColor, te = o.settings.textColor ? ` color="${O(o.settings.textColor)}"` : "", x = o.settings.linkColor ? k(o.settings.linkColor) : "inherit", ne = o.settings.linkUnderline ? "underline" : "none", S = v.map((e) => et(e, _)).filter((e) => e !== "").join("\n"), re = ot(c), ie = at(o.settings.preheaderText);
549
- return `<mjml lang="${O(o.settings.locale)}" dir="${O(g)}">
550
- <mj-head>${ie}
554
+ let r = n?.locale ?? t(e), i = u(e, r), a = n?.layout ? ae(u(n.layout, r, { missing: "default" }), i) : (ne(i), v(i), i), o = n?.customFonts ?? [], s = n?.defaultFallbackFont ?? "Arial, sans-serif", c = n?.allowHtmlBlocks ?? !0, l = ot(n?.socialIconsBaseUrl ?? C), d = n?.customBlocks === void 0 ? await lt(a, n?.renderCustomBlock) : await ut(a, n.customBlocks), f = dt(a, n?.getCustomBlockStylesheet, n?.customBlocks === void 0 ? void 0 : new Map(n.customBlocks.map((e) => [e.type, e]))), p = oe(a.settings), m = new w(a.settings.width, o, s, c, d, l, n?.blockRenderers ?? {}, p), h = Q(a.blocks, c), g = m.resolveFontFamily(a.settings.fontFamily), _ = /[<>]/.test(a.settings.backgroundColor) ? "transparent" : a.settings.backgroundColor, y = a.settings.textColor ? ` color="${D(a.settings.textColor)}"` : "", b = a.settings.linkColor ? O(a.settings.linkColor) : "inherit", x = a.settings.linkUnderline ? "underline" : "none", ee = h.map((e) => rt(e, m)).filter((e) => e !== "").join("\n"), te = ct(o), re = st(a.settings.preheaderText);
555
+ return `<mjml lang="${D(a.settings.locale)}" dir="${D(p)}">
556
+ <mj-head>${re}
551
557
  <mj-attributes>
552
- <mj-all font-family="${A(y)}" />
553
- <mj-text font-size="14px"${te} />
558
+ <mj-all font-family="${k(g)}" />
559
+ <mj-text font-size="14px"${y} />
554
560
  <mj-section padding="0" />
555
561
  <mj-column padding="0" />
556
- </mj-attributes>${re}
562
+ </mj-attributes>${te}
557
563
  <mj-style inline="inline">
558
- ${me(he(v), g)}
559
- ${Qe}
564
+ ${me(he(h), p)}
565
+ ${tt}
560
566
  </mj-style>
561
567
  <mj-style>
562
- a { color: ${x}; text-decoration: ${ne}; }
568
+ a { color: ${b}; text-decoration: ${x}; }
563
569
  @media only screen and (max-width: 480px) {
564
570
  .tpl-hide-mobile { display: none !important; mso-hide: all !important; }
565
571
  }
566
572
  @media only screen and (min-width: 481px) {
567
573
  .tpl-hide-desktop { display: none !important; mso-hide: all !important; }
568
574
  }
569
- </mj-style>${dt(m)}
575
+ </mj-style>${ft(f)}
570
576
  </mj-head>
571
- <mj-body width="${O(String(_.containerWidth))}px" background-color="${k(b)}">
572
- ${S}
577
+ <mj-body width="${D(String(m.containerWidth))}px" background-color="${O(_)}">
578
+ ${ee}
573
579
  </mj-body>
574
580
  </mjml>`;
575
581
  }
576
- function et(e, t) {
577
- if (a(e)) {
578
- let n = tt(t, e.styles.padding);
579
- return Z(e, nt(st(e.children, t.allowHtmlBlocks).map((e) => et(e, n)).filter((e) => e !== "").join("\n"), {
580
- backgroundColor: e.styles.backgroundColor,
581
- padding: e.styles.padding,
582
- borderRadius: e.borderRadius,
583
- backgroundImage: e.backgroundImage
584
- }, t.contentDirection));
582
+ function rt(t, r) {
583
+ if (e(t)) {
584
+ let e = Z(r, t.styles.padding);
585
+ return Y(t, it(Q(t.children, r.allowHtmlBlocks).map((t) => rt(t, e)).filter((e) => e !== "").join("\n"), {
586
+ backgroundColor: t.styles.backgroundColor,
587
+ padding: t.styles.padding,
588
+ borderRadius: t.borderRadius,
589
+ backgroundImage: t.backgroundImage
590
+ }, r.contentDirection));
585
591
  }
586
- if (C(e)) {
587
- let n = Q(e, e.wrapper ? tt(t, e.wrapper.padding) : t);
588
- return Z(e, e.wrapper && n !== "" ? nt(n, e.wrapper, t.contentDirection) : n);
592
+ if (n(t)) {
593
+ let e = X(t, t.wrapper ? Z(r, t.wrapper.padding) : r);
594
+ return Y(t, t.wrapper && e !== "" ? it(e, t.wrapper, r.contentDirection) : e);
589
595
  }
590
- return Z(e, rt(Q(e, t), t.contentDirection));
596
+ return Y(t, at(X(t, r), r.contentDirection));
591
597
  }
592
- function tt(e, t) {
598
+ function Z(e, t) {
593
599
  return e.withContainerWidth(e.containerWidth, Math.floor(e.contentWidth) - z(t));
594
600
  }
595
- function nt(e, t, n) {
596
- return `<mj-wrapper${R(t.backgroundColor, "native")}${U(t.backgroundImage)}${` padding="${t.padding ? L(t.padding) : "0"}"`}${H(t.borderRadius)}${n === "rtl" ? " direction=\"rtl\"" : ""}>
601
+ function it(e, t, n) {
602
+ return `<mj-wrapper${L(t.backgroundColor, "native")}${U(t.backgroundImage)}${` padding="${t.padding ? I(t.padding) : "0"}"`}${H(t.borderRadius)}${n === "rtl" ? " direction=\"rtl\"" : ""}>
597
603
  ${e}
598
604
  </mj-wrapper>`;
599
605
  }
600
- function rt(e, t) {
606
+ function at(e, t) {
601
607
  if (e === "") return "";
602
608
  let n = t === "rtl" ? " direction=\"rtl\"" : "";
603
609
  return `<mj-section${n}>
@@ -606,21 +612,21 @@ ${e}
606
612
  </mj-column>
607
613
  </mj-section>`;
608
614
  }
609
- function it(e) {
615
+ function ot(e) {
610
616
  return e.endsWith("/") ? e.slice(0, -1) : e;
611
617
  }
612
- function at(e) {
618
+ function st(e) {
613
619
  if (!e) return "";
614
620
  let t = e.trim();
615
- return t === "" ? "" : `\n <mj-preview>${D(t)}</mj-preview>`;
621
+ return t === "" ? "" : `\n <mj-preview>${E(t)}</mj-preview>`;
616
622
  }
617
- function ot(e) {
618
- return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${O(e.name)}" href="${O(e.url)}" />`).join("");
623
+ function ct(e) {
624
+ return e.length === 0 ? "" : e.map((e) => `\n <mj-font name="${D(e.name)}" href="${D(e.url)}" />`).join("");
619
625
  }
620
- function st(e, t) {
626
+ function Q(e, t) {
621
627
  return t ? e : e.filter((e) => e.type !== "html");
622
628
  }
623
- async function ct(e, t) {
629
+ async function lt(e, t) {
624
630
  let n = /* @__PURE__ */ new Map();
625
631
  if (!t) return n;
626
632
  let r = [];
@@ -629,7 +635,7 @@ async function ct(e, t) {
629
635
  for (let e = 0; e < r.length; e++) n.set(r[e].id, i[e]);
630
636
  return n;
631
637
  }
632
- async function lt(e, t) {
638
+ async function ut(e, t) {
633
639
  let n = /* @__PURE__ */ new Map(), r = [];
634
640
  if ($(e.blocks, r), r.length === 0) return n;
635
641
  let i;
@@ -638,9 +644,9 @@ async function lt(e, t) {
638
644
  } catch {
639
645
  throw Error("[Templatical] customBlocks requires the optional liquidjs package.");
640
646
  }
641
- let a = o(i), s = new Map(t.map((e) => [e.type, e])), c = await Promise.all(r.map(async (e) => {
647
+ let o = a(i), s = new Map(t.map((e) => [e.type, e])), c = await Promise.all(r.map(async (e) => {
642
648
  let t = s.get(e.customType);
643
- return t ? String(await a.parseAndRender(t.template, e.fieldValues)) : void 0;
649
+ return t ? String(await o.parseAndRender(t.template, e.fieldValues)) : void 0;
644
650
  }));
645
651
  for (let e = 0; e < r.length; e++) {
646
652
  let t = c[e];
@@ -648,12 +654,12 @@ async function lt(e, t) {
648
654
  }
649
655
  return n;
650
656
  }
651
- function $(e, t) {
652
- for (let n of e) if (b(n)) t.push(n);
653
- else if (C(n)) for (let e of n.children) $(e, t);
654
- else a(n) && $(n.children, t);
657
+ function $(t, r) {
658
+ for (let i of t) if (f(i)) r.push(i);
659
+ else if (n(i)) for (let e of i.children) $(e, r);
660
+ else e(i) && $(i.children, r);
655
661
  }
656
- function ut(e, t, n) {
662
+ function dt(e, t, n) {
657
663
  let r = [];
658
664
  if ($(e.blocks, r), r.length === 0) return [];
659
665
  let i = /* @__PURE__ */ new Map();
@@ -669,9 +675,9 @@ function ut(e, t, n) {
669
675
  }
670
676
  return s;
671
677
  }
672
- function dt(e) {
678
+ function ft(e) {
673
679
  return e.length === 0 ? "" : e.map((e) => `\n <mj-style>\n${e}\n </mj-style>`).join("");
674
680
  }
675
- export { Y as BUTTON_FULL_WIDTH_CSS_CLASS, w as DEFAULT_SOCIAL_ICONS_BASE_URL, W as RICH_TEXT_CSS_CLASS, de as RenderContext, P as UNRENDERABLE_MARKER_PREFIX, S as convertMergeTagsToValues, O as escapeAttr, D as escapeHtml, B as fluidOnMobileAttr, M as getCssClassAttr, N as getCssClasses, X as getWidthPercentages, Ge as getWidthPixels, j as isHiddenOnAll, Q as renderBlock, $e as renderToMjml, I as renderUnrenderableBlock, K as resolveParagraphGap, G as richTextGapClass, L as toPaddingString };
681
+ export { J as BUTTON_FULL_WIDTH_CSS_CLASS, C as DEFAULT_SOCIAL_ICONS_BASE_URL, W as RICH_TEXT_CSS_CLASS, w as RenderContext, N as UNRENDERABLE_MARKER_PREFIX, m as convertMergeTagsToValues, D as escapeAttr, E as escapeHtml, B as fluidOnMobileAttr, j as getCssClassAttr, M as getCssClasses, qe as getWidthPercentages, Je as getWidthPixels, A as isHiddenOnAll, X as renderBlock, nt as renderToMjml, F as renderUnrenderableBlock, K as resolveParagraphGap, G as richTextGapClass, I as toPaddingString };
676
682
 
677
- //# sourceMappingURL=src-B2tQbzf6.js.map
683
+ //# sourceMappingURL=src-UR3AQocX.js.map