@templatical/editor 0.48.0 → 0.50.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 (396) hide show
  1. package/README.md +4 -2
  2. package/dist/AiAltTextPopover-BZQ95GXL.js +106 -0
  3. package/dist/AiAltTextReview-DoBEudnE.js +206 -0
  4. package/dist/AiChatPanel-Bs6sES3b.js +550 -0
  5. package/dist/AiHeaderMenu-BEaTazx4.js +36 -0
  6. package/dist/AiPanels-CfN7A-ZA.js +33 -0
  7. package/dist/AiRewriteMenu-C3ZfDDYy.js +276 -0
  8. package/dist/{BlockIssueBadge-BShkuJis.js → BlockIssueBadge-CKwZ1Vgn.js} +11 -11
  9. package/dist/{BlockPreviewCanvas-tzAtDkXH.js → BlockPreviewCanvas-BXNLLLYi.js} +33 -33
  10. package/dist/CloudHeaderExtras-CsJMEiyN.js +23 -0
  11. package/dist/CloudPanels-B4F5m7vy.js +168 -0
  12. package/dist/CollaborationNotices-CNuDp7Y2.js +76 -0
  13. package/dist/CollaboratorBar-BtHPiuHq.js +123 -0
  14. package/dist/{CommentsPanel-DiWzYtnZ.js → CommentsPanel-CyCM-BvT.js} +4 -4
  15. package/dist/CommentsSidebar-Ca3DyFOX.js +500 -0
  16. package/dist/{cdn/chunks/CountdownBlock-Dasj191h.js → CountdownBlock-DR4Xm2-T.js} +24 -26
  17. package/dist/{CountdownToolbar-C4y3Ft7H.js → CountdownToolbar-CEIMPojJ.js} +56 -56
  18. package/dist/IssuesPanel-C8nMUccy.js +360 -0
  19. package/dist/{LoadingTrack-6XsqodoY.js → LoadingTrack-B0RKQWq3.js} +2 -2
  20. package/dist/{LogicTagInsertButton-B1_Wy0AN.js → LogicTagInsertButton-CqfU52CO.js} +272 -267
  21. package/dist/{cdn/chunks/MediaEditModal-zXfcArr4.js → MediaEditModal-DHtkZ4OU.js} +202 -186
  22. package/dist/{MediaPanels-9mDBv4aL.js → MediaPanels-CGcOB2pR.js} +4 -4
  23. package/dist/{MergeTagInput-fOewuF27.js → MergeTagInput-YnEkorTZ.js} +26 -26
  24. package/dist/{MergeTagModeToggle-BXamLcv7.js → MergeTagModeToggle-Dhb1DAcQ.js} +40 -40
  25. package/dist/MergeTagTextarea-e4lnwtqZ.js +70 -0
  26. package/dist/ParagraphEditor-B6NK0ytw.js +799 -0
  27. package/dist/{RestoreVersionDialog-BEKXx9xk.js → RestoreVersionDialog-Bq_IGOLJ.js} +22 -22
  28. package/dist/{RichTextEditorContent-D7kp7iig.js → RichTextEditorContent-AOM6fylS.js} +48 -48
  29. package/dist/{SaveBlockDialog-SJu0lecx.js → SaveBlockDialog-C8GngfQx.js} +88 -88
  30. package/dist/{cdn/chunks/SavedBlocksBrowserModal-CtnB58p_.js → SavedBlocksBrowserModal-wnkvxpm_.js} +102 -99
  31. package/dist/{SavedBlocksPanels-Dr5Fxx9Z.js → SavedBlocksPanels-C2s3q0pJ.js} +9 -9
  32. package/dist/{SavedBlocksPickBar-DnEWBZJy.js → SavedBlocksPickBar-BjcTiV87.js} +14 -14
  33. package/dist/TemplateSettings-BVBWpiDU.js +237 -0
  34. package/dist/{TestEmailModal-CbRY8HQx.js → TestEmailModal-SyhO9bn3.js} +57 -57
  35. package/dist/{TestEmailPanel-NAOmt3xi.js → TestEmailPanel-BDd2Rtav.js} +4 -4
  36. package/dist/{TitleEditor-Cc3DHbuN.js → TitleEditor-pxD53y_l.js} +75 -75
  37. package/dist/ToggleSwitch-D51U9cmR.js +37 -0
  38. package/dist/Toolbar-CZSPZYbj.js +3153 -0
  39. package/dist/{TplModal-Bz4-IZ9R.js → TplModal-DCzBzicE.js} +19 -19
  40. package/dist/{VersionHistoryMenu-CjV1d1zk.js → VersionHistoryMenu-BQeWPT85.js} +35 -35
  41. package/dist/{VersionHistoryPanels-BtwxrKJn.js → VersionHistoryPanels-BBm7YbRQ.js} +5 -5
  42. package/dist/{VersionPreviewBanner-BLAei1kj.js → VersionPreviewBanner-DUGF0tUJ.js} +10 -10
  43. package/dist/WrapperBlock-BO619LAb.js +45 -0
  44. package/dist/aiErrors-D5UOoYOt.js +41 -0
  45. package/dist/aiImageContext-BH4Ss1h3.js +48 -0
  46. package/dist/aiRewritePreview-DLGM05Ge.js +44 -0
  47. package/dist/{blockTypeIcons-CEDZytqP.js → blockTypeIcons-NzaYvAI4.js} +15 -14
  48. package/dist/bundle-stats.json +8 -8
  49. package/dist/{cdn/chunks/ca-CbNzJM3I.js → ca-C7mTzW1r.js} +147 -8
  50. package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js +107 -0
  51. package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js.map +1 -0
  52. package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js +207 -0
  53. package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js.map +1 -0
  54. package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js +476 -0
  55. package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js.map +1 -0
  56. package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js +37 -0
  57. package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js.map +1 -0
  58. package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js +34 -0
  59. package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js.map +1 -0
  60. package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js +208 -0
  61. package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +1 -0
  62. package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js → BlockIssueBadge-DAn2vsMJ.js} +13 -13
  63. package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js.map → BlockIssueBadge-DAn2vsMJ.js.map} +1 -1
  64. package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js → BlockPreviewCanvas-D0--EQkP.js} +39 -39
  65. package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js.map → BlockPreviewCanvas-D0--EQkP.js.map} +1 -1
  66. package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js +25 -0
  67. package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js.map +1 -0
  68. package/dist/cdn/chunks/{CloudPanels-awqHfJqC.js → CloudPanels-C3jsxo_f.js} +52 -100
  69. package/dist/cdn/chunks/CloudPanels-C3jsxo_f.js.map +1 -0
  70. package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js +78 -0
  71. package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js.map +1 -0
  72. package/dist/cdn/chunks/CollaboratorBar-Dfzm6A9A.js +72 -0
  73. package/dist/cdn/chunks/CollaboratorBar-Dfzm6A9A.js.map +1 -0
  74. package/dist/cdn/chunks/CommentsPanel-CSO79OeX.js +20 -0
  75. package/dist/cdn/chunks/{CommentsPanel-CbzxwsyI.js.map → CommentsPanel-CSO79OeX.js.map} +1 -1
  76. package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js +470 -0
  77. package/dist/cdn/chunks/{CommentsSidebar-DWPHZuQm.js.map → CommentsSidebar-CCvplq1Z.js.map} +1 -1
  78. package/dist/{CountdownBlock-zx39Dyby.js → cdn/chunks/CountdownBlock-C6USdwk3.js} +19 -17
  79. package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js.map → CountdownBlock-C6USdwk3.js.map} +1 -1
  80. package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js → CountdownToolbar-Cjud2Tos.js} +71 -71
  81. package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js.map → CountdownToolbar-Cjud2Tos.js.map} +1 -1
  82. package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js +340 -0
  83. package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js.map +1 -0
  84. package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js → LoadingTrack-BIcL4NiY.js} +2 -2
  85. package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js.map → LoadingTrack-BIcL4NiY.js.map} +1 -1
  86. package/dist/cdn/chunks/{LogicTagInsertButton-BMB9vShs.js → LogicTagInsertButton-CsL2JDOG.js} +374 -369
  87. package/dist/cdn/chunks/LogicTagInsertButton-CsL2JDOG.js.map +1 -0
  88. package/dist/{MediaEditModal-ByOvznRC.js → cdn/chunks/MediaEditModal-BuHCiyMu.js} +544 -560
  89. package/dist/cdn/chunks/MediaEditModal-BuHCiyMu.js.map +1 -0
  90. package/dist/cdn/chunks/MediaPanels-DAgUf_T1.js +45 -0
  91. package/dist/cdn/chunks/{MediaPanels-Cp4XB_dH.js.map → MediaPanels-DAgUf_T1.js.map} +1 -1
  92. package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js → MergeTagInput-C8U-7LxL.js} +34 -34
  93. package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js.map → MergeTagInput-C8U-7LxL.js.map} +1 -1
  94. package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js → MergeTagModeToggle-Mm-p0A52.js} +41 -41
  95. package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js.map → MergeTagModeToggle-Mm-p0A52.js.map} +1 -1
  96. package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js +72 -0
  97. package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js.map +1 -0
  98. package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js +634 -0
  99. package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js.map +1 -0
  100. package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js → RestoreVersionDialog-CdA5osuA.js} +26 -26
  101. package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js.map → RestoreVersionDialog-CdA5osuA.js.map} +1 -1
  102. package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js → RichTextEditorContent-Q1d2xqBT.js} +46 -46
  103. package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js.map → RichTextEditorContent-Q1d2xqBT.js.map} +1 -1
  104. package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js → SaveBlockDialog-CijargAy.js} +78 -78
  105. package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js.map → SaveBlockDialog-CijargAy.js.map} +1 -1
  106. package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +357 -0
  107. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CtnB58p_.js.map → SavedBlocksBrowserModal-DtOz_X5S.js.map} +1 -1
  108. package/dist/cdn/chunks/SavedBlocksPanels-BowyED5h.js +38 -0
  109. package/dist/cdn/chunks/{SavedBlocksPanels-BhEOMzEQ.js.map → SavedBlocksPanels-BowyED5h.js.map} +1 -1
  110. package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js → SavedBlocksPickBar-BPRaJBv3.js} +19 -19
  111. package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js.map → SavedBlocksPickBar-BPRaJBv3.js.map} +1 -1
  112. package/dist/cdn/chunks/TemplateSettings-ByZeBO34.js +209 -0
  113. package/dist/cdn/chunks/{TemplateSettings-BkkWTDHD.js.map → TemplateSettings-ByZeBO34.js.map} +1 -1
  114. package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js → TestEmailModal-BUVTj3Ic.js} +54 -54
  115. package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js.map → TestEmailModal-BUVTj3Ic.js.map} +1 -1
  116. package/dist/cdn/chunks/TestEmailPanel-BxutYoWg.js +35 -0
  117. package/dist/cdn/chunks/{TestEmailPanel-DxrKuctP.js.map → TestEmailPanel-BxutYoWg.js.map} +1 -1
  118. package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js +199 -0
  119. package/dist/cdn/chunks/{TitleEditor-CsZiG3TT.js.map → TitleEditor-Ccv6uoTz.js.map} +1 -1
  120. package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js +39 -0
  121. package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js.map +1 -0
  122. package/dist/cdn/chunks/{Toolbar-C_x2TfFk.js → Toolbar-DoprRgTn.js} +1097 -1101
  123. package/dist/cdn/chunks/Toolbar-DoprRgTn.js.map +1 -0
  124. package/dist/cdn/chunks/{TplModal-DC_eodTV.js → TplModal-BXQzmsJX.js} +21 -21
  125. package/dist/cdn/chunks/{TplModal-DC_eodTV.js.map → TplModal-BXQzmsJX.js.map} +1 -1
  126. package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js → VersionHistoryMenu-BF2fNCvq.js} +41 -41
  127. package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js.map → VersionHistoryMenu-BF2fNCvq.js.map} +1 -1
  128. package/dist/cdn/chunks/VersionHistoryPanels-Dal0Uk69.js +48 -0
  129. package/dist/cdn/chunks/{VersionHistoryPanels-DXSqmaLS.js.map → VersionHistoryPanels-Dal0Uk69.js.map} +1 -1
  130. package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js → VersionPreviewBanner-BaGcn-b1.js} +13 -13
  131. package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js.map → VersionPreviewBanner-BaGcn-b1.js.map} +1 -1
  132. package/dist/cdn/chunks/WrapperBlock-DkQJtLz0.js +47 -0
  133. package/dist/cdn/chunks/{WrapperBlock-gG_Bleug.js.map → WrapperBlock-DkQJtLz0.js.map} +1 -1
  134. package/dist/cdn/chunks/aiErrors-D5UOoYOt.js +43 -0
  135. package/dist/cdn/chunks/aiErrors-D5UOoYOt.js.map +1 -0
  136. package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js +50 -0
  137. package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js.map +1 -0
  138. package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js +46 -0
  139. package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js.map +1 -0
  140. package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js +22 -0
  141. package/dist/cdn/chunks/{blockTypeIcons-HrMJDfVg.js.map → blockTypeIcons-ikZAmd6U.js.map} +1 -1
  142. package/dist/{ca-CbNzJM3I.js → cdn/chunks/ca-C7mTzW1r.js} +149 -6
  143. package/dist/cdn/chunks/ca-C7mTzW1r.js.map +1 -0
  144. package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js +1408 -0
  145. package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js.map +1 -0
  146. package/dist/cdn/chunks/de-DBOTcDj2.js +22 -0
  147. package/dist/cdn/chunks/de-DBOTcDj2.js.map +1 -0
  148. package/dist/{de-DMquBpZM.js → cdn/chunks/de-DNuYQTmS.js} +149 -6
  149. package/dist/cdn/chunks/de-DNuYQTmS.js.map +1 -0
  150. package/dist/{dist-CUWI-IvA.js → cdn/chunks/dist-Bo8Thh8v.js} +60 -58
  151. package/dist/cdn/chunks/{dist-CjL6JHML.js.map → dist-Bo8Thh8v.js.map} +1 -1
  152. package/dist/cdn/chunks/dist-S-rLGqax.js +406 -0
  153. package/dist/cdn/chunks/{dist-MNQYSEWU.js.map → dist-S-rLGqax.js.map} +1 -1
  154. package/dist/cdn/chunks/{draggable-DrsNwZuB.js → draggable-DZ0gwUJ6.js} +1359 -1266
  155. package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +1 -0
  156. package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js → editor-modal-CI6EfeMd.js} +881 -881
  157. package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js.map → editor-modal-CI6EfeMd.js.map} +1 -1
  158. package/dist/cdn/chunks/en-CDhWRrF_.js +22 -0
  159. package/dist/cdn/chunks/en-CDhWRrF_.js.map +1 -0
  160. package/dist/{en-C8Mp71sO.js → cdn/chunks/en-CW71OK66.js} +149 -6
  161. package/dist/cdn/chunks/en-CW71OK66.js.map +1 -0
  162. package/dist/cdn/chunks/en-ifvu6oPv.js +1 -0
  163. package/dist/{es-Byq4tthI.js → cdn/chunks/es-DdK7zQfi.js} +149 -6
  164. package/dist/cdn/chunks/es-DdK7zQfi.js.map +1 -0
  165. package/dist/cdn/chunks/{extensions-hJ9VqzDc.js → extensions-taJTZlLK.js} +71 -71
  166. package/dist/cdn/chunks/{extensions-hJ9VqzDc.js.map → extensions-taJTZlLK.js.map} +1 -1
  167. package/dist/{fr-B3j35HEw.js → cdn/chunks/fr-Dz5Bgb7-.js} +149 -6
  168. package/dist/cdn/chunks/fr-Dz5Bgb7-.js.map +1 -0
  169. package/dist/cdn/chunks/{icons-aTYwH5-g.js → icons-DNX6StSs.js} +183 -150
  170. package/dist/cdn/chunks/icons-DNX6StSs.js.map +1 -0
  171. package/dist/{ja-D7txAuGS.js → cdn/chunks/ja-Di-zJiT8.js} +149 -6
  172. package/dist/cdn/chunks/ja-Di-zJiT8.js.map +1 -0
  173. package/dist/cdn/chunks/keys-BTpmg2Tt.js +12 -0
  174. package/dist/cdn/chunks/keys-BTpmg2Tt.js.map +1 -0
  175. package/dist/{logger-BBlvSn6q.js → cdn/chunks/logger-Tj0RPskW.js} +7 -1
  176. package/dist/cdn/chunks/logger-Tj0RPskW.js.map +1 -0
  177. package/dist/{nl-ClJ3BY3F.js → cdn/chunks/nl-CvVuHYFL.js} +149 -6
  178. package/dist/cdn/chunks/nl-CvVuHYFL.js.map +1 -0
  179. package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js +199 -0
  180. package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js.map +1 -0
  181. package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js → preRenderCustomBlocks-Dc-QLntG.js} +4 -4
  182. package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js.map → preRenderCustomBlocks-Dc-QLntG.js.map} +1 -1
  183. package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js +22 -0
  184. package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js.map +1 -0
  185. package/dist/{pt-BR-DibcXcmv.js → cdn/chunks/pt-BR-ZhO4vgyq.js} +149 -6
  186. package/dist/cdn/chunks/pt-BR-ZhO4vgyq.js.map +1 -0
  187. package/dist/cdn/chunks/{pusher-C8DeiO2X.js → pusher-Cs4GGEtd.js} +2 -2
  188. package/dist/cdn/chunks/pusher-Cs4GGEtd.js.map +1 -0
  189. package/dist/cdn/chunks/{rolldown-runtime-B0aSnxlc.js → rolldown-runtime-Y_bBpyJl.js} +1 -1
  190. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +62 -0
  191. package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +1 -0
  192. package/dist/cdn/chunks/socialIcons-BBvsTwCV.js +2032 -0
  193. package/dist/cdn/chunks/socialIcons-BBvsTwCV.js.map +1 -0
  194. package/dist/cdn/chunks/{src-DYCDeBDM.js → src-BNFnxfrA.js} +694 -329
  195. package/dist/cdn/chunks/src-BNFnxfrA.js.map +1 -0
  196. package/dist/cdn/chunks/{src-dZ4D_tuP.js → src-BcTUmgLe.js} +181 -181
  197. package/dist/cdn/chunks/src-BcTUmgLe.js.map +1 -0
  198. package/dist/cdn/chunks/src-Bs_yxk3h.js +4392 -0
  199. package/dist/cdn/chunks/src-Bs_yxk3h.js.map +1 -0
  200. package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +2 -4
  201. package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js.map → styleConstants-v1dNKgJf.js.map} +1 -1
  202. package/dist/cdn/chunks/{tiptap-BPigZk5G.js → tiptap-CtVrAViq.js} +44 -44
  203. package/dist/cdn/chunks/tiptap-CtVrAViq.js.map +1 -0
  204. package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js → useCloudI18n-AVXhzbhQ.js} +4 -4
  205. package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js.map → useCloudI18n-AVXhzbhQ.js.map} +1 -1
  206. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js +2586 -0
  207. package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +1 -0
  208. package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +10 -0
  209. package/dist/cdn/chunks/{useEditorRoot-CTc6O8al.js.map → useEditorRoot-CR5GjJD6.js.map} +1 -1
  210. package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js → useI18n-CbVubQhM.js} +3 -3
  211. package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js.map → useI18n-CbVubQhM.js.map} +1 -1
  212. package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js → useLogicTag-B49Nc53Y.js} +5 -5
  213. package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js.map → useLogicTag-B49Nc53Y.js.map} +1 -1
  214. package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js → useMergeTag-B0KryMj8.js} +7 -7
  215. package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js.map → useMergeTag-B0KryMj8.js.map} +1 -1
  216. package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js → usePopoverPosition-C829ps5i.js} +4 -4
  217. package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js.map → usePopoverPosition-C829ps5i.js.map} +1 -1
  218. package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js +51 -0
  219. package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js.map +1 -0
  220. package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js → withCurrentFont-DFPXeVfG.js} +2 -2
  221. package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js.map → withCurrentFont-DFPXeVfG.js.map} +1 -1
  222. package/dist/cdn/editor.css +1 -1
  223. package/dist/cdn/editor.js +2235 -1311
  224. package/dist/cdn/editor.js.map +1 -1
  225. package/dist/{check-ClwqRMgv.js → check-yYsp5Xpk.js} +1 -1
  226. package/dist/{chevron-down-te6qn-zE.js → chevron-down-DTmD06_j.js} +1 -1
  227. package/dist/{chevron-right-W2hbH1FM.js → chevron-right-BSeYZOxc.js} +1 -1
  228. package/dist/{chevron-up-Bf5Zo7o4.js → chevron-up-BOApwrxi.js} +1 -1
  229. package/dist/{circle-alert-CIEGV5DN.js → circle-alert-BMszY8im.js} +1 -1
  230. package/dist/{clock-Y4cx0gkJ.js → clock-HADxnl6-.js} +1 -1
  231. package/dist/createCloudRuntime-DVQI_ReU.js +1379 -0
  232. package/dist/{createLucideIcon-CYHXK9hn.js → createLucideIcon-0lYYH3EW.js} +6 -6
  233. package/dist/de-DBOTcDj2.js +20 -0
  234. package/dist/{cdn/chunks/de-DMquBpZM.js → de-DNuYQTmS.js} +147 -8
  235. package/dist/{cdn/chunks/dist-CjL6JHML.js → dist-C7EtxNCb.js} +49 -51
  236. package/dist/{dist-DuufrR8O.js → dist-C_dV9QAx.js} +130 -130
  237. package/dist/{cdn/chunks/dist-MNQYSEWU.js → dist-DI4_YSnG.js} +111 -110
  238. package/dist/{dist-tsmnQugO.js → dist-DtOF3bDW.js} +648 -294
  239. package/dist/{editor-modal-AlVLkU91.js → editor-modal-Bzhl-PgI.js} +832 -834
  240. package/dist/en-CDhWRrF_.js +20 -0
  241. package/dist/{cdn/chunks/en-C8Mp71sO.js → en-CW71OK66.js} +147 -8
  242. package/dist/en-DwV15ltA.js +1 -0
  243. package/dist/{cdn/chunks/es-Byq4tthI.js → es-DdK7zQfi.js} +147 -8
  244. package/dist/{extensions-pjO8VGkM.js → extensions-CdyweA50.js} +54 -54
  245. package/dist/{eye-Ddnz8nnm.js → eye-DWkSvYpj.js} +1 -1
  246. package/dist/{cdn/chunks/fr-B3j35HEw.js → fr-Dz5Bgb7-.js} +147 -8
  247. package/dist/image-DesWjcZ4.js +28 -0
  248. package/dist/index.d.ts +640 -48
  249. package/dist/{info-DXLmzoeY.js → info-ClWJGoZy.js} +1 -1
  250. package/dist/{cdn/chunks/ja-D7txAuGS.js → ja-Di-zJiT8.js} +147 -8
  251. package/dist/keys-Zd9KWRD1.js +10 -0
  252. package/dist/{link-Cel46wgo.js → link-BqRicFTA.js} +1 -1
  253. package/dist/{list-Cl0GwiV9.js → list-bojQr9bn.js} +1 -1
  254. package/dist/{loader-circle-uAwpvfys.js → loader-circle-B2B8LbUu.js} +1 -1
  255. package/dist/{cdn/chunks/logger-ByvdoAwq.js → logger-k9Nbj3Cp.js} +5 -3
  256. package/dist/{message-circle-DWU1pTM_.js → message-circle-BEuiNsyZ.js} +1 -1
  257. package/dist/{cdn/chunks/nl-ClJ3BY3F.js → nl-CvVuHYFL.js} +147 -8
  258. package/dist/normalizeMergeTagMarkup-P6SUBuPv.js +197 -0
  259. package/dist/{package-CbyG_yU_.js → package-DCROB4aM.js} +1 -1
  260. package/dist/{pencil-BzoDcwKu.js → pencil-CEotCKbf.js} +1 -1
  261. package/dist/{preRenderCustomBlocks-DMP5RuHl.js → preRenderCustomBlocks-D8rr61_z.js} +3 -3
  262. package/dist/pt-BR-CHM-ZKvE.js +20 -0
  263. package/dist/{cdn/chunks/pt-BR-DibcXcmv.js → pt-BR-ZhO4vgyq.js} +147 -8
  264. package/dist/{refresh-cw-9WinWixo.js → refresh-cw-C6M2mHNC.js} +12 -2
  265. package/dist/{runtime-dom.esm-bundler-lFF-QG3j.js → runtime-dom.esm-bundler-B8WCZWUm.js} +134 -134
  266. package/dist/sanitizeRichTextHtml-DeISfLFr.js +60 -0
  267. package/dist/{search-CqgGq1gG.js → search-Cy99zPYf.js} +1 -1
  268. package/dist/{send-Ceo3c9Db.js → send-BDLJFsf3.js} +1 -1
  269. package/dist/{smartphone-CcLaCpGK.js → smartphone-CVvQaNA4.js} +1 -1
  270. package/dist/socialIcons-Dd-jRiVe.js +2086 -0
  271. package/dist/{sparkles-Do9XjAuT.js → sparkles-Ce0Qz0ox.js} +1 -1
  272. package/dist/square-BWlolnXe.js +15 -0
  273. package/dist/style.css +1 -1
  274. package/dist/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +1 -3
  275. package/dist/templatical-editor.js +2272 -1327
  276. package/dist/{text-align-start-DvzC0HQA.js → text-align-start-D1V5gPTy.js} +1 -1
  277. package/dist/{trash-vlINTx32.js → trash-CZfiUFmw.js} +1 -1
  278. package/dist/{triangle-alert-MRYSJ9T2.js → triangle-alert-CFDzyFC7.js} +1 -1
  279. package/dist/upload-BJfvdIrD.js +36 -0
  280. package/dist/{useCloudI18n-Nwqo7pI_.js → useCloudI18n-Dcjua65H.js} +5 -5
  281. package/dist/{useEditorCore-PvErWWsp.js → useEditorCore-BTLeAVlM.js} +1534 -1549
  282. package/dist/{useEditorRoot-BD3piYtD.js → useEditorRoot-DUy67lJu.js} +2 -2
  283. package/dist/{useI18n-CxVEpurs.js → useI18n-BdoY7xDE.js} +4 -4
  284. package/dist/{useLogicTag-BHn67tDd.js → useLogicTag-DKLZ1T9H.js} +3 -3
  285. package/dist/{useMergeTag-CRkm5Ig6.js → useMergeTag-Bhdx7AKk.js} +5 -5
  286. package/dist/{usePopoverPosition-CwnH1o5g.js → usePopoverPosition-BZea45XK.js} +2 -2
  287. package/dist/useScrollToBlock-FmNMALM_.js +74 -0
  288. package/dist/{vue.runtime.esm-bundler-CAzmrXdD.js → vue.runtime.esm-bundler-DgFJ6GPG.js} +1182 -1087
  289. package/dist/{withCurrentFont-CxRGeHO3.js → withCurrentFont-BATJHNve.js} +1 -1
  290. package/dist/{x-Cd6SFw8r.js → x-CZ0Js0hA.js} +1 -1
  291. package/package.json +17 -15
  292. package/dist/AiChatSidebar-DxPHFNoT.js +0 -230
  293. package/dist/AiFeatureMenu-C8GVqu1d.js +0 -57
  294. package/dist/CloudHeaderExtras-CUSftQdm.js +0 -59
  295. package/dist/CloudPanels-Dgw7tb4R.js +0 -216
  296. package/dist/CollaboratorBar-5rfopCPx.js +0 -103
  297. package/dist/CommentsSidebar-BOqj16Al.js +0 -500
  298. package/dist/DesignReferenceSidebar-BWAi3eQQ.js +0 -279
  299. package/dist/IssuesPanel-C-x3I012.js +0 -117
  300. package/dist/ParagraphEditor-BVjOwwHx.js +0 -797
  301. package/dist/SavedBlocksBrowserModal-DbmIS5uK.js +0 -360
  302. package/dist/TemplateScoringPanel-ynbGl-sr.js +0 -273
  303. package/dist/TemplateSettings-Bi01S3H3.js +0 -246
  304. package/dist/ToggleSwitch-Ozc7YU38.js +0 -102
  305. package/dist/Toolbar-B-2lO0I8.js +0 -3156
  306. package/dist/WrapperBlock-D0qgNqjD.js +0 -45
  307. package/dist/cdn/chunks/AiChatSidebar-Dk0rJBQN.js +0 -205
  308. package/dist/cdn/chunks/AiChatSidebar-Dk0rJBQN.js.map +0 -1
  309. package/dist/cdn/chunks/AiFeatureMenu-B7b0w8ZS.js +0 -57
  310. package/dist/cdn/chunks/AiFeatureMenu-B7b0w8ZS.js.map +0 -1
  311. package/dist/cdn/chunks/CloudHeaderExtras-B4fhuwc_.js +0 -60
  312. package/dist/cdn/chunks/CloudHeaderExtras-B4fhuwc_.js.map +0 -1
  313. package/dist/cdn/chunks/CloudPanels-awqHfJqC.js.map +0 -1
  314. package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js +0 -52
  315. package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js.map +0 -1
  316. package/dist/cdn/chunks/CommentsPanel-CbzxwsyI.js +0 -20
  317. package/dist/cdn/chunks/CommentsSidebar-DWPHZuQm.js +0 -470
  318. package/dist/cdn/chunks/DesignReferenceSidebar-BW9cHnA9.js +0 -229
  319. package/dist/cdn/chunks/DesignReferenceSidebar-BW9cHnA9.js.map +0 -1
  320. package/dist/cdn/chunks/IssuesPanel-cXf9ywA4.js +0 -100
  321. package/dist/cdn/chunks/IssuesPanel-cXf9ywA4.js.map +0 -1
  322. package/dist/cdn/chunks/LogicTagInsertButton-BMB9vShs.js.map +0 -1
  323. package/dist/cdn/chunks/MediaEditModal-zXfcArr4.js.map +0 -1
  324. package/dist/cdn/chunks/MediaPanels-Cp4XB_dH.js +0 -45
  325. package/dist/cdn/chunks/ParagraphEditor-D4aq9eeC.js +0 -632
  326. package/dist/cdn/chunks/ParagraphEditor-D4aq9eeC.js.map +0 -1
  327. package/dist/cdn/chunks/SavedBlocksPanels-BhEOMzEQ.js +0 -38
  328. package/dist/cdn/chunks/TemplateScoringPanel-BrWqJCSP.js +0 -237
  329. package/dist/cdn/chunks/TemplateScoringPanel-BrWqJCSP.js.map +0 -1
  330. package/dist/cdn/chunks/TemplateSettings-BkkWTDHD.js +0 -208
  331. package/dist/cdn/chunks/TestEmailPanel-DxrKuctP.js +0 -35
  332. package/dist/cdn/chunks/TitleEditor-CsZiG3TT.js +0 -199
  333. package/dist/cdn/chunks/ToggleSwitch-BB-bQADJ.js +0 -104
  334. package/dist/cdn/chunks/ToggleSwitch-BB-bQADJ.js.map +0 -1
  335. package/dist/cdn/chunks/Toolbar-C_x2TfFk.js.map +0 -1
  336. package/dist/cdn/chunks/VersionHistoryPanels-DXSqmaLS.js +0 -48
  337. package/dist/cdn/chunks/WrapperBlock-gG_Bleug.js +0 -47
  338. package/dist/cdn/chunks/blockTypeIcons-HrMJDfVg.js +0 -22
  339. package/dist/cdn/chunks/ca-CbNzJM3I.js.map +0 -1
  340. package/dist/cdn/chunks/cloud-BHClP3e2.js +0 -1736
  341. package/dist/cdn/chunks/cloud-BHClP3e2.js.map +0 -1
  342. package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js +0 -400
  343. package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js.map +0 -1
  344. package/dist/cdn/chunks/de-DMquBpZM.js.map +0 -1
  345. package/dist/cdn/chunks/de-mMY5yQJu.js +0 -93
  346. package/dist/cdn/chunks/de-mMY5yQJu.js.map +0 -1
  347. package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +0 -1
  348. package/dist/cdn/chunks/en-C8Mp71sO.js.map +0 -1
  349. package/dist/cdn/chunks/en-ChVeGQBY.js +0 -93
  350. package/dist/cdn/chunks/en-ChVeGQBY.js.map +0 -1
  351. package/dist/cdn/chunks/en-eWpiXyZu.js +0 -1
  352. package/dist/cdn/chunks/es-Byq4tthI.js.map +0 -1
  353. package/dist/cdn/chunks/fr-B3j35HEw.js.map +0 -1
  354. package/dist/cdn/chunks/icons-aTYwH5-g.js.map +0 -1
  355. package/dist/cdn/chunks/ja-D7txAuGS.js.map +0 -1
  356. package/dist/cdn/chunks/keys-HI-INbkz.js +0 -12
  357. package/dist/cdn/chunks/keys-HI-INbkz.js.map +0 -1
  358. package/dist/cdn/chunks/logger-ByvdoAwq.js.map +0 -1
  359. package/dist/cdn/chunks/nl-ClJ3BY3F.js.map +0 -1
  360. package/dist/cdn/chunks/pt-BR-CoCwRUi0.js +0 -93
  361. package/dist/cdn/chunks/pt-BR-CoCwRUi0.js.map +0 -1
  362. package/dist/cdn/chunks/pt-BR-DibcXcmv.js.map +0 -1
  363. package/dist/cdn/chunks/pusher-C8DeiO2X.js.map +0 -1
  364. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js +0 -1279
  365. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js.map +0 -1
  366. package/dist/cdn/chunks/src-DYCDeBDM.js.map +0 -1
  367. package/dist/cdn/chunks/src-DlFlC9Tt.js +0 -1272
  368. package/dist/cdn/chunks/src-DlFlC9Tt.js.map +0 -1
  369. package/dist/cdn/chunks/src-dZ4D_tuP.js.map +0 -1
  370. package/dist/cdn/chunks/timeouts-Cv2jvusx.js +0 -6
  371. package/dist/cdn/chunks/timeouts-Cv2jvusx.js.map +0 -1
  372. package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +0 -1
  373. package/dist/cdn/chunks/useAliveFlag-DCB96vzR.js +0 -12
  374. package/dist/cdn/chunks/useAliveFlag-DCB96vzR.js.map +0 -1
  375. package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js +0 -2602
  376. package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js.map +0 -1
  377. package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +0 -10
  378. package/dist/cdn/chunks/useScrollToBlock-uUa601I4.js +0 -21
  379. package/dist/cdn/chunks/useScrollToBlock-uUa601I4.js.map +0 -1
  380. package/dist/cloud-B5xwm_4X.js +0 -1689
  381. package/dist/copy-BEcsAlfB.js +0 -19
  382. package/dist/createCloudRuntime-zNPkF6T9.js +0 -398
  383. package/dist/de-mMY5yQJu.js +0 -91
  384. package/dist/dist-DAAJogrx.js +0 -407
  385. package/dist/en-B0FUfNwz.js +0 -1
  386. package/dist/en-ChVeGQBY.js +0 -91
  387. package/dist/image-up-CM_HC0Dx.js +0 -27
  388. package/dist/keys-BKFq19a2.js +0 -10
  389. package/dist/plus-8cDvoCjZ.js +0 -14
  390. package/dist/pt-BR-CoCwRUi0.js +0 -91
  391. package/dist/shield-check-uDAwur5D.js +0 -14
  392. package/dist/socialIcons-PTiwhLoC.js +0 -1359
  393. package/dist/timeouts-Cv2jvusx.js +0 -4
  394. package/dist/upload-CtNOI6J2.js +0 -21
  395. package/dist/useAliveFlag-Dd06mRxe.js +0 -10
  396. package/dist/useScrollToBlock-CXmcHQQN.js +0 -47
