@templatical/editor 0.59.2 → 0.60.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiAltTextPopover-BhWHOOKX.js → AiAltTextPopover-DSA1wiiW.js} +1 -1
- package/dist/{AiAltTextReview-CmW7pLmo.js → AiAltTextReview-B9-vfzCj.js} +1 -1
- package/dist/{AiChatPanel-CV0mCtad.js → AiChatPanel-DPoq2Til.js} +8 -8
- package/dist/{AiPanels-C8M7q_vM.js → AiPanels-UdfhAzzu.js} +1 -1
- package/dist/{AiRewriteMenu-DC2ZLH5L.js → AiRewriteMenu-BaeMlSEx.js} +8 -8
- package/dist/{BlockIssueBadge-B8sl9BM1.js → BlockIssueBadge-DQ_6NI4p.js} +2 -2
- package/dist/{BlockPreviewCanvas-yhOQAQhJ.js → BlockPreviewCanvas-DWDfih6j.js} +19 -44
- package/dist/{CloudPanels-CD0lsL0R.js → CloudPanels-ClHDM3ge.js} +3 -3
- package/dist/{CollaborationNotices-DrMrP73M.js → CollaborationNotices-PqWv0q8W.js} +1 -1
- package/dist/{CollaboratorBar-TsK872uC.js → CollaboratorBar-p-_PWqXW.js} +1 -1
- package/dist/{CommentsPanel-BX8JVrXU.js → CommentsPanel-BUo-YhSX.js} +1 -1
- package/dist/{CommentsSidebar-BUlseNwL.js → CommentsSidebar-D_Pz7FPz.js} +10 -10
- package/dist/{CountdownToolbar-dx3FVRjh.js → CountdownToolbar-DYFSFwkD.js} +4 -4
- package/dist/{IssuesPanel-BwnvXxBC.js → IssuesPanel-C7mBrK6a.js} +9 -9
- package/dist/{LanguageMenu-Cf5bKocE.js → LanguageMenu-f7js1FF8.js} +12 -12
- package/dist/{LocaleNotices-CGEp0pQ8.js → LocaleNotices-CAvDAawJ.js} +2 -2
- package/dist/{LogicTagInsertButton-BdDe-vrZ.js → LogicTagInsertButton-Clc3JTg_.js} +16 -16
- package/dist/{MediaEditModal-BWOqjEZN.js → MediaEditModal-YXOL0d_y.js} +1 -1
- package/dist/{MediaPanels-C-XrldMu.js → MediaPanels-VCv5epgs.js} +1 -1
- package/dist/{MergeTagInput-CTTi-eB0.js → MergeTagInput-B5a9noTB.js} +1 -1
- package/dist/{MergeTagModeToggle-Bd0svGQm.js → MergeTagModeToggle-D1r2aH5x.js} +4 -4
- package/dist/{MergeTagTextarea-DiahMV-3.js → MergeTagTextarea-CA9dPfMH.js} +5 -5
- package/dist/{ParagraphEditor-Db1cmj8Y.js → ParagraphEditor-ByzfpepN.js} +43 -43
- package/dist/{RestoreVersionDialog-DA1Z0q9Z.js → RestoreVersionDialog-Da5sTCFI.js} +3 -3
- package/dist/{RichTextEditorContent-CyO6e4ZG.js → RichTextEditorContent-gnRxu4-L.js} +4 -4
- package/dist/{SaveBlockDialog-D7SaFxa_.js → SaveBlockDialog-BM1Fki_2.js} +7 -7
- package/dist/{SavedBlocksBrowserModal-B5r3LWWG.js → SavedBlocksBrowserModal-DHOTdJKB.js} +9 -9
- package/dist/{SavedBlocksPanels-BH2f7jm-.js → SavedBlocksPanels-BJ2OM0cG.js} +1 -1
- package/dist/{SavedBlocksPickBar-B24TScw0.js → SavedBlocksPickBar-C4Bv1K_9.js} +2 -2
- package/dist/{TemplateSettings-CuN9Vkl_.js → TemplateSettings-DsaSsCC8.js} +8 -8
- package/dist/{TestEmailModal-C4DAaohi.js → TestEmailModal-CMo0cJik.js} +8 -8
- package/dist/{TestEmailPanel-DoMcVJSE.js → TestEmailPanel-B2OoOy9K.js} +1 -1
- package/dist/{TitleEditor-b5Pr_m9j.js → TitleEditor--gFbrR7V.js} +9 -9
- package/dist/{Toolbar-BOf7Y862.js → Toolbar-UXT03-Dc.js} +1003 -792
- package/dist/{TplModal-DAcXzBJh.js → TplModal-DkoyIwy1.js} +1 -1
- package/dist/{VersionHistoryMenu-TbIGteNi.js → VersionHistoryMenu-D-RCk3oB.js} +5 -5
- package/dist/{VersionHistoryPanels-Ia6ipOqG.js → VersionHistoryPanels-TzzRlmqK.js} +1 -1
- package/dist/{VersionPreviewBanner-CRfu6quf.js → VersionPreviewBanner-DMg2sw3V.js} +1 -1
- package/dist/{WrapperBlock-BZenrXM6.js → WrapperBlock-B4mdW2CP.js} +3 -3
- package/dist/{blockTypeIcons-DdYZy8yG.js → blockTypeIcons-MX-xQH_Z.js} +3 -3
- package/dist/bundle-stats.json +6 -6
- package/dist/{cdn/chunks/ca-YfIxwO1G.js → ca-C8N05sCU.js} +10 -4
- package/dist/cdn/chunks/{AiAltTextPopover-CcX_OMUU.js → AiAltTextPopover-BLNN_Pnd.js} +2 -2
- package/dist/cdn/chunks/AiAltTextPopover-BLNN_Pnd.js.map +1 -0
- package/dist/cdn/chunks/{AiAltTextReview-Dmm3h0jd.js → AiAltTextReview-Db8vSNpe.js} +2 -2
- package/dist/cdn/chunks/AiAltTextReview-Db8vSNpe.js.map +1 -0
- package/dist/cdn/chunks/{AiChatPanel-DV23DJ-2.js → AiChatPanel-cIT2haLo.js} +2 -2
- package/dist/cdn/chunks/AiChatPanel-cIT2haLo.js.map +1 -0
- package/dist/cdn/chunks/{AiPanels-CxhOpMAp.js → AiPanels-B4GG8w3J.js} +2 -2
- package/dist/cdn/chunks/AiPanels-B4GG8w3J.js.map +1 -0
- package/dist/cdn/chunks/{AiRewriteMenu-87-O514r.js → AiRewriteMenu-C34wZVcW.js} +6 -6
- package/dist/cdn/chunks/AiRewriteMenu-C34wZVcW.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-Dp06vQd3.js → BlockIssueBadge-C50pmOMZ.js} +2 -2
- package/dist/cdn/chunks/BlockIssueBadge-C50pmOMZ.js.map +1 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-DQGzUvZ5.js → BlockPreviewCanvas-CUOrwkWR.js} +20 -45
- package/dist/cdn/chunks/BlockPreviewCanvas-CUOrwkWR.js.map +1 -0
- package/dist/cdn/chunks/CloudHeaderExtras-Cd-ePldd.js.map +1 -1
- package/dist/cdn/chunks/{CloudPanels-D8fchoYt.js → CloudPanels-BAGDHObm.js} +3 -3
- package/dist/cdn/chunks/CloudPanels-BAGDHObm.js.map +1 -0
- package/dist/cdn/chunks/{CollaborationNotices-DNEs3g9B.js → CollaborationNotices-CTmjjbHv.js} +2 -2
- package/dist/cdn/chunks/CollaborationNotices-CTmjjbHv.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-CN6XAlbn.js → CollaboratorBar-CzHjawjF.js} +2 -2
- package/dist/cdn/chunks/CollaboratorBar-CzHjawjF.js.map +1 -0
- package/dist/cdn/chunks/{CommentsPanel-CxZ1kFcK.js → CommentsPanel-Dh0_eRBe.js} +2 -2
- package/dist/cdn/chunks/CommentsPanel-Dh0_eRBe.js.map +1 -0
- package/dist/cdn/chunks/{CommentsSidebar-DCr2mV8b.js → CommentsSidebar-JxZ-O2mY.js} +2 -2
- package/dist/cdn/chunks/CommentsSidebar-JxZ-O2mY.js.map +1 -0
- package/dist/cdn/chunks/CountdownBlock--hlKE2aj.js.map +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CUTbVPPV.js → CountdownToolbar-BBiK9EaU.js} +5 -5
- package/dist/cdn/chunks/CountdownToolbar-BBiK9EaU.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-BhcSzwuL.js → IssuesPanel-BtAn12hl.js} +4 -4
- package/dist/cdn/chunks/IssuesPanel-BtAn12hl.js.map +1 -0
- package/dist/cdn/chunks/{LanguageMenu-6wGhkyFT.js → LanguageMenu-BDldm-Hp.js} +7 -7
- package/dist/cdn/chunks/LanguageMenu-BDldm-Hp.js.map +1 -0
- package/dist/cdn/chunks/{LocaleNotices-Br92Xueo.js → LocaleNotices-CzrNKR-N.js} +2 -2
- package/dist/cdn/chunks/LocaleNotices-CzrNKR-N.js.map +1 -0
- package/dist/cdn/chunks/{LogicTagInsertButton-r2EVUtDU.js → LogicTagInsertButton-B4wuPoMa.js} +5 -5
- package/dist/cdn/chunks/LogicTagInsertButton-B4wuPoMa.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-CfgN7Jyi.js → MediaEditModal-DJ2wxInt.js} +2 -2
- package/dist/cdn/chunks/MediaEditModal-DJ2wxInt.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-Cb5vsgb-.js → MediaPanels-BJawNjr9.js} +2 -2
- package/dist/cdn/chunks/MediaPanels-BJawNjr9.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagInput-Dh3N6CEV.js → MergeTagInput-DZD-p4nR.js} +2 -2
- package/dist/cdn/chunks/MergeTagInput-DZD-p4nR.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagModeToggle-D6u3hMrI.js → MergeTagModeToggle-DGuJCgqO.js} +3 -3
- package/dist/cdn/chunks/MergeTagModeToggle-DGuJCgqO.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagTextarea-BpVtpiNL.js → MergeTagTextarea-BRiaRBr_.js} +7 -7
- package/dist/cdn/chunks/MergeTagTextarea-BRiaRBr_.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-DGJmPAC1.js → ParagraphEditor-CPYQXRIc.js} +23 -23
- package/dist/cdn/chunks/ParagraphEditor-CPYQXRIc.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-D5qeCa0F.js → RestoreVersionDialog-NjbHial9.js} +3 -3
- package/dist/cdn/chunks/RestoreVersionDialog-NjbHial9.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DyGiXKKI.js → RichTextEditorContent-CtV0Q0SO.js} +4 -4
- package/dist/cdn/chunks/RichTextEditorContent-CtV0Q0SO.js.map +1 -0
- package/dist/cdn/chunks/{SaveBlockDialog-B0TJYxd8.js → SaveBlockDialog-BZqPkGrE.js} +6 -6
- package/dist/cdn/chunks/SaveBlockDialog-BZqPkGrE.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-D8Ly7LrA.js → SavedBlocksBrowserModal-CqfyRtlX.js} +6 -6
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CqfyRtlX.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-Co1cbWR8.js → SavedBlocksPanels-BILHEdkP.js} +2 -2
- package/dist/cdn/chunks/SavedBlocksPanels-BILHEdkP.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPickBar-DNtVbpm-.js → SavedBlocksPickBar-C9NKqOEU.js} +3 -3
- package/dist/cdn/chunks/SavedBlocksPickBar-C9NKqOEU.js.map +1 -0
- package/dist/cdn/chunks/{TemplateSettings-BRc878ZF.js → TemplateSettings--_ZfbhnU.js} +6 -6
- package/dist/cdn/chunks/TemplateSettings--_ZfbhnU.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-CIui7VfS.js → TestEmailModal-CtfoV82K.js} +7 -7
- package/dist/cdn/chunks/TestEmailModal-CtfoV82K.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-vKvruW_r.js → TestEmailPanel-NK26SU2u.js} +2 -2
- package/dist/cdn/chunks/TestEmailPanel-NK26SU2u.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-BI-9Nnj3.js → TitleEditor-DXN_aOn0.js} +8 -8
- package/dist/cdn/chunks/TitleEditor-DXN_aOn0.js.map +1 -0
- package/dist/cdn/chunks/ToggleSwitch-C0w0srN_.js.map +1 -1
- package/dist/cdn/chunks/{Toolbar-CYnnArxv.js → Toolbar-HCxD4Ifc.js} +918 -707
- package/dist/cdn/chunks/Toolbar-HCxD4Ifc.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-B3nZeGWK.js → TplModal-DzHoLmGo.js} +2 -2
- package/dist/cdn/chunks/TplModal-DzHoLmGo.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryMenu-CMGfAKuV.js → VersionHistoryMenu-CVGlUPwS.js} +2 -2
- package/dist/cdn/chunks/VersionHistoryMenu-CVGlUPwS.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-Bb2ouQg7.js → VersionHistoryPanels-Du8sQry2.js} +2 -2
- package/dist/cdn/chunks/VersionHistoryPanels-Du8sQry2.js.map +1 -0
- package/dist/cdn/chunks/{VersionPreviewBanner-573UP-g4.js → VersionPreviewBanner-5RFz4AQx.js} +2 -2
- package/dist/cdn/chunks/VersionPreviewBanner-5RFz4AQx.js.map +1 -0
- package/dist/cdn/chunks/{WrapperBlock-DVu632LD.js → WrapperBlock-DTayPD6Q.js} +4 -4
- package/dist/cdn/chunks/WrapperBlock-DTayPD6Q.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-CGxNYHVA.js → blockTypeIcons-BOonB9gK.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-CGxNYHVA.js.map → blockTypeIcons-BOonB9gK.js.map} +1 -1
- package/dist/{ca-YfIxwO1G.js → cdn/chunks/ca-C8N05sCU.js} +12 -2
- package/dist/cdn/chunks/ca-C8N05sCU.js.map +1 -0
- package/dist/cdn/chunks/{composables-DY3anqHO.js → composables-BJBr8B4t.js} +611 -592
- package/dist/cdn/chunks/composables-BJBr8B4t.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-B5numxlW.js → createCloudRuntime-CUlw09ix.js} +3 -3
- package/dist/cdn/chunks/{createCloudRuntime-B5numxlW.js.map → createCloudRuntime-CUlw09ix.js.map} +1 -1
- package/dist/{da-CM6DCvRG.js → cdn/chunks/da-Dno_4nGy.js} +12 -2
- package/dist/cdn/chunks/da-Dno_4nGy.js.map +1 -0
- package/dist/{de-Dugz1zXC.js → cdn/chunks/de-DRR5JSkh.js} +12 -2
- package/dist/cdn/chunks/de-DRR5JSkh.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-CXSSZplR.js → editor-modal-BVM_0uoL.js} +4 -4
- package/dist/cdn/chunks/editor-modal-BVM_0uoL.js.map +1 -0
- package/dist/{en-BykoFuFY.js → cdn/chunks/en-DAcLbbpg.js} +12 -2
- package/dist/cdn/chunks/en-DAcLbbpg.js.map +1 -0
- package/dist/cdn/chunks/en-DlDEofnd.js +1 -0
- package/dist/{es-DaWsTkpj.js → cdn/chunks/es-BcEQLQxe.js} +12 -2
- package/dist/cdn/chunks/es-BcEQLQxe.js.map +1 -0
- package/dist/cdn/chunks/{extensions-BWVlr8Ga.js → extensions-BPZirXpF.js} +5 -5
- package/dist/cdn/chunks/extensions-BPZirXpF.js.map +1 -0
- package/dist/{fr-DqwQHtJo.js → cdn/chunks/fr-CNQG7ESr.js} +12 -2
- package/dist/cdn/chunks/fr-CNQG7ESr.js.map +1 -0
- package/dist/cdn/chunks/{icons-C7vjUBLn.js → icons-CWEBTtbR.js} +23 -23
- package/dist/cdn/chunks/{icons-C7vjUBLn.js.map → icons-CWEBTtbR.js.map} +1 -1
- package/dist/cdn/chunks/{ja-BH4MS1Ye.js → ja-CMxWxqSH.js} +11 -3
- package/dist/cdn/chunks/ja-CMxWxqSH.js.map +1 -0
- package/dist/{nl-BQl1_UHv.js → cdn/chunks/nl-BjyYZDkC.js} +12 -2
- package/dist/cdn/chunks/nl-BjyYZDkC.js.map +1 -0
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-Dw3rFvyd.js → normalizeMergeTagMarkup-CExCfSYI.js} +64 -64
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-Dw3rFvyd.js.map → normalizeMergeTagMarkup-CExCfSYI.js.map} +1 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-BGtb8Xbp.js → preRenderCustomBlocks-BLVFtvl8.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-BGtb8Xbp.js.map → preRenderCustomBlocks-BLVFtvl8.js.map} +1 -1
- package/dist/{pt-BR-eyzmU9Vs.js → cdn/chunks/pt-BR-DC2A3C0v.js} +12 -2
- package/dist/cdn/chunks/pt-BR-DC2A3C0v.js.map +1 -0
- package/dist/cdn/chunks/{sanitizeHtml-CLRY8s2s.js → sanitizeHtml-Db0S2JVP.js} +2 -2
- package/dist/cdn/chunks/{sanitizeHtml-CLRY8s2s.js.map → sanitizeHtml-Db0S2JVP.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-kYhdXJ9P.js → socialIcons-WD1cjZDr.js} +495 -517
- package/dist/cdn/chunks/socialIcons-WD1cjZDr.js.map +1 -0
- package/dist/cdn/chunks/{src-DY2kMjoD.js → src-A0kzK-pR.js} +775 -667
- package/dist/cdn/chunks/src-A0kzK-pR.js.map +1 -0
- package/dist/cdn/chunks/src-C9opbQj_.js +684 -0
- package/dist/cdn/chunks/src-C9opbQj_.js.map +1 -0
- package/dist/cdn/chunks/{src-BmzzkUf7.js → src-edESkGqO.js} +708 -603
- package/dist/cdn/chunks/src-edESkGqO.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-B7gxx0aJ.js → tiptap-D9amDW4u.js} +1030 -1027
- package/dist/cdn/chunks/tiptap-D9amDW4u.js.map +1 -0
- package/dist/cdn/chunks/useLocalizedDisplay-Brdkp3KH.js +33 -0
- package/dist/cdn/chunks/{useLocalizedDisplay-B5wMJLru.js.map → useLocalizedDisplay-Brdkp3KH.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-0wkSxy3z.js → useLogicTag-CKtQlJDa.js} +2 -2
- package/dist/cdn/chunks/{useLogicTag-0wkSxy3z.js.map → useLogicTag-CKtQlJDa.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-y3bX8M_6.js → useMergeTag-Dwy3U0PI.js} +2 -2
- package/dist/cdn/chunks/{useMergeTag-y3bX8M_6.js.map → useMergeTag-Dwy3U0PI.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-B42BKo9N.js → withCurrentFont-C4pIesdB.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-B42BKo9N.js.map → withCurrentFont-C4pIesdB.js.map} +1 -1
- package/dist/cdn/editor.js +109 -109
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-ErKdPXG6.js → check-C82yyyf1.js} +1 -1
- package/dist/{chevron-down-C_vv5fZE.js → chevron-down-BaBVjNbM.js} +1 -1
- package/dist/{chevron-right-Cw4GpjFA.js → chevron-right-DkS-bw8X.js} +1 -1
- package/dist/{chevron-up-uijYZoph.js → chevron-up-C1KzUIK4.js} +1 -1
- package/dist/{circle-exclamation-point-CIYHx5Tw.js → circle-exclamation-point-DsmqtTUQ.js} +1 -1
- package/dist/{clock-tnC1IvZk.js → clock-dpIs7vo0.js} +1 -1
- package/dist/{composables-CFTH0Nqb.js → composables-DjCuq6RV.js} +1399 -1380
- package/dist/{createCloudRuntime-BvWlm_38.js → createCloudRuntime-CiEo0wkr.js} +2 -2
- package/dist/{createLucideIcon-CssArtUe.js → createLucideIcon-BSam2AUu.js} +5 -5
- package/dist/{cdn/chunks/da-CM6DCvRG.js → da-Dno_4nGy.js} +10 -4
- package/dist/{cdn/chunks/de-Dugz1zXC.js → de-DRR5JSkh.js} +10 -4
- package/dist/dist-AyAOL8Bj.js +4 -0
- package/dist/{dist-BTUMr4Pb.js → dist-BNrGwgev.js} +2 -2
- package/dist/{dist-CsplpC_6.js → dist-BPVNNdTv.js} +2 -2
- package/dist/{dist-bWIkrMkM.js → dist-C7YLw60i.js} +2 -2
- package/dist/{dist-Clfx1JeL.js → dist-CBnAqr27.js} +2 -2
- package/dist/{dist-CkHJRChP.js → dist-COvAA64n.js} +2 -2
- package/dist/{dist-C-NRkFsp.js → dist-CuRjmtWu.js} +5 -5
- package/dist/{dist-HKEDfp__.js → dist-DG_AWt8v.js} +2 -2
- package/dist/{dist-CMo4K5So.js → dist-DX_IQgcU.js} +802 -696
- package/dist/{dist-DY3WbyCO.js → dist-DYtuc3jc.js} +2 -2
- package/dist/dist-DkPTWQuO.js +4 -0
- package/dist/{dist-DwpKFWF4.js → dist-DoWk1r7z.js} +77 -74
- package/dist/{dist-BlrlMP8f.js → dist-fDsB6dCL.js} +2 -2
- package/dist/{editor-modal-BWvxfSj8.js → editor-modal-odubnc9x.js} +15 -15
- package/dist/en-CAImT1hl.js +1 -0
- package/dist/{cdn/chunks/en-BykoFuFY.js → en-DAcLbbpg.js} +10 -4
- package/dist/{cdn/chunks/es-DaWsTkpj.js → es-BcEQLQxe.js} +10 -4
- package/dist/{extensions-BPVackEE.js → extensions-C7OLgMEj.js} +73 -73
- package/dist/{eye-DK4--qHk.js → eye-CxCHEszj.js} +1 -1
- package/dist/{cdn/chunks/fr-DqwQHtJo.js → fr-CNQG7ESr.js} +10 -4
- package/dist/{image-B5pJOw5Q.js → image-DvXPzqNd.js} +1 -1
- package/dist/index.d.ts +72 -13
- package/dist/{info-DKM0_thN.js → info-2KHWaZ2L.js} +1 -1
- package/dist/{ja-BH4MS1Ye.js → ja-CMxWxqSH.js} +10 -2
- package/dist/{link-BNgTZ_Sw.js → link-_OmrcJMv.js} +1 -1
- package/dist/{list-Bqynqm7o.js → list-Dekd7JE8.js} +1 -1
- package/dist/{loader-circle-BMc3fVpa.js → loader-circle-D_hT5mFS.js} +1 -1
- package/dist/{message-circle-D_TpvAJh.js → message-circle-DDbiG-jz.js} +1 -1
- package/dist/{cdn/chunks/nl-BQl1_UHv.js → nl-BjyYZDkC.js} +10 -4
- package/dist/{normalizeMergeTagMarkup-PQqrbfmt.js → normalizeMergeTagMarkup-Cv5Wvs5f.js} +45 -45
- package/dist/{package-D2fov5PU.js → package-cORUe57D.js} +1 -1
- package/dist/{pencil-BNdkJyfY.js → pencil-D67H4fxq.js} +1 -1
- package/dist/{plus-CWmBmMx-.js → plus-BpTZAx28.js} +1 -1
- package/dist/{preRenderCustomBlocks-Dg5GBNi2.js → preRenderCustomBlocks-6CLw2rP6.js} +3 -3
- package/dist/{cdn/chunks/pt-BR-eyzmU9Vs.js → pt-BR-DC2A3C0v.js} +10 -4
- package/dist/{refresh-cw-Ryg1j66N.js → refresh-cw-B4T0IFwI.js} +1 -1
- package/dist/{rotate-ccw-D8j7gXXv.js → rotate-ccw-BDQgjpuo.js} +1 -1
- package/dist/{sanitizeHtml-DVdfdxOz.js → sanitizeHtml-Ru5_-IbM.js} +6 -6
- package/dist/{search-CX2JkSHz.js → search-Dp9pkaVt.js} +1 -1
- package/dist/{send-BLR1b-p5.js → send-DO9GhgCH.js} +1 -1
- package/dist/{smartphone-Co8m0LLg.js → smartphone-CPW3I3hV.js} +1 -1
- package/dist/{socialIcons-DBHv_ntg.js → socialIcons-CPBiLTjY.js} +561 -583
- package/dist/{sparkles-Dc3Undp5.js → sparkles-CIBjNfij.js} +1 -1
- package/dist/{square-CPw_cyX8.js → square-3W65qrrH.js} +1 -1
- package/dist/templatical-editor.js +139 -139
- package/dist/{text-align-start-2VZGhCiK.js → text-align-start-Bs70tpRU.js} +1 -1
- package/dist/{trash-t6XXliVc.js → trash-CTzhAm1o.js} +1 -1
- package/dist/{triangle-exclamation-point-_YYWE2ZH.js → triangle-exclamation-point-D_13CuJY.js} +1 -1
- package/dist/{upload-BWYXWYHb.js → upload-DFxkP9MI.js} +1 -1
- package/dist/useLocalizedDisplay-DfiE-KjV.js +31 -0
- package/dist/{useLogicTag-CVOj0VUv.js → useLogicTag-K5CPoMTk.js} +1 -1
- package/dist/{useMergeTag-Bams_kam.js → useMergeTag-tsU_Sw2x.js} +3 -3
- package/dist/{useScrollToBlock-CwUQ_nKz.js → useScrollToBlock-194ePl4q.js} +1 -1
- package/dist/withCurrentFont-C-_IYTqP.js +18 -0
- package/dist/{x-CTKOxIyZ.js → x-D7L8mLHJ.js} +1 -1
- package/package.json +22 -22
- package/dist/cdn/chunks/AiAltTextPopover-CcX_OMUU.js.map +0 -1
- package/dist/cdn/chunks/AiAltTextReview-Dmm3h0jd.js.map +0 -1
- package/dist/cdn/chunks/AiChatPanel-DV23DJ-2.js.map +0 -1
- package/dist/cdn/chunks/AiPanels-CxhOpMAp.js.map +0 -1
- package/dist/cdn/chunks/AiRewriteMenu-87-O514r.js.map +0 -1
- package/dist/cdn/chunks/BlockIssueBadge-Dp06vQd3.js.map +0 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-DQGzUvZ5.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-D8fchoYt.js.map +0 -1
- package/dist/cdn/chunks/CollaborationNotices-DNEs3g9B.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar-CN6XAlbn.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-CxZ1kFcK.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-DCr2mV8b.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-CUTbVPPV.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-BhcSzwuL.js.map +0 -1
- package/dist/cdn/chunks/LanguageMenu-6wGhkyFT.js.map +0 -1
- package/dist/cdn/chunks/LocaleNotices-Br92Xueo.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-r2EVUtDU.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-CfgN7Jyi.js.map +0 -1
- package/dist/cdn/chunks/MediaPanels-Cb5vsgb-.js.map +0 -1
- package/dist/cdn/chunks/MergeTagInput-Dh3N6CEV.js.map +0 -1
- package/dist/cdn/chunks/MergeTagModeToggle-D6u3hMrI.js.map +0 -1
- package/dist/cdn/chunks/MergeTagTextarea-BpVtpiNL.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-DGJmPAC1.js.map +0 -1
- package/dist/cdn/chunks/RestoreVersionDialog-D5qeCa0F.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-DyGiXKKI.js.map +0 -1
- package/dist/cdn/chunks/SaveBlockDialog-B0TJYxd8.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-D8Ly7LrA.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPanels-Co1cbWR8.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPickBar-DNtVbpm-.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-BRc878ZF.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-CIui7VfS.js.map +0 -1
- package/dist/cdn/chunks/TestEmailPanel-vKvruW_r.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-BI-9Nnj3.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-CYnnArxv.js.map +0 -1
- package/dist/cdn/chunks/TplModal-B3nZeGWK.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryMenu-CMGfAKuV.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryPanels-Bb2ouQg7.js.map +0 -1
- package/dist/cdn/chunks/VersionPreviewBanner-573UP-g4.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-DVu632LD.js.map +0 -1
- package/dist/cdn/chunks/ca-YfIxwO1G.js.map +0 -1
- package/dist/cdn/chunks/composables-DY3anqHO.js.map +0 -1
- package/dist/cdn/chunks/da-CM6DCvRG.js.map +0 -1
- package/dist/cdn/chunks/de-Dugz1zXC.js.map +0 -1
- package/dist/cdn/chunks/editor-modal-CXSSZplR.js.map +0 -1
- package/dist/cdn/chunks/en-BykoFuFY.js.map +0 -1
- package/dist/cdn/chunks/en-DYMYt1TN.js +0 -1
- package/dist/cdn/chunks/es-DaWsTkpj.js.map +0 -1
- package/dist/cdn/chunks/extensions-BWVlr8Ga.js.map +0 -1
- package/dist/cdn/chunks/fr-DqwQHtJo.js.map +0 -1
- package/dist/cdn/chunks/ja-BH4MS1Ye.js.map +0 -1
- package/dist/cdn/chunks/nl-BQl1_UHv.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-eyzmU9Vs.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-kYhdXJ9P.js.map +0 -1
- package/dist/cdn/chunks/src-B7X7x_ST.js +0 -707
- package/dist/cdn/chunks/src-B7X7x_ST.js.map +0 -1
- package/dist/cdn/chunks/src-BmzzkUf7.js.map +0 -1
- package/dist/cdn/chunks/src-DY2kMjoD.js.map +0 -1
- package/dist/cdn/chunks/tiptap-B7gxx0aJ.js.map +0 -1
- package/dist/cdn/chunks/useLocalizedDisplay-B5wMJLru.js +0 -33
- package/dist/dist-CkIeJEsa.js +0 -4
- package/dist/dist-eAgG-nCb.js +0 -4
- package/dist/en-DvCaYqiR.js +0 -1
- package/dist/useLocalizedDisplay-CbFM0cCV.js +0 -31
- package/dist/withCurrentFont-y0O5kOLW.js +0 -18
|
@@ -45,195 +45,37 @@ var s = {
|
|
|
45
45
|
2: 28,
|
|
46
46
|
3: 22,
|
|
47
47
|
4: 18
|
|
48
|
-
}, c = 1.3, l = 1.2
|
|
48
|
+
}, c = 1.3, l = 1.2;
|
|
49
|
+
function u(e) {
|
|
50
|
+
let t = e.lineHeight;
|
|
51
|
+
return typeof t == "number" && Number.isFinite(t) && t > 0 ? t : l;
|
|
52
|
+
}
|
|
53
|
+
var d = {
|
|
49
54
|
paragraphGap: 8,
|
|
50
55
|
listMarginY: 8,
|
|
51
56
|
listPaddingLeft: 24,
|
|
52
57
|
listItemMarginY: 4
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
"
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"left",
|
|
59
|
-
"center",
|
|
60
|
-
"right"
|
|
61
|
-
], p = [
|
|
62
|
-
"top",
|
|
63
|
-
"center",
|
|
64
|
-
"bottom"
|
|
65
|
-
];
|
|
66
|
-
function ee(e) {
|
|
67
|
-
return {
|
|
68
|
-
url: e,
|
|
69
|
-
size: "cover",
|
|
70
|
-
position: {
|
|
71
|
-
x: "center",
|
|
72
|
-
y: "center"
|
|
73
|
-
},
|
|
74
|
-
repeat: !1
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
function te(e) {
|
|
78
|
-
let t = "";
|
|
79
|
-
for (let n of e) {
|
|
80
|
-
let e = n.charCodeAt(0);
|
|
81
|
-
t += e < 32 || e === 127 || n === "'" || n === "\"" || n === "\\" ? `%${e.toString(16).toUpperCase().padStart(2, "0")}` : n;
|
|
82
|
-
}
|
|
83
|
-
return t;
|
|
84
|
-
}
|
|
85
|
-
function ne(e) {
|
|
86
|
-
let t = typeof e?.url == "string" ? e.url.trim() : "";
|
|
87
|
-
if (!e || !t) return null;
|
|
88
|
-
let n = d.includes(e.size) ? e.size : "cover", r = e.position, i = r && f.includes(r.x) ? r.x : "center", a = r && p.includes(r.y) ? r.y : "center";
|
|
89
|
-
return {
|
|
90
|
-
url: te(t),
|
|
91
|
-
size: n,
|
|
92
|
-
position: `${i} ${a}`,
|
|
93
|
-
repeat: e.repeat ? "repeat" : "no-repeat"
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
// ../types/src/hero.ts
|
|
97
|
-
var re = [
|
|
98
|
-
"top",
|
|
99
|
-
"middle",
|
|
100
|
-
"bottom"
|
|
101
|
-
];
|
|
102
|
-
function ie(e) {
|
|
103
|
-
let t = e.hero;
|
|
104
|
-
if (!t || typeof t != "object") return null;
|
|
105
|
-
if (e.columns !== "1") return {
|
|
106
|
-
applied: !1,
|
|
107
|
-
reason: "columns"
|
|
108
|
-
};
|
|
109
|
-
let n = ne(e.backgroundImage);
|
|
110
|
-
if (n === null) return {
|
|
111
|
-
applied: !1,
|
|
112
|
-
reason: "image"
|
|
113
|
-
};
|
|
114
|
-
let r = oe(e.backgroundImage), i = ae(t.height) ? Math.round(t.height) : "image";
|
|
115
|
-
return i === "image" && r === null ? {
|
|
116
|
-
applied: !1,
|
|
117
|
-
reason: "size"
|
|
118
|
-
} : {
|
|
119
|
-
applied: !0,
|
|
120
|
-
image: n,
|
|
121
|
-
height: i,
|
|
122
|
-
verticalAlign: re.includes(t.verticalAlign) ? t.verticalAlign : "middle",
|
|
123
|
-
aspectRatio: r
|
|
124
|
-
};
|
|
125
|
-
}
|
|
126
|
-
function ae(e) {
|
|
127
|
-
return typeof e == "number" && Number.isFinite(e) && e >= 1;
|
|
58
|
+
}, f = /^(?:100(?:\.0+)?|\d{1,2}(?:\.\d+)?)%$/;
|
|
59
|
+
function p(e) {
|
|
60
|
+
if (typeof e != "string" || !f.test(e)) return null;
|
|
61
|
+
let t = Number(e.slice(0, -1));
|
|
62
|
+
return t > 0 && t <= 100 ? t : null;
|
|
128
63
|
}
|
|
129
|
-
function
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
twitter: {
|
|
140
|
-
color: "#000000",
|
|
141
|
-
path: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
|
|
142
|
-
},
|
|
143
|
-
instagram: {
|
|
144
|
-
color: "#E4405F",
|
|
145
|
-
path: "M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z"
|
|
146
|
-
},
|
|
147
|
-
linkedin: {
|
|
148
|
-
color: "#0A66C2",
|
|
149
|
-
path: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"
|
|
150
|
-
},
|
|
151
|
-
xing: {
|
|
152
|
-
color: "#006567",
|
|
153
|
-
path: "M18.188 0c-.517 0-.741.325-.927.66c0 0-7.455 13.224-7.702 13.657c.015.024 4.919 9.023 4.919 9.023c.17.308.436.66.967.66h3.454c.211 0 .375-.078.463-.22c.089-.151.089-.346-.009-.536l-4.879-8.916a.02.02 0 0 1 0-.022L22.139.756c.095-.191.097-.387.006-.535C22.056.078 21.894 0 21.686 0zM3.648 4.74c-.211 0-.385.074-.473.216c-.09.149-.078.339.02.531l2.34 4.05q.006.014 0 .021L1.86 16.051a.52.52 0 0 0 0 .529c.085.142.239.234.45.234h3.461c.518 0 .766-.348.945-.667l3.734-6.609l-2.378-4.155c-.172-.315-.434-.659-.962-.659H3.648z"
|
|
154
|
-
},
|
|
155
|
-
youtube: {
|
|
156
|
-
color: "#FF0000",
|
|
157
|
-
path: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"
|
|
158
|
-
},
|
|
159
|
-
tiktok: {
|
|
160
|
-
color: "#000000",
|
|
161
|
-
path: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"
|
|
162
|
-
},
|
|
163
|
-
pinterest: {
|
|
164
|
-
color: "#BD081C",
|
|
165
|
-
path: "M12 0C5.373 0 0 5.372 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.218-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.782c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738.098.119.112.224.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12 24c6.627 0 12-5.373 12-12 0-6.628-5.373-12-12-12z"
|
|
166
|
-
},
|
|
167
|
-
email: {
|
|
168
|
-
color: "#6B7280",
|
|
169
|
-
path: "M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z"
|
|
170
|
-
},
|
|
171
|
-
website: {
|
|
172
|
-
color: "#6B7280",
|
|
173
|
-
path: "M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"
|
|
174
|
-
},
|
|
175
|
-
whatsapp: {
|
|
176
|
-
color: "#25D366",
|
|
177
|
-
path: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"
|
|
178
|
-
},
|
|
179
|
-
telegram: {
|
|
180
|
-
color: "#26A5E4",
|
|
181
|
-
path: "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"
|
|
182
|
-
},
|
|
183
|
-
discord: {
|
|
184
|
-
color: "#5865F2",
|
|
185
|
-
path: "M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189z"
|
|
186
|
-
},
|
|
187
|
-
snapchat: {
|
|
188
|
-
color: "#FFFC00",
|
|
189
|
-
path: "M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146 1.124.347 2.317.535 3.554.535 6.627 0 12.017-5.373 12.017-12.001C24.034 5.367 18.644 0 12.017 0z"
|
|
190
|
-
},
|
|
191
|
-
reddit: {
|
|
192
|
-
color: "#FF4500",
|
|
193
|
-
path: "M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"
|
|
194
|
-
},
|
|
195
|
-
github: {
|
|
196
|
-
color: "#181717",
|
|
197
|
-
path: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"
|
|
198
|
-
},
|
|
199
|
-
dribbble: {
|
|
200
|
-
color: "#EA4C89",
|
|
201
|
-
path: "M12 24C5.385 24 0 18.615 0 12S5.385 0 12 0s12 5.385 12 12-5.385 12-12 12zm10.12-10.358c-.35-.11-3.17-.953-6.384-.438 1.34 3.684 1.887 6.684 1.992 7.308 2.3-1.555 3.936-4.02 4.392-6.87zm-6.115 7.808c-.153-.9-.75-4.032-2.19-7.77l-.066.02c-5.79 2.015-7.86 6.025-8.04 6.4 1.73 1.358 3.92 2.166 6.29 2.166 1.42 0 2.77-.29 4-.814zm-11.62-2.58c.232-.4 3.045-5.055 8.332-6.765.135-.045.27-.084.405-.12-.26-.585-.54-1.167-.832-1.74C7.17 11.775 2.206 11.71 1.756 11.7l-.004.312c0 2.633.998 5.037 2.634 6.855zm-2.42-8.955c.46.008 4.683.026 9.477-1.248-1.698-3.018-3.53-5.558-3.8-5.928-2.868 1.35-5.01 3.99-5.676 7.17zM9.6 2.052c.282.38 2.145 2.914 3.822 6 3.645-1.365 5.19-3.44 5.373-3.702-1.81-1.61-4.19-2.586-6.795-2.586-.825 0-1.63.1-2.4.285zm10.335 3.483c-.218.29-1.935 2.493-5.724 4.04.24.49.47.985.68 1.486.08.18.15.36.22.53 3.41-.43 6.8.26 7.14.33-.02-2.42-.88-4.64-2.31-6.38z"
|
|
202
|
-
},
|
|
203
|
-
behance: {
|
|
204
|
-
color: "#1769FF",
|
|
205
|
-
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"
|
|
64
|
+
function ee(e) {
|
|
65
|
+
if (!Number.isFinite(e)) return e;
|
|
66
|
+
let t = te(e, 2);
|
|
67
|
+
return Number.isFinite(t) ? te(Math.round(t), -2) : e;
|
|
68
|
+
}
|
|
69
|
+
function te(e, t) {
|
|
70
|
+
let n = String(e), r = /^(-?\d+(?:\.\d+)?)e([+-]?\d+)$/i.exec(n);
|
|
71
|
+
if (r) {
|
|
72
|
+
let e = Number(r[2]) + t;
|
|
73
|
+
return Number(`${r[1]}e${e}`);
|
|
206
74
|
}
|
|
207
|
-
|
|
208
|
-
dark: "#1f1f1f",
|
|
209
|
-
light: "#ffffff"
|
|
210
|
-
};
|
|
211
|
-
function le(e) {
|
|
212
|
-
return e === "dark" || e === "light" ? e : void 0;
|
|
213
|
-
}
|
|
214
|
-
function ue(e, t) {
|
|
215
|
-
let n = le(t);
|
|
216
|
-
return {
|
|
217
|
-
fill: n ? ce[n] : se[e].color,
|
|
218
|
-
onFill: n === "light" ? ce.dark : "#ffffff"
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
function de(e, t) {
|
|
222
|
-
let n = le(t);
|
|
223
|
-
return n ? `${e}-${n}` : e;
|
|
224
|
-
}
|
|
225
|
-
function fe(e, t) {
|
|
226
|
-
if (le(t) === "dark" && (e === "plain" || e === "outlined")) return {
|
|
227
|
-
color: ce.light,
|
|
228
|
-
opacity: .6,
|
|
229
|
-
width: 1.4
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
function pe(e) {
|
|
233
|
-
return e === "plain" ? .84 : .6;
|
|
75
|
+
return Number(`${n}e${t}`);
|
|
234
76
|
}
|
|
235
77
|
// ../types/src/element-ids.ts
|
|
236
|
-
function
|
|
78
|
+
function ne(e) {
|
|
237
79
|
let t = [], n = (e, n) => {
|
|
238
80
|
typeof e == "string" && /[./]/.test(e) && t.push({
|
|
239
81
|
path: n,
|
|
@@ -261,14 +103,14 @@ function m(e) {
|
|
|
261
103
|
}));
|
|
262
104
|
}
|
|
263
105
|
// ../types/src/deep-equal.ts
|
|
264
|
-
function
|
|
106
|
+
function re(e) {
|
|
265
107
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
266
108
|
}
|
|
267
109
|
function h(e, t) {
|
|
268
110
|
if (e === t) return !0;
|
|
269
111
|
if (Array.isArray(e)) return !Array.isArray(t) || e.length !== t.length ? !1 : e.every((e, n) => h(e, t[n]));
|
|
270
|
-
if (
|
|
271
|
-
if (!
|
|
112
|
+
if (re(e)) {
|
|
113
|
+
if (!re(t)) return !1;
|
|
272
114
|
let n = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
|
|
273
115
|
for (let r of n) if ((e[r] !== void 0 || t[r] !== void 0) && !h(e[r], t[r])) return !1;
|
|
274
116
|
return !0;
|
|
@@ -276,7 +118,7 @@ function h(e, t) {
|
|
|
276
118
|
return !1;
|
|
277
119
|
}
|
|
278
120
|
// ../types/src/config.ts
|
|
279
|
-
var
|
|
121
|
+
var ie = class extends Error {
|
|
280
122
|
statusCode;
|
|
281
123
|
code;
|
|
282
124
|
constructor(e, t, n, r) {
|
|
@@ -291,7 +133,7 @@ var ge = class extends Error {
|
|
|
291
133
|
get isServerError() {
|
|
292
134
|
return this.statusCode !== void 0 && this.statusCode >= 500;
|
|
293
135
|
}
|
|
294
|
-
},
|
|
136
|
+
}, ae = {
|
|
295
137
|
title: ["content"],
|
|
296
138
|
paragraph: ["content"],
|
|
297
139
|
html: ["content"],
|
|
@@ -299,6 +141,7 @@ var ge = class extends Error {
|
|
|
299
141
|
video: ["alt"],
|
|
300
142
|
button: ["text"],
|
|
301
143
|
menu: ["items.*.text"],
|
|
144
|
+
social: ["icons.*.alt"],
|
|
302
145
|
table: ["rows.*.cells.*.content"],
|
|
303
146
|
countdown: [
|
|
304
147
|
"labelDays",
|
|
@@ -309,27 +152,27 @@ var ge = class extends Error {
|
|
|
309
152
|
],
|
|
310
153
|
custom: ["fieldValues.*"]
|
|
311
154
|
}, g = ["preheaderText"];
|
|
312
|
-
function
|
|
155
|
+
function oe(e) {
|
|
313
156
|
return typeof e == "string" && /^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$/.test(e);
|
|
314
157
|
}
|
|
315
158
|
function _(e) {
|
|
316
159
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
317
160
|
}
|
|
318
|
-
var
|
|
161
|
+
var se = /* @__PURE__ */ new Set([
|
|
319
162
|
"__proto__",
|
|
320
163
|
"constructor",
|
|
321
164
|
"prototype"
|
|
322
165
|
]);
|
|
323
166
|
function v(e) {
|
|
324
|
-
return e.split(".").every((e) => e !== "" && !
|
|
167
|
+
return e.split(".").every((e) => e !== "" && !se.has(e));
|
|
325
168
|
}
|
|
326
|
-
function
|
|
327
|
-
if (!
|
|
169
|
+
function ce(e, t) {
|
|
170
|
+
if (!se.has(t)) return Array.isArray(e) ? e.find((e) => _(e) && e.id === t) : _(e) && Object.hasOwn(e, t) ? e[t] : void 0;
|
|
328
171
|
}
|
|
329
172
|
function y(e, t) {
|
|
330
|
-
return t.split(".").reduce(
|
|
173
|
+
return t.split(".").reduce(ce, e);
|
|
331
174
|
}
|
|
332
|
-
function
|
|
175
|
+
function le(e) {
|
|
333
176
|
let t = m(e);
|
|
334
177
|
for (let [n, r] of Object.entries(t.l10n ?? {})) {
|
|
335
178
|
for (let t of ["text", "set"]) {
|
|
@@ -343,23 +186,23 @@ function xe(e) {
|
|
|
343
186
|
}
|
|
344
187
|
return t.l10n && !Object.keys(t.l10n).length && delete t.l10n, h(t, e) ? e : t;
|
|
345
188
|
}
|
|
346
|
-
function
|
|
347
|
-
let t =
|
|
189
|
+
function ue(e) {
|
|
190
|
+
let t = le(e);
|
|
348
191
|
if (t.type === "wrapper") {
|
|
349
|
-
let e = t.children.map(
|
|
192
|
+
let e = t.children.map(ue);
|
|
350
193
|
return e.some((e, n) => e !== t.children[n]) ? {
|
|
351
194
|
...t,
|
|
352
195
|
children: e
|
|
353
196
|
} : t;
|
|
354
197
|
}
|
|
355
198
|
if (t.type !== "section") return t;
|
|
356
|
-
let n = t.children.map((e) => e.map(
|
|
199
|
+
let n = t.children.map((e) => e.map(ue));
|
|
357
200
|
return n.some((e, n) => e.some((e, r) => e !== t.children[n][r])) ? {
|
|
358
201
|
...t,
|
|
359
202
|
children: n
|
|
360
203
|
} : t;
|
|
361
204
|
}
|
|
362
|
-
function
|
|
205
|
+
function de(e, t, n) {
|
|
363
206
|
if (e.type === "custom") return !1;
|
|
364
207
|
if (e.type === "section") return t === "columns";
|
|
365
208
|
let r = e.type === "menu" ? "items" : e.type === "social" ? "icons" : e.type === "table" ? "rows" : null;
|
|
@@ -380,30 +223,30 @@ function Ce(e, t, n) {
|
|
|
380
223
|
}
|
|
381
224
|
return !1;
|
|
382
225
|
}
|
|
383
|
-
function
|
|
384
|
-
return
|
|
226
|
+
function fe(e) {
|
|
227
|
+
return le(e);
|
|
385
228
|
}
|
|
386
229
|
function b(e, t, n) {
|
|
387
230
|
if (!v(t)) return !1;
|
|
388
|
-
let r = t.split("."), i = r.pop(), a = r.reduce(
|
|
231
|
+
let r = t.split("."), i = r.pop(), a = r.reduce(ce, e);
|
|
389
232
|
if (Array.isArray(a)) {
|
|
390
233
|
let e = a.findIndex((e) => _(e) && e.id === i);
|
|
391
234
|
return e < 0 ? !1 : (a[e] = m(n), !0);
|
|
392
235
|
}
|
|
393
236
|
return _(a) ? (n === null ? delete a[i] : a[i] = m(n), !0) : !1;
|
|
394
237
|
}
|
|
395
|
-
function
|
|
238
|
+
function pe(e, t) {
|
|
396
239
|
let [n, ...r] = t.split(".");
|
|
397
240
|
if (n === void 0) return [""];
|
|
398
241
|
let i = [];
|
|
399
242
|
if (n === "*") {
|
|
400
243
|
let t = Array.isArray(e) ? e : [];
|
|
401
|
-
for (let e of t) if (_(e) && typeof e.id == "string") for (let t of r.length ?
|
|
244
|
+
for (let e of t) if (_(e) && typeof e.id == "string") for (let t of r.length ? pe(e, r.join(".")) : [""]) i.push(t ? `${e.id}.${t}` : e.id);
|
|
402
245
|
return i;
|
|
403
246
|
}
|
|
404
247
|
let a = _(e) ? e[n] : void 0;
|
|
405
248
|
if (r.length === 0) return a === void 0 ? [] : [n];
|
|
406
|
-
for (let e of
|
|
249
|
+
for (let e of pe(a, r.join("."))) i.push(`${n}.${e}`);
|
|
407
250
|
return i;
|
|
408
251
|
}
|
|
409
252
|
function x(e, t = []) {
|
|
@@ -414,6 +257,9 @@ function x(e, t = []) {
|
|
|
414
257
|
let n = (e) => !e.id.includes("."), r = e.type === "menu" ? {
|
|
415
258
|
...e,
|
|
416
259
|
items: e.items.filter(n)
|
|
260
|
+
} : e.type === "social" ? {
|
|
261
|
+
...e,
|
|
262
|
+
icons: e.icons.filter(n)
|
|
417
263
|
} : e.type === "table" ? {
|
|
418
264
|
...e,
|
|
419
265
|
rows: e.rows.filter(n).map((e) => ({
|
|
@@ -421,10 +267,10 @@ function x(e, t = []) {
|
|
|
421
267
|
cells: e.cells.filter(n)
|
|
422
268
|
}))
|
|
423
269
|
} : e;
|
|
424
|
-
return (
|
|
270
|
+
return (ae[e.type] ?? []).flatMap((e) => pe(r, e));
|
|
425
271
|
}
|
|
426
|
-
function
|
|
427
|
-
return (
|
|
272
|
+
function me(e, t) {
|
|
273
|
+
return (ae[e] ?? []).some((e) => {
|
|
428
274
|
let n = e.split("."), r = t.split(".");
|
|
429
275
|
return n.length === r.length && n.every((e, t) => e === "*" || e === r[t]);
|
|
430
276
|
});
|
|
@@ -434,54 +280,54 @@ function S(e) {
|
|
|
434
280
|
for (let n of new TextEncoder().encode(e)) t ^= n, t = Math.imul(t, 16777619) >>> 0;
|
|
435
281
|
return t.toString(16).padStart(8, "0");
|
|
436
282
|
}
|
|
437
|
-
function
|
|
283
|
+
function he(e) {
|
|
438
284
|
let { l10n: t, ...n } = e;
|
|
439
285
|
return n;
|
|
440
286
|
}
|
|
441
|
-
function
|
|
287
|
+
function ge(e = {}) {
|
|
442
288
|
return Object.entries(e).sort(([e], [t]) => e.split(".").length - t.split(".").length);
|
|
443
289
|
}
|
|
444
|
-
function
|
|
445
|
-
return
|
|
290
|
+
function _e(e, t, n) {
|
|
291
|
+
return ve(e, m(he(e)), t, n);
|
|
446
292
|
}
|
|
447
|
-
function
|
|
293
|
+
function ve(e, t, n, r) {
|
|
448
294
|
let i = e;
|
|
449
295
|
if (n === r) return t;
|
|
450
296
|
let a = i.l10n?.[n];
|
|
451
297
|
if (!a) return t;
|
|
452
|
-
for (let [e, n] of
|
|
298
|
+
for (let [e, n] of ge(a.set)) b(t, e, n);
|
|
453
299
|
for (let [n, r] of Object.entries(a.text ?? {})) y(e, n) !== void 0 && b(t, n, r.value);
|
|
454
300
|
return e.type === "custom" && (Object.keys(a.text ?? {}).length > 0 || Object.keys(a.set ?? {}).length > 0) && delete t.renderedHtml, t;
|
|
455
301
|
}
|
|
456
|
-
function
|
|
302
|
+
function ye(e, t, n) {
|
|
457
303
|
let r = e;
|
|
458
|
-
if (r.type !== "section" && r.type !== "wrapper" || !Array.isArray(r.children)) return
|
|
459
|
-
let { children: i, ...a } =
|
|
460
|
-
return o.children = i,
|
|
304
|
+
if (r.type !== "section" && r.type !== "wrapper" || !Array.isArray(r.children)) return _e(e, t, n);
|
|
305
|
+
let { children: i, ...a } = he(r), o = m(a);
|
|
306
|
+
return o.children = i, ve(e, o, t, n);
|
|
461
307
|
}
|
|
462
|
-
function
|
|
308
|
+
function be(e, t) {
|
|
463
309
|
return e.l10n?.[t]?.hidden === !0;
|
|
464
310
|
}
|
|
465
|
-
function
|
|
311
|
+
function xe(e) {
|
|
466
312
|
let { locales: t, l10n: n, ...r } = e;
|
|
467
313
|
return r;
|
|
468
314
|
}
|
|
469
315
|
function C(e) {
|
|
470
316
|
return e.settings?.locale ?? "en";
|
|
471
317
|
}
|
|
472
|
-
function
|
|
318
|
+
function Se(e, t, n) {
|
|
473
319
|
let r = C(e);
|
|
474
320
|
if (t !== r && !(e.settings?.locales ?? []).includes(t)) {
|
|
475
321
|
if (n?.missing === "default") t = r;
|
|
476
|
-
else throw new
|
|
322
|
+
else throw new ie(`This template has no "${t}" version.`, void 0, "unknown_locale");
|
|
477
323
|
}
|
|
478
324
|
let i = (e) => e.flatMap((e) => {
|
|
479
|
-
if (t !== r &&
|
|
480
|
-
let n = e.l10n?.[t], a = [...Object.keys(n?.set ?? {}), ...Object.keys(n?.text ?? {})].some((e) => e.startsWith("children.")) ?
|
|
325
|
+
if (t !== r && be(e, t)) return [];
|
|
326
|
+
let n = e.l10n?.[t], a = [...Object.keys(n?.set ?? {}), ...Object.keys(n?.text ?? {})].some((e) => e.startsWith("children.")) ? _e(e, t, r) : ye(e, t, r);
|
|
481
327
|
return a.type === "section" && Array.isArray(a.children) ? a.children = a.children.map((e) => i(e)) : a.type === "wrapper" && Array.isArray(a.children) && (a.children = i(a.children)), [a];
|
|
482
|
-
}), a = m(
|
|
328
|
+
}), a = m(xe(e.settings)), o = e.settings?.l10n?.[t];
|
|
483
329
|
if (t !== r && o) {
|
|
484
|
-
for (let [e, t] of
|
|
330
|
+
for (let [e, t] of ge(o.set)) b(a, e, t);
|
|
485
331
|
for (let [t, n] of Object.entries(o.text ?? {})) y(e.settings, t) !== void 0 && b(a, t, n.value);
|
|
486
332
|
}
|
|
487
333
|
return a.locale = t, {
|
|
@@ -489,7 +335,7 @@ function Pe(e, t, n) {
|
|
|
489
335
|
settings: a
|
|
490
336
|
};
|
|
491
337
|
}
|
|
492
|
-
function
|
|
338
|
+
function Ce(e, t, n = []) {
|
|
493
339
|
let r = {
|
|
494
340
|
translated: [],
|
|
495
341
|
missing: [],
|
|
@@ -503,7 +349,7 @@ function Fe(e, t, n = []) {
|
|
|
503
349
|
}
|
|
504
350
|
}, a = (e) => {
|
|
505
351
|
for (let r of e) {
|
|
506
|
-
if (
|
|
352
|
+
if (be(r, t)) continue;
|
|
507
353
|
let e = r.l10n?.[t];
|
|
508
354
|
i(r.id, r, x(r, n), e?.text);
|
|
509
355
|
let o = r.children;
|
|
@@ -513,34 +359,34 @@ function Fe(e, t, n = []) {
|
|
|
513
359
|
};
|
|
514
360
|
return a(e.blocks), i("settings", e.settings, [...g], e.settings?.l10n?.[t]?.text), r;
|
|
515
361
|
}
|
|
516
|
-
function
|
|
362
|
+
function we(e, t) {
|
|
517
363
|
if (t === C(e) || !e.settings.locales?.includes(t)) return [];
|
|
518
364
|
let n = [], r = (e) => {
|
|
519
|
-
for (let i of e)
|
|
365
|
+
for (let i of e) be(i, t) && n.push(i.id), i.type === "section" ? i.children.forEach(r) : i.type === "wrapper" && r(i.children);
|
|
520
366
|
};
|
|
521
367
|
return r(e.blocks), n;
|
|
522
368
|
}
|
|
523
|
-
function
|
|
369
|
+
function Te(e, t, n = []) {
|
|
524
370
|
if (t === C(e) || !e.settings.locales?.includes(t)) return [];
|
|
525
371
|
let r = [], i = (e, n, i) => {
|
|
526
|
-
r.push(...
|
|
372
|
+
r.push(...Ee(n, t, i).map((t) => `${e}/${t}`));
|
|
527
373
|
}, a = (e) => {
|
|
528
374
|
for (let t of e) i(t.id, t, x(t, n)), t.type === "section" ? t.children.forEach(a) : t.type === "wrapper" && a(t.children);
|
|
529
375
|
};
|
|
530
376
|
return a(e.blocks), i("settings", e.settings, g), r;
|
|
531
377
|
}
|
|
532
|
-
function
|
|
378
|
+
function Ee(e, t, n) {
|
|
533
379
|
let r = e.l10n?.[t];
|
|
534
380
|
return n.filter((t) => {
|
|
535
381
|
let n = y(e, t);
|
|
536
382
|
return typeof n != "string" || n === "" || r?.text?.[t] ? !1 : !Object.keys(r?.set ?? {}).some((n) => (t === n || t.startsWith(`${n}.`)) && (!n.includes(".") || y(e, n.slice(0, n.lastIndexOf("."))) !== void 0));
|
|
537
383
|
});
|
|
538
384
|
}
|
|
539
|
-
function
|
|
385
|
+
function De(e, t, n = {}) {
|
|
540
386
|
let r = C(e), i = (e, n, i) => {
|
|
541
|
-
let a =
|
|
387
|
+
let a = Ee(e, t, i), o = m(e.l10n ?? {}), s = o[t] ?? {}, c = m(e);
|
|
542
388
|
delete c.l10n;
|
|
543
|
-
for (let [e, t] of
|
|
389
|
+
for (let [e, t] of ge(s.set)) b(c, e, t);
|
|
544
390
|
for (let [t, n] of Object.entries(s.text ?? {})) y(e, t) !== void 0 && b(c, t, n.value);
|
|
545
391
|
delete o[t];
|
|
546
392
|
let l = {}, u = /* @__PURE__ */ new Set([
|
|
@@ -579,7 +425,7 @@ function ze(e, t, n = {}) {
|
|
|
579
425
|
};
|
|
580
426
|
for (let t of Object.values(o)) {
|
|
581
427
|
let n = m(e);
|
|
582
|
-
for (let [e, r] of
|
|
428
|
+
for (let [e, r] of ge(t.set)) b(n, e, r);
|
|
583
429
|
for (let [r, i] of Object.entries(t.text ?? {})) y(e, r) !== void 0 && b(n, r, i.value);
|
|
584
430
|
for (let [n, r] of Object.entries(t.text ?? {})) {
|
|
585
431
|
let i = y(c, n);
|
|
@@ -593,7 +439,7 @@ function ze(e, t, n = {}) {
|
|
|
593
439
|
}
|
|
594
440
|
return Object.keys(l).length && (d(l, e), o[r] = l), Object.keys(o).length && (c.l10n = o), c;
|
|
595
441
|
}, a = (e) => e.map((e) => {
|
|
596
|
-
let t = e.type === "custom" ? [.../* @__PURE__ */ new Set([...Object.hasOwn(n, e.id) ? n[e.id] : [], ...Object.values(e.l10n ?? {}).flatMap((e) => Object.keys(e.text ?? {}))])] : x(e), r = i(e, (n) => e.type === "custom" ? t.includes(n) :
|
|
442
|
+
let t = e.type === "custom" ? [.../* @__PURE__ */ new Set([...Object.hasOwn(n, e.id) ? n[e.id] : [], ...Object.values(e.l10n ?? {}).flatMap((e) => Object.keys(e.text ?? {}))])] : x(e), r = i(e, (n) => e.type === "custom" ? t.includes(n) : me(e.type, n), t);
|
|
597
443
|
return e.type === "custom" && r.type === "custom" && !h(e.fieldValues, r.fieldValues) && delete r.renderedHtml, r.type === "section" ? r.children = r.children.map(a) : r.type === "wrapper" && (r.children = a(r.children)), r;
|
|
598
444
|
}), o = i(e.settings, (e) => g.includes(e), g);
|
|
599
445
|
return o.locale = t, o.locales = e.settings.locales.map((e) => e === t ? r : e), {
|
|
@@ -602,12 +448,12 @@ function ze(e, t, n = {}) {
|
|
|
602
448
|
};
|
|
603
449
|
}
|
|
604
450
|
// ../types/src/operations.ts
|
|
605
|
-
var
|
|
606
|
-
function
|
|
607
|
-
let r = Object.fromEntries(
|
|
451
|
+
var Oe = "Sections with a wrapper cannot be placed inside wrappers.";
|
|
452
|
+
function ke(e, t, n = []) {
|
|
453
|
+
let r = Object.fromEntries(P(e.blocks).flatMap((e) => {
|
|
608
454
|
if (e.type !== "custom") return [];
|
|
609
455
|
let t = x(e, n).filter((t) => typeof y(e, t) == "string");
|
|
610
|
-
return t.length &&
|
|
456
|
+
return t.length && Fe.has(e.id) && E("invalid_operation", 0, Ie), t.length ? [[e.id, t]] : [];
|
|
611
457
|
}));
|
|
612
458
|
return {
|
|
613
459
|
op: "setDefaultLocale",
|
|
@@ -623,10 +469,10 @@ var w = class extends Error {
|
|
|
623
469
|
super(n), this.name = "OperationError", this.code = e, this.opIndex = t, r !== void 0 && (this.blockId = r);
|
|
624
470
|
}
|
|
625
471
|
};
|
|
626
|
-
function
|
|
472
|
+
function Ae(e) {
|
|
627
473
|
return e === "1" ? 1 : e === "3" || e === "1-2-1" ? 3 : e === "4" ? 4 : 2;
|
|
628
474
|
}
|
|
629
|
-
function
|
|
475
|
+
function je(e, t, n = {}) {
|
|
630
476
|
let r = m(e);
|
|
631
477
|
return T(r, t, n), r;
|
|
632
478
|
}
|
|
@@ -635,22 +481,22 @@ function T(e, t, n = {}) {
|
|
|
635
481
|
locks: n.locks ?? [],
|
|
636
482
|
session: n.session ?? null
|
|
637
483
|
};
|
|
638
|
-
t.forEach((t, n) =>
|
|
484
|
+
t.forEach((t, n) => et(e, t, n, r));
|
|
639
485
|
}
|
|
640
|
-
var
|
|
486
|
+
var Me = /* @__PURE__ */ new Set([
|
|
641
487
|
"id",
|
|
642
488
|
"type",
|
|
643
489
|
"children",
|
|
644
490
|
"l10n"
|
|
645
|
-
]),
|
|
491
|
+
]), Ne = /* @__PURE__ */ new Set(["locales", "l10n"]), Pe = /* @__PURE__ */ new Set([
|
|
646
492
|
"locale",
|
|
647
493
|
"locales",
|
|
648
494
|
"l10n"
|
|
649
|
-
]),
|
|
495
|
+
]), Fe = /* @__PURE__ */ new Set([
|
|
650
496
|
"__proto__",
|
|
651
497
|
"constructor",
|
|
652
498
|
"prototype"
|
|
653
|
-
]),
|
|
499
|
+
]), Ie = "customTextFields must map existing custom block ids to lists of string fieldValues paths.";
|
|
654
500
|
function E(e, t, n, r) {
|
|
655
501
|
throw new w(e, t, n, r);
|
|
656
502
|
}
|
|
@@ -660,14 +506,14 @@ function D(e) {
|
|
|
660
506
|
function O(e) {
|
|
661
507
|
return e.type === "section";
|
|
662
508
|
}
|
|
663
|
-
function
|
|
509
|
+
function Le(e) {
|
|
664
510
|
return Array.isArray(e.blocks) ? e.blocks : [];
|
|
665
511
|
}
|
|
666
|
-
function
|
|
512
|
+
function Re(e) {
|
|
667
513
|
let t = e.children;
|
|
668
514
|
return Array.isArray(t) ? t.map((e) => Array.isArray(e) ? e : []) : [];
|
|
669
515
|
}
|
|
670
|
-
function*
|
|
516
|
+
function* ze(e, t) {
|
|
671
517
|
for (let n = 0; n < e.length; n++) {
|
|
672
518
|
let r = e[n];
|
|
673
519
|
if (D(r) && (yield {
|
|
@@ -676,47 +522,47 @@ function* Xe(e, t) {
|
|
|
676
522
|
index: n,
|
|
677
523
|
parent: t
|
|
678
524
|
}, typeof r.id == "string")) {
|
|
679
|
-
if (O(r)) for (let [e, t] of
|
|
525
|
+
if (O(r)) for (let [e, t] of Re(r).entries()) yield* ze(t, {
|
|
680
526
|
sectionId: r.id,
|
|
681
527
|
column: e
|
|
682
528
|
});
|
|
683
|
-
else r.type === "wrapper" && Array.isArray(r.children) && (yield*
|
|
529
|
+
else r.type === "wrapper" && Array.isArray(r.children) && (yield* ze(r.children, { wrapperId: r.id }));
|
|
684
530
|
}
|
|
685
531
|
}
|
|
686
532
|
}
|
|
687
|
-
function
|
|
688
|
-
for (let n of
|
|
533
|
+
function k(e, t) {
|
|
534
|
+
for (let n of ze(Le(e), null)) if (n.block.id === t) return n;
|
|
689
535
|
return null;
|
|
690
536
|
}
|
|
691
|
-
function
|
|
537
|
+
function A(e) {
|
|
692
538
|
if (!D(e)) return [];
|
|
693
539
|
let t = typeof e.id == "string" ? [e.id] : [];
|
|
694
|
-
if (O(e)) for (let n of
|
|
695
|
-
else if (e.type === "wrapper" && Array.isArray(e.children)) for (let n of
|
|
540
|
+
if (O(e)) for (let n of Re(e)) for (let e of Be(n)) t.push(e);
|
|
541
|
+
else if (e.type === "wrapper" && Array.isArray(e.children)) for (let n of Be(e.children)) t.push(n);
|
|
696
542
|
return t;
|
|
697
543
|
}
|
|
698
|
-
function
|
|
699
|
-
return e.flatMap(
|
|
544
|
+
function Be(e) {
|
|
545
|
+
return e.flatMap(A);
|
|
700
546
|
}
|
|
701
|
-
function
|
|
547
|
+
function j(e, t) {
|
|
702
548
|
return typeof e.blockId != "string" || e.blockId === "" ? E("invalid_operation", t, "blockId must be a block id.") : e.blockId;
|
|
703
549
|
}
|
|
704
|
-
function
|
|
550
|
+
function Ve(e, t) {
|
|
705
551
|
let n = e.parent;
|
|
706
552
|
return n === null ? null : D(n) && typeof n.sectionId == "string" && typeof n.column == "number" && Number.isInteger(n.column) ? {
|
|
707
553
|
sectionId: n.sectionId,
|
|
708
554
|
column: n.column
|
|
709
555
|
} : D(n) && typeof n.wrapperId == "string" && n.wrapperId !== "" && !Object.hasOwn(n, "sectionId") && !Object.hasOwn(n, "column") ? { wrapperId: n.wrapperId } : E("invalid_operation", t, "parent must be null, { \"sectionId\", \"column\" }, or { \"wrapperId\" }.");
|
|
710
556
|
}
|
|
711
|
-
function
|
|
557
|
+
function He(e, t) {
|
|
712
558
|
let n = e.after;
|
|
713
559
|
return n === null ? null : typeof n == "string" && n !== "" ? n : E("invalid_operation", t, "after must be null or a block id.");
|
|
714
560
|
}
|
|
715
|
-
function
|
|
561
|
+
function M(e, t) {
|
|
716
562
|
let n = e.expect;
|
|
717
563
|
return n == null ? null : D(n) ? n : E("invalid_operation", t, "expect must be an object.");
|
|
718
564
|
}
|
|
719
|
-
function
|
|
565
|
+
function Ue(e, t, n) {
|
|
720
566
|
let r = e.set ?? null, i = e.unset ?? [];
|
|
721
567
|
(r === null || D(r)) && Array.isArray(i) && i.every((e) => typeof e == "string") || E("invalid_operation", t, "set must be an object and unset a list of keys.");
|
|
722
568
|
let a = r === null ? {} : r, o = Object.keys(a).filter((e) => a[e] !== void 0);
|
|
@@ -728,50 +574,50 @@ function et(e, t, n) {
|
|
|
728
574
|
unset: i
|
|
729
575
|
};
|
|
730
576
|
}
|
|
731
|
-
function
|
|
577
|
+
function We(e, t, n) {
|
|
732
578
|
if (D(e) && typeof e.id == "string" && e.id !== "" && typeof e.type == "string" || E("invalid_operation", t, "A block needs a non-empty string id and a string type."), e.type === "wrapper") {
|
|
733
579
|
n !== "root" && E("invalid_operation", t, n === "column" ? "Wrappers can only be placed at the top level." : "Wrappers cannot be placed inside wrappers."), Array.isArray(e.children) || E("invalid_operation", t, "A wrapper needs children: a list of blocks.");
|
|
734
|
-
for (let n of e.children)
|
|
580
|
+
for (let n of e.children) We(n, t, "wrapper");
|
|
735
581
|
return;
|
|
736
582
|
}
|
|
737
583
|
if (!O(e)) return;
|
|
738
|
-
n === "column" && E("invalid_operation", t, "Sections can only be placed at the top level."), n === "wrapper" && e.wrapper && E("invalid_operation", t,
|
|
584
|
+
n === "column" && E("invalid_operation", t, "Sections can only be placed at the top level."), n === "wrapper" && e.wrapper && E("invalid_operation", t, Oe);
|
|
739
585
|
let r = e.children;
|
|
740
586
|
Array.isArray(r) && r.every((e) => Array.isArray(e)) || E("invalid_operation", t, "A section needs children: a list of columns, each a list of blocks.");
|
|
741
|
-
for (let e of r) for (let n of e)
|
|
587
|
+
for (let e of r) for (let n of e) We(n, t, "column");
|
|
742
588
|
}
|
|
743
|
-
function
|
|
589
|
+
function N(e, t) {
|
|
744
590
|
return e.session === null || t.sessionId !== e.session;
|
|
745
591
|
}
|
|
746
|
-
function
|
|
747
|
-
let r = e.locks.find((n) => t.includes(n.blockId) &&
|
|
592
|
+
function Ge(e, t, n) {
|
|
593
|
+
let r = e.locks.find((n) => t.includes(n.blockId) && N(e, n));
|
|
748
594
|
r && E("lock_held", n, `Block "${r.blockId}" is being edited in another session.`, r.blockId);
|
|
749
595
|
}
|
|
750
|
-
function
|
|
751
|
-
e.locks.find((r) =>
|
|
596
|
+
function Ke(e, t, n, r) {
|
|
597
|
+
e.locks.find((r) => N(e, r) && r.blockId === t && ((r.locale ?? null) === null || r.locale === n)) && E("lock_held", r, `Block "${t}" is being edited in another session.`, t);
|
|
752
598
|
}
|
|
753
|
-
function
|
|
599
|
+
function qe(e, t, n, r) {
|
|
754
600
|
for (let [i, a] of Object.entries(t)) a !== void 0 && (h(Object.hasOwn(e, i) && e[i] !== void 0 ? e[i] : null, a) || E("precondition_failed", n, r === void 0 ? `Setting "${i}" has changed since.` : `"${i}" of block "${r}" has changed since.`, r));
|
|
755
601
|
}
|
|
756
|
-
function
|
|
602
|
+
function Je(e, t, n) {
|
|
757
603
|
if (t === null) return Array.isArray(e.blocks) || (e.blocks = []), e.blocks;
|
|
758
604
|
if ("wrapperId" in t) {
|
|
759
|
-
let r =
|
|
605
|
+
let r = k(e, t.wrapperId);
|
|
760
606
|
return r ? r.block.type === "wrapper" ? Array.isArray(r.block.children) ? r.block.children : E("invalid_operation", n, `Wrapper "${t.wrapperId}" has no children list.`) : E("invalid_operation", n, `Block "${t.wrapperId}" isn't a wrapper.`) : E("block_missing", n, `No wrapper with id "${t.wrapperId}".`, t.wrapperId);
|
|
761
607
|
}
|
|
762
|
-
let r =
|
|
608
|
+
let r = k(e, t.sectionId);
|
|
763
609
|
if (!r) return E("block_missing", n, `No section with id "${t.sectionId}".`, t.sectionId);
|
|
764
610
|
if (!O(r.block)) return E("invalid_operation", n, `Block "${t.sectionId}" isn't a section.`);
|
|
765
611
|
let i = r.block.children;
|
|
766
612
|
return !Array.isArray(i) || t.column < 0 || t.column >= i.length ? E("invalid_operation", n, `Section "${t.sectionId}" has no column ${t.column}.`) : (Array.isArray(i[t.column]) || (i[t.column] = []), i[t.column]);
|
|
767
613
|
}
|
|
768
|
-
function
|
|
614
|
+
function Ye(e, t, n) {
|
|
769
615
|
if (t === null) return 0;
|
|
770
616
|
let r = e.findIndex((e) => D(e) && e.id === t);
|
|
771
617
|
return r === -1 ? E("anchor_missing", n, `No block "${t}" in the target container.`, t) : r + 1;
|
|
772
618
|
}
|
|
773
|
-
function
|
|
774
|
-
let i =
|
|
619
|
+
function Xe(e, t, n, r) {
|
|
620
|
+
let i = Ae(t), a = Array.isArray(e.children) ? e.children : [];
|
|
775
621
|
for (let e = i; e < a.length; e++) {
|
|
776
622
|
let t = a[e];
|
|
777
623
|
Array.isArray(t) && t.length > 0 && E("invalid_operation", n, `Column ${e} of section "${r}" still holds blocks, so the layout can't drop it.`);
|
|
@@ -780,7 +626,7 @@ function st(e, t, n, r) {
|
|
|
780
626
|
for (; o.length < i;) o.push([]);
|
|
781
627
|
e.children = o;
|
|
782
628
|
}
|
|
783
|
-
function
|
|
629
|
+
function Ze(e, t, n) {
|
|
784
630
|
for (let [n, r] of Object.entries(t)) n === "__proto__" ? Object.defineProperty(e, n, {
|
|
785
631
|
value: m(r),
|
|
786
632
|
writable: !0,
|
|
@@ -789,8 +635,8 @@ function ct(e, t, n) {
|
|
|
789
635
|
}) : e[n] = m(r);
|
|
790
636
|
for (let t of n) delete e[t];
|
|
791
637
|
}
|
|
792
|
-
function
|
|
793
|
-
return
|
|
638
|
+
function Qe(e) {
|
|
639
|
+
return ne(e).map((t) => {
|
|
794
640
|
let n = t.path.replace(/\.(items|icons|rows)\[.*$/, "").replace(/\[(\d+)\]/g, ".$1").split(".").reduce((e, t) => e[t], e);
|
|
795
641
|
return {
|
|
796
642
|
id: t.id,
|
|
@@ -798,113 +644,113 @@ function lt(e) {
|
|
|
798
644
|
};
|
|
799
645
|
});
|
|
800
646
|
}
|
|
801
|
-
function
|
|
802
|
-
let r = ({ id: e, blockId: t }) => JSON.stringify([t ?? null, e]), i = new Set(n ?
|
|
647
|
+
function $e(e, t, n) {
|
|
648
|
+
let r = ({ id: e, blockId: t }) => JSON.stringify([t ?? null, e]), i = new Set(n ? Qe(n).map(r) : []), a = Qe(e).find((e) => !i.has(r(e)));
|
|
803
649
|
a && E("invalid_operation", t, `Element id "${a.id}" must not contain "." or "/".`, a.blockId);
|
|
804
650
|
}
|
|
805
|
-
function
|
|
651
|
+
function et(e, t, n, r) {
|
|
806
652
|
let i = t;
|
|
807
653
|
switch (D(i) && typeof i.op == "string" || E("invalid_operation", n, "Each operation must be an object with an \"op\"."), i.op) {
|
|
808
|
-
case "addBlock": return
|
|
809
|
-
case "moveBlock": return
|
|
810
|
-
case "deleteBlock": return
|
|
811
|
-
case "updateBlock": return
|
|
812
|
-
case "updateSettings": return
|
|
813
|
-
case "setContent": return
|
|
814
|
-
case "setDefaultLocale": return
|
|
815
|
-
case "addLocale": return
|
|
816
|
-
case "removeLocale": return
|
|
817
|
-
case "updateBlockLocale": return
|
|
818
|
-
case "updateSettingsLocale": return
|
|
654
|
+
case "addBlock": return tt(e, i, n);
|
|
655
|
+
case "moveBlock": return nt(e, i, n, r);
|
|
656
|
+
case "deleteBlock": return rt(e, i, n, r);
|
|
657
|
+
case "updateBlock": return it(e, i, n, r);
|
|
658
|
+
case "updateSettings": return at(e, i, n);
|
|
659
|
+
case "setContent": return bt(e, i, n, r);
|
|
660
|
+
case "setDefaultLocale": return xt(e, i, n, r);
|
|
661
|
+
case "addLocale": return ct(e, i, n);
|
|
662
|
+
case "removeLocale": return ut(e, i, n);
|
|
663
|
+
case "updateBlockLocale": return vt(e, i, n, r);
|
|
664
|
+
case "updateSettingsLocale": return yt(e, i, n);
|
|
819
665
|
default: E("invalid_operation", n, `Unknown operation "${i.op}".`);
|
|
820
666
|
}
|
|
821
667
|
}
|
|
822
|
-
function
|
|
823
|
-
let r =
|
|
824
|
-
|
|
668
|
+
function tt(e, t, n) {
|
|
669
|
+
let r = Ve(t, n), i = He(t, n), a = t.block;
|
|
670
|
+
We(a, n, r === null ? "root" : "wrapperId" in r ? "wrapper" : "column"), $e({
|
|
825
671
|
blocks: [a],
|
|
826
672
|
settings: e.settings
|
|
827
673
|
}, n);
|
|
828
|
-
let o = new Set(
|
|
829
|
-
for (let e of
|
|
830
|
-
let c =
|
|
831
|
-
|
|
674
|
+
let o = new Set(Be(Le(e))), s = /* @__PURE__ */ new Set();
|
|
675
|
+
for (let e of A(a)) (o.has(e) || s.has(e)) && E("block_exists", n, `A block with id "${e}" already exists.`, e), s.add(e);
|
|
676
|
+
let c = Je(e, r, n), l = Ye(c, i, n);
|
|
677
|
+
_t(e, a, r, n, !0), c.splice(l, 0, m(a));
|
|
832
678
|
}
|
|
833
|
-
function
|
|
834
|
-
let i =
|
|
679
|
+
function nt(e, t, n, r) {
|
|
680
|
+
let i = j(t, n), a = Ve(t, n), o = He(t, n), s = M(t, n), c = s && s.parent !== void 0 ? Ve({ parent: s.parent }, n) : null, l = k(e, i);
|
|
835
681
|
if (!l) return E("block_missing", n, `No block with id "${i}".`, i);
|
|
836
|
-
if (
|
|
682
|
+
if (Ge(r, A(l.block), n), s) {
|
|
837
683
|
let e = l.index > 0 ? l.list[l.index - 1] : null, t = D(e) ? e.id ?? null : null;
|
|
838
684
|
h(l.parent, c) && h(t, s.after ?? null) || E("precondition_failed", n, `Block "${i}" has moved since.`, i);
|
|
839
685
|
}
|
|
840
|
-
a !== null && ("wrapperId" in a ? a.wrapperId : a.sectionId) === i && E("invalid_operation", n, "A block cannot be moved into itself or its descendants."), a !== null &&
|
|
841
|
-
let u =
|
|
842
|
-
|
|
686
|
+
a !== null && ("wrapperId" in a ? a.wrapperId : a.sectionId) === i && E("invalid_operation", n, "A block cannot be moved into itself or its descendants."), a !== null && A(l.block).includes("wrapperId" in a ? a.wrapperId : a.sectionId) && E("invalid_operation", n, "A block cannot be moved into itself or its descendants."), O(l.block) && a !== null && "sectionId" in a && E("invalid_operation", n, "Sections can only be placed at the top level."), O(l.block) && l.block.wrapper && a !== null && "wrapperId" in a && E("invalid_operation", n, Oe), l.block.type === "wrapper" && a !== null && E("invalid_operation", n, "wrapperId" in a ? "Wrappers cannot be placed inside wrappers." : "Wrappers can only be placed at the top level."), o === i && E("invalid_operation", n, "A block can't be placed after itself.");
|
|
687
|
+
let u = Je(e, a, n);
|
|
688
|
+
Ye(u.filter((e) => e !== l.block), o, n), _t(e, l.block, a, n, !1), l.list.splice(l.index, 1), u.splice(Ye(u, o, n), 0, l.block);
|
|
843
689
|
}
|
|
844
|
-
function
|
|
845
|
-
let i =
|
|
690
|
+
function rt(e, t, n, r) {
|
|
691
|
+
let i = j(t, n), a = M(t, n), o = k(e, i);
|
|
846
692
|
if (!o) return E("block_missing", n, `No block with id "${i}".`, i);
|
|
847
|
-
|
|
693
|
+
Ge(r, A(o.block), n), a && !h(o.block, a.block ?? null) && E("precondition_failed", n, `Block "${i}" has changed since.`, i), o.list.splice(o.index, 1);
|
|
848
694
|
}
|
|
849
|
-
function
|
|
850
|
-
let i =
|
|
695
|
+
function it(e, t, n, r) {
|
|
696
|
+
let i = j(t, n), { set: a, unset: o } = Ue(t, n, Me), s = M(t, n), c = k(e, i);
|
|
851
697
|
if (!c) return E("block_missing", n, `No block with id "${i}".`, i);
|
|
852
698
|
let l = c.block, u = O(l);
|
|
853
|
-
u && o.includes("columns") && E("invalid_operation", n, "A section's columns can't be unset; set another layout instead."),
|
|
699
|
+
u && o.includes("columns") && E("invalid_operation", n, "A section's columns can't be unset; set another layout instead."), Ge(r, [i], n), s && qe(l, s, n, i), u && c.parent !== null && "wrapperId" in c.parent && a.wrapper && E("invalid_operation", n, Oe);
|
|
854
700
|
let d = { ...l };
|
|
855
|
-
|
|
701
|
+
Ze(d, a, o), $e({
|
|
856
702
|
blocks: [d],
|
|
857
703
|
settings: e.settings
|
|
858
704
|
}, n, {
|
|
859
705
|
blocks: [l],
|
|
860
706
|
settings: e.settings
|
|
861
|
-
}), u && Object.hasOwn(a, "columns") &&
|
|
862
|
-
let f =
|
|
707
|
+
}), u && Object.hasOwn(a, "columns") && Xe(l, a.columns, n, i), Ze(l, a, o);
|
|
708
|
+
let f = ue(l);
|
|
863
709
|
h(l.l10n, f.l10n) || (f.l10n ? l.l10n = f.l10n : delete l.l10n), (u || l.type === "wrapper") && !h(l.children, f.children) && (l.children = f.children);
|
|
864
710
|
}
|
|
865
|
-
function
|
|
866
|
-
let { set: r, unset: i } =
|
|
711
|
+
function at(e, t, n) {
|
|
712
|
+
let { set: r, unset: i } = Ue(t, n, Ne), a = M(t, n);
|
|
867
713
|
e.settings?.locales?.length && (Object.hasOwn(r, "locale") || i.includes("locale")) && E("invalid_operation", n, "The default locale can't change while language versions exist."), D(e.settings) || (e.settings = {});
|
|
868
714
|
let o = e.settings;
|
|
869
|
-
a &&
|
|
870
|
-
let s =
|
|
715
|
+
a && qe(o, a, n), Ze(o, r, i);
|
|
716
|
+
let s = fe(e.settings);
|
|
871
717
|
h(o.l10n, s.l10n) || (s.l10n ? o.l10n = s.l10n : delete o.l10n);
|
|
872
718
|
}
|
|
873
|
-
function
|
|
719
|
+
function ot(e, t) {
|
|
874
720
|
let n = e.locale;
|
|
875
|
-
return
|
|
721
|
+
return oe(n) && n !== "__proto__" && n !== "constructor" && n !== "prototype" || E("invalid_operation", t, "locale must be a language tag."), n;
|
|
876
722
|
}
|
|
877
|
-
function
|
|
878
|
-
let r =
|
|
723
|
+
function st(e, t, n) {
|
|
724
|
+
let r = ot(t, n);
|
|
879
725
|
return e.settings.locales?.includes(r) || E("invalid_operation", n, `Locale "${r}" isn't in settings.locales.`), r;
|
|
880
726
|
}
|
|
881
|
-
function
|
|
882
|
-
let r =
|
|
727
|
+
function ct(e, t, n) {
|
|
728
|
+
let r = ot(t, n), i = e.settings.locales ?? [], a = r.toLowerCase(), o = t.position === void 0 ? i.length : t.position;
|
|
883
729
|
(C(e).toLowerCase() === a || i.some((e) => e.toLowerCase() === a) || typeof o != "number" || !Number.isInteger(o) || o < 0 || o > i.length) && E("invalid_operation", n, "The locale already exists or its insertion position is invalid."), e.settings.locales || (e.settings.locales = []), e.settings.locales.splice(o, 0, r);
|
|
884
730
|
}
|
|
885
|
-
function
|
|
886
|
-
return e.flatMap((e) => D(e) ? [e, ...O(e) ?
|
|
731
|
+
function P(e) {
|
|
732
|
+
return e.flatMap((e) => D(e) ? [e, ...O(e) ? Re(e).flatMap(P) : e.type === "wrapper" && Array.isArray(e.children) ? P(e.children) : []] : []);
|
|
887
733
|
}
|
|
888
|
-
function
|
|
734
|
+
function lt(e, t) {
|
|
889
735
|
let n = e.l10n;
|
|
890
736
|
return D(n) && D(n[t]) ? n[t] : {};
|
|
891
737
|
}
|
|
892
|
-
function
|
|
893
|
-
let r =
|
|
738
|
+
function ut(e, t, n) {
|
|
739
|
+
let r = st(e, t, n), i = M(t, n);
|
|
894
740
|
i && (!D(i.blocks) || i.settings !== void 0 && !D(i.settings)) && E("invalid_operation", n, "expect needs a blocks object and an optional settings layer.");
|
|
895
|
-
let a = e.settings, o =
|
|
741
|
+
let a = e.settings, o = P(Le(e)), s = Object.fromEntries(o.flatMap((e) => D(e.l10n) && Object.hasOwn(e.l10n, r) ? [[String(e.id), e.l10n[r]]] : []));
|
|
896
742
|
!i || h(s, i.blocks) && h(D(a.l10n) ? a.l10n[r] : void 0, i.settings) || E("precondition_failed", n, `Locale "${r}" has changed since.`);
|
|
897
743
|
for (let e of [...o, a]) D(e.l10n) && (delete e.l10n[r], Object.keys(e.l10n).length === 0 && delete e.l10n);
|
|
898
744
|
e.settings.locales.splice(e.settings.locales.indexOf(r), 1), e.settings.locales.length === 0 && delete e.settings.locales;
|
|
899
745
|
}
|
|
900
|
-
function
|
|
746
|
+
function dt(e, t, n) {
|
|
901
747
|
(e.text === void 0 || ((e) => D(e) && Object.values(e).every((e) => D(e) && typeof e.value == "string" && typeof e.sourceHash == "string"))(e.text)) && (e.set === void 0 || D(e.set) && !Object.values(e.set).some((e) => e === void 0)) && (e.unset === void 0 || Array.isArray(e.unset) && e.unset.every((e) => typeof e == "string" && e !== "" && v(e))) && (e.hidden === void 0 || !n && typeof e.hidden == "boolean") && [
|
|
902
748
|
"text",
|
|
903
749
|
"set",
|
|
904
750
|
"unset",
|
|
905
751
|
...n ? [] : ["hidden"]
|
|
906
752
|
].some((t) => e[t] !== void 0) || E("invalid_operation", t, "A locale update needs text, set, unset or a block's boolean hidden.");
|
|
907
|
-
let r =
|
|
753
|
+
let r = M(e, t);
|
|
908
754
|
return r && (r.text !== void 0 && !D(r.text) || r.set !== void 0 && !D(r.set) || r.hidden !== void 0 && (n || typeof r.hidden != "boolean")) && E("invalid_operation", t, "The locale layer expect is malformed."), {
|
|
909
755
|
text: e.text ?? {},
|
|
910
756
|
set: e.set ?? {},
|
|
@@ -913,20 +759,20 @@ function St(e, t, n) {
|
|
|
913
759
|
expect: r
|
|
914
760
|
};
|
|
915
761
|
}
|
|
916
|
-
function
|
|
917
|
-
for (let i of Object.keys(t.text)) v(i) && (r ? g.includes(i) :
|
|
762
|
+
function ft(e, t, n, r) {
|
|
763
|
+
for (let i of Object.keys(t.text)) v(i) && (r ? g.includes(i) : me(String(e.type), i)) && y(e, i) !== void 0 || E("invalid_operation", n, `Text path "${i}" isn't translatable or doesn't resolve.`);
|
|
918
764
|
for (let i of Object.keys(t.set)) {
|
|
919
|
-
let a = i.split("."), o = r ?
|
|
920
|
-
(!v(i) || o.has(a[0]) || !r &&
|
|
765
|
+
let a = i.split("."), o = r ? Pe : Me, s = a.length === 1 ? e : y(e, a.slice(0, -1).join("."));
|
|
766
|
+
(!v(i) || o.has(a[0]) || !r && de(e, i, t.set[i]) || y(e, i) === void 0 && !D(s)) && E("invalid_operation", n, `Override path "${i}" is immutable or doesn't resolve.`);
|
|
921
767
|
}
|
|
922
768
|
}
|
|
923
|
-
function
|
|
769
|
+
function pt(e, t, n, r) {
|
|
924
770
|
if (t) {
|
|
925
771
|
for (let i of ["text", "set"]) for (let [a, o] of Object.entries(t[i] ?? {})) h(e[i]?.[a] ?? null, o) || E("precondition_failed", n, `Locale path "${a}" has changed since.`, r);
|
|
926
772
|
t.hidden !== void 0 && !h(e.hidden === !0, t.hidden) && E("precondition_failed", n, "The locale's hidden state has changed since.", r);
|
|
927
773
|
}
|
|
928
774
|
}
|
|
929
|
-
function
|
|
775
|
+
function mt(e, t, n) {
|
|
930
776
|
D(e.l10n) || (e.l10n = {});
|
|
931
777
|
let r = e.l10n, i = Object.prototype.hasOwnProperty.call(r, t) ? r[t] : void 0, a = D(i) ? i : {};
|
|
932
778
|
a !== i && (r[t] = a);
|
|
@@ -935,65 +781,327 @@ function Tt(e, t, n) {
|
|
|
935
781
|
for (let [e, t] of Object.entries(n.set)) a.set ||= {}, a.set[e] = m(t), a.text && delete a.text[e];
|
|
936
782
|
n.hidden === !0 ? a.hidden = !0 : n.hidden === !1 && delete a.hidden, a.text && Object.keys(a.text).length === 0 && delete a.text, a.set && Object.keys(a.set).length === 0 && delete a.set, Object.keys(a).length === 0 && delete r[t], Object.keys(r).length === 0 && delete e.l10n;
|
|
937
783
|
}
|
|
938
|
-
function
|
|
939
|
-
return D(e) ? e.type === "slot" || Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(
|
|
784
|
+
function F(e) {
|
|
785
|
+
return D(e) ? e.type === "slot" || Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(F) : F(e)) : !1;
|
|
940
786
|
}
|
|
941
|
-
function
|
|
787
|
+
function ht(e) {
|
|
942
788
|
return D(e) && D(e.l10n) && Object.values(e.l10n).some((e) => D(e) && e.hidden === !0);
|
|
943
789
|
}
|
|
944
|
-
function
|
|
945
|
-
return !D(e) || !
|
|
790
|
+
function gt(e) {
|
|
791
|
+
return !D(e) || !F(e) ? !1 : ht(e) ? !0 : Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(gt) : gt(e));
|
|
946
792
|
}
|
|
947
|
-
function
|
|
948
|
-
if (!
|
|
793
|
+
function _t(e, t, n, r, i) {
|
|
794
|
+
if (!F(t)) return;
|
|
949
795
|
let a = n, o = !1;
|
|
950
796
|
for (; a !== null;) {
|
|
951
|
-
let t =
|
|
797
|
+
let t = k(e, "wrapperId" in a ? a.wrapperId : a.sectionId);
|
|
952
798
|
if (!t) break;
|
|
953
|
-
|
|
799
|
+
ht(t.block) && (o = !0), a = t.parent;
|
|
954
800
|
}
|
|
955
|
-
(o || i &&
|
|
801
|
+
(o || i && gt(t)) && E("invalid_operation", r, "A layout's slot block can't be placed inside a block that a language hides.", D(t) && typeof t.id == "string" ? t.id : void 0);
|
|
956
802
|
}
|
|
957
|
-
function
|
|
958
|
-
let i =
|
|
959
|
-
s || E("block_missing", n, `No block with id "${a}".`, a),
|
|
803
|
+
function vt(e, t, n, r) {
|
|
804
|
+
let i = st(e, t, n), a = j(t, n), o = dt(t, n, !1), s = P(Le(e)).find((e) => e.id === a);
|
|
805
|
+
s || E("block_missing", n, `No block with id "${a}".`, a), ft(s, o, n, !1), Ke(r, a, i, n), pt(lt(s, i), o.expect, n, a), o.hidden === !0 && F(s) && E("invalid_operation", n, "A layout's slot block, and any block that contains it, can't be hidden.", a), mt(s, i, o);
|
|
960
806
|
}
|
|
961
|
-
function
|
|
962
|
-
let r =
|
|
963
|
-
|
|
807
|
+
function yt(e, t, n) {
|
|
808
|
+
let r = st(e, t, n), i = dt(t, n, !0), a = e.settings;
|
|
809
|
+
ft(a, i, n, !0), pt(lt(a, r), i.expect, n), mt(a, r, i);
|
|
964
810
|
}
|
|
965
|
-
function
|
|
811
|
+
function bt(e, t, n, r) {
|
|
966
812
|
let i = t.content;
|
|
967
813
|
if (!D(i) || !Array.isArray(i.blocks) || !D(i.settings)) return E("invalid_operation", n, "setContent needs content with a blocks array and a settings object.");
|
|
968
|
-
|
|
969
|
-
let a = r.locks.find((e) =>
|
|
814
|
+
$e(i, n, e);
|
|
815
|
+
let a = r.locks.find((e) => N(r, e));
|
|
970
816
|
a && E("locked_by_others", n, "Other sessions hold locks on this template.", a.blockId), e.blocks = m(i.blocks), e.settings = m(i.settings);
|
|
971
817
|
}
|
|
972
|
-
function
|
|
973
|
-
let i =
|
|
818
|
+
function xt(e, t, n, r) {
|
|
819
|
+
let i = ot(t, n);
|
|
974
820
|
e.settings.locales?.includes(i) || E("invalid_operation", n, `"${i}" is not a language version of this template.`);
|
|
975
|
-
let a =
|
|
821
|
+
let a = we(e, i);
|
|
976
822
|
a.length && E("invalid_operation", n, a.length === 1 ? `1 block is hidden in "${i}". Show it before making it the default.` : `${a.length} blocks are hidden in "${i}". Show them before making it the default.`, a[0]);
|
|
977
|
-
let o = r.locks.find((e) =>
|
|
823
|
+
let o = r.locks.find((e) => N(r, e));
|
|
978
824
|
o && E("locked_by_others", n, "Other sessions hold locks on this template.", o.blockId);
|
|
979
825
|
let s = t.customTextFields;
|
|
980
826
|
if (s !== void 0) {
|
|
981
|
-
let t =
|
|
827
|
+
let t = P(e.blocks);
|
|
982
828
|
(!D(s) || Object.getOwnPropertyNames(s).some((e) => {
|
|
983
|
-
if (
|
|
829
|
+
if (Fe.has(e)) return !0;
|
|
984
830
|
let n = s[e], r = t.find((t) => t.id === e);
|
|
985
|
-
return r?.type !== "custom" || !Array.isArray(n) || n.some((e) => typeof e != "string" || !v(e) || !
|
|
986
|
-
})) && E("invalid_operation", n,
|
|
831
|
+
return r?.type !== "custom" || !Array.isArray(n) || n.some((e) => typeof e != "string" || !v(e) || !me("custom", e) || typeof y(r, e) != "string");
|
|
832
|
+
})) && E("invalid_operation", n, Ie);
|
|
987
833
|
}
|
|
988
|
-
let c =
|
|
834
|
+
let c = De(e, i, t.customTextFields);
|
|
989
835
|
e.blocks = c.blocks, e.settings = c.settings;
|
|
990
836
|
}
|
|
991
|
-
// ../types/src/
|
|
837
|
+
// ../types/src/columns.ts
|
|
838
|
+
var St = {
|
|
839
|
+
1: [100],
|
|
840
|
+
2: [50, 50],
|
|
841
|
+
3: [
|
|
842
|
+
33.33,
|
|
843
|
+
33.33,
|
|
844
|
+
33.34
|
|
845
|
+
],
|
|
846
|
+
4: [
|
|
847
|
+
25,
|
|
848
|
+
25,
|
|
849
|
+
25,
|
|
850
|
+
25
|
|
851
|
+
],
|
|
852
|
+
"1-2": [33.33, 66.67],
|
|
853
|
+
"2-1": [66.67, 33.33],
|
|
854
|
+
"1-3": [25, 75],
|
|
855
|
+
"3-1": [75, 25],
|
|
856
|
+
"1-2-1": [
|
|
857
|
+
25,
|
|
858
|
+
50,
|
|
859
|
+
25
|
|
860
|
+
]
|
|
861
|
+
};
|
|
862
|
+
function Ct(e) {
|
|
863
|
+
return Object.hasOwn(St, e) ? St[e] : [100];
|
|
864
|
+
}
|
|
865
|
+
function wt(e) {
|
|
866
|
+
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
867
|
+
}
|
|
868
|
+
function Tt(e) {
|
|
869
|
+
let t = e.columnWidths;
|
|
870
|
+
if (t === void 0) return null;
|
|
871
|
+
if (!Array.isArray(t)) return "value";
|
|
872
|
+
if (t.length !== Ae(e.columns)) return "count";
|
|
873
|
+
for (let e = 0; e < t.length; e++) if (!wt(t[e])) return "value";
|
|
874
|
+
return null;
|
|
875
|
+
}
|
|
876
|
+
var Et = 0xe8d4a51000, Dt = 1e4;
|
|
877
|
+
function Ot(e) {
|
|
878
|
+
let t = e.length, n = 0;
|
|
879
|
+
for (let r = 0; r < t; r++) {
|
|
880
|
+
let t = e[r];
|
|
881
|
+
t > n && (n = t);
|
|
882
|
+
}
|
|
883
|
+
let r = [], i = 0n;
|
|
884
|
+
for (let a = 0; a < t; a++) {
|
|
885
|
+
let t = BigInt(Math.round(e[a] / n * Et));
|
|
886
|
+
r.push(t), i += t;
|
|
887
|
+
}
|
|
888
|
+
let a = [], o = [], s = BigInt(Dt);
|
|
889
|
+
for (let e = 0; e < t; e++) {
|
|
890
|
+
let t = r[e] * s;
|
|
891
|
+
a.push(Number(t / i)), o.push(t % i);
|
|
892
|
+
}
|
|
893
|
+
for (let e = 0; e < t; e++) a[e] < 1 && (a[e] = 1);
|
|
894
|
+
let c = 0;
|
|
895
|
+
for (let e = 0; e < t; e++) c += a[e];
|
|
896
|
+
let l = Dt - c, u = Array.from({ length: t }, (e, t) => t);
|
|
897
|
+
if (l > 0) {
|
|
898
|
+
u.sort((e, t) => o[e] === o[t] ? e - t : o[e] > o[t] ? -1 : 1);
|
|
899
|
+
for (let e = 0; e < l; e++) a[u[e]] += 1;
|
|
900
|
+
} else if (l < 0) {
|
|
901
|
+
u.sort((e, t) => o[e] === o[t] ? t - e : o[e] < o[t] ? -1 : 1);
|
|
902
|
+
let e = -l;
|
|
903
|
+
for (let t of u) {
|
|
904
|
+
if (e === 0) break;
|
|
905
|
+
let n = a[t] - 1;
|
|
906
|
+
if (n <= 0) continue;
|
|
907
|
+
let r = Math.min(n, e);
|
|
908
|
+
a[t] = a[t] - r, e -= r;
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
return a.map((e) => e / 100);
|
|
912
|
+
}
|
|
913
|
+
function kt(e) {
|
|
914
|
+
return e.columnWidths !== void 0 && Tt(e) === null ? Ot(e.columnWidths) : [...Ct(e.columns)];
|
|
915
|
+
}
|
|
916
|
+
// ../types/src/background-image.ts
|
|
917
|
+
var At = [
|
|
918
|
+
"cover",
|
|
919
|
+
"contain",
|
|
920
|
+
"auto"
|
|
921
|
+
], jt = [
|
|
922
|
+
"left",
|
|
923
|
+
"center",
|
|
924
|
+
"right"
|
|
925
|
+
], Mt = [
|
|
926
|
+
"top",
|
|
927
|
+
"center",
|
|
928
|
+
"bottom"
|
|
929
|
+
];
|
|
992
930
|
function Nt(e) {
|
|
931
|
+
return {
|
|
932
|
+
url: e,
|
|
933
|
+
size: "cover",
|
|
934
|
+
position: {
|
|
935
|
+
x: "center",
|
|
936
|
+
y: "center"
|
|
937
|
+
},
|
|
938
|
+
repeat: !1
|
|
939
|
+
};
|
|
940
|
+
}
|
|
941
|
+
function Pt(e) {
|
|
942
|
+
let t = "";
|
|
943
|
+
for (let n of e) {
|
|
944
|
+
let e = n.charCodeAt(0);
|
|
945
|
+
t += e < 32 || e === 127 || n === "'" || n === "\"" || n === "\\" ? `%${e.toString(16).toUpperCase().padStart(2, "0")}` : n;
|
|
946
|
+
}
|
|
947
|
+
return t;
|
|
948
|
+
}
|
|
949
|
+
function Ft(e) {
|
|
950
|
+
let t = typeof e?.url == "string" ? e.url.trim() : "";
|
|
951
|
+
if (!e || !t) return null;
|
|
952
|
+
let n = At.includes(e.size) ? e.size : "cover", r = e.position, i = r && jt.includes(r.x) ? r.x : "center", a = r && Mt.includes(r.y) ? r.y : "center";
|
|
953
|
+
return {
|
|
954
|
+
url: Pt(t),
|
|
955
|
+
size: n,
|
|
956
|
+
position: `${i} ${a}`,
|
|
957
|
+
repeat: e.repeat ? "repeat" : "no-repeat"
|
|
958
|
+
};
|
|
959
|
+
}
|
|
960
|
+
// ../types/src/hero.ts
|
|
961
|
+
var It = [
|
|
962
|
+
"top",
|
|
963
|
+
"middle",
|
|
964
|
+
"bottom"
|
|
965
|
+
];
|
|
966
|
+
function Lt(e) {
|
|
967
|
+
let t = e.hero;
|
|
968
|
+
if (!t || typeof t != "object") return null;
|
|
969
|
+
if (e.columns !== "1") return {
|
|
970
|
+
applied: !1,
|
|
971
|
+
reason: "columns"
|
|
972
|
+
};
|
|
973
|
+
let n = Ft(e.backgroundImage);
|
|
974
|
+
if (n === null) return {
|
|
975
|
+
applied: !1,
|
|
976
|
+
reason: "image"
|
|
977
|
+
};
|
|
978
|
+
let r = zt(e.backgroundImage), i = Rt(t.height) ? Math.round(t.height) : "image";
|
|
979
|
+
return i === "image" && r === null ? {
|
|
980
|
+
applied: !1,
|
|
981
|
+
reason: "size"
|
|
982
|
+
} : {
|
|
983
|
+
applied: !0,
|
|
984
|
+
image: n,
|
|
985
|
+
height: i,
|
|
986
|
+
verticalAlign: It.includes(t.verticalAlign) ? t.verticalAlign : "middle",
|
|
987
|
+
aspectRatio: r
|
|
988
|
+
};
|
|
989
|
+
}
|
|
990
|
+
function Rt(e) {
|
|
991
|
+
return typeof e == "number" && Number.isFinite(e) && e >= 1;
|
|
992
|
+
}
|
|
993
|
+
function zt(e) {
|
|
994
|
+
let t = e?.naturalWidth, n = e?.naturalHeight;
|
|
995
|
+
return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0 ? null : n / t;
|
|
996
|
+
}
|
|
997
|
+
// ../types/src/social.ts
|
|
998
|
+
var Bt = {
|
|
999
|
+
facebook: {
|
|
1000
|
+
color: "#1877F2",
|
|
1001
|
+
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"
|
|
1002
|
+
},
|
|
1003
|
+
twitter: {
|
|
1004
|
+
color: "#000000",
|
|
1005
|
+
path: "M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"
|
|
1006
|
+
},
|
|
1007
|
+
instagram: {
|
|
1008
|
+
color: "#E4405F",
|
|
1009
|
+
path: "M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.131 5.775.072 7.053.012 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 2.16c3.203 0 3.585.016 4.85.071 1.17.055 1.805.249 2.227.415.562.217.96.477 1.382.896.419.42.679.819.896 1.381.164.422.36 1.057.413 2.227.057 1.266.07 1.646.07 4.85s-.015 3.585-.074 4.85c-.061 1.17-.256 1.805-.421 2.227-.224.562-.479.96-.899 1.382-.419.419-.824.679-1.38.896-.42.164-1.065.36-2.235.413-1.274.057-1.649.07-4.859.07-3.211 0-3.586-.015-4.859-.074-1.171-.061-1.816-.256-2.236-.421-.569-.224-.96-.479-1.379-.899-.421-.419-.69-.824-.9-1.38-.165-.42-.359-1.065-.42-2.235-.045-1.26-.061-1.649-.061-4.844 0-3.196.016-3.586.061-4.861.061-1.17.255-1.814.42-2.234.21-.57.479-.96.9-1.381.419-.419.81-.689 1.379-.898.42-.166 1.051-.361 2.221-.421 1.275-.045 1.65-.06 4.859-.06l.045.03zm0 3.678c-3.405 0-6.162 2.76-6.162 6.162 0 3.405 2.76 6.162 6.162 6.162 3.405 0 6.162-2.76 6.162-6.162 0-3.405-2.76-6.162-6.162-6.162zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4zm7.846-10.405c0 .795-.646 1.44-1.44 1.44-.795 0-1.44-.646-1.44-1.44 0-.794.646-1.439 1.44-1.439.793-.001 1.44.645 1.44 1.439z"
|
|
1010
|
+
},
|
|
1011
|
+
linkedin: {
|
|
1012
|
+
color: "#0A66C2",
|
|
1013
|
+
path: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z"
|
|
1014
|
+
},
|
|
1015
|
+
xing: {
|
|
1016
|
+
color: "#006567",
|
|
1017
|
+
path: "M18.188 0c-.517 0-.741.325-.927.66c0 0-7.455 13.224-7.702 13.657c.015.024 4.919 9.023 4.919 9.023c.17.308.436.66.967.66h3.454c.211 0 .375-.078.463-.22c.089-.151.089-.346-.009-.536l-4.879-8.916a.02.02 0 0 1 0-.022L22.139.756c.095-.191.097-.387.006-.535C22.056.078 21.894 0 21.686 0zM3.648 4.74c-.211 0-.385.074-.473.216c-.09.149-.078.339.02.531l2.34 4.05q.006.014 0 .021L1.86 16.051a.52.52 0 0 0 0 .529c.085.142.239.234.45.234h3.461c.518 0 .766-.348.945-.667l3.734-6.609l-2.378-4.155c-.172-.315-.434-.659-.962-.659H3.648z"
|
|
1018
|
+
},
|
|
1019
|
+
youtube: {
|
|
1020
|
+
color: "#FF0000",
|
|
1021
|
+
path: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"
|
|
1022
|
+
},
|
|
1023
|
+
tiktok: {
|
|
1024
|
+
color: "#000000",
|
|
1025
|
+
path: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"
|
|
1026
|
+
},
|
|
1027
|
+
pinterest: {
|
|
1028
|
+
color: "#BD081C",
|
|
1029
|
+
path: "M12 0C5.373 0 0 5.372 0 12c0 5.084 3.163 9.426 7.627 11.174-.105-.949-.2-2.405.042-3.441.218-.937 1.407-5.965 1.407-5.965s-.359-.719-.359-1.782c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738.098.119.112.224.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146C9.57 23.812 10.763 24 12 24c6.627 0 12-5.373 12-12 0-6.628-5.373-12-12-12z"
|
|
1030
|
+
},
|
|
1031
|
+
email: {
|
|
1032
|
+
color: "#6B7280",
|
|
1033
|
+
path: "M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z"
|
|
1034
|
+
},
|
|
1035
|
+
website: {
|
|
1036
|
+
color: "#6B7280",
|
|
1037
|
+
path: "M21.721 12.752a9.711 9.711 0 0 0-.945-5.003 12.754 12.754 0 0 1-4.339 2.708 18.991 18.991 0 0 1-.214 4.772 17.165 17.165 0 0 0 5.498-2.477ZM14.634 15.55a17.324 17.324 0 0 0 .332-4.647c-.952.227-1.945.347-2.966.347-1.021 0-2.014-.12-2.966-.347a17.515 17.515 0 0 0 .332 4.647 17.385 17.385 0 0 0 5.268 0ZM9.772 17.119a18.963 18.963 0 0 0 4.456 0A17.182 17.182 0 0 1 12 21.724a17.18 17.18 0 0 1-2.228-4.605ZM7.777 15.23a18.87 18.87 0 0 1-.214-4.774 12.753 12.753 0 0 1-4.34-2.708 9.711 9.711 0 0 0-.944 5.004 17.165 17.165 0 0 0 5.498 2.477ZM21.356 14.752a9.765 9.765 0 0 1-7.478 6.817 18.64 18.64 0 0 0 1.988-4.718 18.627 18.627 0 0 0 5.49-2.098ZM2.644 14.752c1.682.971 3.53 1.688 5.49 2.099a18.64 18.64 0 0 0 1.988 4.718 9.765 9.765 0 0 1-7.478-6.816ZM13.878 2.43a9.755 9.755 0 0 1 6.116 3.986 11.267 11.267 0 0 1-3.746 2.504 18.63 18.63 0 0 0-2.37-6.49ZM12 2.276a17.152 17.152 0 0 1 2.805 7.121c-.897.23-1.837.353-2.805.353-.968 0-1.908-.122-2.805-.353A17.151 17.151 0 0 1 12 2.276ZM10.122 2.43a18.629 18.629 0 0 0-2.37 6.49 11.266 11.266 0 0 1-3.746-2.504 9.754 9.754 0 0 1 6.116-3.985Z"
|
|
1038
|
+
},
|
|
1039
|
+
whatsapp: {
|
|
1040
|
+
color: "#25D366",
|
|
1041
|
+
path: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"
|
|
1042
|
+
},
|
|
1043
|
+
telegram: {
|
|
1044
|
+
color: "#26A5E4",
|
|
1045
|
+
path: "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"
|
|
1046
|
+
},
|
|
1047
|
+
discord: {
|
|
1048
|
+
color: "#5865F2",
|
|
1049
|
+
path: "M20.317 4.3698a19.7913 19.7913 0 00-4.8851-1.5152.0741.0741 0 00-.0785.0371c-.211.3753-.4447.8648-.6083 1.2495-1.8447-.2762-3.68-.2762-5.4868 0-.1636-.3933-.4058-.8742-.6177-1.2495a.077.077 0 00-.0785-.037 19.7363 19.7363 0 00-4.8852 1.515.0699.0699 0 00-.0321.0277C.5334 9.0458-.319 13.5799.0992 18.0578a.0824.0824 0 00.0312.0561c2.0528 1.5076 4.0413 2.4228 5.9929 3.0294a.0777.0777 0 00.0842-.0276c.4616-.6304.8731-1.2952 1.226-1.9942a.076.076 0 00-.0416-.1057c-.6528-.2476-1.2743-.5495-1.8722-.8923a.077.077 0 01-.0076-.1277c.1258-.0943.2517-.1923.3718-.2914a.0743.0743 0 01.0776-.0105c3.9278 1.7933 8.18 1.7933 12.0614 0a.0739.0739 0 01.0785.0095c.1202.099.246.1981.3728.2924a.077.077 0 01-.0066.1276 12.2986 12.2986 0 01-1.873.8914.0766.0766 0 00-.0407.1067c.3604.698.7719 1.3628 1.225 1.9932a.076.076 0 00.0842.0286c1.961-.6067 3.9495-1.5219 6.0023-3.0294a.077.077 0 00.0313-.0552c.5004-5.177-.8382-9.6739-3.5485-13.6604a.061.061 0 00-.0312-.0286zM8.02 15.3312c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9555-2.4189 2.157-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.9555 2.4189-2.1569 2.4189zm7.9748 0c-1.1825 0-2.1569-1.0857-2.1569-2.419 0-1.3332.9554-2.4189 2.1569-2.4189 1.2108 0 2.1757 1.0952 2.1568 2.419 0 1.3332-.946 2.4189-2.1568 2.4189z"
|
|
1050
|
+
},
|
|
1051
|
+
snapchat: {
|
|
1052
|
+
color: "#FFFC00",
|
|
1053
|
+
path: "M12.017 0C5.396 0 .029 5.367.029 11.987c0 5.079 3.158 9.417 7.618 11.162-.105-.949-.199-2.403.041-3.439.219-.937 1.406-5.957 1.406-5.957s-.359-.72-.359-1.781c0-1.668.967-2.914 2.171-2.914 1.023 0 1.518.769 1.518 1.69 0 1.029-.655 2.568-.994 3.995-.283 1.194.599 2.169 1.777 2.169 2.133 0 3.772-2.249 3.772-5.495 0-2.873-2.064-4.882-5.012-4.882-3.414 0-5.418 2.561-5.418 5.207 0 1.031.397 2.138.893 2.738a.36.36 0 01.083.345l-.333 1.36c-.053.22-.174.267-.402.161-1.499-.698-2.436-2.889-2.436-4.649 0-3.785 2.75-7.262 7.929-7.262 4.163 0 7.398 2.967 7.398 6.931 0 4.136-2.607 7.464-6.227 7.464-1.216 0-2.359-.631-2.75-1.378l-.748 2.853c-.271 1.043-1.002 2.35-1.492 3.146 1.124.347 2.317.535 3.554.535 6.627 0 12.017-5.373 12.017-12.001C24.034 5.367 18.644 0 12.017 0z"
|
|
1054
|
+
},
|
|
1055
|
+
reddit: {
|
|
1056
|
+
color: "#FF4500",
|
|
1057
|
+
path: "M12 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0zm5.01 4.744c.688 0 1.25.561 1.25 1.249a1.25 1.25 0 0 1-2.498.056l-2.597-.547-.8 3.747c1.824.07 3.48.632 4.674 1.488.308-.309.73-.491 1.207-.491.968 0 1.754.786 1.754 1.754 0 .716-.435 1.333-1.01 1.614a3.111 3.111 0 0 1 .042.52c0 2.694-3.13 4.87-7.004 4.87-3.874 0-7.004-2.176-7.004-4.87 0-.183.015-.366.043-.534A1.748 1.748 0 0 1 4.028 12c0-.968.786-1.754 1.754-1.754.463 0 .898.196 1.207.49 1.207-.883 2.878-1.43 4.744-1.487l.885-4.182a.342.342 0 0 1 .14-.197.35.35 0 0 1 .238-.042l2.906.617a1.214 1.214 0 0 1 1.108-.701zM9.25 12C8.561 12 8 12.562 8 13.25c0 .687.561 1.248 1.25 1.248.687 0 1.248-.561 1.248-1.249 0-.688-.561-1.249-1.249-1.249zm5.5 0c-.687 0-1.248.561-1.248 1.25 0 .687.561 1.248 1.249 1.248.688 0 1.249-.561 1.249-1.249 0-.687-.562-1.249-1.25-1.249zm-5.466 3.99a.327.327 0 0 0-.231.094.33.33 0 0 0 0 .463c.842.842 2.484.913 2.961.913.477 0 2.105-.056 2.961-.913a.361.361 0 0 0 .029-.463.33.33 0 0 0-.464 0c-.547.533-1.684.73-2.512.73-.828 0-1.979-.196-2.512-.73a.326.326 0 0 0-.232-.095z"
|
|
1058
|
+
},
|
|
1059
|
+
github: {
|
|
1060
|
+
color: "#181717",
|
|
1061
|
+
path: "M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"
|
|
1062
|
+
},
|
|
1063
|
+
dribbble: {
|
|
1064
|
+
color: "#EA4C89",
|
|
1065
|
+
path: "M12 24C5.385 24 0 18.615 0 12S5.385 0 12 0s12 5.385 12 12-5.385 12-12 12zm10.12-10.358c-.35-.11-3.17-.953-6.384-.438 1.34 3.684 1.887 6.684 1.992 7.308 2.3-1.555 3.936-4.02 4.392-6.87zm-6.115 7.808c-.153-.9-.75-4.032-2.19-7.77l-.066.02c-5.79 2.015-7.86 6.025-8.04 6.4 1.73 1.358 3.92 2.166 6.29 2.166 1.42 0 2.77-.29 4-.814zm-11.62-2.58c.232-.4 3.045-5.055 8.332-6.765.135-.045.27-.084.405-.12-.26-.585-.54-1.167-.832-1.74C7.17 11.775 2.206 11.71 1.756 11.7l-.004.312c0 2.633.998 5.037 2.634 6.855zm-2.42-8.955c.46.008 4.683.026 9.477-1.248-1.698-3.018-3.53-5.558-3.8-5.928-2.868 1.35-5.01 3.99-5.676 7.17zM9.6 2.052c.282.38 2.145 2.914 3.822 6 3.645-1.365 5.19-3.44 5.373-3.702-1.81-1.61-4.19-2.586-6.795-2.586-.825 0-1.63.1-2.4.285zm10.335 3.483c-.218.29-1.935 2.493-5.724 4.04.24.49.47.985.68 1.486.08.18.15.36.22.53 3.41-.43 6.8.26 7.14.33-.02-2.42-.88-4.64-2.31-6.38z"
|
|
1066
|
+
},
|
|
1067
|
+
behance: {
|
|
1068
|
+
color: "#1769FF",
|
|
1069
|
+
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"
|
|
1070
|
+
}
|
|
1071
|
+
}, Vt = {
|
|
1072
|
+
dark: "#1f1f1f",
|
|
1073
|
+
light: "#ffffff"
|
|
1074
|
+
};
|
|
1075
|
+
function Ht(e) {
|
|
1076
|
+
return e === "dark" || e === "light" ? e : void 0;
|
|
1077
|
+
}
|
|
1078
|
+
function Ut(e, t) {
|
|
1079
|
+
let n = Ht(t);
|
|
1080
|
+
return {
|
|
1081
|
+
fill: n ? Vt[n] : Bt[e].color,
|
|
1082
|
+
onFill: n === "light" ? Vt.dark : "#ffffff"
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
function Wt(e, t) {
|
|
1086
|
+
let n = Ht(t);
|
|
1087
|
+
return n ? `${e}-${n}` : e;
|
|
1088
|
+
}
|
|
1089
|
+
function Gt(e, t) {
|
|
1090
|
+
if (Ht(t) === "dark" && (e === "plain" || e === "outlined")) return {
|
|
1091
|
+
color: Vt.light,
|
|
1092
|
+
opacity: .6,
|
|
1093
|
+
width: 1.4
|
|
1094
|
+
};
|
|
1095
|
+
}
|
|
1096
|
+
function Kt(e) {
|
|
1097
|
+
return e === "plain" ? .84 : .6;
|
|
1098
|
+
}
|
|
1099
|
+
// ../types/src/invert-operations.ts
|
|
1100
|
+
function qt(e) {
|
|
993
1101
|
let t = e.children;
|
|
994
1102
|
return e.type === "section" && Array.isArray(t) ? t : [];
|
|
995
1103
|
}
|
|
996
|
-
function
|
|
1104
|
+
function Jt(e, t, n = null) {
|
|
997
1105
|
for (let r = 0; r < e.length; r++) {
|
|
998
1106
|
let i = e[r];
|
|
999
1107
|
if (i.id === t) return {
|
|
@@ -1001,28 +1109,28 @@ function Pt(e, t, n = null) {
|
|
|
1001
1109
|
parent: n,
|
|
1002
1110
|
after: r > 0 ? e[r - 1].id : null
|
|
1003
1111
|
};
|
|
1004
|
-
let a =
|
|
1112
|
+
let a = qt(i);
|
|
1005
1113
|
for (let e = 0; e < a.length; e++) {
|
|
1006
1114
|
if (!Array.isArray(a[e])) continue;
|
|
1007
|
-
let n =
|
|
1115
|
+
let n = Jt(a[e], t, {
|
|
1008
1116
|
sectionId: i.id,
|
|
1009
1117
|
column: e
|
|
1010
1118
|
});
|
|
1011
1119
|
if (n) return n;
|
|
1012
1120
|
}
|
|
1013
1121
|
if (i.type === "wrapper" && Array.isArray(i.children)) {
|
|
1014
|
-
let e =
|
|
1122
|
+
let e = Jt(i.children, t, { wrapperId: i.id });
|
|
1015
1123
|
if (e) return e;
|
|
1016
1124
|
}
|
|
1017
1125
|
}
|
|
1018
1126
|
return null;
|
|
1019
1127
|
}
|
|
1020
|
-
function
|
|
1021
|
-
let r =
|
|
1128
|
+
function Yt(e, t, n) {
|
|
1129
|
+
let r = Jt(e.blocks, t);
|
|
1022
1130
|
if (!r) throw new w("block_missing", n, `No block with id "${t}".`, t);
|
|
1023
1131
|
return r;
|
|
1024
1132
|
}
|
|
1025
|
-
function
|
|
1133
|
+
function Xt(e, t, n) {
|
|
1026
1134
|
let r = {}, i = [], a = {}, o = [.../* @__PURE__ */ new Set([...Object.keys(t ?? {}), ...n ?? []])];
|
|
1027
1135
|
for (let n of o) {
|
|
1028
1136
|
let o = e[n];
|
|
@@ -1036,10 +1144,10 @@ function It(e, t, n) {
|
|
|
1036
1144
|
expect: a
|
|
1037
1145
|
};
|
|
1038
1146
|
}
|
|
1039
|
-
function
|
|
1147
|
+
function I(e, t) {
|
|
1040
1148
|
return e.l10n?.[t] ?? {};
|
|
1041
1149
|
}
|
|
1042
|
-
function
|
|
1150
|
+
function L(e, t, n, r) {
|
|
1043
1151
|
let i = {}, a = {}, o = {};
|
|
1044
1152
|
n.length && (o.text = {}, o.set = {});
|
|
1045
1153
|
for (let r of n) e.text?.[r] !== void 0 && (i[r] = m(e.text[r])), e.set && Object.hasOwn(e.set, r) && (a[r] = m(e.set[r])), o.text[r] = m(t.text?.[r] ?? null), o.set[r] = m(t.set?.[r] ?? null);
|
|
@@ -1051,21 +1159,21 @@ function R(e, t, n, r) {
|
|
|
1051
1159
|
expect: o
|
|
1052
1160
|
};
|
|
1053
1161
|
}
|
|
1054
|
-
function
|
|
1055
|
-
let { unset: t, ...n } =
|
|
1162
|
+
function Zt(e) {
|
|
1163
|
+
let { unset: t, ...n } = L(e, {}, [.../* @__PURE__ */ new Set([...Object.keys(e.text ?? {}), ...Object.keys(e.set ?? {})])], e.hidden === !0);
|
|
1056
1164
|
return n;
|
|
1057
1165
|
}
|
|
1058
|
-
function
|
|
1059
|
-
return e.flatMap((e) => [e, ...e.type === "wrapper" ?
|
|
1166
|
+
function R(e) {
|
|
1167
|
+
return e.flatMap((e) => [e, ...e.type === "wrapper" ? R(e.children) : qt(e).flatMap(R)]);
|
|
1060
1168
|
}
|
|
1061
|
-
function
|
|
1169
|
+
function Qt(e, t) {
|
|
1062
1170
|
let n = m(e);
|
|
1063
1171
|
T(n, [t]);
|
|
1064
1172
|
let r = [], i = (e, t, n) => {
|
|
1065
1173
|
for (let [i, a] of Object.entries(e.l10n ?? {})) {
|
|
1066
1174
|
let e = t.l10n?.[i] ?? {}, o = [.../* @__PURE__ */ new Set([...Object.keys(a.text ?? {}).filter((t) => !Object.hasOwn(e.text ?? {}, t)), ...Object.keys(a.set ?? {}).filter((t) => !Object.hasOwn(e.set ?? {}, t))])];
|
|
1067
1175
|
if (!o.length) continue;
|
|
1068
|
-
let s =
|
|
1176
|
+
let s = L(a, e, o, !1);
|
|
1069
1177
|
r.push(n === void 0 ? {
|
|
1070
1178
|
op: "updateSettingsLocale",
|
|
1071
1179
|
locale: i,
|
|
@@ -1080,15 +1188,15 @@ function Rt(e, t) {
|
|
|
1080
1188
|
};
|
|
1081
1189
|
if (t.op === "updateSettings") i(e.settings, n.settings);
|
|
1082
1190
|
else {
|
|
1083
|
-
let t = new Map(
|
|
1084
|
-
for (let n of
|
|
1191
|
+
let t = new Map(R(n.blocks).map((e) => [e.id, e]));
|
|
1192
|
+
for (let n of R(e.blocks)) {
|
|
1085
1193
|
let e = t.get(n.id);
|
|
1086
1194
|
e && i(n, e, n.id);
|
|
1087
1195
|
}
|
|
1088
1196
|
}
|
|
1089
1197
|
return r;
|
|
1090
1198
|
}
|
|
1091
|
-
function
|
|
1199
|
+
function $t(e, t, n) {
|
|
1092
1200
|
switch (t.op) {
|
|
1093
1201
|
case "addBlock": return {
|
|
1094
1202
|
op: "deleteBlock",
|
|
@@ -1096,7 +1204,7 @@ function zt(e, t, n) {
|
|
|
1096
1204
|
expect: { block: m(t.block) }
|
|
1097
1205
|
};
|
|
1098
1206
|
case "deleteBlock": {
|
|
1099
|
-
let r =
|
|
1207
|
+
let r = Yt(e, t.blockId, n);
|
|
1100
1208
|
return {
|
|
1101
1209
|
op: "addBlock",
|
|
1102
1210
|
block: m(r.block),
|
|
@@ -1105,7 +1213,7 @@ function zt(e, t, n) {
|
|
|
1105
1213
|
};
|
|
1106
1214
|
}
|
|
1107
1215
|
case "moveBlock": {
|
|
1108
|
-
let r =
|
|
1216
|
+
let r = Yt(e, t.blockId, n);
|
|
1109
1217
|
return {
|
|
1110
1218
|
op: "moveBlock",
|
|
1111
1219
|
blockId: t.blockId,
|
|
@@ -1118,23 +1226,23 @@ function zt(e, t, n) {
|
|
|
1118
1226
|
};
|
|
1119
1227
|
}
|
|
1120
1228
|
case "updateBlock": {
|
|
1121
|
-
let r =
|
|
1229
|
+
let r = Yt(e, t.blockId, n).block, { set: i, unset: a, expect: o } = Xt(r, t.set, t.unset);
|
|
1122
1230
|
return [{
|
|
1123
1231
|
op: "updateBlock",
|
|
1124
1232
|
blockId: t.blockId,
|
|
1125
1233
|
...Object.keys(i).length > 0 ? { set: i } : {},
|
|
1126
1234
|
...a.length > 0 ? { unset: a } : {},
|
|
1127
1235
|
expect: o
|
|
1128
|
-
}, ...
|
|
1236
|
+
}, ...Qt(e, t)];
|
|
1129
1237
|
}
|
|
1130
1238
|
case "updateSettings": {
|
|
1131
|
-
let { set: n, unset: r, expect: i } =
|
|
1239
|
+
let { set: n, unset: r, expect: i } = Xt(e.settings, t.set, t.unset);
|
|
1132
1240
|
return [{
|
|
1133
1241
|
op: "updateSettings",
|
|
1134
1242
|
...Object.keys(n).length > 0 ? { set: n } : {},
|
|
1135
1243
|
...r.length > 0 ? { unset: r } : {},
|
|
1136
1244
|
expect: i
|
|
1137
|
-
}, ...
|
|
1245
|
+
}, ...Qt(e, t)];
|
|
1138
1246
|
}
|
|
1139
1247
|
case "addLocale": return {
|
|
1140
1248
|
op: "removeLocale",
|
|
@@ -1147,18 +1255,18 @@ function zt(e, t, n) {
|
|
|
1147
1255
|
locale: t.locale,
|
|
1148
1256
|
position: e.settings.locales?.indexOf(t.locale)
|
|
1149
1257
|
}];
|
|
1150
|
-
for (let r of
|
|
1258
|
+
for (let r of R(e.blocks)) {
|
|
1151
1259
|
let e = r.l10n?.[t.locale];
|
|
1152
1260
|
e && n.push({
|
|
1153
1261
|
op: "updateBlockLocale",
|
|
1154
1262
|
blockId: r.id,
|
|
1155
1263
|
locale: t.locale,
|
|
1156
|
-
...
|
|
1264
|
+
...Zt(e)
|
|
1157
1265
|
});
|
|
1158
1266
|
}
|
|
1159
1267
|
let r = e.settings.l10n?.[t.locale];
|
|
1160
1268
|
if (r) {
|
|
1161
|
-
let { hidden: e, ...i } =
|
|
1269
|
+
let { hidden: e, ...i } = Zt(r);
|
|
1162
1270
|
n.push({
|
|
1163
1271
|
op: "updateSettingsLocale",
|
|
1164
1272
|
locale: t.locale,
|
|
@@ -1177,15 +1285,15 @@ function zt(e, t, n) {
|
|
|
1177
1285
|
...t.unset ?? []
|
|
1178
1286
|
])];
|
|
1179
1287
|
if (t.op === "updateBlockLocale") {
|
|
1180
|
-
let i =
|
|
1288
|
+
let i = R(e.blocks).find((e) => e.id === t.blockId), a = R(n.blocks).find((e) => e.id === t.blockId);
|
|
1181
1289
|
return {
|
|
1182
1290
|
op: "updateBlockLocale",
|
|
1183
1291
|
blockId: t.blockId,
|
|
1184
1292
|
locale: t.locale,
|
|
1185
|
-
...
|
|
1293
|
+
...L(I(i, t.locale), I(a, t.locale), r, t.hidden !== void 0)
|
|
1186
1294
|
};
|
|
1187
1295
|
}
|
|
1188
|
-
let { hidden: i, ...a } =
|
|
1296
|
+
let { hidden: i, ...a } = L(I(e.settings, t.locale), I(n.settings, t.locale), r, !1);
|
|
1189
1297
|
return {
|
|
1190
1298
|
op: "updateSettingsLocale",
|
|
1191
1299
|
locale: t.locale,
|
|
@@ -1202,11 +1310,11 @@ function zt(e, t, n) {
|
|
|
1202
1310
|
};
|
|
1203
1311
|
}
|
|
1204
1312
|
}
|
|
1205
|
-
function
|
|
1313
|
+
function en(e, t) {
|
|
1206
1314
|
let n = m(e), r = [];
|
|
1207
1315
|
return t.forEach((e, t) => {
|
|
1208
1316
|
try {
|
|
1209
|
-
let i =
|
|
1317
|
+
let i = $t(n, e, t);
|
|
1210
1318
|
r.push(...Array.isArray(i) ? [...i].reverse() : [i]), T(n, [e]);
|
|
1211
1319
|
} catch (e) {
|
|
1212
1320
|
throw e instanceof w ? new w(e.code, t, e.message, e.blockId) : e;
|
|
@@ -1214,58 +1322,58 @@ function Bt(e, t) {
|
|
|
1214
1322
|
}), r.reverse();
|
|
1215
1323
|
}
|
|
1216
1324
|
// ../types/src/collaboration.ts
|
|
1217
|
-
function
|
|
1325
|
+
function tn(e) {
|
|
1218
1326
|
return e === "invalid_operation" ? 422 : e === "content_too_large" ? 413 : 409;
|
|
1219
1327
|
}
|
|
1220
|
-
var
|
|
1328
|
+
var nn = class extends ie {
|
|
1221
1329
|
opIndex;
|
|
1222
1330
|
holder;
|
|
1223
1331
|
holders;
|
|
1224
1332
|
constructor(e, t) {
|
|
1225
|
-
super(e, t.status ??
|
|
1333
|
+
super(e, t.status ?? tn(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);
|
|
1226
1334
|
}
|
|
1227
1335
|
};
|
|
1228
1336
|
// ../types/src/guards.ts
|
|
1229
|
-
function
|
|
1337
|
+
function z(e) {
|
|
1230
1338
|
return e.type === "section";
|
|
1231
1339
|
}
|
|
1232
|
-
function
|
|
1340
|
+
function rn(e) {
|
|
1233
1341
|
return e.type === "title";
|
|
1234
1342
|
}
|
|
1235
|
-
function
|
|
1343
|
+
function an(e) {
|
|
1236
1344
|
return e.type === "paragraph";
|
|
1237
1345
|
}
|
|
1238
|
-
function
|
|
1346
|
+
function on(e) {
|
|
1239
1347
|
return e.type === "image";
|
|
1240
1348
|
}
|
|
1241
|
-
function
|
|
1349
|
+
function sn(e) {
|
|
1242
1350
|
return e.type === "button";
|
|
1243
1351
|
}
|
|
1244
|
-
function
|
|
1352
|
+
function cn(e) {
|
|
1245
1353
|
return e.type === "divider";
|
|
1246
1354
|
}
|
|
1247
|
-
function
|
|
1355
|
+
function ln(e) {
|
|
1248
1356
|
return e.type === "video";
|
|
1249
1357
|
}
|
|
1250
|
-
function
|
|
1358
|
+
function un(e) {
|
|
1251
1359
|
return e.type === "social";
|
|
1252
1360
|
}
|
|
1253
|
-
function
|
|
1361
|
+
function dn(e) {
|
|
1254
1362
|
return e.type === "spacer";
|
|
1255
1363
|
}
|
|
1256
|
-
function
|
|
1364
|
+
function fn(e) {
|
|
1257
1365
|
return e.type === "html";
|
|
1258
1366
|
}
|
|
1259
|
-
function
|
|
1367
|
+
function pn(e) {
|
|
1260
1368
|
return e.type === "menu";
|
|
1261
1369
|
}
|
|
1262
|
-
function
|
|
1370
|
+
function mn(e) {
|
|
1263
1371
|
return e.type === "table";
|
|
1264
1372
|
}
|
|
1265
|
-
function
|
|
1373
|
+
function hn(e) {
|
|
1266
1374
|
return e.type === "countdown";
|
|
1267
1375
|
}
|
|
1268
|
-
function
|
|
1376
|
+
function gn(e) {
|
|
1269
1377
|
return e.type === "custom";
|
|
1270
1378
|
}
|
|
1271
1379
|
function B(e) {
|
|
@@ -1275,16 +1383,16 @@ function V(e) {
|
|
|
1275
1383
|
return e.type === "wrapper";
|
|
1276
1384
|
}
|
|
1277
1385
|
// ../types/src/defaults.ts
|
|
1278
|
-
var
|
|
1386
|
+
var _n = {
|
|
1279
1387
|
content: "<p>Enter your title</p>",
|
|
1280
1388
|
level: 2,
|
|
1281
1389
|
textAlign: "left"
|
|
1282
|
-
},
|
|
1390
|
+
}, vn = { content: "<p>Enter your text here</p>" }, yn = {
|
|
1283
1391
|
src: "",
|
|
1284
1392
|
alt: "",
|
|
1285
1393
|
width: "full",
|
|
1286
1394
|
align: "center"
|
|
1287
|
-
},
|
|
1395
|
+
}, bn = {
|
|
1288
1396
|
text: "Click Here",
|
|
1289
1397
|
url: "",
|
|
1290
1398
|
backgroundColor: "#333333",
|
|
@@ -1298,36 +1406,36 @@ var rn = {
|
|
|
1298
1406
|
left: 24
|
|
1299
1407
|
},
|
|
1300
1408
|
align: "center"
|
|
1301
|
-
},
|
|
1409
|
+
}, xn = {
|
|
1302
1410
|
lineStyle: "solid",
|
|
1303
1411
|
color: "#e0e0e0",
|
|
1304
1412
|
thickness: 1,
|
|
1305
1413
|
width: "full"
|
|
1306
|
-
},
|
|
1414
|
+
}, Sn = { columns: "1" }, Cn = {
|
|
1307
1415
|
url: "",
|
|
1308
1416
|
thumbnailUrl: "",
|
|
1309
1417
|
alt: "Video",
|
|
1310
1418
|
width: "full",
|
|
1311
1419
|
align: "center"
|
|
1312
|
-
},
|
|
1420
|
+
}, wn = {
|
|
1313
1421
|
iconStyle: "solid",
|
|
1314
1422
|
iconSize: "medium",
|
|
1315
1423
|
spacing: 10,
|
|
1316
1424
|
align: "center"
|
|
1317
|
-
},
|
|
1425
|
+
}, Tn = { height: 24 }, En = { content: "" }, Dn = {
|
|
1318
1426
|
fontSize: 15,
|
|
1319
1427
|
textAlign: "center",
|
|
1320
1428
|
separator: "|",
|
|
1321
1429
|
separatorColor: "#e0e0e0",
|
|
1322
1430
|
spacing: 10
|
|
1323
|
-
},
|
|
1431
|
+
}, On = {
|
|
1324
1432
|
hasHeaderRow: !0,
|
|
1325
1433
|
borderColor: "#e0e0e0",
|
|
1326
1434
|
borderWidth: 1,
|
|
1327
1435
|
cellPadding: 8,
|
|
1328
1436
|
fontSize: 15,
|
|
1329
1437
|
textAlign: "left"
|
|
1330
|
-
},
|
|
1438
|
+
}, kn = {
|
|
1331
1439
|
targetDate: "",
|
|
1332
1440
|
timezone: "UTC",
|
|
1333
1441
|
showDays: !0,
|
|
@@ -1347,21 +1455,21 @@ var rn = {
|
|
|
1347
1455
|
expiredMessage: "This offer has expired",
|
|
1348
1456
|
expiredImageUrl: "",
|
|
1349
1457
|
hideOnExpiry: !1
|
|
1350
|
-
},
|
|
1351
|
-
title:
|
|
1352
|
-
paragraph:
|
|
1353
|
-
image:
|
|
1354
|
-
button:
|
|
1355
|
-
divider:
|
|
1356
|
-
section:
|
|
1357
|
-
video:
|
|
1358
|
-
social:
|
|
1359
|
-
spacer:
|
|
1360
|
-
html:
|
|
1361
|
-
menu:
|
|
1362
|
-
table:
|
|
1363
|
-
countdown:
|
|
1364
|
-
},
|
|
1458
|
+
}, An = {
|
|
1459
|
+
title: _n,
|
|
1460
|
+
paragraph: vn,
|
|
1461
|
+
image: yn,
|
|
1462
|
+
button: bn,
|
|
1463
|
+
divider: xn,
|
|
1464
|
+
section: Sn,
|
|
1465
|
+
video: Cn,
|
|
1466
|
+
social: wn,
|
|
1467
|
+
spacer: Tn,
|
|
1468
|
+
html: En,
|
|
1469
|
+
menu: Dn,
|
|
1470
|
+
table: On,
|
|
1471
|
+
countdown: kn
|
|
1472
|
+
}, jn = {
|
|
1365
1473
|
width: 600,
|
|
1366
1474
|
backgroundColor: "#ffffff",
|
|
1367
1475
|
textColor: "#1a1a1a",
|
|
@@ -1369,30 +1477,30 @@ var rn = {
|
|
|
1369
1477
|
fontFamily: "Arial",
|
|
1370
1478
|
locale: "en"
|
|
1371
1479
|
};
|
|
1372
|
-
function
|
|
1480
|
+
function Mn(e) {
|
|
1373
1481
|
return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
|
|
1374
1482
|
}
|
|
1375
|
-
function
|
|
1483
|
+
function Nn(e, t) {
|
|
1376
1484
|
let n = { ...e };
|
|
1377
1485
|
for (let r of Object.keys(t)) {
|
|
1378
1486
|
let i = e[r], a = t[r];
|
|
1379
|
-
a !== void 0 && (n[r] =
|
|
1487
|
+
a !== void 0 && (n[r] = Mn(i) && Mn(a) ? Nn(i, a) : a);
|
|
1380
1488
|
}
|
|
1381
1489
|
return n;
|
|
1382
1490
|
}
|
|
1383
1491
|
// ../types/src/template.ts
|
|
1384
|
-
function
|
|
1492
|
+
function Pn(e = "Arial", t) {
|
|
1385
1493
|
return {
|
|
1386
1494
|
blocks: [],
|
|
1387
1495
|
settings: {
|
|
1388
|
-
...
|
|
1496
|
+
...jn,
|
|
1389
1497
|
fontFamily: e,
|
|
1390
1498
|
...t
|
|
1391
1499
|
}
|
|
1392
1500
|
};
|
|
1393
1501
|
}
|
|
1394
1502
|
// ../types/src/direction.ts
|
|
1395
|
-
var
|
|
1503
|
+
var Fn = [
|
|
1396
1504
|
"ar",
|
|
1397
1505
|
"he",
|
|
1398
1506
|
"iw",
|
|
@@ -1406,16 +1514,16 @@ var Sn = [
|
|
|
1406
1514
|
"ckb",
|
|
1407
1515
|
"ks"
|
|
1408
1516
|
];
|
|
1409
|
-
function
|
|
1517
|
+
function In(e) {
|
|
1410
1518
|
let t = e?.trim().replace(/_/g, "-").split("-")[0]?.toLowerCase();
|
|
1411
|
-
return !!t &&
|
|
1519
|
+
return !!t && Fn.includes(t);
|
|
1412
1520
|
}
|
|
1413
|
-
function
|
|
1414
|
-
return e.direction === "ltr" || e.direction === "rtl" ? e.direction :
|
|
1521
|
+
function Ln(e) {
|
|
1522
|
+
return e.direction === "ltr" || e.direction === "rtl" ? e.direction : In(e.locale) ? "rtl" : "ltr";
|
|
1415
1523
|
}
|
|
1416
1524
|
// ../types/src/translation.ts
|
|
1417
|
-
var
|
|
1418
|
-
function
|
|
1525
|
+
var Rn = 2e4, zn = /* @__PURE__ */ new Set(["\"", "'"]);
|
|
1526
|
+
function Bn(e, t) {
|
|
1419
1527
|
let n = null, r = "tag";
|
|
1420
1528
|
for (let i = t; i < e.length; i++) {
|
|
1421
1529
|
let t = e[i];
|
|
@@ -1423,7 +1531,7 @@ function Dn(e, t) {
|
|
|
1423
1531
|
else {
|
|
1424
1532
|
if (r === "beforeValue") {
|
|
1425
1533
|
if (H(t)) continue;
|
|
1426
|
-
if (
|
|
1534
|
+
if (zn.has(t)) {
|
|
1427
1535
|
n = t, r = "tag";
|
|
1428
1536
|
continue;
|
|
1429
1537
|
}
|
|
@@ -1438,12 +1546,12 @@ function Dn(e, t) {
|
|
|
1438
1546
|
}
|
|
1439
1547
|
return -1;
|
|
1440
1548
|
}
|
|
1441
|
-
function
|
|
1549
|
+
function Vn(e, t) {
|
|
1442
1550
|
let n = null;
|
|
1443
1551
|
for (let r = t; r < e.length; r++) {
|
|
1444
1552
|
let t = e[r];
|
|
1445
1553
|
if (n !== null) t === n && (n = null);
|
|
1446
|
-
else if (
|
|
1554
|
+
else if (zn.has(t)) n = t;
|
|
1447
1555
|
else if (t === ">") return {
|
|
1448
1556
|
end: r,
|
|
1449
1557
|
nextSpan: -1
|
|
@@ -1458,13 +1566,13 @@ function On(e, t) {
|
|
|
1458
1566
|
nextSpan: -1
|
|
1459
1567
|
};
|
|
1460
1568
|
}
|
|
1461
|
-
function
|
|
1569
|
+
function Hn(e) {
|
|
1462
1570
|
return e !== " " && e !== " " && e !== "\n" && e !== "\r" && e !== "\f" && e !== "=" && e !== ">" && e !== "/";
|
|
1463
1571
|
}
|
|
1464
1572
|
function H(e) {
|
|
1465
1573
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
1466
1574
|
}
|
|
1467
|
-
var
|
|
1575
|
+
var Un = {
|
|
1468
1576
|
AMP: "&",
|
|
1469
1577
|
COPY: "©",
|
|
1470
1578
|
GT: ">",
|
|
@@ -1731,16 +1839,16 @@ function U(e) {
|
|
|
1731
1839
|
let n = t[1] === "x" || t[1] === "X" ? Number.parseInt(t.slice(2), 16) : Number.parseInt(t.slice(1), 10);
|
|
1732
1840
|
return !Number.isFinite(n) || n < 1 || n > 1114111 || n >= 55296 && n <= 57343 ? e : String.fromCodePoint(n);
|
|
1733
1841
|
}
|
|
1734
|
-
return Object.hasOwn(
|
|
1842
|
+
return Object.hasOwn(Un, t) ? Un[t] : e;
|
|
1735
1843
|
}) : e;
|
|
1736
1844
|
}
|
|
1737
|
-
function
|
|
1845
|
+
function Wn(e, t) {
|
|
1738
1846
|
let n = t.toLowerCase(), r = 0;
|
|
1739
1847
|
for (; r < e.length;) {
|
|
1740
1848
|
for (; r < e.length && (H(e[r]) || e[r] === "/");) r++;
|
|
1741
1849
|
if (r >= e.length) break;
|
|
1742
1850
|
let t = r;
|
|
1743
|
-
for (; r < e.length &&
|
|
1851
|
+
for (; r < e.length && Hn(e[r]);) r++;
|
|
1744
1852
|
let i = e.substring(t, r).toLowerCase();
|
|
1745
1853
|
if (i === "") {
|
|
1746
1854
|
r++;
|
|
@@ -1750,7 +1858,7 @@ function jn(e, t) {
|
|
|
1750
1858
|
if (e[r] !== "=") continue;
|
|
1751
1859
|
for (r++; r < e.length && H(e[r]);) r++;
|
|
1752
1860
|
let a = e[r];
|
|
1753
|
-
if (
|
|
1861
|
+
if (zn.has(a)) {
|
|
1754
1862
|
let t = r + 1, o = e.indexOf(a, t);
|
|
1755
1863
|
if (o === -1) return null;
|
|
1756
1864
|
if (i === n) return U(e.substring(t, o));
|
|
@@ -1764,15 +1872,15 @@ function jn(e, t) {
|
|
|
1764
1872
|
return null;
|
|
1765
1873
|
}
|
|
1766
1874
|
// ../types/src/merge-tag-html.ts
|
|
1767
|
-
function
|
|
1768
|
-
return
|
|
1875
|
+
function Gn(e) {
|
|
1876
|
+
return Jn(e, (e) => e, !1);
|
|
1769
1877
|
}
|
|
1770
|
-
function
|
|
1771
|
-
return
|
|
1878
|
+
function Kn(e, t) {
|
|
1879
|
+
return Jn(e, t, !0);
|
|
1772
1880
|
}
|
|
1773
|
-
function
|
|
1881
|
+
function qn(e) {
|
|
1774
1882
|
let t = [];
|
|
1775
|
-
return
|
|
1883
|
+
return Jn(e, (n, r, i) => {
|
|
1776
1884
|
let a = e.slice(r, i);
|
|
1777
1885
|
return t.push({
|
|
1778
1886
|
start: r,
|
|
@@ -1781,7 +1889,7 @@ function Pn(e) {
|
|
|
1781
1889
|
}), a;
|
|
1782
1890
|
}, !0), t;
|
|
1783
1891
|
}
|
|
1784
|
-
function
|
|
1892
|
+
function Jn(e, t, n) {
|
|
1785
1893
|
let r = "", i = 0;
|
|
1786
1894
|
for (; i < e.length;) {
|
|
1787
1895
|
let a = e.indexOf("<span", i);
|
|
@@ -1794,7 +1902,7 @@ function Fn(e, t, n) {
|
|
|
1794
1902
|
r += e.substring(i, a + 5), i = a + 5;
|
|
1795
1903
|
continue;
|
|
1796
1904
|
}
|
|
1797
|
-
let { end: s, nextSpan: c } =
|
|
1905
|
+
let { end: s, nextSpan: c } = Vn(e, a + 5);
|
|
1798
1906
|
if (c !== -1) {
|
|
1799
1907
|
r += e.substring(i, c), i = c;
|
|
1800
1908
|
continue;
|
|
@@ -1803,12 +1911,12 @@ function Fn(e, t, n) {
|
|
|
1803
1911
|
r += e.substring(i);
|
|
1804
1912
|
break;
|
|
1805
1913
|
}
|
|
1806
|
-
let l = e.substring(a + 5, s), u =
|
|
1914
|
+
let l = e.substring(a + 5, s), u = Xn(l, "data-merge-tag") ?? Xn(l, "data-logic-merge-tag");
|
|
1807
1915
|
if (u === null) {
|
|
1808
1916
|
r += e.substring(i, s + 1), i = s + 1;
|
|
1809
1917
|
continue;
|
|
1810
1918
|
}
|
|
1811
|
-
let d =
|
|
1919
|
+
let d = Yn(e, s + 1, n);
|
|
1812
1920
|
if (d === -1) {
|
|
1813
1921
|
r += e.substring(i);
|
|
1814
1922
|
break;
|
|
@@ -1817,7 +1925,7 @@ function Fn(e, t, n) {
|
|
|
1817
1925
|
}
|
|
1818
1926
|
return r;
|
|
1819
1927
|
}
|
|
1820
|
-
function
|
|
1928
|
+
function Yn(e, t, n) {
|
|
1821
1929
|
if (!n) {
|
|
1822
1930
|
let n = e.indexOf("</span>", t);
|
|
1823
1931
|
return n === -1 ? -1 : n + 7;
|
|
@@ -1826,7 +1934,7 @@ function In(e, t, n) {
|
|
|
1826
1934
|
for (; i < e.length;) {
|
|
1827
1935
|
let t = e.indexOf("<", i);
|
|
1828
1936
|
if (t === -1) return -1;
|
|
1829
|
-
let n =
|
|
1937
|
+
let n = Bn(e, t + 1);
|
|
1830
1938
|
if (n === -1) return -1;
|
|
1831
1939
|
let a = e.startsWith("</span", t), o = e.startsWith("<span", t), s = e[t + (a ? 6 : 5)];
|
|
1832
1940
|
if ((o || a) && (s === ">" || s === "/" || /\s/.test(s)) && (r += a ? -1 : 1, r === 0)) return n + 1;
|
|
@@ -1834,8 +1942,8 @@ function In(e, t, n) {
|
|
|
1834
1942
|
}
|
|
1835
1943
|
return -1;
|
|
1836
1944
|
}
|
|
1837
|
-
function
|
|
1838
|
-
return
|
|
1945
|
+
function Xn(e, t) {
|
|
1946
|
+
return Wn(e, t);
|
|
1839
1947
|
}
|
|
1840
1948
|
// ../types/src/merge-tags.ts
|
|
1841
1949
|
var W = {
|
|
@@ -1870,7 +1978,7 @@ function G(e) {
|
|
|
1870
1978
|
return (e.value === n.value || e.value.source === n.value.source && e.value.flags.replace(/[gy]/g, "") === n.value.flags.replace(/[gy]/g, "")) && (e.logic === n.logic || e.logic.source === n.logic.source && e.logic.flags.replace(/[gy]/g, "") === n.logic.flags.replace(/[gy]/g, ""));
|
|
1871
1979
|
});
|
|
1872
1980
|
}
|
|
1873
|
-
function
|
|
1981
|
+
function Zn(e, t, n) {
|
|
1874
1982
|
for (let r = n; r < e.length; r++) {
|
|
1875
1983
|
let n = e.charCodeAt(r);
|
|
1876
1984
|
if (n === 10 || n === 13 || n === 8232 || n === 8233) return {
|
|
@@ -1912,7 +2020,7 @@ function K(e, t, n, r = 0, i = Infinity) {
|
|
|
1912
2020
|
let r = u?.lastIndex ?? t + s.length, i = a === "mailchimp" && n === "value" ? {
|
|
1913
2021
|
close: e.startsWith(c, r) ? r : -1,
|
|
1914
2022
|
lineBreak: -1
|
|
1915
|
-
} :
|
|
2023
|
+
} : Zn(e, c, Math.max(r, t + s.length + +(n === "value")));
|
|
1916
2024
|
if (i.lineBreak >= 0) {
|
|
1917
2025
|
let r = i.lineBreak, o = n === "logic" && (a === "liquid" || a === "ampscript") ? e.lastIndexOf(s, r) : -1;
|
|
1918
2026
|
p = o > t ? o : r + 1;
|
|
@@ -1934,7 +2042,7 @@ function K(e, t, n, r = 0, i = Infinity) {
|
|
|
1934
2042
|
}
|
|
1935
2043
|
return f;
|
|
1936
2044
|
}
|
|
1937
|
-
function
|
|
2045
|
+
function Qn(e, t) {
|
|
1938
2046
|
let n = G(t);
|
|
1939
2047
|
if (!n) {
|
|
1940
2048
|
let n = RegExp(`(${t.value.source}|${t.logic.source})`, "g");
|
|
@@ -1962,7 +2070,7 @@ function zn(e, t) {
|
|
|
1962
2070
|
o = t + 2;
|
|
1963
2071
|
continue;
|
|
1964
2072
|
}
|
|
1965
|
-
let c =
|
|
2073
|
+
let c = Zn(e, "|*", a.lastIndex);
|
|
1966
2074
|
if (c.lineBreak >= 0) {
|
|
1967
2075
|
o = c.lineBreak + 1;
|
|
1968
2076
|
continue;
|
|
@@ -1984,73 +2092,73 @@ function zn(e, t) {
|
|
|
1984
2092
|
}
|
|
1985
2093
|
return r;
|
|
1986
2094
|
}
|
|
1987
|
-
function
|
|
2095
|
+
function $n(e) {
|
|
1988
2096
|
return typeof e == "string" && e.trim() !== "" ? e : null;
|
|
1989
2097
|
}
|
|
1990
|
-
function
|
|
2098
|
+
function er(e) {
|
|
1991
2099
|
return Object.values(W).find((t) => t.value.source === e.value.source) ?? null;
|
|
1992
2100
|
}
|
|
1993
|
-
function
|
|
1994
|
-
return
|
|
2101
|
+
function tr(e) {
|
|
2102
|
+
return $n(e.opener) ?? er(e)?.opener ?? null;
|
|
1995
2103
|
}
|
|
1996
|
-
function
|
|
1997
|
-
return
|
|
2104
|
+
function nr(e) {
|
|
2105
|
+
return $n(e.closer) ?? er(e)?.closer ?? null;
|
|
1998
2106
|
}
|
|
1999
|
-
function
|
|
2107
|
+
function rr(e) {
|
|
2000
2108
|
return e ? typeof e == "string" ? W[e] ?? W.liquid : e : W.liquid;
|
|
2001
2109
|
}
|
|
2002
|
-
function
|
|
2110
|
+
function ir(e) {
|
|
2003
2111
|
let t = e.source, n = e.flags.replace("g", "");
|
|
2004
2112
|
return RegExp(`^${t}$`, n);
|
|
2005
2113
|
}
|
|
2006
|
-
function
|
|
2114
|
+
function ar(e, t) {
|
|
2007
2115
|
let n = e?.trim() || "";
|
|
2008
|
-
return !
|
|
2116
|
+
return !ir(t.logic).test(n) && ir(t.value).test(n);
|
|
2009
2117
|
}
|
|
2010
|
-
function
|
|
2118
|
+
function or(e, t) {
|
|
2011
2119
|
let n = t.find((t) => t.value === e);
|
|
2012
2120
|
return n ? n.label : e;
|
|
2013
2121
|
}
|
|
2014
|
-
function
|
|
2015
|
-
return q(e, "data-merge-tag", (e) =>
|
|
2122
|
+
function sr(e, t) {
|
|
2123
|
+
return q(e, "data-merge-tag", (e) => or(e, t));
|
|
2016
2124
|
}
|
|
2017
|
-
function
|
|
2125
|
+
function cr(e, t) {
|
|
2018
2126
|
return t.find((t) => t.value === e)?.sample;
|
|
2019
2127
|
}
|
|
2020
|
-
function
|
|
2021
|
-
return q(e, "data-merge-tag", (e) =>
|
|
2128
|
+
function lr(e, t) {
|
|
2129
|
+
return q(e, "data-merge-tag", (e) => pr(cr(e, t) ?? or(e, t)), { unwrap: (e) => cr(e, t) !== void 0 });
|
|
2022
2130
|
}
|
|
2023
|
-
function
|
|
2024
|
-
let r = (e) => t.some((t) => t.value === e) ||
|
|
2025
|
-
return q(q(e, "data-merge-tag", (e) => r(e) ?
|
|
2131
|
+
function ur(e, t, n) {
|
|
2132
|
+
let r = (e) => t.some((t) => t.value === e) || ar(e, n), i = (e) => hr(e, n);
|
|
2133
|
+
return q(q(e, "data-merge-tag", (e) => r(e) ? or(e, t) : pr(e), { unwrap: (e) => !r(e) }), "data-logic-merge-tag", (e) => i(e) ? gr(e, n) : pr(e), { unwrap: (e) => !i(e) });
|
|
2026
2134
|
}
|
|
2027
|
-
function
|
|
2135
|
+
function dr(e) {
|
|
2028
2136
|
return e.some((e) => e.sample !== void 0);
|
|
2029
2137
|
}
|
|
2030
|
-
function
|
|
2138
|
+
function fr(e, t) {
|
|
2031
2139
|
if (!e) return e;
|
|
2032
2140
|
let n = e;
|
|
2033
2141
|
for (let e of t) e.sample !== void 0 && (n = n.split(e.value).join(e.sample));
|
|
2034
2142
|
return n;
|
|
2035
2143
|
}
|
|
2036
|
-
function
|
|
2144
|
+
function pr(e) {
|
|
2037
2145
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
2038
2146
|
}
|
|
2039
|
-
function
|
|
2147
|
+
function mr(e, t) {
|
|
2040
2148
|
if (!e) return !1;
|
|
2041
2149
|
if (G(t)) return K(e, t, "value", 0, 1).length > 0 || K(e, t, "logic", 0, 1).length > 0;
|
|
2042
2150
|
let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
|
|
2043
2151
|
return n.test(e) || r.test(e);
|
|
2044
2152
|
}
|
|
2045
|
-
function
|
|
2046
|
-
return
|
|
2153
|
+
function hr(e, t) {
|
|
2154
|
+
return ir(t.logic).test(e?.trim() || "");
|
|
2047
2155
|
}
|
|
2048
|
-
function
|
|
2156
|
+
function gr(e, t) {
|
|
2049
2157
|
let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
|
|
2050
2158
|
return r && r[1] ? r[1].toUpperCase() : e;
|
|
2051
2159
|
}
|
|
2052
|
-
function
|
|
2053
|
-
return q(e, "data-logic-merge-tag", (e) =>
|
|
2160
|
+
function _r(e, t) {
|
|
2161
|
+
return q(e, "data-logic-merge-tag", (e) => gr(e, t));
|
|
2054
2162
|
}
|
|
2055
2163
|
function q(e, t, n, r) {
|
|
2056
2164
|
let i = "", a = 0;
|
|
@@ -2065,7 +2173,7 @@ function q(e, t, n, r) {
|
|
|
2065
2173
|
i += e.substring(a, o + 5), a = o + 5;
|
|
2066
2174
|
continue;
|
|
2067
2175
|
}
|
|
2068
|
-
let { end: c, nextSpan: l } =
|
|
2176
|
+
let { end: c, nextSpan: l } = Vn(e, o + 5);
|
|
2069
2177
|
if (l !== -1) {
|
|
2070
2178
|
i += e.substring(a, l), a = l;
|
|
2071
2179
|
continue;
|
|
@@ -2074,7 +2182,7 @@ function q(e, t, n, r) {
|
|
|
2074
2182
|
i += e.substring(a);
|
|
2075
2183
|
break;
|
|
2076
2184
|
}
|
|
2077
|
-
let u =
|
|
2185
|
+
let u = Wn(e.substring(o + 5, c), t);
|
|
2078
2186
|
if (u === null) {
|
|
2079
2187
|
i += e.substring(a, c + 1), a = c + 1;
|
|
2080
2188
|
continue;
|
|
@@ -2090,14 +2198,14 @@ function q(e, t, n, r) {
|
|
|
2090
2198
|
return i;
|
|
2091
2199
|
}
|
|
2092
2200
|
// ../types/src/locale-strings.ts
|
|
2093
|
-
var
|
|
2201
|
+
var vr = {
|
|
2094
2202
|
title: ["content"],
|
|
2095
2203
|
paragraph: ["content"]
|
|
2096
2204
|
};
|
|
2097
|
-
function
|
|
2205
|
+
function yr(e) {
|
|
2098
2206
|
let t = [], n = /<[a-z][\w:-]*\b/gi;
|
|
2099
2207
|
for (; n.exec(e);) {
|
|
2100
|
-
let r =
|
|
2208
|
+
let r = Bn(e, n.lastIndex);
|
|
2101
2209
|
if (r < 0) break;
|
|
2102
2210
|
let i = n.lastIndex, a = e.slice(i, r), o = /[^\s"'<>/=]+\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+))/g;
|
|
2103
2211
|
for (let e; e = o.exec(a);) {
|
|
@@ -2111,8 +2219,8 @@ function or(e) {
|
|
|
2111
2219
|
}
|
|
2112
2220
|
return t;
|
|
2113
2221
|
}
|
|
2114
|
-
function
|
|
2115
|
-
let r = n === "html" ?
|
|
2222
|
+
function br(e, t, n) {
|
|
2223
|
+
let r = n === "html" ? qn(e) : [], i = n === "html" ? yr(e) : [], a = r.map((e) => ({
|
|
2116
2224
|
...e,
|
|
2117
2225
|
attribute: !1
|
|
2118
2226
|
})), o = 0, s = G(t) !== void 0, c = (n, r) => {
|
|
@@ -2147,7 +2255,7 @@ function sr(e, t, n) {
|
|
|
2147
2255
|
for (let e of r) c(l, e.start), l = e.end;
|
|
2148
2256
|
return c(l, e.length), a.sort((e, t) => e.start - t.start);
|
|
2149
2257
|
}
|
|
2150
|
-
function
|
|
2258
|
+
function xr(e) {
|
|
2151
2259
|
if (!e.includes("&")) return { text: e };
|
|
2152
2260
|
let t = "", n = [0], r = 0, i = (i) => {
|
|
2153
2261
|
for (t += e.slice(r, i); r < i;) n.push(++r);
|
|
@@ -2164,17 +2272,17 @@ function cr(e) {
|
|
|
2164
2272
|
offsets: n
|
|
2165
2273
|
};
|
|
2166
2274
|
}
|
|
2167
|
-
var J = /* @__PURE__ */ new Map(),
|
|
2168
|
-
function
|
|
2275
|
+
var J = /* @__PURE__ */ new Map(), Sr = 32;
|
|
2276
|
+
function Cr(e) {
|
|
2169
2277
|
let t = JSON.stringify(e), n = J.get(t);
|
|
2170
2278
|
if (n === void 0) {
|
|
2171
2279
|
let r = e.map((e) => e.trim()).filter(Boolean).sort((e, t) => t.length - e.length).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
2172
|
-
n = r.length ? RegExp(`(?<![\\p{L}\\p{N}_])(?:${r.join("|")})(?![\\p{L}\\p{N}_])`, "gu") : null, J.size >=
|
|
2280
|
+
n = r.length ? RegExp(`(?<![\\p{L}\\p{N}_])(?:${r.join("|")})(?![\\p{L}\\p{N}_])`, "gu") : null, J.size >= Sr && J.delete(J.keys().next().value), J.set(t, n);
|
|
2173
2281
|
}
|
|
2174
2282
|
return n;
|
|
2175
2283
|
}
|
|
2176
|
-
function
|
|
2177
|
-
let r = n.length ?
|
|
2284
|
+
function wr(e, t, n) {
|
|
2285
|
+
let r = n.length ? Cr(n) : null;
|
|
2178
2286
|
if (!r) return [];
|
|
2179
2287
|
let i = [];
|
|
2180
2288
|
if (t === "text") i.push({
|
|
@@ -2183,7 +2291,7 @@ function dr(e, t, n) {
|
|
|
2183
2291
|
attribute: !1
|
|
2184
2292
|
});
|
|
2185
2293
|
else {
|
|
2186
|
-
i.push(...
|
|
2294
|
+
i.push(...yr(e).map((e) => ({
|
|
2187
2295
|
...e,
|
|
2188
2296
|
attribute: !0
|
|
2189
2297
|
})));
|
|
@@ -2194,7 +2302,7 @@ function dr(e, t, n) {
|
|
|
2194
2302
|
end: r.index,
|
|
2195
2303
|
attribute: !1
|
|
2196
2304
|
});
|
|
2197
|
-
let a = r[0] === "<!--" ? e.indexOf("-->", t.lastIndex) :
|
|
2305
|
+
let a = r[0] === "<!--" ? e.indexOf("-->", t.lastIndex) : Bn(e, t.lastIndex);
|
|
2198
2306
|
if (a < 0) return [];
|
|
2199
2307
|
n = a + (r[0] === "<!--" ? 3 : 1), t.lastIndex = n;
|
|
2200
2308
|
}
|
|
@@ -2207,7 +2315,7 @@ function dr(e, t, n) {
|
|
|
2207
2315
|
let a = [];
|
|
2208
2316
|
for (let n of i) {
|
|
2209
2317
|
r.lastIndex = 0;
|
|
2210
|
-
let i = e.slice(n.start, n.end), o = t === "html" ?
|
|
2318
|
+
let i = e.slice(n.start, n.end), o = t === "html" ? xr(i) : {
|
|
2211
2319
|
text: i,
|
|
2212
2320
|
offsets: void 0
|
|
2213
2321
|
};
|
|
@@ -2226,40 +2334,40 @@ function dr(e, t, n) {
|
|
|
2226
2334
|
}
|
|
2227
2335
|
return a;
|
|
2228
2336
|
}
|
|
2229
|
-
function
|
|
2230
|
-
let i =
|
|
2337
|
+
function Tr(e, t, n, r) {
|
|
2338
|
+
let i = br(e, t, n), a = wr(e, n, r?.doNotTranslate ?? []).filter((e) => !i.some((t) => e.start < t.end && e.end > t.start));
|
|
2231
2339
|
return [...i, ...a].sort((e, t) => e.start - t.start);
|
|
2232
2340
|
}
|
|
2233
|
-
function
|
|
2341
|
+
function Er(e, t, n) {
|
|
2234
2342
|
let r = "", i = 0;
|
|
2235
2343
|
return t.forEach((t, a) => {
|
|
2236
2344
|
r += e.slice(i, t.start), r += t.attribute ? `__x${n[a]}__` : `<x id="${n[a]}"/>`, i = t.end;
|
|
2237
2345
|
}), r + e.slice(i);
|
|
2238
2346
|
}
|
|
2239
|
-
function
|
|
2240
|
-
let i =
|
|
2347
|
+
function Dr(e, t, n, r) {
|
|
2348
|
+
let i = Tr(e, t, n, r);
|
|
2241
2349
|
return {
|
|
2242
|
-
text:
|
|
2350
|
+
text: Er(e, i, i.map((e, t) => t + 1)),
|
|
2243
2351
|
tokens: i.map((e) => e.markup)
|
|
2244
2352
|
};
|
|
2245
2353
|
}
|
|
2246
|
-
function
|
|
2354
|
+
function Or(e, t) {
|
|
2247
2355
|
let n = /* @__PURE__ */ new Set(), r = !0, i = e.replace(/<x id="(\d+)"\s*\/>|<x id="(\d+)"><\/x>|__x(\d+)__/g, (e, i, a, o) => {
|
|
2248
2356
|
let s = Number(i ?? a ?? o);
|
|
2249
2357
|
return (s < 1 || s > t.length || n.has(s)) && (r = !1), n.add(s), t[s - 1] ?? "";
|
|
2250
2358
|
});
|
|
2251
2359
|
return r && n.size === t.length ? i : null;
|
|
2252
2360
|
}
|
|
2253
|
-
function
|
|
2254
|
-
let a =
|
|
2361
|
+
function kr(e, t, n, r, i) {
|
|
2362
|
+
let a = Tr(e, n, r, i), o = /* @__PURE__ */ new Set(), s = (e) => {
|
|
2255
2363
|
let n = t.findIndex((t, n) => !o.has(n) && e(t));
|
|
2256
2364
|
return n >= 0 && o.add(n), n;
|
|
2257
2365
|
}, c = a.map((e) => s((t) => t === e.markup));
|
|
2258
2366
|
return a.forEach((e, t) => {
|
|
2259
2367
|
c[t] < 0 && e.term !== void 0 && r === "html" && (c[t] = s((t) => U(t) === e.term));
|
|
2260
|
-
}), o.size !== t.length || a.some((e, t) => c[t] < 0 && e.term === void 0) ? null :
|
|
2368
|
+
}), o.size !== t.length || a.some((e, t) => c[t] < 0 && e.term === void 0) ? null : Er(e, a.filter((e, t) => c[t] >= 0), c.filter((e) => e >= 0).map((e) => e + 1));
|
|
2261
2369
|
}
|
|
2262
|
-
function
|
|
2370
|
+
function Ar(e, t, n = []) {
|
|
2263
2371
|
let r = /* @__PURE__ */ new Map();
|
|
2264
2372
|
if (t === C(e) || !e.settings.locales?.includes(t)) return r;
|
|
2265
2373
|
let i = (e, n, i, a) => {
|
|
@@ -2270,7 +2378,7 @@ function _r(e, t, n = []) {
|
|
|
2270
2378
|
target: e,
|
|
2271
2379
|
path: t,
|
|
2272
2380
|
source: i,
|
|
2273
|
-
format: a &&
|
|
2381
|
+
format: a && vr[a]?.includes(t) ? "html" : "text",
|
|
2274
2382
|
text: o?.text?.[t]
|
|
2275
2383
|
});
|
|
2276
2384
|
}
|
|
@@ -2285,11 +2393,11 @@ function _r(e, t, n = []) {
|
|
|
2285
2393
|
};
|
|
2286
2394
|
return a(e.blocks), i({ kind: "settings" }, e.settings, g), r;
|
|
2287
2395
|
}
|
|
2288
|
-
function
|
|
2289
|
-
let r = n.only === "all" ? null :
|
|
2290
|
-
for (let [r, s] of
|
|
2396
|
+
function jr(e, t, n) {
|
|
2397
|
+
let r = n.only === "all" ? null : Ce(e, t, n.definitions), i = r && /* @__PURE__ */ new Set([...r.missing, ...r.stale]), a = [], o = {};
|
|
2398
|
+
for (let [r, s] of Ar(e, t, n.definitions)) {
|
|
2291
2399
|
if (i && !i.has(r) || n.blockId !== void 0 && (s.target.kind !== "block" || s.target.blockId !== n.blockId)) continue;
|
|
2292
|
-
let e =
|
|
2400
|
+
let e = Dr(s.source, n.syntax, s.format, n), t = s.text ? kr(s.text.value, e.tokens, n.syntax, s.format, n) : void 0;
|
|
2293
2401
|
a.push({
|
|
2294
2402
|
id: r,
|
|
2295
2403
|
format: s.format,
|
|
@@ -2303,8 +2411,8 @@ function vr(e, t, n) {
|
|
|
2303
2411
|
tokens: o
|
|
2304
2412
|
};
|
|
2305
2413
|
}
|
|
2306
|
-
function
|
|
2307
|
-
let i =
|
|
2414
|
+
function Mr(e, t, n, r) {
|
|
2415
|
+
let i = Ar(e, t, r.definitions), a = /* @__PURE__ */ new Map(), o = (e) => {
|
|
2308
2416
|
for (let t of e) if (a.set(t.id, t), t.type === "section") for (let e of t.children) o(e);
|
|
2309
2417
|
else t.type === "wrapper" && o(t.children);
|
|
2310
2418
|
};
|
|
@@ -2320,8 +2428,8 @@ function yr(e, t, n, r) {
|
|
|
2320
2428
|
});
|
|
2321
2429
|
continue;
|
|
2322
2430
|
}
|
|
2323
|
-
let o = Object.hasOwn(r.tokens, t.id) ? r.tokens[t.id] : void 0, u = o ?
|
|
2324
|
-
if (!o || u === null ||
|
|
2431
|
+
let o = Object.hasOwn(r.tokens, t.id) ? r.tokens[t.id] : void 0, u = o ? Or(t.text, o) : null;
|
|
2432
|
+
if (!o || u === null || kr(u, o, r.syntax, n.format, r) === null) {
|
|
2325
2433
|
l.push({
|
|
2326
2434
|
id: t.id,
|
|
2327
2435
|
reason: "tags_changed"
|
|
@@ -2351,21 +2459,21 @@ function yr(e, t, n, r) {
|
|
|
2351
2459
|
};
|
|
2352
2460
|
}
|
|
2353
2461
|
// ../types/src/custom-block-liquid.ts
|
|
2354
|
-
var
|
|
2355
|
-
function
|
|
2462
|
+
var Nr = 1e7, Pr = 2e3;
|
|
2463
|
+
function Fr(e) {
|
|
2356
2464
|
return new e.Liquid({
|
|
2357
2465
|
strictVariables: !1,
|
|
2358
2466
|
strictFilters: !1,
|
|
2359
2467
|
outputEscape: "escape",
|
|
2360
|
-
memoryLimit:
|
|
2361
|
-
renderLimit:
|
|
2468
|
+
memoryLimit: Nr,
|
|
2469
|
+
renderLimit: Pr,
|
|
2362
2470
|
templates: {}
|
|
2363
2471
|
});
|
|
2364
2472
|
}
|
|
2365
2473
|
// ../types/src/factory.ts
|
|
2366
2474
|
function Y(e, t) {
|
|
2367
2475
|
let n = m(e);
|
|
2368
|
-
return !t || Object.keys(t).length === 0 ? n :
|
|
2476
|
+
return !t || Object.keys(t).length === 0 ? n : Nn(n, t);
|
|
2369
2477
|
}
|
|
2370
2478
|
function X(e) {
|
|
2371
2479
|
return e === void 0 ? void 0 : m(e);
|
|
@@ -2373,7 +2481,7 @@ function X(e) {
|
|
|
2373
2481
|
function Z() {
|
|
2374
2482
|
return crypto.randomUUID();
|
|
2375
2483
|
}
|
|
2376
|
-
function
|
|
2484
|
+
function Ir(e = 0) {
|
|
2377
2485
|
return {
|
|
2378
2486
|
top: e,
|
|
2379
2487
|
right: e,
|
|
@@ -2382,100 +2490,100 @@ function Cr(e = 0) {
|
|
|
2382
2490
|
};
|
|
2383
2491
|
}
|
|
2384
2492
|
function Q(e = 10) {
|
|
2385
|
-
return { padding:
|
|
2493
|
+
return { padding: Ir(e) };
|
|
2386
2494
|
}
|
|
2387
|
-
function
|
|
2495
|
+
function Lr(e = {}) {
|
|
2388
2496
|
return Y({
|
|
2389
2497
|
id: Z(),
|
|
2390
2498
|
type: "title",
|
|
2391
|
-
...
|
|
2499
|
+
..._n,
|
|
2392
2500
|
styles: Q()
|
|
2393
2501
|
}, e);
|
|
2394
2502
|
}
|
|
2395
|
-
function
|
|
2503
|
+
function Rr(e = {}) {
|
|
2396
2504
|
return Y({
|
|
2397
2505
|
id: Z(),
|
|
2398
2506
|
type: "paragraph",
|
|
2399
|
-
...
|
|
2507
|
+
...vn,
|
|
2400
2508
|
styles: Q()
|
|
2401
2509
|
}, e);
|
|
2402
2510
|
}
|
|
2403
|
-
function
|
|
2511
|
+
function zr(e = {}) {
|
|
2404
2512
|
return Y({
|
|
2405
2513
|
id: Z(),
|
|
2406
2514
|
type: "image",
|
|
2407
|
-
...
|
|
2515
|
+
...yn,
|
|
2408
2516
|
styles: Q()
|
|
2409
2517
|
}, e);
|
|
2410
2518
|
}
|
|
2411
|
-
function
|
|
2519
|
+
function Br(e = {}) {
|
|
2412
2520
|
return Y({
|
|
2413
2521
|
id: Z(),
|
|
2414
2522
|
type: "button",
|
|
2415
|
-
...
|
|
2523
|
+
...bn,
|
|
2416
2524
|
styles: Q()
|
|
2417
2525
|
}, e);
|
|
2418
2526
|
}
|
|
2419
|
-
function
|
|
2527
|
+
function Vr(e = {}) {
|
|
2420
2528
|
return Y({
|
|
2421
2529
|
id: Z(),
|
|
2422
2530
|
type: "divider",
|
|
2423
|
-
...
|
|
2531
|
+
...xn,
|
|
2424
2532
|
styles: Q(20)
|
|
2425
2533
|
}, e);
|
|
2426
2534
|
}
|
|
2427
|
-
function
|
|
2535
|
+
function Hr(e = {}) {
|
|
2428
2536
|
return Y({
|
|
2429
2537
|
id: Z(),
|
|
2430
2538
|
type: "section",
|
|
2431
|
-
...
|
|
2539
|
+
...Sn,
|
|
2432
2540
|
children: [[]],
|
|
2433
2541
|
styles: Q(20)
|
|
2434
2542
|
}, e);
|
|
2435
2543
|
}
|
|
2436
|
-
function
|
|
2544
|
+
function Ur(e = {}) {
|
|
2437
2545
|
return Y({
|
|
2438
2546
|
id: Z(),
|
|
2439
2547
|
type: "video",
|
|
2440
|
-
...
|
|
2548
|
+
...Cn,
|
|
2441
2549
|
styles: Q()
|
|
2442
2550
|
}, e);
|
|
2443
2551
|
}
|
|
2444
|
-
function
|
|
2552
|
+
function Wr(e = {}) {
|
|
2445
2553
|
return Y({
|
|
2446
2554
|
id: Z(),
|
|
2447
2555
|
type: "social",
|
|
2448
2556
|
icons: [],
|
|
2449
|
-
...
|
|
2557
|
+
...wn,
|
|
2450
2558
|
styles: Q()
|
|
2451
2559
|
}, e);
|
|
2452
2560
|
}
|
|
2453
|
-
function
|
|
2561
|
+
function Gr(e = {}) {
|
|
2454
2562
|
return Y({
|
|
2455
2563
|
id: Z(),
|
|
2456
2564
|
type: "spacer",
|
|
2457
|
-
...
|
|
2565
|
+
...Tn,
|
|
2458
2566
|
styles: Q(0)
|
|
2459
2567
|
}, e);
|
|
2460
2568
|
}
|
|
2461
|
-
function
|
|
2569
|
+
function Kr(e = {}) {
|
|
2462
2570
|
return Y({
|
|
2463
2571
|
id: Z(),
|
|
2464
2572
|
type: "html",
|
|
2465
|
-
...
|
|
2573
|
+
...En,
|
|
2466
2574
|
styles: Q()
|
|
2467
2575
|
}, e);
|
|
2468
2576
|
}
|
|
2469
|
-
function
|
|
2577
|
+
function qr(e = {}) {
|
|
2470
2578
|
return Y({
|
|
2471
2579
|
id: Z(),
|
|
2472
2580
|
type: "menu",
|
|
2473
2581
|
items: [],
|
|
2474
|
-
...
|
|
2582
|
+
...Dn,
|
|
2475
2583
|
styles: Q()
|
|
2476
2584
|
}, e);
|
|
2477
2585
|
}
|
|
2478
|
-
function
|
|
2586
|
+
function Jr(e, t) {
|
|
2479
2587
|
return Array.from({ length: t }, () => ({
|
|
2480
2588
|
id: Z(),
|
|
2481
2589
|
cells: Array.from({ length: e }, () => ({
|
|
@@ -2484,29 +2592,29 @@ function Fr(e, t) {
|
|
|
2484
2592
|
}))
|
|
2485
2593
|
}));
|
|
2486
2594
|
}
|
|
2487
|
-
function
|
|
2595
|
+
function Yr(e = {}) {
|
|
2488
2596
|
return Y({
|
|
2489
2597
|
id: Z(),
|
|
2490
2598
|
type: "table",
|
|
2491
|
-
rows:
|
|
2492
|
-
...
|
|
2599
|
+
rows: Jr(3, 3),
|
|
2600
|
+
...On,
|
|
2493
2601
|
styles: Q()
|
|
2494
2602
|
}, e);
|
|
2495
2603
|
}
|
|
2496
|
-
function
|
|
2604
|
+
function Xr(e = {}) {
|
|
2497
2605
|
return Y({
|
|
2498
2606
|
id: Z(),
|
|
2499
2607
|
type: "countdown",
|
|
2500
|
-
...
|
|
2608
|
+
...kn,
|
|
2501
2609
|
styles: Q()
|
|
2502
2610
|
}, e);
|
|
2503
2611
|
}
|
|
2504
|
-
function
|
|
2612
|
+
function Zr(e) {
|
|
2505
2613
|
return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
|
|
2506
2614
|
}
|
|
2507
|
-
function
|
|
2615
|
+
function Qr(e) {
|
|
2508
2616
|
let t = {};
|
|
2509
|
-
for (let n of e.fields) t[n.key] = X(
|
|
2617
|
+
for (let n of e.fields) t[n.key] = X(Zr(n));
|
|
2510
2618
|
let n = Y(Q(), X(e.defaultStyles));
|
|
2511
2619
|
return {
|
|
2512
2620
|
id: Z(),
|
|
@@ -2517,14 +2625,14 @@ function zr(e) {
|
|
|
2517
2625
|
...e.dataSource ? { dataSourceFetched: !1 } : {}
|
|
2518
2626
|
};
|
|
2519
2627
|
}
|
|
2520
|
-
function
|
|
2628
|
+
function $r() {
|
|
2521
2629
|
return {
|
|
2522
2630
|
id: Z(),
|
|
2523
2631
|
type: "slot",
|
|
2524
2632
|
styles: Q(0)
|
|
2525
2633
|
};
|
|
2526
2634
|
}
|
|
2527
|
-
function
|
|
2635
|
+
function ei(e = {}) {
|
|
2528
2636
|
return Y({
|
|
2529
2637
|
id: Z(),
|
|
2530
2638
|
type: "wrapper",
|
|
@@ -2532,27 +2640,27 @@ function Vr(e = {}) {
|
|
|
2532
2640
|
styles: Q(0)
|
|
2533
2641
|
}, e);
|
|
2534
2642
|
}
|
|
2535
|
-
function
|
|
2643
|
+
function ti(e, t) {
|
|
2536
2644
|
switch (e) {
|
|
2537
|
-
case "section": return
|
|
2538
|
-
case "title": return
|
|
2539
|
-
case "paragraph": return
|
|
2540
|
-
case "image": return
|
|
2541
|
-
case "button": return
|
|
2542
|
-
case "divider": return
|
|
2543
|
-
case "video": return
|
|
2544
|
-
case "social": return
|
|
2545
|
-
case "spacer": return
|
|
2546
|
-
case "html": return
|
|
2547
|
-
case "menu": return
|
|
2548
|
-
case "table": return
|
|
2549
|
-
case "countdown": return
|
|
2645
|
+
case "section": return Hr(X(t?.section));
|
|
2646
|
+
case "title": return Lr(X(t?.title));
|
|
2647
|
+
case "paragraph": return Rr(X(t?.paragraph));
|
|
2648
|
+
case "image": return zr(X(t?.image));
|
|
2649
|
+
case "button": return Br(X(t?.button));
|
|
2650
|
+
case "divider": return Vr(X(t?.divider));
|
|
2651
|
+
case "video": return Ur(X(t?.video));
|
|
2652
|
+
case "social": return Wr(X(t?.social));
|
|
2653
|
+
case "spacer": return Gr(X(t?.spacer));
|
|
2654
|
+
case "html": return Kr(X(t?.html));
|
|
2655
|
+
case "menu": return qr(X(t?.menu));
|
|
2656
|
+
case "table": return Yr(X(t?.table));
|
|
2657
|
+
case "countdown": return Xr(X(t?.countdown));
|
|
2550
2658
|
case "slot": throw Error("[Templatical] slot cannot be inserted into content. Use createSlotBlock() to build a layout.");
|
|
2551
2659
|
case "wrapper": throw Error("[Templatical] wrapper cannot be inserted into content. Use createWrapperBlock() to build a layout.");
|
|
2552
2660
|
default: throw Error(`Unknown block type: ${e}`);
|
|
2553
2661
|
}
|
|
2554
2662
|
}
|
|
2555
|
-
function
|
|
2663
|
+
function ni(e, t) {
|
|
2556
2664
|
let n = e.l10n;
|
|
2557
2665
|
if (!n || t.size === 0) return;
|
|
2558
2666
|
let r = (n) => {
|
|
@@ -2567,7 +2675,7 @@ function Ur(e, t) {
|
|
|
2567
2675
|
n && (e[t] = Object.fromEntries(Object.entries(n).map(([e, t]) => [r(e), t])));
|
|
2568
2676
|
}
|
|
2569
2677
|
}
|
|
2570
|
-
function
|
|
2678
|
+
function ri(e) {
|
|
2571
2679
|
let t = JSON.parse(JSON.stringify(e)), n = (e) => {
|
|
2572
2680
|
e.id = Z();
|
|
2573
2681
|
let t = /* @__PURE__ */ new Map(), r = (e, n) => {
|
|
@@ -2584,55 +2692,55 @@ function Wr(e) {
|
|
|
2584
2692
|
if (e.type === "social") for (let t of e.icons) r(t, "icons");
|
|
2585
2693
|
if (e.type === "section") for (let t of e.children) for (let e of t) n(e);
|
|
2586
2694
|
if (e.type === "wrapper") for (let t of e.children) n(t);
|
|
2587
|
-
|
|
2695
|
+
ni(e, t);
|
|
2588
2696
|
};
|
|
2589
2697
|
return n(t), t;
|
|
2590
2698
|
}
|
|
2591
2699
|
// ../types/src/layout.ts
|
|
2592
|
-
var
|
|
2700
|
+
var ii = "[Templatical] layout: must contain exactly one slot block", ai = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", oi = "[Templatical] layout: a wrapper cannot contain a wrapper", si = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", ci = "[Templatical] slot is not a valid content block", li = "[Templatical] layout: a wrapper cannot contain a section with its own wrapper (section.wrapper)", ui = "[Templatical] wrapper is not a valid content block";
|
|
2593
2701
|
function $(e, t, n = null, r = !1, i = !1) {
|
|
2594
|
-
for (let a of e) if (t(a, n, r, i),
|
|
2702
|
+
for (let a of e) if (t(a, n, r, i), z(a)) for (let e of a.children) $(e, t, a, !0, i);
|
|
2595
2703
|
else V(a) && $(a.children, t, a, r, !0);
|
|
2596
2704
|
}
|
|
2597
|
-
function
|
|
2705
|
+
function di(e) {
|
|
2598
2706
|
let t = 0;
|
|
2599
2707
|
if ($(e.blocks, (e, n, r, i) => {
|
|
2600
|
-
if (i &&
|
|
2601
|
-
if (B(e) && (t += 1, r)) throw Error(
|
|
2708
|
+
if (i && z(e) && e.wrapper) throw Error(li);
|
|
2709
|
+
if (B(e) && (t += 1, r)) throw Error(ai);
|
|
2602
2710
|
if (V(e)) {
|
|
2603
|
-
if (r) throw Error(
|
|
2604
|
-
if (e.children.some(V)) throw Error(
|
|
2711
|
+
if (r) throw Error(ai);
|
|
2712
|
+
if (e.children.some(V)) throw Error(oi);
|
|
2605
2713
|
}
|
|
2606
|
-
}), t !== 1) throw Error(
|
|
2714
|
+
}), t !== 1) throw Error(ii);
|
|
2607
2715
|
}
|
|
2608
|
-
function
|
|
2716
|
+
function fi(e) {
|
|
2609
2717
|
$(e.blocks, (e) => {
|
|
2610
|
-
if (B(e)) throw Error(
|
|
2718
|
+
if (B(e)) throw Error(ci);
|
|
2611
2719
|
});
|
|
2612
2720
|
}
|
|
2613
|
-
function
|
|
2721
|
+
function pi(e) {
|
|
2614
2722
|
$(e.blocks, (e) => {
|
|
2615
|
-
if (V(e)) throw Error(
|
|
2723
|
+
if (V(e)) throw Error(ui);
|
|
2616
2724
|
});
|
|
2617
2725
|
}
|
|
2618
|
-
function
|
|
2726
|
+
function mi(e) {
|
|
2619
2727
|
let t = !1;
|
|
2620
2728
|
return $(e.blocks, (e, n) => {
|
|
2621
2729
|
B(e) && n !== null && V(n) && (t = !0);
|
|
2622
2730
|
}), t;
|
|
2623
2731
|
}
|
|
2624
|
-
function
|
|
2732
|
+
function hi(e) {
|
|
2625
2733
|
if (B(e)) return e;
|
|
2626
2734
|
if (V(e)) {
|
|
2627
|
-
let t =
|
|
2735
|
+
let t = ri({
|
|
2628
2736
|
...e,
|
|
2629
2737
|
children: []
|
|
2630
2738
|
});
|
|
2631
|
-
return t.children = e.children.map(
|
|
2739
|
+
return t.children = e.children.map(hi), t;
|
|
2632
2740
|
}
|
|
2633
|
-
return
|
|
2741
|
+
return ri(e);
|
|
2634
2742
|
}
|
|
2635
|
-
function
|
|
2743
|
+
function gi(e) {
|
|
2636
2744
|
for (let t = 0; t < e.length; t++) {
|
|
2637
2745
|
let n = e[t];
|
|
2638
2746
|
if (B(n)) return {
|
|
@@ -2640,23 +2748,23 @@ function ri(e) {
|
|
|
2640
2748
|
index: t
|
|
2641
2749
|
};
|
|
2642
2750
|
if (V(n)) {
|
|
2643
|
-
let e =
|
|
2751
|
+
let e = gi(n.children);
|
|
2644
2752
|
if (e) return e;
|
|
2645
2753
|
}
|
|
2646
2754
|
}
|
|
2647
2755
|
return null;
|
|
2648
2756
|
}
|
|
2649
|
-
function
|
|
2650
|
-
for (let t of e) if (
|
|
2757
|
+
function _i(e) {
|
|
2758
|
+
for (let t of e) if (z(t)) {
|
|
2651
2759
|
if (t.wrapper) return !0;
|
|
2652
|
-
for (let e of t.children) if (
|
|
2760
|
+
for (let e of t.children) if (_i(e)) return !0;
|
|
2653
2761
|
}
|
|
2654
2762
|
return !1;
|
|
2655
2763
|
}
|
|
2656
|
-
function
|
|
2657
|
-
if (
|
|
2658
|
-
let n = e.blocks.map(
|
|
2659
|
-
if (!r) throw Error(
|
|
2764
|
+
function vi(e, t) {
|
|
2765
|
+
if (di(e), fi(t), pi(t), mi(e) && _i(t.blocks)) throw Error(si);
|
|
2766
|
+
let n = e.blocks.map(hi), r = gi(n);
|
|
2767
|
+
if (!r) throw Error(ii);
|
|
2660
2768
|
return r.parent.splice(r.index, 1, ...m(t.blocks)), {
|
|
2661
2769
|
blocks: n,
|
|
2662
2770
|
settings: {
|
|
@@ -2666,7 +2774,7 @@ function ai(e, t) {
|
|
|
2666
2774
|
};
|
|
2667
2775
|
}
|
|
2668
2776
|
// ../types/src/url-policy.ts
|
|
2669
|
-
var
|
|
2777
|
+
var yi = Object.freeze([
|
|
2670
2778
|
"http",
|
|
2671
2779
|
"https",
|
|
2672
2780
|
"mailto",
|
|
@@ -2676,44 +2784,44 @@ var oi = Object.freeze([
|
|
|
2676
2784
|
"sms",
|
|
2677
2785
|
"xmpp",
|
|
2678
2786
|
"cid"
|
|
2679
|
-
]),
|
|
2787
|
+
]), bi = Object.freeze([
|
|
2680
2788
|
"javascript",
|
|
2681
2789
|
"data",
|
|
2682
2790
|
"vbscript"
|
|
2683
2791
|
]);
|
|
2684
|
-
function
|
|
2792
|
+
function xi(e) {
|
|
2685
2793
|
return e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2686
2794
|
}
|
|
2687
|
-
function
|
|
2688
|
-
let t = /^([a-z][a-z0-9+.-]*):/i.exec(
|
|
2795
|
+
function Si(e) {
|
|
2796
|
+
let t = /^([a-z][a-z0-9+.-]*):/i.exec(xi(e));
|
|
2689
2797
|
return t ? t[1].toLowerCase() : null;
|
|
2690
2798
|
}
|
|
2691
|
-
var
|
|
2799
|
+
var Ci = /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i, wi = Object.freeze([
|
|
2692
2800
|
"href",
|
|
2693
2801
|
"xlink:href",
|
|
2694
2802
|
"background",
|
|
2695
2803
|
"poster",
|
|
2696
2804
|
"src"
|
|
2697
|
-
]),
|
|
2805
|
+
]), Ti = Object.freeze([
|
|
2698
2806
|
"srcdoc",
|
|
2699
2807
|
"ping",
|
|
2700
2808
|
"formaction",
|
|
2701
2809
|
"action"
|
|
2702
2810
|
]);
|
|
2703
|
-
function
|
|
2704
|
-
let n =
|
|
2705
|
-
return r === null ||
|
|
2811
|
+
function Ei(e, t) {
|
|
2812
|
+
let n = xi(e), r = Si(n);
|
|
2813
|
+
return r === null || yi.some((e) => e === r) ? !0 : t.toLowerCase() === "src" && Ci.test(n);
|
|
2706
2814
|
}
|
|
2707
2815
|
// ../types/src/rich-text.ts
|
|
2708
|
-
var
|
|
2709
|
-
function
|
|
2710
|
-
return e.replace(
|
|
2816
|
+
var Di = /<\/?p\b[^<>]*>/gi, Oi = /<p\b([^<>]*)>\s*<\/p>/gi;
|
|
2817
|
+
function ki(e) {
|
|
2818
|
+
return e.replace(Di, "").trim() === "";
|
|
2711
2819
|
}
|
|
2712
|
-
function
|
|
2713
|
-
return
|
|
2820
|
+
function Ai(e) {
|
|
2821
|
+
return ki(e) ? e : e.replace(Oi, "<p$1> </p>");
|
|
2714
2822
|
}
|
|
2715
2823
|
// ../types/src/fonts.ts
|
|
2716
|
-
var
|
|
2824
|
+
var ji = {
|
|
2717
2825
|
arial: "Arial, sans-serif",
|
|
2718
2826
|
helvetica: "Helvetica, sans-serif",
|
|
2719
2827
|
georgia: "Georgia, serif",
|
|
@@ -2722,13 +2830,13 @@ var vi = {
|
|
|
2722
2830
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2723
2831
|
"courier new": "'Courier New', monospace",
|
|
2724
2832
|
tahoma: "Tahoma, sans-serif"
|
|
2725
|
-
},
|
|
2833
|
+
}, Mi = /* @__PURE__ */ new Set([
|
|
2726
2834
|
"inherit",
|
|
2727
2835
|
"initial",
|
|
2728
2836
|
"unset",
|
|
2729
2837
|
"revert",
|
|
2730
2838
|
"revert-layer"
|
|
2731
|
-
]),
|
|
2839
|
+
]), Ni = /* @__PURE__ */ new Set([
|
|
2732
2840
|
"serif",
|
|
2733
2841
|
"sans-serif",
|
|
2734
2842
|
"monospace",
|
|
@@ -2743,14 +2851,14 @@ var vi = {
|
|
|
2743
2851
|
"math",
|
|
2744
2852
|
"fangsong"
|
|
2745
2853
|
]);
|
|
2746
|
-
function
|
|
2854
|
+
function Pi(e) {
|
|
2747
2855
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
2748
2856
|
}
|
|
2749
|
-
function
|
|
2857
|
+
function Fi(e) {
|
|
2750
2858
|
if (typeof e != "string") return [];
|
|
2751
2859
|
let t = e.replace(/!\s*important\s*$/i, ""), n = [], r = 0;
|
|
2752
2860
|
for (;;) {
|
|
2753
|
-
for (; r < t.length &&
|
|
2861
|
+
for (; r < t.length && Pi(t[r]);) r++;
|
|
2754
2862
|
if (r >= t.length) return [];
|
|
2755
2863
|
let e = t[r];
|
|
2756
2864
|
if (e === "\"" || e === "'") {
|
|
@@ -2767,7 +2875,7 @@ function Si(e) {
|
|
|
2767
2875
|
}
|
|
2768
2876
|
}
|
|
2769
2877
|
if (!o) return [];
|
|
2770
|
-
for (; a < t.length &&
|
|
2878
|
+
for (; a < t.length && Pi(t[a]);) a++;
|
|
2771
2879
|
if (a < t.length && t[a] !== ",") return [];
|
|
2772
2880
|
n.push({
|
|
2773
2881
|
name: i,
|
|
@@ -2775,7 +2883,7 @@ function Si(e) {
|
|
|
2775
2883
|
}), r = a;
|
|
2776
2884
|
} else {
|
|
2777
2885
|
let e = t.indexOf(",", r), i = e === -1 ? t.length : e, a = t.slice(r, i).trim().split(/\s+/).join(" ");
|
|
2778
|
-
if (a === "" || a.includes("\"") || a.includes("'") ||
|
|
2886
|
+
if (a === "" || a.includes("\"") || a.includes("'") || Mi.has(a.toLowerCase())) return [];
|
|
2779
2887
|
n.push({
|
|
2780
2888
|
name: a,
|
|
2781
2889
|
quoted: !1
|
|
@@ -2785,27 +2893,27 @@ function Si(e) {
|
|
|
2785
2893
|
r++;
|
|
2786
2894
|
}
|
|
2787
2895
|
}
|
|
2788
|
-
function
|
|
2896
|
+
function Ii(e) {
|
|
2789
2897
|
return `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
2790
2898
|
}
|
|
2791
|
-
function
|
|
2792
|
-
return !e.quoted &&
|
|
2899
|
+
function Li(e) {
|
|
2900
|
+
return !e.quoted && Ni.has(e.name.toLowerCase());
|
|
2793
2901
|
}
|
|
2794
|
-
function
|
|
2795
|
-
return
|
|
2902
|
+
function Ri(e) {
|
|
2903
|
+
return Fi(e)[0]?.name ?? "";
|
|
2796
2904
|
}
|
|
2797
|
-
function
|
|
2798
|
-
let n = (e) => `${
|
|
2905
|
+
function zi(e, t) {
|
|
2906
|
+
let n = (e) => `${Ii(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
|
|
2799
2907
|
if (i) return n(i);
|
|
2800
|
-
let a =
|
|
2908
|
+
let a = Fi(e);
|
|
2801
2909
|
if (a.length !== 1) return e;
|
|
2802
2910
|
let [o] = a, s = o.name.toLowerCase(), c = t.customFonts.find((e) => e.name.toLowerCase() === s);
|
|
2803
|
-
return c ? n(c) :
|
|
2911
|
+
return c ? n(c) : ji[s] || (Li(o) ? e : `${Ii(o.name)}, ${t.defaultFallback}`);
|
|
2804
2912
|
}
|
|
2805
2913
|
// ../types/src/preview-resolution.ts
|
|
2806
|
-
function
|
|
2914
|
+
function Bi(e) {
|
|
2807
2915
|
return typeof e != "object" || !e ? !1 : Array.isArray(e.blocks);
|
|
2808
2916
|
}
|
|
2809
|
-
export {
|
|
2917
|
+
export { _r as $, A as $t, Wr as A, n as An, rn as At, jr as B, zt as Bt, Vr as C, i as Cn, pn as Ct, Rr as D, d as Dn, un as Dt, qr as E, s as En, B as Et, ei as F, Bt as Ft, gr as G, Pt as Gt, W as H, jt as Ht, Z as I, Wt as It, nr as J, Tt as Jt, or as K, Ft as Kt, Fr as L, Ut as Lt, Yr as M, o as Mn, V as Mt, Lr as N, t as Nn, nn as Nt, Hr as O, c as On, dn as Ot, Ur as P, en as Pt, ar as Q, T as Qt, vr as R, Kt as Rt, Qr as S, ee as Sn, on as St, zr as T, l as Tn, z as Tt, G as U, Mt as Ut, Or as V, Lt as Vt, mr as W, Nt as Wt, dr as X, w as Xt, tr as Y, kt as Yt, hr as Z, je as Zt, di as _, x as _n, sn as _t, Ai as a, oe as an, fr as at, Br as b, m as bn, cn as bt, Ti as c, me as cn, Kn as ct, Si as d, _e as dn, Rn as dt, ke as en, sr as et, Ei as f, ue as fn, Ln as ft, mi as g, S as gn, Nn as gt, pi as h, Se as hn, jn as ht, zi as i, C as in, lr as it, Gr as j, r as jn, ln as jt, $r as k, u as kn, mn as kt, wi as l, Ce as ln, U as lt, fi as m, y as mn, An as mt, Ri as n, g as nn, Qn as nt, ki as o, v as on, ur as ot, vi as p, fe as pn, Pn as pt, cr as q, St as qt, Fi as r, Te as rn, K as rt, bi as s, de as sn, Gn as st, Bi as t, Ae as tn, rr as tt, yi as u, we as un, Bn as ut, ri as v, ie as vn, hn as vt, Kr as w, e as wn, an as wt, Xr as x, p as xn, fn as xt, ti as y, h as yn, gn as yt, Mr as z, Gt as zt };
|
|
2810
2918
|
|
|
2811
|
-
//# sourceMappingURL=src-
|
|
2919
|
+
//# sourceMappingURL=src-A0kzK-pR.js.map
|