@templatical/editor 0.48.0 → 0.49.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 (308) hide show
  1. package/README.md +1 -1
  2. package/dist/{AiChatSidebar-DxPHFNoT.js → AiChatSidebar-CdjTb9ej.js} +14 -14
  3. package/dist/{AiFeatureMenu-C8GVqu1d.js → AiFeatureMenu-DKm7VYCs.js} +7 -7
  4. package/dist/{BlockIssueBadge-BShkuJis.js → BlockIssueBadge-BdpJwim0.js} +5 -5
  5. package/dist/{BlockPreviewCanvas-tzAtDkXH.js → BlockPreviewCanvas-D_sowkf0.js} +8 -8
  6. package/dist/CloudHeaderExtras-CI8RR9hG.js +55 -0
  7. package/dist/{CloudPanels-Dgw7tb4R.js → CloudPanels-1hwFiJ0G.js} +39 -68
  8. package/dist/CollaborationNotices-BWpKzueF.js +73 -0
  9. package/dist/CollaboratorBar-D87phJsw.js +123 -0
  10. package/dist/{CommentsPanel-DiWzYtnZ.js → CommentsPanel-BUvUzO3T.js} +2 -2
  11. package/dist/{CommentsSidebar-BOqj16Al.js → CommentsSidebar-J65znlrH.js} +14 -14
  12. package/dist/{CountdownBlock-zx39Dyby.js → CountdownBlock-DPQXWRvU.js} +4 -4
  13. package/dist/{CountdownToolbar-C4y3Ft7H.js → CountdownToolbar-CLMIwfK7.js} +7 -7
  14. package/dist/{DesignReferenceSidebar-BWAi3eQQ.js → DesignReferenceSidebar-BTwCFgz8.js} +13 -13
  15. package/dist/{IssuesPanel-C-x3I012.js → IssuesPanel-DeeVsfG7.js} +8 -8
  16. package/dist/{LoadingTrack-6XsqodoY.js → LoadingTrack-BXOptf5g.js} +1 -1
  17. package/dist/{LogicTagInsertButton-B1_Wy0AN.js → LogicTagInsertButton-CR5E4jSG.js} +17 -17
  18. package/dist/{MediaEditModal-ByOvznRC.js → MediaEditModal-C_wxoUMG.js} +3 -3
  19. package/dist/{MediaPanels-9mDBv4aL.js → MediaPanels-BVXDkqtH.js} +2 -2
  20. package/dist/{MergeTagInput-fOewuF27.js → MergeTagInput-BEw_r0PJ.js} +3 -3
  21. package/dist/{MergeTagModeToggle-BXamLcv7.js → MergeTagModeToggle-CJTpFmVd.js} +7 -7
  22. package/dist/{ParagraphEditor-BVjOwwHx.js → ParagraphEditor-zLV44z-R.js} +19 -19
  23. package/dist/{RestoreVersionDialog-BEKXx9xk.js → RestoreVersionDialog-BaDpy3cL.js} +6 -6
  24. package/dist/{RichTextEditorContent-D7kp7iig.js → RichTextEditorContent-CsvniFlI.js} +9 -9
  25. package/dist/{SaveBlockDialog-SJu0lecx.js → SaveBlockDialog-DzWURF_e.js} +12 -12
  26. package/dist/{SavedBlocksBrowserModal-DbmIS5uK.js → SavedBlocksBrowserModal-B8DCFW7t.js} +14 -14
  27. package/dist/{SavedBlocksPanels-Dr5Fxx9Z.js → SavedBlocksPanels-B3Af8ns2.js} +2 -2
  28. package/dist/{SavedBlocksPickBar-DnEWBZJy.js → SavedBlocksPickBar-Dj11-Lqp.js} +5 -5
  29. package/dist/{TemplateScoringPanel-ynbGl-sr.js → TemplateScoringPanel-Ba9sgvjS.js} +16 -16
  30. package/dist/{TemplateSettings-Bi01S3H3.js → TemplateSettings-Cu5X9DgA.js} +11 -11
  31. package/dist/{TestEmailModal-CbRY8HQx.js → TestEmailModal-BeRYV3eg.js} +14 -14
  32. package/dist/{TestEmailPanel-NAOmt3xi.js → TestEmailPanel-B8c3fQi2.js} +2 -2
  33. package/dist/{TitleEditor-Cc3DHbuN.js → TitleEditor-CvpNUoAp.js} +11 -11
  34. package/dist/{ToggleSwitch-Ozc7YU38.js → ToggleSwitch-DHweVJOr.js} +2 -2
  35. package/dist/{Toolbar-B-2lO0I8.js → Toolbar-BadDSkkF.js} +426 -429
  36. package/dist/{TplModal-Bz4-IZ9R.js → TplModal-BZgi9Tes.js} +5 -5
  37. package/dist/{VersionHistoryMenu-CjV1d1zk.js → VersionHistoryMenu-BRlcQ8wX.js} +10 -10
  38. package/dist/{VersionHistoryPanels-BtwxrKJn.js → VersionHistoryPanels-DGkllN3a.js} +2 -2
  39. package/dist/{VersionPreviewBanner-BLAei1kj.js → VersionPreviewBanner-F-811aps.js} +4 -4
  40. package/dist/{WrapperBlock-D0qgNqjD.js → WrapperBlock-DiiaxpMb.js} +5 -5
  41. package/dist/{blockTypeIcons-CEDZytqP.js → blockTypeIcons-CayLluou.js} +2 -2
  42. package/dist/bundle-stats.json +7 -7
  43. package/dist/{ca-CbNzJM3I.js → ca-DSJwJ5ov.js} +23 -1
  44. package/dist/cdn/chunks/{AiChatSidebar-Dk0rJBQN.js → AiChatSidebar-yXJ85Zcg.js} +8 -8
  45. package/dist/cdn/chunks/{AiChatSidebar-Dk0rJBQN.js.map → AiChatSidebar-yXJ85Zcg.js.map} +1 -1
  46. package/dist/cdn/chunks/{AiFeatureMenu-B7b0w8ZS.js → AiFeatureMenu-4ydjrhsQ.js} +6 -6
  47. package/dist/cdn/chunks/{AiFeatureMenu-B7b0w8ZS.js.map → AiFeatureMenu-4ydjrhsQ.js.map} +1 -1
  48. package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js → BlockIssueBadge-D1VBS_6x.js} +5 -5
  49. package/dist/cdn/chunks/{BlockIssueBadge-C7sdnkrF.js.map → BlockIssueBadge-D1VBS_6x.js.map} +1 -1
  50. package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js → BlockPreviewCanvas-m2tWRyWv.js} +8 -8
  51. package/dist/cdn/chunks/{BlockPreviewCanvas-vK5tBazr.js.map → BlockPreviewCanvas-m2tWRyWv.js.map} +1 -1
  52. package/dist/cdn/chunks/{CloudHeaderExtras-B4fhuwc_.js → CloudHeaderExtras-DEkRww7n.js} +16 -20
  53. package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +1 -0
  54. package/dist/cdn/chunks/{CloudPanels-awqHfJqC.js → CloudPanels-XufhBZYF.js} +38 -67
  55. package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +1 -0
  56. package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js +75 -0
  57. package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +1 -0
  58. package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js +72 -0
  59. package/dist/cdn/chunks/CollaboratorBar-DWW54Bn_.js.map +1 -0
  60. package/dist/cdn/chunks/{CommentsPanel-CbzxwsyI.js → CommentsPanel-R8YLLO3v.js} +3 -3
  61. package/dist/cdn/chunks/{CommentsPanel-CbzxwsyI.js.map → CommentsPanel-R8YLLO3v.js.map} +1 -1
  62. package/dist/cdn/chunks/{CommentsSidebar-DWPHZuQm.js → CommentsSidebar-96NZHVq3.js} +5 -5
  63. package/dist/cdn/chunks/{CommentsSidebar-DWPHZuQm.js.map → CommentsSidebar-96NZHVq3.js.map} +1 -1
  64. package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js → CountdownBlock-DB4JNdqh.js} +5 -5
  65. package/dist/cdn/chunks/{CountdownBlock-Dasj191h.js.map → CountdownBlock-DB4JNdqh.js.map} +1 -1
  66. package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js → CountdownToolbar-tmiTPEXm.js} +8 -8
  67. package/dist/cdn/chunks/{CountdownToolbar-Cqg8FUH-.js.map → CountdownToolbar-tmiTPEXm.js.map} +1 -1
  68. package/dist/cdn/chunks/{DesignReferenceSidebar-BW9cHnA9.js → DesignReferenceSidebar-D14IIu_P.js} +39 -39
  69. package/dist/cdn/chunks/{DesignReferenceSidebar-BW9cHnA9.js.map → DesignReferenceSidebar-D14IIu_P.js.map} +1 -1
  70. package/dist/cdn/chunks/{IssuesPanel-cXf9ywA4.js → IssuesPanel-BoPiCLGc.js} +8 -8
  71. package/dist/cdn/chunks/{IssuesPanel-cXf9ywA4.js.map → IssuesPanel-BoPiCLGc.js.map} +1 -1
  72. package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js → LoadingTrack-YU44CM8X.js} +2 -2
  73. package/dist/cdn/chunks/{LoadingTrack-DbH97JR9.js.map → LoadingTrack-YU44CM8X.js.map} +1 -1
  74. package/dist/cdn/chunks/{LogicTagInsertButton-BMB9vShs.js → LogicTagInsertButton-BJ2t2vxC.js} +20 -20
  75. package/dist/cdn/chunks/{LogicTagInsertButton-BMB9vShs.js.map → LogicTagInsertButton-BJ2t2vxC.js.map} +1 -1
  76. package/dist/cdn/chunks/{MediaEditModal-zXfcArr4.js → MediaEditModal-DD0SZ-S3.js} +3 -3
  77. package/dist/cdn/chunks/{MediaEditModal-zXfcArr4.js.map → MediaEditModal-DD0SZ-S3.js.map} +1 -1
  78. package/dist/cdn/chunks/{MediaPanels-Cp4XB_dH.js → MediaPanels-CkdJ_kGp.js} +3 -3
  79. package/dist/cdn/chunks/{MediaPanels-Cp4XB_dH.js.map → MediaPanels-CkdJ_kGp.js.map} +1 -1
  80. package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js → MergeTagInput-7wXX71DH.js} +4 -4
  81. package/dist/cdn/chunks/{MergeTagInput-DLqrA9co.js.map → MergeTagInput-7wXX71DH.js.map} +1 -1
  82. package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js → MergeTagModeToggle-r9vHH4u_.js} +6 -6
  83. package/dist/cdn/chunks/{MergeTagModeToggle-BRiJzzn5.js.map → MergeTagModeToggle-r9vHH4u_.js.map} +1 -1
  84. package/dist/cdn/chunks/{ParagraphEditor-D4aq9eeC.js → ParagraphEditor-CJQjRHXV.js} +29 -29
  85. package/dist/cdn/chunks/{ParagraphEditor-D4aq9eeC.js.map → ParagraphEditor-CJQjRHXV.js.map} +1 -1
  86. package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js → RestoreVersionDialog-C5cxBRKi.js} +6 -6
  87. package/dist/cdn/chunks/{RestoreVersionDialog-BgR6RXSb.js.map → RestoreVersionDialog-C5cxBRKi.js.map} +1 -1
  88. package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js → RichTextEditorContent-BfE7Bkge.js} +8 -8
  89. package/dist/cdn/chunks/{RichTextEditorContent-C4DMAn0g.js.map → RichTextEditorContent-BfE7Bkge.js.map} +1 -1
  90. package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js → SaveBlockDialog-BKbjUnPM.js} +10 -10
  91. package/dist/cdn/chunks/{SaveBlockDialog-BaIsQd09.js.map → SaveBlockDialog-BKbjUnPM.js.map} +1 -1
  92. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CtnB58p_.js → SavedBlocksBrowserModal-BMtyUrUP.js} +10 -10
  93. package/dist/cdn/chunks/{SavedBlocksBrowserModal-CtnB58p_.js.map → SavedBlocksBrowserModal-BMtyUrUP.js.map} +1 -1
  94. package/dist/cdn/chunks/{SavedBlocksPanels-BhEOMzEQ.js → SavedBlocksPanels-s_gxi1im.js} +3 -3
  95. package/dist/cdn/chunks/{SavedBlocksPanels-BhEOMzEQ.js.map → SavedBlocksPanels-s_gxi1im.js.map} +1 -1
  96. package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js → SavedBlocksPickBar-B8WHk5mI.js} +6 -6
  97. package/dist/cdn/chunks/{SavedBlocksPickBar-CcdqTEIp.js.map → SavedBlocksPickBar-B8WHk5mI.js.map} +1 -1
  98. package/dist/cdn/chunks/{TemplateScoringPanel-BrWqJCSP.js → TemplateScoringPanel-BBPnHILC.js} +6 -6
  99. package/dist/cdn/chunks/{TemplateScoringPanel-BrWqJCSP.js.map → TemplateScoringPanel-BBPnHILC.js.map} +1 -1
  100. package/dist/cdn/chunks/{TemplateSettings-BkkWTDHD.js → TemplateSettings-CtrzzQWl.js} +10 -10
  101. package/dist/cdn/chunks/{TemplateSettings-BkkWTDHD.js.map → TemplateSettings-CtrzzQWl.js.map} +1 -1
  102. package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js → TestEmailModal-DuZKYMWD.js} +13 -13
  103. package/dist/cdn/chunks/{TestEmailModal-V5mwHsUV.js.map → TestEmailModal-DuZKYMWD.js.map} +1 -1
  104. package/dist/cdn/chunks/{TestEmailPanel-DxrKuctP.js → TestEmailPanel-DERaCdpG.js} +3 -3
  105. package/dist/cdn/chunks/{TestEmailPanel-DxrKuctP.js.map → TestEmailPanel-DERaCdpG.js.map} +1 -1
  106. package/dist/cdn/chunks/{TitleEditor-CsZiG3TT.js → TitleEditor-CEgxjtUX.js} +14 -14
  107. package/dist/cdn/chunks/{TitleEditor-CsZiG3TT.js.map → TitleEditor-CEgxjtUX.js.map} +1 -1
  108. package/dist/cdn/chunks/{ToggleSwitch-BB-bQADJ.js → ToggleSwitch-DGQ7iRc-.js} +3 -3
  109. package/dist/cdn/chunks/{ToggleSwitch-BB-bQADJ.js.map → ToggleSwitch-DGQ7iRc-.js.map} +1 -1
  110. package/dist/cdn/chunks/{Toolbar-C_x2TfFk.js → Toolbar-GFIZQHzw.js} +440 -443
  111. package/dist/cdn/chunks/Toolbar-GFIZQHzw.js.map +1 -0
  112. package/dist/cdn/chunks/{TplModal-DC_eodTV.js → TplModal-DDrbWJcE.js} +5 -5
  113. package/dist/cdn/chunks/{TplModal-DC_eodTV.js.map → TplModal-DDrbWJcE.js.map} +1 -1
  114. package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js → VersionHistoryMenu-MlxsUmuT.js} +6 -6
  115. package/dist/cdn/chunks/{VersionHistoryMenu-DXnM5Df2.js.map → VersionHistoryMenu-MlxsUmuT.js.map} +1 -1
  116. package/dist/cdn/chunks/{VersionHistoryPanels-DXSqmaLS.js → VersionHistoryPanels-DVOV8QLv.js} +3 -3
  117. package/dist/cdn/chunks/{VersionHistoryPanels-DXSqmaLS.js.map → VersionHistoryPanels-DVOV8QLv.js.map} +1 -1
  118. package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js → VersionPreviewBanner-BQwRKc6S.js} +5 -5
  119. package/dist/cdn/chunks/{VersionPreviewBanner-DKyN6BhO.js.map → VersionPreviewBanner-BQwRKc6S.js.map} +1 -1
  120. package/dist/cdn/chunks/{WrapperBlock-gG_Bleug.js → WrapperBlock-CFuP4R0c.js} +6 -6
  121. package/dist/cdn/chunks/{WrapperBlock-gG_Bleug.js.map → WrapperBlock-CFuP4R0c.js.map} +1 -1
  122. package/dist/cdn/chunks/{blockTypeIcons-HrMJDfVg.js → blockTypeIcons-BnAd8qsP.js} +2 -2
  123. package/dist/cdn/chunks/{blockTypeIcons-HrMJDfVg.js.map → blockTypeIcons-BnAd8qsP.js.map} +1 -1
  124. package/dist/cdn/chunks/{ca-CbNzJM3I.js → ca-DSJwJ5ov.js} +24 -2
  125. package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +1 -0
  126. package/dist/{cloud-B5xwm_4X.js → cdn/chunks/cloud-CI_fgDyy.js} +116 -293
  127. package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +1 -0
  128. package/dist/cdn/chunks/{createCloudRuntime-Vd0N4elZ.js → createCloudRuntime-DiYCJ21w.js} +127 -169
  129. package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +1 -0
  130. package/dist/{de-DMquBpZM.js → cdn/chunks/de-CBE6O79z.js} +25 -1
  131. package/dist/cdn/chunks/de-CBE6O79z.js.map +1 -0
  132. package/dist/{de-mMY5yQJu.js → cdn/chunks/de-D_atmUVB.js} +2 -4
  133. package/dist/cdn/chunks/{de-mMY5yQJu.js.map → de-D_atmUVB.js.map} +1 -1
  134. package/dist/cdn/chunks/{dist-MNQYSEWU.js → dist-DdwjXLme.js} +3 -3
  135. package/dist/cdn/chunks/{dist-MNQYSEWU.js.map → dist-DdwjXLme.js.map} +1 -1
  136. package/dist/cdn/chunks/{dist-CjL6JHML.js → dist-Doy3r07H.js} +2 -2
  137. package/dist/cdn/chunks/{dist-CjL6JHML.js.map → dist-Doy3r07H.js.map} +1 -1
  138. package/dist/cdn/chunks/{draggable-DrsNwZuB.js → draggable-akeQH_JP.js} +1682 -1683
  139. package/dist/cdn/chunks/draggable-akeQH_JP.js.map +1 -0
  140. package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js → editor-modal-HJBy9kLj.js} +88 -88
  141. package/dist/cdn/chunks/{editor-modal-vEEmZ8Tu.js.map → editor-modal-HJBy9kLj.js.map} +1 -1
  142. package/dist/cdn/chunks/{en-C8Mp71sO.js → en-CDexnk0p.js} +24 -2
  143. package/dist/cdn/chunks/en-CDexnk0p.js.map +1 -0
  144. package/dist/{en-ChVeGQBY.js → cdn/chunks/en-DhJLnaBx.js} +2 -4
  145. package/dist/cdn/chunks/en-DhJLnaBx.js.map +1 -0
  146. package/dist/cdn/chunks/en-Ve-PWSXu.js +1 -0
  147. package/dist/{es-Byq4tthI.js → cdn/chunks/es-BE42B6uN.js} +25 -1
  148. package/dist/cdn/chunks/es-BE42B6uN.js.map +1 -0
  149. package/dist/cdn/chunks/{extensions-hJ9VqzDc.js → extensions-koOuDeZS.js} +23 -23
  150. package/dist/cdn/chunks/{extensions-hJ9VqzDc.js.map → extensions-koOuDeZS.js.map} +1 -1
  151. package/dist/{fr-B3j35HEw.js → cdn/chunks/fr-DlJFPDQR.js} +25 -1
  152. package/dist/cdn/chunks/fr-DlJFPDQR.js.map +1 -0
  153. package/dist/cdn/chunks/{icons-aTYwH5-g.js → icons-CjlNV8xD.js} +46 -46
  154. package/dist/cdn/chunks/{icons-aTYwH5-g.js.map → icons-CjlNV8xD.js.map} +1 -1
  155. package/dist/{ja-D7txAuGS.js → cdn/chunks/ja-CUT8gkNI.js} +25 -1
  156. package/dist/cdn/chunks/ja-CUT8gkNI.js.map +1 -0
  157. package/dist/cdn/chunks/{keys-HI-INbkz.js → keys-UAWhQ3zW.js} +2 -2
  158. package/dist/cdn/chunks/{keys-HI-INbkz.js.map → keys-UAWhQ3zW.js.map} +1 -1
  159. package/dist/{nl-ClJ3BY3F.js → cdn/chunks/nl-bXWqqRyS.js} +25 -1
  160. package/dist/cdn/chunks/nl-bXWqqRyS.js.map +1 -0
  161. package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js → preRenderCustomBlocks-DqKbdTJ8.js} +5 -5
  162. package/dist/cdn/chunks/{preRenderCustomBlocks-ByfuSjtL.js.map → preRenderCustomBlocks-DqKbdTJ8.js.map} +1 -1
  163. package/dist/cdn/chunks/{pt-BR-DibcXcmv.js → pt-BR-2_H4-wlb.js} +24 -2
  164. package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +1 -0
  165. package/dist/{pt-BR-CoCwRUi0.js → cdn/chunks/pt-BR-BphMoUTw.js} +2 -4
  166. package/dist/cdn/chunks/{pt-BR-CoCwRUi0.js.map → pt-BR-BphMoUTw.js.map} +1 -1
  167. package/dist/cdn/chunks/{pusher-C8DeiO2X.js → pusher-Cs4GGEtd.js} +2 -2
  168. package/dist/cdn/chunks/pusher-Cs4GGEtd.js.map +1 -0
  169. package/dist/cdn/chunks/{rolldown-runtime-B0aSnxlc.js → rolldown-runtime-Y_bBpyJl.js} +1 -1
  170. package/dist/cdn/chunks/socialIcons-CkZSYpoG.js +2091 -0
  171. package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +1 -0
  172. package/dist/cdn/chunks/{src-DlFlC9Tt.js → src-B1e5SSYP.js} +84 -84
  173. package/dist/cdn/chunks/{src-DlFlC9Tt.js.map → src-B1e5SSYP.js.map} +1 -1
  174. package/dist/cdn/chunks/{src-dZ4D_tuP.js → src-B77z1iw4.js} +117 -117
  175. package/dist/cdn/chunks/src-B77z1iw4.js.map +1 -0
  176. package/dist/cdn/chunks/{src-DYCDeBDM.js → src-CvLTYGdO.js} +549 -315
  177. package/dist/cdn/chunks/src-CvLTYGdO.js.map +1 -0
  178. package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +2 -4
  179. package/dist/cdn/chunks/{styleConstants-D1Jz-TFU.js.map → styleConstants-v1dNKgJf.js.map} +1 -1
  180. package/dist/cdn/chunks/timeouts-o5Y9BuqI.js +6 -0
  181. package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +1 -0
  182. package/dist/cdn/chunks/{tiptap-BPigZk5G.js → tiptap-B1RfWFzB.js} +3 -3
  183. package/dist/cdn/chunks/tiptap-B1RfWFzB.js.map +1 -0
  184. package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js → useAliveFlag-PuXh83UK.js} +2 -2
  185. package/dist/cdn/chunks/{useAliveFlag-DCB96vzR.js.map → useAliveFlag-PuXh83UK.js.map} +1 -1
  186. package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js → useCloudI18n-kp07GQmk.js} +3 -3
  187. package/dist/cdn/chunks/{useCloudI18n-BBF4waXO.js.map → useCloudI18n-kp07GQmk.js.map} +1 -1
  188. package/dist/cdn/chunks/{useEditorCore-Bb2UcB20.js → useEditorCore-DpCFvHg_.js} +440 -419
  189. package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +1 -0
  190. package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +10 -0
  191. package/dist/cdn/chunks/{useEditorRoot-CTc6O8al.js.map → useEditorRoot-5SBqm90x.js.map} +1 -1
  192. package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js → useI18n-DEqtEgOs.js} +3 -3
  193. package/dist/cdn/chunks/{useI18n-DUlyyIJJ.js.map → useI18n-DEqtEgOs.js.map} +1 -1
  194. package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js → useLogicTag-X8bc5qNl.js} +4 -4
  195. package/dist/cdn/chunks/{useLogicTag-HsyUCQtl.js.map → useLogicTag-X8bc5qNl.js.map} +1 -1
  196. package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js → useMergeTag-DFoOexIQ.js} +6 -6
  197. package/dist/cdn/chunks/{useMergeTag-Dg9pE85U.js.map → useMergeTag-DFoOexIQ.js.map} +1 -1
  198. package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js → usePopoverPosition-Cz9-XiXR.js} +3 -3
  199. package/dist/cdn/chunks/{usePopoverPosition-IbaW6-Ao.js.map → usePopoverPosition-Cz9-XiXR.js.map} +1 -1
  200. package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js → useScrollToBlock-MNzurEZV.js} +3 -3
  201. package/dist/cdn/chunks/{useScrollToBlock-uUa601I4.js.map → useScrollToBlock-MNzurEZV.js.map} +1 -1
  202. package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js → withCurrentFont-D-f61ghC.js} +2 -2
  203. package/dist/cdn/chunks/{withCurrentFont-oLcATrQ8.js.map → withCurrentFont-D-f61ghC.js.map} +1 -1
  204. package/dist/cdn/editor.css +1 -1
  205. package/dist/cdn/editor.js +1319 -1066
  206. package/dist/cdn/editor.js.map +1 -1
  207. package/dist/{check-ClwqRMgv.js → check-DQQzkmIC.js} +1 -1
  208. package/dist/{chevron-down-te6qn-zE.js → chevron-down-CIF4bdon.js} +1 -1
  209. package/dist/{chevron-right-W2hbH1FM.js → chevron-right-Cg7Xu-ev.js} +1 -1
  210. package/dist/{chevron-up-Bf5Zo7o4.js → chevron-up-Csu7ISD-.js} +1 -1
  211. package/dist/{circle-alert-CIEGV5DN.js → circle-alert-YUvIJAgY.js} +1 -1
  212. package/dist/{clock-Y4cx0gkJ.js → clock-CnSIGKQW.js} +1 -1
  213. package/dist/{cdn/chunks/cloud-BHClP3e2.js → cloud-YUYDtdHt.js} +308 -569
  214. package/dist/{copy-BEcsAlfB.js → copy-CUC43md_.js} +1 -1
  215. package/dist/{createCloudRuntime-zNPkF6T9.js → createCloudRuntime-BMDRjL0k.js} +126 -168
  216. package/dist/{createLucideIcon-CYHXK9hn.js → createLucideIcon-BcP1sjdp.js} +6 -6
  217. package/dist/{cdn/chunks/de-DMquBpZM.js → de-CBE6O79z.js} +23 -3
  218. package/dist/{cdn/chunks/de-mMY5yQJu.js → de-D_atmUVB.js} +0 -6
  219. package/dist/{dist-CUWI-IvA.js → dist-Bv_GBr2l.js} +1 -1
  220. package/dist/{dist-DAAJogrx.js → dist-CCqn-RqE.js} +2 -2
  221. package/dist/{dist-DuufrR8O.js → dist-CNqjHA8e.js} +2 -2
  222. package/dist/{dist-tsmnQugO.js → dist-DBG3nh3k.js} +503 -273
  223. package/dist/{editor-modal-AlVLkU91.js → editor-modal--7_9A6j-.js} +20 -20
  224. package/dist/en-BHCMzqib.js +1 -0
  225. package/dist/{en-C8Mp71sO.js → en-CDexnk0p.js} +23 -1
  226. package/dist/{cdn/chunks/en-ChVeGQBY.js → en-DhJLnaBx.js} +0 -6
  227. package/dist/{cdn/chunks/es-Byq4tthI.js → es-BE42B6uN.js} +23 -3
  228. package/dist/{extensions-pjO8VGkM.js → extensions-zwsZlWjH.js} +23 -23
  229. package/dist/{eye-Ddnz8nnm.js → eye-B1bua-ck.js} +1 -1
  230. package/dist/{cdn/chunks/fr-B3j35HEw.js → fr-DlJFPDQR.js} +23 -3
  231. package/dist/{image-up-CM_HC0Dx.js → image-up-BqiO7KCO.js} +1 -1
  232. package/dist/index.d.ts +290 -35
  233. package/dist/{info-DXLmzoeY.js → info-x26nGOo2.js} +1 -1
  234. package/dist/{cdn/chunks/ja-D7txAuGS.js → ja-CUT8gkNI.js} +23 -3
  235. package/dist/{keys-BKFq19a2.js → keys-BymCnLHD.js} +1 -1
  236. package/dist/{link-Cel46wgo.js → link-CezhndyR.js} +1 -1
  237. package/dist/{list-Cl0GwiV9.js → list-DQqdptI0.js} +1 -1
  238. package/dist/{loader-circle-uAwpvfys.js → loader-circle-DCEeoYoi.js} +1 -1
  239. package/dist/{message-circle-DWU1pTM_.js → message-circle-BLGzfv_7.js} +1 -1
  240. package/dist/{cdn/chunks/nl-ClJ3BY3F.js → nl-bXWqqRyS.js} +23 -3
  241. package/dist/{package-CbyG_yU_.js → package-D_kEQCMU.js} +1 -1
  242. package/dist/{pencil-BzoDcwKu.js → pencil-Dct8zGLy.js} +1 -1
  243. package/dist/{plus-8cDvoCjZ.js → plus-BDd0gTEm.js} +1 -1
  244. package/dist/{preRenderCustomBlocks-DMP5RuHl.js → preRenderCustomBlocks-CtKJecE-.js} +3 -3
  245. package/dist/{pt-BR-DibcXcmv.js → pt-BR-2_H4-wlb.js} +23 -1
  246. package/dist/{cdn/chunks/pt-BR-CoCwRUi0.js → pt-BR-BphMoUTw.js} +0 -6
  247. package/dist/{refresh-cw-9WinWixo.js → refresh-cw-tGMRDxr8.js} +1 -1
  248. package/dist/{runtime-dom.esm-bundler-lFF-QG3j.js → runtime-dom.esm-bundler-DYn1z2Xf.js} +1 -1
  249. package/dist/{search-CqgGq1gG.js → search-Bm2cCQpe.js} +1 -1
  250. package/dist/{send-Ceo3c9Db.js → send-sVLaKZ7f.js} +1 -1
  251. package/dist/{shield-check-uDAwur5D.js → shield-check-YhsbXfQc.js} +1 -1
  252. package/dist/{smartphone-CcLaCpGK.js → smartphone-B2W81p02.js} +1 -1
  253. package/dist/socialIcons-Bwv-49EB.js +2167 -0
  254. package/dist/{sparkles-Do9XjAuT.js → sparkles-a1qkBZ8X.js} +1 -1
  255. package/dist/style.css +1 -1
  256. package/dist/{styleConstants-D1Jz-TFU.js → styleConstants-v1dNKgJf.js} +1 -3
  257. package/dist/templatical-editor.js +1409 -1156
  258. package/dist/{text-align-start-DvzC0HQA.js → text-align-start-CTuwQ5YW.js} +1 -1
  259. package/dist/timeouts-o5Y9BuqI.js +4 -0
  260. package/dist/{trash-vlINTx32.js → trash-I3D2peFQ.js} +1 -1
  261. package/dist/{triangle-alert-MRYSJ9T2.js → triangle-alert-CenxmLRE.js} +1 -1
  262. package/dist/{upload-CtNOI6J2.js → upload-uU2cK0Ce.js} +1 -1
  263. package/dist/{useAliveFlag-Dd06mRxe.js → useAliveFlag-BjP0Gxza.js} +1 -1
  264. package/dist/{useCloudI18n-Nwqo7pI_.js → useCloudI18n-CGVEZV3o.js} +2 -2
  265. package/dist/{useEditorCore-PvErWWsp.js → useEditorCore-DRbMRe8F.js} +806 -785
  266. package/dist/{useEditorRoot-BD3piYtD.js → useEditorRoot-BVm2-1N8.js} +2 -2
  267. package/dist/{useI18n-CxVEpurs.js → useI18n-CSh4gO5c.js} +2 -2
  268. package/dist/{useLogicTag-BHn67tDd.js → useLogicTag-zcI6BWIf.js} +3 -3
  269. package/dist/{useMergeTag-CRkm5Ig6.js → useMergeTag-C-iBLlp0.js} +5 -5
  270. package/dist/{usePopoverPosition-CwnH1o5g.js → usePopoverPosition-CMcsMBtK.js} +2 -2
  271. package/dist/{useScrollToBlock-CXmcHQQN.js → useScrollToBlock-CdCQK9QQ.js} +3 -3
  272. package/dist/{vue.runtime.esm-bundler-CAzmrXdD.js → vue.runtime.esm-bundler-DV0Wx4r_.js} +1079 -1080
  273. package/dist/{withCurrentFont-CxRGeHO3.js → withCurrentFont-D62njRLu.js} +1 -1
  274. package/dist/{x-Cd6SFw8r.js → x-KFQ4S-Kz.js} +1 -1
  275. package/package.json +12 -12
  276. package/dist/CloudHeaderExtras-CUSftQdm.js +0 -59
  277. package/dist/CollaboratorBar-5rfopCPx.js +0 -103
  278. package/dist/cdn/chunks/CloudHeaderExtras-B4fhuwc_.js.map +0 -1
  279. package/dist/cdn/chunks/CloudPanels-awqHfJqC.js.map +0 -1
  280. package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js +0 -52
  281. package/dist/cdn/chunks/CollaboratorBar-CS0ivqkr.js.map +0 -1
  282. package/dist/cdn/chunks/Toolbar-C_x2TfFk.js.map +0 -1
  283. package/dist/cdn/chunks/ca-CbNzJM3I.js.map +0 -1
  284. package/dist/cdn/chunks/cloud-BHClP3e2.js.map +0 -1
  285. package/dist/cdn/chunks/createCloudRuntime-Vd0N4elZ.js.map +0 -1
  286. package/dist/cdn/chunks/de-DMquBpZM.js.map +0 -1
  287. package/dist/cdn/chunks/draggable-DrsNwZuB.js.map +0 -1
  288. package/dist/cdn/chunks/en-C8Mp71sO.js.map +0 -1
  289. package/dist/cdn/chunks/en-ChVeGQBY.js.map +0 -1
  290. package/dist/cdn/chunks/en-eWpiXyZu.js +0 -1
  291. package/dist/cdn/chunks/es-Byq4tthI.js.map +0 -1
  292. package/dist/cdn/chunks/fr-B3j35HEw.js.map +0 -1
  293. package/dist/cdn/chunks/ja-D7txAuGS.js.map +0 -1
  294. package/dist/cdn/chunks/nl-ClJ3BY3F.js.map +0 -1
  295. package/dist/cdn/chunks/pt-BR-DibcXcmv.js.map +0 -1
  296. package/dist/cdn/chunks/pusher-C8DeiO2X.js.map +0 -1
  297. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js +0 -1279
  298. package/dist/cdn/chunks/socialIcons-C_lnkpG6.js.map +0 -1
  299. package/dist/cdn/chunks/src-DYCDeBDM.js.map +0 -1
  300. package/dist/cdn/chunks/src-dZ4D_tuP.js.map +0 -1
  301. package/dist/cdn/chunks/timeouts-Cv2jvusx.js +0 -6
  302. package/dist/cdn/chunks/timeouts-Cv2jvusx.js.map +0 -1
  303. package/dist/cdn/chunks/tiptap-BPigZk5G.js.map +0 -1
  304. package/dist/cdn/chunks/useEditorCore-Bb2UcB20.js.map +0 -1
  305. package/dist/cdn/chunks/useEditorRoot-CTc6O8al.js +0 -10
  306. package/dist/en-B0FUfNwz.js +0 -1
  307. package/dist/socialIcons-PTiwhLoC.js +0 -1359
  308. package/dist/timeouts-Cv2jvusx.js +0 -4
