@templatical/editor 0.59.1 → 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-CwyKz_9U.js → AiAltTextPopover-DiIaqDtB.js} +3 -3
- package/dist/{AiAltTextReview-DNFnR1PN.js → AiAltTextReview-DIe0WBbj.js} +3 -3
- package/dist/{AiChatPanel-DWWVvJIP.js → AiChatPanel-aj2TPO9F.js} +10 -10
- package/dist/{AiPanels-CESbBB63.js → AiPanels-CRM3jf82.js} +1 -1
- package/dist/{AiRewriteMenu-DH6j1jOA.js → AiRewriteMenu-F3GyXBsk.js} +11 -11
- package/dist/{BlockIssueBadge-3k568_Od.js → BlockIssueBadge-DlhA_I6J.js} +4 -4
- package/dist/{BlockPreviewCanvas-BLJxLwTT.js → BlockPreviewCanvas-DYspUXMO.js} +29 -50
- package/dist/{CloudHeaderExtras-xrHubAHL.js → CloudHeaderExtras-DC_oNrxz.js} +1 -1
- package/dist/{CloudPanels-qW-MObRD.js → CloudPanels-CAMn545-.js} +4 -4
- package/dist/{CollaborationNotices-D9GQ477K.js → CollaborationNotices-CnfS8BQy.js} +2 -2
- package/dist/{CollaboratorBar-DsRjAaqd.js → CollaboratorBar-DufLdLQP.js} +2 -2
- package/dist/{CommentsPanel-lb-IFzjl.js → CommentsPanel-C2hFFs0o.js} +1 -1
- package/dist/{CommentsSidebar-CVVTCWBH.js → CommentsSidebar-CgEwxt2T.js} +12 -12
- package/dist/{CountdownBlock-CSEq79Nc.js → CountdownBlock-AYPypmcX.js} +2 -2
- package/dist/{CountdownToolbar-BV9yQi9k.js → CountdownToolbar-CNqYDevp.js} +5 -5
- package/dist/{IssuesPanel-pxcWAQJM.js → IssuesPanel-cPKhimE9.js} +12 -12
- package/dist/{LanguageMenu-D_xbvq3D.js → LanguageMenu-zxlpmw2x.js} +14 -14
- package/dist/{LocaleNotices-j4aMFfmc.js → LocaleNotices-PIfpvCCI.js} +4 -4
- package/dist/{LogicTagInsertButton-BDIsyl3C.js → LogicTagInsertButton-DqTkGJSR.js} +21 -21
- package/dist/{MediaEditModal-BWOqjEZN.js → MediaEditModal-C2Bn8WGb.js} +1 -1
- package/dist/{MediaPanels-C-XrldMu.js → MediaPanels-BAZByHRA.js} +1 -1
- package/dist/{MergeTagInput-De1yWoc2.js → MergeTagInput-Jly1Pw0v.js} +1 -1
- package/dist/{MergeTagModeToggle-CL96pI1E.js → MergeTagModeToggle-5kaFLRAm.js} +6 -6
- package/dist/{MergeTagTextarea-DDyV8U44.js → MergeTagTextarea-CCfirhcR.js} +7 -7
- package/dist/{ParagraphEditor-DpOsnnai.js → ParagraphEditor-DTdnxgDZ.js} +46 -46
- package/dist/{RestoreVersionDialog-JQEkVIh5.js → RestoreVersionDialog-cUYu3Xqs.js} +4 -4
- package/dist/{RichTextEditorContent-C2Yj1-ZA.js → RichTextEditorContent-Aub9tOHF.js} +8 -8
- package/dist/{SaveBlockDialog-BPf6tDhg.js → SaveBlockDialog-D_ie3uIF.js} +9 -9
- package/dist/{SavedBlocksBrowserModal-DnDCfwSv.js → SavedBlocksBrowserModal-fhSnYT1l.js} +11 -11
- package/dist/{SavedBlocksPanels-D5YaVCem.js → SavedBlocksPanels-Lklqy4XI.js} +1 -1
- package/dist/{SavedBlocksPickBar-OQ7ey3MD.js → SavedBlocksPickBar-CpWkCa8G.js} +3 -3
- package/dist/{TemplateSettings-CBCaybvd.js → TemplateSettings-BJ4a8RBr.js} +12 -12
- package/dist/{TestEmailModal-BDp85wIp.js → TestEmailModal-BEoapoDc.js} +14 -12
- package/dist/{TestEmailPanel-DkJx0Ptk.js → TestEmailPanel-DgyzokCf.js} +1 -1
- package/dist/{TitleEditor-wzknZqu_.js → TitleEditor-BQoSPgOi.js} +13 -13
- package/dist/{Toolbar-FIYSw3Us.js → Toolbar-KhPpWyX1.js} +857 -756
- package/dist/{TplModal-C57J-uF0.js → TplModal-F_kA7luG.js} +4 -4
- package/dist/{VersionHistoryMenu-6jMve6By.js → VersionHistoryMenu-Bz4G8cNm.js} +7 -7
- package/dist/{VersionHistoryPanels-BZ0GT52h.js → VersionHistoryPanels-DmVRyWv9.js} +1 -1
- package/dist/{VersionPreviewBanner-Bq8z1SUc.js → VersionPreviewBanner-BeppXZyn.js} +2 -2
- package/dist/{WrapperBlock-C4XrJkx5.js → WrapperBlock-Ds7yfbhg.js} +4 -4
- package/dist/{blockTypeIcons-VX_8UQ21.js → blockTypeIcons-Do1QqDjg.js} +3 -3
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-YfIxwO1G.js → ca-Ce3NmK9v.js} +6 -1
- package/dist/cdn/chunks/{AiAltTextPopover-Dj-VLU88.js → AiAltTextPopover-CUzIaLRK.js} +4 -4
- package/dist/cdn/chunks/AiAltTextPopover-CUzIaLRK.js.map +1 -0
- package/dist/cdn/chunks/{AiAltTextReview-tVkJPOk6.js → AiAltTextReview-BXBlE71X.js} +4 -4
- package/dist/cdn/chunks/AiAltTextReview-BXBlE71X.js.map +1 -0
- package/dist/cdn/chunks/{AiChatPanel-CYPvHQGQ.js → AiChatPanel-BKydciDQ.js} +4 -4
- package/dist/cdn/chunks/AiChatPanel-BKydciDQ.js.map +1 -0
- package/dist/cdn/chunks/{AiPanels-ChTLCmMS.js → AiPanels-De-cIZ4p.js} +2 -2
- package/dist/cdn/chunks/AiPanels-De-cIZ4p.js.map +1 -0
- package/dist/cdn/chunks/{AiRewriteMenu-B23ozFnP.js → AiRewriteMenu-C9vBUTIB.js} +9 -9
- package/dist/cdn/chunks/AiRewriteMenu-C9vBUTIB.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-BKO4Mr8f.js → BlockIssueBadge-B3CTTvgw.js} +4 -4
- package/dist/cdn/chunks/BlockIssueBadge-B3CTTvgw.js.map +1 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-CaRneMZ8.js → BlockPreviewCanvas-B4Bj--kc.js} +30 -51
- package/dist/cdn/chunks/BlockPreviewCanvas-B4Bj--kc.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-O_K3jmgO.js → CloudHeaderExtras-Cd-ePldd.js} +2 -2
- package/dist/cdn/chunks/CloudHeaderExtras-Cd-ePldd.js.map +1 -0
- package/dist/cdn/chunks/{CloudPanels-xAEirqNC.js → CloudPanels-CQ75I3hQ.js} +4 -4
- package/dist/cdn/chunks/CloudPanels-CQ75I3hQ.js.map +1 -0
- package/dist/cdn/chunks/{CollaborationNotices-CwAoa-73.js → CollaborationNotices-CgLea-hu.js} +3 -3
- package/dist/cdn/chunks/CollaborationNotices-CgLea-hu.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-DdQQwtwd.js → CollaboratorBar-CjRcbebT.js} +3 -3
- package/dist/cdn/chunks/CollaboratorBar-CjRcbebT.js.map +1 -0
- package/dist/cdn/chunks/{CommentsPanel-C8AKtxiG.js → CommentsPanel-D_ud9GMN.js} +2 -2
- package/dist/cdn/chunks/CommentsPanel-D_ud9GMN.js.map +1 -0
- package/dist/cdn/chunks/{CommentsSidebar-FxY0RHSq.js → CommentsSidebar-CXn1EGAI.js} +4 -4
- package/dist/cdn/chunks/CommentsSidebar-CXn1EGAI.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-DGgnPUlu.js → CountdownBlock--hlKE2aj.js} +3 -3
- package/dist/cdn/chunks/CountdownBlock--hlKE2aj.js.map +1 -0
- package/dist/cdn/chunks/{CountdownToolbar-9PtYUgCW.js → CountdownToolbar-BOyk_4k7.js} +6 -6
- package/dist/cdn/chunks/CountdownToolbar-BOyk_4k7.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-Co-ffgWa.js → IssuesPanel-DOC94ZsH.js} +8 -8
- package/dist/cdn/chunks/IssuesPanel-DOC94ZsH.js.map +1 -0
- package/dist/cdn/chunks/{LanguageMenu-Cl0ajnXZ.js → LanguageMenu-DktneIpL.js} +100 -100
- package/dist/cdn/chunks/LanguageMenu-DktneIpL.js.map +1 -0
- package/dist/cdn/chunks/{LocaleNotices-BVDJ7kyj.js → LocaleNotices-B2NgnHoP.js} +4 -4
- package/dist/cdn/chunks/LocaleNotices-B2NgnHoP.js.map +1 -0
- package/dist/cdn/chunks/{LogicTagInsertButton-DPYA8LJW.js → LogicTagInsertButton-CQ8RiOou.js} +10 -10
- 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-Cxfjq3tx.js → MergeTagInput-D7FZ0ca0.js} +2 -2
- package/dist/cdn/chunks/MergeTagInput-D7FZ0ca0.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagModeToggle-BmNGV3yc.js → MergeTagModeToggle-CySCCEDs.js} +5 -5
- package/dist/cdn/chunks/MergeTagModeToggle-CySCCEDs.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagTextarea-DmwrPAss.js → MergeTagTextarea-DJbWTYVH.js} +6 -6
- package/dist/cdn/chunks/MergeTagTextarea-DJbWTYVH.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-BoGELRr-.js → ParagraphEditor-DAQUWqQJ.js} +26 -26
- package/dist/cdn/chunks/ParagraphEditor-DAQUWqQJ.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-CaKiSq-9.js → RestoreVersionDialog-COTRe_rM.js} +4 -4
- package/dist/cdn/chunks/RestoreVersionDialog-COTRe_rM.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-Dq4TROOg.js → RichTextEditorContent-DeWPMd9V.js} +8 -8
- package/dist/cdn/chunks/RichTextEditorContent-DeWPMd9V.js.map +1 -0
- package/dist/cdn/chunks/{SaveBlockDialog-BAR0G4UO.js → SaveBlockDialog-adQMbKR1.js} +8 -8
- package/dist/cdn/chunks/SaveBlockDialog-adQMbKR1.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-C-KYaLkQ.js → SavedBlocksBrowserModal-CGIFCRAx.js} +8 -8
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CGIFCRAx.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-C3OF0EeB.js → SavedBlocksPanels-Du0RYlEf.js} +2 -2
- package/dist/cdn/chunks/SavedBlocksPanels-Du0RYlEf.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPickBar-BnyPXw5W.js → SavedBlocksPickBar-DmleyUrn.js} +4 -4
- package/dist/cdn/chunks/SavedBlocksPickBar-DmleyUrn.js.map +1 -0
- package/dist/cdn/chunks/{TemplateSettings-uoiUkd2l.js → TemplateSettings-Csjef99q.js} +10 -10
- package/dist/cdn/chunks/TemplateSettings-Csjef99q.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-B9d3ZsH7.js → TestEmailModal-ClkexOtF.js} +13 -11
- package/dist/cdn/chunks/TestEmailModal-ClkexOtF.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel--fPi6QjN.js → TestEmailPanel-DYEYzhU2.js} +2 -2
- package/dist/cdn/chunks/TestEmailPanel-DYEYzhU2.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-Cn4fnSpa.js → TitleEditor-opvaIgVr.js} +12 -12
- 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-BzAuH2G4.js → Toolbar-DbqkKRXy.js} +825 -724
- package/dist/cdn/chunks/Toolbar-DbqkKRXy.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-jMfK19PC.js → TplModal-DLV5OeMD.js} +5 -5
- package/dist/cdn/chunks/TplModal-DLV5OeMD.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryMenu-DDqYMqC2.js → VersionHistoryMenu-DBd0zwjE.js} +4 -4
- package/dist/cdn/chunks/VersionHistoryMenu-DBd0zwjE.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-DJpySkvq.js → VersionHistoryPanels-hy_Ybxie.js} +2 -2
- package/dist/cdn/chunks/VersionHistoryPanels-hy_Ybxie.js.map +1 -0
- package/dist/cdn/chunks/{VersionPreviewBanner-CYT5QUoc.js → VersionPreviewBanner-D-yHxWWY.js} +3 -3
- package/dist/cdn/chunks/VersionPreviewBanner-D-yHxWWY.js.map +1 -0
- package/dist/cdn/chunks/{WrapperBlock-Bi9XgDmX.js → WrapperBlock-Ce_k8m_x.js} +5 -5
- 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/cdn/chunks/{ca-YfIxwO1G.js → ca-Ce3NmK9v.js} +7 -2
- package/dist/cdn/chunks/ca-Ce3NmK9v.js.map +1 -0
- package/dist/cdn/chunks/{composables-Cp6gZ7qV.js → composables-Brr4m0Sg.js} +526 -550
- package/dist/cdn/chunks/composables-Brr4m0Sg.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-D8zeR9D2.js → createCloudRuntime-QPeg45XL.js} +4 -4
- package/dist/cdn/chunks/{createCloudRuntime-D8zeR9D2.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-BYJPv1sA.js → extensions-BpuyqKVY.js} +6 -6
- package/dist/cdn/chunks/extensions-BpuyqKVY.js.map +1 -0
- package/dist/cdn/chunks/{fr-DqwQHtJo.js → fr-D3MjrsgQ.js} +7 -2
- 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/{ja-BH4MS1Ye.js → cdn/chunks/ja-B4Kx7uBX.js} +8 -1
- package/dist/cdn/chunks/ja-B4Kx7uBX.js.map +1 -0
- package/dist/cdn/chunks/keys-ywH4jHJ2.js +11 -0
- package/dist/cdn/chunks/keys-ywH4jHJ2.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-nDyYIXvL.js → normalizeMergeTagMarkup-B81BAWKT.js} +61 -61
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-nDyYIXvL.js.map → normalizeMergeTagMarkup-B81BAWKT.js.map} +1 -1
- package/dist/{preRenderCustomBlocks-CgPtlLGL.js → cdn/chunks/preRenderCustomBlocks-CQuaMxuv.js} +3 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-CxwYcAQe.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-5T_KaDcp.js → sanitizeHtml-BdAjvU9I.js} +2 -2
- package/dist/cdn/chunks/{sanitizeHtml-5T_KaDcp.js.map → sanitizeHtml-BdAjvU9I.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-bvQ57o1m.js → socialIcons-Df9dNe7I.js} +463 -485
- package/dist/cdn/chunks/socialIcons-Df9dNe7I.js.map +1 -0
- package/dist/cdn/chunks/{src-BRyzUujm.js → src-B3v_3j9b.js} +586 -554
- package/dist/cdn/chunks/src-B3v_3j9b.js.map +1 -0
- package/dist/{dist-BTjObRcv.js → cdn/chunks/src-BHgVGOTi.js} +872 -700
- 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/{useCloudI18n-CWgySYuJ.js → useCloudI18n-BTV9uu3c.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-CWgySYuJ.js.map → useCloudI18n-BTV9uu3c.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorRoot-BA4vV7sK.js → useEditorRoot-D0Lp2x4_.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-BA4vV7sK.js.map → useEditorRoot-D0Lp2x4_.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-JsIdvX-i.js → useI18n-DPg6rPbu.js} +2 -2
- package/dist/cdn/chunks/{useI18n-JsIdvX-i.js.map → useI18n-DPg6rPbu.js.map} +1 -1
- package/dist/cdn/chunks/useLocalizedDisplay-C3lIetmX.js +33 -0
- package/dist/cdn/chunks/{useLocalizedDisplay-7iwZ1UhB.js.map → useLocalizedDisplay-C3lIetmX.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-C10Wef7d.js → useLogicTag-DOIlsGk8.js} +3 -3
- package/dist/cdn/chunks/{useLogicTag-C10Wef7d.js.map → useLogicTag-DOIlsGk8.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-Dd26TcvH.js → useMergeTag-DUNl364g.js} +3 -3
- package/dist/cdn/chunks/{useMergeTag-Dd26TcvH.js.map → useMergeTag-DUNl364g.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-DWRQRT2P.js → usePopoverPosition-CBp9uwjV.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-DWRQRT2P.js.map → usePopoverPosition-CBp9uwjV.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-CArjwH-u.js → useScrollToBlock-32EnuMwu.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-CArjwH-u.js.map → useScrollToBlock-32EnuMwu.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-BaeBoPQZ.js → withCurrentFont-ufGLu2Vt.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-BaeBoPQZ.js.map → withCurrentFont-ufGLu2Vt.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +573 -573
- 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-jTnTSqdm.js → composables-5KJV0O9T.js} +933 -957
- package/dist/{createCloudRuntime-DiUnYjKr.js → createCloudRuntime-BdoKeYJi.js} +3 -3
- 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/{cdn/chunks/src-CVHGPKSW.js → dist-DsA7NeIy.js} +691 -649
- 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-CAuXwpbI.js → extensions-DCJGAZ9z.js} +74 -74
- package/dist/{eye-DK4--qHk.js → eye-BE-DeEqG.js} +1 -1
- package/dist/{fr-DqwQHtJo.js → fr-D3MjrsgQ.js} +6 -1
- 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/{cdn/chunks/ja-BH4MS1Ye.js → ja-B4Kx7uBX.js} +6 -3
- package/dist/keys-B4DimcgX.js +9 -0
- 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-fgoVMKAc.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/{cdn/chunks/preRenderCustomBlocks-CxwYcAQe.js → preRenderCustomBlocks-D3GzENVB.js} +1 -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-D2wueiEe.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-RKdTgJip.js → socialIcons-By2LPWOQ.js} +563 -585
- package/dist/{sparkles-Dc3Undp5.js → sparkles-DSi61skE.js} +1 -1
- package/dist/{square-CPw_cyX8.js → square-DEE8tT2w.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +640 -640
- 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/{useCloudI18n-nMZ9f_4b.js → useCloudI18n-BnuOL1YS.js} +1 -1
- package/dist/{useEditorRoot-DpssP9rX.js → useEditorRoot-DWfC2CVC.js} +1 -1
- package/dist/{useI18n-C2p-qHeb.js → useI18n-Cx9W7OWb.js} +1 -1
- package/dist/useLocalizedDisplay-_P6-hXaO.js +31 -0
- package/dist/{useLogicTag-59fmujI7.js → useLogicTag-f0SJ1Cd2.js} +2 -2
- package/dist/{useMergeTag-M1vauWet.js → useMergeTag-0-EudwkV.js} +4 -4
- package/dist/{usePopoverPosition-L9MOHBM-.js → usePopoverPosition-DF0ZYH7g.js} +1 -1
- package/dist/{useScrollToBlock-BMF0Dt5l.js → useScrollToBlock-CtM_ydOS.js} +2 -2
- 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-Dj-VLU88.js.map +0 -1
- package/dist/cdn/chunks/AiAltTextReview-tVkJPOk6.js.map +0 -1
- package/dist/cdn/chunks/AiChatPanel-CYPvHQGQ.js.map +0 -1
- package/dist/cdn/chunks/AiPanels-ChTLCmMS.js.map +0 -1
- package/dist/cdn/chunks/AiRewriteMenu-B23ozFnP.js.map +0 -1
- package/dist/cdn/chunks/BlockIssueBadge-BKO4Mr8f.js.map +0 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-CaRneMZ8.js.map +0 -1
- package/dist/cdn/chunks/CloudHeaderExtras-O_K3jmgO.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-xAEirqNC.js.map +0 -1
- package/dist/cdn/chunks/CollaborationNotices-CwAoa-73.js.map +0 -1
- package/dist/cdn/chunks/CollaboratorBar-DdQQwtwd.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-C8AKtxiG.js.map +0 -1
- package/dist/cdn/chunks/CommentsSidebar-FxY0RHSq.js.map +0 -1
- package/dist/cdn/chunks/CountdownBlock-DGgnPUlu.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-9PtYUgCW.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-Co-ffgWa.js.map +0 -1
- package/dist/cdn/chunks/LanguageMenu-Cl0ajnXZ.js.map +0 -1
- package/dist/cdn/chunks/LocaleNotices-BVDJ7kyj.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-DPYA8LJW.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-Cxfjq3tx.js.map +0 -1
- package/dist/cdn/chunks/MergeTagModeToggle-BmNGV3yc.js.map +0 -1
- package/dist/cdn/chunks/MergeTagTextarea-DmwrPAss.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-BoGELRr-.js.map +0 -1
- package/dist/cdn/chunks/RestoreVersionDialog-CaKiSq-9.js.map +0 -1
- package/dist/cdn/chunks/RichTextEditorContent-Dq4TROOg.js.map +0 -1
- package/dist/cdn/chunks/SaveBlockDialog-BAR0G4UO.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-C-KYaLkQ.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPanels-C3OF0EeB.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPickBar-BnyPXw5W.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-uoiUkd2l.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-B9d3ZsH7.js.map +0 -1
- package/dist/cdn/chunks/TestEmailPanel--fPi6QjN.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-Cn4fnSpa.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-BzAuH2G4.js.map +0 -1
- package/dist/cdn/chunks/TplModal-jMfK19PC.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryMenu-DDqYMqC2.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryPanels-DJpySkvq.js.map +0 -1
- package/dist/cdn/chunks/VersionPreviewBanner-CYT5QUoc.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-Bi9XgDmX.js.map +0 -1
- package/dist/cdn/chunks/ca-YfIxwO1G.js.map +0 -1
- package/dist/cdn/chunks/composables-Cp6gZ7qV.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-BYJPv1sA.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/keys-DNv3xXxI.js +0 -11
- package/dist/cdn/chunks/keys-DNv3xXxI.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-bvQ57o1m.js.map +0 -1
- package/dist/cdn/chunks/src-BRyzUujm.js.map +0 -1
- package/dist/cdn/chunks/src-CVHGPKSW.js.map +0 -1
- package/dist/cdn/chunks/src-aFRxbwqP.js +0 -707
- package/dist/cdn/chunks/src-aFRxbwqP.js.map +0 -1
- package/dist/cdn/chunks/tiptap-B7gxx0aJ.js.map +0 -1
- package/dist/cdn/chunks/useLocalizedDisplay-7iwZ1UhB.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/keys-BeQy64On.js +0 -9
- package/dist/useLocalizedDisplay-9RqT2y_Y.js +0 -31
- package/dist/withCurrentFont-BXZ7g-K6.js +0 -18
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// ../types/
|
|
1
|
+
// ../types/dist/index.js
|
|
2
2
|
var e = [
|
|
3
3
|
"top",
|
|
4
4
|
"right",
|
|
@@ -37,7 +37,7 @@ function a(e) {
|
|
|
37
37
|
}
|
|
38
38
|
function o(e) {
|
|
39
39
|
if (e == null) return null;
|
|
40
|
-
let t =
|
|
40
|
+
let t = typeof e == "number" ? i.map(() => a(e)) : i.map((t) => a(e[t]));
|
|
41
41
|
return t.every((e) => e === 0) ? null : t.every((e) => e === t[0]) ? `${t[0]}px` : t.map((e) => `${e}px`).join(" ");
|
|
42
42
|
}
|
|
43
43
|
var s = {
|
|
@@ -45,195 +45,36 @@ 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
|
-
};
|
|
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;
|
|
76
63
|
}
|
|
77
|
-
function
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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}`);
|
|
82
74
|
}
|
|
83
|
-
return t;
|
|
75
|
+
return Number(`${n}e${t}`);
|
|
84
76
|
}
|
|
85
77
|
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;
|
|
128
|
-
}
|
|
129
|
-
function oe(e) {
|
|
130
|
-
let t = e?.naturalWidth, n = e?.naturalHeight;
|
|
131
|
-
return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0 ? null : n / t;
|
|
132
|
-
}
|
|
133
|
-
// ../types/src/social.ts
|
|
134
|
-
var se = {
|
|
135
|
-
facebook: {
|
|
136
|
-
color: "#1877F2",
|
|
137
|
-
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"
|
|
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"
|
|
206
|
-
}
|
|
207
|
-
}, ce = {
|
|
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;
|
|
234
|
-
}
|
|
235
|
-
// ../types/src/element-ids.ts
|
|
236
|
-
function me(e) {
|
|
237
78
|
let t = [], n = (e, n) => {
|
|
238
79
|
typeof e == "string" && /[./]/.test(e) && t.push({
|
|
239
80
|
path: n,
|
|
@@ -251,7 +92,6 @@ function me(e) {
|
|
|
251
92
|
};
|
|
252
93
|
return r(e.blocks, "blocks"), t;
|
|
253
94
|
}
|
|
254
|
-
// ../types/src/clone.ts
|
|
255
95
|
function m(e) {
|
|
256
96
|
let t = [];
|
|
257
97
|
return JSON.parse(JSON.stringify(e, function(e, n) {
|
|
@@ -260,23 +100,21 @@ function m(e) {
|
|
|
260
100
|
if (!t.includes(n)) return t.push(n), n;
|
|
261
101
|
}));
|
|
262
102
|
}
|
|
263
|
-
|
|
264
|
-
function he(e) {
|
|
103
|
+
function re(e) {
|
|
265
104
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
266
105
|
}
|
|
267
106
|
function h(e, t) {
|
|
268
107
|
if (e === t) return !0;
|
|
269
108
|
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 (!
|
|
109
|
+
if (re(e)) {
|
|
110
|
+
if (!re(t)) return !1;
|
|
272
111
|
let n = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
|
|
273
112
|
for (let r of n) if ((e[r] !== void 0 || t[r] !== void 0) && !h(e[r], t[r])) return !1;
|
|
274
113
|
return !0;
|
|
275
114
|
}
|
|
276
115
|
return !1;
|
|
277
116
|
}
|
|
278
|
-
|
|
279
|
-
var ge = class extends Error {
|
|
117
|
+
var ie = class extends Error {
|
|
280
118
|
statusCode;
|
|
281
119
|
code;
|
|
282
120
|
constructor(e, t, n, r) {
|
|
@@ -291,7 +129,7 @@ var ge = class extends Error {
|
|
|
291
129
|
get isServerError() {
|
|
292
130
|
return this.statusCode !== void 0 && this.statusCode >= 500;
|
|
293
131
|
}
|
|
294
|
-
},
|
|
132
|
+
}, ae = {
|
|
295
133
|
title: ["content"],
|
|
296
134
|
paragraph: ["content"],
|
|
297
135
|
html: ["content"],
|
|
@@ -309,27 +147,27 @@ var ge = class extends Error {
|
|
|
309
147
|
],
|
|
310
148
|
custom: ["fieldValues.*"]
|
|
311
149
|
}, g = ["preheaderText"];
|
|
312
|
-
function
|
|
150
|
+
function oe(e) {
|
|
313
151
|
return typeof e == "string" && /^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$/.test(e);
|
|
314
152
|
}
|
|
315
153
|
function _(e) {
|
|
316
154
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
317
155
|
}
|
|
318
|
-
var
|
|
156
|
+
var se = /* @__PURE__ */ new Set([
|
|
319
157
|
"__proto__",
|
|
320
158
|
"constructor",
|
|
321
159
|
"prototype"
|
|
322
160
|
]);
|
|
323
161
|
function v(e) {
|
|
324
|
-
return e.split(".").every((e) => e !== "" && !
|
|
162
|
+
return e.split(".").every((e) => e !== "" && !se.has(e));
|
|
325
163
|
}
|
|
326
|
-
function
|
|
327
|
-
if (!
|
|
164
|
+
function ce(e, t) {
|
|
165
|
+
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
166
|
}
|
|
329
167
|
function y(e, t) {
|
|
330
|
-
return t.split(".").reduce(
|
|
168
|
+
return t.split(".").reduce(ce, e);
|
|
331
169
|
}
|
|
332
|
-
function
|
|
170
|
+
function le(e) {
|
|
333
171
|
let t = m(e);
|
|
334
172
|
for (let [n, r] of Object.entries(t.l10n ?? {})) {
|
|
335
173
|
for (let t of ["text", "set"]) {
|
|
@@ -343,23 +181,23 @@ function xe(e) {
|
|
|
343
181
|
}
|
|
344
182
|
return t.l10n && !Object.keys(t.l10n).length && delete t.l10n, h(t, e) ? e : t;
|
|
345
183
|
}
|
|
346
|
-
function
|
|
347
|
-
let t =
|
|
184
|
+
function ue(e) {
|
|
185
|
+
let t = le(e);
|
|
348
186
|
if (t.type === "wrapper") {
|
|
349
|
-
let e = t.children.map(
|
|
187
|
+
let e = t.children.map(ue);
|
|
350
188
|
return e.some((e, n) => e !== t.children[n]) ? {
|
|
351
189
|
...t,
|
|
352
190
|
children: e
|
|
353
191
|
} : t;
|
|
354
192
|
}
|
|
355
193
|
if (t.type !== "section") return t;
|
|
356
|
-
let n = t.children.map((e) => e.map(
|
|
194
|
+
let n = t.children.map((e) => e.map(ue));
|
|
357
195
|
return n.some((e, n) => e.some((e, r) => e !== t.children[n][r])) ? {
|
|
358
196
|
...t,
|
|
359
197
|
children: n
|
|
360
198
|
} : t;
|
|
361
199
|
}
|
|
362
|
-
function
|
|
200
|
+
function de(e, t, n) {
|
|
363
201
|
if (e.type === "custom") return !1;
|
|
364
202
|
if (e.type === "section") return t === "columns";
|
|
365
203
|
let r = e.type === "menu" ? "items" : e.type === "social" ? "icons" : e.type === "table" ? "rows" : null;
|
|
@@ -380,33 +218,33 @@ function Se(e, t, n) {
|
|
|
380
218
|
}
|
|
381
219
|
return !1;
|
|
382
220
|
}
|
|
383
|
-
function
|
|
384
|
-
return
|
|
221
|
+
function fe(e) {
|
|
222
|
+
return le(e);
|
|
385
223
|
}
|
|
386
|
-
function
|
|
224
|
+
function b(e, t, n) {
|
|
387
225
|
if (!v(t)) return !1;
|
|
388
|
-
let r = t.split("."), i = r.pop(), a = r.reduce(
|
|
226
|
+
let r = t.split("."), i = r.pop(), a = r.reduce(ce, e);
|
|
389
227
|
if (Array.isArray(a)) {
|
|
390
228
|
let e = a.findIndex((e) => _(e) && e.id === i);
|
|
391
229
|
return e < 0 ? !1 : (a[e] = m(n), !0);
|
|
392
230
|
}
|
|
393
231
|
return _(a) ? (n === null ? delete a[i] : a[i] = m(n), !0) : !1;
|
|
394
232
|
}
|
|
395
|
-
function
|
|
233
|
+
function pe(e, t) {
|
|
396
234
|
let [n, ...r] = t.split(".");
|
|
397
235
|
if (n === void 0) return [""];
|
|
398
236
|
let i = [];
|
|
399
237
|
if (n === "*") {
|
|
400
238
|
let t = Array.isArray(e) ? e : [];
|
|
401
|
-
for (let e of t) if (_(e) && typeof e.id == "string") for (let t of r.length ?
|
|
239
|
+
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
240
|
return i;
|
|
403
241
|
}
|
|
404
242
|
let a = _(e) ? e[n] : void 0;
|
|
405
243
|
if (r.length === 0) return a === void 0 ? [] : [n];
|
|
406
|
-
for (let e of
|
|
244
|
+
for (let e of pe(a, r.join("."))) i.push(`${n}.${e}`);
|
|
407
245
|
return i;
|
|
408
246
|
}
|
|
409
|
-
function
|
|
247
|
+
function x(e, t = []) {
|
|
410
248
|
if (e.type === "custom") {
|
|
411
249
|
let n = t.find((t) => t.type === e.customType), r = new Set((n?.fields ?? []).filter((e) => e.type === "text" || e.type === "textarea").map((e) => e.key)), i = e.fieldValues;
|
|
412
250
|
return _(i) ? Object.keys(i).filter((e) => r.has(e)).map((e) => `fieldValues.${e}`) : [];
|
|
@@ -421,10 +259,10 @@ function S(e, t = []) {
|
|
|
421
259
|
cells: e.cells.filter(n)
|
|
422
260
|
}))
|
|
423
261
|
} : e;
|
|
424
|
-
return (
|
|
262
|
+
return (ae[e.type] ?? []).flatMap((e) => pe(r, e));
|
|
425
263
|
}
|
|
426
|
-
function
|
|
427
|
-
return (
|
|
264
|
+
function S(e, t) {
|
|
265
|
+
return (ae[e] ?? []).some((e) => {
|
|
428
266
|
let n = e.split("."), r = t.split(".");
|
|
429
267
|
return n.length === r.length && n.every((e, t) => e === "*" || e === r[t]);
|
|
430
268
|
});
|
|
@@ -434,62 +272,62 @@ function C(e) {
|
|
|
434
272
|
for (let n of new TextEncoder().encode(e)) t ^= n, t = Math.imul(t, 16777619) >>> 0;
|
|
435
273
|
return t.toString(16).padStart(8, "0");
|
|
436
274
|
}
|
|
437
|
-
function
|
|
275
|
+
function me(e) {
|
|
438
276
|
let { l10n: t, ...n } = e;
|
|
439
277
|
return n;
|
|
440
278
|
}
|
|
441
|
-
function
|
|
279
|
+
function he(e = {}) {
|
|
442
280
|
return Object.entries(e).sort(([e], [t]) => e.split(".").length - t.split(".").length);
|
|
443
281
|
}
|
|
444
|
-
function
|
|
445
|
-
return
|
|
282
|
+
function ge(e, t, n) {
|
|
283
|
+
return _e(e, m(me(e)), t, n);
|
|
446
284
|
}
|
|
447
|
-
function
|
|
285
|
+
function _e(e, t, n, r) {
|
|
448
286
|
let i = e;
|
|
449
287
|
if (n === r) return t;
|
|
450
288
|
let a = i.l10n?.[n];
|
|
451
289
|
if (!a) return t;
|
|
452
|
-
for (let [e, n] of
|
|
453
|
-
for (let [n, r] of Object.entries(a.text ?? {})) y(e, n) !== void 0 &&
|
|
290
|
+
for (let [e, n] of he(a.set)) b(t, e, n);
|
|
291
|
+
for (let [n, r] of Object.entries(a.text ?? {})) y(e, n) !== void 0 && b(t, n, r.value);
|
|
454
292
|
return e.type === "custom" && (Object.keys(a.text ?? {}).length > 0 || Object.keys(a.set ?? {}).length > 0) && delete t.renderedHtml, t;
|
|
455
293
|
}
|
|
456
|
-
function
|
|
294
|
+
function ve(e, t, n) {
|
|
457
295
|
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,
|
|
296
|
+
if (r.type !== "section" && r.type !== "wrapper" || !Array.isArray(r.children)) return ge(e, t, n);
|
|
297
|
+
let { children: i, ...a } = me(r), o = m(a);
|
|
298
|
+
return o.children = i, _e(e, o, t, n);
|
|
461
299
|
}
|
|
462
|
-
function
|
|
300
|
+
function ye(e, t) {
|
|
463
301
|
return e.l10n?.[t]?.hidden === !0;
|
|
464
302
|
}
|
|
465
|
-
function
|
|
303
|
+
function be(e) {
|
|
466
304
|
let { locales: t, l10n: n, ...r } = e;
|
|
467
305
|
return r;
|
|
468
306
|
}
|
|
469
307
|
function w(e) {
|
|
470
308
|
return e.settings?.locale ?? "en";
|
|
471
309
|
}
|
|
472
|
-
function
|
|
473
|
-
let r = w(e);
|
|
474
|
-
if (t !== r && !
|
|
310
|
+
function xe(e, t, n) {
|
|
311
|
+
let r = w(e), i = e.settings?.locales ?? [];
|
|
312
|
+
if (t !== r && !i.includes(t)) {
|
|
475
313
|
if (n?.missing === "default") t = r;
|
|
476
|
-
else throw new
|
|
477
|
-
}
|
|
478
|
-
let
|
|
479
|
-
if (t !== r &&
|
|
480
|
-
let n = e.l10n?.[t],
|
|
481
|
-
return
|
|
482
|
-
}),
|
|
483
|
-
if (t !== r &&
|
|
484
|
-
for (let [e, t] of
|
|
485
|
-
for (let [t, n] of Object.entries(
|
|
486
|
-
}
|
|
487
|
-
return
|
|
488
|
-
blocks:
|
|
489
|
-
settings:
|
|
314
|
+
else throw new ie(`This template has no "${t}" version.`, void 0, "unknown_locale");
|
|
315
|
+
}
|
|
316
|
+
let a = (e) => e.flatMap((e) => {
|
|
317
|
+
if (t !== r && ye(e, t)) return [];
|
|
318
|
+
let n = e.l10n?.[t], i = [...Object.keys(n?.set ?? {}), ...Object.keys(n?.text ?? {})].some((e) => e.startsWith("children.")) ? ge(e, t, r) : ve(e, t, r);
|
|
319
|
+
return i.type === "section" && Array.isArray(i.children) ? i.children = i.children.map((e) => a(e)) : i.type === "wrapper" && Array.isArray(i.children) && (i.children = a(i.children)), [i];
|
|
320
|
+
}), o = m(be(e.settings)), s = e.settings?.l10n?.[t];
|
|
321
|
+
if (t !== r && s) {
|
|
322
|
+
for (let [e, t] of he(s.set)) b(o, e, t);
|
|
323
|
+
for (let [t, n] of Object.entries(s.text ?? {})) y(e.settings, t) !== void 0 && b(o, t, n.value);
|
|
324
|
+
}
|
|
325
|
+
return o.locale = t, {
|
|
326
|
+
blocks: a(e.blocks),
|
|
327
|
+
settings: o
|
|
490
328
|
};
|
|
491
329
|
}
|
|
492
|
-
function
|
|
330
|
+
function Se(e, t, n = []) {
|
|
493
331
|
let r = {
|
|
494
332
|
translated: [],
|
|
495
333
|
missing: [],
|
|
@@ -503,9 +341,9 @@ function Pe(e, t, n = []) {
|
|
|
503
341
|
}
|
|
504
342
|
}, a = (e) => {
|
|
505
343
|
for (let r of e) {
|
|
506
|
-
if (
|
|
344
|
+
if (ye(r, t)) continue;
|
|
507
345
|
let e = r.l10n?.[t];
|
|
508
|
-
i(r.id, r,
|
|
346
|
+
i(r.id, r, x(r, n), e?.text);
|
|
509
347
|
let o = r.children;
|
|
510
348
|
if (r.type === "section" && Array.isArray(o)) for (let e of o) a(e);
|
|
511
349
|
else r.type === "wrapper" && Array.isArray(o) && a(o);
|
|
@@ -513,35 +351,35 @@ function Pe(e, t, n = []) {
|
|
|
513
351
|
};
|
|
514
352
|
return a(e.blocks), i("settings", e.settings, [...g], e.settings?.l10n?.[t]?.text), r;
|
|
515
353
|
}
|
|
516
|
-
function
|
|
354
|
+
function Ce(e, t) {
|
|
517
355
|
if (t === w(e) || !e.settings.locales?.includes(t)) return [];
|
|
518
356
|
let n = [], r = (e) => {
|
|
519
|
-
for (let i of e)
|
|
357
|
+
for (let i of e) ye(i, t) && n.push(i.id), i.type === "section" ? i.children.forEach(r) : i.type === "wrapper" && r(i.children);
|
|
520
358
|
};
|
|
521
359
|
return r(e.blocks), n;
|
|
522
360
|
}
|
|
523
|
-
function
|
|
361
|
+
function we(e, t, n = []) {
|
|
524
362
|
if (t === w(e) || !e.settings.locales?.includes(t)) return [];
|
|
525
363
|
let r = [], i = (e, n, i) => {
|
|
526
|
-
r.push(...
|
|
364
|
+
r.push(...Te(n, t, i).map((t) => `${e}/${t}`));
|
|
527
365
|
}, a = (e) => {
|
|
528
|
-
for (let t of e) i(t.id, t,
|
|
366
|
+
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
367
|
};
|
|
530
368
|
return a(e.blocks), i("settings", e.settings, g), r;
|
|
531
369
|
}
|
|
532
|
-
function
|
|
370
|
+
function Te(e, t, n) {
|
|
533
371
|
let r = e.l10n?.[t];
|
|
534
372
|
return n.filter((t) => {
|
|
535
373
|
let n = y(e, t);
|
|
536
374
|
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
375
|
});
|
|
538
376
|
}
|
|
539
|
-
function
|
|
377
|
+
function Ee(e, t, n = {}) {
|
|
540
378
|
let r = w(e), i = (e, n, i) => {
|
|
541
|
-
let a =
|
|
379
|
+
let a = Te(e, t, i), o = m(e.l10n ?? {}), s = o[t] ?? {}, c = m(e);
|
|
542
380
|
delete c.l10n;
|
|
543
|
-
for (let [e, t] of
|
|
544
|
-
for (let [t, n] of Object.entries(s.text ?? {})) y(e, t) !== void 0 &&
|
|
381
|
+
for (let [e, t] of he(s.set)) b(c, e, t);
|
|
382
|
+
for (let [t, n] of Object.entries(s.text ?? {})) y(e, t) !== void 0 && b(c, t, n.value);
|
|
545
383
|
delete o[t];
|
|
546
384
|
let l = {}, u = /* @__PURE__ */ new Set([
|
|
547
385
|
...Object.keys(s.set ?? {}),
|
|
@@ -579,8 +417,8 @@ function Re(e, t, n = {}) {
|
|
|
579
417
|
};
|
|
580
418
|
for (let t of Object.values(o)) {
|
|
581
419
|
let n = m(e);
|
|
582
|
-
for (let [e, r] of
|
|
583
|
-
for (let [r, i] of Object.entries(t.text ?? {})) y(e, r) !== void 0 &&
|
|
420
|
+
for (let [e, r] of he(t.set)) b(n, e, r);
|
|
421
|
+
for (let [r, i] of Object.entries(t.text ?? {})) y(e, r) !== void 0 && b(n, r, i.value);
|
|
584
422
|
for (let [n, r] of Object.entries(t.text ?? {})) {
|
|
585
423
|
let i = y(c, n);
|
|
586
424
|
if (typeof i != "string") (t.set ??= {})[n] = r.value, delete t.text[n];
|
|
@@ -593,7 +431,7 @@ function Re(e, t, n = {}) {
|
|
|
593
431
|
}
|
|
594
432
|
return Object.keys(l).length && (d(l, e), o[r] = l), Object.keys(o).length && (c.l10n = o), c;
|
|
595
433
|
}, 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 ?? {}))])] :
|
|
434
|
+
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) : S(e.type, n), t);
|
|
597
435
|
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
436
|
}), o = i(e.settings, (e) => g.includes(e), g);
|
|
599
437
|
return o.locale = t, o.locales = e.settings.locales.map((e) => e === t ? r : e), {
|
|
@@ -601,13 +439,12 @@ function Re(e, t, n = {}) {
|
|
|
601
439
|
settings: o
|
|
602
440
|
};
|
|
603
441
|
}
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
let r = Object.fromEntries(I(e.blocks).flatMap((e) => {
|
|
442
|
+
var De = "Sections with a wrapper cannot be placed inside wrappers.";
|
|
443
|
+
function Oe(e, t, n = []) {
|
|
444
|
+
let r = Object.fromEntries(F(e.blocks).flatMap((e) => {
|
|
608
445
|
if (e.type !== "custom") return [];
|
|
609
|
-
let t =
|
|
610
|
-
return t.length &&
|
|
446
|
+
let t = x(e, n).filter((t) => typeof y(e, t) == "string");
|
|
447
|
+
return t.length && Pe.has(e.id) && D("invalid_operation", 0, Fe), t.length ? [[e.id, t]] : [];
|
|
611
448
|
}));
|
|
612
449
|
return {
|
|
613
450
|
op: "setDefaultLocale",
|
|
@@ -623,10 +460,10 @@ var T = class extends Error {
|
|
|
623
460
|
super(n), this.name = "OperationError", this.code = e, this.opIndex = t, r !== void 0 && (this.blockId = r);
|
|
624
461
|
}
|
|
625
462
|
};
|
|
626
|
-
function
|
|
463
|
+
function ke(e) {
|
|
627
464
|
return e === "1" ? 1 : e === "3" || e === "1-2-1" ? 3 : e === "4" ? 4 : 2;
|
|
628
465
|
}
|
|
629
|
-
function
|
|
466
|
+
function Ae(e, t, n = {}) {
|
|
630
467
|
let r = m(e);
|
|
631
468
|
return E(r, t, n), r;
|
|
632
469
|
}
|
|
@@ -635,22 +472,22 @@ function E(e, t, n = {}) {
|
|
|
635
472
|
locks: n.locks ?? [],
|
|
636
473
|
session: n.session ?? null
|
|
637
474
|
};
|
|
638
|
-
t.forEach((t, n) =>
|
|
475
|
+
t.forEach((t, n) => $e(e, t, n, r));
|
|
639
476
|
}
|
|
640
|
-
var
|
|
477
|
+
var je = /* @__PURE__ */ new Set([
|
|
641
478
|
"id",
|
|
642
479
|
"type",
|
|
643
480
|
"children",
|
|
644
481
|
"l10n"
|
|
645
|
-
]),
|
|
482
|
+
]), Me = /* @__PURE__ */ new Set(["locales", "l10n"]), Ne = /* @__PURE__ */ new Set([
|
|
646
483
|
"locale",
|
|
647
484
|
"locales",
|
|
648
485
|
"l10n"
|
|
649
|
-
]),
|
|
486
|
+
]), Pe = /* @__PURE__ */ new Set([
|
|
650
487
|
"__proto__",
|
|
651
488
|
"constructor",
|
|
652
489
|
"prototype"
|
|
653
|
-
]),
|
|
490
|
+
]), Fe = "customTextFields must map existing custom block ids to lists of string fieldValues paths.";
|
|
654
491
|
function D(e, t, n, r) {
|
|
655
492
|
throw new T(e, t, n, r);
|
|
656
493
|
}
|
|
@@ -660,14 +497,14 @@ function O(e) {
|
|
|
660
497
|
function k(e) {
|
|
661
498
|
return e.type === "section";
|
|
662
499
|
}
|
|
663
|
-
function
|
|
500
|
+
function Ie(e) {
|
|
664
501
|
return Array.isArray(e.blocks) ? e.blocks : [];
|
|
665
502
|
}
|
|
666
|
-
function
|
|
503
|
+
function Le(e) {
|
|
667
504
|
let t = e.children;
|
|
668
505
|
return Array.isArray(t) ? t.map((e) => Array.isArray(e) ? e : []) : [];
|
|
669
506
|
}
|
|
670
|
-
function*
|
|
507
|
+
function* Re(e, t) {
|
|
671
508
|
for (let n = 0; n < e.length; n++) {
|
|
672
509
|
let r = e[n];
|
|
673
510
|
if (O(r) && (yield {
|
|
@@ -676,47 +513,47 @@ function* Ye(e, t) {
|
|
|
676
513
|
index: n,
|
|
677
514
|
parent: t
|
|
678
515
|
}, typeof r.id == "string")) {
|
|
679
|
-
if (k(r)) for (let [e, t] of
|
|
516
|
+
if (k(r)) for (let [e, t] of Le(r).entries()) yield* Re(t, {
|
|
680
517
|
sectionId: r.id,
|
|
681
518
|
column: e
|
|
682
519
|
});
|
|
683
|
-
else r.type === "wrapper" && Array.isArray(r.children) && (yield*
|
|
520
|
+
else r.type === "wrapper" && Array.isArray(r.children) && (yield* Re(r.children, { wrapperId: r.id }));
|
|
684
521
|
}
|
|
685
522
|
}
|
|
686
523
|
}
|
|
687
|
-
function
|
|
688
|
-
for (let n of
|
|
524
|
+
function A(e, t) {
|
|
525
|
+
for (let n of Re(Ie(e), null)) if (n.block.id === t) return n;
|
|
689
526
|
return null;
|
|
690
527
|
}
|
|
691
|
-
function
|
|
528
|
+
function j(e) {
|
|
692
529
|
if (!O(e)) return [];
|
|
693
530
|
let t = typeof e.id == "string" ? [e.id] : [];
|
|
694
|
-
if (k(e)) for (let n of
|
|
695
|
-
else if (e.type === "wrapper" && Array.isArray(e.children)) for (let n of
|
|
531
|
+
if (k(e)) for (let n of Le(e)) for (let e of ze(n)) t.push(e);
|
|
532
|
+
else if (e.type === "wrapper" && Array.isArray(e.children)) for (let n of ze(e.children)) t.push(n);
|
|
696
533
|
return t;
|
|
697
534
|
}
|
|
698
|
-
function
|
|
699
|
-
return e.flatMap(
|
|
535
|
+
function ze(e) {
|
|
536
|
+
return e.flatMap(j);
|
|
700
537
|
}
|
|
701
|
-
function
|
|
538
|
+
function M(e, t) {
|
|
702
539
|
return typeof e.blockId != "string" || e.blockId === "" ? D("invalid_operation", t, "blockId must be a block id.") : e.blockId;
|
|
703
540
|
}
|
|
704
|
-
function
|
|
541
|
+
function Be(e, t) {
|
|
705
542
|
let n = e.parent;
|
|
706
543
|
return n === null ? null : O(n) && typeof n.sectionId == "string" && typeof n.column == "number" && Number.isInteger(n.column) ? {
|
|
707
544
|
sectionId: n.sectionId,
|
|
708
545
|
column: n.column
|
|
709
546
|
} : O(n) && typeof n.wrapperId == "string" && n.wrapperId !== "" && !Object.hasOwn(n, "sectionId") && !Object.hasOwn(n, "column") ? { wrapperId: n.wrapperId } : D("invalid_operation", t, "parent must be null, { \"sectionId\", \"column\" }, or { \"wrapperId\" }.");
|
|
710
547
|
}
|
|
711
|
-
function
|
|
548
|
+
function Ve(e, t) {
|
|
712
549
|
let n = e.after;
|
|
713
550
|
return n === null ? null : typeof n == "string" && n !== "" ? n : D("invalid_operation", t, "after must be null or a block id.");
|
|
714
551
|
}
|
|
715
|
-
function
|
|
552
|
+
function N(e, t) {
|
|
716
553
|
let n = e.expect;
|
|
717
554
|
return n == null ? null : O(n) ? n : D("invalid_operation", t, "expect must be an object.");
|
|
718
555
|
}
|
|
719
|
-
function
|
|
556
|
+
function He(e, t, n) {
|
|
720
557
|
let r = e.set ?? null, i = e.unset ?? [];
|
|
721
558
|
(r === null || O(r)) && Array.isArray(i) && i.every((e) => typeof e == "string") || D("invalid_operation", t, "set must be an object and unset a list of keys.");
|
|
722
559
|
let a = r === null ? {} : r, o = Object.keys(a).filter((e) => a[e] !== void 0);
|
|
@@ -728,50 +565,50 @@ function $e(e, t, n) {
|
|
|
728
565
|
unset: i
|
|
729
566
|
};
|
|
730
567
|
}
|
|
731
|
-
function
|
|
568
|
+
function Ue(e, t, n) {
|
|
732
569
|
if (O(e) && typeof e.id == "string" && e.id !== "" && typeof e.type == "string" || D("invalid_operation", t, "A block needs a non-empty string id and a string type."), e.type === "wrapper") {
|
|
733
570
|
n !== "root" && D("invalid_operation", t, n === "column" ? "Wrappers can only be placed at the top level." : "Wrappers cannot be placed inside wrappers."), Array.isArray(e.children) || D("invalid_operation", t, "A wrapper needs children: a list of blocks.");
|
|
734
|
-
for (let n of e.children)
|
|
571
|
+
for (let n of e.children) Ue(n, t, "wrapper");
|
|
735
572
|
return;
|
|
736
573
|
}
|
|
737
574
|
if (!k(e)) return;
|
|
738
|
-
n === "column" && D("invalid_operation", t, "Sections can only be placed at the top level."), n === "wrapper" && e.wrapper && D("invalid_operation", t,
|
|
575
|
+
n === "column" && D("invalid_operation", t, "Sections can only be placed at the top level."), n === "wrapper" && e.wrapper && D("invalid_operation", t, De);
|
|
739
576
|
let r = e.children;
|
|
740
577
|
Array.isArray(r) && r.every((e) => Array.isArray(e)) || D("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)
|
|
578
|
+
for (let e of r) for (let n of e) Ue(n, t, "column");
|
|
742
579
|
}
|
|
743
|
-
function
|
|
580
|
+
function P(e, t) {
|
|
744
581
|
return e.session === null || t.sessionId !== e.session;
|
|
745
582
|
}
|
|
746
|
-
function
|
|
747
|
-
let r = e.locks.find((n) => t.includes(n.blockId) &&
|
|
583
|
+
function We(e, t, n) {
|
|
584
|
+
let r = e.locks.find((n) => t.includes(n.blockId) && P(e, n));
|
|
748
585
|
r && D("lock_held", n, `Block "${r.blockId}" is being edited in another session.`, r.blockId);
|
|
749
586
|
}
|
|
750
|
-
function
|
|
751
|
-
e.locks.find((r) =>
|
|
587
|
+
function Ge(e, t, n, r) {
|
|
588
|
+
e.locks.find((r) => P(e, r) && r.blockId === t && ((r.locale ?? null) === null || r.locale === n)) && D("lock_held", r, `Block "${t}" is being edited in another session.`, t);
|
|
752
589
|
}
|
|
753
|
-
function
|
|
590
|
+
function Ke(e, t, n, r) {
|
|
754
591
|
for (let [i, a] of Object.entries(t)) a !== void 0 && (h(Object.hasOwn(e, i) && e[i] !== void 0 ? e[i] : null, a) || D("precondition_failed", n, r === void 0 ? `Setting "${i}" has changed since.` : `"${i}" of block "${r}" has changed since.`, r));
|
|
755
592
|
}
|
|
756
|
-
function
|
|
593
|
+
function qe(e, t, n) {
|
|
757
594
|
if (t === null) return Array.isArray(e.blocks) || (e.blocks = []), e.blocks;
|
|
758
595
|
if ("wrapperId" in t) {
|
|
759
|
-
let r =
|
|
596
|
+
let r = A(e, t.wrapperId);
|
|
760
597
|
return r ? r.block.type === "wrapper" ? Array.isArray(r.block.children) ? r.block.children : D("invalid_operation", n, `Wrapper "${t.wrapperId}" has no children list.`) : D("invalid_operation", n, `Block "${t.wrapperId}" isn't a wrapper.`) : D("block_missing", n, `No wrapper with id "${t.wrapperId}".`, t.wrapperId);
|
|
761
598
|
}
|
|
762
|
-
let r =
|
|
599
|
+
let r = A(e, t.sectionId);
|
|
763
600
|
if (!r) return D("block_missing", n, `No section with id "${t.sectionId}".`, t.sectionId);
|
|
764
601
|
if (!k(r.block)) return D("invalid_operation", n, `Block "${t.sectionId}" isn't a section.`);
|
|
765
602
|
let i = r.block.children;
|
|
766
603
|
return !Array.isArray(i) || t.column < 0 || t.column >= i.length ? D("invalid_operation", n, `Section "${t.sectionId}" has no column ${t.column}.`) : (Array.isArray(i[t.column]) || (i[t.column] = []), i[t.column]);
|
|
767
604
|
}
|
|
768
|
-
function
|
|
605
|
+
function Je(e, t, n) {
|
|
769
606
|
if (t === null) return 0;
|
|
770
607
|
let r = e.findIndex((e) => O(e) && e.id === t);
|
|
771
608
|
return r === -1 ? D("anchor_missing", n, `No block "${t}" in the target container.`, t) : r + 1;
|
|
772
609
|
}
|
|
773
|
-
function
|
|
774
|
-
let i =
|
|
610
|
+
function Ye(e, t, n, r) {
|
|
611
|
+
let i = ke(t), a = Array.isArray(e.children) ? e.children : [];
|
|
775
612
|
for (let e = i; e < a.length; e++) {
|
|
776
613
|
let t = a[e];
|
|
777
614
|
Array.isArray(t) && t.length > 0 && D("invalid_operation", n, `Column ${e} of section "${r}" still holds blocks, so the layout can't drop it.`);
|
|
@@ -780,7 +617,7 @@ function ot(e, t, n, r) {
|
|
|
780
617
|
for (; o.length < i;) o.push([]);
|
|
781
618
|
e.children = o;
|
|
782
619
|
}
|
|
783
|
-
function
|
|
620
|
+
function Xe(e, t, n) {
|
|
784
621
|
for (let [n, r] of Object.entries(t)) n === "__proto__" ? Object.defineProperty(e, n, {
|
|
785
622
|
value: m(r),
|
|
786
623
|
writable: !0,
|
|
@@ -789,8 +626,8 @@ function st(e, t, n) {
|
|
|
789
626
|
}) : e[n] = m(r);
|
|
790
627
|
for (let t of n) delete e[t];
|
|
791
628
|
}
|
|
792
|
-
function
|
|
793
|
-
return
|
|
629
|
+
function Ze(e) {
|
|
630
|
+
return ne(e).map((t) => {
|
|
794
631
|
let n = t.path.replace(/\.(items|icons|rows)\[.*$/, "").replace(/\[(\d+)\]/g, ".$1").split(".").reduce((e, t) => e[t], e);
|
|
795
632
|
return {
|
|
796
633
|
id: t.id,
|
|
@@ -798,113 +635,113 @@ function ct(e) {
|
|
|
798
635
|
};
|
|
799
636
|
});
|
|
800
637
|
}
|
|
801
|
-
function
|
|
802
|
-
let r = ({ id: e, blockId: t }) => JSON.stringify([t ?? null, e]), i = new Set(n ?
|
|
638
|
+
function Qe(e, t, n) {
|
|
639
|
+
let r = ({ id: e, blockId: t }) => JSON.stringify([t ?? null, e]), i = new Set(n ? Ze(n).map(r) : []), a = Ze(e).find((e) => !i.has(r(e)));
|
|
803
640
|
a && D("invalid_operation", t, `Element id "${a.id}" must not contain "." or "/".`, a.blockId);
|
|
804
641
|
}
|
|
805
|
-
function
|
|
642
|
+
function $e(e, t, n, r) {
|
|
806
643
|
let i = t;
|
|
807
644
|
switch (O(i) && typeof i.op == "string" || D("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
|
|
645
|
+
case "addBlock": return et(e, i, n);
|
|
646
|
+
case "moveBlock": return tt(e, i, n, r);
|
|
647
|
+
case "deleteBlock": return nt(e, i, n, r);
|
|
648
|
+
case "updateBlock": return rt(e, i, n, r);
|
|
649
|
+
case "updateSettings": return it(e, i, n);
|
|
650
|
+
case "setContent": return yt(e, i, n, r);
|
|
651
|
+
case "setDefaultLocale": return bt(e, i, n, r);
|
|
652
|
+
case "addLocale": return st(e, i, n);
|
|
653
|
+
case "removeLocale": return lt(e, i, n);
|
|
654
|
+
case "updateBlockLocale": return _t(e, i, n, r);
|
|
655
|
+
case "updateSettingsLocale": return vt(e, i, n);
|
|
819
656
|
default: D("invalid_operation", n, `Unknown operation "${i.op}".`);
|
|
820
657
|
}
|
|
821
658
|
}
|
|
822
|
-
function
|
|
823
|
-
let r =
|
|
824
|
-
|
|
659
|
+
function et(e, t, n) {
|
|
660
|
+
let r = Be(t, n), i = Ve(t, n), a = t.block;
|
|
661
|
+
Ue(a, n, r === null ? "root" : "wrapperId" in r ? "wrapper" : "column"), Qe({
|
|
825
662
|
blocks: [a],
|
|
826
663
|
settings: e.settings
|
|
827
664
|
}, n);
|
|
828
|
-
let o = new Set(
|
|
829
|
-
for (let e of
|
|
830
|
-
let c =
|
|
831
|
-
|
|
665
|
+
let o = new Set(ze(Ie(e))), s = /* @__PURE__ */ new Set();
|
|
666
|
+
for (let e of j(a)) (o.has(e) || s.has(e)) && D("block_exists", n, `A block with id "${e}" already exists.`, e), s.add(e);
|
|
667
|
+
let c = qe(e, r, n), l = Je(c, i, n);
|
|
668
|
+
gt(e, a, r, n, !0), c.splice(l, 0, m(a));
|
|
832
669
|
}
|
|
833
|
-
function
|
|
834
|
-
let i =
|
|
670
|
+
function tt(e, t, n, r) {
|
|
671
|
+
let i = M(t, n), a = Be(t, n), o = Ve(t, n), s = N(t, n), c = s && s.parent !== void 0 ? Be({ parent: s.parent }, n) : null, l = A(e, i);
|
|
835
672
|
if (!l) return D("block_missing", n, `No block with id "${i}".`, i);
|
|
836
|
-
if (
|
|
673
|
+
if (We(r, j(l.block), n), s) {
|
|
837
674
|
let e = l.index > 0 ? l.list[l.index - 1] : null, t = O(e) ? e.id ?? null : null;
|
|
838
675
|
h(l.parent, c) && h(t, s.after ?? null) || D("precondition_failed", n, `Block "${i}" has moved since.`, i);
|
|
839
676
|
}
|
|
840
|
-
a !== null && ("wrapperId" in a ? a.wrapperId : a.sectionId) === i && D("invalid_operation", n, "A block cannot be moved into itself or its descendants."), a !== null &&
|
|
841
|
-
let u =
|
|
842
|
-
|
|
677
|
+
a !== null && ("wrapperId" in a ? a.wrapperId : a.sectionId) === i && D("invalid_operation", n, "A block cannot be moved into itself or its descendants."), a !== null && j(l.block).includes("wrapperId" in a ? a.wrapperId : a.sectionId) && D("invalid_operation", n, "A block cannot be moved into itself or its descendants."), k(l.block) && a !== null && "sectionId" in a && D("invalid_operation", n, "Sections can only be placed at the top level."), k(l.block) && l.block.wrapper && a !== null && "wrapperId" in a && D("invalid_operation", n, De), l.block.type === "wrapper" && a !== null && D("invalid_operation", n, "wrapperId" in a ? "Wrappers cannot be placed inside wrappers." : "Wrappers can only be placed at the top level."), o === i && D("invalid_operation", n, "A block can't be placed after itself.");
|
|
678
|
+
let u = qe(e, a, n);
|
|
679
|
+
Je(u.filter((e) => e !== l.block), o, n), gt(e, l.block, a, n, !1), l.list.splice(l.index, 1), u.splice(Je(u, o, n), 0, l.block);
|
|
843
680
|
}
|
|
844
|
-
function
|
|
845
|
-
let i =
|
|
681
|
+
function nt(e, t, n, r) {
|
|
682
|
+
let i = M(t, n), a = N(t, n), o = A(e, i);
|
|
846
683
|
if (!o) return D("block_missing", n, `No block with id "${i}".`, i);
|
|
847
|
-
|
|
684
|
+
We(r, j(o.block), n), a && !h(o.block, a.block ?? null) && D("precondition_failed", n, `Block "${i}" has changed since.`, i), o.list.splice(o.index, 1);
|
|
848
685
|
}
|
|
849
|
-
function
|
|
850
|
-
let i =
|
|
686
|
+
function rt(e, t, n, r) {
|
|
687
|
+
let i = M(t, n), { set: a, unset: o } = He(t, n, je), s = N(t, n), c = A(e, i);
|
|
851
688
|
if (!c) return D("block_missing", n, `No block with id "${i}".`, i);
|
|
852
689
|
let l = c.block, u = k(l);
|
|
853
|
-
u && o.includes("columns") && D("invalid_operation", n, "A section's columns can't be unset; set another layout instead."),
|
|
690
|
+
u && o.includes("columns") && D("invalid_operation", n, "A section's columns can't be unset; set another layout instead."), We(r, [i], n), s && Ke(l, s, n, i), u && c.parent !== null && "wrapperId" in c.parent && a.wrapper && D("invalid_operation", n, De);
|
|
854
691
|
let d = { ...l };
|
|
855
|
-
|
|
692
|
+
Xe(d, a, o), Qe({
|
|
856
693
|
blocks: [d],
|
|
857
694
|
settings: e.settings
|
|
858
695
|
}, n, {
|
|
859
696
|
blocks: [l],
|
|
860
697
|
settings: e.settings
|
|
861
|
-
}), u && Object.hasOwn(a, "columns") &&
|
|
862
|
-
let f =
|
|
698
|
+
}), u && Object.hasOwn(a, "columns") && Ye(l, a.columns, n, i), Xe(l, a, o);
|
|
699
|
+
let f = ue(l);
|
|
863
700
|
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
701
|
}
|
|
865
|
-
function
|
|
866
|
-
let { set: r, unset: i } =
|
|
702
|
+
function it(e, t, n) {
|
|
703
|
+
let { set: r, unset: i } = He(t, n, Me), a = N(t, n);
|
|
867
704
|
e.settings?.locales?.length && (Object.hasOwn(r, "locale") || i.includes("locale")) && D("invalid_operation", n, "The default locale can't change while language versions exist."), O(e.settings) || (e.settings = {});
|
|
868
705
|
let o = e.settings;
|
|
869
|
-
a &&
|
|
870
|
-
let s =
|
|
706
|
+
a && Ke(o, a, n), Xe(o, r, i);
|
|
707
|
+
let s = fe(e.settings);
|
|
871
708
|
h(o.l10n, s.l10n) || (s.l10n ? o.l10n = s.l10n : delete o.l10n);
|
|
872
709
|
}
|
|
873
|
-
function
|
|
710
|
+
function at(e, t) {
|
|
874
711
|
let n = e.locale;
|
|
875
|
-
return
|
|
712
|
+
return oe(n) && n !== "__proto__" && n !== "constructor" && n !== "prototype" || D("invalid_operation", t, "locale must be a language tag."), n;
|
|
876
713
|
}
|
|
877
|
-
function
|
|
878
|
-
let r =
|
|
714
|
+
function ot(e, t, n) {
|
|
715
|
+
let r = at(t, n);
|
|
879
716
|
return e.settings.locales?.includes(r) || D("invalid_operation", n, `Locale "${r}" isn't in settings.locales.`), r;
|
|
880
717
|
}
|
|
881
|
-
function
|
|
882
|
-
let r =
|
|
718
|
+
function st(e, t, n) {
|
|
719
|
+
let r = at(t, n), i = e.settings.locales ?? [], a = r.toLowerCase(), o = t.position === void 0 ? i.length : t.position;
|
|
883
720
|
(w(e).toLowerCase() === a || i.some((e) => e.toLowerCase() === a) || typeof o != "number" || !Number.isInteger(o) || o < 0 || o > i.length) && D("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
721
|
}
|
|
885
|
-
function
|
|
886
|
-
return e.flatMap((e) => O(e) ? [e, ...k(e) ?
|
|
722
|
+
function F(e) {
|
|
723
|
+
return e.flatMap((e) => O(e) ? [e, ...k(e) ? Le(e).flatMap(F) : e.type === "wrapper" && Array.isArray(e.children) ? F(e.children) : []] : []);
|
|
887
724
|
}
|
|
888
|
-
function
|
|
725
|
+
function ct(e, t) {
|
|
889
726
|
let n = e.l10n;
|
|
890
727
|
return O(n) && O(n[t]) ? n[t] : {};
|
|
891
728
|
}
|
|
892
|
-
function
|
|
893
|
-
let r =
|
|
729
|
+
function lt(e, t, n) {
|
|
730
|
+
let r = ot(e, t, n), i = N(t, n);
|
|
894
731
|
i && (!O(i.blocks) || i.settings !== void 0 && !O(i.settings)) && D("invalid_operation", n, "expect needs a blocks object and an optional settings layer.");
|
|
895
|
-
let a = e.settings, o =
|
|
732
|
+
let a = e.settings, o = F(Ie(e)), s = Object.fromEntries(o.flatMap((e) => O(e.l10n) && Object.hasOwn(e.l10n, r) ? [[String(e.id), e.l10n[r]]] : []));
|
|
896
733
|
!i || h(s, i.blocks) && h(O(a.l10n) ? a.l10n[r] : void 0, i.settings) || D("precondition_failed", n, `Locale "${r}" has changed since.`);
|
|
897
734
|
for (let e of [...o, a]) O(e.l10n) && (delete e.l10n[r], Object.keys(e.l10n).length === 0 && delete e.l10n);
|
|
898
735
|
e.settings.locales.splice(e.settings.locales.indexOf(r), 1), e.settings.locales.length === 0 && delete e.settings.locales;
|
|
899
736
|
}
|
|
900
|
-
function
|
|
737
|
+
function ut(e, t, n) {
|
|
901
738
|
(e.text === void 0 || ((e) => O(e) && Object.values(e).every((e) => O(e) && typeof e.value == "string" && typeof e.sourceHash == "string"))(e.text)) && (e.set === void 0 || O(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
739
|
"text",
|
|
903
740
|
"set",
|
|
904
741
|
"unset",
|
|
905
742
|
...n ? [] : ["hidden"]
|
|
906
743
|
].some((t) => e[t] !== void 0) || D("invalid_operation", t, "A locale update needs text, set, unset or a block's boolean hidden.");
|
|
907
|
-
let r =
|
|
744
|
+
let r = N(e, t);
|
|
908
745
|
return r && (r.text !== void 0 && !O(r.text) || r.set !== void 0 && !O(r.set) || r.hidden !== void 0 && (n || typeof r.hidden != "boolean")) && D("invalid_operation", t, "The locale layer expect is malformed."), {
|
|
909
746
|
text: e.text ?? {},
|
|
910
747
|
set: e.set ?? {},
|
|
@@ -913,20 +750,20 @@ function xt(e, t, n) {
|
|
|
913
750
|
expect: r
|
|
914
751
|
};
|
|
915
752
|
}
|
|
916
|
-
function
|
|
917
|
-
for (let i of Object.keys(t.text)) v(i) && (r ? g.includes(i) :
|
|
753
|
+
function dt(e, t, n, r) {
|
|
754
|
+
for (let i of Object.keys(t.text)) v(i) && (r ? g.includes(i) : S(String(e.type), i)) && y(e, i) !== void 0 || D("invalid_operation", n, `Text path "${i}" isn't translatable or doesn't resolve.`);
|
|
918
755
|
for (let i of Object.keys(t.set)) {
|
|
919
|
-
let a = i.split("."), o = r ?
|
|
920
|
-
(!v(i) || o.has(a[0]) || !r &&
|
|
756
|
+
let a = i.split("."), o = r ? Ne : je, s = a.length === 1 ? e : y(e, a.slice(0, -1).join("."));
|
|
757
|
+
(!v(i) || o.has(a[0]) || !r && de(e, i, t.set[i]) || y(e, i) === void 0 && !O(s)) && D("invalid_operation", n, `Override path "${i}" is immutable or doesn't resolve.`);
|
|
921
758
|
}
|
|
922
759
|
}
|
|
923
|
-
function
|
|
760
|
+
function ft(e, t, n, r) {
|
|
924
761
|
if (t) {
|
|
925
762
|
for (let i of ["text", "set"]) for (let [a, o] of Object.entries(t[i] ?? {})) h(e[i]?.[a] ?? null, o) || D("precondition_failed", n, `Locale path "${a}" has changed since.`, r);
|
|
926
763
|
t.hidden !== void 0 && !h(e.hidden === !0, t.hidden) && D("precondition_failed", n, "The locale's hidden state has changed since.", r);
|
|
927
764
|
}
|
|
928
765
|
}
|
|
929
|
-
function
|
|
766
|
+
function pt(e, t, n) {
|
|
930
767
|
O(e.l10n) || (e.l10n = {});
|
|
931
768
|
let r = e.l10n, i = Object.prototype.hasOwnProperty.call(r, t) ? r[t] : void 0, a = O(i) ? i : {};
|
|
932
769
|
a !== i && (r[t] = a);
|
|
@@ -935,65 +772,318 @@ function wt(e, t, n) {
|
|
|
935
772
|
for (let [e, t] of Object.entries(n.set)) a.set ||= {}, a.set[e] = m(t), a.text && delete a.text[e];
|
|
936
773
|
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
774
|
}
|
|
938
|
-
function
|
|
939
|
-
return O(e) ? e.type === "slot" || Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(
|
|
775
|
+
function I(e) {
|
|
776
|
+
return O(e) ? e.type === "slot" || Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(I) : I(e)) : !1;
|
|
940
777
|
}
|
|
941
|
-
function
|
|
778
|
+
function mt(e) {
|
|
942
779
|
return O(e) && O(e.l10n) && Object.values(e.l10n).some((e) => O(e) && e.hidden === !0);
|
|
943
780
|
}
|
|
944
|
-
function
|
|
945
|
-
return !O(e) || !
|
|
781
|
+
function ht(e) {
|
|
782
|
+
return !O(e) || !I(e) ? !1 : mt(e) ? !0 : Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(ht) : ht(e));
|
|
946
783
|
}
|
|
947
|
-
function
|
|
948
|
-
if (!
|
|
784
|
+
function gt(e, t, n, r, i) {
|
|
785
|
+
if (!I(t)) return;
|
|
949
786
|
let a = n, o = !1;
|
|
950
787
|
for (; a !== null;) {
|
|
951
|
-
let t =
|
|
788
|
+
let t = A(e, "wrapperId" in a ? a.wrapperId : a.sectionId);
|
|
952
789
|
if (!t) break;
|
|
953
|
-
|
|
790
|
+
mt(t.block) && (o = !0), a = t.parent;
|
|
954
791
|
}
|
|
955
|
-
(o || i &&
|
|
792
|
+
(o || i && ht(t)) && D("invalid_operation", r, "A layout's slot block can't be placed inside a block that a language hides.", O(t) && typeof t.id == "string" ? t.id : void 0);
|
|
956
793
|
}
|
|
957
|
-
function
|
|
958
|
-
let i =
|
|
959
|
-
s || D("block_missing", n, `No block with id "${a}".`, a),
|
|
794
|
+
function _t(e, t, n, r) {
|
|
795
|
+
let i = ot(e, t, n), a = M(t, n), o = ut(t, n, !1), s = F(Ie(e)).find((e) => e.id === a);
|
|
796
|
+
s || D("block_missing", n, `No block with id "${a}".`, a), dt(s, o, n, !1), Ge(r, a, i, n), ft(ct(s, i), o.expect, n, a), o.hidden === !0 && I(s) && D("invalid_operation", n, "A layout's slot block, and any block that contains it, can't be hidden.", a), pt(s, i, o);
|
|
960
797
|
}
|
|
961
|
-
function
|
|
962
|
-
let r =
|
|
963
|
-
|
|
798
|
+
function vt(e, t, n) {
|
|
799
|
+
let r = ot(e, t, n), i = ut(t, n, !0), a = e.settings;
|
|
800
|
+
dt(a, i, n, !0), ft(ct(a, r), i.expect, n), pt(a, r, i);
|
|
964
801
|
}
|
|
965
|
-
function
|
|
802
|
+
function yt(e, t, n, r) {
|
|
966
803
|
let i = t.content;
|
|
967
804
|
if (!O(i) || !Array.isArray(i.blocks) || !O(i.settings)) return D("invalid_operation", n, "setContent needs content with a blocks array and a settings object.");
|
|
968
|
-
|
|
969
|
-
let a = r.locks.find((e) =>
|
|
805
|
+
Qe(i, n, e);
|
|
806
|
+
let a = r.locks.find((e) => P(r, e));
|
|
970
807
|
a && D("locked_by_others", n, "Other sessions hold locks on this template.", a.blockId), e.blocks = m(i.blocks), e.settings = m(i.settings);
|
|
971
808
|
}
|
|
972
|
-
function
|
|
973
|
-
let i =
|
|
809
|
+
function bt(e, t, n, r) {
|
|
810
|
+
let i = at(t, n);
|
|
974
811
|
e.settings.locales?.includes(i) || D("invalid_operation", n, `"${i}" is not a language version of this template.`);
|
|
975
|
-
let a =
|
|
812
|
+
let a = Ce(e, i);
|
|
976
813
|
a.length && D("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) =>
|
|
814
|
+
let o = r.locks.find((e) => P(r, e));
|
|
978
815
|
o && D("locked_by_others", n, "Other sessions hold locks on this template.", o.blockId);
|
|
979
816
|
let s = t.customTextFields;
|
|
980
817
|
if (s !== void 0) {
|
|
981
|
-
let t =
|
|
818
|
+
let t = F(e.blocks);
|
|
982
819
|
(!O(s) || Object.getOwnPropertyNames(s).some((e) => {
|
|
983
|
-
if (
|
|
820
|
+
if (Pe.has(e)) return !0;
|
|
984
821
|
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
|
-
})) && D("invalid_operation", n,
|
|
822
|
+
return r?.type !== "custom" || !Array.isArray(n) || n.some((e) => typeof e != "string" || !v(e) || !S("custom", e) || typeof y(r, e) != "string");
|
|
823
|
+
})) && D("invalid_operation", n, Fe);
|
|
987
824
|
}
|
|
988
|
-
let c =
|
|
825
|
+
let c = Ee(e, i, t.customTextFields);
|
|
989
826
|
e.blocks = c.blocks, e.settings = c.settings;
|
|
990
827
|
}
|
|
991
|
-
|
|
828
|
+
var xt = {
|
|
829
|
+
1: [100],
|
|
830
|
+
2: [50, 50],
|
|
831
|
+
3: [
|
|
832
|
+
33.33,
|
|
833
|
+
33.33,
|
|
834
|
+
33.34
|
|
835
|
+
],
|
|
836
|
+
4: [
|
|
837
|
+
25,
|
|
838
|
+
25,
|
|
839
|
+
25,
|
|
840
|
+
25
|
|
841
|
+
],
|
|
842
|
+
"1-2": [33.33, 66.67],
|
|
843
|
+
"2-1": [66.67, 33.33],
|
|
844
|
+
"1-3": [25, 75],
|
|
845
|
+
"3-1": [75, 25],
|
|
846
|
+
"1-2-1": [
|
|
847
|
+
25,
|
|
848
|
+
50,
|
|
849
|
+
25
|
|
850
|
+
]
|
|
851
|
+
};
|
|
852
|
+
function St(e) {
|
|
853
|
+
return Object.hasOwn(xt, e) ? xt[e] : [100];
|
|
854
|
+
}
|
|
855
|
+
function Ct(e) {
|
|
856
|
+
return typeof e == "number" && Number.isFinite(e) && e > 0;
|
|
857
|
+
}
|
|
858
|
+
function wt(e) {
|
|
859
|
+
let t = e.columnWidths;
|
|
860
|
+
if (t === void 0) return null;
|
|
861
|
+
if (!Array.isArray(t)) return "value";
|
|
862
|
+
if (t.length !== ke(e.columns)) return "count";
|
|
863
|
+
for (let e = 0; e < t.length; e++) if (!Ct(t[e])) return "value";
|
|
864
|
+
return null;
|
|
865
|
+
}
|
|
866
|
+
var Tt = 0xe8d4a51000, Et = 1e4;
|
|
867
|
+
function Dt(e) {
|
|
868
|
+
let t = e.length, n = 0;
|
|
869
|
+
for (let r = 0; r < t; r++) {
|
|
870
|
+
let t = e[r];
|
|
871
|
+
t > n && (n = t);
|
|
872
|
+
}
|
|
873
|
+
let r = [], i = 0n;
|
|
874
|
+
for (let a = 0; a < t; a++) {
|
|
875
|
+
let t = BigInt(Math.round(e[a] / n * Tt));
|
|
876
|
+
r.push(t), i += t;
|
|
877
|
+
}
|
|
878
|
+
let a = [], o = [], s = BigInt(Et);
|
|
879
|
+
for (let e = 0; e < t; e++) {
|
|
880
|
+
let t = r[e] * s;
|
|
881
|
+
a.push(Number(t / i)), o.push(t % i);
|
|
882
|
+
}
|
|
883
|
+
for (let e = 0; e < t; e++) a[e] < 1 && (a[e] = 1);
|
|
884
|
+
let c = 0;
|
|
885
|
+
for (let e = 0; e < t; e++) c += a[e];
|
|
886
|
+
let l = Et - c, u = Array.from({ length: t }, (e, t) => t);
|
|
887
|
+
if (l > 0) {
|
|
888
|
+
u.sort((e, t) => o[e] === o[t] ? e - t : o[e] > o[t] ? -1 : 1);
|
|
889
|
+
for (let e = 0; e < l; e++) a[u[e]] += 1;
|
|
890
|
+
} else if (l < 0) {
|
|
891
|
+
u.sort((e, t) => o[e] === o[t] ? t - e : o[e] < o[t] ? -1 : 1);
|
|
892
|
+
let e = -l;
|
|
893
|
+
for (let t of u) {
|
|
894
|
+
if (e === 0) break;
|
|
895
|
+
let n = a[t] - 1;
|
|
896
|
+
if (n <= 0) continue;
|
|
897
|
+
let r = Math.min(n, e);
|
|
898
|
+
a[t] = a[t] - r, e -= r;
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
return a.map((e) => e / 100);
|
|
902
|
+
}
|
|
903
|
+
function Ot(e) {
|
|
904
|
+
return e.columnWidths !== void 0 && wt(e) === null ? Dt(e.columnWidths) : [...St(e.columns)];
|
|
905
|
+
}
|
|
906
|
+
var kt = [
|
|
907
|
+
"cover",
|
|
908
|
+
"contain",
|
|
909
|
+
"auto"
|
|
910
|
+
], At = [
|
|
911
|
+
"left",
|
|
912
|
+
"center",
|
|
913
|
+
"right"
|
|
914
|
+
], jt = [
|
|
915
|
+
"top",
|
|
916
|
+
"center",
|
|
917
|
+
"bottom"
|
|
918
|
+
];
|
|
992
919
|
function Mt(e) {
|
|
920
|
+
return {
|
|
921
|
+
url: e,
|
|
922
|
+
size: "cover",
|
|
923
|
+
position: {
|
|
924
|
+
x: "center",
|
|
925
|
+
y: "center"
|
|
926
|
+
},
|
|
927
|
+
repeat: !1
|
|
928
|
+
};
|
|
929
|
+
}
|
|
930
|
+
function Nt(e) {
|
|
931
|
+
let t = "";
|
|
932
|
+
for (let n of e) {
|
|
933
|
+
let e = n.charCodeAt(0);
|
|
934
|
+
t += e < 32 || e === 127 || n === "'" || n === "\"" || n === "\\" ? `%${e.toString(16).toUpperCase().padStart(2, "0")}` : n;
|
|
935
|
+
}
|
|
936
|
+
return t;
|
|
937
|
+
}
|
|
938
|
+
function Pt(e) {
|
|
939
|
+
let t = typeof e?.url == "string" ? e.url.trim() : "";
|
|
940
|
+
if (!e || !t) return null;
|
|
941
|
+
let n = kt.includes(e.size) ? e.size : "cover", r = e.position, i = r && At.includes(r.x) ? r.x : "center", a = r && jt.includes(r.y) ? r.y : "center";
|
|
942
|
+
return {
|
|
943
|
+
url: Nt(t),
|
|
944
|
+
size: n,
|
|
945
|
+
position: `${i} ${a}`,
|
|
946
|
+
repeat: e.repeat ? "repeat" : "no-repeat"
|
|
947
|
+
};
|
|
948
|
+
}
|
|
949
|
+
var Ft = [
|
|
950
|
+
"top",
|
|
951
|
+
"middle",
|
|
952
|
+
"bottom"
|
|
953
|
+
];
|
|
954
|
+
function It(e) {
|
|
955
|
+
let t = e.hero;
|
|
956
|
+
if (!t || typeof t != "object") return null;
|
|
957
|
+
if (e.columns !== "1") return {
|
|
958
|
+
applied: !1,
|
|
959
|
+
reason: "columns"
|
|
960
|
+
};
|
|
961
|
+
let n = Pt(e.backgroundImage);
|
|
962
|
+
if (n === null) return {
|
|
963
|
+
applied: !1,
|
|
964
|
+
reason: "image"
|
|
965
|
+
};
|
|
966
|
+
let r = Rt(e.backgroundImage), i = Lt(t.height) ? Math.round(t.height) : "image";
|
|
967
|
+
return i === "image" && r === null ? {
|
|
968
|
+
applied: !1,
|
|
969
|
+
reason: "size"
|
|
970
|
+
} : {
|
|
971
|
+
applied: !0,
|
|
972
|
+
image: n,
|
|
973
|
+
height: i,
|
|
974
|
+
verticalAlign: Ft.includes(t.verticalAlign) ? t.verticalAlign : "middle",
|
|
975
|
+
aspectRatio: r
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
function Lt(e) {
|
|
979
|
+
return typeof e == "number" && Number.isFinite(e) && e >= 1;
|
|
980
|
+
}
|
|
981
|
+
function Rt(e) {
|
|
982
|
+
let t = e?.naturalWidth, n = e?.naturalHeight;
|
|
983
|
+
return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0 ? null : n / t;
|
|
984
|
+
}
|
|
985
|
+
var zt = {
|
|
986
|
+
facebook: {
|
|
987
|
+
color: "#1877F2",
|
|
988
|
+
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"
|
|
989
|
+
},
|
|
990
|
+
twitter: {
|
|
991
|
+
color: "#000000",
|
|
992
|
+
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"
|
|
993
|
+
},
|
|
994
|
+
instagram: {
|
|
995
|
+
color: "#E4405F",
|
|
996
|
+
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"
|
|
997
|
+
},
|
|
998
|
+
linkedin: {
|
|
999
|
+
color: "#0A66C2",
|
|
1000
|
+
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"
|
|
1001
|
+
},
|
|
1002
|
+
xing: {
|
|
1003
|
+
color: "#006567",
|
|
1004
|
+
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"
|
|
1005
|
+
},
|
|
1006
|
+
youtube: {
|
|
1007
|
+
color: "#FF0000",
|
|
1008
|
+
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"
|
|
1009
|
+
},
|
|
1010
|
+
tiktok: {
|
|
1011
|
+
color: "#000000",
|
|
1012
|
+
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"
|
|
1013
|
+
},
|
|
1014
|
+
pinterest: {
|
|
1015
|
+
color: "#BD081C",
|
|
1016
|
+
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"
|
|
1017
|
+
},
|
|
1018
|
+
email: {
|
|
1019
|
+
color: "#6B7280",
|
|
1020
|
+
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"
|
|
1021
|
+
},
|
|
1022
|
+
website: {
|
|
1023
|
+
color: "#6B7280",
|
|
1024
|
+
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"
|
|
1025
|
+
},
|
|
1026
|
+
whatsapp: {
|
|
1027
|
+
color: "#25D366",
|
|
1028
|
+
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"
|
|
1029
|
+
},
|
|
1030
|
+
telegram: {
|
|
1031
|
+
color: "#26A5E4",
|
|
1032
|
+
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"
|
|
1033
|
+
},
|
|
1034
|
+
discord: {
|
|
1035
|
+
color: "#5865F2",
|
|
1036
|
+
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"
|
|
1037
|
+
},
|
|
1038
|
+
snapchat: {
|
|
1039
|
+
color: "#FFFC00",
|
|
1040
|
+
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"
|
|
1041
|
+
},
|
|
1042
|
+
reddit: {
|
|
1043
|
+
color: "#FF4500",
|
|
1044
|
+
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"
|
|
1045
|
+
},
|
|
1046
|
+
github: {
|
|
1047
|
+
color: "#181717",
|
|
1048
|
+
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"
|
|
1049
|
+
},
|
|
1050
|
+
dribbble: {
|
|
1051
|
+
color: "#EA4C89",
|
|
1052
|
+
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"
|
|
1053
|
+
},
|
|
1054
|
+
behance: {
|
|
1055
|
+
color: "#1769FF",
|
|
1056
|
+
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"
|
|
1057
|
+
}
|
|
1058
|
+
}, Bt = {
|
|
1059
|
+
dark: "#1f1f1f",
|
|
1060
|
+
light: "#ffffff"
|
|
1061
|
+
};
|
|
1062
|
+
function Vt(e) {
|
|
1063
|
+
return e === "dark" || e === "light" ? e : void 0;
|
|
1064
|
+
}
|
|
1065
|
+
function Ht(e, t) {
|
|
1066
|
+
let n = Vt(t);
|
|
1067
|
+
return {
|
|
1068
|
+
fill: n ? Bt[n] : zt[e].color,
|
|
1069
|
+
onFill: n === "light" ? Bt.dark : "#ffffff"
|
|
1070
|
+
};
|
|
1071
|
+
}
|
|
1072
|
+
function Ut(e, t) {
|
|
1073
|
+
if (Vt(t) === "dark" && (e === "plain" || e === "outlined")) return {
|
|
1074
|
+
color: Bt.light,
|
|
1075
|
+
opacity: .6,
|
|
1076
|
+
width: 1.4
|
|
1077
|
+
};
|
|
1078
|
+
}
|
|
1079
|
+
function Wt(e) {
|
|
1080
|
+
return e === "plain" ? .84 : .6;
|
|
1081
|
+
}
|
|
1082
|
+
function Gt(e) {
|
|
993
1083
|
let t = e.children;
|
|
994
1084
|
return e.type === "section" && Array.isArray(t) ? t : [];
|
|
995
1085
|
}
|
|
996
|
-
function
|
|
1086
|
+
function Kt(e, t, n = null) {
|
|
997
1087
|
for (let r = 0; r < e.length; r++) {
|
|
998
1088
|
let i = e[r];
|
|
999
1089
|
if (i.id === t) return {
|
|
@@ -1001,28 +1091,28 @@ function Nt(e, t, n = null) {
|
|
|
1001
1091
|
parent: n,
|
|
1002
1092
|
after: r > 0 ? e[r - 1].id : null
|
|
1003
1093
|
};
|
|
1004
|
-
let a =
|
|
1094
|
+
let a = Gt(i);
|
|
1005
1095
|
for (let e = 0; e < a.length; e++) {
|
|
1006
1096
|
if (!Array.isArray(a[e])) continue;
|
|
1007
|
-
let n =
|
|
1097
|
+
let n = Kt(a[e], t, {
|
|
1008
1098
|
sectionId: i.id,
|
|
1009
1099
|
column: e
|
|
1010
1100
|
});
|
|
1011
1101
|
if (n) return n;
|
|
1012
1102
|
}
|
|
1013
1103
|
if (i.type === "wrapper" && Array.isArray(i.children)) {
|
|
1014
|
-
let e =
|
|
1104
|
+
let e = Kt(i.children, t, { wrapperId: i.id });
|
|
1015
1105
|
if (e) return e;
|
|
1016
1106
|
}
|
|
1017
1107
|
}
|
|
1018
1108
|
return null;
|
|
1019
1109
|
}
|
|
1020
|
-
function
|
|
1021
|
-
let r =
|
|
1110
|
+
function qt(e, t, n) {
|
|
1111
|
+
let r = Kt(e.blocks, t);
|
|
1022
1112
|
if (!r) throw new T("block_missing", n, `No block with id "${t}".`, t);
|
|
1023
1113
|
return r;
|
|
1024
1114
|
}
|
|
1025
|
-
function
|
|
1115
|
+
function Jt(e, t, n) {
|
|
1026
1116
|
let r = {}, i = [], a = {}, o = [.../* @__PURE__ */ new Set([...Object.keys(t ?? {}), ...n ?? []])];
|
|
1027
1117
|
for (let n of o) {
|
|
1028
1118
|
let o = e[n];
|
|
@@ -1036,10 +1126,10 @@ function Ft(e, t, n) {
|
|
|
1036
1126
|
expect: a
|
|
1037
1127
|
};
|
|
1038
1128
|
}
|
|
1039
|
-
function
|
|
1129
|
+
function L(e, t) {
|
|
1040
1130
|
return e.l10n?.[t] ?? {};
|
|
1041
1131
|
}
|
|
1042
|
-
function
|
|
1132
|
+
function R(e, t, n, r) {
|
|
1043
1133
|
let i = {}, a = {}, o = {};
|
|
1044
1134
|
n.length && (o.text = {}, o.set = {});
|
|
1045
1135
|
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 +1141,21 @@ function z(e, t, n, r) {
|
|
|
1051
1141
|
expect: o
|
|
1052
1142
|
};
|
|
1053
1143
|
}
|
|
1054
|
-
function
|
|
1055
|
-
let { unset: t, ...n } =
|
|
1144
|
+
function Yt(e) {
|
|
1145
|
+
let { unset: t, ...n } = R(e, {}, [.../* @__PURE__ */ new Set([...Object.keys(e.text ?? {}), ...Object.keys(e.set ?? {})])], e.hidden === !0);
|
|
1056
1146
|
return n;
|
|
1057
1147
|
}
|
|
1058
|
-
function
|
|
1059
|
-
return e.flatMap((e) => [e, ...e.type === "wrapper" ?
|
|
1148
|
+
function z(e) {
|
|
1149
|
+
return e.flatMap((e) => [e, ...e.type === "wrapper" ? z(e.children) : Gt(e).flatMap(z)]);
|
|
1060
1150
|
}
|
|
1061
|
-
function
|
|
1151
|
+
function Xt(e, t) {
|
|
1062
1152
|
let n = m(e);
|
|
1063
1153
|
E(n, [t]);
|
|
1064
1154
|
let r = [], i = (e, t, n) => {
|
|
1065
1155
|
for (let [i, a] of Object.entries(e.l10n ?? {})) {
|
|
1066
1156
|
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
1157
|
if (!o.length) continue;
|
|
1068
|
-
let s =
|
|
1158
|
+
let s = R(a, e, o, !1);
|
|
1069
1159
|
r.push(n === void 0 ? {
|
|
1070
1160
|
op: "updateSettingsLocale",
|
|
1071
1161
|
locale: i,
|
|
@@ -1080,15 +1170,15 @@ function Lt(e, t) {
|
|
|
1080
1170
|
};
|
|
1081
1171
|
if (t.op === "updateSettings") i(e.settings, n.settings);
|
|
1082
1172
|
else {
|
|
1083
|
-
let t = new Map(
|
|
1084
|
-
for (let n of
|
|
1173
|
+
let t = new Map(z(n.blocks).map((e) => [e.id, e]));
|
|
1174
|
+
for (let n of z(e.blocks)) {
|
|
1085
1175
|
let e = t.get(n.id);
|
|
1086
1176
|
e && i(n, e, n.id);
|
|
1087
1177
|
}
|
|
1088
1178
|
}
|
|
1089
1179
|
return r;
|
|
1090
1180
|
}
|
|
1091
|
-
function
|
|
1181
|
+
function Zt(e, t, n) {
|
|
1092
1182
|
switch (t.op) {
|
|
1093
1183
|
case "addBlock": return {
|
|
1094
1184
|
op: "deleteBlock",
|
|
@@ -1096,7 +1186,7 @@ function Rt(e, t, n) {
|
|
|
1096
1186
|
expect: { block: m(t.block) }
|
|
1097
1187
|
};
|
|
1098
1188
|
case "deleteBlock": {
|
|
1099
|
-
let r =
|
|
1189
|
+
let r = qt(e, t.blockId, n);
|
|
1100
1190
|
return {
|
|
1101
1191
|
op: "addBlock",
|
|
1102
1192
|
block: m(r.block),
|
|
@@ -1105,7 +1195,7 @@ function Rt(e, t, n) {
|
|
|
1105
1195
|
};
|
|
1106
1196
|
}
|
|
1107
1197
|
case "moveBlock": {
|
|
1108
|
-
let r =
|
|
1198
|
+
let r = qt(e, t.blockId, n);
|
|
1109
1199
|
return {
|
|
1110
1200
|
op: "moveBlock",
|
|
1111
1201
|
blockId: t.blockId,
|
|
@@ -1118,23 +1208,23 @@ function Rt(e, t, n) {
|
|
|
1118
1208
|
};
|
|
1119
1209
|
}
|
|
1120
1210
|
case "updateBlock": {
|
|
1121
|
-
let r =
|
|
1211
|
+
let r = qt(e, t.blockId, n).block, { set: i, unset: a, expect: o } = Jt(r, t.set, t.unset);
|
|
1122
1212
|
return [{
|
|
1123
1213
|
op: "updateBlock",
|
|
1124
1214
|
blockId: t.blockId,
|
|
1125
1215
|
...Object.keys(i).length > 0 ? { set: i } : {},
|
|
1126
1216
|
...a.length > 0 ? { unset: a } : {},
|
|
1127
1217
|
expect: o
|
|
1128
|
-
}, ...
|
|
1218
|
+
}, ...Xt(e, t)];
|
|
1129
1219
|
}
|
|
1130
1220
|
case "updateSettings": {
|
|
1131
|
-
let { set: n, unset: r, expect: i } =
|
|
1221
|
+
let { set: n, unset: r, expect: i } = Jt(e.settings, t.set, t.unset);
|
|
1132
1222
|
return [{
|
|
1133
1223
|
op: "updateSettings",
|
|
1134
1224
|
...Object.keys(n).length > 0 ? { set: n } : {},
|
|
1135
1225
|
...r.length > 0 ? { unset: r } : {},
|
|
1136
1226
|
expect: i
|
|
1137
|
-
}, ...
|
|
1227
|
+
}, ...Xt(e, t)];
|
|
1138
1228
|
}
|
|
1139
1229
|
case "addLocale": return {
|
|
1140
1230
|
op: "removeLocale",
|
|
@@ -1147,18 +1237,18 @@ function Rt(e, t, n) {
|
|
|
1147
1237
|
locale: t.locale,
|
|
1148
1238
|
position: e.settings.locales?.indexOf(t.locale)
|
|
1149
1239
|
}];
|
|
1150
|
-
for (let r of
|
|
1240
|
+
for (let r of z(e.blocks)) {
|
|
1151
1241
|
let e = r.l10n?.[t.locale];
|
|
1152
1242
|
e && n.push({
|
|
1153
1243
|
op: "updateBlockLocale",
|
|
1154
1244
|
blockId: r.id,
|
|
1155
1245
|
locale: t.locale,
|
|
1156
|
-
...
|
|
1246
|
+
...Yt(e)
|
|
1157
1247
|
});
|
|
1158
1248
|
}
|
|
1159
1249
|
let r = e.settings.l10n?.[t.locale];
|
|
1160
1250
|
if (r) {
|
|
1161
|
-
let { hidden: e, ...i } =
|
|
1251
|
+
let { hidden: e, ...i } = Yt(r);
|
|
1162
1252
|
n.push({
|
|
1163
1253
|
op: "updateSettingsLocale",
|
|
1164
1254
|
locale: t.locale,
|
|
@@ -1177,15 +1267,15 @@ function Rt(e, t, n) {
|
|
|
1177
1267
|
...t.unset ?? []
|
|
1178
1268
|
])];
|
|
1179
1269
|
if (t.op === "updateBlockLocale") {
|
|
1180
|
-
let i =
|
|
1270
|
+
let i = z(e.blocks).find((e) => e.id === t.blockId), a = z(n.blocks).find((e) => e.id === t.blockId);
|
|
1181
1271
|
return {
|
|
1182
1272
|
op: "updateBlockLocale",
|
|
1183
1273
|
blockId: t.blockId,
|
|
1184
1274
|
locale: t.locale,
|
|
1185
|
-
...
|
|
1275
|
+
...R(L(i, t.locale), L(a, t.locale), r, t.hidden !== void 0)
|
|
1186
1276
|
};
|
|
1187
1277
|
}
|
|
1188
|
-
let { hidden: i, ...a } =
|
|
1278
|
+
let { hidden: i, ...a } = R(L(e.settings, t.locale), L(n.settings, t.locale), r, !1);
|
|
1189
1279
|
return {
|
|
1190
1280
|
op: "updateSettingsLocale",
|
|
1191
1281
|
locale: t.locale,
|
|
@@ -1202,89 +1292,50 @@ function Rt(e, t, n) {
|
|
|
1202
1292
|
};
|
|
1203
1293
|
}
|
|
1204
1294
|
}
|
|
1205
|
-
function
|
|
1295
|
+
function Qt(e, t) {
|
|
1206
1296
|
let n = m(e), r = [];
|
|
1207
1297
|
return t.forEach((e, t) => {
|
|
1208
1298
|
try {
|
|
1209
|
-
let i =
|
|
1299
|
+
let i = Zt(n, e, t);
|
|
1210
1300
|
r.push(...Array.isArray(i) ? [...i].reverse() : [i]), E(n, [e]);
|
|
1211
1301
|
} catch (e) {
|
|
1212
1302
|
throw e instanceof T ? new T(e.code, t, e.message, e.blockId) : e;
|
|
1213
1303
|
}
|
|
1214
1304
|
}), r.reverse();
|
|
1215
1305
|
}
|
|
1216
|
-
|
|
1217
|
-
function Bt(e) {
|
|
1306
|
+
function $t(e) {
|
|
1218
1307
|
return e === "invalid_operation" ? 422 : e === "content_too_large" ? 413 : 409;
|
|
1219
1308
|
}
|
|
1220
|
-
var
|
|
1309
|
+
var en = class extends ie {
|
|
1221
1310
|
opIndex;
|
|
1222
1311
|
holder;
|
|
1223
1312
|
holders;
|
|
1224
1313
|
constructor(e, t) {
|
|
1225
|
-
super(e, t.status ??
|
|
1314
|
+
super(e, t.status ?? $t(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
1315
|
}
|
|
1227
1316
|
};
|
|
1228
|
-
|
|
1229
|
-
function Ht(e) {
|
|
1317
|
+
function tn(e) {
|
|
1230
1318
|
return e.type === "section";
|
|
1231
1319
|
}
|
|
1232
|
-
function
|
|
1233
|
-
return e.type === "title";
|
|
1234
|
-
}
|
|
1235
|
-
function Wt(e) {
|
|
1236
|
-
return e.type === "paragraph";
|
|
1237
|
-
}
|
|
1238
|
-
function Gt(e) {
|
|
1239
|
-
return e.type === "image";
|
|
1240
|
-
}
|
|
1241
|
-
function Kt(e) {
|
|
1242
|
-
return e.type === "button";
|
|
1243
|
-
}
|
|
1244
|
-
function qt(e) {
|
|
1245
|
-
return e.type === "divider";
|
|
1246
|
-
}
|
|
1247
|
-
function Jt(e) {
|
|
1248
|
-
return e.type === "video";
|
|
1249
|
-
}
|
|
1250
|
-
function Yt(e) {
|
|
1251
|
-
return e.type === "social";
|
|
1252
|
-
}
|
|
1253
|
-
function Xt(e) {
|
|
1254
|
-
return e.type === "spacer";
|
|
1255
|
-
}
|
|
1256
|
-
function Zt(e) {
|
|
1257
|
-
return e.type === "html";
|
|
1258
|
-
}
|
|
1259
|
-
function Qt(e) {
|
|
1260
|
-
return e.type === "menu";
|
|
1261
|
-
}
|
|
1262
|
-
function $t(e) {
|
|
1263
|
-
return e.type === "table";
|
|
1264
|
-
}
|
|
1265
|
-
function en(e) {
|
|
1266
|
-
return e.type === "countdown";
|
|
1267
|
-
}
|
|
1268
|
-
function tn(e) {
|
|
1320
|
+
function nn(e) {
|
|
1269
1321
|
return e.type === "custom";
|
|
1270
1322
|
}
|
|
1271
|
-
function
|
|
1323
|
+
function B(e) {
|
|
1272
1324
|
return e.type === "slot";
|
|
1273
1325
|
}
|
|
1274
|
-
function
|
|
1326
|
+
function V(e) {
|
|
1275
1327
|
return e.type === "wrapper";
|
|
1276
1328
|
}
|
|
1277
|
-
|
|
1278
|
-
var nn = {
|
|
1329
|
+
var rn = {
|
|
1279
1330
|
content: "<p>Enter your title</p>",
|
|
1280
1331
|
level: 2,
|
|
1281
1332
|
textAlign: "left"
|
|
1282
|
-
},
|
|
1333
|
+
}, an = { content: "<p>Enter your text here</p>" }, on = {
|
|
1283
1334
|
src: "",
|
|
1284
1335
|
alt: "",
|
|
1285
1336
|
width: "full",
|
|
1286
1337
|
align: "center"
|
|
1287
|
-
},
|
|
1338
|
+
}, sn = {
|
|
1288
1339
|
text: "Click Here",
|
|
1289
1340
|
url: "",
|
|
1290
1341
|
backgroundColor: "#333333",
|
|
@@ -1298,36 +1349,36 @@ var nn = {
|
|
|
1298
1349
|
left: 24
|
|
1299
1350
|
},
|
|
1300
1351
|
align: "center"
|
|
1301
|
-
},
|
|
1352
|
+
}, cn = {
|
|
1302
1353
|
lineStyle: "solid",
|
|
1303
1354
|
color: "#e0e0e0",
|
|
1304
1355
|
thickness: 1,
|
|
1305
1356
|
width: "full"
|
|
1306
|
-
},
|
|
1357
|
+
}, ln = { columns: "1" }, un = {
|
|
1307
1358
|
url: "",
|
|
1308
1359
|
thumbnailUrl: "",
|
|
1309
1360
|
alt: "Video",
|
|
1310
1361
|
width: "full",
|
|
1311
1362
|
align: "center"
|
|
1312
|
-
},
|
|
1363
|
+
}, dn = {
|
|
1313
1364
|
iconStyle: "solid",
|
|
1314
1365
|
iconSize: "medium",
|
|
1315
1366
|
spacing: 10,
|
|
1316
1367
|
align: "center"
|
|
1317
|
-
},
|
|
1368
|
+
}, fn = { height: 24 }, pn = { content: "" }, mn = {
|
|
1318
1369
|
fontSize: 15,
|
|
1319
1370
|
textAlign: "center",
|
|
1320
1371
|
separator: "|",
|
|
1321
1372
|
separatorColor: "#e0e0e0",
|
|
1322
1373
|
spacing: 10
|
|
1323
|
-
},
|
|
1374
|
+
}, hn = {
|
|
1324
1375
|
hasHeaderRow: !0,
|
|
1325
1376
|
borderColor: "#e0e0e0",
|
|
1326
1377
|
borderWidth: 1,
|
|
1327
1378
|
cellPadding: 8,
|
|
1328
1379
|
fontSize: 15,
|
|
1329
1380
|
textAlign: "left"
|
|
1330
|
-
},
|
|
1381
|
+
}, gn = {
|
|
1331
1382
|
targetDate: "",
|
|
1332
1383
|
timezone: "UTC",
|
|
1333
1384
|
showDays: !0,
|
|
@@ -1347,21 +1398,21 @@ var nn = {
|
|
|
1347
1398
|
expiredMessage: "This offer has expired",
|
|
1348
1399
|
expiredImageUrl: "",
|
|
1349
1400
|
hideOnExpiry: !1
|
|
1350
|
-
}, gn = {
|
|
1351
|
-
title: nn,
|
|
1352
|
-
paragraph: rn,
|
|
1353
|
-
image: an,
|
|
1354
|
-
button: on,
|
|
1355
|
-
divider: sn,
|
|
1356
|
-
section: cn,
|
|
1357
|
-
video: ln,
|
|
1358
|
-
social: un,
|
|
1359
|
-
spacer: dn,
|
|
1360
|
-
html: fn,
|
|
1361
|
-
menu: pn,
|
|
1362
|
-
table: mn,
|
|
1363
|
-
countdown: hn
|
|
1364
1401
|
}, _n = {
|
|
1402
|
+
title: rn,
|
|
1403
|
+
paragraph: an,
|
|
1404
|
+
image: on,
|
|
1405
|
+
button: sn,
|
|
1406
|
+
divider: cn,
|
|
1407
|
+
section: ln,
|
|
1408
|
+
video: un,
|
|
1409
|
+
social: dn,
|
|
1410
|
+
spacer: fn,
|
|
1411
|
+
html: pn,
|
|
1412
|
+
menu: mn,
|
|
1413
|
+
table: hn,
|
|
1414
|
+
countdown: gn
|
|
1415
|
+
}, vn = {
|
|
1365
1416
|
width: 600,
|
|
1366
1417
|
backgroundColor: "#ffffff",
|
|
1367
1418
|
textColor: "#1a1a1a",
|
|
@@ -1369,30 +1420,28 @@ var nn = {
|
|
|
1369
1420
|
fontFamily: "Arial",
|
|
1370
1421
|
locale: "en"
|
|
1371
1422
|
};
|
|
1372
|
-
function
|
|
1423
|
+
function yn(e) {
|
|
1373
1424
|
return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
|
|
1374
1425
|
}
|
|
1375
|
-
function
|
|
1426
|
+
function bn(e, t) {
|
|
1376
1427
|
let n = { ...e };
|
|
1377
1428
|
for (let r of Object.keys(t)) {
|
|
1378
1429
|
let i = e[r], a = t[r];
|
|
1379
|
-
a !== void 0 && (n[r] =
|
|
1430
|
+
a !== void 0 && (n[r] = yn(i) && yn(a) ? bn(i, a) : a);
|
|
1380
1431
|
}
|
|
1381
1432
|
return n;
|
|
1382
1433
|
}
|
|
1383
|
-
|
|
1384
|
-
function bn(e = "Arial", t) {
|
|
1434
|
+
function xn(e = "Arial", t) {
|
|
1385
1435
|
return {
|
|
1386
1436
|
blocks: [],
|
|
1387
1437
|
settings: {
|
|
1388
|
-
...
|
|
1438
|
+
...vn,
|
|
1389
1439
|
fontFamily: e,
|
|
1390
1440
|
...t
|
|
1391
1441
|
}
|
|
1392
1442
|
};
|
|
1393
1443
|
}
|
|
1394
|
-
|
|
1395
|
-
var xn = [
|
|
1444
|
+
var Sn = [
|
|
1396
1445
|
"ar",
|
|
1397
1446
|
"he",
|
|
1398
1447
|
"iw",
|
|
@@ -1406,24 +1455,23 @@ var xn = [
|
|
|
1406
1455
|
"ckb",
|
|
1407
1456
|
"ks"
|
|
1408
1457
|
];
|
|
1409
|
-
function
|
|
1458
|
+
function Cn(e) {
|
|
1410
1459
|
let t = e?.trim().replace(/_/g, "-").split("-")[0]?.toLowerCase();
|
|
1411
|
-
return !!t &&
|
|
1460
|
+
return !!t && Sn.includes(t);
|
|
1412
1461
|
}
|
|
1413
|
-
function
|
|
1414
|
-
return e.direction === "ltr" || e.direction === "rtl" ? e.direction :
|
|
1462
|
+
function wn(e) {
|
|
1463
|
+
return e.direction === "ltr" || e.direction === "rtl" ? e.direction : Cn(e.locale) ? "rtl" : "ltr";
|
|
1415
1464
|
}
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
function En(e, t) {
|
|
1465
|
+
var Tn = 2e4, En = /* @__PURE__ */ new Set(["\"", "'"]);
|
|
1466
|
+
function Dn(e, t) {
|
|
1419
1467
|
let n = null, r = "tag";
|
|
1420
1468
|
for (let i = t; i < e.length; i++) {
|
|
1421
1469
|
let t = e[i];
|
|
1422
1470
|
if (n !== null) t === n && (n = null);
|
|
1423
1471
|
else {
|
|
1424
1472
|
if (r === "beforeValue") {
|
|
1425
|
-
if (
|
|
1426
|
-
if (
|
|
1473
|
+
if (H(t)) continue;
|
|
1474
|
+
if (En.has(t)) {
|
|
1427
1475
|
n = t, r = "tag";
|
|
1428
1476
|
continue;
|
|
1429
1477
|
}
|
|
@@ -1431,19 +1479,19 @@ function En(e, t) {
|
|
|
1431
1479
|
}
|
|
1432
1480
|
if (r === "unquotedValue") {
|
|
1433
1481
|
if (t === ">") return i;
|
|
1434
|
-
|
|
1482
|
+
H(t) && (r = "tag");
|
|
1435
1483
|
} else if (t === "=") r = "beforeValue";
|
|
1436
1484
|
else if (t === ">") return i;
|
|
1437
1485
|
}
|
|
1438
1486
|
}
|
|
1439
1487
|
return -1;
|
|
1440
1488
|
}
|
|
1441
|
-
function
|
|
1489
|
+
function On(e, t) {
|
|
1442
1490
|
let n = null;
|
|
1443
1491
|
for (let r = t; r < e.length; r++) {
|
|
1444
1492
|
let t = e[r];
|
|
1445
1493
|
if (n !== null) t === n && (n = null);
|
|
1446
|
-
else if (
|
|
1494
|
+
else if (En.has(t)) n = t;
|
|
1447
1495
|
else if (t === ">") return {
|
|
1448
1496
|
end: r,
|
|
1449
1497
|
nextSpan: -1
|
|
@@ -1458,13 +1506,13 @@ function Dn(e, t) {
|
|
|
1458
1506
|
nextSpan: -1
|
|
1459
1507
|
};
|
|
1460
1508
|
}
|
|
1461
|
-
function
|
|
1509
|
+
function kn(e) {
|
|
1462
1510
|
return e !== " " && e !== " " && e !== "\n" && e !== "\r" && e !== "\f" && e !== "=" && e !== ">" && e !== "/";
|
|
1463
1511
|
}
|
|
1464
|
-
function
|
|
1512
|
+
function H(e) {
|
|
1465
1513
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
1466
1514
|
}
|
|
1467
|
-
var
|
|
1515
|
+
var An = {
|
|
1468
1516
|
AMP: "&",
|
|
1469
1517
|
COPY: "©",
|
|
1470
1518
|
GT: ">",
|
|
@@ -1725,48 +1773,44 @@ var kn = {
|
|
|
1725
1773
|
zwj: "",
|
|
1726
1774
|
zwnj: ""
|
|
1727
1775
|
};
|
|
1728
|
-
function
|
|
1776
|
+
function U(e) {
|
|
1729
1777
|
return e.includes("&") ? e.replace(/&(#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g, (e, t) => {
|
|
1730
1778
|
if (t[0] === "#") {
|
|
1731
1779
|
let n = t[1] === "x" || t[1] === "X" ? Number.parseInt(t.slice(2), 16) : Number.parseInt(t.slice(1), 10);
|
|
1732
1780
|
return !Number.isFinite(n) || n < 1 || n > 1114111 || n >= 55296 && n <= 57343 ? e : String.fromCodePoint(n);
|
|
1733
1781
|
}
|
|
1734
|
-
return Object.hasOwn(
|
|
1782
|
+
return Object.hasOwn(An, t) ? An[t] : e;
|
|
1735
1783
|
}) : e;
|
|
1736
1784
|
}
|
|
1737
|
-
function
|
|
1785
|
+
function jn(e, t) {
|
|
1738
1786
|
let n = t.toLowerCase(), r = 0;
|
|
1739
1787
|
for (; r < e.length;) {
|
|
1740
|
-
for (; r < e.length && (
|
|
1788
|
+
for (; r < e.length && (H(e[r]) || e[r] === "/");) r++;
|
|
1741
1789
|
if (r >= e.length) break;
|
|
1742
1790
|
let t = r;
|
|
1743
|
-
for (; r < e.length &&
|
|
1791
|
+
for (; r < e.length && kn(e[r]);) r++;
|
|
1744
1792
|
let i = e.substring(t, r).toLowerCase();
|
|
1745
1793
|
if (i === "") {
|
|
1746
1794
|
r++;
|
|
1747
1795
|
continue;
|
|
1748
1796
|
}
|
|
1749
|
-
for (; r < e.length &&
|
|
1797
|
+
for (; r < e.length && H(e[r]);) r++;
|
|
1750
1798
|
if (e[r] !== "=") continue;
|
|
1751
|
-
for (r++; r < e.length &&
|
|
1799
|
+
for (r++; r < e.length && H(e[r]);) r++;
|
|
1752
1800
|
let a = e[r];
|
|
1753
|
-
if (
|
|
1801
|
+
if (En.has(a)) {
|
|
1754
1802
|
let t = r + 1, o = e.indexOf(a, t);
|
|
1755
1803
|
if (o === -1) return null;
|
|
1756
|
-
if (i === n) return
|
|
1804
|
+
if (i === n) return U(e.substring(t, o));
|
|
1757
1805
|
r = o + 1;
|
|
1758
1806
|
continue;
|
|
1759
1807
|
}
|
|
1760
1808
|
let o = r;
|
|
1761
|
-
for (; r < e.length && !
|
|
1762
|
-
if (i === n) return
|
|
1809
|
+
for (; r < e.length && !H(e[r]) && e[r] !== ">";) r++;
|
|
1810
|
+
if (i === n) return U(e.substring(o, r));
|
|
1763
1811
|
}
|
|
1764
1812
|
return null;
|
|
1765
1813
|
}
|
|
1766
|
-
// ../types/src/merge-tag-html.ts
|
|
1767
|
-
function jn(e) {
|
|
1768
|
-
return Pn(e, (e) => e, !1);
|
|
1769
|
-
}
|
|
1770
1814
|
function Mn(e, t) {
|
|
1771
1815
|
return Pn(e, t, !0);
|
|
1772
1816
|
}
|
|
@@ -1794,7 +1838,7 @@ function Pn(e, t, n) {
|
|
|
1794
1838
|
r += e.substring(i, a + 5), i = a + 5;
|
|
1795
1839
|
continue;
|
|
1796
1840
|
}
|
|
1797
|
-
let { end: s, nextSpan: c } =
|
|
1841
|
+
let { end: s, nextSpan: c } = On(e, a + 5);
|
|
1798
1842
|
if (c !== -1) {
|
|
1799
1843
|
r += e.substring(i, c), i = c;
|
|
1800
1844
|
continue;
|
|
@@ -1826,7 +1870,7 @@ function Fn(e, t, n) {
|
|
|
1826
1870
|
for (; i < e.length;) {
|
|
1827
1871
|
let t = e.indexOf("<", i);
|
|
1828
1872
|
if (t === -1) return -1;
|
|
1829
|
-
let n =
|
|
1873
|
+
let n = Dn(e, t + 1);
|
|
1830
1874
|
if (n === -1) return -1;
|
|
1831
1875
|
let a = e.startsWith("</span", t), o = e.startsWith("<span", t), s = e[t + (a ? 6 : 5)];
|
|
1832
1876
|
if ((o || a) && (s === ">" || s === "/" || /\s/.test(s)) && (r += a ? -1 : 1, r === 0)) return n + 1;
|
|
@@ -1835,10 +1879,9 @@ function Fn(e, t, n) {
|
|
|
1835
1879
|
return -1;
|
|
1836
1880
|
}
|
|
1837
1881
|
function In(e, t) {
|
|
1838
|
-
return
|
|
1882
|
+
return jn(e, t);
|
|
1839
1883
|
}
|
|
1840
|
-
|
|
1841
|
-
var G = {
|
|
1884
|
+
var W = {
|
|
1842
1885
|
liquid: {
|
|
1843
1886
|
value: /\{\{.+?\}\}/g,
|
|
1844
1887
|
logic: /\{%-?\s*(\w+).*?-?%\}/g,
|
|
@@ -1864,9 +1907,9 @@ var G = {
|
|
|
1864
1907
|
closer: "=%%"
|
|
1865
1908
|
}
|
|
1866
1909
|
};
|
|
1867
|
-
function
|
|
1868
|
-
return Object.keys(
|
|
1869
|
-
let n =
|
|
1910
|
+
function G(e) {
|
|
1911
|
+
return Object.keys(W).find((t) => {
|
|
1912
|
+
let n = W[t];
|
|
1870
1913
|
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
1914
|
});
|
|
1872
1915
|
}
|
|
@@ -1887,8 +1930,8 @@ function Ln(e, t, n) {
|
|
|
1887
1930
|
lineBreak: -1
|
|
1888
1931
|
};
|
|
1889
1932
|
}
|
|
1890
|
-
function
|
|
1891
|
-
let a =
|
|
1933
|
+
function K(e, t, n, r = 0, i = Infinity) {
|
|
1934
|
+
let a = G(t);
|
|
1892
1935
|
if (!a) {
|
|
1893
1936
|
let a = t[n], o = new RegExp(a.source, a.flags.replace(/[gy]/g, "") + "g");
|
|
1894
1937
|
return o.lastIndex = r, [...e.matchAll(o)].slice(0, i).map((e) => ({
|
|
@@ -1935,7 +1978,7 @@ function q(e, t, n, r = 0, i = Infinity) {
|
|
|
1935
1978
|
return f;
|
|
1936
1979
|
}
|
|
1937
1980
|
function Rn(e, t) {
|
|
1938
|
-
let n =
|
|
1981
|
+
let n = G(t);
|
|
1939
1982
|
if (!n) {
|
|
1940
1983
|
let n = RegExp(`(${t.value.source}|${t.logic.source})`, "g");
|
|
1941
1984
|
return [...e.matchAll(n)].map((e) => ({
|
|
@@ -1943,7 +1986,7 @@ function Rn(e, t) {
|
|
|
1943
1986
|
value: e[0]
|
|
1944
1987
|
}));
|
|
1945
1988
|
}
|
|
1946
|
-
if (n === "handlebars") return
|
|
1989
|
+
if (n === "handlebars") return K(e, t, "value");
|
|
1947
1990
|
if (n === "mailchimp") {
|
|
1948
1991
|
let n = [], r = new RegExp(t.value.source, "y"), i = new RegExp(t.logic.source, "y"), a = /\*\|\w+[:|]/y, o = 0;
|
|
1949
1992
|
for (; o < e.length;) {
|
|
@@ -1977,10 +2020,10 @@ function Rn(e, t) {
|
|
|
1977
2020
|
}
|
|
1978
2021
|
return n;
|
|
1979
2022
|
}
|
|
1980
|
-
let r = [], i = 0, a =
|
|
2023
|
+
let r = [], i = 0, a = K(e, t, "value", i, 1)[0], o = K(e, t, "logic", i, 1)[0];
|
|
1981
2024
|
for (; a || o;) {
|
|
1982
2025
|
let n = !o || a && a.index <= o.index ? a : o;
|
|
1983
|
-
r.push(n), i = n.index + n.value.length, (n === a || a && a.index < i) && (a =
|
|
2026
|
+
r.push(n), i = n.index + n.value.length, (n === a || a && a.index < i) && (a = K(e, t, "value", i, 1)[0]), (n === o || o && o.index < i) && (o = K(e, t, "logic", i, 1)[0]);
|
|
1984
2027
|
}
|
|
1985
2028
|
return r;
|
|
1986
2029
|
}
|
|
@@ -1988,7 +2031,7 @@ function zn(e) {
|
|
|
1988
2031
|
return typeof e == "string" && e.trim() !== "" ? e : null;
|
|
1989
2032
|
}
|
|
1990
2033
|
function Bn(e) {
|
|
1991
|
-
return Object.values(
|
|
2034
|
+
return Object.values(W).find((t) => t.value.source === e.value.source) ?? null;
|
|
1992
2035
|
}
|
|
1993
2036
|
function Vn(e) {
|
|
1994
2037
|
return zn(e.opener) ?? Bn(e)?.opener ?? null;
|
|
@@ -1997,7 +2040,7 @@ function Hn(e) {
|
|
|
1997
2040
|
return zn(e.closer) ?? Bn(e)?.closer ?? null;
|
|
1998
2041
|
}
|
|
1999
2042
|
function Un(e) {
|
|
2000
|
-
return e ? typeof e == "string" ?
|
|
2043
|
+
return e ? typeof e == "string" ? W[e] ?? W.liquid : e : W.liquid;
|
|
2001
2044
|
}
|
|
2002
2045
|
function Wn(e) {
|
|
2003
2046
|
let t = e.source, n = e.flags.replace("g", "");
|
|
@@ -2012,43 +2055,47 @@ function Kn(e, t) {
|
|
|
2012
2055
|
return n ? n.label : e;
|
|
2013
2056
|
}
|
|
2014
2057
|
function qn(e, t) {
|
|
2015
|
-
return
|
|
2058
|
+
return q(e, "data-merge-tag", (e) => Kn(e, t));
|
|
2016
2059
|
}
|
|
2017
2060
|
function Jn(e, t) {
|
|
2018
2061
|
return t.find((t) => t.value === e)?.sample;
|
|
2019
2062
|
}
|
|
2020
2063
|
function Yn(e, t) {
|
|
2021
|
-
return
|
|
2064
|
+
return q(e, "data-merge-tag", (e) => $n(Jn(e, t) ?? Kn(e, t)), { unwrap: (e) => Jn(e, t) !== void 0 });
|
|
2065
|
+
}
|
|
2066
|
+
function Xn(e, t, n) {
|
|
2067
|
+
let r = (e) => t.some((t) => t.value === e) || Gn(e, n), i = (e) => tr(e, n);
|
|
2068
|
+
return q(q(e, "data-merge-tag", (e) => r(e) ? Kn(e, t) : $n(e), { unwrap: (e) => !r(e) }), "data-logic-merge-tag", (e) => i(e) ? nr(e, n) : $n(e), { unwrap: (e) => !i(e) });
|
|
2022
2069
|
}
|
|
2023
|
-
function
|
|
2070
|
+
function Zn(e) {
|
|
2024
2071
|
return e.some((e) => e.sample !== void 0);
|
|
2025
2072
|
}
|
|
2026
|
-
function
|
|
2073
|
+
function Qn(e, t) {
|
|
2027
2074
|
if (!e) return e;
|
|
2028
2075
|
let n = e;
|
|
2029
2076
|
for (let e of t) e.sample !== void 0 && (n = n.split(e.value).join(e.sample));
|
|
2030
2077
|
return n;
|
|
2031
2078
|
}
|
|
2032
|
-
function
|
|
2079
|
+
function $n(e) {
|
|
2033
2080
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
2034
2081
|
}
|
|
2035
|
-
function
|
|
2082
|
+
function er(e, t) {
|
|
2036
2083
|
if (!e) return !1;
|
|
2037
|
-
if (
|
|
2084
|
+
if (G(t)) return K(e, t, "value", 0, 1).length > 0 || K(e, t, "logic", 0, 1).length > 0;
|
|
2038
2085
|
let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
|
|
2039
2086
|
return n.test(e) || r.test(e);
|
|
2040
2087
|
}
|
|
2041
|
-
function
|
|
2088
|
+
function tr(e, t) {
|
|
2042
2089
|
return Wn(t.logic).test(e?.trim() || "");
|
|
2043
2090
|
}
|
|
2044
|
-
function
|
|
2091
|
+
function nr(e, t) {
|
|
2045
2092
|
let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
|
|
2046
2093
|
return r && r[1] ? r[1].toUpperCase() : e;
|
|
2047
2094
|
}
|
|
2048
|
-
function
|
|
2049
|
-
return
|
|
2095
|
+
function rr(e, t) {
|
|
2096
|
+
return q(e, "data-logic-merge-tag", (e) => nr(e, t));
|
|
2050
2097
|
}
|
|
2051
|
-
function
|
|
2098
|
+
function q(e, t, n, r) {
|
|
2052
2099
|
let i = "", a = 0;
|
|
2053
2100
|
for (; a < e.length;) {
|
|
2054
2101
|
let o = e.indexOf("<span", a);
|
|
@@ -2061,7 +2108,7 @@ function rr(e, t, n, r) {
|
|
|
2061
2108
|
i += e.substring(a, o + 5), a = o + 5;
|
|
2062
2109
|
continue;
|
|
2063
2110
|
}
|
|
2064
|
-
let { end: c, nextSpan: l } =
|
|
2111
|
+
let { end: c, nextSpan: l } = On(e, o + 5);
|
|
2065
2112
|
if (l !== -1) {
|
|
2066
2113
|
i += e.substring(a, l), a = l;
|
|
2067
2114
|
continue;
|
|
@@ -2070,7 +2117,7 @@ function rr(e, t, n, r) {
|
|
|
2070
2117
|
i += e.substring(a);
|
|
2071
2118
|
break;
|
|
2072
2119
|
}
|
|
2073
|
-
let u =
|
|
2120
|
+
let u = jn(e.substring(o + 5, c), t);
|
|
2074
2121
|
if (u === null) {
|
|
2075
2122
|
i += e.substring(a, c + 1), a = c + 1;
|
|
2076
2123
|
continue;
|
|
@@ -2085,7 +2132,6 @@ function rr(e, t, n, r) {
|
|
|
2085
2132
|
}
|
|
2086
2133
|
return i;
|
|
2087
2134
|
}
|
|
2088
|
-
// ../types/src/locale-strings.ts
|
|
2089
2135
|
var ir = {
|
|
2090
2136
|
title: ["content"],
|
|
2091
2137
|
paragraph: ["content"]
|
|
@@ -2093,7 +2139,7 @@ var ir = {
|
|
|
2093
2139
|
function ar(e) {
|
|
2094
2140
|
let t = [], n = /<[a-z][\w:-]*\b/gi;
|
|
2095
2141
|
for (; n.exec(e);) {
|
|
2096
|
-
let r =
|
|
2142
|
+
let r = Dn(e, n.lastIndex);
|
|
2097
2143
|
if (r < 0) break;
|
|
2098
2144
|
let i = n.lastIndex, a = e.slice(i, r), o = /[^\s"'<>/=]+\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+))/g;
|
|
2099
2145
|
for (let e; e = o.exec(a);) {
|
|
@@ -2111,8 +2157,8 @@ function or(e, t, n) {
|
|
|
2111
2157
|
let r = n === "html" ? Nn(e) : [], i = n === "html" ? ar(e) : [], a = r.map((e) => ({
|
|
2112
2158
|
...e,
|
|
2113
2159
|
attribute: !1
|
|
2114
|
-
})), o = 0, s =
|
|
2115
|
-
let c = e.slice(n, r), l = ["logic", "value"], u = s ? l.map((e) =>
|
|
2160
|
+
})), o = 0, s = G(t) !== void 0, c = (n, r) => {
|
|
2161
|
+
let c = e.slice(n, r), l = ["logic", "value"], u = s ? l.map((e) => K(c, t, e, 0, 1)[0]) : [void 0, void 0], d = s ? null : [t.logic, t.value].map((e) => new RegExp(e.source, e.flags.replace(/[gy]/g, "") + "g")), f = 0;
|
|
2116
2162
|
for (; f < c.length;) {
|
|
2117
2163
|
let e = s ? u.flatMap((e) => e ? [e] : []) : d.flatMap((e, t) => {
|
|
2118
2164
|
let n = u[t];
|
|
@@ -2137,7 +2183,7 @@ function or(e, t, n) {
|
|
|
2137
2183
|
end: ee,
|
|
2138
2184
|
markup: r.value,
|
|
2139
2185
|
attribute: i[o] !== void 0 && p >= i[o].start && ee <= i[o].end
|
|
2140
|
-
}), f = r.index + r.value.length, s) for (let e = 0; e < l.length; e++) u[e] && u[e].index < f && (u[e] =
|
|
2186
|
+
}), f = r.index + r.value.length, s) for (let e = 0; e < l.length; e++) u[e] && u[e].index < f && (u[e] = K(c, t, l[e], f, 1)[0]);
|
|
2141
2187
|
}
|
|
2142
2188
|
}, l = 0;
|
|
2143
2189
|
for (let e of r) c(l, e.start), l = e.end;
|
|
@@ -2150,7 +2196,7 @@ function sr(e) {
|
|
|
2150
2196
|
};
|
|
2151
2197
|
for (let a of e.matchAll(/&(?:#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g)) {
|
|
2152
2198
|
i(a.index);
|
|
2153
|
-
let e =
|
|
2199
|
+
let e = U(a[0]);
|
|
2154
2200
|
t += e;
|
|
2155
2201
|
for (let t = 1; t < e.length; t++) n.push(-1);
|
|
2156
2202
|
r = a.index + a[0].length, n.push(r);
|
|
@@ -2190,7 +2236,7 @@ function ur(e, t, n) {
|
|
|
2190
2236
|
end: r.index,
|
|
2191
2237
|
attribute: !1
|
|
2192
2238
|
});
|
|
2193
|
-
let a = r[0] === "<!--" ? e.indexOf("-->", t.lastIndex) :
|
|
2239
|
+
let a = r[0] === "<!--" ? e.indexOf("-->", t.lastIndex) : Dn(e, t.lastIndex);
|
|
2194
2240
|
if (a < 0) return [];
|
|
2195
2241
|
n = a + (r[0] === "<!--" ? 3 : 1), t.lastIndex = n;
|
|
2196
2242
|
}
|
|
@@ -2252,7 +2298,7 @@ function hr(e, t, n, r, i) {
|
|
|
2252
2298
|
return n >= 0 && o.add(n), n;
|
|
2253
2299
|
}, c = a.map((e) => s((t) => t === e.markup));
|
|
2254
2300
|
return a.forEach((e, t) => {
|
|
2255
|
-
c[t] < 0 && e.term !== void 0 && r === "html" && (c[t] = s((t) =>
|
|
2301
|
+
c[t] < 0 && e.term !== void 0 && r === "html" && (c[t] = s((t) => U(t) === e.term));
|
|
2256
2302
|
}), o.size !== t.length || a.some((e, t) => c[t] < 0 && e.term === void 0) ? null : fr(e, a.filter((e, t) => c[t] >= 0), c.filter((e) => e >= 0).map((e) => e + 1));
|
|
2257
2303
|
}
|
|
2258
2304
|
function gr(e, t, n = []) {
|
|
@@ -2262,7 +2308,9 @@ function gr(e, t, n = []) {
|
|
|
2262
2308
|
let o = n.l10n?.[t];
|
|
2263
2309
|
for (let t of i) {
|
|
2264
2310
|
let i = y(n, t);
|
|
2265
|
-
typeof i != "string" || i === "" || Object.keys(o?.set ?? {}).some((e) => e === t || t.startsWith(`${e}.`))
|
|
2311
|
+
if (typeof i != "string" || i === "" || Object.keys(o?.set ?? {}).some((e) => e === t || t.startsWith(`${e}.`))) continue;
|
|
2312
|
+
let s = e.kind === "block" ? e.blockId : "settings";
|
|
2313
|
+
r.set(`${s}/${t}`, {
|
|
2266
2314
|
target: e,
|
|
2267
2315
|
path: t,
|
|
2268
2316
|
source: i,
|
|
@@ -2275,14 +2323,14 @@ function gr(e, t, n = []) {
|
|
|
2275
2323
|
if (r.type !== "html" && i({
|
|
2276
2324
|
kind: "block",
|
|
2277
2325
|
blockId: r.id
|
|
2278
|
-
}, r,
|
|
2326
|
+
}, r, x(r, n), r.type), r.type === "section") for (let e of r.children) a(e);
|
|
2279
2327
|
else r.type === "wrapper" && a(r.children);
|
|
2280
2328
|
}
|
|
2281
2329
|
};
|
|
2282
2330
|
return a(e.blocks), i({ kind: "settings" }, e.settings, g), r;
|
|
2283
2331
|
}
|
|
2284
2332
|
function _r(e, t, n) {
|
|
2285
|
-
let r = n.only === "all" ? null :
|
|
2333
|
+
let r = n.only === "all" ? null : Se(e, t, n.definitions), i = r && /* @__PURE__ */ new Set([...r.missing, ...r.stale]), a = [], o = {};
|
|
2286
2334
|
for (let [r, s] of gr(e, t, n.definitions)) {
|
|
2287
2335
|
if (i && !i.has(r) || n.blockId !== void 0 && (s.target.kind !== "block" || s.target.blockId !== n.blockId)) continue;
|
|
2288
2336
|
let e = pr(s.source, n.syntax, s.format, n), t = s.text ? hr(s.text.value, e.tokens, n.syntax, s.format, n) : void 0;
|
|
@@ -2346,7 +2394,6 @@ function vr(e, t, n, r) {
|
|
|
2346
2394
|
rejected: l
|
|
2347
2395
|
};
|
|
2348
2396
|
}
|
|
2349
|
-
// ../types/src/custom-block-liquid.ts
|
|
2350
2397
|
var yr = 1e7, br = 2e3;
|
|
2351
2398
|
function xr(e) {
|
|
2352
2399
|
return new e.Liquid({
|
|
@@ -2358,10 +2405,9 @@ function xr(e) {
|
|
|
2358
2405
|
templates: {}
|
|
2359
2406
|
});
|
|
2360
2407
|
}
|
|
2361
|
-
// ../types/src/factory.ts
|
|
2362
2408
|
function Y(e, t) {
|
|
2363
2409
|
let n = m(e);
|
|
2364
|
-
return !t || Object.keys(t).length === 0 ? n :
|
|
2410
|
+
return !t || Object.keys(t).length === 0 ? n : bn(n, t);
|
|
2365
2411
|
}
|
|
2366
2412
|
function X(e) {
|
|
2367
2413
|
return e === void 0 ? void 0 : m(e);
|
|
@@ -2384,7 +2430,7 @@ function Cr(e = {}) {
|
|
|
2384
2430
|
return Y({
|
|
2385
2431
|
id: Z(),
|
|
2386
2432
|
type: "title",
|
|
2387
|
-
...
|
|
2433
|
+
...rn,
|
|
2388
2434
|
styles: Q()
|
|
2389
2435
|
}, e);
|
|
2390
2436
|
}
|
|
@@ -2392,7 +2438,7 @@ function wr(e = {}) {
|
|
|
2392
2438
|
return Y({
|
|
2393
2439
|
id: Z(),
|
|
2394
2440
|
type: "paragraph",
|
|
2395
|
-
...
|
|
2441
|
+
...an,
|
|
2396
2442
|
styles: Q()
|
|
2397
2443
|
}, e);
|
|
2398
2444
|
}
|
|
@@ -2400,7 +2446,7 @@ function Tr(e = {}) {
|
|
|
2400
2446
|
return Y({
|
|
2401
2447
|
id: Z(),
|
|
2402
2448
|
type: "image",
|
|
2403
|
-
...
|
|
2449
|
+
...on,
|
|
2404
2450
|
styles: Q()
|
|
2405
2451
|
}, e);
|
|
2406
2452
|
}
|
|
@@ -2408,7 +2454,7 @@ function Er(e = {}) {
|
|
|
2408
2454
|
return Y({
|
|
2409
2455
|
id: Z(),
|
|
2410
2456
|
type: "button",
|
|
2411
|
-
...
|
|
2457
|
+
...sn,
|
|
2412
2458
|
styles: Q()
|
|
2413
2459
|
}, e);
|
|
2414
2460
|
}
|
|
@@ -2416,7 +2462,7 @@ function Dr(e = {}) {
|
|
|
2416
2462
|
return Y({
|
|
2417
2463
|
id: Z(),
|
|
2418
2464
|
type: "divider",
|
|
2419
|
-
...
|
|
2465
|
+
...cn,
|
|
2420
2466
|
styles: Q(20)
|
|
2421
2467
|
}, e);
|
|
2422
2468
|
}
|
|
@@ -2424,7 +2470,7 @@ function Or(e = {}) {
|
|
|
2424
2470
|
return Y({
|
|
2425
2471
|
id: Z(),
|
|
2426
2472
|
type: "section",
|
|
2427
|
-
...
|
|
2473
|
+
...ln,
|
|
2428
2474
|
children: [[]],
|
|
2429
2475
|
styles: Q(20)
|
|
2430
2476
|
}, e);
|
|
@@ -2433,7 +2479,7 @@ function kr(e = {}) {
|
|
|
2433
2479
|
return Y({
|
|
2434
2480
|
id: Z(),
|
|
2435
2481
|
type: "video",
|
|
2436
|
-
...
|
|
2482
|
+
...un,
|
|
2437
2483
|
styles: Q()
|
|
2438
2484
|
}, e);
|
|
2439
2485
|
}
|
|
@@ -2442,7 +2488,7 @@ function Ar(e = {}) {
|
|
|
2442
2488
|
id: Z(),
|
|
2443
2489
|
type: "social",
|
|
2444
2490
|
icons: [],
|
|
2445
|
-
...
|
|
2491
|
+
...dn,
|
|
2446
2492
|
styles: Q()
|
|
2447
2493
|
}, e);
|
|
2448
2494
|
}
|
|
@@ -2450,7 +2496,7 @@ function jr(e = {}) {
|
|
|
2450
2496
|
return Y({
|
|
2451
2497
|
id: Z(),
|
|
2452
2498
|
type: "spacer",
|
|
2453
|
-
...
|
|
2499
|
+
...fn,
|
|
2454
2500
|
styles: Q(0)
|
|
2455
2501
|
}, e);
|
|
2456
2502
|
}
|
|
@@ -2458,7 +2504,7 @@ function Mr(e = {}) {
|
|
|
2458
2504
|
return Y({
|
|
2459
2505
|
id: Z(),
|
|
2460
2506
|
type: "html",
|
|
2461
|
-
...
|
|
2507
|
+
...pn,
|
|
2462
2508
|
styles: Q()
|
|
2463
2509
|
}, e);
|
|
2464
2510
|
}
|
|
@@ -2467,7 +2513,7 @@ function Nr(e = {}) {
|
|
|
2467
2513
|
id: Z(),
|
|
2468
2514
|
type: "menu",
|
|
2469
2515
|
items: [],
|
|
2470
|
-
...
|
|
2516
|
+
...mn,
|
|
2471
2517
|
styles: Q()
|
|
2472
2518
|
}, e);
|
|
2473
2519
|
}
|
|
@@ -2485,7 +2531,7 @@ function Fr(e = {}) {
|
|
|
2485
2531
|
id: Z(),
|
|
2486
2532
|
type: "table",
|
|
2487
2533
|
rows: Pr(3, 3),
|
|
2488
|
-
...
|
|
2534
|
+
...hn,
|
|
2489
2535
|
styles: Q()
|
|
2490
2536
|
}, e);
|
|
2491
2537
|
}
|
|
@@ -2493,7 +2539,7 @@ function Ir(e = {}) {
|
|
|
2493
2539
|
return Y({
|
|
2494
2540
|
id: Z(),
|
|
2495
2541
|
type: "countdown",
|
|
2496
|
-
...
|
|
2542
|
+
...gn,
|
|
2497
2543
|
styles: Q()
|
|
2498
2544
|
}, e);
|
|
2499
2545
|
}
|
|
@@ -2584,42 +2630,41 @@ function Ur(e) {
|
|
|
2584
2630
|
};
|
|
2585
2631
|
return n(t), t;
|
|
2586
2632
|
}
|
|
2587
|
-
// ../types/src/layout.ts
|
|
2588
2633
|
var Wr = "[Templatical] layout: must contain exactly one slot block", Gr = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", Kr = "[Templatical] layout: a wrapper cannot contain a wrapper", qr = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", Jr = "[Templatical] slot is not a valid content block", Yr = "[Templatical] layout: a wrapper cannot contain a section with its own wrapper (section.wrapper)", Xr = "[Templatical] wrapper is not a valid content block";
|
|
2589
2634
|
function $(e, t, n = null, r = !1, i = !1) {
|
|
2590
|
-
for (let a of e) if (t(a, n, r, i),
|
|
2591
|
-
else
|
|
2635
|
+
for (let a of e) if (t(a, n, r, i), tn(a)) for (let e of a.children) $(e, t, a, !0, i);
|
|
2636
|
+
else V(a) && $(a.children, t, a, r, !0);
|
|
2592
2637
|
}
|
|
2593
2638
|
function Zr(e) {
|
|
2594
2639
|
let t = 0;
|
|
2595
2640
|
if ($(e.blocks, (e, n, r, i) => {
|
|
2596
|
-
if (i &&
|
|
2597
|
-
if (
|
|
2598
|
-
if (
|
|
2641
|
+
if (i && tn(e) && e.wrapper) throw Error(Yr);
|
|
2642
|
+
if (B(e) && (t += 1, r)) throw Error(Gr);
|
|
2643
|
+
if (V(e)) {
|
|
2599
2644
|
if (r) throw Error(Gr);
|
|
2600
|
-
if (e.children.some(
|
|
2645
|
+
if (e.children.some(V)) throw Error(Kr);
|
|
2601
2646
|
}
|
|
2602
2647
|
}), t !== 1) throw Error(Wr);
|
|
2603
2648
|
}
|
|
2604
2649
|
function Qr(e) {
|
|
2605
2650
|
$(e.blocks, (e) => {
|
|
2606
|
-
if (
|
|
2651
|
+
if (B(e)) throw Error(Jr);
|
|
2607
2652
|
});
|
|
2608
2653
|
}
|
|
2609
2654
|
function $r(e) {
|
|
2610
2655
|
$(e.blocks, (e) => {
|
|
2611
|
-
if (
|
|
2656
|
+
if (V(e)) throw Error(Xr);
|
|
2612
2657
|
});
|
|
2613
2658
|
}
|
|
2614
2659
|
function ei(e) {
|
|
2615
2660
|
let t = !1;
|
|
2616
2661
|
return $(e.blocks, (e, n) => {
|
|
2617
|
-
|
|
2662
|
+
B(e) && n !== null && V(n) && (t = !0);
|
|
2618
2663
|
}), t;
|
|
2619
2664
|
}
|
|
2620
2665
|
function ti(e) {
|
|
2621
|
-
if (
|
|
2622
|
-
if (
|
|
2666
|
+
if (B(e)) return e;
|
|
2667
|
+
if (V(e)) {
|
|
2623
2668
|
let t = Ur({
|
|
2624
2669
|
...e,
|
|
2625
2670
|
children: []
|
|
@@ -2631,11 +2676,11 @@ function ti(e) {
|
|
|
2631
2676
|
function ni(e) {
|
|
2632
2677
|
for (let t = 0; t < e.length; t++) {
|
|
2633
2678
|
let n = e[t];
|
|
2634
|
-
if (
|
|
2679
|
+
if (B(n)) return {
|
|
2635
2680
|
parent: e,
|
|
2636
2681
|
index: t
|
|
2637
2682
|
};
|
|
2638
|
-
if (
|
|
2683
|
+
if (V(n)) {
|
|
2639
2684
|
let e = ni(n.children);
|
|
2640
2685
|
if (e) return e;
|
|
2641
2686
|
}
|
|
@@ -2643,7 +2688,7 @@ function ni(e) {
|
|
|
2643
2688
|
return null;
|
|
2644
2689
|
}
|
|
2645
2690
|
function ri(e) {
|
|
2646
|
-
for (let t of e) if (
|
|
2691
|
+
for (let t of e) if (tn(t)) {
|
|
2647
2692
|
if (t.wrapper) return !0;
|
|
2648
2693
|
for (let e of t.children) if (ri(e)) return !0;
|
|
2649
2694
|
}
|
|
@@ -2661,7 +2706,6 @@ function ii(e, t) {
|
|
|
2661
2706
|
}
|
|
2662
2707
|
};
|
|
2663
2708
|
}
|
|
2664
|
-
// ../types/src/url-policy.ts
|
|
2665
2709
|
var ai = Object.freeze([
|
|
2666
2710
|
"http",
|
|
2667
2711
|
"https",
|
|
@@ -2672,44 +2716,43 @@ var ai = Object.freeze([
|
|
|
2672
2716
|
"sms",
|
|
2673
2717
|
"xmpp",
|
|
2674
2718
|
"cid"
|
|
2675
|
-
])
|
|
2719
|
+
]);
|
|
2720
|
+
Object.freeze([
|
|
2676
2721
|
"javascript",
|
|
2677
2722
|
"data",
|
|
2678
2723
|
"vbscript"
|
|
2679
2724
|
]);
|
|
2680
|
-
function
|
|
2725
|
+
function oi(e) {
|
|
2681
2726
|
return e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2682
2727
|
}
|
|
2683
|
-
function
|
|
2684
|
-
let t = /^([a-z][a-z0-9+.-]*):/i.exec(
|
|
2728
|
+
function si(e) {
|
|
2729
|
+
let t = /^([a-z][a-z0-9+.-]*):/i.exec(oi(e));
|
|
2685
2730
|
return t ? t[1].toLowerCase() : null;
|
|
2686
2731
|
}
|
|
2687
|
-
var
|
|
2732
|
+
var ci = /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i, li = Object.freeze([
|
|
2688
2733
|
"href",
|
|
2689
2734
|
"xlink:href",
|
|
2690
2735
|
"background",
|
|
2691
2736
|
"poster",
|
|
2692
2737
|
"src"
|
|
2693
|
-
]),
|
|
2738
|
+
]), ui = Object.freeze([
|
|
2694
2739
|
"srcdoc",
|
|
2695
2740
|
"ping",
|
|
2696
2741
|
"formaction",
|
|
2697
2742
|
"action"
|
|
2698
2743
|
]);
|
|
2699
|
-
function
|
|
2700
|
-
let n =
|
|
2701
|
-
return r === null || ai.some((e) => e === r) ? !0 : t.toLowerCase() === "src" &&
|
|
2744
|
+
function di(e, t) {
|
|
2745
|
+
let n = oi(e), r = si(n);
|
|
2746
|
+
return r === null || ai.some((e) => e === r) ? !0 : t.toLowerCase() === "src" && ci.test(n);
|
|
2702
2747
|
}
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
return e.replace(pi, "").trim() === "";
|
|
2748
|
+
var fi = /<\/?p\b[^<>]*>/gi, pi = /<p\b([^<>]*)>\s*<\/p>/gi;
|
|
2749
|
+
function mi(e) {
|
|
2750
|
+
return e.replace(fi, "").trim() === "";
|
|
2707
2751
|
}
|
|
2708
|
-
function
|
|
2709
|
-
return
|
|
2752
|
+
function hi(e) {
|
|
2753
|
+
return mi(e) ? e : e.replace(pi, "<p$1> </p>");
|
|
2710
2754
|
}
|
|
2711
|
-
|
|
2712
|
-
var _i = {
|
|
2755
|
+
var gi = {
|
|
2713
2756
|
arial: "Arial, sans-serif",
|
|
2714
2757
|
helvetica: "Helvetica, sans-serif",
|
|
2715
2758
|
georgia: "Georgia, serif",
|
|
@@ -2718,13 +2761,13 @@ var _i = {
|
|
|
2718
2761
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2719
2762
|
"courier new": "'Courier New', monospace",
|
|
2720
2763
|
tahoma: "Tahoma, sans-serif"
|
|
2721
|
-
},
|
|
2764
|
+
}, _i = /* @__PURE__ */ new Set([
|
|
2722
2765
|
"inherit",
|
|
2723
2766
|
"initial",
|
|
2724
2767
|
"unset",
|
|
2725
2768
|
"revert",
|
|
2726
2769
|
"revert-layer"
|
|
2727
|
-
]),
|
|
2770
|
+
]), vi = /* @__PURE__ */ new Set([
|
|
2728
2771
|
"serif",
|
|
2729
2772
|
"sans-serif",
|
|
2730
2773
|
"monospace",
|
|
@@ -2739,14 +2782,14 @@ var _i = {
|
|
|
2739
2782
|
"math",
|
|
2740
2783
|
"fangsong"
|
|
2741
2784
|
]);
|
|
2742
|
-
function
|
|
2785
|
+
function yi(e) {
|
|
2743
2786
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
2744
2787
|
}
|
|
2745
|
-
function
|
|
2788
|
+
function bi(e) {
|
|
2746
2789
|
if (typeof e != "string") return [];
|
|
2747
2790
|
let t = e.replace(/!\s*important\s*$/i, ""), n = [], r = 0;
|
|
2748
2791
|
for (;;) {
|
|
2749
|
-
for (; r < t.length &&
|
|
2792
|
+
for (; r < t.length && yi(t[r]);) r++;
|
|
2750
2793
|
if (r >= t.length) return [];
|
|
2751
2794
|
let e = t[r];
|
|
2752
2795
|
if (e === "\"" || e === "'") {
|
|
@@ -2763,7 +2806,7 @@ function xi(e) {
|
|
|
2763
2806
|
}
|
|
2764
2807
|
}
|
|
2765
2808
|
if (!o) return [];
|
|
2766
|
-
for (; a < t.length &&
|
|
2809
|
+
for (; a < t.length && yi(t[a]);) a++;
|
|
2767
2810
|
if (a < t.length && t[a] !== ",") return [];
|
|
2768
2811
|
n.push({
|
|
2769
2812
|
name: i,
|
|
@@ -2771,7 +2814,7 @@ function xi(e) {
|
|
|
2771
2814
|
}), r = a;
|
|
2772
2815
|
} else {
|
|
2773
2816
|
let e = t.indexOf(",", r), i = e === -1 ? t.length : e, a = t.slice(r, i).trim().split(/\s+/).join(" ");
|
|
2774
|
-
if (a === "" || a.includes("\"") || a.includes("'") ||
|
|
2817
|
+
if (a === "" || a.includes("\"") || a.includes("'") || _i.has(a.toLowerCase())) return [];
|
|
2775
2818
|
n.push({
|
|
2776
2819
|
name: a,
|
|
2777
2820
|
quoted: !1
|
|
@@ -2781,27 +2824,26 @@ function xi(e) {
|
|
|
2781
2824
|
r++;
|
|
2782
2825
|
}
|
|
2783
2826
|
}
|
|
2784
|
-
function
|
|
2827
|
+
function xi(e) {
|
|
2785
2828
|
return `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
2786
2829
|
}
|
|
2787
|
-
function
|
|
2788
|
-
return !e.quoted &&
|
|
2830
|
+
function Si(e) {
|
|
2831
|
+
return !e.quoted && vi.has(e.name.toLowerCase());
|
|
2789
2832
|
}
|
|
2790
|
-
function
|
|
2791
|
-
return
|
|
2833
|
+
function Ci(e) {
|
|
2834
|
+
return bi(e)[0]?.name ?? "";
|
|
2792
2835
|
}
|
|
2793
|
-
function
|
|
2794
|
-
let n = (e) => `${
|
|
2836
|
+
function wi(e, t) {
|
|
2837
|
+
let n = (e) => `${xi(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
|
|
2795
2838
|
if (i) return n(i);
|
|
2796
|
-
let a =
|
|
2839
|
+
let a = bi(e);
|
|
2797
2840
|
if (a.length !== 1) return e;
|
|
2798
2841
|
let [o] = a, s = o.name.toLowerCase(), c = t.customFonts.find((e) => e.name.toLowerCase() === s);
|
|
2799
|
-
return c ? n(c) :
|
|
2842
|
+
return c ? n(c) : gi[s] || (Si(o) ? e : `${xi(o.name)}, ${t.defaultFallback}`);
|
|
2800
2843
|
}
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2844
|
+
function Ti(e) {
|
|
2845
|
+
if (typeof e != "object" || !e) return !1;
|
|
2846
|
+
let t = e;
|
|
2847
|
+
return Array.isArray(t.blocks);
|
|
2804
2848
|
}
|
|
2805
|
-
export {
|
|
2806
|
-
|
|
2807
|
-
//# sourceMappingURL=src-CVHGPKSW.js.map
|
|
2849
|
+
export { Cr as $, ee as $t, G as A, B as At, xr as B, p as Bt, ii as C, oe as Ct, Qr as D, di as Dt, E, Ti as Et, Mt as F, Se as Ft, Nr as G, Pt as Gt, Dr as H, fe as Ht, Vr as I, Ce as It, Oe as J, It as Jt, wr as K, wn as Kt, Er as L, _r as Lt, Ur as M, S as Mt, wt as N, V as Nt, $r as O, v as Ot, er as P, ei as Pt, Fr as Q, Un as Qt, Ir as R, ge as Rt, Tn as S, nn as St, Ae as T, Gn as Tt, Mr as U, y as Ut, xn as V, ue as Vt, Tr as W, Mn as Wt, Ar as X, qn as Xt, zr as Y, rr as Yt, jr as Z, xe as Zt, zt as _, Zr as _n, Hn as _t, l as a, Wt as an, we as at, c as b, Rt as bt, _n as c, Yn as cn, si as ct, ui as d, r as dn, Ci as dt, m as en, kr as et, li as f, o as fn, Z as ft, g, Xn as gn, Jn as gt, ai as h, mr as hn, Kn as ht, e as i, Ht as in, bn as it, u as j, de as jt, j as k, tn as kt, vn as l, Qn as ln, hi as lt, d as m, t as mn, nr as mt, jt as n, K as nn, U as nt, xt as o, Ut as on, w as ot, T as p, x as pn, ke as pt, Or as q, wi as qt, i as r, Ot as rn, h as rt, en as s, C as sn, Nt as st, At as t, Rn as tn, Br as tt, s as u, n as un, Dn as ut, W as v, Vn as vt, vr as w, tr as wt, ir as x, Qt as xt, ie as y, Zn as yt, Rr as z, bi as zt };
|