@templatical/editor 0.59.2 → 0.60.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiAltTextPopover-BhWHOOKX.js → AiAltTextPopover-DiIaqDtB.js} +1 -1
- package/dist/{AiAltTextReview-CmW7pLmo.js → AiAltTextReview-DIe0WBbj.js} +1 -1
- package/dist/{AiChatPanel-CV0mCtad.js → AiChatPanel-aj2TPO9F.js} +8 -8
- package/dist/{AiPanels-C8M7q_vM.js → AiPanels-CRM3jf82.js} +1 -1
- package/dist/{AiRewriteMenu-DC2ZLH5L.js → AiRewriteMenu-F3GyXBsk.js} +8 -8
- package/dist/{BlockIssueBadge-B8sl9BM1.js → BlockIssueBadge-DlhA_I6J.js} +2 -2
- package/dist/{BlockPreviewCanvas-yhOQAQhJ.js → BlockPreviewCanvas-DYspUXMO.js} +19 -44
- package/dist/{CloudPanels-CD0lsL0R.js → CloudPanels-CAMn545-.js} +3 -3
- package/dist/{CollaborationNotices-DrMrP73M.js → CollaborationNotices-CnfS8BQy.js} +1 -1
- package/dist/{CollaboratorBar-TsK872uC.js → CollaboratorBar-DufLdLQP.js} +1 -1
- package/dist/{CommentsPanel-BX8JVrXU.js → CommentsPanel-C2hFFs0o.js} +1 -1
- package/dist/{CommentsSidebar-BUlseNwL.js → CommentsSidebar-CgEwxt2T.js} +10 -10
- package/dist/{CountdownToolbar-dx3FVRjh.js → CountdownToolbar-CNqYDevp.js} +4 -4
- package/dist/{IssuesPanel-BwnvXxBC.js → IssuesPanel-cPKhimE9.js} +9 -9
- package/dist/{LanguageMenu-Cf5bKocE.js → LanguageMenu-zxlpmw2x.js} +12 -12
- package/dist/{LocaleNotices-CGEp0pQ8.js → LocaleNotices-PIfpvCCI.js} +2 -2
- package/dist/{LogicTagInsertButton-BdDe-vrZ.js → LogicTagInsertButton-DqTkGJSR.js} +16 -16
- package/dist/{MediaEditModal-BWOqjEZN.js → MediaEditModal-C2Bn8WGb.js} +1 -1
- package/dist/{MediaPanels-C-XrldMu.js → MediaPanels-BAZByHRA.js} +1 -1
- package/dist/{MergeTagInput-CTTi-eB0.js → MergeTagInput-Jly1Pw0v.js} +1 -1
- package/dist/{MergeTagModeToggle-Bd0svGQm.js → MergeTagModeToggle-5kaFLRAm.js} +4 -4
- package/dist/{MergeTagTextarea-DiahMV-3.js → MergeTagTextarea-CCfirhcR.js} +5 -5
- package/dist/{ParagraphEditor-Db1cmj8Y.js → ParagraphEditor-DTdnxgDZ.js} +43 -43
- package/dist/{RestoreVersionDialog-DA1Z0q9Z.js → RestoreVersionDialog-cUYu3Xqs.js} +3 -3
- package/dist/{RichTextEditorContent-CyO6e4ZG.js → RichTextEditorContent-Aub9tOHF.js} +4 -4
- package/dist/{SaveBlockDialog-D7SaFxa_.js → SaveBlockDialog-D_ie3uIF.js} +7 -7
- package/dist/{SavedBlocksBrowserModal-B5r3LWWG.js → SavedBlocksBrowserModal-fhSnYT1l.js} +9 -9
- package/dist/{SavedBlocksPanels-BH2f7jm-.js → SavedBlocksPanels-Lklqy4XI.js} +1 -1
- package/dist/{SavedBlocksPickBar-B24TScw0.js → SavedBlocksPickBar-CpWkCa8G.js} +2 -2
- package/dist/{TemplateSettings-CuN9Vkl_.js → TemplateSettings-BJ4a8RBr.js} +8 -8
- package/dist/{TestEmailModal-C4DAaohi.js → TestEmailModal-BEoapoDc.js} +8 -8
- package/dist/{TestEmailPanel-DoMcVJSE.js → TestEmailPanel-DgyzokCf.js} +1 -1
- package/dist/{TitleEditor-b5Pr_m9j.js → TitleEditor-BQoSPgOi.js} +9 -9
- package/dist/{Toolbar-BOf7Y862.js → Toolbar-KhPpWyX1.js} +857 -756
- package/dist/{TplModal-DAcXzBJh.js → TplModal-F_kA7luG.js} +1 -1
- package/dist/{VersionHistoryMenu-TbIGteNi.js → VersionHistoryMenu-Bz4G8cNm.js} +5 -5
- package/dist/{VersionHistoryPanels-Ia6ipOqG.js → VersionHistoryPanels-DmVRyWv9.js} +1 -1
- package/dist/{VersionPreviewBanner-CRfu6quf.js → VersionPreviewBanner-BeppXZyn.js} +1 -1
- package/dist/{WrapperBlock-BZenrXM6.js → WrapperBlock-Ds7yfbhg.js} +3 -3
- package/dist/{blockTypeIcons-DdYZy8yG.js → blockTypeIcons-Do1QqDjg.js} +3 -3
- package/dist/bundle-stats.json +6 -6
- package/dist/{cdn/chunks/ca-YfIxwO1G.js → ca-Ce3NmK9v.js} +6 -3
- package/dist/cdn/chunks/{AiAltTextPopover-CcX_OMUU.js → AiAltTextPopover-CUzIaLRK.js} +2 -2
- package/dist/cdn/chunks/AiAltTextPopover-CUzIaLRK.js.map +1 -0
- package/dist/cdn/chunks/{AiAltTextReview-Dmm3h0jd.js → AiAltTextReview-BXBlE71X.js} +2 -2
- package/dist/cdn/chunks/AiAltTextReview-BXBlE71X.js.map +1 -0
- package/dist/cdn/chunks/{AiChatPanel-DV23DJ-2.js → AiChatPanel-BKydciDQ.js} +2 -2
- package/dist/cdn/chunks/AiChatPanel-BKydciDQ.js.map +1 -0
- package/dist/cdn/chunks/{AiPanels-CxhOpMAp.js → AiPanels-De-cIZ4p.js} +2 -2
- package/dist/cdn/chunks/AiPanels-De-cIZ4p.js.map +1 -0
- package/dist/cdn/chunks/{AiRewriteMenu-87-O514r.js → AiRewriteMenu-C9vBUTIB.js} +6 -6
- package/dist/cdn/chunks/AiRewriteMenu-C9vBUTIB.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-Dp06vQd3.js → BlockIssueBadge-B3CTTvgw.js} +2 -2
- package/dist/cdn/chunks/BlockIssueBadge-B3CTTvgw.js.map +1 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-DQGzUvZ5.js → BlockPreviewCanvas-B4Bj--kc.js} +20 -45
- package/dist/cdn/chunks/BlockPreviewCanvas-B4Bj--kc.js.map +1 -0
- package/dist/cdn/chunks/CloudHeaderExtras-Cd-ePldd.js.map +1 -1
- package/dist/cdn/chunks/{CloudPanels-D8fchoYt.js → CloudPanels-CQ75I3hQ.js} +3 -3
- package/dist/cdn/chunks/CloudPanels-CQ75I3hQ.js.map +1 -0
- package/dist/cdn/chunks/{CollaborationNotices-DNEs3g9B.js → CollaborationNotices-CgLea-hu.js} +2 -2
- package/dist/cdn/chunks/CollaborationNotices-CgLea-hu.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-CN6XAlbn.js → CollaboratorBar-CjRcbebT.js} +2 -2
- package/dist/cdn/chunks/CollaboratorBar-CjRcbebT.js.map +1 -0
- package/dist/cdn/chunks/{CommentsPanel-CxZ1kFcK.js → CommentsPanel-D_ud9GMN.js} +2 -2
- package/dist/cdn/chunks/CommentsPanel-D_ud9GMN.js.map +1 -0
- package/dist/cdn/chunks/{CommentsSidebar-DCr2mV8b.js → CommentsSidebar-CXn1EGAI.js} +2 -2
- package/dist/cdn/chunks/CommentsSidebar-CXn1EGAI.js.map +1 -0
- package/dist/cdn/chunks/CountdownBlock--hlKE2aj.js.map +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CUTbVPPV.js → CountdownToolbar-BOyk_4k7.js} +5 -5
- package/dist/cdn/chunks/CountdownToolbar-BOyk_4k7.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-BhcSzwuL.js → IssuesPanel-DOC94ZsH.js} +4 -4
- package/dist/cdn/chunks/IssuesPanel-DOC94ZsH.js.map +1 -0
- package/dist/cdn/chunks/{LanguageMenu-6wGhkyFT.js → LanguageMenu-DktneIpL.js} +7 -7
- package/dist/cdn/chunks/LanguageMenu-DktneIpL.js.map +1 -0
- package/dist/cdn/chunks/{LocaleNotices-Br92Xueo.js → LocaleNotices-B2NgnHoP.js} +2 -2
- package/dist/cdn/chunks/LocaleNotices-B2NgnHoP.js.map +1 -0
- package/dist/cdn/chunks/{LogicTagInsertButton-r2EVUtDU.js → LogicTagInsertButton-CQ8RiOou.js} +5 -5
- package/dist/cdn/chunks/LogicTagInsertButton-CQ8RiOou.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-CfgN7Jyi.js → MediaEditModal-Cs7_Om7e.js} +2 -2
- package/dist/cdn/chunks/MediaEditModal-Cs7_Om7e.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-Cb5vsgb-.js → MediaPanels-BeekGmql.js} +2 -2
- package/dist/cdn/chunks/MediaPanels-BeekGmql.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagInput-Dh3N6CEV.js → MergeTagInput-D7FZ0ca0.js} +2 -2
- package/dist/cdn/chunks/MergeTagInput-D7FZ0ca0.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagModeToggle-D6u3hMrI.js → MergeTagModeToggle-CySCCEDs.js} +3 -3
- package/dist/cdn/chunks/MergeTagModeToggle-CySCCEDs.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagTextarea-BpVtpiNL.js → MergeTagTextarea-DJbWTYVH.js} +7 -7
- package/dist/cdn/chunks/MergeTagTextarea-DJbWTYVH.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-DGJmPAC1.js → ParagraphEditor-DAQUWqQJ.js} +23 -23
- package/dist/cdn/chunks/ParagraphEditor-DAQUWqQJ.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-D5qeCa0F.js → RestoreVersionDialog-COTRe_rM.js} +3 -3
- package/dist/cdn/chunks/RestoreVersionDialog-COTRe_rM.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-DyGiXKKI.js → RichTextEditorContent-DeWPMd9V.js} +4 -4
- package/dist/cdn/chunks/RichTextEditorContent-DeWPMd9V.js.map +1 -0
- package/dist/cdn/chunks/{SaveBlockDialog-B0TJYxd8.js → SaveBlockDialog-adQMbKR1.js} +6 -6
- package/dist/cdn/chunks/SaveBlockDialog-adQMbKR1.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-D8Ly7LrA.js → SavedBlocksBrowserModal-CGIFCRAx.js} +6 -6
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CGIFCRAx.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-Co1cbWR8.js → SavedBlocksPanels-Du0RYlEf.js} +2 -2
- package/dist/cdn/chunks/SavedBlocksPanels-Du0RYlEf.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPickBar-DNtVbpm-.js → SavedBlocksPickBar-DmleyUrn.js} +3 -3
- package/dist/cdn/chunks/SavedBlocksPickBar-DmleyUrn.js.map +1 -0
- package/dist/cdn/chunks/{TemplateSettings-BRc878ZF.js → TemplateSettings-Csjef99q.js} +6 -6
- package/dist/cdn/chunks/TemplateSettings-Csjef99q.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-CIui7VfS.js → TestEmailModal-ClkexOtF.js} +7 -7
- package/dist/cdn/chunks/TestEmailModal-ClkexOtF.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-vKvruW_r.js → TestEmailPanel-DYEYzhU2.js} +2 -2
- package/dist/cdn/chunks/TestEmailPanel-DYEYzhU2.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-BI-9Nnj3.js → TitleEditor-opvaIgVr.js} +8 -8
- package/dist/cdn/chunks/TitleEditor-opvaIgVr.js.map +1 -0
- package/dist/cdn/chunks/ToggleSwitch-C0w0srN_.js.map +1 -1
- package/dist/cdn/chunks/{Toolbar-CYnnArxv.js → Toolbar-DbqkKRXy.js} +771 -670
- package/dist/cdn/chunks/Toolbar-DbqkKRXy.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-B3nZeGWK.js → TplModal-DLV5OeMD.js} +2 -2
- package/dist/cdn/chunks/TplModal-DLV5OeMD.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryMenu-CMGfAKuV.js → VersionHistoryMenu-DBd0zwjE.js} +2 -2
- package/dist/cdn/chunks/VersionHistoryMenu-DBd0zwjE.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-Bb2ouQg7.js → VersionHistoryPanels-hy_Ybxie.js} +2 -2
- package/dist/cdn/chunks/VersionHistoryPanels-hy_Ybxie.js.map +1 -0
- package/dist/cdn/chunks/{VersionPreviewBanner-573UP-g4.js → VersionPreviewBanner-D-yHxWWY.js} +2 -2
- package/dist/cdn/chunks/VersionPreviewBanner-D-yHxWWY.js.map +1 -0
- package/dist/cdn/chunks/{WrapperBlock-DVu632LD.js → WrapperBlock-Ce_k8m_x.js} +4 -4
- package/dist/cdn/chunks/WrapperBlock-Ce_k8m_x.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-CGxNYHVA.js → blockTypeIcons-DBoP1HkR.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-CGxNYHVA.js.map → blockTypeIcons-DBoP1HkR.js.map} +1 -1
- package/dist/{ca-YfIxwO1G.js → cdn/chunks/ca-Ce3NmK9v.js} +8 -1
- package/dist/cdn/chunks/ca-Ce3NmK9v.js.map +1 -0
- package/dist/cdn/chunks/{composables-DY3anqHO.js → composables-Brr4m0Sg.js} +566 -591
- package/dist/cdn/chunks/composables-Brr4m0Sg.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-B5numxlW.js → createCloudRuntime-QPeg45XL.js} +3 -3
- package/dist/cdn/chunks/{createCloudRuntime-B5numxlW.js.map → createCloudRuntime-QPeg45XL.js.map} +1 -1
- package/dist/cdn/chunks/{da-CM6DCvRG.js → da-4YwDAuEr.js} +7 -2
- package/dist/cdn/chunks/da-4YwDAuEr.js.map +1 -0
- package/dist/{de-Dugz1zXC.js → cdn/chunks/de-BlQ0vdZJ.js} +8 -1
- package/dist/cdn/chunks/de-BlQ0vdZJ.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-CXSSZplR.js → editor-modal-BCcbvIxc.js} +4 -4
- package/dist/cdn/chunks/editor-modal-BCcbvIxc.js.map +1 -0
- package/dist/cdn/chunks/en-DkulseE1.js +1 -0
- package/dist/{en-BykoFuFY.js → cdn/chunks/en-MlNeQVSG.js} +8 -1
- package/dist/cdn/chunks/en-MlNeQVSG.js.map +1 -0
- package/dist/{es-DaWsTkpj.js → cdn/chunks/es-2s8x4OM2.js} +8 -1
- package/dist/cdn/chunks/es-2s8x4OM2.js.map +1 -0
- package/dist/cdn/chunks/{extensions-BWVlr8Ga.js → extensions-BpuyqKVY.js} +5 -5
- package/dist/cdn/chunks/extensions-BpuyqKVY.js.map +1 -0
- package/dist/{fr-DqwQHtJo.js → cdn/chunks/fr-D3MjrsgQ.js} +8 -1
- package/dist/cdn/chunks/fr-D3MjrsgQ.js.map +1 -0
- package/dist/cdn/chunks/{icons-C7vjUBLn.js → icons-BJ6AtVgu.js} +23 -23
- package/dist/cdn/chunks/{icons-C7vjUBLn.js.map → icons-BJ6AtVgu.js.map} +1 -1
- package/dist/cdn/chunks/{ja-BH4MS1Ye.js → ja-B4Kx7uBX.js} +7 -2
- package/dist/cdn/chunks/ja-B4Kx7uBX.js.map +1 -0
- package/dist/{nl-BQl1_UHv.js → cdn/chunks/nl-U65iX7wN.js} +8 -1
- package/dist/cdn/chunks/nl-U65iX7wN.js.map +1 -0
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-Dw3rFvyd.js → normalizeMergeTagMarkup-B81BAWKT.js} +64 -64
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-Dw3rFvyd.js.map → normalizeMergeTagMarkup-B81BAWKT.js.map} +1 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-BGtb8Xbp.js → preRenderCustomBlocks-CQuaMxuv.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-BGtb8Xbp.js.map → preRenderCustomBlocks-CQuaMxuv.js.map} +1 -1
- package/dist/{pt-BR-eyzmU9Vs.js → cdn/chunks/pt-BR-_jsX1xLv.js} +8 -1
- package/dist/cdn/chunks/pt-BR-_jsX1xLv.js.map +1 -0
- package/dist/cdn/chunks/{sanitizeHtml-CLRY8s2s.js → sanitizeHtml-BdAjvU9I.js} +2 -2
- package/dist/cdn/chunks/{sanitizeHtml-CLRY8s2s.js.map → sanitizeHtml-BdAjvU9I.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-kYhdXJ9P.js → socialIcons-Df9dNe7I.js} +495 -517
- package/dist/cdn/chunks/socialIcons-Df9dNe7I.js.map +1 -0
- package/dist/cdn/chunks/{src-BmzzkUf7.js → src-B3v_3j9b.js} +436 -404
- package/dist/cdn/chunks/src-B3v_3j9b.js.map +1 -0
- package/dist/cdn/chunks/{src-DY2kMjoD.js → src-BHgVGOTi.js} +771 -667
- package/dist/cdn/chunks/src-BHgVGOTi.js.map +1 -0
- package/dist/cdn/chunks/src-C5V_yzAU.js +673 -0
- package/dist/cdn/chunks/src-C5V_yzAU.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-C3lIetmX.js +33 -0
- package/dist/cdn/chunks/{useLocalizedDisplay-B5wMJLru.js.map → useLocalizedDisplay-C3lIetmX.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-0wkSxy3z.js → useLogicTag-DOIlsGk8.js} +2 -2
- package/dist/cdn/chunks/{useLogicTag-0wkSxy3z.js.map → useLogicTag-DOIlsGk8.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-y3bX8M_6.js → useMergeTag-DUNl364g.js} +2 -2
- package/dist/cdn/chunks/{useMergeTag-y3bX8M_6.js.map → useMergeTag-DUNl364g.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-B42BKo9N.js → withCurrentFont-ufGLu2Vt.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-B42BKo9N.js.map → withCurrentFont-ufGLu2Vt.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-CWq6Nfjj.js} +1 -1
- package/dist/{chevron-down-C_vv5fZE.js → chevron-down-B9t0SK_-.js} +1 -1
- package/dist/{chevron-right-Cw4GpjFA.js → chevron-right-B_qslOCS.js} +1 -1
- package/dist/{chevron-up-uijYZoph.js → chevron-up-CxZ2teV2.js} +1 -1
- package/dist/{circle-exclamation-point-CIYHx5Tw.js → circle-exclamation-point-B1tbhkNb.js} +1 -1
- package/dist/{clock-tnC1IvZk.js → clock-Rw4btQn-.js} +1 -1
- package/dist/{composables-CFTH0Nqb.js → composables-5KJV0O9T.js} +914 -939
- package/dist/{createCloudRuntime-BvWlm_38.js → createCloudRuntime-BdoKeYJi.js} +2 -2
- package/dist/{createLucideIcon-CssArtUe.js → createLucideIcon-B6Zkn9r0.js} +5 -5
- package/dist/{da-CM6DCvRG.js → da-4YwDAuEr.js} +6 -1
- package/dist/{cdn/chunks/de-Dugz1zXC.js → de-BlQ0vdZJ.js} +6 -3
- 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-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-CMo4K5So.js → dist-DsA7NeIy.js} +798 -696
- package/dist/{dist-BlrlMP8f.js → dist-fDsB6dCL.js} +2 -2
- package/dist/{editor-modal-BWvxfSj8.js → editor-modal-_ylhrf4g.js} +15 -15
- package/dist/en-DwxgN_-Y.js +1 -0
- package/dist/{cdn/chunks/en-BykoFuFY.js → en-MlNeQVSG.js} +6 -3
- package/dist/{cdn/chunks/es-DaWsTkpj.js → es-2s8x4OM2.js} +6 -3
- package/dist/{extensions-BPVackEE.js → extensions-DCJGAZ9z.js} +73 -73
- package/dist/{eye-DK4--qHk.js → eye-BE-DeEqG.js} +1 -1
- package/dist/{cdn/chunks/fr-DqwQHtJo.js → fr-D3MjrsgQ.js} +6 -3
- package/dist/{image-B5pJOw5Q.js → image-DfRxUmUh.js} +1 -1
- package/dist/index.d.ts +37 -7
- package/dist/{info-DKM0_thN.js → info-D1PS-81D.js} +1 -1
- package/dist/{ja-BH4MS1Ye.js → ja-B4Kx7uBX.js} +6 -1
- package/dist/{link-BNgTZ_Sw.js → link-DLaACaIz.js} +1 -1
- package/dist/{list-Bqynqm7o.js → list-CvtzVlvM.js} +1 -1
- package/dist/{loader-circle-BMc3fVpa.js → loader-circle-DCkSXApP.js} +1 -1
- package/dist/{message-circle-D_TpvAJh.js → message-circle-Bj4F9bBO.js} +1 -1
- package/dist/{cdn/chunks/nl-BQl1_UHv.js → nl-U65iX7wN.js} +6 -3
- package/dist/{normalizeMergeTagMarkup-PQqrbfmt.js → normalizeMergeTagMarkup-B7n_-4Dz.js} +45 -45
- package/dist/{package-D2fov5PU.js → package-By1au8Wi.js} +1 -1
- package/dist/{pencil-BNdkJyfY.js → pencil-T4qqyRLl.js} +1 -1
- package/dist/{plus-CWmBmMx-.js → plus-3Zry-1gs.js} +1 -1
- package/dist/{preRenderCustomBlocks-Dg5GBNi2.js → preRenderCustomBlocks-D3GzENVB.js} +3 -3
- package/dist/{cdn/chunks/pt-BR-eyzmU9Vs.js → pt-BR-_jsX1xLv.js} +6 -3
- package/dist/{refresh-cw-Ryg1j66N.js → refresh-cw-BwaO0ioc.js} +1 -1
- package/dist/{rotate-ccw-D8j7gXXv.js → rotate-ccw-C3E0W5q-.js} +1 -1
- package/dist/{sanitizeHtml-DVdfdxOz.js → sanitizeHtml-BcbjlypU.js} +6 -6
- package/dist/{search-CX2JkSHz.js → search-DfExisVv.js} +1 -1
- package/dist/{send-BLR1b-p5.js → send-FRC7Giap.js} +1 -1
- package/dist/{smartphone-Co8m0LLg.js → smartphone-BlYU_z_x.js} +1 -1
- package/dist/{socialIcons-DBHv_ntg.js → socialIcons-By2LPWOQ.js} +561 -583
- package/dist/{sparkles-Dc3Undp5.js → sparkles-DSi61skE.js} +1 -1
- package/dist/{square-CPw_cyX8.js → square-DEE8tT2w.js} +1 -1
- package/dist/templatical-editor.js +139 -139
- package/dist/{text-align-start-2VZGhCiK.js → text-align-start-DGdrmKcG.js} +1 -1
- package/dist/{trash-t6XXliVc.js → trash-YZPJMZc7.js} +1 -1
- package/dist/{triangle-exclamation-point-_YYWE2ZH.js → triangle-exclamation-point-BR-W6pQm.js} +1 -1
- package/dist/{upload-BWYXWYHb.js → upload-B_Eoqj-4.js} +1 -1
- package/dist/useLocalizedDisplay-_P6-hXaO.js +31 -0
- package/dist/{useLogicTag-CVOj0VUv.js → useLogicTag-f0SJ1Cd2.js} +1 -1
- package/dist/{useMergeTag-Bams_kam.js → useMergeTag-0-EudwkV.js} +3 -3
- package/dist/{useScrollToBlock-CwUQ_nKz.js → useScrollToBlock-CtM_ydOS.js} +1 -1
- package/dist/withCurrentFont-BOg3jmCT.js +18 -0
- package/dist/{x-CTKOxIyZ.js → x-C0X5MoK3.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"],
|
|
@@ -309,27 +151,27 @@ var ge = class extends Error {
|
|
|
309
151
|
],
|
|
310
152
|
custom: ["fieldValues.*"]
|
|
311
153
|
}, g = ["preheaderText"];
|
|
312
|
-
function
|
|
154
|
+
function oe(e) {
|
|
313
155
|
return typeof e == "string" && /^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$/.test(e);
|
|
314
156
|
}
|
|
315
157
|
function _(e) {
|
|
316
158
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
317
159
|
}
|
|
318
|
-
var
|
|
160
|
+
var se = /* @__PURE__ */ new Set([
|
|
319
161
|
"__proto__",
|
|
320
162
|
"constructor",
|
|
321
163
|
"prototype"
|
|
322
164
|
]);
|
|
323
165
|
function v(e) {
|
|
324
|
-
return e.split(".").every((e) => e !== "" && !
|
|
166
|
+
return e.split(".").every((e) => e !== "" && !se.has(e));
|
|
325
167
|
}
|
|
326
|
-
function
|
|
327
|
-
if (!
|
|
168
|
+
function ce(e, t) {
|
|
169
|
+
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
170
|
}
|
|
329
171
|
function y(e, t) {
|
|
330
|
-
return t.split(".").reduce(
|
|
172
|
+
return t.split(".").reduce(ce, e);
|
|
331
173
|
}
|
|
332
|
-
function
|
|
174
|
+
function le(e) {
|
|
333
175
|
let t = m(e);
|
|
334
176
|
for (let [n, r] of Object.entries(t.l10n ?? {})) {
|
|
335
177
|
for (let t of ["text", "set"]) {
|
|
@@ -343,23 +185,23 @@ function xe(e) {
|
|
|
343
185
|
}
|
|
344
186
|
return t.l10n && !Object.keys(t.l10n).length && delete t.l10n, h(t, e) ? e : t;
|
|
345
187
|
}
|
|
346
|
-
function
|
|
347
|
-
let t =
|
|
188
|
+
function ue(e) {
|
|
189
|
+
let t = le(e);
|
|
348
190
|
if (t.type === "wrapper") {
|
|
349
|
-
let e = t.children.map(
|
|
191
|
+
let e = t.children.map(ue);
|
|
350
192
|
return e.some((e, n) => e !== t.children[n]) ? {
|
|
351
193
|
...t,
|
|
352
194
|
children: e
|
|
353
195
|
} : t;
|
|
354
196
|
}
|
|
355
197
|
if (t.type !== "section") return t;
|
|
356
|
-
let n = t.children.map((e) => e.map(
|
|
198
|
+
let n = t.children.map((e) => e.map(ue));
|
|
357
199
|
return n.some((e, n) => e.some((e, r) => e !== t.children[n][r])) ? {
|
|
358
200
|
...t,
|
|
359
201
|
children: n
|
|
360
202
|
} : t;
|
|
361
203
|
}
|
|
362
|
-
function
|
|
204
|
+
function de(e, t, n) {
|
|
363
205
|
if (e.type === "custom") return !1;
|
|
364
206
|
if (e.type === "section") return t === "columns";
|
|
365
207
|
let r = e.type === "menu" ? "items" : e.type === "social" ? "icons" : e.type === "table" ? "rows" : null;
|
|
@@ -380,30 +222,30 @@ function Ce(e, t, n) {
|
|
|
380
222
|
}
|
|
381
223
|
return !1;
|
|
382
224
|
}
|
|
383
|
-
function
|
|
384
|
-
return
|
|
225
|
+
function fe(e) {
|
|
226
|
+
return le(e);
|
|
385
227
|
}
|
|
386
228
|
function b(e, t, n) {
|
|
387
229
|
if (!v(t)) return !1;
|
|
388
|
-
let r = t.split("."), i = r.pop(), a = r.reduce(
|
|
230
|
+
let r = t.split("."), i = r.pop(), a = r.reduce(ce, e);
|
|
389
231
|
if (Array.isArray(a)) {
|
|
390
232
|
let e = a.findIndex((e) => _(e) && e.id === i);
|
|
391
233
|
return e < 0 ? !1 : (a[e] = m(n), !0);
|
|
392
234
|
}
|
|
393
235
|
return _(a) ? (n === null ? delete a[i] : a[i] = m(n), !0) : !1;
|
|
394
236
|
}
|
|
395
|
-
function
|
|
237
|
+
function pe(e, t) {
|
|
396
238
|
let [n, ...r] = t.split(".");
|
|
397
239
|
if (n === void 0) return [""];
|
|
398
240
|
let i = [];
|
|
399
241
|
if (n === "*") {
|
|
400
242
|
let t = Array.isArray(e) ? e : [];
|
|
401
|
-
for (let e of t) if (_(e) && typeof e.id == "string") for (let t of r.length ?
|
|
243
|
+
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
244
|
return i;
|
|
403
245
|
}
|
|
404
246
|
let a = _(e) ? e[n] : void 0;
|
|
405
247
|
if (r.length === 0) return a === void 0 ? [] : [n];
|
|
406
|
-
for (let e of
|
|
248
|
+
for (let e of pe(a, r.join("."))) i.push(`${n}.${e}`);
|
|
407
249
|
return i;
|
|
408
250
|
}
|
|
409
251
|
function x(e, t = []) {
|
|
@@ -421,10 +263,10 @@ function x(e, t = []) {
|
|
|
421
263
|
cells: e.cells.filter(n)
|
|
422
264
|
}))
|
|
423
265
|
} : e;
|
|
424
|
-
return (
|
|
266
|
+
return (ae[e.type] ?? []).flatMap((e) => pe(r, e));
|
|
425
267
|
}
|
|
426
|
-
function
|
|
427
|
-
return (
|
|
268
|
+
function me(e, t) {
|
|
269
|
+
return (ae[e] ?? []).some((e) => {
|
|
428
270
|
let n = e.split("."), r = t.split(".");
|
|
429
271
|
return n.length === r.length && n.every((e, t) => e === "*" || e === r[t]);
|
|
430
272
|
});
|
|
@@ -434,54 +276,54 @@ function S(e) {
|
|
|
434
276
|
for (let n of new TextEncoder().encode(e)) t ^= n, t = Math.imul(t, 16777619) >>> 0;
|
|
435
277
|
return t.toString(16).padStart(8, "0");
|
|
436
278
|
}
|
|
437
|
-
function
|
|
279
|
+
function he(e) {
|
|
438
280
|
let { l10n: t, ...n } = e;
|
|
439
281
|
return n;
|
|
440
282
|
}
|
|
441
|
-
function
|
|
283
|
+
function ge(e = {}) {
|
|
442
284
|
return Object.entries(e).sort(([e], [t]) => e.split(".").length - t.split(".").length);
|
|
443
285
|
}
|
|
444
|
-
function
|
|
445
|
-
return
|
|
286
|
+
function _e(e, t, n) {
|
|
287
|
+
return ve(e, m(he(e)), t, n);
|
|
446
288
|
}
|
|
447
|
-
function
|
|
289
|
+
function ve(e, t, n, r) {
|
|
448
290
|
let i = e;
|
|
449
291
|
if (n === r) return t;
|
|
450
292
|
let a = i.l10n?.[n];
|
|
451
293
|
if (!a) return t;
|
|
452
|
-
for (let [e, n] of
|
|
294
|
+
for (let [e, n] of ge(a.set)) b(t, e, n);
|
|
453
295
|
for (let [n, r] of Object.entries(a.text ?? {})) y(e, n) !== void 0 && b(t, n, r.value);
|
|
454
296
|
return e.type === "custom" && (Object.keys(a.text ?? {}).length > 0 || Object.keys(a.set ?? {}).length > 0) && delete t.renderedHtml, t;
|
|
455
297
|
}
|
|
456
|
-
function
|
|
298
|
+
function ye(e, t, n) {
|
|
457
299
|
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,
|
|
300
|
+
if (r.type !== "section" && r.type !== "wrapper" || !Array.isArray(r.children)) return _e(e, t, n);
|
|
301
|
+
let { children: i, ...a } = he(r), o = m(a);
|
|
302
|
+
return o.children = i, ve(e, o, t, n);
|
|
461
303
|
}
|
|
462
|
-
function
|
|
304
|
+
function be(e, t) {
|
|
463
305
|
return e.l10n?.[t]?.hidden === !0;
|
|
464
306
|
}
|
|
465
|
-
function
|
|
307
|
+
function xe(e) {
|
|
466
308
|
let { locales: t, l10n: n, ...r } = e;
|
|
467
309
|
return r;
|
|
468
310
|
}
|
|
469
311
|
function C(e) {
|
|
470
312
|
return e.settings?.locale ?? "en";
|
|
471
313
|
}
|
|
472
|
-
function
|
|
314
|
+
function Se(e, t, n) {
|
|
473
315
|
let r = C(e);
|
|
474
316
|
if (t !== r && !(e.settings?.locales ?? []).includes(t)) {
|
|
475
317
|
if (n?.missing === "default") t = r;
|
|
476
|
-
else throw new
|
|
318
|
+
else throw new ie(`This template has no "${t}" version.`, void 0, "unknown_locale");
|
|
477
319
|
}
|
|
478
320
|
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.")) ?
|
|
321
|
+
if (t !== r && be(e, t)) return [];
|
|
322
|
+
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
323
|
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(
|
|
324
|
+
}), a = m(xe(e.settings)), o = e.settings?.l10n?.[t];
|
|
483
325
|
if (t !== r && o) {
|
|
484
|
-
for (let [e, t] of
|
|
326
|
+
for (let [e, t] of ge(o.set)) b(a, e, t);
|
|
485
327
|
for (let [t, n] of Object.entries(o.text ?? {})) y(e.settings, t) !== void 0 && b(a, t, n.value);
|
|
486
328
|
}
|
|
487
329
|
return a.locale = t, {
|
|
@@ -489,7 +331,7 @@ function Pe(e, t, n) {
|
|
|
489
331
|
settings: a
|
|
490
332
|
};
|
|
491
333
|
}
|
|
492
|
-
function
|
|
334
|
+
function Ce(e, t, n = []) {
|
|
493
335
|
let r = {
|
|
494
336
|
translated: [],
|
|
495
337
|
missing: [],
|
|
@@ -503,7 +345,7 @@ function Fe(e, t, n = []) {
|
|
|
503
345
|
}
|
|
504
346
|
}, a = (e) => {
|
|
505
347
|
for (let r of e) {
|
|
506
|
-
if (
|
|
348
|
+
if (be(r, t)) continue;
|
|
507
349
|
let e = r.l10n?.[t];
|
|
508
350
|
i(r.id, r, x(r, n), e?.text);
|
|
509
351
|
let o = r.children;
|
|
@@ -513,34 +355,34 @@ function Fe(e, t, n = []) {
|
|
|
513
355
|
};
|
|
514
356
|
return a(e.blocks), i("settings", e.settings, [...g], e.settings?.l10n?.[t]?.text), r;
|
|
515
357
|
}
|
|
516
|
-
function
|
|
358
|
+
function we(e, t) {
|
|
517
359
|
if (t === C(e) || !e.settings.locales?.includes(t)) return [];
|
|
518
360
|
let n = [], r = (e) => {
|
|
519
|
-
for (let i of e)
|
|
361
|
+
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
362
|
};
|
|
521
363
|
return r(e.blocks), n;
|
|
522
364
|
}
|
|
523
|
-
function
|
|
365
|
+
function Te(e, t, n = []) {
|
|
524
366
|
if (t === C(e) || !e.settings.locales?.includes(t)) return [];
|
|
525
367
|
let r = [], i = (e, n, i) => {
|
|
526
|
-
r.push(...
|
|
368
|
+
r.push(...Ee(n, t, i).map((t) => `${e}/${t}`));
|
|
527
369
|
}, a = (e) => {
|
|
528
370
|
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
371
|
};
|
|
530
372
|
return a(e.blocks), i("settings", e.settings, g), r;
|
|
531
373
|
}
|
|
532
|
-
function
|
|
374
|
+
function Ee(e, t, n) {
|
|
533
375
|
let r = e.l10n?.[t];
|
|
534
376
|
return n.filter((t) => {
|
|
535
377
|
let n = y(e, t);
|
|
536
378
|
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
379
|
});
|
|
538
380
|
}
|
|
539
|
-
function
|
|
381
|
+
function De(e, t, n = {}) {
|
|
540
382
|
let r = C(e), i = (e, n, i) => {
|
|
541
|
-
let a =
|
|
383
|
+
let a = Ee(e, t, i), o = m(e.l10n ?? {}), s = o[t] ?? {}, c = m(e);
|
|
542
384
|
delete c.l10n;
|
|
543
|
-
for (let [e, t] of
|
|
385
|
+
for (let [e, t] of ge(s.set)) b(c, e, t);
|
|
544
386
|
for (let [t, n] of Object.entries(s.text ?? {})) y(e, t) !== void 0 && b(c, t, n.value);
|
|
545
387
|
delete o[t];
|
|
546
388
|
let l = {}, u = /* @__PURE__ */ new Set([
|
|
@@ -579,7 +421,7 @@ function ze(e, t, n = {}) {
|
|
|
579
421
|
};
|
|
580
422
|
for (let t of Object.values(o)) {
|
|
581
423
|
let n = m(e);
|
|
582
|
-
for (let [e, r] of
|
|
424
|
+
for (let [e, r] of ge(t.set)) b(n, e, r);
|
|
583
425
|
for (let [r, i] of Object.entries(t.text ?? {})) y(e, r) !== void 0 && b(n, r, i.value);
|
|
584
426
|
for (let [n, r] of Object.entries(t.text ?? {})) {
|
|
585
427
|
let i = y(c, n);
|
|
@@ -593,7 +435,7 @@ function ze(e, t, n = {}) {
|
|
|
593
435
|
}
|
|
594
436
|
return Object.keys(l).length && (d(l, e), o[r] = l), Object.keys(o).length && (c.l10n = o), c;
|
|
595
437
|
}, 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) :
|
|
438
|
+
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
439
|
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
440
|
}), o = i(e.settings, (e) => g.includes(e), g);
|
|
599
441
|
return o.locale = t, o.locales = e.settings.locales.map((e) => e === t ? r : e), {
|
|
@@ -602,12 +444,12 @@ function ze(e, t, n = {}) {
|
|
|
602
444
|
};
|
|
603
445
|
}
|
|
604
446
|
// ../types/src/operations.ts
|
|
605
|
-
var
|
|
606
|
-
function
|
|
607
|
-
let r = Object.fromEntries(
|
|
447
|
+
var Oe = "Sections with a wrapper cannot be placed inside wrappers.";
|
|
448
|
+
function ke(e, t, n = []) {
|
|
449
|
+
let r = Object.fromEntries(P(e.blocks).flatMap((e) => {
|
|
608
450
|
if (e.type !== "custom") return [];
|
|
609
451
|
let t = x(e, n).filter((t) => typeof y(e, t) == "string");
|
|
610
|
-
return t.length &&
|
|
452
|
+
return t.length && Fe.has(e.id) && E("invalid_operation", 0, Ie), t.length ? [[e.id, t]] : [];
|
|
611
453
|
}));
|
|
612
454
|
return {
|
|
613
455
|
op: "setDefaultLocale",
|
|
@@ -623,10 +465,10 @@ var w = class extends Error {
|
|
|
623
465
|
super(n), this.name = "OperationError", this.code = e, this.opIndex = t, r !== void 0 && (this.blockId = r);
|
|
624
466
|
}
|
|
625
467
|
};
|
|
626
|
-
function
|
|
468
|
+
function Ae(e) {
|
|
627
469
|
return e === "1" ? 1 : e === "3" || e === "1-2-1" ? 3 : e === "4" ? 4 : 2;
|
|
628
470
|
}
|
|
629
|
-
function
|
|
471
|
+
function je(e, t, n = {}) {
|
|
630
472
|
let r = m(e);
|
|
631
473
|
return T(r, t, n), r;
|
|
632
474
|
}
|
|
@@ -635,22 +477,22 @@ function T(e, t, n = {}) {
|
|
|
635
477
|
locks: n.locks ?? [],
|
|
636
478
|
session: n.session ?? null
|
|
637
479
|
};
|
|
638
|
-
t.forEach((t, n) =>
|
|
480
|
+
t.forEach((t, n) => et(e, t, n, r));
|
|
639
481
|
}
|
|
640
|
-
var
|
|
482
|
+
var Me = /* @__PURE__ */ new Set([
|
|
641
483
|
"id",
|
|
642
484
|
"type",
|
|
643
485
|
"children",
|
|
644
486
|
"l10n"
|
|
645
|
-
]),
|
|
487
|
+
]), Ne = /* @__PURE__ */ new Set(["locales", "l10n"]), Pe = /* @__PURE__ */ new Set([
|
|
646
488
|
"locale",
|
|
647
489
|
"locales",
|
|
648
490
|
"l10n"
|
|
649
|
-
]),
|
|
491
|
+
]), Fe = /* @__PURE__ */ new Set([
|
|
650
492
|
"__proto__",
|
|
651
493
|
"constructor",
|
|
652
494
|
"prototype"
|
|
653
|
-
]),
|
|
495
|
+
]), Ie = "customTextFields must map existing custom block ids to lists of string fieldValues paths.";
|
|
654
496
|
function E(e, t, n, r) {
|
|
655
497
|
throw new w(e, t, n, r);
|
|
656
498
|
}
|
|
@@ -660,14 +502,14 @@ function D(e) {
|
|
|
660
502
|
function O(e) {
|
|
661
503
|
return e.type === "section";
|
|
662
504
|
}
|
|
663
|
-
function
|
|
505
|
+
function Le(e) {
|
|
664
506
|
return Array.isArray(e.blocks) ? e.blocks : [];
|
|
665
507
|
}
|
|
666
|
-
function
|
|
508
|
+
function Re(e) {
|
|
667
509
|
let t = e.children;
|
|
668
510
|
return Array.isArray(t) ? t.map((e) => Array.isArray(e) ? e : []) : [];
|
|
669
511
|
}
|
|
670
|
-
function*
|
|
512
|
+
function* ze(e, t) {
|
|
671
513
|
for (let n = 0; n < e.length; n++) {
|
|
672
514
|
let r = e[n];
|
|
673
515
|
if (D(r) && (yield {
|
|
@@ -676,47 +518,47 @@ function* Xe(e, t) {
|
|
|
676
518
|
index: n,
|
|
677
519
|
parent: t
|
|
678
520
|
}, typeof r.id == "string")) {
|
|
679
|
-
if (O(r)) for (let [e, t] of
|
|
521
|
+
if (O(r)) for (let [e, t] of Re(r).entries()) yield* ze(t, {
|
|
680
522
|
sectionId: r.id,
|
|
681
523
|
column: e
|
|
682
524
|
});
|
|
683
|
-
else r.type === "wrapper" && Array.isArray(r.children) && (yield*
|
|
525
|
+
else r.type === "wrapper" && Array.isArray(r.children) && (yield* ze(r.children, { wrapperId: r.id }));
|
|
684
526
|
}
|
|
685
527
|
}
|
|
686
528
|
}
|
|
687
|
-
function
|
|
688
|
-
for (let n of
|
|
529
|
+
function k(e, t) {
|
|
530
|
+
for (let n of ze(Le(e), null)) if (n.block.id === t) return n;
|
|
689
531
|
return null;
|
|
690
532
|
}
|
|
691
|
-
function
|
|
533
|
+
function A(e) {
|
|
692
534
|
if (!D(e)) return [];
|
|
693
535
|
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
|
|
536
|
+
if (O(e)) for (let n of Re(e)) for (let e of Be(n)) t.push(e);
|
|
537
|
+
else if (e.type === "wrapper" && Array.isArray(e.children)) for (let n of Be(e.children)) t.push(n);
|
|
696
538
|
return t;
|
|
697
539
|
}
|
|
698
|
-
function
|
|
699
|
-
return e.flatMap(
|
|
540
|
+
function Be(e) {
|
|
541
|
+
return e.flatMap(A);
|
|
700
542
|
}
|
|
701
|
-
function
|
|
543
|
+
function j(e, t) {
|
|
702
544
|
return typeof e.blockId != "string" || e.blockId === "" ? E("invalid_operation", t, "blockId must be a block id.") : e.blockId;
|
|
703
545
|
}
|
|
704
|
-
function
|
|
546
|
+
function Ve(e, t) {
|
|
705
547
|
let n = e.parent;
|
|
706
548
|
return n === null ? null : D(n) && typeof n.sectionId == "string" && typeof n.column == "number" && Number.isInteger(n.column) ? {
|
|
707
549
|
sectionId: n.sectionId,
|
|
708
550
|
column: n.column
|
|
709
551
|
} : 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
552
|
}
|
|
711
|
-
function
|
|
553
|
+
function He(e, t) {
|
|
712
554
|
let n = e.after;
|
|
713
555
|
return n === null ? null : typeof n == "string" && n !== "" ? n : E("invalid_operation", t, "after must be null or a block id.");
|
|
714
556
|
}
|
|
715
|
-
function
|
|
557
|
+
function M(e, t) {
|
|
716
558
|
let n = e.expect;
|
|
717
559
|
return n == null ? null : D(n) ? n : E("invalid_operation", t, "expect must be an object.");
|
|
718
560
|
}
|
|
719
|
-
function
|
|
561
|
+
function Ue(e, t, n) {
|
|
720
562
|
let r = e.set ?? null, i = e.unset ?? [];
|
|
721
563
|
(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
564
|
let a = r === null ? {} : r, o = Object.keys(a).filter((e) => a[e] !== void 0);
|
|
@@ -728,50 +570,50 @@ function et(e, t, n) {
|
|
|
728
570
|
unset: i
|
|
729
571
|
};
|
|
730
572
|
}
|
|
731
|
-
function
|
|
573
|
+
function We(e, t, n) {
|
|
732
574
|
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
575
|
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)
|
|
576
|
+
for (let n of e.children) We(n, t, "wrapper");
|
|
735
577
|
return;
|
|
736
578
|
}
|
|
737
579
|
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,
|
|
580
|
+
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
581
|
let r = e.children;
|
|
740
582
|
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)
|
|
583
|
+
for (let e of r) for (let n of e) We(n, t, "column");
|
|
742
584
|
}
|
|
743
|
-
function
|
|
585
|
+
function N(e, t) {
|
|
744
586
|
return e.session === null || t.sessionId !== e.session;
|
|
745
587
|
}
|
|
746
|
-
function
|
|
747
|
-
let r = e.locks.find((n) => t.includes(n.blockId) &&
|
|
588
|
+
function Ge(e, t, n) {
|
|
589
|
+
let r = e.locks.find((n) => t.includes(n.blockId) && N(e, n));
|
|
748
590
|
r && E("lock_held", n, `Block "${r.blockId}" is being edited in another session.`, r.blockId);
|
|
749
591
|
}
|
|
750
|
-
function
|
|
751
|
-
e.locks.find((r) =>
|
|
592
|
+
function Ke(e, t, n, r) {
|
|
593
|
+
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
594
|
}
|
|
753
|
-
function
|
|
595
|
+
function qe(e, t, n, r) {
|
|
754
596
|
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
597
|
}
|
|
756
|
-
function
|
|
598
|
+
function Je(e, t, n) {
|
|
757
599
|
if (t === null) return Array.isArray(e.blocks) || (e.blocks = []), e.blocks;
|
|
758
600
|
if ("wrapperId" in t) {
|
|
759
|
-
let r =
|
|
601
|
+
let r = k(e, t.wrapperId);
|
|
760
602
|
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
603
|
}
|
|
762
|
-
let r =
|
|
604
|
+
let r = k(e, t.sectionId);
|
|
763
605
|
if (!r) return E("block_missing", n, `No section with id "${t.sectionId}".`, t.sectionId);
|
|
764
606
|
if (!O(r.block)) return E("invalid_operation", n, `Block "${t.sectionId}" isn't a section.`);
|
|
765
607
|
let i = r.block.children;
|
|
766
608
|
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
609
|
}
|
|
768
|
-
function
|
|
610
|
+
function Ye(e, t, n) {
|
|
769
611
|
if (t === null) return 0;
|
|
770
612
|
let r = e.findIndex((e) => D(e) && e.id === t);
|
|
771
613
|
return r === -1 ? E("anchor_missing", n, `No block "${t}" in the target container.`, t) : r + 1;
|
|
772
614
|
}
|
|
773
|
-
function
|
|
774
|
-
let i =
|
|
615
|
+
function Xe(e, t, n, r) {
|
|
616
|
+
let i = Ae(t), a = Array.isArray(e.children) ? e.children : [];
|
|
775
617
|
for (let e = i; e < a.length; e++) {
|
|
776
618
|
let t = a[e];
|
|
777
619
|
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 +622,7 @@ function st(e, t, n, r) {
|
|
|
780
622
|
for (; o.length < i;) o.push([]);
|
|
781
623
|
e.children = o;
|
|
782
624
|
}
|
|
783
|
-
function
|
|
625
|
+
function Ze(e, t, n) {
|
|
784
626
|
for (let [n, r] of Object.entries(t)) n === "__proto__" ? Object.defineProperty(e, n, {
|
|
785
627
|
value: m(r),
|
|
786
628
|
writable: !0,
|
|
@@ -789,8 +631,8 @@ function ct(e, t, n) {
|
|
|
789
631
|
}) : e[n] = m(r);
|
|
790
632
|
for (let t of n) delete e[t];
|
|
791
633
|
}
|
|
792
|
-
function
|
|
793
|
-
return
|
|
634
|
+
function Qe(e) {
|
|
635
|
+
return ne(e).map((t) => {
|
|
794
636
|
let n = t.path.replace(/\.(items|icons|rows)\[.*$/, "").replace(/\[(\d+)\]/g, ".$1").split(".").reduce((e, t) => e[t], e);
|
|
795
637
|
return {
|
|
796
638
|
id: t.id,
|
|
@@ -798,113 +640,113 @@ function lt(e) {
|
|
|
798
640
|
};
|
|
799
641
|
});
|
|
800
642
|
}
|
|
801
|
-
function
|
|
802
|
-
let r = ({ id: e, blockId: t }) => JSON.stringify([t ?? null, e]), i = new Set(n ?
|
|
643
|
+
function $e(e, t, n) {
|
|
644
|
+
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
645
|
a && E("invalid_operation", t, `Element id "${a.id}" must not contain "." or "/".`, a.blockId);
|
|
804
646
|
}
|
|
805
|
-
function
|
|
647
|
+
function et(e, t, n, r) {
|
|
806
648
|
let i = t;
|
|
807
649
|
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
|
|
650
|
+
case "addBlock": return tt(e, i, n);
|
|
651
|
+
case "moveBlock": return nt(e, i, n, r);
|
|
652
|
+
case "deleteBlock": return rt(e, i, n, r);
|
|
653
|
+
case "updateBlock": return it(e, i, n, r);
|
|
654
|
+
case "updateSettings": return at(e, i, n);
|
|
655
|
+
case "setContent": return bt(e, i, n, r);
|
|
656
|
+
case "setDefaultLocale": return xt(e, i, n, r);
|
|
657
|
+
case "addLocale": return ct(e, i, n);
|
|
658
|
+
case "removeLocale": return ut(e, i, n);
|
|
659
|
+
case "updateBlockLocale": return vt(e, i, n, r);
|
|
660
|
+
case "updateSettingsLocale": return yt(e, i, n);
|
|
819
661
|
default: E("invalid_operation", n, `Unknown operation "${i.op}".`);
|
|
820
662
|
}
|
|
821
663
|
}
|
|
822
|
-
function
|
|
823
|
-
let r =
|
|
824
|
-
|
|
664
|
+
function tt(e, t, n) {
|
|
665
|
+
let r = Ve(t, n), i = He(t, n), a = t.block;
|
|
666
|
+
We(a, n, r === null ? "root" : "wrapperId" in r ? "wrapper" : "column"), $e({
|
|
825
667
|
blocks: [a],
|
|
826
668
|
settings: e.settings
|
|
827
669
|
}, n);
|
|
828
|
-
let o = new Set(
|
|
829
|
-
for (let e of
|
|
830
|
-
let c =
|
|
831
|
-
|
|
670
|
+
let o = new Set(Be(Le(e))), s = /* @__PURE__ */ new Set();
|
|
671
|
+
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);
|
|
672
|
+
let c = Je(e, r, n), l = Ye(c, i, n);
|
|
673
|
+
_t(e, a, r, n, !0), c.splice(l, 0, m(a));
|
|
832
674
|
}
|
|
833
|
-
function
|
|
834
|
-
let i =
|
|
675
|
+
function nt(e, t, n, r) {
|
|
676
|
+
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
677
|
if (!l) return E("block_missing", n, `No block with id "${i}".`, i);
|
|
836
|
-
if (
|
|
678
|
+
if (Ge(r, A(l.block), n), s) {
|
|
837
679
|
let e = l.index > 0 ? l.list[l.index - 1] : null, t = D(e) ? e.id ?? null : null;
|
|
838
680
|
h(l.parent, c) && h(t, s.after ?? null) || E("precondition_failed", n, `Block "${i}" has moved since.`, i);
|
|
839
681
|
}
|
|
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
|
-
|
|
682
|
+
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.");
|
|
683
|
+
let u = Je(e, a, n);
|
|
684
|
+
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
685
|
}
|
|
844
|
-
function
|
|
845
|
-
let i =
|
|
686
|
+
function rt(e, t, n, r) {
|
|
687
|
+
let i = j(t, n), a = M(t, n), o = k(e, i);
|
|
846
688
|
if (!o) return E("block_missing", n, `No block with id "${i}".`, i);
|
|
847
|
-
|
|
689
|
+
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
690
|
}
|
|
849
|
-
function
|
|
850
|
-
let i =
|
|
691
|
+
function it(e, t, n, r) {
|
|
692
|
+
let i = j(t, n), { set: a, unset: o } = Ue(t, n, Me), s = M(t, n), c = k(e, i);
|
|
851
693
|
if (!c) return E("block_missing", n, `No block with id "${i}".`, i);
|
|
852
694
|
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."),
|
|
695
|
+
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
696
|
let d = { ...l };
|
|
855
|
-
|
|
697
|
+
Ze(d, a, o), $e({
|
|
856
698
|
blocks: [d],
|
|
857
699
|
settings: e.settings
|
|
858
700
|
}, n, {
|
|
859
701
|
blocks: [l],
|
|
860
702
|
settings: e.settings
|
|
861
|
-
}), u && Object.hasOwn(a, "columns") &&
|
|
862
|
-
let f =
|
|
703
|
+
}), u && Object.hasOwn(a, "columns") && Xe(l, a.columns, n, i), Ze(l, a, o);
|
|
704
|
+
let f = ue(l);
|
|
863
705
|
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
706
|
}
|
|
865
|
-
function
|
|
866
|
-
let { set: r, unset: i } =
|
|
707
|
+
function at(e, t, n) {
|
|
708
|
+
let { set: r, unset: i } = Ue(t, n, Ne), a = M(t, n);
|
|
867
709
|
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
710
|
let o = e.settings;
|
|
869
|
-
a &&
|
|
870
|
-
let s =
|
|
711
|
+
a && qe(o, a, n), Ze(o, r, i);
|
|
712
|
+
let s = fe(e.settings);
|
|
871
713
|
h(o.l10n, s.l10n) || (s.l10n ? o.l10n = s.l10n : delete o.l10n);
|
|
872
714
|
}
|
|
873
|
-
function
|
|
715
|
+
function ot(e, t) {
|
|
874
716
|
let n = e.locale;
|
|
875
|
-
return
|
|
717
|
+
return oe(n) && n !== "__proto__" && n !== "constructor" && n !== "prototype" || E("invalid_operation", t, "locale must be a language tag."), n;
|
|
876
718
|
}
|
|
877
|
-
function
|
|
878
|
-
let r =
|
|
719
|
+
function st(e, t, n) {
|
|
720
|
+
let r = ot(t, n);
|
|
879
721
|
return e.settings.locales?.includes(r) || E("invalid_operation", n, `Locale "${r}" isn't in settings.locales.`), r;
|
|
880
722
|
}
|
|
881
|
-
function
|
|
882
|
-
let r =
|
|
723
|
+
function ct(e, t, n) {
|
|
724
|
+
let r = ot(t, n), i = e.settings.locales ?? [], a = r.toLowerCase(), o = t.position === void 0 ? i.length : t.position;
|
|
883
725
|
(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
726
|
}
|
|
885
|
-
function
|
|
886
|
-
return e.flatMap((e) => D(e) ? [e, ...O(e) ?
|
|
727
|
+
function P(e) {
|
|
728
|
+
return e.flatMap((e) => D(e) ? [e, ...O(e) ? Re(e).flatMap(P) : e.type === "wrapper" && Array.isArray(e.children) ? P(e.children) : []] : []);
|
|
887
729
|
}
|
|
888
|
-
function
|
|
730
|
+
function lt(e, t) {
|
|
889
731
|
let n = e.l10n;
|
|
890
732
|
return D(n) && D(n[t]) ? n[t] : {};
|
|
891
733
|
}
|
|
892
|
-
function
|
|
893
|
-
let r =
|
|
734
|
+
function ut(e, t, n) {
|
|
735
|
+
let r = st(e, t, n), i = M(t, n);
|
|
894
736
|
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 =
|
|
737
|
+
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
738
|
!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
739
|
for (let e of [...o, a]) D(e.l10n) && (delete e.l10n[r], Object.keys(e.l10n).length === 0 && delete e.l10n);
|
|
898
740
|
e.settings.locales.splice(e.settings.locales.indexOf(r), 1), e.settings.locales.length === 0 && delete e.settings.locales;
|
|
899
741
|
}
|
|
900
|
-
function
|
|
742
|
+
function dt(e, t, n) {
|
|
901
743
|
(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
744
|
"text",
|
|
903
745
|
"set",
|
|
904
746
|
"unset",
|
|
905
747
|
...n ? [] : ["hidden"]
|
|
906
748
|
].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 =
|
|
749
|
+
let r = M(e, t);
|
|
908
750
|
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
751
|
text: e.text ?? {},
|
|
910
752
|
set: e.set ?? {},
|
|
@@ -913,20 +755,20 @@ function St(e, t, n) {
|
|
|
913
755
|
expect: r
|
|
914
756
|
};
|
|
915
757
|
}
|
|
916
|
-
function
|
|
917
|
-
for (let i of Object.keys(t.text)) v(i) && (r ? g.includes(i) :
|
|
758
|
+
function ft(e, t, n, r) {
|
|
759
|
+
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
760
|
for (let i of Object.keys(t.set)) {
|
|
919
|
-
let a = i.split("."), o = r ?
|
|
920
|
-
(!v(i) || o.has(a[0]) || !r &&
|
|
761
|
+
let a = i.split("."), o = r ? Pe : Me, s = a.length === 1 ? e : y(e, a.slice(0, -1).join("."));
|
|
762
|
+
(!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
763
|
}
|
|
922
764
|
}
|
|
923
|
-
function
|
|
765
|
+
function pt(e, t, n, r) {
|
|
924
766
|
if (t) {
|
|
925
767
|
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
768
|
t.hidden !== void 0 && !h(e.hidden === !0, t.hidden) && E("precondition_failed", n, "The locale's hidden state has changed since.", r);
|
|
927
769
|
}
|
|
928
770
|
}
|
|
929
|
-
function
|
|
771
|
+
function mt(e, t, n) {
|
|
930
772
|
D(e.l10n) || (e.l10n = {});
|
|
931
773
|
let r = e.l10n, i = Object.prototype.hasOwnProperty.call(r, t) ? r[t] : void 0, a = D(i) ? i : {};
|
|
932
774
|
a !== i && (r[t] = a);
|
|
@@ -935,65 +777,327 @@ function Tt(e, t, n) {
|
|
|
935
777
|
for (let [e, t] of Object.entries(n.set)) a.set ||= {}, a.set[e] = m(t), a.text && delete a.text[e];
|
|
936
778
|
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
779
|
}
|
|
938
|
-
function
|
|
939
|
-
return D(e) ? e.type === "slot" || Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(
|
|
780
|
+
function F(e) {
|
|
781
|
+
return D(e) ? e.type === "slot" || Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(F) : F(e)) : !1;
|
|
940
782
|
}
|
|
941
|
-
function
|
|
783
|
+
function ht(e) {
|
|
942
784
|
return D(e) && D(e.l10n) && Object.values(e.l10n).some((e) => D(e) && e.hidden === !0);
|
|
943
785
|
}
|
|
944
|
-
function
|
|
945
|
-
return !D(e) || !
|
|
786
|
+
function gt(e) {
|
|
787
|
+
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
788
|
}
|
|
947
|
-
function
|
|
948
|
-
if (!
|
|
789
|
+
function _t(e, t, n, r, i) {
|
|
790
|
+
if (!F(t)) return;
|
|
949
791
|
let a = n, o = !1;
|
|
950
792
|
for (; a !== null;) {
|
|
951
|
-
let t =
|
|
793
|
+
let t = k(e, "wrapperId" in a ? a.wrapperId : a.sectionId);
|
|
952
794
|
if (!t) break;
|
|
953
|
-
|
|
795
|
+
ht(t.block) && (o = !0), a = t.parent;
|
|
954
796
|
}
|
|
955
|
-
(o || i &&
|
|
797
|
+
(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
798
|
}
|
|
957
|
-
function
|
|
958
|
-
let i =
|
|
959
|
-
s || E("block_missing", n, `No block with id "${a}".`, a),
|
|
799
|
+
function vt(e, t, n, r) {
|
|
800
|
+
let i = st(e, t, n), a = j(t, n), o = dt(t, n, !1), s = P(Le(e)).find((e) => e.id === a);
|
|
801
|
+
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
802
|
}
|
|
961
|
-
function
|
|
962
|
-
let r =
|
|
963
|
-
|
|
803
|
+
function yt(e, t, n) {
|
|
804
|
+
let r = st(e, t, n), i = dt(t, n, !0), a = e.settings;
|
|
805
|
+
ft(a, i, n, !0), pt(lt(a, r), i.expect, n), mt(a, r, i);
|
|
964
806
|
}
|
|
965
|
-
function
|
|
807
|
+
function bt(e, t, n, r) {
|
|
966
808
|
let i = t.content;
|
|
967
809
|
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) =>
|
|
810
|
+
$e(i, n, e);
|
|
811
|
+
let a = r.locks.find((e) => N(r, e));
|
|
970
812
|
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
813
|
}
|
|
972
|
-
function
|
|
973
|
-
let i =
|
|
814
|
+
function xt(e, t, n, r) {
|
|
815
|
+
let i = ot(t, n);
|
|
974
816
|
e.settings.locales?.includes(i) || E("invalid_operation", n, `"${i}" is not a language version of this template.`);
|
|
975
|
-
let a =
|
|
817
|
+
let a = we(e, i);
|
|
976
818
|
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) =>
|
|
819
|
+
let o = r.locks.find((e) => N(r, e));
|
|
978
820
|
o && E("locked_by_others", n, "Other sessions hold locks on this template.", o.blockId);
|
|
979
821
|
let s = t.customTextFields;
|
|
980
822
|
if (s !== void 0) {
|
|
981
|
-
let t =
|
|
823
|
+
let t = P(e.blocks);
|
|
982
824
|
(!D(s) || Object.getOwnPropertyNames(s).some((e) => {
|
|
983
|
-
if (
|
|
825
|
+
if (Fe.has(e)) return !0;
|
|
984
826
|
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,
|
|
827
|
+
return r?.type !== "custom" || !Array.isArray(n) || n.some((e) => typeof e != "string" || !v(e) || !me("custom", e) || typeof y(r, e) != "string");
|
|
828
|
+
})) && E("invalid_operation", n, Ie);
|
|
987
829
|
}
|
|
988
|
-
let c =
|
|
830
|
+
let c = De(e, i, t.customTextFields);
|
|
989
831
|
e.blocks = c.blocks, e.settings = c.settings;
|
|
990
832
|
}
|
|
991
|
-
// ../types/src/
|
|
833
|
+
// ../types/src/columns.ts
|
|
834
|
+
var St = {
|
|
835
|
+
1: [100],
|
|
836
|
+
2: [50, 50],
|
|
837
|
+
3: [
|
|
838
|
+
33.33,
|
|
839
|
+
33.33,
|
|
840
|
+
33.34
|
|
841
|
+
],
|
|
842
|
+
4: [
|
|
843
|
+
25,
|
|
844
|
+
25,
|
|
845
|
+
25,
|
|
846
|
+
25
|
|
847
|
+
],
|
|
848
|
+
"1-2": [33.33, 66.67],
|
|
849
|
+
"2-1": [66.67, 33.33],
|
|
850
|
+
"1-3": [25, 75],
|
|
851
|
+
"3-1": [75, 25],
|
|
852
|
+
"1-2-1": [
|
|
853
|
+
25,
|
|
854
|
+
50,
|
|
855
|
+
25
|
|
856
|
+
]
|
|
857
|
+
};
|
|
858
|
+
function Ct(e) {
|
|
859
|
+
return Object.hasOwn(St, e) ? St[e] : [100];
|
|
860
|
+
}
|
|
861
|
+
function wt(e) {
|
|
862
|
+
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
863
|
+
}
|
|
864
|
+
function Tt(e) {
|
|
865
|
+
let t = e.columnWidths;
|
|
866
|
+
if (t === void 0) return null;
|
|
867
|
+
if (!Array.isArray(t)) return "value";
|
|
868
|
+
if (t.length !== Ae(e.columns)) return "count";
|
|
869
|
+
for (let e = 0; e < t.length; e++) if (!wt(t[e])) return "value";
|
|
870
|
+
return null;
|
|
871
|
+
}
|
|
872
|
+
var Et = 0xe8d4a51000, Dt = 1e4;
|
|
873
|
+
function Ot(e) {
|
|
874
|
+
let t = e.length, n = 0;
|
|
875
|
+
for (let r = 0; r < t; r++) {
|
|
876
|
+
let t = e[r];
|
|
877
|
+
t > n && (n = t);
|
|
878
|
+
}
|
|
879
|
+
let r = [], i = 0n;
|
|
880
|
+
for (let a = 0; a < t; a++) {
|
|
881
|
+
let t = BigInt(Math.round(e[a] / n * Et));
|
|
882
|
+
r.push(t), i += t;
|
|
883
|
+
}
|
|
884
|
+
let a = [], o = [], s = BigInt(Dt);
|
|
885
|
+
for (let e = 0; e < t; e++) {
|
|
886
|
+
let t = r[e] * s;
|
|
887
|
+
a.push(Number(t / i)), o.push(t % i);
|
|
888
|
+
}
|
|
889
|
+
for (let e = 0; e < t; e++) a[e] < 1 && (a[e] = 1);
|
|
890
|
+
let c = 0;
|
|
891
|
+
for (let e = 0; e < t; e++) c += a[e];
|
|
892
|
+
let l = Dt - c, u = Array.from({ length: t }, (e, t) => t);
|
|
893
|
+
if (l > 0) {
|
|
894
|
+
u.sort((e, t) => o[e] === o[t] ? e - t : o[e] > o[t] ? -1 : 1);
|
|
895
|
+
for (let e = 0; e < l; e++) a[u[e]] += 1;
|
|
896
|
+
} else if (l < 0) {
|
|
897
|
+
u.sort((e, t) => o[e] === o[t] ? t - e : o[e] < o[t] ? -1 : 1);
|
|
898
|
+
let e = -l;
|
|
899
|
+
for (let t of u) {
|
|
900
|
+
if (e === 0) break;
|
|
901
|
+
let n = a[t] - 1;
|
|
902
|
+
if (n <= 0) continue;
|
|
903
|
+
let r = Math.min(n, e);
|
|
904
|
+
a[t] = a[t] - r, e -= r;
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
return a.map((e) => e / 100);
|
|
908
|
+
}
|
|
909
|
+
function kt(e) {
|
|
910
|
+
return e.columnWidths !== void 0 && Tt(e) === null ? Ot(e.columnWidths) : [...Ct(e.columns)];
|
|
911
|
+
}
|
|
912
|
+
// ../types/src/background-image.ts
|
|
913
|
+
var At = [
|
|
914
|
+
"cover",
|
|
915
|
+
"contain",
|
|
916
|
+
"auto"
|
|
917
|
+
], jt = [
|
|
918
|
+
"left",
|
|
919
|
+
"center",
|
|
920
|
+
"right"
|
|
921
|
+
], Mt = [
|
|
922
|
+
"top",
|
|
923
|
+
"center",
|
|
924
|
+
"bottom"
|
|
925
|
+
];
|
|
992
926
|
function Nt(e) {
|
|
927
|
+
return {
|
|
928
|
+
url: e,
|
|
929
|
+
size: "cover",
|
|
930
|
+
position: {
|
|
931
|
+
x: "center",
|
|
932
|
+
y: "center"
|
|
933
|
+
},
|
|
934
|
+
repeat: !1
|
|
935
|
+
};
|
|
936
|
+
}
|
|
937
|
+
function Pt(e) {
|
|
938
|
+
let t = "";
|
|
939
|
+
for (let n of e) {
|
|
940
|
+
let e = n.charCodeAt(0);
|
|
941
|
+
t += e < 32 || e === 127 || n === "'" || n === "\"" || n === "\\" ? `%${e.toString(16).toUpperCase().padStart(2, "0")}` : n;
|
|
942
|
+
}
|
|
943
|
+
return t;
|
|
944
|
+
}
|
|
945
|
+
function Ft(e) {
|
|
946
|
+
let t = typeof e?.url == "string" ? e.url.trim() : "";
|
|
947
|
+
if (!e || !t) return null;
|
|
948
|
+
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";
|
|
949
|
+
return {
|
|
950
|
+
url: Pt(t),
|
|
951
|
+
size: n,
|
|
952
|
+
position: `${i} ${a}`,
|
|
953
|
+
repeat: e.repeat ? "repeat" : "no-repeat"
|
|
954
|
+
};
|
|
955
|
+
}
|
|
956
|
+
// ../types/src/hero.ts
|
|
957
|
+
var It = [
|
|
958
|
+
"top",
|
|
959
|
+
"middle",
|
|
960
|
+
"bottom"
|
|
961
|
+
];
|
|
962
|
+
function Lt(e) {
|
|
963
|
+
let t = e.hero;
|
|
964
|
+
if (!t || typeof t != "object") return null;
|
|
965
|
+
if (e.columns !== "1") return {
|
|
966
|
+
applied: !1,
|
|
967
|
+
reason: "columns"
|
|
968
|
+
};
|
|
969
|
+
let n = Ft(e.backgroundImage);
|
|
970
|
+
if (n === null) return {
|
|
971
|
+
applied: !1,
|
|
972
|
+
reason: "image"
|
|
973
|
+
};
|
|
974
|
+
let r = zt(e.backgroundImage), i = Rt(t.height) ? Math.round(t.height) : "image";
|
|
975
|
+
return i === "image" && r === null ? {
|
|
976
|
+
applied: !1,
|
|
977
|
+
reason: "size"
|
|
978
|
+
} : {
|
|
979
|
+
applied: !0,
|
|
980
|
+
image: n,
|
|
981
|
+
height: i,
|
|
982
|
+
verticalAlign: It.includes(t.verticalAlign) ? t.verticalAlign : "middle",
|
|
983
|
+
aspectRatio: r
|
|
984
|
+
};
|
|
985
|
+
}
|
|
986
|
+
function Rt(e) {
|
|
987
|
+
return typeof e == "number" && Number.isFinite(e) && e >= 1;
|
|
988
|
+
}
|
|
989
|
+
function zt(e) {
|
|
990
|
+
let t = e?.naturalWidth, n = e?.naturalHeight;
|
|
991
|
+
return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0 ? null : n / t;
|
|
992
|
+
}
|
|
993
|
+
// ../types/src/social.ts
|
|
994
|
+
var Bt = {
|
|
995
|
+
facebook: {
|
|
996
|
+
color: "#1877F2",
|
|
997
|
+
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"
|
|
998
|
+
},
|
|
999
|
+
twitter: {
|
|
1000
|
+
color: "#000000",
|
|
1001
|
+
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"
|
|
1002
|
+
},
|
|
1003
|
+
instagram: {
|
|
1004
|
+
color: "#E4405F",
|
|
1005
|
+
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"
|
|
1006
|
+
},
|
|
1007
|
+
linkedin: {
|
|
1008
|
+
color: "#0A66C2",
|
|
1009
|
+
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"
|
|
1010
|
+
},
|
|
1011
|
+
xing: {
|
|
1012
|
+
color: "#006567",
|
|
1013
|
+
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"
|
|
1014
|
+
},
|
|
1015
|
+
youtube: {
|
|
1016
|
+
color: "#FF0000",
|
|
1017
|
+
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"
|
|
1018
|
+
},
|
|
1019
|
+
tiktok: {
|
|
1020
|
+
color: "#000000",
|
|
1021
|
+
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"
|
|
1022
|
+
},
|
|
1023
|
+
pinterest: {
|
|
1024
|
+
color: "#BD081C",
|
|
1025
|
+
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"
|
|
1026
|
+
},
|
|
1027
|
+
email: {
|
|
1028
|
+
color: "#6B7280",
|
|
1029
|
+
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"
|
|
1030
|
+
},
|
|
1031
|
+
website: {
|
|
1032
|
+
color: "#6B7280",
|
|
1033
|
+
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"
|
|
1034
|
+
},
|
|
1035
|
+
whatsapp: {
|
|
1036
|
+
color: "#25D366",
|
|
1037
|
+
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"
|
|
1038
|
+
},
|
|
1039
|
+
telegram: {
|
|
1040
|
+
color: "#26A5E4",
|
|
1041
|
+
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"
|
|
1042
|
+
},
|
|
1043
|
+
discord: {
|
|
1044
|
+
color: "#5865F2",
|
|
1045
|
+
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"
|
|
1046
|
+
},
|
|
1047
|
+
snapchat: {
|
|
1048
|
+
color: "#FFFC00",
|
|
1049
|
+
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"
|
|
1050
|
+
},
|
|
1051
|
+
reddit: {
|
|
1052
|
+
color: "#FF4500",
|
|
1053
|
+
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"
|
|
1054
|
+
},
|
|
1055
|
+
github: {
|
|
1056
|
+
color: "#181717",
|
|
1057
|
+
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"
|
|
1058
|
+
},
|
|
1059
|
+
dribbble: {
|
|
1060
|
+
color: "#EA4C89",
|
|
1061
|
+
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"
|
|
1062
|
+
},
|
|
1063
|
+
behance: {
|
|
1064
|
+
color: "#1769FF",
|
|
1065
|
+
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"
|
|
1066
|
+
}
|
|
1067
|
+
}, Vt = {
|
|
1068
|
+
dark: "#1f1f1f",
|
|
1069
|
+
light: "#ffffff"
|
|
1070
|
+
};
|
|
1071
|
+
function Ht(e) {
|
|
1072
|
+
return e === "dark" || e === "light" ? e : void 0;
|
|
1073
|
+
}
|
|
1074
|
+
function Ut(e, t) {
|
|
1075
|
+
let n = Ht(t);
|
|
1076
|
+
return {
|
|
1077
|
+
fill: n ? Vt[n] : Bt[e].color,
|
|
1078
|
+
onFill: n === "light" ? Vt.dark : "#ffffff"
|
|
1079
|
+
};
|
|
1080
|
+
}
|
|
1081
|
+
function Wt(e, t) {
|
|
1082
|
+
let n = Ht(t);
|
|
1083
|
+
return n ? `${e}-${n}` : e;
|
|
1084
|
+
}
|
|
1085
|
+
function Gt(e, t) {
|
|
1086
|
+
if (Ht(t) === "dark" && (e === "plain" || e === "outlined")) return {
|
|
1087
|
+
color: Vt.light,
|
|
1088
|
+
opacity: .6,
|
|
1089
|
+
width: 1.4
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
function Kt(e) {
|
|
1093
|
+
return e === "plain" ? .84 : .6;
|
|
1094
|
+
}
|
|
1095
|
+
// ../types/src/invert-operations.ts
|
|
1096
|
+
function qt(e) {
|
|
993
1097
|
let t = e.children;
|
|
994
1098
|
return e.type === "section" && Array.isArray(t) ? t : [];
|
|
995
1099
|
}
|
|
996
|
-
function
|
|
1100
|
+
function Jt(e, t, n = null) {
|
|
997
1101
|
for (let r = 0; r < e.length; r++) {
|
|
998
1102
|
let i = e[r];
|
|
999
1103
|
if (i.id === t) return {
|
|
@@ -1001,28 +1105,28 @@ function Pt(e, t, n = null) {
|
|
|
1001
1105
|
parent: n,
|
|
1002
1106
|
after: r > 0 ? e[r - 1].id : null
|
|
1003
1107
|
};
|
|
1004
|
-
let a =
|
|
1108
|
+
let a = qt(i);
|
|
1005
1109
|
for (let e = 0; e < a.length; e++) {
|
|
1006
1110
|
if (!Array.isArray(a[e])) continue;
|
|
1007
|
-
let n =
|
|
1111
|
+
let n = Jt(a[e], t, {
|
|
1008
1112
|
sectionId: i.id,
|
|
1009
1113
|
column: e
|
|
1010
1114
|
});
|
|
1011
1115
|
if (n) return n;
|
|
1012
1116
|
}
|
|
1013
1117
|
if (i.type === "wrapper" && Array.isArray(i.children)) {
|
|
1014
|
-
let e =
|
|
1118
|
+
let e = Jt(i.children, t, { wrapperId: i.id });
|
|
1015
1119
|
if (e) return e;
|
|
1016
1120
|
}
|
|
1017
1121
|
}
|
|
1018
1122
|
return null;
|
|
1019
1123
|
}
|
|
1020
|
-
function
|
|
1021
|
-
let r =
|
|
1124
|
+
function Yt(e, t, n) {
|
|
1125
|
+
let r = Jt(e.blocks, t);
|
|
1022
1126
|
if (!r) throw new w("block_missing", n, `No block with id "${t}".`, t);
|
|
1023
1127
|
return r;
|
|
1024
1128
|
}
|
|
1025
|
-
function
|
|
1129
|
+
function Xt(e, t, n) {
|
|
1026
1130
|
let r = {}, i = [], a = {}, o = [.../* @__PURE__ */ new Set([...Object.keys(t ?? {}), ...n ?? []])];
|
|
1027
1131
|
for (let n of o) {
|
|
1028
1132
|
let o = e[n];
|
|
@@ -1036,10 +1140,10 @@ function It(e, t, n) {
|
|
|
1036
1140
|
expect: a
|
|
1037
1141
|
};
|
|
1038
1142
|
}
|
|
1039
|
-
function
|
|
1143
|
+
function I(e, t) {
|
|
1040
1144
|
return e.l10n?.[t] ?? {};
|
|
1041
1145
|
}
|
|
1042
|
-
function
|
|
1146
|
+
function L(e, t, n, r) {
|
|
1043
1147
|
let i = {}, a = {}, o = {};
|
|
1044
1148
|
n.length && (o.text = {}, o.set = {});
|
|
1045
1149
|
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 +1155,21 @@ function R(e, t, n, r) {
|
|
|
1051
1155
|
expect: o
|
|
1052
1156
|
};
|
|
1053
1157
|
}
|
|
1054
|
-
function
|
|
1055
|
-
let { unset: t, ...n } =
|
|
1158
|
+
function Zt(e) {
|
|
1159
|
+
let { unset: t, ...n } = L(e, {}, [.../* @__PURE__ */ new Set([...Object.keys(e.text ?? {}), ...Object.keys(e.set ?? {})])], e.hidden === !0);
|
|
1056
1160
|
return n;
|
|
1057
1161
|
}
|
|
1058
|
-
function
|
|
1059
|
-
return e.flatMap((e) => [e, ...e.type === "wrapper" ?
|
|
1162
|
+
function R(e) {
|
|
1163
|
+
return e.flatMap((e) => [e, ...e.type === "wrapper" ? R(e.children) : qt(e).flatMap(R)]);
|
|
1060
1164
|
}
|
|
1061
|
-
function
|
|
1165
|
+
function Qt(e, t) {
|
|
1062
1166
|
let n = m(e);
|
|
1063
1167
|
T(n, [t]);
|
|
1064
1168
|
let r = [], i = (e, t, n) => {
|
|
1065
1169
|
for (let [i, a] of Object.entries(e.l10n ?? {})) {
|
|
1066
1170
|
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
1171
|
if (!o.length) continue;
|
|
1068
|
-
let s =
|
|
1172
|
+
let s = L(a, e, o, !1);
|
|
1069
1173
|
r.push(n === void 0 ? {
|
|
1070
1174
|
op: "updateSettingsLocale",
|
|
1071
1175
|
locale: i,
|
|
@@ -1080,15 +1184,15 @@ function Rt(e, t) {
|
|
|
1080
1184
|
};
|
|
1081
1185
|
if (t.op === "updateSettings") i(e.settings, n.settings);
|
|
1082
1186
|
else {
|
|
1083
|
-
let t = new Map(
|
|
1084
|
-
for (let n of
|
|
1187
|
+
let t = new Map(R(n.blocks).map((e) => [e.id, e]));
|
|
1188
|
+
for (let n of R(e.blocks)) {
|
|
1085
1189
|
let e = t.get(n.id);
|
|
1086
1190
|
e && i(n, e, n.id);
|
|
1087
1191
|
}
|
|
1088
1192
|
}
|
|
1089
1193
|
return r;
|
|
1090
1194
|
}
|
|
1091
|
-
function
|
|
1195
|
+
function $t(e, t, n) {
|
|
1092
1196
|
switch (t.op) {
|
|
1093
1197
|
case "addBlock": return {
|
|
1094
1198
|
op: "deleteBlock",
|
|
@@ -1096,7 +1200,7 @@ function zt(e, t, n) {
|
|
|
1096
1200
|
expect: { block: m(t.block) }
|
|
1097
1201
|
};
|
|
1098
1202
|
case "deleteBlock": {
|
|
1099
|
-
let r =
|
|
1203
|
+
let r = Yt(e, t.blockId, n);
|
|
1100
1204
|
return {
|
|
1101
1205
|
op: "addBlock",
|
|
1102
1206
|
block: m(r.block),
|
|
@@ -1105,7 +1209,7 @@ function zt(e, t, n) {
|
|
|
1105
1209
|
};
|
|
1106
1210
|
}
|
|
1107
1211
|
case "moveBlock": {
|
|
1108
|
-
let r =
|
|
1212
|
+
let r = Yt(e, t.blockId, n);
|
|
1109
1213
|
return {
|
|
1110
1214
|
op: "moveBlock",
|
|
1111
1215
|
blockId: t.blockId,
|
|
@@ -1118,23 +1222,23 @@ function zt(e, t, n) {
|
|
|
1118
1222
|
};
|
|
1119
1223
|
}
|
|
1120
1224
|
case "updateBlock": {
|
|
1121
|
-
let r =
|
|
1225
|
+
let r = Yt(e, t.blockId, n).block, { set: i, unset: a, expect: o } = Xt(r, t.set, t.unset);
|
|
1122
1226
|
return [{
|
|
1123
1227
|
op: "updateBlock",
|
|
1124
1228
|
blockId: t.blockId,
|
|
1125
1229
|
...Object.keys(i).length > 0 ? { set: i } : {},
|
|
1126
1230
|
...a.length > 0 ? { unset: a } : {},
|
|
1127
1231
|
expect: o
|
|
1128
|
-
}, ...
|
|
1232
|
+
}, ...Qt(e, t)];
|
|
1129
1233
|
}
|
|
1130
1234
|
case "updateSettings": {
|
|
1131
|
-
let { set: n, unset: r, expect: i } =
|
|
1235
|
+
let { set: n, unset: r, expect: i } = Xt(e.settings, t.set, t.unset);
|
|
1132
1236
|
return [{
|
|
1133
1237
|
op: "updateSettings",
|
|
1134
1238
|
...Object.keys(n).length > 0 ? { set: n } : {},
|
|
1135
1239
|
...r.length > 0 ? { unset: r } : {},
|
|
1136
1240
|
expect: i
|
|
1137
|
-
}, ...
|
|
1241
|
+
}, ...Qt(e, t)];
|
|
1138
1242
|
}
|
|
1139
1243
|
case "addLocale": return {
|
|
1140
1244
|
op: "removeLocale",
|
|
@@ -1147,18 +1251,18 @@ function zt(e, t, n) {
|
|
|
1147
1251
|
locale: t.locale,
|
|
1148
1252
|
position: e.settings.locales?.indexOf(t.locale)
|
|
1149
1253
|
}];
|
|
1150
|
-
for (let r of
|
|
1254
|
+
for (let r of R(e.blocks)) {
|
|
1151
1255
|
let e = r.l10n?.[t.locale];
|
|
1152
1256
|
e && n.push({
|
|
1153
1257
|
op: "updateBlockLocale",
|
|
1154
1258
|
blockId: r.id,
|
|
1155
1259
|
locale: t.locale,
|
|
1156
|
-
...
|
|
1260
|
+
...Zt(e)
|
|
1157
1261
|
});
|
|
1158
1262
|
}
|
|
1159
1263
|
let r = e.settings.l10n?.[t.locale];
|
|
1160
1264
|
if (r) {
|
|
1161
|
-
let { hidden: e, ...i } =
|
|
1265
|
+
let { hidden: e, ...i } = Zt(r);
|
|
1162
1266
|
n.push({
|
|
1163
1267
|
op: "updateSettingsLocale",
|
|
1164
1268
|
locale: t.locale,
|
|
@@ -1177,15 +1281,15 @@ function zt(e, t, n) {
|
|
|
1177
1281
|
...t.unset ?? []
|
|
1178
1282
|
])];
|
|
1179
1283
|
if (t.op === "updateBlockLocale") {
|
|
1180
|
-
let i =
|
|
1284
|
+
let i = R(e.blocks).find((e) => e.id === t.blockId), a = R(n.blocks).find((e) => e.id === t.blockId);
|
|
1181
1285
|
return {
|
|
1182
1286
|
op: "updateBlockLocale",
|
|
1183
1287
|
blockId: t.blockId,
|
|
1184
1288
|
locale: t.locale,
|
|
1185
|
-
...
|
|
1289
|
+
...L(I(i, t.locale), I(a, t.locale), r, t.hidden !== void 0)
|
|
1186
1290
|
};
|
|
1187
1291
|
}
|
|
1188
|
-
let { hidden: i, ...a } =
|
|
1292
|
+
let { hidden: i, ...a } = L(I(e.settings, t.locale), I(n.settings, t.locale), r, !1);
|
|
1189
1293
|
return {
|
|
1190
1294
|
op: "updateSettingsLocale",
|
|
1191
1295
|
locale: t.locale,
|
|
@@ -1202,11 +1306,11 @@ function zt(e, t, n) {
|
|
|
1202
1306
|
};
|
|
1203
1307
|
}
|
|
1204
1308
|
}
|
|
1205
|
-
function
|
|
1309
|
+
function en(e, t) {
|
|
1206
1310
|
let n = m(e), r = [];
|
|
1207
1311
|
return t.forEach((e, t) => {
|
|
1208
1312
|
try {
|
|
1209
|
-
let i =
|
|
1313
|
+
let i = $t(n, e, t);
|
|
1210
1314
|
r.push(...Array.isArray(i) ? [...i].reverse() : [i]), T(n, [e]);
|
|
1211
1315
|
} catch (e) {
|
|
1212
1316
|
throw e instanceof w ? new w(e.code, t, e.message, e.blockId) : e;
|
|
@@ -1214,58 +1318,58 @@ function Bt(e, t) {
|
|
|
1214
1318
|
}), r.reverse();
|
|
1215
1319
|
}
|
|
1216
1320
|
// ../types/src/collaboration.ts
|
|
1217
|
-
function
|
|
1321
|
+
function tn(e) {
|
|
1218
1322
|
return e === "invalid_operation" ? 422 : e === "content_too_large" ? 413 : 409;
|
|
1219
1323
|
}
|
|
1220
|
-
var
|
|
1324
|
+
var nn = class extends ie {
|
|
1221
1325
|
opIndex;
|
|
1222
1326
|
holder;
|
|
1223
1327
|
holders;
|
|
1224
1328
|
constructor(e, t) {
|
|
1225
|
-
super(e, t.status ??
|
|
1329
|
+
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
1330
|
}
|
|
1227
1331
|
};
|
|
1228
1332
|
// ../types/src/guards.ts
|
|
1229
|
-
function
|
|
1333
|
+
function z(e) {
|
|
1230
1334
|
return e.type === "section";
|
|
1231
1335
|
}
|
|
1232
|
-
function
|
|
1336
|
+
function rn(e) {
|
|
1233
1337
|
return e.type === "title";
|
|
1234
1338
|
}
|
|
1235
|
-
function
|
|
1339
|
+
function an(e) {
|
|
1236
1340
|
return e.type === "paragraph";
|
|
1237
1341
|
}
|
|
1238
|
-
function
|
|
1342
|
+
function on(e) {
|
|
1239
1343
|
return e.type === "image";
|
|
1240
1344
|
}
|
|
1241
|
-
function
|
|
1345
|
+
function sn(e) {
|
|
1242
1346
|
return e.type === "button";
|
|
1243
1347
|
}
|
|
1244
|
-
function
|
|
1348
|
+
function cn(e) {
|
|
1245
1349
|
return e.type === "divider";
|
|
1246
1350
|
}
|
|
1247
|
-
function
|
|
1351
|
+
function ln(e) {
|
|
1248
1352
|
return e.type === "video";
|
|
1249
1353
|
}
|
|
1250
|
-
function
|
|
1354
|
+
function un(e) {
|
|
1251
1355
|
return e.type === "social";
|
|
1252
1356
|
}
|
|
1253
|
-
function
|
|
1357
|
+
function dn(e) {
|
|
1254
1358
|
return e.type === "spacer";
|
|
1255
1359
|
}
|
|
1256
|
-
function
|
|
1360
|
+
function fn(e) {
|
|
1257
1361
|
return e.type === "html";
|
|
1258
1362
|
}
|
|
1259
|
-
function
|
|
1363
|
+
function pn(e) {
|
|
1260
1364
|
return e.type === "menu";
|
|
1261
1365
|
}
|
|
1262
|
-
function
|
|
1366
|
+
function mn(e) {
|
|
1263
1367
|
return e.type === "table";
|
|
1264
1368
|
}
|
|
1265
|
-
function
|
|
1369
|
+
function hn(e) {
|
|
1266
1370
|
return e.type === "countdown";
|
|
1267
1371
|
}
|
|
1268
|
-
function
|
|
1372
|
+
function gn(e) {
|
|
1269
1373
|
return e.type === "custom";
|
|
1270
1374
|
}
|
|
1271
1375
|
function B(e) {
|
|
@@ -1275,16 +1379,16 @@ function V(e) {
|
|
|
1275
1379
|
return e.type === "wrapper";
|
|
1276
1380
|
}
|
|
1277
1381
|
// ../types/src/defaults.ts
|
|
1278
|
-
var
|
|
1382
|
+
var _n = {
|
|
1279
1383
|
content: "<p>Enter your title</p>",
|
|
1280
1384
|
level: 2,
|
|
1281
1385
|
textAlign: "left"
|
|
1282
|
-
},
|
|
1386
|
+
}, vn = { content: "<p>Enter your text here</p>" }, yn = {
|
|
1283
1387
|
src: "",
|
|
1284
1388
|
alt: "",
|
|
1285
1389
|
width: "full",
|
|
1286
1390
|
align: "center"
|
|
1287
|
-
},
|
|
1391
|
+
}, bn = {
|
|
1288
1392
|
text: "Click Here",
|
|
1289
1393
|
url: "",
|
|
1290
1394
|
backgroundColor: "#333333",
|
|
@@ -1298,36 +1402,36 @@ var rn = {
|
|
|
1298
1402
|
left: 24
|
|
1299
1403
|
},
|
|
1300
1404
|
align: "center"
|
|
1301
|
-
},
|
|
1405
|
+
}, xn = {
|
|
1302
1406
|
lineStyle: "solid",
|
|
1303
1407
|
color: "#e0e0e0",
|
|
1304
1408
|
thickness: 1,
|
|
1305
1409
|
width: "full"
|
|
1306
|
-
},
|
|
1410
|
+
}, Sn = { columns: "1" }, Cn = {
|
|
1307
1411
|
url: "",
|
|
1308
1412
|
thumbnailUrl: "",
|
|
1309
1413
|
alt: "Video",
|
|
1310
1414
|
width: "full",
|
|
1311
1415
|
align: "center"
|
|
1312
|
-
},
|
|
1416
|
+
}, wn = {
|
|
1313
1417
|
iconStyle: "solid",
|
|
1314
1418
|
iconSize: "medium",
|
|
1315
1419
|
spacing: 10,
|
|
1316
1420
|
align: "center"
|
|
1317
|
-
},
|
|
1421
|
+
}, Tn = { height: 24 }, En = { content: "" }, Dn = {
|
|
1318
1422
|
fontSize: 15,
|
|
1319
1423
|
textAlign: "center",
|
|
1320
1424
|
separator: "|",
|
|
1321
1425
|
separatorColor: "#e0e0e0",
|
|
1322
1426
|
spacing: 10
|
|
1323
|
-
},
|
|
1427
|
+
}, On = {
|
|
1324
1428
|
hasHeaderRow: !0,
|
|
1325
1429
|
borderColor: "#e0e0e0",
|
|
1326
1430
|
borderWidth: 1,
|
|
1327
1431
|
cellPadding: 8,
|
|
1328
1432
|
fontSize: 15,
|
|
1329
1433
|
textAlign: "left"
|
|
1330
|
-
},
|
|
1434
|
+
}, kn = {
|
|
1331
1435
|
targetDate: "",
|
|
1332
1436
|
timezone: "UTC",
|
|
1333
1437
|
showDays: !0,
|
|
@@ -1347,21 +1451,21 @@ var rn = {
|
|
|
1347
1451
|
expiredMessage: "This offer has expired",
|
|
1348
1452
|
expiredImageUrl: "",
|
|
1349
1453
|
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
|
-
},
|
|
1454
|
+
}, An = {
|
|
1455
|
+
title: _n,
|
|
1456
|
+
paragraph: vn,
|
|
1457
|
+
image: yn,
|
|
1458
|
+
button: bn,
|
|
1459
|
+
divider: xn,
|
|
1460
|
+
section: Sn,
|
|
1461
|
+
video: Cn,
|
|
1462
|
+
social: wn,
|
|
1463
|
+
spacer: Tn,
|
|
1464
|
+
html: En,
|
|
1465
|
+
menu: Dn,
|
|
1466
|
+
table: On,
|
|
1467
|
+
countdown: kn
|
|
1468
|
+
}, jn = {
|
|
1365
1469
|
width: 600,
|
|
1366
1470
|
backgroundColor: "#ffffff",
|
|
1367
1471
|
textColor: "#1a1a1a",
|
|
@@ -1369,30 +1473,30 @@ var rn = {
|
|
|
1369
1473
|
fontFamily: "Arial",
|
|
1370
1474
|
locale: "en"
|
|
1371
1475
|
};
|
|
1372
|
-
function
|
|
1476
|
+
function Mn(e) {
|
|
1373
1477
|
return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
|
|
1374
1478
|
}
|
|
1375
|
-
function
|
|
1479
|
+
function Nn(e, t) {
|
|
1376
1480
|
let n = { ...e };
|
|
1377
1481
|
for (let r of Object.keys(t)) {
|
|
1378
1482
|
let i = e[r], a = t[r];
|
|
1379
|
-
a !== void 0 && (n[r] =
|
|
1483
|
+
a !== void 0 && (n[r] = Mn(i) && Mn(a) ? Nn(i, a) : a);
|
|
1380
1484
|
}
|
|
1381
1485
|
return n;
|
|
1382
1486
|
}
|
|
1383
1487
|
// ../types/src/template.ts
|
|
1384
|
-
function
|
|
1488
|
+
function Pn(e = "Arial", t) {
|
|
1385
1489
|
return {
|
|
1386
1490
|
blocks: [],
|
|
1387
1491
|
settings: {
|
|
1388
|
-
...
|
|
1492
|
+
...jn,
|
|
1389
1493
|
fontFamily: e,
|
|
1390
1494
|
...t
|
|
1391
1495
|
}
|
|
1392
1496
|
};
|
|
1393
1497
|
}
|
|
1394
1498
|
// ../types/src/direction.ts
|
|
1395
|
-
var
|
|
1499
|
+
var Fn = [
|
|
1396
1500
|
"ar",
|
|
1397
1501
|
"he",
|
|
1398
1502
|
"iw",
|
|
@@ -1406,16 +1510,16 @@ var Sn = [
|
|
|
1406
1510
|
"ckb",
|
|
1407
1511
|
"ks"
|
|
1408
1512
|
];
|
|
1409
|
-
function
|
|
1513
|
+
function In(e) {
|
|
1410
1514
|
let t = e?.trim().replace(/_/g, "-").split("-")[0]?.toLowerCase();
|
|
1411
|
-
return !!t &&
|
|
1515
|
+
return !!t && Fn.includes(t);
|
|
1412
1516
|
}
|
|
1413
|
-
function
|
|
1414
|
-
return e.direction === "ltr" || e.direction === "rtl" ? e.direction :
|
|
1517
|
+
function Ln(e) {
|
|
1518
|
+
return e.direction === "ltr" || e.direction === "rtl" ? e.direction : In(e.locale) ? "rtl" : "ltr";
|
|
1415
1519
|
}
|
|
1416
1520
|
// ../types/src/translation.ts
|
|
1417
|
-
var
|
|
1418
|
-
function
|
|
1521
|
+
var Rn = 2e4, zn = /* @__PURE__ */ new Set(["\"", "'"]);
|
|
1522
|
+
function Bn(e, t) {
|
|
1419
1523
|
let n = null, r = "tag";
|
|
1420
1524
|
for (let i = t; i < e.length; i++) {
|
|
1421
1525
|
let t = e[i];
|
|
@@ -1423,7 +1527,7 @@ function Dn(e, t) {
|
|
|
1423
1527
|
else {
|
|
1424
1528
|
if (r === "beforeValue") {
|
|
1425
1529
|
if (H(t)) continue;
|
|
1426
|
-
if (
|
|
1530
|
+
if (zn.has(t)) {
|
|
1427
1531
|
n = t, r = "tag";
|
|
1428
1532
|
continue;
|
|
1429
1533
|
}
|
|
@@ -1438,12 +1542,12 @@ function Dn(e, t) {
|
|
|
1438
1542
|
}
|
|
1439
1543
|
return -1;
|
|
1440
1544
|
}
|
|
1441
|
-
function
|
|
1545
|
+
function Vn(e, t) {
|
|
1442
1546
|
let n = null;
|
|
1443
1547
|
for (let r = t; r < e.length; r++) {
|
|
1444
1548
|
let t = e[r];
|
|
1445
1549
|
if (n !== null) t === n && (n = null);
|
|
1446
|
-
else if (
|
|
1550
|
+
else if (zn.has(t)) n = t;
|
|
1447
1551
|
else if (t === ">") return {
|
|
1448
1552
|
end: r,
|
|
1449
1553
|
nextSpan: -1
|
|
@@ -1458,13 +1562,13 @@ function On(e, t) {
|
|
|
1458
1562
|
nextSpan: -1
|
|
1459
1563
|
};
|
|
1460
1564
|
}
|
|
1461
|
-
function
|
|
1565
|
+
function Hn(e) {
|
|
1462
1566
|
return e !== " " && e !== " " && e !== "\n" && e !== "\r" && e !== "\f" && e !== "=" && e !== ">" && e !== "/";
|
|
1463
1567
|
}
|
|
1464
1568
|
function H(e) {
|
|
1465
1569
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
1466
1570
|
}
|
|
1467
|
-
var
|
|
1571
|
+
var Un = {
|
|
1468
1572
|
AMP: "&",
|
|
1469
1573
|
COPY: "©",
|
|
1470
1574
|
GT: ">",
|
|
@@ -1731,16 +1835,16 @@ function U(e) {
|
|
|
1731
1835
|
let n = t[1] === "x" || t[1] === "X" ? Number.parseInt(t.slice(2), 16) : Number.parseInt(t.slice(1), 10);
|
|
1732
1836
|
return !Number.isFinite(n) || n < 1 || n > 1114111 || n >= 55296 && n <= 57343 ? e : String.fromCodePoint(n);
|
|
1733
1837
|
}
|
|
1734
|
-
return Object.hasOwn(
|
|
1838
|
+
return Object.hasOwn(Un, t) ? Un[t] : e;
|
|
1735
1839
|
}) : e;
|
|
1736
1840
|
}
|
|
1737
|
-
function
|
|
1841
|
+
function Wn(e, t) {
|
|
1738
1842
|
let n = t.toLowerCase(), r = 0;
|
|
1739
1843
|
for (; r < e.length;) {
|
|
1740
1844
|
for (; r < e.length && (H(e[r]) || e[r] === "/");) r++;
|
|
1741
1845
|
if (r >= e.length) break;
|
|
1742
1846
|
let t = r;
|
|
1743
|
-
for (; r < e.length &&
|
|
1847
|
+
for (; r < e.length && Hn(e[r]);) r++;
|
|
1744
1848
|
let i = e.substring(t, r).toLowerCase();
|
|
1745
1849
|
if (i === "") {
|
|
1746
1850
|
r++;
|
|
@@ -1750,7 +1854,7 @@ function jn(e, t) {
|
|
|
1750
1854
|
if (e[r] !== "=") continue;
|
|
1751
1855
|
for (r++; r < e.length && H(e[r]);) r++;
|
|
1752
1856
|
let a = e[r];
|
|
1753
|
-
if (
|
|
1857
|
+
if (zn.has(a)) {
|
|
1754
1858
|
let t = r + 1, o = e.indexOf(a, t);
|
|
1755
1859
|
if (o === -1) return null;
|
|
1756
1860
|
if (i === n) return U(e.substring(t, o));
|
|
@@ -1764,15 +1868,15 @@ function jn(e, t) {
|
|
|
1764
1868
|
return null;
|
|
1765
1869
|
}
|
|
1766
1870
|
// ../types/src/merge-tag-html.ts
|
|
1767
|
-
function
|
|
1768
|
-
return
|
|
1871
|
+
function Gn(e) {
|
|
1872
|
+
return Jn(e, (e) => e, !1);
|
|
1769
1873
|
}
|
|
1770
|
-
function
|
|
1771
|
-
return
|
|
1874
|
+
function Kn(e, t) {
|
|
1875
|
+
return Jn(e, t, !0);
|
|
1772
1876
|
}
|
|
1773
|
-
function
|
|
1877
|
+
function qn(e) {
|
|
1774
1878
|
let t = [];
|
|
1775
|
-
return
|
|
1879
|
+
return Jn(e, (n, r, i) => {
|
|
1776
1880
|
let a = e.slice(r, i);
|
|
1777
1881
|
return t.push({
|
|
1778
1882
|
start: r,
|
|
@@ -1781,7 +1885,7 @@ function Pn(e) {
|
|
|
1781
1885
|
}), a;
|
|
1782
1886
|
}, !0), t;
|
|
1783
1887
|
}
|
|
1784
|
-
function
|
|
1888
|
+
function Jn(e, t, n) {
|
|
1785
1889
|
let r = "", i = 0;
|
|
1786
1890
|
for (; i < e.length;) {
|
|
1787
1891
|
let a = e.indexOf("<span", i);
|
|
@@ -1794,7 +1898,7 @@ function Fn(e, t, n) {
|
|
|
1794
1898
|
r += e.substring(i, a + 5), i = a + 5;
|
|
1795
1899
|
continue;
|
|
1796
1900
|
}
|
|
1797
|
-
let { end: s, nextSpan: c } =
|
|
1901
|
+
let { end: s, nextSpan: c } = Vn(e, a + 5);
|
|
1798
1902
|
if (c !== -1) {
|
|
1799
1903
|
r += e.substring(i, c), i = c;
|
|
1800
1904
|
continue;
|
|
@@ -1803,12 +1907,12 @@ function Fn(e, t, n) {
|
|
|
1803
1907
|
r += e.substring(i);
|
|
1804
1908
|
break;
|
|
1805
1909
|
}
|
|
1806
|
-
let l = e.substring(a + 5, s), u =
|
|
1910
|
+
let l = e.substring(a + 5, s), u = Xn(l, "data-merge-tag") ?? Xn(l, "data-logic-merge-tag");
|
|
1807
1911
|
if (u === null) {
|
|
1808
1912
|
r += e.substring(i, s + 1), i = s + 1;
|
|
1809
1913
|
continue;
|
|
1810
1914
|
}
|
|
1811
|
-
let d =
|
|
1915
|
+
let d = Yn(e, s + 1, n);
|
|
1812
1916
|
if (d === -1) {
|
|
1813
1917
|
r += e.substring(i);
|
|
1814
1918
|
break;
|
|
@@ -1817,7 +1921,7 @@ function Fn(e, t, n) {
|
|
|
1817
1921
|
}
|
|
1818
1922
|
return r;
|
|
1819
1923
|
}
|
|
1820
|
-
function
|
|
1924
|
+
function Yn(e, t, n) {
|
|
1821
1925
|
if (!n) {
|
|
1822
1926
|
let n = e.indexOf("</span>", t);
|
|
1823
1927
|
return n === -1 ? -1 : n + 7;
|
|
@@ -1826,7 +1930,7 @@ function In(e, t, n) {
|
|
|
1826
1930
|
for (; i < e.length;) {
|
|
1827
1931
|
let t = e.indexOf("<", i);
|
|
1828
1932
|
if (t === -1) return -1;
|
|
1829
|
-
let n =
|
|
1933
|
+
let n = Bn(e, t + 1);
|
|
1830
1934
|
if (n === -1) return -1;
|
|
1831
1935
|
let a = e.startsWith("</span", t), o = e.startsWith("<span", t), s = e[t + (a ? 6 : 5)];
|
|
1832
1936
|
if ((o || a) && (s === ">" || s === "/" || /\s/.test(s)) && (r += a ? -1 : 1, r === 0)) return n + 1;
|
|
@@ -1834,8 +1938,8 @@ function In(e, t, n) {
|
|
|
1834
1938
|
}
|
|
1835
1939
|
return -1;
|
|
1836
1940
|
}
|
|
1837
|
-
function
|
|
1838
|
-
return
|
|
1941
|
+
function Xn(e, t) {
|
|
1942
|
+
return Wn(e, t);
|
|
1839
1943
|
}
|
|
1840
1944
|
// ../types/src/merge-tags.ts
|
|
1841
1945
|
var W = {
|
|
@@ -1870,7 +1974,7 @@ function G(e) {
|
|
|
1870
1974
|
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
1975
|
});
|
|
1872
1976
|
}
|
|
1873
|
-
function
|
|
1977
|
+
function Zn(e, t, n) {
|
|
1874
1978
|
for (let r = n; r < e.length; r++) {
|
|
1875
1979
|
let n = e.charCodeAt(r);
|
|
1876
1980
|
if (n === 10 || n === 13 || n === 8232 || n === 8233) return {
|
|
@@ -1912,7 +2016,7 @@ function K(e, t, n, r = 0, i = Infinity) {
|
|
|
1912
2016
|
let r = u?.lastIndex ?? t + s.length, i = a === "mailchimp" && n === "value" ? {
|
|
1913
2017
|
close: e.startsWith(c, r) ? r : -1,
|
|
1914
2018
|
lineBreak: -1
|
|
1915
|
-
} :
|
|
2019
|
+
} : Zn(e, c, Math.max(r, t + s.length + +(n === "value")));
|
|
1916
2020
|
if (i.lineBreak >= 0) {
|
|
1917
2021
|
let r = i.lineBreak, o = n === "logic" && (a === "liquid" || a === "ampscript") ? e.lastIndexOf(s, r) : -1;
|
|
1918
2022
|
p = o > t ? o : r + 1;
|
|
@@ -1934,7 +2038,7 @@ function K(e, t, n, r = 0, i = Infinity) {
|
|
|
1934
2038
|
}
|
|
1935
2039
|
return f;
|
|
1936
2040
|
}
|
|
1937
|
-
function
|
|
2041
|
+
function Qn(e, t) {
|
|
1938
2042
|
let n = G(t);
|
|
1939
2043
|
if (!n) {
|
|
1940
2044
|
let n = RegExp(`(${t.value.source}|${t.logic.source})`, "g");
|
|
@@ -1962,7 +2066,7 @@ function zn(e, t) {
|
|
|
1962
2066
|
o = t + 2;
|
|
1963
2067
|
continue;
|
|
1964
2068
|
}
|
|
1965
|
-
let c =
|
|
2069
|
+
let c = Zn(e, "|*", a.lastIndex);
|
|
1966
2070
|
if (c.lineBreak >= 0) {
|
|
1967
2071
|
o = c.lineBreak + 1;
|
|
1968
2072
|
continue;
|
|
@@ -1984,73 +2088,73 @@ function zn(e, t) {
|
|
|
1984
2088
|
}
|
|
1985
2089
|
return r;
|
|
1986
2090
|
}
|
|
1987
|
-
function
|
|
2091
|
+
function $n(e) {
|
|
1988
2092
|
return typeof e == "string" && e.trim() !== "" ? e : null;
|
|
1989
2093
|
}
|
|
1990
|
-
function
|
|
2094
|
+
function er(e) {
|
|
1991
2095
|
return Object.values(W).find((t) => t.value.source === e.value.source) ?? null;
|
|
1992
2096
|
}
|
|
1993
|
-
function
|
|
1994
|
-
return
|
|
2097
|
+
function tr(e) {
|
|
2098
|
+
return $n(e.opener) ?? er(e)?.opener ?? null;
|
|
1995
2099
|
}
|
|
1996
|
-
function
|
|
1997
|
-
return
|
|
2100
|
+
function nr(e) {
|
|
2101
|
+
return $n(e.closer) ?? er(e)?.closer ?? null;
|
|
1998
2102
|
}
|
|
1999
|
-
function
|
|
2103
|
+
function rr(e) {
|
|
2000
2104
|
return e ? typeof e == "string" ? W[e] ?? W.liquid : e : W.liquid;
|
|
2001
2105
|
}
|
|
2002
|
-
function
|
|
2106
|
+
function ir(e) {
|
|
2003
2107
|
let t = e.source, n = e.flags.replace("g", "");
|
|
2004
2108
|
return RegExp(`^${t}$`, n);
|
|
2005
2109
|
}
|
|
2006
|
-
function
|
|
2110
|
+
function ar(e, t) {
|
|
2007
2111
|
let n = e?.trim() || "";
|
|
2008
|
-
return !
|
|
2112
|
+
return !ir(t.logic).test(n) && ir(t.value).test(n);
|
|
2009
2113
|
}
|
|
2010
|
-
function
|
|
2114
|
+
function or(e, t) {
|
|
2011
2115
|
let n = t.find((t) => t.value === e);
|
|
2012
2116
|
return n ? n.label : e;
|
|
2013
2117
|
}
|
|
2014
|
-
function
|
|
2015
|
-
return q(e, "data-merge-tag", (e) =>
|
|
2118
|
+
function sr(e, t) {
|
|
2119
|
+
return q(e, "data-merge-tag", (e) => or(e, t));
|
|
2016
2120
|
}
|
|
2017
|
-
function
|
|
2121
|
+
function cr(e, t) {
|
|
2018
2122
|
return t.find((t) => t.value === e)?.sample;
|
|
2019
2123
|
}
|
|
2020
|
-
function
|
|
2021
|
-
return q(e, "data-merge-tag", (e) =>
|
|
2124
|
+
function lr(e, t) {
|
|
2125
|
+
return q(e, "data-merge-tag", (e) => pr(cr(e, t) ?? or(e, t)), { unwrap: (e) => cr(e, t) !== void 0 });
|
|
2022
2126
|
}
|
|
2023
|
-
function
|
|
2024
|
-
let r = (e) => t.some((t) => t.value === e) ||
|
|
2025
|
-
return q(q(e, "data-merge-tag", (e) => r(e) ?
|
|
2127
|
+
function ur(e, t, n) {
|
|
2128
|
+
let r = (e) => t.some((t) => t.value === e) || ar(e, n), i = (e) => hr(e, n);
|
|
2129
|
+
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
2130
|
}
|
|
2027
|
-
function
|
|
2131
|
+
function dr(e) {
|
|
2028
2132
|
return e.some((e) => e.sample !== void 0);
|
|
2029
2133
|
}
|
|
2030
|
-
function
|
|
2134
|
+
function fr(e, t) {
|
|
2031
2135
|
if (!e) return e;
|
|
2032
2136
|
let n = e;
|
|
2033
2137
|
for (let e of t) e.sample !== void 0 && (n = n.split(e.value).join(e.sample));
|
|
2034
2138
|
return n;
|
|
2035
2139
|
}
|
|
2036
|
-
function
|
|
2140
|
+
function pr(e) {
|
|
2037
2141
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
2038
2142
|
}
|
|
2039
|
-
function
|
|
2143
|
+
function mr(e, t) {
|
|
2040
2144
|
if (!e) return !1;
|
|
2041
2145
|
if (G(t)) return K(e, t, "value", 0, 1).length > 0 || K(e, t, "logic", 0, 1).length > 0;
|
|
2042
2146
|
let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
|
|
2043
2147
|
return n.test(e) || r.test(e);
|
|
2044
2148
|
}
|
|
2045
|
-
function
|
|
2046
|
-
return
|
|
2149
|
+
function hr(e, t) {
|
|
2150
|
+
return ir(t.logic).test(e?.trim() || "");
|
|
2047
2151
|
}
|
|
2048
|
-
function
|
|
2152
|
+
function gr(e, t) {
|
|
2049
2153
|
let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
|
|
2050
2154
|
return r && r[1] ? r[1].toUpperCase() : e;
|
|
2051
2155
|
}
|
|
2052
|
-
function
|
|
2053
|
-
return q(e, "data-logic-merge-tag", (e) =>
|
|
2156
|
+
function _r(e, t) {
|
|
2157
|
+
return q(e, "data-logic-merge-tag", (e) => gr(e, t));
|
|
2054
2158
|
}
|
|
2055
2159
|
function q(e, t, n, r) {
|
|
2056
2160
|
let i = "", a = 0;
|
|
@@ -2065,7 +2169,7 @@ function q(e, t, n, r) {
|
|
|
2065
2169
|
i += e.substring(a, o + 5), a = o + 5;
|
|
2066
2170
|
continue;
|
|
2067
2171
|
}
|
|
2068
|
-
let { end: c, nextSpan: l } =
|
|
2172
|
+
let { end: c, nextSpan: l } = Vn(e, o + 5);
|
|
2069
2173
|
if (l !== -1) {
|
|
2070
2174
|
i += e.substring(a, l), a = l;
|
|
2071
2175
|
continue;
|
|
@@ -2074,7 +2178,7 @@ function q(e, t, n, r) {
|
|
|
2074
2178
|
i += e.substring(a);
|
|
2075
2179
|
break;
|
|
2076
2180
|
}
|
|
2077
|
-
let u =
|
|
2181
|
+
let u = Wn(e.substring(o + 5, c), t);
|
|
2078
2182
|
if (u === null) {
|
|
2079
2183
|
i += e.substring(a, c + 1), a = c + 1;
|
|
2080
2184
|
continue;
|
|
@@ -2090,14 +2194,14 @@ function q(e, t, n, r) {
|
|
|
2090
2194
|
return i;
|
|
2091
2195
|
}
|
|
2092
2196
|
// ../types/src/locale-strings.ts
|
|
2093
|
-
var
|
|
2197
|
+
var vr = {
|
|
2094
2198
|
title: ["content"],
|
|
2095
2199
|
paragraph: ["content"]
|
|
2096
2200
|
};
|
|
2097
|
-
function
|
|
2201
|
+
function yr(e) {
|
|
2098
2202
|
let t = [], n = /<[a-z][\w:-]*\b/gi;
|
|
2099
2203
|
for (; n.exec(e);) {
|
|
2100
|
-
let r =
|
|
2204
|
+
let r = Bn(e, n.lastIndex);
|
|
2101
2205
|
if (r < 0) break;
|
|
2102
2206
|
let i = n.lastIndex, a = e.slice(i, r), o = /[^\s"'<>/=]+\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+))/g;
|
|
2103
2207
|
for (let e; e = o.exec(a);) {
|
|
@@ -2111,8 +2215,8 @@ function or(e) {
|
|
|
2111
2215
|
}
|
|
2112
2216
|
return t;
|
|
2113
2217
|
}
|
|
2114
|
-
function
|
|
2115
|
-
let r = n === "html" ?
|
|
2218
|
+
function br(e, t, n) {
|
|
2219
|
+
let r = n === "html" ? qn(e) : [], i = n === "html" ? yr(e) : [], a = r.map((e) => ({
|
|
2116
2220
|
...e,
|
|
2117
2221
|
attribute: !1
|
|
2118
2222
|
})), o = 0, s = G(t) !== void 0, c = (n, r) => {
|
|
@@ -2147,7 +2251,7 @@ function sr(e, t, n) {
|
|
|
2147
2251
|
for (let e of r) c(l, e.start), l = e.end;
|
|
2148
2252
|
return c(l, e.length), a.sort((e, t) => e.start - t.start);
|
|
2149
2253
|
}
|
|
2150
|
-
function
|
|
2254
|
+
function xr(e) {
|
|
2151
2255
|
if (!e.includes("&")) return { text: e };
|
|
2152
2256
|
let t = "", n = [0], r = 0, i = (i) => {
|
|
2153
2257
|
for (t += e.slice(r, i); r < i;) n.push(++r);
|
|
@@ -2164,17 +2268,17 @@ function cr(e) {
|
|
|
2164
2268
|
offsets: n
|
|
2165
2269
|
};
|
|
2166
2270
|
}
|
|
2167
|
-
var J = /* @__PURE__ */ new Map(),
|
|
2168
|
-
function
|
|
2271
|
+
var J = /* @__PURE__ */ new Map(), Sr = 32;
|
|
2272
|
+
function Cr(e) {
|
|
2169
2273
|
let t = JSON.stringify(e), n = J.get(t);
|
|
2170
2274
|
if (n === void 0) {
|
|
2171
2275
|
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 >=
|
|
2276
|
+
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
2277
|
}
|
|
2174
2278
|
return n;
|
|
2175
2279
|
}
|
|
2176
|
-
function
|
|
2177
|
-
let r = n.length ?
|
|
2280
|
+
function wr(e, t, n) {
|
|
2281
|
+
let r = n.length ? Cr(n) : null;
|
|
2178
2282
|
if (!r) return [];
|
|
2179
2283
|
let i = [];
|
|
2180
2284
|
if (t === "text") i.push({
|
|
@@ -2183,7 +2287,7 @@ function dr(e, t, n) {
|
|
|
2183
2287
|
attribute: !1
|
|
2184
2288
|
});
|
|
2185
2289
|
else {
|
|
2186
|
-
i.push(...
|
|
2290
|
+
i.push(...yr(e).map((e) => ({
|
|
2187
2291
|
...e,
|
|
2188
2292
|
attribute: !0
|
|
2189
2293
|
})));
|
|
@@ -2194,7 +2298,7 @@ function dr(e, t, n) {
|
|
|
2194
2298
|
end: r.index,
|
|
2195
2299
|
attribute: !1
|
|
2196
2300
|
});
|
|
2197
|
-
let a = r[0] === "<!--" ? e.indexOf("-->", t.lastIndex) :
|
|
2301
|
+
let a = r[0] === "<!--" ? e.indexOf("-->", t.lastIndex) : Bn(e, t.lastIndex);
|
|
2198
2302
|
if (a < 0) return [];
|
|
2199
2303
|
n = a + (r[0] === "<!--" ? 3 : 1), t.lastIndex = n;
|
|
2200
2304
|
}
|
|
@@ -2207,7 +2311,7 @@ function dr(e, t, n) {
|
|
|
2207
2311
|
let a = [];
|
|
2208
2312
|
for (let n of i) {
|
|
2209
2313
|
r.lastIndex = 0;
|
|
2210
|
-
let i = e.slice(n.start, n.end), o = t === "html" ?
|
|
2314
|
+
let i = e.slice(n.start, n.end), o = t === "html" ? xr(i) : {
|
|
2211
2315
|
text: i,
|
|
2212
2316
|
offsets: void 0
|
|
2213
2317
|
};
|
|
@@ -2226,40 +2330,40 @@ function dr(e, t, n) {
|
|
|
2226
2330
|
}
|
|
2227
2331
|
return a;
|
|
2228
2332
|
}
|
|
2229
|
-
function
|
|
2230
|
-
let i =
|
|
2333
|
+
function Tr(e, t, n, r) {
|
|
2334
|
+
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
2335
|
return [...i, ...a].sort((e, t) => e.start - t.start);
|
|
2232
2336
|
}
|
|
2233
|
-
function
|
|
2337
|
+
function Er(e, t, n) {
|
|
2234
2338
|
let r = "", i = 0;
|
|
2235
2339
|
return t.forEach((t, a) => {
|
|
2236
2340
|
r += e.slice(i, t.start), r += t.attribute ? `__x${n[a]}__` : `<x id="${n[a]}"/>`, i = t.end;
|
|
2237
2341
|
}), r + e.slice(i);
|
|
2238
2342
|
}
|
|
2239
|
-
function
|
|
2240
|
-
let i =
|
|
2343
|
+
function Dr(e, t, n, r) {
|
|
2344
|
+
let i = Tr(e, t, n, r);
|
|
2241
2345
|
return {
|
|
2242
|
-
text:
|
|
2346
|
+
text: Er(e, i, i.map((e, t) => t + 1)),
|
|
2243
2347
|
tokens: i.map((e) => e.markup)
|
|
2244
2348
|
};
|
|
2245
2349
|
}
|
|
2246
|
-
function
|
|
2350
|
+
function Or(e, t) {
|
|
2247
2351
|
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
2352
|
let s = Number(i ?? a ?? o);
|
|
2249
2353
|
return (s < 1 || s > t.length || n.has(s)) && (r = !1), n.add(s), t[s - 1] ?? "";
|
|
2250
2354
|
});
|
|
2251
2355
|
return r && n.size === t.length ? i : null;
|
|
2252
2356
|
}
|
|
2253
|
-
function
|
|
2254
|
-
let a =
|
|
2357
|
+
function kr(e, t, n, r, i) {
|
|
2358
|
+
let a = Tr(e, n, r, i), o = /* @__PURE__ */ new Set(), s = (e) => {
|
|
2255
2359
|
let n = t.findIndex((t, n) => !o.has(n) && e(t));
|
|
2256
2360
|
return n >= 0 && o.add(n), n;
|
|
2257
2361
|
}, c = a.map((e) => s((t) => t === e.markup));
|
|
2258
2362
|
return a.forEach((e, t) => {
|
|
2259
2363
|
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 :
|
|
2364
|
+
}), 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
2365
|
}
|
|
2262
|
-
function
|
|
2366
|
+
function Ar(e, t, n = []) {
|
|
2263
2367
|
let r = /* @__PURE__ */ new Map();
|
|
2264
2368
|
if (t === C(e) || !e.settings.locales?.includes(t)) return r;
|
|
2265
2369
|
let i = (e, n, i, a) => {
|
|
@@ -2270,7 +2374,7 @@ function _r(e, t, n = []) {
|
|
|
2270
2374
|
target: e,
|
|
2271
2375
|
path: t,
|
|
2272
2376
|
source: i,
|
|
2273
|
-
format: a &&
|
|
2377
|
+
format: a && vr[a]?.includes(t) ? "html" : "text",
|
|
2274
2378
|
text: o?.text?.[t]
|
|
2275
2379
|
});
|
|
2276
2380
|
}
|
|
@@ -2285,11 +2389,11 @@ function _r(e, t, n = []) {
|
|
|
2285
2389
|
};
|
|
2286
2390
|
return a(e.blocks), i({ kind: "settings" }, e.settings, g), r;
|
|
2287
2391
|
}
|
|
2288
|
-
function
|
|
2289
|
-
let r = n.only === "all" ? null :
|
|
2290
|
-
for (let [r, s] of
|
|
2392
|
+
function jr(e, t, n) {
|
|
2393
|
+
let r = n.only === "all" ? null : Ce(e, t, n.definitions), i = r && /* @__PURE__ */ new Set([...r.missing, ...r.stale]), a = [], o = {};
|
|
2394
|
+
for (let [r, s] of Ar(e, t, n.definitions)) {
|
|
2291
2395
|
if (i && !i.has(r) || n.blockId !== void 0 && (s.target.kind !== "block" || s.target.blockId !== n.blockId)) continue;
|
|
2292
|
-
let e =
|
|
2396
|
+
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
2397
|
a.push({
|
|
2294
2398
|
id: r,
|
|
2295
2399
|
format: s.format,
|
|
@@ -2303,8 +2407,8 @@ function vr(e, t, n) {
|
|
|
2303
2407
|
tokens: o
|
|
2304
2408
|
};
|
|
2305
2409
|
}
|
|
2306
|
-
function
|
|
2307
|
-
let i =
|
|
2410
|
+
function Mr(e, t, n, r) {
|
|
2411
|
+
let i = Ar(e, t, r.definitions), a = /* @__PURE__ */ new Map(), o = (e) => {
|
|
2308
2412
|
for (let t of e) if (a.set(t.id, t), t.type === "section") for (let e of t.children) o(e);
|
|
2309
2413
|
else t.type === "wrapper" && o(t.children);
|
|
2310
2414
|
};
|
|
@@ -2320,8 +2424,8 @@ function yr(e, t, n, r) {
|
|
|
2320
2424
|
});
|
|
2321
2425
|
continue;
|
|
2322
2426
|
}
|
|
2323
|
-
let o = Object.hasOwn(r.tokens, t.id) ? r.tokens[t.id] : void 0, u = o ?
|
|
2324
|
-
if (!o || u === null ||
|
|
2427
|
+
let o = Object.hasOwn(r.tokens, t.id) ? r.tokens[t.id] : void 0, u = o ? Or(t.text, o) : null;
|
|
2428
|
+
if (!o || u === null || kr(u, o, r.syntax, n.format, r) === null) {
|
|
2325
2429
|
l.push({
|
|
2326
2430
|
id: t.id,
|
|
2327
2431
|
reason: "tags_changed"
|
|
@@ -2351,21 +2455,21 @@ function yr(e, t, n, r) {
|
|
|
2351
2455
|
};
|
|
2352
2456
|
}
|
|
2353
2457
|
// ../types/src/custom-block-liquid.ts
|
|
2354
|
-
var
|
|
2355
|
-
function
|
|
2458
|
+
var Nr = 1e7, Pr = 2e3;
|
|
2459
|
+
function Fr(e) {
|
|
2356
2460
|
return new e.Liquid({
|
|
2357
2461
|
strictVariables: !1,
|
|
2358
2462
|
strictFilters: !1,
|
|
2359
2463
|
outputEscape: "escape",
|
|
2360
|
-
memoryLimit:
|
|
2361
|
-
renderLimit:
|
|
2464
|
+
memoryLimit: Nr,
|
|
2465
|
+
renderLimit: Pr,
|
|
2362
2466
|
templates: {}
|
|
2363
2467
|
});
|
|
2364
2468
|
}
|
|
2365
2469
|
// ../types/src/factory.ts
|
|
2366
2470
|
function Y(e, t) {
|
|
2367
2471
|
let n = m(e);
|
|
2368
|
-
return !t || Object.keys(t).length === 0 ? n :
|
|
2472
|
+
return !t || Object.keys(t).length === 0 ? n : Nn(n, t);
|
|
2369
2473
|
}
|
|
2370
2474
|
function X(e) {
|
|
2371
2475
|
return e === void 0 ? void 0 : m(e);
|
|
@@ -2373,7 +2477,7 @@ function X(e) {
|
|
|
2373
2477
|
function Z() {
|
|
2374
2478
|
return crypto.randomUUID();
|
|
2375
2479
|
}
|
|
2376
|
-
function
|
|
2480
|
+
function Ir(e = 0) {
|
|
2377
2481
|
return {
|
|
2378
2482
|
top: e,
|
|
2379
2483
|
right: e,
|
|
@@ -2382,100 +2486,100 @@ function Cr(e = 0) {
|
|
|
2382
2486
|
};
|
|
2383
2487
|
}
|
|
2384
2488
|
function Q(e = 10) {
|
|
2385
|
-
return { padding:
|
|
2489
|
+
return { padding: Ir(e) };
|
|
2386
2490
|
}
|
|
2387
|
-
function
|
|
2491
|
+
function Lr(e = {}) {
|
|
2388
2492
|
return Y({
|
|
2389
2493
|
id: Z(),
|
|
2390
2494
|
type: "title",
|
|
2391
|
-
...
|
|
2495
|
+
..._n,
|
|
2392
2496
|
styles: Q()
|
|
2393
2497
|
}, e);
|
|
2394
2498
|
}
|
|
2395
|
-
function
|
|
2499
|
+
function Rr(e = {}) {
|
|
2396
2500
|
return Y({
|
|
2397
2501
|
id: Z(),
|
|
2398
2502
|
type: "paragraph",
|
|
2399
|
-
...
|
|
2503
|
+
...vn,
|
|
2400
2504
|
styles: Q()
|
|
2401
2505
|
}, e);
|
|
2402
2506
|
}
|
|
2403
|
-
function
|
|
2507
|
+
function zr(e = {}) {
|
|
2404
2508
|
return Y({
|
|
2405
2509
|
id: Z(),
|
|
2406
2510
|
type: "image",
|
|
2407
|
-
...
|
|
2511
|
+
...yn,
|
|
2408
2512
|
styles: Q()
|
|
2409
2513
|
}, e);
|
|
2410
2514
|
}
|
|
2411
|
-
function
|
|
2515
|
+
function Br(e = {}) {
|
|
2412
2516
|
return Y({
|
|
2413
2517
|
id: Z(),
|
|
2414
2518
|
type: "button",
|
|
2415
|
-
...
|
|
2519
|
+
...bn,
|
|
2416
2520
|
styles: Q()
|
|
2417
2521
|
}, e);
|
|
2418
2522
|
}
|
|
2419
|
-
function
|
|
2523
|
+
function Vr(e = {}) {
|
|
2420
2524
|
return Y({
|
|
2421
2525
|
id: Z(),
|
|
2422
2526
|
type: "divider",
|
|
2423
|
-
...
|
|
2527
|
+
...xn,
|
|
2424
2528
|
styles: Q(20)
|
|
2425
2529
|
}, e);
|
|
2426
2530
|
}
|
|
2427
|
-
function
|
|
2531
|
+
function Hr(e = {}) {
|
|
2428
2532
|
return Y({
|
|
2429
2533
|
id: Z(),
|
|
2430
2534
|
type: "section",
|
|
2431
|
-
...
|
|
2535
|
+
...Sn,
|
|
2432
2536
|
children: [[]],
|
|
2433
2537
|
styles: Q(20)
|
|
2434
2538
|
}, e);
|
|
2435
2539
|
}
|
|
2436
|
-
function
|
|
2540
|
+
function Ur(e = {}) {
|
|
2437
2541
|
return Y({
|
|
2438
2542
|
id: Z(),
|
|
2439
2543
|
type: "video",
|
|
2440
|
-
...
|
|
2544
|
+
...Cn,
|
|
2441
2545
|
styles: Q()
|
|
2442
2546
|
}, e);
|
|
2443
2547
|
}
|
|
2444
|
-
function
|
|
2548
|
+
function Wr(e = {}) {
|
|
2445
2549
|
return Y({
|
|
2446
2550
|
id: Z(),
|
|
2447
2551
|
type: "social",
|
|
2448
2552
|
icons: [],
|
|
2449
|
-
...
|
|
2553
|
+
...wn,
|
|
2450
2554
|
styles: Q()
|
|
2451
2555
|
}, e);
|
|
2452
2556
|
}
|
|
2453
|
-
function
|
|
2557
|
+
function Gr(e = {}) {
|
|
2454
2558
|
return Y({
|
|
2455
2559
|
id: Z(),
|
|
2456
2560
|
type: "spacer",
|
|
2457
|
-
...
|
|
2561
|
+
...Tn,
|
|
2458
2562
|
styles: Q(0)
|
|
2459
2563
|
}, e);
|
|
2460
2564
|
}
|
|
2461
|
-
function
|
|
2565
|
+
function Kr(e = {}) {
|
|
2462
2566
|
return Y({
|
|
2463
2567
|
id: Z(),
|
|
2464
2568
|
type: "html",
|
|
2465
|
-
...
|
|
2569
|
+
...En,
|
|
2466
2570
|
styles: Q()
|
|
2467
2571
|
}, e);
|
|
2468
2572
|
}
|
|
2469
|
-
function
|
|
2573
|
+
function qr(e = {}) {
|
|
2470
2574
|
return Y({
|
|
2471
2575
|
id: Z(),
|
|
2472
2576
|
type: "menu",
|
|
2473
2577
|
items: [],
|
|
2474
|
-
...
|
|
2578
|
+
...Dn,
|
|
2475
2579
|
styles: Q()
|
|
2476
2580
|
}, e);
|
|
2477
2581
|
}
|
|
2478
|
-
function
|
|
2582
|
+
function Jr(e, t) {
|
|
2479
2583
|
return Array.from({ length: t }, () => ({
|
|
2480
2584
|
id: Z(),
|
|
2481
2585
|
cells: Array.from({ length: e }, () => ({
|
|
@@ -2484,29 +2588,29 @@ function Fr(e, t) {
|
|
|
2484
2588
|
}))
|
|
2485
2589
|
}));
|
|
2486
2590
|
}
|
|
2487
|
-
function
|
|
2591
|
+
function Yr(e = {}) {
|
|
2488
2592
|
return Y({
|
|
2489
2593
|
id: Z(),
|
|
2490
2594
|
type: "table",
|
|
2491
|
-
rows:
|
|
2492
|
-
...
|
|
2595
|
+
rows: Jr(3, 3),
|
|
2596
|
+
...On,
|
|
2493
2597
|
styles: Q()
|
|
2494
2598
|
}, e);
|
|
2495
2599
|
}
|
|
2496
|
-
function
|
|
2600
|
+
function Xr(e = {}) {
|
|
2497
2601
|
return Y({
|
|
2498
2602
|
id: Z(),
|
|
2499
2603
|
type: "countdown",
|
|
2500
|
-
...
|
|
2604
|
+
...kn,
|
|
2501
2605
|
styles: Q()
|
|
2502
2606
|
}, e);
|
|
2503
2607
|
}
|
|
2504
|
-
function
|
|
2608
|
+
function Zr(e) {
|
|
2505
2609
|
return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
|
|
2506
2610
|
}
|
|
2507
|
-
function
|
|
2611
|
+
function Qr(e) {
|
|
2508
2612
|
let t = {};
|
|
2509
|
-
for (let n of e.fields) t[n.key] = X(
|
|
2613
|
+
for (let n of e.fields) t[n.key] = X(Zr(n));
|
|
2510
2614
|
let n = Y(Q(), X(e.defaultStyles));
|
|
2511
2615
|
return {
|
|
2512
2616
|
id: Z(),
|
|
@@ -2517,14 +2621,14 @@ function zr(e) {
|
|
|
2517
2621
|
...e.dataSource ? { dataSourceFetched: !1 } : {}
|
|
2518
2622
|
};
|
|
2519
2623
|
}
|
|
2520
|
-
function
|
|
2624
|
+
function $r() {
|
|
2521
2625
|
return {
|
|
2522
2626
|
id: Z(),
|
|
2523
2627
|
type: "slot",
|
|
2524
2628
|
styles: Q(0)
|
|
2525
2629
|
};
|
|
2526
2630
|
}
|
|
2527
|
-
function
|
|
2631
|
+
function ei(e = {}) {
|
|
2528
2632
|
return Y({
|
|
2529
2633
|
id: Z(),
|
|
2530
2634
|
type: "wrapper",
|
|
@@ -2532,27 +2636,27 @@ function Vr(e = {}) {
|
|
|
2532
2636
|
styles: Q(0)
|
|
2533
2637
|
}, e);
|
|
2534
2638
|
}
|
|
2535
|
-
function
|
|
2639
|
+
function ti(e, t) {
|
|
2536
2640
|
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
|
|
2641
|
+
case "section": return Hr(X(t?.section));
|
|
2642
|
+
case "title": return Lr(X(t?.title));
|
|
2643
|
+
case "paragraph": return Rr(X(t?.paragraph));
|
|
2644
|
+
case "image": return zr(X(t?.image));
|
|
2645
|
+
case "button": return Br(X(t?.button));
|
|
2646
|
+
case "divider": return Vr(X(t?.divider));
|
|
2647
|
+
case "video": return Ur(X(t?.video));
|
|
2648
|
+
case "social": return Wr(X(t?.social));
|
|
2649
|
+
case "spacer": return Gr(X(t?.spacer));
|
|
2650
|
+
case "html": return Kr(X(t?.html));
|
|
2651
|
+
case "menu": return qr(X(t?.menu));
|
|
2652
|
+
case "table": return Yr(X(t?.table));
|
|
2653
|
+
case "countdown": return Xr(X(t?.countdown));
|
|
2550
2654
|
case "slot": throw Error("[Templatical] slot cannot be inserted into content. Use createSlotBlock() to build a layout.");
|
|
2551
2655
|
case "wrapper": throw Error("[Templatical] wrapper cannot be inserted into content. Use createWrapperBlock() to build a layout.");
|
|
2552
2656
|
default: throw Error(`Unknown block type: ${e}`);
|
|
2553
2657
|
}
|
|
2554
2658
|
}
|
|
2555
|
-
function
|
|
2659
|
+
function ni(e, t) {
|
|
2556
2660
|
let n = e.l10n;
|
|
2557
2661
|
if (!n || t.size === 0) return;
|
|
2558
2662
|
let r = (n) => {
|
|
@@ -2567,7 +2671,7 @@ function Ur(e, t) {
|
|
|
2567
2671
|
n && (e[t] = Object.fromEntries(Object.entries(n).map(([e, t]) => [r(e), t])));
|
|
2568
2672
|
}
|
|
2569
2673
|
}
|
|
2570
|
-
function
|
|
2674
|
+
function ri(e) {
|
|
2571
2675
|
let t = JSON.parse(JSON.stringify(e)), n = (e) => {
|
|
2572
2676
|
e.id = Z();
|
|
2573
2677
|
let t = /* @__PURE__ */ new Map(), r = (e, n) => {
|
|
@@ -2584,55 +2688,55 @@ function Wr(e) {
|
|
|
2584
2688
|
if (e.type === "social") for (let t of e.icons) r(t, "icons");
|
|
2585
2689
|
if (e.type === "section") for (let t of e.children) for (let e of t) n(e);
|
|
2586
2690
|
if (e.type === "wrapper") for (let t of e.children) n(t);
|
|
2587
|
-
|
|
2691
|
+
ni(e, t);
|
|
2588
2692
|
};
|
|
2589
2693
|
return n(t), t;
|
|
2590
2694
|
}
|
|
2591
2695
|
// ../types/src/layout.ts
|
|
2592
|
-
var
|
|
2696
|
+
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
2697
|
function $(e, t, n = null, r = !1, i = !1) {
|
|
2594
|
-
for (let a of e) if (t(a, n, r, i),
|
|
2698
|
+
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
2699
|
else V(a) && $(a.children, t, a, r, !0);
|
|
2596
2700
|
}
|
|
2597
|
-
function
|
|
2701
|
+
function di(e) {
|
|
2598
2702
|
let t = 0;
|
|
2599
2703
|
if ($(e.blocks, (e, n, r, i) => {
|
|
2600
|
-
if (i &&
|
|
2601
|
-
if (B(e) && (t += 1, r)) throw Error(
|
|
2704
|
+
if (i && z(e) && e.wrapper) throw Error(li);
|
|
2705
|
+
if (B(e) && (t += 1, r)) throw Error(ai);
|
|
2602
2706
|
if (V(e)) {
|
|
2603
|
-
if (r) throw Error(
|
|
2604
|
-
if (e.children.some(V)) throw Error(
|
|
2707
|
+
if (r) throw Error(ai);
|
|
2708
|
+
if (e.children.some(V)) throw Error(oi);
|
|
2605
2709
|
}
|
|
2606
|
-
}), t !== 1) throw Error(
|
|
2710
|
+
}), t !== 1) throw Error(ii);
|
|
2607
2711
|
}
|
|
2608
|
-
function
|
|
2712
|
+
function fi(e) {
|
|
2609
2713
|
$(e.blocks, (e) => {
|
|
2610
|
-
if (B(e)) throw Error(
|
|
2714
|
+
if (B(e)) throw Error(ci);
|
|
2611
2715
|
});
|
|
2612
2716
|
}
|
|
2613
|
-
function
|
|
2717
|
+
function pi(e) {
|
|
2614
2718
|
$(e.blocks, (e) => {
|
|
2615
|
-
if (V(e)) throw Error(
|
|
2719
|
+
if (V(e)) throw Error(ui);
|
|
2616
2720
|
});
|
|
2617
2721
|
}
|
|
2618
|
-
function
|
|
2722
|
+
function mi(e) {
|
|
2619
2723
|
let t = !1;
|
|
2620
2724
|
return $(e.blocks, (e, n) => {
|
|
2621
2725
|
B(e) && n !== null && V(n) && (t = !0);
|
|
2622
2726
|
}), t;
|
|
2623
2727
|
}
|
|
2624
|
-
function
|
|
2728
|
+
function hi(e) {
|
|
2625
2729
|
if (B(e)) return e;
|
|
2626
2730
|
if (V(e)) {
|
|
2627
|
-
let t =
|
|
2731
|
+
let t = ri({
|
|
2628
2732
|
...e,
|
|
2629
2733
|
children: []
|
|
2630
2734
|
});
|
|
2631
|
-
return t.children = e.children.map(
|
|
2735
|
+
return t.children = e.children.map(hi), t;
|
|
2632
2736
|
}
|
|
2633
|
-
return
|
|
2737
|
+
return ri(e);
|
|
2634
2738
|
}
|
|
2635
|
-
function
|
|
2739
|
+
function gi(e) {
|
|
2636
2740
|
for (let t = 0; t < e.length; t++) {
|
|
2637
2741
|
let n = e[t];
|
|
2638
2742
|
if (B(n)) return {
|
|
@@ -2640,23 +2744,23 @@ function ri(e) {
|
|
|
2640
2744
|
index: t
|
|
2641
2745
|
};
|
|
2642
2746
|
if (V(n)) {
|
|
2643
|
-
let e =
|
|
2747
|
+
let e = gi(n.children);
|
|
2644
2748
|
if (e) return e;
|
|
2645
2749
|
}
|
|
2646
2750
|
}
|
|
2647
2751
|
return null;
|
|
2648
2752
|
}
|
|
2649
|
-
function
|
|
2650
|
-
for (let t of e) if (
|
|
2753
|
+
function _i(e) {
|
|
2754
|
+
for (let t of e) if (z(t)) {
|
|
2651
2755
|
if (t.wrapper) return !0;
|
|
2652
|
-
for (let e of t.children) if (
|
|
2756
|
+
for (let e of t.children) if (_i(e)) return !0;
|
|
2653
2757
|
}
|
|
2654
2758
|
return !1;
|
|
2655
2759
|
}
|
|
2656
|
-
function
|
|
2657
|
-
if (
|
|
2658
|
-
let n = e.blocks.map(
|
|
2659
|
-
if (!r) throw Error(
|
|
2760
|
+
function vi(e, t) {
|
|
2761
|
+
if (di(e), fi(t), pi(t), mi(e) && _i(t.blocks)) throw Error(si);
|
|
2762
|
+
let n = e.blocks.map(hi), r = gi(n);
|
|
2763
|
+
if (!r) throw Error(ii);
|
|
2660
2764
|
return r.parent.splice(r.index, 1, ...m(t.blocks)), {
|
|
2661
2765
|
blocks: n,
|
|
2662
2766
|
settings: {
|
|
@@ -2666,7 +2770,7 @@ function ai(e, t) {
|
|
|
2666
2770
|
};
|
|
2667
2771
|
}
|
|
2668
2772
|
// ../types/src/url-policy.ts
|
|
2669
|
-
var
|
|
2773
|
+
var yi = Object.freeze([
|
|
2670
2774
|
"http",
|
|
2671
2775
|
"https",
|
|
2672
2776
|
"mailto",
|
|
@@ -2676,44 +2780,44 @@ var oi = Object.freeze([
|
|
|
2676
2780
|
"sms",
|
|
2677
2781
|
"xmpp",
|
|
2678
2782
|
"cid"
|
|
2679
|
-
]),
|
|
2783
|
+
]), bi = Object.freeze([
|
|
2680
2784
|
"javascript",
|
|
2681
2785
|
"data",
|
|
2682
2786
|
"vbscript"
|
|
2683
2787
|
]);
|
|
2684
|
-
function
|
|
2788
|
+
function xi(e) {
|
|
2685
2789
|
return e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2686
2790
|
}
|
|
2687
|
-
function
|
|
2688
|
-
let t = /^([a-z][a-z0-9+.-]*):/i.exec(
|
|
2791
|
+
function Si(e) {
|
|
2792
|
+
let t = /^([a-z][a-z0-9+.-]*):/i.exec(xi(e));
|
|
2689
2793
|
return t ? t[1].toLowerCase() : null;
|
|
2690
2794
|
}
|
|
2691
|
-
var
|
|
2795
|
+
var Ci = /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i, wi = Object.freeze([
|
|
2692
2796
|
"href",
|
|
2693
2797
|
"xlink:href",
|
|
2694
2798
|
"background",
|
|
2695
2799
|
"poster",
|
|
2696
2800
|
"src"
|
|
2697
|
-
]),
|
|
2801
|
+
]), Ti = Object.freeze([
|
|
2698
2802
|
"srcdoc",
|
|
2699
2803
|
"ping",
|
|
2700
2804
|
"formaction",
|
|
2701
2805
|
"action"
|
|
2702
2806
|
]);
|
|
2703
|
-
function
|
|
2704
|
-
let n =
|
|
2705
|
-
return r === null ||
|
|
2807
|
+
function Ei(e, t) {
|
|
2808
|
+
let n = xi(e), r = Si(n);
|
|
2809
|
+
return r === null || yi.some((e) => e === r) ? !0 : t.toLowerCase() === "src" && Ci.test(n);
|
|
2706
2810
|
}
|
|
2707
2811
|
// ../types/src/rich-text.ts
|
|
2708
|
-
var
|
|
2709
|
-
function
|
|
2710
|
-
return e.replace(
|
|
2812
|
+
var Di = /<\/?p\b[^<>]*>/gi, Oi = /<p\b([^<>]*)>\s*<\/p>/gi;
|
|
2813
|
+
function ki(e) {
|
|
2814
|
+
return e.replace(Di, "").trim() === "";
|
|
2711
2815
|
}
|
|
2712
|
-
function
|
|
2713
|
-
return
|
|
2816
|
+
function Ai(e) {
|
|
2817
|
+
return ki(e) ? e : e.replace(Oi, "<p$1> </p>");
|
|
2714
2818
|
}
|
|
2715
2819
|
// ../types/src/fonts.ts
|
|
2716
|
-
var
|
|
2820
|
+
var ji = {
|
|
2717
2821
|
arial: "Arial, sans-serif",
|
|
2718
2822
|
helvetica: "Helvetica, sans-serif",
|
|
2719
2823
|
georgia: "Georgia, serif",
|
|
@@ -2722,13 +2826,13 @@ var vi = {
|
|
|
2722
2826
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2723
2827
|
"courier new": "'Courier New', monospace",
|
|
2724
2828
|
tahoma: "Tahoma, sans-serif"
|
|
2725
|
-
},
|
|
2829
|
+
}, Mi = /* @__PURE__ */ new Set([
|
|
2726
2830
|
"inherit",
|
|
2727
2831
|
"initial",
|
|
2728
2832
|
"unset",
|
|
2729
2833
|
"revert",
|
|
2730
2834
|
"revert-layer"
|
|
2731
|
-
]),
|
|
2835
|
+
]), Ni = /* @__PURE__ */ new Set([
|
|
2732
2836
|
"serif",
|
|
2733
2837
|
"sans-serif",
|
|
2734
2838
|
"monospace",
|
|
@@ -2743,14 +2847,14 @@ var vi = {
|
|
|
2743
2847
|
"math",
|
|
2744
2848
|
"fangsong"
|
|
2745
2849
|
]);
|
|
2746
|
-
function
|
|
2850
|
+
function Pi(e) {
|
|
2747
2851
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
2748
2852
|
}
|
|
2749
|
-
function
|
|
2853
|
+
function Fi(e) {
|
|
2750
2854
|
if (typeof e != "string") return [];
|
|
2751
2855
|
let t = e.replace(/!\s*important\s*$/i, ""), n = [], r = 0;
|
|
2752
2856
|
for (;;) {
|
|
2753
|
-
for (; r < t.length &&
|
|
2857
|
+
for (; r < t.length && Pi(t[r]);) r++;
|
|
2754
2858
|
if (r >= t.length) return [];
|
|
2755
2859
|
let e = t[r];
|
|
2756
2860
|
if (e === "\"" || e === "'") {
|
|
@@ -2767,7 +2871,7 @@ function Si(e) {
|
|
|
2767
2871
|
}
|
|
2768
2872
|
}
|
|
2769
2873
|
if (!o) return [];
|
|
2770
|
-
for (; a < t.length &&
|
|
2874
|
+
for (; a < t.length && Pi(t[a]);) a++;
|
|
2771
2875
|
if (a < t.length && t[a] !== ",") return [];
|
|
2772
2876
|
n.push({
|
|
2773
2877
|
name: i,
|
|
@@ -2775,7 +2879,7 @@ function Si(e) {
|
|
|
2775
2879
|
}), r = a;
|
|
2776
2880
|
} else {
|
|
2777
2881
|
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("'") ||
|
|
2882
|
+
if (a === "" || a.includes("\"") || a.includes("'") || Mi.has(a.toLowerCase())) return [];
|
|
2779
2883
|
n.push({
|
|
2780
2884
|
name: a,
|
|
2781
2885
|
quoted: !1
|
|
@@ -2785,27 +2889,27 @@ function Si(e) {
|
|
|
2785
2889
|
r++;
|
|
2786
2890
|
}
|
|
2787
2891
|
}
|
|
2788
|
-
function
|
|
2892
|
+
function Ii(e) {
|
|
2789
2893
|
return `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
2790
2894
|
}
|
|
2791
|
-
function
|
|
2792
|
-
return !e.quoted &&
|
|
2895
|
+
function Li(e) {
|
|
2896
|
+
return !e.quoted && Ni.has(e.name.toLowerCase());
|
|
2793
2897
|
}
|
|
2794
|
-
function
|
|
2795
|
-
return
|
|
2898
|
+
function Ri(e) {
|
|
2899
|
+
return Fi(e)[0]?.name ?? "";
|
|
2796
2900
|
}
|
|
2797
|
-
function
|
|
2798
|
-
let n = (e) => `${
|
|
2901
|
+
function zi(e, t) {
|
|
2902
|
+
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
2903
|
if (i) return n(i);
|
|
2800
|
-
let a =
|
|
2904
|
+
let a = Fi(e);
|
|
2801
2905
|
if (a.length !== 1) return e;
|
|
2802
2906
|
let [o] = a, s = o.name.toLowerCase(), c = t.customFonts.find((e) => e.name.toLowerCase() === s);
|
|
2803
|
-
return c ? n(c) :
|
|
2907
|
+
return c ? n(c) : ji[s] || (Li(o) ? e : `${Ii(o.name)}, ${t.defaultFallback}`);
|
|
2804
2908
|
}
|
|
2805
2909
|
// ../types/src/preview-resolution.ts
|
|
2806
|
-
function
|
|
2910
|
+
function Bi(e) {
|
|
2807
2911
|
return typeof e != "object" || !e ? !1 : Array.isArray(e.blocks);
|
|
2808
2912
|
}
|
|
2809
|
-
export {
|
|
2913
|
+
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
2914
|
|
|
2811
|
-
//# sourceMappingURL=src-
|
|
2915
|
+
//# sourceMappingURL=src-BHgVGOTi.js.map
|