@@ -74,7 +74,7 @@ function ee(e) {
74
74
  repeat: !1
75
75
  };
76
76
  }
77
- function p(e) {
77
+ function te(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 ne(e) {
86
86
  let t = typeof e?.url == "string" ? e.url.trim() : "";
87
87
  if (!e || !t) return null;
88
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";
89
89
  return {
90
- url: p(t),
90
+ url: te(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 re = [
97
97
  "top",
98
98
  "middle",
99
99
  "bottom"
100
100
  ];
101
- function ne(e) {
101
+ function ie(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 = ne(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 = oe(e.backgroundImage), i = ae(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: re.includes(t.verticalAlign) ? t.verticalAlign : "middle",
122
122
  aspectRatio: r
123
123
  };
124
124
  }
125
- function re(e) {
125
+ function ae(e) {
126
126
  return typeof e == "number" && Number.isFinite(e) && e >= 1;
127
127
  }
128
- function ie(e) {
128
+ function oe(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 p = {
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,23 +198,23 @@ 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
+ }, m = {
202
202
  dark: "#1f1f1f",
203
203
  light: "#ffffff"
204
204
  };
205
- function oe(e) {
205
+ function h(e) {
206
206
  return e === "dark" || e === "light" ? e : void 0;
207
207
  }
208
208
  function se(e, t) {
209
- let n = oe(t);
209
+ let n = h(t);
210
210
  return {
211
- fill: n ? h[n] : ae[e].color,
212
- onFill: n === "light" ? h.dark : "#ffffff"
211
+ fill: n ? m[n] : p[e].color,
212
+ onFill: n === "light" ? m.dark : "#ffffff"
213
213
  };
214
214
  }
215
215
  function ce(e, t) {
216
- if (oe(t) === "dark" && (e === "plain" || e === "outlined")) return {
217
- color: h.light,
216
+ if (h(t) === "dark" && (e === "plain" || e === "outlined")) return {
217
+ color: m.light,
218
218
  opacity: .6,
219
219
  width: 1.4
220
220
  };
@@ -223,27 +223,280 @@ function le(e) {
223
223
  return e === "plain" ? .84 : .6;
224
224
  }
225
225
  function g(e) {
226
- return e.type === "section";
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
+ }));
227
232
  }
228
233
  function ue(e) {
234
+ return typeof e == "object" && !!e && !Array.isArray(e);
235
+ }
236
+ function _(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) => _(e, t[n]));
239
+ if (ue(e)) {
240
+ if (!ue(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) && !_(e[r], t[r])) return !1;
243
+ return !0;
244
+ }
245
+ return !1;
246
+ }
247
+ var de = 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 fe(e) {
256
+ return e === "1" ? 1 : e === "3" ? 3 : 2;
257
+ }
258
+ function pe(e, t, n = {}) {
259
+ let r = g(e);
260
+ return me(r, t, n), r;
261
+ }
262
+ function me(e, t, n = {}) {
263
+ let r = {
264
+ locks: n.locks ?? [],
265
+ session: n.session ?? null
266
+ };
267
+ t.forEach((t, n) => xe(e, t, n, r));
268
+ }
269
+ var he = /* @__PURE__ */ new Set([
270
+ "id",
271
+ "type",
272
+ "children"
273
+ ]), ge = /* @__PURE__ */ new Set();
274
+ function v(e, t, n, r) {
275
+ throw new de(e, t, n, r);
276
+ }
277
+ function y(e) {
278
+ return typeof e == "object" && !!e && !Array.isArray(e);
279
+ }
280
+ function b(e) {
281
+ return e.type === "section";
282
+ }
283
+ function _e(e) {
284
+ return Array.isArray(e.blocks) ? e.blocks : [];
285
+ }
286
+ function ve(e) {
287
+ let t = e.children;
288
+ return Array.isArray(t) ? t.map((e) => Array.isArray(e) ? e : []) : [];
289
+ }
290
+ function x(e, t) {
291
+ let n = _e(e);
292
+ for (let e = 0; e < n.length; e++) {
293
+ let r = n[e];
294
+ if (!y(r)) continue;
295
+ if (r.id === t) return {
296
+ block: r,
297
+ list: n,
298
+ index: e,
299
+ parent: null
300
+ };
301
+ if (!b(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 (y(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 S(e) {
322
+ let t = typeof e.id == "string" ? [e.id] : [];
323
+ if (b(e)) for (let n of ve(e)) t.push(...ye(n));
324
+ return t;
325
+ }
326
+ function ye(e) {
327
+ return e.flatMap((e) => y(e) ? S(e) : []);
328
+ }
329
+ function C(e, t) {
330
+ return typeof e.blockId != "string" || e.blockId === "" ? v("invalid_operation", t, "blockId must be a block id.") : e.blockId;
331
+ }
332
+ function w(e, t) {
333
+ let n = e.parent;
334
+ return n === null ? null : y(n) && typeof n.sectionId == "string" && typeof n.column == "number" && Number.isInteger(n.column) ? {
335
+ sectionId: n.sectionId,
336
+ column: n.column
337
+ } : v("invalid_operation", t, "parent must be null or { \"sectionId\", \"column\" }.");
338
+ }
339
+ function T(e, t) {
340
+ let n = e.after;
341
+ return n === null ? null : typeof n == "string" && n !== "" ? n : v("invalid_operation", t, "after must be null or a block id.");
342
+ }
343
+ function E(e, t) {
344
+ let n = e.expect;
345
+ return n == null ? null : y(n) ? n : v("invalid_operation", t, "expect must be an object.");
346
+ }
347
+ function D(e, t, n) {
348
+ let r = e.set ?? null, i = e.unset ?? [];
349
+ (r !== null && !y(r) || !Array.isArray(i) || !i.every((e) => typeof e == "string")) && v("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 && v("invalid_operation", t, "Set or unset at least one key.");
352
+ for (let e of [...o, ...i]) n.has(e) && v("invalid_operation", t, `"${e}" can't be set or unset.`);
353
+ let s = i.find((e) => o.includes(e));
354
+ return s !== void 0 && v("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 O(e, t, n) {
360
+ if ((!y(e) || typeof e.id != "string" || e.id === "" || typeof e.type != "string") && v("invalid_operation", t, "A block needs a non-empty string id and a string type."), !b(e)) return;
361
+ n && v("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))) && v("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) O(n, t, !0);
365
+ }
366
+ function k(e, t) {
367
+ return e.session === null || t.sessionId !== e.session;
368
+ }
369
+ function A(e, t, n) {
370
+ let r = e.locks.find((n) => t.includes(n.blockId) && k(e, n));
371
+ r && v("lock_held", n, `Block "${r.blockId}" is being edited in another session.`, r.blockId);
372
+ }
373
+ function j(e, t, n, r) {
374
+ for (let [i, a] of Object.entries(t)) a !== void 0 && (_(Object.hasOwn(e, i) && e[i] !== void 0 ? e[i] : null, a) || v("precondition_failed", n, r === void 0 ? `Setting "${i}" has changed since.` : `"${i}" of block "${r}" has changed since.`, r));
375
+ }
376
+ function M(e, t, n) {
377
+ if (t === null) return Array.isArray(e.blocks) || (e.blocks = []), e.blocks;
378
+ let r = x(e, t.sectionId);
379
+ if (!r) return v("block_missing", n, `No section with id "${t.sectionId}".`, t.sectionId);
380
+ if (!b(r.block)) return v("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 ? v("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 N(e, t, n) {
385
+ if (t === null) return 0;
386
+ let r = e.findIndex((e) => y(e) && e.id === t);
387
+ return r === -1 ? v("anchor_missing", n, `No block "${t}" in the target container.`, t) : r + 1;
388
+ }
389
+ function be(e, t, n, r) {
390
+ let i = fe(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 && v("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 P(e, t, n) {
400
+ for (let [n, r] of Object.entries(t)) n === "__proto__" ? Object.defineProperty(e, n, {
401
+ value: g(r),
402
+ writable: !0,
403
+ enumerable: !0,
404
+ configurable: !0
405
+ }) : e[n] = g(r);
406
+ for (let t of n) delete e[t];
407
+ }
408
+ function xe(e, t, n, r) {
409
+ let i = t;
410
+ switch ((!y(i) || typeof i.op != "string") && v("invalid_operation", n, "Each operation must be an object with an \"op\"."), i.op) {
411
+ case "addBlock": return Se(e, i, n);
412
+ case "moveBlock": return Ce(e, i, n, r);
413
+ case "deleteBlock": return we(e, i, n, r);
414
+ case "updateBlock": return Te(e, i, n, r);
415
+ case "updateSettings": return Ee(e, i, n);
416
+ case "setContent": return De(e, i, n, r);
417
+ default: v("invalid_operation", n, `Unknown operation "${i.op}".`);
418
+ }
419
+ }
420
+ function Se(e, t, n) {
421
+ let r = w(t, n), i = T(t, n), a = t.block;
422
+ O(a, n, r !== null);
423
+ let o = new Set(ye(_e(e))), s = /* @__PURE__ */ new Set();
424
+ for (let e of S(a)) (o.has(e) || s.has(e)) && v("block_exists", n, `A block with id "${e}" already exists.`, e), s.add(e);
425
+ let c = M(e, r, n);
426
+ c.splice(N(c, i, n), 0, g(a));
427
+ }
428
+ function Ce(e, t, n, r) {
429
+ let i = C(t, n), a = w(t, n), o = T(t, n), s = E(t, n), c = x(e, i);
430
+ if (!c) return v("block_missing", n, `No block with id "${i}".`, i);
431
+ if (A(r, S(c.block), n), s) {
432
+ let e = c.index > 0 ? c.list[c.index - 1] : null, t = y(e) ? e.id ?? null : null;
433
+ (!_(c.parent, s.parent ?? null) || !_(t, s.after ?? null)) && v("precondition_failed", n, `Block "${i}" has moved since.`, i);
434
+ }
435
+ b(c.block) && a !== null && v("invalid_operation", n, "Sections can only be placed at the top level."), o === i && v("invalid_operation", n, "A block can't be placed after itself.");
436
+ let l = M(e, a, n);
437
+ c.list.splice(c.index, 1), l.splice(N(l, o, n), 0, c.block);
438
+ }
439
+ function we(e, t, n, r) {
440
+ let i = C(t, n), a = E(t, n), o = x(e, i);
441
+ if (!o) return v("block_missing", n, `No block with id "${i}".`, i);
442
+ A(r, S(o.block), n), a && !_(o.block, a.block ?? null) && v("precondition_failed", n, `Block "${i}" has changed since.`, i), o.list.splice(o.index, 1);
443
+ }
444
+ function Te(e, t, n, r) {
445
+ let i = C(t, n), { set: a, unset: o } = D(t, n, he), s = E(t, n), c = x(e, i);
446
+ if (!c) return v("block_missing", n, `No block with id "${i}".`, i);
447
+ let l = c.block, u = b(l);
448
+ u && o.includes("columns") && v("invalid_operation", n, "A section's columns can't be unset; set another layout instead."), A(r, [i], n), s && j(l, s, n, i), u && Object.hasOwn(a, "columns") && be(l, a.columns, n, i), P(l, a, o);
449
+ }
450
+ function Ee(e, t, n) {
451
+ let { set: r, unset: i } = D(t, n, ge), a = E(t, n);
452
+ y(e.settings) || (e.settings = {});
453
+ let o = e.settings;
454
+ a && j(o, a, n), P(o, r, i);
455
+ }
456
+ function De(e, t, n, r) {
457
+ let i = t.content;
458
+ if (!y(i) || !Array.isArray(i.blocks) || !y(i.settings)) return v("invalid_operation", n, "setContent needs content with a blocks array and a settings object.");
459
+ let a = r.locks.find((e) => k(r, e));
460
+ a && v("locked_by_others", n, "Other sessions hold locks on this template.", a.blockId), e.blocks = g(i.blocks), e.settings = g(i.settings);
461
+ }
462
+ var Oe = class extends Error {
463
+ statusCode;
464
+ code;
465
+ constructor(e, t, n) {
466
+ super(e), this.statusCode = t, this.code = n, this.name = "SdkError";
467
+ }
468
+ get isNotFound() {
469
+ return this.statusCode === 404;
470
+ }
471
+ get isUnauthorized() {
472
+ return this.statusCode === 401;
473
+ }
474
+ get isServerError() {
475
+ return this.statusCode !== void 0 && this.statusCode >= 500;
476
+ }
477
+ };
478
+ function F(e) {
479
+ return e.type === "section";
480
+ }
481
+ function ke(e) {
229
482
  return e.type === "custom";
230
483
  }
231
- function _(e) {
484
+ function I(e) {
232
485
  return e.type === "slot";
233
486
  }
234
- function v(e) {
487
+ function L(e) {
235
488
  return e.type === "wrapper";
236
489
  }
237
- var de = {
490
+ var R = {
238
491
  content: "<p>Enter your title</p>",
239
492
  level: 2,
240
493
  textAlign: "left"
241
- }, fe = { content: "<p>Enter your text here</p>" }, pe = {
494
+ }, Ae = { content: "<p>Enter your text here</p>" }, je = {
242
495
  src: "",
243
496
  alt: "",
244
497
  width: "full",
245
498
  align: "center"
246
- }, me = {
499
+ }, Me = {
247
500
  text: "Click Here",
248
501
  url: "",
249
502
  backgroundColor: "#333333",
@@ -257,36 +510,36 @@ var de = {
257
510
  left: 24
258
511
  },
259
512
  align: "center"
260
- }, he = {
513
+ }, Ne = {
261
514
  lineStyle: "solid",
262
515
  color: "#e0e0e0",
263
516
  thickness: 1,
264
517
  width: "full"
265
- }, y = { columns: "1" }, b = {
518
+ }, Pe = { columns: "1" }, Fe = {
266
519
  url: "",
267
520
  thumbnailUrl: "",
268
521
  alt: "Video",
269
522
  width: "full",
270
523
  align: "center"
271
- }, x = {
524
+ }, Ie = {
272
525
  iconStyle: "solid",
273
526
  iconSize: "medium",
274
527
  spacing: 10,
275
528
  align: "center"
276
- }, S = { height: 24 }, C = { content: "" }, w = {
529
+ }, Le = { height: 24 }, Re = { content: "" }, ze = {
277
530
  fontSize: 15,
278
531
  textAlign: "center",
279
532
  separator: "|",
280
533
  separatorColor: "#e0e0e0",
281
534
  spacing: 10
282
- }, T = {
535
+ }, Be = {
283
536
  hasHeaderRow: !0,
284
537
  borderColor: "#e0e0e0",
285
538
  borderWidth: 1,
286
539
  cellPadding: 8,
287
540
  fontSize: 15,
288
541
  textAlign: "left"
289
- }, E = {
542
+ }, Ve = {
290
543
  targetDate: "",
291
544
  timezone: "UTC",
292
545
  showDays: !0,
@@ -306,21 +559,21 @@ var de = {
306
559
  expiredMessage: "This offer has expired",
307
560
  expiredImageUrl: "",
308
561
  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 = {
562
+ }, He = {
563
+ title: R,
564
+ paragraph: Ae,
565
+ image: je,
566
+ button: Me,
567
+ divider: Ne,
568
+ section: Pe,
569
+ video: Fe,
570
+ social: Ie,
571
+ spacer: Le,
572
+ html: Re,
573
+ menu: ze,
574
+ table: Be,
575
+ countdown: Ve
576
+ }, Ue = {
324
577
  width: 600,
325
578
  backgroundColor: "#ffffff",
326
579
  textColor: "#1a1a1a",
@@ -328,28 +581,28 @@ var de = {
328
581
  fontFamily: "Arial",
329
582
  locale: "en"
330
583
  };
331
- function O(e) {
584
+ function We(e) {
332
585
  return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
333
586
  }
334
- function k(e, t) {
587
+ function z(e, t) {
335
588
  let n = { ...e };
336
589
  for (let r of Object.keys(t)) {
337
590
  let i = e[r], a = t[r];
338
- a !== void 0 && (n[r] = O(i) && O(a) ? k(i, a) : a);
591
+ a !== void 0 && (n[r] = We(i) && We(a) ? z(i, a) : a);
339
592
  }
340
593
  return n;
341
594
  }
342
- function _e(e = "Arial", t) {
595
+ function Ge(e = "Arial", t) {
343
596
  return {
344
597
  blocks: [],
345
598
  settings: {
346
- ...D,
599
+ ...Ue,
347
600
  fontFamily: e,
348
601
  ...t
349
602
  }
350
603
  };
351
604
  }
352
- var ve = [
605
+ var Ke = [
353
606
  "ar",
354
607
  "he",
355
608
  "iw",
@@ -363,32 +616,24 @@ var ve = [
363
616
  "ckb",
364
617
  "ks"
365
618
  ];
366
- function ye(e) {
619
+ function qe(e) {
367
620
  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";
621
+ return !!t && Ke.includes(t);
372
622
  }
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
- }));
623
+ function Je(e) {
624
+ return e.direction === "ltr" || e.direction === "rtl" ? e.direction : qe(e.locale) ? "rtl" : "ltr";
380
625
  }
381
- function j(e, t) {
382
- let n = A(e);
383
- return !t || Object.keys(t).length === 0 ? n : k(n, t);
626
+ function B(e, t) {
627
+ let n = g(e);
628
+ return !t || Object.keys(t).length === 0 ? n : z(n, t);
384
629
  }
385
- function M(e) {
386
- return e === void 0 ? void 0 : A(e);
630
+ function V(e) {
631
+ return e === void 0 ? void 0 : g(e);
387
632
  }
388
- function N() {
633
+ function H() {
389
634
  return crypto.randomUUID();
390
635
  }
391
- function xe(e = 0) {
636
+ function Ye(e = 0) {
392
637
  return {
393
638
  top: e,
394
639
  right: e,
@@ -396,135 +641,135 @@ function xe(e = 0) {
396
641
  left: e
397
642
  };
398
643
  }
399
- function P(e = 10) {
400
- return { padding: xe(e) };
644
+ function U(e = 10) {
645
+ return { padding: Ye(e) };
401
646
  }
402
- function F(e = {}) {
403
- return j({
404
- id: N(),
647
+ function Xe(e = {}) {
648
+ return B({
649
+ id: H(),
405
650
  type: "title",
406
- ...de,
407
- styles: P()
651
+ ...R,
652
+ styles: U()
408
653
  }, e);
409
654
  }
410
- function I(e = {}) {
411
- return j({
412
- id: N(),
655
+ function Ze(e = {}) {
656
+ return B({
657
+ id: H(),
413
658
  type: "paragraph",
414
- ...fe,
415
- styles: P()
659
+ ...Ae,
660
+ styles: U()
416
661
  }, e);
417
662
  }
418
- function L(e = {}) {
419
- return j({
420
- id: N(),
663
+ function Qe(e = {}) {
664
+ return B({
665
+ id: H(),
421
666
  type: "image",
422
- ...pe,
423
- styles: P()
667
+ ...je,
668
+ styles: U()
424
669
  }, e);
425
670
  }
426
- function R(e = {}) {
427
- return j({
428
- id: N(),
671
+ function $e(e = {}) {
672
+ return B({
673
+ id: H(),
429
674
  type: "button",
430
- ...me,
431
- styles: P()
675
+ ...Me,
676
+ styles: U()
432
677
  }, e);
433
678
  }
434
- function z(e = {}) {
435
- return j({
436
- id: N(),
679
+ function W(e = {}) {
680
+ return B({
681
+ id: H(),
437
682
  type: "divider",
438
- ...he,
439
- styles: P(20)
683
+ ...Ne,
684
+ styles: U(20)
440
685
  }, e);
441
686
  }
442
- function B(e = {}) {
443
- return j({
444
- id: N(),
687
+ function et(e = {}) {
688
+ return B({
689
+ id: H(),
445
690
  type: "section",
446
- ...y,
691
+ ...Pe,
447
692
  children: [[]],
448
- styles: P(20)
693
+ styles: U(20)
449
694
  }, e);
450
695
  }
451
- function V(e = {}) {
452
- return j({
453
- id: N(),
696
+ function tt(e = {}) {
697
+ return B({
698
+ id: H(),
454
699
  type: "video",
455
- ...b,
456
- styles: P()
700
+ ...Fe,
701
+ styles: U()
457
702
  }, e);
458
703
  }
459
- function Se(e = {}) {
460
- return j({
461
- id: N(),
704
+ function nt(e = {}) {
705
+ return B({
706
+ id: H(),
462
707
  type: "social",
463
708
  icons: [],
464
- ...x,
465
- styles: P()
709
+ ...Ie,
710
+ styles: U()
466
711
  }, e);
467
712
  }
468
- function H(e = {}) {
469
- return j({
470
- id: N(),
713
+ function rt(e = {}) {
714
+ return B({
715
+ id: H(),
471
716
  type: "spacer",
472
- ...S,
473
- styles: P(0)
717
+ ...Le,
718
+ styles: U(0)
474
719
  }, e);
475
720
  }
476
- function U(e = {}) {
477
- return j({
478
- id: N(),
721
+ function it(e = {}) {
722
+ return B({
723
+ id: H(),
479
724
  type: "html",
480
- ...C,
481
- styles: P()
725
+ ...Re,
726
+ styles: U()
482
727
  }, e);
483
728
  }
484
- function W(e = {}) {
485
- return j({
486
- id: N(),
729
+ function at(e = {}) {
730
+ return B({
731
+ id: H(),
487
732
  type: "menu",
488
733
  items: [],
489
- ...w,
490
- styles: P()
734
+ ...ze,
735
+ styles: U()
491
736
  }, e);
492
737
  }
493
- function Ce(e, t) {
738
+ function ot(e, t) {
494
739
  return Array.from({ length: t }, () => ({
495
- id: N(),
740
+ id: H(),
496
741
  cells: Array.from({ length: e }, () => ({
497
- id: N(),
742
+ id: H(),
498
743
  content: ""
499
744
  }))
500
745
  }));
501
746
  }
502
- function we(e = {}) {
503
- return j({
504
- id: N(),
747
+ function st(e = {}) {
748
+ return B({
749
+ id: H(),
505
750
  type: "table",
506
- rows: Ce(3, 3),
507
- ...T,
508
- styles: P()
751
+ rows: ot(3, 3),
752
+ ...Be,
753
+ styles: U()
509
754
  }, e);
510
755
  }
511
- function Te(e = {}) {
512
- return j({
513
- id: N(),
756
+ function ct(e = {}) {
757
+ return B({
758
+ id: H(),
514
759
  type: "countdown",
515
- ...E,
516
- styles: P()
760
+ ...Ve,
761
+ styles: U()
517
762
  }, e);
518
763
  }
519
- function Ee(e) {
764
+ function lt(e) {
520
765
  return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
521
766
  }
522
- function De(e) {
767
+ function ut(e) {
523
768
  let t = {};
524
- for (let n of e.fields) t[n.key] = M(Ee(n));
525
- let n = j(P(), M(e.defaultStyles));
769
+ for (let n of e.fields) t[n.key] = V(lt(n));
770
+ let n = B(U(), V(e.defaultStyles));
526
771
  return {
527
- id: N(),
772
+ id: H(),
528
773
  type: "custom",
529
774
  customType: e.type,
530
775
  fieldValues: t,
@@ -532,36 +777,36 @@ function De(e) {
532
777
  ...e.dataSource ? { dataSourceFetched: !1 } : {}
533
778
  };
534
779
  }
535
- function Oe() {
780
+ function dt() {
536
781
  return {
537
- id: N(),
782
+ id: H(),
538
783
  type: "slot",
539
- styles: P(0)
784
+ styles: U(0)
540
785
  };
541
786
  }
542
- function ke(e = {}) {
543
- return j({
544
- id: N(),
787
+ function ft(e = {}) {
788
+ return B({
789
+ id: H(),
545
790
  type: "wrapper",
546
791
  children: [],
547
- styles: P(0)
792
+ styles: U(0)
548
793
  }, e);
549
794
  }
550
- function Ae(e, t) {
795
+ function pt(e, t) {
551
796
  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));
797
+ case "section": return et(V(t?.section));
798
+ case "title": return Xe(V(t?.title));
799
+ case "paragraph": return Ze(V(t?.paragraph));
800
+ case "image": return Qe(V(t?.image));
801
+ case "button": return $e(V(t?.button));
802
+ case "divider": return W(V(t?.divider));
803
+ case "video": return tt(V(t?.video));
804
+ case "social": return nt(V(t?.social));
805
+ case "spacer": return rt(V(t?.spacer));
806
+ case "html": return it(V(t?.html));
807
+ case "menu": return at(V(t?.menu));
808
+ case "table": return st(V(t?.table));
809
+ case "countdown": return ct(V(t?.countdown));
565
810
  case "slot": throw Error("[Templatical] slot cannot be inserted into content. Use createSlotBlock() to build a layout.");
566
811
  case "wrapper": throw Error("[Templatical] wrapper cannot be inserted into content. Use createWrapperBlock() to build a layout.");
567
812
  default: throw Error(`Unknown block type: ${e}`);
@@ -569,107 +814,107 @@ function Ae(e, t) {
569
814
  }
570
815
  function G(e) {
571
816
  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();
817
+ if (t.id = H(), t.type === "table") for (let e of t.rows) {
818
+ e.id = H();
819
+ for (let t of e.cells) t.id = H();
575
820
  }
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();
821
+ if (t.type === "menu") for (let e of t.items) e.id = H();
822
+ if (t.type === "social") for (let e of t.icons) e.id = H();
578
823
  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
824
  }
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";
825
+ var mt = "[Templatical] layout: must contain exactly one slot block", ht = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", gt = "[Templatical] layout: a wrapper cannot contain a wrapper", _t = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", vt = "[Templatical] slot is not a valid content block", yt = "[Templatical] wrapper is not a valid content block";
581
826
  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);
827
+ for (let i of e) if (t(i, n, r), F(i)) for (let e of i.children) K(e, t, i, !0);
828
+ else L(i) && K(i.children, t, i, r);
584
829
  }
585
- function Le(e) {
830
+ function bt(e) {
586
831
  let t = 0;
587
832
  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);
833
+ if (I(e) && (t += 1, r)) throw Error(ht);
834
+ if (L(e)) {
835
+ if (r) throw Error(ht);
836
+ if (e.children.some(L)) throw Error(gt);
592
837
  }
593
- }), t !== 1) throw Error(je);
838
+ }), t !== 1) throw Error(mt);
594
839
  }
595
- function Re(e) {
840
+ function xt(e) {
596
841
  K(e.blocks, (e) => {
597
- if (_(e)) throw Error(Fe);
842
+ if (I(e)) throw Error(vt);
598
843
  });
599
844
  }
600
- function ze(e) {
845
+ function St(e) {
601
846
  K(e.blocks, (e) => {
602
- if (v(e)) throw Error(Ie);
847
+ if (L(e)) throw Error(yt);
603
848
  });
604
849
  }
605
- function Be(e) {
850
+ function Ct(e) {
606
851
  let t = !1;
607
852
  return K(e.blocks, (e, n) => {
608
- _(e) && n !== null && v(n) && (t = !0);
853
+ I(e) && n !== null && L(n) && (t = !0);
609
854
  }), t;
610
855
  }
611
- function Ve(e) {
612
- if (_(e)) return e;
613
- if (v(e)) {
856
+ function wt(e) {
857
+ if (I(e)) return e;
858
+ if (L(e)) {
614
859
  let t = G({
615
860
  ...e,
616
861
  children: []
617
862
  });
618
- return t.children = e.children.map(Ve), t;
863
+ return t.children = e.children.map(wt), t;
619
864
  }
620
865
  return G(e);
621
866
  }
622
- function He(e) {
867
+ function Tt(e) {
623
868
  for (let t = 0; t < e.length; t++) {
624
869
  let n = e[t];
625
- if (_(n)) return {
870
+ if (I(n)) return {
626
871
  parent: e,
627
872
  index: t
628
873
  };
629
- if (v(n)) {
630
- let e = He(n.children);
874
+ if (L(n)) {
875
+ let e = Tt(n.children);
631
876
  if (e) return e;
632
877
  }
633
878
  }
634
879
  return null;
635
880
  }
636
- function Ue(e) {
637
- for (let t of e) if (g(t)) {
881
+ function Et(e) {
882
+ for (let t of e) if (F(t)) {
638
883
  if (t.wrapper) return !0;
639
- for (let e of t.children) if (Ue(e)) return !0;
884
+ for (let e of t.children) if (Et(e)) return !0;
640
885
  }
641
886
  return !1;
642
887
  }
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)), {
888
+ function Dt(e, t) {
889
+ if (bt(e), xt(t), St(t), Ct(e) && Et(t.blocks)) throw Error(_t);
890
+ let n = e.blocks.map(wt), r = Tt(n);
891
+ if (!r) throw Error(mt);
892
+ return r.parent.splice(r.index, 1, ...g(t.blocks)), {
648
893
  blocks: n,
649
894
  settings: {
650
- ...A(t.settings),
895
+ ...g(t.settings),
651
896
  backgroundColor: e.settings.backgroundColor
652
897
  }
653
898
  };
654
899
  }
655
- var Ge = /* @__PURE__ */ new Set(["\"", "'"]);
656
- function Ke(e, t) {
900
+ var Ot = /* @__PURE__ */ new Set(["\"", "'"]);
901
+ function kt(e, t) {
657
902
  let n = null;
658
903
  for (let r = t; r < e.length; r++) {
659
904
  let t = e[r];
660
905
  if (n !== null) t === n && (n = null);
661
- else if (Ge.has(t)) n = t;
906
+ else if (Ot.has(t)) n = t;
662
907
  else if (t === ">") return r;
663
908
  }
664
909
  return -1;
665
910
  }
666
- function qe(e) {
911
+ function At(e) {
667
912
  return e !== " " && e !== " " && e !== "\n" && e !== "\r" && e !== "\f" && e !== "=" && e !== ">" && e !== "/";
668
913
  }
669
914
  function q(e) {
670
915
  return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
671
916
  }
672
- var Je = {
917
+ var jt = {
673
918
  amp: "&",
674
919
  lt: "<",
675
920
  gt: ">",
@@ -677,22 +922,22 @@ var Je = {
677
922
  apos: "'",
678
923
  nbsp: "\xA0"
679
924
  };
680
- function Ye(e) {
925
+ function Mt(e) {
681
926
  return e.includes("&") ? e.replace(/&(#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g, (e, t) => {
682
927
  if (t[0] === "#") {
683
928
  let n = t[1] === "x" || t[1] === "X" ? Number.parseInt(t.slice(2), 16) : Number.parseInt(t.slice(1), 10);
684
929
  return !Number.isFinite(n) || n < 1 || n > 1114111 || n >= 55296 && n <= 57343 ? e : String.fromCodePoint(n);
685
930
  }
686
- return Je[t.toLowerCase()] ?? e;
931
+ return jt[t.toLowerCase()] ?? e;
687
932
  }) : e;
688
933
  }
689
- function Xe(e, t) {
934
+ function Nt(e, t) {
690
935
  let n = t.toLowerCase(), r = 0;
691
936
  for (; r < e.length;) {
692
937
  for (; r < e.length && (q(e[r]) || e[r] === "/");) r++;
693
938
  if (r >= e.length) break;
694
939
  let t = r;
695
- for (; r < e.length && qe(e[r]);) r++;
940
+ for (; r < e.length && At(e[r]);) r++;
696
941
  let i = e.substring(t, r).toLowerCase();
697
942
  if (i === "") {
698
943
  r++;
@@ -702,27 +947,27 @@ function Xe(e, t) {
702
947
  if (e[r] !== "=") continue;
703
948
  for (r++; r < e.length && q(e[r]);) r++;
704
949
  let a = e[r];
705
- if (Ge.has(a)) {
950
+ if (Ot.has(a)) {
706
951
  let t = r + 1, o = e.indexOf(a, t);
707
952
  if (o === -1) return null;
708
- if (i === n) return Ye(e.substring(t, o));
953
+ if (i === n) return Mt(e.substring(t, o));
709
954
  r = o + 1;
710
955
  continue;
711
956
  }
712
957
  let o = r;
713
958
  for (; r < e.length && !q(e[r]) && e[r] !== ">";) r++;
714
- if (i === n) return Ye(e.substring(o, r));
959
+ if (i === n) return Mt(e.substring(o, r));
715
960
  }
716
961
  return null;
717
962
  }
718
- var Ze = /<\/?p\b[^<>]*>/gi, Qe = /<p\b([^<>]*)>\s*<\/p>/gi;
719
- function $e(e) {
720
- return e.replace(Ze, "").trim() === "";
963
+ var Pt = /<\/?p\b[^<>]*>/gi, Ft = /<p\b([^<>]*)>\s*<\/p>/gi;
964
+ function It(e) {
965
+ return e.replace(Pt, "").trim() === "";
721
966
  }
722
- function et(e) {
723
- return $e(e) ? e : e.replace(Qe, "<p$1>&nbsp;</p>");
967
+ function Lt(e) {
968
+ return It(e) ? e : e.replace(Ft, "<p$1>&nbsp;</p>");
724
969
  }
725
- var tt = {
970
+ var Rt = {
726
971
  arial: "Arial, sans-serif",
727
972
  helvetica: "Helvetica, sans-serif",
728
973
  georgia: "Georgia, serif",
@@ -731,13 +976,13 @@ var tt = {
731
976
  "trebuchet ms": "'Trebuchet MS', sans-serif",
732
977
  "courier new": "'Courier New', monospace",
733
978
  tahoma: "Tahoma, sans-serif"
734
- }, nt = /* @__PURE__ */ new Set([
979
+ }, zt = /* @__PURE__ */ new Set([
735
980
  "inherit",
736
981
  "initial",
737
982
  "unset",
738
983
  "revert",
739
984
  "revert-layer"
740
- ]), rt = /* @__PURE__ */ new Set([
985
+ ]), Bt = /* @__PURE__ */ new Set([
741
986
  "serif",
742
987
  "sans-serif",
743
988
  "monospace",
@@ -752,14 +997,14 @@ var tt = {
752
997
  "math",
753
998
  "fangsong"
754
999
  ]);
755
- function it(e) {
1000
+ function Vt(e) {
756
1001
  return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
757
1002
  }
758
1003
  function J(e) {
759
1004
  if (typeof e != "string") return [];
760
1005
  let t = e.replace(/!\s*important\s*$/i, ""), n = [], r = 0;
761
1006
  for (;;) {
762
- for (; r < t.length && it(t[r]);) r++;
1007
+ for (; r < t.length && Vt(t[r]);) r++;
763
1008
  if (r >= t.length) return [];
764
1009
  let e = t[r];
765
1010
  if (e === "\"" || e === "'") {
@@ -776,7 +1021,7 @@ function J(e) {
776
1021
  }
777
1022
  }
778
1023
  if (!o) return [];
779
- for (; a < t.length && it(t[a]);) a++;
1024
+ for (; a < t.length && Vt(t[a]);) a++;
780
1025
  if (a < t.length && t[a] !== ",") return [];
781
1026
  n.push({
782
1027
  name: i,
@@ -784,7 +1029,7 @@ function J(e) {
784
1029
  }), r = a;
785
1030
  } else {
786
1031
  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 [];
1032
+ if (a === "" || a.includes("\"") || a.includes("'") || zt.has(a.toLowerCase())) return [];
788
1033
  n.push({
789
1034
  name: a,
790
1035
  quoted: !1
@@ -794,22 +1039,22 @@ function J(e) {
794
1039
  r++;
795
1040
  }
796
1041
  }
797
- function at(e) {
1042
+ function Ht(e) {
798
1043
  return `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
799
1044
  }
800
- function ot(e) {
801
- return !e.quoted && rt.has(e.name.toLowerCase());
1045
+ function Ut(e) {
1046
+ return !e.quoted && Bt.has(e.name.toLowerCase());
802
1047
  }
803
- function st(e) {
1048
+ function Wt(e) {
804
1049
  return J(e)[0]?.name ?? "";
805
1050
  }
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);
1051
+ function Gt(e, t) {
1052
+ let n = (e) => `${Ht(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
808
1053
  if (i) return n(i);
809
1054
  let a = J(e);
810
1055
  if (a.length !== 1) return e;
811
1056
  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}`);
1057
+ return c ? n(c) : Rt[s] || (Ut(o) ? e : `${Ht(o.name)}, ${t.defaultFallback}`);
813
1058
  }
814
1059
  var Y = {
815
1060
  liquid: {
@@ -828,33 +1073,33 @@ var Y = {
828
1073
  value: /%%=.+?=%%/g,
829
1074
  logic: /%%\[\s*(\w+).*?\]%%/g
830
1075
  }
831
- }, lt = {
1076
+ }, Kt = {
832
1077
  liquid: "{{",
833
1078
  handlebars: "{{",
834
1079
  mailchimp: "*|",
835
1080
  ampscript: "%%="
836
- }, ut = {
1081
+ }, qt = {
837
1082
  liquid: "}}",
838
1083
  handlebars: "}}",
839
1084
  mailchimp: "|*",
840
1085
  ampscript: "=%%"
841
1086
  };
842
- function dt(e) {
843
- for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return lt[t];
1087
+ function Jt(e) {
1088
+ for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return Kt[t];
844
1089
  return null;
845
1090
  }
846
- function ft(e) {
847
- for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return ut[t];
1091
+ function Yt(e) {
1092
+ for (let t of Object.keys(Y)) if (Y[t].value.source === e.value.source) return qt[t];
848
1093
  return null;
849
1094
  }
850
- function pt(e) {
1095
+ function Xt(e) {
851
1096
  return e ? typeof e == "string" ? Y[e] ?? Y.liquid : e : Y.liquid;
852
1097
  }
853
1098
  function X(e) {
854
1099
  let t = e.source, n = e.flags.replace("g", "");
855
1100
  return RegExp(`^${t}$`, n);
856
1101
  }
857
- function mt(e, t) {
1102
+ function Zt(e, t) {
858
1103
  let n = e?.trim() || "";
859
1104
  return !X(t.logic).test(n) && X(t.value).test(n);
860
1105
  }
@@ -862,41 +1107,41 @@ function Z(e, t) {
862
1107
  let n = t.find((t) => t.value === e);
863
1108
  return n ? n.label : e;
864
1109
  }
865
- function ht(e, t) {
1110
+ function Qt(e, t) {
866
1111
  return $(e, "data-merge-tag", (e) => Z(e, t));
867
1112
  }
868
1113
  function Q(e, t) {
869
1114
  return t.find((t) => t.value === e)?.sample;
870
1115
  }
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 });
1116
+ function $t(e, t) {
1117
+ return $(e, "data-merge-tag", (e) => nn(Q(e, t) ?? Z(e, t)), { unwrap: (e) => Q(e, t) !== void 0 });
873
1118
  }
874
- function _t(e) {
1119
+ function en(e) {
875
1120
  return e.some((e) => e.sample !== void 0);
876
1121
  }
877
- function vt(e, t) {
1122
+ function tn(e, t) {
878
1123
  if (!e) return e;
879
1124
  let n = e;
880
1125
  for (let e of t) e.sample !== void 0 && (n = n.split(e.value).join(e.sample));
881
1126
  return n;
882
1127
  }
883
- function yt(e) {
1128
+ function nn(e) {
884
1129
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
885
1130
  }
886
- function bt(e, t) {
1131
+ function rn(e, t) {
887
1132
  if (!e) return !1;
888
1133
  let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
889
1134
  return n.test(e) || r.test(e);
890
1135
  }
891
- function xt(e, t) {
1136
+ function an(e, t) {
892
1137
  return X(t.logic).test(e?.trim() || "");
893
1138
  }
894
- function St(e, t) {
1139
+ function on(e, t) {
895
1140
  let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
896
1141
  return r && r[1] ? r[1].toUpperCase() : e;
897
1142
  }
898
- function Ct(e, t) {
899
- return $(e, "data-logic-merge-tag", (e) => St(e, t));
1143
+ function sn(e, t) {
1144
+ return $(e, "data-logic-merge-tag", (e) => on(e, t));
900
1145
  }
901
1146
  function $(e, t, n, r) {
902
1147
  let i = "", a = 0;
@@ -911,7 +1156,7 @@ function $(e, t, n, r) {
911
1156
  i += e.substring(a, o + 5), a = o + 5;
912
1157
  continue;
913
1158
  }
914
- let c = Ke(e, o + 5);
1159
+ let c = kt(e, o + 5);
915
1160
  if (c === -1) {
916
1161
  i += e.substring(a);
917
1162
  break;
@@ -921,7 +1166,7 @@ function $(e, t, n, r) {
921
1166
  i += e.substring(a);
922
1167
  break;
923
1168
  }
924
- let u = Xe(e.substring(o + 5, c), t);
1169
+ let u = Nt(e.substring(o + 5, c), t);
925
1170
  if (u === null) {
926
1171
  i += e.substring(a, o + 5), a = o + 5;
927
1172
  continue;
@@ -931,25 +1176,10 @@ function $(e, t, n, r) {
931
1176
  }
932
1177
  return i;
933
1178
  }
934
- function wt(e) {
1179
+ function cn(e) {
935
1180
  if (typeof e != "object" || !e) return !1;
936
1181
  let t = e;
937
1182
  return Array.isArray(t.blocks);
938
1183
  }
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
1184
  //#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 };
1185
+ export { oe as $, at as A, _ as B, $e as C, r as Ct, W as D, Ge as E, bt as Et, rt as F, H as G, te as H, st as I, Z as J, fe as K, Xe as L, et as M, dt as N, it as O, nt as P, en as Q, tt as R, pt as S, n as St, ut as T, t as Tt, Lt as U, z as V, Wt as W, Yt as X, Q as Y, Jt as Z, xt as _, se as _t, He as a, I as at, rn as b, $t as bt, de as c, J as ct, Y as d, Gt as dt, ke as et, Oe as f, ie as ft, me as g, g as gt, pe as h, Xt as ht, e as i, F as it, Ze as j, Qe as k, l, ne as lt, Dt as m, Qt as mt, f as n, Zt as nt, Ue as o, L as ot, c as p, sn as pt, on as q, i as r, cn as rt, s, Ct as st, d as t, an as tt, p as u, Je as ut, St as v, le as vt, ct as w, o as wt, ee as x, tn as xt, G as y, ce as yt, ft as z };