@templatical/editor 0.30.0 → 0.32.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/{AiChatSidebar-Bq99wU01.js → AiChatSidebar-ftdKHSR-.js} +15 -15
- package/dist/{AiFeatureMenu-F-C59LAV.js → AiFeatureMenu-aNeCRlil.js} +7 -7
- package/dist/{BlockIssueBadge-Dhk7Hv4m.js → BlockIssueBadge-bTDu6W_2.js} +5 -5
- package/dist/{BlockPreviewCanvas-CqU1kwmG.js → BlockPreviewCanvas-BsOuOfzB.js} +20 -19
- package/dist/{CloudHeaderExtras-vnGV_mLD.js → CloudHeaderExtras-BNpFohqt.js} +5 -5
- package/dist/{CloudPanels-Dv-MD1Tc.js → CloudPanels-xoGWwqSH.js} +7 -7
- package/dist/{CollaboratorBar-DmssyJoB.js → CollaboratorBar-mEqXkdEi.js} +4 -4
- package/dist/{ColorPicker-CXPSbnRD.js → ColorPicker-FL5Vb9bE.js} +7 -7
- package/dist/{CommentsPanel-DnWdgQHg.js → CommentsPanel-slfi74ng.js} +2 -2
- package/dist/{CommentsSidebar-ZOqmuo4D.js → CommentsSidebar-Dea4spMl.js} +14 -14
- package/dist/{CountdownBlock-BgNK7fZY.js → CountdownBlock-DQTwaRxP.js} +3 -3
- package/dist/{CountdownToolbar-SwmE7CIk.js → CountdownToolbar-C7xwJoqh.js} +4 -4
- package/dist/{DesignReferenceSidebar-9cLTzOqP.js → DesignReferenceSidebar-BtBd7bbz.js} +11 -11
- package/dist/{FieldRow-0-UbQR4a.js → FieldRow-BWt7ECqo.js} +1 -1
- package/dist/{IssuesPanel-CDk7lUna.js → IssuesPanel-Ci2H36L2.js} +8 -8
- package/dist/{LoadingTrack-5KBr5cE8.js → LoadingTrack-SQXoZVf2.js} +1 -1
- package/dist/{MergeTagModeToggle-DtD_Xl9w.js → MergeTagModeToggle-Cdi_DmVw.js} +6 -6
- package/dist/{MergeTagSuggestion-DPfXtDzP.js → MergeTagSuggestion-CoCuzEmW.js} +4 -4
- package/dist/{ParagraphEditor-C0NbqDmV.js → ParagraphEditor-DQEOFc0K.js} +26 -26
- package/dist/{RestoreVersionDialog-DCX0rJiV.js → RestoreVersionDialog-CHwngBae.js} +5 -5
- package/dist/{RichTextEditorContent-DZ6GiAUi.js → RichTextEditorContent-C_9xi7dD.js} +8 -8
- package/dist/{SaveBlockDialog-e5LtQRVk.js → SaveBlockDialog-tZqZzPjW.js} +21 -21
- package/dist/SavedBlocksBrowserModal-Bdj3GOD_.js +322 -0
- package/dist/{SavedBlocksPanels-pGZWjSmp.js → SavedBlocksPanels-2sBxAH9w.js} +2 -2
- package/dist/{SavedBlocksPickBar-OZaOG1Si.js → SavedBlocksPickBar-DTjQBR00.js} +4 -4
- package/dist/{TemplateScoringPanel-CDwlSFEe.js → TemplateScoringPanel-B6nHSrBD.js} +15 -15
- package/dist/{TestEmailModal-PVa1VL2p.js → TestEmailModal-DuHbzO37.js} +11 -11
- package/dist/{TestEmailPanel-RekBdAtO.js → TestEmailPanel-TpwP-eK_.js} +2 -2
- package/dist/{TitleEditor-Cs2tELCL.js → TitleEditor-C0JQJu38.js} +12 -12
- package/dist/{TplModal-Bw1i8_eE.js → TplModal-BMGmhquu.js} +5 -5
- package/dist/VersionHistoryMenu-D2x6MMYx.js +157 -0
- package/dist/{VersionHistoryPanels-TqTC4ofA.js → VersionHistoryPanels-aGlUVEGF.js} +2 -2
- package/dist/{VersionPreviewBanner-CQlSzQ2B.js → VersionPreviewBanner-61t3_Z-a.js} +3 -3
- package/dist/{blockTypeIcons-C7WedEOG.js → blockTypeIcons-BsNup009.js} +2 -2
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-DZSrLNXK.js → ca-C0hfqt4U.js} +5 -0
- package/dist/cdn/chunks/{AiChatSidebar-DmZ1Nvxo.js → AiChatSidebar-CqWvtRwB.js} +12 -12
- package/dist/cdn/chunks/{AiChatSidebar-DmZ1Nvxo.js.map → AiChatSidebar-CqWvtRwB.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-D4tax9j3.js → AiFeatureMenu-DoFrLcXJ.js} +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-D4tax9j3.js.map → AiFeatureMenu-DoFrLcXJ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-Bry71Wjz.js → BlockIssueBadge-B_mUH69a.js} +5 -5
- package/dist/cdn/chunks/{BlockIssueBadge-Bry71Wjz.js.map → BlockIssueBadge-B_mUH69a.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-DDOqFJlT.js → BlockPreviewCanvas-CSIxs7hr.js} +21 -20
- package/dist/cdn/chunks/BlockPreviewCanvas-CSIxs7hr.js.map +1 -0
- package/dist/cdn/chunks/{CloudHeaderExtras-g-_SFPna.js → CloudHeaderExtras-Dgtr7WaE.js} +5 -5
- package/dist/cdn/chunks/{CloudHeaderExtras-g-_SFPna.js.map → CloudHeaderExtras-Dgtr7WaE.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-Cnh07_2G.js → CloudPanels-B91lUmof.js} +7 -7
- package/dist/cdn/chunks/{CloudPanels-Cnh07_2G.js.map → CloudPanels-B91lUmof.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-CLGB0prG.js → CollaboratorBar-CQwPWoFu.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-CLGB0prG.js.map → CollaboratorBar-CQwPWoFu.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-Ww4xHHMI.js → ColorPicker-CdrKX48J.js} +7 -7
- package/dist/cdn/chunks/{ColorPicker-Ww4xHHMI.js.map → ColorPicker-CdrKX48J.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-DjId-XH-.js → CommentsPanel-BJNgTmAA.js} +3 -3
- package/dist/cdn/chunks/{CommentsPanel-DjId-XH-.js.map → CommentsPanel-BJNgTmAA.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-DXXGWSr4.js → CommentsSidebar-D6VIIPhB.js} +5 -5
- package/dist/cdn/chunks/{CommentsSidebar-DXXGWSr4.js.map → CommentsSidebar-D6VIIPhB.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CWeJBC0L.js → CountdownBlock-BRwXUvGU.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-CWeJBC0L.js.map → CountdownBlock-BRwXUvGU.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-CO6xLgYc.js → CountdownToolbar-CVaU5WG6.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-CO6xLgYc.js.map → CountdownToolbar-CVaU5WG6.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-DRGqm33h.js → DesignReferenceSidebar-BvOwE1kg.js} +7 -7
- package/dist/cdn/chunks/{DesignReferenceSidebar-DRGqm33h.js.map → DesignReferenceSidebar-BvOwE1kg.js.map} +1 -1
- package/dist/cdn/chunks/{FieldRow-CbcpsxZ4.js → FieldRow-D9OJhYeb.js} +2 -2
- package/dist/cdn/chunks/{FieldRow-CbcpsxZ4.js.map → FieldRow-D9OJhYeb.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-iC2hgrXx.js → IssuesPanel-MJZxkScz.js} +6 -6
- package/dist/cdn/chunks/{IssuesPanel-iC2hgrXx.js.map → IssuesPanel-MJZxkScz.js.map} +1 -1
- package/dist/cdn/chunks/{LoadingTrack-Cz1sT0wP.js → LoadingTrack-Cm3TDKb3.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-Cz1sT0wP.js.map → LoadingTrack-Cm3TDKb3.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-DZtnCj0F.js → MergeTagModeToggle-bNuN6PTV.js} +6 -6
- package/dist/cdn/chunks/{MergeTagModeToggle-DZtnCj0F.js.map → MergeTagModeToggle-bNuN6PTV.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagSuggestion-VP_nC-8W.js → MergeTagSuggestion-t8Uj00Er.js} +3 -3
- package/dist/cdn/chunks/{MergeTagSuggestion-VP_nC-8W.js.map → MergeTagSuggestion-t8Uj00Er.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BalgLjBt.js → ParagraphEditor-BU8tlFbL.js} +28 -28
- package/dist/cdn/chunks/{ParagraphEditor-BalgLjBt.js.map → ParagraphEditor-BU8tlFbL.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-DGOXQ0ou.js → RestoreVersionDialog-vdRFfyy0.js} +5 -5
- package/dist/cdn/chunks/{RestoreVersionDialog-DGOXQ0ou.js.map → RestoreVersionDialog-vdRFfyy0.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DpvOKKH-.js → RichTextEditorContent-C1-5I8Df.js} +7 -7
- package/dist/cdn/chunks/{RichTextEditorContent-DpvOKKH-.js.map → RichTextEditorContent-C1-5I8Df.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-Dod3jX9X.js → SaveBlockDialog-DWaeqcM8.js} +9 -9
- package/dist/cdn/chunks/{SaveBlockDialog-Dod3jX9X.js.map → SaveBlockDialog-DWaeqcM8.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BysGB8zb.js → SavedBlocksBrowserModal-qC7UhW74.js} +110 -111
- package/dist/cdn/chunks/SavedBlocksBrowserModal-qC7UhW74.js.map +1 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-DJ4fceEM.js → SavedBlocksPanels-BvtjtdsY.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPanels-DJ4fceEM.js.map → SavedBlocksPanels-BvtjtdsY.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DGgbqAsb.js → SavedBlocksPickBar-CxXjF3RN.js} +5 -5
- package/dist/cdn/chunks/{SavedBlocksPickBar-DGgbqAsb.js.map → SavedBlocksPickBar-CxXjF3RN.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-B0YcaJsR.js → TemplateScoringPanel-CroWaWqy.js} +50 -50
- package/dist/cdn/chunks/{TemplateScoringPanel-B0YcaJsR.js.map → TemplateScoringPanel-CroWaWqy.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DvZFnhWa.js → TestEmailModal-iWxAZRRq.js} +10 -10
- package/dist/cdn/chunks/{TestEmailModal-DvZFnhWa.js.map → TestEmailModal-iWxAZRRq.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-BdxpMiWc.js → TestEmailPanel-CGUtEuwp.js} +3 -3
- package/dist/cdn/chunks/{TestEmailPanel-BdxpMiWc.js.map → TestEmailPanel-CGUtEuwp.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CfHWnThg.js → TitleEditor-DvXUW2j-.js} +12 -12
- package/dist/cdn/chunks/{TitleEditor-CfHWnThg.js.map → TitleEditor-DvXUW2j-.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-BMTW5bEN.js → TplModal-X-qNoLGZ.js} +5 -5
- package/dist/cdn/chunks/{TplModal-BMTW5bEN.js.map → TplModal-X-qNoLGZ.js.map} +1 -1
- package/dist/cdn/chunks/VersionHistoryMenu-yKzwxf7n.js +150 -0
- package/dist/cdn/chunks/VersionHistoryMenu-yKzwxf7n.js.map +1 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-2l_FLtix.js → VersionHistoryPanels--hQaanjH.js} +3 -3
- package/dist/cdn/chunks/{VersionHistoryPanels-2l_FLtix.js.map → VersionHistoryPanels--hQaanjH.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-C8pfES5A.js → VersionPreviewBanner-DWU_SqMd.js} +4 -4
- package/dist/cdn/chunks/{VersionPreviewBanner-C8pfES5A.js.map → VersionPreviewBanner-DWU_SqMd.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-JUwZtKaq.js → blockTypeIcons-ZEzEpCti.js} +2 -2
- package/dist/cdn/chunks/{blockTypeIcons-JUwZtKaq.js.map → blockTypeIcons-ZEzEpCti.js.map} +1 -1
- package/dist/cdn/chunks/{ca-DZSrLNXK.js → ca-C0hfqt4U.js} +6 -1
- package/dist/cdn/chunks/ca-C0hfqt4U.js.map +1 -0
- package/dist/cdn/chunks/{cloud-CITqEHEc.js → cloud-BP5-6__d.js} +4 -4
- package/dist/cdn/chunks/{cloud-CITqEHEc.js.map → cloud-BP5-6__d.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-jLhuyKds.js → createCloudRuntime-DD6ppb71.js} +10 -10
- package/dist/cdn/chunks/{createCloudRuntime-jLhuyKds.js.map → createCloudRuntime-DD6ppb71.js.map} +1 -1
- package/dist/{de-DbayqpK-.js → cdn/chunks/de-C6J2Iae8.js} +7 -0
- package/dist/cdn/chunks/de-C6J2Iae8.js.map +1 -0
- package/dist/cdn/chunks/{dist-CgR3inPR.js → dist-BW6Y49zE.js} +2 -2
- package/dist/cdn/chunks/{dist-CgR3inPR.js.map → dist-BW6Y49zE.js.map} +1 -1
- package/dist/cdn/chunks/{dist-El3fQnfk.js → dist-CAFTQ6Y2.js} +5 -5
- package/dist/cdn/chunks/{dist-El3fQnfk.js.map → dist-CAFTQ6Y2.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-D2vo-aQI.js → draggable-kbOhCgnk.js} +12 -13
- package/dist/cdn/chunks/{draggable-D2vo-aQI.js.map → draggable-kbOhCgnk.js.map} +1 -1
- package/dist/cdn/chunks/{en-l0ib5X0f.js → en-BaUYOQi8.js} +6 -1
- package/dist/cdn/chunks/en-BaUYOQi8.js.map +1 -0
- package/dist/cdn/chunks/en-mEKGL1PX.js +2 -0
- package/dist/cdn/chunks/{es-CMQ-5PJP.js → es-CKDYfJYn.js} +6 -1
- package/dist/cdn/chunks/es-CKDYfJYn.js.map +1 -0
- package/dist/cdn/chunks/{extensions-D30V0hzj.js → extensions-BUPHNpKD.js} +7 -7
- package/dist/cdn/chunks/{extensions-D30V0hzj.js.map → extensions-BUPHNpKD.js.map} +1 -1
- package/dist/cdn/chunks/formatAbsoluteDateTime-DMmop3C-.js +15 -0
- package/dist/cdn/chunks/formatAbsoluteDateTime-DMmop3C-.js.map +1 -0
- package/dist/cdn/chunks/{fr-DNXmZWAq.js → fr-L8DR73mK.js} +6 -1
- package/dist/cdn/chunks/fr-L8DR73mK.js.map +1 -0
- package/dist/cdn/chunks/{icons-BTdLXRXn.js → icons-SP5Itd-A.js} +16 -16
- package/dist/cdn/chunks/icons-SP5Itd-A.js.map +1 -0
- package/dist/cdn/chunks/keys-BOn5i9jV.js +12 -0
- package/dist/cdn/chunks/keys-BOn5i9jV.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-BPvKXNfO.js → liquid.browser-BypTT2oc.js} +4 -4
- package/dist/cdn/chunks/{liquid.browser-BPvKXNfO.js.map → liquid.browser-BypTT2oc.js.map} +1 -1
- package/dist/{nl-BylRRHYJ.js → cdn/chunks/nl-GDWeuX18.js} +7 -0
- package/dist/cdn/chunks/nl-GDWeuX18.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-DyCIgmqJ.js → preRenderCustomBlocks-LFB-e-0m.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-DyCIgmqJ.js.map → preRenderCustomBlocks-LFB-e-0m.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-BVoJhpie.js → pt-BR-B1AVVhWj.js} +6 -1
- package/dist/cdn/chunks/pt-BR-B1AVVhWj.js.map +1 -0
- package/dist/cdn/chunks/{src-6J-yyZoD.js → src-BM3f9I7t.js} +268 -268
- package/dist/cdn/chunks/{src-6J-yyZoD.js.map → src-BM3f9I7t.js.map} +1 -1
- package/dist/cdn/chunks/{src-BD60gqPW.js → src-CLoCCDfs.js} +26 -26
- package/dist/cdn/chunks/{src-BD60gqPW.js.map → src-CLoCCDfs.js.map} +1 -1
- package/dist/cdn/chunks/{src-65H3RNcb.js → src-Cxl-9O-L.js} +699 -684
- package/dist/cdn/chunks/src-Cxl-9O-L.js.map +1 -0
- package/dist/cdn/chunks/{src-CLTXM4PM.js → src-DtnvR_Hl.js} +19 -19
- package/dist/cdn/chunks/src-DtnvR_Hl.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-Bqy-H6CT.js → tiptap-Epe8m3Vo.js} +2918 -2901
- package/dist/cdn/chunks/tiptap-Epe8m3Vo.js.map +1 -0
- package/dist/cdn/chunks/{useAliveFlag-DrXxPV8V.js → useAliveFlag-CT9gjvO_.js} +2 -2
- package/dist/cdn/chunks/{useAliveFlag-DrXxPV8V.js.map → useAliveFlag-CT9gjvO_.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-D0AoLV0a.js → useCloudI18n-DbsLlCbZ.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-D0AoLV0a.js.map → useCloudI18n-DbsLlCbZ.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-BQeEwEQ9.js → useEditorCore-ChlgO2GN.js} +556 -412
- package/dist/cdn/chunks/useEditorCore-ChlgO2GN.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-BlF1WPeu.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-BFGRBGts.js.map → useEditorRoot-BlF1WPeu.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DIhawILp.js → useI18n-BdxNNw6j.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DIhawILp.js.map → useI18n-BdxNNw6j.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-lWo7So18.js → useMergeTag-CI2WUNrR.js} +4 -4
- package/dist/cdn/chunks/{useMergeTag-lWo7So18.js.map → useMergeTag-CI2WUNrR.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-DkiTLnBm.js → usePopoverPosition-Dw1nTSNx.js} +3 -3
- package/dist/cdn/chunks/{usePopoverPosition-DkiTLnBm.js.map → usePopoverPosition-Dw1nTSNx.js.map} +1 -1
- package/dist/cdn/chunks/{useScrollToBlock-KcSAuXKz.js → useScrollToBlock-BMis3-PR.js} +3 -3
- package/dist/cdn/chunks/{useScrollToBlock-KcSAuXKz.js.map → useScrollToBlock-BMis3-PR.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +1099 -1143
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-CTe6VejT.js → check-JK8Uacq0.js} +1 -1
- package/dist/{chevron-down-BBThVMu-.js → chevron-down-a-fb_Ijn.js} +1 -1
- package/dist/{chevron-up-iECwf-Bc.js → chevron-up-x4l0et_Y.js} +1 -1
- package/dist/{circle-alert-Z_eeykrO.js → circle-alert-CJDW5LZo.js} +1 -1
- package/dist/{clock-CEj1c29j.js → clock-BW6rXk2f.js} +1 -1
- package/dist/{cloud-DwJ8ebNl.js → cloud-BMzRKCbk.js} +3 -3
- package/dist/{createCloudRuntime-CdXQdl34.js → createCloudRuntime-zNcMjRgb.js} +8 -8
- package/dist/{createLucideIcon-DphAT3tw.js → createLucideIcon-Bvw1Zx56.js} +3 -3
- package/dist/{cdn/chunks/de-DbayqpK-.js → de-C6J2Iae8.js} +5 -2
- package/dist/{dist-gWM8H2hz.js → dist-BxFbxpgW.js} +5 -5
- package/dist/{dist-DifptC-U.js → dist-ByT5fgKq.js} +2 -2
- package/dist/{dist-BfcqryVg.js → dist-C1tsW_99.js} +2 -2
- package/dist/{dist-D2P8U3p6.js → dist-CtF9STPS.js} +2 -2
- package/dist/{dist-DSgmnQ-f.js → dist-CtMXAH7a.js} +2 -2
- package/dist/dist-D08oVYhr.js +5 -0
- package/dist/{dist-BdIwIlKz.js → dist-D7WY8VPq.js} +2 -2
- package/dist/{dist-9fjN9cuD.js → dist-DC-3T0ED.js} +2 -2
- package/dist/{dist-nmzPlqlz.js → dist-DL9334yz.js} +1429 -1412
- package/dist/{dist-DLaIQ5H5.js → dist-DkcA6epL.js} +8 -8
- package/dist/dist-DzdeVn-W.js +5 -0
- package/dist/{dist-CzVIVbSa.js → dist-PL6vP4SC.js} +61 -61
- package/dist/{dist-CuuPnIMy.js → dist-dNiknO7j.js} +4 -4
- package/dist/{dist-CaR5TLiM.js → dist-f7HXo6j6.js} +2 -2
- package/dist/{dist-BUpBA58N.js → dist-heatwAdo.js} +1 -1
- package/dist/{en-l0ib5X0f.js → en-BaUYOQi8.js} +5 -0
- package/dist/{es-CMQ-5PJP.js → es-CKDYfJYn.js} +5 -0
- package/dist/{extensions-Bjsdx6Vm.js → extensions-kOYwOh72.js} +21 -21
- package/dist/formatAbsoluteDateTime-DMmop3C-.js +13 -0
- package/dist/{fr-DNXmZWAq.js → fr-L8DR73mK.js} +5 -0
- package/dist/{image-up-W1INxCu8.js → image-up-CuzFc1mu.js} +1 -1
- package/dist/{info-5t4WYKfh.js → info-DybAwcA3.js} +1 -1
- package/dist/keys-BOhFlHsv.js +10 -0
- package/dist/{liquid.browser-CJgDDvQz.js → liquid.browser-wPG0n4Cs.js} +3 -3
- package/dist/{loader-circle-DJCZ_JMY.js → loader-circle-t-SVgmJ3.js} +1 -1
- package/dist/{message-circle-Biu6lHh_.js → message-circle-DtwKrlhN.js} +1 -1
- package/dist/{cdn/chunks/nl-BylRRHYJ.js → nl-GDWeuX18.js} +5 -2
- package/dist/{pencil-DkPlMca7.js → pencil-2qhC-Y4q.js} +1 -1
- package/dist/{preRenderCustomBlocks-2KyBJocY.js → preRenderCustomBlocks-CSIF-HyJ.js} +1 -1
- package/dist/{pt-BR-BVoJhpie.js → pt-BR-B1AVVhWj.js} +5 -0
- package/dist/{refresh-cw-DHbpkkol.js → refresh-cw-C8SBuPdg.js} +1 -1
- package/dist/{runtime-dom.esm-bundler-Co_SPqAz.js → runtime-dom.esm-bundler-BuG03jBM.js} +3 -3
- package/dist/{scan-line-DojwGzjU.js → scan-line-E7w4yQyv.js} +1 -1
- package/dist/{send-c6ppcE9I.js → send-BoqJliF6.js} +1 -1
- package/dist/{shield-check-F9T4ylNK.js → shield-check-D0dMaHtE.js} +1 -1
- package/dist/{sparkles-D-0OiTZD.js → sparkles-Dy2BJjiX.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +1236 -1281
- package/dist/{text-align-start-kEEtoRrD.js → text-align-start-DrxjxvIy.js} +1 -1
- package/dist/{trash-2-DRQzhY9R.js → trash-rYMzzHZd.js} +2 -2
- package/dist/{triangle-alert-Bt4-GU3t.js → triangle-alert-DxnFj4-B.js} +1 -1
- package/dist/{upload-D2wtjvH8.js → upload-DZu1adQz.js} +1 -1
- package/dist/{useAliveFlag-AFbwfHlJ.js → useAliveFlag-PVmp95MT.js} +1 -1
- package/dist/{useCloudI18n-BA69BpQ_.js → useCloudI18n-BlMajbKp.js} +2 -2
- package/dist/{useEditorCore-Du9Vx-qr.js → useEditorCore-CwQYCSXO.js} +1212 -1067
- package/dist/{useEditorRoot-Cdo8Vhxa.js → useEditorRoot-C92q8uV-.js} +2 -2
- package/dist/{useI18n-B135ASaG.js → useI18n-Ce_BRzYv.js} +2 -2
- package/dist/{useMergeTag-Cx36rtrt.js → useMergeTag-CrXJ49lr.js} +3 -3
- package/dist/{usePopoverPosition-DAOHr_iM.js → usePopoverPosition-CPk7Twye.js} +2 -2
- package/dist/{useScrollToBlock-B0Qpjfa4.js → useScrollToBlock-DvpMfWs2.js} +3 -3
- package/dist/{vue.runtime.esm-bundler-BhOUdXMi.js → vue.runtime.esm-bundler-D9JUcKrV.js} +4 -4
- package/dist/{x-YiG-TUGN.js → x-DJOd1hS4.js} +1 -1
- package/package.json +23 -23
- package/dist/SavedBlocksBrowserModal-ZQIQoARO.js +0 -323
- package/dist/VersionHistoryMenu-B6zAcmAC.js +0 -155
- package/dist/cdn/chunks/BlockPreviewCanvas-DDOqFJlT.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-BysGB8zb.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryMenu-DJGcA_RX.js +0 -148
- package/dist/cdn/chunks/VersionHistoryMenu-DJGcA_RX.js.map +0 -1
- package/dist/cdn/chunks/ca-DZSrLNXK.js.map +0 -1
- package/dist/cdn/chunks/de-DbayqpK-.js.map +0 -1
- package/dist/cdn/chunks/en-CwXyUb6-.js +0 -2
- package/dist/cdn/chunks/en-l0ib5X0f.js.map +0 -1
- package/dist/cdn/chunks/es-CMQ-5PJP.js.map +0 -1
- package/dist/cdn/chunks/fr-DNXmZWAq.js.map +0 -1
- package/dist/cdn/chunks/icons-BTdLXRXn.js.map +0 -1
- package/dist/cdn/chunks/keys-BJ770Mwm.js +0 -12
- package/dist/cdn/chunks/keys-BJ770Mwm.js.map +0 -1
- package/dist/cdn/chunks/nl-BylRRHYJ.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BVoJhpie.js.map +0 -1
- package/dist/cdn/chunks/src-65H3RNcb.js.map +0 -1
- package/dist/cdn/chunks/src-CLTXM4PM.js.map +0 -1
- package/dist/cdn/chunks/tiptap-Bqy-H6CT.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-BQeEwEQ9.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-BFGRBGts.js +0 -10
- package/dist/dist-CzMzshfS.js +0 -5
- package/dist/dist-DTVuNn8M.js +0 -5
- package/dist/keys-BJtoezGU.js +0 -10
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { A as e, B as t, D as n, Dt as r, E as i, G as a, J as o, L as s, M as c, O as l, Ot as u, P as d, Q as f, S as p, T as m, U as h, V as g, X as _, Y as v, _ as y, b, c as x, d as S, et as C, g as w, h as T, it as E, j as D, k as O, kt as k, l as A, nt as
|
|
2
|
-
import { c as
|
|
3
|
-
import { B as oe, C as se, D as ce, E as le, F as ue, H as de, I as fe, L as pe, M as me, N as he, O as ge, P as _e, R as ve, S as ye, T as be,
|
|
4
|
-
import { f as Ke, g as qe, h as Je, m as Ye } from "./dist-
|
|
5
|
-
import { a as Xe, i as Ze, n as Qe, r as $e } from "./dist-
|
|
6
|
-
import { A as et, B as tt, C as nt, D as rt, E as it, F as at,
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { a as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import "./useCloudI18n-
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
1
|
+
import { A as e, B as t, D as n, Dt as r, E as i, G as a, J as o, L as s, M as c, O as l, Ot as u, P as d, Q as f, S as p, T as m, U as h, V as g, X as _, Y as v, _ as y, b, c as x, d as S, et as C, g as w, h as T, it as E, j as D, k as O, kt as k, l as A, nt as j, q as M, r as N, rt as P, s as F, tt as ee, u as I, v as L, y as te, z as ne } from "./vue.runtime.esm-bundler-D9JUcKrV.js";
|
|
2
|
+
import { c as R, o as re, s as ie } from "./runtime-dom.esm-bundler-BuG03jBM.js";
|
|
3
|
+
import { A as ae, B as oe, C as se, D as ce, E as le, F as ue, H as de, I as fe, L as pe, M as me, N as he, O as ge, P as _e, R as ve, S as ye, T as be, U as xe, V as Se, _ as Ce, a as we, b as Te, d as Ee, f as De, g as Oe, h as ke, i as Ae, k as je, l as Me, m as Ne, n as Pe, o as Fe, p as Ie, r as Le, s as Re, t as ze, u as Be, v as Ve, w as He, x as Ue, y as We, z as Ge } from "./dist-PL6vP4SC.js";
|
|
4
|
+
import { f as Ke, g as qe, h as Je, m as Ye } from "./dist-heatwAdo.js";
|
|
5
|
+
import { a as Xe, i as Ze, n as Qe, r as $e } from "./dist-dNiknO7j.js";
|
|
6
|
+
import { A as et, B as tt, C as nt, D as rt, E as it, F as at, G as ot, H as st, I as ct, M as lt, N as ut, O as dt, P as ft, S as pt, T as mt, U as ht, V as gt, W as _t, _ as vt, a as yt, b as bt, c as xt, d as St, f as Ct, g as wt, h as Tt, j as Et, k as Dt, m as Ot, n as kt, o as At, p as jt, r as Mt, s as Nt, u as Pt, v as Ft, w as It, x as Lt, y as Rt, z as zt } from "./keys-BOhFlHsv.js";
|
|
7
|
+
import { t as Bt } from "./useI18n-Ce_BRzYv.js";
|
|
8
|
+
import { t as Vt } from "./logger-BBlvSn6q.js";
|
|
9
|
+
import { a as Ht, i as Ut, o as Wt, r as Gt, t as Kt } from "./usePopoverPosition-CPk7Twye.js";
|
|
10
|
+
import { t as qt } from "./createLucideIcon-Bvw1Zx56.js";
|
|
11
|
+
import { t as Jt } from "./loader-circle-t-SVgmJ3.js";
|
|
12
|
+
import { t as Yt } from "./message-circle-DtwKrlhN.js";
|
|
13
|
+
import { t as Xt } from "./trash-rYMzzHZd.js";
|
|
14
|
+
import { t as Zt } from "./triangle-alert-DxnFj4-B.js";
|
|
15
|
+
import { t as Qt } from "./upload-DZu1adQz.js";
|
|
16
|
+
import { t as $t } from "./LoadingTrack-SQXoZVf2.js";
|
|
17
|
+
import { t as en } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
18
|
+
import { t as tn } from "./useEditorRoot-C92q8uV-.js";
|
|
19
|
+
import "./useCloudI18n-BlMajbKp.js";
|
|
20
|
+
import { t as nn } from "./useMergeTag-CrXJ49lr.js";
|
|
21
|
+
import { t as rn } from "./useAliveFlag-PVmp95MT.js";
|
|
22
22
|
//#region ../core/dist/index.js
|
|
23
|
-
function
|
|
23
|
+
function an(e) {
|
|
24
24
|
return e instanceof Error ? e : Error(String(e), { cause: e });
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function on(e, t) {
|
|
27
27
|
try {
|
|
28
28
|
t();
|
|
29
29
|
} catch (t) {
|
|
30
|
-
e?.(
|
|
30
|
+
e?.(an(t));
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function sn(e) {
|
|
34
34
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function cn(e) {
|
|
37
37
|
let t = o({
|
|
38
38
|
template: null,
|
|
39
39
|
content: e.content ?? Ne(e.defaultFontFamily, e.templateDefaults),
|
|
@@ -131,7 +131,7 @@ function sn(e) {
|
|
|
131
131
|
if (u(n)) return;
|
|
132
132
|
let r = s(t.content.blocks, n);
|
|
133
133
|
if (r && r.type === "section") {
|
|
134
|
-
if (i < 0 || i >=
|
|
134
|
+
if (i < 0 || i >= sn(r.columns)) return;
|
|
135
135
|
r.children[i] = r.children[i] || [];
|
|
136
136
|
let t = r.children[i];
|
|
137
137
|
a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
|
|
@@ -164,7 +164,7 @@ function sn(e) {
|
|
|
164
164
|
let d;
|
|
165
165
|
if (i) {
|
|
166
166
|
let e = s(t.content.blocks, i);
|
|
167
|
-
if (!e || e.type !== "section" || a < 0 || a >=
|
|
167
|
+
if (!e || e.type !== "section" || a < 0 || a >= sn(e.columns)) return;
|
|
168
168
|
e.children[a] = e.children[a] || [], d = e.children[a];
|
|
169
169
|
} else d = t.content.blocks;
|
|
170
170
|
let [f] = o.blocks.splice(c, 1);
|
|
@@ -177,7 +177,7 @@ function sn(e) {
|
|
|
177
177
|
throw new Re(`[Templatical] Templates: ${e} ${t}`);
|
|
178
178
|
}
|
|
179
179
|
function D(t) {
|
|
180
|
-
|
|
180
|
+
on(e.onError, t);
|
|
181
181
|
}
|
|
182
182
|
function O(t) {
|
|
183
183
|
let { templates: n } = e;
|
|
@@ -208,7 +208,7 @@ function sn(e) {
|
|
|
208
208
|
}
|
|
209
209
|
return D(() => i.onCreated?.(o)), o;
|
|
210
210
|
}
|
|
211
|
-
async function
|
|
211
|
+
async function j(n) {
|
|
212
212
|
let r = O("load()"), i;
|
|
213
213
|
t.isLoading = !0;
|
|
214
214
|
try {
|
|
@@ -220,7 +220,7 @@ function sn(e) {
|
|
|
220
220
|
}
|
|
221
221
|
return D(() => r.onLoaded?.(i)), i;
|
|
222
222
|
}
|
|
223
|
-
async function
|
|
223
|
+
async function M(r = "api") {
|
|
224
224
|
let i = O("save()"), { save: a } = i;
|
|
225
225
|
typeof a != "function" && E("save()", "is disabled by the provider — its `save` is `false`.");
|
|
226
226
|
let o = t.template;
|
|
@@ -247,7 +247,7 @@ function sn(e) {
|
|
|
247
247
|
}
|
|
248
248
|
return D(() => i.onSaved?.(c, { trigger: r })), c;
|
|
249
249
|
}
|
|
250
|
-
function
|
|
250
|
+
function N() {
|
|
251
251
|
return t.template?.id !== void 0;
|
|
252
252
|
}
|
|
253
253
|
return {
|
|
@@ -270,16 +270,16 @@ function sn(e) {
|
|
|
270
270
|
findBlockLocation: d,
|
|
271
271
|
setName: k,
|
|
272
272
|
create: A,
|
|
273
|
-
load:
|
|
274
|
-
save:
|
|
275
|
-
hasTemplate:
|
|
273
|
+
load: j,
|
|
274
|
+
save: M,
|
|
275
|
+
hasTemplate: N
|
|
276
276
|
};
|
|
277
277
|
}
|
|
278
|
-
var
|
|
279
|
-
function
|
|
280
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
278
|
+
var ln = 50, un = 300, dn = 1500;
|
|
279
|
+
function fn(e) {
|
|
280
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = ln } = e, a = _([]), o = _([]), s = _(!1), c = null, l = null, u = g(() => a.value.length > 0), d = g(() => o.value.length > 0);
|
|
281
281
|
function f() {
|
|
282
|
-
return
|
|
282
|
+
return Se(t.value);
|
|
283
283
|
}
|
|
284
284
|
function p(e) {
|
|
285
285
|
a.value.push(e), a.value.length > i && a.value.splice(0, a.value.length - i);
|
|
@@ -295,21 +295,21 @@ function dn(e) {
|
|
|
295
295
|
if (l && l.blockId === e) {
|
|
296
296
|
clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
|
|
297
297
|
l = null;
|
|
298
|
-
},
|
|
298
|
+
}, un);
|
|
299
299
|
return;
|
|
300
300
|
}
|
|
301
301
|
m(), p(f()), o.value = [], l = {
|
|
302
302
|
blockId: e,
|
|
303
303
|
timeoutId: setTimeout(() => {
|
|
304
304
|
l = null;
|
|
305
|
-
},
|
|
305
|
+
}, un)
|
|
306
306
|
};
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
309
|
function y() {
|
|
310
310
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
311
311
|
s.value = !1, c = null;
|
|
312
|
-
},
|
|
312
|
+
}, dn);
|
|
313
313
|
}
|
|
314
314
|
function b() {
|
|
315
315
|
if (a.value.length === 0) return;
|
|
@@ -341,33 +341,33 @@ function dn(e) {
|
|
|
341
341
|
destroy: C
|
|
342
342
|
};
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function pn(e) {
|
|
345
345
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
346
346
|
...e,
|
|
347
|
-
id:
|
|
347
|
+
id: ce(),
|
|
348
348
|
cells: e.cells.map((e) => ({
|
|
349
349
|
...e,
|
|
350
|
-
id:
|
|
350
|
+
id: ce()
|
|
351
351
|
}))
|
|
352
352
|
})) : e.type === "social" ? e.icons = e.icons.map((e) => ({
|
|
353
353
|
...e,
|
|
354
|
-
id:
|
|
354
|
+
id: ce()
|
|
355
355
|
})) : e.type === "menu" && (e.items = e.items.map((e) => ({
|
|
356
356
|
...e,
|
|
357
|
-
id:
|
|
357
|
+
id: ce()
|
|
358
358
|
})));
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function mn(e) {
|
|
361
361
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
362
362
|
function o(n, r, a) {
|
|
363
|
-
let o = Be(n,
|
|
364
|
-
return t(
|
|
363
|
+
let o = typeof e.blockDefaults == "function" ? e.blockDefaults() : e.blockDefaults, s = Be(n, o);
|
|
364
|
+
return t(s, r, a), i(s.id), s;
|
|
365
365
|
}
|
|
366
366
|
function s(e, n, r) {
|
|
367
367
|
let o = JSON.parse(JSON.stringify(e));
|
|
368
|
-
if (o.id =
|
|
368
|
+
if (o.id = ce(), pn(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
369
369
|
let t = JSON.parse(JSON.stringify(e));
|
|
370
|
-
return t.id =
|
|
370
|
+
return t.id = ce(), pn(t), t;
|
|
371
371
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
372
372
|
else {
|
|
373
373
|
let i = a?.(e.id) ?? null;
|
|
@@ -388,9 +388,9 @@ function pn(e) {
|
|
|
388
388
|
updateBlockProperty: l
|
|
389
389
|
};
|
|
390
390
|
}
|
|
391
|
-
var
|
|
392
|
-
function
|
|
393
|
-
let { content: t, isDirty: n, onChange: r, debounce: i =
|
|
391
|
+
var hn = 2e3;
|
|
392
|
+
function gn(e) {
|
|
393
|
+
let { content: t, isDirty: n, onChange: r, debounce: i = hn, enabled: a = !0 } = e, o = null, s = !1;
|
|
394
394
|
function c() {
|
|
395
395
|
return typeof a == "function" ? a() : a;
|
|
396
396
|
}
|
|
@@ -407,7 +407,7 @@ function hn(e) {
|
|
|
407
407
|
d(), n() && r(JSON.parse(JSON.stringify(t.value)));
|
|
408
408
|
}
|
|
409
409
|
function p() {
|
|
410
|
-
|
|
410
|
+
c() && !s && (d(), o = setTimeout(() => {
|
|
411
411
|
o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
|
|
412
412
|
}, i));
|
|
413
413
|
}
|
|
@@ -425,7 +425,7 @@ function hn(e) {
|
|
|
425
425
|
destroy: h
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
|
-
function
|
|
428
|
+
function _n(e) {
|
|
429
429
|
let t = o(/* @__PURE__ */ new Set()), n = g(() => t.size > 0);
|
|
430
430
|
function r(e) {
|
|
431
431
|
return t.has(e);
|
|
@@ -443,7 +443,7 @@ function gn(e) {
|
|
|
443
443
|
hasHiddenBlocks: n
|
|
444
444
|
};
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function vn(e) {
|
|
447
447
|
let t = _(!1), n = _(!1), r = g(() => !!e.definition.value?.dataSource), i = g(() => r.value && !e.block.value.dataSourceFetched);
|
|
448
448
|
async function a() {
|
|
449
449
|
let r = e.definition.value;
|
|
@@ -473,7 +473,7 @@ function _n(e) {
|
|
|
473
473
|
needsFetch: i
|
|
474
474
|
};
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function yn(e, t) {
|
|
477
477
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
478
478
|
e.addBlock = (r, i, a, o) => {
|
|
479
479
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -487,15 +487,15 @@ function vn(e, t) {
|
|
|
487
487
|
t.record(), o(e);
|
|
488
488
|
};
|
|
489
489
|
}
|
|
490
|
-
function
|
|
491
|
-
let { provider: t } = e, n = _([]), r = _(!1), i =
|
|
490
|
+
function bn(e) {
|
|
491
|
+
let { provider: t } = e, n = _([]), r = _(!1), i = F(() => {
|
|
492
492
|
let e = /* @__PURE__ */ new Set();
|
|
493
493
|
for (let t of n.value) {
|
|
494
494
|
let n = t.category?.trim();
|
|
495
495
|
n && e.add(n);
|
|
496
496
|
}
|
|
497
497
|
return [...e].sort((e, t) => e.localeCompare(t));
|
|
498
|
-
}), a =
|
|
498
|
+
}), a = F(() => typeof t.create == "function"), o = F(() => typeof t.update == "function"), s = F(() => typeof t.delete == "function");
|
|
499
499
|
function c(e) {
|
|
500
500
|
return o.value && e.canUpdate !== !1;
|
|
501
501
|
}
|
|
@@ -506,7 +506,7 @@ function yn(e) {
|
|
|
506
506
|
throw new Re(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
|
|
507
507
|
}
|
|
508
508
|
function d(t) {
|
|
509
|
-
|
|
509
|
+
on(e.onError, t);
|
|
510
510
|
}
|
|
511
511
|
async function f(i) {
|
|
512
512
|
r.value = !0;
|
|
@@ -573,9 +573,9 @@ function yn(e) {
|
|
|
573
573
|
remove: h
|
|
574
574
|
};
|
|
575
575
|
}
|
|
576
|
-
var
|
|
577
|
-
function
|
|
578
|
-
let t = e.key ??
|
|
576
|
+
var xn = "templatical:saved-blocks";
|
|
577
|
+
function Sn(e = {}) {
|
|
578
|
+
let t = e.key ?? xn;
|
|
579
579
|
function n() {
|
|
580
580
|
if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageSavedBlocksProvider requires a browser environment with localStorage. Supply your own SavedBlocksProvider for server-side or non-browser use.");
|
|
581
581
|
return localStorage;
|
|
@@ -600,7 +600,7 @@ function xn(e = {}) {
|
|
|
600
600
|
},
|
|
601
601
|
async create(e) {
|
|
602
602
|
let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
|
|
603
|
-
id:
|
|
603
|
+
id: ce(),
|
|
604
604
|
name: e.name,
|
|
605
605
|
content: e.content,
|
|
606
606
|
...e.category ? { category: e.category } : {},
|
|
@@ -626,8 +626,8 @@ function xn(e = {}) {
|
|
|
626
626
|
}
|
|
627
627
|
};
|
|
628
628
|
}
|
|
629
|
-
function
|
|
630
|
-
let { provider: t, getTemplateId: n } = e, r = _([]), i = _(!1), a = _(void 0), o = _(!1), s = /* @__PURE__ */ new Map(), c =
|
|
629
|
+
function Cn(e) {
|
|
630
|
+
let { provider: t, getTemplateId: n } = e, r = _([]), i = _(!1), a = _(void 0), o = _(!1), s = /* @__PURE__ */ new Map(), c = F(() => typeof t.create == "function"), l = F(() => typeof t.restore == "function");
|
|
631
631
|
function u(e) {
|
|
632
632
|
let t = n();
|
|
633
633
|
if (!t) throw new Re(`[Templatical] Version history: ${e} needs a template. Call create() or load() first.`);
|
|
@@ -637,7 +637,7 @@ function Sn(e) {
|
|
|
637
637
|
throw new Re(`[Templatical] Version history: ${e} is disabled by the provider. Check the capability before calling — the editor's own UI hides the action.`);
|
|
638
638
|
}
|
|
639
639
|
function f(t) {
|
|
640
|
-
|
|
640
|
+
on(e.onError, t);
|
|
641
641
|
}
|
|
642
642
|
async function p(n) {
|
|
643
643
|
let o = u("list");
|
|
@@ -704,8 +704,8 @@ function Sn(e) {
|
|
|
704
704
|
restore: v
|
|
705
705
|
};
|
|
706
706
|
}
|
|
707
|
-
function
|
|
708
|
-
let { provider: t, getTemplateId: n, getUser: r } = e, i = _([]), a = _(!1), o = _(!1), s =
|
|
707
|
+
function wn(e) {
|
|
708
|
+
let { provider: t, getTemplateId: n, getUser: r } = e, i = _([]), a = _(!1), o = _(!1), s = F(() => typeof t.create == "function"), c = F(() => typeof t.update == "function"), l = F(() => typeof t.delete == "function"), u = F(() => typeof t.setResolved == "function"), d = F(() => i.value.reduce((e, t) => e + 1 + (t.replies?.length ?? 0), 0)), f = F(() => i.value.filter((e) => !e.resolvedAt).length), p = F(() => {
|
|
709
709
|
let e = /* @__PURE__ */ new Map();
|
|
710
710
|
for (let t of i.value) t.blockId && e.set(t.blockId, (e.get(t.blockId) ?? 0) + 1 + (t.replies?.length ?? 0));
|
|
711
711
|
return e;
|
|
@@ -735,11 +735,11 @@ function Cn(e) {
|
|
|
735
735
|
return t !== null && e.author.id === t.id;
|
|
736
736
|
}
|
|
737
737
|
function b(t) {
|
|
738
|
-
let n =
|
|
738
|
+
let n = an(t);
|
|
739
739
|
throw e.onError?.(n), n;
|
|
740
740
|
}
|
|
741
741
|
function x(t) {
|
|
742
|
-
|
|
742
|
+
on(e.onError, t);
|
|
743
743
|
}
|
|
744
744
|
function S(e, t, n) {
|
|
745
745
|
return [
|
|
@@ -846,13 +846,13 @@ function Cn(e) {
|
|
|
846
846
|
o.value = !1;
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function j(e) {
|
|
850
850
|
w(e) && x(() => t.onCreated?.(e, { origin: "remote" }));
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function M(e) {
|
|
853
853
|
w(e) && x(() => (e.resolvedAt ? t.onResolved : t.onUpdated)?.(e, { origin: "remote" }));
|
|
854
854
|
}
|
|
855
|
-
function
|
|
855
|
+
function N(e, n) {
|
|
856
856
|
let r = T(e, n);
|
|
857
857
|
r && x(() => t.onDeleted?.(r, { origin: "remote" }));
|
|
858
858
|
}
|
|
@@ -874,12 +874,12 @@ function Cn(e) {
|
|
|
874
874
|
setResolved: A,
|
|
875
875
|
find: v,
|
|
876
876
|
isOwn: y,
|
|
877
|
-
applyRemoteCreate:
|
|
878
|
-
applyRemoteUpdate:
|
|
879
|
-
applyRemoteDelete:
|
|
877
|
+
applyRemoteCreate: j,
|
|
878
|
+
applyRemoteUpdate: M,
|
|
879
|
+
applyRemoteDelete: N
|
|
880
880
|
};
|
|
881
881
|
}
|
|
882
|
-
function
|
|
882
|
+
function Tn(e) {
|
|
883
883
|
let { comments: t, provider: n, getTemplateId: r } = e, { subscribe: i } = n;
|
|
884
884
|
if (typeof i != "function") return;
|
|
885
885
|
let a = null;
|
|
@@ -898,31 +898,31 @@ function wn(e) {
|
|
|
898
898
|
case "deleted": t.applyRemoteDelete(e.commentId, e.parentId);
|
|
899
899
|
}
|
|
900
900
|
}));
|
|
901
|
-
}, { immediate: !0 }),
|
|
901
|
+
}, { immediate: !0 }), M(o);
|
|
902
902
|
}
|
|
903
903
|
//#endregion
|
|
904
904
|
//#region src/utils/activeEditorTracker.ts
|
|
905
|
-
var
|
|
906
|
-
function
|
|
907
|
-
let e = ++
|
|
908
|
-
return
|
|
905
|
+
var En = /* @__PURE__ */ new Set(), Dn = 0, On = 0;
|
|
906
|
+
function kn() {
|
|
907
|
+
let e = ++On;
|
|
908
|
+
return En.add(e), Dn === 0 && (Dn = e), {
|
|
909
909
|
id: e,
|
|
910
|
-
isActive: () =>
|
|
910
|
+
isActive: () => En.size <= 1 || Dn === e,
|
|
911
911
|
claim: () => {
|
|
912
|
-
|
|
912
|
+
Dn = e;
|
|
913
913
|
},
|
|
914
914
|
dispose: () => {
|
|
915
|
-
if (
|
|
916
|
-
let e = Array.from(
|
|
917
|
-
|
|
915
|
+
if (En.delete(e), Dn === e) {
|
|
916
|
+
let e = Array.from(En);
|
|
917
|
+
Dn = e[e.length - 1] ?? 0;
|
|
918
918
|
}
|
|
919
919
|
}
|
|
920
920
|
};
|
|
921
921
|
}
|
|
922
922
|
//#endregion
|
|
923
923
|
//#region src/composables/usePreviewResolution.ts
|
|
924
|
-
var
|
|
925
|
-
function
|
|
924
|
+
var An = 500;
|
|
925
|
+
function jn(e) {
|
|
926
926
|
let t = typeof e.resolvePreview == "function", n = _(null), r = _(!1), i = _(!1), a = 0, o = null;
|
|
927
927
|
function c() {
|
|
928
928
|
o !== null && (clearTimeout(o), o = null);
|
|
@@ -933,13 +933,13 @@ function An(e) {
|
|
|
933
933
|
let o = ++a;
|
|
934
934
|
r.value = !0;
|
|
935
935
|
let s = {
|
|
936
|
-
content:
|
|
936
|
+
content: Se(e.getContent()),
|
|
937
937
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
938
938
|
};
|
|
939
939
|
try {
|
|
940
940
|
let e = await t(s);
|
|
941
941
|
if (o !== a) return;
|
|
942
|
-
if (!
|
|
942
|
+
if (!pe(e)) {
|
|
943
943
|
i.value = !0;
|
|
944
944
|
return;
|
|
945
945
|
}
|
|
@@ -959,7 +959,7 @@ function An(e) {
|
|
|
959
959
|
}
|
|
960
960
|
o = setTimeout(() => {
|
|
961
961
|
o = null, l();
|
|
962
|
-
},
|
|
962
|
+
}, An);
|
|
963
963
|
}
|
|
964
964
|
}
|
|
965
965
|
return s(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
|
|
@@ -968,20 +968,20 @@ function An(e) {
|
|
|
968
968
|
return;
|
|
969
969
|
}
|
|
970
970
|
u();
|
|
971
|
-
}, { immediate: !0 }),
|
|
971
|
+
}, { immediate: !0 }), M(() => {
|
|
972
972
|
c(), a++;
|
|
973
973
|
}), {
|
|
974
974
|
isConfigured: t,
|
|
975
|
-
content:
|
|
975
|
+
content: F(() => n.value ?? e.getContent()),
|
|
976
976
|
isResolving: r,
|
|
977
|
-
isInitialResolve:
|
|
977
|
+
isInitialResolve: F(() => r.value && n.value === null),
|
|
978
978
|
hasFailed: i,
|
|
979
|
-
supersedesSamples:
|
|
979
|
+
supersedesSamples: F(() => t)
|
|
980
980
|
};
|
|
981
981
|
}
|
|
982
982
|
//#endregion
|
|
983
983
|
//#region src/composables/useImageUrlResolver.ts
|
|
984
|
-
function
|
|
984
|
+
function Mn(e) {
|
|
985
985
|
let t = o(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
986
986
|
function r(e) {
|
|
987
987
|
return t.get(e);
|
|
@@ -1014,19 +1014,19 @@ function jn(e) {
|
|
|
1014
1014
|
lookup: a
|
|
1015
1015
|
};
|
|
1016
1016
|
}
|
|
1017
|
-
function
|
|
1018
|
-
let t = p(
|
|
1017
|
+
function Nn(e) {
|
|
1018
|
+
let t = p(bt, null), n = F(e);
|
|
1019
1019
|
if (!t) return n;
|
|
1020
1020
|
let r;
|
|
1021
1021
|
function i() {
|
|
1022
1022
|
r !== void 0 && (clearTimeout(r), r = void 0);
|
|
1023
1023
|
}
|
|
1024
|
-
h() &&
|
|
1024
|
+
h() && M(i);
|
|
1025
1025
|
let a = !0;
|
|
1026
1026
|
return s(n, (e) => {
|
|
1027
1027
|
i();
|
|
1028
1028
|
let n = a;
|
|
1029
|
-
if (a = !1,
|
|
1029
|
+
if (a = !1, e && !t.has(e)) {
|
|
1030
1030
|
if (n) {
|
|
1031
1031
|
t.lookup(e);
|
|
1032
1032
|
return;
|
|
@@ -1035,7 +1035,7 @@ function Mn(e) {
|
|
|
1035
1035
|
r = void 0, t.lookup(e);
|
|
1036
1036
|
}, 300);
|
|
1037
1037
|
}
|
|
1038
|
-
}, { immediate: !0 }),
|
|
1038
|
+
}, { immediate: !0 }), F(() => {
|
|
1039
1039
|
let e = n.value;
|
|
1040
1040
|
if (!e) return e;
|
|
1041
1041
|
let r = t.get(e);
|
|
@@ -1044,7 +1044,7 @@ function Mn(e) {
|
|
|
1044
1044
|
}
|
|
1045
1045
|
//#endregion
|
|
1046
1046
|
//#region src/composables/useMergeTagPicker.ts
|
|
1047
|
-
function
|
|
1047
|
+
function Pn() {
|
|
1048
1048
|
let e = _(!1), t = _([]), n = null;
|
|
1049
1049
|
function r(r) {
|
|
1050
1050
|
if (n) {
|
|
@@ -1059,7 +1059,7 @@ function Nn() {
|
|
|
1059
1059
|
let i = n;
|
|
1060
1060
|
n = null, e.value = !1, t.value = [], i && i(r);
|
|
1061
1061
|
}
|
|
1062
|
-
return h() &&
|
|
1062
|
+
return h() && M(() => {
|
|
1063
1063
|
if (n) {
|
|
1064
1064
|
let e = n;
|
|
1065
1065
|
n = null, e(null);
|
|
@@ -1074,7 +1074,7 @@ function Nn() {
|
|
|
1074
1074
|
}
|
|
1075
1075
|
//#endregion
|
|
1076
1076
|
//#region src/composables/useLogicTagPicker.ts
|
|
1077
|
-
function
|
|
1077
|
+
function Fn() {
|
|
1078
1078
|
let e = _(!1), t = _([]), n = _([]), r = null;
|
|
1079
1079
|
function i(i, a) {
|
|
1080
1080
|
if (r) {
|
|
@@ -1089,7 +1089,7 @@ function Pn() {
|
|
|
1089
1089
|
let a = r;
|
|
1090
1090
|
r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
|
|
1091
1091
|
}
|
|
1092
|
-
return h() &&
|
|
1092
|
+
return h() && M(() => {
|
|
1093
1093
|
if (r) {
|
|
1094
1094
|
let e = r;
|
|
1095
1095
|
r = null, e(null);
|
|
@@ -1105,11 +1105,11 @@ function Pn() {
|
|
|
1105
1105
|
}
|
|
1106
1106
|
//#endregion
|
|
1107
1107
|
//#region src/composables/useTemplateLint.ts
|
|
1108
|
-
function
|
|
1108
|
+
function In(e) {
|
|
1109
1109
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1112
|
-
let t = _([]), n = _(!1), r = _(!1), i = f(null), a =
|
|
1111
|
+
function Ln(e) {
|
|
1112
|
+
let t = _([]), n = _(!1), r = _(!1), i = f(null), a = In(e.options), o = null, c = !1;
|
|
1113
1113
|
a || l();
|
|
1114
1114
|
async function l() {
|
|
1115
1115
|
try {
|
|
@@ -1150,17 +1150,17 @@ function In(e) {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
//#endregion
|
|
1152
1152
|
//#region src/utils/blockTypeLabels.ts
|
|
1153
|
-
function
|
|
1153
|
+
function Rn(e, t) {
|
|
1154
1154
|
return t.blocks[e] ?? e;
|
|
1155
1155
|
}
|
|
1156
|
-
function
|
|
1157
|
-
if (e.type !== "custom") return
|
|
1156
|
+
function zn(e, t, n = []) {
|
|
1157
|
+
if (e.type !== "custom") return Rn(e.type, t);
|
|
1158
1158
|
let { customType: r } = e;
|
|
1159
1159
|
return n.find((e) => e.type === r)?.name ?? r;
|
|
1160
1160
|
}
|
|
1161
1161
|
//#endregion
|
|
1162
1162
|
//#region src/composables/useKeyboardReorder.ts
|
|
1163
|
-
function
|
|
1163
|
+
function Bn(e, t, n = []) {
|
|
1164
1164
|
let r = _(null), i = _(""), a = null;
|
|
1165
1165
|
function o(t) {
|
|
1166
1166
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -1187,7 +1187,7 @@ function zn(e, t, n = []) {
|
|
|
1187
1187
|
let i = o(r);
|
|
1188
1188
|
if (!i) return "";
|
|
1189
1189
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
1190
|
-
return a ?
|
|
1190
|
+
return a ? zn(a, t.t, n) : "";
|
|
1191
1191
|
}
|
|
1192
1192
|
function c(t, n) {
|
|
1193
1193
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -1256,13 +1256,13 @@ function zn(e, t, n = []) {
|
|
|
1256
1256
|
}
|
|
1257
1257
|
//#endregion
|
|
1258
1258
|
//#region src/composables/useUiTheme.ts
|
|
1259
|
-
function
|
|
1259
|
+
function Vn(e) {
|
|
1260
1260
|
let t = Xe("(prefers-color-scheme: dark)");
|
|
1261
|
-
return { resolvedTheme:
|
|
1261
|
+
return { resolvedTheme: F(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1262
1262
|
}
|
|
1263
1263
|
//#endregion
|
|
1264
1264
|
//#region src/composables/useThemeStyles.ts
|
|
1265
|
-
var
|
|
1265
|
+
var Hn = {
|
|
1266
1266
|
bg: "--tpl-bg",
|
|
1267
1267
|
bgElevated: "--tpl-bg-elevated",
|
|
1268
1268
|
bgHover: "--tpl-bg-hover",
|
|
@@ -1286,10 +1286,10 @@ var Vn = {
|
|
|
1286
1286
|
dangerLight: "--tpl-danger-light",
|
|
1287
1287
|
canvasBg: "--tpl-canvas-bg"
|
|
1288
1288
|
};
|
|
1289
|
-
function
|
|
1290
|
-
return { themeStyles:
|
|
1289
|
+
function Un({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
1290
|
+
return { themeStyles: F(() => {
|
|
1291
1291
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
1292
|
-
if (a) for (let [e, t] of Object.entries(
|
|
1292
|
+
if (a) for (let [e, t] of Object.entries(Hn)) {
|
|
1293
1293
|
let n = a[e];
|
|
1294
1294
|
n && (r[t] = n);
|
|
1295
1295
|
}
|
|
@@ -1298,10 +1298,10 @@ function Hn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
//#endregion
|
|
1300
1300
|
//#region src/composables/useBlockRegistry.ts
|
|
1301
|
-
function
|
|
1301
|
+
function Wn() {
|
|
1302
1302
|
let e = f(/* @__PURE__ */ new Map());
|
|
1303
1303
|
function t(t, n) {
|
|
1304
|
-
e.value.set(t, n),
|
|
1304
|
+
e.value.set(t, n), j(e);
|
|
1305
1305
|
}
|
|
1306
1306
|
function n(t, n) {
|
|
1307
1307
|
let r = `custom:${t.type}`, i = {
|
|
@@ -1309,7 +1309,7 @@ function Un() {
|
|
|
1309
1309
|
createBlock: () => Ie(t),
|
|
1310
1310
|
definition: t
|
|
1311
1311
|
};
|
|
1312
|
-
e.value.set(r, i),
|
|
1312
|
+
e.value.set(r, i), j(e);
|
|
1313
1313
|
}
|
|
1314
1314
|
function r(t) {
|
|
1315
1315
|
if (t.type === "custom") {
|
|
@@ -1332,13 +1332,13 @@ function Un() {
|
|
|
1332
1332
|
let t = a(e.customType);
|
|
1333
1333
|
if (!t) return o("Block definition not found");
|
|
1334
1334
|
try {
|
|
1335
|
-
let { Liquid: n } = await import("./liquid.browser-
|
|
1335
|
+
let { Liquid: n } = await import("./liquid.browser-wPG0n4Cs.js");
|
|
1336
1336
|
return await new n({
|
|
1337
1337
|
strictVariables: !1,
|
|
1338
1338
|
strictFilters: !1
|
|
1339
1339
|
}).parseAndRender(t.template, e.fieldValues);
|
|
1340
1340
|
} catch (t) {
|
|
1341
|
-
return
|
|
1341
|
+
return Vt.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
1342
1342
|
}
|
|
1343
1343
|
}
|
|
1344
1344
|
function c(t) {
|
|
@@ -1356,9 +1356,9 @@ function Un() {
|
|
|
1356
1356
|
}
|
|
1357
1357
|
//#endregion
|
|
1358
1358
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
1359
|
-
function
|
|
1360
|
-
return
|
|
1361
|
-
let n =
|
|
1359
|
+
function Gn(e, t) {
|
|
1360
|
+
return F(() => {
|
|
1361
|
+
let n = Kn(e.value.blocks);
|
|
1362
1362
|
if (n.size === 0) return [];
|
|
1363
1363
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
1364
1364
|
for (let e of n) {
|
|
@@ -1370,29 +1370,29 @@ function Wn(e, t) {
|
|
|
1370
1370
|
return i;
|
|
1371
1371
|
});
|
|
1372
1372
|
}
|
|
1373
|
-
function
|
|
1373
|
+
function Kn(e) {
|
|
1374
1374
|
let t = /* @__PURE__ */ new Set();
|
|
1375
|
-
return
|
|
1375
|
+
return qn(e, t), t;
|
|
1376
1376
|
}
|
|
1377
|
-
function
|
|
1377
|
+
function qn(e, t) {
|
|
1378
1378
|
for (let n of e) {
|
|
1379
|
-
if (
|
|
1379
|
+
if (_e(n)) {
|
|
1380
1380
|
t.add(n.customType);
|
|
1381
1381
|
continue;
|
|
1382
1382
|
}
|
|
1383
1383
|
if (n.type === "section") {
|
|
1384
1384
|
let e = n.children;
|
|
1385
1385
|
if (!e) continue;
|
|
1386
|
-
for (let n of e)
|
|
1386
|
+
for (let n of e) qn(n, t);
|
|
1387
1387
|
}
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
1390
|
//#endregion
|
|
1391
1391
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
1392
|
-
var
|
|
1392
|
+
var Jn = [
|
|
1393
1393
|
{
|
|
1394
1394
|
type: "section",
|
|
1395
|
-
createBlock:
|
|
1395
|
+
createBlock: Te
|
|
1396
1396
|
},
|
|
1397
1397
|
{
|
|
1398
1398
|
type: "title",
|
|
@@ -1404,15 +1404,15 @@ var qn = [
|
|
|
1404
1404
|
},
|
|
1405
1405
|
{
|
|
1406
1406
|
type: "image",
|
|
1407
|
-
createBlock:
|
|
1407
|
+
createBlock: Ce
|
|
1408
1408
|
},
|
|
1409
1409
|
{
|
|
1410
1410
|
type: "button",
|
|
1411
|
-
createBlock:
|
|
1411
|
+
createBlock: Ee
|
|
1412
1412
|
},
|
|
1413
1413
|
{
|
|
1414
1414
|
type: "divider",
|
|
1415
|
-
createBlock:
|
|
1415
|
+
createBlock: ke
|
|
1416
1416
|
},
|
|
1417
1417
|
{
|
|
1418
1418
|
type: "video",
|
|
@@ -1436,15 +1436,15 @@ var qn = [
|
|
|
1436
1436
|
},
|
|
1437
1437
|
{
|
|
1438
1438
|
type: "html",
|
|
1439
|
-
createBlock:
|
|
1439
|
+
createBlock: Oe
|
|
1440
1440
|
},
|
|
1441
1441
|
{
|
|
1442
1442
|
type: "countdown",
|
|
1443
|
-
createBlock:
|
|
1443
|
+
createBlock: De
|
|
1444
1444
|
}
|
|
1445
1445
|
];
|
|
1446
|
-
function
|
|
1447
|
-
for (let n of
|
|
1446
|
+
function Yn(e, t) {
|
|
1447
|
+
for (let n of Jn) {
|
|
1448
1448
|
let r = t[n.type];
|
|
1449
1449
|
r && e.registerBuiltIn(n.type, {
|
|
1450
1450
|
component: r,
|
|
@@ -1454,23 +1454,23 @@ function Jn(e, t) {
|
|
|
1454
1454
|
}
|
|
1455
1455
|
//#endregion
|
|
1456
1456
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
1457
|
-
function
|
|
1457
|
+
function Xn(e) {
|
|
1458
1458
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
1459
1459
|
}
|
|
1460
1460
|
//#endregion
|
|
1461
1461
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
1462
|
-
function
|
|
1462
|
+
function Zn(e) {
|
|
1463
1463
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1466
|
-
let r = new Set(e.map((e) =>
|
|
1467
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1465
|
+
function Qn(e, t, n) {
|
|
1466
|
+
let r = new Set(e.map((e) => Gt(e))), i = [], a = (e, t) => {
|
|
1467
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(Gt(o)) && i.push(`${t}.${n}: ${o}`) : Zn(o) && a(o, `${t}.${n}`);
|
|
1468
1468
|
}, o = t;
|
|
1469
1469
|
for (let [e, t] of Object.entries(ze)) {
|
|
1470
1470
|
let n = o?.[e];
|
|
1471
1471
|
a({
|
|
1472
1472
|
...t,
|
|
1473
|
-
...
|
|
1473
|
+
...Zn(n) ? n : {}
|
|
1474
1474
|
}, e);
|
|
1475
1475
|
}
|
|
1476
1476
|
return a({
|
|
@@ -1479,9 +1479,155 @@ function Zn(e, t, n) {
|
|
|
1479
1479
|
}, "template"), i;
|
|
1480
1480
|
}
|
|
1481
1481
|
//#endregion
|
|
1482
|
+
//#region src/utils/localizedBlockDefaults.ts
|
|
1483
|
+
function $n(e) {
|
|
1484
|
+
return {
|
|
1485
|
+
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
1486
|
+
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
1487
|
+
button: { text: e.blockDefaults.button }
|
|
1488
|
+
};
|
|
1489
|
+
}
|
|
1490
|
+
//#endregion
|
|
1491
|
+
//#region src/i18n/index.ts
|
|
1492
|
+
var er = /* #__PURE__ */ Object.assign({
|
|
1493
|
+
"./locales/ca.ts": () => import("./ca-C0hfqt4U.js"),
|
|
1494
|
+
"./locales/de.ts": () => import("./de-C6J2Iae8.js"),
|
|
1495
|
+
"./locales/en.ts": () => import("./en-BaUYOQi8.js"),
|
|
1496
|
+
"./locales/es.ts": () => import("./es-CKDYfJYn.js"),
|
|
1497
|
+
"./locales/fr.ts": () => import("./fr-L8DR73mK.js"),
|
|
1498
|
+
"./locales/nl.ts": () => import("./nl-GDWeuX18.js"),
|
|
1499
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-B1AVVhWj.js")
|
|
1500
|
+
}), tr = /* #__PURE__ */ Object.assign({
|
|
1501
|
+
"./locales/cloud/de.ts": () => import("./de-BytZwgn6.js"),
|
|
1502
|
+
"./locales/cloud/en.ts": () => import("./en-DyOSV0lY.js"),
|
|
1503
|
+
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-C1WLSGDh.js")
|
|
1504
|
+
});
|
|
1505
|
+
function nr(e) {
|
|
1506
|
+
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
1507
|
+
}
|
|
1508
|
+
var rr = nr(er), ir = nr(tr);
|
|
1509
|
+
function ar(e) {
|
|
1510
|
+
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
1511
|
+
}
|
|
1512
|
+
function or(e, t) {
|
|
1513
|
+
let n = ar(e);
|
|
1514
|
+
return t.find((e) => ar(e) === n);
|
|
1515
|
+
}
|
|
1516
|
+
function sr(e) {
|
|
1517
|
+
return ar(e).split("-")[0];
|
|
1518
|
+
}
|
|
1519
|
+
function cr(e, t) {
|
|
1520
|
+
return or(e, t) ?? or(sr(e), t);
|
|
1521
|
+
}
|
|
1522
|
+
function lr(e, t) {
|
|
1523
|
+
return cr(e, t) ?? "en";
|
|
1524
|
+
}
|
|
1525
|
+
async function ur(e) {
|
|
1526
|
+
let t = er[`./locales/${lr(e, rr)}.ts`];
|
|
1527
|
+
return (await t()).default;
|
|
1528
|
+
}
|
|
1529
|
+
async function dr(e) {
|
|
1530
|
+
let t = tr[`./locales/cloud/${lr(e, ir)}.ts`];
|
|
1531
|
+
return (await t()).default;
|
|
1532
|
+
}
|
|
1533
|
+
function fr(e) {
|
|
1534
|
+
return cr(e, rr) !== void 0;
|
|
1535
|
+
}
|
|
1536
|
+
function pr(e) {
|
|
1537
|
+
return cr(e, ir) !== void 0;
|
|
1538
|
+
}
|
|
1539
|
+
function mr() {
|
|
1540
|
+
return [...rr];
|
|
1541
|
+
}
|
|
1542
|
+
function hr() {
|
|
1543
|
+
return [...ir];
|
|
1544
|
+
}
|
|
1545
|
+
//#endregion
|
|
1546
|
+
//#region src/i18n/contentDefaults.ts
|
|
1547
|
+
var gr = {
|
|
1548
|
+
en: {
|
|
1549
|
+
video: "Video",
|
|
1550
|
+
days: "Days",
|
|
1551
|
+
hours: "Hours",
|
|
1552
|
+
minutes: "Minutes",
|
|
1553
|
+
seconds: "Seconds",
|
|
1554
|
+
expired: "This offer has expired"
|
|
1555
|
+
},
|
|
1556
|
+
de: {
|
|
1557
|
+
video: "Video",
|
|
1558
|
+
days: "Tage",
|
|
1559
|
+
hours: "Stunden",
|
|
1560
|
+
minutes: "Minuten",
|
|
1561
|
+
seconds: "Sekunden",
|
|
1562
|
+
expired: "Dieses Angebot ist abgelaufen"
|
|
1563
|
+
},
|
|
1564
|
+
es: {
|
|
1565
|
+
video: "Vídeo",
|
|
1566
|
+
days: "Días",
|
|
1567
|
+
hours: "Horas",
|
|
1568
|
+
minutes: "Minutos",
|
|
1569
|
+
seconds: "Segundos",
|
|
1570
|
+
expired: "Esta oferta ha expirado"
|
|
1571
|
+
},
|
|
1572
|
+
fr: {
|
|
1573
|
+
video: "Vidéo",
|
|
1574
|
+
days: "Jours",
|
|
1575
|
+
hours: "Heures",
|
|
1576
|
+
minutes: "Minutes",
|
|
1577
|
+
seconds: "Secondes",
|
|
1578
|
+
expired: "Cette offre a expiré"
|
|
1579
|
+
},
|
|
1580
|
+
nl: {
|
|
1581
|
+
video: "Video",
|
|
1582
|
+
days: "Dagen",
|
|
1583
|
+
hours: "Uren",
|
|
1584
|
+
minutes: "Minuten",
|
|
1585
|
+
seconds: "Seconden",
|
|
1586
|
+
expired: "Deze aanbieding is verlopen"
|
|
1587
|
+
},
|
|
1588
|
+
"pt-BR": {
|
|
1589
|
+
video: "Vídeo",
|
|
1590
|
+
days: "Dias",
|
|
1591
|
+
hours: "Horas",
|
|
1592
|
+
minutes: "Minutos",
|
|
1593
|
+
seconds: "Segundos",
|
|
1594
|
+
expired: "Esta oferta expirou"
|
|
1595
|
+
},
|
|
1596
|
+
ca: {
|
|
1597
|
+
video: "Vídeo",
|
|
1598
|
+
days: "Dies",
|
|
1599
|
+
hours: "Hores",
|
|
1600
|
+
minutes: "Minuts",
|
|
1601
|
+
seconds: "Segons",
|
|
1602
|
+
expired: "Aquesta oferta ha caducat"
|
|
1603
|
+
}
|
|
1604
|
+
};
|
|
1605
|
+
Object.keys(gr);
|
|
1606
|
+
var _r = new Map(Object.keys(gr).map((e) => [e.toLowerCase(), e]));
|
|
1607
|
+
function vr(e) {
|
|
1608
|
+
if (!e) return gr.en;
|
|
1609
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = _r.get(t);
|
|
1610
|
+
if (n) return gr[n];
|
|
1611
|
+
let r = _r.get(sr(t));
|
|
1612
|
+
return r ? gr[r] : gr.en;
|
|
1613
|
+
}
|
|
1614
|
+
function yr(e) {
|
|
1615
|
+
let t = vr(e);
|
|
1616
|
+
return {
|
|
1617
|
+
video: { alt: t.video },
|
|
1618
|
+
countdown: {
|
|
1619
|
+
labelDays: t.days,
|
|
1620
|
+
labelHours: t.hours,
|
|
1621
|
+
labelMinutes: t.minutes,
|
|
1622
|
+
labelSeconds: t.seconds,
|
|
1623
|
+
expiredMessage: t.expired
|
|
1624
|
+
}
|
|
1625
|
+
};
|
|
1626
|
+
}
|
|
1627
|
+
//#endregion
|
|
1482
1628
|
//#region src/utils/resolveFieldColors.ts
|
|
1483
|
-
function
|
|
1484
|
-
let n =
|
|
1629
|
+
function br(e, t) {
|
|
1630
|
+
let n = Wt({ presets: e.presets }, Ht), r = n.presets.length === 0, i = e.allowCustom ?? t.allowCustom;
|
|
1485
1631
|
return {
|
|
1486
1632
|
presets: r ? t.presets : n.presets,
|
|
1487
1633
|
allowCustom: t.allowCustom !== !1 && i,
|
|
@@ -1493,9 +1639,9 @@ function Qn(e, t) {
|
|
|
1493
1639
|
}
|
|
1494
1640
|
//#endregion
|
|
1495
1641
|
//#region src/utils/collectColorFieldIssues.ts
|
|
1496
|
-
function
|
|
1642
|
+
function xr(e, t) {
|
|
1497
1643
|
let n = [], r = (r, i) => {
|
|
1498
|
-
let a =
|
|
1644
|
+
let a = br(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
1499
1645
|
if (a.invalidPresets.length > 0 && n.push({
|
|
1500
1646
|
id: s("invalid-presets"),
|
|
1501
1647
|
message: `${o}: presets skipped invalid entries: ${a.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).` + (a.presetsInherited ? " No valid entries are left, so the field inherits colors.presets." : "")
|
|
@@ -1506,8 +1652,8 @@ function $n(e, t) {
|
|
|
1506
1652
|
id: s("allow-custom-ignored"),
|
|
1507
1653
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
1508
1654
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
1509
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
1510
|
-
e !== "" && !t.has(
|
|
1655
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => Gt(e)));
|
|
1656
|
+
e !== "" && !t.has(Gt(e)) && n.push({
|
|
1511
1657
|
id: s("off-palette-default"),
|
|
1512
1658
|
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.`
|
|
1513
1659
|
});
|
|
@@ -1519,7 +1665,7 @@ function $n(e, t) {
|
|
|
1519
1665
|
}
|
|
1520
1666
|
//#endregion
|
|
1521
1667
|
//#region src/utils/keyboardShortcuts.ts
|
|
1522
|
-
function
|
|
1668
|
+
function Sr(e) {
|
|
1523
1669
|
for (let t of e.composedPath()) {
|
|
1524
1670
|
if (!(t instanceof HTMLElement)) continue;
|
|
1525
1671
|
if (t.isContentEditable) return !0;
|
|
@@ -1528,18 +1674,18 @@ function er(e) {
|
|
|
1528
1674
|
}
|
|
1529
1675
|
return !1;
|
|
1530
1676
|
}
|
|
1531
|
-
function
|
|
1677
|
+
function Cr(e, t) {
|
|
1532
1678
|
let n = e.metaKey || e.ctrlKey;
|
|
1533
1679
|
if (n && e.key.toLowerCase() === "s") {
|
|
1534
1680
|
e.preventDefault(), t.onSave?.();
|
|
1535
1681
|
return;
|
|
1536
1682
|
}
|
|
1537
1683
|
if (n && e.key.toLowerCase() === "z") {
|
|
1538
|
-
if (
|
|
1684
|
+
if (Sr(e)) return;
|
|
1539
1685
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1540
1686
|
return;
|
|
1541
1687
|
}
|
|
1542
|
-
if (t.isPicking?.() && !
|
|
1688
|
+
if (t.isPicking?.() && !Sr(e)) {
|
|
1543
1689
|
if (e.key === "Escape") {
|
|
1544
1690
|
e.preventDefault(), t.onCancelPick?.();
|
|
1545
1691
|
return;
|
|
@@ -1557,11 +1703,11 @@ function tr(e, t) {
|
|
|
1557
1703
|
t.selectBlock(null);
|
|
1558
1704
|
return;
|
|
1559
1705
|
}
|
|
1560
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1706
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Sr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1561
1707
|
}
|
|
1562
1708
|
//#endregion
|
|
1563
1709
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
1564
|
-
function
|
|
1710
|
+
function wr(e, t, n, r = !1) {
|
|
1565
1711
|
if (!e) return [];
|
|
1566
1712
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
1567
1713
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -1570,18 +1716,18 @@ function nr(e, t, n, r = !1) {
|
|
|
1570
1716
|
value: e.slice(o, s.index)
|
|
1571
1717
|
});
|
|
1572
1718
|
let i = s[0];
|
|
1573
|
-
if (
|
|
1574
|
-
let e = r ?
|
|
1719
|
+
if (fe(i, n)) {
|
|
1720
|
+
let e = r ? ae(i, t) : void 0;
|
|
1575
1721
|
a.push(e === void 0 ? {
|
|
1576
1722
|
type: "tag",
|
|
1577
|
-
value:
|
|
1723
|
+
value: je(i, t)
|
|
1578
1724
|
} : {
|
|
1579
1725
|
type: "text",
|
|
1580
1726
|
value: e
|
|
1581
1727
|
});
|
|
1582
|
-
} else
|
|
1728
|
+
} else ue(i, n) ? a.push({
|
|
1583
1729
|
type: "tag",
|
|
1584
|
-
value:
|
|
1730
|
+
value: ge(i, n)
|
|
1585
1731
|
}) : a.push({
|
|
1586
1732
|
type: "text",
|
|
1587
1733
|
value: i
|
|
@@ -1595,27 +1741,27 @@ function nr(e, t, n, r = !1) {
|
|
|
1595
1741
|
}
|
|
1596
1742
|
//#endregion
|
|
1597
1743
|
//#region src/components/MergeTagPreviewText.vue
|
|
1598
|
-
var
|
|
1744
|
+
var Tr = L({
|
|
1599
1745
|
name: "MergeTagPreviewText",
|
|
1600
1746
|
props: { text: {
|
|
1601
1747
|
type: String,
|
|
1602
1748
|
required: !0
|
|
1603
1749
|
} },
|
|
1604
1750
|
setup(e) {
|
|
1605
|
-
let t = p(
|
|
1751
|
+
let t = p(mt, []), n = p(Dt, Fe.liquid), r = p(_t, null), i = F(() => wr(e.text, t, n, r?.value ?? !1));
|
|
1606
1752
|
return () => i.value.map((e, t) => e.type === "tag" ? b("span", {
|
|
1607
1753
|
key: t,
|
|
1608
1754
|
class: "tpl-merge-tag-label"
|
|
1609
1755
|
}, e.value) : e.value);
|
|
1610
1756
|
}
|
|
1611
|
-
}),
|
|
1757
|
+
}), Er = ["href"], Dr = /* @__PURE__ */ L({
|
|
1612
1758
|
__name: "ButtonBlock",
|
|
1613
1759
|
props: {
|
|
1614
1760
|
block: {},
|
|
1615
1761
|
viewport: {}
|
|
1616
1762
|
},
|
|
1617
1763
|
setup(e) {
|
|
1618
|
-
let t = e, n =
|
|
1764
|
+
let t = e, n = F(() => {
|
|
1619
1765
|
let e = {
|
|
1620
1766
|
display: "inline-block",
|
|
1621
1767
|
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
@@ -1628,18 +1774,18 @@ var rr = I({
|
|
|
1628
1774
|
textAlign: "center"
|
|
1629
1775
|
};
|
|
1630
1776
|
return t.block.fontFamily && (e.fontFamily = 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;
|
|
1631
|
-
}), r =
|
|
1777
|
+
}), r = F(() => ({ textAlign: t.block.align ?? "center" }));
|
|
1632
1778
|
return (t, i) => (O(), S("div", { style: u(r.value) }, [x("a", {
|
|
1633
1779
|
href: e.block.url || "#",
|
|
1634
1780
|
style: u(n.value),
|
|
1635
1781
|
class: "tpl:cursor-default",
|
|
1636
|
-
onClick: i[0] ||=
|
|
1637
|
-
}, [w(
|
|
1782
|
+
onClick: i[0] ||= R(() => {}, ["prevent"])
|
|
1783
|
+
}, [w(Tr, { text: e.block.text }, null, 8, ["text"])], 12, Er)], 4));
|
|
1638
1784
|
}
|
|
1639
|
-
}),
|
|
1785
|
+
}), Or = qt("bookmark", [["path", {
|
|
1640
1786
|
d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
|
|
1641
1787
|
key: "oz39mx"
|
|
1642
|
-
}]]),
|
|
1788
|
+
}]]), kr = qt("box", [
|
|
1643
1789
|
["path", {
|
|
1644
1790
|
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
|
|
1645
1791
|
key: "hh9hay"
|
|
@@ -1652,13 +1798,13 @@ var rr = I({
|
|
|
1652
1798
|
d: "M12 22V12",
|
|
1653
1799
|
key: "d0xqtd"
|
|
1654
1800
|
}]
|
|
1655
|
-
]),
|
|
1801
|
+
]), Ar = qt("code", [["path", {
|
|
1656
1802
|
d: "m16 18 6-6-6-6",
|
|
1657
1803
|
key: "eg8j8"
|
|
1658
1804
|
}], ["path", {
|
|
1659
1805
|
d: "m8 6-6 6 6 6",
|
|
1660
1806
|
key: "ppft3o"
|
|
1661
|
-
}]]),
|
|
1807
|
+
}]]), jr = qt("copy", [["rect", {
|
|
1662
1808
|
width: "14",
|
|
1663
1809
|
height: "14",
|
|
1664
1810
|
x: "8",
|
|
@@ -1669,7 +1815,7 @@ var rr = I({
|
|
|
1669
1815
|
}], ["path", {
|
|
1670
1816
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
1671
1817
|
key: "zix9uf"
|
|
1672
|
-
}]]),
|
|
1818
|
+
}]]), Mr = qt("eye-off", [
|
|
1673
1819
|
["path", {
|
|
1674
1820
|
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
1675
1821
|
key: "ct8e1f"
|
|
@@ -1686,10 +1832,10 @@ var rr = I({
|
|
|
1686
1832
|
d: "m2 2 20 20",
|
|
1687
1833
|
key: "1ooewy"
|
|
1688
1834
|
}]
|
|
1689
|
-
]),
|
|
1835
|
+
]), Nr = qt("funnel", [["path", {
|
|
1690
1836
|
d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
|
|
1691
1837
|
key: "sc7q7i"
|
|
1692
|
-
}]]),
|
|
1838
|
+
}]]), Pr = qt("grip-vertical", [
|
|
1693
1839
|
["circle", {
|
|
1694
1840
|
cx: "9",
|
|
1695
1841
|
cy: "12",
|
|
@@ -1726,7 +1872,7 @@ var rr = I({
|
|
|
1726
1872
|
r: "1",
|
|
1727
1873
|
key: "f4zoj3"
|
|
1728
1874
|
}]
|
|
1729
|
-
]),
|
|
1875
|
+
]), Fr = qt("image", [
|
|
1730
1876
|
["rect", {
|
|
1731
1877
|
width: "18",
|
|
1732
1878
|
height: "18",
|
|
@@ -1746,13 +1892,13 @@ var rr = I({
|
|
|
1746
1892
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
1747
1893
|
key: "1xmnt7"
|
|
1748
1894
|
}]
|
|
1749
|
-
]),
|
|
1895
|
+
]), Ir = qt("navigation", [["polygon", {
|
|
1750
1896
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
1751
1897
|
key: "1ltx0t"
|
|
1752
|
-
}]]),
|
|
1898
|
+
}]]), Lr = qt("puzzle", [["path", {
|
|
1753
1899
|
d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
|
|
1754
1900
|
key: "w46dr5"
|
|
1755
|
-
}]]),
|
|
1901
|
+
}]]), Rr = qt("share-2", [
|
|
1756
1902
|
["circle", {
|
|
1757
1903
|
cx: "18",
|
|
1758
1904
|
cy: "5",
|
|
@@ -1785,7 +1931,7 @@ var rr = I({
|
|
|
1785
1931
|
y2: "10.49",
|
|
1786
1932
|
key: "1n3mei"
|
|
1787
1933
|
}]
|
|
1788
|
-
]),
|
|
1934
|
+
]), zr = qt("table", [
|
|
1789
1935
|
["path", {
|
|
1790
1936
|
d: "M12 3v18",
|
|
1791
1937
|
key: "108xh3"
|
|
@@ -1806,7 +1952,7 @@ var rr = I({
|
|
|
1806
1952
|
d: "M3 15h18",
|
|
1807
1953
|
key: "5xshup"
|
|
1808
1954
|
}]
|
|
1809
|
-
]),
|
|
1955
|
+
]), Br = qt("video", [["path", {
|
|
1810
1956
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1811
1957
|
key: "ftymec"
|
|
1812
1958
|
}], ["rect", {
|
|
@@ -1816,18 +1962,18 @@ var rr = I({
|
|
|
1816
1962
|
height: "12",
|
|
1817
1963
|
rx: "2",
|
|
1818
1964
|
key: "158x01"
|
|
1819
|
-
}]]),
|
|
1965
|
+
}]]), Vr = ["innerHTML"], Hr = [
|
|
1820
1966
|
"src",
|
|
1821
1967
|
"width",
|
|
1822
1968
|
"height"
|
|
1823
|
-
],
|
|
1969
|
+
], Ur = /* @__PURE__ */ L({
|
|
1824
1970
|
__name: "CustomBlockIcon",
|
|
1825
1971
|
props: {
|
|
1826
1972
|
icon: {},
|
|
1827
1973
|
size: {}
|
|
1828
1974
|
},
|
|
1829
1975
|
setup(e) {
|
|
1830
|
-
let t = e, n =
|
|
1976
|
+
let t = e, n = F(() => t.size ?? 20), r = F(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = F(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/")));
|
|
1831
1977
|
return (t, a) => r.value ? (O(), S("span", {
|
|
1832
1978
|
key: 0,
|
|
1833
1979
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
@@ -1836,24 +1982,24 @@ var rr = I({
|
|
|
1836
1982
|
height: `${n.value}px`
|
|
1837
1983
|
}),
|
|
1838
1984
|
innerHTML: e.icon
|
|
1839
|
-
}, null, 12,
|
|
1985
|
+
}, null, 12, Vr)) : i.value ? (O(), S("img", {
|
|
1840
1986
|
key: 1,
|
|
1841
1987
|
src: e.icon,
|
|
1842
1988
|
width: n.value,
|
|
1843
1989
|
height: n.value,
|
|
1844
1990
|
class: "tpl:inline-block",
|
|
1845
1991
|
alt: ""
|
|
1846
|
-
}, null, 8,
|
|
1992
|
+
}, null, 8, Hr)) : (O(), A(P(kr), {
|
|
1847
1993
|
key: 2,
|
|
1848
1994
|
size: n.value,
|
|
1849
1995
|
"stroke-width": 1.5
|
|
1850
1996
|
}, null, 8, ["size"]));
|
|
1851
1997
|
}
|
|
1852
|
-
}),
|
|
1853
|
-
function
|
|
1854
|
-
let n =
|
|
1998
|
+
}), Wr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1999
|
+
function Gr(e, t) {
|
|
2000
|
+
let n = tn(), r = null, i = null, a = null;
|
|
1855
2001
|
function o() {
|
|
1856
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
2002
|
+
return e.value ? Array.from(e.value.querySelectorAll(Wr)).filter((e) => e.offsetParent !== null) : [];
|
|
1857
2003
|
}
|
|
1858
2004
|
function c(e) {
|
|
1859
2005
|
if (e.key !== "Tab") return;
|
|
@@ -1877,15 +2023,15 @@ function Cr(e, t) {
|
|
|
1877
2023
|
let d = s([t, e], ([e, t]) => {
|
|
1878
2024
|
e && t ? l() : u();
|
|
1879
2025
|
}, { flush: "post" });
|
|
1880
|
-
|
|
2026
|
+
M(() => {
|
|
1881
2027
|
d(), u();
|
|
1882
2028
|
});
|
|
1883
2029
|
}
|
|
1884
2030
|
//#endregion
|
|
1885
2031
|
//#region src/composables/useEmoji.ts
|
|
1886
|
-
function
|
|
2032
|
+
function Kr() {
|
|
1887
2033
|
let [e, t] = Je(!1), n = f([]), r = !1;
|
|
1888
|
-
|
|
2034
|
+
M(() => {
|
|
1889
2035
|
r = !0;
|
|
1890
2036
|
}), s(e, async (e) => {
|
|
1891
2037
|
if (e && n.value.length === 0) {
|
|
@@ -1909,7 +2055,7 @@ function wr() {
|
|
|
1909
2055
|
}
|
|
1910
2056
|
//#endregion
|
|
1911
2057
|
//#region src/composables/useFonts.ts
|
|
1912
|
-
var
|
|
2058
|
+
var qr = [
|
|
1913
2059
|
{
|
|
1914
2060
|
value: "Arial",
|
|
1915
2061
|
label: "Arial"
|
|
@@ -1938,7 +2084,7 @@ var Tr = [
|
|
|
1938
2084
|
value: "Courier New",
|
|
1939
2085
|
label: "Courier New"
|
|
1940
2086
|
}
|
|
1941
|
-
],
|
|
2087
|
+
], Jr = {
|
|
1942
2088
|
arial: "Arial, sans-serif",
|
|
1943
2089
|
helvetica: "Helvetica, sans-serif",
|
|
1944
2090
|
georgia: "Georgia, serif",
|
|
@@ -1946,23 +2092,23 @@ var Tr = [
|
|
|
1946
2092
|
verdana: "Verdana, sans-serif",
|
|
1947
2093
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1948
2094
|
"courier new": "'Courier New', monospace"
|
|
1949
|
-
},
|
|
1950
|
-
function
|
|
1951
|
-
if (e === void 0 || e === !0) return [...
|
|
2095
|
+
}, Yr = "Arial, sans-serif";
|
|
2096
|
+
function Xr(e) {
|
|
2097
|
+
if (e === void 0 || e === !0) return [...qr];
|
|
1952
2098
|
if (e === !1) return [];
|
|
1953
2099
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1954
2100
|
for (let i of e) {
|
|
1955
|
-
let e = i.toLowerCase(), a =
|
|
2101
|
+
let e = i.toLowerCase(), a = qr.find((t) => t.value.toLowerCase() === e);
|
|
1956
2102
|
if (!a) {
|
|
1957
|
-
r.has(e) || (r.add(e),
|
|
2103
|
+
r.has(e) || (r.add(e), Vt.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${qr.map((e) => e.value).join(", ")}.`));
|
|
1958
2104
|
continue;
|
|
1959
2105
|
}
|
|
1960
2106
|
n.has(a.value) || (n.add(a.value), t.push(a));
|
|
1961
2107
|
}
|
|
1962
2108
|
return t;
|
|
1963
2109
|
}
|
|
1964
|
-
function
|
|
1965
|
-
let t = _(e?.customFonts ?? []), n = _(!1), r =
|
|
2110
|
+
function Zr(e) {
|
|
2111
|
+
let t = _(e?.customFonts ?? []), n = _(!1), r = Xr(e?.builtIns), i = F(() => e?.defaultFallback ?? Yr), a = F(() => {
|
|
1966
2112
|
let e = [...r], n = t.value.map((e) => ({
|
|
1967
2113
|
value: e.name,
|
|
1968
2114
|
label: e.name,
|
|
@@ -1973,16 +2119,16 @@ function kr(e) {
|
|
|
1973
2119
|
function o(e) {
|
|
1974
2120
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1975
2121
|
}
|
|
1976
|
-
let s = e?.defaultFont ??
|
|
1977
|
-
o(s) ||
|
|
2122
|
+
let s = e?.defaultFont ?? Yr.split(",")[0].trim();
|
|
2123
|
+
o(s) || Vt.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.`);
|
|
1978
2124
|
function c() {
|
|
1979
2125
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
1980
2126
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1981
2127
|
if (t) return t.value;
|
|
1982
2128
|
}
|
|
1983
|
-
return
|
|
2129
|
+
return Yr;
|
|
1984
2130
|
}
|
|
1985
|
-
let l =
|
|
2131
|
+
let l = F(() => c());
|
|
1986
2132
|
function u(e) {
|
|
1987
2133
|
if (!e) return i.value;
|
|
1988
2134
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
@@ -1990,7 +2136,7 @@ function kr(e) {
|
|
|
1990
2136
|
let e = n.fallback ?? i.value;
|
|
1991
2137
|
return `'${n.name}', ${e}`;
|
|
1992
2138
|
}
|
|
1993
|
-
return
|
|
2139
|
+
return Jr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1994
2140
|
}
|
|
1995
2141
|
let d = [], f = !1;
|
|
1996
2142
|
async function p() {
|
|
@@ -2006,7 +2152,7 @@ function kr(e) {
|
|
|
2006
2152
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
2007
2153
|
});
|
|
2008
2154
|
} catch (t) {
|
|
2009
|
-
|
|
2155
|
+
Vt.warn(`Failed to load custom font "${e.name}":`, t);
|
|
2010
2156
|
}
|
|
2011
2157
|
});
|
|
2012
2158
|
await Promise.allSettled(e), !f && (n.value = !0);
|
|
@@ -2015,7 +2161,7 @@ function kr(e) {
|
|
|
2015
2161
|
for (let e of d) e.remove();
|
|
2016
2162
|
d.length = 0;
|
|
2017
2163
|
}
|
|
2018
|
-
return h() &&
|
|
2164
|
+
return h() && M(() => {
|
|
2019
2165
|
f = !0, m();
|
|
2020
2166
|
}), {
|
|
2021
2167
|
fonts: a,
|
|
@@ -2031,8 +2177,8 @@ function kr(e) {
|
|
|
2031
2177
|
}
|
|
2032
2178
|
//#endregion
|
|
2033
2179
|
//#region src/composables/useLogicTag.ts
|
|
2034
|
-
function
|
|
2035
|
-
let e = p(nt, []), t = p(
|
|
2180
|
+
function Qr() {
|
|
2181
|
+
let e = p(nt, []), t = p(pt, []), n = p(Dt, Fe.liquid), r = p(et, null), i = p(It, null), a = _(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
|
|
2036
2182
|
async function c() {
|
|
2037
2183
|
if (r) {
|
|
2038
2184
|
a.value = !0;
|
|
@@ -2063,12 +2209,12 @@ function Ar() {
|
|
|
2063
2209
|
}
|
|
2064
2210
|
//#endregion
|
|
2065
2211
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
2066
|
-
function
|
|
2067
|
-
return
|
|
2212
|
+
function $r(e, t, n) {
|
|
2213
|
+
return ue(e, n) ? {
|
|
2068
2214
|
type: "logicMergeTagNode",
|
|
2069
2215
|
attrs: {
|
|
2070
2216
|
value: e,
|
|
2071
|
-
keyword:
|
|
2217
|
+
keyword: ge(e, n)
|
|
2072
2218
|
}
|
|
2073
2219
|
} : {
|
|
2074
2220
|
type: "mergeTagNode",
|
|
@@ -2080,15 +2226,15 @@ function jr(e, t, n) {
|
|
|
2080
2226
|
}
|
|
2081
2227
|
//#endregion
|
|
2082
2228
|
//#region src/utils/insertLogicTag.ts
|
|
2083
|
-
function
|
|
2229
|
+
function ei(e) {
|
|
2084
2230
|
return "before" in e && "after" in e;
|
|
2085
2231
|
}
|
|
2086
|
-
function
|
|
2087
|
-
if (!
|
|
2088
|
-
e.chain().focus().insertContent(
|
|
2232
|
+
function ti(e, t, n) {
|
|
2233
|
+
if (!ei(t)) {
|
|
2234
|
+
e.chain().focus().insertContent($r(t.value, t.label, n)).run();
|
|
2089
2235
|
return;
|
|
2090
2236
|
}
|
|
2091
|
-
let r =
|
|
2237
|
+
let r = $r(t.before, t.label, n), i = $r(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
2092
2238
|
if (a !== o) {
|
|
2093
2239
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
2094
2240
|
return;
|
|
@@ -2097,20 +2243,20 @@ function Nr(e, t, n) {
|
|
|
2097
2243
|
}
|
|
2098
2244
|
//#endregion
|
|
2099
2245
|
//#region src/utils/linkColorExtension.ts
|
|
2100
|
-
function
|
|
2246
|
+
function ni(e) {
|
|
2101
2247
|
if (!e) return null;
|
|
2102
2248
|
let t = e.trim();
|
|
2103
2249
|
return /^#[0-9a-f]{3,8}$/i.test(t) || /^(rgb|rgba|hsl|hsla)\(\s*[0-9.,%/\s]+\)$/i.test(t) || /^[a-z]+$/i.test(t) ? t : null;
|
|
2104
2250
|
}
|
|
2105
|
-
function
|
|
2251
|
+
function ri(e) {
|
|
2106
2252
|
return e.extend({ addAttributes() {
|
|
2107
2253
|
return {
|
|
2108
2254
|
...this.parent?.(),
|
|
2109
2255
|
color: {
|
|
2110
2256
|
default: null,
|
|
2111
|
-
parseHTML: (e) =>
|
|
2257
|
+
parseHTML: (e) => ni(Ut(e.style.color)),
|
|
2112
2258
|
renderHTML: (e) => {
|
|
2113
|
-
let t =
|
|
2259
|
+
let t = ni(e.color);
|
|
2114
2260
|
return t ? { style: `color: ${t}` } : {};
|
|
2115
2261
|
}
|
|
2116
2262
|
}
|
|
@@ -2119,9 +2265,9 @@ function Fr(e) {
|
|
|
2119
2265
|
}
|
|
2120
2266
|
//#endregion
|
|
2121
2267
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
2122
|
-
function
|
|
2268
|
+
function ii(e) {
|
|
2123
2269
|
let t = _(!1), n = _(""), r = _(""), i = _(null);
|
|
2124
|
-
|
|
2270
|
+
Gr(i, t);
|
|
2125
2271
|
function a() {
|
|
2126
2272
|
let i = e.value?.getAttributes("link") ?? {};
|
|
2127
2273
|
n.value = i.href || "", r.value = i.color || "", t.value = !0;
|
|
@@ -2130,7 +2276,7 @@ function Ir(e) {
|
|
|
2130
2276
|
if (n.value) {
|
|
2131
2277
|
let t = c(n.value);
|
|
2132
2278
|
if (t !== null) {
|
|
2133
|
-
let n =
|
|
2279
|
+
let n = ni(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
2134
2280
|
n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
|
|
2135
2281
|
}
|
|
2136
2282
|
}
|
|
@@ -2177,10 +2323,10 @@ function Ir(e) {
|
|
|
2177
2323
|
}
|
|
2178
2324
|
//#endregion
|
|
2179
2325
|
//#region src/composables/useRichTextEditor.ts
|
|
2180
|
-
function
|
|
2181
|
-
let t = p(
|
|
2182
|
-
async function
|
|
2183
|
-
|
|
2326
|
+
function ai(e) {
|
|
2327
|
+
let t = p(Tt, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: o, requestMergeTag: c, syntax: l, autocomplete: u } = nn(), { canInsertLogicTag: d, isRequesting: m, requestLogicTag: h } = Qr(), g = p(gt, null), v = (a(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", y = me(l), b = f(null), { showLinkDialog: x, linkUrl: S, linkColor: C, linkDialogRef: w, openLinkDialog: T, insertLink: E, removeLink: D, closeLinkDialog: O, handleLinkKeydown: k } = ii(b), { start: A, stop: j } = Ye(() => b.value?.commands.focus("end"), 0, { immediate: !1 }), M = f(null), N = _(!0), P = _(null), F = !1;
|
|
2328
|
+
async function ee() {
|
|
2329
|
+
P.value = null, N.value = !0;
|
|
2184
2330
|
try {
|
|
2185
2331
|
let { TiptapEditor: r, EC: i, extensions: a } = await e.loadExtensions({
|
|
2186
2332
|
mergeTags: n,
|
|
@@ -2189,8 +2335,8 @@ function Lr(e) {
|
|
|
2189
2335
|
autocompleteEnabled: u,
|
|
2190
2336
|
suggestionEmptyText: v
|
|
2191
2337
|
});
|
|
2192
|
-
if (
|
|
2193
|
-
|
|
2338
|
+
if (F) return;
|
|
2339
|
+
M.value = i;
|
|
2194
2340
|
let o = /* @__PURE__ */ new Map();
|
|
2195
2341
|
a.forEach((e, t) => o.set(e.name, t));
|
|
2196
2342
|
let s = new r({
|
|
@@ -2198,27 +2344,27 @@ function Lr(e) {
|
|
|
2198
2344
|
content: e.blockContent(),
|
|
2199
2345
|
editable: !0,
|
|
2200
2346
|
onUpdate: ({ editor: n }) => {
|
|
2201
|
-
|
|
2347
|
+
F || t && t.updateBlock(e.blockId(), { content: n.getHTML() });
|
|
2202
2348
|
}
|
|
2203
2349
|
});
|
|
2204
|
-
if (
|
|
2350
|
+
if (F) {
|
|
2205
2351
|
s.destroy();
|
|
2206
2352
|
return;
|
|
2207
2353
|
}
|
|
2208
|
-
b.value = s,
|
|
2354
|
+
b.value = s, N.value = !1, A();
|
|
2209
2355
|
} catch (t) {
|
|
2210
|
-
if (
|
|
2211
|
-
|
|
2356
|
+
if (F) return;
|
|
2357
|
+
Vt.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), P.value = t instanceof Error ? t.message : "Failed to load editor", N.value = !1;
|
|
2212
2358
|
}
|
|
2213
2359
|
}
|
|
2214
|
-
function
|
|
2215
|
-
b.value?.destroy(), b.value = null,
|
|
2360
|
+
function I() {
|
|
2361
|
+
b.value?.destroy(), b.value = null, ee();
|
|
2216
2362
|
}
|
|
2217
|
-
|
|
2218
|
-
let
|
|
2363
|
+
ee();
|
|
2364
|
+
let L = s(() => e.blockContent(), (e) => {
|
|
2219
2365
|
b.value && b.value.getHTML() !== e && b.value.commands.setContent(e, { emitUpdate: !1 });
|
|
2220
2366
|
});
|
|
2221
|
-
function
|
|
2367
|
+
function te(t) {
|
|
2222
2368
|
if (o.value || m.value) return;
|
|
2223
2369
|
let n = t.composedPath(), r = n.find((e) => e instanceof HTMLElement);
|
|
2224
2370
|
if (!r) return;
|
|
@@ -2226,26 +2372,26 @@ function Lr(e) {
|
|
|
2226
2372
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
2227
2373
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || e.onDone();
|
|
2228
2374
|
}
|
|
2229
|
-
Ze(document, "mousedown",
|
|
2230
|
-
|
|
2375
|
+
Ze(document, "mousedown", te), i(() => {
|
|
2376
|
+
F = !0, L(), j(), b.value?.destroy();
|
|
2231
2377
|
});
|
|
2232
|
-
async function
|
|
2378
|
+
async function ne() {
|
|
2233
2379
|
let e = await c();
|
|
2234
|
-
|
|
2380
|
+
F || (e && b.value ? b.value.chain().focus().insertMergeTag({
|
|
2235
2381
|
label: e.label,
|
|
2236
2382
|
value: e.value
|
|
2237
2383
|
}).run() : b.value?.commands.focus());
|
|
2238
2384
|
}
|
|
2239
|
-
async function
|
|
2385
|
+
async function R() {
|
|
2240
2386
|
let e = await h();
|
|
2241
|
-
|
|
2387
|
+
F || (e && b.value ? ti(b.value, e, l) : b.value?.commands.focus());
|
|
2242
2388
|
}
|
|
2243
2389
|
return {
|
|
2244
2390
|
editor: b,
|
|
2245
|
-
EditorContent:
|
|
2246
|
-
isLoading:
|
|
2247
|
-
initError:
|
|
2248
|
-
retry:
|
|
2391
|
+
EditorContent: M,
|
|
2392
|
+
isLoading: N,
|
|
2393
|
+
initError: P,
|
|
2394
|
+
retry: I,
|
|
2249
2395
|
showLinkDialog: x,
|
|
2250
2396
|
linkUrl: S,
|
|
2251
2397
|
linkColor: C,
|
|
@@ -2261,36 +2407,36 @@ function Lr(e) {
|
|
|
2261
2407
|
removeLink: D,
|
|
2262
2408
|
closeLinkDialog: O,
|
|
2263
2409
|
handleLinkKeydown: k,
|
|
2264
|
-
handleAddMergeTag:
|
|
2265
|
-
handleAddLogicTag:
|
|
2410
|
+
handleAddMergeTag: ne,
|
|
2411
|
+
handleAddLogicTag: R
|
|
2266
2412
|
};
|
|
2267
2413
|
}
|
|
2268
2414
|
//#endregion
|
|
2269
2415
|
//#region src/composables/useSmallScreenNotice.ts
|
|
2270
|
-
var
|
|
2271
|
-
function
|
|
2272
|
-
let t = Xe(
|
|
2416
|
+
var oi = "(max-width: 767px)";
|
|
2417
|
+
function si(e) {
|
|
2418
|
+
let t = Xe(oi);
|
|
2273
2419
|
return {
|
|
2274
2420
|
isSmallScreen: t,
|
|
2275
|
-
showNotice:
|
|
2421
|
+
showNotice: F(() => (ee(e) ?? !0) && t.value)
|
|
2276
2422
|
};
|
|
2277
2423
|
}
|
|
2278
2424
|
//#endregion
|
|
2279
2425
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2280
|
-
var
|
|
2426
|
+
var ci = { class: "tpl:w-full" }, li = {
|
|
2281
2427
|
key: 0,
|
|
2282
2428
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
2283
|
-
},
|
|
2429
|
+
}, ui = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, di = {
|
|
2284
2430
|
key: 1,
|
|
2285
2431
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
2286
|
-
},
|
|
2432
|
+
}, fi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, pi = {
|
|
2287
2433
|
key: 2,
|
|
2288
2434
|
class: "tpl:relative"
|
|
2289
|
-
},
|
|
2435
|
+
}, mi = ["innerHTML"], hi = {
|
|
2290
2436
|
key: 0,
|
|
2291
2437
|
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]",
|
|
2292
2438
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2293
|
-
},
|
|
2439
|
+
}, gi = /* @__PURE__ */ L({
|
|
2294
2440
|
__name: "CustomBlock",
|
|
2295
2441
|
props: {
|
|
2296
2442
|
block: {},
|
|
@@ -2298,19 +2444,19 @@ var Br = { class: "tpl:w-full" }, Vr = {
|
|
|
2298
2444
|
},
|
|
2299
2445
|
emits: ["fetchData"],
|
|
2300
2446
|
setup(e, { emit: t }) {
|
|
2301
|
-
let r = e, i = t, { t: a } =
|
|
2447
|
+
let r = e, i = t, { t: a } = Bt(), o = p(Nt, null), c = _(""), l = _(!1), u = F(() => o?.getDefinition(r.block.customType)), d = F(() => !!u.value), { isFetching: f, fetch: m, needsFetch: h, hasDataSource: g } = vn({
|
|
2302
2448
|
definition: u,
|
|
2303
|
-
block:
|
|
2449
|
+
block: F(() => r.block),
|
|
2304
2450
|
onUpdate: (e, t) => {
|
|
2305
2451
|
i("fetchData", {
|
|
2306
2452
|
fieldValues: e,
|
|
2307
2453
|
dataSourceFetched: t
|
|
2308
2454
|
});
|
|
2309
2455
|
}
|
|
2310
|
-
}), v = p(
|
|
2456
|
+
}), v = p(mt, []), y = p(_t, null), b = F(() => {
|
|
2311
2457
|
if (!y?.value) return r.block;
|
|
2312
2458
|
let e = {};
|
|
2313
|
-
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
2459
|
+
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ? xe(n, v) : n;
|
|
2314
2460
|
return {
|
|
2315
2461
|
...r.block,
|
|
2316
2462
|
fieldValues: e
|
|
@@ -2334,60 +2480,60 @@ var Br = { class: "tpl:w-full" }, Vr = {
|
|
|
2334
2480
|
E();
|
|
2335
2481
|
}, { deep: !0 }), s(() => y?.value, () => {
|
|
2336
2482
|
E();
|
|
2337
|
-
}), (e, t) => (O(), S("div",
|
|
2483
|
+
}), (e, t) => (O(), S("div", ci, [d.value ? l.value ? (O(), S("div", di, [w(P(Zt), {
|
|
2338
2484
|
size: 24,
|
|
2339
2485
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2340
|
-
}), x("span",
|
|
2486
|
+
}), x("span", fi, k(P(a).customBlocks.renderError), 1)])) : (O(), S("div", pi, [x("div", { innerHTML: c.value }, null, 8, mi), P(g) && P(h) ? (O(), S("div", hi, [P(f) ? (O(), A($t, {
|
|
2341
2487
|
key: 1,
|
|
2342
2488
|
class: "tpl:w-48"
|
|
2343
2489
|
})) : (O(), S("button", {
|
|
2344
2490
|
key: 0,
|
|
2345
2491
|
type: "button",
|
|
2346
2492
|
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)]",
|
|
2347
|
-
onClick: t[0] ||=
|
|
2348
|
-
}, [u.value?.icon ? (O(), A(
|
|
2493
|
+
onClick: t[0] ||= R((...e) => P(m) && P(m)(...e), ["stop"])
|
|
2494
|
+
}, [u.value?.icon ? (O(), A(Ur, {
|
|
2349
2495
|
key: 0,
|
|
2350
2496
|
icon: u.value.icon,
|
|
2351
2497
|
size: 16
|
|
2352
|
-
}, null, 8, ["icon"])) :
|
|
2498
|
+
}, null, 8, ["icon"])) : I("", !0), T(" " + k(u.value?.dataSource?.label || P(a).customBlocks.dataSource.fetchButton), 1)]))])) : I("", !0)])) : (O(), S("div", li, [w(P(Lr), {
|
|
2353
2499
|
size: 24,
|
|
2354
2500
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2355
|
-
}), x("span",
|
|
2501
|
+
}), x("span", ui, k(P(a).customBlocks.definitionNotFound), 1)]))]));
|
|
2356
2502
|
}
|
|
2357
|
-
}),
|
|
2503
|
+
}), _i = { class: "tpl:w-full" }, vi = /* @__PURE__ */ L({
|
|
2358
2504
|
__name: "DividerBlock",
|
|
2359
2505
|
props: {
|
|
2360
2506
|
block: {},
|
|
2361
2507
|
viewport: {}
|
|
2362
2508
|
},
|
|
2363
2509
|
setup(e) {
|
|
2364
|
-
let t = e, n =
|
|
2510
|
+
let t = e, n = F(() => ({
|
|
2365
2511
|
borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
|
|
2366
2512
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2367
2513
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2368
2514
|
}));
|
|
2369
|
-
return (e, t) => (O(), S("div",
|
|
2515
|
+
return (e, t) => (O(), S("div", _i, [x("hr", {
|
|
2370
2516
|
class: "tpl:m-0 tpl:border-none",
|
|
2371
2517
|
style: u(n.value)
|
|
2372
2518
|
}, null, 4)]));
|
|
2373
2519
|
}
|
|
2374
|
-
}),
|
|
2520
|
+
}), yi = { class: "tpl:w-full" }, bi = ["srcdoc", "title"], xi = {
|
|
2375
2521
|
key: 1,
|
|
2376
2522
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]"
|
|
2377
|
-
},
|
|
2523
|
+
}, Si = {
|
|
2378
2524
|
key: 0,
|
|
2379
2525
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
2380
|
-
},
|
|
2526
|
+
}, Ci = {
|
|
2381
2527
|
key: 1,
|
|
2382
2528
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2383
|
-
},
|
|
2529
|
+
}, wi = /* @__PURE__ */ L({
|
|
2384
2530
|
__name: "HtmlBlock",
|
|
2385
2531
|
props: {
|
|
2386
2532
|
block: {},
|
|
2387
2533
|
viewport: {}
|
|
2388
2534
|
},
|
|
2389
2535
|
setup(e) {
|
|
2390
|
-
let t = e, { t: n } =
|
|
2536
|
+
let t = e, { t: n } = Bt(), r = p(Rt, !1), a = F(() => t.block.content.trim().length > 0), o = F(() => r && a.value), c = p(mt, []), l = p(_t, null), d = F(() => l?.value ? xe(t.block.content, c) : t.block.content), f = _(null), m = _(60), h = null;
|
|
2391
2537
|
function g() {
|
|
2392
2538
|
let e = f.value?.contentDocument;
|
|
2393
2539
|
e && (m.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -2401,46 +2547,46 @@ var Br = { class: "tpl:w-full" }, Vr = {
|
|
|
2401
2547
|
e || (h?.disconnect(), h = null);
|
|
2402
2548
|
}), i(() => {
|
|
2403
2549
|
h?.disconnect(), h = null;
|
|
2404
|
-
}), (e, t) => (O(), S("div",
|
|
2550
|
+
}), (e, t) => (O(), S("div", yi, [o.value ? (O(), S("iframe", {
|
|
2405
2551
|
key: 0,
|
|
2406
2552
|
ref_key: "iframeRef",
|
|
2407
2553
|
ref: f,
|
|
2408
2554
|
srcdoc: d.value,
|
|
2409
2555
|
sandbox: "allow-same-origin",
|
|
2410
|
-
title:
|
|
2556
|
+
title: P(n).html.preview,
|
|
2411
2557
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
2412
2558
|
style: u({ height: `${m.value}px` }),
|
|
2413
2559
|
onLoad: v
|
|
2414
|
-
}, null, 44,
|
|
2560
|
+
}, null, 44, bi)) : (O(), S("div", xi, [w(P(Ar), {
|
|
2415
2561
|
size: 24,
|
|
2416
2562
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2417
|
-
}), a.value ? (O(), S("span",
|
|
2563
|
+
}), a.value ? (O(), S("span", Si, k(P(n).html.preview), 1)) : (O(), S("span", Ci, k(P(n).html.empty), 1))]))]));
|
|
2418
2564
|
}
|
|
2419
|
-
}),
|
|
2420
|
-
function
|
|
2421
|
-
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 ||
|
|
2565
|
+
}), Ti = "image/";
|
|
2566
|
+
function Ei(e) {
|
|
2567
|
+
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || ee(r), { isOverDropZone: a } = Qe(t, {
|
|
2422
2568
|
preventDefaultForUnhandled: !0,
|
|
2423
2569
|
onDrop: (e) => {
|
|
2424
2570
|
if (!i()) return;
|
|
2425
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
2571
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(Ti));
|
|
2426
2572
|
t.length > 0 && n([t[0]]);
|
|
2427
2573
|
}
|
|
2428
2574
|
});
|
|
2429
|
-
return { isOver:
|
|
2575
|
+
return { isOver: F(() => i() && a.value) };
|
|
2430
2576
|
}
|
|
2431
2577
|
//#endregion
|
|
2432
2578
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2433
|
-
var
|
|
2579
|
+
var Di = {
|
|
2434
2580
|
key: 0,
|
|
2435
2581
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
|
|
2436
2582
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
2437
|
-
},
|
|
2583
|
+
}, Oi = ["href"], ki = ["src", "alt"], Ai = ["src", "alt"], ji = {
|
|
2438
2584
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2439
2585
|
style: { opacity: "0.7" }
|
|
2440
|
-
},
|
|
2586
|
+
}, Mi = ["href"], Ni = ["src", "alt"], Pi = ["src", "alt"], Fi = {
|
|
2441
2587
|
key: 4,
|
|
2442
2588
|
class: "tpl:flex 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)]"
|
|
2443
|
-
},
|
|
2589
|
+
}, Ii = ["aria-label"], Li = { key: 1 }, Ri = /* @__PURE__ */ L({
|
|
2444
2590
|
__name: "ImageBlock",
|
|
2445
2591
|
props: {
|
|
2446
2592
|
block: {},
|
|
@@ -2448,7 +2594,7 @@ var ai = {
|
|
|
2448
2594
|
},
|
|
2449
2595
|
emits: ["update"],
|
|
2450
2596
|
setup(e, { emit: t }) {
|
|
2451
|
-
let n = e, r = t, { t: i } =
|
|
2597
|
+
let n = e, r = t, { t: i } = Bt(), { syntax: a } = nn(), o = p(Et, null), s = F(() => !!o), c = rn();
|
|
2452
2598
|
async function l() {
|
|
2453
2599
|
let e = await o?.({ accept: ["images"] });
|
|
2454
2600
|
if (c.alive && e) {
|
|
@@ -2456,7 +2602,7 @@ var ai = {
|
|
|
2456
2602
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
2457
2603
|
}
|
|
2458
2604
|
}
|
|
2459
|
-
let d = _(), f = _(!1), m =
|
|
2605
|
+
let d = _(), f = _(!1), m = F(() => s.value && !f.value && !b.value);
|
|
2460
2606
|
async function h(e) {
|
|
2461
2607
|
if (o) {
|
|
2462
2608
|
f.value = !0;
|
|
@@ -2475,11 +2621,11 @@ var ai = {
|
|
|
2475
2621
|
}
|
|
2476
2622
|
}
|
|
2477
2623
|
}
|
|
2478
|
-
let { isOver: g } =
|
|
2624
|
+
let { isOver: g } = Ei({
|
|
2479
2625
|
target: d,
|
|
2480
2626
|
enabled: m,
|
|
2481
2627
|
onFiles: h
|
|
2482
|
-
}), v =
|
|
2628
|
+
}), v = F(() => ({ textAlign: n.block.align })), y = F(() => {
|
|
2483
2629
|
let e = n.block.align;
|
|
2484
2630
|
return {
|
|
2485
2631
|
maxWidth: "100%",
|
|
@@ -2490,86 +2636,86 @@ var ai = {
|
|
|
2490
2636
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2491
2637
|
marginRight: e === "center" ? "auto" : void 0
|
|
2492
2638
|
};
|
|
2493
|
-
}), b =
|
|
2639
|
+
}), b = F(() => Me(n.block.src, a)), C = Nn(() => b.value ? void 0 : n.block.src), E = Nn(() => b.value ? n.block.placeholderUrl : void 0);
|
|
2494
2640
|
return (t, n) => (O(), S("div", {
|
|
2495
2641
|
ref_key: "dropZoneRef",
|
|
2496
2642
|
ref: d,
|
|
2497
2643
|
"data-testid": "image-drop-zone",
|
|
2498
2644
|
class: "tpl:relative tpl:w-full",
|
|
2499
2645
|
style: u(v.value)
|
|
2500
|
-
}, [m.value && (
|
|
2646
|
+
}, [m.value && (P(g) || f.value) ? (O(), S("div", Di, [f.value ? (O(), S(N, { key: 0 }, [w(P(Jt), {
|
|
2501
2647
|
class: "tpl-spinner",
|
|
2502
2648
|
size: 20,
|
|
2503
2649
|
"stroke-width": 2
|
|
2504
|
-
}), T(" " + k(
|
|
2650
|
+
}), T(" " + k(P(i).image.uploading), 1)], 64)) : (O(), S(N, { key: 1 }, [w(P(Qt), {
|
|
2505
2651
|
size: 20,
|
|
2506
2652
|
"stroke-width": 1.5
|
|
2507
|
-
}), T(" " + k(
|
|
2653
|
+
}), T(" " + k(P(i).image.dropToUpload), 1)], 64))])) : I("", !0), e.block.src && b.value && e.block.placeholderUrl ? (O(), S(N, { key: 1 }, [e.block.linkUrl ? (O(), S("a", {
|
|
2508
2654
|
key: 0,
|
|
2509
2655
|
href: e.block.linkUrl,
|
|
2510
2656
|
target: "_blank",
|
|
2511
2657
|
rel: "noopener noreferrer",
|
|
2512
|
-
onClick: n[0] ||=
|
|
2658
|
+
onClick: n[0] ||= R(() => {}, ["prevent"])
|
|
2513
2659
|
}, [x("img", {
|
|
2514
2660
|
class: "tpl:border-0",
|
|
2515
2661
|
loading: "lazy",
|
|
2516
|
-
src:
|
|
2517
|
-
alt: e.block.alt ||
|
|
2662
|
+
src: P(E),
|
|
2663
|
+
alt: e.block.alt || P(i).image.altTextPlaceholder,
|
|
2518
2664
|
style: u(y.value)
|
|
2519
|
-
}, null, 12,
|
|
2665
|
+
}, null, 12, ki)], 8, Oi)) : (O(), S("img", {
|
|
2520
2666
|
key: 1,
|
|
2521
2667
|
class: "tpl:border-0",
|
|
2522
|
-
src:
|
|
2668
|
+
src: P(E),
|
|
2523
2669
|
alt: e.block.alt,
|
|
2524
2670
|
style: u(y.value)
|
|
2525
|
-
}, null, 12,
|
|
2671
|
+
}, null, 12, Ai))], 64)) : e.block.src && b.value ? (O(), S("div", {
|
|
2526
2672
|
key: 2,
|
|
2527
2673
|
class: "tpl:!flex tpl:min-h-[120px] 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)]",
|
|
2528
2674
|
style: u([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, y.value])
|
|
2529
|
-
}, [w(
|
|
2675
|
+
}, [w(P(Fr), {
|
|
2530
2676
|
size: 32,
|
|
2531
2677
|
"stroke-width": 1.5,
|
|
2532
2678
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2533
2679
|
style: { opacity: "0.5" }
|
|
2534
|
-
}), x("span",
|
|
2680
|
+
}), x("span", ji, [w(Tr, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (O(), S(N, { key: 3 }, [e.block.linkUrl ? (O(), S("a", {
|
|
2535
2681
|
key: 0,
|
|
2536
2682
|
href: e.block.linkUrl,
|
|
2537
2683
|
target: "_blank",
|
|
2538
2684
|
rel: "noopener noreferrer",
|
|
2539
|
-
onClick: n[1] ||=
|
|
2685
|
+
onClick: n[1] ||= R(() => {}, ["prevent"])
|
|
2540
2686
|
}, [x("img", {
|
|
2541
2687
|
class: "tpl:border-0",
|
|
2542
2688
|
loading: "lazy",
|
|
2543
|
-
src:
|
|
2544
|
-
alt: e.block.alt ||
|
|
2689
|
+
src: P(C),
|
|
2690
|
+
alt: e.block.alt || P(i).image.altTextPlaceholder,
|
|
2545
2691
|
style: u(y.value)
|
|
2546
|
-
}, null, 12,
|
|
2692
|
+
}, null, 12, Ni)], 8, Mi)) : (O(), S("img", {
|
|
2547
2693
|
key: 1,
|
|
2548
2694
|
class: "tpl:border-0",
|
|
2549
|
-
src:
|
|
2695
|
+
src: P(C),
|
|
2550
2696
|
alt: e.block.alt,
|
|
2551
2697
|
style: u(y.value)
|
|
2552
|
-
}, null, 12,
|
|
2698
|
+
}, null, 12, Pi))], 64)) : (O(), S("div", Fi, [s.value ? (O(), S("button", {
|
|
2553
2699
|
key: 0,
|
|
2554
|
-
"aria-label":
|
|
2700
|
+
"aria-label": P(i).image.browseMedia,
|
|
2555
2701
|
class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
2556
|
-
onClick:
|
|
2557
|
-
}, [w(
|
|
2702
|
+
onClick: R(l, ["stop"])
|
|
2703
|
+
}, [w(P(Fr), {
|
|
2558
2704
|
size: 14,
|
|
2559
2705
|
"stroke-width": 1.5
|
|
2560
|
-
}), T(" " + k(
|
|
2706
|
+
}), T(" " + k(P(i).image.browseMedia), 1)], 8, Ii)) : (O(), S("span", Li, k(P(i).image.clickToAdd), 1))]))], 4));
|
|
2561
2707
|
}
|
|
2562
|
-
}),
|
|
2708
|
+
}), zi = { class: "tpl:w-full" }, Bi = ["href"], Vi = {
|
|
2563
2709
|
key: 1,
|
|
2564
2710
|
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)]"
|
|
2565
|
-
},
|
|
2711
|
+
}, Hi = /* @__PURE__ */ L({
|
|
2566
2712
|
__name: "MenuBlock",
|
|
2567
2713
|
props: {
|
|
2568
2714
|
block: {},
|
|
2569
2715
|
viewport: {}
|
|
2570
2716
|
},
|
|
2571
2717
|
setup(e) {
|
|
2572
|
-
let t = e, { t: n } =
|
|
2718
|
+
let t = e, { t: n } = Bt(), r = F(() => ({
|
|
2573
2719
|
display: "flex",
|
|
2574
2720
|
flexWrap: "wrap",
|
|
2575
2721
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -2577,14 +2723,14 @@ var ai = {
|
|
|
2577
2723
|
fontSize: `${t.block.fontSize}px`,
|
|
2578
2724
|
fontFamily: t.block.fontFamily || "inherit",
|
|
2579
2725
|
alignItems: "center"
|
|
2580
|
-
})), i =
|
|
2726
|
+
})), i = F(() => t.block.items.length > 0);
|
|
2581
2727
|
function a(e) {
|
|
2582
2728
|
return e || t.block.linkColor || t.block.color;
|
|
2583
2729
|
}
|
|
2584
|
-
return (t, o) => (O(), S("div",
|
|
2730
|
+
return (t, o) => (O(), S("div", zi, [i.value ? (O(), S("div", {
|
|
2585
2731
|
key: 0,
|
|
2586
2732
|
style: u(r.value)
|
|
2587
|
-
}, [(O(!0), S(
|
|
2733
|
+
}, [(O(!0), S(N, null, D(e.block.items, (t, n) => (O(), S(N, { key: t.id }, [x("a", {
|
|
2588
2734
|
href: t.url || "#",
|
|
2589
2735
|
class: "tpl:cursor-default tpl:no-underline",
|
|
2590
2736
|
style: u({
|
|
@@ -2592,16 +2738,16 @@ var ai = {
|
|
|
2592
2738
|
fontWeight: t.bold ? "bold" : "normal",
|
|
2593
2739
|
textDecoration: t.underline ? "underline" : "none"
|
|
2594
2740
|
}),
|
|
2595
|
-
onClick: o[0] ||=
|
|
2596
|
-
}, [w(
|
|
2741
|
+
onClick: o[0] ||= R(() => {}, ["prevent"])
|
|
2742
|
+
}, [w(Tr, { text: t.text || "..." }, null, 8, ["text"])], 12, Bi), n < e.block.items.length - 1 ? (O(), S("span", {
|
|
2597
2743
|
key: 0,
|
|
2598
2744
|
style: u({
|
|
2599
2745
|
color: e.block.separatorColor,
|
|
2600
2746
|
padding: `0 ${e.block.spacing}px`
|
|
2601
2747
|
})
|
|
2602
|
-
}, k(e.block.separator), 5)) :
|
|
2748
|
+
}, k(e.block.separator), 5)) : I("", !0)], 64))), 128))], 4)) : (O(), S("div", Vi, [w(P(Ir), { size: 16 }), x("span", null, k(P(n).menu.addLinks), 1)]))]));
|
|
2603
2749
|
}
|
|
2604
|
-
}),
|
|
2750
|
+
}), Ui = /* @__PURE__ */ new Set([
|
|
2605
2751
|
"http",
|
|
2606
2752
|
"https",
|
|
2607
2753
|
"mailto",
|
|
@@ -2611,7 +2757,7 @@ var ai = {
|
|
|
2611
2757
|
"sms",
|
|
2612
2758
|
"xmpp",
|
|
2613
2759
|
"cid"
|
|
2614
|
-
]),
|
|
2760
|
+
]), Wi = /* @__PURE__ */ new Set([
|
|
2615
2761
|
"SCRIPT",
|
|
2616
2762
|
"STYLE",
|
|
2617
2763
|
"IFRAME",
|
|
@@ -2621,7 +2767,7 @@ var ai = {
|
|
|
2621
2767
|
"META",
|
|
2622
2768
|
"BASE",
|
|
2623
2769
|
"FORM"
|
|
2624
|
-
]),
|
|
2770
|
+
]), Gi = /* @__PURE__ */ new Set([
|
|
2625
2771
|
"href",
|
|
2626
2772
|
"xlink:href",
|
|
2627
2773
|
"formaction",
|
|
@@ -2630,16 +2776,16 @@ var ai = {
|
|
|
2630
2776
|
"background",
|
|
2631
2777
|
"poster"
|
|
2632
2778
|
]);
|
|
2633
|
-
function
|
|
2779
|
+
function Ki(e, t) {
|
|
2634
2780
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2635
2781
|
if (!n || n.startsWith("#")) return !0;
|
|
2636
2782
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
2637
2783
|
if (!r) return !0;
|
|
2638
2784
|
let i = r[1].toLowerCase();
|
|
2639
|
-
return
|
|
2785
|
+
return Ui.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
2640
2786
|
}
|
|
2641
|
-
function
|
|
2642
|
-
if (
|
|
2787
|
+
function qi(e) {
|
|
2788
|
+
if (Wi.has(e.tagName)) {
|
|
2643
2789
|
e.remove();
|
|
2644
2790
|
return;
|
|
2645
2791
|
}
|
|
@@ -2651,29 +2797,29 @@ function Ti(e) {
|
|
|
2651
2797
|
e.removeAttribute(n);
|
|
2652
2798
|
continue;
|
|
2653
2799
|
}
|
|
2654
|
-
if (
|
|
2655
|
-
|
|
2800
|
+
if (Gi.has(t)) {
|
|
2801
|
+
Ki(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
2656
2802
|
continue;
|
|
2657
2803
|
}
|
|
2658
2804
|
if (t === "src") {
|
|
2659
|
-
|
|
2805
|
+
Ki(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
2660
2806
|
continue;
|
|
2661
2807
|
}
|
|
2662
2808
|
t === "srcdoc" && e.removeAttribute(n);
|
|
2663
2809
|
}
|
|
2664
2810
|
let n = Array.from(e.children);
|
|
2665
|
-
for (let e of n)
|
|
2811
|
+
for (let e of n) qi(e);
|
|
2666
2812
|
}
|
|
2667
|
-
function
|
|
2813
|
+
function Ji(e) {
|
|
2668
2814
|
if (typeof DOMParser > "u") return e;
|
|
2669
2815
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
2670
|
-
for (let e of n)
|
|
2816
|
+
for (let e of n) qi(e);
|
|
2671
2817
|
return t.innerHTML;
|
|
2672
2818
|
}
|
|
2673
2819
|
//#endregion
|
|
2674
2820
|
//#region src/composables/useEditableTextBlock.ts
|
|
2675
|
-
function
|
|
2676
|
-
let t = p(
|
|
2821
|
+
function Yi(e) {
|
|
2822
|
+
let t = p(mt, []), n = p(_t, null), { syntax: r } = nn(), i = F(() => n?.value ? de(e(), t) : Ge(e(), t)), a = F(() => Ji(ve(i.value, r))), o = _(!1), s = _(null), { top: c, left: l } = $e(s), { toLocal: u } = Kt(), d = F(() => u({
|
|
2677
2823
|
top: c.value - 8,
|
|
2678
2824
|
left: l.value
|
|
2679
2825
|
}));
|
|
@@ -2694,24 +2840,24 @@ function Di(e) {
|
|
|
2694
2840
|
}
|
|
2695
2841
|
//#endregion
|
|
2696
2842
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2697
|
-
var
|
|
2843
|
+
var Xi = ["innerHTML"], Zi = /* @__PURE__ */ L({
|
|
2698
2844
|
__name: "ParagraphBlock",
|
|
2699
2845
|
props: {
|
|
2700
2846
|
block: {},
|
|
2701
2847
|
viewport: {}
|
|
2702
2848
|
},
|
|
2703
2849
|
setup(e) {
|
|
2704
|
-
let t = e, n = y(() => import("./ParagraphEditor-
|
|
2850
|
+
let t = e, n = y(() => import("./ParagraphEditor-DQEOFc0K.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Yi(() => t.block.content);
|
|
2705
2851
|
return (t, l) => (O(), S("div", {
|
|
2706
2852
|
ref_key: "blockRef",
|
|
2707
2853
|
ref: i,
|
|
2708
2854
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
2709
|
-
onDblclick: l[0] ||= (...e) =>
|
|
2710
|
-
}, [
|
|
2855
|
+
onDblclick: l[0] ||= (...e) => P(s) && P(s)(...e)
|
|
2856
|
+
}, [P(r) ? (O(), A(P(n), {
|
|
2711
2857
|
key: 0,
|
|
2712
2858
|
block: e.block,
|
|
2713
|
-
"toolbar-position":
|
|
2714
|
-
onDone:
|
|
2859
|
+
"toolbar-position": P(a),
|
|
2860
|
+
onDone: P(c)
|
|
2715
2861
|
}, null, 8, [
|
|
2716
2862
|
"block",
|
|
2717
2863
|
"toolbar-position",
|
|
@@ -2719,55 +2865,55 @@ var Oi = ["innerHTML"], ki = /* @__PURE__ */ I({
|
|
|
2719
2865
|
])) : (O(), S("div", {
|
|
2720
2866
|
key: 1,
|
|
2721
2867
|
class: "tpl-text-content tpl:outline-none",
|
|
2722
|
-
innerHTML:
|
|
2723
|
-
}, null, 8,
|
|
2868
|
+
innerHTML: P(o)
|
|
2869
|
+
}, null, 8, Xi))], 544));
|
|
2724
2870
|
}
|
|
2725
2871
|
});
|
|
2726
2872
|
//#endregion
|
|
2727
2873
|
//#region src/utils/blockComponentResolver.ts
|
|
2728
|
-
function
|
|
2874
|
+
function Qi(e) {
|
|
2729
2875
|
let t = { fontFamily: e.fontFamily };
|
|
2730
2876
|
return e.textColor && (t.color = e.textColor), e.linkColor && (t["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (t["--tpl-doc-link-underline"] = "underline"), t;
|
|
2731
2877
|
}
|
|
2732
|
-
function
|
|
2878
|
+
function $i(e, t, n) {
|
|
2733
2879
|
if (t) {
|
|
2734
2880
|
let n = t.getComponent(e);
|
|
2735
2881
|
if (n) return n;
|
|
2736
2882
|
}
|
|
2737
2883
|
return n[e.type] ?? null;
|
|
2738
2884
|
}
|
|
2739
|
-
function
|
|
2885
|
+
function ea(e) {
|
|
2740
2886
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
2741
2887
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
2742
2888
|
backgroundColor: n || "transparent"
|
|
2743
2889
|
};
|
|
2744
|
-
return (e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ??
|
|
2890
|
+
return (e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? Ae.paragraphGap : Ae.paragraphGap}px`), e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
2745
2891
|
}
|
|
2746
|
-
function
|
|
2892
|
+
function ta(e) {
|
|
2747
2893
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
2748
2894
|
let t = e.wrapper, n = {};
|
|
2749
2895
|
return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
|
|
2750
2896
|
}
|
|
2751
2897
|
//#endregion
|
|
2752
2898
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
2753
|
-
var
|
|
2899
|
+
var na = [
|
|
2754
2900
|
"data-block-id",
|
|
2755
2901
|
"data-block-type",
|
|
2756
2902
|
"data-tpl-picked"
|
|
2757
|
-
],
|
|
2903
|
+
], ra = ["aria-label"], ia = [
|
|
2758
2904
|
"aria-label",
|
|
2759
2905
|
"aria-pressed",
|
|
2760
2906
|
"title"
|
|
2761
|
-
],
|
|
2907
|
+
], aa = ["aria-label", "title"], oa = ["aria-label", "title"], sa = ["aria-label", "title"], ca = {
|
|
2762
2908
|
key: 1,
|
|
2763
2909
|
class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
|
|
2764
|
-
},
|
|
2910
|
+
}, la = { 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)]" }, ua = {
|
|
2765
2911
|
key: 2,
|
|
2766
2912
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2767
|
-
},
|
|
2913
|
+
}, da = ["aria-label", "title"], fa = {
|
|
2768
2914
|
key: 3,
|
|
2769
2915
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2770
|
-
},
|
|
2916
|
+
}, pa = ["aria-label"], ma = /*#__PURE__*/ en(/* @__PURE__ */ L({
|
|
2771
2917
|
__name: "BlockWrapper",
|
|
2772
2918
|
props: {
|
|
2773
2919
|
block: {},
|
|
@@ -2779,7 +2925,7 @@ var Pi = [
|
|
|
2779
2925
|
},
|
|
2780
2926
|
emits: ["select"],
|
|
2781
2927
|
setup(e, { emit: t }) {
|
|
2782
|
-
let n = y(() => import("./BlockIssueBadge-
|
|
2928
|
+
let n = y(() => import("./BlockIssueBadge-bTDu6W_2.js")), i = e, a = t, { t: o, format: s } = Bt(), l = p(Lt, null), d = _(null), f = F(() => l?.liftedBlockId.value === i.block.id), h = F(() => f.value ? s(o.blockActions.dragLifted, { block: i.block.type }) : o.blockActions.drag);
|
|
2783
2929
|
async function g() {
|
|
2784
2930
|
await m(), d.value?.focus();
|
|
2785
2931
|
}
|
|
@@ -2802,26 +2948,26 @@ var Pi = [
|
|
|
2802
2948
|
}
|
|
2803
2949
|
}
|
|
2804
2950
|
}
|
|
2805
|
-
let b =
|
|
2951
|
+
let b = F(() => !i.viewport || !i.block.visibility ? !1 : i.block.visibility[i.viewport] === !1), C = F(() => i.previewMode === !0 && b.value), E = F(() => i.viewport ? {
|
|
2806
2952
|
desktop: o.viewport.desktop,
|
|
2807
2953
|
mobile: o.viewport.mobile
|
|
2808
|
-
}[i.viewport] ?? i.viewport : ""), D =
|
|
2809
|
-
function
|
|
2954
|
+
}[i.viewport] ?? i.viewport : ""), D = F(() => !!i.block.displayCondition), A = p(yt, null), j = p(St, null), M = p(xt, {}), N = F(() => M.savedBlocks?.isPicking.value === !0), ee = F(() => !i.nested && M.savedBlocks?.isAvailable.value === !0 && M.savedBlocks?.canCreate.value === !0), L = F(() => i.isSelected && !N.value), te = F(() => M.comments?.getBlockCount(i.block.id) ?? 0), ne = F(() => ea(i.block)), re = F(() => ta(i.block));
|
|
2955
|
+
function ie(e) {
|
|
2810
2956
|
i.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), a("select"));
|
|
2811
2957
|
}
|
|
2812
|
-
function
|
|
2958
|
+
function ae() {
|
|
2813
2959
|
A?.deleteBlock(i.block.id);
|
|
2814
2960
|
}
|
|
2815
|
-
function
|
|
2961
|
+
function oe() {
|
|
2816
2962
|
A?.duplicateBlock(i.block);
|
|
2817
2963
|
}
|
|
2818
|
-
function
|
|
2819
|
-
|
|
2964
|
+
function se() {
|
|
2965
|
+
M.savedBlocks?.startPicking(i.block.id);
|
|
2820
2966
|
}
|
|
2821
|
-
function
|
|
2822
|
-
|
|
2967
|
+
function ce() {
|
|
2968
|
+
j?.toggleBlock(i.block.id);
|
|
2823
2969
|
}
|
|
2824
|
-
return (t, i) => C.value ?
|
|
2970
|
+
return (t, i) => C.value ? I("", !0) : (O(), S("div", {
|
|
2825
2971
|
key: 0,
|
|
2826
2972
|
class: r(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
|
|
2827
2973
|
"tpl-block--selected": e.isSelected,
|
|
@@ -2832,13 +2978,13 @@ var Pi = [
|
|
|
2832
2978
|
"data-block-id": e.block.id,
|
|
2833
2979
|
"data-block-type": e.block.type,
|
|
2834
2980
|
"data-tpl-picked": e.picked || void 0,
|
|
2835
|
-
onClick:
|
|
2981
|
+
onClick: ie
|
|
2836
2982
|
}, [
|
|
2837
|
-
w(
|
|
2838
|
-
|
|
2983
|
+
w(P(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
2984
|
+
L.value ? (O(), S("div", {
|
|
2839
2985
|
key: 0,
|
|
2840
2986
|
role: "toolbar",
|
|
2841
|
-
"aria-label":
|
|
2987
|
+
"aria-label": P(o).blockActions.drag,
|
|
2842
2988
|
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full 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)]"
|
|
2843
2989
|
}, [
|
|
2844
2990
|
x("button", {
|
|
@@ -2848,111 +2994,111 @@ var Pi = [
|
|
|
2848
2994
|
"aria-label": h.value,
|
|
2849
2995
|
"aria-pressed": f.value,
|
|
2850
2996
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2851
|
-
title:
|
|
2997
|
+
title: P(o).blockActions.drag,
|
|
2852
2998
|
onKeydown: v
|
|
2853
|
-
}, [w(
|
|
2999
|
+
}, [w(P(Pr), {
|
|
2854
3000
|
size: 14,
|
|
2855
3001
|
"stroke-width": 1.5
|
|
2856
|
-
})], 40,
|
|
3002
|
+
})], 40, ia),
|
|
2857
3003
|
x("button", {
|
|
2858
3004
|
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",
|
|
2859
|
-
"aria-label":
|
|
2860
|
-
title:
|
|
2861
|
-
onClick:
|
|
2862
|
-
}, [w(
|
|
3005
|
+
"aria-label": P(o).blockActions.duplicate,
|
|
3006
|
+
title: P(o).blockActions.duplicate,
|
|
3007
|
+
onClick: R(oe, ["stop"])
|
|
3008
|
+
}, [w(P(jr), {
|
|
2863
3009
|
size: 14,
|
|
2864
3010
|
"stroke-width": 1.5
|
|
2865
|
-
})], 8,
|
|
2866
|
-
|
|
3011
|
+
})], 8, aa),
|
|
3012
|
+
ee.value ? (O(), S("button", {
|
|
2867
3013
|
key: 0,
|
|
2868
3014
|
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",
|
|
2869
|
-
"aria-label":
|
|
2870
|
-
title:
|
|
2871
|
-
onClick:
|
|
2872
|
-
}, [w(
|
|
3015
|
+
"aria-label": P(o).blockActions.saveAsBlock,
|
|
3016
|
+
title: P(o).blockActions.saveAsBlock,
|
|
3017
|
+
onClick: R(se, ["stop"])
|
|
3018
|
+
}, [w(P(Or), {
|
|
2873
3019
|
size: 14,
|
|
2874
3020
|
"stroke-width": 1.5
|
|
2875
|
-
})], 8,
|
|
3021
|
+
})], 8, oa)) : I("", !0),
|
|
2876
3022
|
x("button", {
|
|
2877
3023
|
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",
|
|
2878
|
-
"aria-label":
|
|
2879
|
-
title:
|
|
2880
|
-
onClick:
|
|
2881
|
-
}, [w(
|
|
3024
|
+
"aria-label": P(o).blockActions.delete,
|
|
3025
|
+
title: P(o).blockActions.delete,
|
|
3026
|
+
onClick: R(ae, ["stop"])
|
|
3027
|
+
}, [w(P(Xt), {
|
|
2882
3028
|
size: 14,
|
|
2883
3029
|
"stroke-width": 1.5
|
|
2884
|
-
})], 8,
|
|
2885
|
-
], 8,
|
|
2886
|
-
b.value ? (O(), S("div",
|
|
3030
|
+
})], 8, sa)
|
|
3031
|
+
], 8, ra)) : I("", !0),
|
|
3032
|
+
b.value ? (O(), S("div", ca, [x("span", la, [w(P(Mr), {
|
|
2887
3033
|
size: 12,
|
|
2888
3034
|
"stroke-width": 1.5
|
|
2889
|
-
}), T(" " + k(
|
|
2890
|
-
D.value && !b.value ? (O(), S("div",
|
|
3035
|
+
}), T(" " + k(P(s)(P(o).blockActions.hiddenOnViewport, { viewport: E.value })), 1)])])) : I("", !0),
|
|
3036
|
+
D.value && !b.value ? (O(), S("div", ua, [x("button", {
|
|
2891
3037
|
"data-testid": "condition-toggle",
|
|
2892
3038
|
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)]",
|
|
2893
|
-
"aria-label":
|
|
3039
|
+
"aria-label": P(o).blockActions.conditionToggle,
|
|
2894
3040
|
title: e.block.displayCondition?.label,
|
|
2895
|
-
onClick:
|
|
2896
|
-
}, [w(
|
|
3041
|
+
onClick: R(ce, ["stop"])
|
|
3042
|
+
}, [w(P(Nr), {
|
|
2897
3043
|
size: 12,
|
|
2898
3044
|
"stroke-width": 2
|
|
2899
|
-
})], 8,
|
|
2900
|
-
|
|
3045
|
+
})], 8, da)])) : I("", !0),
|
|
3046
|
+
te.value > 0 && !b.value ? (O(), S("div", fa, [x("button", {
|
|
2901
3047
|
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 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)]",
|
|
2902
|
-
"aria-label":
|
|
2903
|
-
onClick: i[0] ||=
|
|
2904
|
-
}, [w(
|
|
3048
|
+
"aria-label": P(s)(P(o).blockActions.comments, { count: String(te.value) }),
|
|
3049
|
+
onClick: i[0] ||= R((t) => P(M).comments?.openForBlock(e.block.id), ["stop"])
|
|
3050
|
+
}, [w(P(Yt), {
|
|
2905
3051
|
size: 12,
|
|
2906
3052
|
"stroke-width": 2.5
|
|
2907
|
-
}), T(" " + k(
|
|
2908
|
-
|
|
3053
|
+
}), T(" " + k(te.value), 1)], 8, pa)])) : I("", !0),
|
|
3054
|
+
re.value ? (O(), S("div", {
|
|
2909
3055
|
key: 4,
|
|
2910
3056
|
class: "tpl-section-wrapper",
|
|
2911
|
-
style: u(
|
|
3057
|
+
style: u(re.value)
|
|
2912
3058
|
}, [x("div", {
|
|
2913
3059
|
class: "tpl-block-content",
|
|
2914
|
-
style: u(
|
|
3060
|
+
style: u(ne.value)
|
|
2915
3061
|
}, [c(t.$slots, "default", {}, void 0, !0)], 4)], 4)) : (O(), S("div", {
|
|
2916
3062
|
key: 5,
|
|
2917
3063
|
class: "tpl-block-content",
|
|
2918
|
-
style: u(
|
|
3064
|
+
style: u(ne.value)
|
|
2919
3065
|
}, [c(t.$slots, "default", {}, void 0, !0)], 4))
|
|
2920
|
-
], 10,
|
|
3066
|
+
], 10, na));
|
|
2921
3067
|
}
|
|
2922
3068
|
}), [["__scopeId", "data-v-2c239048"]]);
|
|
2923
3069
|
//#endregion
|
|
2924
3070
|
//#region src/utils/unwrapParagraph.ts
|
|
2925
|
-
function
|
|
3071
|
+
function ha(e) {
|
|
2926
3072
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2927
3073
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2928
3074
|
}
|
|
2929
3075
|
//#endregion
|
|
2930
3076
|
//#region src/components/blocks/TitleBlock.vue
|
|
2931
|
-
var
|
|
3077
|
+
var ga = /* @__PURE__ */ L({
|
|
2932
3078
|
__name: "TitleBlock",
|
|
2933
3079
|
props: {
|
|
2934
3080
|
block: {},
|
|
2935
3081
|
viewport: {}
|
|
2936
3082
|
},
|
|
2937
3083
|
setup(e) {
|
|
2938
|
-
let t = e, n = y(() => import("./TitleEditor-
|
|
3084
|
+
let t = e, n = y(() => import("./TitleEditor-C0JQJu38.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Yi(() => t.block.content), l = F(() => {
|
|
2939
3085
|
let e = {
|
|
2940
3086
|
fontSize: `${Le[t.block.level]}px`,
|
|
2941
3087
|
textAlign: t.block.textAlign
|
|
2942
3088
|
};
|
|
2943
3089
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
2944
|
-
}), f =
|
|
3090
|
+
}), f = F(() => `h${t.block.level}`), p = F(() => ha(o.value));
|
|
2945
3091
|
return (t, o) => (O(), S("div", {
|
|
2946
3092
|
ref_key: "blockRef",
|
|
2947
3093
|
ref: i,
|
|
2948
3094
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
2949
3095
|
style: u(l.value),
|
|
2950
|
-
onDblclick: o[0] ||= (...e) =>
|
|
2951
|
-
}, [
|
|
3096
|
+
onDblclick: o[0] ||= (...e) => P(s) && P(s)(...e)
|
|
3097
|
+
}, [P(r) ? (O(), A(P(n), {
|
|
2952
3098
|
key: 0,
|
|
2953
3099
|
block: e.block,
|
|
2954
|
-
"toolbar-position":
|
|
2955
|
-
onDone:
|
|
3100
|
+
"toolbar-position": P(a),
|
|
3101
|
+
onDone: P(c)
|
|
2956
3102
|
}, null, 8, [
|
|
2957
3103
|
"block",
|
|
2958
3104
|
"toolbar-position",
|
|
@@ -2967,88 +3113,88 @@ var Ji = /* @__PURE__ */ I({
|
|
|
2967
3113
|
});
|
|
2968
3114
|
//#endregion
|
|
2969
3115
|
//#region src/utils/sectionColumnDrop.ts
|
|
2970
|
-
function
|
|
3116
|
+
function _a(e) {
|
|
2971
3117
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2972
3118
|
}
|
|
2973
3119
|
//#endregion
|
|
2974
3120
|
//#region ../../node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
|
|
2975
|
-
var
|
|
3121
|
+
var va = Object.defineProperty, ya = Object.getOwnPropertySymbols, ba = Object.prototype.hasOwnProperty, xa = Object.prototype.propertyIsEnumerable, Sa = (e, t, n) => t in e ? va(e, t, {
|
|
2976
3122
|
enumerable: !0,
|
|
2977
3123
|
configurable: !0,
|
|
2978
3124
|
writable: !0,
|
|
2979
3125
|
value: n
|
|
2980
|
-
}) : e[t] = n,
|
|
2981
|
-
for (var n in t ||= {})
|
|
2982
|
-
if (
|
|
3126
|
+
}) : e[t] = n, Ca = (e, t) => {
|
|
3127
|
+
for (var n in t ||= {}) ba.call(t, n) && Sa(e, n, t[n]);
|
|
3128
|
+
if (ya) for (var n of ya(t)) xa.call(t, n) && Sa(e, n, t[n]);
|
|
2983
3129
|
return e;
|
|
2984
|
-
},
|
|
3130
|
+
}, wa = (e, t) => {
|
|
2985
3131
|
var n = {};
|
|
2986
|
-
for (var r in e)
|
|
2987
|
-
if (e != null &&
|
|
3132
|
+
for (var r in e) ba.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
3133
|
+
if (e != null && ya) for (var r of ya(e)) t.indexOf(r) < 0 && xa.call(e, r) && (n[r] = e[r]);
|
|
2988
3134
|
return n;
|
|
2989
|
-
},
|
|
2990
|
-
function
|
|
2991
|
-
console.warn(
|
|
3135
|
+
}, Ta = "[vue-draggable-plus]: ";
|
|
3136
|
+
function Ea(e) {
|
|
3137
|
+
console.warn(Ta + e);
|
|
2992
3138
|
}
|
|
2993
|
-
function
|
|
2994
|
-
console.error(
|
|
3139
|
+
function Da(e) {
|
|
3140
|
+
console.error(Ta + e);
|
|
2995
3141
|
}
|
|
2996
|
-
function
|
|
3142
|
+
function Oa(e, t, n) {
|
|
2997
3143
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2998
3144
|
}
|
|
2999
|
-
function
|
|
3145
|
+
function ka(e) {
|
|
3000
3146
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
3001
3147
|
}
|
|
3002
|
-
function
|
|
3003
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
3148
|
+
function Aa(e) {
|
|
3149
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[ka(n)] = e[n]), t), {});
|
|
3004
3150
|
}
|
|
3005
|
-
function
|
|
3151
|
+
function ja(e, t) {
|
|
3006
3152
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
3007
3153
|
}
|
|
3008
|
-
function
|
|
3154
|
+
function Ma(e, t, n) {
|
|
3009
3155
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
3010
3156
|
}
|
|
3011
|
-
function
|
|
3157
|
+
function Na(e) {
|
|
3012
3158
|
return e === void 0;
|
|
3013
3159
|
}
|
|
3014
|
-
function
|
|
3160
|
+
function Pa(e) {
|
|
3015
3161
|
return typeof e == "string";
|
|
3016
3162
|
}
|
|
3017
|
-
function
|
|
3163
|
+
function Fa(e, t, n) {
|
|
3018
3164
|
let r = e.children[n];
|
|
3019
3165
|
e.insertBefore(t, r);
|
|
3020
3166
|
}
|
|
3021
|
-
function
|
|
3167
|
+
function Ia(e) {
|
|
3022
3168
|
e.parentNode && e.parentNode.removeChild(e);
|
|
3023
3169
|
}
|
|
3024
|
-
function
|
|
3170
|
+
function La(e, t = document) {
|
|
3025
3171
|
let n = null;
|
|
3026
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
3172
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Ea(`Element not found: ${e}`), n;
|
|
3027
3173
|
}
|
|
3028
|
-
function
|
|
3174
|
+
function Ra(e, t, n = null) {
|
|
3029
3175
|
return function(...r) {
|
|
3030
3176
|
return e.apply(n, r), t.apply(n, r);
|
|
3031
3177
|
};
|
|
3032
3178
|
}
|
|
3033
|
-
function
|
|
3034
|
-
let n =
|
|
3179
|
+
function za(e, t) {
|
|
3180
|
+
let n = Ca({}, e);
|
|
3035
3181
|
return Object.keys(t).forEach((r) => {
|
|
3036
|
-
n[r] ? n[r] =
|
|
3182
|
+
n[r] ? n[r] = Ra(e[r], t[r]) : n[r] = t[r];
|
|
3037
3183
|
}), n;
|
|
3038
3184
|
}
|
|
3039
|
-
function
|
|
3185
|
+
function Ba(e) {
|
|
3040
3186
|
return e instanceof HTMLElement;
|
|
3041
3187
|
}
|
|
3042
|
-
function
|
|
3188
|
+
function Va(e, t) {
|
|
3043
3189
|
Object.keys(e).forEach((n) => {
|
|
3044
3190
|
t(n, e[n]);
|
|
3045
3191
|
});
|
|
3046
3192
|
}
|
|
3047
|
-
function
|
|
3193
|
+
function Ha(e) {
|
|
3048
3194
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
3049
3195
|
}
|
|
3050
|
-
var
|
|
3051
|
-
function
|
|
3196
|
+
var Ua = Object.assign;
|
|
3197
|
+
function Wa(e, t) {
|
|
3052
3198
|
var n = Object.keys(e);
|
|
3053
3199
|
if (Object.getOwnPropertySymbols) {
|
|
3054
3200
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -3058,26 +3204,26 @@ function Sa(e, t) {
|
|
|
3058
3204
|
}
|
|
3059
3205
|
return n;
|
|
3060
3206
|
}
|
|
3061
|
-
function
|
|
3207
|
+
function Ga(e) {
|
|
3062
3208
|
for (var t = 1; t < arguments.length; t++) {
|
|
3063
3209
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
3064
|
-
t % 2 ?
|
|
3065
|
-
|
|
3066
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
3210
|
+
t % 2 ? Wa(Object(n), !0).forEach(function(t) {
|
|
3211
|
+
qa(e, t, n[t]);
|
|
3212
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Wa(Object(n)).forEach(function(t) {
|
|
3067
3213
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
3068
3214
|
});
|
|
3069
3215
|
}
|
|
3070
3216
|
return e;
|
|
3071
3217
|
}
|
|
3072
|
-
function
|
|
3218
|
+
function Ka(e) {
|
|
3073
3219
|
"@babel/helpers - typeof";
|
|
3074
|
-
return
|
|
3220
|
+
return Ka = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
3075
3221
|
return typeof e;
|
|
3076
3222
|
} : function(e) {
|
|
3077
3223
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
3078
|
-
},
|
|
3224
|
+
}, Ka(e);
|
|
3079
3225
|
}
|
|
3080
|
-
function
|
|
3226
|
+
function qa(e, t, n) {
|
|
3081
3227
|
return t in e ? Object.defineProperty(e, t, {
|
|
3082
3228
|
value: n,
|
|
3083
3229
|
enumerable: !0,
|
|
@@ -3085,45 +3231,44 @@ function Ta(e, t, n) {
|
|
|
3085
3231
|
writable: !0
|
|
3086
3232
|
}) : e[t] = n, e;
|
|
3087
3233
|
}
|
|
3088
|
-
function
|
|
3089
|
-
return
|
|
3234
|
+
function Ja() {
|
|
3235
|
+
return Ja = Object.assign || function(e) {
|
|
3090
3236
|
for (var t = 1; t < arguments.length; t++) {
|
|
3091
3237
|
var n = arguments[t];
|
|
3092
3238
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
3093
3239
|
}
|
|
3094
3240
|
return e;
|
|
3095
|
-
},
|
|
3241
|
+
}, Ja.apply(this, arguments);
|
|
3096
3242
|
}
|
|
3097
|
-
function
|
|
3243
|
+
function Ya(e, t) {
|
|
3098
3244
|
if (e == null) return {};
|
|
3099
|
-
var n = {}, r = Object.keys(e), i, a;
|
|
3100
|
-
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
3245
|
+
for (var n = {}, r = Object.keys(e), i, a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
3101
3246
|
return n;
|
|
3102
3247
|
}
|
|
3103
|
-
function
|
|
3248
|
+
function Xa(e, t) {
|
|
3104
3249
|
if (e == null) return {};
|
|
3105
|
-
var n =
|
|
3250
|
+
var n = Ya(e, t), r, i;
|
|
3106
3251
|
if (Object.getOwnPropertySymbols) {
|
|
3107
3252
|
var a = Object.getOwnPropertySymbols(e);
|
|
3108
3253
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
3109
3254
|
}
|
|
3110
3255
|
return n;
|
|
3111
3256
|
}
|
|
3112
|
-
var
|
|
3113
|
-
function
|
|
3257
|
+
var Za = "1.15.2";
|
|
3258
|
+
function Qa(e) {
|
|
3114
3259
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
3115
3260
|
}
|
|
3116
|
-
var
|
|
3261
|
+
var $a = Qa(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), eo = Qa(/Edge/i), to = Qa(/firefox/i), no = Qa(/safari/i) && !Qa(/chrome/i) && !Qa(/android/i), ro = Qa(/iP(ad|od|hone)/i), io = Qa(/chrome/i) && Qa(/android/i), ao = {
|
|
3117
3262
|
capture: !1,
|
|
3118
3263
|
passive: !1
|
|
3119
3264
|
};
|
|
3120
|
-
function R(e, t, n) {
|
|
3121
|
-
e.addEventListener(t, n, !ja && La);
|
|
3122
|
-
}
|
|
3123
3265
|
function z(e, t, n) {
|
|
3124
|
-
e.
|
|
3266
|
+
e.addEventListener(t, n, !$a && ao);
|
|
3267
|
+
}
|
|
3268
|
+
function B(e, t, n) {
|
|
3269
|
+
e.removeEventListener(t, n, !$a && ao);
|
|
3125
3270
|
}
|
|
3126
|
-
function
|
|
3271
|
+
function oo(e, t) {
|
|
3127
3272
|
if (t) {
|
|
3128
3273
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
3129
3274
|
if (e.matches) return e.matches(t);
|
|
@@ -3135,41 +3280,41 @@ function Ra(e, t) {
|
|
|
3135
3280
|
return !1;
|
|
3136
3281
|
}
|
|
3137
3282
|
}
|
|
3138
|
-
function
|
|
3283
|
+
function so(e) {
|
|
3139
3284
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
3140
3285
|
}
|
|
3141
|
-
function
|
|
3286
|
+
function co(e, t, n, r) {
|
|
3142
3287
|
if (e) {
|
|
3143
3288
|
n ||= document;
|
|
3144
3289
|
do {
|
|
3145
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
3290
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && oo(e, t) : oo(e, t)) || r && e === n) return e;
|
|
3146
3291
|
if (e === n) break;
|
|
3147
|
-
} while (e =
|
|
3292
|
+
} while (e = so(e));
|
|
3148
3293
|
}
|
|
3149
3294
|
return null;
|
|
3150
3295
|
}
|
|
3151
|
-
var
|
|
3152
|
-
function
|
|
3153
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
3296
|
+
var lo = /\s+/g;
|
|
3297
|
+
function uo(e, t, n) {
|
|
3298
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(lo, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(lo, " "));
|
|
3154
3299
|
}
|
|
3155
|
-
function
|
|
3300
|
+
function V(e, t, n) {
|
|
3156
3301
|
var r = e && e.style;
|
|
3157
3302
|
if (r) {
|
|
3158
3303
|
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];
|
|
3159
3304
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
3160
3305
|
}
|
|
3161
3306
|
}
|
|
3162
|
-
function
|
|
3307
|
+
function fo(e, t) {
|
|
3163
3308
|
var n = "";
|
|
3164
3309
|
if (typeof e == "string") n = e;
|
|
3165
3310
|
else do {
|
|
3166
|
-
var r =
|
|
3311
|
+
var r = V(e, "transform");
|
|
3167
3312
|
r && r !== "none" && (n = r + " " + n);
|
|
3168
3313
|
} while (!t && (e = e.parentNode));
|
|
3169
3314
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
3170
3315
|
return i && new i(n);
|
|
3171
3316
|
}
|
|
3172
|
-
function
|
|
3317
|
+
function po(e, t, n) {
|
|
3173
3318
|
if (e) {
|
|
3174
3319
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
3175
3320
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -3177,21 +3322,21 @@ function Wa(e, t, n) {
|
|
|
3177
3322
|
}
|
|
3178
3323
|
return [];
|
|
3179
3324
|
}
|
|
3180
|
-
function
|
|
3325
|
+
function mo() {
|
|
3181
3326
|
return document.scrollingElement || document.documentElement;
|
|
3182
3327
|
}
|
|
3183
|
-
function
|
|
3184
|
-
if (
|
|
3328
|
+
function H(e, t, n, r, i) {
|
|
3329
|
+
if (e.getBoundingClientRect || e === window) {
|
|
3185
3330
|
var a, o, s, c, l, u, d;
|
|
3186
|
-
if (e !== window && e.parentNode && e !==
|
|
3187
|
-
if (i && i.getBoundingClientRect && (
|
|
3331
|
+
if (e !== window && e.parentNode && e !== mo() ? (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, !$a)) do
|
|
3332
|
+
if (i && i.getBoundingClientRect && (V(i, "transform") !== "none" || n && V(i, "position") !== "static")) {
|
|
3188
3333
|
var f = i.getBoundingClientRect();
|
|
3189
|
-
o -= f.top + parseInt(
|
|
3334
|
+
o -= f.top + parseInt(V(i, "border-top-width")), s -= f.left + parseInt(V(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
3190
3335
|
break;
|
|
3191
3336
|
}
|
|
3192
3337
|
while (i = i.parentNode);
|
|
3193
3338
|
if (r && e !== window) {
|
|
3194
|
-
var p =
|
|
3339
|
+
var p = fo(i || e), m = p && p.a, h = p && p.d;
|
|
3195
3340
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
3196
3341
|
}
|
|
3197
3342
|
return {
|
|
@@ -3204,18 +3349,18 @@ function V(e, t, n, r, i) {
|
|
|
3204
3349
|
};
|
|
3205
3350
|
}
|
|
3206
3351
|
}
|
|
3207
|
-
function
|
|
3208
|
-
for (var r =
|
|
3209
|
-
var a =
|
|
3352
|
+
function ho(e, t, n) {
|
|
3353
|
+
for (var r = xo(e, !0), i = H(e)[t]; r;) {
|
|
3354
|
+
var a = H(r)[n], o = void 0;
|
|
3210
3355
|
if (o = i >= a, !o) return r;
|
|
3211
|
-
if (r ===
|
|
3212
|
-
r =
|
|
3356
|
+
if (r === mo()) break;
|
|
3357
|
+
r = xo(r, !1);
|
|
3213
3358
|
}
|
|
3214
3359
|
return !1;
|
|
3215
3360
|
}
|
|
3216
|
-
function
|
|
3361
|
+
function go(e, t, n, r) {
|
|
3217
3362
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
3218
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
3363
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && co(o[a], n.draggable, e, !1)) {
|
|
3219
3364
|
if (i === t) return o[a];
|
|
3220
3365
|
i++;
|
|
3221
3366
|
}
|
|
@@ -3223,96 +3368,96 @@ function qa(e, t, n, r) {
|
|
|
3223
3368
|
}
|
|
3224
3369
|
return null;
|
|
3225
3370
|
}
|
|
3226
|
-
function
|
|
3227
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost ||
|
|
3371
|
+
function _o(e, t) {
|
|
3372
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || V(n, "display") === "none" || t && !oo(n, t));) n = n.previousElementSibling;
|
|
3228
3373
|
return n || null;
|
|
3229
3374
|
}
|
|
3230
|
-
function
|
|
3375
|
+
function vo(e, t) {
|
|
3231
3376
|
var n = 0;
|
|
3232
3377
|
if (!e || !e.parentNode) return -1;
|
|
3233
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
3378
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || oo(e, t)) && n++;
|
|
3234
3379
|
return n;
|
|
3235
3380
|
}
|
|
3236
|
-
function
|
|
3237
|
-
var t = 0, n = 0, r =
|
|
3381
|
+
function yo(e) {
|
|
3382
|
+
var t = 0, n = 0, r = mo();
|
|
3238
3383
|
if (e) do {
|
|
3239
|
-
var i =
|
|
3384
|
+
var i = fo(e), a = i.a, o = i.d;
|
|
3240
3385
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
3241
3386
|
} while (e !== r && (e = e.parentNode));
|
|
3242
3387
|
return [t, n];
|
|
3243
3388
|
}
|
|
3244
|
-
function
|
|
3389
|
+
function bo(e, t) {
|
|
3245
3390
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
3246
3391
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
3247
3392
|
}
|
|
3248
3393
|
return -1;
|
|
3249
3394
|
}
|
|
3250
|
-
function
|
|
3251
|
-
if (!e || !e.getBoundingClientRect) return
|
|
3395
|
+
function xo(e, t) {
|
|
3396
|
+
if (!e || !e.getBoundingClientRect) return mo();
|
|
3252
3397
|
var n = e, r = !1;
|
|
3253
3398
|
do
|
|
3254
3399
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
3255
|
-
var i =
|
|
3400
|
+
var i = V(n);
|
|
3256
3401
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
3257
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
3402
|
+
if (!n.getBoundingClientRect || n === document.body) return mo();
|
|
3258
3403
|
if (r || t) return n;
|
|
3259
3404
|
r = !0;
|
|
3260
3405
|
}
|
|
3261
3406
|
}
|
|
3262
3407
|
while (n = n.parentNode);
|
|
3263
|
-
return
|
|
3408
|
+
return mo();
|
|
3264
3409
|
}
|
|
3265
|
-
function
|
|
3410
|
+
function So(e, t) {
|
|
3266
3411
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
3267
3412
|
return e;
|
|
3268
3413
|
}
|
|
3269
|
-
function
|
|
3414
|
+
function Co(e, t) {
|
|
3270
3415
|
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.height) === Math.round(t.height) && Math.round(e.width) === Math.round(t.width);
|
|
3271
3416
|
}
|
|
3272
|
-
var
|
|
3273
|
-
function
|
|
3417
|
+
var wo;
|
|
3418
|
+
function To(e, t) {
|
|
3274
3419
|
return function() {
|
|
3275
|
-
if (!
|
|
3420
|
+
if (!wo) {
|
|
3276
3421
|
var n = arguments, r = this;
|
|
3277
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
3278
|
-
|
|
3422
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), wo = setTimeout(function() {
|
|
3423
|
+
wo = void 0;
|
|
3279
3424
|
}, t);
|
|
3280
3425
|
}
|
|
3281
3426
|
};
|
|
3282
3427
|
}
|
|
3283
|
-
function
|
|
3284
|
-
clearTimeout(
|
|
3428
|
+
function Eo() {
|
|
3429
|
+
clearTimeout(wo), wo = void 0;
|
|
3285
3430
|
}
|
|
3286
|
-
function
|
|
3431
|
+
function Do(e, t, n) {
|
|
3287
3432
|
e.scrollLeft += t, e.scrollTop += n;
|
|
3288
3433
|
}
|
|
3289
|
-
function
|
|
3434
|
+
function Oo(e) {
|
|
3290
3435
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
3291
3436
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
3292
3437
|
}
|
|
3293
|
-
function
|
|
3438
|
+
function ko(e, t, n) {
|
|
3294
3439
|
var r = {};
|
|
3295
3440
|
return Array.from(e.children).forEach(function(i) {
|
|
3296
|
-
if (
|
|
3297
|
-
var a =
|
|
3441
|
+
if (co(i, t.draggable, e, !1) && !i.animated && i !== n) {
|
|
3442
|
+
var a = H(i);
|
|
3298
3443
|
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);
|
|
3299
3444
|
}
|
|
3300
3445
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
3301
3446
|
}
|
|
3302
|
-
var
|
|
3303
|
-
function
|
|
3447
|
+
var Ao = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
3448
|
+
function jo() {
|
|
3304
3449
|
var e = [], t;
|
|
3305
3450
|
return {
|
|
3306
3451
|
captureAnimationState: function() {
|
|
3307
3452
|
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
3308
|
-
if (
|
|
3453
|
+
if (V(t, "display") !== "none" && t !== Q.ghost) {
|
|
3309
3454
|
e.push({
|
|
3310
3455
|
target: t,
|
|
3311
|
-
rect:
|
|
3456
|
+
rect: H(t)
|
|
3312
3457
|
});
|
|
3313
|
-
var n =
|
|
3458
|
+
var n = Ga({}, e[e.length - 1].rect);
|
|
3314
3459
|
if (t.thisAnimationDuration) {
|
|
3315
|
-
var r =
|
|
3460
|
+
var r = fo(t, !0);
|
|
3316
3461
|
r && (n.top -= r.f, n.left -= r.e);
|
|
3317
3462
|
}
|
|
3318
3463
|
t.fromRect = n;
|
|
@@ -3323,7 +3468,7 @@ function co() {
|
|
|
3323
3468
|
e.push(t);
|
|
3324
3469
|
},
|
|
3325
3470
|
removeAnimationState: function(t) {
|
|
3326
|
-
e.splice(
|
|
3471
|
+
e.splice(bo(e, { target: t }), 1);
|
|
3327
3472
|
},
|
|
3328
3473
|
animateAll: function(n) {
|
|
3329
3474
|
var r = this;
|
|
@@ -3333,8 +3478,8 @@ function co() {
|
|
|
3333
3478
|
}
|
|
3334
3479
|
var i = !1, a = 0;
|
|
3335
3480
|
e.forEach(function(e) {
|
|
3336
|
-
var t = 0, n = e.target, o = n.fromRect, s =
|
|
3337
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
3481
|
+
var t = 0, n = e.target, o = n.fromRect, s = H(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = fo(n, !0);
|
|
3482
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Co(c, s) && !Co(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = No(u, c, l, r.options)), Co(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() {
|
|
3338
3483
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
3339
3484
|
}, t), n.thisAnimationDuration = t);
|
|
3340
3485
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -3343,27 +3488,27 @@ function co() {
|
|
|
3343
3488
|
},
|
|
3344
3489
|
animate: function(e, t, n, r) {
|
|
3345
3490
|
if (r) {
|
|
3346
|
-
|
|
3347
|
-
var i =
|
|
3348
|
-
e.animatingX = !!s, e.animatingY = !!c,
|
|
3349
|
-
|
|
3491
|
+
V(e, "transition", ""), V(e, "transform", "");
|
|
3492
|
+
var i = fo(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
3493
|
+
e.animatingX = !!s, e.animatingY = !!c, V(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Mo(e), V(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), V(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
3494
|
+
V(e, "transition", ""), V(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
3350
3495
|
}, r);
|
|
3351
3496
|
}
|
|
3352
3497
|
}
|
|
3353
3498
|
};
|
|
3354
3499
|
}
|
|
3355
|
-
function
|
|
3500
|
+
function Mo(e) {
|
|
3356
3501
|
return e.offsetWidth;
|
|
3357
3502
|
}
|
|
3358
|
-
function
|
|
3503
|
+
function No(e, t, n, r) {
|
|
3359
3504
|
return Math.sqrt((t.top - e.top) ** 2 + (t.left - e.left) ** 2) / Math.sqrt((t.top - n.top) ** 2 + (t.left - n.left) ** 2) * r.animation;
|
|
3360
3505
|
}
|
|
3361
|
-
var
|
|
3506
|
+
var Po = [], Fo = { initializeByDefault: !0 }, Io = {
|
|
3362
3507
|
mount: function(e) {
|
|
3363
|
-
for (var t in
|
|
3364
|
-
|
|
3508
|
+
for (var t in Fo) Fo.hasOwnProperty(t) && !(t in e) && (e[t] = Fo[t]);
|
|
3509
|
+
Po.forEach(function(t) {
|
|
3365
3510
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
3366
|
-
}),
|
|
3511
|
+
}), Po.push(e);
|
|
3367
3512
|
},
|
|
3368
3513
|
pluginEvent: function(e, t, n) {
|
|
3369
3514
|
var r = this;
|
|
@@ -3371,16 +3516,16 @@ var fo = [], po = { initializeByDefault: !0 }, mo = {
|
|
|
3371
3516
|
r.eventCanceled = !0;
|
|
3372
3517
|
};
|
|
3373
3518
|
var i = e + "Global";
|
|
3374
|
-
|
|
3375
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
3519
|
+
Po.forEach(function(r) {
|
|
3520
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Ga({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Ga({ sortable: t }, n)));
|
|
3376
3521
|
});
|
|
3377
3522
|
},
|
|
3378
3523
|
initializePlugins: function(e, t, n, r) {
|
|
3379
|
-
for (var i in
|
|
3524
|
+
for (var i in Po.forEach(function(r) {
|
|
3380
3525
|
var i = r.pluginName;
|
|
3381
|
-
if (
|
|
3526
|
+
if (e.options[i] || r.initializeByDefault) {
|
|
3382
3527
|
var a = new r(e, t, e.options);
|
|
3383
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
3528
|
+
a.sortable = e, a.options = e.options, e[i] = a, Ja(n, a.defaults);
|
|
3384
3529
|
}
|
|
3385
3530
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
3386
3531
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -3389,59 +3534,59 @@ var fo = [], po = { initializeByDefault: !0 }, mo = {
|
|
|
3389
3534
|
},
|
|
3390
3535
|
getEventProperties: function(e, t) {
|
|
3391
3536
|
var n = {};
|
|
3392
|
-
return
|
|
3393
|
-
typeof r.eventProperties == "function" &&
|
|
3537
|
+
return Po.forEach(function(r) {
|
|
3538
|
+
typeof r.eventProperties == "function" && Ja(n, r.eventProperties.call(t[r.pluginName], e));
|
|
3394
3539
|
}), n;
|
|
3395
3540
|
},
|
|
3396
3541
|
modifyOption: function(e, t, n) {
|
|
3397
3542
|
var r;
|
|
3398
|
-
return
|
|
3543
|
+
return Po.forEach(function(i) {
|
|
3399
3544
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
3400
3545
|
}), r;
|
|
3401
3546
|
}
|
|
3402
3547
|
};
|
|
3403
|
-
function
|
|
3548
|
+
function Lo(e) {
|
|
3404
3549
|
var t = e.sortable, n = e.rootEl, r = e.name, i = e.targetEl, a = e.cloneEl, o = e.toEl, s = e.fromEl, c = e.oldIndex, l = e.newIndex, u = e.oldDraggableIndex, d = e.newDraggableIndex, f = e.originalEvent, p = e.putSortable, m = e.extraEventProperties;
|
|
3405
|
-
if (t ||= n && n[
|
|
3550
|
+
if (t ||= n && n[Ao], t) {
|
|
3406
3551
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
3407
|
-
window.CustomEvent &&
|
|
3552
|
+
window.CustomEvent && !$a && !eo ? h = new CustomEvent(r, {
|
|
3408
3553
|
bubbles: !0,
|
|
3409
3554
|
cancelable: !0
|
|
3410
3555
|
}) : (h = document.createEvent("Event"), h.initEvent(r, !0, !0)), h.to = o || n, h.from = s || n, h.item = i || n, h.clone = a, h.oldIndex = c, h.newIndex = l, h.oldDraggableIndex = u, h.newDraggableIndex = d, h.originalEvent = f, h.pullMode = p ? p.lastPutMode : void 0;
|
|
3411
|
-
var v =
|
|
3556
|
+
var v = Ga(Ga({}, m), Io.getEventProperties(r, t));
|
|
3412
3557
|
for (var y in v) h[y] = v[y];
|
|
3413
3558
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
3414
3559
|
}
|
|
3415
3560
|
}
|
|
3416
|
-
var
|
|
3417
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
3418
|
-
|
|
3419
|
-
dragEl:
|
|
3420
|
-
parentEl:
|
|
3421
|
-
ghostEl:
|
|
3422
|
-
rootEl:
|
|
3423
|
-
nextEl:
|
|
3424
|
-
lastDownEl:
|
|
3425
|
-
cloneEl:
|
|
3426
|
-
cloneHidden:
|
|
3427
|
-
dragStarted:
|
|
3561
|
+
var Ro = ["evt"], U = function(e, t) {
|
|
3562
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Xa(n, Ro);
|
|
3563
|
+
Io.pluginEvent.bind(Q)(e, t, Ga({
|
|
3564
|
+
dragEl: G,
|
|
3565
|
+
parentEl: K,
|
|
3566
|
+
ghostEl: q,
|
|
3567
|
+
rootEl: J,
|
|
3568
|
+
nextEl: zo,
|
|
3569
|
+
lastDownEl: Bo,
|
|
3570
|
+
cloneEl: Y,
|
|
3571
|
+
cloneHidden: Vo,
|
|
3572
|
+
dragStarted: ns,
|
|
3428
3573
|
putSortable: X,
|
|
3429
3574
|
activeSortable: Q.active,
|
|
3430
3575
|
originalEvent: r,
|
|
3431
|
-
oldIndex:
|
|
3432
|
-
oldDraggableIndex:
|
|
3433
|
-
newIndex:
|
|
3434
|
-
newDraggableIndex:
|
|
3435
|
-
hideGhostForTarget:
|
|
3436
|
-
unhideGhostForTarget:
|
|
3576
|
+
oldIndex: Ho,
|
|
3577
|
+
oldDraggableIndex: Wo,
|
|
3578
|
+
newIndex: Uo,
|
|
3579
|
+
newDraggableIndex: Go,
|
|
3580
|
+
hideGhostForTarget: bs,
|
|
3581
|
+
unhideGhostForTarget: xs,
|
|
3437
3582
|
cloneNowHidden: function() {
|
|
3438
|
-
|
|
3583
|
+
Vo = !0;
|
|
3439
3584
|
},
|
|
3440
3585
|
cloneNowShown: function() {
|
|
3441
|
-
|
|
3586
|
+
Vo = !1;
|
|
3442
3587
|
},
|
|
3443
3588
|
dispatchSortableEvent: function(e) {
|
|
3444
|
-
|
|
3589
|
+
W({
|
|
3445
3590
|
sortable: t,
|
|
3446
3591
|
name: e,
|
|
3447
3592
|
originalEvent: r
|
|
@@ -3449,46 +3594,46 @@ var go = ["evt"], H = function(e, t) {
|
|
|
3449
3594
|
}
|
|
3450
3595
|
}, i));
|
|
3451
3596
|
};
|
|
3452
|
-
function
|
|
3453
|
-
|
|
3597
|
+
function W(e) {
|
|
3598
|
+
Lo(Ga({
|
|
3454
3599
|
putSortable: X,
|
|
3455
|
-
cloneEl:
|
|
3456
|
-
targetEl:
|
|
3457
|
-
rootEl:
|
|
3458
|
-
oldIndex:
|
|
3459
|
-
oldDraggableIndex:
|
|
3460
|
-
newIndex:
|
|
3461
|
-
newDraggableIndex:
|
|
3600
|
+
cloneEl: Y,
|
|
3601
|
+
targetEl: G,
|
|
3602
|
+
rootEl: J,
|
|
3603
|
+
oldIndex: Ho,
|
|
3604
|
+
oldDraggableIndex: Wo,
|
|
3605
|
+
newIndex: Uo,
|
|
3606
|
+
newDraggableIndex: Go
|
|
3462
3607
|
}, e));
|
|
3463
3608
|
}
|
|
3464
|
-
var
|
|
3465
|
-
if (
|
|
3466
|
-
if (
|
|
3609
|
+
var G, K, q, J, zo, Bo, Y, Vo, Ho, Uo, Wo, Go, Ko, X, qo = !1, Jo = !1, Yo = [], Xo, Zo, Qo, $o, es, ts, ns, rs, is, as = !1, os = !1, ss, Z, cs = [], ls = !1, us = [], ds = typeof document < "u", fs = ro, ps = eo || $a ? "cssFloat" : "float", ms = ds && !io && !ro && "draggable" in document.createElement("div"), hs = function() {
|
|
3610
|
+
if (ds) {
|
|
3611
|
+
if ($a) return !1;
|
|
3467
3612
|
var e = document.createElement("x");
|
|
3468
3613
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
3469
3614
|
}
|
|
3470
|
-
}(),
|
|
3471
|
-
var n =
|
|
3615
|
+
}(), gs = function(e, t) {
|
|
3616
|
+
var n = V(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = go(e, 0, t), a = go(e, 1, t), o = i && V(i), s = a && V(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + H(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + H(a).width;
|
|
3472
3617
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
3473
3618
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
3474
3619
|
if (i && o.float && o.float !== "none") {
|
|
3475
3620
|
var u = o.float === "left" ? "left" : "right";
|
|
3476
3621
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
3477
3622
|
}
|
|
3478
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
3479
|
-
},
|
|
3623
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[ps] === "none" || a && n[ps] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
3624
|
+
}, _s = function(e, t, n) {
|
|
3480
3625
|
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;
|
|
3481
3626
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
3482
|
-
},
|
|
3627
|
+
}, vs = function(e, t) {
|
|
3483
3628
|
var n;
|
|
3484
|
-
return
|
|
3485
|
-
var i = r[
|
|
3486
|
-
if (
|
|
3487
|
-
var a =
|
|
3629
|
+
return Yo.some(function(r) {
|
|
3630
|
+
var i = r[Ao].options.emptyInsertThreshold;
|
|
3631
|
+
if (i && !_o(r)) {
|
|
3632
|
+
var a = H(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
3488
3633
|
if (o && s) return n = r;
|
|
3489
3634
|
}
|
|
3490
3635
|
}), n;
|
|
3491
|
-
},
|
|
3636
|
+
}, ys = function(e) {
|
|
3492
3637
|
function t(e, n) {
|
|
3493
3638
|
return function(r, i, a, o) {
|
|
3494
3639
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -3501,31 +3646,31 @@ var W, G, K, q, _o, vo, J, yo, bo, Y, xo, So, Co, X, wo = !1, To = !1, Eo = [],
|
|
|
3501
3646
|
};
|
|
3502
3647
|
}
|
|
3503
3648
|
var n = {}, r = e.group;
|
|
3504
|
-
(!r ||
|
|
3505
|
-
},
|
|
3506
|
-
!
|
|
3507
|
-
},
|
|
3508
|
-
!
|
|
3649
|
+
(!r || Ka(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;
|
|
3650
|
+
}, bs = function() {
|
|
3651
|
+
!hs && q && V(q, "display", "none");
|
|
3652
|
+
}, xs = function() {
|
|
3653
|
+
!hs && q && V(q, "display", "");
|
|
3509
3654
|
};
|
|
3510
|
-
|
|
3511
|
-
if (
|
|
3655
|
+
ds && !io && document.addEventListener("click", function(e) {
|
|
3656
|
+
if (Jo) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Jo = !1, !1;
|
|
3512
3657
|
}, !0);
|
|
3513
|
-
var
|
|
3514
|
-
if (
|
|
3658
|
+
var Ss = function(e) {
|
|
3659
|
+
if (G) {
|
|
3515
3660
|
e = e.touches ? e.touches[0] : e;
|
|
3516
|
-
var t =
|
|
3661
|
+
var t = vs(e.clientX, e.clientY);
|
|
3517
3662
|
if (t) {
|
|
3518
3663
|
var n = {};
|
|
3519
3664
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
3520
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
3665
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[Ao]._onDragOver(n);
|
|
3521
3666
|
}
|
|
3522
3667
|
}
|
|
3523
|
-
},
|
|
3524
|
-
|
|
3668
|
+
}, Cs = function(e) {
|
|
3669
|
+
G && G.parentNode[Ao]._isOutsideThisEl(e.target);
|
|
3525
3670
|
};
|
|
3526
3671
|
function Q(e, t) {
|
|
3527
3672
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
3528
|
-
this.el = e, this.options = t =
|
|
3673
|
+
this.el = e, this.options = t = Ja({}, t), e[Ao] = this;
|
|
3529
3674
|
var n = {
|
|
3530
3675
|
group: null,
|
|
3531
3676
|
sort: !0,
|
|
@@ -3538,7 +3683,7 @@ function Q(e, t) {
|
|
|
3538
3683
|
invertedSwapThreshold: null,
|
|
3539
3684
|
removeCloneOnHide: !0,
|
|
3540
3685
|
direction: function() {
|
|
3541
|
-
return
|
|
3686
|
+
return gs(e, this.options);
|
|
3542
3687
|
},
|
|
3543
3688
|
ghostClass: "sortable-ghost",
|
|
3544
3689
|
chosenClass: "sortable-chosen",
|
|
@@ -3565,80 +3710,80 @@ function Q(e, t) {
|
|
|
3565
3710
|
x: 0,
|
|
3566
3711
|
y: 0
|
|
3567
3712
|
},
|
|
3568
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
3713
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !no,
|
|
3569
3714
|
emptyInsertThreshold: 5
|
|
3570
3715
|
};
|
|
3571
|
-
for (var r in
|
|
3572
|
-
for (var i in
|
|
3573
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
3716
|
+
for (var r in Io.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
3717
|
+
for (var i in ys(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
3718
|
+
this.nativeDraggable = !t.forceFallback && ms, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? z(e, "pointerdown", this._onTapStart) : (z(e, "mousedown", this._onTapStart), z(e, "touchstart", this._onTapStart)), this.nativeDraggable && (z(e, "dragover", this), z(e, "dragenter", this)), Yo.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Ja(this, jo());
|
|
3574
3719
|
}
|
|
3575
3720
|
Q.prototype = {
|
|
3576
3721
|
constructor: Q,
|
|
3577
3722
|
_isOutsideThisEl: function(e) {
|
|
3578
|
-
!this.el.contains(e) && e !== this.el && (
|
|
3723
|
+
!this.el.contains(e) && e !== this.el && (rs = null);
|
|
3579
3724
|
},
|
|
3580
3725
|
_getDirection: function(e, t) {
|
|
3581
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t,
|
|
3726
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, G) : this.options.direction;
|
|
3582
3727
|
},
|
|
3583
3728
|
_onTapStart: function(e) {
|
|
3584
3729
|
if (e.cancelable) {
|
|
3585
3730
|
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;
|
|
3586
|
-
if (
|
|
3587
|
-
if (
|
|
3731
|
+
if (Ns(n), !G && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && no && s && s.tagName.toUpperCase() === "SELECT") && (s = co(s, r.draggable, n, !1), !(s && s.animated) && Bo !== s)) {
|
|
3732
|
+
if (Ho = vo(s), Wo = vo(s, r.draggable), typeof l == "function") {
|
|
3588
3733
|
if (l.call(this, e, s, this)) {
|
|
3589
|
-
|
|
3734
|
+
W({
|
|
3590
3735
|
sortable: t,
|
|
3591
3736
|
rootEl: c,
|
|
3592
3737
|
name: "filter",
|
|
3593
3738
|
targetEl: s,
|
|
3594
3739
|
toEl: n,
|
|
3595
3740
|
fromEl: n
|
|
3596
|
-
}),
|
|
3741
|
+
}), U("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
3597
3742
|
return;
|
|
3598
3743
|
}
|
|
3599
3744
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
3600
|
-
if (r =
|
|
3745
|
+
if (r = co(c, r.trim(), n, !1), r) return W({
|
|
3601
3746
|
sortable: t,
|
|
3602
3747
|
rootEl: r,
|
|
3603
3748
|
name: "filter",
|
|
3604
3749
|
targetEl: s,
|
|
3605
3750
|
fromEl: n,
|
|
3606
3751
|
toEl: n
|
|
3607
|
-
}),
|
|
3752
|
+
}), U("filter", t, { evt: e }), !0;
|
|
3608
3753
|
}), l)) {
|
|
3609
3754
|
i && e.cancelable && e.preventDefault();
|
|
3610
3755
|
return;
|
|
3611
3756
|
}
|
|
3612
|
-
r.handle && !
|
|
3757
|
+
r.handle && !co(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
3613
3758
|
}
|
|
3614
3759
|
}
|
|
3615
3760
|
},
|
|
3616
3761
|
_prepareDragStart: function(e, t, n) {
|
|
3617
3762
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
3618
|
-
if (n && !
|
|
3619
|
-
var c =
|
|
3620
|
-
if (
|
|
3621
|
-
target:
|
|
3763
|
+
if (n && !G && n.parentNode === i) {
|
|
3764
|
+
var c = H(n);
|
|
3765
|
+
if (J = i, G = n, K = G.parentNode, zo = G.nextSibling, Bo = n, Ko = a.group, Q.dragged = G, Xo = {
|
|
3766
|
+
target: G,
|
|
3622
3767
|
clientX: (t || e).clientX,
|
|
3623
3768
|
clientY: (t || e).clientY
|
|
3624
|
-
},
|
|
3625
|
-
if (
|
|
3769
|
+
}, es = Xo.clientX - c.left, ts = Xo.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, G.style["will-change"] = "all", s = function() {
|
|
3770
|
+
if (U("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
3626
3771
|
r._onDrop();
|
|
3627
3772
|
return;
|
|
3628
3773
|
}
|
|
3629
|
-
r._disableDelayedDragEvents(), !
|
|
3774
|
+
r._disableDelayedDragEvents(), !to && r.nativeDraggable && (G.draggable = !0), r._triggerDragStart(e, t), W({
|
|
3630
3775
|
sortable: r,
|
|
3631
3776
|
name: "choose",
|
|
3632
3777
|
originalEvent: e
|
|
3633
|
-
}),
|
|
3778
|
+
}), uo(G, a.chosenClass, !0);
|
|
3634
3779
|
}, a.ignore.split(",").forEach(function(e) {
|
|
3635
|
-
|
|
3636
|
-
}),
|
|
3780
|
+
po(G, e.trim(), Es);
|
|
3781
|
+
}), z(o, "dragover", Ss), z(o, "mousemove", Ss), z(o, "touchmove", Ss), z(o, "mouseup", r._onDrop), z(o, "touchend", r._onDrop), z(o, "touchcancel", r._onDrop), to && this.nativeDraggable && (this.options.touchStartThreshold = 4, G.draggable = !0), U("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(eo || $a))) {
|
|
3637
3782
|
if (Q.eventCanceled) {
|
|
3638
3783
|
this._onDrop();
|
|
3639
3784
|
return;
|
|
3640
3785
|
}
|
|
3641
|
-
|
|
3786
|
+
z(o, "mouseup", r._disableDelayedDrag), z(o, "touchend", r._disableDelayedDrag), z(o, "touchcancel", r._disableDelayedDrag), z(o, "mousemove", r._delayedDragTouchMoveHandler), z(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && z(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
3642
3787
|
} else s();
|
|
3643
3788
|
}
|
|
3644
3789
|
},
|
|
@@ -3647,25 +3792,25 @@ Q.prototype = {
|
|
|
3647
3792
|
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();
|
|
3648
3793
|
},
|
|
3649
3794
|
_disableDelayedDrag: function() {
|
|
3650
|
-
|
|
3795
|
+
G && Es(G), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3651
3796
|
},
|
|
3652
3797
|
_disableDelayedDragEvents: function() {
|
|
3653
3798
|
var e = this.el.ownerDocument;
|
|
3654
|
-
|
|
3799
|
+
B(e, "mouseup", this._disableDelayedDrag), B(e, "touchend", this._disableDelayedDrag), B(e, "touchcancel", this._disableDelayedDrag), B(e, "mousemove", this._delayedDragTouchMoveHandler), B(e, "touchmove", this._delayedDragTouchMoveHandler), B(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
3655
3800
|
},
|
|
3656
3801
|
_triggerDragStart: function(e, t) {
|
|
3657
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ?
|
|
3802
|
+
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? z(document, "pointermove", this._onTouchMove) : t ? z(document, "touchmove", this._onTouchMove) : z(document, "mousemove", this._onTouchMove) : (z(G, "dragend", this), z(J, "dragstart", this._onDragStart));
|
|
3658
3803
|
try {
|
|
3659
|
-
document.selection ?
|
|
3804
|
+
document.selection ? Ps(function() {
|
|
3660
3805
|
document.selection.empty();
|
|
3661
3806
|
}) : window.getSelection().removeAllRanges();
|
|
3662
3807
|
} catch {}
|
|
3663
3808
|
},
|
|
3664
3809
|
_dragStarted: function(e, t) {
|
|
3665
|
-
if (
|
|
3666
|
-
|
|
3810
|
+
if (qo = !1, J && G) {
|
|
3811
|
+
U("dragStarted", this, { evt: t }), this.nativeDraggable && z(document, "dragover", Cs);
|
|
3667
3812
|
var n = this.options;
|
|
3668
|
-
!e &&
|
|
3813
|
+
!e && uo(G, n.dragClass, !1), uo(G, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), W({
|
|
3669
3814
|
sortable: this,
|
|
3670
3815
|
name: "start",
|
|
3671
3816
|
originalEvent: t
|
|
@@ -3673,33 +3818,33 @@ Q.prototype = {
|
|
|
3673
3818
|
} else this._nulling();
|
|
3674
3819
|
},
|
|
3675
3820
|
_emulateDragOver: function() {
|
|
3676
|
-
if (
|
|
3677
|
-
this._lastX =
|
|
3678
|
-
for (var e = document.elementFromPoint(
|
|
3679
|
-
if (
|
|
3680
|
-
if (t[
|
|
3821
|
+
if (Zo) {
|
|
3822
|
+
this._lastX = Zo.clientX, this._lastY = Zo.clientY, bs();
|
|
3823
|
+
for (var e = document.elementFromPoint(Zo.clientX, Zo.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Zo.clientX, Zo.clientY), e !== t);) t = e;
|
|
3824
|
+
if (G.parentNode[Ao]._isOutsideThisEl(e), t) do {
|
|
3825
|
+
if (t[Ao]) {
|
|
3681
3826
|
var n = void 0;
|
|
3682
|
-
if (n = t[
|
|
3683
|
-
clientX:
|
|
3684
|
-
clientY:
|
|
3827
|
+
if (n = t[Ao]._onDragOver({
|
|
3828
|
+
clientX: Zo.clientX,
|
|
3829
|
+
clientY: Zo.clientY,
|
|
3685
3830
|
target: e,
|
|
3686
3831
|
rootEl: t
|
|
3687
3832
|
}), n && !this.options.dragoverBubble) break;
|
|
3688
3833
|
}
|
|
3689
3834
|
e = t;
|
|
3690
3835
|
} while (t = t.parentNode);
|
|
3691
|
-
|
|
3836
|
+
xs();
|
|
3692
3837
|
}
|
|
3693
3838
|
},
|
|
3694
3839
|
_onTouchMove: function(e) {
|
|
3695
|
-
if (
|
|
3696
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a =
|
|
3697
|
-
if (!Q.active && !
|
|
3840
|
+
if (Xo) {
|
|
3841
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q && fo(q, !0), o = q && a && a.a, s = q && a && a.d, c = fs && Z && yo(Z), l = (i.clientX - Xo.clientX + r.x) / (o || 1) + (c ? c[0] - cs[0] : 0) / (o || 1), u = (i.clientY - Xo.clientY + r.y) / (s || 1) + (c ? c[1] - cs[1] : 0) / (s || 1);
|
|
3842
|
+
if (!Q.active && !qo) {
|
|
3698
3843
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3699
3844
|
this._onDragStart(e, !0);
|
|
3700
3845
|
}
|
|
3701
|
-
if (
|
|
3702
|
-
a ? (a.e += l - (
|
|
3846
|
+
if (q) {
|
|
3847
|
+
a ? (a.e += l - (Qo || 0), a.f += u - ($o || 0)) : a = {
|
|
3703
3848
|
a: 1,
|
|
3704
3849
|
b: 0,
|
|
3705
3850
|
c: 0,
|
|
@@ -3708,39 +3853,39 @@ Q.prototype = {
|
|
|
3708
3853
|
f: u
|
|
3709
3854
|
};
|
|
3710
3855
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3711
|
-
|
|
3856
|
+
V(q, "webkitTransform", d), V(q, "mozTransform", d), V(q, "msTransform", d), V(q, "transform", d), Qo = l, $o = u, Zo = i;
|
|
3712
3857
|
}
|
|
3713
3858
|
e.cancelable && e.preventDefault();
|
|
3714
3859
|
}
|
|
3715
3860
|
},
|
|
3716
3861
|
_appendGhost: function() {
|
|
3717
|
-
if (!
|
|
3718
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
3719
|
-
if (
|
|
3720
|
-
for (Z = e;
|
|
3721
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
3862
|
+
if (!q) {
|
|
3863
|
+
var e = this.options.fallbackOnBody ? document.body : J, t = H(G, !0, fs, !0, e), n = this.options;
|
|
3864
|
+
if (fs) {
|
|
3865
|
+
for (Z = e; V(Z, "position") === "static" && V(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
3866
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = mo()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = mo(), cs = yo(Z);
|
|
3722
3867
|
}
|
|
3723
|
-
|
|
3868
|
+
q = G.cloneNode(!0), uo(q, n.ghostClass, !1), uo(q, n.fallbackClass, !0), uo(q, n.dragClass, !0), V(q, "transition", ""), V(q, "transform", ""), V(q, "box-sizing", "border-box"), V(q, "margin", 0), V(q, "top", t.top), V(q, "left", t.left), V(q, "width", t.width), V(q, "height", t.height), V(q, "opacity", "0.8"), V(q, "position", fs ? "absolute" : "fixed"), V(q, "zIndex", "100000"), V(q, "pointerEvents", "none"), Q.ghost = q, e.appendChild(q), V(q, "transform-origin", es / parseInt(q.style.width) * 100 + "% " + ts / parseInt(q.style.height) * 100 + "%");
|
|
3724
3869
|
}
|
|
3725
3870
|
},
|
|
3726
3871
|
_onDragStart: function(e, t) {
|
|
3727
3872
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
3728
|
-
if (
|
|
3873
|
+
if (U("dragStart", this, { evt: e }), Q.eventCanceled) {
|
|
3729
3874
|
this._onDrop();
|
|
3730
3875
|
return;
|
|
3731
3876
|
}
|
|
3732
|
-
|
|
3733
|
-
|
|
3877
|
+
U("setupClone", this), Q.eventCanceled || (Y = Oo(G), Y.removeAttribute("id"), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), uo(Y, this.options.chosenClass, !1), Q.clone = Y), n.cloneId = Ps(function() {
|
|
3878
|
+
U("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || J.insertBefore(Y, G), n._hideClone(), W({
|
|
3734
3879
|
sortable: n,
|
|
3735
3880
|
name: "clone"
|
|
3736
3881
|
}));
|
|
3737
|
-
}), !t &&
|
|
3882
|
+
}), !t && uo(G, i.dragClass, !0), t ? (Jo = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (B(document, "mouseup", n._onDrop), B(document, "touchend", n._onDrop), B(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, G)), z(document, "drop", n), V(G, "transform", "translateZ(0)")), qo = !0, n._dragStartId = Ps(n._dragStarted.bind(n, t, e)), z(document, "selectstart", n), ns = !0, no && V(document.body, "user-select", "none");
|
|
3738
3883
|
},
|
|
3739
3884
|
_onDragOver: function(e) {
|
|
3740
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
3741
|
-
if (
|
|
3885
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Ko === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
3886
|
+
if (ls) return;
|
|
3742
3887
|
function h(o, s) {
|
|
3743
|
-
|
|
3888
|
+
U(o, p, Ga({
|
|
3744
3889
|
evt: e,
|
|
3745
3890
|
isOwner: l,
|
|
3746
3891
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3752,7 +3897,7 @@ Q.prototype = {
|
|
|
3752
3897
|
target: n,
|
|
3753
3898
|
completed: _,
|
|
3754
3899
|
onMove: function(n, i) {
|
|
3755
|
-
return
|
|
3900
|
+
return Ts(J, t, G, r, n, H(n), e, i);
|
|
3756
3901
|
},
|
|
3757
3902
|
changed: v
|
|
3758
3903
|
}, s));
|
|
@@ -3761,119 +3906,119 @@ Q.prototype = {
|
|
|
3761
3906
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
3762
3907
|
}
|
|
3763
3908
|
function _(r) {
|
|
3764
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (
|
|
3909
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (uo(G, X ? X.options.ghostClass : c.options.ghostClass, !1), uo(G, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
3765
3910
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3766
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n ===
|
|
3911
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (rs = null), !o.dragoverBubble && !e.rootEl && n !== document && (G.parentNode[Ao]._isOutsideThisEl(e.target), !r && Ss(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3767
3912
|
}
|
|
3768
3913
|
function v() {
|
|
3769
|
-
|
|
3914
|
+
Uo = vo(G), Go = vo(G, o.draggable), W({
|
|
3770
3915
|
sortable: p,
|
|
3771
3916
|
name: "change",
|
|
3772
3917
|
toEl: t,
|
|
3773
|
-
newIndex:
|
|
3774
|
-
newDraggableIndex:
|
|
3918
|
+
newIndex: Uo,
|
|
3919
|
+
newDraggableIndex: Go,
|
|
3775
3920
|
originalEvent: e
|
|
3776
3921
|
});
|
|
3777
3922
|
}
|
|
3778
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
3779
|
-
if (
|
|
3780
|
-
if (
|
|
3781
|
-
if (f = this._getDirection(e, n) === "vertical", r =
|
|
3782
|
-
if (a) return
|
|
3783
|
-
var y =
|
|
3784
|
-
if (!y ||
|
|
3785
|
-
if (y ===
|
|
3786
|
-
if (y && t === e.target && (n = y), n && (i =
|
|
3787
|
-
} else if (y &&
|
|
3788
|
-
var b =
|
|
3789
|
-
if (b ===
|
|
3790
|
-
if (n = b, i =
|
|
3923
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = co(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3924
|
+
if (G.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3925
|
+
if (Jo = !1, c && !o.disabled && (l ? u || (a = K !== J) : X === this || (this.lastPutMode = Ko.checkPull(this, c, G, e)) && s.checkPut(this, c, G, e))) {
|
|
3926
|
+
if (f = this._getDirection(e, n) === "vertical", r = H(G), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3927
|
+
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (zo ? J.insertBefore(G, zo) : J.appendChild(G)), _(!0);
|
|
3928
|
+
var y = _o(t, o.draggable);
|
|
3929
|
+
if (!y || ks(e, f, this) && !y.animated) {
|
|
3930
|
+
if (y === G) return _(!1);
|
|
3931
|
+
if (y && t === e.target && (n = y), n && (i = H(n)), Ts(J, t, G, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(G, y.nextSibling) : t.appendChild(G), K = t, v(), _(!0);
|
|
3932
|
+
} else if (y && Os(e, f, this)) {
|
|
3933
|
+
var b = go(t, 0, o, !0);
|
|
3934
|
+
if (b === G) return _(!1);
|
|
3935
|
+
if (n = b, i = H(n), Ts(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
|
|
3791
3936
|
} else if (n.parentNode === t) {
|
|
3792
|
-
i =
|
|
3793
|
-
var x = 0, S, C =
|
|
3794
|
-
|
|
3937
|
+
i = H(n);
|
|
3938
|
+
var x = 0, S, C = G.parentNode !== t, w = !_s(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = ho(n, "top", "top") || ho(G, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
3939
|
+
rs !== n && (S = i[T], as = !1, os = !w && o.invertSwap || C), x = As(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, os, rs === n);
|
|
3795
3940
|
var O;
|
|
3796
3941
|
if (x !== 0) {
|
|
3797
|
-
var k =
|
|
3942
|
+
var k = vo(G);
|
|
3798
3943
|
do
|
|
3799
|
-
k -= x, O =
|
|
3800
|
-
while (O && (
|
|
3944
|
+
k -= x, O = K.children[k];
|
|
3945
|
+
while (O && (V(O, "display") === "none" || O === q));
|
|
3801
3946
|
}
|
|
3802
3947
|
if (x === 0 || O === n) return _(!1);
|
|
3803
|
-
|
|
3804
|
-
var A = n.nextElementSibling,
|
|
3805
|
-
|
|
3806
|
-
var
|
|
3807
|
-
if (
|
|
3948
|
+
rs = n, is = x;
|
|
3949
|
+
var A = n.nextElementSibling, j = !1;
|
|
3950
|
+
j = x === 1;
|
|
3951
|
+
var M = Ts(J, t, G, r, n, i, e, j);
|
|
3952
|
+
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1), ls = !0, setTimeout(Ds, 30), g(), j && !A ? t.appendChild(G) : n.parentNode.insertBefore(G, j ? A : n), E && Do(E, 0, D - E.scrollTop), K = G.parentNode, S !== void 0 && !os && (ss = Math.abs(S - H(n)[T])), v(), _(!0);
|
|
3808
3953
|
}
|
|
3809
|
-
if (t.contains(
|
|
3954
|
+
if (t.contains(G)) return _(!1);
|
|
3810
3955
|
}
|
|
3811
3956
|
return !1;
|
|
3812
3957
|
},
|
|
3813
3958
|
_ignoreWhileAnimating: null,
|
|
3814
3959
|
_offMoveEvents: function() {
|
|
3815
|
-
|
|
3960
|
+
B(document, "mousemove", this._onTouchMove), B(document, "touchmove", this._onTouchMove), B(document, "pointermove", this._onTouchMove), B(document, "dragover", Ss), B(document, "mousemove", Ss), B(document, "touchmove", Ss);
|
|
3816
3961
|
},
|
|
3817
3962
|
_offUpEvents: function() {
|
|
3818
3963
|
var e = this.el.ownerDocument;
|
|
3819
|
-
|
|
3964
|
+
B(e, "mouseup", this._onDrop), B(e, "touchend", this._onDrop), B(e, "pointerup", this._onDrop), B(e, "touchcancel", this._onDrop), B(document, "selectstart", this);
|
|
3820
3965
|
},
|
|
3821
3966
|
_onDrop: function(e) {
|
|
3822
3967
|
var t = this.el, n = this.options;
|
|
3823
|
-
if (
|
|
3968
|
+
if (Uo = vo(G), Go = vo(G, n.draggable), U("drop", this, { evt: e }), K = G && G.parentNode, Uo = vo(G), Go = vo(G, n.draggable), Q.eventCanceled) {
|
|
3824
3969
|
this._nulling();
|
|
3825
3970
|
return;
|
|
3826
3971
|
}
|
|
3827
|
-
|
|
3972
|
+
qo = !1, os = !1, as = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Fs(this.cloneId), Fs(this._dragStartId), this.nativeDraggable && (B(document, "drop", this), B(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), no && V(document.body, "user-select", ""), V(G, "transform", ""), e && (ns && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), q && q.parentNode && q.parentNode.removeChild(q), (J === K || X && X.lastPutMode !== "clone") && Y && Y.parentNode && Y.parentNode.removeChild(Y), G && (this.nativeDraggable && B(G, "dragend", this), Es(G), G.style["will-change"] = "", ns && !qo && uo(G, X ? X.options.ghostClass : this.options.ghostClass, !1), uo(G, this.options.chosenClass, !1), W({
|
|
3828
3973
|
sortable: this,
|
|
3829
3974
|
name: "unchoose",
|
|
3830
|
-
toEl:
|
|
3975
|
+
toEl: K,
|
|
3831
3976
|
newIndex: null,
|
|
3832
3977
|
newDraggableIndex: null,
|
|
3833
3978
|
originalEvent: e
|
|
3834
|
-
}),
|
|
3979
|
+
}), J === K ? Uo !== Ho && Uo >= 0 && (W({
|
|
3835
3980
|
sortable: this,
|
|
3836
3981
|
name: "update",
|
|
3837
|
-
toEl:
|
|
3982
|
+
toEl: K,
|
|
3838
3983
|
originalEvent: e
|
|
3839
|
-
}),
|
|
3984
|
+
}), W({
|
|
3840
3985
|
sortable: this,
|
|
3841
3986
|
name: "sort",
|
|
3842
|
-
toEl:
|
|
3987
|
+
toEl: K,
|
|
3843
3988
|
originalEvent: e
|
|
3844
|
-
})) : (
|
|
3845
|
-
rootEl:
|
|
3989
|
+
})) : (Uo >= 0 && (W({
|
|
3990
|
+
rootEl: K,
|
|
3846
3991
|
name: "add",
|
|
3847
|
-
toEl:
|
|
3848
|
-
fromEl:
|
|
3992
|
+
toEl: K,
|
|
3993
|
+
fromEl: J,
|
|
3849
3994
|
originalEvent: e
|
|
3850
|
-
}),
|
|
3995
|
+
}), W({
|
|
3851
3996
|
sortable: this,
|
|
3852
3997
|
name: "remove",
|
|
3853
|
-
toEl:
|
|
3998
|
+
toEl: K,
|
|
3854
3999
|
originalEvent: e
|
|
3855
|
-
}),
|
|
3856
|
-
rootEl:
|
|
4000
|
+
}), W({
|
|
4001
|
+
rootEl: K,
|
|
3857
4002
|
name: "sort",
|
|
3858
|
-
toEl:
|
|
3859
|
-
fromEl:
|
|
4003
|
+
toEl: K,
|
|
4004
|
+
fromEl: J,
|
|
3860
4005
|
originalEvent: e
|
|
3861
|
-
}),
|
|
4006
|
+
}), W({
|
|
3862
4007
|
sortable: this,
|
|
3863
4008
|
name: "sort",
|
|
3864
|
-
toEl:
|
|
4009
|
+
toEl: K,
|
|
3865
4010
|
originalEvent: e
|
|
3866
|
-
})), X && X.save()), Q.active && ((
|
|
4011
|
+
})), X && X.save()), Q.active && ((Uo == null || Uo === -1) && (Uo = Ho, Go = Wo), W({
|
|
3867
4012
|
sortable: this,
|
|
3868
4013
|
name: "end",
|
|
3869
|
-
toEl:
|
|
4014
|
+
toEl: K,
|
|
3870
4015
|
originalEvent: e
|
|
3871
4016
|
}), this.save()))), this._nulling();
|
|
3872
4017
|
},
|
|
3873
4018
|
_nulling: function() {
|
|
3874
|
-
|
|
4019
|
+
U("nulling", this), J = G = K = q = zo = Y = Bo = Vo = Xo = Zo = ns = Uo = Go = Ho = Wo = rs = is = X = Ko = Q.dragged = Q.ghost = Q.clone = Q.active = null, us.forEach(function(e) {
|
|
3875
4020
|
e.checked = !0;
|
|
3876
|
-
}),
|
|
4021
|
+
}), us.length = Qo = $o = 0;
|
|
3877
4022
|
},
|
|
3878
4023
|
handleEvent: function(e) {
|
|
3879
4024
|
switch (e.type) {
|
|
@@ -3883,20 +4028,20 @@ Q.prototype = {
|
|
|
3883
4028
|
break;
|
|
3884
4029
|
case "dragenter":
|
|
3885
4030
|
case "dragover":
|
|
3886
|
-
|
|
4031
|
+
G && (this._onDragOver(e), ws(e));
|
|
3887
4032
|
break;
|
|
3888
4033
|
case "selectstart": e.preventDefault();
|
|
3889
4034
|
}
|
|
3890
4035
|
},
|
|
3891
4036
|
toArray: function() {
|
|
3892
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
4037
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], co(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Ms(t));
|
|
3893
4038
|
return e;
|
|
3894
4039
|
},
|
|
3895
4040
|
sort: function(e, t) {
|
|
3896
4041
|
var n = {}, r = this.el;
|
|
3897
4042
|
this.toArray().forEach(function(e, t) {
|
|
3898
4043
|
var i = r.children[t];
|
|
3899
|
-
|
|
4044
|
+
co(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3900
4045
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3901
4046
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3902
4047
|
}), t && this.animateAll();
|
|
@@ -3906,25 +4051,25 @@ Q.prototype = {
|
|
|
3906
4051
|
e && e.set && e.set(this);
|
|
3907
4052
|
},
|
|
3908
4053
|
closest: function(e, t) {
|
|
3909
|
-
return
|
|
4054
|
+
return co(e, t || this.options.draggable, this.el, !1);
|
|
3910
4055
|
},
|
|
3911
4056
|
option: function(e, t) {
|
|
3912
4057
|
var n = this.options;
|
|
3913
4058
|
if (t === void 0) return n[e];
|
|
3914
|
-
var r =
|
|
3915
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
4059
|
+
var r = Io.modifyOption(this, e, t);
|
|
4060
|
+
n[e] = r === void 0 ? t : r, e === "group" && ys(n);
|
|
3916
4061
|
},
|
|
3917
4062
|
destroy: function() {
|
|
3918
|
-
|
|
4063
|
+
U("destroy", this);
|
|
3919
4064
|
var e = this.el;
|
|
3920
|
-
e[
|
|
4065
|
+
e[Ao] = null, B(e, "mousedown", this._onTapStart), B(e, "touchstart", this._onTapStart), B(e, "pointerdown", this._onTapStart), this.nativeDraggable && (B(e, "dragover", this), B(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3921
4066
|
e.removeAttribute("draggable");
|
|
3922
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
4067
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), Yo.splice(Yo.indexOf(this.el), 1), this.el = e = null;
|
|
3923
4068
|
},
|
|
3924
4069
|
_hideClone: function() {
|
|
3925
|
-
if (!
|
|
3926
|
-
if (
|
|
3927
|
-
|
|
4070
|
+
if (!Vo) {
|
|
4071
|
+
if (U("hideClone", this), Q.eventCanceled) return;
|
|
4072
|
+
V(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), Vo = !0;
|
|
3928
4073
|
}
|
|
3929
4074
|
},
|
|
3930
4075
|
_showClone: function(e) {
|
|
@@ -3932,99 +4077,99 @@ Q.prototype = {
|
|
|
3932
4077
|
this._hideClone();
|
|
3933
4078
|
return;
|
|
3934
4079
|
}
|
|
3935
|
-
if (
|
|
3936
|
-
if (
|
|
3937
|
-
|
|
4080
|
+
if (Vo) {
|
|
4081
|
+
if (U("showClone", this), Q.eventCanceled) return;
|
|
4082
|
+
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) : zo ? J.insertBefore(Y, zo) : J.appendChild(Y), this.options.group.revertClone && this.animate(G, Y), V(Y, "display", ""), Vo = !1;
|
|
3938
4083
|
}
|
|
3939
4084
|
}
|
|
3940
4085
|
};
|
|
3941
|
-
function
|
|
4086
|
+
function ws(e) {
|
|
3942
4087
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3943
4088
|
}
|
|
3944
|
-
function
|
|
3945
|
-
var c, l = e[
|
|
3946
|
-
return window.CustomEvent &&
|
|
4089
|
+
function Ts(e, t, n, r, i, a, o, s) {
|
|
4090
|
+
var c, l = e[Ao], u = l.options.onMove, d;
|
|
4091
|
+
return window.CustomEvent && !$a && !eo ? c = new CustomEvent("move", {
|
|
3947
4092
|
bubbles: !0,
|
|
3948
4093
|
cancelable: !0
|
|
3949
|
-
}) : (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 ||
|
|
4094
|
+
}) : (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 || H(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3950
4095
|
}
|
|
3951
|
-
function
|
|
4096
|
+
function Es(e) {
|
|
3952
4097
|
e.draggable = !1;
|
|
3953
4098
|
}
|
|
3954
|
-
function
|
|
3955
|
-
|
|
4099
|
+
function Ds() {
|
|
4100
|
+
ls = !1;
|
|
3956
4101
|
}
|
|
3957
|
-
function
|
|
3958
|
-
var r =
|
|
4102
|
+
function Os(e, t, n) {
|
|
4103
|
+
var r = H(go(n.el, 0, n.options, !0)), i = ko(n.el, n.options, q), a = 10;
|
|
3959
4104
|
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;
|
|
3960
4105
|
}
|
|
3961
|
-
function
|
|
3962
|
-
var r =
|
|
4106
|
+
function ks(e, t, n) {
|
|
4107
|
+
var r = H(_o(n.el, n.options.draggable)), i = ko(n.el, n.options, q), a = 10;
|
|
3963
4108
|
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;
|
|
3964
4109
|
}
|
|
3965
|
-
function
|
|
4110
|
+
function As(e, t, n, r, i, a, o, s) {
|
|
3966
4111
|
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;
|
|
3967
4112
|
if (!o) {
|
|
3968
|
-
if (s &&
|
|
3969
|
-
if (!
|
|
3970
|
-
else if (
|
|
3971
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
4113
|
+
if (s && ss < l * i) {
|
|
4114
|
+
if (!as && (is === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (as = !0), as) f = !0;
|
|
4115
|
+
else if (is === 1 ? c < u + ss : c > d - ss) return -is;
|
|
4116
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return js(t);
|
|
3972
4117
|
}
|
|
3973
4118
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3974
4119
|
}
|
|
3975
|
-
function
|
|
3976
|
-
return
|
|
4120
|
+
function js(e) {
|
|
4121
|
+
return vo(G) < vo(e) ? 1 : -1;
|
|
3977
4122
|
}
|
|
3978
|
-
function
|
|
4123
|
+
function Ms(e) {
|
|
3979
4124
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3980
4125
|
return r.toString(36);
|
|
3981
4126
|
}
|
|
3982
|
-
function
|
|
3983
|
-
|
|
4127
|
+
function Ns(e) {
|
|
4128
|
+
us.length = 0;
|
|
3984
4129
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3985
4130
|
var r = t[n];
|
|
3986
|
-
r.checked &&
|
|
4131
|
+
r.checked && us.push(r);
|
|
3987
4132
|
}
|
|
3988
4133
|
}
|
|
3989
|
-
function
|
|
4134
|
+
function Ps(e) {
|
|
3990
4135
|
return setTimeout(e, 0);
|
|
3991
4136
|
}
|
|
3992
|
-
function
|
|
4137
|
+
function Fs(e) {
|
|
3993
4138
|
return clearTimeout(e);
|
|
3994
4139
|
}
|
|
3995
|
-
|
|
3996
|
-
(Q.active ||
|
|
4140
|
+
ds && z(document, "touchmove", function(e) {
|
|
4141
|
+
(Q.active || qo) && e.cancelable && e.preventDefault();
|
|
3997
4142
|
}), Q.utils = {
|
|
3998
|
-
on:
|
|
3999
|
-
off:
|
|
4000
|
-
css:
|
|
4001
|
-
find:
|
|
4143
|
+
on: z,
|
|
4144
|
+
off: B,
|
|
4145
|
+
css: V,
|
|
4146
|
+
find: po,
|
|
4002
4147
|
is: function(e, t) {
|
|
4003
|
-
return !!
|
|
4148
|
+
return !!co(e, t, e, !1);
|
|
4004
4149
|
},
|
|
4005
|
-
extend:
|
|
4006
|
-
throttle:
|
|
4007
|
-
closest:
|
|
4008
|
-
toggleClass:
|
|
4009
|
-
clone:
|
|
4010
|
-
index:
|
|
4011
|
-
nextTick:
|
|
4012
|
-
cancelNextTick:
|
|
4013
|
-
detectDirection:
|
|
4014
|
-
getChild:
|
|
4150
|
+
extend: So,
|
|
4151
|
+
throttle: To,
|
|
4152
|
+
closest: co,
|
|
4153
|
+
toggleClass: uo,
|
|
4154
|
+
clone: Oo,
|
|
4155
|
+
index: vo,
|
|
4156
|
+
nextTick: Ps,
|
|
4157
|
+
cancelNextTick: Fs,
|
|
4158
|
+
detectDirection: gs,
|
|
4159
|
+
getChild: go
|
|
4015
4160
|
}, Q.get = function(e) {
|
|
4016
|
-
return e[
|
|
4161
|
+
return e[Ao];
|
|
4017
4162
|
}, Q.mount = function() {
|
|
4018
4163
|
var e = [...arguments];
|
|
4019
4164
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
4020
4165
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
4021
|
-
e.utils && (Q.utils =
|
|
4166
|
+
e.utils && (Q.utils = Ga(Ga({}, Q.utils), e.utils)), Io.mount(e);
|
|
4022
4167
|
});
|
|
4023
4168
|
}, Q.create = function(e, t) {
|
|
4024
4169
|
return new Q(e, t);
|
|
4025
|
-
}, Q.version =
|
|
4026
|
-
var $ = [],
|
|
4027
|
-
function
|
|
4170
|
+
}, Q.version = Za;
|
|
4171
|
+
var $ = [], Is, Ls, Rs = !1, zs, Bs, Vs, Hs;
|
|
4172
|
+
function Us() {
|
|
4028
4173
|
function e() {
|
|
4029
4174
|
for (var e in this.defaults = {
|
|
4030
4175
|
scroll: !0,
|
|
@@ -4037,70 +4182,70 @@ function bs() {
|
|
|
4037
4182
|
return e.prototype = {
|
|
4038
4183
|
dragStarted: function(e) {
|
|
4039
4184
|
var t = e.originalEvent;
|
|
4040
|
-
this.sortable.nativeDraggable ?
|
|
4185
|
+
this.sortable.nativeDraggable ? z(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? z(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? z(document, "touchmove", this._handleFallbackAutoScroll) : z(document, "mousemove", this._handleFallbackAutoScroll);
|
|
4041
4186
|
},
|
|
4042
4187
|
dragOverCompleted: function(e) {
|
|
4043
4188
|
var t = e.originalEvent;
|
|
4044
4189
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
4045
4190
|
},
|
|
4046
4191
|
drop: function() {
|
|
4047
|
-
this.sortable.nativeDraggable ?
|
|
4192
|
+
this.sortable.nativeDraggable ? B(document, "dragover", this._handleAutoScroll) : (B(document, "pointermove", this._handleFallbackAutoScroll), B(document, "touchmove", this._handleFallbackAutoScroll), B(document, "mousemove", this._handleFallbackAutoScroll)), Gs(), Ws(), Eo();
|
|
4048
4193
|
},
|
|
4049
4194
|
nulling: function() {
|
|
4050
|
-
|
|
4195
|
+
Vs = Ls = Is = Rs = Hs = zs = Bs = null, $.length = 0;
|
|
4051
4196
|
},
|
|
4052
4197
|
_handleFallbackAutoScroll: function(e) {
|
|
4053
4198
|
this._handleAutoScroll(e, !0);
|
|
4054
4199
|
},
|
|
4055
4200
|
_handleAutoScroll: function(e, t) {
|
|
4056
4201
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
4057
|
-
if (
|
|
4058
|
-
|
|
4059
|
-
var o =
|
|
4060
|
-
|
|
4061
|
-
var a =
|
|
4062
|
-
a !== o && (o = a,
|
|
4063
|
-
}, 10),
|
|
4202
|
+
if (Vs = e, t || this.options.forceAutoScrollFallback || eo || $a || no) {
|
|
4203
|
+
Ks(e, this.options, a, t);
|
|
4204
|
+
var o = xo(a, !0);
|
|
4205
|
+
Rs && (!Hs || r !== zs || i !== Bs) && (Hs && Gs(), Hs = setInterval(function() {
|
|
4206
|
+
var a = xo(document.elementFromPoint(r, i), !0);
|
|
4207
|
+
a !== o && (o = a, Ws()), Ks(e, n.options, a, t);
|
|
4208
|
+
}, 10), zs = r, Bs = i);
|
|
4064
4209
|
} else {
|
|
4065
|
-
if (!this.options.bubbleScroll ||
|
|
4066
|
-
|
|
4210
|
+
if (!this.options.bubbleScroll || xo(a, !0) === mo()) {
|
|
4211
|
+
Ws();
|
|
4067
4212
|
return;
|
|
4068
4213
|
}
|
|
4069
|
-
|
|
4214
|
+
Ks(e, this.options, xo(a, !1), !1);
|
|
4070
4215
|
}
|
|
4071
4216
|
}
|
|
4072
|
-
},
|
|
4217
|
+
}, Ja(e, {
|
|
4073
4218
|
pluginName: "scroll",
|
|
4074
4219
|
initializeByDefault: !0
|
|
4075
4220
|
});
|
|
4076
4221
|
}
|
|
4077
|
-
function
|
|
4222
|
+
function Ws() {
|
|
4078
4223
|
$.forEach(function(e) {
|
|
4079
4224
|
clearInterval(e.pid);
|
|
4080
4225
|
}), $ = [];
|
|
4081
4226
|
}
|
|
4082
|
-
function
|
|
4083
|
-
clearInterval(
|
|
4227
|
+
function Gs() {
|
|
4228
|
+
clearInterval(Hs);
|
|
4084
4229
|
}
|
|
4085
|
-
var
|
|
4230
|
+
var Ks = To(function(e, t, n, r) {
|
|
4086
4231
|
if (t.scroll) {
|
|
4087
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
4088
|
-
|
|
4089
|
-
var d = 0, f =
|
|
4232
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = mo(), l = !1, u;
|
|
4233
|
+
Ls !== n && (Ls = n, Ws(), Is = t.scroll, u = t.scrollFn, Is === !0 && (Is = xo(n, !0)));
|
|
4234
|
+
var d = 0, f = Is;
|
|
4090
4235
|
do {
|
|
4091
|
-
var p = f, m =
|
|
4236
|
+
var p = f, m = H(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 = V(p), E = p.scrollLeft, D = p.scrollTop;
|
|
4092
4237
|
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"));
|
|
4093
4238
|
var O = x && (Math.abs(v - i) <= o && E + y < C) - (Math.abs(_ - i) <= o && !!E), k = S && (Math.abs(g - a) <= o && D + b < w) - (Math.abs(h - a) <= o && !!D);
|
|
4094
4239
|
if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
|
|
4095
4240
|
($[d].vx != O || $[d].vy != k || $[d].el !== p) && ($[d].el = p, $[d].vx = O, $[d].vy = k, clearInterval($[d].pid), (O != 0 || k != 0) && (l = !0, $[d].pid = setInterval(function() {
|
|
4096
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
4241
|
+
r && this.layer === 0 && Q.active._onTouchMove(Vs);
|
|
4097
4242
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
4098
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
4243
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[Ao], n, t, e, Vs, $[this.layer].el) !== "continue" || Do($[this.layer].el, n, t);
|
|
4099
4244
|
}.bind({ layer: d }), 24))), d++;
|
|
4100
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
4101
|
-
|
|
4245
|
+
} while (t.bubbleScroll && f !== c && (f = xo(f, !1)));
|
|
4246
|
+
Rs = l;
|
|
4102
4247
|
}
|
|
4103
|
-
}, 30),
|
|
4248
|
+
}, 30), qs = function(e) {
|
|
4104
4249
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
4105
4250
|
if (t) {
|
|
4106
4251
|
var c = n || i;
|
|
@@ -4112,8 +4257,8 @@ var Cs = no(function(e, t, n, r) {
|
|
|
4112
4257
|
}));
|
|
4113
4258
|
}
|
|
4114
4259
|
};
|
|
4115
|
-
function
|
|
4116
|
-
|
|
4260
|
+
function Js() {}
|
|
4261
|
+
Js.prototype = {
|
|
4117
4262
|
startIndex: null,
|
|
4118
4263
|
dragStart: function(e) {
|
|
4119
4264
|
var t = e.oldDraggableIndex;
|
|
@@ -4122,72 +4267,72 @@ Ts.prototype = {
|
|
|
4122
4267
|
onSpill: function(e) {
|
|
4123
4268
|
var t = e.dragEl, n = e.putSortable;
|
|
4124
4269
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
4125
|
-
var r =
|
|
4270
|
+
var r = go(this.sortable.el, this.startIndex, this.options);
|
|
4126
4271
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
4127
4272
|
},
|
|
4128
|
-
drop:
|
|
4129
|
-
},
|
|
4130
|
-
function
|
|
4131
|
-
|
|
4273
|
+
drop: qs
|
|
4274
|
+
}, Ja(Js, { pluginName: "revertOnSpill" });
|
|
4275
|
+
function Ys() {}
|
|
4276
|
+
Ys.prototype = {
|
|
4132
4277
|
onSpill: function(e) {
|
|
4133
4278
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
4134
4279
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
4135
4280
|
},
|
|
4136
|
-
drop:
|
|
4137
|
-
},
|
|
4138
|
-
function
|
|
4281
|
+
drop: qs
|
|
4282
|
+
}, Ja(Ys, { pluginName: "removeOnSpill" }), Q.mount(new Us()), Q.mount(Ys, Js);
|
|
4283
|
+
function Xs(e) {
|
|
4139
4284
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
4140
4285
|
}
|
|
4141
|
-
function
|
|
4142
|
-
|
|
4286
|
+
function Zs(e) {
|
|
4287
|
+
te() && l(e);
|
|
4143
4288
|
}
|
|
4144
|
-
function
|
|
4145
|
-
|
|
4289
|
+
function Qs(e) {
|
|
4290
|
+
te() ? n(e) : m(e);
|
|
4146
4291
|
}
|
|
4147
|
-
var
|
|
4148
|
-
function
|
|
4149
|
-
|
|
4292
|
+
var $s = null, ec = null;
|
|
4293
|
+
function tc(e = null, t = null) {
|
|
4294
|
+
$s = e, ec = t;
|
|
4150
4295
|
}
|
|
4151
|
-
function
|
|
4296
|
+
function nc() {
|
|
4152
4297
|
return {
|
|
4153
|
-
data:
|
|
4154
|
-
clonedData:
|
|
4298
|
+
data: $s,
|
|
4299
|
+
clonedData: ec
|
|
4155
4300
|
};
|
|
4156
4301
|
}
|
|
4157
|
-
var
|
|
4158
|
-
function
|
|
4159
|
-
let t =
|
|
4160
|
-
Array.isArray(
|
|
4161
|
-
let c = null, { immediate: l = !0, clone: u =
|
|
4302
|
+
var rc = Symbol("cloneElement");
|
|
4303
|
+
function ic(...e) {
|
|
4304
|
+
let t = te()?.proxy, n = null, r = e[0], [, i, o] = e;
|
|
4305
|
+
Array.isArray(P(i)) || (o = i, i = null);
|
|
4306
|
+
let c = null, { immediate: l = !0, clone: u = Xs, forceFallback: d, fallbackOnBody: f, customUpdate: p } = P(o) ?? {};
|
|
4162
4307
|
function h(e) {
|
|
4163
4308
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
4164
4309
|
n = d && !f ? o.slice(0, -1) : o;
|
|
4165
|
-
let s =
|
|
4166
|
-
|
|
4310
|
+
let s = P(P(i)?.[r]), c = u(s);
|
|
4311
|
+
tc(s, c), a[rc] = c;
|
|
4167
4312
|
}
|
|
4168
4313
|
function g(e) {
|
|
4169
|
-
let t = e.item[
|
|
4170
|
-
if (!
|
|
4171
|
-
if (
|
|
4172
|
-
let n = [...
|
|
4173
|
-
i.value =
|
|
4314
|
+
let t = e.item[rc];
|
|
4315
|
+
if (!Na(t)) {
|
|
4316
|
+
if (Ia(e.item), a(i)) {
|
|
4317
|
+
let n = [...P(i)];
|
|
4318
|
+
i.value = Ma(n, e.newDraggableIndex, t);
|
|
4174
4319
|
return;
|
|
4175
4320
|
}
|
|
4176
|
-
|
|
4321
|
+
Ma(P(i), e.newDraggableIndex, t);
|
|
4177
4322
|
}
|
|
4178
4323
|
}
|
|
4179
4324
|
function _(e) {
|
|
4180
4325
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: o, pullMode: s, clone: c } = e;
|
|
4181
|
-
if (
|
|
4182
|
-
|
|
4326
|
+
if (Fa(t, n, r), s === "clone") {
|
|
4327
|
+
Ia(c);
|
|
4183
4328
|
return;
|
|
4184
4329
|
}
|
|
4185
4330
|
if (a(i)) {
|
|
4186
|
-
let e = [...
|
|
4187
|
-
i.value =
|
|
4331
|
+
let e = [...P(i)];
|
|
4332
|
+
i.value = ja(e, o);
|
|
4188
4333
|
return;
|
|
4189
4334
|
}
|
|
4190
|
-
|
|
4335
|
+
ja(P(i), o);
|
|
4191
4336
|
}
|
|
4192
4337
|
function v(e) {
|
|
4193
4338
|
if (p) {
|
|
@@ -4195,12 +4340,12 @@ function Fs(...e) {
|
|
|
4195
4340
|
return;
|
|
4196
4341
|
}
|
|
4197
4342
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: o, newDraggableIndex: s } = e;
|
|
4198
|
-
if (
|
|
4199
|
-
let e = [...
|
|
4200
|
-
i.value =
|
|
4343
|
+
if (Ia(n), Fa(t, n, r), a(i)) {
|
|
4344
|
+
let e = [...P(i)];
|
|
4345
|
+
i.value = Oa(e, o, s);
|
|
4201
4346
|
return;
|
|
4202
4347
|
}
|
|
4203
|
-
|
|
4348
|
+
Oa(P(i), o, s);
|
|
4204
4349
|
}
|
|
4205
4350
|
function y(e) {
|
|
4206
4351
|
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
@@ -4219,7 +4364,7 @@ function Fs(...e) {
|
|
|
4219
4364
|
n = null;
|
|
4220
4365
|
}
|
|
4221
4366
|
m(() => {
|
|
4222
|
-
if (
|
|
4367
|
+
if (tc(), o) throw o;
|
|
4223
4368
|
});
|
|
4224
4369
|
}
|
|
4225
4370
|
let b = {
|
|
@@ -4230,20 +4375,20 @@ function Fs(...e) {
|
|
|
4230
4375
|
onEnd: y
|
|
4231
4376
|
};
|
|
4232
4377
|
function x(e) {
|
|
4233
|
-
let n =
|
|
4234
|
-
return e ||=
|
|
4378
|
+
let n = P(r);
|
|
4379
|
+
return e ||= Pa(n) ? La(n, t?.$el) : n, e && !Ba(e) && (e = e.$el), e || Da("Root element not found"), e;
|
|
4235
4380
|
}
|
|
4236
4381
|
function S() {
|
|
4237
|
-
let e =
|
|
4238
|
-
return
|
|
4239
|
-
|
|
4240
|
-
}),
|
|
4382
|
+
let e = P(o) ?? {}, { immediate: t, clone: n } = e, r = wa(e, ["immediate", "clone"]);
|
|
4383
|
+
return Va(r, (e, t) => {
|
|
4384
|
+
Ha(e) && (r[e] = (e, ...n) => (Ua(e, nc()), t(e, ...n)));
|
|
4385
|
+
}), za(i === null ? {} : b, r);
|
|
4241
4386
|
}
|
|
4242
4387
|
let C = (e) => {
|
|
4243
4388
|
e = x(e), c && w.destroy(), c = new Q(e, S());
|
|
4244
4389
|
};
|
|
4245
4390
|
s(() => o, () => {
|
|
4246
|
-
c &&
|
|
4391
|
+
c && Va(S(), (e, t) => {
|
|
4247
4392
|
c?.option(e, t);
|
|
4248
4393
|
});
|
|
4249
4394
|
}, { deep: !0 });
|
|
@@ -4256,15 +4401,15 @@ function Fs(...e) {
|
|
|
4256
4401
|
toArray: () => c?.toArray(),
|
|
4257
4402
|
closest: (...e) => c?.closest(...e)
|
|
4258
4403
|
};
|
|
4259
|
-
return
|
|
4404
|
+
return Qs(() => {
|
|
4260
4405
|
l && C();
|
|
4261
|
-
}),
|
|
4406
|
+
}), Zs(w.destroy), Ca({
|
|
4262
4407
|
start: C,
|
|
4263
4408
|
pause: () => w?.option("disabled", !0),
|
|
4264
4409
|
resume: () => w?.option("disabled", !1)
|
|
4265
4410
|
}, w);
|
|
4266
4411
|
}
|
|
4267
|
-
var
|
|
4412
|
+
var ac = [
|
|
4268
4413
|
"update",
|
|
4269
4414
|
"start",
|
|
4270
4415
|
"add",
|
|
@@ -4277,7 +4422,7 @@ var Is = [
|
|
|
4277
4422
|
"clone",
|
|
4278
4423
|
"move",
|
|
4279
4424
|
"change"
|
|
4280
|
-
],
|
|
4425
|
+
], oc = [
|
|
4281
4426
|
"clone",
|
|
4282
4427
|
"animation",
|
|
4283
4428
|
"ghostClass",
|
|
@@ -4321,43 +4466,43 @@ var Is = [
|
|
|
4321
4466
|
"tag",
|
|
4322
4467
|
"target",
|
|
4323
4468
|
"customUpdate",
|
|
4324
|
-
...
|
|
4325
|
-
],
|
|
4469
|
+
...ac.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
4470
|
+
], sc = L({
|
|
4326
4471
|
name: "VueDraggable",
|
|
4327
4472
|
model: {
|
|
4328
4473
|
prop: "modelValue",
|
|
4329
4474
|
event: "update:modelValue"
|
|
4330
4475
|
},
|
|
4331
|
-
props:
|
|
4332
|
-
emits: ["update:modelValue", ...
|
|
4476
|
+
props: oc,
|
|
4477
|
+
emits: ["update:modelValue", ...ac],
|
|
4333
4478
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
4334
|
-
let a =
|
|
4479
|
+
let a = ac.reduce((e, t) => {
|
|
4335
4480
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
4336
4481
|
return e[r] = (...e) => n(t, ...e), e;
|
|
4337
|
-
}, {}), s =
|
|
4338
|
-
let t = C(e), { modelValue: n } = t, r =
|
|
4339
|
-
let r =
|
|
4482
|
+
}, {}), s = F(() => {
|
|
4483
|
+
let t = C(e), { modelValue: n } = t, r = wa(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
4484
|
+
let r = P(n);
|
|
4340
4485
|
return r !== void 0 && (e[t] = r), e;
|
|
4341
4486
|
}, {});
|
|
4342
|
-
return
|
|
4343
|
-
}), c =
|
|
4487
|
+
return Ca(Ca({}, a), Aa(Ca(Ca({}, i), o)));
|
|
4488
|
+
}), c = F({
|
|
4344
4489
|
get: () => e.modelValue,
|
|
4345
4490
|
set: (e) => n("update:modelValue", e)
|
|
4346
|
-
}), l = _(), u = o(
|
|
4491
|
+
}), l = _(), u = o(ic(e.target || l, c, s));
|
|
4347
4492
|
return r(u), () => b(e.tag || "div", { ref: l }, (t?.default)?.call(t, u));
|
|
4348
4493
|
}
|
|
4349
|
-
}),
|
|
4494
|
+
}), cc = {
|
|
4350
4495
|
mounted: "mounted",
|
|
4351
4496
|
unmounted: "unmounted"
|
|
4352
4497
|
};
|
|
4353
|
-
|
|
4498
|
+
cc.mounted, cc.unmounted;
|
|
4354
4499
|
//#endregion
|
|
4355
4500
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4356
|
-
var
|
|
4501
|
+
var lc = { class: "tpl:w-full" }, uc = {
|
|
4357
4502
|
key: 0,
|
|
4358
4503
|
"data-testid": "section-drop-hint",
|
|
4359
4504
|
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)]"
|
|
4360
|
-
},
|
|
4505
|
+
}, dc = /* @__PURE__ */ L({
|
|
4361
4506
|
__name: "SectionBlock",
|
|
4362
4507
|
props: {
|
|
4363
4508
|
block: {},
|
|
@@ -4365,13 +4510,13 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4365
4510
|
},
|
|
4366
4511
|
setup(e) {
|
|
4367
4512
|
let n = {
|
|
4368
|
-
title:
|
|
4369
|
-
paragraph:
|
|
4370
|
-
image:
|
|
4371
|
-
button:
|
|
4372
|
-
divider:
|
|
4373
|
-
custom:
|
|
4374
|
-
}, i = e, { t: a } =
|
|
4513
|
+
title: ga,
|
|
4514
|
+
paragraph: Zi,
|
|
4515
|
+
image: Ri,
|
|
4516
|
+
button: Dr,
|
|
4517
|
+
divider: vi,
|
|
4518
|
+
custom: gi
|
|
4519
|
+
}, i = e, { t: a } = Bt(), o = ot(Tt, "SectionBlock"), s = p(St, null), c = p(Nt, null), l = p(xt, {}), f = p(Mt, null);
|
|
4375
4520
|
function m(e) {
|
|
4376
4521
|
let t = l.savedBlocks;
|
|
4377
4522
|
if (t?.isPicking.value) {
|
|
@@ -4380,7 +4525,7 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4380
4525
|
}
|
|
4381
4526
|
o.selectBlock(e);
|
|
4382
4527
|
}
|
|
4383
|
-
let h =
|
|
4528
|
+
let h = F(() => {
|
|
4384
4529
|
switch (i.block.columns) {
|
|
4385
4530
|
case "2": return ["50%", "50%"];
|
|
4386
4531
|
case "3": return [
|
|
@@ -4392,11 +4537,11 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4392
4537
|
case "2-1": return ["66.67%", "33.33%"];
|
|
4393
4538
|
default: return ["100%"];
|
|
4394
4539
|
}
|
|
4395
|
-
}), g =
|
|
4540
|
+
}), g = F(() => {
|
|
4396
4541
|
let e = h.value.length, t = [...i.block.children];
|
|
4397
4542
|
for (; t.length < e;) t.push([]);
|
|
4398
4543
|
return t.slice(0, e);
|
|
4399
|
-
}), _ =
|
|
4544
|
+
}), _ = F(() => i.viewport === "mobile" && i.block.stackOnMobile !== !1);
|
|
4400
4545
|
function v(e) {
|
|
4401
4546
|
return g.value[e] || [];
|
|
4402
4547
|
}
|
|
@@ -4406,7 +4551,7 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4406
4551
|
r[e] = n, o.updateBlock(i.block.id, { children: r });
|
|
4407
4552
|
}
|
|
4408
4553
|
function b(e) {
|
|
4409
|
-
return
|
|
4554
|
+
return $i(e, c, n);
|
|
4410
4555
|
}
|
|
4411
4556
|
function C(e, t) {
|
|
4412
4557
|
e.type === "custom" && o.updateBlock(e.id, {
|
|
@@ -4414,16 +4559,16 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4414
4559
|
dataSourceFetched: t.dataSourceFetched
|
|
4415
4560
|
});
|
|
4416
4561
|
}
|
|
4417
|
-
return (n, i) => (O(), S("div",
|
|
4562
|
+
return (n, i) => (O(), S("div", lc, [x("div", { class: r(["tpl:flex tpl:gap-0", { "tpl:flex-col": _.value }]) }, [(O(!0), S(N, null, D(g.value, (n, i) => (O(), S("div", {
|
|
4418
4563
|
key: i,
|
|
4419
4564
|
class: r(["tpl:relative tpl:min-h-[60px] tpl:rounded", v(i).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
4420
4565
|
style: u({ width: _.value ? "100%" : h.value[i] })
|
|
4421
|
-
}, [w(
|
|
4566
|
+
}, [w(P(sc), {
|
|
4422
4567
|
"model-value": v(i),
|
|
4423
4568
|
group: {
|
|
4424
4569
|
name: "blocks",
|
|
4425
4570
|
pull: !0,
|
|
4426
|
-
put: (e, t, n) =>
|
|
4571
|
+
put: (e, t, n) => P(_a)(n)
|
|
4427
4572
|
},
|
|
4428
4573
|
animation: 150,
|
|
4429
4574
|
"ghost-class": "tpl-ghost",
|
|
@@ -4436,19 +4581,19 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4436
4581
|
class: "tpl:min-h-[60px]",
|
|
4437
4582
|
"onUpdate:modelValue": (e) => y(i, e)
|
|
4438
4583
|
}, {
|
|
4439
|
-
default:
|
|
4584
|
+
default: ne(() => [(O(!0), S(N, null, D(v(i), (n) => t((O(), S("div", { key: n.id }, [w(ma, {
|
|
4440
4585
|
block: n,
|
|
4441
|
-
"is-selected":
|
|
4586
|
+
"is-selected": P(o).state.selectedBlockId === n.id,
|
|
4442
4587
|
viewport: e.viewport,
|
|
4443
|
-
"preview-mode":
|
|
4588
|
+
"preview-mode": P(o).state.previewMode,
|
|
4444
4589
|
nested: "",
|
|
4445
4590
|
onSelect: (e) => m(n.id)
|
|
4446
4591
|
}, {
|
|
4447
|
-
default:
|
|
4592
|
+
default: ne(() => [(O(), A(d(b(n)), {
|
|
4448
4593
|
block: n,
|
|
4449
4594
|
viewport: e.viewport,
|
|
4450
4595
|
onFetchData: (e) => C(n, e),
|
|
4451
|
-
onUpdate: (e) =>
|
|
4596
|
+
onUpdate: (e) => P(o).updateBlock(n.id, e)
|
|
4452
4597
|
}, null, 40, [
|
|
4453
4598
|
"block",
|
|
4454
4599
|
"viewport",
|
|
@@ -4462,19 +4607,19 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4462
4607
|
"viewport",
|
|
4463
4608
|
"preview-mode",
|
|
4464
4609
|
"onSelect"
|
|
4465
|
-
])])), [[
|
|
4610
|
+
])])), [[re, P(f) === !1 || !P(s)?.isHidden(n.id)]])), 128))]),
|
|
4466
4611
|
_: 2
|
|
4467
4612
|
}, 1032, [
|
|
4468
4613
|
"model-value",
|
|
4469
4614
|
"group",
|
|
4470
4615
|
"onUpdate:modelValue"
|
|
4471
|
-
]), v(i).length === 0 ? (O(), S("div",
|
|
4616
|
+
]), v(i).length === 0 ? (O(), S("div", uc, [x("span", null, k(P(a).section.dropHere), 1)])) : I("", !0)], 6))), 128))], 2)]));
|
|
4472
4617
|
}
|
|
4473
|
-
}),
|
|
4618
|
+
}), fc = we, pc = {
|
|
4474
4619
|
small: 24,
|
|
4475
4620
|
medium: 32,
|
|
4476
4621
|
large: 48
|
|
4477
|
-
},
|
|
4622
|
+
}, mc = [
|
|
4478
4623
|
"facebook",
|
|
4479
4624
|
"twitter",
|
|
4480
4625
|
"instagram",
|
|
@@ -4492,11 +4637,11 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4492
4637
|
"github",
|
|
4493
4638
|
"dribbble",
|
|
4494
4639
|
"behance"
|
|
4495
|
-
],
|
|
4640
|
+
], hc = [
|
|
4496
4641
|
"width",
|
|
4497
4642
|
"height",
|
|
4498
4643
|
"fill"
|
|
4499
|
-
],
|
|
4644
|
+
], gc = ["d"], _c = /* @__PURE__ */ L({
|
|
4500
4645
|
__name: "SocialIconSvg",
|
|
4501
4646
|
props: {
|
|
4502
4647
|
platform: {},
|
|
@@ -4504,7 +4649,7 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4504
4649
|
iconSize: {}
|
|
4505
4650
|
},
|
|
4506
4651
|
setup(e) {
|
|
4507
|
-
let t = e, n =
|
|
4652
|
+
let t = e, n = F(() => fc[t.platform]), r = F(() => pc[t.iconSize]), i = F(() => {
|
|
4508
4653
|
let e = {
|
|
4509
4654
|
display: "inline-flex",
|
|
4510
4655
|
alignItems: "center",
|
|
@@ -4541,40 +4686,40 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4541
4686
|
};
|
|
4542
4687
|
default: return e;
|
|
4543
4688
|
}
|
|
4544
|
-
}), a =
|
|
4689
|
+
}), a = F(() => Math.floor(r.value * .6)), o = F(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
|
|
4545
4690
|
return (e, t) => (O(), S("span", { style: u(i.value) }, [(O(), S("svg", {
|
|
4546
4691
|
width: a.value,
|
|
4547
4692
|
height: a.value,
|
|
4548
4693
|
viewBox: "0 0 24 24",
|
|
4549
4694
|
fill: o.value,
|
|
4550
4695
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4551
|
-
}, [x("path", { d: n.value.path }, null, 8,
|
|
4696
|
+
}, [x("path", { d: n.value.path }, null, 8, gc)], 8, hc))], 4));
|
|
4552
4697
|
}
|
|
4553
|
-
}),
|
|
4698
|
+
}), vc = { class: "tpl:w-full" }, yc = ["href"], bc = {
|
|
4554
4699
|
key: 1,
|
|
4555
4700
|
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)]"
|
|
4556
|
-
},
|
|
4701
|
+
}, xc = /* @__PURE__ */ L({
|
|
4557
4702
|
__name: "SocialIconsBlock",
|
|
4558
4703
|
props: {
|
|
4559
4704
|
block: {},
|
|
4560
4705
|
viewport: {}
|
|
4561
4706
|
},
|
|
4562
4707
|
setup(e) {
|
|
4563
|
-
let t = e, { t: n } =
|
|
4708
|
+
let t = e, { t: n } = Bt(), r = F(() => ({
|
|
4564
4709
|
display: "flex",
|
|
4565
4710
|
flexWrap: "wrap",
|
|
4566
4711
|
gap: `${t.block.spacing}px`,
|
|
4567
4712
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
4568
|
-
})), i =
|
|
4569
|
-
return (t, a) => (O(), S("div",
|
|
4713
|
+
})), i = F(() => t.block.icons.length > 0);
|
|
4714
|
+
return (t, a) => (O(), S("div", vc, [i.value ? (O(), S("div", {
|
|
4570
4715
|
key: 0,
|
|
4571
4716
|
style: u(r.value)
|
|
4572
|
-
}, [(O(!0), S(
|
|
4717
|
+
}, [(O(!0), S(N, null, D(e.block.icons, (t) => (O(), S("a", {
|
|
4573
4718
|
key: t.id,
|
|
4574
4719
|
href: t.url || "#",
|
|
4575
4720
|
class: "tpl:cursor-default",
|
|
4576
|
-
onClick: a[0] ||=
|
|
4577
|
-
}, [w(
|
|
4721
|
+
onClick: a[0] ||= R(() => {}, ["prevent"])
|
|
4722
|
+
}, [w(_c, {
|
|
4578
4723
|
platform: t.platform,
|
|
4579
4724
|
"icon-style": e.block.iconStyle,
|
|
4580
4725
|
"icon-size": e.block.iconSize
|
|
@@ -4582,44 +4727,44 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4582
4727
|
"platform",
|
|
4583
4728
|
"icon-style",
|
|
4584
4729
|
"icon-size"
|
|
4585
|
-
])], 8,
|
|
4730
|
+
])], 8, yc))), 128))], 4)) : (O(), S("div", bc, [w(P(Rr), { size: 16 }), x("span", null, k(P(n).social.addIcons), 1)]))]));
|
|
4586
4731
|
}
|
|
4587
|
-
}),
|
|
4732
|
+
}), Sc = { class: "tpl:w-full" }, Cc = {
|
|
4588
4733
|
key: 0,
|
|
4589
4734
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4590
4735
|
style: {
|
|
4591
4736
|
"background-color": "var(--tpl-bg-hover)",
|
|
4592
4737
|
color: "var(--tpl-text-dim)"
|
|
4593
4738
|
}
|
|
4594
|
-
},
|
|
4739
|
+
}, wc = /* @__PURE__ */ L({
|
|
4595
4740
|
__name: "SpacerBlock",
|
|
4596
4741
|
props: {
|
|
4597
4742
|
block: {},
|
|
4598
4743
|
viewport: {}
|
|
4599
4744
|
},
|
|
4600
4745
|
setup(e) {
|
|
4601
|
-
let t = e, n =
|
|
4746
|
+
let t = e, n = ot(Tt, "SpacerBlock"), i = F(() => ({
|
|
4602
4747
|
height: `${t.block.height}px`,
|
|
4603
4748
|
minHeight: `${t.block.height}px`,
|
|
4604
4749
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4605
4750
|
}));
|
|
4606
|
-
return (t, a) => (O(), S("div",
|
|
4751
|
+
return (t, a) => (O(), S("div", Sc, [x("div", {
|
|
4607
4752
|
style: u(i.value),
|
|
4608
|
-
class: r(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !
|
|
4609
|
-
}, [
|
|
4753
|
+
class: r(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !P(n).state.previewMode }])
|
|
4754
|
+
}, [P(n).state.previewMode ? I("", !0) : (O(), S("span", Cc, k(e.block.height) + "px ", 1))], 6)]));
|
|
4610
4755
|
}
|
|
4611
|
-
}),
|
|
4756
|
+
}), Tc = { class: "tpl:w-full" }, Ec = { key: 0 }, Dc = [
|
|
4612
4757
|
"aria-label",
|
|
4613
4758
|
"data-placeholder",
|
|
4614
4759
|
"onBlur"
|
|
4615
|
-
],
|
|
4760
|
+
], Oc = [
|
|
4616
4761
|
"aria-label",
|
|
4617
4762
|
"data-placeholder",
|
|
4618
4763
|
"onBlur"
|
|
4619
|
-
],
|
|
4764
|
+
], kc = {
|
|
4620
4765
|
key: 1,
|
|
4621
4766
|
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)]"
|
|
4622
|
-
},
|
|
4767
|
+
}, Ac = /*#__PURE__*/ en(/* @__PURE__ */ L({
|
|
4623
4768
|
__name: "TableBlock",
|
|
4624
4769
|
props: {
|
|
4625
4770
|
block: {},
|
|
@@ -4633,7 +4778,7 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4633
4778
|
updated(e, t) {
|
|
4634
4779
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
4635
4780
|
}
|
|
4636
|
-
}, r = e, { t: i } =
|
|
4781
|
+
}, r = e, { t: i } = Bt(), a = ot(Tt, "TableBlock"), o = F(() => r.block.rows.length > 0), s = F(() => {
|
|
4637
4782
|
let e = {
|
|
4638
4783
|
width: "100%",
|
|
4639
4784
|
borderCollapse: "collapse",
|
|
@@ -4642,15 +4787,15 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4642
4787
|
fontFamily: r.block.fontFamily || "inherit"
|
|
4643
4788
|
};
|
|
4644
4789
|
return r.block.color && (e.color = r.block.color), e;
|
|
4645
|
-
}), c =
|
|
4790
|
+
}), c = F(() => ({
|
|
4646
4791
|
border: `${r.block.borderWidth}px solid ${r.block.borderColor}`,
|
|
4647
4792
|
padding: `${r.block.cellPadding}px`,
|
|
4648
4793
|
textAlign: r.block.textAlign
|
|
4649
|
-
})), l =
|
|
4794
|
+
})), l = F(() => ({
|
|
4650
4795
|
...c.value,
|
|
4651
4796
|
fontWeight: "bold",
|
|
4652
4797
|
backgroundColor: r.block.headerBackgroundColor || "transparent"
|
|
4653
|
-
})), d =
|
|
4798
|
+
})), d = F(() => r.block.hasHeaderRow && r.block.rows.length > 0 ? r.block.rows[0] : null), f = F(() => r.block.hasHeaderRow ? r.block.rows.slice(1) : r.block.rows);
|
|
4654
4799
|
function p() {
|
|
4655
4800
|
a.selectBlock(r.block.id);
|
|
4656
4801
|
}
|
|
@@ -4664,31 +4809,31 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4664
4809
|
} : n);
|
|
4665
4810
|
a.updateBlock(r.block.id, { rows: o });
|
|
4666
4811
|
}
|
|
4667
|
-
return (e, r) => (O(), S("div",
|
|
4812
|
+
return (e, r) => (O(), S("div", Tc, [o.value ? (O(), S("table", {
|
|
4668
4813
|
key: 0,
|
|
4669
4814
|
style: u(s.value),
|
|
4670
4815
|
class: "tpl-table-editable"
|
|
4671
|
-
}, [d.value ? (O(), S("thead",
|
|
4816
|
+
}, [d.value ? (O(), S("thead", Ec, [x("tr", null, [(O(!0), S(N, null, D(d.value.cells, (e) => t((O(), S("th", {
|
|
4672
4817
|
key: e.id,
|
|
4673
4818
|
style: u(l.value),
|
|
4674
|
-
"aria-label":
|
|
4819
|
+
"aria-label": P(i).table.cellPlaceholder,
|
|
4675
4820
|
contenteditable: "true",
|
|
4676
|
-
"data-placeholder":
|
|
4821
|
+
"data-placeholder": P(i).table.cellPlaceholder,
|
|
4677
4822
|
onBlur: (t) => m(d.value.id, e.id, t),
|
|
4678
|
-
onKeydown: r[0] ||=
|
|
4679
|
-
onClick:
|
|
4680
|
-
}, null, 44,
|
|
4823
|
+
onKeydown: r[0] ||= ie(R((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4824
|
+
onClick: R(p, ["stop"])
|
|
4825
|
+
}, null, 44, Dc)), [[n, e.content]])), 128))])])) : I("", !0), x("tbody", null, [(O(!0), S(N, null, D(f.value, (e) => (O(), S("tr", { key: e.id }, [(O(!0), S(N, null, D(e.cells, (a) => t((O(), S("td", {
|
|
4681
4826
|
key: a.id,
|
|
4682
4827
|
style: u(c.value),
|
|
4683
|
-
"aria-label":
|
|
4828
|
+
"aria-label": P(i).table.cellPlaceholder,
|
|
4684
4829
|
contenteditable: "true",
|
|
4685
|
-
"data-placeholder":
|
|
4830
|
+
"data-placeholder": P(i).table.cellPlaceholder,
|
|
4686
4831
|
onBlur: (t) => m(e.id, a.id, t),
|
|
4687
|
-
onKeydown: r[1] ||=
|
|
4688
|
-
onClick:
|
|
4689
|
-
}, null, 44,
|
|
4832
|
+
onKeydown: r[1] ||= ie(R((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4833
|
+
onClick: R(p, ["stop"])
|
|
4834
|
+
}, null, 44, Oc)), [[n, a.content]])), 128))]))), 128))])], 4)) : (O(), S("div", kc, [w(P(zr), { size: 16 }), x("span", null, k(P(i).table.empty), 1)]))]));
|
|
4690
4835
|
}
|
|
4691
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
4836
|
+
}), [["__scopeId", "data-v-963ac422"]]), jc = /* @__PURE__ */ L({
|
|
4692
4837
|
__name: "VideoPlayButton",
|
|
4693
4838
|
props: { hoverEffect: {
|
|
4694
4839
|
type: Boolean,
|
|
@@ -4706,7 +4851,7 @@ var Bs = { class: "tpl:w-full" }, Vs = {
|
|
|
4706
4851
|
});
|
|
4707
4852
|
//#endregion
|
|
4708
4853
|
//#region src/utils/videoThumbnail.ts
|
|
4709
|
-
function
|
|
4854
|
+
function Mc(e) {
|
|
4710
4855
|
if (!e) return {
|
|
4711
4856
|
platform: "unknown",
|
|
4712
4857
|
videoId: null,
|
|
@@ -4738,25 +4883,25 @@ function lc(e) {
|
|
|
4738
4883
|
thumbnailUrl: null
|
|
4739
4884
|
};
|
|
4740
4885
|
}
|
|
4741
|
-
function
|
|
4742
|
-
return t ||
|
|
4886
|
+
function Nc(e, t) {
|
|
4887
|
+
return t || Mc(e).thumbnailUrl;
|
|
4743
4888
|
}
|
|
4744
4889
|
//#endregion
|
|
4745
4890
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4746
|
-
var
|
|
4891
|
+
var Pc = ["src", "alt"], Fc = {
|
|
4747
4892
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4748
4893
|
style: { opacity: "0.7" }
|
|
4749
|
-
},
|
|
4894
|
+
}, Ic = ["href"], Lc = ["src", "alt"], Rc = ["src", "alt"], zc = {
|
|
4750
4895
|
key: 3,
|
|
4751
4896
|
class: "tpl:flex 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)]"
|
|
4752
|
-
},
|
|
4897
|
+
}, Bc = /* @__PURE__ */ L({
|
|
4753
4898
|
__name: "VideoBlock",
|
|
4754
4899
|
props: {
|
|
4755
4900
|
block: {},
|
|
4756
4901
|
viewport: {}
|
|
4757
4902
|
},
|
|
4758
4903
|
setup(e) {
|
|
4759
|
-
let t = e, { t: n } =
|
|
4904
|
+
let t = e, { t: n } = Bt(), { syntax: r } = nn(), i = F(() => Me(t.block.url, r) || Me(t.block.thumbnailUrl, r)), a = Nn(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = Nn(() => i.value ? t.block.placeholderUrl : void 0), s = F(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : Nc(t.block.url)), c = F(() => ({ textAlign: t.block.align })), l = F(() => {
|
|
4760
4905
|
let e = t.block.align;
|
|
4761
4906
|
return {
|
|
4762
4907
|
maxWidth: "100%",
|
|
@@ -4766,7 +4911,7 @@ var dc = ["src", "alt"], fc = {
|
|
|
4766
4911
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
4767
4912
|
marginRight: e === "center" ? "auto" : void 0
|
|
4768
4913
|
};
|
|
4769
|
-
}), d =
|
|
4914
|
+
}), d = F(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = F(() => Me(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
4770
4915
|
return (t, r) => (O(), S("div", {
|
|
4771
4916
|
class: "tpl:w-full",
|
|
4772
4917
|
style: u(c.value)
|
|
@@ -4776,32 +4921,32 @@ var dc = ["src", "alt"], fc = {
|
|
|
4776
4921
|
style: u(l.value)
|
|
4777
4922
|
}, [x("img", {
|
|
4778
4923
|
class: "tpl:w-full tpl:border-0",
|
|
4779
|
-
src:
|
|
4924
|
+
src: P(o),
|
|
4780
4925
|
alt: e.block.alt,
|
|
4781
4926
|
style: u(d.value)
|
|
4782
|
-
}, null, 12,
|
|
4927
|
+
}, null, 12, Pc), w(jc)], 4)) : i.value ? (O(), S("div", {
|
|
4783
4928
|
key: 1,
|
|
4784
4929
|
class: "tpl:relative tpl:!flex 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)]",
|
|
4785
4930
|
style: u([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, l.value])
|
|
4786
|
-
}, [w(
|
|
4931
|
+
}, [w(P(Br), {
|
|
4787
4932
|
size: 36,
|
|
4788
4933
|
"stroke-width": 1.5,
|
|
4789
4934
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4790
4935
|
style: { opacity: "0.5" }
|
|
4791
|
-
}), x("span",
|
|
4936
|
+
}), x("span", Fc, [w(Tr, { text: f.value }, null, 8, ["text"])])], 4)) : s.value ? (O(), S(N, { key: 2 }, [e.block.url ? (O(), S("a", {
|
|
4792
4937
|
key: 0,
|
|
4793
4938
|
href: e.block.url,
|
|
4794
4939
|
target: "_blank",
|
|
4795
4940
|
rel: "noopener noreferrer",
|
|
4796
4941
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
4797
4942
|
style: u(l.value),
|
|
4798
|
-
onClick: r[0] ||=
|
|
4943
|
+
onClick: r[0] ||= R(() => {}, ["prevent"])
|
|
4799
4944
|
}, [x("img", {
|
|
4800
4945
|
class: "tpl:w-full tpl:border-0",
|
|
4801
4946
|
src: s.value,
|
|
4802
4947
|
alt: e.block.alt,
|
|
4803
4948
|
style: u(d.value)
|
|
4804
|
-
}, null, 12,
|
|
4949
|
+
}, null, 12, Lc), w(jc, { "hover-effect": "" })], 12, Ic)) : (O(), S("div", {
|
|
4805
4950
|
key: 1,
|
|
4806
4951
|
class: "tpl:relative tpl:inline-block",
|
|
4807
4952
|
style: u(l.value)
|
|
@@ -4810,153 +4955,153 @@ var dc = ["src", "alt"], fc = {
|
|
|
4810
4955
|
src: s.value,
|
|
4811
4956
|
alt: e.block.alt,
|
|
4812
4957
|
style: u(d.value)
|
|
4813
|
-
}, null, 12,
|
|
4958
|
+
}, null, 12, Rc), w(jc)], 4))], 64)) : (O(), S("div", zc, [w(P(Br), {
|
|
4814
4959
|
size: 40,
|
|
4815
4960
|
"stroke-width": 1.5,
|
|
4816
4961
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4817
|
-
}), x("span", null, k(
|
|
4818
|
-
}
|
|
4819
|
-
}),
|
|
4820
|
-
section:
|
|
4821
|
-
title:
|
|
4822
|
-
paragraph:
|
|
4823
|
-
image:
|
|
4824
|
-
button:
|
|
4825
|
-
divider:
|
|
4826
|
-
video:
|
|
4827
|
-
social:
|
|
4828
|
-
menu:
|
|
4829
|
-
table:
|
|
4830
|
-
spacer:
|
|
4831
|
-
html:
|
|
4832
|
-
countdown: y(() => import("./CountdownBlock-
|
|
4962
|
+
}), x("span", null, k(P(n).video.addVideo), 1)]))], 4));
|
|
4963
|
+
}
|
|
4964
|
+
}), Vc = {
|
|
4965
|
+
section: dc,
|
|
4966
|
+
title: ga,
|
|
4967
|
+
paragraph: Zi,
|
|
4968
|
+
image: Ri,
|
|
4969
|
+
button: Dr,
|
|
4970
|
+
divider: vi,
|
|
4971
|
+
video: Bc,
|
|
4972
|
+
social: xc,
|
|
4973
|
+
menu: Hi,
|
|
4974
|
+
table: Ac,
|
|
4975
|
+
spacer: wc,
|
|
4976
|
+
html: wi,
|
|
4977
|
+
countdown: y(() => import("./CountdownBlock-DQTwaRxP.js"))
|
|
4833
4978
|
};
|
|
4834
|
-
function
|
|
4835
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } =
|
|
4979
|
+
function Hc(t) {
|
|
4980
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } = Bt(i), l = F(() => le(le($n(i), yr(n.content.value.settings?.locale)), r.blockDefaults ?? {}));
|
|
4836
4981
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
4837
|
-
let { resolvedTheme:
|
|
4838
|
-
themeOverrides:
|
|
4839
|
-
resolvedTheme:
|
|
4982
|
+
let { resolvedTheme: u } = Vn(F(() => n.state.uiTheme)), d = _(r.theme ?? {}), { themeStyles: f } = Un({
|
|
4983
|
+
themeOverrides: d,
|
|
4984
|
+
resolvedTheme: u,
|
|
4840
4985
|
extraStyles: () => ({
|
|
4841
4986
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
4842
4987
|
...t.themeExtraStyles?.()
|
|
4843
4988
|
})
|
|
4844
|
-
}),
|
|
4989
|
+
}), p = fn({
|
|
4845
4990
|
content: n.content,
|
|
4846
4991
|
setContent: (e, t) => n.setContent(e, t),
|
|
4847
4992
|
...t.historyOptions
|
|
4848
4993
|
});
|
|
4849
|
-
|
|
4850
|
-
let
|
|
4994
|
+
yn(n, p);
|
|
4995
|
+
let m = mn({
|
|
4851
4996
|
addBlock: n.addBlock,
|
|
4852
4997
|
removeBlock: n.removeBlock,
|
|
4853
4998
|
updateBlock: n.updateBlock,
|
|
4854
4999
|
selectBlock: n.selectBlock,
|
|
4855
5000
|
findBlockLocation: n.findBlockLocation,
|
|
4856
|
-
blockDefaults:
|
|
4857
|
-
}),
|
|
5001
|
+
blockDefaults: () => l.value
|
|
5002
|
+
}), g = _n(n), v = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? gn({
|
|
4858
5003
|
content: n.content,
|
|
4859
5004
|
isDirty: () => n.state.isDirty,
|
|
4860
5005
|
...t.autoSaveOptions
|
|
4861
|
-
}) : null,
|
|
4862
|
-
|
|
4863
|
-
e ?
|
|
5006
|
+
}) : null, y = null;
|
|
5007
|
+
v && (y = s(p.isNavigating, (e) => {
|
|
5008
|
+
e ? v.pause() : v.resume();
|
|
4864
5009
|
}));
|
|
4865
|
-
let
|
|
5010
|
+
let b = Bn(n, {
|
|
4866
5011
|
t: o,
|
|
4867
5012
|
format: c
|
|
4868
|
-
}, r.customBlocks ?? []),
|
|
4869
|
-
if (
|
|
4870
|
-
let e =
|
|
4871
|
-
e.length > 0 &&
|
|
4872
|
-
}
|
|
4873
|
-
let
|
|
4874
|
-
|
|
4875
|
-
let
|
|
4876
|
-
function
|
|
5013
|
+
}, r.customBlocks ?? []), x = Wt(r.colors);
|
|
5014
|
+
if (x.allowCustomIgnored && Vt.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), x.invalidPresets.length > 0 && Vt.warn(`config.colors.presets skipped invalid entries: ${x.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), x.allowCustom === !1) {
|
|
5015
|
+
let e = Qn(x.presets, r.blockDefaults, r.templateDefaults);
|
|
5016
|
+
e.length > 0 && Vt.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.`);
|
|
5017
|
+
}
|
|
5018
|
+
let S = Wn();
|
|
5019
|
+
Yn(S, Vc);
|
|
5020
|
+
let C = /* @__PURE__ */ new Set();
|
|
5021
|
+
function w(e) {
|
|
4877
5022
|
for (let t of e) {
|
|
4878
|
-
|
|
4879
|
-
for (let e of
|
|
5023
|
+
S.registerCustom(t, gi);
|
|
5024
|
+
for (let e of xr(t, x)) C.has(e.id) || (C.add(e.id), Vt.warn(e.message));
|
|
4880
5025
|
}
|
|
4881
5026
|
}
|
|
4882
|
-
r.customBlocks?.length &&
|
|
4883
|
-
let
|
|
4884
|
-
if (h() &&
|
|
5027
|
+
r.customBlocks?.length && w(r.customBlocks);
|
|
5028
|
+
let T = kn();
|
|
5029
|
+
if (h() && M(T.dispose), t.containerEl) {
|
|
4885
5030
|
let e = t.containerEl;
|
|
4886
5031
|
Ze(document, "pointerdown", (t) => {
|
|
4887
5032
|
let n = e.value;
|
|
4888
|
-
n && (t.composedPath?.() ?? []).includes(n) &&
|
|
5033
|
+
n && (t.composedPath?.() ?? []).includes(n) && T.claim();
|
|
4889
5034
|
}, { capture: !0 });
|
|
4890
5035
|
}
|
|
4891
|
-
function
|
|
5036
|
+
function E() {
|
|
4892
5037
|
let e = t.capabilities?.templates;
|
|
4893
5038
|
if (e) {
|
|
4894
5039
|
e.save();
|
|
4895
5040
|
return;
|
|
4896
5041
|
}
|
|
4897
|
-
|
|
5042
|
+
v?.flush();
|
|
4898
5043
|
}
|
|
4899
|
-
function
|
|
4900
|
-
|
|
4901
|
-
history:
|
|
5044
|
+
function D(e) {
|
|
5045
|
+
T.isActive() && Cr(e, {
|
|
5046
|
+
history: p,
|
|
4902
5047
|
selectBlock: (e) => n.selectBlock(e),
|
|
4903
5048
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
4904
5049
|
removeBlock: (e) => n.removeBlock(e),
|
|
4905
|
-
onSave:
|
|
5050
|
+
onSave: E,
|
|
4906
5051
|
onBeforeUndo: t.keyboardOptions?.onBeforeUndo,
|
|
4907
5052
|
isPicking: () => t.capabilities?.savedBlocks?.isPicking.value === !0,
|
|
4908
5053
|
onConfirmPick: () => t.capabilities?.savedBlocks?.confirmPicking(),
|
|
4909
5054
|
onCancelPick: () => t.capabilities?.savedBlocks?.cancelPicking()
|
|
4910
5055
|
});
|
|
4911
5056
|
}
|
|
4912
|
-
Ze(document, "keydown",
|
|
4913
|
-
let
|
|
4914
|
-
e(
|
|
4915
|
-
let
|
|
4916
|
-
e(
|
|
4917
|
-
let
|
|
4918
|
-
e(
|
|
4919
|
-
let
|
|
5057
|
+
Ze(document, "keydown", D);
|
|
5058
|
+
let O = _(null);
|
|
5059
|
+
e(wt, t.editorRoot ?? document), e(ft, O), e(gt, i), e(Tt, n), e(Ft, p), e(yt, m), e(St, g), e(vt, a), e(tt, f), e(ht, u), e(At, l), e(st, r.locale), e(Nt, S), e(Ct, r.customBlocks ?? []), e(ut, r.paletteBlocks), e(Rt, Xn(r.htmlBlockPreview)), e(Pt, x), e(jt, Gn(n.content, S));
|
|
5060
|
+
let k = oe(r.mergeTags?.syntax);
|
|
5061
|
+
e(mt, r.mergeTags?.tags ?? []), e(Dt, k), e(lt, r.mergeTags?.onRequest ?? null), e(it, r.mergeTags?.autocomplete !== !1);
|
|
5062
|
+
let A = _(he(r.mergeTags?.tags ?? []));
|
|
5063
|
+
e(dt, A);
|
|
5064
|
+
let j = jn({
|
|
4920
5065
|
resolvePreview: r.resolvePreview,
|
|
4921
5066
|
getContent: () => n.content.value,
|
|
4922
5067
|
isActive: () => n.state.previewMode
|
|
4923
5068
|
});
|
|
4924
|
-
e(at,
|
|
4925
|
-
let
|
|
4926
|
-
e(
|
|
4927
|
-
let
|
|
4928
|
-
e(rt,
|
|
4929
|
-
let
|
|
5069
|
+
e(at, j), e(ct, r.resolvePreview);
|
|
5070
|
+
let N = F(() => !(n.state.previewMode && j.isConfigured));
|
|
5071
|
+
e(Mt, N);
|
|
5072
|
+
let P = Pn();
|
|
5073
|
+
e(rt, P), e(nt, r.logicTags?.tags ?? []), e(pt, r.logicTags?.pairs ?? []), e(et, r.logicTags?.onRequest ?? null), e(It, Fn()), e(Et, r.onRequestMedia ?? null), e(bt, r.resolveImageUrl ? Mn(r.resolveImageUrl) : null), e(Ot, r.displayConditions?.conditions ?? []), e(kt, r.displayConditions?.allowCustom ?? !1), e(xt, t.capabilities ?? {}), e(Lt, b);
|
|
5074
|
+
let ee = In(r.lint) ? null : Ln({
|
|
4930
5075
|
content: n.content,
|
|
4931
5076
|
options: r.lint ?? {},
|
|
4932
5077
|
updateBlock: n.updateBlock,
|
|
4933
5078
|
updateSettings: n.updateSettings,
|
|
4934
5079
|
removeBlock: n.removeBlock
|
|
4935
5080
|
});
|
|
4936
|
-
e(
|
|
4937
|
-
function
|
|
4938
|
-
|
|
5081
|
+
e(zt, ee);
|
|
5082
|
+
function I() {
|
|
5083
|
+
y?.(), ee?.destroy(), v?.destroy(), p.destroy();
|
|
4939
5084
|
}
|
|
4940
5085
|
return {
|
|
4941
5086
|
t: o,
|
|
4942
5087
|
format: c,
|
|
4943
|
-
history:
|
|
4944
|
-
blockActions:
|
|
4945
|
-
conditionPreview:
|
|
4946
|
-
autoSave:
|
|
4947
|
-
resolvedTheme:
|
|
4948
|
-
themeStyles:
|
|
4949
|
-
themeOverrides:
|
|
4950
|
-
registry:
|
|
4951
|
-
keyboardReorder:
|
|
4952
|
-
templateLint:
|
|
4953
|
-
popoverRoot:
|
|
4954
|
-
mergeTagSampleMode:
|
|
4955
|
-
previewResolution:
|
|
4956
|
-
appliesConditionFilter:
|
|
4957
|
-
registerCustomBlocks:
|
|
4958
|
-
destroy:
|
|
5088
|
+
history: p,
|
|
5089
|
+
blockActions: m,
|
|
5090
|
+
conditionPreview: g,
|
|
5091
|
+
autoSave: v,
|
|
5092
|
+
resolvedTheme: u,
|
|
5093
|
+
themeStyles: f,
|
|
5094
|
+
themeOverrides: d,
|
|
5095
|
+
registry: S,
|
|
5096
|
+
keyboardReorder: b,
|
|
5097
|
+
templateLint: ee,
|
|
5098
|
+
popoverRoot: O,
|
|
5099
|
+
mergeTagSampleMode: A,
|
|
5100
|
+
previewResolution: j,
|
|
5101
|
+
appliesConditionFilter: N,
|
|
5102
|
+
registerCustomBlocks: w,
|
|
5103
|
+
destroy: I
|
|
4959
5104
|
};
|
|
4960
5105
|
}
|
|
4961
5106
|
//#endregion
|
|
4962
|
-
export {
|
|
5107
|
+
export { wn as $, Rr as A, sr as B, ri as C, Gr as D, Kr as E, jr as F, dr as G, mr as H, Ar as I, Rn as J, ur as K, Or as L, Fr as M, Pr as N, Ur as O, Mr as P, Tn as Q, Dr as R, ai as S, Zr as T, pr as U, hr as V, fr as W, hn as X, jn as Y, Sn as Z, Ei as _, xc as a, gi as b, sc as c, ea as d, vn as et, Qi as f, Ri as g, Hi as h, wc as i, Ir as j, zr as k, ga as l, Zi as m, Bc as n, bn as nt, mc as o, $i as p, zn as q, Ac as r, Cn as rt, dc as s, Hc as t, cn as tt, ma as u, wi as v, Qr as w, si as x, vi as y, br as z };
|