@templatical/editor 0.57.2 → 0.59.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-B4cg0jQG.js → AiAltTextPopover-CwyKz_9U.js} +3 -3
- package/dist/{AiAltTextReview-Dni8I9eV.js → AiAltTextReview-DNFnR1PN.js} +2 -2
- package/dist/{AiChatPanel-QWqGhy2s.js → AiChatPanel-DWWVvJIP.js} +3 -3
- package/dist/{AiPanels-DE2ysIV1.js → AiPanels-CESbBB63.js} +1 -1
- package/dist/{AiRewriteMenu-B25gpnip.js → AiRewriteMenu-CjXiI-n4.js} +5 -5
- package/dist/{BlockIssueBadge-Ri7dQhuz.js → BlockIssueBadge-3k568_Od.js} +2 -2
- package/dist/{BlockPreviewCanvas-yr5MmQql.js → BlockPreviewCanvas-3FzYSsPm.js} +6 -6
- package/dist/{CloudHeaderExtras-CJsXi4Ku.js → CloudHeaderExtras-xrHubAHL.js} +1 -1
- package/dist/{CloudPanels-ZOR9By8W.js → CloudPanels-CSFN-eLV.js} +3 -3
- package/dist/{CollaborationNotices-COS_YvTq.js → CollaborationNotices-D9GQ477K.js} +1 -1
- package/dist/{CollaboratorBar-jq6HH0fb.js → CollaboratorBar-DsRjAaqd.js} +1 -1
- package/dist/{CommentsPanel-B0_Ob2vO.js → CommentsPanel-lb-IFzjl.js} +1 -1
- package/dist/{CommentsSidebar-DFoLon5D.js → CommentsSidebar-CVVTCWBH.js} +3 -3
- package/dist/{CountdownBlock-BrR2uqM3.js → CountdownBlock-CSEq79Nc.js} +2 -2
- package/dist/{CountdownToolbar-BtP0n0yZ.js → CountdownToolbar-BV9yQi9k.js} +5 -5
- package/dist/{IssuesPanel-CarJYQFu.js → IssuesPanel-pxcWAQJM.js} +5 -5
- package/dist/{LanguageMenu-confz89v.js → LanguageMenu-CEKRbNhA.js} +5 -5
- package/dist/{LocaleNotices-D8aE167E.js → LocaleNotices-j4aMFfmc.js} +2 -2
- package/dist/{LogicTagInsertButton-DFL3kvGK.js → LogicTagInsertButton-BDIsyl3C.js} +96 -96
- package/dist/{MergeTagInput-BuGJeeyA.js → MergeTagInput-De1yWoc2.js} +2 -2
- package/dist/{MergeTagModeToggle-D7482NZf.js → MergeTagModeToggle-CL96pI1E.js} +2 -2
- package/dist/{MergeTagTextarea-Qt9_NeY4.js → MergeTagTextarea-DDyV8U44.js} +4 -4
- package/dist/{ParagraphEditor-Cd-CBE_l.js → ParagraphEditor-Vz90-hhN.js} +9 -9
- package/dist/{RestoreVersionDialog-Clh4l0Bn.js → RestoreVersionDialog-BgrtpVl1.js} +3 -3
- package/dist/{RichTextEditorContent-Dw_Z9zhi.js → RichTextEditorContent-C2Yj1-ZA.js} +5 -5
- package/dist/{SaveBlockDialog-kboYvk_a.js → SaveBlockDialog-DRvLFKWJ.js} +11 -11
- package/dist/{SavedBlocksBrowserModal-wVGMC6My.js → SavedBlocksBrowserModal-Dw0uF-NT.js} +7 -7
- package/dist/{SavedBlocksPanels-C9AHYfYR.js → SavedBlocksPanels-BReNi8sg.js} +1 -1
- package/dist/{SavedBlocksPickBar-CVbV5MVL.js → SavedBlocksPickBar-BQX4g7OE.js} +3 -3
- package/dist/{TemplateSettings-ChCm5_2b.js → TemplateSettings-CBCaybvd.js} +5 -5
- package/dist/TestEmailModal-BiCUiRFo.js +240 -0
- package/dist/{TestEmailPanel-7Ua54CYL.js → TestEmailPanel-Bfr-sGrI.js} +1 -1
- package/dist/{TitleEditor-DXMOgW-9.js → TitleEditor-B8thQPgg.js} +7 -7
- package/dist/{Toolbar-CVHJl6i4.js → Toolbar-FIYSw3Us.js} +438 -438
- package/dist/{TplModal-BErE8I3p.js → TplModal-BIqO0owX.js} +3 -3
- package/dist/{VersionHistoryMenu-P3P00KqQ.js → VersionHistoryMenu-6jMve6By.js} +2 -2
- package/dist/{VersionHistoryPanels-DES1b1Pq.js → VersionHistoryPanels-C91mfsMA.js} +1 -1
- package/dist/{VersionPreviewBanner-D2TtR9I5.js → VersionPreviewBanner-Bq8z1SUc.js} +2 -2
- package/dist/{WrapperBlock-B1zI7POT.js → WrapperBlock-BAqgP8hm.js} +3 -3
- package/dist/{blockTypeIcons-Dp540i74.js → blockTypeIcons-VX_8UQ21.js} +1 -1
- package/dist/bundle-stats.json +8 -8
- package/dist/{ca-BJn8lcJx.js → ca-YfIxwO1G.js} +1 -0
- package/dist/cdn/chunks/{AiAltTextPopover-sx3bmRiV.js → AiAltTextPopover-Dj-VLU88.js} +4 -4
- package/dist/cdn/chunks/{AiAltTextPopover-sx3bmRiV.js.map → AiAltTextPopover-Dj-VLU88.js.map} +1 -1
- package/dist/cdn/chunks/{AiAltTextReview-Cj3PKInZ.js → AiAltTextReview-tVkJPOk6.js} +3 -3
- package/dist/cdn/chunks/{AiAltTextReview-Cj3PKInZ.js.map → AiAltTextReview-tVkJPOk6.js.map} +1 -1
- package/dist/cdn/chunks/{AiChatPanel-DibkqrqY.js → AiChatPanel-CYPvHQGQ.js} +4 -4
- package/dist/cdn/chunks/{AiChatPanel-DibkqrqY.js.map → AiChatPanel-CYPvHQGQ.js.map} +1 -1
- package/dist/cdn/chunks/{AiPanels-DVs4r8sY.js → AiPanels-ChTLCmMS.js} +2 -2
- package/dist/cdn/chunks/{AiPanels-DVs4r8sY.js.map → AiPanels-ChTLCmMS.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-BbZ9NRoe.js → AiRewriteMenu-99qbfCZI.js} +6 -6
- package/dist/cdn/chunks/{AiRewriteMenu-BbZ9NRoe.js.map → AiRewriteMenu-99qbfCZI.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-BWIth1y6.js → BlockIssueBadge-BKO4Mr8f.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-BWIth1y6.js.map → BlockIssueBadge-BKO4Mr8f.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-BDZ6pMHq.js → BlockPreviewCanvas-BF0yCTKP.js} +7 -7
- package/dist/cdn/chunks/{BlockPreviewCanvas-BDZ6pMHq.js.map → BlockPreviewCanvas-BF0yCTKP.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-CazfMn6A.js → CloudHeaderExtras-O_K3jmgO.js} +2 -2
- package/dist/cdn/chunks/{CloudHeaderExtras-CazfMn6A.js.map → CloudHeaderExtras-O_K3jmgO.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-BI_hJwcJ.js → CloudPanels-gV2WFHQk.js} +4 -4
- package/dist/cdn/chunks/{CloudPanels-BI_hJwcJ.js.map → CloudPanels-gV2WFHQk.js.map} +1 -1
- package/dist/cdn/chunks/{CollaborationNotices-yKOt4o7B.js → CollaborationNotices-CwAoa-73.js} +2 -2
- package/dist/cdn/chunks/{CollaborationNotices-yKOt4o7B.js.map → CollaborationNotices-CwAoa-73.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-D5fycyLP.js → CollaboratorBar-DdQQwtwd.js} +2 -2
- package/dist/cdn/chunks/{CollaboratorBar-D5fycyLP.js.map → CollaboratorBar-DdQQwtwd.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-BPoa1lBK.js → CommentsPanel-C8AKtxiG.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-BPoa1lBK.js.map → CommentsPanel-C8AKtxiG.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-DLn9qWtv.js → CommentsSidebar-FxY0RHSq.js} +4 -4
- package/dist/cdn/chunks/{CommentsSidebar-DLn9qWtv.js.map → CommentsSidebar-FxY0RHSq.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-Do6oItNW.js → CountdownBlock-DGgnPUlu.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-Do6oItNW.js.map → CountdownBlock-DGgnPUlu.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-D5_QBuhO.js → CountdownToolbar-9PtYUgCW.js} +6 -6
- package/dist/cdn/chunks/{CountdownToolbar-D5_QBuhO.js.map → CountdownToolbar-9PtYUgCW.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-BzVpxRkq.js → IssuesPanel-Co-ffgWa.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-BzVpxRkq.js.map → IssuesPanel-Co-ffgWa.js.map} +1 -1
- package/dist/cdn/chunks/{LanguageMenu-GEbUX5Oe.js → LanguageMenu-fL4DRGGQ.js} +6 -6
- package/dist/cdn/chunks/{LanguageMenu-GEbUX5Oe.js.map → LanguageMenu-fL4DRGGQ.js.map} +1 -1
- package/dist/cdn/chunks/{LocaleNotices-CWRS_G-4.js → LocaleNotices-BVDJ7kyj.js} +3 -3
- package/dist/cdn/chunks/{LocaleNotices-CWRS_G-4.js.map → LocaleNotices-BVDJ7kyj.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-CrkAz1t_.js → LogicTagInsertButton-DPYA8LJW.js} +9 -9
- package/dist/cdn/chunks/{LogicTagInsertButton-CrkAz1t_.js.map → LogicTagInsertButton-DPYA8LJW.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-DkCATtfE.js → MergeTagInput-Cxfjq3tx.js} +3 -3
- package/dist/cdn/chunks/{MergeTagInput-DkCATtfE.js.map → MergeTagInput-Cxfjq3tx.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-DYAFxyoB.js → MergeTagModeToggle-BmNGV3yc.js} +3 -3
- package/dist/cdn/chunks/{MergeTagModeToggle-DYAFxyoB.js.map → MergeTagModeToggle-BmNGV3yc.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagTextarea-DRS6pXSE.js → MergeTagTextarea-DmwrPAss.js} +5 -5
- package/dist/cdn/chunks/{MergeTagTextarea-DRS6pXSE.js.map → MergeTagTextarea-DmwrPAss.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-rEdKBett.js → ParagraphEditor-A_OEuQ1Q.js} +10 -10
- package/dist/cdn/chunks/{ParagraphEditor-rEdKBett.js.map → ParagraphEditor-A_OEuQ1Q.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-B7eTijWD.js → RestoreVersionDialog-Ca_lUsk4.js} +4 -4
- package/dist/cdn/chunks/{RestoreVersionDialog-B7eTijWD.js.map → RestoreVersionDialog-Ca_lUsk4.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-EtUIYzHB.js → RichTextEditorContent-Dq4TROOg.js} +6 -6
- package/dist/cdn/chunks/{RichTextEditorContent-EtUIYzHB.js.map → RichTextEditorContent-Dq4TROOg.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BquE_Brz.js → SaveBlockDialog-BXRCqrZX.js} +12 -12
- package/dist/cdn/chunks/{SaveBlockDialog-BquE_Brz.js.map → SaveBlockDialog-BXRCqrZX.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal--fNlId5y.js → SavedBlocksBrowserModal-DdaBcSOI.js} +7 -7
- package/dist/cdn/chunks/{SavedBlocksBrowserModal--fNlId5y.js.map → SavedBlocksBrowserModal-DdaBcSOI.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-0Z0dELDm.js → SavedBlocksPanels-BcVFZDKI.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-0Z0dELDm.js.map → SavedBlocksPanels-BcVFZDKI.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-yezZxZeP.js → SavedBlocksPickBar-o66PhlTo.js} +4 -4
- package/dist/cdn/chunks/{SavedBlocksPickBar-yezZxZeP.js.map → SavedBlocksPickBar-o66PhlTo.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-DFetnT9P.js → TemplateSettings-uoiUkd2l.js} +6 -6
- package/dist/cdn/chunks/{TemplateSettings-DFetnT9P.js.map → TemplateSettings-uoiUkd2l.js.map} +1 -1
- package/dist/cdn/chunks/TestEmailModal-WOC7bmF_.js +239 -0
- package/dist/cdn/chunks/TestEmailModal-WOC7bmF_.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-C2dxmmoW.js → TestEmailPanel-DUWH9xsZ.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-C2dxmmoW.js.map → TestEmailPanel-DUWH9xsZ.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-Bq62I2SC.js → TitleEditor-EHW0lgG4.js} +7 -7
- package/dist/cdn/chunks/{TitleEditor-Bq62I2SC.js.map → TitleEditor-EHW0lgG4.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-CwmW8wAI.js → Toolbar-BzAuH2G4.js} +19 -19
- package/dist/cdn/chunks/{Toolbar-CwmW8wAI.js.map → Toolbar-BzAuH2G4.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-DE6BniBg.js → TplModal-B9DVglkN.js} +4 -4
- package/dist/cdn/chunks/{TplModal-DE6BniBg.js.map → TplModal-B9DVglkN.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-BBYU71Ua.js → VersionHistoryMenu-DDqYMqC2.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryMenu-BBYU71Ua.js.map → VersionHistoryMenu-DDqYMqC2.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-mMMqnf3O.js → VersionHistoryPanels-DO-kcL28.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-mMMqnf3O.js.map → VersionHistoryPanels-DO-kcL28.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-tBz-3lGg.js → VersionPreviewBanner-CYT5QUoc.js} +3 -3
- package/dist/cdn/chunks/{VersionPreviewBanner-tBz-3lGg.js.map → VersionPreviewBanner-CYT5QUoc.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-B9XxtFql.js → WrapperBlock-CyD_pW18.js} +4 -4
- package/dist/cdn/chunks/{WrapperBlock-B9XxtFql.js.map → WrapperBlock-CyD_pW18.js.map} +1 -1
- package/dist/cdn/chunks/{ca-BJn8lcJx.js → ca-YfIxwO1G.js} +2 -1
- package/dist/cdn/chunks/{ca-BJn8lcJx.js.map → ca-YfIxwO1G.js.map} +1 -1
- package/dist/cdn/chunks/{composables-CkthyXi9.js → composables-CN9j_FH4.js} +466 -451
- package/dist/cdn/chunks/composables-CN9j_FH4.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-k12jYbXP.js → createCloudRuntime-D8zeR9D2.js} +2 -2
- package/dist/cdn/chunks/{createCloudRuntime-k12jYbXP.js.map → createCloudRuntime-D8zeR9D2.js.map} +1 -1
- package/dist/cdn/chunks/{da-qQzj0QGy.js → da-CM6DCvRG.js} +2 -1
- package/dist/cdn/chunks/{da-qQzj0QGy.js.map → da-CM6DCvRG.js.map} +1 -1
- package/dist/cdn/chunks/{de-BLFp3nWx.js → de-Dugz1zXC.js} +2 -1
- package/dist/cdn/chunks/{de-BLFp3nWx.js.map → de-Dugz1zXC.js.map} +1 -1
- package/dist/cdn/chunks/{en-DGGQJGbm.js → en-BykoFuFY.js} +2 -1
- package/dist/cdn/chunks/{en-DGGQJGbm.js.map → en-BykoFuFY.js.map} +1 -1
- package/dist/cdn/chunks/{es-DTY9qgLv.js → es-DaWsTkpj.js} +2 -1
- package/dist/cdn/chunks/{es-DTY9qgLv.js.map → es-DaWsTkpj.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-Djyg5slk.js → extensions-BYJPv1sA.js} +4 -4
- package/dist/cdn/chunks/{extensions-Djyg5slk.js.map → extensions-BYJPv1sA.js.map} +1 -1
- package/dist/cdn/chunks/{fr-L4FqO9Gp.js → fr-DqwQHtJo.js} +2 -1
- package/dist/cdn/chunks/{fr-L4FqO9Gp.js.map → fr-DqwQHtJo.js.map} +1 -1
- package/dist/cdn/chunks/{ja-6uOXkh4v.js → ja-BH4MS1Ye.js} +2 -1
- package/dist/cdn/chunks/{ja-6uOXkh4v.js.map → ja-BH4MS1Ye.js.map} +1 -1
- package/dist/cdn/chunks/{keys-BQqbBUag.js → keys-DNv3xXxI.js} +4 -4
- package/dist/cdn/chunks/keys-DNv3xXxI.js.map +1 -0
- package/dist/cdn/chunks/{nl-DCxuxwNq.js → nl-BQl1_UHv.js} +2 -1
- package/dist/cdn/chunks/{nl-DCxuxwNq.js.map → nl-BQl1_UHv.js.map} +1 -1
- package/dist/{pt-BR-CBkcrebr.js → cdn/chunks/pt-BR-eyzmU9Vs.js} +3 -0
- package/dist/cdn/chunks/{pt-BR-CBkcrebr.js.map → pt-BR-eyzmU9Vs.js.map} +1 -1
- package/dist/cdn/chunks/{socialIcons-CkgQUpim.js → socialIcons-bvQ57o1m.js} +484 -467
- package/dist/cdn/chunks/socialIcons-bvQ57o1m.js.map +1 -0
- package/dist/cdn/chunks/{src-CpUX1Mhb.js → src-BXrhjqCv.js} +11 -18
- package/dist/cdn/chunks/src-BXrhjqCv.js.map +1 -0
- package/dist/cdn/chunks/src-CVHGPKSW.js.map +1 -1
- package/dist/cdn/chunks/{styleConstants-CgiNKdnc.js → styleConstants-Br6CIRoS.js} +6 -6
- package/dist/cdn/chunks/styleConstants-Br6CIRoS.js.map +1 -0
- package/dist/cdn/chunks/{useCloudI18n-Dr4S2TRW.js → useCloudI18n-CWgySYuJ.js} +2 -2
- package/dist/cdn/chunks/{useCloudI18n-Dr4S2TRW.js.map → useCloudI18n-CWgySYuJ.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorRoot-B_kf_k-g.js → useEditorRoot-BA4vV7sK.js} +2 -2
- package/dist/cdn/chunks/{useEditorRoot-B_kf_k-g.js.map → useEditorRoot-BA4vV7sK.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-CSf-ZpcM.js → useI18n-JsIdvX-i.js} +2 -2
- package/dist/cdn/chunks/{useI18n-CSf-ZpcM.js.map → useI18n-JsIdvX-i.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-YXRBcfgG.js → useLogicTag-C10Wef7d.js} +2 -2
- package/dist/cdn/chunks/{useLogicTag-YXRBcfgG.js.map → useLogicTag-C10Wef7d.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-lb-Wrw-B.js → useMergeTag-Dd26TcvH.js} +2 -2
- package/dist/cdn/chunks/{useMergeTag-lb-Wrw-B.js.map → useMergeTag-Dd26TcvH.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-BJFFi8x6.js → usePopoverPosition-DWRQRT2P.js} +2 -2
- package/dist/cdn/chunks/{usePopoverPosition-BJFFi8x6.js.map → usePopoverPosition-DWRQRT2P.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-MI4PP5lk.js → useScrollToBlock-CArjwH-u.js} +2 -2
- package/dist/cdn/chunks/{useScrollToBlock-MI4PP5lk.js.map → useScrollToBlock-CArjwH-u.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +709 -617
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{composables-BrzGZQkd.js → composables-DbqKYIRE.js} +631 -616
- package/dist/{createCloudRuntime-DgQfMi22.js → createCloudRuntime-DiUnYjKr.js} +1 -1
- package/dist/{da-qQzj0QGy.js → da-CM6DCvRG.js} +1 -0
- package/dist/{de-BLFp3nWx.js → de-Dugz1zXC.js} +1 -0
- package/dist/{en-DGGQJGbm.js → en-BykoFuFY.js} +1 -0
- package/dist/{es-DTY9qgLv.js → es-DaWsTkpj.js} +1 -0
- package/dist/{extensions-Cyp2x7cD.js → extensions-CAuXwpbI.js} +3 -3
- package/dist/{fr-L4FqO9Gp.js → fr-DqwQHtJo.js} +1 -0
- package/dist/index.d.ts +64 -5
- package/dist/{ja-6uOXkh4v.js → ja-BH4MS1Ye.js} +1 -0
- package/dist/{keys-D9oKZN1h.js → keys-BeQy64On.js} +3 -3
- package/dist/{nl-DCxuxwNq.js → nl-BQl1_UHv.js} +1 -0
- package/dist/{cdn/chunks/pt-BR-CBkcrebr.js → pt-BR-eyzmU9Vs.js} +1 -2
- package/dist/{socialIcons-ZfH8PyV2.js → socialIcons-RKdTgJip.js} +376 -359
- package/dist/style.css +1 -1
- package/dist/{styleConstants-CgiNKdnc.js → styleConstants-Br6CIRoS.js} +5 -5
- package/dist/templatical-editor.js +761 -668
- package/dist/{useCloudI18n-HhCZYRV6.js → useCloudI18n-nMZ9f_4b.js} +1 -1
- package/dist/{useEditorRoot-B0Njczhx.js → useEditorRoot-DpssP9rX.js} +1 -1
- package/dist/{useI18n-CM9vKbYc.js → useI18n-C2p-qHeb.js} +1 -1
- package/dist/{useLogicTag-BTCtn-uG.js → useLogicTag-59fmujI7.js} +1 -1
- package/dist/{useMergeTag-QlXUjCWT.js → useMergeTag-M1vauWet.js} +1 -1
- package/dist/{usePopoverPosition-CVRzzLkC.js → usePopoverPosition-L9MOHBM-.js} +1 -1
- package/dist/{useScrollToBlock-DruzlN2h.js → useScrollToBlock-BMF0Dt5l.js} +1 -1
- package/package.json +8 -8
- package/dist/TestEmailModal-CYq9Ec7x.js +0 -212
- package/dist/cdn/chunks/TestEmailModal-DJpwpEZs.js +0 -212
- package/dist/cdn/chunks/TestEmailModal-DJpwpEZs.js.map +0 -1
- package/dist/cdn/chunks/composables-CkthyXi9.js.map +0 -1
- package/dist/cdn/chunks/keys-BQqbBUag.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-CkgQUpim.js.map +0 -1
- package/dist/cdn/chunks/src-CpUX1Mhb.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-CgiNKdnc.js.map +0 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { a as e, c as t, i as n, l as r } from "./dist-B6ptxfPo.js";
|
|
2
2
|
import { c as i, o as a, s as o } from "./runtime-dom.esm-bundler-nN-jsqr1.js";
|
|
3
|
-
import { A as s, B as c, D as l, F as u, Ft as d, H as f, L as p, M as m, Mt as h, N as g, O as _, P as v, Pt as y, Q as b, S as x, U as S, W as C, Y as w, Z as T, _ as E, a as ee, at as D, b as O, c as k, ct as A, d as j, et as M, f as N, g as te, j as ne, k as re, l as P, nt as ie, ot as F, q as I, r as L, st as ae, u as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import "./useCloudI18n-
|
|
7
|
-
import { t as
|
|
8
|
-
import { _ as
|
|
9
|
-
import { $ as
|
|
10
|
-
import { t as
|
|
11
|
-
import { a as
|
|
12
|
-
import { n as
|
|
13
|
-
import { A as Ft, B as It, C as Lt, D as Rt, F as zt, G as Bt, H as Vt, I as Ht, J as Ut, K as Wt, L as Gt, M as Kt, N as qt, O as Jt, P as Yt,
|
|
14
|
-
import { t as Ln } from "./useLogicTag-
|
|
15
|
-
import { B as Rn, C as zn, D as Bn, E as Vn, F as Hn, H as Un, O as Wn, P as Gn, T as Kn, U as qn, _ as Jn, a as Yn, f as Xn, h as Zn, k as Qn, n as $n, o as er, t as tr, u as nr, v as rr, w as ir, x as ar, y as or, z as sr } from "./socialIcons-
|
|
3
|
+
import { A as s, B as c, D as l, F as u, Ft as d, H as f, L as p, M as m, Mt as h, N as g, O as _, P as v, Pt as y, Q as b, S as x, U as S, W as C, Y as w, Z as T, _ as E, a as ee, at as D, b as O, c as k, ct as A, d as j, et as M, f as N, g as te, j as ne, k as re, l as P, nt as ie, ot as F, q as I, r as L, st as ae, u as R, v as oe, w as z, y as B } from "./vue.runtime.esm-bundler-BE5V8ADU.js";
|
|
4
|
+
import { t as se } from "./useEditorRoot-DpssP9rX.js";
|
|
5
|
+
import { t as ce } from "./useI18n-C2p-qHeb.js";
|
|
6
|
+
import "./useCloudI18n-nMZ9f_4b.js";
|
|
7
|
+
import { t as V } from "./useMergeTag-M1vauWet.js";
|
|
8
|
+
import { _ as le, h as ue, v as de, y as fe } from "./dist-A328tG0Z.js";
|
|
9
|
+
import { $ as pe, $t as me, At as he, B as ge, Bt as _e, Ct as ve, F as ye, Gt as be, H as xe, Ht as Se, I as Ce, J as we, Jt as Te, Kt as Ee, L as De, Mt as Oe, N as ke, P as Ae, Pt as je, Qt as Me, S as Ne, St as Pe, U as Fe, Ut as Ie, V as Le, Vt as Re, W as ze, Wt as Be, X as Ve, Xt as He, Y as Ue, Yt as We, Z as Ge, Zt as Ke, _ as qe, a as Je, an as Ye, at as Xe, b as Ze, c as Qe, dt as $e, en as et, ft as tt, gt as nt, ht as rt, in as it, it as at, j as ot, l as st, lt as ct, m as lt, nn as ut, on as dt, ot as ft, p as pt, pt as mt, q as ht, qt as gt, rn as _t, s as vt, st as yt, tt as bt, xt, y as St, yt as Ct, z as wt, zt as Tt } from "./dist-BTjObRcv.js";
|
|
10
|
+
import { t as Et } from "./logger-BOu7oEtk.js";
|
|
11
|
+
import { a as Dt, c as Ot, i as kt, n as At, o as jt, t as Mt } from "./usePopoverPosition-L9MOHBM-.js";
|
|
12
|
+
import { n as Nt } from "./useLocalizedDisplay-9RqT2y_Y.js";
|
|
13
|
+
import { $ as Pt, A as Ft, B as It, C as Lt, D as Rt, F as zt, G as Bt, H as Vt, I as Ht, J as Ut, K as Wt, L as Gt, M as Kt, N as qt, O as Jt, P as Yt, R as Xt, S as Zt, T as Qt, U as $t, V as en, W as tn, X as nn, Y as rn, Z as an, _ as on, a as sn, at as cn, b as ln, c as un, ct as dn, d as fn, g as pn, h as mn, i as hn, it as gn, j as _n, k as vn, l as yn, lt as bn, m as xn, nt as Sn, ot as Cn, p as wn, q as Tn, r as En, rt as Dn, s as On, st as kn, tt as An, u as jn, v as Mn, w as Nn, x as Pn, y as Fn, z as In } from "./keys-BeQy64On.js";
|
|
14
|
+
import { t as Ln } from "./useLogicTag-59fmujI7.js";
|
|
15
|
+
import { B as Rn, C as zn, D as Bn, E as Vn, F as Hn, H as Un, O as Wn, P as Gn, T as Kn, U as qn, _ as Jn, a as Yn, f as Xn, h as Zn, k as Qn, n as $n, o as er, t as tr, u as nr, v as rr, w as ir, x as ar, y as or, z as sr } from "./socialIcons-RKdTgJip.js";
|
|
16
16
|
import { r as cr, t as lr } from "./templateSettingsFields-cjlP-jdw.js";
|
|
17
17
|
import { i as ur, r as dr, t as fr } from "./sanitizeHtml-D2wueiEe.js";
|
|
18
18
|
import { t as pr } from "./createLucideIcon-CssArtUe.js";
|
|
@@ -23,7 +23,7 @@ import { t as _r } from "./clock-tnC1IvZk.js";
|
|
|
23
23
|
import { t as vr } from "./pencil-BNdkJyfY.js";
|
|
24
24
|
import { t as yr } from "./languageName-DEEOhDWI.js";
|
|
25
25
|
import { t as br } from "./plural-CyxrJXL1.js";
|
|
26
|
-
import { m as xr, w as Sr, x as Cr } from "./styleConstants-
|
|
26
|
+
import { m as xr, w as Sr, x as Cr } from "./styleConstants-Br6CIRoS.js";
|
|
27
27
|
import { t as wr } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
28
28
|
import { n as Tr } from "./upload-BWYXWYHb.js";
|
|
29
29
|
import { t as Er } from "./message-circle-D_TpvAJh.js";
|
|
@@ -146,7 +146,7 @@ var kr = pr({
|
|
|
146
146
|
}]]
|
|
147
147
|
}), Ir = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
148
148
|
function Lr(t, n) {
|
|
149
|
-
let r =
|
|
149
|
+
let r = se(), i = null, a = null, o = null;
|
|
150
150
|
function s() {
|
|
151
151
|
return t.value ? Array.from(t.value.querySelectorAll(Ir)).filter((e) => e.offsetParent !== null) : [];
|
|
152
152
|
}
|
|
@@ -178,7 +178,7 @@ function Lr(t, n) {
|
|
|
178
178
|
}
|
|
179
179
|
// src/composables/useEmoji.ts
|
|
180
180
|
function Rr() {
|
|
181
|
-
let [e, t] =
|
|
181
|
+
let [e, t] = de(!1), n = ie([]), r = !1;
|
|
182
182
|
T(() => {
|
|
183
183
|
r = !0;
|
|
184
184
|
}), c(e, async (e) => {
|
|
@@ -210,7 +210,7 @@ function zr() {
|
|
|
210
210
|
function n(t, n) {
|
|
211
211
|
let r = `custom:${t.type}`, i = {
|
|
212
212
|
component: n,
|
|
213
|
-
createBlock: () =>
|
|
213
|
+
createBlock: () => Ce(t),
|
|
214
214
|
definition: t
|
|
215
215
|
};
|
|
216
216
|
e.value.set(r, i), ae(e);
|
|
@@ -236,9 +236,9 @@ function zr() {
|
|
|
236
236
|
let t = a(e.customType);
|
|
237
237
|
if (!t) return o("Block definition not found");
|
|
238
238
|
try {
|
|
239
|
-
return await
|
|
239
|
+
return await De(await import("./liquid.browser-DUXEekoN.js")).parseAndRender(t.template, e.fieldValues);
|
|
240
240
|
} catch (t) {
|
|
241
|
-
return
|
|
241
|
+
return Et.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
function c(t) {
|
|
@@ -291,7 +291,7 @@ function Hr(e) {
|
|
|
291
291
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
292
292
|
for (let i of e) {
|
|
293
293
|
let e = i.toLowerCase(), a = Br.find((t) => t.value.toLowerCase() === e);
|
|
294
|
-
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e),
|
|
294
|
+
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), Et.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Br.map((e) => e.value).join(", ")}.`));
|
|
295
295
|
}
|
|
296
296
|
return t;
|
|
297
297
|
}
|
|
@@ -308,7 +308,7 @@ function Ur(e) {
|
|
|
308
308
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
309
309
|
}
|
|
310
310
|
let s = e?.defaultFont ?? Vr.split(",")[0].trim();
|
|
311
|
-
o(s) ||
|
|
311
|
+
o(s) || Et.warn(`config.fonts: new templates seed "${s}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
|
|
312
312
|
function c() {
|
|
313
313
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
314
314
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
@@ -318,7 +318,7 @@ function Ur(e) {
|
|
|
318
318
|
}
|
|
319
319
|
let l = k(() => c());
|
|
320
320
|
function u(e) {
|
|
321
|
-
return
|
|
321
|
+
return Ie(e, {
|
|
322
322
|
customFonts: t.value,
|
|
323
323
|
defaultFallback: i.value
|
|
324
324
|
});
|
|
@@ -337,7 +337,7 @@ function Ur(e) {
|
|
|
337
337
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
338
338
|
});
|
|
339
339
|
} catch (t) {
|
|
340
|
-
|
|
340
|
+
Et.warn(`Failed to load custom font "${e.name}":`, t);
|
|
341
341
|
}
|
|
342
342
|
});
|
|
343
343
|
await Promise.allSettled(e), f || (n.value = !0);
|
|
@@ -397,11 +397,11 @@ function Gr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
397
397
|
}
|
|
398
398
|
// src/utils/mergeTagNodeSpec.ts
|
|
399
399
|
function Kr(e, t, n) {
|
|
400
|
-
return
|
|
400
|
+
return xt(e, n) ? {
|
|
401
401
|
type: "logicMergeTagNode",
|
|
402
402
|
attrs: {
|
|
403
403
|
value: e,
|
|
404
|
-
keyword:
|
|
404
|
+
keyword: $e(e, n)
|
|
405
405
|
}
|
|
406
406
|
} : {
|
|
407
407
|
type: "mergeTagNode",
|
|
@@ -435,7 +435,7 @@ function Xr(e) {
|
|
|
435
435
|
...this.parent?.(),
|
|
436
436
|
color: {
|
|
437
437
|
default: null,
|
|
438
|
-
parseHTML: (e) => Yr(
|
|
438
|
+
parseHTML: (e) => Yr(jt(e.style.color)),
|
|
439
439
|
renderHTML: (e) => {
|
|
440
440
|
let t = Yr(e.color);
|
|
441
441
|
return t ? { style: `color: ${t}` } : {};
|
|
@@ -445,7 +445,7 @@ function Xr(e) {
|
|
|
445
445
|
} });
|
|
446
446
|
}
|
|
447
447
|
// src/composables/useRichTextLinkDialog.ts
|
|
448
|
-
function Zr(e, t =
|
|
448
|
+
function Zr(e, t = qe.liquid, n = () => !0) {
|
|
449
449
|
let r = M(!1), i = M(""), a = M(""), o = M(null);
|
|
450
450
|
Lr(o, r);
|
|
451
451
|
function s() {
|
|
@@ -475,8 +475,8 @@ function Zr(e, t = Je.liquid, n = () => !0) {
|
|
|
475
475
|
if (t.startsWith("#")) return t;
|
|
476
476
|
if (t.startsWith("//")) return `https:${t}`;
|
|
477
477
|
if (l.test(t)) return t;
|
|
478
|
-
let n =
|
|
479
|
-
return n ?
|
|
478
|
+
let n = Xe(t);
|
|
479
|
+
return n ? lt.some((e) => e === n) ? t : null : u(t) ? t : `https://${t}`;
|
|
480
480
|
}
|
|
481
481
|
function f() {
|
|
482
482
|
n() && (e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), p());
|
|
@@ -501,7 +501,7 @@ function Zr(e, t = Je.liquid, n = () => !0) {
|
|
|
501
501
|
}
|
|
502
502
|
// src/composables/useRichTextEditor.ts
|
|
503
503
|
function Qr(t) {
|
|
504
|
-
let n =
|
|
504
|
+
let n = z(Mn, null), r = Ot(), i = z(rn, null), a = k(() => r.value && !i?.value), { mergeTags: o, canRequestMergeTag: s, isRequesting: l, requestMergeTag: u, syntax: d, autocomplete: f } = V(), { canInsertLogicTag: p, isRequesting: m, requestLogicTag: h } = Ln(), g = z(gn, null), _ = (w(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", v = rt(d), y = ie(null), b = n?.content ? Nt(n) : null, x = () => Se(b?.settings.value ?? { locale: "en" });
|
|
505
505
|
c(x, (e) => {
|
|
506
506
|
let t = y.value?.view.dom;
|
|
507
507
|
t && t.setAttribute("dir", e);
|
|
@@ -514,7 +514,7 @@ function Qr(t) {
|
|
|
514
514
|
e && e.view.dispatch(e.state.tr);
|
|
515
515
|
}
|
|
516
516
|
});
|
|
517
|
-
let { start: N, stop: te } =
|
|
517
|
+
let { start: N, stop: te } = le(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), ne = ie(null), P = M(!0), F = M(null), I = !1, L = null;
|
|
518
518
|
async function ae() {
|
|
519
519
|
F.value = null, P.value = !0;
|
|
520
520
|
try {
|
|
@@ -545,17 +545,17 @@ function Qr(t) {
|
|
|
545
545
|
y.value = c, P.value = !1, N();
|
|
546
546
|
} catch (e) {
|
|
547
547
|
if (I) return;
|
|
548
|
-
|
|
548
|
+
Et.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), F.value = e instanceof Error ? e.message : "Failed to load editor", P.value = !1;
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
function
|
|
551
|
+
function R() {
|
|
552
552
|
y.value?.destroy(), y.value = null, ae();
|
|
553
553
|
}
|
|
554
554
|
ae();
|
|
555
|
-
let
|
|
555
|
+
let oe = c(() => t.blockContent(), (e) => {
|
|
556
556
|
y.value && e !== L && (L = e, y.value.getHTML() !== e && y.value.commands.setContent(e, { emitUpdate: !1 }));
|
|
557
557
|
});
|
|
558
|
-
function
|
|
558
|
+
function B(e) {
|
|
559
559
|
if (l.value || m.value) return;
|
|
560
560
|
let n = e.composedPath(), r = n.find((e) => e instanceof HTMLElement);
|
|
561
561
|
if (!r) return;
|
|
@@ -563,10 +563,10 @@ function Qr(t) {
|
|
|
563
563
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
564
564
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || t.onDone();
|
|
565
565
|
}
|
|
566
|
-
e(document, "mousedown",
|
|
567
|
-
I = !0,
|
|
566
|
+
e(document, "mousedown", B), re(() => {
|
|
567
|
+
I = !0, oe(), te(), y.value?.destroy();
|
|
568
568
|
});
|
|
569
|
-
async function
|
|
569
|
+
async function se() {
|
|
570
570
|
if (!a.value) return;
|
|
571
571
|
let e = await u();
|
|
572
572
|
!I && a.value && (e && y.value ? y.value.chain().focus().insertMergeTag({
|
|
@@ -574,7 +574,7 @@ function Qr(t) {
|
|
|
574
574
|
value: e.value
|
|
575
575
|
}).run() : y.value?.commands.focus());
|
|
576
576
|
}
|
|
577
|
-
async function
|
|
577
|
+
async function ce() {
|
|
578
578
|
if (!a.value) return;
|
|
579
579
|
let e = await h();
|
|
580
580
|
!I && a.value && (e && y.value ? Jr(y.value, e, d) : y.value?.commands.focus());
|
|
@@ -585,7 +585,7 @@ function Qr(t) {
|
|
|
585
585
|
isLoading: P,
|
|
586
586
|
isEditable: a,
|
|
587
587
|
initError: F,
|
|
588
|
-
retry:
|
|
588
|
+
retry: R,
|
|
589
589
|
showLinkDialog: S,
|
|
590
590
|
linkUrl: C,
|
|
591
591
|
linkColor: T,
|
|
@@ -601,8 +601,8 @@ function Qr(t) {
|
|
|
601
601
|
removeLink: O,
|
|
602
602
|
closeLinkDialog: A,
|
|
603
603
|
handleLinkKeydown: j,
|
|
604
|
-
handleAddMergeTag:
|
|
605
|
-
handleAddLogicTag:
|
|
604
|
+
handleAddMergeTag: se,
|
|
605
|
+
handleAddLogicTag: ce
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
608
|
// src/utils/activeEditorTracker.ts
|
|
@@ -635,57 +635,67 @@ function ri(e) {
|
|
|
635
635
|
// src/composables/usePreviewResolution.ts
|
|
636
636
|
var ii = 500;
|
|
637
637
|
function ai(e) {
|
|
638
|
-
let t = typeof e.resolvePreview == "function", n = M(null), r = M(!1), i = M(!1), a =
|
|
639
|
-
function
|
|
640
|
-
|
|
641
|
-
}
|
|
642
|
-
async function
|
|
643
|
-
let
|
|
644
|
-
if (!
|
|
645
|
-
let
|
|
638
|
+
let t = typeof e.resolvePreview == "function", n = M(null), r = M(!1), i = M(!1), a = M(!1), o = 0, s = null;
|
|
639
|
+
function l() {
|
|
640
|
+
s !== null && (clearTimeout(s), s = null);
|
|
641
|
+
}
|
|
642
|
+
async function u(t) {
|
|
643
|
+
let s = e.resolvePreview;
|
|
644
|
+
if (!s) return;
|
|
645
|
+
let c = ++o;
|
|
646
646
|
r.value = !0;
|
|
647
|
-
let
|
|
648
|
-
content:
|
|
647
|
+
let l = {
|
|
648
|
+
content: We(e.getContent()),
|
|
649
|
+
trigger: t,
|
|
649
650
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
650
651
|
};
|
|
651
652
|
try {
|
|
652
|
-
let e = await
|
|
653
|
-
if (
|
|
654
|
-
if (!
|
|
655
|
-
i.value = !0;
|
|
653
|
+
let e = await s(l);
|
|
654
|
+
if (c !== o) return;
|
|
655
|
+
if (!ve(e)) {
|
|
656
|
+
i.value = !0, n.value = null;
|
|
656
657
|
return;
|
|
657
658
|
}
|
|
658
659
|
n.value = e, i.value = !1;
|
|
659
660
|
} catch {
|
|
660
|
-
if (
|
|
661
|
-
i.value = !0;
|
|
661
|
+
if (c !== o) return;
|
|
662
|
+
i.value = !0, n.value = null;
|
|
662
663
|
} finally {
|
|
663
|
-
|
|
664
|
+
c === o && (a.value = !0, r.value = !1);
|
|
664
665
|
}
|
|
665
666
|
}
|
|
666
|
-
function
|
|
667
|
-
t && (
|
|
668
|
-
|
|
667
|
+
function d(e) {
|
|
668
|
+
t && (l(), !a.value && e !== "recipient" ? u(e) : s = setTimeout(() => {
|
|
669
|
+
s = null, u(e);
|
|
669
670
|
}, ii));
|
|
670
671
|
}
|
|
672
|
+
function f() {
|
|
673
|
+
t && e.isActive() && (l(), u("refresh"));
|
|
674
|
+
}
|
|
671
675
|
return c(() => [
|
|
672
676
|
e.isActive(),
|
|
673
677
|
e.getRecipient?.(),
|
|
674
678
|
e.getLocale?.()
|
|
675
|
-
], ([e, ,
|
|
676
|
-
|
|
679
|
+
], ([e, t, s], c) => {
|
|
680
|
+
if (c && s !== c[2] && (l(), o++, n.value = null, r.value = !1, i.value = !1, a.value = !1), !e) {
|
|
681
|
+
l(), o++, r.value = !1, n.value = null, i.value = !1, a.value = !1;
|
|
682
|
+
return;
|
|
683
|
+
}
|
|
684
|
+
let u = !c || !c[0] ? "open" : s === c[2] ? t === c[1] ? null : "recipient" : "locale";
|
|
685
|
+
u !== null && d(u);
|
|
677
686
|
}, {
|
|
678
687
|
immediate: !0,
|
|
679
688
|
flush: "sync"
|
|
680
689
|
}), T(() => {
|
|
681
|
-
|
|
690
|
+
l(), o++;
|
|
682
691
|
}), {
|
|
683
692
|
isConfigured: t,
|
|
684
693
|
content: k(() => n.value ?? e.getContent()),
|
|
685
694
|
isResolving: r,
|
|
686
|
-
isInitialResolve: k(() => r.value &&
|
|
695
|
+
isInitialResolve: k(() => r.value && !a.value),
|
|
687
696
|
hasFailed: i,
|
|
688
|
-
supersedesSamples: k(() => t)
|
|
697
|
+
supersedesSamples: k(() => t),
|
|
698
|
+
refresh: f
|
|
689
699
|
};
|
|
690
700
|
}
|
|
691
701
|
// src/composables/useMergeTagPicker.ts
|
|
@@ -762,10 +772,10 @@ function ui(e) {
|
|
|
762
772
|
try {
|
|
763
773
|
let t = await import("@templatical/quality");
|
|
764
774
|
if (d) return;
|
|
765
|
-
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), u =
|
|
775
|
+
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), u = fe(n, p, { debounce: e.debounce ?? 500 });
|
|
766
776
|
} catch {
|
|
767
777
|
if (d) return;
|
|
768
|
-
o.value = !0, li || (li = !0,
|
|
778
|
+
o.value = !0, li || (li = !0, Et.info("@templatical/quality isn't installed, so the Issues panel and its lint badges are off. Add @templatical/quality to your dependencies to turn them on."));
|
|
769
779
|
}
|
|
770
780
|
}
|
|
771
781
|
function p() {
|
|
@@ -923,66 +933,66 @@ function mi(e) {
|
|
|
923
933
|
return hi(e, t), t;
|
|
924
934
|
}
|
|
925
935
|
function hi(e, t) {
|
|
926
|
-
for (let n of e) if (
|
|
936
|
+
for (let n of e) if (Ct(n)) t.add(n.customType);
|
|
927
937
|
else if (n.type === "section") {
|
|
928
938
|
let e = n.children;
|
|
929
939
|
if (!e) continue;
|
|
930
940
|
for (let n of e) hi(n, t);
|
|
931
|
-
} else
|
|
941
|
+
} else he(n) && hi(n.children, t);
|
|
932
942
|
}
|
|
933
943
|
// src/utils/registerBuiltInBlocks.ts
|
|
934
944
|
var gi = [
|
|
935
945
|
{
|
|
936
946
|
type: "section",
|
|
937
|
-
createBlock:
|
|
947
|
+
createBlock: ze
|
|
938
948
|
},
|
|
939
949
|
{
|
|
940
950
|
type: "title",
|
|
941
|
-
createBlock:
|
|
951
|
+
createBlock: Ve
|
|
942
952
|
},
|
|
943
953
|
{
|
|
944
954
|
type: "paragraph",
|
|
945
|
-
createBlock:
|
|
955
|
+
createBlock: Fe
|
|
946
956
|
},
|
|
947
957
|
{
|
|
948
958
|
type: "image",
|
|
949
|
-
createBlock:
|
|
959
|
+
createBlock: Le
|
|
950
960
|
},
|
|
951
961
|
{
|
|
952
962
|
type: "button",
|
|
953
|
-
createBlock:
|
|
963
|
+
createBlock: Ae
|
|
954
964
|
},
|
|
955
965
|
{
|
|
956
966
|
type: "divider",
|
|
957
|
-
createBlock:
|
|
967
|
+
createBlock: wt
|
|
958
968
|
},
|
|
959
969
|
{
|
|
960
970
|
type: "video",
|
|
961
|
-
createBlock:
|
|
971
|
+
createBlock: Ge
|
|
962
972
|
},
|
|
963
973
|
{
|
|
964
974
|
type: "social",
|
|
965
|
-
createBlock:
|
|
975
|
+
createBlock: ht
|
|
966
976
|
},
|
|
967
977
|
{
|
|
968
978
|
type: "menu",
|
|
969
|
-
createBlock:
|
|
979
|
+
createBlock: xe
|
|
970
980
|
},
|
|
971
981
|
{
|
|
972
982
|
type: "table",
|
|
973
|
-
createBlock:
|
|
983
|
+
createBlock: Ue
|
|
974
984
|
},
|
|
975
985
|
{
|
|
976
986
|
type: "spacer",
|
|
977
|
-
createBlock:
|
|
987
|
+
createBlock: we
|
|
978
988
|
},
|
|
979
989
|
{
|
|
980
990
|
type: "html",
|
|
981
|
-
createBlock:
|
|
991
|
+
createBlock: ge
|
|
982
992
|
},
|
|
983
993
|
{
|
|
984
994
|
type: "countdown",
|
|
985
|
-
createBlock:
|
|
995
|
+
createBlock: ye
|
|
986
996
|
}
|
|
987
997
|
];
|
|
988
998
|
function _i(e, t) {
|
|
@@ -1003,10 +1013,10 @@ function yi(e) {
|
|
|
1003
1013
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1004
1014
|
}
|
|
1005
1015
|
function bi(e, t, n) {
|
|
1006
|
-
let r = new Set(e.map((e) =>
|
|
1007
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1016
|
+
let r = new Set(e.map((e) => Dt(e))), i = [], a = (e, t) => {
|
|
1017
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Dt(o)) && i.push(`${t}.${n}: ${o}`) : yi(o) && a(o, `${t}.${n}`);
|
|
1008
1018
|
}, o = t;
|
|
1009
|
-
for (let [e, t] of Object.entries(
|
|
1019
|
+
for (let [e, t] of Object.entries(vt)) {
|
|
1010
1020
|
let n = o?.[e];
|
|
1011
1021
|
a({
|
|
1012
1022
|
...t,
|
|
@@ -1014,7 +1024,7 @@ function bi(e, t, n) {
|
|
|
1014
1024
|
}, e);
|
|
1015
1025
|
}
|
|
1016
1026
|
return a({
|
|
1017
|
-
|
|
1027
|
+
...Qe,
|
|
1018
1028
|
...n ?? {}
|
|
1019
1029
|
}, "template"), i;
|
|
1020
1030
|
}
|
|
@@ -1028,15 +1038,15 @@ function xi(e) {
|
|
|
1028
1038
|
}
|
|
1029
1039
|
// src/i18n/index.ts
|
|
1030
1040
|
var Si = /* #__PURE__ */ Object.assign({
|
|
1031
|
-
"./locales/ca.ts": () => import("./ca-
|
|
1032
|
-
"./locales/da.ts": () => import("./da-
|
|
1033
|
-
"./locales/de.ts": () => import("./de-
|
|
1034
|
-
"./locales/en.ts": () => import("./en-
|
|
1035
|
-
"./locales/es.ts": () => import("./es-
|
|
1036
|
-
"./locales/fr.ts": () => import("./fr-
|
|
1037
|
-
"./locales/ja.ts": () => import("./ja-
|
|
1038
|
-
"./locales/nl.ts": () => import("./nl-
|
|
1039
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-
|
|
1041
|
+
"./locales/ca.ts": () => import("./ca-YfIxwO1G.js"),
|
|
1042
|
+
"./locales/da.ts": () => import("./da-CM6DCvRG.js"),
|
|
1043
|
+
"./locales/de.ts": () => import("./de-Dugz1zXC.js"),
|
|
1044
|
+
"./locales/en.ts": () => import("./en-BykoFuFY.js"),
|
|
1045
|
+
"./locales/es.ts": () => import("./es-DaWsTkpj.js"),
|
|
1046
|
+
"./locales/fr.ts": () => import("./fr-DqwQHtJo.js"),
|
|
1047
|
+
"./locales/ja.ts": () => import("./ja-BH4MS1Ye.js"),
|
|
1048
|
+
"./locales/nl.ts": () => import("./nl-BQl1_UHv.js"),
|
|
1049
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-eyzmU9Vs.js")
|
|
1040
1050
|
}), Ci = /* #__PURE__ */ Object.assign({
|
|
1041
1051
|
"./locales/cloud/de.ts": () => import("./de-6M4JoHoD.js"),
|
|
1042
1052
|
"./locales/cloud/en.ts": () => import("./en-FzUuJ8HW.js"),
|
|
@@ -1193,8 +1203,8 @@ function Hi(e, t) {
|
|
|
1193
1203
|
id: s("allow-custom-ignored"),
|
|
1194
1204
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1195
1205
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1196
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1197
|
-
e !== "" && !t.has(
|
|
1206
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => Dt(e)));
|
|
1207
|
+
e !== "" && !t.has(Dt(e)) && n.push({
|
|
1198
1208
|
id: s("off-palette-default"),
|
|
1199
1209
|
message: `${o} locks custom colours, but its default ${e} falls outside the field's presets: ${a.presets.join(", ")}. New blocks start on a colour the picker can't reselect — set the default from the same palette.`
|
|
1200
1210
|
});
|
|
@@ -1253,9 +1263,9 @@ function Ki(e, t, n) {
|
|
|
1253
1263
|
var qi = "--tpl-block-bg-layer", Ji = "--tpl-email-frame-width", Yi = "tpl-has-bg-image";
|
|
1254
1264
|
function Xi(e, t) {
|
|
1255
1265
|
if (t === null) return {};
|
|
1256
|
-
let n =
|
|
1266
|
+
let n = Re(e);
|
|
1257
1267
|
if (n === null) return {};
|
|
1258
|
-
let r = t?.trim(), i = r ?
|
|
1268
|
+
let r = t?.trim(), i = r ? at(r) : n.url;
|
|
1259
1269
|
return {
|
|
1260
1270
|
backgroundImage: `url("${i}")`,
|
|
1261
1271
|
backgroundSize: n.size,
|
|
@@ -1291,10 +1301,10 @@ function ta(e, t = {}) {
|
|
|
1291
1301
|
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
1292
1302
|
backgroundColor: r || "transparent"
|
|
1293
1303
|
};
|
|
1294
|
-
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
1295
|
-
let n =
|
|
1304
|
+
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? pt.paragraphGap : pt.paragraphGap}px`), e.type === "section") {
|
|
1305
|
+
let n = dt(e.borderRadius);
|
|
1296
1306
|
n !== null && (i.borderRadius = n);
|
|
1297
|
-
let r =
|
|
1307
|
+
let r = Be(e);
|
|
1298
1308
|
r?.applied && e.backgroundImage ? (Object.assign(i, $i(r, t.heroBoxWidth)), Object.assign(i, Xi({
|
|
1299
1309
|
...e.backgroundImage,
|
|
1300
1310
|
size: "cover",
|
|
@@ -1311,7 +1321,7 @@ function na(e, t, n, r) {
|
|
|
1311
1321
|
}
|
|
1312
1322
|
function ra(e) {
|
|
1313
1323
|
let t = {};
|
|
1314
|
-
for (let [n, r] of Object.entries(
|
|
1324
|
+
for (let [n, r] of Object.entries(Ye(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
1315
1325
|
return t;
|
|
1316
1326
|
}
|
|
1317
1327
|
var ia = {
|
|
@@ -1336,7 +1346,7 @@ function sa(e, t = {}) {
|
|
|
1336
1346
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
1337
1347
|
let n = e.wrapper, r = {};
|
|
1338
1348
|
if (n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && !n.fullWidth && (r.padding = aa(n.padding)), !n.fullWidth) {
|
|
1339
|
-
let e =
|
|
1349
|
+
let e = dt(n.borderRadius);
|
|
1340
1350
|
e !== null && (r.borderRadius = e);
|
|
1341
1351
|
}
|
|
1342
1352
|
return Object.assign(r, Xi(n.backgroundImage, t.backgroundImageUrl)), n.fullWidth && Object.assign(r, ia), r;
|
|
@@ -1350,24 +1360,24 @@ function ca(e, t = {}) {
|
|
|
1350
1360
|
function la(e, t, n, r = !1) {
|
|
1351
1361
|
if (!e) return [];
|
|
1352
1362
|
let i = [], a = 0;
|
|
1353
|
-
for (let o of
|
|
1363
|
+
for (let o of He(e, n)) {
|
|
1354
1364
|
o.index > a && i.push({
|
|
1355
1365
|
type: "text",
|
|
1356
1366
|
value: e.slice(a, o.index)
|
|
1357
1367
|
});
|
|
1358
1368
|
let s = o.value;
|
|
1359
|
-
if (
|
|
1360
|
-
let e = r ?
|
|
1369
|
+
if (Pe(s, n)) {
|
|
1370
|
+
let e = r ? mt(s, t) : void 0;
|
|
1361
1371
|
i.push(e === void 0 ? {
|
|
1362
1372
|
type: "tag",
|
|
1363
|
-
value:
|
|
1373
|
+
value: tt(s, t)
|
|
1364
1374
|
} : {
|
|
1365
1375
|
type: "text",
|
|
1366
1376
|
value: e
|
|
1367
1377
|
});
|
|
1368
|
-
} else
|
|
1378
|
+
} else xt(s, n) ? i.push({
|
|
1369
1379
|
type: "tag",
|
|
1370
|
-
value:
|
|
1380
|
+
value: $e(s, n)
|
|
1371
1381
|
}) : i.push({
|
|
1372
1382
|
type: "text",
|
|
1373
1383
|
value: s
|
|
@@ -1380,27 +1390,27 @@ function la(e, t, n, r = !1) {
|
|
|
1380
1390
|
}), i;
|
|
1381
1391
|
}
|
|
1382
1392
|
// src/components/MergeTagPreviewText.vue
|
|
1383
|
-
var ua =
|
|
1393
|
+
var ua = B({
|
|
1384
1394
|
name: "MergeTagPreviewText",
|
|
1385
1395
|
props: { text: {
|
|
1386
1396
|
type: String,
|
|
1387
1397
|
required: !0
|
|
1388
1398
|
} },
|
|
1389
1399
|
setup(e) {
|
|
1390
|
-
let t =
|
|
1400
|
+
let t = z(Yt, en), n = z(It, qe.liquid), r = z(dn, null), i = k(() => la(e.text, t.value, n, r?.value ?? !1));
|
|
1391
1401
|
return () => i.value.map((e, t) => e.type === "tag" ? x("span", {
|
|
1392
1402
|
key: t,
|
|
1393
1403
|
class: "tpl-merge-tag-label"
|
|
1394
1404
|
}, e.value) : e.value);
|
|
1395
1405
|
}
|
|
1396
|
-
}), da = ["href"], fa = /* @__PURE__ */
|
|
1406
|
+
}), da = ["href"], fa = /* @__PURE__ */ B({
|
|
1397
1407
|
__name: "ButtonBlock",
|
|
1398
1408
|
props: {
|
|
1399
1409
|
block: {},
|
|
1400
1410
|
viewport: {}
|
|
1401
1411
|
},
|
|
1402
1412
|
setup(e) {
|
|
1403
|
-
let t = e, n =
|
|
1413
|
+
let t = e, n = bn(ln, "ButtonBlock");
|
|
1404
1414
|
function r(e) {
|
|
1405
1415
|
return e === "regular" ? "400" : e === "medium" ? "500" : e === "bold" ? "700" : "bold";
|
|
1406
1416
|
}
|
|
@@ -1411,10 +1421,10 @@ var ua = z({
|
|
|
1411
1421
|
backgroundColor: t.block.backgroundColor,
|
|
1412
1422
|
color: t.block.textColor,
|
|
1413
1423
|
fontSize: `${t.block.fontSize}px`,
|
|
1414
|
-
lineHeight: String(
|
|
1424
|
+
lineHeight: String(Je),
|
|
1415
1425
|
fontWeight: r(t.block.fontWeight),
|
|
1416
1426
|
textDecoration: "none",
|
|
1417
|
-
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` :
|
|
1427
|
+
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : dt(t.block.borderRadius) ?? "0px",
|
|
1418
1428
|
textAlign: "center"
|
|
1419
1429
|
};
|
|
1420
1430
|
return Object.assign(e, ra(t.block.border)), t.block.fontFamily && (e.fontFamily = n.resolveFontFamily(t.block.fontFamily)), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
@@ -1430,7 +1440,7 @@ var ua = z({
|
|
|
1430
1440
|
"src",
|
|
1431
1441
|
"width",
|
|
1432
1442
|
"height"
|
|
1433
|
-
], ha = /* @__PURE__ */
|
|
1443
|
+
], ha = /* @__PURE__ */ B({
|
|
1434
1444
|
__name: "CustomBlockIcon",
|
|
1435
1445
|
props: {
|
|
1436
1446
|
icon: {},
|
|
@@ -1453,7 +1463,7 @@ var ua = z({
|
|
|
1453
1463
|
height: n.value,
|
|
1454
1464
|
class: "tpl:inline-block",
|
|
1455
1465
|
alt: ""
|
|
1456
|
-
}, null, 8, ma)) : (m(),
|
|
1466
|
+
}, null, 8, ma)) : (m(), R(A(Ar), {
|
|
1457
1467
|
key: 2,
|
|
1458
1468
|
size: n.value,
|
|
1459
1469
|
"stroke-width": 1.5
|
|
@@ -1472,7 +1482,7 @@ var ua = z({
|
|
|
1472
1482
|
key: 0,
|
|
1473
1483
|
class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
|
|
1474
1484
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1475
|
-
}, wa = /* @__PURE__ */
|
|
1485
|
+
}, wa = /* @__PURE__ */ B({
|
|
1476
1486
|
__name: "CustomBlock",
|
|
1477
1487
|
props: {
|
|
1478
1488
|
block: {},
|
|
@@ -1480,7 +1490,7 @@ var ua = z({
|
|
|
1480
1490
|
},
|
|
1481
1491
|
emits: ["fetchData"],
|
|
1482
1492
|
setup(e, { emit: t }) {
|
|
1483
|
-
let n = e, r = t, { t: a } =
|
|
1493
|
+
let n = e, r = t, { t: a } = ce(), o = z(yn, null), l = M(""), u = k(() => fr(l.value)), f = M(!1), p = k(() => o?.getDefinition(n.block.customType)), h = k(() => !!p.value), g = k(() => n.block), { isFetching: _, fetch: v, needsFetch: y, hasDataSource: b } = Rn({
|
|
1484
1494
|
definition: p,
|
|
1485
1495
|
block: g,
|
|
1486
1496
|
onUpdate: (e, t) => {
|
|
@@ -1489,10 +1499,10 @@ var ua = z({
|
|
|
1489
1499
|
dataSourceFetched: t
|
|
1490
1500
|
});
|
|
1491
1501
|
}
|
|
1492
|
-
}), x =
|
|
1502
|
+
}), x = z(Yt, en), S = z(dn, null), C = k(() => {
|
|
1493
1503
|
if (!S?.value) return n.block;
|
|
1494
1504
|
let e = {};
|
|
1495
|
-
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ?
|
|
1505
|
+
for (let [t, r] of Object.entries(n.block.fieldValues)) e[t] = typeof r == "string" ? _t(r, x.value) : r;
|
|
1496
1506
|
return {
|
|
1497
1507
|
...n.block,
|
|
1498
1508
|
fieldValues: e
|
|
@@ -1509,7 +1519,7 @@ var ua = z({
|
|
|
1509
1519
|
}
|
|
1510
1520
|
}
|
|
1511
1521
|
}
|
|
1512
|
-
let T =
|
|
1522
|
+
let T = ue(w, 150);
|
|
1513
1523
|
return s(() => {
|
|
1514
1524
|
w();
|
|
1515
1525
|
}), c(() => n.block.fieldValues, () => {
|
|
@@ -1519,7 +1529,7 @@ var ua = z({
|
|
|
1519
1529
|
}), (e, t) => (m(), N("div", ga, [h.value ? f.value ? (m(), N("div", ya, [E(A(hr), {
|
|
1520
1530
|
size: 24,
|
|
1521
1531
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1522
|
-
}), P("span", ba, d(A(a).customBlocks.renderError), 1)])) : (m(), N("div", xa, [P("div", { innerHTML: u.value }, null, 8, Sa), A(b) && A(y) ? (m(), N("div", Ca, [A(_) ? (m(),
|
|
1532
|
+
}), P("span", ba, d(A(a).customBlocks.renderError), 1)])) : (m(), N("div", xa, [P("div", { innerHTML: u.value }, null, 8, Sa), A(b) && A(y) ? (m(), N("div", Ca, [A(_) ? (m(), R(mr, {
|
|
1523
1533
|
key: 1,
|
|
1524
1534
|
class: "tpl:w-48"
|
|
1525
1535
|
})) : (m(), N("button", {
|
|
@@ -1527,7 +1537,7 @@ var ua = z({
|
|
|
1527
1537
|
type: "button",
|
|
1528
1538
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-[var(--tpl-shadow)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:shadow-[var(--tpl-shadow-md)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1529
1539
|
onClick: t[0] ||= i((...e) => A(v) && A(v)(...e), ["stop"])
|
|
1530
|
-
}, [p.value?.icon ? (m(),
|
|
1540
|
+
}, [p.value?.icon ? (m(), R(ha, {
|
|
1531
1541
|
key: 0,
|
|
1532
1542
|
icon: p.value.icon,
|
|
1533
1543
|
size: 16
|
|
@@ -1536,7 +1546,7 @@ var ua = z({
|
|
|
1536
1546
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1537
1547
|
}), P("span", va, d(A(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1538
1548
|
}
|
|
1539
|
-
}), Ta = { class: "tpl:w-full" }, Ea = /* @__PURE__ */
|
|
1549
|
+
}), Ta = { class: "tpl:w-full" }, Ea = /* @__PURE__ */ B({
|
|
1540
1550
|
__name: "DividerBlock",
|
|
1541
1551
|
props: {
|
|
1542
1552
|
block: {},
|
|
@@ -1562,14 +1572,14 @@ var ua = z({
|
|
|
1562
1572
|
}, ja = {
|
|
1563
1573
|
key: 1,
|
|
1564
1574
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1565
|
-
}, Ma = /* @__PURE__ */
|
|
1575
|
+
}, Ma = /* @__PURE__ */ B({
|
|
1566
1576
|
__name: "HtmlBlock",
|
|
1567
1577
|
props: {
|
|
1568
1578
|
block: {},
|
|
1569
1579
|
viewport: {}
|
|
1570
1580
|
},
|
|
1571
1581
|
setup(e) {
|
|
1572
|
-
let t = e, { t: n } =
|
|
1582
|
+
let t = e, { t: n } = ce(), r = z(Zt, !1), i = k(() => t.block.content.trim().length > 0), a = k(() => r && i.value), o = z(Yt, en), s = z(dn, null), l = k(() => s?.value ? _t(t.block.content, o.value) : t.block.content), u = M(null), f = M(60), p = null;
|
|
1573
1583
|
function h() {
|
|
1574
1584
|
let e = u.value?.contentDocument;
|
|
1575
1585
|
e && (f.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1604,7 +1614,7 @@ var ua = z({
|
|
|
1604
1614
|
}, Ra = ["href"], za = ["src", "alt"], Ba = ["src", "alt"], Va = {
|
|
1605
1615
|
key: 4,
|
|
1606
1616
|
class: "tpl:flex tpl:box-border tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
1607
|
-
}, Ha = ["aria-label"], Ua = { key: 1 }, Wa = /* @__PURE__ */
|
|
1617
|
+
}, Ha = ["aria-label"], Ua = { key: 1 }, Wa = /* @__PURE__ */ B({
|
|
1608
1618
|
__name: "ImageBlock",
|
|
1609
1619
|
props: {
|
|
1610
1620
|
block: {},
|
|
@@ -1612,7 +1622,7 @@ var ua = z({
|
|
|
1612
1622
|
},
|
|
1613
1623
|
emits: ["update"],
|
|
1614
1624
|
setup(e, { emit: t }) {
|
|
1615
|
-
let n = e, r = t, { t: a } =
|
|
1625
|
+
let n = e, r = t, { t: a } = ce(), { syntax: o } = V(), s = k(() => ot(n.block.src, o));
|
|
1616
1626
|
function c(e) {
|
|
1617
1627
|
let t = {
|
|
1618
1628
|
src: e.url,
|
|
@@ -1625,7 +1635,7 @@ var ua = z({
|
|
|
1625
1635
|
blocked: s,
|
|
1626
1636
|
apply: c
|
|
1627
1637
|
}), _ = k(() => ({ textAlign: n.block.align })), v = k(() => {
|
|
1628
|
-
let e = n.block.border, t = ["left", "right"].map((t) =>
|
|
1638
|
+
let e = n.block.border, t = ["left", "right"].map((t) => it(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1629
1639
|
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1630
1640
|
}), b = k(() => {
|
|
1631
1641
|
let e = n.block.align;
|
|
@@ -1633,7 +1643,7 @@ var ua = z({
|
|
|
1633
1643
|
maxWidth: "100%",
|
|
1634
1644
|
width: n.block.width === "full" ? v.value : `${n.block.width}px`,
|
|
1635
1645
|
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1636
|
-
borderRadius:
|
|
1646
|
+
borderRadius: dt(n.block.borderRadius) ?? void 0,
|
|
1637
1647
|
...ra(n.block.border),
|
|
1638
1648
|
display: "block",
|
|
1639
1649
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
@@ -1647,7 +1657,7 @@ var ua = z({
|
|
|
1647
1657
|
"data-drop-enabled": A(f),
|
|
1648
1658
|
class: "tpl:relative tpl:w-full",
|
|
1649
1659
|
style: y(_.value)
|
|
1650
|
-
}, [A(h) ? (m(),
|
|
1660
|
+
}, [A(h) ? (m(), R(Xn, {
|
|
1651
1661
|
key: 0,
|
|
1652
1662
|
uploading: A(p),
|
|
1653
1663
|
size: "canvas"
|
|
@@ -1709,14 +1719,14 @@ var ua = z({
|
|
|
1709
1719
|
}), Ga = { class: "tpl:w-full" }, Ka = ["href"], qa = {
|
|
1710
1720
|
key: 1,
|
|
1711
1721
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
1712
|
-
}, Ja = /* @__PURE__ */
|
|
1722
|
+
}, Ja = /* @__PURE__ */ B({
|
|
1713
1723
|
__name: "MenuBlock",
|
|
1714
1724
|
props: {
|
|
1715
1725
|
block: {},
|
|
1716
1726
|
viewport: {}
|
|
1717
1727
|
},
|
|
1718
1728
|
setup(e) {
|
|
1719
|
-
let t = e, { t: n } =
|
|
1729
|
+
let t = e, { t: n } = ce(), r = bn(ln, "MenuBlock"), a = k(() => ({
|
|
1720
1730
|
display: "flex",
|
|
1721
1731
|
flexWrap: "wrap",
|
|
1722
1732
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -1751,11 +1761,11 @@ var ua = z({
|
|
|
1751
1761
|
});
|
|
1752
1762
|
// src/composables/useEditableTextBlock.ts
|
|
1753
1763
|
function Ya(e) {
|
|
1754
|
-
let t =
|
|
1764
|
+
let t = z(Yt, en), r = z(dn, null), i = z(rn, null), { syntax: a } = V(), o = k(() => r?.value ? ut(e(), t.value) : Ee(e(), t.value)), s = k(() => ft(fr(be(o.value, a)))), l = M(!1);
|
|
1755
1765
|
c(() => i?.value, (e) => {
|
|
1756
1766
|
e && (l.value = !1);
|
|
1757
1767
|
});
|
|
1758
|
-
let u = M(null), { top: d, left: f } = n(u), { toLocal: p } =
|
|
1768
|
+
let u = M(null), { top: d, left: f } = n(u), { toLocal: p } = Mt(), m = k(() => p({
|
|
1759
1769
|
top: d.value - 8,
|
|
1760
1770
|
left: f.value
|
|
1761
1771
|
}));
|
|
@@ -1775,20 +1785,20 @@ function Ya(e) {
|
|
|
1775
1785
|
};
|
|
1776
1786
|
}
|
|
1777
1787
|
// src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1778
|
-
var Xa = ["innerHTML"], Za = /* @__PURE__ */
|
|
1788
|
+
var Xa = ["innerHTML"], Za = /* @__PURE__ */ B({
|
|
1779
1789
|
__name: "ParagraphBlock",
|
|
1780
1790
|
props: {
|
|
1781
1791
|
block: {},
|
|
1782
1792
|
viewport: {}
|
|
1783
1793
|
},
|
|
1784
1794
|
setup(e) {
|
|
1785
|
-
let t = e, n =
|
|
1795
|
+
let t = e, n = oe(() => import("./ParagraphEditor-Vz90-hhN.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Ya(() => t.block.content);
|
|
1786
1796
|
return (t, l) => (m(), N("div", {
|
|
1787
1797
|
ref_key: "blockRef",
|
|
1788
1798
|
ref: i,
|
|
1789
1799
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1790
1800
|
onDblclick: l[0] ||= (...e) => A(s) && A(s)(...e)
|
|
1791
|
-
}, [A(r) ? (m(),
|
|
1801
|
+
}, [A(r) ? (m(), R(A(n), {
|
|
1792
1802
|
key: 0,
|
|
1793
1803
|
block: e.block,
|
|
1794
1804
|
"toolbar-position": A(a),
|
|
@@ -1821,16 +1831,16 @@ function Qa(e, t, n, r = 0, i) {
|
|
|
1821
1831
|
function $a(e, t, n) {
|
|
1822
1832
|
let r = [], i = "\0MT";
|
|
1823
1833
|
for (; e.includes(i);) i += "_";
|
|
1824
|
-
let a = n === "html" ?
|
|
1834
|
+
let a = n === "html" ? _e(e, (e) => {
|
|
1825
1835
|
let t = r.push(e) - 1;
|
|
1826
1836
|
return `${i}${t}\u0000`;
|
|
1827
1837
|
}) : e, o = Array.from(a.matchAll(RegExp(`${i}\\d+\u0000`, "g")), (e) => ({
|
|
1828
1838
|
start: e.index,
|
|
1829
1839
|
end: e.index + e[0].length
|
|
1830
|
-
})), s = [], c =
|
|
1840
|
+
})), s = [], c = Ke(a, t, "logic"), l = [], u = 0;
|
|
1831
1841
|
for (let e of ["logic", "value"]) {
|
|
1832
1842
|
let r = 0;
|
|
1833
|
-
for (let i of e === "logic" ? c :
|
|
1843
|
+
for (let i of e === "logic" ? c : Ke(a, t, "value")) {
|
|
1834
1844
|
let t = i.index, a = t + i.value.length;
|
|
1835
1845
|
for (; o[r]?.end <= t;) r++;
|
|
1836
1846
|
let c = o[r];
|
|
@@ -1846,7 +1856,7 @@ function $a(e, t, n) {
|
|
|
1846
1856
|
}), s.push({
|
|
1847
1857
|
start: t,
|
|
1848
1858
|
end: a,
|
|
1849
|
-
value: n === "html" ?
|
|
1859
|
+
value: n === "html" ? pe(i.value) : i.value
|
|
1850
1860
|
});
|
|
1851
1861
|
}
|
|
1852
1862
|
}
|
|
@@ -1890,7 +1900,7 @@ var to = [
|
|
|
1890
1900
|
}, go = ["onClick"], _o = {
|
|
1891
1901
|
key: 7,
|
|
1892
1902
|
class: "tpl:mt-2 tpl:flex tpl:flex-wrap tpl:gap-1"
|
|
1893
|
-
}, vo = ["data-testid", "disabled"], yo = /*#__PURE__*/ wr(/* @__PURE__ */
|
|
1903
|
+
}, vo = ["data-testid", "disabled"], yo = /*#__PURE__*/ wr(/* @__PURE__ */ B({
|
|
1894
1904
|
__name: "LocaleStatusChip",
|
|
1895
1905
|
props: {
|
|
1896
1906
|
blockId: {},
|
|
@@ -1910,14 +1920,14 @@ var to = [
|
|
|
1910
1920
|
},
|
|
1911
1921
|
emits: ["target"],
|
|
1912
1922
|
setup(e, { emit: t }) {
|
|
1913
|
-
let n = e, r = t, a =
|
|
1923
|
+
let n = e, r = t, a = z(Mn, null), s = z(cn, null), l = z(Rt, null), u = z(Cn, "en") ?? "en", { t: f, format: g } = ce(), b = se(), x = At(), { toLocal: S } = Mt(), C = M(null), w = M(null), T = M(!1), E = M(!1), D = M(null), O = M(null), te = null, re = M({
|
|
1914
1924
|
top: 0,
|
|
1915
1925
|
left: 0
|
|
1916
1926
|
}), ie = M({
|
|
1917
1927
|
maxHeight: 0,
|
|
1918
1928
|
maxWidth: 0
|
|
1919
|
-
}), F = `tpl-locale-popover-${
|
|
1920
|
-
function
|
|
1929
|
+
}), F = `tpl-locale-popover-${ct()}`, I = k(() => yr(a?.activeLocale?.value ?? "")), ae = k(() => yr(a?.content.value.settings.locale ?? "en"));
|
|
1930
|
+
function oe(e, t) {
|
|
1921
1931
|
switch (e) {
|
|
1922
1932
|
case "tags-differ": return f.localization.tagsDiffer;
|
|
1923
1933
|
case "hidden": return g(f.localization.hidden, { language: I.value });
|
|
@@ -1927,15 +1937,15 @@ var to = [
|
|
|
1927
1937
|
default: return t === 1 ? f.localization.outOfDate : br(f.localization.staleCount, t, u);
|
|
1928
1938
|
}
|
|
1929
1939
|
}
|
|
1930
|
-
let
|
|
1931
|
-
function
|
|
1940
|
+
let B = k(() => oe(n.state, n.count)), V = k(() => n.popoverState ?? n.state), le = k(() => n.popoverCount ?? n.count), ue = k(() => oe(V.value, le.value)), de = k(() => n.state === "hidden" ? jr : n.state === "changed" ? vr : n.state === "default-stale" ? ur : n.state === "stale" ? _r : hr), fe = k(() => V.value === "default-stale" || (V.value === "missing" || V.value === "stale") && le.value > 1), pe = k(() => n.editable && n.eligibleGaps && s?.isAvailable.value);
|
|
1941
|
+
function me(e = !1) {
|
|
1932
1942
|
T.value = !1, E.value = !1, te = null, e && C.value?.focus({ preventScroll: !0 });
|
|
1933
1943
|
}
|
|
1934
|
-
async function
|
|
1935
|
-
if (T.value) return
|
|
1936
|
-
x.value && (T.value = !0, await
|
|
1944
|
+
async function he() {
|
|
1945
|
+
if (T.value) return me();
|
|
1946
|
+
x.value && (T.value = !0, await ge());
|
|
1937
1947
|
}
|
|
1938
|
-
async function
|
|
1948
|
+
async function ge() {
|
|
1939
1949
|
let e = x.value;
|
|
1940
1950
|
if (!e || !T.value) return;
|
|
1941
1951
|
let t = e.ownerDocument.defaultView, n = t?.visualViewport, r = n?.offsetTop ?? 0, i = n?.offsetLeft ?? 0, a = r + (n?.height ?? t?.innerHeight ?? 0), o = i + (n?.width ?? t?.innerWidth ?? 0), s = e.parentElement?.getBoundingClientRect(), c = Math.max(r, s?.height ? s.top : r) + 8, l = Math.max(i, s?.width ? s.left : i) + 8, u = Math.max(c, Math.min(a, s?.height ? s.bottom : a) - 8), d = Math.max(l, Math.min(o, s?.width ? s.right : o) - 8);
|
|
@@ -1955,65 +1965,65 @@ var to = [
|
|
|
1955
1965
|
}), await _(), T.value && (E.value ? O.value : w.value)?.focus({ preventScroll: !0 });
|
|
1956
1966
|
}
|
|
1957
1967
|
c(E, async () => {
|
|
1958
|
-
T.value && (await
|
|
1968
|
+
T.value && (await ge(), T.value && !E.value && D.value?.focus({ preventScroll: !0 }));
|
|
1959
1969
|
});
|
|
1960
|
-
function
|
|
1970
|
+
function _e(e) {
|
|
1961
1971
|
let t = e.composedPath();
|
|
1962
|
-
!t.includes(C.value) && !t.includes(w.value) &&
|
|
1972
|
+
!t.includes(C.value) && !t.includes(w.value) && me();
|
|
1963
1973
|
}
|
|
1964
|
-
function
|
|
1974
|
+
function ve(e) {
|
|
1965
1975
|
if (e.composedPath().includes(w.value)) return;
|
|
1966
1976
|
let t = C.value?.getBoundingClientRect();
|
|
1967
|
-
t && te && t.top === te.top && t.right === te.right ||
|
|
1977
|
+
t && te && t.top === te.top && t.right === te.right || me();
|
|
1968
1978
|
}
|
|
1969
|
-
function
|
|
1970
|
-
b.removeEventListener("click",
|
|
1979
|
+
function ye() {
|
|
1980
|
+
b.removeEventListener("click", _e, !0), b.removeEventListener("scroll", ve, !0);
|
|
1971
1981
|
}
|
|
1972
1982
|
c(T, (e) => {
|
|
1973
|
-
|
|
1974
|
-
}, { flush: "sync" }), c(
|
|
1975
|
-
E.value = !1, T.value &&
|
|
1983
|
+
ye(), e ? (b.addEventListener("click", _e, !0), b.addEventListener("scroll", ve, !0)) : r("target", null);
|
|
1984
|
+
}, { flush: "sync" }), c(V, () => {
|
|
1985
|
+
E.value = !1, T.value && ge();
|
|
1976
1986
|
}), c([
|
|
1977
1987
|
() => n.blockId,
|
|
1978
1988
|
() => n.state,
|
|
1979
1989
|
() => a?.activeLocale?.value,
|
|
1980
1990
|
() => a?.state.template?.id,
|
|
1981
1991
|
() => a?.loadVersion?.value
|
|
1982
|
-
], () =>
|
|
1983
|
-
let
|
|
1984
|
-
(T.value || x.value) && (r("target", e ?? null), T.value ||
|
|
1992
|
+
], () => me()), ne(ye);
|
|
1993
|
+
let be = (e) => {
|
|
1994
|
+
(T.value || x.value) && (r("target", e ?? null), T.value || he());
|
|
1985
1995
|
};
|
|
1986
1996
|
c(() => n.blockId, (e, t) => {
|
|
1987
|
-
t && l?.get(t) ===
|
|
1997
|
+
t && l?.get(t) === be && l.delete(t), l?.set(e, be);
|
|
1988
1998
|
}, { immediate: !0 }), ne(() => {
|
|
1989
|
-
l?.get(n.blockId) ===
|
|
1999
|
+
l?.get(n.blockId) === be && l.delete(n.blockId);
|
|
1990
2000
|
});
|
|
1991
|
-
function
|
|
1992
|
-
a?.keepTranslations?.(n.blockId, n.stale),
|
|
2001
|
+
function xe() {
|
|
2002
|
+
a?.keepTranslations?.(n.blockId, n.stale), me(!0);
|
|
1993
2003
|
}
|
|
1994
|
-
function
|
|
1995
|
-
a?.resetLocaleFields?.(n.blockId, e),
|
|
2004
|
+
function Se(e) {
|
|
2005
|
+
a?.resetLocaleFields?.(n.blockId, e), me(!0);
|
|
1996
2006
|
}
|
|
1997
|
-
function
|
|
1998
|
-
a?.setBlockHidden?.(n.blockId, !1),
|
|
2007
|
+
function Ce() {
|
|
2008
|
+
a?.setBlockHidden?.(n.blockId, !1), me(!0);
|
|
1999
2009
|
}
|
|
2000
|
-
function
|
|
2001
|
-
a?.setActiveLocale?.(e),
|
|
2010
|
+
function we(e) {
|
|
2011
|
+
a?.setActiveLocale?.(e), me();
|
|
2002
2012
|
}
|
|
2003
|
-
function
|
|
2004
|
-
|
|
2005
|
-
only:
|
|
2013
|
+
function Te() {
|
|
2014
|
+
pe.value && !s?.running.value && (V.value === "tags-differ" && n.replacesCurrent ? E.value = !0 : s?.translate({
|
|
2015
|
+
only: V.value === "tags-differ" ? "all" : "gaps",
|
|
2006
2016
|
blockId: n.blockId
|
|
2007
2017
|
}));
|
|
2008
2018
|
}
|
|
2009
|
-
function
|
|
2019
|
+
function Ee() {
|
|
2010
2020
|
E.value = !1;
|
|
2011
2021
|
}
|
|
2012
|
-
function
|
|
2013
|
-
E.value ?
|
|
2022
|
+
function De() {
|
|
2023
|
+
E.value ? Ee() : me(!0);
|
|
2014
2024
|
}
|
|
2015
|
-
function
|
|
2016
|
-
|
|
2025
|
+
function Oe() {
|
|
2026
|
+
pe.value && !s?.running.value && n.translationCount && (E.value = !1, s?.translate({
|
|
2017
2027
|
only: "all",
|
|
2018
2028
|
blockId: n.blockId
|
|
2019
2029
|
}));
|
|
@@ -2024,19 +2034,19 @@ var to = [
|
|
|
2024
2034
|
type: "button",
|
|
2025
2035
|
"data-testid": "locale-chip",
|
|
2026
2036
|
"data-state": e.state,
|
|
2027
|
-
"aria-label":
|
|
2028
|
-
title:
|
|
2037
|
+
"aria-label": B.value,
|
|
2038
|
+
title: B.value,
|
|
2029
2039
|
"aria-expanded": T.value,
|
|
2030
2040
|
"aria-controls": T.value ? F : void 0,
|
|
2031
2041
|
"aria-haspopup": "dialog",
|
|
2032
2042
|
class: "tpl-locale-chip tpl:flex tpl:size-5 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-full tpl:border-none tpl:p-0 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:ring-1 tpl:ring-[var(--tpl-border)] tpl:transition-colors tpl:hover:bg-[var(--tpl-bg-hover)] tpl:hover:shadow-[var(--tpl-shadow-sm)] tpl:focus-visible:outline-none tpl:focus-visible:shadow-[var(--tpl-ring)] tpl:hover:focus-visible:shadow-[var(--tpl-ring),var(--tpl-shadow-sm)]",
|
|
2033
|
-
onClick: i(
|
|
2034
|
-
onKeydown: [o(i(
|
|
2035
|
-
}, [(m(),
|
|
2043
|
+
onClick: i(he, ["stop"]),
|
|
2044
|
+
onKeydown: [o(i(he, ["stop", "prevent"]), ["enter"]), o(i(De, ["stop", "prevent"]), ["esc"])]
|
|
2045
|
+
}, [(m(), R(p(de.value), {
|
|
2036
2046
|
size: 12,
|
|
2037
2047
|
"stroke-width": 2,
|
|
2038
2048
|
"aria-hidden": "true"
|
|
2039
|
-
}))], 40, to), A(x) && T.value ? (m(),
|
|
2049
|
+
}))], 40, to), A(x) && T.value ? (m(), R(ee, {
|
|
2040
2050
|
key: 0,
|
|
2041
2051
|
to: A(x)
|
|
2042
2052
|
}, [P("div", {
|
|
@@ -2044,7 +2054,7 @@ var to = [
|
|
|
2044
2054
|
ref_key: "popover",
|
|
2045
2055
|
ref: w,
|
|
2046
2056
|
role: "dialog",
|
|
2047
|
-
"aria-label": E.value ? void 0 :
|
|
2057
|
+
"aria-label": E.value ? void 0 : ue.value,
|
|
2048
2058
|
"aria-labelledby": E.value ? `${F}-question` : void 0,
|
|
2049
2059
|
"aria-describedby": E.value ? `${F}-warning` : void 0,
|
|
2050
2060
|
tabindex: "-1",
|
|
@@ -2057,7 +2067,7 @@ var to = [
|
|
|
2057
2067
|
maxWidth: `${ie.value.maxWidth}px`
|
|
2058
2068
|
}),
|
|
2059
2069
|
onClick: n[2] ||= i(() => {}, ["stop"]),
|
|
2060
|
-
onKeydown: o(i(
|
|
2070
|
+
onKeydown: o(i(De, ["stop", "prevent"]), ["esc"])
|
|
2061
2071
|
}, [E.value ? (m(), N(L, { key: 0 }, [
|
|
2062
2072
|
P("h3", {
|
|
2063
2073
|
id: `${F}-question`,
|
|
@@ -2073,69 +2083,69 @@ var to = [
|
|
|
2073
2083
|
type: "button",
|
|
2074
2084
|
"data-testid": "translation-confirm-cancel",
|
|
2075
2085
|
class: h(A(Sr)),
|
|
2076
|
-
onClick:
|
|
2086
|
+
onClick: Ee
|
|
2077
2087
|
}, d(A(f).localization.cancel), 3), P("button", {
|
|
2078
2088
|
type: "button",
|
|
2079
2089
|
"data-testid": "translation-confirm",
|
|
2080
2090
|
class: h(A(Cr)),
|
|
2081
|
-
disabled: !
|
|
2082
|
-
onClick:
|
|
2091
|
+
disabled: !pe.value || !!A(s)?.running.value || !e.translationCount,
|
|
2092
|
+
onClick: Oe
|
|
2083
2093
|
}, d(A(br)(A(f).localization.translateAllFields, e.translationCount ?? 0, A(u))), 11, oo)])
|
|
2084
2094
|
], 64)) : (m(), N(L, { key: 1 }, [
|
|
2085
|
-
|
|
2086
|
-
|
|
2095
|
+
fe.value ? (m(), N("p", so, d(ue.value), 1)) : j("", !0),
|
|
2096
|
+
V.value === "missing" ? (m(), N("p", co, d(A(g)(A(f).localization.missingExplanation, { default: ae.value })), 1)) : V.value === "stale" ? (m(), N(L, { key: 2 }, [P("p", lo, d(A(g)(A(f).localization.staleExplanation, { default: ae.value })), 1), P("p", uo, d(A(g)(A(f).localization.currentExcerpt, { excerpt: e.excerpt })), 1)], 64)) : V.value === "tags-differ" ? (m(), N("p", fo, d(A(g)(A(f).localization.tagsDifferExplanation, { default: ae.value })), 1)) : V.value === "changed" ? (m(), N("p", po, d(A(br)(A(f).localization.changedProperties, le.value, A(u), { default: ae.value })), 1)) : V.value === "hidden" ? (m(), N("p", mo, d(A(g)(A(f).localization.hiddenExplanation, { language: I.value })), 1)) : (m(), N("ul", ho, [(m(!0), N(L, null, v(e.staleLocales, (e) => (m(), N("li", {
|
|
2087
2097
|
key: e,
|
|
2088
2098
|
class: "tpl:flex tpl:items-center tpl:justify-between tpl:gap-3"
|
|
2089
2099
|
}, [P("span", null, d(A(yr)(e)), 1), P("button", {
|
|
2090
2100
|
type: "button",
|
|
2091
2101
|
class: h(A(xr)),
|
|
2092
|
-
onClick: (t) =>
|
|
2102
|
+
onClick: (t) => we(e)
|
|
2093
2103
|
}, d(A(f).localization.open), 11, go)]))), 128))])),
|
|
2094
|
-
e.editable &&
|
|
2095
|
-
|
|
2104
|
+
e.editable && V.value !== "default-stale" ? (m(), N("div", _o, [
|
|
2105
|
+
pe.value && (V.value === "missing" || V.value === "stale" || V.value === "tags-differ") ? (m(), N("button", {
|
|
2096
2106
|
key: 0,
|
|
2097
2107
|
type: "button",
|
|
2098
2108
|
ref_key: "retranslate",
|
|
2099
2109
|
ref: D,
|
|
2100
|
-
"data-testid":
|
|
2110
|
+
"data-testid": V.value === "missing" ? "locale-translate" : "locale-retranslate",
|
|
2101
2111
|
class: h(A(Sr)),
|
|
2102
2112
|
disabled: !!A(s)?.running.value,
|
|
2103
|
-
onClick:
|
|
2104
|
-
}, d(
|
|
2105
|
-
|
|
2113
|
+
onClick: Te
|
|
2114
|
+
}, d(V.value === "missing" ? A(f).localization.translate : A(f).localization.retranslate), 11, vo)) : j("", !0),
|
|
2115
|
+
V.value === "stale" || V.value === "tags-differ" ? (m(), N(L, { key: 1 }, [V.value === "stale" ? (m(), N("button", {
|
|
2106
2116
|
key: 0,
|
|
2107
2117
|
type: "button",
|
|
2108
2118
|
"data-testid": "locale-keep",
|
|
2109
|
-
class: h(
|
|
2110
|
-
onClick:
|
|
2119
|
+
class: h(pe.value ? A(xr) : A(Sr)),
|
|
2120
|
+
onClick: xe
|
|
2111
2121
|
}, d(A(f).localization.keep), 3)) : j("", !0), P("button", {
|
|
2112
2122
|
type: "button",
|
|
2113
2123
|
"data-testid": "locale-use-default",
|
|
2114
|
-
class: h(
|
|
2115
|
-
onClick: n[0] ||= (t) =>
|
|
2124
|
+
class: h(V.value === "tags-differ" && !pe.value ? A(Sr) : A(xr)),
|
|
2125
|
+
onClick: n[0] ||= (t) => Se(V.value === "tags-differ" ? e.tagsDiffer ?? [] : e.stale)
|
|
2116
2126
|
}, d(A(g)(A(f).localization.useDefaultLanguage, { default: ae.value })), 3)], 64)) : j("", !0),
|
|
2117
|
-
|
|
2127
|
+
V.value === "changed" ? (m(), N("button", {
|
|
2118
2128
|
key: 2,
|
|
2119
2129
|
type: "button",
|
|
2120
2130
|
"data-testid": "locale-reset",
|
|
2121
2131
|
class: h(A(Sr)),
|
|
2122
|
-
onClick: n[1] ||= (t) =>
|
|
2132
|
+
onClick: n[1] ||= (t) => Se(e.setPaths)
|
|
2123
2133
|
}, d(A(f).localization.resetChanges), 3)) : j("", !0),
|
|
2124
|
-
|
|
2134
|
+
V.value === "hidden" ? (m(), N("button", {
|
|
2125
2135
|
key: 3,
|
|
2126
2136
|
type: "button",
|
|
2127
2137
|
"data-testid": "locale-show",
|
|
2128
2138
|
class: h(A(Sr)),
|
|
2129
|
-
onClick:
|
|
2139
|
+
onClick: Ce
|
|
2130
2140
|
}, d(A(f).localization.show), 3)) : j("", !0)
|
|
2131
2141
|
])) : j("", !0)
|
|
2132
2142
|
], 64))], 44, no)], 8, ["to"])) : j("", !0)], 64));
|
|
2133
2143
|
}
|
|
2134
|
-
}), [["__scopeId", "data-v-3343ae7d"]]), bo = /* @__PURE__ */
|
|
2144
|
+
}), [["__scopeId", "data-v-3343ae7d"]]), bo = /* @__PURE__ */ B({
|
|
2135
2145
|
__name: "LocaleMarkers",
|
|
2136
2146
|
props: { block: {} },
|
|
2137
2147
|
setup(e) {
|
|
2138
|
-
let t = e, n =
|
|
2148
|
+
let t = e, n = z(Mn, null), r = z(Jt, void 0), i = z(mn, []), a = z(It, qe.liquid), o = z(hn, k(() => /* @__PURE__ */ new Set())), s = k(() => n?.activeLocale?.value), l = k(() => s.value ? t.block.l10n?.[s.value] : void 0), u = k(() => ({
|
|
2139
2149
|
blocks: [t.block.type === "section" || t.block.type === "wrapper" ? {
|
|
2140
2150
|
...t.block,
|
|
2141
2151
|
children: []
|
|
@@ -2144,14 +2154,14 @@ var to = [
|
|
|
2144
2154
|
locale: n.content.value.settings.locale,
|
|
2145
2155
|
locales: n.content.value.settings.locales
|
|
2146
2156
|
}
|
|
2147
|
-
})), d = k(() => n && s.value && !o.value.has(s.value) ?
|
|
2157
|
+
})), d = k(() => n && s.value && !o.value.has(s.value) ? Oe(u.value, s.value, i) : {
|
|
2148
2158
|
missing: [],
|
|
2149
2159
|
stale: [],
|
|
2150
2160
|
translated: []
|
|
2151
2161
|
}), f = k(() => d.value.stale.map((e) => e.slice(t.block.id.length + 1))), p = k(() => d.value.translated.flatMap((e) => {
|
|
2152
|
-
let n = e.slice(t.block.id.length + 1), r =
|
|
2162
|
+
let n = e.slice(t.block.id.length + 1), r = Tt(t.block, n), i = l.value?.text?.[n]?.value, o = t.block.type === "html" || Ze[t.block.type]?.includes(n) ? "html" : "text";
|
|
2153
2163
|
return typeof r == "string" && i !== void 0 && eo(r, i, a, o) ? [n] : [];
|
|
2154
|
-
})), h = M(null), g = k(() => n && s.value && !o.value.has(s.value) ?
|
|
2164
|
+
})), h = M(null), g = k(() => n && s.value && !o.value.has(s.value) ? je(u.value, s.value, {
|
|
2155
2165
|
syntax: a,
|
|
2156
2166
|
definitions: i,
|
|
2157
2167
|
doNotTranslate: r?.doNotTranslate,
|
|
@@ -2161,9 +2171,9 @@ var to = [
|
|
|
2161
2171
|
let n = e.slice(t.block.id.length + 1);
|
|
2162
2172
|
return d.value.translated.includes(e) && !p.value.includes(n);
|
|
2163
2173
|
})), v = k(() => Object.keys(l.value?.set ?? {}).filter((e) => {
|
|
2164
|
-
let n = e.split("."), r = n.pop(), i = n.length ?
|
|
2165
|
-
return Array.isArray(i) ?
|
|
2166
|
-
})), y = k(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) &&
|
|
2174
|
+
let n = e.split("."), r = n.pop(), i = n.length ? Tt(t.block, n.join(".")) : t.block;
|
|
2175
|
+
return Array.isArray(i) ? Tt(i, r) !== void 0 : i !== void 0;
|
|
2176
|
+
})), y = k(() => !s.value && n ? (n.content.value.settings.locales ?? []).filter((e) => !o.value.has(e) && Oe(u.value, e, i).stale.length > 0) : []), b = k(() => s.value ? o.value.has(s.value) ? null : l.value?.hidden ? "hidden" : d.value.missing.length ? "missing" : f.value.length ? "stale" : p.value.length ? "tags-differ" : v.value.length ? "changed" : null : y.value.length ? "default-stale" : null);
|
|
2167
2177
|
function x(e) {
|
|
2168
2178
|
return e === "missing" ? d.value.missing.length : e === "stale" ? f.value.length : e === "tags-differ" ? p.value.length : e === "default-stale" ? y.value.length : v.value.length;
|
|
2169
2179
|
}
|
|
@@ -2172,12 +2182,12 @@ var to = [
|
|
|
2172
2182
|
h.value = null;
|
|
2173
2183
|
});
|
|
2174
2184
|
let T = k(() => {
|
|
2175
|
-
let e =
|
|
2185
|
+
let e = Tt(t.block, f.value[0] ?? "");
|
|
2176
2186
|
if (typeof e != "string") return "";
|
|
2177
2187
|
let n = e.split(/<[^>]*>/).join("");
|
|
2178
2188
|
return Array.from(n).slice(0, 60).join("");
|
|
2179
2189
|
});
|
|
2180
|
-
return (t, n) => A(r) && b.value ? (m(),
|
|
2190
|
+
return (t, n) => A(r) && b.value ? (m(), R(yo, {
|
|
2181
2191
|
key: 0,
|
|
2182
2192
|
"block-id": e.block.id,
|
|
2183
2193
|
state: b.value,
|
|
@@ -2225,7 +2235,7 @@ var to = [
|
|
|
2225
2235
|
}, Ao = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-chrome-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, jo = {
|
|
2226
2236
|
key: 4,
|
|
2227
2237
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2228
|
-
}, Mo = ["aria-label", "title"], No = /*#__PURE__*/ wr(/* @__PURE__ */
|
|
2238
|
+
}, Mo = ["aria-label", "title"], No = /*#__PURE__*/ wr(/* @__PURE__ */ B({
|
|
2229
2239
|
__name: "BlockWrapper",
|
|
2230
2240
|
props: {
|
|
2231
2241
|
block: {},
|
|
@@ -2238,33 +2248,33 @@ var to = [
|
|
|
2238
2248
|
},
|
|
2239
2249
|
emits: ["select"],
|
|
2240
2250
|
setup(t, { emit: n }) {
|
|
2241
|
-
let a =
|
|
2251
|
+
let a = oe(() => import("./BlockIssueBadge-3k568_Od.js")), o = t, s = k(() => o.displayBlock ?? o.block), l = n, { t: p, format: g } = ce(), v = z(Nn, null), b = M(null), x = k(() => v?.liftedBlockId.value === o.block.id), S = k(() => x.value ? g(p.blockActions.dragLifted, { block: o.block.type }) : p.blockActions.drag);
|
|
2242
2252
|
async function C() {
|
|
2243
2253
|
await _(), b.value?.focus();
|
|
2244
2254
|
}
|
|
2245
2255
|
function w(e) {
|
|
2246
2256
|
v && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), x.value ? v.drop(o.block.id) : v.lift(o.block.id)) : x.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), v.cancel(), C()) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), v.moveUp(o.block.id), C()) : e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), v.moveDown(o.block.id), C())));
|
|
2247
2257
|
}
|
|
2248
|
-
let T = k(() => !o.viewport || !s.value.visibility ? !1 : s.value.visibility[o.viewport] === !1), ee = k(() => !!(
|
|
2258
|
+
let T = k(() => !o.viewport || !s.value.visibility ? !1 : s.value.visibility[o.viewport] === !1), ee = k(() => !!(xe?.activeLocale?.value && o.block.l10n?.[xe.activeLocale.value]?.hidden)), D = k(() => o.previewMode === !0 && (T.value || ee.value)), O = k(() => o.viewport ? {
|
|
2249
2259
|
desktop: p.viewport.desktop,
|
|
2250
2260
|
mobile: p.viewport.mobile
|
|
2251
|
-
}[o.viewport] ?? o.viewport : ""), ne = k(() => !!s.value.displayCondition), re =
|
|
2261
|
+
}[o.viewport] ?? o.viewport : ""), ne = k(() => !!s.value.displayCondition), re = z(On, null), ie = z(xn, null), F = z(fn, {}), I = k(() => F.savedBlocks?.isPicking.value === !0), L = k(() => !o.nested && F.savedBlocks?.isAvailable.value === !0 && F.savedBlocks?.canCreate.value === !0), ae = k(() => o.isSelected && !I.value), B = k(() => F.comments?.getBlockCount(o.block.id) ?? 0), se = M(null), V = M(null), le = M(null), ue = M(null), de = M({
|
|
2252
2262
|
left: "calc(100% + 8px)",
|
|
2253
2263
|
top: "50%"
|
|
2254
|
-
}),
|
|
2255
|
-
function
|
|
2256
|
-
let e =
|
|
2264
|
+
}), fe = M(!1), pe = k(() => V.value ?? ue.value), me = k(() => pe.value?.closest(".tpl-body"));
|
|
2265
|
+
function he() {
|
|
2266
|
+
let e = fe.value, t = V.value, n = ue.value, r = se.value;
|
|
2257
2267
|
if (!t && !n || !r?.offsetWidth) return;
|
|
2258
|
-
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o =
|
|
2268
|
+
let i = r.getBoundingClientRect(), a = i.width / r.offsetWidth || 1, o = me.value, s = o ? (o.getBoundingClientRect().left - i.left) / a + o.clientLeft : -Infinity, c = o ? s + o.clientWidth : Infinity, l = getComputedStyle(r).direction === "rtl";
|
|
2259
2269
|
if (n?.offsetWidth) {
|
|
2260
2270
|
let t = l ? -4 - n.offsetWidth : r.offsetWidth + 4, i = t >= s + 4 && t + n.offsetWidth + 4 <= c;
|
|
2261
2271
|
if (e === i) {
|
|
2262
|
-
|
|
2272
|
+
fe.value = !i, _(he);
|
|
2263
2273
|
return;
|
|
2264
2274
|
}
|
|
2265
2275
|
}
|
|
2266
2276
|
if (!t?.offsetWidth) return;
|
|
2267
|
-
let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d =
|
|
2277
|
+
let u = Math.max(s + 4, Math.min(r.offsetWidth + 8, c - t.offsetWidth - 4)), d = le.value, f = Math.max(28, d?.offsetHeight ? d.offsetTop + d.offsetHeight + 4 : 0), p = Math.max(f + t.offsetHeight / 2, r.offsetHeight / 2), m = u < r.offsetWidth && p + t.offsetHeight / 2 <= r.offsetHeight + 8 ? `${p}px` : "50%";
|
|
2268
2278
|
if (u >= r.offsetWidth && n?.offsetWidth && !e && !l) {
|
|
2269
2279
|
let e = (n.getBoundingClientRect().bottom - i.top) / a + 4 + t.offsetHeight / 2;
|
|
2270
2280
|
e > r.offsetHeight / 2 && (m = `${e}px`);
|
|
@@ -2276,46 +2286,46 @@ var to = [
|
|
|
2276
2286
|
u = Math.max(s + 4, Math.min(n, c - t.offsetWidth - 4));
|
|
2277
2287
|
}
|
|
2278
2288
|
}
|
|
2279
|
-
(
|
|
2289
|
+
(de.value.left !== `${u}px` || de.value.top !== m) && (de.value = {
|
|
2280
2290
|
left: `${u}px`,
|
|
2281
2291
|
top: m
|
|
2282
2292
|
});
|
|
2283
2293
|
}
|
|
2284
|
-
f(
|
|
2285
|
-
|
|
2286
|
-
|
|
2294
|
+
f(he), r(k(() => pe.value ? [
|
|
2295
|
+
se.value,
|
|
2296
|
+
V.value,
|
|
2297
|
+
le.value,
|
|
2287
2298
|
ue.value,
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
})), Oe = k(() => sa(s.value, { backgroundImageUrl: xe.value })), ke = k(() => {
|
|
2299
|
+
me.value
|
|
2300
|
+
].filter((e) => !!e) : []), he), e(me, "scroll", he, { passive: !0 });
|
|
2301
|
+
let ge = k(() => F.collaboration?.lockOf(o.block.id) ?? null), _e = k(() => ge.value?.holder.type === "guest" ? p.collaboration.guest : ge.value?.holder.name ?? ""), ve = k(() => F.collaboration?.agentHighlightOf(o.block.id) ?? F.ai?.highlightOf(o.block.id) ?? null), ye = ir(() => s.value.type === "section" ? s.value.backgroundImage : void 0), be = ir(() => s.value.type === "section" ? s.value.wrapper?.backgroundImage : void 0), xe = z(Mn, null), Ce = xe ? Nt(xe) : null, we = z(vn, null) ?? Ce?.content ?? null;
|
|
2302
|
+
c([() => xe?.activeLocale?.value, () => Ce && Se(Ce.settings.value)], he, { flush: "post" });
|
|
2303
|
+
let Te = z(Qt, void 0), Ee = k(() => ta(s.value, {
|
|
2304
|
+
backgroundImageUrl: ye.value,
|
|
2305
|
+
heroBoxWidth: Yn(s.value) ? er(s.value, we?.value, Te) : void 0
|
|
2306
|
+
})), De = k(() => sa(s.value, { backgroundImageUrl: be.value })), Oe = k(() => {
|
|
2297
2307
|
let e = s.value;
|
|
2298
2308
|
return e.type === "section" && e.wrapper?.fullWidth === !0 ? e : void 0;
|
|
2299
|
-
}),
|
|
2300
|
-
function
|
|
2309
|
+
}), ke = k(() => oa(Oe.value?.wrapper?.padding));
|
|
2310
|
+
function Ae(e) {
|
|
2301
2311
|
o.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), l("select"));
|
|
2302
2312
|
}
|
|
2303
|
-
function
|
|
2313
|
+
function je() {
|
|
2304
2314
|
re?.deleteBlock(o.block.id);
|
|
2305
2315
|
}
|
|
2306
|
-
function
|
|
2316
|
+
function Me() {
|
|
2307
2317
|
re?.duplicateBlock(o.block);
|
|
2308
2318
|
}
|
|
2309
|
-
function
|
|
2319
|
+
function Ne() {
|
|
2310
2320
|
F.savedBlocks?.startPicking(o.block.id);
|
|
2311
2321
|
}
|
|
2312
|
-
function
|
|
2322
|
+
function Pe() {
|
|
2313
2323
|
ie?.toggleBlock(o.block.id);
|
|
2314
2324
|
}
|
|
2315
2325
|
return (e, n) => D.value ? j("", !0) : (m(), N("div", {
|
|
2316
2326
|
key: 0,
|
|
2317
2327
|
ref_key: "blockElement",
|
|
2318
|
-
ref:
|
|
2328
|
+
ref: se,
|
|
2319
2329
|
class: h(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
|
|
2320
2330
|
"tpl-block--selected": t.isSelected,
|
|
2321
2331
|
"tpl-block--locale-hidden": ee.value,
|
|
@@ -2326,48 +2336,48 @@ var to = [
|
|
|
2326
2336
|
"data-block-id": t.block.id,
|
|
2327
2337
|
"data-block-type": t.block.type,
|
|
2328
2338
|
"data-tpl-picked": t.picked || void 0,
|
|
2329
|
-
onClick:
|
|
2339
|
+
onClick: Ae
|
|
2330
2340
|
}, [
|
|
2331
2341
|
P("div", {
|
|
2332
2342
|
ref_key: "badgesElement",
|
|
2333
|
-
ref:
|
|
2343
|
+
ref: le,
|
|
2334
2344
|
class: "tpl-block-badges tpl:absolute tpl:top-1 tpl:inset-e-1 tpl:z-10 tpl:flex tpl:gap-1"
|
|
2335
2345
|
}, [
|
|
2336
|
-
|
|
2346
|
+
B.value > 0 && !T.value ? (m(), N("button", {
|
|
2337
2347
|
key: 0,
|
|
2338
2348
|
ref_key: "commentElement",
|
|
2339
|
-
ref:
|
|
2340
|
-
class: h(["tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
2341
|
-
"aria-label": A(g)(A(p).blockActions.comments, { count: String(
|
|
2349
|
+
ref: ue,
|
|
2350
|
+
class: h(["tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]", fe.value ? void 0 : "tpl:absolute tpl:-top-2 tpl:inset-s-full tpl:ms-2"]),
|
|
2351
|
+
"aria-label": A(g)(A(p).blockActions.comments, { count: String(B.value) }),
|
|
2342
2352
|
onClick: n[0] ||= i((e) => A(F).comments?.openForBlock(t.block.id), ["stop"])
|
|
2343
2353
|
}, [E(A(Er), {
|
|
2344
2354
|
size: 12,
|
|
2345
2355
|
"stroke-width": 2.5
|
|
2346
|
-
}), te(" " + d(
|
|
2356
|
+
}), te(" " + d(B.value), 1)], 10, So)) : j("", !0),
|
|
2347
2357
|
E(A(a), { "block-id": t.block.id }, null, 8, ["block-id"]),
|
|
2348
|
-
t.previewMode ? j("", !0) : (m(),
|
|
2358
|
+
t.previewMode ? j("", !0) : (m(), R(bo, {
|
|
2349
2359
|
key: 1,
|
|
2350
2360
|
block: t.block
|
|
2351
2361
|
}, null, 8, ["block"]))
|
|
2352
2362
|
], 512),
|
|
2353
|
-
|
|
2363
|
+
ge.value ? (m(), N("div", {
|
|
2354
2364
|
key: 0,
|
|
2355
2365
|
"data-testid": "block-lock",
|
|
2356
|
-
"data-lock-holder":
|
|
2366
|
+
"data-lock-holder": ge.value.holder.sessionId,
|
|
2357
2367
|
class: "tpl-block-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
2358
2368
|
style: y({
|
|
2359
|
-
outline: `2px solid ${
|
|
2369
|
+
outline: `2px solid ${ge.value.holder.color}`,
|
|
2360
2370
|
outlineOffset: "-1px"
|
|
2361
2371
|
})
|
|
2362
2372
|
}, [P("span", {
|
|
2363
2373
|
class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:-translate-x-1/2 tpl:-translate-y-full tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
|
|
2364
2374
|
style: y({
|
|
2365
|
-
backgroundColor:
|
|
2366
|
-
color: A(Or)(
|
|
2375
|
+
backgroundColor: ge.value.holder.color,
|
|
2376
|
+
color: A(Or)(ge.value.holder.color)
|
|
2367
2377
|
})
|
|
2368
|
-
}, d(A(g)(A(p).collaboration.editing, { name:
|
|
2369
|
-
|
|
2370
|
-
key:
|
|
2378
|
+
}, d(A(g)(A(p).collaboration.editing, { name: _e.value })), 5)], 12, Co)) : j("", !0),
|
|
2379
|
+
ve.value === null ? j("", !0) : (m(), N("div", {
|
|
2380
|
+
key: ve.value,
|
|
2371
2381
|
"data-testid": "block-agent-highlight",
|
|
2372
2382
|
"aria-hidden": "true",
|
|
2373
2383
|
class: "tpl-block-agent-highlight tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm"
|
|
@@ -2375,8 +2385,8 @@ var to = [
|
|
|
2375
2385
|
ae.value ? (m(), N("div", {
|
|
2376
2386
|
key: 2,
|
|
2377
2387
|
ref_key: "actionsElement",
|
|
2378
|
-
ref:
|
|
2379
|
-
style: y(
|
|
2388
|
+
ref: V,
|
|
2389
|
+
style: y(de.value),
|
|
2380
2390
|
role: "toolbar",
|
|
2381
2391
|
"aria-label": A(p).blockActions.drag,
|
|
2382
2392
|
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:top-1/2 tpl:z-20 tpl:flex tpl:-translate-y-1/2 tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
@@ -2398,7 +2408,7 @@ var to = [
|
|
|
2398
2408
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2399
2409
|
"aria-label": A(p).blockActions.duplicate,
|
|
2400
2410
|
title: A(p).blockActions.duplicate,
|
|
2401
|
-
onClick: i(
|
|
2411
|
+
onClick: i(Me, ["stop"])
|
|
2402
2412
|
}, [E(A(Tr), {
|
|
2403
2413
|
size: 14,
|
|
2404
2414
|
"stroke-width": 1.5
|
|
@@ -2408,7 +2418,7 @@ var to = [
|
|
|
2408
2418
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2409
2419
|
"aria-label": A(p).blockActions.saveAsBlock,
|
|
2410
2420
|
title: A(p).blockActions.saveAsBlock,
|
|
2411
|
-
onClick: i(
|
|
2421
|
+
onClick: i(Ne, ["stop"])
|
|
2412
2422
|
}, [E(A(kr), {
|
|
2413
2423
|
size: 14,
|
|
2414
2424
|
"stroke-width": 1.5
|
|
@@ -2417,7 +2427,7 @@ var to = [
|
|
|
2417
2427
|
class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors",
|
|
2418
2428
|
"aria-label": A(p).blockActions.delete,
|
|
2419
2429
|
title: A(p).blockActions.delete,
|
|
2420
|
-
onClick: i(
|
|
2430
|
+
onClick: i(je, ["stop"])
|
|
2421
2431
|
}, [E(A(Dr), {
|
|
2422
2432
|
size: 14,
|
|
2423
2433
|
"stroke-width": 1.5
|
|
@@ -2432,30 +2442,30 @@ var to = [
|
|
|
2432
2442
|
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
2433
2443
|
"aria-label": A(p).blockActions.conditionToggle,
|
|
2434
2444
|
title: t.block.displayCondition?.label,
|
|
2435
|
-
onClick: i(
|
|
2445
|
+
onClick: i(Pe, ["stop"])
|
|
2436
2446
|
}, [E(A(Mr), {
|
|
2437
2447
|
size: 12,
|
|
2438
2448
|
"stroke-width": 2
|
|
2439
2449
|
})], 8, Mo)])) : j("", !0),
|
|
2440
|
-
|
|
2450
|
+
De.value ? (m(), N("div", {
|
|
2441
2451
|
key: 5,
|
|
2442
|
-
class: h(["tpl-section-wrapper tpl-email-surface", A(Zi)(
|
|
2443
|
-
style: y(
|
|
2444
|
-
}, [
|
|
2452
|
+
class: h(["tpl-section-wrapper tpl-email-surface", A(Zi)(De.value)]),
|
|
2453
|
+
style: y(De.value)
|
|
2454
|
+
}, [Oe.value ? (m(), N("div", {
|
|
2445
2455
|
key: 0,
|
|
2446
2456
|
class: "tpl-band-frame",
|
|
2447
|
-
style: y(
|
|
2457
|
+
style: y(ke.value)
|
|
2448
2458
|
}, [P("div", {
|
|
2449
|
-
class: h(["tpl-block-content tpl-email-surface", A(Zi)(
|
|
2450
|
-
style: y(
|
|
2459
|
+
class: h(["tpl-block-content tpl-email-surface", A(Zi)(Ee.value)]),
|
|
2460
|
+
style: y(Ee.value)
|
|
2451
2461
|
}, [u(e.$slots, "default", {}, void 0, !0)], 6)], 4)) : (m(), N("div", {
|
|
2452
2462
|
key: 1,
|
|
2453
|
-
class: h(["tpl-block-content tpl-email-surface", A(Zi)(
|
|
2454
|
-
style: y(
|
|
2463
|
+
class: h(["tpl-block-content tpl-email-surface", A(Zi)(Ee.value)]),
|
|
2464
|
+
style: y(Ee.value)
|
|
2455
2465
|
}, [u(e.$slots, "default", {}, void 0, !0)], 6))], 6)) : (m(), N("div", {
|
|
2456
2466
|
key: 6,
|
|
2457
|
-
class: h(["tpl-block-content tpl-email-surface", A(Zi)(
|
|
2458
|
-
style: y(
|
|
2467
|
+
class: h(["tpl-block-content tpl-email-surface", A(Zi)(Ee.value)]),
|
|
2468
|
+
style: y(Ee.value)
|
|
2459
2469
|
}, [u(e.$slots, "default", {}, void 0, !0)], 6))
|
|
2460
2470
|
], 10, xo));
|
|
2461
2471
|
}
|
|
@@ -2464,7 +2474,7 @@ var to = [
|
|
|
2464
2474
|
function Po(e) {
|
|
2465
2475
|
let t = /^\s*<p\b/.exec(e);
|
|
2466
2476
|
if (!t) return e;
|
|
2467
|
-
let n =
|
|
2477
|
+
let n = yt(e, t[0].length);
|
|
2468
2478
|
if (n === -1) return e;
|
|
2469
2479
|
let r = /<\/p>\s*$/.exec(e);
|
|
2470
2480
|
if (!r || r.index <= n) return e;
|
|
@@ -2472,17 +2482,17 @@ function Po(e) {
|
|
|
2472
2482
|
return /<\/p>\s*<p\b/i.test(i) ? e : i;
|
|
2473
2483
|
}
|
|
2474
2484
|
// src/components/blocks/TitleBlock.vue
|
|
2475
|
-
var Fo = /* @__PURE__ */
|
|
2485
|
+
var Fo = /* @__PURE__ */ B({
|
|
2476
2486
|
__name: "TitleBlock",
|
|
2477
2487
|
props: {
|
|
2478
2488
|
block: {},
|
|
2479
2489
|
viewport: {}
|
|
2480
2490
|
},
|
|
2481
2491
|
setup(e) {
|
|
2482
|
-
let t = e, n =
|
|
2492
|
+
let t = e, n = oe(() => import("./TitleEditor-B8thQPgg.js")), r = bn(ln, "TitleBlock"), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Ya(() => t.block.content), u = k(() => {
|
|
2483
2493
|
let e = {
|
|
2484
|
-
fontSize: `${
|
|
2485
|
-
lineHeight: String(
|
|
2494
|
+
fontSize: `${st[t.block.level]}px`,
|
|
2495
|
+
lineHeight: String(St),
|
|
2486
2496
|
fontWeight: "700",
|
|
2487
2497
|
textAlign: t.block.textAlign
|
|
2488
2498
|
};
|
|
@@ -2494,7 +2504,7 @@ var Fo = /* @__PURE__ */ z({
|
|
|
2494
2504
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
2495
2505
|
style: y(u.value),
|
|
2496
2506
|
onDblclick: r[0] ||= (...e) => A(c) && A(c)(...e)
|
|
2497
|
-
}, [A(i) ? (m(),
|
|
2507
|
+
}, [A(i) ? (m(), R(A(n), {
|
|
2498
2508
|
key: 0,
|
|
2499
2509
|
block: e.block,
|
|
2500
2510
|
"toolbar-position": A(o),
|
|
@@ -2503,7 +2513,7 @@ var Fo = /* @__PURE__ */ z({
|
|
|
2503
2513
|
"block",
|
|
2504
2514
|
"toolbar-position",
|
|
2505
2515
|
"onDone"
|
|
2506
|
-
])) : (m(),
|
|
2516
|
+
])) : (m(), R(p(d.value), {
|
|
2507
2517
|
key: 1,
|
|
2508
2518
|
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-[inherit] tpl:outline-none",
|
|
2509
2519
|
style: {
|
|
@@ -2515,12 +2525,12 @@ var Fo = /* @__PURE__ */ z({
|
|
|
2515
2525
|
}
|
|
2516
2526
|
}), Io = "hero", Lo = "#1f2937", Ro = "#ffffff";
|
|
2517
2527
|
function zo(e, t) {
|
|
2518
|
-
let n =
|
|
2528
|
+
let n = ke("title", e);
|
|
2519
2529
|
n.color = Ro, n.textAlign = "center";
|
|
2520
|
-
let r =
|
|
2530
|
+
let r = ke("paragraph", e);
|
|
2521
2531
|
r.content = `<p style="text-align: center"><span style="color: ${Ro}">${Bo(t)}</span></p>`;
|
|
2522
|
-
let i =
|
|
2523
|
-
return i.align = "center",
|
|
2532
|
+
let i = ke("button", e);
|
|
2533
|
+
return i.align = "center", ze({
|
|
2524
2534
|
columns: "1",
|
|
2525
2535
|
children: [[
|
|
2526
2536
|
n,
|
|
@@ -2695,10 +2705,10 @@ var ws = Cs(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Ts = Cs(/E
|
|
|
2695
2705
|
capture: !1,
|
|
2696
2706
|
passive: !1
|
|
2697
2707
|
};
|
|
2698
|
-
function
|
|
2708
|
+
function H(e, t, n) {
|
|
2699
2709
|
e.addEventListener(t, n, !ws && As);
|
|
2700
2710
|
}
|
|
2701
|
-
function
|
|
2711
|
+
function U(e, t, n) {
|
|
2702
2712
|
e.removeEventListener(t, n, !ws && As);
|
|
2703
2713
|
}
|
|
2704
2714
|
function js(e, t) {
|
|
@@ -2730,7 +2740,7 @@ var Ps = /\s+/g;
|
|
|
2730
2740
|
function Fs(e, t, n) {
|
|
2731
2741
|
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Ps, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Ps, " "));
|
|
2732
2742
|
}
|
|
2733
|
-
function
|
|
2743
|
+
function W(e, t, n) {
|
|
2734
2744
|
var r = e && e.style;
|
|
2735
2745
|
if (r) {
|
|
2736
2746
|
if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
|
|
@@ -2741,7 +2751,7 @@ function Is(e, t) {
|
|
|
2741
2751
|
var n = "";
|
|
2742
2752
|
if (typeof e == "string") n = e;
|
|
2743
2753
|
else do {
|
|
2744
|
-
var r =
|
|
2754
|
+
var r = W(e, "transform");
|
|
2745
2755
|
r && r !== "none" && (n = r + " " + n);
|
|
2746
2756
|
} while (!t && (e = e.parentNode));
|
|
2747
2757
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
@@ -2758,13 +2768,13 @@ function Ls(e, t, n) {
|
|
|
2758
2768
|
function Rs() {
|
|
2759
2769
|
return document.scrollingElement || document.documentElement;
|
|
2760
2770
|
}
|
|
2761
|
-
function
|
|
2771
|
+
function G(e, t, n, r, i) {
|
|
2762
2772
|
if (e.getBoundingClientRect || e === window) {
|
|
2763
2773
|
var a, o, s, c, l, u, d;
|
|
2764
2774
|
if (e !== window && e.parentNode && e !== Rs() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !ws)) do
|
|
2765
|
-
if (i && i.getBoundingClientRect && (
|
|
2775
|
+
if (i && i.getBoundingClientRect && (W(i, "transform") !== "none" || n && W(i, "position") !== "static")) {
|
|
2766
2776
|
var f = i.getBoundingClientRect();
|
|
2767
|
-
o -= f.top + parseInt(
|
|
2777
|
+
o -= f.top + parseInt(W(i, "border-top-width")), s -= f.left + parseInt(W(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
2768
2778
|
break;
|
|
2769
2779
|
}
|
|
2770
2780
|
while (i = i.parentNode);
|
|
@@ -2783,8 +2793,8 @@ function W(e, t, n, r, i) {
|
|
|
2783
2793
|
}
|
|
2784
2794
|
}
|
|
2785
2795
|
function zs(e, t, n) {
|
|
2786
|
-
for (var r = Gs(e, !0), i =
|
|
2787
|
-
var a =
|
|
2796
|
+
for (var r = Gs(e, !0), i = G(e)[t]; r;) {
|
|
2797
|
+
var a = G(r)[n], o = void 0;
|
|
2788
2798
|
if (o = i >= a, !o) return r;
|
|
2789
2799
|
if (r === Rs()) break;
|
|
2790
2800
|
r = Gs(r, !1);
|
|
@@ -2802,7 +2812,7 @@ function Bs(e, t, n, r) {
|
|
|
2802
2812
|
return null;
|
|
2803
2813
|
}
|
|
2804
2814
|
function Vs(e, t) {
|
|
2805
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost ||
|
|
2815
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || W(n, "display") === "none" || t && !js(n, t));) n = n.previousElementSibling;
|
|
2806
2816
|
return n || null;
|
|
2807
2817
|
}
|
|
2808
2818
|
function Hs(e, t) {
|
|
@@ -2830,7 +2840,7 @@ function Gs(e, t) {
|
|
|
2830
2840
|
var n = e, r = !1;
|
|
2831
2841
|
do
|
|
2832
2842
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2833
|
-
var i =
|
|
2843
|
+
var i = W(n);
|
|
2834
2844
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2835
2845
|
if (!n.getBoundingClientRect || n === document.body) return Rs();
|
|
2836
2846
|
if (r || t) return n;
|
|
@@ -2872,7 +2882,7 @@ function $s(e, t, n) {
|
|
|
2872
2882
|
var r = {};
|
|
2873
2883
|
return Array.from(e.children).forEach(function(i) {
|
|
2874
2884
|
if (Ns(i, t.draggable, e, !1) && !i.animated && i !== n) {
|
|
2875
|
-
var a =
|
|
2885
|
+
var a = G(i);
|
|
2876
2886
|
r.left = Math.min(r.left ?? 1 / 0, a.left), r.top = Math.min(r.top ?? 1 / 0, a.top), r.right = Math.max(r.right ?? -1 / 0, a.right), r.bottom = Math.max(r.bottom ?? -1 / 0, a.bottom);
|
|
2877
2887
|
}
|
|
2878
2888
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
@@ -2883,10 +2893,10 @@ function tc() {
|
|
|
2883
2893
|
return {
|
|
2884
2894
|
captureAnimationState: function() {
|
|
2885
2895
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
2886
|
-
if (
|
|
2896
|
+
if (W(t, "display") !== "none" && t !== Q.ghost) {
|
|
2887
2897
|
e.push({
|
|
2888
2898
|
target: t,
|
|
2889
|
-
rect:
|
|
2899
|
+
rect: G(t)
|
|
2890
2900
|
});
|
|
2891
2901
|
var n = gs({}, e[e.length - 1].rect);
|
|
2892
2902
|
if (t.thisAnimationDuration) {
|
|
@@ -2909,7 +2919,7 @@ function tc() {
|
|
|
2909
2919
|
else {
|
|
2910
2920
|
var i = !1, a = 0;
|
|
2911
2921
|
e.forEach(function(e) {
|
|
2912
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
2922
|
+
var t = 0, n = e.target, o = n.fromRect, s = G(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Is(n, !0);
|
|
2913
2923
|
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && qs(c, s) && !qs(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = rc(u, c, l, r.options)), qs(s, o) || (n.prevFromRect = o, n.prevToRect = s, t ||= r.options.animation, r.animate(n, u, s, t)), t && (i = !0, a = Math.max(a, t), clearTimeout(n.animationResetTimer), n.animationResetTimer = setTimeout(function() {
|
|
2914
2924
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2915
2925
|
}, t), n.thisAnimationDuration = t);
|
|
@@ -2920,10 +2930,10 @@ function tc() {
|
|
|
2920
2930
|
},
|
|
2921
2931
|
animate: function(e, t, n, r) {
|
|
2922
2932
|
if (r) {
|
|
2923
|
-
|
|
2933
|
+
W(e, "transition", ""), W(e, "transform", "");
|
|
2924
2934
|
var i = Is(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2925
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
2926
|
-
|
|
2935
|
+
e.animatingX = !!s, e.animatingY = !!c, W(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = nc(e), W(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), W(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2936
|
+
W(e, "transition", ""), W(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2927
2937
|
}, r);
|
|
2928
2938
|
}
|
|
2929
2939
|
}
|
|
@@ -2993,24 +3003,24 @@ function sc(e) {
|
|
|
2993
3003
|
var cc = ["evt"], lc = function(e, t) {
|
|
2994
3004
|
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = xs(n, cc);
|
|
2995
3005
|
oc.pluginEvent.bind(Q)(e, t, gs({
|
|
2996
|
-
dragEl:
|
|
2997
|
-
parentEl:
|
|
2998
|
-
ghostEl:
|
|
2999
|
-
rootEl:
|
|
3006
|
+
dragEl: K,
|
|
3007
|
+
parentEl: q,
|
|
3008
|
+
ghostEl: J,
|
|
3009
|
+
rootEl: Y,
|
|
3000
3010
|
nextEl: dc,
|
|
3001
3011
|
lastDownEl: fc,
|
|
3002
|
-
cloneEl:
|
|
3012
|
+
cloneEl: X,
|
|
3003
3013
|
cloneHidden: pc,
|
|
3004
3014
|
dragStarted: Oc,
|
|
3005
|
-
putSortable:
|
|
3015
|
+
putSortable: Z,
|
|
3006
3016
|
activeSortable: Q.active,
|
|
3007
3017
|
originalEvent: r,
|
|
3008
3018
|
oldIndex: mc,
|
|
3009
3019
|
oldDraggableIndex: gc,
|
|
3010
3020
|
newIndex: hc,
|
|
3011
3021
|
newDraggableIndex: _c,
|
|
3012
|
-
hideGhostForTarget:
|
|
3013
|
-
unhideGhostForTarget:
|
|
3022
|
+
hideGhostForTarget: qc,
|
|
3023
|
+
unhideGhostForTarget: Jc,
|
|
3014
3024
|
cloneNowHidden: function() {
|
|
3015
3025
|
pc = !0;
|
|
3016
3026
|
},
|
|
@@ -3028,44 +3038,44 @@ var cc = ["evt"], lc = function(e, t) {
|
|
|
3028
3038
|
};
|
|
3029
3039
|
function uc(e) {
|
|
3030
3040
|
sc(gs({
|
|
3031
|
-
putSortable:
|
|
3032
|
-
cloneEl:
|
|
3033
|
-
targetEl:
|
|
3034
|
-
rootEl:
|
|
3041
|
+
putSortable: Z,
|
|
3042
|
+
cloneEl: X,
|
|
3043
|
+
targetEl: K,
|
|
3044
|
+
rootEl: Y,
|
|
3035
3045
|
oldIndex: mc,
|
|
3036
3046
|
oldDraggableIndex: gc,
|
|
3037
3047
|
newIndex: hc,
|
|
3038
3048
|
newDraggableIndex: _c
|
|
3039
3049
|
}, e));
|
|
3040
3050
|
}
|
|
3041
|
-
var
|
|
3042
|
-
if (
|
|
3051
|
+
var K, q, J, Y, dc, fc, X, pc, mc, hc, gc, _c, vc, Z, yc = !1, bc = !1, xc = [], Sc, Cc, wc, Tc, Ec, Dc, Oc, kc, Ac, jc = !1, Mc = !1, Nc, Pc, Fc = [], Ic = !1, Lc = [], Rc = typeof document < "u", zc = Os, Bc = Ts || ws ? "cssFloat" : "float", Vc = Rc && !ks && !Os && "draggable" in document.createElement("div"), Hc = function() {
|
|
3052
|
+
if (Rc) {
|
|
3043
3053
|
if (ws) return !1;
|
|
3044
3054
|
var e = document.createElement("x");
|
|
3045
3055
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
3046
3056
|
}
|
|
3047
|
-
}(),
|
|
3048
|
-
var n =
|
|
3057
|
+
}(), Uc = function(e, t) {
|
|
3058
|
+
var n = W(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Bs(e, 0, t), a = Bs(e, 1, t), o = i && W(i), s = a && W(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + G(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + G(a).width;
|
|
3049
3059
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
3050
3060
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
3051
3061
|
if (i && o.float && o.float !== "none") {
|
|
3052
3062
|
var u = o.float === "left" ? "left" : "right";
|
|
3053
3063
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
3054
3064
|
}
|
|
3055
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
3056
|
-
},
|
|
3065
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Bc] === "none" || a && n[Bc] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
3066
|
+
}, Wc = function(e, t, n) {
|
|
3057
3067
|
var r = n ? e.left : e.top, i = n ? e.right : e.bottom, a = n ? e.width : e.height, o = n ? t.left : t.top, s = n ? t.right : t.bottom, c = n ? t.width : t.height;
|
|
3058
3068
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
3059
|
-
},
|
|
3069
|
+
}, Gc = function(e, t) {
|
|
3060
3070
|
var n;
|
|
3061
3071
|
return xc.some(function(r) {
|
|
3062
3072
|
var i = r[ec].options.emptyInsertThreshold;
|
|
3063
3073
|
if (i && !Vs(r)) {
|
|
3064
|
-
var a =
|
|
3074
|
+
var a = G(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
3065
3075
|
if (o && s) return n = r;
|
|
3066
3076
|
}
|
|
3067
3077
|
}), n;
|
|
3068
|
-
},
|
|
3078
|
+
}, Kc = function(e) {
|
|
3069
3079
|
function t(e, n) {
|
|
3070
3080
|
return function(r, i, a, o) {
|
|
3071
3081
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -3079,26 +3089,26 @@ var G, K, q, J, dc, fc, Y, pc, mc, hc, gc, _c, vc, X, yc = !1, bc = !1, xc = [],
|
|
|
3079
3089
|
}
|
|
3080
3090
|
var n = {}, r = e.group;
|
|
3081
3091
|
r && _s(r) == "object" || (r = { name: r }), n.name = r.name, n.checkPull = t(r.pull, !0), n.checkPut = t(r.put), n.revertClone = r.revertClone, e.group = n;
|
|
3082
|
-
}, Kc = function() {
|
|
3083
|
-
!Vc && q && U(q, "display", "none");
|
|
3084
3092
|
}, qc = function() {
|
|
3085
|
-
!
|
|
3093
|
+
!Hc && J && W(J, "display", "none");
|
|
3094
|
+
}, Jc = function() {
|
|
3095
|
+
!Hc && J && W(J, "display", "");
|
|
3086
3096
|
};
|
|
3087
|
-
|
|
3097
|
+
Rc && !ks && document.addEventListener("click", function(e) {
|
|
3088
3098
|
if (bc) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), bc = !1, !1;
|
|
3089
3099
|
}, !0);
|
|
3090
|
-
var
|
|
3091
|
-
if (
|
|
3100
|
+
var Yc = function(e) {
|
|
3101
|
+
if (K) {
|
|
3092
3102
|
e = e.touches ? e.touches[0] : e;
|
|
3093
|
-
var t =
|
|
3103
|
+
var t = Gc(e.clientX, e.clientY);
|
|
3094
3104
|
if (t) {
|
|
3095
3105
|
var n = {};
|
|
3096
3106
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
3097
3107
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[ec]._onDragOver(n);
|
|
3098
3108
|
}
|
|
3099
3109
|
}
|
|
3100
|
-
},
|
|
3101
|
-
|
|
3110
|
+
}, Xc = function(e) {
|
|
3111
|
+
K && K.parentNode[ec]._isOutsideThisEl(e.target);
|
|
3102
3112
|
};
|
|
3103
3113
|
function Q(e, t) {
|
|
3104
3114
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
@@ -3115,7 +3125,7 @@ function Q(e, t) {
|
|
|
3115
3125
|
invertedSwapThreshold: null,
|
|
3116
3126
|
removeCloneOnHide: !0,
|
|
3117
3127
|
direction: function() {
|
|
3118
|
-
return
|
|
3128
|
+
return Uc(e, this.options);
|
|
3119
3129
|
},
|
|
3120
3130
|
ghostClass: "sortable-ghost",
|
|
3121
3131
|
chosenClass: "sortable-chosen",
|
|
@@ -3146,8 +3156,8 @@ function Q(e, t) {
|
|
|
3146
3156
|
emptyInsertThreshold: 5
|
|
3147
3157
|
};
|
|
3148
3158
|
for (var r in oc.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
3149
|
-
for (var i in
|
|
3150
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
3159
|
+
for (var i in Kc(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
3160
|
+
this.nativeDraggable = !t.forceFallback && Vc, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? H(e, "pointerdown", this._onTapStart) : (H(e, "mousedown", this._onTapStart), H(e, "touchstart", this._onTapStart)), this.nativeDraggable && (H(e, "dragover", this), H(e, "dragenter", this)), xc.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), ys(this, tc());
|
|
3151
3161
|
}
|
|
3152
3162
|
Q.prototype = {
|
|
3153
3163
|
constructor: Q,
|
|
@@ -3155,12 +3165,12 @@ Q.prototype = {
|
|
|
3155
3165
|
!this.el.contains(e) && e !== this.el && (kc = null);
|
|
3156
3166
|
},
|
|
3157
3167
|
_getDirection: function(e, t) {
|
|
3158
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t,
|
|
3168
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, K) : this.options.direction;
|
|
3159
3169
|
},
|
|
3160
3170
|
_onTapStart: function(e) {
|
|
3161
3171
|
if (e.cancelable) {
|
|
3162
3172
|
var t = this, n = this.el, r = this.options, i = r.preventOnFilter, a = e.type, o = e.touches && e.touches[0] || e.pointerType && e.pointerType === "touch" && e, s = (o || e).target, c = e.target.shadowRoot && (e.path && e.path[0] || e.composedPath && e.composedPath()[0]) || s, l = r.filter;
|
|
3163
|
-
if (
|
|
3173
|
+
if (ol(n), !K && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Ds && s && s.tagName.toUpperCase() === "SELECT") && (s = Ns(s, r.draggable, n, !1), !(s && s.animated) && fc !== s)) {
|
|
3164
3174
|
if (mc = Hs(s), gc = Hs(s, r.draggable), typeof l == "function") {
|
|
3165
3175
|
if (l.call(this, e, s, this)) {
|
|
3166
3176
|
uc({
|
|
@@ -3192,26 +3202,26 @@ Q.prototype = {
|
|
|
3192
3202
|
},
|
|
3193
3203
|
_prepareDragStart: function(e, t, n) {
|
|
3194
3204
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
3195
|
-
if (n && !
|
|
3196
|
-
var c =
|
|
3197
|
-
if (
|
|
3198
|
-
target:
|
|
3205
|
+
if (n && !K && n.parentNode === i) {
|
|
3206
|
+
var c = G(n);
|
|
3207
|
+
if (Y = i, K = n, q = K.parentNode, dc = K.nextSibling, fc = n, vc = a.group, Q.dragged = K, Sc = {
|
|
3208
|
+
target: K,
|
|
3199
3209
|
clientX: (t || e).clientX,
|
|
3200
3210
|
clientY: (t || e).clientY
|
|
3201
|
-
}, Ec = Sc.clientX - c.left, Dc = Sc.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY,
|
|
3202
|
-
lc("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !Es && r.nativeDraggable && (
|
|
3211
|
+
}, Ec = Sc.clientX - c.left, Dc = Sc.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, K.style["will-change"] = "all", s = function() {
|
|
3212
|
+
lc("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !Es && r.nativeDraggable && (K.draggable = !0), r._triggerDragStart(e, t), uc({
|
|
3203
3213
|
sortable: r,
|
|
3204
3214
|
name: "choose",
|
|
3205
3215
|
originalEvent: e
|
|
3206
|
-
}), Fs(
|
|
3216
|
+
}), Fs(K, a.chosenClass, !0));
|
|
3207
3217
|
}, a.ignore.split(",").forEach(function(e) {
|
|
3208
|
-
Ls(
|
|
3209
|
-
}),
|
|
3218
|
+
Ls(K, e.trim(), $c);
|
|
3219
|
+
}), H(o, "dragover", Yc), H(o, "mousemove", Yc), H(o, "touchmove", Yc), H(o, "mouseup", r._onDrop), H(o, "touchend", r._onDrop), H(o, "touchcancel", r._onDrop), Es && this.nativeDraggable && (this.options.touchStartThreshold = 4, K.draggable = !0), lc("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Ts || ws))) {
|
|
3210
3220
|
if (Q.eventCanceled) {
|
|
3211
3221
|
this._onDrop();
|
|
3212
3222
|
return;
|
|
3213
3223
|
}
|
|
3214
|
-
|
|
3224
|
+
H(o, "mouseup", r._disableDelayedDrag), H(o, "touchend", r._disableDelayedDrag), H(o, "touchcancel", r._disableDelayedDrag), H(o, "mousemove", r._delayedDragTouchMoveHandler), H(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && H(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
3215
3225
|
} else s();
|
|
3216
3226
|
}
|
|
3217
3227
|
},
|
|
@@ -3220,25 +3230,25 @@ Q.prototype = {
|
|
|
3220
3230
|
Math.max(Math.abs(t.clientX - this._lastX), Math.abs(t.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1)) && this._disableDelayedDrag();
|
|
3221
3231
|
},
|
|
3222
3232
|
_disableDelayedDrag: function() {
|
|
3223
|
-
|
|
3233
|
+
K && $c(K), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3224
3234
|
},
|
|
3225
3235
|
_disableDelayedDragEvents: function() {
|
|
3226
3236
|
var e = this.el.ownerDocument;
|
|
3227
|
-
|
|
3237
|
+
U(e, "mouseup", this._disableDelayedDrag), U(e, "touchend", this._disableDelayedDrag), U(e, "touchcancel", this._disableDelayedDrag), U(e, "mousemove", this._delayedDragTouchMoveHandler), U(e, "touchmove", this._delayedDragTouchMoveHandler), U(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
3228
3238
|
},
|
|
3229
3239
|
_triggerDragStart: function(e, t) {
|
|
3230
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
3240
|
+
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? H(document, "pointermove", this._onTouchMove) : t ? H(document, "touchmove", this._onTouchMove) : H(document, "mousemove", this._onTouchMove) : (H(K, "dragend", this), H(Y, "dragstart", this._onDragStart));
|
|
3231
3241
|
try {
|
|
3232
|
-
document.selection ?
|
|
3242
|
+
document.selection ? sl(function() {
|
|
3233
3243
|
document.selection.empty();
|
|
3234
3244
|
}) : window.getSelection().removeAllRanges();
|
|
3235
3245
|
} catch {}
|
|
3236
3246
|
},
|
|
3237
3247
|
_dragStarted: function(e, t) {
|
|
3238
|
-
if (yc = !1,
|
|
3239
|
-
lc("dragStarted", this, { evt: t }), this.nativeDraggable &&
|
|
3248
|
+
if (yc = !1, Y && K) {
|
|
3249
|
+
lc("dragStarted", this, { evt: t }), this.nativeDraggable && H(document, "dragover", Xc);
|
|
3240
3250
|
var n = this.options;
|
|
3241
|
-
!e && Fs(
|
|
3251
|
+
!e && Fs(K, n.dragClass, !1), Fs(K, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), uc({
|
|
3242
3252
|
sortable: this,
|
|
3243
3253
|
name: "start",
|
|
3244
3254
|
originalEvent: t
|
|
@@ -3247,9 +3257,9 @@ Q.prototype = {
|
|
|
3247
3257
|
},
|
|
3248
3258
|
_emulateDragOver: function() {
|
|
3249
3259
|
if (Cc) {
|
|
3250
|
-
this._lastX = Cc.clientX, this._lastY = Cc.clientY,
|
|
3260
|
+
this._lastX = Cc.clientX, this._lastY = Cc.clientY, qc();
|
|
3251
3261
|
for (var e = document.elementFromPoint(Cc.clientX, Cc.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Cc.clientX, Cc.clientY), e !== t);) t = e;
|
|
3252
|
-
if (
|
|
3262
|
+
if (K.parentNode[ec]._isOutsideThisEl(e), t) do {
|
|
3253
3263
|
if (t[ec]) {
|
|
3254
3264
|
var n = void 0;
|
|
3255
3265
|
if (n = t[ec]._onDragOver({
|
|
@@ -3261,17 +3271,17 @@ Q.prototype = {
|
|
|
3261
3271
|
}
|
|
3262
3272
|
e = t;
|
|
3263
3273
|
} while (t = t.parentNode);
|
|
3264
|
-
|
|
3274
|
+
Jc();
|
|
3265
3275
|
}
|
|
3266
3276
|
},
|
|
3267
3277
|
_onTouchMove: function(e) {
|
|
3268
3278
|
if (Sc) {
|
|
3269
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a =
|
|
3279
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = J && Is(J, !0), o = J && a && a.a, s = J && a && a.d, c = zc && Pc && Us(Pc), l = (i.clientX - Sc.clientX + r.x) / (o || 1) + (c ? c[0] - Fc[0] : 0) / (o || 1), u = (i.clientY - Sc.clientY + r.y) / (s || 1) + (c ? c[1] - Fc[1] : 0) / (s || 1);
|
|
3270
3280
|
if (!Q.active && !yc) {
|
|
3271
3281
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3272
3282
|
this._onDragStart(e, !0);
|
|
3273
3283
|
}
|
|
3274
|
-
if (
|
|
3284
|
+
if (J) {
|
|
3275
3285
|
a ? (a.e += l - (wc || 0), a.f += u - (Tc || 0)) : a = {
|
|
3276
3286
|
a: 1,
|
|
3277
3287
|
b: 0,
|
|
@@ -3281,33 +3291,33 @@ Q.prototype = {
|
|
|
3281
3291
|
f: u
|
|
3282
3292
|
};
|
|
3283
3293
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3284
|
-
|
|
3294
|
+
W(J, "webkitTransform", d), W(J, "mozTransform", d), W(J, "msTransform", d), W(J, "transform", d), wc = l, Tc = u, Cc = i;
|
|
3285
3295
|
}
|
|
3286
3296
|
e.cancelable && e.preventDefault();
|
|
3287
3297
|
}
|
|
3288
3298
|
},
|
|
3289
3299
|
_appendGhost: function() {
|
|
3290
|
-
if (!
|
|
3291
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
3292
|
-
if (
|
|
3293
|
-
for (
|
|
3294
|
-
|
|
3300
|
+
if (!J) {
|
|
3301
|
+
var e = this.options.fallbackOnBody ? document.body : Y, t = G(K, !0, zc, !0, e), n = this.options;
|
|
3302
|
+
if (zc) {
|
|
3303
|
+
for (Pc = e; W(Pc, "position") === "static" && W(Pc, "transform") === "none" && Pc !== document;) Pc = Pc.parentNode;
|
|
3304
|
+
Pc !== document.body && Pc !== document.documentElement ? (Pc === document && (Pc = Rs()), t.top += Pc.scrollTop, t.left += Pc.scrollLeft) : Pc = Rs(), Fc = Us(Pc);
|
|
3295
3305
|
}
|
|
3296
|
-
|
|
3306
|
+
J = K.cloneNode(!0), Fs(J, n.ghostClass, !1), Fs(J, n.fallbackClass, !0), Fs(J, n.dragClass, !0), W(J, "transition", ""), W(J, "transform", ""), W(J, "box-sizing", "border-box"), W(J, "margin", 0), W(J, "top", t.top), W(J, "left", t.left), W(J, "width", t.width), W(J, "height", t.height), W(J, "opacity", "0.8"), W(J, "position", zc ? "absolute" : "fixed"), W(J, "zIndex", "100000"), W(J, "pointerEvents", "none"), Q.ghost = J, e.appendChild(J), W(J, "transform-origin", Ec / parseInt(J.style.width) * 100 + "% " + Dc / parseInt(J.style.height) * 100 + "%");
|
|
3297
3307
|
}
|
|
3298
3308
|
},
|
|
3299
3309
|
_onDragStart: function(e, t) {
|
|
3300
3310
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
3301
|
-
lc("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (lc("setupClone", this), Q.eventCanceled || (
|
|
3302
|
-
lc("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide ||
|
|
3311
|
+
lc("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (lc("setupClone", this), Q.eventCanceled || (X = Qs(K), X.removeAttribute("id"), X.draggable = !1, X.style["will-change"] = "", this._hideClone(), Fs(X, this.options.chosenClass, !1), Q.clone = X), n.cloneId = sl(function() {
|
|
3312
|
+
lc("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || Y.insertBefore(X, K), n._hideClone(), uc({
|
|
3303
3313
|
sortable: n,
|
|
3304
3314
|
name: "clone"
|
|
3305
3315
|
}));
|
|
3306
|
-
}), !t && Fs(
|
|
3316
|
+
}), !t && Fs(K, i.dragClass, !0), t ? (bc = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (U(document, "mouseup", n._onDrop), U(document, "touchend", n._onDrop), U(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, K)), H(document, "drop", n), W(K, "transform", "translateZ(0)")), yc = !0, n._dragStartId = sl(n._dragStarted.bind(n, t, e)), H(document, "selectstart", n), Oc = !0, Ds && W(document.body, "user-select", "none"));
|
|
3307
3317
|
},
|
|
3308
3318
|
_onDragOver: function(e) {
|
|
3309
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = vc === s, u = o.sort, d =
|
|
3310
|
-
if (
|
|
3319
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = vc === s, u = o.sort, d = Z || c, f, p = this, m = !1;
|
|
3320
|
+
if (Ic) return;
|
|
3311
3321
|
function h(o, s) {
|
|
3312
3322
|
lc(o, p, gs({
|
|
3313
3323
|
evt: e,
|
|
@@ -3321,7 +3331,7 @@ Q.prototype = {
|
|
|
3321
3331
|
target: n,
|
|
3322
3332
|
completed: _,
|
|
3323
3333
|
onMove: function(n, i) {
|
|
3324
|
-
return
|
|
3334
|
+
return Qc(Y, t, K, r, n, G(n), e, i);
|
|
3325
3335
|
},
|
|
3326
3336
|
changed: v
|
|
3327
3337
|
}, s));
|
|
@@ -3330,12 +3340,12 @@ Q.prototype = {
|
|
|
3330
3340
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
3331
3341
|
}
|
|
3332
3342
|
function _(r) {
|
|
3333
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (Fs(
|
|
3343
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (Fs(K, Z ? Z.options.ghostClass : c.options.ghostClass, !1), Fs(K, o.ghostClass, !0)), Z !== p && p !== Q.active ? Z = p : p === Q.active && Z && (Z = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
3334
3344
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3335
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n ===
|
|
3345
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === K && !K.animated || n === t && !n.animated) && (kc = null), !o.dragoverBubble && !e.rootEl && n !== document && (K.parentNode[ec]._isOutsideThisEl(e.target), !r && Yc(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3336
3346
|
}
|
|
3337
3347
|
function v() {
|
|
3338
|
-
hc = Hs(
|
|
3348
|
+
hc = Hs(K), _c = Hs(K, o.draggable), uc({
|
|
3339
3349
|
sortable: p,
|
|
3340
3350
|
name: "change",
|
|
3341
3351
|
toEl: t,
|
|
@@ -3345,100 +3355,100 @@ Q.prototype = {
|
|
|
3345
3355
|
});
|
|
3346
3356
|
}
|
|
3347
3357
|
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Ns(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3348
|
-
if (
|
|
3349
|
-
if (bc = !1, c && !o.disabled && (l ? u || (a =
|
|
3350
|
-
if (f = this._getDirection(e, n) === "vertical", r =
|
|
3351
|
-
if (a) return
|
|
3358
|
+
if (K.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3359
|
+
if (bc = !1, c && !o.disabled && (l ? u || (a = q !== Y) : Z === this || (this.lastPutMode = vc.checkPull(this, c, K, e)) && s.checkPut(this, c, K, e))) {
|
|
3360
|
+
if (f = this._getDirection(e, n) === "vertical", r = G(K), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3361
|
+
if (a) return q = Y, g(), this._hideClone(), h("revert"), Q.eventCanceled || (dc ? Y.insertBefore(K, dc) : Y.appendChild(K)), _(!0);
|
|
3352
3362
|
var y = Vs(t, o.draggable);
|
|
3353
|
-
if (!y ||
|
|
3354
|
-
if (y ===
|
|
3355
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
3356
|
-
} else if (y &&
|
|
3363
|
+
if (!y || nl(e, f, this) && !y.animated) {
|
|
3364
|
+
if (y === K) return _(!1);
|
|
3365
|
+
if (y && t === e.target && (n = y), n && (i = G(n)), Qc(Y, t, K, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(K, y.nextSibling) : t.appendChild(K), q = t, v(), _(!0);
|
|
3366
|
+
} else if (y && tl(e, f, this)) {
|
|
3357
3367
|
var b = Bs(t, 0, o, !0);
|
|
3358
|
-
if (b ===
|
|
3359
|
-
if (n = b, i =
|
|
3368
|
+
if (b === K) return _(!1);
|
|
3369
|
+
if (n = b, i = G(n), Qc(Y, t, K, r, n, i, e, !1) !== !1) return g(), t.insertBefore(K, b), q = t, v(), _(!0);
|
|
3360
3370
|
} else if (n.parentNode === t) {
|
|
3361
|
-
i =
|
|
3362
|
-
var x = 0, S, C =
|
|
3363
|
-
kc !== n && (S = i[T], jc = !1, Mc = !w && o.invertSwap || C), x =
|
|
3371
|
+
i = G(n);
|
|
3372
|
+
var x = 0, S, C = K.parentNode !== t, w = !Wc(K.animated && K.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = zs(n, "top", "top") || zs(K, "top", "top"), ee = E ? E.scrollTop : void 0;
|
|
3373
|
+
kc !== n && (S = i[T], jc = !1, Mc = !w && o.invertSwap || C), x = rl(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Mc, kc === n);
|
|
3364
3374
|
var D;
|
|
3365
3375
|
if (x !== 0) {
|
|
3366
|
-
var O = Hs(
|
|
3376
|
+
var O = Hs(K);
|
|
3367
3377
|
do
|
|
3368
|
-
O -= x, D =
|
|
3369
|
-
while (D && (
|
|
3378
|
+
O -= x, D = q.children[O];
|
|
3379
|
+
while (D && (W(D, "display") === "none" || D === J));
|
|
3370
3380
|
}
|
|
3371
3381
|
if (x === 0 || D === n) return _(!1);
|
|
3372
3382
|
kc = n, Ac = x;
|
|
3373
3383
|
var k = n.nextElementSibling, A = !1;
|
|
3374
3384
|
A = x === 1;
|
|
3375
|
-
var j =
|
|
3376
|
-
if (j !== !1) return (j === 1 || j === -1) && (A = j === 1),
|
|
3385
|
+
var j = Qc(Y, t, K, r, n, i, e, A);
|
|
3386
|
+
if (j !== !1) return (j === 1 || j === -1) && (A = j === 1), Ic = !0, setTimeout(el, 30), g(), A && !k ? t.appendChild(K) : n.parentNode.insertBefore(K, A ? k : n), E && Zs(E, 0, ee - E.scrollTop), q = K.parentNode, S !== void 0 && !Mc && (Nc = Math.abs(S - G(n)[T])), v(), _(!0);
|
|
3377
3387
|
}
|
|
3378
|
-
if (t.contains(
|
|
3388
|
+
if (t.contains(K)) return _(!1);
|
|
3379
3389
|
}
|
|
3380
3390
|
return !1;
|
|
3381
3391
|
},
|
|
3382
3392
|
_ignoreWhileAnimating: null,
|
|
3383
3393
|
_offMoveEvents: function() {
|
|
3384
|
-
|
|
3394
|
+
U(document, "mousemove", this._onTouchMove), U(document, "touchmove", this._onTouchMove), U(document, "pointermove", this._onTouchMove), U(document, "dragover", Yc), U(document, "mousemove", Yc), U(document, "touchmove", Yc);
|
|
3385
3395
|
},
|
|
3386
3396
|
_offUpEvents: function() {
|
|
3387
3397
|
var e = this.el.ownerDocument;
|
|
3388
|
-
|
|
3398
|
+
U(e, "mouseup", this._onDrop), U(e, "touchend", this._onDrop), U(e, "pointerup", this._onDrop), U(e, "touchcancel", this._onDrop), U(document, "selectstart", this);
|
|
3389
3399
|
},
|
|
3390
3400
|
_onDrop: function(e) {
|
|
3391
3401
|
var t = this.el, n = this.options;
|
|
3392
|
-
hc = Hs(
|
|
3402
|
+
hc = Hs(K), _c = Hs(K, n.draggable), lc("drop", this, { evt: e }), q = K && K.parentNode, hc = Hs(K), _c = Hs(K, n.draggable), Q.eventCanceled || (yc = !1, Mc = !1, jc = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), cl(this.cloneId), cl(this._dragStartId), this.nativeDraggable && (U(document, "drop", this), U(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Ds && W(document.body, "user-select", ""), W(K, "transform", ""), e && (Oc && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), J && J.parentNode && J.parentNode.removeChild(J), (Y === q || Z && Z.lastPutMode !== "clone") && X && X.parentNode && X.parentNode.removeChild(X), K && (this.nativeDraggable && U(K, "dragend", this), $c(K), K.style["will-change"] = "", Oc && !yc && Fs(K, Z ? Z.options.ghostClass : this.options.ghostClass, !1), Fs(K, this.options.chosenClass, !1), uc({
|
|
3393
3403
|
sortable: this,
|
|
3394
3404
|
name: "unchoose",
|
|
3395
|
-
toEl:
|
|
3405
|
+
toEl: q,
|
|
3396
3406
|
newIndex: null,
|
|
3397
3407
|
newDraggableIndex: null,
|
|
3398
3408
|
originalEvent: e
|
|
3399
|
-
}),
|
|
3409
|
+
}), Y === q ? hc !== mc && hc >= 0 && (uc({
|
|
3400
3410
|
sortable: this,
|
|
3401
3411
|
name: "update",
|
|
3402
|
-
toEl:
|
|
3412
|
+
toEl: q,
|
|
3403
3413
|
originalEvent: e
|
|
3404
3414
|
}), uc({
|
|
3405
3415
|
sortable: this,
|
|
3406
3416
|
name: "sort",
|
|
3407
|
-
toEl:
|
|
3417
|
+
toEl: q,
|
|
3408
3418
|
originalEvent: e
|
|
3409
3419
|
})) : (hc >= 0 && (uc({
|
|
3410
|
-
rootEl:
|
|
3420
|
+
rootEl: q,
|
|
3411
3421
|
name: "add",
|
|
3412
|
-
toEl:
|
|
3413
|
-
fromEl:
|
|
3422
|
+
toEl: q,
|
|
3423
|
+
fromEl: Y,
|
|
3414
3424
|
originalEvent: e
|
|
3415
3425
|
}), uc({
|
|
3416
3426
|
sortable: this,
|
|
3417
3427
|
name: "remove",
|
|
3418
|
-
toEl:
|
|
3428
|
+
toEl: q,
|
|
3419
3429
|
originalEvent: e
|
|
3420
3430
|
}), uc({
|
|
3421
|
-
rootEl:
|
|
3431
|
+
rootEl: q,
|
|
3422
3432
|
name: "sort",
|
|
3423
|
-
toEl:
|
|
3424
|
-
fromEl:
|
|
3433
|
+
toEl: q,
|
|
3434
|
+
fromEl: Y,
|
|
3425
3435
|
originalEvent: e
|
|
3426
3436
|
}), uc({
|
|
3427
3437
|
sortable: this,
|
|
3428
3438
|
name: "sort",
|
|
3429
|
-
toEl:
|
|
3439
|
+
toEl: q,
|
|
3430
3440
|
originalEvent: e
|
|
3431
|
-
})),
|
|
3441
|
+
})), Z && Z.save()), Q.active && ((hc == null || hc === -1) && (hc = mc, _c = gc), uc({
|
|
3432
3442
|
sortable: this,
|
|
3433
3443
|
name: "end",
|
|
3434
|
-
toEl:
|
|
3444
|
+
toEl: q,
|
|
3435
3445
|
originalEvent: e
|
|
3436
3446
|
}), this.save())))), this._nulling();
|
|
3437
3447
|
},
|
|
3438
3448
|
_nulling: function() {
|
|
3439
|
-
lc("nulling", this),
|
|
3449
|
+
lc("nulling", this), Y = K = q = J = dc = X = fc = pc = Sc = Cc = Oc = hc = _c = mc = gc = kc = Ac = Z = vc = Q.dragged = Q.ghost = Q.clone = Q.active = null, Lc.forEach(function(e) {
|
|
3440
3450
|
e.checked = !0;
|
|
3441
|
-
}),
|
|
3451
|
+
}), Lc.length = wc = Tc = 0;
|
|
3442
3452
|
},
|
|
3443
3453
|
handleEvent: function(e) {
|
|
3444
3454
|
switch (e.type) {
|
|
@@ -3448,13 +3458,13 @@ Q.prototype = {
|
|
|
3448
3458
|
break;
|
|
3449
3459
|
case "dragenter":
|
|
3450
3460
|
case "dragover":
|
|
3451
|
-
|
|
3461
|
+
K && (this._onDragOver(e), Zc(e));
|
|
3452
3462
|
break;
|
|
3453
3463
|
case "selectstart": e.preventDefault();
|
|
3454
3464
|
}
|
|
3455
3465
|
},
|
|
3456
3466
|
toArray: function() {
|
|
3457
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Ns(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) ||
|
|
3467
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Ns(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || al(t));
|
|
3458
3468
|
return e;
|
|
3459
3469
|
},
|
|
3460
3470
|
sort: function(e, t) {
|
|
@@ -3477,89 +3487,89 @@ Q.prototype = {
|
|
|
3477
3487
|
var n = this.options;
|
|
3478
3488
|
if (t === void 0) return n[e];
|
|
3479
3489
|
var r = oc.modifyOption(this, e, t);
|
|
3480
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
3490
|
+
n[e] = r === void 0 ? t : r, e === "group" && Kc(n);
|
|
3481
3491
|
},
|
|
3482
3492
|
destroy: function() {
|
|
3483
3493
|
lc("destroy", this);
|
|
3484
3494
|
var e = this.el;
|
|
3485
|
-
e[ec] = null,
|
|
3495
|
+
e[ec] = null, U(e, "mousedown", this._onTapStart), U(e, "touchstart", this._onTapStart), U(e, "pointerdown", this._onTapStart), this.nativeDraggable && (U(e, "dragover", this), U(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3486
3496
|
e.removeAttribute("draggable");
|
|
3487
3497
|
}), this._onDrop(), this._disableDelayedDragEvents(), xc.splice(xc.indexOf(this.el), 1), this.el = e = null;
|
|
3488
3498
|
},
|
|
3489
3499
|
_hideClone: function() {
|
|
3490
3500
|
if (!pc) {
|
|
3491
3501
|
if (lc("hideClone", this), Q.eventCanceled) return;
|
|
3492
|
-
|
|
3502
|
+
W(X, "display", "none"), this.options.removeCloneOnHide && X.parentNode && X.parentNode.removeChild(X), pc = !0;
|
|
3493
3503
|
}
|
|
3494
3504
|
},
|
|
3495
3505
|
_showClone: function(e) {
|
|
3496
3506
|
if (e.lastPutMode !== "clone") this._hideClone();
|
|
3497
3507
|
else if (pc) {
|
|
3498
3508
|
if (lc("showClone", this), Q.eventCanceled) return;
|
|
3499
|
-
|
|
3509
|
+
K.parentNode == Y && !this.options.group.revertClone ? Y.insertBefore(X, K) : dc ? Y.insertBefore(X, dc) : Y.appendChild(X), this.options.group.revertClone && this.animate(K, X), W(X, "display", ""), pc = !1;
|
|
3500
3510
|
}
|
|
3501
3511
|
}
|
|
3502
3512
|
};
|
|
3503
|
-
function
|
|
3513
|
+
function Zc(e) {
|
|
3504
3514
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3505
3515
|
}
|
|
3506
|
-
function
|
|
3516
|
+
function Qc(e, t, n, r, i, a, o, s) {
|
|
3507
3517
|
var c, l = e[ec], u = l.options.onMove, d;
|
|
3508
3518
|
return window.CustomEvent && !ws && !Ts ? c = new CustomEvent("move", {
|
|
3509
3519
|
bubbles: !0,
|
|
3510
3520
|
cancelable: !0
|
|
3511
|
-
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a ||
|
|
3521
|
+
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || G(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3512
3522
|
}
|
|
3513
|
-
function
|
|
3523
|
+
function $c(e) {
|
|
3514
3524
|
e.draggable = !1;
|
|
3515
3525
|
}
|
|
3516
|
-
function
|
|
3517
|
-
|
|
3526
|
+
function el() {
|
|
3527
|
+
Ic = !1;
|
|
3518
3528
|
}
|
|
3519
|
-
function
|
|
3520
|
-
var r =
|
|
3529
|
+
function tl(e, t, n) {
|
|
3530
|
+
var r = G(Bs(n.el, 0, n.options, !0)), i = $s(n.el, n.options, J), a = 10;
|
|
3521
3531
|
return t ? e.clientX < i.left - a || e.clientY < r.top && e.clientX < r.right : e.clientY < i.top - a || e.clientY < r.bottom && e.clientX < r.left;
|
|
3522
3532
|
}
|
|
3523
|
-
function
|
|
3524
|
-
var r =
|
|
3533
|
+
function nl(e, t, n) {
|
|
3534
|
+
var r = G(Vs(n.el, n.options.draggable)), i = $s(n.el, n.options, J), a = 10;
|
|
3525
3535
|
return t ? e.clientX > i.right + a || e.clientY > r.bottom && e.clientX > r.left : e.clientY > i.bottom + a || e.clientX > r.right && e.clientY > r.top;
|
|
3526
3536
|
}
|
|
3527
|
-
function
|
|
3537
|
+
function rl(e, t, n, r, i, a, o, s) {
|
|
3528
3538
|
var c = r ? e.clientY : e.clientX, l = r ? n.height : n.width, u = r ? n.top : n.left, d = r ? n.bottom : n.right, f = !1;
|
|
3529
3539
|
if (!o) {
|
|
3530
3540
|
if (s && Nc < l * i) {
|
|
3531
3541
|
if (!jc && (Ac === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (jc = !0), jc) f = !0;
|
|
3532
3542
|
else if (Ac === 1 ? c < u + Nc : c > d - Nc) return -Ac;
|
|
3533
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3543
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return il(t);
|
|
3534
3544
|
}
|
|
3535
3545
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3536
3546
|
}
|
|
3537
|
-
function rl(e) {
|
|
3538
|
-
return Hs(G) < Hs(e) ? 1 : -1;
|
|
3539
|
-
}
|
|
3540
3547
|
function il(e) {
|
|
3548
|
+
return Hs(K) < Hs(e) ? 1 : -1;
|
|
3549
|
+
}
|
|
3550
|
+
function al(e) {
|
|
3541
3551
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3542
3552
|
return r.toString(36);
|
|
3543
3553
|
}
|
|
3544
|
-
function
|
|
3545
|
-
|
|
3554
|
+
function ol(e) {
|
|
3555
|
+
Lc.length = 0;
|
|
3546
3556
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3547
3557
|
var r = t[n];
|
|
3548
|
-
r.checked &&
|
|
3558
|
+
r.checked && Lc.push(r);
|
|
3549
3559
|
}
|
|
3550
3560
|
}
|
|
3551
|
-
function
|
|
3561
|
+
function sl(e) {
|
|
3552
3562
|
return setTimeout(e, 0);
|
|
3553
3563
|
}
|
|
3554
|
-
function
|
|
3564
|
+
function cl(e) {
|
|
3555
3565
|
return clearTimeout(e);
|
|
3556
3566
|
}
|
|
3557
|
-
|
|
3567
|
+
Rc && H(document, "touchmove", function(e) {
|
|
3558
3568
|
(Q.active || yc) && e.cancelable && e.preventDefault();
|
|
3559
3569
|
}), Q.utils = {
|
|
3560
|
-
on:
|
|
3561
|
-
off:
|
|
3562
|
-
css:
|
|
3570
|
+
on: H,
|
|
3571
|
+
off: U,
|
|
3572
|
+
css: W,
|
|
3563
3573
|
find: Ls,
|
|
3564
3574
|
is: function(e, t) {
|
|
3565
3575
|
return !!Ns(e, t, e, !1);
|
|
@@ -3570,9 +3580,9 @@ Lc && V(document, "touchmove", function(e) {
|
|
|
3570
3580
|
toggleClass: Fs,
|
|
3571
3581
|
clone: Qs,
|
|
3572
3582
|
index: Hs,
|
|
3573
|
-
nextTick:
|
|
3574
|
-
cancelNextTick:
|
|
3575
|
-
detectDirection:
|
|
3583
|
+
nextTick: sl,
|
|
3584
|
+
cancelNextTick: cl,
|
|
3585
|
+
detectDirection: Uc,
|
|
3576
3586
|
getChild: Bs
|
|
3577
3587
|
}, Q.get = function(e) {
|
|
3578
3588
|
return e[ec];
|
|
@@ -3585,8 +3595,8 @@ Lc && V(document, "touchmove", function(e) {
|
|
|
3585
3595
|
}, Q.create = function(e, t) {
|
|
3586
3596
|
return new Q(e, t);
|
|
3587
3597
|
}, Q.version = Ss;
|
|
3588
|
-
var $ = [],
|
|
3589
|
-
function
|
|
3598
|
+
var $ = [], ll, ul, dl = !1, fl, pl, ml, hl;
|
|
3599
|
+
function gl() {
|
|
3590
3600
|
function e() {
|
|
3591
3601
|
for (var e in this.defaults = {
|
|
3592
3602
|
scroll: !0,
|
|
@@ -3599,36 +3609,36 @@ function hl() {
|
|
|
3599
3609
|
return e.prototype = {
|
|
3600
3610
|
dragStarted: function(e) {
|
|
3601
3611
|
var t = e.originalEvent;
|
|
3602
|
-
this.sortable.nativeDraggable ?
|
|
3612
|
+
this.sortable.nativeDraggable ? H(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? H(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? H(document, "touchmove", this._handleFallbackAutoScroll) : H(document, "mousemove", this._handleFallbackAutoScroll);
|
|
3603
3613
|
},
|
|
3604
3614
|
dragOverCompleted: function(e) {
|
|
3605
3615
|
var t = e.originalEvent;
|
|
3606
3616
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3607
3617
|
},
|
|
3608
3618
|
drop: function() {
|
|
3609
|
-
this.sortable.nativeDraggable ?
|
|
3619
|
+
this.sortable.nativeDraggable ? U(document, "dragover", this._handleAutoScroll) : (U(document, "pointermove", this._handleFallbackAutoScroll), U(document, "touchmove", this._handleFallbackAutoScroll), U(document, "mousemove", this._handleFallbackAutoScroll)), vl(), _l(), Xs();
|
|
3610
3620
|
},
|
|
3611
3621
|
nulling: function() {
|
|
3612
|
-
|
|
3622
|
+
ml = ul = ll = dl = hl = fl = pl = null, $.length = 0;
|
|
3613
3623
|
},
|
|
3614
3624
|
_handleFallbackAutoScroll: function(e) {
|
|
3615
3625
|
this._handleAutoScroll(e, !0);
|
|
3616
3626
|
},
|
|
3617
3627
|
_handleAutoScroll: function(e, t) {
|
|
3618
3628
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3619
|
-
if (
|
|
3620
|
-
|
|
3629
|
+
if (ml = e, t || this.options.forceAutoScrollFallback || Ts || ws || Ds) {
|
|
3630
|
+
yl(e, this.options, a, t);
|
|
3621
3631
|
var o = Gs(a, !0);
|
|
3622
|
-
|
|
3632
|
+
dl && (!hl || r !== fl || i !== pl) && (hl && vl(), hl = setInterval(function() {
|
|
3623
3633
|
var a = Gs(document.elementFromPoint(r, i), !0);
|
|
3624
|
-
a !== o && (o = a,
|
|
3625
|
-
}, 10),
|
|
3634
|
+
a !== o && (o = a, _l()), yl(e, n.options, a, t);
|
|
3635
|
+
}, 10), fl = r, pl = i);
|
|
3626
3636
|
} else {
|
|
3627
3637
|
if (!this.options.bubbleScroll || Gs(a, !0) === Rs()) {
|
|
3628
|
-
|
|
3638
|
+
_l();
|
|
3629
3639
|
return;
|
|
3630
3640
|
}
|
|
3631
|
-
|
|
3641
|
+
yl(e, this.options, Gs(a, !1), !1);
|
|
3632
3642
|
}
|
|
3633
3643
|
}
|
|
3634
3644
|
}, ys(e, {
|
|
@@ -3636,33 +3646,33 @@ function hl() {
|
|
|
3636
3646
|
initializeByDefault: !0
|
|
3637
3647
|
});
|
|
3638
3648
|
}
|
|
3639
|
-
function
|
|
3649
|
+
function _l() {
|
|
3640
3650
|
$.forEach(function(e) {
|
|
3641
3651
|
clearInterval(e.pid);
|
|
3642
3652
|
}), $ = [];
|
|
3643
3653
|
}
|
|
3644
|
-
function
|
|
3645
|
-
clearInterval(
|
|
3654
|
+
function vl() {
|
|
3655
|
+
clearInterval(hl);
|
|
3646
3656
|
}
|
|
3647
|
-
var
|
|
3657
|
+
var yl = Ys(function(e, t, n, r) {
|
|
3648
3658
|
if (t.scroll) {
|
|
3649
3659
|
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Rs(), l = !1, u;
|
|
3650
|
-
|
|
3651
|
-
var d = 0, f =
|
|
3660
|
+
ul !== n && (ul = n, _l(), ll = t.scroll, u = t.scrollFn, ll === !0 && (ll = Gs(n, !0)));
|
|
3661
|
+
var d = 0, f = ll;
|
|
3652
3662
|
do {
|
|
3653
|
-
var p = f, m =
|
|
3663
|
+
var p = f, m = G(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = W(p), E = p.scrollLeft, ee = p.scrollTop;
|
|
3654
3664
|
p === c ? (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll" || T.overflowX === "visible"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll" || T.overflowY === "visible")) : (x = y < C && (T.overflowX === "auto" || T.overflowX === "scroll"), S = b < w && (T.overflowY === "auto" || T.overflowY === "scroll"));
|
|
3655
3665
|
var D = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), O = S && (Math.abs(g - a) <= o && ee + b < w) - (Math.abs(h - a) <= o && !!ee);
|
|
3656
3666
|
if (!$[d]) for (var k = 0; k <= d; k++) $[k] || ($[k] = {});
|
|
3657
3667
|
($[d].vx != D || $[d].vy != O || $[d].el !== p) && ($[d].el = p, $[d].vx = D, $[d].vy = O, clearInterval($[d].pid), (D != 0 || O != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
3658
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3668
|
+
r && this.layer === 0 && Q.active._onTouchMove(ml);
|
|
3659
3669
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3660
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[ec], n, t, e,
|
|
3670
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[ec], n, t, e, ml, $[this.layer].el) !== "continue" || Zs($[this.layer].el, n, t);
|
|
3661
3671
|
}.bind({ layer: d }), 24))), d++;
|
|
3662
3672
|
} while (t.bubbleScroll && f !== c && (f = Gs(f, !1)));
|
|
3663
|
-
|
|
3673
|
+
dl = l;
|
|
3664
3674
|
}
|
|
3665
|
-
}, 30),
|
|
3675
|
+
}, 30), bl = function(e) {
|
|
3666
3676
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3667
3677
|
if (t) {
|
|
3668
3678
|
var c = n || i;
|
|
@@ -3674,8 +3684,8 @@ var vl = Ys(function(e, t, n, r) {
|
|
|
3674
3684
|
}));
|
|
3675
3685
|
}
|
|
3676
3686
|
};
|
|
3677
|
-
function
|
|
3678
|
-
|
|
3687
|
+
function xl() {}
|
|
3688
|
+
xl.prototype = {
|
|
3679
3689
|
startIndex: null,
|
|
3680
3690
|
dragStart: function(e) {
|
|
3681
3691
|
var t = e.oldDraggableIndex;
|
|
@@ -3687,48 +3697,48 @@ bl.prototype = {
|
|
|
3687
3697
|
var r = Bs(this.sortable.el, this.startIndex, this.options);
|
|
3688
3698
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3689
3699
|
},
|
|
3690
|
-
drop:
|
|
3691
|
-
}, ys(
|
|
3692
|
-
function
|
|
3693
|
-
|
|
3700
|
+
drop: bl
|
|
3701
|
+
}, ys(xl, { pluginName: "revertOnSpill" });
|
|
3702
|
+
function Sl() {}
|
|
3703
|
+
Sl.prototype = {
|
|
3694
3704
|
onSpill: function(e) {
|
|
3695
3705
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3696
3706
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3697
3707
|
},
|
|
3698
|
-
drop:
|
|
3699
|
-
}, ys(
|
|
3700
|
-
function
|
|
3708
|
+
drop: bl
|
|
3709
|
+
}, ys(Sl, { pluginName: "removeOnSpill" }), Q.mount(new gl()), Q.mount(Sl, xl);
|
|
3710
|
+
function Cl(e) {
|
|
3701
3711
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3702
3712
|
}
|
|
3703
|
-
function
|
|
3713
|
+
function wl(e) {
|
|
3704
3714
|
O() && ne(e);
|
|
3705
3715
|
}
|
|
3706
|
-
function
|
|
3716
|
+
function Tl(e) {
|
|
3707
3717
|
O() ? s(e) : _(e);
|
|
3708
3718
|
}
|
|
3709
|
-
var
|
|
3710
|
-
function
|
|
3711
|
-
|
|
3719
|
+
var El = null, Dl = null;
|
|
3720
|
+
function Ol(e = null, t = null) {
|
|
3721
|
+
El = e, Dl = t;
|
|
3712
3722
|
}
|
|
3713
|
-
function
|
|
3723
|
+
function kl() {
|
|
3714
3724
|
return {
|
|
3715
|
-
data:
|
|
3716
|
-
clonedData:
|
|
3725
|
+
data: El,
|
|
3726
|
+
clonedData: Dl
|
|
3717
3727
|
};
|
|
3718
3728
|
}
|
|
3719
|
-
var
|
|
3720
|
-
function
|
|
3729
|
+
var Al = Symbol("cloneElement");
|
|
3730
|
+
function jl(...e) {
|
|
3721
3731
|
let t = O()?.proxy, n = null, r = e[0], [, i, a] = e;
|
|
3722
3732
|
Array.isArray(A(i)) || (a = i, i = null);
|
|
3723
|
-
let o = null, { immediate: s = !0, clone: l =
|
|
3733
|
+
let o = null, { immediate: s = !0, clone: l = Cl, forceFallback: u, fallbackOnBody: d, customUpdate: f } = A(a) ?? {};
|
|
3724
3734
|
function p(e) {
|
|
3725
3735
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3726
3736
|
n = u && !d ? o.slice(0, -1) : o;
|
|
3727
3737
|
let s = A(A(i)?.[r]), c = l(s);
|
|
3728
|
-
|
|
3738
|
+
Ol(s, c), a[Al] = c;
|
|
3729
3739
|
}
|
|
3730
3740
|
function m(e) {
|
|
3731
|
-
let t = e.item[
|
|
3741
|
+
let t = e.item[Al];
|
|
3732
3742
|
if (!is(t)) {
|
|
3733
3743
|
if (ss(e.item), w(i)) {
|
|
3734
3744
|
let n = [...A(i)];
|
|
@@ -3774,7 +3784,7 @@ function Al(...e) {
|
|
|
3774
3784
|
n = null;
|
|
3775
3785
|
}
|
|
3776
3786
|
_(() => {
|
|
3777
|
-
if (
|
|
3787
|
+
if (Ol(), o) throw o;
|
|
3778
3788
|
});
|
|
3779
3789
|
}
|
|
3780
3790
|
let y = {
|
|
@@ -3791,7 +3801,7 @@ function Al(...e) {
|
|
|
3791
3801
|
function x() {
|
|
3792
3802
|
let e = A(a) ?? {}, { immediate: t, clone: n } = e, r = Yo(e, ["immediate", "clone"]);
|
|
3793
3803
|
return fs(r, (e, t) => {
|
|
3794
|
-
ps(e) && (r[e] = (e, ...n) => (ms(e,
|
|
3804
|
+
ps(e) && (r[e] = (e, ...n) => (ms(e, kl()), t(e, ...n)));
|
|
3795
3805
|
}), us(i === null ? {} : y, r);
|
|
3796
3806
|
}
|
|
3797
3807
|
let S = (e) => {
|
|
@@ -3811,15 +3821,15 @@ function Al(...e) {
|
|
|
3811
3821
|
toArray: () => o?.toArray(),
|
|
3812
3822
|
closest: (...e) => o?.closest(...e)
|
|
3813
3823
|
};
|
|
3814
|
-
return
|
|
3824
|
+
return Tl(() => {
|
|
3815
3825
|
s && S();
|
|
3816
|
-
}),
|
|
3826
|
+
}), wl(C.destroy), Jo({
|
|
3817
3827
|
start: S,
|
|
3818
3828
|
pause: () => C?.option("disabled", !0),
|
|
3819
3829
|
resume: () => C?.option("disabled", !1)
|
|
3820
3830
|
}, C);
|
|
3821
3831
|
}
|
|
3822
|
-
var
|
|
3832
|
+
var Ml = [
|
|
3823
3833
|
"update",
|
|
3824
3834
|
"start",
|
|
3825
3835
|
"add",
|
|
@@ -3832,7 +3842,7 @@ var jl = [
|
|
|
3832
3842
|
"clone",
|
|
3833
3843
|
"move",
|
|
3834
3844
|
"change"
|
|
3835
|
-
],
|
|
3845
|
+
], Nl = [
|
|
3836
3846
|
"clone",
|
|
3837
3847
|
"animation",
|
|
3838
3848
|
"ghostClass",
|
|
@@ -3876,17 +3886,17 @@ var jl = [
|
|
|
3876
3886
|
"tag",
|
|
3877
3887
|
"target",
|
|
3878
3888
|
"customUpdate",
|
|
3879
|
-
...
|
|
3880
|
-
],
|
|
3889
|
+
...Ml.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3890
|
+
], Pl = B({
|
|
3881
3891
|
name: "VueDraggable",
|
|
3882
3892
|
model: {
|
|
3883
3893
|
prop: "modelValue",
|
|
3884
3894
|
event: "update:modelValue"
|
|
3885
3895
|
},
|
|
3886
|
-
props:
|
|
3887
|
-
emits: ["update:modelValue", ...
|
|
3896
|
+
props: Nl,
|
|
3897
|
+
emits: ["update:modelValue", ...Ml],
|
|
3888
3898
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3889
|
-
let a =
|
|
3899
|
+
let a = Ml.reduce((e, t) => {
|
|
3890
3900
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3891
3901
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3892
3902
|
}, {}), o = k(() => {
|
|
@@ -3898,24 +3908,24 @@ var jl = [
|
|
|
3898
3908
|
}), s = k({
|
|
3899
3909
|
get: () => e.modelValue,
|
|
3900
3910
|
set: (e) => n("update:modelValue", e)
|
|
3901
|
-
}), c = M(), l = b(
|
|
3911
|
+
}), c = M(), l = b(jl(e.target || c, s, o));
|
|
3902
3912
|
return r(l), () => x(e.tag || "div", { ref: c }, (t?.default)?.call(t, l));
|
|
3903
3913
|
}
|
|
3904
|
-
}),
|
|
3914
|
+
}), Fl = {
|
|
3905
3915
|
mounted: "mounted",
|
|
3906
3916
|
unmounted: "unmounted"
|
|
3907
3917
|
};
|
|
3908
|
-
|
|
3918
|
+
Fl.mounted, Fl.unmounted;
|
|
3909
3919
|
// src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3910
|
-
var
|
|
3920
|
+
var Il = { class: "tpl:relative tpl:w-full" }, Ll = {
|
|
3911
3921
|
key: 0,
|
|
3912
3922
|
"data-testid": "hero-image-hint",
|
|
3913
3923
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-x-0 tpl:bottom-full tpl:mb-2 tpl:flex tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
3914
|
-
},
|
|
3924
|
+
}, Rl = {
|
|
3915
3925
|
key: 0,
|
|
3916
3926
|
"data-testid": "section-drop-hint",
|
|
3917
3927
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
3918
|
-
},
|
|
3928
|
+
}, zl = /* @__PURE__ */ B({
|
|
3919
3929
|
__name: "SectionBlock",
|
|
3920
3930
|
props: {
|
|
3921
3931
|
block: {},
|
|
@@ -3930,9 +3940,9 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
3930
3940
|
button: fa,
|
|
3931
3941
|
divider: Ea,
|
|
3932
3942
|
custom: wa
|
|
3933
|
-
}, n = e, { t: r } =
|
|
3934
|
-
g(
|
|
3935
|
-
let u =
|
|
3943
|
+
}, n = e, { t: r } = ce(), i = bn(Mn, "SectionBlock"), { displayBlock: o } = Nt(i), s = k(() => n.sourceBlock ?? n.block), c = z(hn, k(() => /* @__PURE__ */ new Set()));
|
|
3944
|
+
g(hn, k(() => /* @__PURE__ */ new Set([...c.value, ...Object.entries(s.value.l10n ?? {}).filter(([, e]) => e.hidden).map(([e]) => e)])));
|
|
3945
|
+
let u = z(xn, null), f = z(yn, null), _ = z(fn, {}), b = z(rn, null), x = z(sn, null);
|
|
3936
3946
|
function w(e) {
|
|
3937
3947
|
if (b?.value) return;
|
|
3938
3948
|
let t = _.savedBlocks;
|
|
@@ -3983,7 +3993,7 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
3983
3993
|
}
|
|
3984
3994
|
let F = k(() => {
|
|
3985
3995
|
if (i.state.previewMode) return !1;
|
|
3986
|
-
let e =
|
|
3996
|
+
let e = Be(n.block);
|
|
3987
3997
|
return e !== null && !e.applied && e.reason === "image";
|
|
3988
3998
|
});
|
|
3989
3999
|
function I(e) {
|
|
@@ -3992,23 +4002,23 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
3992
4002
|
function ae(e) {
|
|
3993
4003
|
return O(e).length === 0 && i.state.previewMode;
|
|
3994
4004
|
}
|
|
3995
|
-
function
|
|
4005
|
+
function oe(e, t) {
|
|
3996
4006
|
b?.value || Qa(i, t, n.block.id, e);
|
|
3997
4007
|
}
|
|
3998
|
-
function
|
|
4008
|
+
function B(e) {
|
|
3999
4009
|
return Ki(e, f, t);
|
|
4000
4010
|
}
|
|
4001
|
-
function
|
|
4011
|
+
function se(e, t) {
|
|
4002
4012
|
b?.value || e.type !== "custom" || i.updateBlock(e.id, {
|
|
4003
4013
|
fieldValues: t.fieldValues,
|
|
4004
4014
|
dataSourceFetched: t.dataSourceFetched
|
|
4005
4015
|
});
|
|
4006
4016
|
}
|
|
4007
|
-
return (t, s) => (m(), N("div",
|
|
4017
|
+
return (t, s) => (m(), N("div", Il, [F.value ? (m(), N("div", Ll, [P("span", null, d(A(r).section.heroAddImage), 1)])) : j("", !0), P("div", { class: h(["tpl:flex tpl:gap-0", { "tpl:flex-col": D.value }]) }, [(m(!0), N(L, null, v(ee.value, (t, c) => (m(), N("div", {
|
|
4008
4018
|
key: c,
|
|
4009
4019
|
class: h(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", I(c) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
4010
4020
|
style: y({ width: D.value ? "100%" : T.value[c] })
|
|
4011
|
-
}, [E(A(
|
|
4021
|
+
}, [E(A(Pl), {
|
|
4012
4022
|
disabled: A(b) ?? !1,
|
|
4013
4023
|
"model-value": O(c),
|
|
4014
4024
|
group: {
|
|
@@ -4031,7 +4041,7 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4031
4041
|
onUpdate: (e) => !A(b) && A(Qa)(A(i), O(c), n.block.id, c, e),
|
|
4032
4042
|
onStart: (e) => re.value = c,
|
|
4033
4043
|
onEnd: s[0] ||= (e) => re.value = null,
|
|
4034
|
-
"onUpdate:modelValue": (e) =>
|
|
4044
|
+
"onUpdate:modelValue": (e) => oe(c, e)
|
|
4035
4045
|
}, {
|
|
4036
4046
|
default: S(() => [(m(!0), N(L, null, v(O(c), (t) => C((m(), N("div", { key: t.id }, [E(No, {
|
|
4037
4047
|
block: t,
|
|
@@ -4042,9 +4052,9 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4042
4052
|
nested: "",
|
|
4043
4053
|
onSelect: (e) => w(t.id)
|
|
4044
4054
|
}, {
|
|
4045
|
-
default: S(() => [(m(),
|
|
4055
|
+
default: S(() => [(m(), R(p(B(t)), l({ block: A(o)(t) }, { ref_for: !0 }, t.type === "section" ? { sourceBlock: t } : {}, {
|
|
4046
4056
|
viewport: e.viewport,
|
|
4047
|
-
onFetchData: (e) =>
|
|
4057
|
+
onFetchData: (e) => se(t, e),
|
|
4048
4058
|
onUpdate: (e) => !A(b) && A(i).updateBlock(t.id, e)
|
|
4049
4059
|
}), null, 16, [
|
|
4050
4060
|
"block",
|
|
@@ -4070,14 +4080,14 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4070
4080
|
"onUpdate",
|
|
4071
4081
|
"onStart",
|
|
4072
4082
|
"onUpdate:modelValue"
|
|
4073
|
-
]), I(c) ? (m(), N("div",
|
|
4083
|
+
]), I(c) ? (m(), N("div", Rl, [P("span", null, d(A(r).section.dropHere), 1)])) : j("", !0)], 6))), 128))], 2)]));
|
|
4074
4084
|
}
|
|
4075
|
-
}),
|
|
4085
|
+
}), Bl = ["width", "height"], Vl = [
|
|
4076
4086
|
"d",
|
|
4077
4087
|
"stroke",
|
|
4078
4088
|
"stroke-opacity",
|
|
4079
4089
|
"stroke-width"
|
|
4080
|
-
],
|
|
4090
|
+
], Hl = ["d", "fill"], Ul = /* @__PURE__ */ B({
|
|
4081
4091
|
__name: "SocialIconSvg",
|
|
4082
4092
|
props: {
|
|
4083
4093
|
platform: {},
|
|
@@ -4086,7 +4096,7 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4086
4096
|
iconSize: {}
|
|
4087
4097
|
},
|
|
4088
4098
|
setup(e) {
|
|
4089
|
-
let t = e, n = k(() => $n[t.platform]), r = k(() => tr[t.iconSize]), i = k(() =>
|
|
4099
|
+
let t = e, n = k(() => $n[t.platform]), r = k(() => tr[t.iconSize]), i = k(() => Me(t.platform, t.iconTone)), a = k(() => et(t.iconStyle, t.iconTone)), o = k(() => {
|
|
4090
4100
|
let e = {
|
|
4091
4101
|
display: "inline-flex",
|
|
4092
4102
|
alignItems: "center",
|
|
@@ -4124,7 +4134,7 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4124
4134
|
};
|
|
4125
4135
|
default: return e;
|
|
4126
4136
|
}
|
|
4127
|
-
}), s = k(() =>
|
|
4137
|
+
}), s = k(() => me(t.iconStyle)), c = k(() => Math.floor(r.value * s.value));
|
|
4128
4138
|
function l(e) {
|
|
4129
4139
|
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
4130
4140
|
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
@@ -4145,28 +4155,28 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4145
4155
|
"stroke-opacity": a.value.opacity,
|
|
4146
4156
|
"stroke-width": a.value.width / s.value,
|
|
4147
4157
|
"stroke-linejoin": "round"
|
|
4148
|
-
}, null, 8,
|
|
4158
|
+
}, null, 8, Vl)) : j("", !0), P("path", {
|
|
4149
4159
|
d: n.value.path,
|
|
4150
4160
|
fill: u.value
|
|
4151
|
-
}, null, 8,
|
|
4161
|
+
}, null, 8, Hl)], 8, Bl))], 4));
|
|
4152
4162
|
}
|
|
4153
|
-
}),
|
|
4163
|
+
}), Wl = { class: "tpl:w-full" }, Gl = ["href"], Kl = {
|
|
4154
4164
|
key: 1,
|
|
4155
4165
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
4156
|
-
},
|
|
4166
|
+
}, ql = /* @__PURE__ */ B({
|
|
4157
4167
|
__name: "SocialIconsBlock",
|
|
4158
4168
|
props: {
|
|
4159
4169
|
block: {},
|
|
4160
4170
|
viewport: {}
|
|
4161
4171
|
},
|
|
4162
4172
|
setup(e) {
|
|
4163
|
-
let t = e, { t: n } =
|
|
4173
|
+
let t = e, { t: n } = ce(), r = k(() => ({
|
|
4164
4174
|
display: "flex",
|
|
4165
4175
|
flexWrap: "wrap",
|
|
4166
4176
|
gap: `${t.block.spacing}px`,
|
|
4167
4177
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
4168
4178
|
})), a = k(() => t.block.icons.length > 0);
|
|
4169
|
-
return (t, o) => (m(), N("div",
|
|
4179
|
+
return (t, o) => (m(), N("div", Wl, [a.value ? (m(), N("div", {
|
|
4170
4180
|
key: 0,
|
|
4171
4181
|
style: y(r.value)
|
|
4172
4182
|
}, [(m(!0), N(L, null, v(e.block.icons, (t) => (m(), N("a", {
|
|
@@ -4174,7 +4184,7 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4174
4184
|
href: t.url || "#",
|
|
4175
4185
|
class: "tpl:cursor-default",
|
|
4176
4186
|
onClick: o[0] ||= i(() => {}, ["prevent"])
|
|
4177
|
-
}, [E(
|
|
4187
|
+
}, [E(Ul, {
|
|
4178
4188
|
platform: t.platform,
|
|
4179
4189
|
"icon-style": e.block.iconStyle,
|
|
4180
4190
|
"icon-tone": e.block.iconTone,
|
|
@@ -4184,46 +4194,46 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4184
4194
|
"icon-style",
|
|
4185
4195
|
"icon-tone",
|
|
4186
4196
|
"icon-size"
|
|
4187
|
-
])], 8,
|
|
4197
|
+
])], 8, Gl))), 128))], 4)) : (m(), N("div", Kl, [E(A(Bn), { size: 16 }), P("span", null, d(A(n).social.addIcons), 1)]))]));
|
|
4188
4198
|
}
|
|
4189
|
-
}),
|
|
4199
|
+
}), Jl = { class: "tpl:w-full" }, Yl = {
|
|
4190
4200
|
key: 0,
|
|
4191
4201
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4192
4202
|
style: {
|
|
4193
4203
|
"background-color": "var(--tpl-bg-hover)",
|
|
4194
4204
|
color: "var(--tpl-text-dim)"
|
|
4195
4205
|
}
|
|
4196
|
-
},
|
|
4206
|
+
}, Xl = /* @__PURE__ */ B({
|
|
4197
4207
|
__name: "SpacerBlock",
|
|
4198
4208
|
props: {
|
|
4199
4209
|
block: {},
|
|
4200
4210
|
viewport: {}
|
|
4201
4211
|
},
|
|
4202
4212
|
setup(e) {
|
|
4203
|
-
let t = e, n =
|
|
4213
|
+
let t = e, n = bn(Mn, "SpacerBlock"), r = k(() => ({
|
|
4204
4214
|
height: `${t.block.height}px`,
|
|
4205
4215
|
minHeight: `${t.block.height}px`,
|
|
4206
4216
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4207
4217
|
}));
|
|
4208
|
-
return (t, i) => (m(), N("div",
|
|
4218
|
+
return (t, i) => (m(), N("div", Jl, [P("div", {
|
|
4209
4219
|
style: y(r.value),
|
|
4210
4220
|
class: h(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !A(n).state.previewMode }])
|
|
4211
|
-
}, [A(n).state.previewMode ? j("", !0) : (m(), N("span",
|
|
4221
|
+
}, [A(n).state.previewMode ? j("", !0) : (m(), N("span", Yl, d(e.block.height) + "px ", 1))], 6)]));
|
|
4212
4222
|
}
|
|
4213
|
-
}),
|
|
4223
|
+
}), Zl = { class: "tpl:w-full" }, Ql = { key: 0 }, $l = [
|
|
4214
4224
|
"aria-label",
|
|
4215
4225
|
"contenteditable",
|
|
4216
4226
|
"data-placeholder",
|
|
4217
4227
|
"onBlur"
|
|
4218
|
-
],
|
|
4228
|
+
], eu = [
|
|
4219
4229
|
"aria-label",
|
|
4220
4230
|
"contenteditable",
|
|
4221
4231
|
"data-placeholder",
|
|
4222
4232
|
"onBlur"
|
|
4223
|
-
],
|
|
4233
|
+
], tu = {
|
|
4224
4234
|
key: 1,
|
|
4225
4235
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
4226
|
-
},
|
|
4236
|
+
}, nu = /*#__PURE__*/ wr(/* @__PURE__ */ B({
|
|
4227
4237
|
__name: "TableBlock",
|
|
4228
4238
|
props: {
|
|
4229
4239
|
block: {},
|
|
@@ -4237,7 +4247,7 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4237
4247
|
updated(e, t) {
|
|
4238
4248
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
4239
4249
|
}
|
|
4240
|
-
}, n = e, { t: r } =
|
|
4250
|
+
}, n = e, { t: r } = ce(), a = bn(Mn, "TableBlock"), s = bn(ln, "TableBlock"), c = z(rn, null), l = k(() => n.block.rows.length > 0), u = k(() => {
|
|
4241
4251
|
let e = {
|
|
4242
4252
|
width: "100%",
|
|
4243
4253
|
borderCollapse: "collapse",
|
|
@@ -4269,11 +4279,11 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4269
4279
|
} : n);
|
|
4270
4280
|
a.updateBlock(n.block.id, { rows: o });
|
|
4271
4281
|
}
|
|
4272
|
-
return (e, n) => (m(), N("div",
|
|
4282
|
+
return (e, n) => (m(), N("div", Zl, [l.value ? (m(), N("table", {
|
|
4273
4283
|
key: 0,
|
|
4274
4284
|
style: y(u.value),
|
|
4275
4285
|
class: "tpl-table-editable"
|
|
4276
|
-
}, [h.value ? (m(), N("thead",
|
|
4286
|
+
}, [h.value ? (m(), N("thead", Ql, [P("tr", null, [(m(!0), N(L, null, v(h.value.cells, (e) => C((m(), N("th", {
|
|
4277
4287
|
key: e.id,
|
|
4278
4288
|
style: y(p.value),
|
|
4279
4289
|
"aria-label": A(r).table.cellPlaceholder,
|
|
@@ -4282,7 +4292,7 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4282
4292
|
onBlur: (t) => b(h.value.id, e.id, t),
|
|
4283
4293
|
onKeydown: n[0] ||= o(i((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4284
4294
|
onClick: i(_, ["stop"])
|
|
4285
|
-
}, null, 44,
|
|
4295
|
+
}, null, 44, $l)), [[t, e.content]])), 128))])])) : j("", !0), P("tbody", null, [(m(!0), N(L, null, v(g.value, (e) => (m(), N("tr", { key: e.id }, [(m(!0), N(L, null, v(e.cells, (a) => C((m(), N("td", {
|
|
4286
4296
|
key: a.id,
|
|
4287
4297
|
style: y(f.value),
|
|
4288
4298
|
"aria-label": A(r).table.cellPlaceholder,
|
|
@@ -4291,9 +4301,9 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4291
4301
|
onBlur: (t) => b(e.id, a.id, t),
|
|
4292
4302
|
onKeydown: n[1] ||= o(i((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4293
4303
|
onClick: i(_, ["stop"])
|
|
4294
|
-
}, null, 44,
|
|
4304
|
+
}, null, 44, eu)), [[t, a.content]])), 128))]))), 128))])], 4)) : (m(), N("div", tu, [E(A(Vn), { size: 16 }), P("span", null, d(A(r).table.empty), 1)]))]));
|
|
4295
4305
|
}
|
|
4296
|
-
}), [["__scopeId", "data-v-73b9f5e5"]]),
|
|
4306
|
+
}), [["__scopeId", "data-v-73b9f5e5"]]), ru = /* @__PURE__ */ B({
|
|
4297
4307
|
__name: "VideoPlayButton",
|
|
4298
4308
|
props: { hoverEffect: {
|
|
4299
4309
|
type: Boolean,
|
|
@@ -4310,7 +4320,7 @@ var Fl = { class: "tpl:relative tpl:w-full" }, Il = {
|
|
|
4310
4320
|
}
|
|
4311
4321
|
});
|
|
4312
4322
|
// src/utils/videoThumbnail.ts
|
|
4313
|
-
function
|
|
4323
|
+
function iu(e) {
|
|
4314
4324
|
if (!e) return {
|
|
4315
4325
|
platform: "unknown",
|
|
4316
4326
|
videoId: null,
|
|
@@ -4342,24 +4352,24 @@ function ru(e) {
|
|
|
4342
4352
|
thumbnailUrl: null
|
|
4343
4353
|
};
|
|
4344
4354
|
}
|
|
4345
|
-
function
|
|
4346
|
-
return t ||
|
|
4355
|
+
function au(e, t) {
|
|
4356
|
+
return t || iu(e).thumbnailUrl;
|
|
4347
4357
|
}
|
|
4348
4358
|
// src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4349
|
-
var
|
|
4359
|
+
var ou = ["src", "alt"], su = {
|
|
4350
4360
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4351
4361
|
style: { opacity: "0.7" }
|
|
4352
|
-
},
|
|
4362
|
+
}, cu = ["href"], lu = ["src", "alt"], uu = ["src", "alt"], du = {
|
|
4353
4363
|
key: 3,
|
|
4354
4364
|
class: "tpl:flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
4355
|
-
},
|
|
4365
|
+
}, fu = /* @__PURE__ */ B({
|
|
4356
4366
|
__name: "VideoBlock",
|
|
4357
4367
|
props: {
|
|
4358
4368
|
block: {},
|
|
4359
4369
|
viewport: {}
|
|
4360
4370
|
},
|
|
4361
4371
|
setup(e) {
|
|
4362
|
-
let t = e, { t: n } =
|
|
4372
|
+
let t = e, { t: n } = ce(), { syntax: r } = V(), a = k(() => ot(t.block.url, r) || ot(t.block.thumbnailUrl, r)), o = Kn(() => a.value ? void 0 : t.block.thumbnailUrl || void 0), s = Kn(() => a.value ? t.block.placeholderUrl : void 0), c = k(() => a.value ? null : t.block.thumbnailUrl ? o.value ?? null : au(t.block.url)), l = k(() => ({ textAlign: t.block.align })), u = k(() => {
|
|
4363
4373
|
let e = t.block.align;
|
|
4364
4374
|
return {
|
|
4365
4375
|
maxWidth: "100%",
|
|
@@ -4369,7 +4379,7 @@ var au = ["src", "alt"], ou = {
|
|
|
4369
4379
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
4370
4380
|
marginRight: e === "center" ? "auto" : void 0
|
|
4371
4381
|
};
|
|
4372
|
-
}), f = k(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), p = k(() =>
|
|
4382
|
+
}), f = k(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), p = k(() => ot(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
4373
4383
|
return (t, r) => (m(), N("div", {
|
|
4374
4384
|
class: "tpl:w-full",
|
|
4375
4385
|
style: y(l.value)
|
|
@@ -4382,7 +4392,7 @@ var au = ["src", "alt"], ou = {
|
|
|
4382
4392
|
src: A(s),
|
|
4383
4393
|
alt: e.block.alt,
|
|
4384
4394
|
style: y(f.value)
|
|
4385
|
-
}, null, 12,
|
|
4395
|
+
}, null, 12, ou), E(ru)], 4)) : a.value ? (m(), N("div", {
|
|
4386
4396
|
key: 1,
|
|
4387
4397
|
class: "tpl:relative tpl:!flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
4388
4398
|
style: y([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
@@ -4391,7 +4401,7 @@ var au = ["src", "alt"], ou = {
|
|
|
4391
4401
|
"stroke-width": 1.5,
|
|
4392
4402
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4393
4403
|
style: { opacity: "0.5" }
|
|
4394
|
-
}), P("span",
|
|
4404
|
+
}), P("span", su, [E(ua, { text: p.value }, null, 8, ["text"])])], 4)) : c.value ? (m(), N(L, { key: 2 }, [e.block.url ? (m(), N("a", {
|
|
4395
4405
|
key: 0,
|
|
4396
4406
|
href: e.block.url,
|
|
4397
4407
|
target: "_blank",
|
|
@@ -4404,7 +4414,7 @@ var au = ["src", "alt"], ou = {
|
|
|
4404
4414
|
src: c.value,
|
|
4405
4415
|
alt: e.block.alt,
|
|
4406
4416
|
style: y(f.value)
|
|
4407
|
-
}, null, 12,
|
|
4417
|
+
}, null, 12, lu), E(ru, { "hover-effect": "" })], 12, cu)) : (m(), N("div", {
|
|
4408
4418
|
key: 1,
|
|
4409
4419
|
class: "tpl:relative tpl:inline-block",
|
|
4410
4420
|
style: y(u.value)
|
|
@@ -4413,29 +4423,29 @@ var au = ["src", "alt"], ou = {
|
|
|
4413
4423
|
src: c.value,
|
|
4414
4424
|
alt: e.block.alt,
|
|
4415
4425
|
style: y(f.value)
|
|
4416
|
-
}, null, 12,
|
|
4426
|
+
}, null, 12, uu), E(ru)], 4))], 64)) : (m(), N("div", du, [E(A(Fr), {
|
|
4417
4427
|
size: 40,
|
|
4418
4428
|
"stroke-width": 1.5,
|
|
4419
4429
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4420
4430
|
}), P("span", null, d(A(n).video.addVideo), 1)]))], 4));
|
|
4421
4431
|
}
|
|
4422
|
-
}),
|
|
4423
|
-
section:
|
|
4432
|
+
}), pu = {
|
|
4433
|
+
section: zl,
|
|
4424
4434
|
title: Fo,
|
|
4425
4435
|
paragraph: Za,
|
|
4426
4436
|
image: Wa,
|
|
4427
4437
|
button: fa,
|
|
4428
4438
|
divider: Ea,
|
|
4429
|
-
video:
|
|
4430
|
-
social:
|
|
4439
|
+
video: fu,
|
|
4440
|
+
social: ql,
|
|
4431
4441
|
menu: Ja,
|
|
4432
|
-
table:
|
|
4433
|
-
spacer:
|
|
4442
|
+
table: nu,
|
|
4443
|
+
spacer: Xl,
|
|
4434
4444
|
html: Ma,
|
|
4435
|
-
countdown:
|
|
4445
|
+
countdown: oe(() => import("./CountdownBlock-CSEq79Nc.js"))
|
|
4436
4446
|
};
|
|
4437
|
-
function
|
|
4438
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } =
|
|
4447
|
+
function mu(t) {
|
|
4448
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: s } = ce(i), l = k(() => bt(bt(bt(xi(i), Vi(n.content.value.settings?.locale)), Se(n.content.value.settings) === "rtl" ? {
|
|
4439
4449
|
title: { textAlign: "right" },
|
|
4440
4450
|
table: { textAlign: "right" }
|
|
4441
4451
|
} : {}), r.blockDefaults ?? {}));
|
|
@@ -4451,7 +4461,7 @@ function pu(t) {
|
|
|
4451
4461
|
content: n.content,
|
|
4452
4462
|
setContent: (e, t) => n.setContent(e, t)
|
|
4453
4463
|
});
|
|
4454
|
-
t.history
|
|
4464
|
+
t.history ? n.contentReplaced && c(n.contentReplaced, () => p.clear(), { flush: "sync" }) : qn(n, p);
|
|
4455
4465
|
let m = Hn({
|
|
4456
4466
|
addBlock: n.addBlock,
|
|
4457
4467
|
removeBlock: n.removeBlock,
|
|
@@ -4470,20 +4480,20 @@ function pu(t) {
|
|
|
4470
4480
|
let y = di(n, {
|
|
4471
4481
|
t: o,
|
|
4472
4482
|
format: s
|
|
4473
|
-
}, r.customBlocks ?? []), b =
|
|
4474
|
-
if (b.allowCustomIgnored &&
|
|
4483
|
+
}, r.customBlocks ?? []), b = kt(r.colors);
|
|
4484
|
+
if (b.allowCustomIgnored && Et.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), b.invalidPresets.length > 0 && Et.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
|
|
4475
4485
|
let e = bi(b.presets, r.blockDefaults, r.templateDefaults);
|
|
4476
|
-
e.length > 0 &&
|
|
4486
|
+
e.length > 0 && Et.warn(`config.colors locks custom colours, but these block/template default colours fall outside colors.presets: ${e.join(", ")}. New blocks start on a colour the palette can't reselect — set blockDefaults / templateDefaults from the same palette.`);
|
|
4477
4487
|
}
|
|
4478
4488
|
let x = cr(r.templateSettings);
|
|
4479
|
-
for (let e of x.unknown)
|
|
4489
|
+
for (let e of x.unknown) Et.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${lr.join(", ")}) — skipping it.`);
|
|
4480
4490
|
let S = zr();
|
|
4481
|
-
_i(S,
|
|
4491
|
+
_i(S, pu);
|
|
4482
4492
|
let C = /* @__PURE__ */ new Set();
|
|
4483
4493
|
function w(e) {
|
|
4484
4494
|
for (let t of e) {
|
|
4485
4495
|
S.registerCustom(t, wa);
|
|
4486
|
-
for (let e of Hi(t, b)) C.has(e.id) || (C.add(e.id),
|
|
4496
|
+
for (let e of Hi(t, b)) C.has(e.id) || (C.add(e.id), Et.warn(e.message));
|
|
4487
4497
|
}
|
|
4488
4498
|
}
|
|
4489
4499
|
r.customBlocks?.length && w(r.customBlocks);
|
|
@@ -4513,37 +4523,41 @@ function pu(t) {
|
|
|
4513
4523
|
}
|
|
4514
4524
|
e(document, "keydown", D);
|
|
4515
4525
|
let O = M(null), A = t.editorRoot ?? document;
|
|
4516
|
-
g(Fn, A), g(Tn, O), g(Rt, /* @__PURE__ */ new Map()), g(
|
|
4517
|
-
let j =
|
|
4526
|
+
g(Fn, A), g(Tn, O), g(Rt, /* @__PURE__ */ new Map()), g(gn, i), g(Mn, n), g(Pn, p), g(On, m), g(xn, h), g(ln, a), g(Dn, f), g(kn, u), g(un, l), g(Cn, r.locale), g(yn, S), g(mn, r.customBlocks ?? []), g(Wt, r.paletteBlocks), g(Zt, vi(r.htmlBlockPreview)), g(Qt, r.layout), g(Pt, r.sectionWrapper), g(wn, b), g(Sn, x.fields), g(pn, pi(n.content, S));
|
|
4527
|
+
let j = Te(r.mergeTags?.syntax);
|
|
4518
4528
|
for (let e of ["opener", "closer"]) {
|
|
4519
4529
|
let t = j[e];
|
|
4520
|
-
typeof t == "string" && t.trim() === "" &&
|
|
4530
|
+
typeof t == "string" && t.trim() === "" && Et.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
|
|
4521
4531
|
}
|
|
4522
|
-
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" &&
|
|
4532
|
+
typeof j.opener != "string" && typeof j.closer == "string" && j.closer.trim() !== "" && rt(j) === null && Et.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
|
|
4523
4533
|
let N = ie(r.mergeTags?.tags ?? []);
|
|
4524
4534
|
function te(e) {
|
|
4525
|
-
Array.isArray(e) ? N.value = e :
|
|
4535
|
+
Array.isArray(e) ? N.value = e : Et.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
4526
4536
|
}
|
|
4527
4537
|
g(Yt, N), g(It, j), g(Bt, r.mergeTags?.onRequest ?? null), g(zt, r.mergeTags?.autocomplete !== !1), g(In, r.mergeTags?.showRawValue !== !1);
|
|
4528
|
-
let ne = M(
|
|
4529
|
-
g(
|
|
4538
|
+
let ne = M(nt(r.mergeTags?.tags ?? []));
|
|
4539
|
+
g(Xt, ne);
|
|
4530
4540
|
let re = ai({
|
|
4531
4541
|
resolvePreview: r.resolvePreview,
|
|
4532
4542
|
getContent: () => {
|
|
4533
4543
|
let e = n.content.value;
|
|
4534
4544
|
if (!n.state.previewMode) return e;
|
|
4535
|
-
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i =
|
|
4536
|
-
return r.layout ?
|
|
4545
|
+
let t = n.activeLocale?.value ?? e.settings.locale ?? "en", i = gt(e, t);
|
|
4546
|
+
return r.layout ? Ne(gt(r.layout, t, { missing: "default" }), i) : i;
|
|
4537
4547
|
},
|
|
4538
4548
|
isActive: () => n.state.previewMode,
|
|
4539
4549
|
getLocale: () => n.activeLocale?.value ?? n.content.value.settings.locale
|
|
4540
4550
|
});
|
|
4541
|
-
g(Ut, re), g(
|
|
4542
|
-
let P =
|
|
4543
|
-
g(
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
let
|
|
4551
|
+
g(Ut, re), g(an, r.resolvePreview);
|
|
4552
|
+
let P = null;
|
|
4553
|
+
g(nn, (e) => (P = e, () => {
|
|
4554
|
+
P === e && (P = null);
|
|
4555
|
+
}));
|
|
4556
|
+
let F = () => (P ?? re.refresh)(), L = k(() => !(n.state.previewMode && re.isConfigured));
|
|
4557
|
+
g(sn, L);
|
|
4558
|
+
let ae = oi();
|
|
4559
|
+
g(Ht, ae), g(Gt, M(!1)), g(qt, M(!1)), g(_n, r.logicTags?.tags ?? []), g(Ft, r.logicTags?.pairs ?? []), g($t, r.logicTags?.onRequest ?? null), g(Kt, si()), g(tn, r.onRequestMedia ?? null), g(jn, r.canDropMedia ?? null), g(Lt, r.resolveImageUrl ? ar(r.resolveImageUrl) : null), r.displayConditions?.onRequest && (r.displayConditions.conditions !== void 0 || r.displayConditions.allowCustom !== void 0) && Et.warn("config.displayConditions.onRequest replaces the built-in condition list — conditions and allowCustom are ignored."), g(on, r.displayConditions?.conditions ?? []), g(En, r.displayConditions?.allowCustom ?? !1), g(Vt, r.displayConditions?.onRequest ?? null), g(fn, t.capabilities ?? {}), g(Nn, y);
|
|
4560
|
+
let R = ci(r.lint) ? null : ui({
|
|
4547
4561
|
content: n.content,
|
|
4548
4562
|
get options() {
|
|
4549
4563
|
return ri({
|
|
@@ -4558,9 +4572,9 @@ function pu(t) {
|
|
|
4558
4572
|
updateSettings: n.updateSettings,
|
|
4559
4573
|
removeBlock: n.removeBlock
|
|
4560
4574
|
});
|
|
4561
|
-
g(
|
|
4562
|
-
function
|
|
4563
|
-
v?.(),
|
|
4575
|
+
g(An, R);
|
|
4576
|
+
function oe() {
|
|
4577
|
+
v?.(), R?.destroy(), _?.destroy(), p.destroy();
|
|
4564
4578
|
}
|
|
4565
4579
|
return {
|
|
4566
4580
|
t: o,
|
|
@@ -4575,25 +4589,26 @@ function pu(t) {
|
|
|
4575
4589
|
themeOverrides: d,
|
|
4576
4590
|
registry: S,
|
|
4577
4591
|
keyboardReorder: y,
|
|
4578
|
-
templateLint:
|
|
4592
|
+
templateLint: R,
|
|
4579
4593
|
popoverRoot: O,
|
|
4580
4594
|
mergeTagSampleMode: ne,
|
|
4581
4595
|
previewResolution: re,
|
|
4582
|
-
|
|
4596
|
+
refreshPreview: F,
|
|
4597
|
+
appliesConditionFilter: L,
|
|
4583
4598
|
registerCustomBlocks: w,
|
|
4584
4599
|
setMergeTags: te,
|
|
4585
4600
|
mergeTags: N,
|
|
4586
4601
|
mergeTagSyntax: j,
|
|
4587
|
-
destroy:
|
|
4602
|
+
destroy: oe
|
|
4588
4603
|
};
|
|
4589
4604
|
}
|
|
4590
4605
|
// src/composables/useSmallScreenNotice.ts
|
|
4591
|
-
var
|
|
4592
|
-
function
|
|
4593
|
-
let n = t(
|
|
4606
|
+
var hu = "(max-width: 767px)";
|
|
4607
|
+
function gu(e) {
|
|
4608
|
+
let n = t(hu);
|
|
4594
4609
|
return {
|
|
4595
4610
|
isSmallScreen: n,
|
|
4596
4611
|
showNotice: k(() => (F(e) ?? !0) && n.value)
|
|
4597
4612
|
};
|
|
4598
4613
|
}
|
|
4599
|
-
export { ki as A, Xr as B, Zi as C, Gi as D, na as E, Ni as F, jr as G, Rr as H, Mi as I, kr as K, ai as L, Ii as M, Fi as N, ca as O, Pi as P, ri as R, Ji as S, ta as T, Lr as U, Ur as V, Nr as W, Ma as _,
|
|
4614
|
+
export { ki as A, Xr as B, Zi as C, Gi as D, na as E, Ni as F, jr as G, Rr as H, Mi as I, kr as K, ai as L, Ii as M, Fi as N, ca as O, Pi as P, ri as R, Ji as S, ta as T, Lr as U, Ur as V, Nr as W, Ma as _, Xl as a, ha as b, Pl as c, Fo as d, No as f, Wa as g, Ja as h, nu as i, Li as j, Ki as k, Io as l, Za as m, mu as n, ql as o, Qa as p, fu as r, zl as s, gu as t, zo as u, Ea as v, oa as w, fa as x, wa as y, Qr as z };
|