@templatical/editor 0.55.0 → 0.56.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-D5QosKvB.js → AiAltTextPopover-DdsvhE78.js} +4 -4
- package/dist/{AiAltTextReview-D1W_lrI_.js → AiAltTextReview-P6to1_0t.js} +3 -3
- package/dist/{AiChatPanel-C8SeEJRP.js → AiChatPanel-BSlmzMRC.js} +10 -10
- package/dist/{AiPanels-CR6zphjP.js → AiPanels-DAsnX-a3.js} +1 -1
- package/dist/{AiRewriteMenu-BwztoMov.js → AiRewriteMenu-DIISOR6U.js} +11 -11
- package/dist/{BlockIssueBadge-DaPTq1RE.js → BlockIssueBadge-Bmtc50BQ.js} +4 -4
- package/dist/BlockPreviewCanvas-BYIzNn-9.js +154 -0
- package/dist/{CloudHeaderExtras-XpjJjn3o.js → CloudHeaderExtras-Cqhw-jMz.js} +1 -1
- package/dist/{CloudPanels-Baoaj6Xf.js → CloudPanels-w34W8_BP.js} +4 -4
- package/dist/{CollaborationNotices-Cnx0XHzZ.js → CollaborationNotices-HTbCebjV.js} +2 -2
- package/dist/{CollaboratorBar-BaBoNhwB.js → CollaboratorBar-CLQjksX-.js} +2 -2
- package/dist/{CommentsPanel-Ck3QmqiC.js → CommentsPanel-C5qG17Ki.js} +1 -1
- package/dist/{CommentsSidebar-CHknhOar.js → CommentsSidebar-C7CWcUYZ.js} +12 -12
- package/dist/{CountdownBlock-BMezkFbJ.js → CountdownBlock-BTXcCvjZ.js} +2 -2
- package/dist/{CountdownToolbar-CA_gDIdZ.js → CountdownToolbar-CP-pkntQ.js} +5 -5
- package/dist/{IssuesPanel-nmFhWG1p.js → IssuesPanel-CiiNBzH0.js} +12 -12
- package/dist/{LanguageMenu-DcABUYop.js → LanguageMenu-B981Av-6.js} +15 -15
- package/dist/{LocaleNotices-WzsYtBRs.js → LocaleNotices-CTCZ7BYv.js} +4 -4
- package/dist/{LogicTagInsertButton-qZ82VMFx.js → LogicTagInsertButton-DEOPc4RC.js} +23 -23
- package/dist/{MediaEditModal-C3U9Mi31.js → MediaEditModal-DJsPLTwP.js} +1 -1
- package/dist/{MediaPanels-CGmk9ufe.js → MediaPanels-D2WD2aE2.js} +1 -1
- package/dist/{MergeTagInput-JJeZbFkD.js → MergeTagInput-C9icdxw7.js} +1 -1
- package/dist/{MergeTagModeToggle-DDucd1eC.js → MergeTagModeToggle-DXvb80OE.js} +6 -6
- package/dist/{MergeTagTextarea-dQ2LRrNB.js → MergeTagTextarea-CrAcmT3A.js} +5 -5
- package/dist/{ParagraphEditor-VXYwGoz_.js → ParagraphEditor-BWBQ3jKz.js} +55 -55
- package/dist/{RestoreVersionDialog-BibNvAaJ.js → RestoreVersionDialog-CqAp16yQ.js} +4 -4
- package/dist/{RichTextEditorContent-CU5EOlM_.js → RichTextEditorContent-xbBjVPVQ.js} +8 -8
- package/dist/{SaveBlockDialog-S9aFi0cy.js → SaveBlockDialog-pebNJBTc.js} +9 -9
- package/dist/{SavedBlocksBrowserModal-DIdn6B0J.js → SavedBlocksBrowserModal-CvagMcv7.js} +11 -11
- package/dist/{SavedBlocksPanels-Cme2M6u8.js → SavedBlocksPanels-B9AAVBDm.js} +1 -1
- package/dist/{SavedBlocksPickBar-BDmA7r3m.js → SavedBlocksPickBar-BIANWe3i.js} +3 -3
- package/dist/{TemplateSettings-C_LHLm5M.js → TemplateSettings-ORq4PbCN.js} +12 -12
- package/dist/{TestEmailModal-CLIRn7eL.js → TestEmailModal-DRjCpcPl.js} +11 -11
- package/dist/{TestEmailPanel-frdtjC8h.js → TestEmailPanel-H0v8El__.js} +1 -1
- package/dist/{TitleEditor-D5kC56Jl.js → TitleEditor-CEGbJXeU.js} +11 -11
- package/dist/{Toolbar-D904Yw_R.js → Toolbar-XT-uGA9J.js} +937 -703
- package/dist/{TplModal-BBdotDf1.js → TplModal-7NQq5-VW.js} +4 -4
- package/dist/{VersionHistoryMenu-BnP0EyLl.js → VersionHistoryMenu-C8BE3Pr-.js} +7 -7
- package/dist/{VersionHistoryPanels-DhagEgOk.js → VersionHistoryPanels-CuKuOSJG.js} +1 -1
- package/dist/{VersionPreviewBanner-BPP939cD.js → VersionPreviewBanner-BVFBkveR.js} +2 -2
- package/dist/WrapperBlock-Bdw-072t.js +56 -0
- package/dist/{blockTypeIcons-CoRQV_hP.js → blockTypeIcons-CGplGmmr.js} +3 -3
- package/dist/bundle-stats.json +6 -6
- package/dist/{ca-DIkMxYCN.js → ca-BJn8lcJx.js} +8 -0
- package/dist/cdn/chunks/{AiAltTextPopover-CUGOPuRo.js → AiAltTextPopover-x999Gimz.js} +5 -5
- package/dist/cdn/chunks/{AiAltTextPopover-CUGOPuRo.js.map → AiAltTextPopover-x999Gimz.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-B9vm_L-8.js → AiAltTextReview-DjnFz1wO.js} +4 -4
- package/dist/cdn/chunks/{AiAltTextReview-B9vm_L-8.js.map → AiAltTextReview-DjnFz1wO.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-By8Uo1nH.js → AiChatPanel-DKDu9cs7.js} +4 -4
- package/dist/cdn/chunks/{AiChatPanel-By8Uo1nH.js.map → AiChatPanel-DKDu9cs7.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-BblCSkQy.js → AiPanels-jMLVaiKx.js} +2 -2
- package/dist/cdn/chunks/{AiPanels-BblCSkQy.js.map → AiPanels-jMLVaiKx.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-BvV_7tNZ.js → AiRewriteMenu-s79rmHFy.js} +9 -9
- package/dist/cdn/chunks/{AiRewriteMenu-BvV_7tNZ.js.map → AiRewriteMenu-s79rmHFy.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-D3Plo_wt.js → BlockIssueBadge-Bnmq_M4G.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-D3Plo_wt.js.map → BlockIssueBadge-Bnmq_M4G.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-Dr-xGq6v.js → BlockPreviewCanvas-B3HkuENF.js} +46 -32
- package/dist/cdn/chunks/BlockPreviewCanvas-B3HkuENF.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-BtqdN777.js → CloudHeaderExtras-uUJYJFJ6.js} +2 -2
- package/dist/cdn/chunks/{CloudHeaderExtras-BtqdN777.js.map → CloudHeaderExtras-uUJYJFJ6.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-CQ0vNgsH.js → CloudPanels-DQnlH_YJ.js} +4 -4
- package/dist/cdn/chunks/{CloudPanels-CQ0vNgsH.js.map → CloudPanels-DQnlH_YJ.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-DraFUhyo.js → CollaborationNotices-CHqUGhOZ.js} +3 -3
- package/dist/cdn/chunks/{CollaborationNotices-DraFUhyo.js.map → CollaborationNotices-CHqUGhOZ.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-0OEH3hrj.js → CollaboratorBar-C1ZI2xwa.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-0OEH3hrj.js.map → CollaboratorBar-C1ZI2xwa.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-tZZswofV.js → CommentsPanel-EtdTzTmq.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-tZZswofV.js.map → CommentsPanel-EtdTzTmq.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-7Hfl3Hdj.js → CommentsSidebar-Qmj049QX.js} +4 -4
- package/dist/cdn/chunks/{CommentsSidebar-7Hfl3Hdj.js.map → CommentsSidebar-Qmj049QX.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CjMhMhnv.js → CountdownBlock-DyGsh92b.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-CjMhMhnv.js.map → CountdownBlock-DyGsh92b.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BxW-J7DX.js → CountdownToolbar-Ddj2erNm.js} +6 -6
- package/dist/cdn/chunks/{CountdownToolbar-BxW-J7DX.js.map → CountdownToolbar-Ddj2erNm.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BoHeIjvw.js → IssuesPanel-DnSnEh1X.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-BoHeIjvw.js.map → IssuesPanel-DnSnEh1X.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-BnYN5N1h.js → LanguageMenu-C2I_yTL5.js} +110 -110
- package/dist/cdn/chunks/{LanguageMenu-BnYN5N1h.js.map → LanguageMenu-C2I_yTL5.js.map} +1 -1
- package/dist/cdn/chunks/{LocaleNotices-8J2DRWeg.js → LocaleNotices-Dr9LRCAg.js} +4 -4
- package/dist/cdn/chunks/{LocaleNotices-8J2DRWeg.js.map → LocaleNotices-Dr9LRCAg.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-Bt2PXbQ0.js → LogicTagInsertButton-BdzE9-l7.js} +29 -29
- package/dist/cdn/chunks/LogicTagInsertButton-BdzE9-l7.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-Dz972UFx.js → MediaEditModal-CMJFXu_o.js} +2 -2
- package/dist/cdn/chunks/{MediaEditModal-Dz972UFx.js.map → MediaEditModal-CMJFXu_o.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-C6Hqtp1H.js → MediaPanels-C790ZXuY.js} +2 -2
- package/dist/cdn/chunks/{MediaPanels-C6Hqtp1H.js.map → MediaPanels-C790ZXuY.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-BELdMRni.js → MergeTagInput-CmrX8Md6.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput-BELdMRni.js.map → MergeTagInput-CmrX8Md6.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-DKfMDIEF.js → MergeTagModeToggle-D7maMGIM.js} +5 -5
- package/dist/cdn/chunks/{MergeTagModeToggle-DKfMDIEF.js.map → MergeTagModeToggle-D7maMGIM.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-w6xen3Xh.js → MergeTagTextarea-KOnd2teB.js} +6 -6
- package/dist/cdn/chunks/{MergeTagTextarea-w6xen3Xh.js.map → MergeTagTextarea-KOnd2teB.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-Cal9hY3U.js → ParagraphEditor-I9lbKaPk.js} +19 -19
- package/dist/cdn/chunks/{ParagraphEditor-Cal9hY3U.js.map → ParagraphEditor-I9lbKaPk.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-f_ulmASY.js → RestoreVersionDialog-DqbULAbc.js} +4 -4
- package/dist/cdn/chunks/{RestoreVersionDialog-f_ulmASY.js.map → RestoreVersionDialog-DqbULAbc.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-C_v0kS4A.js → RichTextEditorContent-_O22z0pn.js} +8 -8
- package/dist/cdn/chunks/{RichTextEditorContent-C_v0kS4A.js.map → RichTextEditorContent-_O22z0pn.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-C6N9RFls.js → SaveBlockDialog-CClRLXgF.js} +8 -8
- package/dist/cdn/chunks/{SaveBlockDialog-C6N9RFls.js.map → SaveBlockDialog-CClRLXgF.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-Bl2sl09D.js → SavedBlocksBrowserModal-BIaxaxw9.js} +8 -8
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-Bl2sl09D.js.map → SavedBlocksBrowserModal-BIaxaxw9.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-DqVcmEUK.js → SavedBlocksPanels-Dfu9N6YW.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-DqVcmEUK.js.map → SavedBlocksPanels-Dfu9N6YW.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DE-J1JVL.js → SavedBlocksPickBar-DiMW_dbJ.js} +4 -4
- package/dist/cdn/chunks/{SavedBlocksPickBar-DE-J1JVL.js.map → SavedBlocksPickBar-DiMW_dbJ.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-CpoKZ8oV.js → TemplateSettings-JMUo0LIV.js} +10 -10
- package/dist/cdn/chunks/{TemplateSettings-CpoKZ8oV.js.map → TemplateSettings-JMUo0LIV.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DI3z__Bd.js → TestEmailModal-D52VtwBZ.js} +11 -11
- package/dist/cdn/chunks/{TestEmailModal-DI3z__Bd.js.map → TestEmailModal-D52VtwBZ.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-Cp5d2YGn.js → TestEmailPanel-D9ezVDHd.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-Cp5d2YGn.js.map → TestEmailPanel-D9ezVDHd.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-C2syRLdZ.js → TitleEditor-D04vvbUc.js} +9 -9
- package/dist/cdn/chunks/{TitleEditor-C2syRLdZ.js.map → TitleEditor-D04vvbUc.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-NEE8qxYh.js → Toolbar-C_Hfsher.js} +1173 -939
- package/dist/cdn/chunks/Toolbar-C_Hfsher.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-B1MgvtX8.js → TplModal-d6fEZGJ5.js} +5 -5
- package/dist/cdn/chunks/{TplModal-B1MgvtX8.js.map → TplModal-d6fEZGJ5.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-CZury5gU.js → VersionHistoryMenu-C8ucm43v.js} +7 -7
- package/dist/cdn/chunks/{VersionHistoryMenu-CZury5gU.js.map → VersionHistoryMenu-C8ucm43v.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-Cefd8i_e.js → VersionHistoryPanels-BAdzmhvH.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-Cefd8i_e.js.map → VersionHistoryPanels-BAdzmhvH.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-C4Ji8nu4.js → VersionPreviewBanner-BWuovbFc.js} +3 -3
- package/dist/cdn/chunks/{VersionPreviewBanner-C4Ji8nu4.js.map → VersionPreviewBanner-BWuovbFc.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-TXDSDXUP.js +58 -0
- package/dist/cdn/chunks/WrapperBlock-TXDSDXUP.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-Cc6RJ27V.js → blockTypeIcons-CzYA5DF9.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-Cc6RJ27V.js.map → blockTypeIcons-CzYA5DF9.js.map} +1 -1
- package/dist/cdn/chunks/{ca-DIkMxYCN.js → ca-BJn8lcJx.js} +9 -1
- package/dist/cdn/chunks/ca-BJn8lcJx.js.map +1 -0
- package/dist/cdn/chunks/{composables-nyxwrM27.js → composables-CsfQlmcf.js} +543 -503
- package/dist/cdn/chunks/composables-CsfQlmcf.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-DJkDGKQ_.js → createCloudRuntime-PpIFCDfj.js} +4 -4
- package/dist/cdn/chunks/{createCloudRuntime-DJkDGKQ_.js.map → createCloudRuntime-PpIFCDfj.js.map} +1 -1
- package/dist/{de-Cc6Ue0UD.js → cdn/chunks/de-BLFp3nWx.js} +10 -0
- package/dist/cdn/chunks/de-BLFp3nWx.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-erQEOHZN.js → editor-modal-B8UE9V8B.js} +90 -90
- package/dist/cdn/chunks/{editor-modal-erQEOHZN.js.map → editor-modal-B8UE9V8B.js.map} +1 -1
- package/dist/cdn/chunks/en-CVxNoHww.js +1 -0
- package/dist/cdn/chunks/{en-BX4FujAQ.js → en-DGGQJGbm.js} +9 -1
- package/dist/cdn/chunks/en-DGGQJGbm.js.map +1 -0
- package/dist/cdn/chunks/{es-Do5b-MKU.js → es-DTY9qgLv.js} +9 -1
- package/dist/cdn/chunks/es-DTY9qgLv.js.map +1 -0
- package/dist/cdn/chunks/{extensions-BcwkOjVq.js → extensions-BM6ZSnsQ.js} +70 -70
- package/dist/cdn/chunks/extensions-BM6ZSnsQ.js.map +1 -0
- package/dist/{fr-S1n2Ebzp.js → cdn/chunks/fr-L4FqO9Gp.js} +10 -0
- package/dist/cdn/chunks/{fr-S1n2Ebzp.js.map → fr-L4FqO9Gp.js.map} +1 -1
- package/dist/cdn/chunks/{icons-Da9GKjPx.js → icons-DHExFLlT.js} +43 -43
- package/dist/cdn/chunks/{icons-Da9GKjPx.js.map → icons-DHExFLlT.js.map} +1 -1
- package/dist/cdn/chunks/{ja-DLwcq4bA.js → ja-6uOXkh4v.js} +9 -1
- package/dist/cdn/chunks/ja-6uOXkh4v.js.map +1 -0
- package/dist/cdn/chunks/{keys-CoQtCqNv.js → keys-BUmIvYy3.js} +4 -4
- package/dist/cdn/chunks/keys-BUmIvYy3.js.map +1 -0
- package/dist/{nl-0JSWaZpT.js → cdn/chunks/nl-DCxuxwNq.js} +10 -0
- package/dist/cdn/chunks/nl-DCxuxwNq.js.map +1 -0
- package/dist/cdn/chunks/{normalizeMergeTagMarkup-BrGw5jxk.js → normalizeMergeTagMarkup-aWjkotui.js} +67 -67
- package/dist/cdn/chunks/normalizeMergeTagMarkup-aWjkotui.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-Cj0XYwuh.js → preRenderCustomBlocks-Dn6dFUwx.js} +4 -4
- package/dist/cdn/chunks/{preRenderCustomBlocks-Cj0XYwuh.js.map → preRenderCustomBlocks-Dn6dFUwx.js.map} +1 -1
- package/dist/{pt-BR-D3VlIMDZ.js → cdn/chunks/pt-BR-CBkcrebr.js} +10 -0
- package/dist/cdn/chunks/pt-BR-CBkcrebr.js.map +1 -0
- package/dist/cdn/chunks/{sanitizeHtml-GxJCxKcP.js → sanitizeHtml-DJI7vvET.js} +2 -2
- package/dist/cdn/chunks/{sanitizeHtml-GxJCxKcP.js.map → sanitizeHtml-DJI7vvET.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-B5zrrV8-.js → socialIcons-Qw9rHc8C.js} +354 -341
- package/dist/cdn/chunks/{socialIcons-B5zrrV8-.js.map → socialIcons-Qw9rHc8C.js.map} +1 -1
- package/dist/cdn/chunks/src-Bfj1jHnn.js +710 -0
- package/dist/cdn/chunks/src-Bfj1jHnn.js.map +1 -0
- package/dist/cdn/chunks/{src-Diw9SLIe.js → src-C9JWWxAk.js} +419 -423
- package/dist/cdn/chunks/src-C9JWWxAk.js.map +1 -0
- package/dist/cdn/chunks/{src-v47QHNmB.js → src-mXG-Of9A.js} +669 -662
- package/dist/cdn/chunks/src-mXG-Of9A.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-Cc5NZqiI.js → useCloudI18n-Xsih9yRH.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-Cc5NZqiI.js.map → useCloudI18n-Xsih9yRH.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorRoot-D_LuZ_hE.js → useEditorRoot-Beau2Z_T.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-D_LuZ_hE.js.map → useEditorRoot-Beau2Z_T.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-BnJYydPv.js → useI18n-D8s7HtTn.js} +2 -2
- package/dist/cdn/chunks/{useI18n-BnJYydPv.js.map → useI18n-D8s7HtTn.js.map} +1 -1
- package/dist/cdn/chunks/{useLocalizedDisplay-DekV8qar.js → useLocalizedDisplay-Bgg4qpev.js} +6 -6
- package/dist/cdn/chunks/{useLocalizedDisplay-DekV8qar.js.map → useLocalizedDisplay-Bgg4qpev.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-Cbp3I7UN.js → useLogicTag-DLvWzWsp.js} +4 -4
- package/dist/cdn/chunks/{useLogicTag-Cbp3I7UN.js.map → useLogicTag-DLvWzWsp.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-1lrpNyR5.js → useMergeTag-B4FHCGGm.js} +5 -5
- package/dist/cdn/chunks/{useMergeTag-1lrpNyR5.js.map → useMergeTag-B4FHCGGm.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-BWAXWeBv.js → usePopoverPosition-esO6wjvU.js} +5 -5
- package/dist/cdn/chunks/{usePopoverPosition-BWAXWeBv.js.map → usePopoverPosition-esO6wjvU.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-Ct1AwLD-.js → useScrollToBlock-CJuUu7Xj.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-Ct1AwLD-.js.map → useScrollToBlock-CJuUu7Xj.js.map} +1 -1
- package/dist/cdn/chunks/{withCurrentFont-DZfmiv8V.js → withCurrentFont-QqBilClC.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-DZfmiv8V.js.map → withCurrentFont-QqBilClC.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +793 -796
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-XMnOOIEC.js → check-CcuCoJDh.js} +1 -1
- package/dist/{chevron-down-DmamTEWQ.js → chevron-down-BfYIbFbC.js} +1 -1
- package/dist/{chevron-right-BEFXOH27.js → chevron-right-DyjFqY35.js} +1 -1
- package/dist/{chevron-up-Dw7woXj8.js → chevron-up-BHEIxuS-.js} +1 -1
- package/dist/{circle-alert-BTKC9vkq.js → circle-alert-Tq7kAh9S.js} +1 -1
- package/dist/{clock-BVT5u2uG.js → clock-Df0ZiXwQ.js} +1 -1
- package/dist/{composables-DPgNn9GZ.js → composables-CRX6rncm.js} +978 -938
- package/dist/{createCloudRuntime-Bw8TLmQ8.js → createCloudRuntime-DplyIlsy.js} +3 -3
- package/dist/{createLucideIcon-CgDE3xAR.js → createLucideIcon-CfBdtoUw.js} +5 -5
- package/dist/{cdn/chunks/de-Cc6Ue0UD.js → de-BLFp3nWx.js} +8 -2
- package/dist/{dist-CBdk1Vcb.js → dist-BMUUt3zJ.js} +284 -277
- package/dist/{editor-modal-BeX6otLk.js → editor-modal-D9HT9bD6.js} +15 -15
- package/dist/{en-BX4FujAQ.js → en-DGGQJGbm.js} +8 -0
- package/dist/en-De3uAutQ.js +1 -0
- package/dist/{es-Do5b-MKU.js → es-DTY9qgLv.js} +8 -0
- package/dist/{extensions-QFAARrjF.js → extensions-Cm6K4SRX.js} +285 -285
- package/dist/{eye-ByMgHeA_.js → eye-B3psrAqd.js} +1 -1
- package/dist/{cdn/chunks/fr-S1n2Ebzp.js → fr-L4FqO9Gp.js} +8 -2
- package/dist/{image-Ch8tR35K.js → image-C3yuPDxx.js} +1 -1
- package/dist/index.d.ts +60 -12
- package/dist/{info-DzSD-Wpk.js → info-DKja7A68.js} +1 -1
- package/dist/{ja-DLwcq4bA.js → ja-6uOXkh4v.js} +8 -0
- package/dist/{keys-BCqskl51.js → keys-w_VRjoMu.js} +3 -3
- package/dist/{link-oDn9AR2w.js → link-DhzPI4Hn.js} +1 -1
- package/dist/{list-C5t07dp8.js → list-DVGn7Ik2.js} +1 -1
- package/dist/{loader-circle-k6xvKgUB.js → loader-circle-DqKWsMHO.js} +1 -1
- package/dist/{message-circle-C23R6OJR.js → message-circle-C4TonoBs.js} +1 -1
- package/dist/{cdn/chunks/nl-0JSWaZpT.js → nl-DCxuxwNq.js} +8 -2
- package/dist/{normalizeMergeTagMarkup-BS0nRvhq.js → normalizeMergeTagMarkup-Da9JAgx7.js} +75 -75
- package/dist/{package-C90eQ7NU.js → package-9OkiEO4S.js} +1 -1
- package/dist/{pencil-BK7GrQuA.js → pencil-M9vkOB7C.js} +1 -1
- package/dist/{plus-Cr0Mis63.js → plus-DxZiv9YC.js} +1 -1
- package/dist/{preRenderCustomBlocks-CiKvKd8V.js → preRenderCustomBlocks-CdqSp2P7.js} +4 -4
- package/dist/{cdn/chunks/pt-BR-D3VlIMDZ.js → pt-BR-CBkcrebr.js} +8 -2
- package/dist/{refresh-cw-_ZLOIEvA.js → refresh-cw-UY8_sdFG.js} +1 -1
- package/dist/{rotate-ccw-CB5wsHwv.js → rotate-ccw-BFTGCpHn.js} +1 -1
- package/dist/{sanitizeHtml-USjTyALR.js → sanitizeHtml-wBibnBF4.js} +6 -6
- package/dist/{search-BmrQNox8.js → search-RuGJnMEn.js} +1 -1
- package/dist/{send-blAsIBBg.js → send-DGB1ar02.js} +1 -1
- package/dist/{smartphone-BPpWYrwV.js → smartphone-CVA29CU_.js} +1 -1
- package/dist/{socialIcons-NvIg5ahU.js → socialIcons-CJD6OsI7.js} +427 -414
- package/dist/{sparkles-OqIxrNp-.js → sparkles-IHfEwEcd.js} +1 -1
- package/dist/{square-BP-V7iT-.js → square-_Cl44UU6.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +851 -854
- package/dist/{text-align-start-4mwX2o-F.js → text-align-start-Dqk2Xt_Q.js} +13 -13
- package/dist/{trash-B99WixTA.js → trash-Cr7rD5Hh.js} +1 -1
- package/dist/{triangle-alert-CHMiDkHa.js → triangle-alert-CKcpwtUj.js} +1 -1
- package/dist/{upload-Cp8o-hrN.js → upload-DR9pqVON.js} +1 -1
- package/dist/{useCloudI18n-Dh2iydo1.js → useCloudI18n-BczJoFf4.js} +1 -1
- package/dist/{useEditorRoot-DY3mgcHm.js → useEditorRoot-BcXKhM_8.js} +1 -1
- package/dist/{useI18n-CgtvtF4C.js → useI18n-zeWYtWSv.js} +1 -1
- package/dist/useLocalizedDisplay-Cbhx208c.js +31 -0
- package/dist/{useLogicTag-D8zgkXfb.js → useLogicTag-DLkYos2Q.js} +3 -3
- package/dist/{useMergeTag-k7Kr0nMd.js → useMergeTag-IoWOO679.js} +5 -5
- package/dist/{usePopoverPosition-VDQjyX_A.js → usePopoverPosition-Br3zt_MQ.js} +4 -4
- package/dist/{useScrollToBlock-B35ObCGK.js → useScrollToBlock-BfOzc1Z6.js} +2 -2
- package/dist/{withCurrentFont-Bzeg_gfH.js → withCurrentFont-m_PHcOD0.js} +1 -1
- package/dist/{x-BIBStNMS.js → x-DZSFHafL.js} +1 -1
- package/package.json +10 -10
- package/dist/BlockPreviewCanvas-C23A6FRm.js +0 -140
- package/dist/WrapperBlock-BAT3T0Cz.js +0 -44
- package/dist/cdn/chunks/BlockPreviewCanvas-Dr-xGq6v.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-Bt2PXbQ0.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-NEE8qxYh.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-DFY-7YSs.js +0 -46
- package/dist/cdn/chunks/WrapperBlock-DFY-7YSs.js.map +0 -1
- package/dist/cdn/chunks/ca-DIkMxYCN.js.map +0 -1
- package/dist/cdn/chunks/composables-nyxwrM27.js.map +0 -1
- package/dist/cdn/chunks/de-Cc6Ue0UD.js.map +0 -1
- package/dist/cdn/chunks/en-B6tLGRHq.js +0 -1
- package/dist/cdn/chunks/en-BX4FujAQ.js.map +0 -1
- package/dist/cdn/chunks/es-Do5b-MKU.js.map +0 -1
- package/dist/cdn/chunks/extensions-BcwkOjVq.js.map +0 -1
- package/dist/cdn/chunks/ja-DLwcq4bA.js.map +0 -1
- package/dist/cdn/chunks/keys-CoQtCqNv.js.map +0 -1
- package/dist/cdn/chunks/nl-0JSWaZpT.js.map +0 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-BrGw5jxk.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-D3VlIMDZ.js.map +0 -1
- package/dist/cdn/chunks/src-Diw9SLIe.js.map +0 -1
- package/dist/cdn/chunks/src-UR3AQocX.js +0 -683
- package/dist/cdn/chunks/src-UR3AQocX.js.map +0 -1
- package/dist/cdn/chunks/src-v47QHNmB.js.map +0 -1
- package/dist/en-Do0SU6tR.js +0 -1
- package/dist/useLocalizedDisplay-LdjosX4w.js +0 -31
|
@@ -74,7 +74,7 @@ function p(e) {
|
|
|
74
74
|
repeat: !1
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
function
|
|
77
|
+
function m(e) {
|
|
78
78
|
let t = "";
|
|
79
79
|
for (let n of e) {
|
|
80
80
|
let e = n.charCodeAt(0);
|
|
@@ -82,36 +82,36 @@ function ee(e) {
|
|
|
82
82
|
}
|
|
83
83
|
return t;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function ee(e) {
|
|
86
86
|
let t = typeof e?.url == "string" ? e.url.trim() : "";
|
|
87
87
|
if (!e || !t) return null;
|
|
88
88
|
let n = u.includes(e.size) ? e.size : "cover", r = e.position, i = r && d.includes(r.x) ? r.x : "center", a = r && f.includes(r.y) ? r.y : "center";
|
|
89
89
|
return {
|
|
90
|
-
url:
|
|
90
|
+
url: m(t),
|
|
91
91
|
size: n,
|
|
92
92
|
position: `${i} ${a}`,
|
|
93
93
|
repeat: e.repeat ? "repeat" : "no-repeat"
|
|
94
94
|
};
|
|
95
95
|
}
|
|
96
96
|
// ../types/src/hero.ts
|
|
97
|
-
var
|
|
97
|
+
var te = [
|
|
98
98
|
"top",
|
|
99
99
|
"middle",
|
|
100
100
|
"bottom"
|
|
101
101
|
];
|
|
102
|
-
function
|
|
102
|
+
function ne(e) {
|
|
103
103
|
let t = e.hero;
|
|
104
104
|
if (!t || typeof t != "object") return null;
|
|
105
105
|
if (e.columns !== "1") return {
|
|
106
106
|
applied: !1,
|
|
107
107
|
reason: "columns"
|
|
108
108
|
};
|
|
109
|
-
let n =
|
|
109
|
+
let n = ee(e.backgroundImage);
|
|
110
110
|
if (n === null) return {
|
|
111
111
|
applied: !1,
|
|
112
112
|
reason: "image"
|
|
113
113
|
};
|
|
114
|
-
let r =
|
|
114
|
+
let r = ie(e.backgroundImage), i = re(t.height) ? Math.round(t.height) : "image";
|
|
115
115
|
return i === "image" && r === null ? {
|
|
116
116
|
applied: !1,
|
|
117
117
|
reason: "size"
|
|
@@ -119,19 +119,19 @@ function re(e) {
|
|
|
119
119
|
applied: !0,
|
|
120
120
|
image: n,
|
|
121
121
|
height: i,
|
|
122
|
-
verticalAlign:
|
|
122
|
+
verticalAlign: te.includes(t.verticalAlign) ? t.verticalAlign : "middle",
|
|
123
123
|
aspectRatio: r
|
|
124
124
|
};
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function re(e) {
|
|
127
127
|
return typeof e == "number" && Number.isFinite(e) && e >= 1;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function ie(e) {
|
|
130
130
|
let t = e?.naturalWidth, n = e?.naturalHeight;
|
|
131
131
|
return typeof t != "number" || typeof n != "number" || !Number.isFinite(t) || !Number.isFinite(n) || t <= 0 || n <= 0 ? null : n / t;
|
|
132
132
|
}
|
|
133
133
|
// ../types/src/social.ts
|
|
134
|
-
var
|
|
134
|
+
var ae = {
|
|
135
135
|
facebook: {
|
|
136
136
|
color: "#1877F2",
|
|
137
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"
|
|
@@ -204,36 +204,36 @@ var oe = {
|
|
|
204
204
|
color: "#1769FF",
|
|
205
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
206
|
}
|
|
207
|
-
},
|
|
207
|
+
}, oe = {
|
|
208
208
|
dark: "#1f1f1f",
|
|
209
209
|
light: "#ffffff"
|
|
210
210
|
};
|
|
211
|
-
function
|
|
211
|
+
function se(e) {
|
|
212
212
|
return e === "dark" || e === "light" ? e : void 0;
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
let n =
|
|
214
|
+
function ce(e, t) {
|
|
215
|
+
let n = se(t);
|
|
216
216
|
return {
|
|
217
|
-
fill: n ?
|
|
218
|
-
onFill: n === "light" ?
|
|
217
|
+
fill: n ? oe[n] : ae[e].color,
|
|
218
|
+
onFill: n === "light" ? oe.dark : "#ffffff"
|
|
219
219
|
};
|
|
220
220
|
}
|
|
221
|
-
function
|
|
222
|
-
let n =
|
|
221
|
+
function le(e, t) {
|
|
222
|
+
let n = se(t);
|
|
223
223
|
return n ? `${e}-${n}` : e;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
if (
|
|
227
|
-
color:
|
|
225
|
+
function ue(e, t) {
|
|
226
|
+
if (se(t) === "dark" && (e === "plain" || e === "outlined")) return {
|
|
227
|
+
color: oe.light,
|
|
228
228
|
opacity: .6,
|
|
229
229
|
width: 1.4
|
|
230
230
|
};
|
|
231
231
|
}
|
|
232
|
-
function
|
|
232
|
+
function de(e) {
|
|
233
233
|
return e === "plain" ? .84 : .6;
|
|
234
234
|
}
|
|
235
235
|
// ../types/src/element-ids.ts
|
|
236
|
-
function
|
|
236
|
+
function fe(e) {
|
|
237
237
|
let t = [], n = (e, n) => {
|
|
238
238
|
typeof e == "string" && /[./]/.test(e) && t.push({
|
|
239
239
|
path: n,
|
|
@@ -252,7 +252,7 @@ function pe(e) {
|
|
|
252
252
|
return r(e.blocks, "blocks"), t;
|
|
253
253
|
}
|
|
254
254
|
// ../types/src/clone.ts
|
|
255
|
-
function
|
|
255
|
+
function h(e) {
|
|
256
256
|
let t = [];
|
|
257
257
|
return JSON.parse(JSON.stringify(e, function(e, n) {
|
|
258
258
|
if (typeof n != "object" || !n) return n;
|
|
@@ -261,22 +261,22 @@ function m(e) {
|
|
|
261
261
|
}));
|
|
262
262
|
}
|
|
263
263
|
// ../types/src/deep-equal.ts
|
|
264
|
-
function
|
|
264
|
+
function pe(e) {
|
|
265
265
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
266
266
|
}
|
|
267
|
-
function
|
|
267
|
+
function g(e, t) {
|
|
268
268
|
if (e === t) return !0;
|
|
269
|
-
if (Array.isArray(e)) return !Array.isArray(t) || e.length !== t.length ? !1 : e.every((e, n) =>
|
|
270
|
-
if (
|
|
271
|
-
if (!
|
|
269
|
+
if (Array.isArray(e)) return !Array.isArray(t) || e.length !== t.length ? !1 : e.every((e, n) => g(e, t[n]));
|
|
270
|
+
if (pe(e)) {
|
|
271
|
+
if (!pe(t)) return !1;
|
|
272
272
|
let n = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]);
|
|
273
|
-
for (let r of n) if ((e[r] !== void 0 || t[r] !== void 0) && !
|
|
273
|
+
for (let r of n) if ((e[r] !== void 0 || t[r] !== void 0) && !g(e[r], t[r])) return !1;
|
|
274
274
|
return !0;
|
|
275
275
|
}
|
|
276
276
|
return !1;
|
|
277
277
|
}
|
|
278
278
|
// ../types/src/config.ts
|
|
279
|
-
var
|
|
279
|
+
var me = class extends Error {
|
|
280
280
|
statusCode;
|
|
281
281
|
code;
|
|
282
282
|
constructor(e, t, n, r) {
|
|
@@ -291,7 +291,7 @@ var he = class extends Error {
|
|
|
291
291
|
get isServerError() {
|
|
292
292
|
return this.statusCode !== void 0 && this.statusCode >= 500;
|
|
293
293
|
}
|
|
294
|
-
},
|
|
294
|
+
}, he = {
|
|
295
295
|
title: ["content"],
|
|
296
296
|
paragraph: ["content"],
|
|
297
297
|
html: ["content"],
|
|
@@ -308,52 +308,52 @@ var he = class extends Error {
|
|
|
308
308
|
"expiredMessage"
|
|
309
309
|
],
|
|
310
310
|
custom: ["fieldValues.*"]
|
|
311
|
-
},
|
|
312
|
-
function
|
|
311
|
+
}, _ = ["preheaderText"];
|
|
312
|
+
function ge(e) {
|
|
313
313
|
return typeof e == "string" && /^[A-Za-z]{2,3}(-[A-Za-z0-9]{2,8})*$/.test(e);
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function v(e) {
|
|
316
316
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
317
317
|
}
|
|
318
|
-
var
|
|
318
|
+
var _e = /* @__PURE__ */ new Set([
|
|
319
319
|
"__proto__",
|
|
320
320
|
"constructor",
|
|
321
321
|
"prototype"
|
|
322
322
|
]);
|
|
323
|
-
function
|
|
324
|
-
return e.split(".").every((e) => e !== "" && !
|
|
323
|
+
function y(e) {
|
|
324
|
+
return e.split(".").every((e) => e !== "" && !_e.has(e));
|
|
325
325
|
}
|
|
326
|
-
function
|
|
327
|
-
if (!
|
|
326
|
+
function ve(e, t) {
|
|
327
|
+
if (!_e.has(t)) return Array.isArray(e) ? e.find((e) => v(e) && e.id === t) : v(e) && Object.hasOwn(e, t) ? e[t] : void 0;
|
|
328
328
|
}
|
|
329
|
-
function
|
|
330
|
-
return t.split(".").reduce(
|
|
329
|
+
function b(e, t) {
|
|
330
|
+
return t.split(".").reduce(ve, e);
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
let t =
|
|
332
|
+
function ye(e) {
|
|
333
|
+
let t = h(e);
|
|
334
334
|
for (let [n, r] of Object.entries(t.l10n ?? {})) {
|
|
335
335
|
for (let t of ["text", "set"]) {
|
|
336
336
|
for (let n of Object.keys(r[t] ?? {})) {
|
|
337
|
-
let i = n.includes(".") ?
|
|
338
|
-
|
|
337
|
+
let i = n.includes(".") ? b(e, n.slice(0, n.lastIndexOf("."))) : e;
|
|
338
|
+
y(n) && (t !== "text" && v(i) || b(e, n) !== void 0) || delete r[t][n];
|
|
339
339
|
}
|
|
340
340
|
r[t] && !Object.keys(r[t]).length && delete r[t];
|
|
341
341
|
}
|
|
342
342
|
Object.keys(r).length || delete t.l10n[n];
|
|
343
343
|
}
|
|
344
|
-
return t.l10n && !Object.keys(t.l10n).length && delete t.l10n,
|
|
344
|
+
return t.l10n && !Object.keys(t.l10n).length && delete t.l10n, g(t, e) ? e : t;
|
|
345
345
|
}
|
|
346
|
-
function
|
|
347
|
-
let t =
|
|
346
|
+
function be(e) {
|
|
347
|
+
let t = ye(e);
|
|
348
348
|
if (t.type === "wrapper") {
|
|
349
|
-
let e = t.children.map(
|
|
349
|
+
let e = t.children.map(be);
|
|
350
350
|
return e.some((e, n) => e !== t.children[n]) ? {
|
|
351
351
|
...t,
|
|
352
352
|
children: e
|
|
353
353
|
} : t;
|
|
354
354
|
}
|
|
355
355
|
if (t.type !== "section") return t;
|
|
356
|
-
let n = t.children.map((e) => e.map(
|
|
356
|
+
let n = t.children.map((e) => e.map(be));
|
|
357
357
|
return n.some((e, n) => e.some((e, r) => e !== t.children[n][r])) ? {
|
|
358
358
|
...t,
|
|
359
359
|
children: n
|
|
@@ -372,25 +372,25 @@ function xe(e, t, n) {
|
|
|
372
372
|
let o = a.split(".").length;
|
|
373
373
|
if (i[o] === "id") return !0;
|
|
374
374
|
if (i.length !== o) return !1;
|
|
375
|
-
let s =
|
|
376
|
-
if (!
|
|
375
|
+
let s = b(e, a);
|
|
376
|
+
if (!v(s) || !v(n) || s.id !== n.id) return !0;
|
|
377
377
|
if (e.type === "table" && o === 2) {
|
|
378
|
-
let e = (e) => Array.isArray(e) ? e.map((e) =>
|
|
379
|
-
return !
|
|
378
|
+
let e = (e) => Array.isArray(e) ? e.map((e) => v(e) ? e.id : void 0) : null;
|
|
379
|
+
return !g(e(s.cells), e(n.cells));
|
|
380
380
|
}
|
|
381
381
|
return !1;
|
|
382
382
|
}
|
|
383
383
|
function Se(e) {
|
|
384
|
-
return
|
|
384
|
+
return ye(e);
|
|
385
385
|
}
|
|
386
386
|
function x(e, t, n) {
|
|
387
|
-
if (!
|
|
388
|
-
let r = t.split("."), i = r.pop(), a = r.reduce(
|
|
387
|
+
if (!y(t)) return !1;
|
|
388
|
+
let r = t.split("."), i = r.pop(), a = r.reduce(ve, e);
|
|
389
389
|
if (Array.isArray(a)) {
|
|
390
|
-
let e = a.findIndex((e) =>
|
|
391
|
-
return e < 0 ? !1 : (a[e] =
|
|
390
|
+
let e = a.findIndex((e) => v(e) && e.id === i);
|
|
391
|
+
return e < 0 ? !1 : (a[e] = h(n), !0);
|
|
392
392
|
}
|
|
393
|
-
return
|
|
393
|
+
return v(a) ? (n === null ? delete a[i] : a[i] = h(n), !0) : !1;
|
|
394
394
|
}
|
|
395
395
|
function Ce(e, t) {
|
|
396
396
|
let [n, ...r] = t.split(".");
|
|
@@ -398,10 +398,10 @@ function Ce(e, t) {
|
|
|
398
398
|
let i = [];
|
|
399
399
|
if (n === "*") {
|
|
400
400
|
let t = Array.isArray(e) ? e : [];
|
|
401
|
-
for (let e of t) if (
|
|
401
|
+
for (let e of t) if (v(e) && typeof e.id == "string") for (let t of r.length ? Ce(e, r.join(".")) : [""]) i.push(t ? `${e.id}.${t}` : e.id);
|
|
402
402
|
return i;
|
|
403
403
|
}
|
|
404
|
-
let a =
|
|
404
|
+
let a = v(e) ? e[n] : void 0;
|
|
405
405
|
if (r.length === 0) return a === void 0 ? [] : [n];
|
|
406
406
|
for (let e of Ce(a, r.join("."))) i.push(`${n}.${e}`);
|
|
407
407
|
return i;
|
|
@@ -409,7 +409,7 @@ function Ce(e, t) {
|
|
|
409
409
|
function S(e, t = []) {
|
|
410
410
|
if (e.type === "custom") {
|
|
411
411
|
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
|
-
return
|
|
412
|
+
return v(i) ? Object.keys(i).filter((e) => r.has(e)).map((e) => `fieldValues.${e}`) : [];
|
|
413
413
|
}
|
|
414
414
|
let n = (e) => !e.id.includes("."), r = e.type === "menu" ? {
|
|
415
415
|
...e,
|
|
@@ -421,10 +421,10 @@ function S(e, t = []) {
|
|
|
421
421
|
cells: e.cells.filter(n)
|
|
422
422
|
}))
|
|
423
423
|
} : e;
|
|
424
|
-
return (
|
|
424
|
+
return (he[e.type] ?? []).flatMap((e) => Ce(r, e));
|
|
425
425
|
}
|
|
426
426
|
function we(e, t) {
|
|
427
|
-
return (
|
|
427
|
+
return (he[e] ?? []).some((e) => {
|
|
428
428
|
let n = e.split("."), r = t.split(".");
|
|
429
429
|
return n.length === r.length && n.every((e, t) => e === "*" || e === r[t]);
|
|
430
430
|
});
|
|
@@ -438,63 +438,63 @@ function Te(e) {
|
|
|
438
438
|
let { l10n: t, ...n } = e;
|
|
439
439
|
return n;
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function w(e = {}) {
|
|
442
442
|
return Object.entries(e).sort(([e], [t]) => e.split(".").length - t.split(".").length);
|
|
443
443
|
}
|
|
444
|
-
function
|
|
445
|
-
let r = e, i =
|
|
444
|
+
function Ee(e, t, n) {
|
|
445
|
+
let r = e, i = h(Te(r));
|
|
446
446
|
if (t === n) return i;
|
|
447
447
|
let a = r.l10n?.[t];
|
|
448
448
|
if (!a) return i;
|
|
449
|
-
for (let [e, t] of
|
|
450
|
-
for (let [t, n] of Object.entries(a.text ?? {}))
|
|
449
|
+
for (let [e, t] of w(a.set)) x(i, e, t);
|
|
450
|
+
for (let [t, n] of Object.entries(a.text ?? {})) b(e, t) !== void 0 && x(i, t, n.value);
|
|
451
451
|
return e.type === "custom" && (Object.keys(a.text ?? {}).length > 0 || Object.keys(a.set ?? {}).length > 0) && delete i.renderedHtml, i;
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function De(e, t) {
|
|
454
454
|
return e.l10n?.[t]?.hidden === !0;
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function Oe(e) {
|
|
457
457
|
let { locales: t, l10n: n, ...r } = e;
|
|
458
458
|
return r;
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function T(e) {
|
|
461
461
|
return e.settings?.locale ?? "en";
|
|
462
462
|
}
|
|
463
|
-
function
|
|
464
|
-
let r =
|
|
463
|
+
function ke(e, t, n) {
|
|
464
|
+
let r = T(e);
|
|
465
465
|
if (t !== r && !(e.settings?.locales ?? []).includes(t)) {
|
|
466
466
|
if (n?.missing === "default") t = r;
|
|
467
|
-
else throw new
|
|
467
|
+
else throw new me(`This template has no "${t}" version.`, void 0, "unknown_locale");
|
|
468
468
|
}
|
|
469
469
|
let i = (e) => e.flatMap((e) => {
|
|
470
|
-
if (t !== r &&
|
|
471
|
-
let n =
|
|
470
|
+
if (t !== r && De(e, t)) return [];
|
|
471
|
+
let n = Ee(e, t, r);
|
|
472
472
|
return n.type === "section" && Array.isArray(n.children) ? n.children = n.children.map((e) => i(e)) : n.type === "wrapper" && Array.isArray(n.children) && (n.children = i(n.children)), [n];
|
|
473
|
-
}), a =
|
|
473
|
+
}), a = h(Oe(e.settings)), o = e.settings?.l10n?.[t];
|
|
474
474
|
if (t !== r && o) {
|
|
475
|
-
for (let [e, t] of
|
|
476
|
-
for (let [t, n] of Object.entries(o.text ?? {}))
|
|
475
|
+
for (let [e, t] of w(o.set)) x(a, e, t);
|
|
476
|
+
for (let [t, n] of Object.entries(o.text ?? {})) b(e.settings, t) !== void 0 && x(a, t, n.value);
|
|
477
477
|
}
|
|
478
478
|
return a.locale = t, {
|
|
479
479
|
blocks: i(e.blocks),
|
|
480
480
|
settings: a
|
|
481
481
|
};
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function Ae(e, t, n = []) {
|
|
484
484
|
let r = {
|
|
485
485
|
translated: [],
|
|
486
486
|
missing: [],
|
|
487
487
|
stale: []
|
|
488
488
|
}, i = (e, t, n, i) => {
|
|
489
489
|
for (let a of n) {
|
|
490
|
-
let n =
|
|
490
|
+
let n = b(t, a);
|
|
491
491
|
if (typeof n != "string") continue;
|
|
492
492
|
let o = i?.[a];
|
|
493
493
|
(o || n !== "") && (o ? o.sourceHash === C(n) ? r.translated.push(`${e}/${a}`) : r.stale.push(`${e}/${a}`) : r.missing.push(`${e}/${a}`));
|
|
494
494
|
}
|
|
495
495
|
}, a = (e) => {
|
|
496
496
|
for (let r of e) {
|
|
497
|
-
if (
|
|
497
|
+
if (De(r, t)) continue;
|
|
498
498
|
let e = r.l10n?.[t];
|
|
499
499
|
i(r.id, r, S(r, n), e?.text);
|
|
500
500
|
let o = r.children;
|
|
@@ -502,37 +502,37 @@ function je(e, t, n = []) {
|
|
|
502
502
|
else r.type === "wrapper" && Array.isArray(o) && a(o);
|
|
503
503
|
}
|
|
504
504
|
};
|
|
505
|
-
return a(e.blocks), i("settings", e.settings, [...
|
|
505
|
+
return a(e.blocks), i("settings", e.settings, [..._], e.settings?.l10n?.[t]?.text), r;
|
|
506
506
|
}
|
|
507
|
-
function
|
|
508
|
-
if (t ===
|
|
507
|
+
function je(e, t) {
|
|
508
|
+
if (t === T(e) || !e.settings.locales?.includes(t)) return [];
|
|
509
509
|
let n = [], r = (e) => {
|
|
510
|
-
for (let i of e)
|
|
510
|
+
for (let i of e) De(i, t) && n.push(i.id), i.type === "section" ? i.children.forEach(r) : i.type === "wrapper" && r(i.children);
|
|
511
511
|
};
|
|
512
512
|
return r(e.blocks), n;
|
|
513
513
|
}
|
|
514
|
-
function
|
|
515
|
-
if (t ===
|
|
514
|
+
function Me(e, t, n = []) {
|
|
515
|
+
if (t === T(e) || !e.settings.locales?.includes(t)) return [];
|
|
516
516
|
let r = [], i = (e, n, i) => {
|
|
517
|
-
r.push(...
|
|
517
|
+
r.push(...Ne(n, t, i).map((t) => `${e}/${t}`));
|
|
518
518
|
}, a = (e) => {
|
|
519
519
|
for (let t of e) i(t.id, t, S(t, n)), t.type === "section" ? t.children.forEach(a) : t.type === "wrapper" && a(t.children);
|
|
520
520
|
};
|
|
521
|
-
return a(e.blocks), i("settings", e.settings,
|
|
521
|
+
return a(e.blocks), i("settings", e.settings, _), r;
|
|
522
522
|
}
|
|
523
|
-
function
|
|
523
|
+
function Ne(e, t, n) {
|
|
524
524
|
let r = e.l10n?.[t];
|
|
525
525
|
return n.filter((t) => {
|
|
526
|
-
let n =
|
|
527
|
-
return typeof n != "string" || n === "" || r?.text?.[t] ? !1 : !Object.keys(r?.set ?? {}).some((n) => (t === n || t.startsWith(`${n}.`)) && (!n.includes(".") ||
|
|
526
|
+
let n = b(e, t);
|
|
527
|
+
return typeof n != "string" || n === "" || r?.text?.[t] ? !1 : !Object.keys(r?.set ?? {}).some((n) => (t === n || t.startsWith(`${n}.`)) && (!n.includes(".") || b(e, n.slice(0, n.lastIndexOf("."))) !== void 0));
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
|
-
function
|
|
531
|
-
let r =
|
|
532
|
-
let a =
|
|
530
|
+
function Pe(e, t, n = {}) {
|
|
531
|
+
let r = T(e), i = (e, n, i) => {
|
|
532
|
+
let a = Ne(e, t, i), o = h(e.l10n ?? {}), s = o[t] ?? {}, c = h(e);
|
|
533
533
|
delete c.l10n;
|
|
534
|
-
for (let [e, t] of
|
|
535
|
-
for (let [t, n] of Object.entries(s.text ?? {}))
|
|
534
|
+
for (let [e, t] of w(s.set)) x(c, e, t);
|
|
535
|
+
for (let [t, n] of Object.entries(s.text ?? {})) b(e, t) !== void 0 && x(c, t, n.value);
|
|
536
536
|
delete o[t];
|
|
537
537
|
let l = {}, u = /* @__PURE__ */ new Set([
|
|
538
538
|
...Object.keys(s.set ?? {}),
|
|
@@ -540,22 +540,22 @@ function Fe(e, t, n = {}) {
|
|
|
540
540
|
...a
|
|
541
541
|
]);
|
|
542
542
|
for (let t of u) {
|
|
543
|
-
let r =
|
|
544
|
-
|
|
543
|
+
let r = b(e, t), i = b(c, t);
|
|
544
|
+
g(r, i) ? (s.text?.[t] || a.includes(t)) && n(t) && typeof r == "string" && r !== "" && ((l.text ??= {})[t] = {
|
|
545
545
|
value: r,
|
|
546
546
|
sourceHash: C(r)
|
|
547
547
|
}) : n(t) && typeof r == "string" && typeof i == "string" ? (l.text ??= {})[t] = {
|
|
548
548
|
value: r,
|
|
549
549
|
sourceHash: C(i)
|
|
550
|
-
} : (l.set ??= {})[t] = r === void 0 ? null :
|
|
550
|
+
} : (l.set ??= {})[t] = r === void 0 ? null : h(r);
|
|
551
551
|
}
|
|
552
552
|
let d = (e, t) => {
|
|
553
553
|
let n = /* @__PURE__ */ new Set();
|
|
554
554
|
for (let t of Object.keys(e.set ?? {})) {
|
|
555
555
|
let e = t.split(".");
|
|
556
556
|
for (; e.length > 1;) {
|
|
557
|
-
let t =
|
|
558
|
-
if (
|
|
557
|
+
let t = b(c, e.slice(0, -1).join("."));
|
|
558
|
+
if (v(t) || Array.isArray(t) && b(c, e.join(".")) !== void 0) break;
|
|
559
559
|
e.pop();
|
|
560
560
|
}
|
|
561
561
|
let r = e.join(".");
|
|
@@ -563,20 +563,20 @@ function Fe(e, t, n = {}) {
|
|
|
563
563
|
}
|
|
564
564
|
for (let r of n) {
|
|
565
565
|
for (let t of ["text", "set"]) for (let n of Object.keys(e[t] ?? {})) (n === r || n.startsWith(`${r}.`)) && delete e[t][n];
|
|
566
|
-
let n =
|
|
567
|
-
(e.set ??= {})[r] = n === void 0 ? null :
|
|
566
|
+
let n = b(t, r);
|
|
567
|
+
(e.set ??= {})[r] = n === void 0 ? null : h(n);
|
|
568
568
|
}
|
|
569
569
|
e.text && !Object.keys(e.text).length && delete e.text;
|
|
570
570
|
};
|
|
571
571
|
for (let t of Object.values(o)) {
|
|
572
|
-
let n =
|
|
573
|
-
for (let [e, r] of
|
|
574
|
-
for (let [r, i] of Object.entries(t.text ?? {}))
|
|
572
|
+
let n = h(e);
|
|
573
|
+
for (let [e, r] of w(t.set)) x(n, e, r);
|
|
574
|
+
for (let [r, i] of Object.entries(t.text ?? {})) b(e, r) !== void 0 && x(n, r, i.value);
|
|
575
575
|
for (let [n, r] of Object.entries(t.text ?? {})) {
|
|
576
|
-
let i =
|
|
576
|
+
let i = b(c, n);
|
|
577
577
|
if (typeof i != "string") (t.set ??= {})[n] = r.value, delete t.text[n];
|
|
578
578
|
else {
|
|
579
|
-
let t =
|
|
579
|
+
let t = b(e, n);
|
|
580
580
|
typeof t == "string" && r.sourceHash === C(t) && (r.sourceHash = C(i));
|
|
581
581
|
}
|
|
582
582
|
}
|
|
@@ -585,19 +585,19 @@ function Fe(e, t, n = {}) {
|
|
|
585
585
|
return Object.keys(l).length && (d(l, e), o[r] = l), Object.keys(o).length && (c.l10n = o), c;
|
|
586
586
|
}, a = (e) => e.map((e) => {
|
|
587
587
|
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 ?? {}))])] : S(e), r = i(e, (n) => e.type === "custom" ? t.includes(n) : we(e.type, n), t);
|
|
588
|
-
return e.type === "custom" && r.type === "custom" && !
|
|
589
|
-
}), o = i(e.settings, (e) =>
|
|
588
|
+
return e.type === "custom" && r.type === "custom" && !g(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;
|
|
589
|
+
}), o = i(e.settings, (e) => _.includes(e), _);
|
|
590
590
|
return o.locale = t, o.locales = e.settings.locales.map((e) => e === t ? r : e), {
|
|
591
591
|
blocks: a(e.blocks),
|
|
592
592
|
settings: o
|
|
593
593
|
};
|
|
594
594
|
}
|
|
595
595
|
// ../types/src/operations.ts
|
|
596
|
-
function
|
|
597
|
-
let r = Object.fromEntries(
|
|
596
|
+
function Fe(e, t, n = []) {
|
|
597
|
+
let r = Object.fromEntries(P(e.blocks).flatMap((e) => {
|
|
598
598
|
if (e.type !== "custom") return [];
|
|
599
|
-
let t = S(e, n).filter((t) => typeof
|
|
600
|
-
return t.length &&
|
|
599
|
+
let t = S(e, n).filter((t) => typeof b(e, t) == "string");
|
|
600
|
+
return t.length && Ve.has(e.id) && O("invalid_operation", 0, He), t.length ? [[e.id, t]] : [];
|
|
601
601
|
}));
|
|
602
602
|
return {
|
|
603
603
|
op: "setDefaultLocale",
|
|
@@ -605,7 +605,7 @@ function Ie(e, t, n = []) {
|
|
|
605
605
|
...Object.keys(r).length ? { customTextFields: r } : {}
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
|
-
var
|
|
608
|
+
var E = class extends Error {
|
|
609
609
|
code;
|
|
610
610
|
opIndex;
|
|
611
611
|
blockId;
|
|
@@ -613,44 +613,44 @@ var T = class extends Error {
|
|
|
613
613
|
super(n), this.name = "OperationError", this.code = e, this.opIndex = t, r !== void 0 && (this.blockId = r);
|
|
614
614
|
}
|
|
615
615
|
};
|
|
616
|
-
function
|
|
617
|
-
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
616
|
+
function Ie(e) {
|
|
617
|
+
return e === "1" ? 1 : e === "3" || e === "1-2-1" ? 3 : e === "4" ? 4 : 2;
|
|
618
618
|
}
|
|
619
|
-
function
|
|
620
|
-
let r =
|
|
621
|
-
return
|
|
619
|
+
function Le(e, t, n = {}) {
|
|
620
|
+
let r = h(e);
|
|
621
|
+
return D(r, t, n), r;
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function D(e, t, n = {}) {
|
|
624
624
|
let r = {
|
|
625
625
|
locks: n.locks ?? [],
|
|
626
626
|
session: n.session ?? null
|
|
627
627
|
};
|
|
628
|
-
t.forEach((t, n) =>
|
|
628
|
+
t.forEach((t, n) => st(e, t, n, r));
|
|
629
629
|
}
|
|
630
|
-
var
|
|
630
|
+
var Re = /* @__PURE__ */ new Set([
|
|
631
631
|
"id",
|
|
632
632
|
"type",
|
|
633
633
|
"children",
|
|
634
634
|
"l10n"
|
|
635
|
-
]),
|
|
635
|
+
]), ze = /* @__PURE__ */ new Set(["locales", "l10n"]), Be = /* @__PURE__ */ new Set([
|
|
636
636
|
"locale",
|
|
637
637
|
"locales",
|
|
638
638
|
"l10n"
|
|
639
|
-
]),
|
|
639
|
+
]), Ve = /* @__PURE__ */ new Set([
|
|
640
640
|
"__proto__",
|
|
641
641
|
"constructor",
|
|
642
642
|
"prototype"
|
|
643
|
-
]),
|
|
644
|
-
function
|
|
645
|
-
throw new
|
|
643
|
+
]), He = "customTextFields must map existing custom block ids to lists of string fieldValues paths.";
|
|
644
|
+
function O(e, t, n, r) {
|
|
645
|
+
throw new E(e, t, n, r);
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function k(e) {
|
|
648
648
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
649
649
|
}
|
|
650
|
-
function
|
|
650
|
+
function A(e) {
|
|
651
651
|
return e.type === "section";
|
|
652
652
|
}
|
|
653
|
-
function
|
|
653
|
+
function Ue(e) {
|
|
654
654
|
return Array.isArray(e.blocks) ? e.blocks : [];
|
|
655
655
|
}
|
|
656
656
|
function We(e) {
|
|
@@ -658,23 +658,23 @@ function We(e) {
|
|
|
658
658
|
return Array.isArray(t) ? t.map((e) => Array.isArray(e) ? e : []) : [];
|
|
659
659
|
}
|
|
660
660
|
function j(e, t) {
|
|
661
|
-
let n =
|
|
661
|
+
let n = Ue(e);
|
|
662
662
|
for (let e = 0; e < n.length; e++) {
|
|
663
663
|
let r = n[e];
|
|
664
|
-
if (!
|
|
664
|
+
if (!k(r)) continue;
|
|
665
665
|
if (r.id === t) return {
|
|
666
666
|
block: r,
|
|
667
667
|
list: n,
|
|
668
668
|
index: e,
|
|
669
669
|
parent: null
|
|
670
670
|
};
|
|
671
|
-
if (!
|
|
671
|
+
if (!A(r) || typeof r.id != "string") continue;
|
|
672
672
|
let i = r.children;
|
|
673
673
|
if (Array.isArray(i)) for (let e = 0; e < i.length; e++) {
|
|
674
674
|
let n = i[e];
|
|
675
675
|
if (Array.isArray(n)) for (let i = 0; i < n.length; i++) {
|
|
676
676
|
let a = n[i];
|
|
677
|
-
if (
|
|
677
|
+
if (k(a) && a.id === t) return {
|
|
678
678
|
block: a,
|
|
679
679
|
list: n,
|
|
680
680
|
index: i,
|
|
@@ -688,98 +688,98 @@ function j(e, t) {
|
|
|
688
688
|
}
|
|
689
689
|
return null;
|
|
690
690
|
}
|
|
691
|
-
function
|
|
691
|
+
function Ge(e) {
|
|
692
692
|
let t = typeof e.id == "string" ? [e.id] : [];
|
|
693
|
-
if (
|
|
693
|
+
if (A(e)) for (let n of We(e)) t.push(...Ke(n));
|
|
694
694
|
return t;
|
|
695
695
|
}
|
|
696
|
-
function
|
|
697
|
-
return e.flatMap((e) =>
|
|
696
|
+
function Ke(e) {
|
|
697
|
+
return e.flatMap((e) => k(e) ? Ge(e) : []);
|
|
698
698
|
}
|
|
699
|
-
function
|
|
700
|
-
return typeof e.blockId != "string" || e.blockId === "" ?
|
|
699
|
+
function qe(e, t) {
|
|
700
|
+
return typeof e.blockId != "string" || e.blockId === "" ? O("invalid_operation", t, "blockId must be a block id.") : e.blockId;
|
|
701
701
|
}
|
|
702
|
-
function
|
|
702
|
+
function Je(e, t) {
|
|
703
703
|
let n = e.parent;
|
|
704
|
-
return n === null ? null :
|
|
704
|
+
return n === null ? null : k(n) && typeof n.sectionId == "string" && typeof n.column == "number" && Number.isInteger(n.column) ? {
|
|
705
705
|
sectionId: n.sectionId,
|
|
706
706
|
column: n.column
|
|
707
|
-
} :
|
|
707
|
+
} : O("invalid_operation", t, "parent must be null or { \"sectionId\", \"column\" }.");
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function Ye(e, t) {
|
|
710
710
|
let n = e.after;
|
|
711
|
-
return n === null ? null : typeof n == "string" && n !== "" ? n :
|
|
711
|
+
return n === null ? null : typeof n == "string" && n !== "" ? n : O("invalid_operation", t, "after must be null or a block id.");
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function M(e, t) {
|
|
714
714
|
let n = e.expect;
|
|
715
|
-
return n == null ? null :
|
|
715
|
+
return n == null ? null : k(n) ? n : O("invalid_operation", t, "expect must be an object.");
|
|
716
716
|
}
|
|
717
|
-
function
|
|
717
|
+
function Xe(e, t, n) {
|
|
718
718
|
let r = e.set ?? null, i = e.unset ?? [];
|
|
719
|
-
(r === null ||
|
|
719
|
+
(r === null || k(r)) && Array.isArray(i) && i.every((e) => typeof e == "string") || O("invalid_operation", t, "set must be an object and unset a list of keys.");
|
|
720
720
|
let a = r === null ? {} : r, o = Object.keys(a).filter((e) => a[e] !== void 0);
|
|
721
|
-
o.length === 0 && i.length === 0 &&
|
|
722
|
-
for (let e of [...o, ...i]) n.has(e) &&
|
|
721
|
+
o.length === 0 && i.length === 0 && O("invalid_operation", t, "Set or unset at least one key.");
|
|
722
|
+
for (let e of [...o, ...i]) n.has(e) && O("invalid_operation", t, `"${e}" can't be set or unset.`);
|
|
723
723
|
let s = i.find((e) => o.includes(e));
|
|
724
|
-
return s !== void 0 &&
|
|
724
|
+
return s !== void 0 && O("invalid_operation", t, `"${s}" is both set and unset.`), {
|
|
725
725
|
set: Object.fromEntries(o.map((e) => [e, a[e]])),
|
|
726
726
|
unset: i
|
|
727
727
|
};
|
|
728
728
|
}
|
|
729
|
-
function
|
|
730
|
-
if (
|
|
731
|
-
n &&
|
|
729
|
+
function Ze(e, t, n) {
|
|
730
|
+
if (k(e) && typeof e.id == "string" && e.id !== "" && typeof e.type == "string" || O("invalid_operation", t, "A block needs a non-empty string id and a string type."), !A(e)) return;
|
|
731
|
+
n && O("invalid_operation", t, "Sections can only be placed at the top level.");
|
|
732
732
|
let r = e.children;
|
|
733
|
-
Array.isArray(r) && r.every((e) => Array.isArray(e)) ||
|
|
734
|
-
for (let e of r) for (let n of e)
|
|
733
|
+
Array.isArray(r) && r.every((e) => Array.isArray(e)) || O("invalid_operation", t, "A section needs children: a list of columns, each a list of blocks.");
|
|
734
|
+
for (let e of r) for (let n of e) Ze(n, t, !0);
|
|
735
735
|
}
|
|
736
|
-
function
|
|
736
|
+
function N(e, t) {
|
|
737
737
|
return e.session === null || t.sessionId !== e.session;
|
|
738
738
|
}
|
|
739
|
-
function
|
|
740
|
-
let r = e.locks.find((n) => t.includes(n.blockId) &&
|
|
741
|
-
r &&
|
|
739
|
+
function Qe(e, t, n) {
|
|
740
|
+
let r = e.locks.find((n) => t.includes(n.blockId) && N(e, n));
|
|
741
|
+
r && O("lock_held", n, `Block "${r.blockId}" is being edited in another session.`, r.blockId);
|
|
742
742
|
}
|
|
743
|
-
function
|
|
744
|
-
e.locks.find((r) =>
|
|
743
|
+
function $e(e, t, n, r) {
|
|
744
|
+
e.locks.find((r) => N(e, r) && r.blockId === t && ((r.locale ?? null) === null || r.locale === n)) && O("lock_held", r, `Block "${t}" is being edited in another session.`, t);
|
|
745
745
|
}
|
|
746
|
-
function
|
|
747
|
-
for (let [i, a] of Object.entries(t)) a !== void 0 && (
|
|
746
|
+
function et(e, t, n, r) {
|
|
747
|
+
for (let [i, a] of Object.entries(t)) a !== void 0 && (g(Object.hasOwn(e, i) && e[i] !== void 0 ? e[i] : null, a) || O("precondition_failed", n, r === void 0 ? `Setting "${i}" has changed since.` : `"${i}" of block "${r}" has changed since.`, r));
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function tt(e, t, n) {
|
|
750
750
|
if (t === null) return Array.isArray(e.blocks) || (e.blocks = []), e.blocks;
|
|
751
751
|
let r = j(e, t.sectionId);
|
|
752
|
-
if (!r) return
|
|
753
|
-
if (!
|
|
752
|
+
if (!r) return O("block_missing", n, `No section with id "${t.sectionId}".`, t.sectionId);
|
|
753
|
+
if (!A(r.block)) return O("invalid_operation", n, `Block "${t.sectionId}" isn't a section.`);
|
|
754
754
|
let i = r.block.children;
|
|
755
|
-
return !Array.isArray(i) || t.column < 0 || t.column >= i.length ?
|
|
755
|
+
return !Array.isArray(i) || t.column < 0 || t.column >= i.length ? O("invalid_operation", n, `Section "${t.sectionId}" has no column ${t.column}.`) : (Array.isArray(i[t.column]) || (i[t.column] = []), i[t.column]);
|
|
756
756
|
}
|
|
757
|
-
function
|
|
757
|
+
function nt(e, t, n) {
|
|
758
758
|
if (t === null) return 0;
|
|
759
|
-
let r = e.findIndex((e) =>
|
|
760
|
-
return r === -1 ?
|
|
759
|
+
let r = e.findIndex((e) => k(e) && e.id === t);
|
|
760
|
+
return r === -1 ? O("anchor_missing", n, `No block "${t}" in the target container.`, t) : r + 1;
|
|
761
761
|
}
|
|
762
|
-
function
|
|
763
|
-
let i =
|
|
762
|
+
function rt(e, t, n, r) {
|
|
763
|
+
let i = Ie(t), a = Array.isArray(e.children) ? e.children : [];
|
|
764
764
|
for (let e = i; e < a.length; e++) {
|
|
765
765
|
let t = a[e];
|
|
766
|
-
Array.isArray(t) && t.length > 0 &&
|
|
766
|
+
Array.isArray(t) && t.length > 0 && O("invalid_operation", n, `Column ${e} of section "${r}" still holds blocks, so the layout can't drop it.`);
|
|
767
767
|
}
|
|
768
768
|
let o = a.slice(0, i);
|
|
769
769
|
for (; o.length < i;) o.push([]);
|
|
770
770
|
e.children = o;
|
|
771
771
|
}
|
|
772
|
-
function
|
|
772
|
+
function it(e, t, n) {
|
|
773
773
|
for (let [n, r] of Object.entries(t)) n === "__proto__" ? Object.defineProperty(e, n, {
|
|
774
|
-
value:
|
|
774
|
+
value: h(r),
|
|
775
775
|
writable: !0,
|
|
776
776
|
enumerable: !0,
|
|
777
777
|
configurable: !0
|
|
778
|
-
}) : e[n] =
|
|
778
|
+
}) : e[n] = h(r);
|
|
779
779
|
for (let t of n) delete e[t];
|
|
780
780
|
}
|
|
781
|
-
function
|
|
782
|
-
return
|
|
781
|
+
function at(e) {
|
|
782
|
+
return fe(e).map((t) => {
|
|
783
783
|
let n = t.path.replace(/\.(items|icons|rows)\[.*$/, "").replace(/\[(\d+)\]/g, ".$1").split(".").reduce((e, t) => e[t], e);
|
|
784
784
|
return {
|
|
785
785
|
id: t.id,
|
|
@@ -787,114 +787,114 @@ function rt(e) {
|
|
|
787
787
|
};
|
|
788
788
|
});
|
|
789
789
|
}
|
|
790
|
-
function
|
|
791
|
-
let r = ({ id: e, blockId: t }) => JSON.stringify([t ?? null, e]), i = new Set(n ?
|
|
792
|
-
a &&
|
|
790
|
+
function ot(e, t, n) {
|
|
791
|
+
let r = ({ id: e, blockId: t }) => JSON.stringify([t ?? null, e]), i = new Set(n ? at(n).map(r) : []), a = at(e).find((e) => !i.has(r(e)));
|
|
792
|
+
a && O("invalid_operation", t, `Element id "${a.id}" must not contain "." or "/".`, a.blockId);
|
|
793
793
|
}
|
|
794
|
-
function
|
|
794
|
+
function st(e, t, n, r) {
|
|
795
795
|
let i = t;
|
|
796
|
-
switch (
|
|
797
|
-
case "addBlock": return
|
|
798
|
-
case "moveBlock": return
|
|
799
|
-
case "deleteBlock": return
|
|
800
|
-
case "updateBlock": return
|
|
801
|
-
case "updateSettings": return
|
|
802
|
-
case "setContent": return
|
|
803
|
-
case "setDefaultLocale": return
|
|
804
|
-
case "addLocale": return
|
|
805
|
-
case "removeLocale": return
|
|
806
|
-
case "updateBlockLocale": return
|
|
807
|
-
case "updateSettingsLocale": return
|
|
808
|
-
default:
|
|
796
|
+
switch (k(i) && typeof i.op == "string" || O("invalid_operation", n, "Each operation must be an object with an \"op\"."), i.op) {
|
|
797
|
+
case "addBlock": return ct(e, i, n);
|
|
798
|
+
case "moveBlock": return lt(e, i, n, r);
|
|
799
|
+
case "deleteBlock": return ut(e, i, n, r);
|
|
800
|
+
case "updateBlock": return dt(e, i, n, r);
|
|
801
|
+
case "updateSettings": return ft(e, i, n);
|
|
802
|
+
case "setContent": return Dt(e, i, n, r);
|
|
803
|
+
case "setDefaultLocale": return Ot(e, i, n, r);
|
|
804
|
+
case "addLocale": return ht(e, i, n);
|
|
805
|
+
case "removeLocale": return _t(e, i, n);
|
|
806
|
+
case "updateBlockLocale": return Tt(e, i, n, r);
|
|
807
|
+
case "updateSettingsLocale": return Et(e, i, n);
|
|
808
|
+
default: O("invalid_operation", n, `Unknown operation "${i.op}".`);
|
|
809
809
|
}
|
|
810
810
|
}
|
|
811
|
-
function
|
|
812
|
-
let r =
|
|
813
|
-
|
|
811
|
+
function ct(e, t, n) {
|
|
812
|
+
let r = Je(t, n), i = Ye(t, n), a = t.block;
|
|
813
|
+
Ze(a, n, r !== null), ot({
|
|
814
814
|
blocks: [a],
|
|
815
815
|
settings: e.settings
|
|
816
816
|
}, n);
|
|
817
|
-
let o = new Set(
|
|
818
|
-
for (let e of
|
|
819
|
-
let c =
|
|
820
|
-
|
|
821
|
-
}
|
|
822
|
-
function st(e, t, n, r) {
|
|
823
|
-
let i = N(t, n), a = Ke(t, n), o = qe(t, n), s = P(t, n), c = j(e, i);
|
|
824
|
-
if (!c) return D("block_missing", n, `No block with id "${i}".`, i);
|
|
825
|
-
if (Xe(r, M(c.block), n), s) {
|
|
826
|
-
let e = c.index > 0 ? c.list[c.index - 1] : null, t = O(e) ? e.id ?? null : null;
|
|
827
|
-
h(c.parent, s.parent ?? null) && h(t, s.after ?? null) || D("precondition_failed", n, `Block "${i}" has moved since.`, i);
|
|
828
|
-
}
|
|
829
|
-
k(c.block) && a !== null && D("invalid_operation", n, "Sections can only be placed at the top level."), o === i && D("invalid_operation", n, "A block can't be placed after itself.");
|
|
830
|
-
let l = $e(e, a, n);
|
|
831
|
-
et(l.filter((e) => e !== c.block), o, n), St(e, c.block, a, n, !1), c.list.splice(c.index, 1), l.splice(et(l, o, n), 0, c.block);
|
|
832
|
-
}
|
|
833
|
-
function ct(e, t, n, r) {
|
|
834
|
-
let i = N(t, n), a = P(t, n), o = j(e, i);
|
|
835
|
-
if (!o) return D("block_missing", n, `No block with id "${i}".`, i);
|
|
836
|
-
Xe(r, M(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);
|
|
817
|
+
let o = new Set(Ke(Ue(e))), s = /* @__PURE__ */ new Set();
|
|
818
|
+
for (let e of Ge(a)) (o.has(e) || s.has(e)) && O("block_exists", n, `A block with id "${e}" already exists.`, e), s.add(e);
|
|
819
|
+
let c = tt(e, r, n), l = nt(c, i, n);
|
|
820
|
+
wt(e, a, r, n, !0), c.splice(l, 0, h(a));
|
|
837
821
|
}
|
|
838
822
|
function lt(e, t, n, r) {
|
|
839
|
-
let i =
|
|
840
|
-
if (!c) return
|
|
841
|
-
|
|
842
|
-
|
|
823
|
+
let i = qe(t, n), a = Je(t, n), o = Ye(t, n), s = M(t, n), c = j(e, i);
|
|
824
|
+
if (!c) return O("block_missing", n, `No block with id "${i}".`, i);
|
|
825
|
+
if (Qe(r, Ge(c.block), n), s) {
|
|
826
|
+
let e = c.index > 0 ? c.list[c.index - 1] : null, t = k(e) ? e.id ?? null : null;
|
|
827
|
+
g(c.parent, s.parent ?? null) && g(t, s.after ?? null) || O("precondition_failed", n, `Block "${i}" has moved since.`, i);
|
|
828
|
+
}
|
|
829
|
+
A(c.block) && a !== null && O("invalid_operation", n, "Sections can only be placed at the top level."), o === i && O("invalid_operation", n, "A block can't be placed after itself.");
|
|
830
|
+
let l = tt(e, a, n);
|
|
831
|
+
nt(l.filter((e) => e !== c.block), o, n), wt(e, c.block, a, n, !1), c.list.splice(c.index, 1), l.splice(nt(l, o, n), 0, c.block);
|
|
832
|
+
}
|
|
833
|
+
function ut(e, t, n, r) {
|
|
834
|
+
let i = qe(t, n), a = M(t, n), o = j(e, i);
|
|
835
|
+
if (!o) return O("block_missing", n, `No block with id "${i}".`, i);
|
|
836
|
+
Qe(r, Ge(o.block), n), a && !g(o.block, a.block ?? null) && O("precondition_failed", n, `Block "${i}" has changed since.`, i), o.list.splice(o.index, 1);
|
|
837
|
+
}
|
|
838
|
+
function dt(e, t, n, r) {
|
|
839
|
+
let i = qe(t, n), { set: a, unset: o } = Xe(t, n, Re), s = M(t, n), c = j(e, i);
|
|
840
|
+
if (!c) return O("block_missing", n, `No block with id "${i}".`, i);
|
|
841
|
+
let l = c.block, u = A(l);
|
|
842
|
+
u && o.includes("columns") && O("invalid_operation", n, "A section's columns can't be unset; set another layout instead."), Qe(r, [i], n), s && et(l, s, n, i);
|
|
843
843
|
let d = { ...l };
|
|
844
|
-
|
|
844
|
+
it(d, a, o), ot({
|
|
845
845
|
blocks: [d],
|
|
846
846
|
settings: e.settings
|
|
847
847
|
}, n, {
|
|
848
848
|
blocks: [l],
|
|
849
849
|
settings: e.settings
|
|
850
|
-
}), u && Object.hasOwn(a, "columns") &&
|
|
851
|
-
let f =
|
|
852
|
-
|
|
850
|
+
}), u && Object.hasOwn(a, "columns") && rt(l, a.columns, n, i), it(l, a, o);
|
|
851
|
+
let f = be(l);
|
|
852
|
+
g(l.l10n, f.l10n) || (f.l10n ? l.l10n = f.l10n : delete l.l10n), u && f.type === "section" && !g(l.children, f.children) && (l.children = f.children);
|
|
853
853
|
}
|
|
854
|
-
function
|
|
855
|
-
let { set: r, unset: i } =
|
|
856
|
-
e.settings?.locales?.length && (Object.hasOwn(r, "locale") || i.includes("locale")) &&
|
|
854
|
+
function ft(e, t, n) {
|
|
855
|
+
let { set: r, unset: i } = Xe(t, n, ze), a = M(t, n);
|
|
856
|
+
e.settings?.locales?.length && (Object.hasOwn(r, "locale") || i.includes("locale")) && O("invalid_operation", n, "The default locale can't change while language versions exist."), k(e.settings) || (e.settings = {});
|
|
857
857
|
let o = e.settings;
|
|
858
|
-
a &&
|
|
858
|
+
a && et(o, a, n), it(o, r, i);
|
|
859
859
|
let s = Se(e.settings);
|
|
860
|
-
|
|
860
|
+
g(o.l10n, s.l10n) || (s.l10n ? o.l10n = s.l10n : delete o.l10n);
|
|
861
861
|
}
|
|
862
|
-
function
|
|
862
|
+
function pt(e, t) {
|
|
863
863
|
let n = e.locale;
|
|
864
|
-
return
|
|
864
|
+
return ge(n) && n !== "__proto__" && n !== "constructor" && n !== "prototype" || O("invalid_operation", t, "locale must be a language tag."), n;
|
|
865
865
|
}
|
|
866
|
-
function
|
|
867
|
-
let r =
|
|
868
|
-
return e.settings.locales?.includes(r) ||
|
|
866
|
+
function mt(e, t, n) {
|
|
867
|
+
let r = pt(t, n);
|
|
868
|
+
return e.settings.locales?.includes(r) || O("invalid_operation", n, `Locale "${r}" isn't in settings.locales.`), r;
|
|
869
869
|
}
|
|
870
|
-
function
|
|
871
|
-
let r =
|
|
872
|
-
(
|
|
870
|
+
function ht(e, t, n) {
|
|
871
|
+
let r = pt(t, n), i = e.settings.locales ?? [], a = r.toLowerCase(), o = t.position === void 0 ? i.length : t.position;
|
|
872
|
+
(T(e).toLowerCase() === a || i.some((e) => e.toLowerCase() === a) || typeof o != "number" || !Number.isInteger(o) || o < 0 || o > i.length) && O("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);
|
|
873
873
|
}
|
|
874
|
-
function
|
|
875
|
-
return e.flatMap((e) =>
|
|
874
|
+
function P(e) {
|
|
875
|
+
return e.flatMap((e) => k(e) ? [e, ...A(e) ? We(e).flatMap(P) : e.type === "wrapper" && Array.isArray(e.children) ? P(e.children) : []] : []);
|
|
876
876
|
}
|
|
877
|
-
function
|
|
877
|
+
function gt(e, t) {
|
|
878
878
|
let n = e.l10n;
|
|
879
|
-
return
|
|
880
|
-
}
|
|
881
|
-
function
|
|
882
|
-
let r =
|
|
883
|
-
i && (!
|
|
884
|
-
let a = e.settings, o =
|
|
885
|
-
!i ||
|
|
886
|
-
for (let e of [...o, a])
|
|
879
|
+
return k(n) && k(n[t]) ? n[t] : {};
|
|
880
|
+
}
|
|
881
|
+
function _t(e, t, n) {
|
|
882
|
+
let r = mt(e, t, n), i = M(t, n);
|
|
883
|
+
i && (!k(i.blocks) || i.settings !== void 0 && !k(i.settings)) && O("invalid_operation", n, "expect needs a blocks object and an optional settings layer.");
|
|
884
|
+
let a = e.settings, o = P(Ue(e)), s = Object.fromEntries(o.flatMap((e) => k(e.l10n) && Object.hasOwn(e.l10n, r) ? [[String(e.id), e.l10n[r]]] : []));
|
|
885
|
+
!i || g(s, i.blocks) && g(k(a.l10n) ? a.l10n[r] : void 0, i.settings) || O("precondition_failed", n, `Locale "${r}" has changed since.`);
|
|
886
|
+
for (let e of [...o, a]) k(e.l10n) && (delete e.l10n[r], Object.keys(e.l10n).length === 0 && delete e.l10n);
|
|
887
887
|
e.settings.locales.splice(e.settings.locales.indexOf(r), 1), e.settings.locales.length === 0 && delete e.settings.locales;
|
|
888
888
|
}
|
|
889
|
-
function
|
|
890
|
-
(e.text === void 0 || ((e) =>
|
|
889
|
+
function vt(e, t, n) {
|
|
890
|
+
(e.text === void 0 || ((e) => k(e) && Object.values(e).every((e) => k(e) && typeof e.value == "string" && typeof e.sourceHash == "string"))(e.text)) && (e.set === void 0 || k(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 !== "" && y(e))) && (e.hidden === void 0 || !n && typeof e.hidden == "boolean") && [
|
|
891
891
|
"text",
|
|
892
892
|
"set",
|
|
893
893
|
"unset",
|
|
894
894
|
...n ? [] : ["hidden"]
|
|
895
|
-
].some((t) => e[t] !== void 0) ||
|
|
896
|
-
let r =
|
|
897
|
-
return r && (r.text !== void 0 && !
|
|
895
|
+
].some((t) => e[t] !== void 0) || O("invalid_operation", t, "A locale update needs text, set, unset or a block's boolean hidden.");
|
|
896
|
+
let r = M(e, t);
|
|
897
|
+
return r && (r.text !== void 0 && !k(r.text) || r.set !== void 0 && !k(r.set) || r.hidden !== void 0 && (n || typeof r.hidden != "boolean")) && O("invalid_operation", t, "The locale layer expect is malformed."), {
|
|
898
898
|
text: e.text ?? {},
|
|
899
899
|
set: e.set ?? {},
|
|
900
900
|
unset: e.unset ?? [],
|
|
@@ -902,83 +902,83 @@ function gt(e, t, n) {
|
|
|
902
902
|
expect: r
|
|
903
903
|
};
|
|
904
904
|
}
|
|
905
|
-
function
|
|
906
|
-
for (let i of Object.keys(t.text))
|
|
905
|
+
function yt(e, t, n, r) {
|
|
906
|
+
for (let i of Object.keys(t.text)) y(i) && (r ? _.includes(i) : we(String(e.type), i)) && b(e, i) !== void 0 || O("invalid_operation", n, `Text path "${i}" isn't translatable or doesn't resolve.`);
|
|
907
907
|
for (let i of Object.keys(t.set)) {
|
|
908
|
-
let a = i.split("."), o = r ?
|
|
909
|
-
(!
|
|
908
|
+
let a = i.split("."), o = r ? Be : Re, s = a.length === 1 ? e : b(e, a.slice(0, -1).join("."));
|
|
909
|
+
(!y(i) || o.has(a[0]) || !r && xe(e, i, t.set[i]) || b(e, i) === void 0 && !k(s)) && O("invalid_operation", n, `Override path "${i}" is immutable or doesn't resolve.`);
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
|
-
function
|
|
912
|
+
function bt(e, t, n, r) {
|
|
913
913
|
if (t) {
|
|
914
|
-
for (let i of ["text", "set"]) for (let [a, o] of Object.entries(t[i] ?? {}))
|
|
915
|
-
t.hidden !== void 0 && !
|
|
914
|
+
for (let i of ["text", "set"]) for (let [a, o] of Object.entries(t[i] ?? {})) g(e[i]?.[a] ?? null, o) || O("precondition_failed", n, `Locale path "${a}" has changed since.`, r);
|
|
915
|
+
t.hidden !== void 0 && !g(e.hidden === !0, t.hidden) && O("precondition_failed", n, "The locale's hidden state has changed since.", r);
|
|
916
916
|
}
|
|
917
917
|
}
|
|
918
|
-
function
|
|
919
|
-
|
|
918
|
+
function xt(e, t, n) {
|
|
919
|
+
k(e.l10n) || (e.l10n = {});
|
|
920
920
|
let r = e.l10n;
|
|
921
|
-
|
|
921
|
+
k(r[t]) || (r[t] = {});
|
|
922
922
|
let i = r[t];
|
|
923
923
|
for (let e of n.unset) i.text && delete i.text[e], i.set && delete i.set[e];
|
|
924
|
-
for (let [e, t] of Object.entries(n.text)) i.text ||= {}, i.text[e] =
|
|
925
|
-
for (let [e, t] of Object.entries(n.set)) i.set ||= {}, i.set[e] =
|
|
924
|
+
for (let [e, t] of Object.entries(n.text)) i.text ||= {}, i.text[e] = h(t), i.set && delete i.set[e];
|
|
925
|
+
for (let [e, t] of Object.entries(n.set)) i.set ||= {}, i.set[e] = h(t), i.text && delete i.text[e];
|
|
926
926
|
n.hidden === !0 ? i.hidden = !0 : n.hidden === !1 && delete i.hidden, i.text && Object.keys(i.text).length === 0 && delete i.text, i.set && Object.keys(i.set).length === 0 && delete i.set, Object.keys(i).length === 0 && delete r[t], Object.keys(r).length === 0 && delete e.l10n;
|
|
927
927
|
}
|
|
928
|
-
function
|
|
929
|
-
return
|
|
928
|
+
function F(e) {
|
|
929
|
+
return k(e) ? e.type === "slot" || Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(F) : F(e)) : !1;
|
|
930
930
|
}
|
|
931
|
-
function
|
|
932
|
-
return
|
|
931
|
+
function St(e) {
|
|
932
|
+
return k(e) && k(e.l10n) && Object.values(e.l10n).some((e) => k(e) && e.hidden === !0);
|
|
933
933
|
}
|
|
934
|
-
function
|
|
935
|
-
return !
|
|
934
|
+
function Ct(e) {
|
|
935
|
+
return !k(e) || !F(e) ? !1 : St(e) ? !0 : Array.isArray(e.children) && e.children.some((e) => Array.isArray(e) ? e.some(Ct) : Ct(e));
|
|
936
936
|
}
|
|
937
|
-
function
|
|
938
|
-
if (!
|
|
937
|
+
function wt(e, t, n, r, i) {
|
|
938
|
+
if (!F(t)) return;
|
|
939
939
|
let a = n === null ? null : j(e, n.sectionId);
|
|
940
|
-
(a !== null &&
|
|
940
|
+
(a !== null && St(a.block) || i && Ct(t)) && O("invalid_operation", r, "A layout's slot block can't be placed inside a block that a language hides.", k(t) && typeof t.id == "string" ? t.id : void 0);
|
|
941
941
|
}
|
|
942
|
-
function
|
|
943
|
-
let i =
|
|
944
|
-
s ||
|
|
942
|
+
function Tt(e, t, n, r) {
|
|
943
|
+
let i = mt(e, t, n), a = qe(t, n), o = vt(t, n, !1), s = P(Ue(e)).find((e) => e.id === a);
|
|
944
|
+
s || O("block_missing", n, `No block with id "${a}".`, a), yt(s, o, n, !1), $e(r, a, i, n), bt(gt(s, i), o.expect, n, a), o.hidden === !0 && F(s) && O("invalid_operation", n, "A layout's slot block, and any block that contains it, can't be hidden.", a), xt(s, i, o);
|
|
945
945
|
}
|
|
946
|
-
function
|
|
947
|
-
let r =
|
|
948
|
-
|
|
946
|
+
function Et(e, t, n) {
|
|
947
|
+
let r = mt(e, t, n), i = vt(t, n, !0), a = e.settings;
|
|
948
|
+
yt(a, i, n, !0), bt(gt(a, r), i.expect, n), xt(a, r, i);
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function Dt(e, t, n, r) {
|
|
951
951
|
let i = t.content;
|
|
952
|
-
if (!
|
|
953
|
-
|
|
954
|
-
let a = r.locks.find((e) =>
|
|
955
|
-
a &&
|
|
956
|
-
}
|
|
957
|
-
function
|
|
958
|
-
let i =
|
|
959
|
-
e.settings.locales?.includes(i) ||
|
|
960
|
-
let a =
|
|
961
|
-
a.length &&
|
|
962
|
-
let o = r.locks.find((e) =>
|
|
963
|
-
o &&
|
|
952
|
+
if (!k(i) || !Array.isArray(i.blocks) || !k(i.settings)) return O("invalid_operation", n, "setContent needs content with a blocks array and a settings object.");
|
|
953
|
+
ot(i, n, e);
|
|
954
|
+
let a = r.locks.find((e) => N(r, e));
|
|
955
|
+
a && O("locked_by_others", n, "Other sessions hold locks on this template.", a.blockId), e.blocks = h(i.blocks), e.settings = h(i.settings);
|
|
956
|
+
}
|
|
957
|
+
function Ot(e, t, n, r) {
|
|
958
|
+
let i = pt(t, n);
|
|
959
|
+
e.settings.locales?.includes(i) || O("invalid_operation", n, `"${i}" is not a language version of this template.`);
|
|
960
|
+
let a = je(e, i);
|
|
961
|
+
a.length && O("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]);
|
|
962
|
+
let o = r.locks.find((e) => N(r, e));
|
|
963
|
+
o && O("locked_by_others", n, "Other sessions hold locks on this template.", o.blockId);
|
|
964
964
|
let s = t.customTextFields;
|
|
965
965
|
if (s !== void 0) {
|
|
966
|
-
let t =
|
|
967
|
-
(!
|
|
968
|
-
if (
|
|
966
|
+
let t = P(e.blocks);
|
|
967
|
+
(!k(s) || Object.getOwnPropertyNames(s).some((e) => {
|
|
968
|
+
if (Ve.has(e)) return !0;
|
|
969
969
|
let n = s[e], r = t.find((t) => t.id === e);
|
|
970
|
-
return r?.type !== "custom" || !Array.isArray(n) || n.some((e) => typeof e != "string" || !
|
|
971
|
-
})) &&
|
|
970
|
+
return r?.type !== "custom" || !Array.isArray(n) || n.some((e) => typeof e != "string" || !y(e) || !we("custom", e) || typeof b(r, e) != "string");
|
|
971
|
+
})) && O("invalid_operation", n, He);
|
|
972
972
|
}
|
|
973
|
-
let c =
|
|
973
|
+
let c = Pe(e, i, t.customTextFields);
|
|
974
974
|
e.blocks = c.blocks, e.settings = c.settings;
|
|
975
975
|
}
|
|
976
976
|
// ../types/src/invert-operations.ts
|
|
977
|
-
function
|
|
977
|
+
function kt(e) {
|
|
978
978
|
let t = e.children;
|
|
979
979
|
return e.type === "section" && Array.isArray(t) ? t : [];
|
|
980
980
|
}
|
|
981
|
-
function
|
|
981
|
+
function At(e, t, n = null) {
|
|
982
982
|
for (let r = 0; r < e.length; r++) {
|
|
983
983
|
let i = e[r];
|
|
984
984
|
if (i.id === t) return {
|
|
@@ -986,10 +986,10 @@ function Ot(e, t, n = null) {
|
|
|
986
986
|
parent: n,
|
|
987
987
|
after: r > 0 ? e[r - 1].id : null
|
|
988
988
|
};
|
|
989
|
-
let a =
|
|
989
|
+
let a = kt(i);
|
|
990
990
|
for (let e = 0; e < a.length; e++) {
|
|
991
991
|
if (!Array.isArray(a[e])) continue;
|
|
992
|
-
let n =
|
|
992
|
+
let n = At(a[e], t, {
|
|
993
993
|
sectionId: i.id,
|
|
994
994
|
column: e
|
|
995
995
|
});
|
|
@@ -998,18 +998,18 @@ function Ot(e, t, n = null) {
|
|
|
998
998
|
}
|
|
999
999
|
return null;
|
|
1000
1000
|
}
|
|
1001
|
-
function
|
|
1002
|
-
let r =
|
|
1003
|
-
if (!r) throw new
|
|
1001
|
+
function jt(e, t, n) {
|
|
1002
|
+
let r = At(e.blocks, t);
|
|
1003
|
+
if (!r) throw new E("block_missing", n, `No block with id "${t}".`, t);
|
|
1004
1004
|
return r;
|
|
1005
1005
|
}
|
|
1006
|
-
function
|
|
1006
|
+
function Mt(e, t, n) {
|
|
1007
1007
|
let r = {}, i = [], a = {}, o = [.../* @__PURE__ */ new Set([...Object.keys(t ?? {}), ...n ?? []])];
|
|
1008
1008
|
for (let n of o) {
|
|
1009
1009
|
let o = e[n];
|
|
1010
|
-
o === void 0 ? i.push(n) : r[n] =
|
|
1010
|
+
o === void 0 ? i.push(n) : r[n] = h(o);
|
|
1011
1011
|
let s = t && n in t ? t[n] : void 0;
|
|
1012
|
-
a[n] = s === void 0 ? null :
|
|
1012
|
+
a[n] = s === void 0 ? null : h(s);
|
|
1013
1013
|
}
|
|
1014
1014
|
return {
|
|
1015
1015
|
set: r,
|
|
@@ -1017,13 +1017,13 @@ function At(e, t, n) {
|
|
|
1017
1017
|
expect: a
|
|
1018
1018
|
};
|
|
1019
1019
|
}
|
|
1020
|
-
function
|
|
1020
|
+
function I(e, t) {
|
|
1021
1021
|
return e.l10n?.[t] ?? {};
|
|
1022
1022
|
}
|
|
1023
|
-
function
|
|
1023
|
+
function L(e, t, n, r) {
|
|
1024
1024
|
let i = {}, a = {}, o = {};
|
|
1025
1025
|
n.length && (o.text = {}, o.set = {});
|
|
1026
|
-
for (let r of n) e.text?.[r] !== void 0 && (i[r] =
|
|
1026
|
+
for (let r of n) e.text?.[r] !== void 0 && (i[r] = h(e.text[r])), e.set && Object.hasOwn(e.set, r) && (a[r] = h(e.set[r])), o.text[r] = h(t.text?.[r] ?? null), o.set[r] = h(t.set?.[r] ?? null);
|
|
1027
1027
|
return r && (o.hidden = t.hidden === !0), {
|
|
1028
1028
|
unset: n,
|
|
1029
1029
|
...Object.keys(i).length ? { text: i } : {},
|
|
@@ -1032,21 +1032,21 @@ function z(e, t, n, r) {
|
|
|
1032
1032
|
expect: o
|
|
1033
1033
|
};
|
|
1034
1034
|
}
|
|
1035
|
-
function
|
|
1036
|
-
let { unset: t, ...n } =
|
|
1035
|
+
function Nt(e) {
|
|
1036
|
+
let { unset: t, ...n } = L(e, {}, [.../* @__PURE__ */ new Set([...Object.keys(e.text ?? {}), ...Object.keys(e.set ?? {})])], e.hidden === !0);
|
|
1037
1037
|
return n;
|
|
1038
1038
|
}
|
|
1039
|
-
function
|
|
1040
|
-
return e.flatMap((e) => [e, ...e.type === "wrapper" ?
|
|
1039
|
+
function R(e) {
|
|
1040
|
+
return e.flatMap((e) => [e, ...e.type === "wrapper" ? R(e.children) : kt(e).flatMap(R)]);
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1043
|
-
let n =
|
|
1044
|
-
|
|
1042
|
+
function Pt(e, t) {
|
|
1043
|
+
let n = h(e);
|
|
1044
|
+
D(n, [t]);
|
|
1045
1045
|
let r = [], i = (e, t, n) => {
|
|
1046
1046
|
for (let [i, a] of Object.entries(e.l10n ?? {})) {
|
|
1047
1047
|
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))])];
|
|
1048
1048
|
if (!o.length) continue;
|
|
1049
|
-
let s =
|
|
1049
|
+
let s = L(a, e, o, !1);
|
|
1050
1050
|
r.push(n === void 0 ? {
|
|
1051
1051
|
op: "updateSettingsLocale",
|
|
1052
1052
|
locale: i,
|
|
@@ -1061,32 +1061,32 @@ function Mt(e, t) {
|
|
|
1061
1061
|
};
|
|
1062
1062
|
if (t.op === "updateSettings") i(e.settings, n.settings);
|
|
1063
1063
|
else {
|
|
1064
|
-
let t = new Map(
|
|
1065
|
-
for (let n of
|
|
1064
|
+
let t = new Map(R(n.blocks).map((e) => [e.id, e]));
|
|
1065
|
+
for (let n of R(e.blocks)) {
|
|
1066
1066
|
let e = t.get(n.id);
|
|
1067
1067
|
e && i(n, e, n.id);
|
|
1068
1068
|
}
|
|
1069
1069
|
}
|
|
1070
1070
|
return r;
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1072
|
+
function Ft(e, t, n) {
|
|
1073
1073
|
switch (t.op) {
|
|
1074
1074
|
case "addBlock": return {
|
|
1075
1075
|
op: "deleteBlock",
|
|
1076
1076
|
blockId: t.block.id,
|
|
1077
|
-
expect: { block:
|
|
1077
|
+
expect: { block: h(t.block) }
|
|
1078
1078
|
};
|
|
1079
1079
|
case "deleteBlock": {
|
|
1080
|
-
let r =
|
|
1080
|
+
let r = jt(e, t.blockId, n);
|
|
1081
1081
|
return {
|
|
1082
1082
|
op: "addBlock",
|
|
1083
|
-
block:
|
|
1083
|
+
block: h(r.block),
|
|
1084
1084
|
parent: r.parent,
|
|
1085
1085
|
after: r.after
|
|
1086
1086
|
};
|
|
1087
1087
|
}
|
|
1088
1088
|
case "moveBlock": {
|
|
1089
|
-
let r =
|
|
1089
|
+
let r = jt(e, t.blockId, n);
|
|
1090
1090
|
return {
|
|
1091
1091
|
op: "moveBlock",
|
|
1092
1092
|
blockId: t.blockId,
|
|
@@ -1099,23 +1099,23 @@ function Nt(e, t, n) {
|
|
|
1099
1099
|
};
|
|
1100
1100
|
}
|
|
1101
1101
|
case "updateBlock": {
|
|
1102
|
-
let r =
|
|
1102
|
+
let r = jt(e, t.blockId, n).block, { set: i, unset: a, expect: o } = Mt(r, t.set, t.unset);
|
|
1103
1103
|
return [{
|
|
1104
1104
|
op: "updateBlock",
|
|
1105
1105
|
blockId: t.blockId,
|
|
1106
1106
|
...Object.keys(i).length > 0 ? { set: i } : {},
|
|
1107
1107
|
...a.length > 0 ? { unset: a } : {},
|
|
1108
1108
|
expect: o
|
|
1109
|
-
}, ...
|
|
1109
|
+
}, ...Pt(e, t)];
|
|
1110
1110
|
}
|
|
1111
1111
|
case "updateSettings": {
|
|
1112
|
-
let { set: n, unset: r, expect: i } =
|
|
1112
|
+
let { set: n, unset: r, expect: i } = Mt(e.settings, t.set, t.unset);
|
|
1113
1113
|
return [{
|
|
1114
1114
|
op: "updateSettings",
|
|
1115
1115
|
...Object.keys(n).length > 0 ? { set: n } : {},
|
|
1116
1116
|
...r.length > 0 ? { unset: r } : {},
|
|
1117
1117
|
expect: i
|
|
1118
|
-
}, ...
|
|
1118
|
+
}, ...Pt(e, t)];
|
|
1119
1119
|
}
|
|
1120
1120
|
case "addLocale": return {
|
|
1121
1121
|
op: "removeLocale",
|
|
@@ -1128,18 +1128,18 @@ function Nt(e, t, n) {
|
|
|
1128
1128
|
locale: t.locale,
|
|
1129
1129
|
position: e.settings.locales?.indexOf(t.locale)
|
|
1130
1130
|
}];
|
|
1131
|
-
for (let r of
|
|
1131
|
+
for (let r of R(e.blocks)) {
|
|
1132
1132
|
let e = r.l10n?.[t.locale];
|
|
1133
1133
|
e && n.push({
|
|
1134
1134
|
op: "updateBlockLocale",
|
|
1135
1135
|
blockId: r.id,
|
|
1136
1136
|
locale: t.locale,
|
|
1137
|
-
...
|
|
1137
|
+
...Nt(e)
|
|
1138
1138
|
});
|
|
1139
1139
|
}
|
|
1140
1140
|
let r = e.settings.l10n?.[t.locale];
|
|
1141
1141
|
if (r) {
|
|
1142
|
-
let { hidden: e, ...i } =
|
|
1142
|
+
let { hidden: e, ...i } = Nt(r);
|
|
1143
1143
|
n.push({
|
|
1144
1144
|
op: "updateSettingsLocale",
|
|
1145
1145
|
locale: t.locale,
|
|
@@ -1150,23 +1150,23 @@ function Nt(e, t, n) {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
case "updateBlockLocale":
|
|
1152
1152
|
case "updateSettingsLocale": {
|
|
1153
|
-
let n =
|
|
1154
|
-
|
|
1153
|
+
let n = h(e);
|
|
1154
|
+
D(n, [t]);
|
|
1155
1155
|
let r = [.../* @__PURE__ */ new Set([
|
|
1156
1156
|
...Object.keys(t.text ?? {}),
|
|
1157
1157
|
...Object.keys(t.set ?? {}),
|
|
1158
1158
|
...t.unset ?? []
|
|
1159
1159
|
])];
|
|
1160
1160
|
if (t.op === "updateBlockLocale") {
|
|
1161
|
-
let i =
|
|
1161
|
+
let i = R(e.blocks).find((e) => e.id === t.blockId), a = R(n.blocks).find((e) => e.id === t.blockId);
|
|
1162
1162
|
return {
|
|
1163
1163
|
op: "updateBlockLocale",
|
|
1164
1164
|
blockId: t.blockId,
|
|
1165
1165
|
locale: t.locale,
|
|
1166
|
-
...
|
|
1166
|
+
...L(I(i, t.locale), I(a, t.locale), r, t.hidden !== void 0)
|
|
1167
1167
|
};
|
|
1168
1168
|
}
|
|
1169
|
-
let { hidden: i, ...a } =
|
|
1169
|
+
let { hidden: i, ...a } = L(I(e.settings, t.locale), I(n.settings, t.locale), r, !1);
|
|
1170
1170
|
return {
|
|
1171
1171
|
op: "updateSettingsLocale",
|
|
1172
1172
|
locale: t.locale,
|
|
@@ -1177,95 +1177,95 @@ function Nt(e, t, n) {
|
|
|
1177
1177
|
case "setContent": return {
|
|
1178
1178
|
op: "setContent",
|
|
1179
1179
|
content: {
|
|
1180
|
-
blocks:
|
|
1181
|
-
settings:
|
|
1180
|
+
blocks: h(e.blocks),
|
|
1181
|
+
settings: h(e.settings)
|
|
1182
1182
|
}
|
|
1183
1183
|
};
|
|
1184
1184
|
}
|
|
1185
1185
|
}
|
|
1186
|
-
function
|
|
1187
|
-
let n =
|
|
1186
|
+
function It(e, t) {
|
|
1187
|
+
let n = h(e), r = [];
|
|
1188
1188
|
return t.forEach((e, t) => {
|
|
1189
1189
|
try {
|
|
1190
|
-
let i =
|
|
1191
|
-
r.push(...Array.isArray(i) ? [...i].reverse() : [i]),
|
|
1190
|
+
let i = Ft(n, e, t);
|
|
1191
|
+
r.push(...Array.isArray(i) ? [...i].reverse() : [i]), D(n, [e]);
|
|
1192
1192
|
} catch (e) {
|
|
1193
|
-
throw e instanceof
|
|
1193
|
+
throw e instanceof E ? new E(e.code, t, e.message, e.blockId) : e;
|
|
1194
1194
|
}
|
|
1195
1195
|
}), r.reverse();
|
|
1196
1196
|
}
|
|
1197
1197
|
// ../types/src/collaboration.ts
|
|
1198
|
-
function
|
|
1198
|
+
function Lt(e) {
|
|
1199
1199
|
return e === "invalid_operation" ? 422 : e === "content_too_large" ? 413 : 409;
|
|
1200
1200
|
}
|
|
1201
|
-
var
|
|
1201
|
+
var Rt = class extends me {
|
|
1202
1202
|
opIndex;
|
|
1203
1203
|
holder;
|
|
1204
1204
|
holders;
|
|
1205
1205
|
constructor(e, t) {
|
|
1206
|
-
super(e, t.status ??
|
|
1206
|
+
super(e, t.status ?? Lt(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);
|
|
1207
1207
|
}
|
|
1208
1208
|
};
|
|
1209
1209
|
// ../types/src/guards.ts
|
|
1210
|
-
function
|
|
1210
|
+
function zt(e) {
|
|
1211
1211
|
return e.type === "section";
|
|
1212
1212
|
}
|
|
1213
|
-
function
|
|
1213
|
+
function Bt(e) {
|
|
1214
1214
|
return e.type === "title";
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1216
|
+
function Vt(e) {
|
|
1217
1217
|
return e.type === "paragraph";
|
|
1218
1218
|
}
|
|
1219
|
-
function
|
|
1219
|
+
function Ht(e) {
|
|
1220
1220
|
return e.type === "image";
|
|
1221
1221
|
}
|
|
1222
|
-
function
|
|
1222
|
+
function Ut(e) {
|
|
1223
1223
|
return e.type === "button";
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1225
|
+
function Wt(e) {
|
|
1226
1226
|
return e.type === "divider";
|
|
1227
1227
|
}
|
|
1228
|
-
function
|
|
1228
|
+
function Gt(e) {
|
|
1229
1229
|
return e.type === "video";
|
|
1230
1230
|
}
|
|
1231
|
-
function
|
|
1231
|
+
function Kt(e) {
|
|
1232
1232
|
return e.type === "social";
|
|
1233
1233
|
}
|
|
1234
|
-
function
|
|
1234
|
+
function qt(e) {
|
|
1235
1235
|
return e.type === "spacer";
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1237
|
+
function Jt(e) {
|
|
1238
1238
|
return e.type === "html";
|
|
1239
1239
|
}
|
|
1240
|
-
function
|
|
1240
|
+
function Yt(e) {
|
|
1241
1241
|
return e.type === "menu";
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function Xt(e) {
|
|
1244
1244
|
return e.type === "table";
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1246
|
+
function Zt(e) {
|
|
1247
1247
|
return e.type === "countdown";
|
|
1248
1248
|
}
|
|
1249
|
-
function
|
|
1249
|
+
function Qt(e) {
|
|
1250
1250
|
return e.type === "custom";
|
|
1251
1251
|
}
|
|
1252
|
-
function
|
|
1252
|
+
function z(e) {
|
|
1253
1253
|
return e.type === "slot";
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1255
|
+
function B(e) {
|
|
1256
1256
|
return e.type === "wrapper";
|
|
1257
1257
|
}
|
|
1258
1258
|
// ../types/src/defaults.ts
|
|
1259
|
-
var
|
|
1259
|
+
var $t = {
|
|
1260
1260
|
content: "<p>Enter your title</p>",
|
|
1261
1261
|
level: 2,
|
|
1262
1262
|
textAlign: "left"
|
|
1263
|
-
},
|
|
1263
|
+
}, en = { content: "<p>Enter your text here</p>" }, tn = {
|
|
1264
1264
|
src: "",
|
|
1265
1265
|
alt: "",
|
|
1266
1266
|
width: "full",
|
|
1267
1267
|
align: "center"
|
|
1268
|
-
},
|
|
1268
|
+
}, nn = {
|
|
1269
1269
|
text: "Click Here",
|
|
1270
1270
|
url: "",
|
|
1271
1271
|
backgroundColor: "#333333",
|
|
@@ -1279,36 +1279,36 @@ var Zt = {
|
|
|
1279
1279
|
left: 24
|
|
1280
1280
|
},
|
|
1281
1281
|
align: "center"
|
|
1282
|
-
},
|
|
1282
|
+
}, rn = {
|
|
1283
1283
|
lineStyle: "solid",
|
|
1284
1284
|
color: "#e0e0e0",
|
|
1285
1285
|
thickness: 1,
|
|
1286
1286
|
width: "full"
|
|
1287
|
-
},
|
|
1287
|
+
}, an = { columns: "1" }, on = {
|
|
1288
1288
|
url: "",
|
|
1289
1289
|
thumbnailUrl: "",
|
|
1290
1290
|
alt: "Video",
|
|
1291
1291
|
width: "full",
|
|
1292
1292
|
align: "center"
|
|
1293
|
-
},
|
|
1293
|
+
}, sn = {
|
|
1294
1294
|
iconStyle: "solid",
|
|
1295
1295
|
iconSize: "medium",
|
|
1296
1296
|
spacing: 10,
|
|
1297
1297
|
align: "center"
|
|
1298
|
-
},
|
|
1298
|
+
}, cn = { height: 24 }, ln = { content: "" }, un = {
|
|
1299
1299
|
fontSize: 15,
|
|
1300
1300
|
textAlign: "center",
|
|
1301
1301
|
separator: "|",
|
|
1302
1302
|
separatorColor: "#e0e0e0",
|
|
1303
1303
|
spacing: 10
|
|
1304
|
-
},
|
|
1304
|
+
}, dn = {
|
|
1305
1305
|
hasHeaderRow: !0,
|
|
1306
1306
|
borderColor: "#e0e0e0",
|
|
1307
1307
|
borderWidth: 1,
|
|
1308
1308
|
cellPadding: 8,
|
|
1309
1309
|
fontSize: 15,
|
|
1310
1310
|
textAlign: "left"
|
|
1311
|
-
},
|
|
1311
|
+
}, fn = {
|
|
1312
1312
|
targetDate: "",
|
|
1313
1313
|
timezone: "UTC",
|
|
1314
1314
|
showDays: !0,
|
|
@@ -1328,21 +1328,21 @@ var Zt = {
|
|
|
1328
1328
|
expiredMessage: "This offer has expired",
|
|
1329
1329
|
expiredImageUrl: "",
|
|
1330
1330
|
hideOnExpiry: !1
|
|
1331
|
-
},
|
|
1332
|
-
title:
|
|
1333
|
-
paragraph:
|
|
1334
|
-
image:
|
|
1335
|
-
button:
|
|
1336
|
-
divider:
|
|
1337
|
-
section:
|
|
1338
|
-
video:
|
|
1339
|
-
social:
|
|
1340
|
-
spacer:
|
|
1341
|
-
html:
|
|
1342
|
-
menu:
|
|
1343
|
-
table:
|
|
1344
|
-
countdown:
|
|
1345
|
-
},
|
|
1331
|
+
}, pn = {
|
|
1332
|
+
title: $t,
|
|
1333
|
+
paragraph: en,
|
|
1334
|
+
image: tn,
|
|
1335
|
+
button: nn,
|
|
1336
|
+
divider: rn,
|
|
1337
|
+
section: an,
|
|
1338
|
+
video: on,
|
|
1339
|
+
social: sn,
|
|
1340
|
+
spacer: cn,
|
|
1341
|
+
html: ln,
|
|
1342
|
+
menu: un,
|
|
1343
|
+
table: dn,
|
|
1344
|
+
countdown: fn
|
|
1345
|
+
}, mn = {
|
|
1346
1346
|
width: 600,
|
|
1347
1347
|
backgroundColor: "#ffffff",
|
|
1348
1348
|
textColor: "#1a1a1a",
|
|
@@ -1350,30 +1350,30 @@ var Zt = {
|
|
|
1350
1350
|
fontFamily: "Arial",
|
|
1351
1351
|
locale: "en"
|
|
1352
1352
|
};
|
|
1353
|
-
function
|
|
1353
|
+
function hn(e) {
|
|
1354
1354
|
return typeof e == "object" && !!e && !Array.isArray(e) && Object.getPrototypeOf(e) === Object.prototype;
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1356
|
+
function gn(e, t) {
|
|
1357
1357
|
let n = { ...e };
|
|
1358
1358
|
for (let r of Object.keys(t)) {
|
|
1359
1359
|
let i = e[r], a = t[r];
|
|
1360
|
-
a !== void 0 && (n[r] =
|
|
1360
|
+
a !== void 0 && (n[r] = hn(i) && hn(a) ? gn(i, a) : a);
|
|
1361
1361
|
}
|
|
1362
1362
|
return n;
|
|
1363
1363
|
}
|
|
1364
1364
|
// ../types/src/template.ts
|
|
1365
|
-
function
|
|
1365
|
+
function _n(e = "Arial", t) {
|
|
1366
1366
|
return {
|
|
1367
1367
|
blocks: [],
|
|
1368
1368
|
settings: {
|
|
1369
|
-
...
|
|
1369
|
+
...mn,
|
|
1370
1370
|
fontFamily: e,
|
|
1371
1371
|
...t
|
|
1372
1372
|
}
|
|
1373
1373
|
};
|
|
1374
1374
|
}
|
|
1375
1375
|
// ../types/src/direction.ts
|
|
1376
|
-
var
|
|
1376
|
+
var vn = [
|
|
1377
1377
|
"ar",
|
|
1378
1378
|
"he",
|
|
1379
1379
|
"iw",
|
|
@@ -1387,24 +1387,24 @@ var gn = [
|
|
|
1387
1387
|
"ckb",
|
|
1388
1388
|
"ks"
|
|
1389
1389
|
];
|
|
1390
|
-
function
|
|
1390
|
+
function yn(e) {
|
|
1391
1391
|
let t = e?.trim().replace(/_/g, "-").split("-")[0]?.toLowerCase();
|
|
1392
|
-
return !!t &&
|
|
1392
|
+
return !!t && vn.includes(t);
|
|
1393
1393
|
}
|
|
1394
|
-
function
|
|
1395
|
-
return e.direction === "ltr" || e.direction === "rtl" ? e.direction :
|
|
1394
|
+
function bn(e) {
|
|
1395
|
+
return e.direction === "ltr" || e.direction === "rtl" ? e.direction : yn(e.locale) ? "rtl" : "ltr";
|
|
1396
1396
|
}
|
|
1397
1397
|
// ../types/src/translation.ts
|
|
1398
|
-
var
|
|
1399
|
-
function
|
|
1398
|
+
var xn = 2e4, Sn = /* @__PURE__ */ new Set(["\"", "'"]);
|
|
1399
|
+
function V(e, t) {
|
|
1400
1400
|
let n = null, r = "tag";
|
|
1401
1401
|
for (let i = t; i < e.length; i++) {
|
|
1402
1402
|
let t = e[i];
|
|
1403
1403
|
if (n !== null) t === n && (n = null);
|
|
1404
1404
|
else {
|
|
1405
1405
|
if (r === "beforeValue") {
|
|
1406
|
-
if (
|
|
1407
|
-
if (
|
|
1406
|
+
if (H(t)) continue;
|
|
1407
|
+
if (Sn.has(t)) {
|
|
1408
1408
|
n = t, r = "tag";
|
|
1409
1409
|
continue;
|
|
1410
1410
|
}
|
|
@@ -1412,19 +1412,19 @@ function xn(e, t) {
|
|
|
1412
1412
|
}
|
|
1413
1413
|
if (r === "unquotedValue") {
|
|
1414
1414
|
if (t === ">") return i;
|
|
1415
|
-
|
|
1415
|
+
H(t) && (r = "tag");
|
|
1416
1416
|
} else if (t === "=") r = "beforeValue";
|
|
1417
1417
|
else if (t === ">") return i;
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
1420
|
return -1;
|
|
1421
1421
|
}
|
|
1422
|
-
function
|
|
1422
|
+
function Cn(e, t) {
|
|
1423
1423
|
let n = null;
|
|
1424
1424
|
for (let r = t; r < e.length; r++) {
|
|
1425
1425
|
let t = e[r];
|
|
1426
1426
|
if (n !== null) t === n && (n = null);
|
|
1427
|
-
else if (
|
|
1427
|
+
else if (Sn.has(t)) n = t;
|
|
1428
1428
|
else if (t === ">") return {
|
|
1429
1429
|
end: r,
|
|
1430
1430
|
nextSpan: -1
|
|
@@ -1439,13 +1439,13 @@ function Sn(e, t) {
|
|
|
1439
1439
|
nextSpan: -1
|
|
1440
1440
|
};
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1442
|
+
function wn(e) {
|
|
1443
1443
|
return e !== " " && e !== " " && e !== "\n" && e !== "\r" && e !== "\f" && e !== "=" && e !== ">" && e !== "/";
|
|
1444
1444
|
}
|
|
1445
|
-
function
|
|
1445
|
+
function H(e) {
|
|
1446
1446
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
1447
1447
|
}
|
|
1448
|
-
var
|
|
1448
|
+
var Tn = {
|
|
1449
1449
|
AMP: "&",
|
|
1450
1450
|
COPY: "©",
|
|
1451
1451
|
GT: ">",
|
|
@@ -1706,54 +1706,54 @@ var wn = {
|
|
|
1706
1706
|
zwj: "",
|
|
1707
1707
|
zwnj: ""
|
|
1708
1708
|
};
|
|
1709
|
-
function
|
|
1709
|
+
function U(e) {
|
|
1710
1710
|
return e.includes("&") ? e.replace(/&(#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g, (e, t) => {
|
|
1711
1711
|
if (t[0] === "#") {
|
|
1712
1712
|
let n = t[1] === "x" || t[1] === "X" ? Number.parseInt(t.slice(2), 16) : Number.parseInt(t.slice(1), 10);
|
|
1713
1713
|
return !Number.isFinite(n) || n < 1 || n > 1114111 || n >= 55296 && n <= 57343 ? e : String.fromCodePoint(n);
|
|
1714
1714
|
}
|
|
1715
|
-
return Object.hasOwn(
|
|
1715
|
+
return Object.hasOwn(Tn, t) ? Tn[t] : e;
|
|
1716
1716
|
}) : e;
|
|
1717
1717
|
}
|
|
1718
|
-
function
|
|
1718
|
+
function En(e, t) {
|
|
1719
1719
|
let n = t.toLowerCase(), r = 0;
|
|
1720
1720
|
for (; r < e.length;) {
|
|
1721
|
-
for (; r < e.length && (
|
|
1721
|
+
for (; r < e.length && (H(e[r]) || e[r] === "/");) r++;
|
|
1722
1722
|
if (r >= e.length) break;
|
|
1723
1723
|
let t = r;
|
|
1724
|
-
for (; r < e.length &&
|
|
1724
|
+
for (; r < e.length && wn(e[r]);) r++;
|
|
1725
1725
|
let i = e.substring(t, r).toLowerCase();
|
|
1726
1726
|
if (i === "") {
|
|
1727
1727
|
r++;
|
|
1728
1728
|
continue;
|
|
1729
1729
|
}
|
|
1730
|
-
for (; r < e.length &&
|
|
1730
|
+
for (; r < e.length && H(e[r]);) r++;
|
|
1731
1731
|
if (e[r] !== "=") continue;
|
|
1732
|
-
for (r++; r < e.length &&
|
|
1732
|
+
for (r++; r < e.length && H(e[r]);) r++;
|
|
1733
1733
|
let a = e[r];
|
|
1734
|
-
if (
|
|
1734
|
+
if (Sn.has(a)) {
|
|
1735
1735
|
let t = r + 1, o = e.indexOf(a, t);
|
|
1736
1736
|
if (o === -1) return null;
|
|
1737
|
-
if (i === n) return
|
|
1737
|
+
if (i === n) return U(e.substring(t, o));
|
|
1738
1738
|
r = o + 1;
|
|
1739
1739
|
continue;
|
|
1740
1740
|
}
|
|
1741
1741
|
let o = r;
|
|
1742
|
-
for (; r < e.length && !
|
|
1743
|
-
if (i === n) return
|
|
1742
|
+
for (; r < e.length && !H(e[r]) && e[r] !== ">";) r++;
|
|
1743
|
+
if (i === n) return U(e.substring(o, r));
|
|
1744
1744
|
}
|
|
1745
1745
|
return null;
|
|
1746
1746
|
}
|
|
1747
1747
|
// ../types/src/merge-tag-html.ts
|
|
1748
|
-
function
|
|
1749
|
-
return
|
|
1748
|
+
function Dn(e) {
|
|
1749
|
+
return An(e, (e) => e, !1);
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1752
|
-
return
|
|
1751
|
+
function On(e, t) {
|
|
1752
|
+
return An(e, t, !0);
|
|
1753
1753
|
}
|
|
1754
|
-
function
|
|
1754
|
+
function kn(e) {
|
|
1755
1755
|
let t = [];
|
|
1756
|
-
return
|
|
1756
|
+
return An(e, (n, r, i) => {
|
|
1757
1757
|
let a = e.slice(r, i);
|
|
1758
1758
|
return t.push({
|
|
1759
1759
|
start: r,
|
|
@@ -1762,7 +1762,7 @@ function On(e) {
|
|
|
1762
1762
|
}), a;
|
|
1763
1763
|
}, !0), t;
|
|
1764
1764
|
}
|
|
1765
|
-
function
|
|
1765
|
+
function An(e, t, n) {
|
|
1766
1766
|
let r = "", i = 0;
|
|
1767
1767
|
for (; i < e.length;) {
|
|
1768
1768
|
let a = e.indexOf("<span", i);
|
|
@@ -1775,7 +1775,7 @@ function kn(e, t, n) {
|
|
|
1775
1775
|
r += e.substring(i, a + 5), i = a + 5;
|
|
1776
1776
|
continue;
|
|
1777
1777
|
}
|
|
1778
|
-
let { end: s, nextSpan: c } =
|
|
1778
|
+
let { end: s, nextSpan: c } = Cn(e, a + 5);
|
|
1779
1779
|
if (c !== -1) {
|
|
1780
1780
|
r += e.substring(i, c), i = c;
|
|
1781
1781
|
continue;
|
|
@@ -1784,12 +1784,12 @@ function kn(e, t, n) {
|
|
|
1784
1784
|
r += e.substring(i);
|
|
1785
1785
|
break;
|
|
1786
1786
|
}
|
|
1787
|
-
let l = e.substring(a + 5, s), u =
|
|
1787
|
+
let l = e.substring(a + 5, s), u = Mn(l, "data-merge-tag") ?? Mn(l, "data-logic-merge-tag");
|
|
1788
1788
|
if (u === null) {
|
|
1789
1789
|
r += e.substring(i, s + 1), i = s + 1;
|
|
1790
1790
|
continue;
|
|
1791
1791
|
}
|
|
1792
|
-
let d =
|
|
1792
|
+
let d = jn(e, s + 1, n);
|
|
1793
1793
|
if (d === -1) {
|
|
1794
1794
|
r += e.substring(i);
|
|
1795
1795
|
break;
|
|
@@ -1798,7 +1798,7 @@ function kn(e, t, n) {
|
|
|
1798
1798
|
}
|
|
1799
1799
|
return r;
|
|
1800
1800
|
}
|
|
1801
|
-
function
|
|
1801
|
+
function jn(e, t, n) {
|
|
1802
1802
|
if (!n) {
|
|
1803
1803
|
let n = e.indexOf("</span>", t);
|
|
1804
1804
|
return n === -1 ? -1 : n + 7;
|
|
@@ -1807,7 +1807,7 @@ function An(e, t, n) {
|
|
|
1807
1807
|
for (; i < e.length;) {
|
|
1808
1808
|
let t = e.indexOf("<", i);
|
|
1809
1809
|
if (t === -1) return -1;
|
|
1810
|
-
let n =
|
|
1810
|
+
let n = V(e, t + 1);
|
|
1811
1811
|
if (n === -1) return -1;
|
|
1812
1812
|
let a = e.startsWith("</span", t), o = e.startsWith("<span", t), s = e[t + (a ? 6 : 5)];
|
|
1813
1813
|
if ((o || a) && (s === ">" || s === "/" || /\s/.test(s)) && (r += a ? -1 : 1, r === 0)) return n + 1;
|
|
@@ -1815,11 +1815,11 @@ function An(e, t, n) {
|
|
|
1815
1815
|
}
|
|
1816
1816
|
return -1;
|
|
1817
1817
|
}
|
|
1818
|
-
function
|
|
1819
|
-
return
|
|
1818
|
+
function Mn(e, t) {
|
|
1819
|
+
return En(e, t);
|
|
1820
1820
|
}
|
|
1821
1821
|
// ../types/src/merge-tags.ts
|
|
1822
|
-
var
|
|
1822
|
+
var W = {
|
|
1823
1823
|
liquid: {
|
|
1824
1824
|
value: /\{\{.+?\}\}/g,
|
|
1825
1825
|
logic: /\{%-?\s*(\w+).*?-?%\}/g,
|
|
@@ -1845,7 +1845,13 @@ var G = {
|
|
|
1845
1845
|
closer: "=%%"
|
|
1846
1846
|
}
|
|
1847
1847
|
};
|
|
1848
|
-
function
|
|
1848
|
+
function G(e) {
|
|
1849
|
+
return Object.keys(W).find((t) => {
|
|
1850
|
+
let n = W[t];
|
|
1851
|
+
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, ""));
|
|
1852
|
+
});
|
|
1853
|
+
}
|
|
1854
|
+
function Nn(e, t, n) {
|
|
1849
1855
|
for (let r = n; r < e.length; r++) {
|
|
1850
1856
|
let n = e.charCodeAt(r);
|
|
1851
1857
|
if (n === 10 || n === 13 || n === 8232 || n === 8233) return {
|
|
@@ -1863,7 +1869,7 @@ function Mn(e, t, n) {
|
|
|
1863
1869
|
};
|
|
1864
1870
|
}
|
|
1865
1871
|
function K(e, t, n, r = 0, i = Infinity) {
|
|
1866
|
-
let a =
|
|
1872
|
+
let a = G(t);
|
|
1867
1873
|
if (!a) {
|
|
1868
1874
|
let a = t[n], o = new RegExp(a.source, a.flags.replace(/[gy]/g, "") + "g");
|
|
1869
1875
|
return o.lastIndex = r, [...e.matchAll(o)].slice(0, i).map((e) => ({
|
|
@@ -1887,7 +1893,7 @@ function K(e, t, n, r = 0, i = Infinity) {
|
|
|
1887
1893
|
let r = u?.lastIndex ?? t + s.length, i = a === "mailchimp" && n === "value" ? {
|
|
1888
1894
|
close: e.startsWith(c, r) ? r : -1,
|
|
1889
1895
|
lineBreak: -1
|
|
1890
|
-
} :
|
|
1896
|
+
} : Nn(e, c, Math.max(r, t + s.length + +(n === "value")));
|
|
1891
1897
|
if (i.lineBreak >= 0) {
|
|
1892
1898
|
let r = i.lineBreak, o = n === "logic" && (a === "liquid" || a === "ampscript") ? e.lastIndexOf(s, r) : -1;
|
|
1893
1899
|
p = o > t ? o : r + 1;
|
|
@@ -1909,16 +1915,17 @@ function K(e, t, n, r = 0, i = Infinity) {
|
|
|
1909
1915
|
}
|
|
1910
1916
|
return f;
|
|
1911
1917
|
}
|
|
1912
|
-
function
|
|
1913
|
-
|
|
1918
|
+
function Pn(e, t) {
|
|
1919
|
+
let n = G(t);
|
|
1920
|
+
if (!n) {
|
|
1914
1921
|
let n = RegExp(`(${t.value.source}|${t.logic.source})`, "g");
|
|
1915
1922
|
return [...e.matchAll(n)].map((e) => ({
|
|
1916
1923
|
index: e.index,
|
|
1917
1924
|
value: e[0]
|
|
1918
1925
|
}));
|
|
1919
1926
|
}
|
|
1920
|
-
if (
|
|
1921
|
-
if (
|
|
1927
|
+
if (n === "handlebars") return K(e, t, "value");
|
|
1928
|
+
if (n === "mailchimp") {
|
|
1922
1929
|
let n = [], r = new RegExp(t.value.source, "y"), i = new RegExp(t.logic.source, "y"), a = /\*\|\w+[:|]/y, o = 0;
|
|
1923
1930
|
for (; o < e.length;) {
|
|
1924
1931
|
let t = e.indexOf("*|", o);
|
|
@@ -1936,7 +1943,7 @@ function Nn(e, t) {
|
|
|
1936
1943
|
o = t + 2;
|
|
1937
1944
|
continue;
|
|
1938
1945
|
}
|
|
1939
|
-
let c =
|
|
1946
|
+
let c = Nn(e, "|*", a.lastIndex);
|
|
1940
1947
|
if (c.lineBreak >= 0) {
|
|
1941
1948
|
o = c.lineBreak + 1;
|
|
1942
1949
|
continue;
|
|
@@ -1951,78 +1958,78 @@ function Nn(e, t) {
|
|
|
1951
1958
|
}
|
|
1952
1959
|
return n;
|
|
1953
1960
|
}
|
|
1954
|
-
let
|
|
1955
|
-
for (;
|
|
1956
|
-
let
|
|
1957
|
-
|
|
1961
|
+
let r = [], i = 0, a = K(e, t, "value", i, 1)[0], o = K(e, t, "logic", i, 1)[0];
|
|
1962
|
+
for (; a || o;) {
|
|
1963
|
+
let n = !o || a && a.index <= o.index ? a : o;
|
|
1964
|
+
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]);
|
|
1958
1965
|
}
|
|
1959
|
-
return
|
|
1960
|
-
}
|
|
1961
|
-
function Pn(e) {
|
|
1962
|
-
return typeof e == "string" && e.trim() !== "" ? e : null;
|
|
1966
|
+
return r;
|
|
1963
1967
|
}
|
|
1964
1968
|
function Fn(e) {
|
|
1965
|
-
return
|
|
1969
|
+
return typeof e == "string" && e.trim() !== "" ? e : null;
|
|
1966
1970
|
}
|
|
1967
1971
|
function In(e) {
|
|
1968
|
-
return
|
|
1972
|
+
return Object.values(W).find((t) => t.value.source === e.value.source) ?? null;
|
|
1969
1973
|
}
|
|
1970
1974
|
function Ln(e) {
|
|
1971
|
-
return
|
|
1975
|
+
return Fn(e.opener) ?? In(e)?.opener ?? null;
|
|
1972
1976
|
}
|
|
1973
1977
|
function Rn(e) {
|
|
1974
|
-
return e
|
|
1978
|
+
return Fn(e.closer) ?? In(e)?.closer ?? null;
|
|
1975
1979
|
}
|
|
1976
1980
|
function zn(e) {
|
|
1981
|
+
return e ? typeof e == "string" ? W[e] ?? W.liquid : e : W.liquid;
|
|
1982
|
+
}
|
|
1983
|
+
function Bn(e) {
|
|
1977
1984
|
let t = e.source, n = e.flags.replace("g", "");
|
|
1978
1985
|
return RegExp(`^${t}$`, n);
|
|
1979
1986
|
}
|
|
1980
|
-
function
|
|
1987
|
+
function Vn(e, t) {
|
|
1981
1988
|
let n = e?.trim() || "";
|
|
1982
|
-
return !
|
|
1989
|
+
return !Bn(t.logic).test(n) && Bn(t.value).test(n);
|
|
1983
1990
|
}
|
|
1984
|
-
function
|
|
1991
|
+
function Hn(e, t) {
|
|
1985
1992
|
let n = t.find((t) => t.value === e);
|
|
1986
1993
|
return n ? n.label : e;
|
|
1987
1994
|
}
|
|
1988
|
-
function Hn(e, t) {
|
|
1989
|
-
return Qn(e, "data-merge-tag", (e) => Vn(e, t));
|
|
1990
|
-
}
|
|
1991
1995
|
function Un(e, t) {
|
|
1992
|
-
return
|
|
1996
|
+
return $n(e, "data-merge-tag", (e) => Hn(e, t));
|
|
1993
1997
|
}
|
|
1994
1998
|
function Wn(e, t) {
|
|
1995
|
-
return
|
|
1999
|
+
return t.find((t) => t.value === e)?.sample;
|
|
2000
|
+
}
|
|
2001
|
+
function Gn(e, t) {
|
|
2002
|
+
return $n(e, "data-merge-tag", (e) => Jn(Wn(e, t) ?? Hn(e, t)), { unwrap: (e) => Wn(e, t) !== void 0 });
|
|
1996
2003
|
}
|
|
1997
|
-
function
|
|
2004
|
+
function Kn(e) {
|
|
1998
2005
|
return e.some((e) => e.sample !== void 0);
|
|
1999
2006
|
}
|
|
2000
|
-
function
|
|
2007
|
+
function qn(e, t) {
|
|
2001
2008
|
if (!e) return e;
|
|
2002
2009
|
let n = e;
|
|
2003
2010
|
for (let e of t) e.sample !== void 0 && (n = n.split(e.value).join(e.sample));
|
|
2004
2011
|
return n;
|
|
2005
2012
|
}
|
|
2006
|
-
function
|
|
2013
|
+
function Jn(e) {
|
|
2007
2014
|
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
2008
2015
|
}
|
|
2009
|
-
function
|
|
2016
|
+
function Yn(e, t) {
|
|
2010
2017
|
if (!e) return !1;
|
|
2011
|
-
if (
|
|
2018
|
+
if (G(t)) return K(e, t, "value", 0, 1).length > 0 || K(e, t, "logic", 0, 1).length > 0;
|
|
2012
2019
|
let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
|
|
2013
2020
|
return n.test(e) || r.test(e);
|
|
2014
2021
|
}
|
|
2015
|
-
function Yn(e, t) {
|
|
2016
|
-
return zn(t.logic).test(e?.trim() || "");
|
|
2017
|
-
}
|
|
2018
2022
|
function Xn(e, t) {
|
|
2023
|
+
return Bn(t.logic).test(e?.trim() || "");
|
|
2024
|
+
}
|
|
2025
|
+
function Zn(e, t) {
|
|
2019
2026
|
let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
|
|
2020
2027
|
return r && r[1] ? r[1].toUpperCase() : e;
|
|
2021
2028
|
}
|
|
2022
|
-
function
|
|
2023
|
-
return
|
|
2029
|
+
function Qn(e, t) {
|
|
2030
|
+
return $n(e, "data-logic-merge-tag", (e) => Zn(e, t));
|
|
2024
2031
|
}
|
|
2025
|
-
function
|
|
2032
|
+
function $n(e, t, n, r) {
|
|
2026
2033
|
let i = "", a = 0;
|
|
2027
2034
|
for (; a < e.length;) {
|
|
2028
2035
|
let o = e.indexOf("<span", a);
|
|
@@ -2035,7 +2042,7 @@ function Qn(e, t, n, r) {
|
|
|
2035
2042
|
i += e.substring(a, o + 5), a = o + 5;
|
|
2036
2043
|
continue;
|
|
2037
2044
|
}
|
|
2038
|
-
let { end: c, nextSpan: l } =
|
|
2045
|
+
let { end: c, nextSpan: l } = Cn(e, o + 5);
|
|
2039
2046
|
if (l !== -1) {
|
|
2040
2047
|
i += e.substring(a, l), a = l;
|
|
2041
2048
|
continue;
|
|
@@ -2044,7 +2051,7 @@ function Qn(e, t, n, r) {
|
|
|
2044
2051
|
i += e.substring(a);
|
|
2045
2052
|
break;
|
|
2046
2053
|
}
|
|
2047
|
-
let u =
|
|
2054
|
+
let u = En(e.substring(o + 5, c), t);
|
|
2048
2055
|
if (u === null) {
|
|
2049
2056
|
i += e.substring(a, c + 1), a = c + 1;
|
|
2050
2057
|
continue;
|
|
@@ -2060,14 +2067,14 @@ function Qn(e, t, n, r) {
|
|
|
2060
2067
|
return i;
|
|
2061
2068
|
}
|
|
2062
2069
|
// ../types/src/locale-strings.ts
|
|
2063
|
-
var
|
|
2070
|
+
var er = {
|
|
2064
2071
|
title: ["content"],
|
|
2065
2072
|
paragraph: ["content"]
|
|
2066
2073
|
};
|
|
2067
|
-
function
|
|
2074
|
+
function tr(e) {
|
|
2068
2075
|
let t = [], n = /<[a-z][\w:-]*\b/gi;
|
|
2069
2076
|
for (; n.exec(e);) {
|
|
2070
|
-
let r =
|
|
2077
|
+
let r = V(e, n.lastIndex);
|
|
2071
2078
|
if (r < 0) break;
|
|
2072
2079
|
let i = n.lastIndex, a = e.slice(i, r), o = /[^\s"'<>/=]+\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'=<>`]+))/g;
|
|
2073
2080
|
for (let e; e = o.exec(a);) {
|
|
@@ -2081,17 +2088,17 @@ function er(e) {
|
|
|
2081
2088
|
}
|
|
2082
2089
|
return t;
|
|
2083
2090
|
}
|
|
2084
|
-
function
|
|
2085
|
-
let r = n === "html" ?
|
|
2091
|
+
function nr(e, t, n) {
|
|
2092
|
+
let r = n === "html" ? kn(e) : [], i = n === "html" ? tr(e) : [], a = r.map((e) => ({
|
|
2086
2093
|
...e,
|
|
2087
2094
|
attribute: !1
|
|
2088
|
-
})), o = 0, s = (n, r) => {
|
|
2089
|
-
let
|
|
2090
|
-
for (; f <
|
|
2091
|
-
let e =
|
|
2095
|
+
})), o = 0, s = G(t) !== void 0, c = (n, r) => {
|
|
2096
|
+
let c = e.slice(n, r), l = ["logic", "value"], u = s ? l.map((e) => K(c, t, e, 0, 1)[0]) : null, d = s ? null : [t.logic, t.value].map((e) => new RegExp(e.source, e.flags.replace(/[gy]/g, "") + "g")), f = 0;
|
|
2097
|
+
for (; f < c.length;) {
|
|
2098
|
+
let e = s ? u.flatMap((e) => e ? [e] : []) : d.flatMap((e) => {
|
|
2092
2099
|
e.lastIndex = f;
|
|
2093
|
-
let t = e.exec(
|
|
2094
|
-
for (; t && t[0].length === 0;) e.lastIndex = t.index + 1, t = e.exec(
|
|
2100
|
+
let t = e.exec(c);
|
|
2101
|
+
for (; t && t[0].length === 0;) e.lastIndex = t.index + 1, t = e.exec(c);
|
|
2095
2102
|
return t ? [{
|
|
2096
2103
|
index: t.index,
|
|
2097
2104
|
value: t[0]
|
|
@@ -2100,27 +2107,27 @@ function tr(e, t, n) {
|
|
|
2100
2107
|
e.sort((e, t) => e.index - t.index || e.value.length - t.value.length);
|
|
2101
2108
|
let r = e[0];
|
|
2102
2109
|
if (!r) break;
|
|
2103
|
-
let p = n + r.index,
|
|
2110
|
+
let p = n + r.index, m = p + r.value.length;
|
|
2104
2111
|
for (; i[o]?.end <= p;) o++;
|
|
2105
2112
|
if (a.push({
|
|
2106
2113
|
start: p,
|
|
2107
|
-
end:
|
|
2114
|
+
end: m,
|
|
2108
2115
|
markup: r.value,
|
|
2109
|
-
attribute: i[o] !== void 0 && p >= i[o].start &&
|
|
2110
|
-
}), f = r.index + r.value.length,
|
|
2116
|
+
attribute: i[o] !== void 0 && p >= i[o].start && m <= i[o].end
|
|
2117
|
+
}), 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]);
|
|
2111
2118
|
}
|
|
2112
|
-
},
|
|
2113
|
-
for (let e of r)
|
|
2114
|
-
return
|
|
2119
|
+
}, l = 0;
|
|
2120
|
+
for (let e of r) c(l, e.start), l = e.end;
|
|
2121
|
+
return c(l, e.length), a.sort((e, t) => e.start - t.start);
|
|
2115
2122
|
}
|
|
2116
|
-
function
|
|
2123
|
+
function rr(e) {
|
|
2117
2124
|
if (!e.includes("&")) return { text: e };
|
|
2118
2125
|
let t = "", n = [0], r = 0, i = (i) => {
|
|
2119
2126
|
for (t += e.slice(r, i); r < i;) n.push(++r);
|
|
2120
2127
|
};
|
|
2121
2128
|
for (let a of e.matchAll(/&(?:#[0-9]+|#[xX][0-9a-fA-F]+|[a-zA-Z][a-zA-Z0-9]*);/g)) {
|
|
2122
2129
|
i(a.index);
|
|
2123
|
-
let e =
|
|
2130
|
+
let e = U(a[0]);
|
|
2124
2131
|
t += e;
|
|
2125
2132
|
for (let t = 1; t < e.length; t++) n.push(-1);
|
|
2126
2133
|
r = a.index + a[0].length, n.push(r);
|
|
@@ -2130,17 +2137,17 @@ function nr(e) {
|
|
|
2130
2137
|
offsets: n
|
|
2131
2138
|
};
|
|
2132
2139
|
}
|
|
2133
|
-
var q = /* @__PURE__ */ new Map(),
|
|
2134
|
-
function
|
|
2140
|
+
var q = /* @__PURE__ */ new Map(), ir = 32;
|
|
2141
|
+
function ar(e) {
|
|
2135
2142
|
let t = JSON.stringify(e), n = q.get(t);
|
|
2136
2143
|
if (n === void 0) {
|
|
2137
2144
|
let r = e.map((e) => e.trim()).filter(Boolean).sort((e, t) => t.length - e.length).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
|
|
2138
|
-
n = r.length ? RegExp(`(?<![\\p{L}\\p{N}_])(?:${r.join("|")})(?![\\p{L}\\p{N}_])`, "gu") : null, q.size >=
|
|
2145
|
+
n = r.length ? RegExp(`(?<![\\p{L}\\p{N}_])(?:${r.join("|")})(?![\\p{L}\\p{N}_])`, "gu") : null, q.size >= ir && q.delete(q.keys().next().value), q.set(t, n);
|
|
2139
2146
|
}
|
|
2140
2147
|
return n;
|
|
2141
2148
|
}
|
|
2142
|
-
function
|
|
2143
|
-
let r = n.length ?
|
|
2149
|
+
function or(e, t, n) {
|
|
2150
|
+
let r = n.length ? ar(n) : null;
|
|
2144
2151
|
if (!r) return [];
|
|
2145
2152
|
let i = [];
|
|
2146
2153
|
if (t === "text") i.push({
|
|
@@ -2149,7 +2156,7 @@ function ar(e, t, n) {
|
|
|
2149
2156
|
attribute: !1
|
|
2150
2157
|
});
|
|
2151
2158
|
else {
|
|
2152
|
-
i.push(...
|
|
2159
|
+
i.push(...tr(e).map((e) => ({
|
|
2153
2160
|
...e,
|
|
2154
2161
|
attribute: !0
|
|
2155
2162
|
})));
|
|
@@ -2160,7 +2167,7 @@ function ar(e, t, n) {
|
|
|
2160
2167
|
end: r.index,
|
|
2161
2168
|
attribute: !1
|
|
2162
2169
|
});
|
|
2163
|
-
let a = r[0] === "<!--" ? e.indexOf("-->", t.lastIndex) :
|
|
2170
|
+
let a = r[0] === "<!--" ? e.indexOf("-->", t.lastIndex) : V(e, t.lastIndex);
|
|
2164
2171
|
if (a < 0) return [];
|
|
2165
2172
|
n = a + (r[0] === "<!--" ? 3 : 1), t.lastIndex = n;
|
|
2166
2173
|
}
|
|
@@ -2173,7 +2180,7 @@ function ar(e, t, n) {
|
|
|
2173
2180
|
let a = [];
|
|
2174
2181
|
for (let n of i) {
|
|
2175
2182
|
r.lastIndex = 0;
|
|
2176
|
-
let i = e.slice(n.start, n.end), o = t === "html" ?
|
|
2183
|
+
let i = e.slice(n.start, n.end), o = t === "html" ? rr(i) : {
|
|
2177
2184
|
text: i,
|
|
2178
2185
|
offsets: void 0
|
|
2179
2186
|
};
|
|
@@ -2192,51 +2199,51 @@ function ar(e, t, n) {
|
|
|
2192
2199
|
}
|
|
2193
2200
|
return a;
|
|
2194
2201
|
}
|
|
2195
|
-
function
|
|
2196
|
-
let i =
|
|
2202
|
+
function sr(e, t, n, r) {
|
|
2203
|
+
let i = nr(e, t, n), a = or(e, n, r?.doNotTranslate ?? []).filter((e) => !i.some((t) => e.start < t.end && e.end > t.start));
|
|
2197
2204
|
return [...i, ...a].sort((e, t) => e.start - t.start);
|
|
2198
2205
|
}
|
|
2199
|
-
function
|
|
2206
|
+
function cr(e, t, n) {
|
|
2200
2207
|
let r = "", i = 0;
|
|
2201
2208
|
return t.forEach((t, a) => {
|
|
2202
2209
|
r += e.slice(i, t.start), r += t.attribute ? `__x${n[a]}__` : `<x id="${n[a]}"/>`, i = t.end;
|
|
2203
2210
|
}), r + e.slice(i);
|
|
2204
2211
|
}
|
|
2205
|
-
function
|
|
2206
|
-
let i =
|
|
2212
|
+
function lr(e, t, n, r) {
|
|
2213
|
+
let i = sr(e, t, n, r);
|
|
2207
2214
|
return {
|
|
2208
|
-
text:
|
|
2215
|
+
text: cr(e, i, i.map((e, t) => t + 1)),
|
|
2209
2216
|
tokens: i.map((e) => e.markup)
|
|
2210
2217
|
};
|
|
2211
2218
|
}
|
|
2212
|
-
function
|
|
2219
|
+
function ur(e, t) {
|
|
2213
2220
|
let n = /* @__PURE__ */ new Set(), r = !0, i = e.replace(/<x id="(\d+)"\s*\/>|<x id="(\d+)"><\/x>|__x(\d+)__/g, (e, i, a, o) => {
|
|
2214
2221
|
let s = Number(i ?? a ?? o);
|
|
2215
2222
|
return (s < 1 || s > t.length || n.has(s)) && (r = !1), n.add(s), t[s - 1] ?? "";
|
|
2216
2223
|
});
|
|
2217
2224
|
return r && n.size === t.length ? i : null;
|
|
2218
2225
|
}
|
|
2219
|
-
function
|
|
2220
|
-
let a =
|
|
2226
|
+
function dr(e, t, n, r, i) {
|
|
2227
|
+
let a = sr(e, n, r, i), o = /* @__PURE__ */ new Set(), s = (e) => {
|
|
2221
2228
|
let n = t.findIndex((t, n) => !o.has(n) && e(t));
|
|
2222
2229
|
return n >= 0 && o.add(n), n;
|
|
2223
2230
|
}, c = a.map((e) => s((t) => t === e.markup));
|
|
2224
2231
|
return a.forEach((e, t) => {
|
|
2225
|
-
c[t] < 0 && e.term !== void 0 && r === "html" && (c[t] = s((t) =>
|
|
2226
|
-
}), o.size !== t.length || a.some((e, t) => c[t] < 0 && e.term === void 0) ? null :
|
|
2232
|
+
c[t] < 0 && e.term !== void 0 && r === "html" && (c[t] = s((t) => U(t) === e.term));
|
|
2233
|
+
}), o.size !== t.length || a.some((e, t) => c[t] < 0 && e.term === void 0) ? null : cr(e, a.filter((e, t) => c[t] >= 0), c.filter((e) => e >= 0).map((e) => e + 1));
|
|
2227
2234
|
}
|
|
2228
|
-
function
|
|
2235
|
+
function fr(e, t, n = []) {
|
|
2229
2236
|
let r = /* @__PURE__ */ new Map();
|
|
2230
|
-
if (t ===
|
|
2237
|
+
if (t === T(e) || !e.settings.locales?.includes(t)) return r;
|
|
2231
2238
|
let i = (e, n, i, a) => {
|
|
2232
2239
|
let o = n.l10n?.[t];
|
|
2233
2240
|
for (let t of i) {
|
|
2234
|
-
let i =
|
|
2241
|
+
let i = b(n, t);
|
|
2235
2242
|
typeof i != "string" || i === "" || Object.keys(o?.set ?? {}).some((e) => e === t || t.startsWith(`${e}.`)) || r.set(`${e.kind === "block" ? e.blockId : "settings"}/${t}`, {
|
|
2236
2243
|
target: e,
|
|
2237
2244
|
path: t,
|
|
2238
2245
|
source: i,
|
|
2239
|
-
format: a &&
|
|
2246
|
+
format: a && er[a]?.includes(t) ? "html" : "text",
|
|
2240
2247
|
text: o?.text?.[t]
|
|
2241
2248
|
});
|
|
2242
2249
|
}
|
|
@@ -2249,13 +2256,13 @@ function dr(e, t, n = []) {
|
|
|
2249
2256
|
else r.type === "wrapper" && a(r.children);
|
|
2250
2257
|
}
|
|
2251
2258
|
};
|
|
2252
|
-
return a(e.blocks), i({ kind: "settings" }, e.settings,
|
|
2259
|
+
return a(e.blocks), i({ kind: "settings" }, e.settings, _), r;
|
|
2253
2260
|
}
|
|
2254
|
-
function
|
|
2255
|
-
let r = n.only === "all" ? null :
|
|
2256
|
-
for (let [r, s] of
|
|
2261
|
+
function pr(e, t, n) {
|
|
2262
|
+
let r = n.only === "all" ? null : Ae(e, t, n.definitions), i = r && /* @__PURE__ */ new Set([...r.missing, ...r.stale]), a = [], o = {};
|
|
2263
|
+
for (let [r, s] of fr(e, t, n.definitions)) {
|
|
2257
2264
|
if (i && !i.has(r) || n.blockId !== void 0 && (s.target.kind !== "block" || s.target.blockId !== n.blockId)) continue;
|
|
2258
|
-
let e =
|
|
2265
|
+
let e = lr(s.source, n.syntax, s.format, n), t = s.text ? dr(s.text.value, e.tokens, n.syntax, s.format, n) : void 0;
|
|
2259
2266
|
a.push({
|
|
2260
2267
|
id: r,
|
|
2261
2268
|
format: s.format,
|
|
@@ -2269,8 +2276,8 @@ function fr(e, t, n) {
|
|
|
2269
2276
|
tokens: o
|
|
2270
2277
|
};
|
|
2271
2278
|
}
|
|
2272
|
-
function
|
|
2273
|
-
let i =
|
|
2279
|
+
function mr(e, t, n, r) {
|
|
2280
|
+
let i = fr(e, t, r.definitions), a = /* @__PURE__ */ new Map(), o = (e) => {
|
|
2274
2281
|
for (let t of e) if (a.set(t.id, t), t.type === "section") for (let e of t.children) o(e);
|
|
2275
2282
|
else t.type === "wrapper" && o(t.children);
|
|
2276
2283
|
};
|
|
@@ -2282,12 +2289,12 @@ function pr(e, t, n, r) {
|
|
|
2282
2289
|
let n = t.id.lastIndexOf("/"), r = t.id.slice(0, n), i = r === "settings" ? [a.get(r), e.settings] : [a.get(r)];
|
|
2283
2290
|
l.push({
|
|
2284
2291
|
id: t.id,
|
|
2285
|
-
reason: n < 0 || !i.some((e) => e &&
|
|
2292
|
+
reason: n < 0 || !i.some((e) => e && b(e, t.id.slice(n + 1)) !== void 0) ? "unknown_field" : "not_translatable"
|
|
2286
2293
|
});
|
|
2287
2294
|
continue;
|
|
2288
2295
|
}
|
|
2289
|
-
let o = Object.hasOwn(r.tokens, t.id) ? r.tokens[t.id] : void 0, u = o ?
|
|
2290
|
-
if (!o || u === null ||
|
|
2296
|
+
let o = Object.hasOwn(r.tokens, t.id) ? r.tokens[t.id] : void 0, u = o ? ur(t.text, o) : null;
|
|
2297
|
+
if (!o || u === null || dr(u, o, r.syntax, n.format, r) === null) {
|
|
2291
2298
|
l.push({
|
|
2292
2299
|
id: t.id,
|
|
2293
2300
|
reason: "tags_changed"
|
|
@@ -2317,7 +2324,7 @@ function pr(e, t, n, r) {
|
|
|
2317
2324
|
};
|
|
2318
2325
|
}
|
|
2319
2326
|
// ../types/src/custom-block-liquid.ts
|
|
2320
|
-
function
|
|
2327
|
+
function hr(e) {
|
|
2321
2328
|
return new e.Liquid({
|
|
2322
2329
|
strictVariables: !1,
|
|
2323
2330
|
strictFilters: !1,
|
|
@@ -2327,16 +2334,16 @@ function mr(e) {
|
|
|
2327
2334
|
}
|
|
2328
2335
|
// ../types/src/factory.ts
|
|
2329
2336
|
function J(e, t) {
|
|
2330
|
-
let n =
|
|
2331
|
-
return !t || Object.keys(t).length === 0 ? n :
|
|
2337
|
+
let n = h(e);
|
|
2338
|
+
return !t || Object.keys(t).length === 0 ? n : gn(n, t);
|
|
2332
2339
|
}
|
|
2333
2340
|
function Y(e) {
|
|
2334
|
-
return e === void 0 ? void 0 :
|
|
2341
|
+
return e === void 0 ? void 0 : h(e);
|
|
2335
2342
|
}
|
|
2336
2343
|
function X() {
|
|
2337
2344
|
return crypto.randomUUID();
|
|
2338
2345
|
}
|
|
2339
|
-
function
|
|
2346
|
+
function gr(e = 0) {
|
|
2340
2347
|
return {
|
|
2341
2348
|
top: e,
|
|
2342
2349
|
right: e,
|
|
@@ -2345,100 +2352,100 @@ function hr(e = 0) {
|
|
|
2345
2352
|
};
|
|
2346
2353
|
}
|
|
2347
2354
|
function Z(e = 10) {
|
|
2348
|
-
return { padding:
|
|
2355
|
+
return { padding: gr(e) };
|
|
2349
2356
|
}
|
|
2350
|
-
function
|
|
2357
|
+
function _r(e = {}) {
|
|
2351
2358
|
return J({
|
|
2352
2359
|
id: X(),
|
|
2353
2360
|
type: "title",
|
|
2354
|
-
|
|
2361
|
+
...$t,
|
|
2355
2362
|
styles: Z()
|
|
2356
2363
|
}, e);
|
|
2357
2364
|
}
|
|
2358
|
-
function
|
|
2365
|
+
function vr(e = {}) {
|
|
2359
2366
|
return J({
|
|
2360
2367
|
id: X(),
|
|
2361
2368
|
type: "paragraph",
|
|
2362
|
-
...
|
|
2369
|
+
...en,
|
|
2363
2370
|
styles: Z()
|
|
2364
2371
|
}, e);
|
|
2365
2372
|
}
|
|
2366
|
-
function
|
|
2373
|
+
function yr(e = {}) {
|
|
2367
2374
|
return J({
|
|
2368
2375
|
id: X(),
|
|
2369
2376
|
type: "image",
|
|
2370
|
-
|
|
2377
|
+
...tn,
|
|
2371
2378
|
styles: Z()
|
|
2372
2379
|
}, e);
|
|
2373
2380
|
}
|
|
2374
|
-
function
|
|
2381
|
+
function br(e = {}) {
|
|
2375
2382
|
return J({
|
|
2376
2383
|
id: X(),
|
|
2377
2384
|
type: "button",
|
|
2378
|
-
...
|
|
2385
|
+
...nn,
|
|
2379
2386
|
styles: Z()
|
|
2380
2387
|
}, e);
|
|
2381
2388
|
}
|
|
2382
|
-
function
|
|
2389
|
+
function xr(e = {}) {
|
|
2383
2390
|
return J({
|
|
2384
2391
|
id: X(),
|
|
2385
2392
|
type: "divider",
|
|
2386
|
-
...
|
|
2393
|
+
...rn,
|
|
2387
2394
|
styles: Z(20)
|
|
2388
2395
|
}, e);
|
|
2389
2396
|
}
|
|
2390
|
-
function
|
|
2397
|
+
function Sr(e = {}) {
|
|
2391
2398
|
return J({
|
|
2392
2399
|
id: X(),
|
|
2393
2400
|
type: "section",
|
|
2394
|
-
...
|
|
2401
|
+
...an,
|
|
2395
2402
|
children: [[]],
|
|
2396
2403
|
styles: Z(20)
|
|
2397
2404
|
}, e);
|
|
2398
2405
|
}
|
|
2399
|
-
function
|
|
2406
|
+
function Cr(e = {}) {
|
|
2400
2407
|
return J({
|
|
2401
2408
|
id: X(),
|
|
2402
2409
|
type: "video",
|
|
2403
|
-
...
|
|
2410
|
+
...on,
|
|
2404
2411
|
styles: Z()
|
|
2405
2412
|
}, e);
|
|
2406
2413
|
}
|
|
2407
|
-
function
|
|
2414
|
+
function wr(e = {}) {
|
|
2408
2415
|
return J({
|
|
2409
2416
|
id: X(),
|
|
2410
2417
|
type: "social",
|
|
2411
2418
|
icons: [],
|
|
2412
|
-
...
|
|
2419
|
+
...sn,
|
|
2413
2420
|
styles: Z()
|
|
2414
2421
|
}, e);
|
|
2415
2422
|
}
|
|
2416
|
-
function
|
|
2423
|
+
function Tr(e = {}) {
|
|
2417
2424
|
return J({
|
|
2418
2425
|
id: X(),
|
|
2419
2426
|
type: "spacer",
|
|
2420
|
-
...
|
|
2427
|
+
...cn,
|
|
2421
2428
|
styles: Z(0)
|
|
2422
2429
|
}, e);
|
|
2423
2430
|
}
|
|
2424
|
-
function
|
|
2431
|
+
function Er(e = {}) {
|
|
2425
2432
|
return J({
|
|
2426
2433
|
id: X(),
|
|
2427
2434
|
type: "html",
|
|
2428
|
-
...
|
|
2435
|
+
...ln,
|
|
2429
2436
|
styles: Z()
|
|
2430
2437
|
}, e);
|
|
2431
2438
|
}
|
|
2432
|
-
function
|
|
2439
|
+
function Dr(e = {}) {
|
|
2433
2440
|
return J({
|
|
2434
2441
|
id: X(),
|
|
2435
2442
|
type: "menu",
|
|
2436
2443
|
items: [],
|
|
2437
|
-
...
|
|
2444
|
+
...un,
|
|
2438
2445
|
styles: Z()
|
|
2439
2446
|
}, e);
|
|
2440
2447
|
}
|
|
2441
|
-
function
|
|
2448
|
+
function Or(e, t) {
|
|
2442
2449
|
return Array.from({ length: t }, () => ({
|
|
2443
2450
|
id: X(),
|
|
2444
2451
|
cells: Array.from({ length: e }, () => ({
|
|
@@ -2447,29 +2454,29 @@ function Dr(e, t) {
|
|
|
2447
2454
|
}))
|
|
2448
2455
|
}));
|
|
2449
2456
|
}
|
|
2450
|
-
function
|
|
2457
|
+
function kr(e = {}) {
|
|
2451
2458
|
return J({
|
|
2452
2459
|
id: X(),
|
|
2453
2460
|
type: "table",
|
|
2454
|
-
rows:
|
|
2455
|
-
...
|
|
2461
|
+
rows: Or(3, 3),
|
|
2462
|
+
...dn,
|
|
2456
2463
|
styles: Z()
|
|
2457
2464
|
}, e);
|
|
2458
2465
|
}
|
|
2459
|
-
function
|
|
2466
|
+
function Ar(e = {}) {
|
|
2460
2467
|
return J({
|
|
2461
2468
|
id: X(),
|
|
2462
2469
|
type: "countdown",
|
|
2463
|
-
...
|
|
2470
|
+
...fn,
|
|
2464
2471
|
styles: Z()
|
|
2465
2472
|
}, e);
|
|
2466
2473
|
}
|
|
2467
|
-
function
|
|
2474
|
+
function jr(e) {
|
|
2468
2475
|
return e.type === "repeatable" ? e.default ?? [] : e.type === "boolean" ? e.default ?? !1 : e.type === "number" ? e.default ?? 0 : e.default ?? "";
|
|
2469
2476
|
}
|
|
2470
|
-
function
|
|
2477
|
+
function Mr(e) {
|
|
2471
2478
|
let t = {};
|
|
2472
|
-
for (let n of e.fields) t[n.key] = Y(
|
|
2479
|
+
for (let n of e.fields) t[n.key] = Y(jr(n));
|
|
2473
2480
|
let n = J(Z(), Y(e.defaultStyles));
|
|
2474
2481
|
return {
|
|
2475
2482
|
id: X(),
|
|
@@ -2480,14 +2487,14 @@ function jr(e) {
|
|
|
2480
2487
|
...e.dataSource ? { dataSourceFetched: !1 } : {}
|
|
2481
2488
|
};
|
|
2482
2489
|
}
|
|
2483
|
-
function
|
|
2490
|
+
function Nr() {
|
|
2484
2491
|
return {
|
|
2485
2492
|
id: X(),
|
|
2486
2493
|
type: "slot",
|
|
2487
2494
|
styles: Z(0)
|
|
2488
2495
|
};
|
|
2489
2496
|
}
|
|
2490
|
-
function
|
|
2497
|
+
function Pr(e = {}) {
|
|
2491
2498
|
return J({
|
|
2492
2499
|
id: X(),
|
|
2493
2500
|
type: "wrapper",
|
|
@@ -2495,27 +2502,27 @@ function Nr(e = {}) {
|
|
|
2495
2502
|
styles: Z(0)
|
|
2496
2503
|
}, e);
|
|
2497
2504
|
}
|
|
2498
|
-
function
|
|
2505
|
+
function Fr(e, t) {
|
|
2499
2506
|
switch (e) {
|
|
2500
|
-
case "section": return
|
|
2501
|
-
case "title": return
|
|
2502
|
-
case "paragraph": return
|
|
2503
|
-
case "image": return
|
|
2504
|
-
case "button": return
|
|
2505
|
-
case "divider": return
|
|
2506
|
-
case "video": return
|
|
2507
|
-
case "social": return
|
|
2508
|
-
case "spacer": return
|
|
2509
|
-
case "html": return
|
|
2510
|
-
case "menu": return
|
|
2511
|
-
case "table": return
|
|
2512
|
-
case "countdown": return
|
|
2507
|
+
case "section": return Sr(Y(t?.section));
|
|
2508
|
+
case "title": return _r(Y(t?.title));
|
|
2509
|
+
case "paragraph": return vr(Y(t?.paragraph));
|
|
2510
|
+
case "image": return yr(Y(t?.image));
|
|
2511
|
+
case "button": return br(Y(t?.button));
|
|
2512
|
+
case "divider": return xr(Y(t?.divider));
|
|
2513
|
+
case "video": return Cr(Y(t?.video));
|
|
2514
|
+
case "social": return wr(Y(t?.social));
|
|
2515
|
+
case "spacer": return Tr(Y(t?.spacer));
|
|
2516
|
+
case "html": return Er(Y(t?.html));
|
|
2517
|
+
case "menu": return Dr(Y(t?.menu));
|
|
2518
|
+
case "table": return kr(Y(t?.table));
|
|
2519
|
+
case "countdown": return Ar(Y(t?.countdown));
|
|
2513
2520
|
case "slot": throw Error("[Templatical] slot cannot be inserted into content. Use createSlotBlock() to build a layout.");
|
|
2514
2521
|
case "wrapper": throw Error("[Templatical] wrapper cannot be inserted into content. Use createWrapperBlock() to build a layout.");
|
|
2515
2522
|
default: throw Error(`Unknown block type: ${e}`);
|
|
2516
2523
|
}
|
|
2517
2524
|
}
|
|
2518
|
-
function
|
|
2525
|
+
function Ir(e, t) {
|
|
2519
2526
|
let n = e.l10n;
|
|
2520
2527
|
if (!n || t.size === 0) return;
|
|
2521
2528
|
let r = (n) => {
|
|
@@ -2545,86 +2552,86 @@ function Q(e) {
|
|
|
2545
2552
|
}
|
|
2546
2553
|
if (t.type === "menu") for (let e of t.items) r(e, "items");
|
|
2547
2554
|
if (t.type === "social") for (let e of t.icons) r(e, "icons");
|
|
2548
|
-
return t.type === "section" && (t.children = t.children.map((e) => e.map((e) => Q(e)))), t.type === "wrapper" && (t.children = t.children.map((e) => Q(e))),
|
|
2555
|
+
return t.type === "section" && (t.children = t.children.map((e) => e.map((e) => Q(e)))), t.type === "wrapper" && (t.children = t.children.map((e) => Q(e))), Ir(t, n), t;
|
|
2549
2556
|
}
|
|
2550
2557
|
// ../types/src/layout.ts
|
|
2551
|
-
var
|
|
2558
|
+
var Lr = "[Templatical] layout: must contain exactly one slot block", Rr = "[Templatical] layout: slot must be a top-level or wrapper child, not nested in a section", zr = "[Templatical] layout: a wrapper cannot contain a wrapper", Br = "[Templatical] layout: a wrapper around the slot cannot contain blocks that emit mj-wrapper (section.wrapper)", Vr = "[Templatical] slot is not a valid content block", Hr = "[Templatical] wrapper is not a valid content block";
|
|
2552
2559
|
function $(e, t, n = null, r = !1) {
|
|
2553
|
-
for (let i of e) if (t(i, n, r),
|
|
2554
|
-
else
|
|
2560
|
+
for (let i of e) if (t(i, n, r), zt(i)) for (let e of i.children) $(e, t, i, !0);
|
|
2561
|
+
else B(i) && $(i.children, t, i, r);
|
|
2555
2562
|
}
|
|
2556
|
-
function
|
|
2563
|
+
function Ur(e) {
|
|
2557
2564
|
let t = 0;
|
|
2558
2565
|
if ($(e.blocks, (e, n, r) => {
|
|
2559
|
-
if (
|
|
2560
|
-
if (
|
|
2561
|
-
if (r) throw Error(
|
|
2562
|
-
if (e.children.some(
|
|
2566
|
+
if (z(e) && (t += 1, r)) throw Error(Rr);
|
|
2567
|
+
if (B(e)) {
|
|
2568
|
+
if (r) throw Error(Rr);
|
|
2569
|
+
if (e.children.some(B)) throw Error(zr);
|
|
2563
2570
|
}
|
|
2564
|
-
}), t !== 1) throw Error(
|
|
2571
|
+
}), t !== 1) throw Error(Lr);
|
|
2565
2572
|
}
|
|
2566
|
-
function
|
|
2573
|
+
function Wr(e) {
|
|
2567
2574
|
$(e.blocks, (e) => {
|
|
2568
|
-
if (
|
|
2575
|
+
if (z(e)) throw Error(Vr);
|
|
2569
2576
|
});
|
|
2570
2577
|
}
|
|
2571
|
-
function
|
|
2578
|
+
function Gr(e) {
|
|
2572
2579
|
$(e.blocks, (e) => {
|
|
2573
|
-
if (
|
|
2580
|
+
if (B(e)) throw Error(Hr);
|
|
2574
2581
|
});
|
|
2575
2582
|
}
|
|
2576
|
-
function
|
|
2583
|
+
function Kr(e) {
|
|
2577
2584
|
let t = !1;
|
|
2578
2585
|
return $(e.blocks, (e, n) => {
|
|
2579
|
-
|
|
2586
|
+
z(e) && n !== null && B(n) && (t = !0);
|
|
2580
2587
|
}), t;
|
|
2581
2588
|
}
|
|
2582
|
-
function
|
|
2583
|
-
if (
|
|
2584
|
-
if (
|
|
2589
|
+
function qr(e) {
|
|
2590
|
+
if (z(e)) return e;
|
|
2591
|
+
if (B(e)) {
|
|
2585
2592
|
let t = Q({
|
|
2586
2593
|
...e,
|
|
2587
2594
|
children: []
|
|
2588
2595
|
});
|
|
2589
|
-
return t.children = e.children.map(
|
|
2596
|
+
return t.children = e.children.map(qr), t;
|
|
2590
2597
|
}
|
|
2591
2598
|
return Q(e);
|
|
2592
2599
|
}
|
|
2593
|
-
function
|
|
2600
|
+
function Jr(e) {
|
|
2594
2601
|
for (let t = 0; t < e.length; t++) {
|
|
2595
2602
|
let n = e[t];
|
|
2596
|
-
if (
|
|
2603
|
+
if (z(n)) return {
|
|
2597
2604
|
parent: e,
|
|
2598
2605
|
index: t
|
|
2599
2606
|
};
|
|
2600
|
-
if (
|
|
2601
|
-
let e =
|
|
2607
|
+
if (B(n)) {
|
|
2608
|
+
let e = Jr(n.children);
|
|
2602
2609
|
if (e) return e;
|
|
2603
2610
|
}
|
|
2604
2611
|
}
|
|
2605
2612
|
return null;
|
|
2606
2613
|
}
|
|
2607
|
-
function
|
|
2608
|
-
for (let t of e) if (
|
|
2614
|
+
function Yr(e) {
|
|
2615
|
+
for (let t of e) if (zt(t)) {
|
|
2609
2616
|
if (t.wrapper) return !0;
|
|
2610
|
-
for (let e of t.children) if (
|
|
2617
|
+
for (let e of t.children) if (Yr(e)) return !0;
|
|
2611
2618
|
}
|
|
2612
2619
|
return !1;
|
|
2613
2620
|
}
|
|
2614
|
-
function
|
|
2615
|
-
if (
|
|
2616
|
-
let n = e.blocks.map(
|
|
2617
|
-
if (!r) throw Error(
|
|
2618
|
-
return r.parent.splice(r.index, 1, ...
|
|
2621
|
+
function Xr(e, t) {
|
|
2622
|
+
if (Ur(e), Wr(t), Gr(t), Kr(e) && Yr(t.blocks)) throw Error(Br);
|
|
2623
|
+
let n = e.blocks.map(qr), r = Jr(n);
|
|
2624
|
+
if (!r) throw Error(Lr);
|
|
2625
|
+
return r.parent.splice(r.index, 1, ...h(t.blocks)), {
|
|
2619
2626
|
blocks: n,
|
|
2620
2627
|
settings: {
|
|
2621
|
-
...
|
|
2628
|
+
...h(t.settings),
|
|
2622
2629
|
backgroundColor: e.settings.backgroundColor
|
|
2623
2630
|
}
|
|
2624
2631
|
};
|
|
2625
2632
|
}
|
|
2626
2633
|
// ../types/src/url-policy.ts
|
|
2627
|
-
var
|
|
2634
|
+
var Zr = Object.freeze([
|
|
2628
2635
|
"http",
|
|
2629
2636
|
"https",
|
|
2630
2637
|
"mailto",
|
|
@@ -2634,44 +2641,44 @@ var Xr = Object.freeze([
|
|
|
2634
2641
|
"sms",
|
|
2635
2642
|
"xmpp",
|
|
2636
2643
|
"cid"
|
|
2637
|
-
]),
|
|
2644
|
+
]), Qr = Object.freeze([
|
|
2638
2645
|
"javascript",
|
|
2639
2646
|
"data",
|
|
2640
2647
|
"vbscript"
|
|
2641
2648
|
]);
|
|
2642
|
-
function
|
|
2649
|
+
function $r(e) {
|
|
2643
2650
|
return e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2644
2651
|
}
|
|
2645
|
-
function
|
|
2646
|
-
let t = /^([a-z][a-z0-9+.-]*):/i.exec(
|
|
2652
|
+
function ei(e) {
|
|
2653
|
+
let t = /^([a-z][a-z0-9+.-]*):/i.exec($r(e));
|
|
2647
2654
|
return t ? t[1].toLowerCase() : null;
|
|
2648
2655
|
}
|
|
2649
|
-
var
|
|
2656
|
+
var ti = /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i, ni = Object.freeze([
|
|
2650
2657
|
"href",
|
|
2651
2658
|
"xlink:href",
|
|
2652
2659
|
"background",
|
|
2653
2660
|
"poster",
|
|
2654
2661
|
"src"
|
|
2655
|
-
]),
|
|
2662
|
+
]), ri = Object.freeze([
|
|
2656
2663
|
"srcdoc",
|
|
2657
2664
|
"ping",
|
|
2658
2665
|
"formaction",
|
|
2659
2666
|
"action"
|
|
2660
2667
|
]);
|
|
2661
|
-
function
|
|
2662
|
-
let n =
|
|
2663
|
-
return r === null ||
|
|
2668
|
+
function ii(e, t) {
|
|
2669
|
+
let n = $r(e), r = ei(n);
|
|
2670
|
+
return r === null || Zr.some((e) => e === r) ? !0 : t.toLowerCase() === "src" && ti.test(n);
|
|
2664
2671
|
}
|
|
2665
2672
|
// ../types/src/rich-text.ts
|
|
2666
|
-
var
|
|
2667
|
-
function oi(e) {
|
|
2668
|
-
return e.replace(ii, "").trim() === "";
|
|
2669
|
-
}
|
|
2673
|
+
var ai = /<\/?p\b[^<>]*>/gi, oi = /<p\b([^<>]*)>\s*<\/p>/gi;
|
|
2670
2674
|
function si(e) {
|
|
2671
|
-
return
|
|
2675
|
+
return e.replace(ai, "").trim() === "";
|
|
2676
|
+
}
|
|
2677
|
+
function ci(e) {
|
|
2678
|
+
return si(e) ? e : e.replace(oi, "<p$1> </p>");
|
|
2672
2679
|
}
|
|
2673
2680
|
// ../types/src/fonts.ts
|
|
2674
|
-
var
|
|
2681
|
+
var li = {
|
|
2675
2682
|
arial: "Arial, sans-serif",
|
|
2676
2683
|
helvetica: "Helvetica, sans-serif",
|
|
2677
2684
|
georgia: "Georgia, serif",
|
|
@@ -2680,13 +2687,13 @@ var ci = {
|
|
|
2680
2687
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2681
2688
|
"courier new": "'Courier New', monospace",
|
|
2682
2689
|
tahoma: "Tahoma, sans-serif"
|
|
2683
|
-
},
|
|
2690
|
+
}, ui = /* @__PURE__ */ new Set([
|
|
2684
2691
|
"inherit",
|
|
2685
2692
|
"initial",
|
|
2686
2693
|
"unset",
|
|
2687
2694
|
"revert",
|
|
2688
2695
|
"revert-layer"
|
|
2689
|
-
]),
|
|
2696
|
+
]), di = /* @__PURE__ */ new Set([
|
|
2690
2697
|
"serif",
|
|
2691
2698
|
"sans-serif",
|
|
2692
2699
|
"monospace",
|
|
@@ -2701,14 +2708,14 @@ var ci = {
|
|
|
2701
2708
|
"math",
|
|
2702
2709
|
"fangsong"
|
|
2703
2710
|
]);
|
|
2704
|
-
function
|
|
2711
|
+
function fi(e) {
|
|
2705
2712
|
return e === " " || e === " " || e === "\n" || e === "\r" || e === "\f";
|
|
2706
2713
|
}
|
|
2707
|
-
function
|
|
2714
|
+
function pi(e) {
|
|
2708
2715
|
if (typeof e != "string") return [];
|
|
2709
2716
|
let t = e.replace(/!\s*important\s*$/i, ""), n = [], r = 0;
|
|
2710
2717
|
for (;;) {
|
|
2711
|
-
for (; r < t.length &&
|
|
2718
|
+
for (; r < t.length && fi(t[r]);) r++;
|
|
2712
2719
|
if (r >= t.length) return [];
|
|
2713
2720
|
let e = t[r];
|
|
2714
2721
|
if (e === "\"" || e === "'") {
|
|
@@ -2725,7 +2732,7 @@ function fi(e) {
|
|
|
2725
2732
|
}
|
|
2726
2733
|
}
|
|
2727
2734
|
if (!o) return [];
|
|
2728
|
-
for (; a < t.length &&
|
|
2735
|
+
for (; a < t.length && fi(t[a]);) a++;
|
|
2729
2736
|
if (a < t.length && t[a] !== ",") return [];
|
|
2730
2737
|
n.push({
|
|
2731
2738
|
name: i,
|
|
@@ -2733,7 +2740,7 @@ function fi(e) {
|
|
|
2733
2740
|
}), r = a;
|
|
2734
2741
|
} else {
|
|
2735
2742
|
let e = t.indexOf(",", r), i = e === -1 ? t.length : e, a = t.slice(r, i).trim().split(/\s+/).join(" ");
|
|
2736
|
-
if (a === "" || a.includes("\"") || a.includes("'") ||
|
|
2743
|
+
if (a === "" || a.includes("\"") || a.includes("'") || ui.has(a.toLowerCase())) return [];
|
|
2737
2744
|
n.push({
|
|
2738
2745
|
name: a,
|
|
2739
2746
|
quoted: !1
|
|
@@ -2743,27 +2750,27 @@ function fi(e) {
|
|
|
2743
2750
|
r++;
|
|
2744
2751
|
}
|
|
2745
2752
|
}
|
|
2746
|
-
function pi(e) {
|
|
2747
|
-
return `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
2748
|
-
}
|
|
2749
2753
|
function mi(e) {
|
|
2750
|
-
return
|
|
2754
|
+
return `'${e.replace(/\\/g, "\\\\").replace(/'/g, "\\'")}'`;
|
|
2751
2755
|
}
|
|
2752
2756
|
function hi(e) {
|
|
2753
|
-
return
|
|
2757
|
+
return !e.quoted && di.has(e.name.toLowerCase());
|
|
2758
|
+
}
|
|
2759
|
+
function gi(e) {
|
|
2760
|
+
return pi(e)[0]?.name ?? "";
|
|
2754
2761
|
}
|
|
2755
|
-
function
|
|
2756
|
-
let n = (e) => `${
|
|
2762
|
+
function _i(e, t) {
|
|
2763
|
+
let n = (e) => `${mi(e.name)}, ${e.fallback ?? t.defaultFallback}`, r = typeof e == "string" ? e.trim().toLowerCase() : "", i = t.customFonts.find((e) => e.name.toLowerCase() === r);
|
|
2757
2764
|
if (i) return n(i);
|
|
2758
|
-
let a =
|
|
2765
|
+
let a = pi(e);
|
|
2759
2766
|
if (a.length !== 1) return e;
|
|
2760
2767
|
let [o] = a, s = o.name.toLowerCase(), c = t.customFonts.find((e) => e.name.toLowerCase() === s);
|
|
2761
|
-
return c ? n(c) :
|
|
2768
|
+
return c ? n(c) : li[s] || (hi(o) ? e : `${mi(o.name)}, ${t.defaultFallback}`);
|
|
2762
2769
|
}
|
|
2763
2770
|
// ../types/src/preview-resolution.ts
|
|
2764
|
-
function
|
|
2771
|
+
function vi(e) {
|
|
2765
2772
|
return typeof e != "object" || !e ? !1 : Array.isArray(e.blocks);
|
|
2766
2773
|
}
|
|
2767
|
-
export {
|
|
2774
|
+
export { Qn as $, C as $t, wr as A, Gt as At, pr as B, Me as Bt, xr as C, o as Cn, Vt as Ct, vr as D, qt as Dt, Dr as E, Kt as Et, Pr as F, Le as Ft, Zn as G, we as Gt, W as H, ge as Ht, X as I, D as It, Rn as J, Ee as Jt, Hn as K, Ae as Kt, hr as L, Fe as Lt, kr as M, Rt as Mt, _r as N, It as Nt, Sr as O, Xt as Ot, Cr as P, E as Pt, Vn as Q, ke as Qt, er as R, Ie as Rt, Mr as S, r as Sn, Yt as St, yr as T, z as Tt, G as U, y as Ut, ur as V, T as Vt, Yn as W, xe as Wt, Kn as X, Se as Xt, Ln as Y, be as Yt, Xn as Z, b as Zt, Ur as _, e as _n, Zt as _t, ci as a, le as an, qn as at, br as b, c as bn, Jt as bt, ri as c, ue as cn, U as ct, ei as d, d as dn, bn as dt, S as en, Un as et, ii as f, f as fn, _n as ft, Kr as g, i as gn, Ut as gt, Gr as h, ee as hn, gn as ht, _i as i, ae as in, Gn as it, Tr as j, B as jt, Nr as k, Bt as kt, ni as l, ie as ln, V as lt, Wr as m, m as mn, mn as mt, gi as n, g as nn, Pn as nt, si as o, ce as on, Dn as ot, Xr as p, p as pn, pn as pt, Wn as q, je as qt, pi as r, h as rn, K as rt, Qr as s, de as sn, On as st, vi as t, me as tn, zn as tt, Zr as u, ne as un, xn as ut, Q as v, s as vn, Qt as vt, Er as w, t as wn, zt as wt, Ar as x, n as xn, Ht as xt, Fr as y, l as yn, Wt as yt, mr as z, _ as zt };
|
|
2768
2775
|
|
|
2769
|
-
//# sourceMappingURL=src-
|
|
2776
|
+
//# sourceMappingURL=src-mXG-Of9A.js.map
|