@@ -58,12 +58,12 @@ var s = {
58
58
  "left",
59
59
  "center",
60
60
  "right"
61
- ], f = [
61
+ ], ee = [
62
62
  "top",
63
63
  "center",
64
64
  "bottom"
65
65
  ];
66
- function ee(e) {
66
+ function te(e) {
67
67
  return {
68
68
  url: e,
69
69
  size: "cover",
@@ -74,7 +74,7 @@ function ee(e) {
74
74
  repeat: !1
75
75
  };
76
76
  }
77
- function p(e) {
77
+ function ne(e) {
78
78
  let t = "";
79
79
  for (let n of e) {
80
80
  let e = n.charCodeAt(0);
@@ -82,35 +82,35 @@ function p(e) {
82
82
  }
83
83
  return t;
84
84
  }
85
- function m(e) {
85
+ function re(e) {
86
86
  let t = typeof e?.url == "string" ? e.url.trim() : "";
87
87
  if (!e || !t) return null;
88
- let n = u.includes(e.size) ? e.size : "cover", r = e.position, i = r && d.includes(r.x) ? r.x : "center", a = r && f.includes(r.y) ? r.y : "center";
88
+ let n = u.includes(e.size) ? e.size : "cover", r = e.position, i = r && d.includes(r.x) ? r.x : "center", a = r && ee.includes(r.y) ? r.y : "center";
89
89
  return {
90
- url: p(t),
90
+ url: ne(t),
91
91
  size: n,
92
92
  position: `${i} ${a}`,
93
93
  repeat: e.repeat ? "repeat" : "no-repeat"
94
94
  };
95
95
  }
96
- var te = [
96
+ var ie = [
97
97
  "top",
98
98
  "middle",
99
99
  "bottom"
100
100
  ];
101
- function ne(e) {
101
+ function ae(e) {
102
102
  let t = e.hero;
103
103
  if (!t || typeof t != "object") return null;
104
104
  if (e.columns !== "1") return {
105
105
  applied: !1,
106
106
  reason: "columns"
107
107
  };
108
- let n = m(e.backgroundImage);
108
+ let n = re(e.backgroundImage);
109
109
  if (n === null) return {
110
110
  applied: !1,
111
111
  reason: "image"
112
112
  };
113
- let r = ie(e.backgroundImage), i = re(t.height) ? Math.round(t.height) : "image";
113
+ let r = se(e.backgroundImage), i = oe(t.height) ? Math.round(t.height) : "image";
114
114
  return i === "image" && r === null ? {
115
115
  applied: !1,
116
116
  reason: "size"
@@ -118,18 +118,18 @@ function ne(e) {
118
118
  applied: !0,
119
119
  image: n,
120
120
  height: i,
121
- verticalAlign: te.includes(t.verticalAlign) ? t.verticalAlign : "middle",
121
+ verticalAlign: ie.includes(t.verticalAlign) ? t.verticalAlign : "middle",
122
122
  aspectRatio: r
123
123
  };
124
124
  }
125
- function re(e) {
125
+ function oe(e) {
126
126
  return typeof e == "number" && Number.isFinite(e) && e >= 1;
127
127
  }
128
- function ie(e) {
128
+ function se(e) {
129
129
  let t = e?.naturalWidth, n = e?.naturalHeight;
130
130
  return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0 ? null : n / t;
131
131
  }
132
- var ae = {
132
+ var ce = {
133
133
  facebook: {
134
134
  color: "#1877F2",
135
135
  path: "M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"
@@ -198,52 +198,427 @@ var ae = {
198
198
  color: "#1769FF",
199
199
  path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
200
200
  }
201
- }, h = {
201
+ }, f = {
202
202
  dark: "#1f1f1f",
203
203
  light: "#ffffff"
204
204
  };
205
- function oe(e) {
205
+ function le(e) {
206
206
  return e === "dark" || e === "light" ? e : void 0;
207
207
  }
208
- function se(e, t) {
209
- let n = oe(t);
208
+ function ue(e, t) {
209
+ let n = le(t);
210
210
  return {
211
- fill: n ? h[n] : ae[e].color,
212
- onFill: n === "light" ? h.dark : "#ffffff"
211
+ fill: n ? f[n] : ce[e].color,
212
+ onFill: n === "light" ? f.dark : "#ffffff"
213
213
  };
214
214
  }
215
- function ce(e, t) {
216
- if (oe(t) === "dark" && (e === "plain" || e === "outlined")) return {
217
- color: h.light,
215
+ function de(e, t) {
216
+ if (le(t) === "dark" && (e === "plain" || e === "outlined")) return {
217
+ color: f.light,
218
218
  opacity: .6,
219
219
  width: 1.4
220
220
  };
221
221
  }
222
- function le(e) {
222
+ function fe(e) {
223
223
  return e === "plain" ? .84 : .6;
224
224
  }
225
- function g(e) {
225
+ function p(e) {
226
+ let t = [];
227
+ return JSON.parse(JSON.stringify(e, function(e, n) {
228
+ if (typeof n != "object" || !n) return n;
229
+ for (; t.length > 0 && t[t.length - 1] !== this;) t.pop();
230
+ if (!t.includes(n)) return t.push(n), n;
231
+ }));
232
+ }
233
+ function pe(e) {
234
+ return typeof e == "object" && !!e && !Array.isArray(e);
235
+ }
236
+ function m(e, t) {
237
+ if (e === t) return !0;
238
+ if (Array.isArray(e)) return !Array.isArray(t) || e.length !== t.length ? !1 : e.every((e, n) => m(e, t[n]));
239
+ if (pe(e)) {
240
+ if (!pe(t)) return !1;
241
+ let n = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
242
+ for (let r of n) if ((e[r] !== void 0 || t[r] !== void 0) && !m(e[r], t[r])) return !1;
243
+ return !0;
244
+ }
245
+ return !1;
246
+ }
247
+ var h = class extends Error {
248
+ code;
249
+ opIndex;
250
+ blockId;
251
+ constructor(e, t, n, r) {
252
+ super(n), this.name = "OperationError", this.code = e, this.opIndex = t, r !== void 0 && (this.blockId = r);
253
+ }
254
+ };
255
+ function me(e) {
256
+ return e === "1" ? 1 : e === "3" ? 3 : 2;
257
+ }
258
+ function he(e, t, n = {}) {
259
+ let r = p(e);
260
+ return g(r, t, n), r;
261
+ }
262
+ function g(e, t, n = {}) {
263
+ let r = {
264
+ locks: n.locks ?? [],
265
+ session: n.session ?? null
266
+ };
267
+ t.forEach((t, n) => Ce(e, t, n, r));
268
+ }
269
+ var ge = /* @__PURE__ */ new Set([
270
+ "id",
271
+ "type",
272
+ "children"
273
+ ]), _e = /* @__PURE__ */ new Set();
274
+ function _(e, t, n, r) {
275
+ throw new h(e, t, n, r);
276
+ }
277
+ function v(e) {
278
+ return typeof e == "object" && !!e && !Array.isArray(e);
279
+ }
280
+ function y(e) {
226
281
  return e.type === "section";
227
282
  }
228
- function ue(e) {
283
+ function ve(e) {
284
+ return Array.isArray(e.blocks) ? e.blocks : [];
285
+ }
286
+ function ye(e) {
287
+ let t = e.children;
288
+ return Array.isArray(t) ? t.map((e) => Array.isArray(e) ? e : []) : [];
289
+ }
290
+ function b(e, t) {
291
+ let n = ve(e);
292
+ for (let e = 0; e < n.length; e++) {
293
+ let r = n[e];
294
+ if (!v(r)) continue;
295
+ if (r.id === t) return {
296
+ block: r,
297
+ list: n,
298
+ index: e,
299
+ parent: null
300
+ };
301
+ if (!y(r) || typeof r.id != "string") continue;
302
+ let i = r.children;
303
+ if (Array.isArray(i)) for (let e = 0; e < i.length; e++) {
304
+ let n = i[e];
305
+ if (Array.isArray(n)) for (let i = 0; i < n.length; i++) {
306
+ let a = n[i];
307
+ if (v(a) && a.id === t) return {
308
+ block: a,
309
+ list: n,
310
+ index: i,
311
+ parent: {
312
+ sectionId: r.id,
313
+ column: e
314
+ }
315
+ };
316
+ }
317
+ }
318
+ }
319
+ return null;
320
+ }
321
+ function x(e) {
322
+ let t = typeof e.id == "string" ? [e.id] : [];
323
+ if (y(e)) for (let n of ye(e)) t.push(...be(n));
324
+ return t;
325
+ }
326
+ function be(e) {
327
+ return e.flatMap((e) => v(e) ? x(e) : []);
328
+ }
329
+ function S(e, t) {
330
+ return typeof e.blockId != "string" || e.blockId === "" ? _("invalid_operation", t, "blockId must be a block id.") : e.blockId;
331
+ }
332
+ function xe(e, t) {
333
+ let n = e.parent;
334
+ return n === null ? null : v(n) && typeof n.sectionId == "string" && typeof n.column == "number" && Number.isInteger(n.column) ? {
335
+ sectionId: n.sectionId,
336
+ column: n.column
337
+ } : _("invalid_operation", t, "parent must be null or { \"sectionId\", \"column\" }.");
338
+ }
339
+ function C(e, t) {
340
+ let n = e.after;
341
+ return n === null ? null : typeof n == "string" && n !== "" ? n : _("invalid_operation", t, "after must be null or a block id.");
342
+ }
343
+ function w(e, t) {
344
+ let n = e.expect;
345
+ return n == null ? null : v(n) ? n : _("invalid_operation", t, "expect must be an object.");
346
+ }
347
+ function T(e, t, n) {
348
+ let r = e.set ?? null, i = e.unset ?? [];
349
+ (r !== null && !v(r) || !Array.isArray(i) || !i.every((e) => typeof e == "string")) && _("invalid_operation", t, "set must be an object and unset a list of keys.");
350
+ let a = r === null ? {} : r, o = Object.keys(a).filter((e) => a[e] !== void 0);
351
+ o.length === 0 && i.length === 0 && _("invalid_operation", t, "Set or unset at least one key.");
352
+ for (let e of [...o, ...i]) n.has(e) && _("invalid_operation", t, `"${e}" can't be set or unset.`);
353
+ let s = i.find((e) => o.includes(e));
354
+ return s !== void 0 && _("invalid_operation", t, `"${s}" is both set and unset.`), {
355
+ set: Object.fromEntries(o.map((e) => [e, a[e]])),
356
+ unset: i
357
+ };
358
+ }
359
+ function E(e, t, n) {
360
+ if ((!v(e) || typeof e.id != "string" || e.id === "" || typeof e.type != "string") && _("invalid_operation", t, "A block needs a non-empty string id and a string type."), !y(e)) return;
361
+ n && _("invalid_operation", t, "Sections can only be placed at the top level.");
362
+ let r = e.children;
363
+ (!Array.isArray(r) || !r.every((e) => Array.isArray(e))) && _("invalid_operation", t, "A section needs children: a list of columns, each a list of blocks.");
364
+ for (let e of r) for (let n of e) E(n, t, !0);
365
+ }
366
+ function D(e, t) {
367
+ return e.session === null || t.sessionId !== e.session;
368
+ }
369
+ function O(e, t, n) {
370
+ let r = e.locks.find((n) => t.includes(n.blockId) && D(e, n));
371
+ r && _("lock_held", n, `Block "${r.blockId}" is being edited in another session.`, r.blockId);
372
+ }
373
+ function k(e, t, n, r) {
374
+ for (let [i, a] of Object.entries(t)) a !== void 0 && (m(Object.hasOwn(e, i) && e[i] !== void 0 ? e[i] : null, a) || _("precondition_failed", n, r === void 0 ? `Setting "${i}" has changed since.` : `"${i}" of block "${r}" has changed since.`, r));
375
+ }
376
+ function A(e, t, n) {
377
+ if (t === null) return Array.isArray(e.blocks) || (e.blocks = []), e.blocks;
378
+ let r = b(e, t.sectionId);
379
+ if (!r) return _("block_missing", n, `No section with id "${t.sectionId}".`, t.sectionId);
380
+ if (!y(r.block)) return _("invalid_operation", n, `Block "${t.sectionId}" isn't a section.`);
381
+ let i = r.block.children;
382
+ return !Array.isArray(i) || t.column < 0 || t.column >= i.length ? _("invalid_operation", n, `Section "${t.sectionId}" has no column ${t.column}.`) : (Array.isArray(i[t.column]) || (i[t.column] = []), i[t.column]);
383
+ }
384
+ function j(e, t, n) {
385
+ if (t === null) return 0;
386
+ let r = e.findIndex((e) => v(e) && e.id === t);
387
+ return r === -1 ? _("anchor_missing", n, `No block "${t}" in the target container.`, t) : r + 1;
388
+ }
389
+ function Se(e, t, n, r) {
390
+ let i = me(t), a = Array.isArray(e.children) ? e.children : [];
391
+ for (let e = i; e < a.length; e++) {
392
+ let t = a[e];
393
+ Array.isArray(t) && t.length > 0 && _("invalid_operation", n, `Column ${e} of section "${r}" still holds blocks, so the layout can't drop it.`);
394
+ }
395
+ let o = a.slice(0, i);
396
+ for (; o.length < i;) o.push([]);
397
+ e.children = o;
398
+ }
399
+ function M(e, t, n) {
400
+ for (let [n, r] of Object.entries(t)) n === "__proto__" ? Object.defineProperty(e, n, {
401
+ value: p(r),
402
+ writable: !0,
403
+ enumerable: !0,
404
+ configurable: !0
405
+ }) : e[n] = p(r);
406
+ for (let t of n) delete e[t];
407
+ }
408
+ function Ce(e, t, n, r) {
409
+ let i = t;
410
+ switch ((!v(i) || typeof i.op != "string") && _("invalid_operation", n, "Each operation must be an object with an \"op\"."), i.op) {
411
+ case "addBlock": return we(e, i, n);
412
+ case "moveBlock": return Te(e, i, n, r);
413
+ case "deleteBlock": return Ee(e, i, n, r);
414
+ case "updateBlock": return De(e, i, n, r);
415
+ case "updateSettings": return Oe(e, i, n);
416
+ case "setContent": return ke(e, i, n, r);
417
+ default: _("invalid_operation", n, `Unknown operation "${i.op}".`);
418
+ }
419
+ }
420
+ function we(e, t, n) {
421
+ let r = xe(t, n), i = C(t, n), a = t.block;
422
+ E(a, n, r !== null);
423
+ let o = new Set(be(ve(e))), s = /* @__PURE__ */ new Set();
424
+ for (let e of x(a)) (o.has(e) || s.has(e)) && _("block_exists", n, `A block with id "${e}" already exists.`, e), s.add(e);
425
+ let c = A(e, r, n);
426
+ c.splice(j(c, i, n), 0, p(a));
427
+ }
428
+ function Te(e, t, n, r) {
429
+ let i = S(t, n), a = xe(t, n), o = C(t, n), s = w(t, n), c = b(e, i);
430
+ if (!c) return _("block_missing", n, `No block with id "${i}".`, i);
431
+ if (O(r, x(c.block), n), s) {
432
+ let e = c.index > 0 ? c.list[c.index - 1] : null, t = v(e) ? e.id ?? null : null;
433
+ (!m(c.parent, s.parent ?? null) || !m(t, s.after ?? null)) && _("precondition_failed", n, `Block "${i}" has moved since.`, i);
434
+ }
435
+ y(c.block) && a !== null && _("invalid_operation", n, "Sections can only be placed at the top level."), o === i && _("invalid_operation", n, "A block can't be placed after itself.");
436
+ let l = A(e, a, n);
437
+ c.list.splice(c.index, 1), l.splice(j(l, o, n), 0, c.block);
438
+ }
439
+ function Ee(e, t, n, r) {
440
+ let i = S(t, n), a = w(t, n), o = b(e, i);
441
+ if (!o) return _("block_missing", n, `No block with id "${i}".`, i);
442
+ O(r, x(o.block), n), a && !m(o.block, a.block ?? null) && _("precondition_failed", n, `Block "${i}" has changed since.`, i), o.list.splice(o.index, 1);
443
+ }
444
+ function De(e, t, n, r) {
445
+ let i = S(t, n), { set: a, unset: o } = T(t, n, ge), s = w(t, n), c = b(e, i);
446
+ if (!c) return _("block_missing", n, `No block with id "${i}".`, i);
447
+ let l = c.block, u = y(l);
448
+ u && o.includes("columns") && _("invalid_operation", n, "A section's columns can't be unset; set another layout instead."), O(r, [i], n), s && k(l, s, n, i), u && Object.hasOwn(a, "columns") && Se(l, a.columns, n, i), M(l, a, o);
449
+ }
450
+ function Oe(e, t, n) {
451
+ let { set: r, unset: i } = T(t, n, _e), a = w(t, n);
452
+ v(e.settings) || (e.settings = {});
453
+ let o = e.settings;
454
+ a && k(o, a, n), M(o, r, i);
455
+ }
456
+ function ke(e, t, n, r) {
457
+ let i = t.content;
458
+ if (!v(i) || !Array.isArray(i.blocks) || !v(i.settings)) return _("invalid_operation", n, "setContent needs content with a blocks array and a settings object.");
459
+ let a = r.locks.find((e) => D(r, e));
460
+ a && _("locked_by_others", n, "Other sessions hold locks on this template.", a.blockId), e.blocks = p(i.blocks), e.settings = p(i.settings);
461
+ }
462
+ function Ae(e) {
463
+ let t = e.children;
464
+ return e.type === "section" && Array.isArray(t) ? t : [];
465
+ }
466
+ function N(e, t, n = null) {
467
+ for (let r = 0; r < e.length; r++) {
468
+ let i = e[r];
469
+ if (i.id === t) return {
470
+ block: i,
471
+ parent: n,
472
+ after: r > 0 ? e[r - 1].id : null
473
+ };
474
+ let a = Ae(i);
475
+ for (let e = 0; e < a.length; e++) {
476
+ if (!Array.isArray(a[e])) continue;
477
+ let n = N(a[e], t, {
478
+ sectionId: i.id,
479
+ column: e
480
+ });
481
+ if (n) return n;
482
+ }
483
+ }
484
+ return null;
485
+ }
486
+ function P(e, t, n) {
487
+ let r = N(e.blocks, t);
488
+ if (!r) throw new h("block_missing", n, `No block with id "${t}".`, t);
489
+ return r;
490
+ }
491
+ function F(e, t, n) {
492
+ let r = {}, i = [], a = {}, o = [.../* @__PURE__ */ new Set([...Object.keys(t ?? {}), ...n ?? []])];
493
+ for (let n of o) {
494
+ let o = e[n];
495
+ o === void 0 ? i.push(n) : r[n] = p(o);
496
+ let s = t && n in t ? t[n] : void 0;
497
+ a[n] = s === void 0 ? null : p(s);
498
+ }
499
+ return {
500
+ set: r,
501
+ unset: i,
502
+ expect: a
503
+ };
504
+ }
505
+ function je(e, t, n) {
506
+ switch (t.op) {
507
+ case "addBlock": return {
508
+ op: "deleteBlock",
509
+ blockId: t.block.id,
510
+ expect: { block: p(t.block) }
511
+ };
512
+ case "deleteBlock": {
513
+ let r = P(e, t.blockId, n);
514
+ return {
515
+ op: "addBlock",
516
+ block: p(r.block),
517
+ parent: r.parent,
518
+ after: r.after
519
+ };
520
+ }
521
+ case "moveBlock": {
522
+ let r = P(e, t.blockId, n);
523
+ return {
524
+ op: "moveBlock",
525
+ blockId: t.blockId,
526
+ parent: r.parent,
527
+ after: r.after,
528
+ expect: {
529
+ parent: t.parent,
530
+ after: t.after
531
+ }
532
+ };
533
+ }
534
+ case "updateBlock": {
535
+ let r = P(e, t.blockId, n).block, { set: i, unset: a, expect: o } = F(r, t.set, t.unset);
536
+ return {
537
+ op: "updateBlock",
538
+ blockId: t.blockId,
539
+ ...Object.keys(i).length > 0 ? { set: i } : {},
540
+ ...a.length > 0 ? { unset: a } : {},
541
+ expect: o
542
+ };
543
+ }
544
+ case "updateSettings": {
545
+ let { set: n, unset: r, expect: i } = F(e.settings, t.set, t.unset);
546
+ return {
547
+ op: "updateSettings",
548
+ ...Object.keys(n).length > 0 ? { set: n } : {},
549
+ ...r.length > 0 ? { unset: r } : {},
550
+ expect: i
551
+ };
552
+ }
553
+ case "setContent": return {
554
+ op: "setContent",
555
+ content: {
556
+ blocks: p(e.blocks),
557
+ settings: p(e.settings)
558
+ }
559
+ };
560
+ }
561
+ }
562
+ function Me(e, t) {
563
+ let n = p(e), r = [];
564
+ return t.forEach((e, t) => {
565
+ r.push(je(n, e, t));
566
+ try {
567
+ g(n, [e]);
568
+ } catch (e) {
569
+ throw e instanceof h ? new h(e.code, t, e.message, e.blockId) : e;
570
+ }
571
+ }), r.reverse();
572
+ }
573
+ var Ne = class extends Error {
574
+ statusCode;
575
+ code;
576
+ constructor(e, t, n, r) {
577
+ super(e), this.statusCode = t, this.code = n, this.name = "SdkError", r !== void 0 && Object.keys(r).length > 0 && (this.details = r);
578
+ }
579
+ get isNotFound() {
580
+ return this.statusCode === 404;
581
+ }
582
+ get isUnauthorized() {
583
+ return this.statusCode === 401;
584
+ }
585
+ get isServerError() {
586
+ return this.statusCode !== void 0 && this.statusCode >= 500;
587
+ }
588
+ };
589
+ function Pe(e) {
590
+ return e === "invalid_operation" ? 422 : e === "content_too_large" ? 413 : 409;
591
+ }
592
+ var Fe = class extends Ne {
593
+ opIndex;
594
+ holder;
595
+ holders;
596
+ constructor(e, t) {
597
+ super(e, t.status ?? Pe(t.code), t.code), this.name = "CollaborationConflict", t.opIndex !== void 0 && (this.opIndex = t.opIndex), t.holder !== void 0 && (this.holder = t.holder), t.holders !== void 0 && (this.holders = t.holders);
598
+ }
599
+ };
600
+ function I(e) {
601
+ return e.type === "section";
602
+ }
603
+ function Ie(e) {
229
604
  return e.type === "custom";
230
605
  }
231
- function _(e) {
606
+ function L(e) {
232
607
  return e.type === "slot";
233
608
  }
234
- function v(e) {
609
+ function R(e) {
235
610
  return e.type === "wrapper";
236
611
  }
237
- var de = {
612
+ var Le = {
238
613
  content: "<p>Enter your title</p>",
239
614
  level: 2,
240
615
  textAlign: "left"
241
- }, fe = { content: "<p>Enter your text here</p>" }, pe = {
616
+ }, Re = { content: "<p>Enter your text here</p>" }, ze = {
242
617
  src: "",
243
618
  alt: "",
244
619
  width: "full",
245
620
  align: "center"
246
- }, me = {
621
+ }, Be = {
247
622
  text: "Click Here",
248
623
  url: "",
249
624
  backgroundColor: "#333333",
@@ -257,36 +632,36 @@ var de = {
257
632
  left: 24
258
633
  },
259
634
  align: "center"
260
- }, he = {
635
+ }, Ve = {
261
636
  lineStyle: "solid",
262
637
  color: "#e0e0e0",
263
638
  thickness: 1,
264
639
  width: "full"
265
- }, y = { columns: "1" }, b = {
640
+ }, He = { columns: "1" }, Ue = {
266
641
  url: "",
267
642
  thumbnailUrl: "",
268
643
  alt: "Video",
269
644
  width: "full",
270
645
  align: "center"
271
- }, x = {
646
+ }, We = {
272
647
  iconStyle: "solid",
273
648
  iconSize: "medium",
274
649
  spacing: 10,
275
650
  align: "center"
276
- }, S = { height: 24 }, C = { content: "" }, w = {
651
+ }, Ge = { height: 24 }, Ke = { content: "" }, qe = {
277
652
  fontSize: 15,
278
653
  textAlign: "center",
279
654
  separator: "|",
280
655
  separatorColor: "#e0e0e0",
281
656
  spacing: 10
282
- }, T = {
657
+ }, Je = {
283
658
  hasHeaderRow: !0,
284
659
  borderColor: "#e0e0e0",
285
660
  borderWidth: 1,
286
661
  cellPadding: 8,
287
662
  fontSize: 15,
288
663
  textAlign: "left"
289
- }, E = {
664
+ }, z = {
290
665
  targetDate: "",
291
666
  timezone: "UTC",
292
667
  showDays: !0,
@@ -306,21 +681,21 @@ var de = {
306
681
  expiredMessage: "This offer has expired",
307
682
  expiredImageUrl: "",
308
683
  hideOnExpiry: !1
309
- }, ge = {
310
- title: de,
311
- paragraph: fe,
312
- image: pe,
313
- button: me,
314
- divider: he,
315
- section: y,
316
- video: b,
317
- social: x,
318
- spacer: S,
319
- html: C,
320
- menu: w,
321
- table: T,
322
- countdown: E
323
- }, D = {
684
+ }, Ye = {
685
+ title: Le,
686
+ paragraph: Re,
687
+ image: ze,
688
+ button: Be,
689
+ divider: Ve,
690
+ section: He,
691
+ video: Ue,
692
+ social: We,
693
+ spacer: Ge,
694
+ html: Ke,
695
+ menu: qe,
696
+ table: Je,
697
+ countdown: z
698
+ }, Xe = {
324
699
  width: 600,
325
700
  backgroundColor: "#ffffff",
326
701
  textColor: "#1a1a1a",
@@ -328,28 +703,28 @@ var de = {
328
703
  fontFamily: "Arial",
329
704
  locale: "en"
330
705
  };
331
- function O(e) {
706
+ function Ze(e) {
332
707
  return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
333
708
  }
334
- function k(e, t) {
709
+ function B(e, t) {
335
710
  let n = { ...e };
336
711
  for (let r of Object.keys(t)) {
337
712
  let i = e[r], a = t[r];
338
- a !== void 0 && (n[r] = O(i) && O(a) ? k(i, a) : a);
713
+ a !== void 0 && (n[r] = Ze(i) && Ze(a) ? B(i, a) : a);
339
714
  }
340
715
  return n;
341
716
  }
342
- function _e(e = "Arial", t) {
717
+ function Qe(e = "Arial", t) {
343
718
  return {
344
719
  blocks: [],
345
720
  settings: {
346
- ...D,
721
+ ...Xe,
347
722
  fontFamily: e,
348
723
  ...t
349
724
  }
350
725
  };
351
726
  }
352
- var ve = [
727
+ var $e = [
353
728
  "ar",
354
729
  "he",
355
730
  "iw",
@@ -363,32 +738,24 @@ var ve = [
363
738
  "ckb",
364
739
  "ks"
365
740
  ];
366
- function ye(e) {
741
+ function et(e) {
367
742
  let t = e?.trim().replace(/_/g, "-").split("-")[0]?.toLowerCase();
368
- return !!t && ve.includes(t);
369
- }
370
- function be(e) {
371
- return e.direction === "ltr" || e.direction === "rtl" ? e.direction : ye(e.locale) ? "rtl" : "ltr";
743
+ return !!t && $e.includes(t);
372
744
  }
373
- function A(e) {
374
- let t = [];
375
- return JSON.parse(JSON.stringify(e, function(e, n) {
376
- if (typeof n != "object" || !n) return n;
377
- for (; t.length > 0 && t[t.length - 1] !== this;) t.pop();
378
- if (!t.includes(n)) return t.push(n), n;
379
- }));
745
+ function tt(e) {
746
+ return e.direction === "ltr" || e.direction === "rtl" ? e.direction : et(e.locale) ? "rtl" : "ltr";
380
747
  }
381
- function j(e, t) {
382
- let n = A(e);
383
- return !t || Object.keys(t).length === 0 ? n : k(n, t);
748
+ function V(e, t) {
749
+ let n = p(e);
750
+ return !t || Object.keys(t).length === 0 ? n : B(n, t);
384
751
  }
385
- function M(e) {
386
- return e === void 0 ? void 0 : A(e);
752
+ function H(e) {
753
+ return e === void 0 ? void 0 : p(e);
387
754
  }
388
- function N() {
755
+ function U() {
389
756
  return crypto.randomUUID();
390
757
  }
391
- function xe(e = 0) {
758
+ function nt(e = 0) {
392
759
  return {
393
760
  top: e,
394
761
  right: e,
@@ -396,135 +763,135 @@ function xe(e = 0) {
396
763
  left: e
397
764
  };
398
765
  }
399
- function P(e = 10) {
400
- return { padding: xe(e) };
766
+ function W(e = 10) {
767
+ return { padding: nt(e) };
401
768
  }
402
- function F(e = {}) {
403
- return j({
404
- id: N(),
769
+ function rt(e = {}) {
770
+ return V({
771
+ id: U(),
405
772
  type: "title",
406
- ...de,
407
- styles: P()
773
+ ...Le,
774
+ styles: W()
408
775
  }, e);
409
776
  }
410
- function I(e = {}) {
411
- return j({
412
- id: N(),
777
+ function it(e = {}) {
778
+ return V({
779
+ id: U(),
413
780
  type: "paragraph",
414
- ...fe,
415
- styles: P()
781
+ ...Re,
782
+ styles: W()
416
783
  }, e);
417
784
  }
418
- function L(e = {}) {
419
- return j({
420
- id: N(),
785
+ function at(e = {}) {
786
+ return V({
787
+ id: U(),
421
788
  type: "image",
422
- ...pe,
423
- styles: P()
789
+ ...ze,
790
+ styles: W()
424
791
  }, e);
425
792
  }
426
- function R(e = {}) {
427
- return j({
428
- id: N(),
793
+ function ot(e = {}) {
794
+ return V({
795
+ id: U(),
429
796
  type: "button",
430
- ...me,
431
- styles: P()
797
+ ...Be,
798
+ styles: W()
432
799
  }, e);
433
800
  }
434
- function z(e = {}) {
435
- return j({
436
- id: N(),
801
+ function st(e = {}) {
802
+ return V({
803
+ id: U(),
437
804
  type: "divider",
438
- ...he,
439
- styles: P(20)
805
+ ...Ve,
806
+ styles: W(20)
440
807
  }, e);
441
808
  }
442
- function B(e = {}) {
443
- return j({
444
- id: N(),
809
+ function ct(e = {}) {
810
+ return V({
811
+ id: U(),
445
812
  type: "section",
446
- ...y,
813
+ ...He,
447
814
  children: [[]],
448
- styles: P(20)
815
+ styles: W(20)
449
816
  }, e);
450
817
  }
451
- function V(e = {}) {
452
- return j({
453
- id: N(),
818
+ function lt(e = {}) {
819
+ return V({
820
+ id: U(),
454
821
  type: "video",
455
- ...b,
456
- styles: P()
822
+ ...Ue,
823
+ styles: W()
457
824
  }, e);
458
825
  }
459
- function Se(e = {}) {
460
- return j({
461
- id: N(),
826
+ function ut(e = {}) {
827
+ return V({
828
+ id: U(),
462
829
  type: "social",
463
830
  icons: [],
464
- ...x,
465
- styles: P()
831
+ ...We,
832
+ styles: W()
466
833
  }, e);
467
834
  }
468
- function H(e = {}) {
469
- return j({
470
- id: N(),
835
+ function dt(e = {}) {
836
+ return V({
837
+ id: U(),
471
838
  type: "spacer",
472
- ...S,
473
- styles: P(0)
839
+ ...Ge,
840
+ styles: W(0)
474
841
  }, e);
475
842
  }
476
- function U(e = {}) {
477
- return j({
478
- id: N(),
843
+ function ft(e = {}) {
844
+ return V({
845
+ id: U(),
479
846
  type: "html",
480
- ...C,
481
- styles: P()
847
+ ...Ke,
848
+ styles: W()
482
849
  }, e);
483
850
  }
484
- function W(e = {}) {
485
- return j({
486
- id: N(),
851
+ function pt(e = {}) {
852
+ return V({
853
+ id: U(),
487
854
  type: "menu",
488
855
  items: [],
489
- ...w,
490
- styles: P()
856
+ ...qe,
857
+ styles: W()
491
858
  }, e);
492
859
  }
493
- function Ce(e, t) {
860
+ function mt(e, t) {
494
861
  return Array.from({ length: t }, () => ({
495
- id: N(),
862
+ id: U(),
496
863
  cells: Array.from({ length: e }, () => ({
497
- id: N(),
864
+ id: U(),
498
865
  content: ""
499
866
  }))
500
867
  }));
501
868
  }
502
- function we(e = {}) {
503
- return j({
504
- id: N(),
869
+ function ht(e = {}) {
870
+ return V({
871
+ id: U(),
505
872
  type: "table",
506
- rows: Ce(3, 3),
507
- ...T,
508
- styles: P()
873
+ rows: mt(3, 3),
874
+ ...Je,
875
+ styles: W()
509
876
  }, e);
510
877
  }
511
- function Te(e = {}) {
512
- return j({
513
- id: N(),
878
+ function gt(e = {}) {
879
+ return V({
880
+ id: U(),
514
881
  type: "countdown",
515
- ...E,
516
- styles: P()
882
+ ...z,
883
+ styles: W()
517
884
  }, e);
518
885
  }
519
- function Ee(e) {
886
+ function _t(e) {
520
887
  return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
521
888
  }
522
- function De(e) {
889
+ function vt(e) {
523
890
  let t = {};
524
- for (let n of e.fields) t[n.key] = M(Ee(n));
525
- let n = j(P(), M(e.defaultStyles));
891
+ for (let n of e.fields) t[n.key] = H(_t(n));
892
+ let n = V(W(), H(e.defaultStyles));
526
893
  return {
527
- id: N(),
894
+ id: U(),
528
895
  type: "custom",
529
896
  customType: e.type,
530
897
  fieldValues: t,
@@ -532,36 +899,36 @@ function De(e) {
532
899
  ...e.dataSource ? { dataSourceFetched: !1 } : {}
533
900
  };
534
901
  }
535
- function Oe() {
902
+ function yt() {
536
903
  return {
537
- id: N(),
904
+ id: U(),
538
905
  type: "slot",
539
- styles: P(0)
906
+ styles: W(0)
540
907
  };
541
908
  }
542
- function ke(e = {}) {
543
- return j({
544
- id: N(),
909
+ function bt(e = {}) {
910
+ return V({
911
+ id: U(),
545
912
  type: "wrapper",
546
913
  children: [],
547
- styles: P(0)
914
+ styles: W(0)
548
915
  }, e);
549
916
  }
550
- function Ae(e, t) {
917
+ function xt(e, t) {
551
918
  switch (e) {
552
- case "section": return B(M(t?.section));
553
- case "title": return F(M(t?.title));
554
- case "paragraph": return I(M(t?.paragraph));
555
- case "image": return L(M(t?.image));
556
- case "button": return R(M(t?.button));
557
- case "divider": return z(M(t?.divider));
558
- case "video": return V(M(t?.video));
559
- case "social": return Se(M(t?.social));
560
- case "spacer": return H(M(t?.spacer));
561
- case "html": return U(M(t?.html));
562
- case "menu": return W(M(t?.menu));
563
- case "table": return we(M(t?.table));
564
- case "countdown": return Te(M(t?.countdown));
919
+ case "section": return ct(H(t?.section));
920
+ case "title": return rt(H(t?.title));
921
+ case "paragraph": return it(H(t?.paragraph));
922
+ case "image": return at(H(t?.image));
923
+ case "button": return ot(H(t?.button));
924
+ case "divider": return st(H(t?.divider));
925
+ case "video": return lt(H(t?.video));
926
+ case "social": return ut(H(t?.social));
927
+ case "spacer": return dt(H(t?.spacer));
928
+ case "html": return ft(H(t?.html));
929
+ case "menu": return pt(H(t?.menu));
930
+ case "table": return ht(H(t?.table));
931
+ case "countdown": return gt(H(t?.countdown));
565
932
  case "slot": throw Error("[Templatical] slot cannot be inserted into content. Use createSlotBlock() to build a layout.");
566
933
  case "wrapper": throw Error("[Templatical] wrapper cannot be inserted into content. Use createWrapperBlock() to build a layout.");
567
934
  default: throw Error(`Unknown block type: ${e}`);
@@ -569,107 +936,107 @@ function Ae(e, t) {
569
936
  }
570
937
  function G(e) {
571
938
  let t = JSON.parse(JSON.stringify(e));
572
- if (t.id = N(), t.type === "table") for (let e of t.rows) {
573
- e.id = N();
574
- for (let t of e.cells) t.id = N();
939
+ if (t.id = U(), t.type === "table") for (let e of t.rows) {
940
+ e.id = U();
941
+ for (let t of e.cells) t.id = U();
575
942
  }
576
- if (t.type === "menu") for (let e of t.items) e.id = N();
577
- if (t.type === "social") for (let e of t.icons) e.id = N();
943
+ if (t.type === "menu") for (let e of t.items) e.id = U();
944
+ if (t.type === "social") for (let e of t.icons) e.id = U();
578
945
  return t.type === "section" && (t.children = t.children.map((e) => e.map((e) => G(e)))), t.type === "wrapper" && (t.children = t.children.map((e) => G(e))), t;
579
946
  }
580
- var je = "[Templatical] layout: must contain exactly one slot block", Me = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", Ne = "[Templatical] layout: a wrapper cannot contain a wrapper", Pe = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", Fe = "[Templatical] slot is not a valid content block", Ie = "[Templatical] wrapper is not a valid content block";
947
+ var St = "[Templatical] layout: must contain exactly one slot block", Ct = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", wt = "[Templatical] layout: a wrapper cannot contain a wrapper", Tt = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", Et = "[Templatical] slot is not a valid content block", Dt = "[Templatical] wrapper is not a valid content block";
581
948
  function K(e, t, n = null, r = !1) {
582
- for (let i of e) if (t(i, n, r), g(i)) for (let e of i.children) K(e, t, i, !0);
583
- else v(i) && K(i.children, t, i, r);
949
+ for (let i of e) if (t(i, n, r), I(i)) for (let e of i.children) K(e, t, i, !0);
950
+ else R(i) && K(i.children, t, i, r);
584
951
  }
585
- function Le(e) {
952
+ function Ot(e) {
586
953
  let t = 0;
587
954
  if (K(e.blocks, (e, n, r) => {
588
- if (_(e) && (t += 1, r)) throw Error(Me);
589
- if (v(e)) {
590
- if (r) throw Error(Me);
591
- if (e.children.some(v)) throw Error(Ne);
955
+ if (L(e) && (t += 1, r)) throw Error(Ct);
956
+ if (R(e)) {
957
+ if (r) throw Error(Ct);
958
+ if (e.children.some(R)) throw Error(wt);
592
959
  }
593
- }), t !== 1) throw Error(je);
960
+ }), t !== 1) throw Error(St);
594
961
  }
595
- function Re(e) {
962
+ function kt(e) {
596
963
  K(e.blocks, (e) => {
597
- if (_(e)) throw Error(Fe);
964
+ if (L(e)) throw Error(Et);
598
965
  });
599
966
  }
600
- function ze(e) {
967
+ function At(e) {
601
968
  K(e.blocks, (e) => {
602
- if (v(e)) throw Error(Ie);
969
+ if (R(e)) throw Error(Dt);
603
970
  });
604
971
  }
605
- function Be(e) {
972
+ function jt(e) {
606
973
  let t = !1;
607
974
  return K(e.blocks, (e, n) => {
608
- _(e) && n !== null && v(n) && (t = !0);
975
+ L(e) && n !== null && R(n) && (t = !0);
609
976
  }), t;
610
977
  }
611
- function Ve(e) {
612
- if (_(e)) return e;
613
- if (v(e)) {
978
+ function Mt(e) {
979
+ if (L(e)) return e;
980
+ if (R(e)) {
614
981
  let t = G({
615
982
  ...e,
616
983
  children: []
617
984
  });
618
- return t.children = e.children.map(Ve), t;
985
+ return t.children = e.children.map(Mt), t;
619
986
  }
620
987
  return G(e);
621
988
  }
622
- function He(e) {
989
+ function Nt(e) {
623
990
  for (let t = 0; t < e.length; t++) {
624
991
  let n = e[t];
625
- if (_(n)) return {
992
+ if (L(n)) return {
626
993
  parent: e,
627
994
  index: t
628
995
  };
629
- if (v(n)) {
630
- let e = He(n.children);
996
+ if (R(n)) {
997
+ let e = Nt(n.children);
631
998
  if (e) return e;
632
999
  }
633
1000
  }
634
1001
  return null;
635
1002
  }
636
- function Ue(e) {
637
- for (let t of e) if (g(t)) {
1003
+ function Pt(e) {
1004
+ for (let t of e) if (I(t)) {
638
1005
  if (t.wrapper) return !0;
639
- for (let e of t.children) if (Ue(e)) return !0;
1006
+ for (let e of t.children) if (Pt(e)) return !0;
640
1007
  }
641
1008
  return !1;
642
1009
  }
643
- function We(e, t) {
644
- if (Le(e), Re(t), ze(t), Be(e) && Ue(t.blocks)) throw Error(Pe);
645
- let n = e.blocks.map(Ve), r = He(n);
646
- if (!r) throw Error(je);
647
- return r.parent.splice(r.index, 1, ...A(t.blocks)), {
1010
+ function Ft(e, t) {
1011
+ if (Ot(e), kt(t), At(t), jt(e) && Pt(t.blocks)) throw Error(Tt);
1012
+ let n = e.blocks.map(Mt), r = Nt(n);
1013
+ if (!r) throw Error(St);
1014
+ return r.parent.splice(r.index, 1, ...p(t.blocks)), {
648
1015
  blocks: n,
649
1016
  settings: {
650
- ...A(t.settings),
1017
+ ...p(t.settings),
651
1018
  backgroundColor: e.settings.backgroundColor
652
1019
  }
653
1020
  };
654
1021
  }
655
- var Ge = /* @__PURE__ */ new Set(["\"", "'"]);
656
- function Ke(e, t) {
1022
+ var It = /* @__PURE__ */ new Set(["\"", "'"]);
1023
+ function Lt(e, t) {
657
1024
  let n = null;
658
1025
  for (let r = t; r < e.length; r++) {
659
1026
  let t = e[r];
660
1027
  if (n !== null) t === n && (n = null);
661
- else if (Ge.has(t)) n = t;
1028
+ else if (It.has(t)) n = t;
662
1029
  else if (t === ">") return r;
663
1030
  }
664
1031
  return -1;
665
1032
  }
666
- function qe(e) {
1033
+ function Rt(e) {
667
1034
  return e !== " " && e !== " " && e !== "\n" && e !== "\r" && e !== "\f" && e !== "=" && e !== ">" && e !== "/";
668
1035
  }
669
1036
  function q(e) {
670
1037
  return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
671
1038
  }
672
- var Je = {
1039
+ var zt = {
673
1040
  amp: "&",
674
1041
  lt: "<",
675
1042
  gt: ">",
@@ -677,22 +1044,22 @@ var Je = {
677
1044
  apos: "'",
678
1045
  nbsp: "\xA0"
679
1046
  };
680
- function Ye(e) {
1047
+ function Bt(e) {
681
1048
  return e.includes("&") ? e.replace(/&(#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g, (e, t) => {
682
1049
  if (t[0] === "#") {
683
1050
  let n = t[1] === "x" || t[1] === "X" ? Number.parseInt(t.slice(2), 16) : Number.parseInt(t.slice(1), 10);
684
1051
  return !Number.isFinite(n) || n < 1 || n > 1114111 || n >= 55296 && n <= 57343 ? e : String.fromCodePoint(n);
685
1052
  }
686
- return Je[t.toLowerCase()] ?? e;
1053
+ return zt[t.toLowerCase()] ?? e;
687
1054
  }) : e;
688
1055
  }
689
- function Xe(e, t) {
1056
+ function Vt(e, t) {
690
1057
  let n = t.toLowerCase(), r = 0;
691
1058
  for (; r < e.length;) {
692
1059
  for (; r < e.length && (q(e[r]) || e[r] === "/");) r++;
693
1060
  if (r >= e.length) break;
694
1061
  let t = r;
695
- for (; r < e.length && qe(e[r]);) r++;
1062
+ for (; r < e.length && Rt(e[r]);) r++;
696
1063
  let i = e.substring(t, r).toLowerCase();
697
1064
  if (i === "") {
698
1065
  r++;
@@ -702,27 +1069,27 @@ function Xe(e, t) {
702
1069
  if (e[r] !== "=") continue;
703
1070
  for (r++; r < e.length && q(e[r]);) r++;
704
1071
  let a = e[r];
705
- if (Ge.has(a)) {
1072
+ if (It.has(a)) {
706
1073
  let t = r + 1, o = e.indexOf(a, t);
707
1074
  if (o === -1) return null;
708
- if (i === n) return Ye(e.substring(t, o));
1075
+ if (i === n) return Bt(e.substring(t, o));
709
1076
  r = o + 1;
710
1077
  continue;
711
1078
  }
712
1079
  let o = r;
713
1080
  for (; r < e.length && !q(e[r]) && e[r] !== ">";) r++;
714
- if (i === n) return Ye(e.substring(o, r));
1081
+ if (i === n) return Bt(e.substring(o, r));
715
1082
  }
716
1083
  return null;
717
1084
  }
718
- var Ze = /<\/?p\b[^<>]*>/gi, Qe = /<p\b([^<>]*)>\s*<\/p>/gi;
719
- function $e(e) {
720
- return e.replace(Ze, "").trim() === "";
1085
+ var Ht = /<\/?p\b[^<>]*>/gi, Ut = /<p\b([^<>]*)>\s*<\/p>/gi;
1086
+ function Wt(e) {
1087
+ return e.replace(Ht, "").trim() === "";
721
1088
  }
722
- function et(e) {
723
- return $e(e) ? e : e.replace(Qe, "<p$1>&nbsp;</p>");
1089
+ function Gt(e) {
1090
+ return Wt(e) ? e : e.replace(Ut, "<p$1>&nbsp;</p>");
724
1091
  }
725
- var tt = {
1092
+ var Kt = {
726
1093
  arial: "Arial, sans-serif",
727
1094
  helvetica: "Helvetica, sans-serif",
728
1095
  georgia: "Georgia, serif",
@@ -731,13 +1098,13 @@ var tt = {
731
1098
  "trebuchet ms": "'Trebuchet MS', sans-serif",
732
1099
  "courier new": "'Courier New', monospace",
733
1100
  tahoma: "Tahoma, sans-serif"
734
- }, nt = /* @__PURE__ */ new Set([
1101
+ }, qt = /* @__PURE__ */ new Set([
735
1102
  "inherit",
736
1103
  "initial",
737
1104
  "unset",
738
1105
  "revert",
739
1106
  "revert-layer"
740
- ]), rt = /* @__PURE__ */ new Set([
1107
+ ]), Jt = /* @__PURE__ */ new Set([
741
1108
  "serif",
742
1109
  "sans-serif",
743
1110
  "monospace",
@@ -752,14 +1119,14 @@ var tt = {
752
1119
  "math",
753
1120
  "fangsong"
754
1121
  ]);
755
- function it(e) {
1122
+ function Yt(e) {
756
1123
  return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
757
1124
  }
758
1125
  function J(e) {
759
1126
  if (typeof e != "string") return [];
760
1127
  let t = e.replace(/!\s*important\s*$/i, ""), n = [], r = 0;
761
1128
  for (;;) {
762
- for (; r < t.length && it(t[r]);) r++;
1129
+ for (; r < t.length && Yt(t[r]);) r++;
763
1130
  if (r >= t.length) return [];
764
1131
  let e = t[r];
765
1132
  if (e === "\"" || e === "'") {
@@ -776,7 +1143,7 @@ function J(e) {
776
1143
  }
777
1144
  }
778
1145
  if (!o) return [];
779
- for (; a < t.length && it(t[a]);) a++;
1146
+ for (; a < t.length && Yt(t[a]);) a++;
780
1147
  if (a < t.length && t[a] !== ",") return [];
781
1148
  n.push({
782
1149
  name: i,
@@ -784,7 +1151,7 @@ function J(e) {
784
1151
  }), r = a;
785
1152
  } else {
786
1153
  let e = t.indexOf(",", r), i = e === -1 ? t.length : e, a = t.slice(r, i).trim().split(/\s+/).join(" ");
787
- if (a === "" || a.includes("\"") || a.includes("'") || nt.has(a.toLowerCase())) return [];
1154
+ if (a === "" || a.includes("\"") || a.includes("'") || qt.has(a.toLowerCase())) return [];
788
1155
  n.push({
789
1156
  name: a,
790
1157
  quoted: !1
@@ -794,67 +1161,69 @@ function J(e) {
794
1161
  r++;
795
1162
  }
796
1163
  }
797
- function at(e) {
1164
+ function Xt(e) {
798
1165
  return `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
799
1166
  }
800
- function ot(e) {
801
- return !e.quoted && rt.has(e.name.toLowerCase());
1167
+ function Zt(e) {
1168
+ return !e.quoted && Jt.has(e.name.toLowerCase());
802
1169
  }
803
- function st(e) {
1170
+ function Qt(e) {
804
1171
  return J(e)[0]?.name ?? "";
805
1172
  }
806
- function ct(e, t) {
807
- let n = (e) => `${at(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
1173
+ function $t(e, t) {
1174
+ let n = (e) => `${Xt(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
808
1175
  if (i) return n(i);
809
1176
  let a = J(e);
810
1177
  if (a.length !== 1) return e;
811
1178
  let [o] = a, s = o.name.toLowerCase(), c = t.customFonts.find((e) => e.name.toLowerCase() === s);
812
- return c ? n(c) : tt[s] || (ot(o) ? e : `${at(o.name)}, ${t.defaultFallback}`);
1179
+ return c ? n(c) : Kt[s] || (Zt(o) ? e : `${Xt(o.name)}, ${t.defaultFallback}`);
813
1180
  }
814
1181
  var Y = {
815
1182
  liquid: {
816
1183
  value: /\{\{.+?\}\}/g,
817
- logic: /\{%-?\s*(\w+).*?-?%\}/g
1184
+ logic: /\{%-?\s*(\w+).*?-?%\}/g,
1185
+ opener: "{{",
1186
+ closer: "}}"
818
1187
  },
819
1188
  handlebars: {
820
1189
  value: /\{\{\{?.+?\}?\}\}/g,
821
- logic: /\{\{[#/](\w+).*?\}\}/g
1190
+ logic: /\{\{[#/](\w+).*?\}\}/g,
1191
+ opener: "{{",
1192
+ closer: "}}"
822
1193
  },
823
1194
  mailchimp: {
824
1195
  value: /\*\|\w+\|\*/g,
825
- logic: /\*\|(\w+)[:|].*?\|\*/g
1196
+ logic: /\*\|(\w+)[:|].*?\|\*/g,
1197
+ opener: "*|",
1198
+ closer: "|*"
826
1199
  },
827
1200
  ampscript: {
828
1201
  value: /%%=.+?=%%/g,
829
- logic: /%%\[\s*(\w+).*?\]%%/g
1202
+ logic: /%%\[\s*(\w+).*?\]%%/g,
1203
+ opener: "%%=",
1204
+ closer: "=%%"
830
1205
  }
831
- }, lt = {
832
- liquid: "{{",
833
- handlebars: "{{",
834
- mailchimp: "*|",
835
- ampscript: "%%="
836
- }, ut = {
837
- liquid: "}}",
838
- handlebars: "}}",
839
- mailchimp: "|*",
840
- ampscript: "=%%"
841
1206
  };
842
- function dt(e) {
843
- for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return lt[t];
844
- return null;
1207
+ function en(e) {
1208
+ return typeof e == "string" && e.trim() !== "" ? e : null;
845
1209
  }
846
- function ft(e) {
847
- for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return ut[t];
848
- return null;
1210
+ function tn(e) {
1211
+ return Object.values(Y).find((t) => t.value.source === e.value.source) ?? null;
849
1212
  }
850
- function pt(e) {
1213
+ function nn(e) {
1214
+ return en(e.opener) ?? tn(e)?.opener ?? null;
1215
+ }
1216
+ function rn(e) {
1217
+ return en(e.closer) ?? tn(e)?.closer ?? null;
1218
+ }
1219
+ function an(e) {
851
1220
  return e ? typeof e == "string" ? Y[e] ?? Y.liquid : e : Y.liquid;
852
1221
  }
853
1222
  function X(e) {
854
1223
  let t = e.source, n = e.flags.replace("g", "");
855
1224
  return RegExp(`^${t}$`, n);
856
1225
  }
857
- function mt(e, t) {
1226
+ function on(e, t) {
858
1227
  let n = e?.trim() || "";
859
1228
  return !X(t.logic).test(n) && X(t.value).test(n);
860
1229
  }
@@ -862,41 +1231,41 @@ function Z(e, t) {
862
1231
  let n = t.find((t) => t.value === e);
863
1232
  return n ? n.label : e;
864
1233
  }
865
- function ht(e, t) {
1234
+ function sn(e, t) {
866
1235
  return $(e, "data-merge-tag", (e) => Z(e, t));
867
1236
  }
868
1237
  function Q(e, t) {
869
1238
  return t.find((t) => t.value === e)?.sample;
870
1239
  }
871
- function gt(e, t) {
872
- return $(e, "data-merge-tag", (e) => yt(Q(e, t) ?? Z(e, t)), { unwrap: (e) => Q(e, t) !== void 0 });
1240
+ function cn(e, t) {
1241
+ return $(e, "data-merge-tag", (e) => dn(Q(e, t) ?? Z(e, t)), { unwrap: (e) => Q(e, t) !== void 0 });
873
1242
  }
874
- function _t(e) {
1243
+ function ln(e) {
875
1244
  return e.some((e) => e.sample !== void 0);
876
1245
  }
877
- function vt(e, t) {
1246
+ function un(e, t) {
878
1247
  if (!e) return e;
879
1248
  let n = e;
880
1249
  for (let e of t) e.sample !== void 0 && (n = n.split(e.value).join(e.sample));
881
1250
  return n;
882
1251
  }
883
- function yt(e) {
1252
+ function dn(e) {
884
1253
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
885
1254
  }
886
- function bt(e, t) {
1255
+ function fn(e, t) {
887
1256
  if (!e) return !1;
888
1257
  let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
889
1258
  return n.test(e) || r.test(e);
890
1259
  }
891
- function xt(e, t) {
1260
+ function pn(e, t) {
892
1261
  return X(t.logic).test(e?.trim() || "");
893
1262
  }
894
- function St(e, t) {
1263
+ function mn(e, t) {
895
1264
  let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
896
1265
  return r && r[1] ? r[1].toUpperCase() : e;
897
1266
  }
898
- function Ct(e, t) {
899
- return $(e, "data-logic-merge-tag", (e) => St(e, t));
1267
+ function hn(e, t) {
1268
+ return $(e, "data-logic-merge-tag", (e) => mn(e, t));
900
1269
  }
901
1270
  function $(e, t, n, r) {
902
1271
  let i = "", a = 0;
@@ -911,7 +1280,7 @@ function $(e, t, n, r) {
911
1280
  i += e.substring(a, o + 5), a = o + 5;
912
1281
  continue;
913
1282
  }
914
- let c = Ke(e, o + 5);
1283
+ let c = Lt(e, o + 5);
915
1284
  if (c === -1) {
916
1285
  i += e.substring(a);
917
1286
  break;
@@ -921,7 +1290,7 @@ function $(e, t, n, r) {
921
1290
  i += e.substring(a);
922
1291
  break;
923
1292
  }
924
- let u = Xe(e.substring(o + 5, c), t);
1293
+ let u = Vt(e.substring(o + 5, c), t);
925
1294
  if (u === null) {
926
1295
  i += e.substring(a, o + 5), a = o + 5;
927
1296
  continue;
@@ -931,25 +1300,10 @@ function $(e, t, n, r) {
931
1300
  }
932
1301
  return i;
933
1302
  }
934
- function wt(e) {
1303
+ function gn(e) {
935
1304
  if (typeof e != "object" || !e) return !1;
936
1305
  let t = e;
937
1306
  return Array.isArray(t.blocks);
938
1307
  }
939
- var Tt = class extends Error {
940
- statusCode;
941
- constructor(e, t) {
942
- super(e), this.statusCode = t, this.name = "SdkError";
943
- }
944
- get isNotFound() {
945
- return this.statusCode === 404;
946
- }
947
- get isUnauthorized() {
948
- return this.statusCode === 401;
949
- }
950
- get isServerError() {
951
- return this.statusCode !== void 0 && this.statusCode >= 500;
952
- }
953
- };
954
1308
  //#endregion
955
- export { g as $, Oe as A, st as B, _e as C, W as D, L as E, V as F, ft as G, St as H, ke as I, ie as J, dt as K, k as L, H as M, we as N, I as O, F as P, wt as Q, p as R, De as S, U as T, Z as U, N as V, Q as W, xt as X, ue as Y, mt as Z, bt as _, n as _t, ge as a, be as at, R as b, t as bt, l as c, Ct as ct, Tt as d, A as dt, _ as et, c as f, se as ft, G as g, vt as gt, ze as h, gt as ht, e as i, m as it, Se as j, B as k, ae as l, ht as lt, Re as m, ce as mt, f as n, Be as nt, D as o, ct as ot, We as p, le as pt, _t as q, i as r, J as rt, s, ne as st, d as t, v as tt, Y as u, pt as ut, ee as v, r as vt, z as w, Te as x, Le as xt, Ae as y, o as yt, et as z };
1309
+ export { ln as $, at as A, bt as B, xt as C, un as Ct, Qe as D, t as Dt, vt as E, o as Et, ut as F, Qt as G, B as H, dt as I, mn as J, U as K, ht as L, it as M, ct as N, st as O, Ot, yt as P, nn as Q, rt as R, te as S, cn as St, gt as T, r as Tt, ne as U, m as V, Gt as W, Q as X, Z as Y, rn as Z, g as _, an as _t, Fe as a, gn as at, G as b, fe as bt, s as c, R as ct, ce as d, re as dt, se as et, Y as f, tt as ft, he as g, sn as gt, Ft as h, hn as ht, e as i, on as it, pt as j, ft as k, h as l, jt as lt, c as m, ae as mt, ee as n, Ie as nt, Ye as o, I as ot, Ne as p, $t as pt, me as q, i as r, pn as rt, Xe as s, L as st, d as t, Me as tt, l as u, J as ut, kt as v, p as vt, ot as w, n as wt, fn as x, de as xt, At as y, ue as yt, lt as z };