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