@templatical/editor 0.40.0 → 0.42.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/README.md +1 -1
- package/dist/{AiChatSidebar-a8TPBAl2.js → AiChatSidebar-DqSoJAXx.js} +1 -1
- package/dist/{AiFeatureMenu-CbgDjLqk.js → AiFeatureMenu-CoBvE72q.js} +1 -1
- package/dist/{BlockPreviewCanvas-XNV83YGg.js → BlockPreviewCanvas-W6-MRpWz.js} +33 -33
- package/dist/{CloudHeaderExtras-C-tbLyfE.js → CloudHeaderExtras-AbsNuL9T.js} +1 -1
- package/dist/{CloudPanels-DnWDrgnQ.js → CloudPanels-BNL6rSeB.js} +2 -2
- package/dist/{CollaboratorBar-DUmeCkyD.js → CollaboratorBar-DlZ-wOL_.js} +1 -1
- package/dist/{CountdownToolbar-DkC-qSgq.js → CountdownToolbar-Bnq25sR-.js} +3 -3
- package/dist/{DesignReferenceSidebar-OoiYJAKS.js → DesignReferenceSidebar-Cl5eE8Kn.js} +1 -1
- package/dist/{LogicTagInsertButton-BimKobaG.js → LogicTagInsertButton-SI6irEtn.js} +243 -219
- package/dist/{MediaEditModal-BFWmufJK.js → MediaEditModal-C-InB-H2.js} +1 -1
- package/dist/{MediaPanels-BmDda5rY.js → MediaPanels-CTosUpeo.js} +1 -1
- package/dist/{MergeTagInput-DqpVzhy7.js → MergeTagInput-BMQGNh1k.js} +1 -1
- package/dist/{MergeTagModeToggle-BkIiAgpQ.js → MergeTagModeToggle-Cm9s-w6o.js} +1 -1
- package/dist/{ParagraphEditor-D67Cqh-T.js → ParagraphEditor-CnBPQCVo.js} +19 -19
- package/dist/{RestoreVersionDialog-BaKDuPCX.js → RestoreVersionDialog-B13whpxH.js} +1 -1
- package/dist/{RichTextEditorContent-AEtfKvLz.js → RichTextEditorContent-DOvhgc-7.js} +3 -3
- package/dist/{SaveBlockDialog-BxkI52fN.js → SaveBlockDialog-b5yrQfoN.js} +5 -5
- package/dist/{SavedBlocksBrowserModal-C4_25Kvn.js → SavedBlocksBrowserModal-DpqK4Zqp.js} +4 -4
- package/dist/{SavedBlocksPanels-DQ0w9G1O.js → SavedBlocksPanels-C2wURIlT.js} +1 -1
- package/dist/{SavedBlocksPickBar-CtH-sfxh.js → SavedBlocksPickBar-Bx9_SXVA.js} +1 -1
- package/dist/{TemplateSettings-BD1WNP4C.js → TemplateSettings-Gn9ps1R6.js} +3 -3
- package/dist/{TestEmailModal-DZi58FU9.js → TestEmailModal-DaIaklcg.js} +5 -5
- package/dist/{TestEmailPanel-D__9Wvgz.js → TestEmailPanel-CKSvzakC.js} +1 -1
- package/dist/{TitleEditor-v5p89Djs.js → TitleEditor-C66Jk73n.js} +7 -7
- package/dist/{ToggleSwitch-CJfQ8u57.js → ToggleSwitch-BqttX9lY.js} +1 -1
- package/dist/{Toolbar-C7SjilzH.js → Toolbar-DVsKYQaC.js} +846 -553
- package/dist/{TplModal-B8uLyoXE.js → TplModal-DRQln7xH.js} +2 -2
- package/dist/{VersionHistoryPanels-DfNrRT6y.js → VersionHistoryPanels-Df5WjNah.js} +1 -1
- package/dist/{WrapperBlock-yGmKw0T-.js → WrapperBlock-B0cUORGz.js} +4 -4
- package/dist/{blockTypeIcons-B0Bq1WT1.js → blockTypeIcons-DfQNZnl7.js} +1 -1
- package/dist/bundle-stats.json +7 -7
- package/dist/{ca-Ckgw9yd0.js → ca--zGWn9AU.js} +14 -0
- package/dist/cdn/chunks/{AiChatSidebar-mKImUXi6.js → AiChatSidebar-DD17BwXn.js} +10 -10
- package/dist/cdn/chunks/{AiChatSidebar-mKImUXi6.js.map → AiChatSidebar-DD17BwXn.js.map} +1 -1
- package/dist/cdn/chunks/{AiFeatureMenu-23HCL517.js → AiFeatureMenu-Di381OsL.js} +5 -5
- package/dist/cdn/chunks/{AiFeatureMenu-23HCL517.js.map → AiFeatureMenu-Di381OsL.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-DS1pUf5g.js → BlockIssueBadge-BR_N3nRh.js} +2 -2
- package/dist/cdn/chunks/{BlockIssueBadge-DS1pUf5g.js.map → BlockIssueBadge-BR_N3nRh.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-DObWyQfh.js → BlockPreviewCanvas-BXpcAiiY.js} +28 -28
- package/dist/cdn/chunks/{BlockPreviewCanvas-DObWyQfh.js.map → BlockPreviewCanvas-BXpcAiiY.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-DOB_uWpt.js → CloudHeaderExtras-BEM2eWfF.js} +3 -3
- package/dist/cdn/chunks/{CloudHeaderExtras-DOB_uWpt.js.map → CloudHeaderExtras-BEM2eWfF.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-DcAn5QW7.js → CloudPanels-D7nK1-bm.js} +4 -4
- package/dist/cdn/chunks/{CloudPanels-DcAn5QW7.js.map → CloudPanels-D7nK1-bm.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-C0M8c2Vv.js → CollaboratorBar-D1SUwahw.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-C0M8c2Vv.js.map → CollaboratorBar-D1SUwahw.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsPanel-BtAGZfF6.js → CommentsPanel-qsLMAlJU.js} +2 -2
- package/dist/cdn/chunks/{CommentsPanel-BtAGZfF6.js.map → CommentsPanel-qsLMAlJU.js.map} +1 -1
- package/dist/cdn/chunks/{CommentsSidebar-Ws07MXYj.js → CommentsSidebar-CTwEE-s_.js} +16 -16
- package/dist/cdn/chunks/{CommentsSidebar-Ws07MXYj.js.map → CommentsSidebar-CTwEE-s_.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-Bu93WiS8.js → CountdownToolbar-BJTcnIQ-.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-Bu93WiS8.js.map → CountdownToolbar-BJTcnIQ-.js.map} +1 -1
- package/dist/cdn/chunks/{DesignReferenceSidebar-BlSdh5B7.js → DesignReferenceSidebar-Dl3eEGtS.js} +9 -9
- package/dist/cdn/chunks/{DesignReferenceSidebar-BlSdh5B7.js.map → DesignReferenceSidebar-Dl3eEGtS.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-CKkv9z9g.js → IssuesPanel-L9Gq_T8n.js} +8 -8
- package/dist/cdn/chunks/{IssuesPanel-CKkv9z9g.js.map → IssuesPanel-L9Gq_T8n.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-CHc1yZ9v.js → LogicTagInsertButton-3pIbVE9p.js} +250 -226
- package/dist/cdn/chunks/LogicTagInsertButton-3pIbVE9p.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-CZBZviu2.js → MediaEditModal-rTjYl-fV.js} +2 -2
- package/dist/cdn/chunks/{MediaEditModal-CZBZviu2.js.map → MediaEditModal-rTjYl-fV.js.map} +1 -1
- package/dist/cdn/chunks/{MediaPanels-Bq5b-XJM.js → MediaPanels-DMXRQVqg.js} +2 -2
- package/dist/cdn/chunks/{MediaPanels-Bq5b-XJM.js.map → MediaPanels-DMXRQVqg.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput--qTYfCWk.js → MergeTagInput-JcBzr77a.js} +2 -2
- package/dist/cdn/chunks/{MergeTagInput--qTYfCWk.js.map → MergeTagInput-JcBzr77a.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-CdWIGo3Q.js → MergeTagModeToggle-CYmueXS2.js} +10 -10
- package/dist/cdn/chunks/{MergeTagModeToggle-CdWIGo3Q.js.map → MergeTagModeToggle-CYmueXS2.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BilbVtrG.js → ParagraphEditor-DbjFDnYm.js} +39 -39
- package/dist/cdn/chunks/{ParagraphEditor-BilbVtrG.js.map → ParagraphEditor-DbjFDnYm.js.map} +1 -1
- package/dist/cdn/chunks/{RestoreVersionDialog-Q-a44Vjv.js → RestoreVersionDialog-pANCWcce.js} +3 -3
- package/dist/cdn/chunks/{RestoreVersionDialog-Q-a44Vjv.js.map → RestoreVersionDialog-pANCWcce.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-Fzuu9pLP.js → RichTextEditorContent-BtM1or8A.js} +5 -5
- package/dist/cdn/chunks/{RichTextEditorContent-Fzuu9pLP.js.map → RichTextEditorContent-BtM1or8A.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-DeW_M6kh.js → SaveBlockDialog-CGM3mrGj.js} +38 -38
- package/dist/cdn/chunks/{SaveBlockDialog-DeW_M6kh.js.map → SaveBlockDialog-CGM3mrGj.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BzQWibKG.js → SavedBlocksBrowserModal-C6Z8AvtD.js} +10 -10
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BzQWibKG.js.map → SavedBlocksBrowserModal-C6Z8AvtD.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-Ce1RePjk.js → SavedBlocksPanels-DNwKmnhp.js} +2 -2
- package/dist/cdn/chunks/{SavedBlocksPanels-Ce1RePjk.js.map → SavedBlocksPanels-DNwKmnhp.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-DIDl6xfy.js → SavedBlocksPickBar-D2p1ufB4.js} +3 -3
- package/dist/cdn/chunks/{SavedBlocksPickBar-DIDl6xfy.js.map → SavedBlocksPickBar-D2p1ufB4.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateScoringPanel-d_Ppowsq.js → TemplateScoringPanel-BDB4RErx.js} +19 -19
- package/dist/cdn/chunks/{TemplateScoringPanel-d_Ppowsq.js.map → TemplateScoringPanel-BDB4RErx.js.map} +1 -1
- package/dist/cdn/chunks/{TemplateSettings-Dr5OJ0Gi.js → TemplateSettings-DVN1t3yF.js} +9 -9
- package/dist/cdn/chunks/{TemplateSettings-Dr5OJ0Gi.js.map → TemplateSettings-DVN1t3yF.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-CWTmaJuT.js → TestEmailModal-DZBCmBtT.js} +7 -7
- package/dist/cdn/chunks/{TestEmailModal-CWTmaJuT.js.map → TestEmailModal-DZBCmBtT.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailPanel-BdYsVHXA.js → TestEmailPanel-1ibwYCUl.js} +2 -2
- package/dist/cdn/chunks/{TestEmailPanel-BdYsVHXA.js.map → TestEmailPanel-1ibwYCUl.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-pJeeZ-PX.js → TitleEditor-BRl2qKbd.js} +13 -13
- package/dist/cdn/chunks/{TitleEditor-pJeeZ-PX.js.map → TitleEditor-BRl2qKbd.js.map} +1 -1
- package/dist/cdn/chunks/{ToggleSwitch-0dGCYnRY.js → ToggleSwitch-niSL2uog.js} +2 -2
- package/dist/cdn/chunks/{ToggleSwitch-0dGCYnRY.js.map → ToggleSwitch-niSL2uog.js.map} +1 -1
- package/dist/cdn/chunks/{Toolbar-BsiHW9gY.js → Toolbar-tTl0P-rr.js} +814 -566
- package/dist/cdn/chunks/Toolbar-tTl0P-rr.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-CEuGD7pt.js → TplModal-C_eIPykE.js} +3 -3
- package/dist/cdn/chunks/{TplModal-CEuGD7pt.js.map → TplModal-C_eIPykE.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-B3-hNu9c.js → VersionHistoryMenu-Ww57XAzj.js} +7 -7
- package/dist/cdn/chunks/{VersionHistoryMenu-B3-hNu9c.js.map → VersionHistoryMenu-Ww57XAzj.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-C1yck5gT.js → VersionHistoryPanels-w0EG_qVW.js} +2 -2
- package/dist/cdn/chunks/{VersionHistoryPanels-C1yck5gT.js.map → VersionHistoryPanels-w0EG_qVW.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-PzVQSBJE.js → VersionPreviewBanner-Bbd4C-AN.js} +2 -2
- package/dist/cdn/chunks/{VersionPreviewBanner-PzVQSBJE.js.map → VersionPreviewBanner-Bbd4C-AN.js.map} +1 -1
- package/dist/cdn/chunks/{WrapperBlock-DGkbmj06.js → WrapperBlock-Ch4KeMIb.js} +4 -4
- package/dist/cdn/chunks/{WrapperBlock-DGkbmj06.js.map → WrapperBlock-Ch4KeMIb.js.map} +1 -1
- package/dist/cdn/chunks/blockTypeIcons-CyPXFh7L.js +21 -0
- package/dist/cdn/chunks/{blockTypeIcons-raBjStuv.js.map → blockTypeIcons-CyPXFh7L.js.map} +1 -1
- package/dist/cdn/chunks/{ca-Ckgw9yd0.js → ca--zGWn9AU.js} +15 -1
- package/dist/cdn/chunks/ca--zGWn9AU.js.map +1 -0
- package/dist/cdn/chunks/{cloud-CIT4yPp4.js → cloud-De-eh1u6.js} +2 -2
- package/dist/cdn/chunks/{cloud-CIT4yPp4.js.map → cloud-De-eh1u6.js.map} +1 -1
- package/dist/cdn/chunks/{createCloudRuntime-COUxbPvd.js → createCloudRuntime-DsaUaWvr.js} +3 -3
- package/dist/cdn/chunks/{createCloudRuntime-COUxbPvd.js.map → createCloudRuntime-DsaUaWvr.js.map} +1 -1
- package/dist/cdn/chunks/{de-D4dweQw8.js → de-BRNLKcDl.js} +15 -1
- package/dist/cdn/chunks/de-BRNLKcDl.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-zxvWz8R6.js → editor-modal-BdI0iA5r.js} +89 -88
- package/dist/cdn/chunks/{editor-modal-zxvWz8R6.js.map → editor-modal-BdI0iA5r.js.map} +1 -1
- package/dist/cdn/chunks/en-Cs-nw16K.js +2 -0
- package/dist/{en-VE7R7NyL.js → cdn/chunks/en-JJjqHMjy.js} +16 -0
- package/dist/cdn/chunks/en-JJjqHMjy.js.map +1 -0
- package/dist/cdn/chunks/{es-B9OhP8H3.js → es-BIh8BxV9.js} +15 -1
- package/dist/cdn/chunks/es-BIh8BxV9.js.map +1 -0
- package/dist/cdn/chunks/{extensions-CafoGF65.js → extensions-DK_9-6Bd.js} +4 -4
- package/dist/cdn/chunks/{extensions-CafoGF65.js.map → extensions-DK_9-6Bd.js.map} +1 -1
- package/dist/{fr-wrXhIi00.js → cdn/chunks/fr-C5VUZogP.js} +16 -0
- package/dist/cdn/chunks/fr-C5VUZogP.js.map +1 -0
- package/dist/cdn/chunks/{icons-BKkJ-5xF.js → icons-Bad3WZ3G.js} +49 -8
- package/dist/cdn/chunks/icons-Bad3WZ3G.js.map +1 -0
- package/dist/cdn/chunks/ja-DhlWUfke.js +94 -0
- package/dist/cdn/chunks/ja-DhlWUfke.js.map +1 -0
- package/dist/cdn/chunks/ja-x5JYxaCW.js +639 -0
- package/dist/cdn/chunks/ja-x5JYxaCW.js.map +1 -0
- package/dist/cdn/chunks/{nl-DeFatKJe.js → nl-UXxFyXV6.js} +15 -1
- package/dist/cdn/chunks/{nl-DeFatKJe.js.map → nl-UXxFyXV6.js.map} +1 -1
- package/dist/cdn/chunks/{preRenderCustomBlocks-Dpj-_cOj.js → preRenderCustomBlocks-h4ZFBKbD.js} +2 -2
- package/dist/cdn/chunks/{preRenderCustomBlocks-Dpj-_cOj.js.map → preRenderCustomBlocks-h4ZFBKbD.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-Bh1J8ey6.js → pt-BR-DHm3SP6W.js} +15 -1
- package/dist/cdn/chunks/pt-BR-DHm3SP6W.js.map +1 -0
- package/dist/cdn/chunks/{socialIcons-BvYNMn1G.js → socialIcons-ZOCwCCyn.js} +3 -3
- package/dist/cdn/chunks/{socialIcons-BvYNMn1G.js.map → socialIcons-ZOCwCCyn.js.map} +1 -1
- package/dist/cdn/chunks/{src-DveVYoWS.js → src-BR3I3gOW.js} +265 -224
- package/dist/cdn/chunks/src-BR3I3gOW.js.map +1 -0
- package/dist/cdn/chunks/{src-CbGCES0u.js → src-BxoLKnkl.js} +178 -165
- package/dist/cdn/chunks/src-BxoLKnkl.js.map +1 -0
- package/dist/cdn/chunks/{src-Cnc5E71L.js → src-fZSLjhjy.js} +12 -12
- package/dist/cdn/chunks/{src-Cnc5E71L.js.map → src-fZSLjhjy.js.map} +1 -1
- package/dist/cdn/chunks/{useEditorCore-CQraU2s_.js → useEditorCore-yd40TFKy.js} +467 -446
- package/dist/cdn/chunks/useEditorCore-yd40TFKy.js.map +1 -0
- package/dist/cdn/chunks/{useLogicTag-DF7-l66G.js → useLogicTag-J_i_hvZg.js} +2 -2
- package/dist/cdn/chunks/{useLogicTag-DF7-l66G.js.map → useLogicTag-J_i_hvZg.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-DbIHw4NG.js → useMergeTag-C5MyHYxJ.js} +2 -2
- package/dist/cdn/chunks/{useMergeTag-DbIHw4NG.js.map → useMergeTag-C5MyHYxJ.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-BJRvAb-h.js → usePopoverPosition-DGXjXKjM.js} +25 -12
- package/dist/cdn/chunks/usePopoverPosition-DGXjXKjM.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +64 -64
- package/dist/{cloud-DsqqUfzh.js → cloud-AO_X8T9g.js} +1 -1
- package/dist/{createCloudRuntime-iLflkYzP.js → createCloudRuntime-D641nhri.js} +2 -2
- package/dist/{de-D4dweQw8.js → de-BRNLKcDl.js} +14 -0
- package/dist/{dist-DbUZvK04.js → dist-iLUVPysa.js} +263 -222
- package/dist/{editor-modal-Czq1I8oC.js → editor-modal-qzmEVcIk.js} +3 -2
- package/dist/en-1tgLzB8q.js +2 -0
- package/dist/{cdn/chunks/en-VE7R7NyL.js → en-JJjqHMjy.js} +14 -2
- package/dist/{es-B9OhP8H3.js → es-BIh8BxV9.js} +14 -0
- package/dist/{extensions-DDhjuVKy.js → extensions-DoT2-_pz.js} +11 -11
- package/dist/{cdn/chunks/fr-wrXhIi00.js → fr-C5VUZogP.js} +14 -2
- package/dist/ja-DhlWUfke.js +92 -0
- package/dist/ja-x5JYxaCW.js +637 -0
- package/dist/{nl-DeFatKJe.js → nl-UXxFyXV6.js} +14 -0
- package/dist/{preRenderCustomBlocks-BBSqQgke.js → preRenderCustomBlocks-CTstI3Q-.js} +4 -4
- package/dist/{pt-BR-Bh1J8ey6.js → pt-BR-DHm3SP6W.js} +14 -0
- package/dist/{socialIcons-O7PZCW2P.js → socialIcons-CACVa6m_.js} +46 -46
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +109 -109
- package/dist/{useEditorCore-Dt_VWNqX.js → useEditorCore-LyNoGs0m.js} +902 -881
- package/dist/{useLogicTag-D9pvgxQR.js → useLogicTag-BaH8gey0.js} +1 -1
- package/dist/{useMergeTag-BaVFPdlq.js → useMergeTag-Cyad1yBE.js} +1 -1
- package/dist/{usePopoverPosition-DH7z3Ghm.js → usePopoverPosition-BYmd-lhR.js} +24 -11
- package/package.json +8 -8
- package/dist/cdn/chunks/LogicTagInsertButton-CHc1yZ9v.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-BsiHW9gY.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-raBjStuv.js +0 -21
- package/dist/cdn/chunks/ca-Ckgw9yd0.js.map +0 -1
- package/dist/cdn/chunks/de-D4dweQw8.js.map +0 -1
- package/dist/cdn/chunks/en-BcQ9ovQu.js +0 -2
- package/dist/cdn/chunks/en-VE7R7NyL.js.map +0 -1
- package/dist/cdn/chunks/es-B9OhP8H3.js.map +0 -1
- package/dist/cdn/chunks/fr-wrXhIi00.js.map +0 -1
- package/dist/cdn/chunks/icons-BKkJ-5xF.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-Bh1J8ey6.js.map +0 -1
- package/dist/cdn/chunks/src-CbGCES0u.js.map +0 -1
- package/dist/cdn/chunks/src-DveVYoWS.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CQraU2s_.js.map +0 -1
- package/dist/cdn/chunks/usePopoverPosition-BJRvAb-h.js.map +0 -1
- package/dist/en-DQqmtndQ.js +0 -2
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import { $ as e, A as t, At as n, B as r, D as i, E as a, F as o, J as s, K as c, M as l, N as u, O as d, R as f, S as p, V as m, W as h, Y as g, Z as _, _ as v, at as y, b, c as x, d as S, g as C, h as w, it as T, j as E, jt as D, k as O, kt as k, l as A, nt as j, r as M, rt as ee, s as N, u as P, v as F, y as te } from "./vue.runtime.esm-bundler-CyqhBwpY.js";
|
|
2
2
|
import { c as I, o as ne, s as re } from "./runtime-dom.esm-bundler-BGbPz4-g.js";
|
|
3
|
-
import { $ as ie,
|
|
4
|
-
import { C as
|
|
5
|
-
import { _ as
|
|
6
|
-
import { a as
|
|
7
|
-
import { $ as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { i as
|
|
11
|
-
import { r 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 { t as
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
3
|
+
import { $ as ie, A as ae, B as oe, C as se, D as ce, F as le, H as ue, I as de, L as fe, N as pe, O as me, Q as he, S as ge, T as _e, U as ve, V as ye, W as be, X as xe, Y as Se, Z as Ce, _ as we, a as Te, b as Ee, c as De, et as Oe, g as ke, i as Ae, it as je, j as Me, k as Ne, m as Pe, nt as Fe, o as Ie, q as Le, r as Re, rt as ze, tt as Be, u as Ve, v as He, w as Ue, x as We, z as Ge } from "./dist-iLUVPysa.js";
|
|
4
|
+
import { C as Ke, _ as qe, a as Je, b as Ye, c as Xe, d as Ze, g as Qe, i as $e, l as et, n as tt, o as nt, s as rt, t as it, u as at, w as ot, x as st } from "./socialIcons-CACVa6m_.js";
|
|
5
|
+
import { _ as ct, h as lt, v as ut, y as dt } from "./dist-8VFzbeu9.js";
|
|
6
|
+
import { a as ft, c as pt, i as mt } from "./dist-BDuPwOyn.js";
|
|
7
|
+
import { $ as ht, A as gt, B as _t, C as vt, D as yt, E as bt, F as xt, G as St, H as Ct, I as wt, J as Tt, K as Et, L as Dt, M as Ot, N as kt, O as At, P as jt, Q as Mt, R as Nt, S as Pt, T as Ft, V as It, X as Lt, Y as Rt, Z as zt, _ as Bt, a as Vt, b as Ht, c as Ut, d as Wt, f as Gt, g as Kt, h as qt, j as Jt, k as Yt, l as Xt, m as Zt, n as Qt, o as $t, p as en, q as tn, r as nn, s as rn, v as an, w as on, x as sn, y as cn, z as ln } from "./keys-CDqfZIRt.js";
|
|
8
|
+
import { t as un } from "./useI18n-B_CdcBwG.js";
|
|
9
|
+
import { t as dn } from "./logger-BBlvSn6q.js";
|
|
10
|
+
import { i as fn, r as pn, s as mn, t as hn } from "./usePopoverPosition-BYmd-lhR.js";
|
|
11
|
+
import { r as gn, t as _n } from "./templateSettingsFields-YCFVBVYh.js";
|
|
12
|
+
import { t as vn } from "./createLucideIcon-BxY5yz5u.js";
|
|
13
|
+
import { t as yn } from "./copy-mw6PVnOJ.js";
|
|
14
|
+
import { t as bn } from "./loader-circle-z5eeqasv.js";
|
|
15
|
+
import { t as xn } from "./message-circle-BsQ9hEup.js";
|
|
16
|
+
import { t as Sn } from "./trash-DnOkfu2V.js";
|
|
17
|
+
import { t as Cn } from "./triangle-alert-DGLAyXnh.js";
|
|
18
|
+
import { t as wn } from "./upload-BBDme2cy.js";
|
|
19
|
+
import { t as Tn } from "./LoadingTrack-C1Epulqq.js";
|
|
20
|
+
import { t as En } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
21
|
+
import { t as Dn } from "./useEditorRoot-CkB_5d0h.js";
|
|
22
22
|
import "./useCloudI18n-DpEsiLeR.js";
|
|
23
|
-
import { t as
|
|
24
|
-
import { t as
|
|
25
|
-
import { t as
|
|
23
|
+
import { t as On } from "./useMergeTag-Cyad1yBE.js";
|
|
24
|
+
import { t as kn } from "./useLogicTag-BaH8gey0.js";
|
|
25
|
+
import { t as An } from "./useAliveFlag-BkKyhkwZ.js";
|
|
26
26
|
//#region src/utils/activeEditorTracker.ts
|
|
27
|
-
var
|
|
28
|
-
function
|
|
29
|
-
let e = ++
|
|
30
|
-
return
|
|
27
|
+
var jn = /* @__PURE__ */ new Set(), Mn = 0, Nn = 0;
|
|
28
|
+
function Pn() {
|
|
29
|
+
let e = ++Nn;
|
|
30
|
+
return jn.add(e), Mn === 0 && (Mn = e), {
|
|
31
31
|
id: e,
|
|
32
|
-
isActive: () =>
|
|
32
|
+
isActive: () => jn.size <= 1 || Mn === e,
|
|
33
33
|
claim: () => {
|
|
34
|
-
|
|
34
|
+
Mn = e;
|
|
35
35
|
},
|
|
36
36
|
dispose: () => {
|
|
37
|
-
if (
|
|
38
|
-
let e = Array.from(
|
|
39
|
-
|
|
37
|
+
if (jn.delete(e), Mn === e) {
|
|
38
|
+
let e = Array.from(jn);
|
|
39
|
+
Mn = e[e.length - 1] ?? 0;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
44
|
//#endregion
|
|
45
45
|
//#region src/composables/usePreviewResolution.ts
|
|
46
|
-
var
|
|
47
|
-
function
|
|
46
|
+
var Fn = 500;
|
|
47
|
+
function In(e) {
|
|
48
48
|
let t = typeof e.resolvePreview == "function", n = _(null), r = _(!1), i = _(!1), a = 0, o = null;
|
|
49
49
|
function c() {
|
|
50
50
|
o !== null && (clearTimeout(o), o = null);
|
|
@@ -55,13 +55,13 @@ function Nn(e) {
|
|
|
55
55
|
let o = ++a;
|
|
56
56
|
r.value = !0;
|
|
57
57
|
let s = {
|
|
58
|
-
content:
|
|
58
|
+
content: ie(e.getContent()),
|
|
59
59
|
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
60
60
|
};
|
|
61
61
|
try {
|
|
62
62
|
let e = await t(s);
|
|
63
63
|
if (o !== a) return;
|
|
64
|
-
if (!
|
|
64
|
+
if (!be(e)) {
|
|
65
65
|
i.value = !0;
|
|
66
66
|
return;
|
|
67
67
|
}
|
|
@@ -81,7 +81,7 @@ function Nn(e) {
|
|
|
81
81
|
}
|
|
82
82
|
o = setTimeout(() => {
|
|
83
83
|
o = null, l();
|
|
84
|
-
},
|
|
84
|
+
}, Fn);
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
return f(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
|
|
@@ -103,7 +103,7 @@ function Nn(e) {
|
|
|
103
103
|
}
|
|
104
104
|
//#endregion
|
|
105
105
|
//#region src/composables/useImageUrlResolver.ts
|
|
106
|
-
function
|
|
106
|
+
function Ln(e) {
|
|
107
107
|
let t = g(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
108
108
|
function r(e) {
|
|
109
109
|
return t.get(e);
|
|
@@ -136,8 +136,8 @@ function Pn(e) {
|
|
|
136
136
|
lookup: a
|
|
137
137
|
};
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
let t = p(
|
|
139
|
+
function Rn(e) {
|
|
140
|
+
let t = p(sn, null), n = N(e);
|
|
141
141
|
if (!t) return n;
|
|
142
142
|
let r;
|
|
143
143
|
function i() {
|
|
@@ -166,7 +166,7 @@ function Fn(e) {
|
|
|
166
166
|
}
|
|
167
167
|
//#endregion
|
|
168
168
|
//#region src/composables/useMergeTagPicker.ts
|
|
169
|
-
function
|
|
169
|
+
function zn() {
|
|
170
170
|
let e = _(!1), t = _([]), n = _(null), r = null;
|
|
171
171
|
function i(i, a) {
|
|
172
172
|
if (r) {
|
|
@@ -197,7 +197,7 @@ function In() {
|
|
|
197
197
|
}
|
|
198
198
|
//#endregion
|
|
199
199
|
//#region src/composables/useLogicTagPicker.ts
|
|
200
|
-
function
|
|
200
|
+
function Bn() {
|
|
201
201
|
let e = _(!1), t = _([]), n = _([]), r = null;
|
|
202
202
|
function i(i, a) {
|
|
203
203
|
if (r) {
|
|
@@ -228,17 +228,17 @@ function Ln() {
|
|
|
228
228
|
}
|
|
229
229
|
//#endregion
|
|
230
230
|
//#region src/composables/useTemplateLint.ts
|
|
231
|
-
function
|
|
231
|
+
function Vn(e) {
|
|
232
232
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
233
233
|
}
|
|
234
|
-
function
|
|
235
|
-
let n = _([]), r = _(!1), i = _(!1), a = e(null), o =
|
|
234
|
+
function Hn(t) {
|
|
235
|
+
let n = _([]), r = _(!1), i = _(!1), a = e(null), o = Vn(t.options), s = null, c = !1;
|
|
236
236
|
o || l();
|
|
237
237
|
async function l() {
|
|
238
238
|
try {
|
|
239
239
|
let e = await import("@templatical/quality");
|
|
240
240
|
if (c) return;
|
|
241
|
-
a.value = { lintTemplate: e.lintTemplate }, r.value = !0, u(), s =
|
|
241
|
+
a.value = { lintTemplate: e.lintTemplate }, r.value = !0, u(), s = dt(t.content, u, {
|
|
242
242
|
debounce: t.debounce ?? 500,
|
|
243
243
|
deep: !0
|
|
244
244
|
});
|
|
@@ -273,7 +273,7 @@ function zn(t) {
|
|
|
273
273
|
}
|
|
274
274
|
//#endregion
|
|
275
275
|
//#region src/composables/useKeyboardReorder.ts
|
|
276
|
-
function
|
|
276
|
+
function Un(e, t, n = []) {
|
|
277
277
|
let r = _(null), i = _(""), a = null;
|
|
278
278
|
function o(t) {
|
|
279
279
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -300,7 +300,7 @@ function Bn(e, t, n = []) {
|
|
|
300
300
|
let i = o(r);
|
|
301
301
|
if (!i) return "";
|
|
302
302
|
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
303
|
-
return a ?
|
|
303
|
+
return a ? Ze(a, t.t, n) : "";
|
|
304
304
|
}
|
|
305
305
|
function c(t, n) {
|
|
306
306
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -369,13 +369,13 @@ function Bn(e, t, n = []) {
|
|
|
369
369
|
}
|
|
370
370
|
//#endregion
|
|
371
371
|
//#region src/composables/useUiTheme.ts
|
|
372
|
-
function
|
|
373
|
-
let t =
|
|
372
|
+
function Wn(e) {
|
|
373
|
+
let t = pt("(prefers-color-scheme: dark)");
|
|
374
374
|
return { resolvedTheme: N(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
375
375
|
}
|
|
376
376
|
//#endregion
|
|
377
377
|
//#region src/composables/useThemeStyles.ts
|
|
378
|
-
var
|
|
378
|
+
var Gn = {
|
|
379
379
|
bg: "--tpl-bg",
|
|
380
380
|
bgElevated: "--tpl-bg-elevated",
|
|
381
381
|
bgHover: "--tpl-bg-hover",
|
|
@@ -399,10 +399,10 @@ var Hn = {
|
|
|
399
399
|
dangerLight: "--tpl-danger-light",
|
|
400
400
|
canvasBg: "--tpl-canvas-bg"
|
|
401
401
|
};
|
|
402
|
-
function
|
|
402
|
+
function Kn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
403
403
|
return { themeStyles: N(() => {
|
|
404
404
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
405
|
-
if (a) for (let [e, t] of Object.entries(
|
|
405
|
+
if (a) for (let [e, t] of Object.entries(Gn)) {
|
|
406
406
|
let n = a[e];
|
|
407
407
|
n && (r[t] = n);
|
|
408
408
|
}
|
|
@@ -411,7 +411,7 @@ function Un({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
411
411
|
}
|
|
412
412
|
//#endregion
|
|
413
413
|
//#region src/composables/useBlockRegistry.ts
|
|
414
|
-
function
|
|
414
|
+
function qn() {
|
|
415
415
|
let t = e(/* @__PURE__ */ new Map());
|
|
416
416
|
function n(e, n) {
|
|
417
417
|
t.value.set(e, n), T(t);
|
|
@@ -419,7 +419,7 @@ function Wn() {
|
|
|
419
419
|
function r(e, n) {
|
|
420
420
|
let r = `custom:${e.type}`, i = {
|
|
421
421
|
component: n,
|
|
422
|
-
createBlock: () =>
|
|
422
|
+
createBlock: () => He(e),
|
|
423
423
|
definition: e
|
|
424
424
|
};
|
|
425
425
|
t.value.set(r, i), T(t);
|
|
@@ -451,7 +451,7 @@ function Wn() {
|
|
|
451
451
|
strictFilters: !1
|
|
452
452
|
}).parseAndRender(t.template, e.fieldValues);
|
|
453
453
|
} catch (t) {
|
|
454
|
-
return
|
|
454
|
+
return dn.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
function l(e) {
|
|
@@ -469,9 +469,9 @@ function Wn() {
|
|
|
469
469
|
}
|
|
470
470
|
//#endregion
|
|
471
471
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
472
|
-
function
|
|
472
|
+
function Jn(e, t) {
|
|
473
473
|
return N(() => {
|
|
474
|
-
let n =
|
|
474
|
+
let n = Yn(e.value.blocks);
|
|
475
475
|
if (n.size === 0) return [];
|
|
476
476
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
477
477
|
for (let e of n) {
|
|
@@ -483,49 +483,49 @@ function Gn(e, t) {
|
|
|
483
483
|
return i;
|
|
484
484
|
});
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function Yn(e) {
|
|
487
487
|
let t = /* @__PURE__ */ new Set();
|
|
488
|
-
return
|
|
488
|
+
return Xn(e, t), t;
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function Xn(e, t) {
|
|
491
491
|
for (let n of e) {
|
|
492
|
-
if (
|
|
492
|
+
if (ye(n)) {
|
|
493
493
|
t.add(n.customType);
|
|
494
494
|
continue;
|
|
495
495
|
}
|
|
496
496
|
if (n.type === "section") {
|
|
497
497
|
let e = n.children;
|
|
498
498
|
if (!e) continue;
|
|
499
|
-
for (let n of e)
|
|
500
|
-
} else
|
|
499
|
+
for (let n of e) Xn(n, t);
|
|
500
|
+
} else Le(n) && Xn(n.children, t);
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
503
|
//#endregion
|
|
504
504
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
505
|
-
var
|
|
505
|
+
var Zn = [
|
|
506
506
|
{
|
|
507
507
|
type: "section",
|
|
508
|
-
createBlock:
|
|
508
|
+
createBlock: _e
|
|
509
509
|
},
|
|
510
510
|
{
|
|
511
511
|
type: "title",
|
|
512
|
-
createBlock:
|
|
512
|
+
createBlock: ae
|
|
513
513
|
},
|
|
514
514
|
{
|
|
515
515
|
type: "paragraph",
|
|
516
|
-
createBlock:
|
|
516
|
+
createBlock: Ue
|
|
517
517
|
},
|
|
518
518
|
{
|
|
519
519
|
type: "image",
|
|
520
|
-
createBlock:
|
|
520
|
+
createBlock: ge
|
|
521
521
|
},
|
|
522
522
|
{
|
|
523
523
|
type: "button",
|
|
524
|
-
createBlock:
|
|
524
|
+
createBlock: ke
|
|
525
525
|
},
|
|
526
526
|
{
|
|
527
527
|
type: "divider",
|
|
528
|
-
createBlock:
|
|
528
|
+
createBlock: Ee
|
|
529
529
|
},
|
|
530
530
|
{
|
|
531
531
|
type: "video",
|
|
@@ -533,31 +533,31 @@ var Jn = [
|
|
|
533
533
|
},
|
|
534
534
|
{
|
|
535
535
|
type: "social",
|
|
536
|
-
createBlock:
|
|
536
|
+
createBlock: ce
|
|
537
537
|
},
|
|
538
538
|
{
|
|
539
539
|
type: "menu",
|
|
540
|
-
createBlock:
|
|
540
|
+
createBlock: se
|
|
541
541
|
},
|
|
542
542
|
{
|
|
543
543
|
type: "table",
|
|
544
|
-
createBlock:
|
|
544
|
+
createBlock: Ne
|
|
545
545
|
},
|
|
546
546
|
{
|
|
547
547
|
type: "spacer",
|
|
548
|
-
createBlock:
|
|
548
|
+
createBlock: me
|
|
549
549
|
},
|
|
550
550
|
{
|
|
551
551
|
type: "html",
|
|
552
|
-
createBlock:
|
|
552
|
+
createBlock: We
|
|
553
553
|
},
|
|
554
554
|
{
|
|
555
555
|
type: "countdown",
|
|
556
|
-
createBlock:
|
|
556
|
+
createBlock: we
|
|
557
557
|
}
|
|
558
558
|
];
|
|
559
|
-
function
|
|
560
|
-
for (let n of
|
|
559
|
+
function Qn(e, t) {
|
|
560
|
+
for (let n of Zn) {
|
|
561
561
|
let r = t[n.type];
|
|
562
562
|
r && e.registerBuiltIn(n.type, {
|
|
563
563
|
component: r,
|
|
@@ -567,33 +567,33 @@ function Yn(e, t) {
|
|
|
567
567
|
}
|
|
568
568
|
//#endregion
|
|
569
569
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
570
|
-
function
|
|
570
|
+
function $n(e) {
|
|
571
571
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
572
572
|
}
|
|
573
573
|
//#endregion
|
|
574
574
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
575
|
-
function
|
|
575
|
+
function er(e) {
|
|
576
576
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
577
577
|
}
|
|
578
|
-
function
|
|
579
|
-
let r = new Set(e.map((e) =>
|
|
580
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
578
|
+
function tr(e, t, n) {
|
|
579
|
+
let r = new Set(e.map((e) => pn(e))), i = [], a = (e, t) => {
|
|
580
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(pn(o)) && i.push(`${t}.${n}: ${o}`) : er(o) && a(o, `${t}.${n}`);
|
|
581
581
|
}, o = t;
|
|
582
582
|
for (let [e, t] of Object.entries(Re)) {
|
|
583
583
|
let n = o?.[e];
|
|
584
584
|
a({
|
|
585
585
|
...t,
|
|
586
|
-
...
|
|
586
|
+
...er(n) ? n : {}
|
|
587
587
|
}, e);
|
|
588
588
|
}
|
|
589
589
|
return a({
|
|
590
|
-
...
|
|
590
|
+
...Ae,
|
|
591
591
|
...n ?? {}
|
|
592
592
|
}, "template"), i;
|
|
593
593
|
}
|
|
594
594
|
//#endregion
|
|
595
595
|
//#region src/utils/localizedBlockDefaults.ts
|
|
596
|
-
function
|
|
596
|
+
function nr(e) {
|
|
597
597
|
return {
|
|
598
598
|
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
599
599
|
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
@@ -602,62 +602,63 @@ function $n(e) {
|
|
|
602
602
|
}
|
|
603
603
|
//#endregion
|
|
604
604
|
//#region src/i18n/index.ts
|
|
605
|
-
var
|
|
606
|
-
"./locales/ca.ts": () => import("./ca
|
|
607
|
-
"./locales/de.ts": () => import("./de-
|
|
608
|
-
"./locales/en.ts": () => import("./en-
|
|
609
|
-
"./locales/es.ts": () => import("./es-
|
|
610
|
-
"./locales/fr.ts": () => import("./fr-
|
|
611
|
-
"./locales/
|
|
612
|
-
"./locales/
|
|
613
|
-
|
|
605
|
+
var rr = /* #__PURE__ */ Object.assign({
|
|
606
|
+
"./locales/ca.ts": () => import("./ca--zGWn9AU.js"),
|
|
607
|
+
"./locales/de.ts": () => import("./de-BRNLKcDl.js"),
|
|
608
|
+
"./locales/en.ts": () => import("./en-JJjqHMjy.js"),
|
|
609
|
+
"./locales/es.ts": () => import("./es-BIh8BxV9.js"),
|
|
610
|
+
"./locales/fr.ts": () => import("./fr-C5VUZogP.js"),
|
|
611
|
+
"./locales/ja.ts": () => import("./ja-x5JYxaCW.js"),
|
|
612
|
+
"./locales/nl.ts": () => import("./nl-UXxFyXV6.js"),
|
|
613
|
+
"./locales/pt-BR.ts": () => import("./pt-BR-DHm3SP6W.js")
|
|
614
|
+
}), ir = /* #__PURE__ */ Object.assign({
|
|
614
615
|
"./locales/cloud/de.ts": () => import("./de-mMY5yQJu.js"),
|
|
615
616
|
"./locales/cloud/en.ts": () => import("./en-ChVeGQBY.js"),
|
|
616
617
|
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-CoCwRUi0.js")
|
|
617
618
|
});
|
|
618
|
-
function
|
|
619
|
+
function ar(e) {
|
|
619
620
|
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
620
621
|
}
|
|
621
|
-
var
|
|
622
|
-
function
|
|
622
|
+
var or = ar(rr), sr = ar(ir);
|
|
623
|
+
function cr(e) {
|
|
623
624
|
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
624
625
|
}
|
|
625
|
-
function
|
|
626
|
-
let n =
|
|
627
|
-
return t.find((e) =>
|
|
626
|
+
function lr(e, t) {
|
|
627
|
+
let n = cr(e);
|
|
628
|
+
return t.find((e) => cr(e) === n);
|
|
628
629
|
}
|
|
629
|
-
function
|
|
630
|
-
return
|
|
630
|
+
function ur(e) {
|
|
631
|
+
return cr(e).split("-")[0];
|
|
631
632
|
}
|
|
632
|
-
function
|
|
633
|
-
return
|
|
633
|
+
function dr(e, t) {
|
|
634
|
+
return lr(e, t) ?? lr(ur(e), t);
|
|
634
635
|
}
|
|
635
|
-
function
|
|
636
|
-
return
|
|
636
|
+
function fr(e, t) {
|
|
637
|
+
return dr(e, t) ?? "en";
|
|
637
638
|
}
|
|
638
|
-
async function
|
|
639
|
-
let t =
|
|
639
|
+
async function pr(e) {
|
|
640
|
+
let t = rr[`./locales/${fr(e, or)}.ts`];
|
|
640
641
|
return (await t()).default;
|
|
641
642
|
}
|
|
642
|
-
async function
|
|
643
|
-
let t =
|
|
643
|
+
async function mr(e) {
|
|
644
|
+
let t = ir[`./locales/cloud/${fr(e, sr)}.ts`];
|
|
644
645
|
return (await t()).default;
|
|
645
646
|
}
|
|
646
|
-
function
|
|
647
|
-
return
|
|
647
|
+
function hr(e) {
|
|
648
|
+
return dr(e, or) !== void 0;
|
|
648
649
|
}
|
|
649
|
-
function
|
|
650
|
-
return
|
|
650
|
+
function gr(e) {
|
|
651
|
+
return dr(e, sr) !== void 0;
|
|
651
652
|
}
|
|
652
|
-
function
|
|
653
|
-
return [...
|
|
653
|
+
function _r() {
|
|
654
|
+
return [...or];
|
|
654
655
|
}
|
|
655
|
-
function
|
|
656
|
-
return [...
|
|
656
|
+
function vr() {
|
|
657
|
+
return [...sr];
|
|
657
658
|
}
|
|
658
659
|
//#endregion
|
|
659
660
|
//#region src/i18n/contentDefaults.ts
|
|
660
|
-
var
|
|
661
|
+
var yr = {
|
|
661
662
|
en: {
|
|
662
663
|
video: "Video",
|
|
663
664
|
days: "Days",
|
|
@@ -713,19 +714,27 @@ var gr = {
|
|
|
713
714
|
minutes: "Minuts",
|
|
714
715
|
seconds: "Segons",
|
|
715
716
|
expired: "Aquesta oferta ha caducat"
|
|
717
|
+
},
|
|
718
|
+
ja: {
|
|
719
|
+
video: "動画",
|
|
720
|
+
days: "日",
|
|
721
|
+
hours: "時間",
|
|
722
|
+
minutes: "分",
|
|
723
|
+
seconds: "秒",
|
|
724
|
+
expired: "このオファーは終了しました"
|
|
716
725
|
}
|
|
717
726
|
};
|
|
718
|
-
Object.keys(
|
|
719
|
-
var
|
|
720
|
-
function
|
|
721
|
-
if (!e) return
|
|
722
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n =
|
|
723
|
-
if (n) return
|
|
724
|
-
let r =
|
|
725
|
-
return r ?
|
|
726
|
-
}
|
|
727
|
-
function
|
|
728
|
-
let t =
|
|
727
|
+
Object.keys(yr);
|
|
728
|
+
var br = new Map(Object.keys(yr).map((e) => [e.toLowerCase(), e]));
|
|
729
|
+
function xr(e) {
|
|
730
|
+
if (!e) return yr.en;
|
|
731
|
+
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = br.get(t);
|
|
732
|
+
if (n) return yr[n];
|
|
733
|
+
let r = br.get(ur(t));
|
|
734
|
+
return r ? yr[r] : yr.en;
|
|
735
|
+
}
|
|
736
|
+
function Sr(e) {
|
|
737
|
+
let t = xr(e);
|
|
729
738
|
return {
|
|
730
739
|
video: { alt: t.video },
|
|
731
740
|
countdown: {
|
|
@@ -739,9 +748,9 @@ function yr(e) {
|
|
|
739
748
|
}
|
|
740
749
|
//#endregion
|
|
741
750
|
//#region src/utils/collectColorFieldIssues.ts
|
|
742
|
-
function
|
|
751
|
+
function Cr(e, t) {
|
|
743
752
|
let n = [], r = (r, i) => {
|
|
744
|
-
let a =
|
|
753
|
+
let a = at(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
745
754
|
if (a.invalidPresets.length > 0 && n.push({
|
|
746
755
|
id: s("invalid-presets"),
|
|
747
756
|
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." : "")
|
|
@@ -752,8 +761,8 @@ function br(e, t) {
|
|
|
752
761
|
id: s("allow-custom-ignored"),
|
|
753
762
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
754
763
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
755
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
756
|
-
e !== "" && !t.has(
|
|
764
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => pn(e)));
|
|
765
|
+
e !== "" && !t.has(pn(e)) && n.push({
|
|
757
766
|
id: s("off-palette-default"),
|
|
758
767
|
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.`
|
|
759
768
|
});
|
|
@@ -765,7 +774,7 @@ function br(e, t) {
|
|
|
765
774
|
}
|
|
766
775
|
//#endregion
|
|
767
776
|
//#region src/utils/keyboardShortcuts.ts
|
|
768
|
-
function
|
|
777
|
+
function wr(e) {
|
|
769
778
|
for (let t of e.composedPath()) {
|
|
770
779
|
if (!(t instanceof HTMLElement)) continue;
|
|
771
780
|
if (t.isContentEditable) return !0;
|
|
@@ -774,18 +783,18 @@ function xr(e) {
|
|
|
774
783
|
}
|
|
775
784
|
return !1;
|
|
776
785
|
}
|
|
777
|
-
function
|
|
786
|
+
function Tr(e, t) {
|
|
778
787
|
let n = e.metaKey || e.ctrlKey;
|
|
779
788
|
if (n && e.key.toLowerCase() === "s") {
|
|
780
789
|
e.preventDefault(), t.onSave?.();
|
|
781
790
|
return;
|
|
782
791
|
}
|
|
783
792
|
if (n && e.key.toLowerCase() === "z") {
|
|
784
|
-
if (
|
|
793
|
+
if (wr(e)) return;
|
|
785
794
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
786
795
|
return;
|
|
787
796
|
}
|
|
788
|
-
if (t.isPicking?.() && !
|
|
797
|
+
if (t.isPicking?.() && !wr(e)) {
|
|
789
798
|
if (e.key === "Escape") {
|
|
790
799
|
e.preventDefault(), t.onCancelPick?.();
|
|
791
800
|
return;
|
|
@@ -803,11 +812,57 @@ function Sr(e, t) {
|
|
|
803
812
|
t.selectBlock(null);
|
|
804
813
|
return;
|
|
805
814
|
}
|
|
806
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
815
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !wr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
816
|
+
}
|
|
817
|
+
//#endregion
|
|
818
|
+
//#region src/utils/blockComponentResolver.ts
|
|
819
|
+
function Er(e) {
|
|
820
|
+
let t = { fontFamily: e.fontFamily };
|
|
821
|
+
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;
|
|
822
|
+
}
|
|
823
|
+
function Dr(e, t, n) {
|
|
824
|
+
if (t) {
|
|
825
|
+
let n = t.getComponent(e);
|
|
826
|
+
if (n) return n;
|
|
827
|
+
}
|
|
828
|
+
return n[e.type] ?? null;
|
|
829
|
+
}
|
|
830
|
+
function Or(e) {
|
|
831
|
+
if (e.type === "wrapper") return {};
|
|
832
|
+
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
833
|
+
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
834
|
+
backgroundColor: n || "transparent"
|
|
835
|
+
};
|
|
836
|
+
if ((e.type === "paragraph" || e.type === "title") && (r["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? Ie.paragraphGap : Ie.paragraphGap}px`), e.type === "section") {
|
|
837
|
+
let t = je(e.borderRadius);
|
|
838
|
+
t !== null && (r.borderRadius = t), Object.assign(r, kr(e.border));
|
|
839
|
+
}
|
|
840
|
+
return r;
|
|
841
|
+
}
|
|
842
|
+
function kr(e) {
|
|
843
|
+
let t = {};
|
|
844
|
+
for (let [n, r] of Object.entries(ze(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
845
|
+
return t;
|
|
846
|
+
}
|
|
847
|
+
function Ar(e) {
|
|
848
|
+
if (e.type !== "section" || !e.wrapper) return null;
|
|
849
|
+
let t = e.wrapper, n = {};
|
|
850
|
+
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`);
|
|
851
|
+
let r = je(t.borderRadius);
|
|
852
|
+
return r !== null && (n.borderRadius = r), n;
|
|
853
|
+
}
|
|
854
|
+
function jr(e) {
|
|
855
|
+
if (e.type !== "wrapper") return null;
|
|
856
|
+
let t = {};
|
|
857
|
+
if (e.styles.backgroundColor && (t.backgroundColor = e.styles.backgroundColor), e.styles.padding) {
|
|
858
|
+
let n = e.styles.padding;
|
|
859
|
+
t.padding = `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`;
|
|
860
|
+
}
|
|
861
|
+
return e.borderRadius && e.borderRadius > 0 && (t.borderRadius = `${e.borderRadius}px`), t;
|
|
807
862
|
}
|
|
808
863
|
//#endregion
|
|
809
864
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
810
|
-
function
|
|
865
|
+
function Mr(e, t, n, r = !1) {
|
|
811
866
|
if (!e) return [];
|
|
812
867
|
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
813
868
|
for (; (s = i.exec(e)) !== null;) {
|
|
@@ -816,18 +871,18 @@ function Cr(e, t, n, r = !1) {
|
|
|
816
871
|
value: e.slice(o, s.index)
|
|
817
872
|
});
|
|
818
873
|
let i = s[0];
|
|
819
|
-
if (
|
|
820
|
-
let e = r ?
|
|
874
|
+
if (ve(i, n)) {
|
|
875
|
+
let e = r ? fe(i, t) : void 0;
|
|
821
876
|
a.push(e === void 0 ? {
|
|
822
877
|
type: "tag",
|
|
823
|
-
value:
|
|
878
|
+
value: de(i, t)
|
|
824
879
|
} : {
|
|
825
880
|
type: "text",
|
|
826
881
|
value: e
|
|
827
882
|
});
|
|
828
|
-
} else
|
|
883
|
+
} else ue(i, n) ? a.push({
|
|
829
884
|
type: "tag",
|
|
830
|
-
value:
|
|
885
|
+
value: le(i, n)
|
|
831
886
|
}) : a.push({
|
|
832
887
|
type: "text",
|
|
833
888
|
value: i
|
|
@@ -841,20 +896,20 @@ function Cr(e, t, n, r = !1) {
|
|
|
841
896
|
}
|
|
842
897
|
//#endregion
|
|
843
898
|
//#region src/components/MergeTagPreviewText.vue
|
|
844
|
-
var
|
|
899
|
+
var Nr = F({
|
|
845
900
|
name: "MergeTagPreviewText",
|
|
846
901
|
props: { text: {
|
|
847
902
|
type: String,
|
|
848
903
|
required: !0
|
|
849
904
|
} },
|
|
850
905
|
setup(e) {
|
|
851
|
-
let t = p(
|
|
906
|
+
let t = p(At, xt), n = p(jt, De.liquid), r = p(Mt, null), i = N(() => Mr(e.text, t.value, n, r?.value ?? !1));
|
|
852
907
|
return () => i.value.map((e, t) => e.type === "tag" ? b("span", {
|
|
853
908
|
key: t,
|
|
854
909
|
class: "tpl-merge-tag-label"
|
|
855
910
|
}, e.value) : e.value);
|
|
856
911
|
}
|
|
857
|
-
}),
|
|
912
|
+
}), Pr = ["href"], Fr = /* @__PURE__ */ F({
|
|
858
913
|
__name: "ButtonBlock",
|
|
859
914
|
props: {
|
|
860
915
|
block: {},
|
|
@@ -870,26 +925,26 @@ var wr = F({
|
|
|
870
925
|
fontSize: `${r.block.fontSize}px`,
|
|
871
926
|
fontWeight: "bold",
|
|
872
927
|
textDecoration: "none",
|
|
873
|
-
borderRadius: `${r.block.borderRadius}px
|
|
928
|
+
borderRadius: typeof r.block.borderRadius == "number" ? `${r.block.borderRadius}px` : je(r.block.borderRadius) ?? "0px",
|
|
874
929
|
textAlign: "center"
|
|
875
930
|
};
|
|
876
|
-
return r.block.fontFamily && (e.fontFamily = r.block.fontFamily), r.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof r.block.width == "number" && (e.width = `${r.block.width}px`, e.boxSizing = "border-box"), e;
|
|
931
|
+
return Object.assign(e, kr(r.block.border)), r.block.fontFamily && (e.fontFamily = r.block.fontFamily), r.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof r.block.width == "number" && (e.width = `${r.block.width}px`, e.boxSizing = "border-box"), e;
|
|
877
932
|
}), a = N(() => ({ textAlign: r.block.align ?? "center" }));
|
|
878
933
|
return (r, o) => (t(), S("div", { style: n(a.value) }, [x("a", {
|
|
879
934
|
href: e.block.url || "#",
|
|
880
935
|
style: n(i.value),
|
|
881
936
|
class: "tpl:cursor-default",
|
|
882
937
|
onClick: o[0] ||= I(() => {}, ["prevent"])
|
|
883
|
-
}, [C(
|
|
938
|
+
}, [C(Nr, { text: e.block.text }, null, 8, ["text"])], 12, Pr)], 4));
|
|
884
939
|
}
|
|
885
|
-
}),
|
|
940
|
+
}), Ir = vn({
|
|
886
941
|
name: "bookmark",
|
|
887
942
|
size: 24,
|
|
888
943
|
node: [["path", {
|
|
889
944
|
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",
|
|
890
945
|
key: "oz39mx"
|
|
891
946
|
}]]
|
|
892
|
-
}),
|
|
947
|
+
}), Lr = vn({
|
|
893
948
|
name: "box",
|
|
894
949
|
size: 24,
|
|
895
950
|
node: [
|
|
@@ -906,7 +961,7 @@ var wr = F({
|
|
|
906
961
|
key: "d0xqtd"
|
|
907
962
|
}]
|
|
908
963
|
]
|
|
909
|
-
}),
|
|
964
|
+
}), Rr = vn({
|
|
910
965
|
name: "eye-off",
|
|
911
966
|
size: 24,
|
|
912
967
|
node: [
|
|
@@ -927,7 +982,7 @@ var wr = F({
|
|
|
927
982
|
key: "1ooewy"
|
|
928
983
|
}]
|
|
929
984
|
]
|
|
930
|
-
}),
|
|
985
|
+
}), zr = vn({
|
|
931
986
|
name: "funnel",
|
|
932
987
|
size: 24,
|
|
933
988
|
node: [["path", {
|
|
@@ -935,7 +990,7 @@ var wr = F({
|
|
|
935
990
|
key: "sc7q7i"
|
|
936
991
|
}]],
|
|
937
992
|
aliases: ["filter"]
|
|
938
|
-
}),
|
|
993
|
+
}), Br = vn({
|
|
939
994
|
name: "grip-vertical",
|
|
940
995
|
size: 24,
|
|
941
996
|
node: [
|
|
@@ -976,14 +1031,14 @@ var wr = F({
|
|
|
976
1031
|
key: "f4zoj3"
|
|
977
1032
|
}]
|
|
978
1033
|
]
|
|
979
|
-
}),
|
|
1034
|
+
}), Vr = vn({
|
|
980
1035
|
name: "puzzle",
|
|
981
1036
|
size: 24,
|
|
982
1037
|
node: [["path", {
|
|
983
1038
|
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",
|
|
984
1039
|
key: "w46dr5"
|
|
985
1040
|
}]]
|
|
986
|
-
}),
|
|
1041
|
+
}), Hr = vn({
|
|
987
1042
|
name: "video",
|
|
988
1043
|
size: 24,
|
|
989
1044
|
node: [["path", {
|
|
@@ -997,11 +1052,11 @@ var wr = F({
|
|
|
997
1052
|
rx: "2",
|
|
998
1053
|
key: "158x01"
|
|
999
1054
|
}]]
|
|
1000
|
-
}),
|
|
1055
|
+
}), Ur = ["innerHTML"], Wr = [
|
|
1001
1056
|
"src",
|
|
1002
1057
|
"width",
|
|
1003
1058
|
"height"
|
|
1004
|
-
],
|
|
1059
|
+
], Gr = /* @__PURE__ */ F({
|
|
1005
1060
|
__name: "CustomBlockIcon",
|
|
1006
1061
|
props: {
|
|
1007
1062
|
icon: {},
|
|
@@ -1017,24 +1072,24 @@ var wr = F({
|
|
|
1017
1072
|
height: `${i.value}px`
|
|
1018
1073
|
}),
|
|
1019
1074
|
innerHTML: e.icon
|
|
1020
|
-
}, null, 12,
|
|
1075
|
+
}, null, 12, Ur)) : o.value ? (t(), S("img", {
|
|
1021
1076
|
key: 1,
|
|
1022
1077
|
src: e.icon,
|
|
1023
1078
|
width: i.value,
|
|
1024
1079
|
height: i.value,
|
|
1025
1080
|
class: "tpl:inline-block",
|
|
1026
1081
|
alt: ""
|
|
1027
|
-
}, null, 8,
|
|
1082
|
+
}, null, 8, Wr)) : (t(), A(y(Lr), {
|
|
1028
1083
|
key: 2,
|
|
1029
1084
|
size: i.value,
|
|
1030
1085
|
"stroke-width": 1.5
|
|
1031
1086
|
}, null, 8, ["size"]));
|
|
1032
1087
|
}
|
|
1033
|
-
}),
|
|
1034
|
-
function
|
|
1035
|
-
let n =
|
|
1088
|
+
}), Kr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1089
|
+
function qr(e, t) {
|
|
1090
|
+
let n = Dn(), r = null, i = null, a = null;
|
|
1036
1091
|
function o() {
|
|
1037
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1092
|
+
return e.value ? Array.from(e.value.querySelectorAll(Kr)).filter((e) => e.offsetParent !== null) : [];
|
|
1038
1093
|
}
|
|
1039
1094
|
function c(e) {
|
|
1040
1095
|
if (e.key !== "Tab") return;
|
|
@@ -1049,7 +1104,7 @@ function Rr(e, t) {
|
|
|
1049
1104
|
a = null;
|
|
1050
1105
|
let t = o();
|
|
1051
1106
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1052
|
-
}), i =
|
|
1107
|
+
}), i = ft(e, "keydown", c);
|
|
1053
1108
|
}
|
|
1054
1109
|
function u(e = {}) {
|
|
1055
1110
|
let t = e.restoreFocus !== !1;
|
|
@@ -1064,8 +1119,8 @@ function Rr(e, t) {
|
|
|
1064
1119
|
}
|
|
1065
1120
|
//#endregion
|
|
1066
1121
|
//#region src/composables/useEmoji.ts
|
|
1067
|
-
function
|
|
1068
|
-
let [t, n] =
|
|
1122
|
+
function Jr() {
|
|
1123
|
+
let [t, n] = ut(!1), r = e([]), i = !1;
|
|
1069
1124
|
s(() => {
|
|
1070
1125
|
i = !0;
|
|
1071
1126
|
}), f(t, async (e) => {
|
|
@@ -1090,7 +1145,7 @@ function zr() {
|
|
|
1090
1145
|
}
|
|
1091
1146
|
//#endregion
|
|
1092
1147
|
//#region src/composables/useFonts.ts
|
|
1093
|
-
var
|
|
1148
|
+
var Yr = [
|
|
1094
1149
|
{
|
|
1095
1150
|
value: "Arial",
|
|
1096
1151
|
label: "Arial"
|
|
@@ -1119,7 +1174,7 @@ var Br = [
|
|
|
1119
1174
|
value: "Courier New",
|
|
1120
1175
|
label: "Courier New"
|
|
1121
1176
|
}
|
|
1122
|
-
],
|
|
1177
|
+
], Xr = {
|
|
1123
1178
|
arial: "Arial, sans-serif",
|
|
1124
1179
|
helvetica: "Helvetica, sans-serif",
|
|
1125
1180
|
georgia: "Georgia, serif",
|
|
@@ -1127,23 +1182,23 @@ var Br = [
|
|
|
1127
1182
|
verdana: "Verdana, sans-serif",
|
|
1128
1183
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1129
1184
|
"courier new": "'Courier New', monospace"
|
|
1130
|
-
},
|
|
1131
|
-
function
|
|
1132
|
-
if (e === void 0 || e === !0) return [...
|
|
1185
|
+
}, Zr = "Arial, sans-serif";
|
|
1186
|
+
function Qr(e) {
|
|
1187
|
+
if (e === void 0 || e === !0) return [...Yr];
|
|
1133
1188
|
if (e === !1) return [];
|
|
1134
1189
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1135
1190
|
for (let i of e) {
|
|
1136
|
-
let e = i.toLowerCase(), a =
|
|
1191
|
+
let e = i.toLowerCase(), a = Yr.find((t) => t.value.toLowerCase() === e);
|
|
1137
1192
|
if (!a) {
|
|
1138
|
-
r.has(e) || (r.add(e),
|
|
1193
|
+
r.has(e) || (r.add(e), dn.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${Yr.map((e) => e.value).join(", ")}.`));
|
|
1139
1194
|
continue;
|
|
1140
1195
|
}
|
|
1141
1196
|
n.has(a.value) || (n.add(a.value), t.push(a));
|
|
1142
1197
|
}
|
|
1143
1198
|
return t;
|
|
1144
1199
|
}
|
|
1145
|
-
function
|
|
1146
|
-
let t = _(e?.customFonts ?? []), n = _(!1), r =
|
|
1200
|
+
function $r(e) {
|
|
1201
|
+
let t = _(e?.customFonts ?? []), n = _(!1), r = Qr(e?.builtIns), i = N(() => e?.defaultFallback ?? Zr), a = N(() => {
|
|
1147
1202
|
let e = [...r], n = t.value.map((e) => ({
|
|
1148
1203
|
value: e.name,
|
|
1149
1204
|
label: e.name,
|
|
@@ -1154,14 +1209,14 @@ function Wr(e) {
|
|
|
1154
1209
|
function o(e) {
|
|
1155
1210
|
return a.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1156
1211
|
}
|
|
1157
|
-
let c = e?.defaultFont ??
|
|
1158
|
-
o(c) ||
|
|
1212
|
+
let c = e?.defaultFont ?? Zr.split(",")[0].trim();
|
|
1213
|
+
o(c) || dn.warn(`config.fonts: new templates seed "${c}", 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.`);
|
|
1159
1214
|
function l() {
|
|
1160
1215
|
if (e?.defaultFont && o(e.defaultFont)) {
|
|
1161
1216
|
let t = a.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1162
1217
|
if (t) return t.value;
|
|
1163
1218
|
}
|
|
1164
|
-
return
|
|
1219
|
+
return Zr;
|
|
1165
1220
|
}
|
|
1166
1221
|
let u = N(() => l());
|
|
1167
1222
|
function d(e) {
|
|
@@ -1171,7 +1226,7 @@ function Wr(e) {
|
|
|
1171
1226
|
let e = n.fallback ?? i.value;
|
|
1172
1227
|
return `'${n.name}', ${e}`;
|
|
1173
1228
|
}
|
|
1174
|
-
return
|
|
1229
|
+
return Xr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
1175
1230
|
}
|
|
1176
1231
|
let f = [], p = !1;
|
|
1177
1232
|
async function m() {
|
|
@@ -1187,7 +1242,7 @@ function Wr(e) {
|
|
|
1187
1242
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1188
1243
|
});
|
|
1189
1244
|
} catch (t) {
|
|
1190
|
-
|
|
1245
|
+
dn.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1191
1246
|
}
|
|
1192
1247
|
});
|
|
1193
1248
|
await Promise.allSettled(e), !p && (n.value = !0);
|
|
@@ -1212,12 +1267,12 @@ function Wr(e) {
|
|
|
1212
1267
|
}
|
|
1213
1268
|
//#endregion
|
|
1214
1269
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1215
|
-
function
|
|
1216
|
-
return
|
|
1270
|
+
function ei(e, t, n) {
|
|
1271
|
+
return ue(e, n) ? {
|
|
1217
1272
|
type: "logicMergeTagNode",
|
|
1218
1273
|
attrs: {
|
|
1219
1274
|
value: e,
|
|
1220
|
-
keyword:
|
|
1275
|
+
keyword: le(e, n)
|
|
1221
1276
|
}
|
|
1222
1277
|
} : {
|
|
1223
1278
|
type: "mergeTagNode",
|
|
@@ -1229,15 +1284,15 @@ function Gr(e, t, n) {
|
|
|
1229
1284
|
}
|
|
1230
1285
|
//#endregion
|
|
1231
1286
|
//#region src/utils/insertLogicTag.ts
|
|
1232
|
-
function
|
|
1287
|
+
function ti(e) {
|
|
1233
1288
|
return "before" in e && "after" in e;
|
|
1234
1289
|
}
|
|
1235
|
-
function
|
|
1236
|
-
if (!
|
|
1237
|
-
e.chain().focus().insertContent(
|
|
1290
|
+
function ni(e, t, n) {
|
|
1291
|
+
if (!ti(t)) {
|
|
1292
|
+
e.chain().focus().insertContent(ei(t.value, t.label, n)).run();
|
|
1238
1293
|
return;
|
|
1239
1294
|
}
|
|
1240
|
-
let r =
|
|
1295
|
+
let r = ei(t.before, t.label, n), i = ei(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1241
1296
|
if (a !== o) {
|
|
1242
1297
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1243
1298
|
return;
|
|
@@ -1246,20 +1301,20 @@ function qr(e, t, n) {
|
|
|
1246
1301
|
}
|
|
1247
1302
|
//#endregion
|
|
1248
1303
|
//#region src/utils/linkColorExtension.ts
|
|
1249
|
-
function
|
|
1304
|
+
function ri(e) {
|
|
1250
1305
|
if (!e) return null;
|
|
1251
1306
|
let t = e.trim();
|
|
1252
1307
|
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;
|
|
1253
1308
|
}
|
|
1254
|
-
function
|
|
1309
|
+
function ii(e) {
|
|
1255
1310
|
return e.extend({ addAttributes() {
|
|
1256
1311
|
return {
|
|
1257
1312
|
...this.parent?.(),
|
|
1258
1313
|
color: {
|
|
1259
1314
|
default: null,
|
|
1260
|
-
parseHTML: (e) =>
|
|
1315
|
+
parseHTML: (e) => ri(fn(e.style.color)),
|
|
1261
1316
|
renderHTML: (e) => {
|
|
1262
|
-
let t =
|
|
1317
|
+
let t = ri(e.color);
|
|
1263
1318
|
return t ? { style: `color: ${t}` } : {};
|
|
1264
1319
|
}
|
|
1265
1320
|
}
|
|
@@ -1268,9 +1323,9 @@ function Yr(e) {
|
|
|
1268
1323
|
}
|
|
1269
1324
|
//#endregion
|
|
1270
1325
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1271
|
-
function
|
|
1326
|
+
function ai(e, t = De.liquid) {
|
|
1272
1327
|
let n = _(!1), r = _(""), i = _(""), a = _(null);
|
|
1273
|
-
|
|
1328
|
+
qr(a, n);
|
|
1274
1329
|
function o() {
|
|
1275
1330
|
let t = e.value?.getAttributes("link") ?? {};
|
|
1276
1331
|
r.value = t.href || "", i.value = t.color || "", n.value = !0;
|
|
@@ -1279,7 +1334,7 @@ function Xr(e, t = Fe.liquid) {
|
|
|
1279
1334
|
if (r.value) {
|
|
1280
1335
|
let t = u(r.value);
|
|
1281
1336
|
if (t !== null) {
|
|
1282
|
-
let n =
|
|
1337
|
+
let n = ri(i.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1283
1338
|
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
1284
1339
|
}
|
|
1285
1340
|
}
|
|
@@ -1329,13 +1384,13 @@ function Xr(e, t = Fe.liquid) {
|
|
|
1329
1384
|
}
|
|
1330
1385
|
//#endregion
|
|
1331
1386
|
//#region src/composables/useRichTextEditor.ts
|
|
1332
|
-
function
|
|
1333
|
-
let n = p(
|
|
1387
|
+
function oi(t) {
|
|
1388
|
+
let n = p(Kt, null), { mergeTags: r, canRequestMergeTag: a, isRequesting: o, requestMergeTag: s, syntax: l, autocomplete: u } = On(), { canInsertLogicTag: d, isRequesting: m, requestLogicTag: h } = kn(), g = p(Rt, null), v = (c(g) ? g.value : g)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", y = Ge(l), b = e(null), x = () => Se(n?.content?.value?.settings ?? { locale: "en" });
|
|
1334
1389
|
f(x, (e) => {
|
|
1335
1390
|
let t = b.value?.view.dom;
|
|
1336
1391
|
t && t.setAttribute("dir", e);
|
|
1337
1392
|
});
|
|
1338
|
-
let { showLinkDialog: S, linkUrl: C, linkColor: w, linkDialogRef: T, openLinkDialog: E, insertLink: D, removeLink: O, closeLinkDialog: k, handleLinkKeydown: A } =
|
|
1393
|
+
let { showLinkDialog: S, linkUrl: C, linkColor: w, linkDialogRef: T, openLinkDialog: E, insertLink: D, removeLink: O, closeLinkDialog: k, handleLinkKeydown: A } = ai(b, l), { start: j, stop: M } = ct(() => b.value?.commands.focus("end"), 0, { immediate: !1 }), ee = e(null), N = _(!0), P = _(null), F = !1;
|
|
1339
1394
|
async function te() {
|
|
1340
1395
|
P.value = null, N.value = !0;
|
|
1341
1396
|
try {
|
|
@@ -1366,7 +1421,7 @@ function Zr(t) {
|
|
|
1366
1421
|
b.value = s, N.value = !1, j();
|
|
1367
1422
|
} catch (e) {
|
|
1368
1423
|
if (F) return;
|
|
1369
|
-
|
|
1424
|
+
dn.error(`[${t.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, e), P.value = e instanceof Error ? e.message : "Failed to load editor", N.value = !1;
|
|
1370
1425
|
}
|
|
1371
1426
|
}
|
|
1372
1427
|
function I() {
|
|
@@ -1384,7 +1439,7 @@ function Zr(t) {
|
|
|
1384
1439
|
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1385
1440
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || t.onDone();
|
|
1386
1441
|
}
|
|
1387
|
-
|
|
1442
|
+
ft(document, "mousedown", re), i(() => {
|
|
1388
1443
|
F = !0, ne(), M(), b.value?.destroy();
|
|
1389
1444
|
});
|
|
1390
1445
|
async function ie() {
|
|
@@ -1396,7 +1451,7 @@ function Zr(t) {
|
|
|
1396
1451
|
}
|
|
1397
1452
|
async function ae() {
|
|
1398
1453
|
let e = await h();
|
|
1399
|
-
F || (e && b.value ?
|
|
1454
|
+
F || (e && b.value ? ni(b.value, e, l) : b.value?.commands.focus());
|
|
1400
1455
|
}
|
|
1401
1456
|
return {
|
|
1402
1457
|
editor: b,
|
|
@@ -1425,9 +1480,9 @@ function Zr(t) {
|
|
|
1425
1480
|
}
|
|
1426
1481
|
//#endregion
|
|
1427
1482
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1428
|
-
var
|
|
1429
|
-
function
|
|
1430
|
-
let t =
|
|
1483
|
+
var si = "(max-width: 767px)";
|
|
1484
|
+
function ci(e) {
|
|
1485
|
+
let t = pt(si);
|
|
1431
1486
|
return {
|
|
1432
1487
|
isSmallScreen: t,
|
|
1433
1488
|
showNotice: N(() => (ee(e) ?? !0) && t.value)
|
|
@@ -1435,20 +1490,20 @@ function $r(e) {
|
|
|
1435
1490
|
}
|
|
1436
1491
|
//#endregion
|
|
1437
1492
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1438
|
-
var
|
|
1493
|
+
var li = { class: "tpl:w-full" }, ui = {
|
|
1439
1494
|
key: 0,
|
|
1440
1495
|
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)]"
|
|
1441
|
-
},
|
|
1496
|
+
}, di = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, fi = {
|
|
1442
1497
|
key: 1,
|
|
1443
1498
|
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)]"
|
|
1444
|
-
},
|
|
1499
|
+
}, pi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, mi = {
|
|
1445
1500
|
key: 2,
|
|
1446
1501
|
class: "tpl:relative"
|
|
1447
|
-
},
|
|
1502
|
+
}, hi = ["innerHTML"], gi = {
|
|
1448
1503
|
key: 0,
|
|
1449
1504
|
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]",
|
|
1450
1505
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1451
|
-
},
|
|
1506
|
+
}, _i = /* @__PURE__ */ F({
|
|
1452
1507
|
__name: "CustomBlock",
|
|
1453
1508
|
props: {
|
|
1454
1509
|
block: {},
|
|
@@ -1456,7 +1511,7 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1456
1511
|
},
|
|
1457
1512
|
emits: ["fetchData"],
|
|
1458
1513
|
setup(e, { emit: n }) {
|
|
1459
|
-
let r = e, i = n, { t: a } =
|
|
1514
|
+
let r = e, i = n, { t: a } = un(), o = p(rn, null), s = _(""), c = _(!1), l = N(() => o?.getDefinition(r.block.customType)), u = N(() => !!l.value), m = N(() => r.block), { isFetching: h, fetch: g, needsFetch: v, hasDataSource: b } = st({
|
|
1460
1515
|
definition: l,
|
|
1461
1516
|
block: m,
|
|
1462
1517
|
onUpdate: (e, t) => {
|
|
@@ -1465,10 +1520,10 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1465
1520
|
dataSourceFetched: t
|
|
1466
1521
|
});
|
|
1467
1522
|
}
|
|
1468
|
-
}), T = p(
|
|
1523
|
+
}), T = p(At, xt), E = p(Mt, null), O = N(() => {
|
|
1469
1524
|
if (!E?.value) return r.block;
|
|
1470
1525
|
let e = {};
|
|
1471
|
-
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ?
|
|
1526
|
+
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ? Be(n, T.value) : n;
|
|
1472
1527
|
return {
|
|
1473
1528
|
...r.block,
|
|
1474
1529
|
fieldValues: e
|
|
@@ -1485,17 +1540,17 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1485
1540
|
}
|
|
1486
1541
|
}
|
|
1487
1542
|
}
|
|
1488
|
-
let j =
|
|
1543
|
+
let j = lt(k, 150);
|
|
1489
1544
|
return d(() => {
|
|
1490
1545
|
k();
|
|
1491
1546
|
}), f(() => r.block.fieldValues, () => {
|
|
1492
1547
|
j();
|
|
1493
1548
|
}, { deep: !0 }), f(() => E?.value, () => {
|
|
1494
1549
|
j();
|
|
1495
|
-
}), (e, n) => (t(), S("div",
|
|
1550
|
+
}), (e, n) => (t(), S("div", li, [u.value ? c.value ? (t(), S("div", fi, [C(y(Cn), {
|
|
1496
1551
|
size: 24,
|
|
1497
1552
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1498
|
-
}), x("span",
|
|
1553
|
+
}), x("span", pi, D(y(a).customBlocks.renderError), 1)])) : (t(), S("div", mi, [x("div", { innerHTML: s.value }, null, 8, hi), y(b) && y(v) ? (t(), S("div", gi, [y(h) ? (t(), A(Tn, {
|
|
1499
1554
|
key: 1,
|
|
1500
1555
|
class: "tpl:w-48"
|
|
1501
1556
|
})) : (t(), S("button", {
|
|
@@ -1503,16 +1558,16 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1503
1558
|
type: "button",
|
|
1504
1559
|
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)]",
|
|
1505
1560
|
onClick: n[0] ||= I((...e) => y(g) && y(g)(...e), ["stop"])
|
|
1506
|
-
}, [l.value?.icon ? (t(), A(
|
|
1561
|
+
}, [l.value?.icon ? (t(), A(Gr, {
|
|
1507
1562
|
key: 0,
|
|
1508
1563
|
icon: l.value.icon,
|
|
1509
1564
|
size: 16
|
|
1510
|
-
}, null, 8, ["icon"])) : P("", !0), w(" " + D(l.value?.dataSource?.label || y(a).customBlocks.dataSource.fetchButton), 1)]))])) : P("", !0)])) : (t(), S("div",
|
|
1565
|
+
}, null, 8, ["icon"])) : P("", !0), w(" " + D(l.value?.dataSource?.label || y(a).customBlocks.dataSource.fetchButton), 1)]))])) : P("", !0)])) : (t(), S("div", ui, [C(y(Vr), {
|
|
1511
1566
|
size: 24,
|
|
1512
1567
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1513
|
-
}), x("span",
|
|
1568
|
+
}), x("span", di, D(y(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1514
1569
|
}
|
|
1515
|
-
}),
|
|
1570
|
+
}), vi = { class: "tpl:w-full" }, yi = /* @__PURE__ */ F({
|
|
1516
1571
|
__name: "DividerBlock",
|
|
1517
1572
|
props: {
|
|
1518
1573
|
block: {},
|
|
@@ -1524,28 +1579,28 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1524
1579
|
width: r.block.width === "full" ? "100%" : `${r.block.width}px`,
|
|
1525
1580
|
margin: r.block.width === "full" ? "0" : "0 auto"
|
|
1526
1581
|
}));
|
|
1527
|
-
return (e, r) => (t(), S("div",
|
|
1582
|
+
return (e, r) => (t(), S("div", vi, [x("hr", {
|
|
1528
1583
|
class: "tpl:m-0 tpl:border-none",
|
|
1529
1584
|
style: n(i.value)
|
|
1530
1585
|
}, null, 4)]));
|
|
1531
1586
|
}
|
|
1532
|
-
}),
|
|
1587
|
+
}), bi = { class: "tpl:w-full" }, xi = ["srcdoc", "title"], Si = {
|
|
1533
1588
|
key: 1,
|
|
1534
1589
|
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)]"
|
|
1535
|
-
},
|
|
1590
|
+
}, Ci = {
|
|
1536
1591
|
key: 0,
|
|
1537
1592
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1538
|
-
},
|
|
1593
|
+
}, wi = {
|
|
1539
1594
|
key: 1,
|
|
1540
1595
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1541
|
-
},
|
|
1596
|
+
}, Ti = /* @__PURE__ */ F({
|
|
1542
1597
|
__name: "HtmlBlock",
|
|
1543
1598
|
props: {
|
|
1544
1599
|
block: {},
|
|
1545
1600
|
viewport: {}
|
|
1546
1601
|
},
|
|
1547
1602
|
setup(e) {
|
|
1548
|
-
let r = e, { t: a } =
|
|
1603
|
+
let r = e, { t: a } = un(), o = p(Ht, !1), s = N(() => r.block.content.trim().length > 0), c = N(() => o && s.value), l = p(At, xt), u = p(Mt, null), d = N(() => u?.value ? Be(r.block.content, l.value) : r.block.content), m = _(null), h = _(60), g = null;
|
|
1549
1604
|
function v() {
|
|
1550
1605
|
let e = m.value?.contentDocument;
|
|
1551
1606
|
e && (h.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1559,7 +1614,7 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1559
1614
|
e || (g?.disconnect(), g = null);
|
|
1560
1615
|
}), i(() => {
|
|
1561
1616
|
g?.disconnect(), g = null;
|
|
1562
|
-
}), (e, r) => (t(), S("div",
|
|
1617
|
+
}), (e, r) => (t(), S("div", bi, [c.value ? (t(), S("iframe", {
|
|
1563
1618
|
key: 0,
|
|
1564
1619
|
ref_key: "iframeRef",
|
|
1565
1620
|
ref: m,
|
|
@@ -1569,22 +1624,22 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1569
1624
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1570
1625
|
style: n({ height: `${h.value}px` }),
|
|
1571
1626
|
onLoad: b
|
|
1572
|
-
}, null, 44,
|
|
1627
|
+
}, null, 44, xi)) : (t(), S("div", Si, [C(y(et), {
|
|
1573
1628
|
size: 24,
|
|
1574
1629
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1575
|
-
}), s.value ? (t(), S("span",
|
|
1630
|
+
}), s.value ? (t(), S("span", Ci, D(y(a).html.preview), 1)) : (t(), S("span", wi, D(y(a).html.empty), 1))]))]));
|
|
1576
1631
|
}
|
|
1577
|
-
}),
|
|
1632
|
+
}), Ei = ["data-drop-enabled"], Di = {
|
|
1578
1633
|
key: 0,
|
|
1579
1634
|
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)]",
|
|
1580
1635
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
1581
|
-
},
|
|
1636
|
+
}, Oi = ["href"], ki = ["src", "alt"], Ai = ["src", "alt"], ji = {
|
|
1582
1637
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1583
1638
|
style: { opacity: "0.7" }
|
|
1584
|
-
},
|
|
1639
|
+
}, Mi = ["href"], Ni = ["src", "alt"], Pi = ["src", "alt"], Fi = {
|
|
1585
1640
|
key: 4,
|
|
1586
1641
|
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)]"
|
|
1587
|
-
},
|
|
1642
|
+
}, Ii = ["aria-label"], Li = { key: 1 }, Ri = /* @__PURE__ */ F({
|
|
1588
1643
|
__name: "ImageBlock",
|
|
1589
1644
|
props: {
|
|
1590
1645
|
block: {},
|
|
@@ -1592,7 +1647,7 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1592
1647
|
},
|
|
1593
1648
|
emits: ["update"],
|
|
1594
1649
|
setup(e, { emit: r }) {
|
|
1595
|
-
let i = e, a = r, { t: o } =
|
|
1650
|
+
let i = e, a = r, { t: o } = un(), { syntax: s } = On(), c = p(Dt, null), l = p(Ut, null), u = N(() => !!c), d = An();
|
|
1596
1651
|
async function f() {
|
|
1597
1652
|
let e = await c?.({ accept: ["images"] });
|
|
1598
1653
|
if (d.alive && e) {
|
|
@@ -1600,7 +1655,7 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1600
1655
|
e.alt && (t.alt = e.alt), a("update", t);
|
|
1601
1656
|
}
|
|
1602
1657
|
}
|
|
1603
|
-
let m = _(), h = _(!1), g = N(() => (l?.value ?? !!c) && !h.value && !
|
|
1658
|
+
let m = _(), h = _(!1), g = N(() => (l?.value ?? !!c) && !h.value && !k.value);
|
|
1604
1659
|
async function v(e) {
|
|
1605
1660
|
if (c) {
|
|
1606
1661
|
h.value = !0;
|
|
@@ -1619,22 +1674,26 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1619
1674
|
}
|
|
1620
1675
|
}
|
|
1621
1676
|
}
|
|
1622
|
-
let { isOver: b } =
|
|
1677
|
+
let { isOver: b } = $e({
|
|
1623
1678
|
target: m,
|
|
1624
1679
|
enabled: g,
|
|
1625
1680
|
onFiles: v
|
|
1626
1681
|
}), T = N(() => ({ textAlign: i.block.align })), E = N(() => {
|
|
1682
|
+
let e = i.block.border, t = ["left", "right"].map((t) => Fe(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1683
|
+
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1684
|
+
}), O = N(() => {
|
|
1627
1685
|
let e = i.block.align;
|
|
1628
1686
|
return {
|
|
1629
1687
|
maxWidth: "100%",
|
|
1630
|
-
width: i.block.width === "full" ?
|
|
1688
|
+
width: i.block.width === "full" ? E.value : `${i.block.width}px`,
|
|
1631
1689
|
height: i.block.height ? `${i.block.height}px` : void 0,
|
|
1632
|
-
borderRadius: i.block.borderRadius
|
|
1690
|
+
borderRadius: je(i.block.borderRadius) ?? void 0,
|
|
1691
|
+
...kr(i.block.border),
|
|
1633
1692
|
display: "block",
|
|
1634
1693
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1635
1694
|
marginRight: e === "center" ? "auto" : void 0
|
|
1636
1695
|
};
|
|
1637
|
-
}),
|
|
1696
|
+
}), k = N(() => Pe(i.block.src, s)), A = Rn(() => k.value ? void 0 : i.block.src), j = Rn(() => k.value ? i.block.placeholderUrl : void 0);
|
|
1638
1697
|
return (r, i) => (t(), S("div", {
|
|
1639
1698
|
ref_key: "dropZoneRef",
|
|
1640
1699
|
ref: m,
|
|
@@ -1642,14 +1701,14 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1642
1701
|
"data-drop-enabled": g.value,
|
|
1643
1702
|
class: "tpl:relative tpl:w-full",
|
|
1644
1703
|
style: n(T.value)
|
|
1645
|
-
}, [g.value && (y(b) || h.value) ? (t(), S("div",
|
|
1704
|
+
}, [g.value && (y(b) || h.value) ? (t(), S("div", Di, [h.value ? (t(), S(M, { key: 0 }, [C(y(bn), {
|
|
1646
1705
|
class: "tpl-spinner",
|
|
1647
1706
|
size: 20,
|
|
1648
1707
|
"stroke-width": 2
|
|
1649
|
-
}), w(" " + D(y(o).image.uploading), 1)], 64)) : (t(), S(M, { key: 1 }, [C(y(
|
|
1708
|
+
}), w(" " + D(y(o).image.uploading), 1)], 64)) : (t(), S(M, { key: 1 }, [C(y(wn), {
|
|
1650
1709
|
size: 20,
|
|
1651
1710
|
"stroke-width": 1.5
|
|
1652
|
-
}), w(" " + D(y(o).image.dropToUpload), 1)], 64))])) : P("", !0), e.block.src &&
|
|
1711
|
+
}), w(" " + D(y(o).image.dropToUpload), 1)], 64))])) : P("", !0), e.block.src && k.value && e.block.placeholderUrl ? (t(), S(M, { key: 1 }, [e.block.linkUrl ? (t(), S("a", {
|
|
1653
1712
|
key: 0,
|
|
1654
1713
|
href: e.block.linkUrl,
|
|
1655
1714
|
target: "_blank",
|
|
@@ -1658,25 +1717,25 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1658
1717
|
}, [x("img", {
|
|
1659
1718
|
class: "tpl:border-0",
|
|
1660
1719
|
loading: "lazy",
|
|
1661
|
-
src: y(
|
|
1720
|
+
src: y(j),
|
|
1662
1721
|
alt: e.block.alt || y(o).image.altTextPlaceholder,
|
|
1663
|
-
style: n(
|
|
1664
|
-
}, null, 12,
|
|
1722
|
+
style: n(O.value)
|
|
1723
|
+
}, null, 12, ki)], 8, Oi)) : (t(), S("img", {
|
|
1665
1724
|
key: 1,
|
|
1666
1725
|
class: "tpl:border-0",
|
|
1667
|
-
src: y(
|
|
1726
|
+
src: y(j),
|
|
1668
1727
|
alt: e.block.alt,
|
|
1669
|
-
style: n(
|
|
1670
|
-
}, null, 12,
|
|
1728
|
+
style: n(O.value)
|
|
1729
|
+
}, null, 12, Ai))], 64)) : e.block.src && k.value ? (t(), S("div", {
|
|
1671
1730
|
key: 2,
|
|
1672
1731
|
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)]",
|
|
1673
|
-
style: n([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" },
|
|
1674
|
-
}, [C(y(
|
|
1732
|
+
style: n([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, O.value])
|
|
1733
|
+
}, [C(y(Xe), {
|
|
1675
1734
|
size: 32,
|
|
1676
1735
|
"stroke-width": 1.5,
|
|
1677
1736
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
1678
1737
|
style: { opacity: "0.5" }
|
|
1679
|
-
}), x("span",
|
|
1738
|
+
}), x("span", ji, [C(Nr, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (t(), S(M, { key: 3 }, [e.block.linkUrl ? (t(), S("a", {
|
|
1680
1739
|
key: 0,
|
|
1681
1740
|
href: e.block.linkUrl,
|
|
1682
1741
|
target: "_blank",
|
|
@@ -1685,36 +1744,36 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1685
1744
|
}, [x("img", {
|
|
1686
1745
|
class: "tpl:border-0",
|
|
1687
1746
|
loading: "lazy",
|
|
1688
|
-
src: y(
|
|
1747
|
+
src: y(A),
|
|
1689
1748
|
alt: e.block.alt || y(o).image.altTextPlaceholder,
|
|
1690
|
-
style: n(
|
|
1691
|
-
}, null, 12,
|
|
1749
|
+
style: n(O.value)
|
|
1750
|
+
}, null, 12, Ni)], 8, Mi)) : (t(), S("img", {
|
|
1692
1751
|
key: 1,
|
|
1693
1752
|
class: "tpl:border-0",
|
|
1694
|
-
src: y(
|
|
1753
|
+
src: y(A),
|
|
1695
1754
|
alt: e.block.alt,
|
|
1696
|
-
style: n(
|
|
1697
|
-
}, null, 12,
|
|
1755
|
+
style: n(O.value)
|
|
1756
|
+
}, null, 12, Pi))], 64)) : (t(), S("div", Fi, [u.value ? (t(), S("button", {
|
|
1698
1757
|
key: 0,
|
|
1699
1758
|
"aria-label": y(o).image.browseMedia,
|
|
1700
1759
|
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)]",
|
|
1701
1760
|
onClick: I(f, ["stop"])
|
|
1702
|
-
}, [C(y(
|
|
1761
|
+
}, [C(y(Xe), {
|
|
1703
1762
|
size: 14,
|
|
1704
1763
|
"stroke-width": 1.5
|
|
1705
|
-
}), w(" " + D(y(o).image.browseMedia), 1)], 8,
|
|
1764
|
+
}), w(" " + D(y(o).image.browseMedia), 1)], 8, Ii)) : (t(), S("span", Li, D(y(o).image.clickToAdd), 1))]))], 12, Ei));
|
|
1706
1765
|
}
|
|
1707
|
-
}),
|
|
1766
|
+
}), zi = { class: "tpl:w-full" }, Bi = ["href"], Vi = {
|
|
1708
1767
|
key: 1,
|
|
1709
1768
|
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)]"
|
|
1710
|
-
},
|
|
1769
|
+
}, Hi = /* @__PURE__ */ F({
|
|
1711
1770
|
__name: "MenuBlock",
|
|
1712
1771
|
props: {
|
|
1713
1772
|
block: {},
|
|
1714
1773
|
viewport: {}
|
|
1715
1774
|
},
|
|
1716
1775
|
setup(e) {
|
|
1717
|
-
let r = e, { t: i } =
|
|
1776
|
+
let r = e, { t: i } = un(), a = N(() => ({
|
|
1718
1777
|
display: "flex",
|
|
1719
1778
|
flexWrap: "wrap",
|
|
1720
1779
|
gap: `0 ${r.block.spacing}px`,
|
|
@@ -1726,7 +1785,7 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1726
1785
|
function s(e) {
|
|
1727
1786
|
return e || r.block.linkColor || r.block.color;
|
|
1728
1787
|
}
|
|
1729
|
-
return (r, c) => (t(), S("div",
|
|
1788
|
+
return (r, c) => (t(), S("div", zi, [o.value ? (t(), S("div", {
|
|
1730
1789
|
key: 0,
|
|
1731
1790
|
style: n(a.value)
|
|
1732
1791
|
}, [(t(!0), S(M, null, l(e.block.items, (r, i) => (t(), S(M, { key: r.id }, [x("a", {
|
|
@@ -1738,15 +1797,15 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1738
1797
|
textDecoration: r.underline ? "underline" : "none"
|
|
1739
1798
|
}),
|
|
1740
1799
|
onClick: c[0] ||= I(() => {}, ["prevent"])
|
|
1741
|
-
}, [C(
|
|
1800
|
+
}, [C(Nr, { text: r.text || "..." }, null, 8, ["text"])], 12, Bi), i < e.block.items.length - 1 ? (t(), S("span", {
|
|
1742
1801
|
key: 0,
|
|
1743
1802
|
style: n({
|
|
1744
1803
|
color: e.block.separatorColor,
|
|
1745
1804
|
padding: `0 ${e.block.spacing}px`
|
|
1746
1805
|
})
|
|
1747
|
-
}, D(e.block.separator), 5)) : P("", !0)], 64))), 128))], 4)) : (t(), S("div",
|
|
1806
|
+
}, D(e.block.separator), 5)) : P("", !0)], 64))), 128))], 4)) : (t(), S("div", Vi, [C(y(rt), { size: 16 }), x("span", null, D(y(i).menu.addLinks), 1)]))]));
|
|
1748
1807
|
}
|
|
1749
|
-
}),
|
|
1808
|
+
}), Ui = /* @__PURE__ */ new Set([
|
|
1750
1809
|
"http",
|
|
1751
1810
|
"https",
|
|
1752
1811
|
"mailto",
|
|
@@ -1756,7 +1815,7 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1756
1815
|
"sms",
|
|
1757
1816
|
"xmpp",
|
|
1758
1817
|
"cid"
|
|
1759
|
-
]),
|
|
1818
|
+
]), Wi = /* @__PURE__ */ new Set([
|
|
1760
1819
|
"SCRIPT",
|
|
1761
1820
|
"STYLE",
|
|
1762
1821
|
"IFRAME",
|
|
@@ -1766,7 +1825,7 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1766
1825
|
"META",
|
|
1767
1826
|
"BASE",
|
|
1768
1827
|
"FORM"
|
|
1769
|
-
]),
|
|
1828
|
+
]), Gi = /* @__PURE__ */ new Set([
|
|
1770
1829
|
"href",
|
|
1771
1830
|
"xlink:href",
|
|
1772
1831
|
"formaction",
|
|
@@ -1775,16 +1834,16 @@ var ei = { class: "tpl:w-full" }, ti = {
|
|
|
1775
1834
|
"background",
|
|
1776
1835
|
"poster"
|
|
1777
1836
|
]);
|
|
1778
|
-
function
|
|
1837
|
+
function Ki(e, t) {
|
|
1779
1838
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
1780
1839
|
if (!n || n.startsWith("#")) return !0;
|
|
1781
1840
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
1782
1841
|
if (!r) return !0;
|
|
1783
1842
|
let i = r[1].toLowerCase();
|
|
1784
|
-
return
|
|
1843
|
+
return Ui.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
1785
1844
|
}
|
|
1786
|
-
function
|
|
1787
|
-
if (
|
|
1845
|
+
function qi(e) {
|
|
1846
|
+
if (Wi.has(e.tagName)) {
|
|
1788
1847
|
e.remove();
|
|
1789
1848
|
return;
|
|
1790
1849
|
}
|
|
@@ -1796,29 +1855,29 @@ function Ri(e) {
|
|
|
1796
1855
|
e.removeAttribute(n);
|
|
1797
1856
|
continue;
|
|
1798
1857
|
}
|
|
1799
|
-
if (
|
|
1800
|
-
|
|
1858
|
+
if (Gi.has(t)) {
|
|
1859
|
+
Ki(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
1801
1860
|
continue;
|
|
1802
1861
|
}
|
|
1803
1862
|
if (t === "src") {
|
|
1804
|
-
|
|
1863
|
+
Ki(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
1805
1864
|
continue;
|
|
1806
1865
|
}
|
|
1807
1866
|
t === "srcdoc" && e.removeAttribute(n);
|
|
1808
1867
|
}
|
|
1809
1868
|
let n = Array.from(e.children);
|
|
1810
|
-
for (let e of n)
|
|
1869
|
+
for (let e of n) qi(e);
|
|
1811
1870
|
}
|
|
1812
|
-
function
|
|
1871
|
+
function Ji(e) {
|
|
1813
1872
|
if (typeof DOMParser > "u") return e;
|
|
1814
1873
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
1815
|
-
for (let e of n)
|
|
1874
|
+
for (let e of n) qi(e);
|
|
1816
1875
|
return t.innerHTML;
|
|
1817
1876
|
}
|
|
1818
1877
|
//#endregion
|
|
1819
1878
|
//#region src/composables/useEditableTextBlock.ts
|
|
1820
|
-
function
|
|
1821
|
-
let t = p(
|
|
1879
|
+
function Yi(e) {
|
|
1880
|
+
let t = p(At, xt), n = p(Mt, null), { syntax: r } = On(), i = N(() => n?.value ? Oe(e(), t.value) : Ce(e(), t.value)), a = N(() => Ji(xe(i.value, r))), o = _(!1), s = _(null), { top: c, left: l } = mt(s), { toLocal: u } = hn(), d = N(() => u({
|
|
1822
1881
|
top: c.value - 8,
|
|
1823
1882
|
left: l.value
|
|
1824
1883
|
}));
|
|
@@ -1839,14 +1898,14 @@ function Bi(e) {
|
|
|
1839
1898
|
}
|
|
1840
1899
|
//#endregion
|
|
1841
1900
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1842
|
-
var
|
|
1901
|
+
var Xi = ["innerHTML"], Zi = /* @__PURE__ */ F({
|
|
1843
1902
|
__name: "ParagraphBlock",
|
|
1844
1903
|
props: {
|
|
1845
1904
|
block: {},
|
|
1846
1905
|
viewport: {}
|
|
1847
1906
|
},
|
|
1848
1907
|
setup(e) {
|
|
1849
|
-
let n = e, r = v(() => import("./ParagraphEditor-
|
|
1908
|
+
let n = e, r = v(() => import("./ParagraphEditor-CnBPQCVo.js")), { isEditing: i, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = Yi(() => n.block.content);
|
|
1850
1909
|
return (n, u) => (t(), S("div", {
|
|
1851
1910
|
ref_key: "blockRef",
|
|
1852
1911
|
ref: a,
|
|
@@ -1865,64 +1924,26 @@ var Vi = ["innerHTML"], Hi = /* @__PURE__ */ F({
|
|
|
1865
1924
|
key: 1,
|
|
1866
1925
|
class: "tpl-text-content tpl:outline-none",
|
|
1867
1926
|
innerHTML: y(s)
|
|
1868
|
-
}, null, 8,
|
|
1869
|
-
}
|
|
1870
|
-
});
|
|
1871
|
-
//#endregion
|
|
1872
|
-
//#region src/utils/blockComponentResolver.ts
|
|
1873
|
-
function Ui(e) {
|
|
1874
|
-
let t = { fontFamily: e.fontFamily };
|
|
1875
|
-
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;
|
|
1876
|
-
}
|
|
1877
|
-
function Wi(e, t, n) {
|
|
1878
|
-
if (t) {
|
|
1879
|
-
let n = t.getComponent(e);
|
|
1880
|
-
if (n) return n;
|
|
1881
|
-
}
|
|
1882
|
-
return n[e.type] ?? null;
|
|
1883
|
-
}
|
|
1884
|
-
function Gi(e) {
|
|
1885
|
-
if (e.type === "wrapper") return {};
|
|
1886
|
-
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
1887
|
-
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
1888
|
-
backgroundColor: n || "transparent"
|
|
1889
|
-
};
|
|
1890
|
-
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;
|
|
1891
|
-
}
|
|
1892
|
-
function Ki(e) {
|
|
1893
|
-
if (e.type !== "section" || !e.wrapper) return null;
|
|
1894
|
-
let t = e.wrapper, n = {};
|
|
1895
|
-
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;
|
|
1896
|
-
}
|
|
1897
|
-
function qi(e) {
|
|
1898
|
-
if (e.type !== "wrapper") return null;
|
|
1899
|
-
let t = {};
|
|
1900
|
-
if (e.styles.backgroundColor && (t.backgroundColor = e.styles.backgroundColor), e.styles.padding) {
|
|
1901
|
-
let n = e.styles.padding;
|
|
1902
|
-
t.padding = `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`;
|
|
1927
|
+
}, null, 8, Xi))], 544));
|
|
1903
1928
|
}
|
|
1904
|
-
|
|
1905
|
-
}
|
|
1906
|
-
//#endregion
|
|
1907
|
-
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
1908
|
-
var Ji = [
|
|
1929
|
+
}), Qi = [
|
|
1909
1930
|
"data-block-id",
|
|
1910
1931
|
"data-block-type",
|
|
1911
1932
|
"data-tpl-picked"
|
|
1912
|
-
],
|
|
1933
|
+
], $i = ["aria-label"], ea = [
|
|
1913
1934
|
"aria-label",
|
|
1914
1935
|
"aria-pressed",
|
|
1915
1936
|
"title"
|
|
1916
|
-
],
|
|
1937
|
+
], ta = ["aria-label", "title"], na = ["aria-label", "title"], ra = ["aria-label", "title"], ia = {
|
|
1917
1938
|
key: 1,
|
|
1918
1939
|
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"
|
|
1919
|
-
},
|
|
1940
|
+
}, aa = { 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)]" }, oa = {
|
|
1920
1941
|
key: 2,
|
|
1921
1942
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1922
|
-
},
|
|
1943
|
+
}, sa = ["aria-label", "title"], ca = {
|
|
1923
1944
|
key: 3,
|
|
1924
1945
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1925
|
-
},
|
|
1946
|
+
}, la = ["aria-label"], ua = /*#__PURE__*/ En(/* @__PURE__ */ F({
|
|
1926
1947
|
__name: "BlockWrapper",
|
|
1927
1948
|
props: {
|
|
1928
1949
|
block: {},
|
|
@@ -1934,7 +1955,7 @@ var Ji = [
|
|
|
1934
1955
|
},
|
|
1935
1956
|
emits: ["select"],
|
|
1936
1957
|
setup(e, { emit: r }) {
|
|
1937
|
-
let i = v(() => import("./BlockIssueBadge-D8KsGWY6.js")), o = e, s = r, { t: c, format: l } =
|
|
1958
|
+
let i = v(() => import("./BlockIssueBadge-D8KsGWY6.js")), o = e, s = r, { t: c, format: l } = un(), d = p(Pt, null), f = _(null), m = N(() => d?.liftedBlockId.value === o.block.id), h = N(() => m.value ? l(c.blockActions.dragLifted, { block: o.block.type }) : c.blockActions.drag);
|
|
1938
1959
|
async function g() {
|
|
1939
1960
|
await a(), f.value?.focus();
|
|
1940
1961
|
}
|
|
@@ -1960,7 +1981,7 @@ var Ji = [
|
|
|
1960
1981
|
let T = N(() => !o.viewport || !o.block.visibility ? !1 : o.block.visibility[o.viewport] === !1), E = N(() => o.previewMode === !0 && T.value), O = N(() => o.viewport ? {
|
|
1961
1982
|
desktop: c.viewport.desktop,
|
|
1962
1983
|
mobile: c.viewport.mobile
|
|
1963
|
-
}[o.viewport] ?? o.viewport : ""), A = N(() => !!o.block.displayCondition), j = p(
|
|
1984
|
+
}[o.viewport] ?? o.viewport : ""), A = N(() => !!o.block.displayCondition), j = p(Vt, null), M = p(Gt, null), ee = p(Xt, {}), F = N(() => ee.savedBlocks?.isPicking.value === !0), te = N(() => !o.nested && ee.savedBlocks?.isAvailable.value === !0 && ee.savedBlocks?.canCreate.value === !0), ne = N(() => o.isSelected && !F.value), re = N(() => ee.comments?.getBlockCount(o.block.id) ?? 0), ie = N(() => Or(o.block)), ae = N(() => Ar(o.block));
|
|
1964
1985
|
function oe(e) {
|
|
1965
1986
|
o.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), s("select"));
|
|
1966
1987
|
}
|
|
@@ -2005,61 +2026,61 @@ var Ji = [
|
|
|
2005
2026
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2006
2027
|
title: y(c).blockActions.drag,
|
|
2007
2028
|
onKeydown: b
|
|
2008
|
-
}, [C(y(
|
|
2029
|
+
}, [C(y(Br), {
|
|
2009
2030
|
size: 14,
|
|
2010
2031
|
"stroke-width": 1.5
|
|
2011
|
-
})], 40,
|
|
2032
|
+
})], 40, ea),
|
|
2012
2033
|
x("button", {
|
|
2013
2034
|
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",
|
|
2014
2035
|
"aria-label": y(c).blockActions.duplicate,
|
|
2015
2036
|
title: y(c).blockActions.duplicate,
|
|
2016
2037
|
onClick: I(ce, ["stop"])
|
|
2017
|
-
}, [C(y(
|
|
2038
|
+
}, [C(y(yn), {
|
|
2018
2039
|
size: 14,
|
|
2019
2040
|
"stroke-width": 1.5
|
|
2020
|
-
})], 8,
|
|
2041
|
+
})], 8, ta),
|
|
2021
2042
|
te.value ? (t(), S("button", {
|
|
2022
2043
|
key: 0,
|
|
2023
2044
|
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",
|
|
2024
2045
|
"aria-label": y(c).blockActions.saveAsBlock,
|
|
2025
2046
|
title: y(c).blockActions.saveAsBlock,
|
|
2026
2047
|
onClick: I(le, ["stop"])
|
|
2027
|
-
}, [C(y(
|
|
2048
|
+
}, [C(y(Ir), {
|
|
2028
2049
|
size: 14,
|
|
2029
2050
|
"stroke-width": 1.5
|
|
2030
|
-
})], 8,
|
|
2051
|
+
})], 8, na)) : P("", !0),
|
|
2031
2052
|
x("button", {
|
|
2032
2053
|
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",
|
|
2033
2054
|
"aria-label": y(c).blockActions.delete,
|
|
2034
2055
|
title: y(c).blockActions.delete,
|
|
2035
2056
|
onClick: I(se, ["stop"])
|
|
2036
|
-
}, [C(y(
|
|
2057
|
+
}, [C(y(Sn), {
|
|
2037
2058
|
size: 14,
|
|
2038
2059
|
"stroke-width": 1.5
|
|
2039
|
-
})], 8,
|
|
2040
|
-
], 8,
|
|
2041
|
-
T.value ? (t(), S("div",
|
|
2060
|
+
})], 8, ra)
|
|
2061
|
+
], 8, $i)) : P("", !0),
|
|
2062
|
+
T.value ? (t(), S("div", ia, [x("span", aa, [C(y(Rr), {
|
|
2042
2063
|
size: 12,
|
|
2043
2064
|
"stroke-width": 1.5
|
|
2044
2065
|
}), w(" " + D(y(l)(y(c).blockActions.hiddenOnViewport, { viewport: O.value })), 1)])])) : P("", !0),
|
|
2045
|
-
A.value && !T.value ? (t(), S("div",
|
|
2066
|
+
A.value && !T.value ? (t(), S("div", oa, [x("button", {
|
|
2046
2067
|
"data-testid": "condition-toggle",
|
|
2047
2068
|
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)]",
|
|
2048
2069
|
"aria-label": y(c).blockActions.conditionToggle,
|
|
2049
2070
|
title: e.block.displayCondition?.label,
|
|
2050
2071
|
onClick: I(ue, ["stop"])
|
|
2051
|
-
}, [C(y(
|
|
2072
|
+
}, [C(y(zr), {
|
|
2052
2073
|
size: 12,
|
|
2053
2074
|
"stroke-width": 2
|
|
2054
|
-
})], 8,
|
|
2055
|
-
re.value > 0 && !T.value ? (t(), S("div",
|
|
2075
|
+
})], 8, sa)])) : P("", !0),
|
|
2076
|
+
re.value > 0 && !T.value ? (t(), S("div", ca, [x("button", {
|
|
2056
2077
|
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)]",
|
|
2057
2078
|
"aria-label": y(l)(y(c).blockActions.comments, { count: String(re.value) }),
|
|
2058
2079
|
onClick: a[0] ||= I((t) => y(ee).comments?.openForBlock(e.block.id), ["stop"])
|
|
2059
|
-
}, [C(y(
|
|
2080
|
+
}, [C(y(xn), {
|
|
2060
2081
|
size: 12,
|
|
2061
2082
|
"stroke-width": 2.5
|
|
2062
|
-
}), w(" " + D(re.value), 1)], 8,
|
|
2083
|
+
}), w(" " + D(re.value), 1)], 8, la)])) : P("", !0),
|
|
2063
2084
|
ae.value ? (t(), S("div", {
|
|
2064
2085
|
key: 4,
|
|
2065
2086
|
class: "tpl-section-wrapper",
|
|
@@ -2072,31 +2093,31 @@ var Ji = [
|
|
|
2072
2093
|
class: "tpl-block-content",
|
|
2073
2094
|
style: n(ie.value)
|
|
2074
2095
|
}, [u(r.$slots, "default", {}, void 0, !0)], 4))
|
|
2075
|
-
], 10,
|
|
2096
|
+
], 10, Qi));
|
|
2076
2097
|
}
|
|
2077
2098
|
}), [["__scopeId", "data-v-2c239048"]]);
|
|
2078
2099
|
//#endregion
|
|
2079
2100
|
//#region src/utils/unwrapParagraph.ts
|
|
2080
|
-
function
|
|
2101
|
+
function da(e) {
|
|
2081
2102
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2082
2103
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2083
2104
|
}
|
|
2084
2105
|
//#endregion
|
|
2085
2106
|
//#region src/components/blocks/TitleBlock.vue
|
|
2086
|
-
var
|
|
2107
|
+
var fa = /* @__PURE__ */ F({
|
|
2087
2108
|
__name: "TitleBlock",
|
|
2088
2109
|
props: {
|
|
2089
2110
|
block: {},
|
|
2090
2111
|
viewport: {}
|
|
2091
2112
|
},
|
|
2092
2113
|
setup(e) {
|
|
2093
|
-
let r = e, i = v(() => import("./TitleEditor-
|
|
2114
|
+
let r = e, i = v(() => import("./TitleEditor-C66Jk73n.js")), { isEditing: a, blockRef: s, toolbarPosition: c, resolvedContent: l, handleDoubleClick: u, handleEditorDone: d } = Yi(() => r.block.content), f = N(() => {
|
|
2094
2115
|
let e = {
|
|
2095
|
-
fontSize: `${
|
|
2116
|
+
fontSize: `${Te[r.block.level]}px`,
|
|
2096
2117
|
textAlign: r.block.textAlign
|
|
2097
2118
|
};
|
|
2098
2119
|
return r.block.color && (e.color = r.block.color), r.block.fontFamily && (e.fontFamily = r.block.fontFamily), e;
|
|
2099
|
-
}), p = N(() => `h${r.block.level}`), m = N(() =>
|
|
2120
|
+
}), p = N(() => `h${r.block.level}`), m = N(() => da(l.value));
|
|
2100
2121
|
return (r, l) => (t(), S("div", {
|
|
2101
2122
|
ref_key: "blockRef",
|
|
2102
2123
|
ref: s,
|
|
@@ -2122,88 +2143,88 @@ var ca = /* @__PURE__ */ F({
|
|
|
2122
2143
|
});
|
|
2123
2144
|
//#endregion
|
|
2124
2145
|
//#region src/utils/sectionColumnDrop.ts
|
|
2125
|
-
function
|
|
2146
|
+
function pa(e) {
|
|
2126
2147
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2127
2148
|
}
|
|
2128
2149
|
//#endregion
|
|
2129
2150
|
//#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
|
|
2130
|
-
var
|
|
2151
|
+
var ma = Object.defineProperty, ha = Object.getOwnPropertySymbols, ga = Object.prototype.hasOwnProperty, _a = Object.prototype.propertyIsEnumerable, va = (e, t, n) => t in e ? ma(e, t, {
|
|
2131
2152
|
enumerable: !0,
|
|
2132
2153
|
configurable: !0,
|
|
2133
2154
|
writable: !0,
|
|
2134
2155
|
value: n
|
|
2135
|
-
}) : e[t] = n,
|
|
2136
|
-
for (var n in t ||= {})
|
|
2137
|
-
if (
|
|
2156
|
+
}) : e[t] = n, ya = (e, t) => {
|
|
2157
|
+
for (var n in t ||= {}) ga.call(t, n) && va(e, n, t[n]);
|
|
2158
|
+
if (ha) for (var n of ha(t)) _a.call(t, n) && va(e, n, t[n]);
|
|
2138
2159
|
return e;
|
|
2139
|
-
},
|
|
2160
|
+
}, ba = (e, t) => {
|
|
2140
2161
|
var n = {};
|
|
2141
|
-
for (var r in e)
|
|
2142
|
-
if (e != null &&
|
|
2162
|
+
for (var r in e) ga.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2163
|
+
if (e != null && ha) for (var r of ha(e)) t.indexOf(r) < 0 && _a.call(e, r) && (n[r] = e[r]);
|
|
2143
2164
|
return n;
|
|
2144
|
-
},
|
|
2145
|
-
function
|
|
2146
|
-
console.warn(
|
|
2165
|
+
}, xa = "[vue-draggable-plus]: ";
|
|
2166
|
+
function Sa(e) {
|
|
2167
|
+
console.warn(xa + e);
|
|
2147
2168
|
}
|
|
2148
|
-
function
|
|
2149
|
-
console.error(
|
|
2169
|
+
function Ca(e) {
|
|
2170
|
+
console.error(xa + e);
|
|
2150
2171
|
}
|
|
2151
|
-
function
|
|
2172
|
+
function wa(e, t, n) {
|
|
2152
2173
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2153
2174
|
}
|
|
2154
|
-
function
|
|
2175
|
+
function Ta(e) {
|
|
2155
2176
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2156
2177
|
}
|
|
2157
|
-
function
|
|
2158
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2178
|
+
function Ea(e) {
|
|
2179
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Ta(n)] = e[n]), t), {});
|
|
2159
2180
|
}
|
|
2160
|
-
function
|
|
2181
|
+
function Da(e, t) {
|
|
2161
2182
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2162
2183
|
}
|
|
2163
|
-
function
|
|
2184
|
+
function Oa(e, t, n) {
|
|
2164
2185
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2165
2186
|
}
|
|
2166
|
-
function
|
|
2187
|
+
function ka(e) {
|
|
2167
2188
|
return e === void 0;
|
|
2168
2189
|
}
|
|
2169
|
-
function
|
|
2190
|
+
function Aa(e) {
|
|
2170
2191
|
return typeof e == "string";
|
|
2171
2192
|
}
|
|
2172
|
-
function
|
|
2193
|
+
function ja(e, t, n) {
|
|
2173
2194
|
let r = e.children[n];
|
|
2174
2195
|
e.insertBefore(t, r);
|
|
2175
2196
|
}
|
|
2176
|
-
function
|
|
2197
|
+
function Ma(e) {
|
|
2177
2198
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2178
2199
|
}
|
|
2179
|
-
function
|
|
2200
|
+
function Na(e, t = document) {
|
|
2180
2201
|
let n = null;
|
|
2181
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2202
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Sa(`Element not found: ${e}`), n;
|
|
2182
2203
|
}
|
|
2183
|
-
function
|
|
2204
|
+
function Pa(e, t, n = null) {
|
|
2184
2205
|
return function(...r) {
|
|
2185
2206
|
return e.apply(n, r), t.apply(n, r);
|
|
2186
2207
|
};
|
|
2187
2208
|
}
|
|
2188
|
-
function
|
|
2189
|
-
let n =
|
|
2209
|
+
function Fa(e, t) {
|
|
2210
|
+
let n = ya({}, e);
|
|
2190
2211
|
return Object.keys(t).forEach((r) => {
|
|
2191
|
-
n[r] ? n[r] =
|
|
2212
|
+
n[r] ? n[r] = Pa(e[r], t[r]) : n[r] = t[r];
|
|
2192
2213
|
}), n;
|
|
2193
2214
|
}
|
|
2194
|
-
function
|
|
2215
|
+
function Ia(e) {
|
|
2195
2216
|
return e instanceof HTMLElement;
|
|
2196
2217
|
}
|
|
2197
|
-
function
|
|
2218
|
+
function La(e, t) {
|
|
2198
2219
|
Object.keys(e).forEach((n) => {
|
|
2199
2220
|
t(n, e[n]);
|
|
2200
2221
|
});
|
|
2201
2222
|
}
|
|
2202
|
-
function
|
|
2223
|
+
function Ra(e) {
|
|
2203
2224
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2204
2225
|
}
|
|
2205
|
-
var
|
|
2206
|
-
function
|
|
2226
|
+
var za = Object.assign;
|
|
2227
|
+
function Ba(e, t) {
|
|
2207
2228
|
var n = Object.keys(e);
|
|
2208
2229
|
if (Object.getOwnPropertySymbols) {
|
|
2209
2230
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2213,26 +2234,26 @@ function Ia(e, t) {
|
|
|
2213
2234
|
}
|
|
2214
2235
|
return n;
|
|
2215
2236
|
}
|
|
2216
|
-
function
|
|
2237
|
+
function Va(e) {
|
|
2217
2238
|
for (var t = 1; t < arguments.length; t++) {
|
|
2218
2239
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2219
|
-
t % 2 ?
|
|
2220
|
-
|
|
2221
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2240
|
+
t % 2 ? Ba(Object(n), !0).forEach(function(t) {
|
|
2241
|
+
Ua(e, t, n[t]);
|
|
2242
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ba(Object(n)).forEach(function(t) {
|
|
2222
2243
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2223
2244
|
});
|
|
2224
2245
|
}
|
|
2225
2246
|
return e;
|
|
2226
2247
|
}
|
|
2227
|
-
function
|
|
2248
|
+
function Ha(e) {
|
|
2228
2249
|
"@babel/helpers - typeof";
|
|
2229
|
-
return
|
|
2250
|
+
return Ha = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2230
2251
|
return typeof e;
|
|
2231
2252
|
} : function(e) {
|
|
2232
2253
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2233
|
-
},
|
|
2254
|
+
}, Ha(e);
|
|
2234
2255
|
}
|
|
2235
|
-
function
|
|
2256
|
+
function Ua(e, t, n) {
|
|
2236
2257
|
return t in e ? Object.defineProperty(e, t, {
|
|
2237
2258
|
value: n,
|
|
2238
2259
|
enumerable: !0,
|
|
@@ -2240,44 +2261,44 @@ function za(e, t, n) {
|
|
|
2240
2261
|
writable: !0
|
|
2241
2262
|
}) : e[t] = n, e;
|
|
2242
2263
|
}
|
|
2243
|
-
function
|
|
2244
|
-
return
|
|
2264
|
+
function Wa() {
|
|
2265
|
+
return Wa = Object.assign || function(e) {
|
|
2245
2266
|
for (var t = 1; t < arguments.length; t++) {
|
|
2246
2267
|
var n = arguments[t];
|
|
2247
2268
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2248
2269
|
}
|
|
2249
2270
|
return e;
|
|
2250
|
-
},
|
|
2271
|
+
}, Wa.apply(this, arguments);
|
|
2251
2272
|
}
|
|
2252
|
-
function
|
|
2273
|
+
function Ga(e, t) {
|
|
2253
2274
|
if (e == null) return {};
|
|
2254
2275
|
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]);
|
|
2255
2276
|
return n;
|
|
2256
2277
|
}
|
|
2257
|
-
function
|
|
2278
|
+
function Ka(e, t) {
|
|
2258
2279
|
if (e == null) return {};
|
|
2259
|
-
var n =
|
|
2280
|
+
var n = Ga(e, t), r, i;
|
|
2260
2281
|
if (Object.getOwnPropertySymbols) {
|
|
2261
2282
|
var a = Object.getOwnPropertySymbols(e);
|
|
2262
2283
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2263
2284
|
}
|
|
2264
2285
|
return n;
|
|
2265
2286
|
}
|
|
2266
|
-
var
|
|
2267
|
-
function
|
|
2287
|
+
var qa = "1.15.2";
|
|
2288
|
+
function Ja(e) {
|
|
2268
2289
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2269
2290
|
}
|
|
2270
|
-
var
|
|
2291
|
+
var Ya = Ja(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), Xa = Ja(/Edge/i), Za = Ja(/firefox/i), Qa = Ja(/safari/i) && !Ja(/chrome/i) && !Ja(/android/i), $a = Ja(/iP(ad|od|hone)/i), eo = Ja(/chrome/i) && Ja(/android/i), to = {
|
|
2271
2292
|
capture: !1,
|
|
2272
2293
|
passive: !1
|
|
2273
2294
|
};
|
|
2274
2295
|
function L(e, t, n) {
|
|
2275
|
-
e.addEventListener(t, n, !
|
|
2296
|
+
e.addEventListener(t, n, !Ya && to);
|
|
2276
2297
|
}
|
|
2277
2298
|
function R(e, t, n) {
|
|
2278
|
-
e.removeEventListener(t, n, !
|
|
2299
|
+
e.removeEventListener(t, n, !Ya && to);
|
|
2279
2300
|
}
|
|
2280
|
-
function
|
|
2301
|
+
function no(e, t) {
|
|
2281
2302
|
if (t) {
|
|
2282
2303
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2283
2304
|
if (e.matches) return e.matches(t);
|
|
@@ -2289,22 +2310,22 @@ function Qa(e, t) {
|
|
|
2289
2310
|
return !1;
|
|
2290
2311
|
}
|
|
2291
2312
|
}
|
|
2292
|
-
function
|
|
2313
|
+
function ro(e) {
|
|
2293
2314
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2294
2315
|
}
|
|
2295
|
-
function
|
|
2316
|
+
function io(e, t, n, r) {
|
|
2296
2317
|
if (e) {
|
|
2297
2318
|
n ||= document;
|
|
2298
2319
|
do {
|
|
2299
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2320
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && no(e, t) : no(e, t)) || r && e === n) return e;
|
|
2300
2321
|
if (e === n) break;
|
|
2301
|
-
} while (e =
|
|
2322
|
+
} while (e = ro(e));
|
|
2302
2323
|
}
|
|
2303
2324
|
return null;
|
|
2304
2325
|
}
|
|
2305
|
-
var
|
|
2326
|
+
var ao = /\s+/g;
|
|
2306
2327
|
function z(e, t, n) {
|
|
2307
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2328
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(ao, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(ao, " "));
|
|
2308
2329
|
}
|
|
2309
2330
|
function B(e, t, n) {
|
|
2310
2331
|
var r = e && e.style;
|
|
@@ -2313,7 +2334,7 @@ function B(e, t, n) {
|
|
|
2313
2334
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2314
2335
|
}
|
|
2315
2336
|
}
|
|
2316
|
-
function
|
|
2337
|
+
function oo(e, t) {
|
|
2317
2338
|
var n = "";
|
|
2318
2339
|
if (typeof e == "string") n = e;
|
|
2319
2340
|
else do {
|
|
@@ -2323,7 +2344,7 @@ function no(e, t) {
|
|
|
2323
2344
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2324
2345
|
return i && new i(n);
|
|
2325
2346
|
}
|
|
2326
|
-
function
|
|
2347
|
+
function so(e, t, n) {
|
|
2327
2348
|
if (e) {
|
|
2328
2349
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2329
2350
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2331,13 +2352,13 @@ function ro(e, t, n) {
|
|
|
2331
2352
|
}
|
|
2332
2353
|
return [];
|
|
2333
2354
|
}
|
|
2334
|
-
function
|
|
2355
|
+
function co() {
|
|
2335
2356
|
return document.scrollingElement || document.documentElement;
|
|
2336
2357
|
}
|
|
2337
2358
|
function V(e, t, n, r, i) {
|
|
2338
2359
|
if (e.getBoundingClientRect || e === window) {
|
|
2339
2360
|
var a, o, s, c, l, u, d;
|
|
2340
|
-
if (e !== window && e.parentNode && e !==
|
|
2361
|
+
if (e !== window && e.parentNode && e !== co() ? (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, !Ya)) do
|
|
2341
2362
|
if (i && i.getBoundingClientRect && (B(i, "transform") !== "none" || n && B(i, "position") !== "static")) {
|
|
2342
2363
|
var f = i.getBoundingClientRect();
|
|
2343
2364
|
o -= f.top + parseInt(B(i, "border-top-width")), s -= f.left + parseInt(B(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
@@ -2345,7 +2366,7 @@ function V(e, t, n, r, i) {
|
|
|
2345
2366
|
}
|
|
2346
2367
|
while (i = i.parentNode);
|
|
2347
2368
|
if (r && e !== window) {
|
|
2348
|
-
var p =
|
|
2369
|
+
var p = oo(i || e), m = p && p.a, h = p && p.d;
|
|
2349
2370
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2350
2371
|
}
|
|
2351
2372
|
return {
|
|
@@ -2358,18 +2379,18 @@ function V(e, t, n, r, i) {
|
|
|
2358
2379
|
};
|
|
2359
2380
|
}
|
|
2360
2381
|
}
|
|
2361
|
-
function
|
|
2362
|
-
for (var r =
|
|
2382
|
+
function lo(e, t, n) {
|
|
2383
|
+
for (var r = go(e, !0), i = V(e)[t]; r;) {
|
|
2363
2384
|
var a = V(r)[n], o = void 0;
|
|
2364
2385
|
if (o = i >= a, !o) return r;
|
|
2365
|
-
if (r ===
|
|
2366
|
-
r =
|
|
2386
|
+
if (r === co()) break;
|
|
2387
|
+
r = go(r, !1);
|
|
2367
2388
|
}
|
|
2368
2389
|
return !1;
|
|
2369
2390
|
}
|
|
2370
|
-
function
|
|
2391
|
+
function uo(e, t, n, r) {
|
|
2371
2392
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2372
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2393
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && io(o[a], n.draggable, e, !1)) {
|
|
2373
2394
|
if (i === t) return o[a];
|
|
2374
2395
|
i++;
|
|
2375
2396
|
}
|
|
@@ -2377,84 +2398,84 @@ function oo(e, t, n, r) {
|
|
|
2377
2398
|
}
|
|
2378
2399
|
return null;
|
|
2379
2400
|
}
|
|
2380
|
-
function
|
|
2381
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || B(n, "display") === "none" || t && !
|
|
2401
|
+
function fo(e, t) {
|
|
2402
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || B(n, "display") === "none" || t && !no(n, t));) n = n.previousElementSibling;
|
|
2382
2403
|
return n || null;
|
|
2383
2404
|
}
|
|
2384
|
-
function
|
|
2405
|
+
function po(e, t) {
|
|
2385
2406
|
var n = 0;
|
|
2386
2407
|
if (!e || !e.parentNode) return -1;
|
|
2387
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2408
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || no(e, t)) && n++;
|
|
2388
2409
|
return n;
|
|
2389
2410
|
}
|
|
2390
|
-
function
|
|
2391
|
-
var t = 0, n = 0, r =
|
|
2411
|
+
function mo(e) {
|
|
2412
|
+
var t = 0, n = 0, r = co();
|
|
2392
2413
|
if (e) do {
|
|
2393
|
-
var i =
|
|
2414
|
+
var i = oo(e), a = i.a, o = i.d;
|
|
2394
2415
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2395
2416
|
} while (e !== r && (e = e.parentNode));
|
|
2396
2417
|
return [t, n];
|
|
2397
2418
|
}
|
|
2398
|
-
function
|
|
2419
|
+
function ho(e, t) {
|
|
2399
2420
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2400
2421
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2401
2422
|
}
|
|
2402
2423
|
return -1;
|
|
2403
2424
|
}
|
|
2404
|
-
function
|
|
2405
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2425
|
+
function go(e, t) {
|
|
2426
|
+
if (!e || !e.getBoundingClientRect) return co();
|
|
2406
2427
|
var n = e, r = !1;
|
|
2407
2428
|
do
|
|
2408
2429
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2409
2430
|
var i = B(n);
|
|
2410
2431
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2411
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2432
|
+
if (!n.getBoundingClientRect || n === document.body) return co();
|
|
2412
2433
|
if (r || t) return n;
|
|
2413
2434
|
r = !0;
|
|
2414
2435
|
}
|
|
2415
2436
|
}
|
|
2416
2437
|
while (n = n.parentNode);
|
|
2417
|
-
return
|
|
2438
|
+
return co();
|
|
2418
2439
|
}
|
|
2419
|
-
function
|
|
2440
|
+
function _o(e, t) {
|
|
2420
2441
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2421
2442
|
return e;
|
|
2422
2443
|
}
|
|
2423
|
-
function
|
|
2444
|
+
function vo(e, t) {
|
|
2424
2445
|
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);
|
|
2425
2446
|
}
|
|
2426
|
-
var
|
|
2427
|
-
function
|
|
2447
|
+
var yo;
|
|
2448
|
+
function bo(e, t) {
|
|
2428
2449
|
return function() {
|
|
2429
|
-
if (!
|
|
2450
|
+
if (!yo) {
|
|
2430
2451
|
var n = arguments, r = this;
|
|
2431
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2432
|
-
|
|
2452
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), yo = setTimeout(function() {
|
|
2453
|
+
yo = void 0;
|
|
2433
2454
|
}, t);
|
|
2434
2455
|
}
|
|
2435
2456
|
};
|
|
2436
2457
|
}
|
|
2437
|
-
function
|
|
2438
|
-
clearTimeout(
|
|
2458
|
+
function xo() {
|
|
2459
|
+
clearTimeout(yo), yo = void 0;
|
|
2439
2460
|
}
|
|
2440
|
-
function
|
|
2461
|
+
function So(e, t, n) {
|
|
2441
2462
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2442
2463
|
}
|
|
2443
|
-
function
|
|
2464
|
+
function Co(e) {
|
|
2444
2465
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2445
2466
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2446
2467
|
}
|
|
2447
|
-
function
|
|
2468
|
+
function wo(e, t, n) {
|
|
2448
2469
|
var r = {};
|
|
2449
2470
|
return Array.from(e.children).forEach(function(i) {
|
|
2450
|
-
if (
|
|
2471
|
+
if (io(i, t.draggable, e, !1) && !i.animated && i !== n) {
|
|
2451
2472
|
var a = V(i);
|
|
2452
2473
|
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);
|
|
2453
2474
|
}
|
|
2454
2475
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2455
2476
|
}
|
|
2456
|
-
var
|
|
2457
|
-
function
|
|
2477
|
+
var H = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2478
|
+
function To() {
|
|
2458
2479
|
var e = [], t;
|
|
2459
2480
|
return {
|
|
2460
2481
|
captureAnimationState: function() {
|
|
@@ -2464,9 +2485,9 @@ function So() {
|
|
|
2464
2485
|
target: t,
|
|
2465
2486
|
rect: V(t)
|
|
2466
2487
|
});
|
|
2467
|
-
var n =
|
|
2488
|
+
var n = Va({}, e[e.length - 1].rect);
|
|
2468
2489
|
if (t.thisAnimationDuration) {
|
|
2469
|
-
var r =
|
|
2490
|
+
var r = oo(t, !0);
|
|
2470
2491
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2471
2492
|
}
|
|
2472
2493
|
t.fromRect = n;
|
|
@@ -2477,7 +2498,7 @@ function So() {
|
|
|
2477
2498
|
e.push(t);
|
|
2478
2499
|
},
|
|
2479
2500
|
removeAnimationState: function(t) {
|
|
2480
|
-
e.splice(
|
|
2501
|
+
e.splice(ho(e, { target: t }), 1);
|
|
2481
2502
|
},
|
|
2482
2503
|
animateAll: function(n) {
|
|
2483
2504
|
var r = this;
|
|
@@ -2487,8 +2508,8 @@ function So() {
|
|
|
2487
2508
|
}
|
|
2488
2509
|
var i = !1, a = 0;
|
|
2489
2510
|
e.forEach(function(e) {
|
|
2490
|
-
var t = 0, n = e.target, o = n.fromRect, s = V(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
2491
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2511
|
+
var t = 0, n = e.target, o = n.fromRect, s = V(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = oo(n, !0);
|
|
2512
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && vo(c, s) && !vo(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Do(u, c, l, r.options)), vo(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() {
|
|
2492
2513
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2493
2514
|
}, t), n.thisAnimationDuration = t);
|
|
2494
2515
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2498,26 +2519,26 @@ function So() {
|
|
|
2498
2519
|
animate: function(e, t, n, r) {
|
|
2499
2520
|
if (r) {
|
|
2500
2521
|
B(e, "transition", ""), B(e, "transform", "");
|
|
2501
|
-
var i =
|
|
2502
|
-
e.animatingX = !!s, e.animatingY = !!c, B(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
2522
|
+
var i = oo(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2523
|
+
e.animatingX = !!s, e.animatingY = !!c, B(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = Eo(e), B(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), B(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2503
2524
|
B(e, "transition", ""), B(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2504
2525
|
}, r);
|
|
2505
2526
|
}
|
|
2506
2527
|
}
|
|
2507
2528
|
};
|
|
2508
2529
|
}
|
|
2509
|
-
function
|
|
2530
|
+
function Eo(e) {
|
|
2510
2531
|
return e.offsetWidth;
|
|
2511
2532
|
}
|
|
2512
|
-
function
|
|
2533
|
+
function Do(e, t, n, r) {
|
|
2513
2534
|
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;
|
|
2514
2535
|
}
|
|
2515
|
-
var
|
|
2536
|
+
var Oo = [], ko = { initializeByDefault: !0 }, Ao = {
|
|
2516
2537
|
mount: function(e) {
|
|
2517
|
-
for (var t in
|
|
2518
|
-
|
|
2538
|
+
for (var t in ko) ko.hasOwnProperty(t) && !(t in e) && (e[t] = ko[t]);
|
|
2539
|
+
Oo.forEach(function(t) {
|
|
2519
2540
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2520
|
-
}),
|
|
2541
|
+
}), Oo.push(e);
|
|
2521
2542
|
},
|
|
2522
2543
|
pluginEvent: function(e, t, n) {
|
|
2523
2544
|
var r = this;
|
|
@@ -2525,16 +2546,16 @@ var To = [], Eo = { initializeByDefault: !0 }, Do = {
|
|
|
2525
2546
|
r.eventCanceled = !0;
|
|
2526
2547
|
};
|
|
2527
2548
|
var i = e + "Global";
|
|
2528
|
-
|
|
2529
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
2549
|
+
Oo.forEach(function(r) {
|
|
2550
|
+
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](Va({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](Va({ sortable: t }, n)));
|
|
2530
2551
|
});
|
|
2531
2552
|
},
|
|
2532
2553
|
initializePlugins: function(e, t, n, r) {
|
|
2533
|
-
for (var i in
|
|
2554
|
+
for (var i in Oo.forEach(function(r) {
|
|
2534
2555
|
var i = r.pluginName;
|
|
2535
2556
|
if (e.options[i] || r.initializeByDefault) {
|
|
2536
2557
|
var a = new r(e, t, e.options);
|
|
2537
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
2558
|
+
a.sortable = e, a.options = e.options, e[i] = a, Wa(n, a.defaults);
|
|
2538
2559
|
}
|
|
2539
2560
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2540
2561
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2543,59 +2564,59 @@ var To = [], Eo = { initializeByDefault: !0 }, Do = {
|
|
|
2543
2564
|
},
|
|
2544
2565
|
getEventProperties: function(e, t) {
|
|
2545
2566
|
var n = {};
|
|
2546
|
-
return
|
|
2547
|
-
typeof r.eventProperties == "function" &&
|
|
2567
|
+
return Oo.forEach(function(r) {
|
|
2568
|
+
typeof r.eventProperties == "function" && Wa(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2548
2569
|
}), n;
|
|
2549
2570
|
},
|
|
2550
2571
|
modifyOption: function(e, t, n) {
|
|
2551
2572
|
var r;
|
|
2552
|
-
return
|
|
2573
|
+
return Oo.forEach(function(i) {
|
|
2553
2574
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2554
2575
|
}), r;
|
|
2555
2576
|
}
|
|
2556
2577
|
};
|
|
2557
|
-
function
|
|
2578
|
+
function jo(e) {
|
|
2558
2579
|
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;
|
|
2559
|
-
if (t ||= n && n[
|
|
2580
|
+
if (t ||= n && n[H], t) {
|
|
2560
2581
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2561
|
-
window.CustomEvent && !
|
|
2582
|
+
window.CustomEvent && !Ya && !Xa ? h = new CustomEvent(r, {
|
|
2562
2583
|
bubbles: !0,
|
|
2563
2584
|
cancelable: !0
|
|
2564
2585
|
}) : (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;
|
|
2565
|
-
var v =
|
|
2586
|
+
var v = Va(Va({}, m), Ao.getEventProperties(r, t));
|
|
2566
2587
|
for (var y in v) h[y] = v[y];
|
|
2567
2588
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2568
2589
|
}
|
|
2569
2590
|
}
|
|
2570
|
-
var
|
|
2571
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2572
|
-
|
|
2573
|
-
dragEl:
|
|
2574
|
-
parentEl:
|
|
2575
|
-
ghostEl:
|
|
2576
|
-
rootEl:
|
|
2577
|
-
nextEl:
|
|
2578
|
-
lastDownEl:
|
|
2579
|
-
cloneEl:
|
|
2580
|
-
cloneHidden:
|
|
2581
|
-
dragStarted:
|
|
2591
|
+
var Mo = ["evt"], U = function(e, t) {
|
|
2592
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = Ka(n, Mo);
|
|
2593
|
+
Ao.pluginEvent.bind(Q)(e, t, Va({
|
|
2594
|
+
dragEl: G,
|
|
2595
|
+
parentEl: K,
|
|
2596
|
+
ghostEl: q,
|
|
2597
|
+
rootEl: J,
|
|
2598
|
+
nextEl: No,
|
|
2599
|
+
lastDownEl: Po,
|
|
2600
|
+
cloneEl: Y,
|
|
2601
|
+
cloneHidden: Fo,
|
|
2602
|
+
dragStarted: Xo,
|
|
2582
2603
|
putSortable: X,
|
|
2583
2604
|
activeSortable: Q.active,
|
|
2584
2605
|
originalEvent: r,
|
|
2585
|
-
oldIndex:
|
|
2586
|
-
oldDraggableIndex:
|
|
2587
|
-
newIndex:
|
|
2588
|
-
newDraggableIndex:
|
|
2589
|
-
hideGhostForTarget:
|
|
2590
|
-
unhideGhostForTarget:
|
|
2606
|
+
oldIndex: Io,
|
|
2607
|
+
oldDraggableIndex: Ro,
|
|
2608
|
+
newIndex: Lo,
|
|
2609
|
+
newDraggableIndex: zo,
|
|
2610
|
+
hideGhostForTarget: ms,
|
|
2611
|
+
unhideGhostForTarget: hs,
|
|
2591
2612
|
cloneNowHidden: function() {
|
|
2592
|
-
|
|
2613
|
+
Fo = !0;
|
|
2593
2614
|
},
|
|
2594
2615
|
cloneNowShown: function() {
|
|
2595
|
-
|
|
2616
|
+
Fo = !1;
|
|
2596
2617
|
},
|
|
2597
2618
|
dispatchSortableEvent: function(e) {
|
|
2598
|
-
|
|
2619
|
+
W({
|
|
2599
2620
|
sortable: t,
|
|
2600
2621
|
name: e,
|
|
2601
2622
|
originalEvent: r
|
|
@@ -2603,46 +2624,46 @@ var ko = ["evt"], H = function(e, t) {
|
|
|
2603
2624
|
}
|
|
2604
2625
|
}, i));
|
|
2605
2626
|
};
|
|
2606
|
-
function
|
|
2607
|
-
|
|
2627
|
+
function W(e) {
|
|
2628
|
+
jo(Va({
|
|
2608
2629
|
putSortable: X,
|
|
2609
|
-
cloneEl:
|
|
2610
|
-
targetEl:
|
|
2611
|
-
rootEl:
|
|
2612
|
-
oldIndex:
|
|
2613
|
-
oldDraggableIndex:
|
|
2614
|
-
newIndex:
|
|
2615
|
-
newDraggableIndex:
|
|
2630
|
+
cloneEl: Y,
|
|
2631
|
+
targetEl: G,
|
|
2632
|
+
rootEl: J,
|
|
2633
|
+
oldIndex: Io,
|
|
2634
|
+
oldDraggableIndex: Ro,
|
|
2635
|
+
newIndex: Lo,
|
|
2636
|
+
newDraggableIndex: zo
|
|
2616
2637
|
}, e));
|
|
2617
2638
|
}
|
|
2618
|
-
var
|
|
2619
|
-
if (
|
|
2620
|
-
if (
|
|
2639
|
+
var G, K, q, J, No, Po, Y, Fo, Io, Lo, Ro, zo, Bo, X, Vo = !1, Ho = !1, Uo = [], Wo, Go, Ko, qo, Jo, Yo, Xo, Zo, Qo, $o = !1, es = !1, ts, Z, ns = [], rs = !1, is = [], as = typeof document < "u", os = $a, ss = Xa || Ya ? "cssFloat" : "float", cs = as && !eo && !$a && "draggable" in document.createElement("div"), ls = function() {
|
|
2640
|
+
if (as) {
|
|
2641
|
+
if (Ya) return !1;
|
|
2621
2642
|
var e = document.createElement("x");
|
|
2622
2643
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2623
2644
|
}
|
|
2624
|
-
}(),
|
|
2625
|
-
var n = B(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
2645
|
+
}(), us = function(e, t) {
|
|
2646
|
+
var n = B(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = uo(e, 0, t), a = uo(e, 1, t), o = i && B(i), s = a && B(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + V(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + V(a).width;
|
|
2626
2647
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2627
2648
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2628
2649
|
if (i && o.float && o.float !== "none") {
|
|
2629
2650
|
var u = o.float === "left" ? "left" : "right";
|
|
2630
2651
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2631
2652
|
}
|
|
2632
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2633
|
-
},
|
|
2653
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[ss] === "none" || a && n[ss] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2654
|
+
}, ds = function(e, t, n) {
|
|
2634
2655
|
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;
|
|
2635
2656
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2636
|
-
},
|
|
2657
|
+
}, fs = function(e, t) {
|
|
2637
2658
|
var n;
|
|
2638
|
-
return
|
|
2639
|
-
var i = r[
|
|
2640
|
-
if (i && !
|
|
2659
|
+
return Uo.some(function(r) {
|
|
2660
|
+
var i = r[H].options.emptyInsertThreshold;
|
|
2661
|
+
if (i && !fo(r)) {
|
|
2641
2662
|
var a = V(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2642
2663
|
if (o && s) return n = r;
|
|
2643
2664
|
}
|
|
2644
2665
|
}), n;
|
|
2645
|
-
},
|
|
2666
|
+
}, ps = function(e) {
|
|
2646
2667
|
function t(e, n) {
|
|
2647
2668
|
return function(r, i, a, o) {
|
|
2648
2669
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2655,31 +2676,31 @@ var W, G, K, q, Ao, jo, J, Mo, No, Y, Po, Fo, Io, X, Lo = !1, Ro = !1, zo = [],
|
|
|
2655
2676
|
};
|
|
2656
2677
|
}
|
|
2657
2678
|
var n = {}, r = e.group;
|
|
2658
|
-
(!r ||
|
|
2659
|
-
},
|
|
2660
|
-
!
|
|
2661
|
-
},
|
|
2662
|
-
!
|
|
2679
|
+
(!r || Ha(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;
|
|
2680
|
+
}, ms = function() {
|
|
2681
|
+
!ls && q && B(q, "display", "none");
|
|
2682
|
+
}, hs = function() {
|
|
2683
|
+
!ls && q && B(q, "display", "");
|
|
2663
2684
|
};
|
|
2664
|
-
|
|
2665
|
-
if (
|
|
2685
|
+
as && !eo && document.addEventListener("click", function(e) {
|
|
2686
|
+
if (Ho) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), Ho = !1, !1;
|
|
2666
2687
|
}, !0);
|
|
2667
|
-
var
|
|
2668
|
-
if (
|
|
2688
|
+
var gs = function(e) {
|
|
2689
|
+
if (G) {
|
|
2669
2690
|
e = e.touches ? e.touches[0] : e;
|
|
2670
|
-
var t =
|
|
2691
|
+
var t = fs(e.clientX, e.clientY);
|
|
2671
2692
|
if (t) {
|
|
2672
2693
|
var n = {};
|
|
2673
2694
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2674
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[
|
|
2695
|
+
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[H]._onDragOver(n);
|
|
2675
2696
|
}
|
|
2676
2697
|
}
|
|
2677
|
-
},
|
|
2678
|
-
|
|
2698
|
+
}, _s = function(e) {
|
|
2699
|
+
G && G.parentNode[H]._isOutsideThisEl(e.target);
|
|
2679
2700
|
};
|
|
2680
2701
|
function Q(e, t) {
|
|
2681
2702
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2682
|
-
this.el = e, this.options = t =
|
|
2703
|
+
this.el = e, this.options = t = Wa({}, t), e[H] = this;
|
|
2683
2704
|
var n = {
|
|
2684
2705
|
group: null,
|
|
2685
2706
|
sort: !0,
|
|
@@ -2692,7 +2713,7 @@ function Q(e, t) {
|
|
|
2692
2713
|
invertedSwapThreshold: null,
|
|
2693
2714
|
removeCloneOnHide: !0,
|
|
2694
2715
|
direction: function() {
|
|
2695
|
-
return
|
|
2716
|
+
return us(e, this.options);
|
|
2696
2717
|
},
|
|
2697
2718
|
ghostClass: "sortable-ghost",
|
|
2698
2719
|
chosenClass: "sortable-chosen",
|
|
@@ -2719,75 +2740,75 @@ function Q(e, t) {
|
|
|
2719
2740
|
x: 0,
|
|
2720
2741
|
y: 0
|
|
2721
2742
|
},
|
|
2722
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
2743
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !Qa,
|
|
2723
2744
|
emptyInsertThreshold: 5
|
|
2724
2745
|
};
|
|
2725
|
-
for (var r in
|
|
2726
|
-
for (var i in
|
|
2727
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
2746
|
+
for (var r in Ao.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
2747
|
+
for (var i in ps(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
2748
|
+
this.nativeDraggable = !t.forceFallback && cs, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? L(e, "pointerdown", this._onTapStart) : (L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart)), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), Uo.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), Wa(this, To());
|
|
2728
2749
|
}
|
|
2729
2750
|
Q.prototype = {
|
|
2730
2751
|
constructor: Q,
|
|
2731
2752
|
_isOutsideThisEl: function(e) {
|
|
2732
|
-
!this.el.contains(e) && e !== this.el && (
|
|
2753
|
+
!this.el.contains(e) && e !== this.el && (Zo = null);
|
|
2733
2754
|
},
|
|
2734
2755
|
_getDirection: function(e, t) {
|
|
2735
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t,
|
|
2756
|
+
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, G) : this.options.direction;
|
|
2736
2757
|
},
|
|
2737
2758
|
_onTapStart: function(e) {
|
|
2738
2759
|
if (e.cancelable) {
|
|
2739
2760
|
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;
|
|
2740
|
-
if (
|
|
2741
|
-
if (
|
|
2761
|
+
if (Ds(n), !G && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && Qa && s && s.tagName.toUpperCase() === "SELECT") && (s = io(s, r.draggable, n, !1), !(s && s.animated) && Po !== s)) {
|
|
2762
|
+
if (Io = po(s), Ro = po(s, r.draggable), typeof l == "function") {
|
|
2742
2763
|
if (l.call(this, e, s, this)) {
|
|
2743
|
-
|
|
2764
|
+
W({
|
|
2744
2765
|
sortable: t,
|
|
2745
2766
|
rootEl: c,
|
|
2746
2767
|
name: "filter",
|
|
2747
2768
|
targetEl: s,
|
|
2748
2769
|
toEl: n,
|
|
2749
2770
|
fromEl: n
|
|
2750
|
-
}),
|
|
2771
|
+
}), U("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
2751
2772
|
return;
|
|
2752
2773
|
}
|
|
2753
2774
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
2754
|
-
if (r =
|
|
2775
|
+
if (r = io(c, r.trim(), n, !1), r) return W({
|
|
2755
2776
|
sortable: t,
|
|
2756
2777
|
rootEl: r,
|
|
2757
2778
|
name: "filter",
|
|
2758
2779
|
targetEl: s,
|
|
2759
2780
|
fromEl: n,
|
|
2760
2781
|
toEl: n
|
|
2761
|
-
}),
|
|
2782
|
+
}), U("filter", t, { evt: e }), !0;
|
|
2762
2783
|
}), l)) {
|
|
2763
2784
|
i && e.cancelable && e.preventDefault();
|
|
2764
2785
|
return;
|
|
2765
2786
|
}
|
|
2766
|
-
r.handle && !
|
|
2787
|
+
r.handle && !io(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2767
2788
|
}
|
|
2768
2789
|
}
|
|
2769
2790
|
},
|
|
2770
2791
|
_prepareDragStart: function(e, t, n) {
|
|
2771
2792
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2772
|
-
if (n && !
|
|
2793
|
+
if (n && !G && n.parentNode === i) {
|
|
2773
2794
|
var c = V(n);
|
|
2774
|
-
if (
|
|
2775
|
-
target:
|
|
2795
|
+
if (J = i, G = n, K = G.parentNode, No = G.nextSibling, Po = n, Bo = a.group, Q.dragged = G, Wo = {
|
|
2796
|
+
target: G,
|
|
2776
2797
|
clientX: (t || e).clientX,
|
|
2777
2798
|
clientY: (t || e).clientY
|
|
2778
|
-
},
|
|
2779
|
-
if (
|
|
2799
|
+
}, Jo = Wo.clientX - c.left, Yo = Wo.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, G.style["will-change"] = "all", s = function() {
|
|
2800
|
+
if (U("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
2780
2801
|
r._onDrop();
|
|
2781
2802
|
return;
|
|
2782
2803
|
}
|
|
2783
|
-
r._disableDelayedDragEvents(), !
|
|
2804
|
+
r._disableDelayedDragEvents(), !Za && r.nativeDraggable && (G.draggable = !0), r._triggerDragStart(e, t), W({
|
|
2784
2805
|
sortable: r,
|
|
2785
2806
|
name: "choose",
|
|
2786
2807
|
originalEvent: e
|
|
2787
|
-
}), z(
|
|
2808
|
+
}), z(G, a.chosenClass, !0);
|
|
2788
2809
|
}, a.ignore.split(",").forEach(function(e) {
|
|
2789
|
-
|
|
2790
|
-
}), L(o, "dragover",
|
|
2810
|
+
so(G, e.trim(), bs);
|
|
2811
|
+
}), L(o, "dragover", gs), L(o, "mousemove", gs), L(o, "touchmove", gs), L(o, "mouseup", r._onDrop), L(o, "touchend", r._onDrop), L(o, "touchcancel", r._onDrop), Za && this.nativeDraggable && (this.options.touchStartThreshold = 4, G.draggable = !0), U("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(Xa || Ya))) {
|
|
2791
2812
|
if (Q.eventCanceled) {
|
|
2792
2813
|
this._onDrop();
|
|
2793
2814
|
return;
|
|
@@ -2801,25 +2822,25 @@ Q.prototype = {
|
|
|
2801
2822
|
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();
|
|
2802
2823
|
},
|
|
2803
2824
|
_disableDelayedDrag: function() {
|
|
2804
|
-
|
|
2825
|
+
G && bs(G), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2805
2826
|
},
|
|
2806
2827
|
_disableDelayedDragEvents: function() {
|
|
2807
2828
|
var e = this.el.ownerDocument;
|
|
2808
2829
|
R(e, "mouseup", this._disableDelayedDrag), R(e, "touchend", this._disableDelayedDrag), R(e, "touchcancel", this._disableDelayedDrag), R(e, "mousemove", this._delayedDragTouchMoveHandler), R(e, "touchmove", this._delayedDragTouchMoveHandler), R(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
2809
2830
|
},
|
|
2810
2831
|
_triggerDragStart: function(e, t) {
|
|
2811
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? L(document, "pointermove", this._onTouchMove) : t ? L(document, "touchmove", this._onTouchMove) : L(document, "mousemove", this._onTouchMove) : (L(
|
|
2832
|
+
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? L(document, "pointermove", this._onTouchMove) : t ? L(document, "touchmove", this._onTouchMove) : L(document, "mousemove", this._onTouchMove) : (L(G, "dragend", this), L(J, "dragstart", this._onDragStart));
|
|
2812
2833
|
try {
|
|
2813
|
-
document.selection ?
|
|
2834
|
+
document.selection ? Os(function() {
|
|
2814
2835
|
document.selection.empty();
|
|
2815
2836
|
}) : window.getSelection().removeAllRanges();
|
|
2816
2837
|
} catch {}
|
|
2817
2838
|
},
|
|
2818
2839
|
_dragStarted: function(e, t) {
|
|
2819
|
-
if (
|
|
2820
|
-
|
|
2840
|
+
if (Vo = !1, J && G) {
|
|
2841
|
+
U("dragStarted", this, { evt: t }), this.nativeDraggable && L(document, "dragover", _s);
|
|
2821
2842
|
var n = this.options;
|
|
2822
|
-
!e && z(
|
|
2843
|
+
!e && z(G, n.dragClass, !1), z(G, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), W({
|
|
2823
2844
|
sortable: this,
|
|
2824
2845
|
name: "start",
|
|
2825
2846
|
originalEvent: t
|
|
@@ -2827,33 +2848,33 @@ Q.prototype = {
|
|
|
2827
2848
|
} else this._nulling();
|
|
2828
2849
|
},
|
|
2829
2850
|
_emulateDragOver: function() {
|
|
2830
|
-
if (
|
|
2831
|
-
this._lastX =
|
|
2832
|
-
for (var e = document.elementFromPoint(
|
|
2833
|
-
if (
|
|
2834
|
-
if (t[
|
|
2851
|
+
if (Go) {
|
|
2852
|
+
this._lastX = Go.clientX, this._lastY = Go.clientY, ms();
|
|
2853
|
+
for (var e = document.elementFromPoint(Go.clientX, Go.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(Go.clientX, Go.clientY), e !== t);) t = e;
|
|
2854
|
+
if (G.parentNode[H]._isOutsideThisEl(e), t) do {
|
|
2855
|
+
if (t[H]) {
|
|
2835
2856
|
var n = void 0;
|
|
2836
|
-
if (n = t[
|
|
2837
|
-
clientX:
|
|
2838
|
-
clientY:
|
|
2857
|
+
if (n = t[H]._onDragOver({
|
|
2858
|
+
clientX: Go.clientX,
|
|
2859
|
+
clientY: Go.clientY,
|
|
2839
2860
|
target: e,
|
|
2840
2861
|
rootEl: t
|
|
2841
2862
|
}), n && !this.options.dragoverBubble) break;
|
|
2842
2863
|
}
|
|
2843
2864
|
e = t;
|
|
2844
2865
|
} while (t = t.parentNode);
|
|
2845
|
-
|
|
2866
|
+
hs();
|
|
2846
2867
|
}
|
|
2847
2868
|
},
|
|
2848
2869
|
_onTouchMove: function(e) {
|
|
2849
|
-
if (
|
|
2850
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a =
|
|
2851
|
-
if (!Q.active && !
|
|
2870
|
+
if (Wo) {
|
|
2871
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q && oo(q, !0), o = q && a && a.a, s = q && a && a.d, c = os && Z && mo(Z), l = (i.clientX - Wo.clientX + r.x) / (o || 1) + (c ? c[0] - ns[0] : 0) / (o || 1), u = (i.clientY - Wo.clientY + r.y) / (s || 1) + (c ? c[1] - ns[1] : 0) / (s || 1);
|
|
2872
|
+
if (!Q.active && !Vo) {
|
|
2852
2873
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2853
2874
|
this._onDragStart(e, !0);
|
|
2854
2875
|
}
|
|
2855
|
-
if (
|
|
2856
|
-
a ? (a.e += l - (
|
|
2876
|
+
if (q) {
|
|
2877
|
+
a ? (a.e += l - (Ko || 0), a.f += u - (qo || 0)) : a = {
|
|
2857
2878
|
a: 1,
|
|
2858
2879
|
b: 0,
|
|
2859
2880
|
c: 0,
|
|
@@ -2862,39 +2883,39 @@ Q.prototype = {
|
|
|
2862
2883
|
f: u
|
|
2863
2884
|
};
|
|
2864
2885
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2865
|
-
B(
|
|
2886
|
+
B(q, "webkitTransform", d), B(q, "mozTransform", d), B(q, "msTransform", d), B(q, "transform", d), Ko = l, qo = u, Go = i;
|
|
2866
2887
|
}
|
|
2867
2888
|
e.cancelable && e.preventDefault();
|
|
2868
2889
|
}
|
|
2869
2890
|
},
|
|
2870
2891
|
_appendGhost: function() {
|
|
2871
|
-
if (!
|
|
2872
|
-
var e = this.options.fallbackOnBody ? document.body :
|
|
2873
|
-
if (
|
|
2892
|
+
if (!q) {
|
|
2893
|
+
var e = this.options.fallbackOnBody ? document.body : J, t = V(G, !0, os, !0, e), n = this.options;
|
|
2894
|
+
if (os) {
|
|
2874
2895
|
for (Z = e; B(Z, "position") === "static" && B(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
2875
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
2896
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = co()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = co(), ns = mo(Z);
|
|
2876
2897
|
}
|
|
2877
|
-
|
|
2898
|
+
q = G.cloneNode(!0), z(q, n.ghostClass, !1), z(q, n.fallbackClass, !0), z(q, n.dragClass, !0), B(q, "transition", ""), B(q, "transform", ""), B(q, "box-sizing", "border-box"), B(q, "margin", 0), B(q, "top", t.top), B(q, "left", t.left), B(q, "width", t.width), B(q, "height", t.height), B(q, "opacity", "0.8"), B(q, "position", os ? "absolute" : "fixed"), B(q, "zIndex", "100000"), B(q, "pointerEvents", "none"), Q.ghost = q, e.appendChild(q), B(q, "transform-origin", Jo / parseInt(q.style.width) * 100 + "% " + Yo / parseInt(q.style.height) * 100 + "%");
|
|
2878
2899
|
}
|
|
2879
2900
|
},
|
|
2880
2901
|
_onDragStart: function(e, t) {
|
|
2881
2902
|
var n = this, r = e.dataTransfer, i = n.options;
|
|
2882
|
-
if (
|
|
2903
|
+
if (U("dragStart", this, { evt: e }), Q.eventCanceled) {
|
|
2883
2904
|
this._onDrop();
|
|
2884
2905
|
return;
|
|
2885
2906
|
}
|
|
2886
|
-
|
|
2887
|
-
|
|
2907
|
+
U("setupClone", this), Q.eventCanceled || (Y = Co(G), Y.removeAttribute("id"), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), z(Y, this.options.chosenClass, !1), Q.clone = Y), n.cloneId = Os(function() {
|
|
2908
|
+
U("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || J.insertBefore(Y, G), n._hideClone(), W({
|
|
2888
2909
|
sortable: n,
|
|
2889
2910
|
name: "clone"
|
|
2890
2911
|
}));
|
|
2891
|
-
}), !t && z(
|
|
2912
|
+
}), !t && z(G, i.dragClass, !0), t ? (Ho = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (R(document, "mouseup", n._onDrop), R(document, "touchend", n._onDrop), R(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, G)), L(document, "drop", n), B(G, "transform", "translateZ(0)")), Vo = !0, n._dragStartId = Os(n._dragStarted.bind(n, t, e)), L(document, "selectstart", n), Xo = !0, Qa && B(document.body, "user-select", "none");
|
|
2892
2913
|
},
|
|
2893
2914
|
_onDragOver: function(e) {
|
|
2894
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
2895
|
-
if (
|
|
2915
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = Bo === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
2916
|
+
if (rs) return;
|
|
2896
2917
|
function h(o, s) {
|
|
2897
|
-
|
|
2918
|
+
U(o, p, Va({
|
|
2898
2919
|
evt: e,
|
|
2899
2920
|
isOwner: l,
|
|
2900
2921
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -2906,7 +2927,7 @@ Q.prototype = {
|
|
|
2906
2927
|
target: n,
|
|
2907
2928
|
completed: _,
|
|
2908
2929
|
onMove: function(n, i) {
|
|
2909
|
-
return
|
|
2930
|
+
return ys(J, t, G, r, n, V(n), e, i);
|
|
2910
2931
|
},
|
|
2911
2932
|
changed: v
|
|
2912
2933
|
}, s));
|
|
@@ -2915,58 +2936,58 @@ Q.prototype = {
|
|
|
2915
2936
|
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
2916
2937
|
}
|
|
2917
2938
|
function _(r) {
|
|
2918
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (z(
|
|
2939
|
+
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (z(G, X ? X.options.ghostClass : c.options.ghostClass, !1), z(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() {
|
|
2919
2940
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
2920
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n ===
|
|
2941
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (Zo = null), !o.dragoverBubble && !e.rootEl && n !== document && (G.parentNode[H]._isOutsideThisEl(e.target), !r && gs(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
2921
2942
|
}
|
|
2922
2943
|
function v() {
|
|
2923
|
-
|
|
2944
|
+
Lo = po(G), zo = po(G, o.draggable), W({
|
|
2924
2945
|
sortable: p,
|
|
2925
2946
|
name: "change",
|
|
2926
2947
|
toEl: t,
|
|
2927
|
-
newIndex:
|
|
2928
|
-
newDraggableIndex:
|
|
2948
|
+
newIndex: Lo,
|
|
2949
|
+
newDraggableIndex: zo,
|
|
2929
2950
|
originalEvent: e
|
|
2930
2951
|
});
|
|
2931
2952
|
}
|
|
2932
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
2933
|
-
if (
|
|
2934
|
-
if (
|
|
2935
|
-
if (f = this._getDirection(e, n) === "vertical", r = V(
|
|
2936
|
-
if (a) return
|
|
2937
|
-
var y =
|
|
2938
|
-
if (!y ||
|
|
2939
|
-
if (y ===
|
|
2940
|
-
if (y && t === e.target && (n = y), n && (i = V(n)),
|
|
2941
|
-
} else if (y &&
|
|
2942
|
-
var b =
|
|
2943
|
-
if (b ===
|
|
2944
|
-
if (n = b, i = V(n),
|
|
2953
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = io(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
2954
|
+
if (G.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
2955
|
+
if (Ho = !1, c && !o.disabled && (l ? u || (a = K !== J) : X === this || (this.lastPutMode = Bo.checkPull(this, c, G, e)) && s.checkPut(this, c, G, e))) {
|
|
2956
|
+
if (f = this._getDirection(e, n) === "vertical", r = V(G), h("dragOverValid"), Q.eventCanceled) return m;
|
|
2957
|
+
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (No ? J.insertBefore(G, No) : J.appendChild(G)), _(!0);
|
|
2958
|
+
var y = fo(t, o.draggable);
|
|
2959
|
+
if (!y || Cs(e, f, this) && !y.animated) {
|
|
2960
|
+
if (y === G) return _(!1);
|
|
2961
|
+
if (y && t === e.target && (n = y), n && (i = V(n)), ys(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);
|
|
2962
|
+
} else if (y && Ss(e, f, this)) {
|
|
2963
|
+
var b = uo(t, 0, o, !0);
|
|
2964
|
+
if (b === G) return _(!1);
|
|
2965
|
+
if (n = b, i = V(n), ys(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
|
|
2945
2966
|
} else if (n.parentNode === t) {
|
|
2946
2967
|
i = V(n);
|
|
2947
|
-
var x = 0, S, C =
|
|
2948
|
-
|
|
2968
|
+
var x = 0, S, C = G.parentNode !== t, w = !ds(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = lo(n, "top", "top") || lo(G, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
2969
|
+
Zo !== n && (S = i[T], $o = !1, es = !w && o.invertSwap || C), x = ws(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, es, Zo === n);
|
|
2949
2970
|
var O;
|
|
2950
2971
|
if (x !== 0) {
|
|
2951
|
-
var k =
|
|
2972
|
+
var k = po(G);
|
|
2952
2973
|
do
|
|
2953
|
-
k -= x, O =
|
|
2954
|
-
while (O && (B(O, "display") === "none" || O ===
|
|
2974
|
+
k -= x, O = K.children[k];
|
|
2975
|
+
while (O && (B(O, "display") === "none" || O === q));
|
|
2955
2976
|
}
|
|
2956
2977
|
if (x === 0 || O === n) return _(!1);
|
|
2957
|
-
|
|
2978
|
+
Zo = n, Qo = x;
|
|
2958
2979
|
var A = n.nextElementSibling, j = !1;
|
|
2959
2980
|
j = x === 1;
|
|
2960
|
-
var M =
|
|
2961
|
-
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1),
|
|
2981
|
+
var M = ys(J, t, G, r, n, i, e, j);
|
|
2982
|
+
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1), rs = !0, setTimeout(xs, 30), g(), j && !A ? t.appendChild(G) : n.parentNode.insertBefore(G, j ? A : n), E && So(E, 0, D - E.scrollTop), K = G.parentNode, S !== void 0 && !es && (ts = Math.abs(S - V(n)[T])), v(), _(!0);
|
|
2962
2983
|
}
|
|
2963
|
-
if (t.contains(
|
|
2984
|
+
if (t.contains(G)) return _(!1);
|
|
2964
2985
|
}
|
|
2965
2986
|
return !1;
|
|
2966
2987
|
},
|
|
2967
2988
|
_ignoreWhileAnimating: null,
|
|
2968
2989
|
_offMoveEvents: function() {
|
|
2969
|
-
R(document, "mousemove", this._onTouchMove), R(document, "touchmove", this._onTouchMove), R(document, "pointermove", this._onTouchMove), R(document, "dragover",
|
|
2990
|
+
R(document, "mousemove", this._onTouchMove), R(document, "touchmove", this._onTouchMove), R(document, "pointermove", this._onTouchMove), R(document, "dragover", gs), R(document, "mousemove", gs), R(document, "touchmove", gs);
|
|
2970
2991
|
},
|
|
2971
2992
|
_offUpEvents: function() {
|
|
2972
2993
|
var e = this.el.ownerDocument;
|
|
@@ -2974,60 +2995,60 @@ Q.prototype = {
|
|
|
2974
2995
|
},
|
|
2975
2996
|
_onDrop: function(e) {
|
|
2976
2997
|
var t = this.el, n = this.options;
|
|
2977
|
-
if (
|
|
2998
|
+
if (Lo = po(G), zo = po(G, n.draggable), U("drop", this, { evt: e }), K = G && G.parentNode, Lo = po(G), zo = po(G, n.draggable), Q.eventCanceled) {
|
|
2978
2999
|
this._nulling();
|
|
2979
3000
|
return;
|
|
2980
3001
|
}
|
|
2981
|
-
|
|
3002
|
+
Vo = !1, es = !1, $o = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), ks(this.cloneId), ks(this._dragStartId), this.nativeDraggable && (R(document, "drop", this), R(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), Qa && B(document.body, "user-select", ""), B(G, "transform", ""), e && (Xo && (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 && R(G, "dragend", this), bs(G), G.style["will-change"] = "", Xo && !Vo && z(G, X ? X.options.ghostClass : this.options.ghostClass, !1), z(G, this.options.chosenClass, !1), W({
|
|
2982
3003
|
sortable: this,
|
|
2983
3004
|
name: "unchoose",
|
|
2984
|
-
toEl:
|
|
3005
|
+
toEl: K,
|
|
2985
3006
|
newIndex: null,
|
|
2986
3007
|
newDraggableIndex: null,
|
|
2987
3008
|
originalEvent: e
|
|
2988
|
-
}),
|
|
3009
|
+
}), J === K ? Lo !== Io && Lo >= 0 && (W({
|
|
2989
3010
|
sortable: this,
|
|
2990
3011
|
name: "update",
|
|
2991
|
-
toEl:
|
|
3012
|
+
toEl: K,
|
|
2992
3013
|
originalEvent: e
|
|
2993
|
-
}),
|
|
3014
|
+
}), W({
|
|
2994
3015
|
sortable: this,
|
|
2995
3016
|
name: "sort",
|
|
2996
|
-
toEl:
|
|
3017
|
+
toEl: K,
|
|
2997
3018
|
originalEvent: e
|
|
2998
|
-
})) : (
|
|
2999
|
-
rootEl:
|
|
3019
|
+
})) : (Lo >= 0 && (W({
|
|
3020
|
+
rootEl: K,
|
|
3000
3021
|
name: "add",
|
|
3001
|
-
toEl:
|
|
3002
|
-
fromEl:
|
|
3022
|
+
toEl: K,
|
|
3023
|
+
fromEl: J,
|
|
3003
3024
|
originalEvent: e
|
|
3004
|
-
}),
|
|
3025
|
+
}), W({
|
|
3005
3026
|
sortable: this,
|
|
3006
3027
|
name: "remove",
|
|
3007
|
-
toEl:
|
|
3028
|
+
toEl: K,
|
|
3008
3029
|
originalEvent: e
|
|
3009
|
-
}),
|
|
3010
|
-
rootEl:
|
|
3030
|
+
}), W({
|
|
3031
|
+
rootEl: K,
|
|
3011
3032
|
name: "sort",
|
|
3012
|
-
toEl:
|
|
3013
|
-
fromEl:
|
|
3033
|
+
toEl: K,
|
|
3034
|
+
fromEl: J,
|
|
3014
3035
|
originalEvent: e
|
|
3015
|
-
}),
|
|
3036
|
+
}), W({
|
|
3016
3037
|
sortable: this,
|
|
3017
3038
|
name: "sort",
|
|
3018
|
-
toEl:
|
|
3039
|
+
toEl: K,
|
|
3019
3040
|
originalEvent: e
|
|
3020
|
-
})), X && X.save()), Q.active && ((
|
|
3041
|
+
})), X && X.save()), Q.active && ((Lo == null || Lo === -1) && (Lo = Io, zo = Ro), W({
|
|
3021
3042
|
sortable: this,
|
|
3022
3043
|
name: "end",
|
|
3023
|
-
toEl:
|
|
3044
|
+
toEl: K,
|
|
3024
3045
|
originalEvent: e
|
|
3025
3046
|
}), this.save()))), this._nulling();
|
|
3026
3047
|
},
|
|
3027
3048
|
_nulling: function() {
|
|
3028
|
-
|
|
3049
|
+
U("nulling", this), J = G = K = q = No = Y = Po = Fo = Wo = Go = Xo = Lo = zo = Io = Ro = Zo = Qo = X = Bo = Q.dragged = Q.ghost = Q.clone = Q.active = null, is.forEach(function(e) {
|
|
3029
3050
|
e.checked = !0;
|
|
3030
|
-
}),
|
|
3051
|
+
}), is.length = Ko = qo = 0;
|
|
3031
3052
|
},
|
|
3032
3053
|
handleEvent: function(e) {
|
|
3033
3054
|
switch (e.type) {
|
|
@@ -3037,20 +3058,20 @@ Q.prototype = {
|
|
|
3037
3058
|
break;
|
|
3038
3059
|
case "dragenter":
|
|
3039
3060
|
case "dragover":
|
|
3040
|
-
|
|
3061
|
+
G && (this._onDragOver(e), vs(e));
|
|
3041
3062
|
break;
|
|
3042
3063
|
case "selectstart": e.preventDefault();
|
|
3043
3064
|
}
|
|
3044
3065
|
},
|
|
3045
3066
|
toArray: function() {
|
|
3046
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3067
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], io(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Es(t));
|
|
3047
3068
|
return e;
|
|
3048
3069
|
},
|
|
3049
3070
|
sort: function(e, t) {
|
|
3050
3071
|
var n = {}, r = this.el;
|
|
3051
3072
|
this.toArray().forEach(function(e, t) {
|
|
3052
3073
|
var i = r.children[t];
|
|
3053
|
-
|
|
3074
|
+
io(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3054
3075
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3055
3076
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3056
3077
|
}), t && this.animateAll();
|
|
@@ -3060,25 +3081,25 @@ Q.prototype = {
|
|
|
3060
3081
|
e && e.set && e.set(this);
|
|
3061
3082
|
},
|
|
3062
3083
|
closest: function(e, t) {
|
|
3063
|
-
return
|
|
3084
|
+
return io(e, t || this.options.draggable, this.el, !1);
|
|
3064
3085
|
},
|
|
3065
3086
|
option: function(e, t) {
|
|
3066
3087
|
var n = this.options;
|
|
3067
3088
|
if (t === void 0) return n[e];
|
|
3068
|
-
var r =
|
|
3069
|
-
n[e] = r === void 0 ? t : r, e === "group" &&
|
|
3089
|
+
var r = Ao.modifyOption(this, e, t);
|
|
3090
|
+
n[e] = r === void 0 ? t : r, e === "group" && ps(n);
|
|
3070
3091
|
},
|
|
3071
3092
|
destroy: function() {
|
|
3072
|
-
|
|
3093
|
+
U("destroy", this);
|
|
3073
3094
|
var e = this.el;
|
|
3074
|
-
e[
|
|
3095
|
+
e[H] = null, R(e, "mousedown", this._onTapStart), R(e, "touchstart", this._onTapStart), R(e, "pointerdown", this._onTapStart), this.nativeDraggable && (R(e, "dragover", this), R(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3075
3096
|
e.removeAttribute("draggable");
|
|
3076
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3097
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), Uo.splice(Uo.indexOf(this.el), 1), this.el = e = null;
|
|
3077
3098
|
},
|
|
3078
3099
|
_hideClone: function() {
|
|
3079
|
-
if (!
|
|
3080
|
-
if (
|
|
3081
|
-
B(
|
|
3100
|
+
if (!Fo) {
|
|
3101
|
+
if (U("hideClone", this), Q.eventCanceled) return;
|
|
3102
|
+
B(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), Fo = !0;
|
|
3082
3103
|
}
|
|
3083
3104
|
},
|
|
3084
3105
|
_showClone: function(e) {
|
|
@@ -3086,99 +3107,99 @@ Q.prototype = {
|
|
|
3086
3107
|
this._hideClone();
|
|
3087
3108
|
return;
|
|
3088
3109
|
}
|
|
3089
|
-
if (
|
|
3090
|
-
if (
|
|
3091
|
-
|
|
3110
|
+
if (Fo) {
|
|
3111
|
+
if (U("showClone", this), Q.eventCanceled) return;
|
|
3112
|
+
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) : No ? J.insertBefore(Y, No) : J.appendChild(Y), this.options.group.revertClone && this.animate(G, Y), B(Y, "display", ""), Fo = !1;
|
|
3092
3113
|
}
|
|
3093
3114
|
}
|
|
3094
3115
|
};
|
|
3095
|
-
function
|
|
3116
|
+
function vs(e) {
|
|
3096
3117
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3097
3118
|
}
|
|
3098
|
-
function
|
|
3099
|
-
var c, l = e[
|
|
3100
|
-
return window.CustomEvent && !
|
|
3119
|
+
function ys(e, t, n, r, i, a, o, s) {
|
|
3120
|
+
var c, l = e[H], u = l.options.onMove, d;
|
|
3121
|
+
return window.CustomEvent && !Ya && !Xa ? c = new CustomEvent("move", {
|
|
3101
3122
|
bubbles: !0,
|
|
3102
3123
|
cancelable: !0
|
|
3103
3124
|
}) : (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 || V(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
3104
3125
|
}
|
|
3105
|
-
function
|
|
3126
|
+
function bs(e) {
|
|
3106
3127
|
e.draggable = !1;
|
|
3107
3128
|
}
|
|
3108
|
-
function
|
|
3109
|
-
|
|
3129
|
+
function xs() {
|
|
3130
|
+
rs = !1;
|
|
3110
3131
|
}
|
|
3111
|
-
function
|
|
3112
|
-
var r = V(
|
|
3132
|
+
function Ss(e, t, n) {
|
|
3133
|
+
var r = V(uo(n.el, 0, n.options, !0)), i = wo(n.el, n.options, q), a = 10;
|
|
3113
3134
|
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;
|
|
3114
3135
|
}
|
|
3115
|
-
function
|
|
3116
|
-
var r = V(
|
|
3136
|
+
function Cs(e, t, n) {
|
|
3137
|
+
var r = V(fo(n.el, n.options.draggable)), i = wo(n.el, n.options, q), a = 10;
|
|
3117
3138
|
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;
|
|
3118
3139
|
}
|
|
3119
|
-
function
|
|
3140
|
+
function ws(e, t, n, r, i, a, o, s) {
|
|
3120
3141
|
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;
|
|
3121
3142
|
if (!o) {
|
|
3122
|
-
if (s &&
|
|
3123
|
-
if (
|
|
3124
|
-
else if (
|
|
3125
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3143
|
+
if (s && ts < l * i) {
|
|
3144
|
+
if (!$o && (Qo === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && ($o = !0), $o) f = !0;
|
|
3145
|
+
else if (Qo === 1 ? c < u + ts : c > d - ts) return -Qo;
|
|
3146
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Ts(t);
|
|
3126
3147
|
}
|
|
3127
3148
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3128
3149
|
}
|
|
3129
|
-
function
|
|
3130
|
-
return
|
|
3150
|
+
function Ts(e) {
|
|
3151
|
+
return po(G) < po(e) ? 1 : -1;
|
|
3131
3152
|
}
|
|
3132
|
-
function
|
|
3153
|
+
function Es(e) {
|
|
3133
3154
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3134
3155
|
return r.toString(36);
|
|
3135
3156
|
}
|
|
3136
|
-
function
|
|
3137
|
-
|
|
3157
|
+
function Ds(e) {
|
|
3158
|
+
is.length = 0;
|
|
3138
3159
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3139
3160
|
var r = t[n];
|
|
3140
|
-
r.checked &&
|
|
3161
|
+
r.checked && is.push(r);
|
|
3141
3162
|
}
|
|
3142
3163
|
}
|
|
3143
|
-
function
|
|
3164
|
+
function Os(e) {
|
|
3144
3165
|
return setTimeout(e, 0);
|
|
3145
3166
|
}
|
|
3146
|
-
function
|
|
3167
|
+
function ks(e) {
|
|
3147
3168
|
return clearTimeout(e);
|
|
3148
3169
|
}
|
|
3149
|
-
|
|
3150
|
-
(Q.active ||
|
|
3170
|
+
as && L(document, "touchmove", function(e) {
|
|
3171
|
+
(Q.active || Vo) && e.cancelable && e.preventDefault();
|
|
3151
3172
|
}), Q.utils = {
|
|
3152
3173
|
on: L,
|
|
3153
3174
|
off: R,
|
|
3154
3175
|
css: B,
|
|
3155
|
-
find:
|
|
3176
|
+
find: so,
|
|
3156
3177
|
is: function(e, t) {
|
|
3157
|
-
return !!
|
|
3178
|
+
return !!io(e, t, e, !1);
|
|
3158
3179
|
},
|
|
3159
|
-
extend:
|
|
3160
|
-
throttle:
|
|
3161
|
-
closest:
|
|
3180
|
+
extend: _o,
|
|
3181
|
+
throttle: bo,
|
|
3182
|
+
closest: io,
|
|
3162
3183
|
toggleClass: z,
|
|
3163
|
-
clone:
|
|
3164
|
-
index:
|
|
3165
|
-
nextTick:
|
|
3166
|
-
cancelNextTick:
|
|
3167
|
-
detectDirection:
|
|
3168
|
-
getChild:
|
|
3184
|
+
clone: Co,
|
|
3185
|
+
index: po,
|
|
3186
|
+
nextTick: Os,
|
|
3187
|
+
cancelNextTick: ks,
|
|
3188
|
+
detectDirection: us,
|
|
3189
|
+
getChild: uo
|
|
3169
3190
|
}, Q.get = function(e) {
|
|
3170
|
-
return e[
|
|
3191
|
+
return e[H];
|
|
3171
3192
|
}, Q.mount = function() {
|
|
3172
3193
|
var e = [...arguments];
|
|
3173
3194
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3174
3195
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3175
|
-
e.utils && (Q.utils =
|
|
3196
|
+
e.utils && (Q.utils = Va(Va({}, Q.utils), e.utils)), Ao.mount(e);
|
|
3176
3197
|
});
|
|
3177
3198
|
}, Q.create = function(e, t) {
|
|
3178
3199
|
return new Q(e, t);
|
|
3179
|
-
}, Q.version =
|
|
3180
|
-
var $ = [],
|
|
3181
|
-
function
|
|
3200
|
+
}, Q.version = qa;
|
|
3201
|
+
var $ = [], As, js, Ms = !1, Ns, Ps, Fs, Is;
|
|
3202
|
+
function Ls() {
|
|
3182
3203
|
function e() {
|
|
3183
3204
|
for (var e in this.defaults = {
|
|
3184
3205
|
scroll: !0,
|
|
@@ -3198,63 +3219,63 @@ function Ns() {
|
|
|
3198
3219
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3199
3220
|
},
|
|
3200
3221
|
drop: function() {
|
|
3201
|
-
this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : (R(document, "pointermove", this._handleFallbackAutoScroll), R(document, "touchmove", this._handleFallbackAutoScroll), R(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3222
|
+
this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : (R(document, "pointermove", this._handleFallbackAutoScroll), R(document, "touchmove", this._handleFallbackAutoScroll), R(document, "mousemove", this._handleFallbackAutoScroll)), zs(), Rs(), xo();
|
|
3202
3223
|
},
|
|
3203
3224
|
nulling: function() {
|
|
3204
|
-
|
|
3225
|
+
Fs = js = As = Ms = Is = Ns = Ps = null, $.length = 0;
|
|
3205
3226
|
},
|
|
3206
3227
|
_handleFallbackAutoScroll: function(e) {
|
|
3207
3228
|
this._handleAutoScroll(e, !0);
|
|
3208
3229
|
},
|
|
3209
3230
|
_handleAutoScroll: function(e, t) {
|
|
3210
3231
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3211
|
-
if (
|
|
3212
|
-
|
|
3213
|
-
var o =
|
|
3214
|
-
|
|
3215
|
-
var a =
|
|
3216
|
-
a !== o && (o = a,
|
|
3217
|
-
}, 10),
|
|
3232
|
+
if (Fs = e, t || this.options.forceAutoScrollFallback || Xa || Ya || Qa) {
|
|
3233
|
+
Bs(e, this.options, a, t);
|
|
3234
|
+
var o = go(a, !0);
|
|
3235
|
+
Ms && (!Is || r !== Ns || i !== Ps) && (Is && zs(), Is = setInterval(function() {
|
|
3236
|
+
var a = go(document.elementFromPoint(r, i), !0);
|
|
3237
|
+
a !== o && (o = a, Rs()), Bs(e, n.options, a, t);
|
|
3238
|
+
}, 10), Ns = r, Ps = i);
|
|
3218
3239
|
} else {
|
|
3219
|
-
if (!this.options.bubbleScroll ||
|
|
3220
|
-
|
|
3240
|
+
if (!this.options.bubbleScroll || go(a, !0) === co()) {
|
|
3241
|
+
Rs();
|
|
3221
3242
|
return;
|
|
3222
3243
|
}
|
|
3223
|
-
|
|
3244
|
+
Bs(e, this.options, go(a, !1), !1);
|
|
3224
3245
|
}
|
|
3225
3246
|
}
|
|
3226
|
-
},
|
|
3247
|
+
}, Wa(e, {
|
|
3227
3248
|
pluginName: "scroll",
|
|
3228
3249
|
initializeByDefault: !0
|
|
3229
3250
|
});
|
|
3230
3251
|
}
|
|
3231
|
-
function
|
|
3252
|
+
function Rs() {
|
|
3232
3253
|
$.forEach(function(e) {
|
|
3233
3254
|
clearInterval(e.pid);
|
|
3234
3255
|
}), $ = [];
|
|
3235
3256
|
}
|
|
3236
|
-
function
|
|
3237
|
-
clearInterval(
|
|
3257
|
+
function zs() {
|
|
3258
|
+
clearInterval(Is);
|
|
3238
3259
|
}
|
|
3239
|
-
var
|
|
3260
|
+
var Bs = bo(function(e, t, n, r) {
|
|
3240
3261
|
if (t.scroll) {
|
|
3241
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3242
|
-
|
|
3243
|
-
var d = 0, f =
|
|
3262
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = co(), l = !1, u;
|
|
3263
|
+
js !== n && (js = n, Rs(), As = t.scroll, u = t.scrollFn, As === !0 && (As = go(n, !0)));
|
|
3264
|
+
var d = 0, f = As;
|
|
3244
3265
|
do {
|
|
3245
3266
|
var p = f, m = V(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 = B(p), E = p.scrollLeft, D = p.scrollTop;
|
|
3246
3267
|
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"));
|
|
3247
3268
|
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);
|
|
3248
3269
|
if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
|
|
3249
3270
|
($[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() {
|
|
3250
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3271
|
+
r && this.layer === 0 && Q.active._onTouchMove(Fs);
|
|
3251
3272
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3252
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[
|
|
3273
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[H], n, t, e, Fs, $[this.layer].el) !== "continue" || So($[this.layer].el, n, t);
|
|
3253
3274
|
}.bind({ layer: d }), 24))), d++;
|
|
3254
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3255
|
-
|
|
3275
|
+
} while (t.bubbleScroll && f !== c && (f = go(f, !1)));
|
|
3276
|
+
Ms = l;
|
|
3256
3277
|
}
|
|
3257
|
-
}, 30),
|
|
3278
|
+
}, 30), Vs = function(e) {
|
|
3258
3279
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3259
3280
|
if (t) {
|
|
3260
3281
|
var c = n || i;
|
|
@@ -3266,8 +3287,8 @@ var Is = go(function(e, t, n, r) {
|
|
|
3266
3287
|
}));
|
|
3267
3288
|
}
|
|
3268
3289
|
};
|
|
3269
|
-
function
|
|
3270
|
-
|
|
3290
|
+
function Hs() {}
|
|
3291
|
+
Hs.prototype = {
|
|
3271
3292
|
startIndex: null,
|
|
3272
3293
|
dragStart: function(e) {
|
|
3273
3294
|
var t = e.oldDraggableIndex;
|
|
@@ -3276,72 +3297,72 @@ Rs.prototype = {
|
|
|
3276
3297
|
onSpill: function(e) {
|
|
3277
3298
|
var t = e.dragEl, n = e.putSortable;
|
|
3278
3299
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3279
|
-
var r =
|
|
3300
|
+
var r = uo(this.sortable.el, this.startIndex, this.options);
|
|
3280
3301
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3281
3302
|
},
|
|
3282
|
-
drop:
|
|
3283
|
-
},
|
|
3284
|
-
function
|
|
3285
|
-
|
|
3303
|
+
drop: Vs
|
|
3304
|
+
}, Wa(Hs, { pluginName: "revertOnSpill" });
|
|
3305
|
+
function Us() {}
|
|
3306
|
+
Us.prototype = {
|
|
3286
3307
|
onSpill: function(e) {
|
|
3287
3308
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3288
3309
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3289
3310
|
},
|
|
3290
|
-
drop:
|
|
3291
|
-
},
|
|
3292
|
-
function
|
|
3311
|
+
drop: Vs
|
|
3312
|
+
}, Wa(Us, { pluginName: "removeOnSpill" }), Q.mount(new Ls()), Q.mount(Us, Hs);
|
|
3313
|
+
function Ws(e) {
|
|
3293
3314
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3294
3315
|
}
|
|
3295
|
-
function
|
|
3316
|
+
function Gs(e) {
|
|
3296
3317
|
te() && O(e);
|
|
3297
3318
|
}
|
|
3298
|
-
function
|
|
3319
|
+
function Ks(e) {
|
|
3299
3320
|
te() ? d(e) : a(e);
|
|
3300
3321
|
}
|
|
3301
|
-
var
|
|
3302
|
-
function
|
|
3303
|
-
|
|
3322
|
+
var qs = null, Js = null;
|
|
3323
|
+
function Ys(e = null, t = null) {
|
|
3324
|
+
qs = e, Js = t;
|
|
3304
3325
|
}
|
|
3305
|
-
function
|
|
3326
|
+
function Xs() {
|
|
3306
3327
|
return {
|
|
3307
|
-
data:
|
|
3308
|
-
clonedData:
|
|
3328
|
+
data: qs,
|
|
3329
|
+
clonedData: Js
|
|
3309
3330
|
};
|
|
3310
3331
|
}
|
|
3311
|
-
var
|
|
3312
|
-
function
|
|
3332
|
+
var Zs = Symbol("cloneElement");
|
|
3333
|
+
function Qs(...e) {
|
|
3313
3334
|
let t = te()?.proxy, n = null, r = e[0], [, i, o] = e;
|
|
3314
3335
|
Array.isArray(y(i)) || (o = i, i = null);
|
|
3315
|
-
let s = null, { immediate: l = !0, clone: u =
|
|
3336
|
+
let s = null, { immediate: l = !0, clone: u = Ws, forceFallback: d, fallbackOnBody: p, customUpdate: m } = y(o) ?? {};
|
|
3316
3337
|
function h(e) {
|
|
3317
3338
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3318
3339
|
n = d && !p ? o.slice(0, -1) : o;
|
|
3319
3340
|
let s = y(y(i)?.[r]), c = u(s);
|
|
3320
|
-
|
|
3341
|
+
Ys(s, c), a[Zs] = c;
|
|
3321
3342
|
}
|
|
3322
3343
|
function g(e) {
|
|
3323
|
-
let t = e.item[
|
|
3324
|
-
if (!
|
|
3325
|
-
if (
|
|
3344
|
+
let t = e.item[Zs];
|
|
3345
|
+
if (!ka(t)) {
|
|
3346
|
+
if (Ma(e.item), c(i)) {
|
|
3326
3347
|
let n = [...y(i)];
|
|
3327
|
-
i.value =
|
|
3348
|
+
i.value = Oa(n, e.newDraggableIndex, t);
|
|
3328
3349
|
return;
|
|
3329
3350
|
}
|
|
3330
|
-
|
|
3351
|
+
Oa(y(i), e.newDraggableIndex, t);
|
|
3331
3352
|
}
|
|
3332
3353
|
}
|
|
3333
3354
|
function _(e) {
|
|
3334
3355
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3335
|
-
if (
|
|
3336
|
-
|
|
3356
|
+
if (ja(t, n, r), o === "clone") {
|
|
3357
|
+
Ma(s);
|
|
3337
3358
|
return;
|
|
3338
3359
|
}
|
|
3339
3360
|
if (c(i)) {
|
|
3340
3361
|
let e = [...y(i)];
|
|
3341
|
-
i.value =
|
|
3362
|
+
i.value = Da(e, a);
|
|
3342
3363
|
return;
|
|
3343
3364
|
}
|
|
3344
|
-
|
|
3365
|
+
Da(y(i), a);
|
|
3345
3366
|
}
|
|
3346
3367
|
function v(e) {
|
|
3347
3368
|
if (m) {
|
|
@@ -3349,12 +3370,12 @@ function Js(...e) {
|
|
|
3349
3370
|
return;
|
|
3350
3371
|
}
|
|
3351
3372
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3352
|
-
if (
|
|
3373
|
+
if (Ma(n), ja(t, n, r), c(i)) {
|
|
3353
3374
|
let e = [...y(i)];
|
|
3354
|
-
i.value =
|
|
3375
|
+
i.value = wa(e, a, o);
|
|
3355
3376
|
return;
|
|
3356
3377
|
}
|
|
3357
|
-
|
|
3378
|
+
wa(y(i), a, o);
|
|
3358
3379
|
}
|
|
3359
3380
|
function b(e) {
|
|
3360
3381
|
let { newIndex: t, oldIndex: r, from: i, to: o } = e, s = null, c = t === r && i === o;
|
|
@@ -3373,7 +3394,7 @@ function Js(...e) {
|
|
|
3373
3394
|
n = null;
|
|
3374
3395
|
}
|
|
3375
3396
|
a(() => {
|
|
3376
|
-
if (
|
|
3397
|
+
if (Ys(), s) throw s;
|
|
3377
3398
|
});
|
|
3378
3399
|
}
|
|
3379
3400
|
let x = {
|
|
@@ -3385,19 +3406,19 @@ function Js(...e) {
|
|
|
3385
3406
|
};
|
|
3386
3407
|
function S(e) {
|
|
3387
3408
|
let n = y(r);
|
|
3388
|
-
return e ||=
|
|
3409
|
+
return e ||= Aa(n) ? Na(n, t?.$el) : n, e && !Ia(e) && (e = e.$el), e || Ca("Root element not found"), e;
|
|
3389
3410
|
}
|
|
3390
3411
|
function C() {
|
|
3391
|
-
let e = y(o) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3392
|
-
return
|
|
3393
|
-
|
|
3394
|
-
}),
|
|
3412
|
+
let e = y(o) ?? {}, { immediate: t, clone: n } = e, r = ba(e, ["immediate", "clone"]);
|
|
3413
|
+
return La(r, (e, t) => {
|
|
3414
|
+
Ra(e) && (r[e] = (e, ...n) => (za(e, Xs()), t(e, ...n)));
|
|
3415
|
+
}), Fa(i === null ? {} : x, r);
|
|
3395
3416
|
}
|
|
3396
3417
|
let w = (e) => {
|
|
3397
3418
|
e = S(e), s && T.destroy(), s = new Q(e, C());
|
|
3398
3419
|
};
|
|
3399
3420
|
f(() => o, () => {
|
|
3400
|
-
s &&
|
|
3421
|
+
s && La(C(), (e, t) => {
|
|
3401
3422
|
s?.option(e, t);
|
|
3402
3423
|
});
|
|
3403
3424
|
}, { deep: !0 });
|
|
@@ -3410,15 +3431,15 @@ function Js(...e) {
|
|
|
3410
3431
|
toArray: () => s?.toArray(),
|
|
3411
3432
|
closest: (...e) => s?.closest(...e)
|
|
3412
3433
|
};
|
|
3413
|
-
return
|
|
3434
|
+
return Ks(() => {
|
|
3414
3435
|
l && w();
|
|
3415
|
-
}),
|
|
3436
|
+
}), Gs(T.destroy), ya({
|
|
3416
3437
|
start: w,
|
|
3417
3438
|
pause: () => T?.option("disabled", !0),
|
|
3418
3439
|
resume: () => T?.option("disabled", !1)
|
|
3419
3440
|
}, T);
|
|
3420
3441
|
}
|
|
3421
|
-
var
|
|
3442
|
+
var $s = [
|
|
3422
3443
|
"update",
|
|
3423
3444
|
"start",
|
|
3424
3445
|
"add",
|
|
@@ -3431,7 +3452,7 @@ var Ys = [
|
|
|
3431
3452
|
"clone",
|
|
3432
3453
|
"move",
|
|
3433
3454
|
"change"
|
|
3434
|
-
],
|
|
3455
|
+
], ec = [
|
|
3435
3456
|
"clone",
|
|
3436
3457
|
"animation",
|
|
3437
3458
|
"ghostClass",
|
|
@@ -3475,43 +3496,43 @@ var Ys = [
|
|
|
3475
3496
|
"tag",
|
|
3476
3497
|
"target",
|
|
3477
3498
|
"customUpdate",
|
|
3478
|
-
|
|
3479
|
-
],
|
|
3499
|
+
...$s.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3500
|
+
], tc = F({
|
|
3480
3501
|
name: "VueDraggable",
|
|
3481
3502
|
model: {
|
|
3482
3503
|
prop: "modelValue",
|
|
3483
3504
|
event: "update:modelValue"
|
|
3484
3505
|
},
|
|
3485
|
-
props:
|
|
3486
|
-
emits: ["update:modelValue",
|
|
3506
|
+
props: ec,
|
|
3507
|
+
emits: ["update:modelValue", ...$s],
|
|
3487
3508
|
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3488
|
-
let a =
|
|
3509
|
+
let a = $s.reduce((e, t) => {
|
|
3489
3510
|
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3490
3511
|
return e[r] = (...e) => n(t, ...e), e;
|
|
3491
3512
|
}, {}), o = N(() => {
|
|
3492
|
-
let t = j(e), { modelValue: n } = t, r =
|
|
3513
|
+
let t = j(e), { modelValue: n } = t, r = ba(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3493
3514
|
let r = y(n);
|
|
3494
3515
|
return r !== void 0 && (e[t] = r), e;
|
|
3495
3516
|
}, {});
|
|
3496
|
-
return
|
|
3517
|
+
return ya(ya({}, a), Ea(ya(ya({}, i), o)));
|
|
3497
3518
|
}), s = N({
|
|
3498
3519
|
get: () => e.modelValue,
|
|
3499
3520
|
set: (e) => n("update:modelValue", e)
|
|
3500
|
-
}), c = _(), l = g(
|
|
3521
|
+
}), c = _(), l = g(Qs(e.target || c, s, o));
|
|
3501
3522
|
return r(l), () => b(e.tag || "div", { ref: c }, (t?.default)?.call(t, l));
|
|
3502
3523
|
}
|
|
3503
|
-
}),
|
|
3524
|
+
}), nc = {
|
|
3504
3525
|
mounted: "mounted",
|
|
3505
3526
|
unmounted: "unmounted"
|
|
3506
3527
|
};
|
|
3507
|
-
|
|
3528
|
+
nc.mounted, nc.unmounted;
|
|
3508
3529
|
//#endregion
|
|
3509
3530
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3510
|
-
var
|
|
3531
|
+
var rc = { class: "tpl:w-full" }, ic = {
|
|
3511
3532
|
key: 0,
|
|
3512
3533
|
"data-testid": "section-drop-hint",
|
|
3513
3534
|
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)]"
|
|
3514
|
-
},
|
|
3535
|
+
}, ac = /* @__PURE__ */ F({
|
|
3515
3536
|
__name: "SectionBlock",
|
|
3516
3537
|
props: {
|
|
3517
3538
|
block: {},
|
|
@@ -3519,13 +3540,13 @@ var $s = { class: "tpl:w-full" }, ec = {
|
|
|
3519
3540
|
},
|
|
3520
3541
|
setup(e) {
|
|
3521
3542
|
let i = {
|
|
3522
|
-
title:
|
|
3523
|
-
paragraph:
|
|
3524
|
-
image:
|
|
3525
|
-
button:
|
|
3526
|
-
divider:
|
|
3527
|
-
custom:
|
|
3528
|
-
}, a = e, { t: s } =
|
|
3543
|
+
title: fa,
|
|
3544
|
+
paragraph: Zi,
|
|
3545
|
+
image: Ri,
|
|
3546
|
+
button: Fr,
|
|
3547
|
+
divider: yi,
|
|
3548
|
+
custom: _i
|
|
3549
|
+
}, a = e, { t: s } = un(), c = ht(Kt, "SectionBlock"), u = p(Gt, null), d = p(rn, null), f = p(Xt, {}), h = p(nn, null);
|
|
3529
3550
|
function g(e) {
|
|
3530
3551
|
let t = f.savedBlocks;
|
|
3531
3552
|
if (t?.isPicking.value) {
|
|
@@ -3560,7 +3581,7 @@ var $s = { class: "tpl:w-full" }, ec = {
|
|
|
3560
3581
|
r[e] = n, c.updateBlock(a.block.id, { children: r });
|
|
3561
3582
|
}
|
|
3562
3583
|
function E(e) {
|
|
3563
|
-
return
|
|
3584
|
+
return Dr(e, d, i);
|
|
3564
3585
|
}
|
|
3565
3586
|
function O(e, t) {
|
|
3566
3587
|
e.type === "custom" && c.updateBlock(e.id, {
|
|
@@ -3568,16 +3589,16 @@ var $s = { class: "tpl:w-full" }, ec = {
|
|
|
3568
3589
|
dataSourceFetched: t.dataSourceFetched
|
|
3569
3590
|
});
|
|
3570
3591
|
}
|
|
3571
|
-
return (i, a) => (t(), S("div",
|
|
3592
|
+
return (i, a) => (t(), S("div", rc, [x("div", { class: k(["tpl:flex tpl:gap-0", { "tpl:flex-col": b.value }]) }, [(t(!0), S(M, null, l(v.value, (i, a) => (t(), S("div", {
|
|
3572
3593
|
key: a,
|
|
3573
3594
|
class: k(["tpl:relative tpl:min-h-[60px] tpl:rounded", w(a).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3574
3595
|
style: n({ width: b.value ? "100%" : _.value[a] })
|
|
3575
|
-
}, [C(y(
|
|
3596
|
+
}, [C(y(tc), {
|
|
3576
3597
|
"model-value": w(a),
|
|
3577
3598
|
group: {
|
|
3578
3599
|
name: "blocks",
|
|
3579
3600
|
pull: !0,
|
|
3580
|
-
put: (e, t, n) => y(
|
|
3601
|
+
put: (e, t, n) => y(pa)(n)
|
|
3581
3602
|
},
|
|
3582
3603
|
animation: 150,
|
|
3583
3604
|
"ghost-class": "tpl-ghost",
|
|
@@ -3590,7 +3611,7 @@ var $s = { class: "tpl:w-full" }, ec = {
|
|
|
3590
3611
|
class: "tpl:min-h-[60px]",
|
|
3591
3612
|
"onUpdate:modelValue": (e) => T(a, e)
|
|
3592
3613
|
}, {
|
|
3593
|
-
default: r(() => [(t(!0), S(M, null, l(w(a), (n) => m((t(), S("div", { key: n.id }, [C(
|
|
3614
|
+
default: r(() => [(t(!0), S(M, null, l(w(a), (n) => m((t(), S("div", { key: n.id }, [C(ua, {
|
|
3594
3615
|
block: n,
|
|
3595
3616
|
"is-selected": y(c).state.selectedBlockId === n.id,
|
|
3596
3617
|
viewport: e.viewport,
|
|
@@ -3622,13 +3643,13 @@ var $s = { class: "tpl:w-full" }, ec = {
|
|
|
3622
3643
|
"model-value",
|
|
3623
3644
|
"group",
|
|
3624
3645
|
"onUpdate:modelValue"
|
|
3625
|
-
]), w(a).length === 0 ? (t(), S("div",
|
|
3646
|
+
]), w(a).length === 0 ? (t(), S("div", ic, [x("span", null, D(y(s).section.dropHere), 1)])) : P("", !0)], 6))), 128))], 2)]));
|
|
3626
3647
|
}
|
|
3627
|
-
}),
|
|
3648
|
+
}), oc = [
|
|
3628
3649
|
"width",
|
|
3629
3650
|
"height",
|
|
3630
3651
|
"fill"
|
|
3631
|
-
],
|
|
3652
|
+
], sc = ["d"], cc = /* @__PURE__ */ F({
|
|
3632
3653
|
__name: "SocialIconSvg",
|
|
3633
3654
|
props: {
|
|
3634
3655
|
platform: {},
|
|
@@ -3636,7 +3657,7 @@ var $s = { class: "tpl:w-full" }, ec = {
|
|
|
3636
3657
|
iconSize: {}
|
|
3637
3658
|
},
|
|
3638
3659
|
setup(e) {
|
|
3639
|
-
let r = e, i = N(() =>
|
|
3660
|
+
let r = e, i = N(() => tt[r.platform]), a = N(() => it[r.iconSize]), o = N(() => {
|
|
3640
3661
|
let e = {
|
|
3641
3662
|
display: "inline-flex",
|
|
3642
3663
|
alignItems: "center",
|
|
@@ -3680,25 +3701,25 @@ var $s = { class: "tpl:w-full" }, ec = {
|
|
|
3680
3701
|
viewBox: "0 0 24 24",
|
|
3681
3702
|
fill: c.value,
|
|
3682
3703
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3683
|
-
}, [x("path", { d: i.value.path }, null, 8,
|
|
3704
|
+
}, [x("path", { d: i.value.path }, null, 8, sc)], 8, oc))], 4));
|
|
3684
3705
|
}
|
|
3685
|
-
}),
|
|
3706
|
+
}), lc = { class: "tpl:w-full" }, uc = ["href"], dc = {
|
|
3686
3707
|
key: 1,
|
|
3687
3708
|
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)]"
|
|
3688
|
-
},
|
|
3709
|
+
}, fc = /* @__PURE__ */ F({
|
|
3689
3710
|
__name: "SocialIconsBlock",
|
|
3690
3711
|
props: {
|
|
3691
3712
|
block: {},
|
|
3692
3713
|
viewport: {}
|
|
3693
3714
|
},
|
|
3694
3715
|
setup(e) {
|
|
3695
|
-
let r = e, { t: i } =
|
|
3716
|
+
let r = e, { t: i } = un(), a = N(() => ({
|
|
3696
3717
|
display: "flex",
|
|
3697
3718
|
flexWrap: "wrap",
|
|
3698
3719
|
gap: `${r.block.spacing}px`,
|
|
3699
3720
|
justifyContent: r.block.align === "left" ? "flex-start" : r.block.align === "right" ? "flex-end" : "center"
|
|
3700
3721
|
})), o = N(() => r.block.icons.length > 0);
|
|
3701
|
-
return (r, s) => (t(), S("div",
|
|
3722
|
+
return (r, s) => (t(), S("div", lc, [o.value ? (t(), S("div", {
|
|
3702
3723
|
key: 0,
|
|
3703
3724
|
style: n(a.value)
|
|
3704
3725
|
}, [(t(!0), S(M, null, l(e.block.icons, (n) => (t(), S("a", {
|
|
@@ -3706,7 +3727,7 @@ var $s = { class: "tpl:w-full" }, ec = {
|
|
|
3706
3727
|
href: n.url || "#",
|
|
3707
3728
|
class: "tpl:cursor-default",
|
|
3708
3729
|
onClick: s[0] ||= I(() => {}, ["prevent"])
|
|
3709
|
-
}, [C(
|
|
3730
|
+
}, [C(cc, {
|
|
3710
3731
|
platform: n.platform,
|
|
3711
3732
|
"icon-style": e.block.iconStyle,
|
|
3712
3733
|
"icon-size": e.block.iconSize
|
|
@@ -3714,44 +3735,44 @@ var $s = { class: "tpl:w-full" }, ec = {
|
|
|
3714
3735
|
"platform",
|
|
3715
3736
|
"icon-style",
|
|
3716
3737
|
"icon-size"
|
|
3717
|
-
])], 8,
|
|
3738
|
+
])], 8, uc))), 128))], 4)) : (t(), S("div", dc, [C(y(nt), { size: 16 }), x("span", null, D(y(i).social.addIcons), 1)]))]));
|
|
3718
3739
|
}
|
|
3719
|
-
}),
|
|
3740
|
+
}), pc = { class: "tpl:w-full" }, mc = {
|
|
3720
3741
|
key: 0,
|
|
3721
3742
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3722
3743
|
style: {
|
|
3723
3744
|
"background-color": "var(--tpl-bg-hover)",
|
|
3724
3745
|
color: "var(--tpl-text-dim)"
|
|
3725
3746
|
}
|
|
3726
|
-
},
|
|
3747
|
+
}, hc = /* @__PURE__ */ F({
|
|
3727
3748
|
__name: "SpacerBlock",
|
|
3728
3749
|
props: {
|
|
3729
3750
|
block: {},
|
|
3730
3751
|
viewport: {}
|
|
3731
3752
|
},
|
|
3732
3753
|
setup(e) {
|
|
3733
|
-
let r = e, i =
|
|
3754
|
+
let r = e, i = ht(Kt, "SpacerBlock"), a = N(() => ({
|
|
3734
3755
|
height: `${r.block.height}px`,
|
|
3735
3756
|
minHeight: `${r.block.height}px`,
|
|
3736
3757
|
...i.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3737
3758
|
}));
|
|
3738
|
-
return (r, o) => (t(), S("div",
|
|
3759
|
+
return (r, o) => (t(), S("div", pc, [x("div", {
|
|
3739
3760
|
style: n(a.value),
|
|
3740
3761
|
class: k(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !y(i).state.previewMode }])
|
|
3741
|
-
}, [y(i).state.previewMode ? P("", !0) : (t(), S("span",
|
|
3762
|
+
}, [y(i).state.previewMode ? P("", !0) : (t(), S("span", mc, D(e.block.height) + "px ", 1))], 6)]));
|
|
3742
3763
|
}
|
|
3743
|
-
}),
|
|
3764
|
+
}), gc = { class: "tpl:w-full" }, _c = { key: 0 }, vc = [
|
|
3744
3765
|
"aria-label",
|
|
3745
3766
|
"data-placeholder",
|
|
3746
3767
|
"onBlur"
|
|
3747
|
-
],
|
|
3768
|
+
], yc = [
|
|
3748
3769
|
"aria-label",
|
|
3749
3770
|
"data-placeholder",
|
|
3750
3771
|
"onBlur"
|
|
3751
|
-
],
|
|
3772
|
+
], bc = {
|
|
3752
3773
|
key: 1,
|
|
3753
3774
|
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)]"
|
|
3754
|
-
},
|
|
3775
|
+
}, xc = /*#__PURE__*/ En(/* @__PURE__ */ F({
|
|
3755
3776
|
__name: "TableBlock",
|
|
3756
3777
|
props: {
|
|
3757
3778
|
block: {},
|
|
@@ -3765,7 +3786,7 @@ var $s = { class: "tpl:w-full" }, ec = {
|
|
|
3765
3786
|
updated(e, t) {
|
|
3766
3787
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
3767
3788
|
}
|
|
3768
|
-
}, i = e, { t: a } =
|
|
3789
|
+
}, i = e, { t: a } = un(), o = ht(Kt, "TableBlock"), s = N(() => i.block.rows.length > 0), c = N(() => {
|
|
3769
3790
|
let e = {
|
|
3770
3791
|
width: "100%",
|
|
3771
3792
|
borderCollapse: "collapse",
|
|
@@ -3796,11 +3817,11 @@ var $s = { class: "tpl:w-full" }, ec = {
|
|
|
3796
3817
|
} : n);
|
|
3797
3818
|
o.updateBlock(i.block.id, { rows: a });
|
|
3798
3819
|
}
|
|
3799
|
-
return (e, i) => (t(), S("div",
|
|
3820
|
+
return (e, i) => (t(), S("div", gc, [s.value ? (t(), S("table", {
|
|
3800
3821
|
key: 0,
|
|
3801
3822
|
style: n(c.value),
|
|
3802
3823
|
class: "tpl-table-editable"
|
|
3803
|
-
}, [f.value ? (t(), S("thead",
|
|
3824
|
+
}, [f.value ? (t(), S("thead", _c, [x("tr", null, [(t(!0), S(M, null, l(f.value.cells, (e) => m((t(), S("th", {
|
|
3804
3825
|
key: e.id,
|
|
3805
3826
|
style: n(d.value),
|
|
3806
3827
|
"aria-label": y(a).table.cellPlaceholder,
|
|
@@ -3809,7 +3830,7 @@ var $s = { class: "tpl:w-full" }, ec = {
|
|
|
3809
3830
|
onBlur: (t) => g(f.value.id, e.id, t),
|
|
3810
3831
|
onKeydown: i[0] ||= re(I((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3811
3832
|
onClick: I(h, ["stop"])
|
|
3812
|
-
}, null, 44,
|
|
3833
|
+
}, null, 44, vc)), [[r, e.content]])), 128))])])) : P("", !0), x("tbody", null, [(t(!0), S(M, null, l(p.value, (e) => (t(), S("tr", { key: e.id }, [(t(!0), S(M, null, l(e.cells, (o) => m((t(), S("td", {
|
|
3813
3834
|
key: o.id,
|
|
3814
3835
|
style: n(u.value),
|
|
3815
3836
|
"aria-label": y(a).table.cellPlaceholder,
|
|
@@ -3818,9 +3839,9 @@ var $s = { class: "tpl:w-full" }, ec = {
|
|
|
3818
3839
|
onBlur: (t) => g(e.id, o.id, t),
|
|
3819
3840
|
onKeydown: i[1] ||= re(I((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3820
3841
|
onClick: I(h, ["stop"])
|
|
3821
|
-
}, null, 44,
|
|
3842
|
+
}, null, 44, yc)), [[r, o.content]])), 128))]))), 128))])], 4)) : (t(), S("div", bc, [C(y(Je), { size: 16 }), x("span", null, D(y(a).table.empty), 1)]))]));
|
|
3822
3843
|
}
|
|
3823
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
3844
|
+
}), [["__scopeId", "data-v-963ac422"]]), Sc = /* @__PURE__ */ F({
|
|
3824
3845
|
__name: "VideoPlayButton",
|
|
3825
3846
|
props: { hoverEffect: {
|
|
3826
3847
|
type: Boolean,
|
|
@@ -3838,7 +3859,7 @@ var $s = { class: "tpl:w-full" }, ec = {
|
|
|
3838
3859
|
});
|
|
3839
3860
|
//#endregion
|
|
3840
3861
|
//#region src/utils/videoThumbnail.ts
|
|
3841
|
-
function
|
|
3862
|
+
function Cc(e) {
|
|
3842
3863
|
if (!e) return {
|
|
3843
3864
|
platform: "unknown",
|
|
3844
3865
|
videoId: null,
|
|
@@ -3870,25 +3891,25 @@ function yc(e) {
|
|
|
3870
3891
|
thumbnailUrl: null
|
|
3871
3892
|
};
|
|
3872
3893
|
}
|
|
3873
|
-
function
|
|
3874
|
-
return t ||
|
|
3894
|
+
function wc(e, t) {
|
|
3895
|
+
return t || Cc(e).thumbnailUrl;
|
|
3875
3896
|
}
|
|
3876
3897
|
//#endregion
|
|
3877
3898
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3878
|
-
var
|
|
3899
|
+
var Tc = ["src", "alt"], Ec = {
|
|
3879
3900
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3880
3901
|
style: { opacity: "0.7" }
|
|
3881
|
-
},
|
|
3902
|
+
}, Dc = ["href"], Oc = ["src", "alt"], kc = ["src", "alt"], Ac = {
|
|
3882
3903
|
key: 3,
|
|
3883
3904
|
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)]"
|
|
3884
|
-
},
|
|
3905
|
+
}, jc = /* @__PURE__ */ F({
|
|
3885
3906
|
__name: "VideoBlock",
|
|
3886
3907
|
props: {
|
|
3887
3908
|
block: {},
|
|
3888
3909
|
viewport: {}
|
|
3889
3910
|
},
|
|
3890
3911
|
setup(e) {
|
|
3891
|
-
let r = e, { t: i } =
|
|
3912
|
+
let r = e, { t: i } = un(), { syntax: a } = On(), o = N(() => Pe(r.block.url, a) || Pe(r.block.thumbnailUrl, a)), s = Rn(() => o.value ? void 0 : r.block.thumbnailUrl || void 0), c = Rn(() => o.value ? r.block.placeholderUrl : void 0), l = N(() => o.value ? null : r.block.thumbnailUrl ? s.value ?? null : wc(r.block.url)), u = N(() => ({ textAlign: r.block.align })), d = N(() => {
|
|
3892
3913
|
let e = r.block.align;
|
|
3893
3914
|
return {
|
|
3894
3915
|
maxWidth: "100%",
|
|
@@ -3898,7 +3919,7 @@ var xc = ["src", "alt"], Sc = {
|
|
|
3898
3919
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
3899
3920
|
marginRight: e === "center" ? "auto" : void 0
|
|
3900
3921
|
};
|
|
3901
|
-
}), f = N(() => ({ height: r.block.height ? `${r.block.height}px` : void 0 })), p = N(() =>
|
|
3922
|
+
}), f = N(() => ({ height: r.block.height ? `${r.block.height}px` : void 0 })), p = N(() => Pe(r.block.url, a) ? r.block.url : r.block.thumbnailUrl);
|
|
3902
3923
|
return (r, a) => (t(), S("div", {
|
|
3903
3924
|
class: "tpl:w-full",
|
|
3904
3925
|
style: n(u.value)
|
|
@@ -3911,16 +3932,16 @@ var xc = ["src", "alt"], Sc = {
|
|
|
3911
3932
|
src: y(c),
|
|
3912
3933
|
alt: e.block.alt,
|
|
3913
3934
|
style: n(f.value)
|
|
3914
|
-
}, null, 12,
|
|
3935
|
+
}, null, 12, Tc), C(Sc)], 4)) : o.value ? (t(), S("div", {
|
|
3915
3936
|
key: 1,
|
|
3916
3937
|
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)]",
|
|
3917
3938
|
style: n([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
3918
|
-
}, [C(y(
|
|
3939
|
+
}, [C(y(Hr), {
|
|
3919
3940
|
size: 36,
|
|
3920
3941
|
"stroke-width": 1.5,
|
|
3921
3942
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3922
3943
|
style: { opacity: "0.5" }
|
|
3923
|
-
}), x("span",
|
|
3944
|
+
}), x("span", Ec, [C(Nr, { text: p.value }, null, 8, ["text"])])], 4)) : l.value ? (t(), S(M, { key: 2 }, [e.block.url ? (t(), S("a", {
|
|
3924
3945
|
key: 0,
|
|
3925
3946
|
href: e.block.url,
|
|
3926
3947
|
target: "_blank",
|
|
@@ -3933,7 +3954,7 @@ var xc = ["src", "alt"], Sc = {
|
|
|
3933
3954
|
src: l.value,
|
|
3934
3955
|
alt: e.block.alt,
|
|
3935
3956
|
style: n(f.value)
|
|
3936
|
-
}, null, 12,
|
|
3957
|
+
}, null, 12, Oc), C(Sc, { "hover-effect": "" })], 12, Dc)) : (t(), S("div", {
|
|
3937
3958
|
key: 1,
|
|
3938
3959
|
class: "tpl:relative tpl:inline-block",
|
|
3939
3960
|
style: n(d.value)
|
|
@@ -3942,54 +3963,54 @@ var xc = ["src", "alt"], Sc = {
|
|
|
3942
3963
|
src: l.value,
|
|
3943
3964
|
alt: e.block.alt,
|
|
3944
3965
|
style: n(f.value)
|
|
3945
|
-
}, null, 12,
|
|
3966
|
+
}, null, 12, kc), C(Sc)], 4))], 64)) : (t(), S("div", Ac, [C(y(Hr), {
|
|
3946
3967
|
size: 40,
|
|
3947
3968
|
"stroke-width": 1.5,
|
|
3948
3969
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3949
3970
|
}), x("span", null, D(y(i).video.addVideo), 1)]))], 4));
|
|
3950
3971
|
}
|
|
3951
|
-
}),
|
|
3952
|
-
section:
|
|
3953
|
-
title:
|
|
3954
|
-
paragraph:
|
|
3955
|
-
image:
|
|
3956
|
-
button:
|
|
3957
|
-
divider:
|
|
3958
|
-
video:
|
|
3959
|
-
social:
|
|
3960
|
-
menu:
|
|
3961
|
-
table:
|
|
3962
|
-
spacer:
|
|
3963
|
-
html:
|
|
3972
|
+
}), Mc = {
|
|
3973
|
+
section: ac,
|
|
3974
|
+
title: fa,
|
|
3975
|
+
paragraph: Zi,
|
|
3976
|
+
image: Ri,
|
|
3977
|
+
button: Fr,
|
|
3978
|
+
divider: yi,
|
|
3979
|
+
video: jc,
|
|
3980
|
+
social: fc,
|
|
3981
|
+
menu: Hi,
|
|
3982
|
+
table: xc,
|
|
3983
|
+
spacer: hc,
|
|
3984
|
+
html: Ti,
|
|
3964
3985
|
countdown: v(() => import("./CountdownBlock-C6R-hn7D.js"))
|
|
3965
3986
|
};
|
|
3966
|
-
function
|
|
3967
|
-
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } =
|
|
3987
|
+
function Nc(t) {
|
|
3988
|
+
let { editor: n, config: r, translations: i, fontsManager: a } = t, { t: o, format: c } = un(i), l = N(() => pe(pe(pe(nr(i), Sr(n.content.value.settings?.locale)), Se(n.content.value.settings) === "rtl" ? {
|
|
3968
3989
|
title: { textAlign: "right" },
|
|
3969
3990
|
table: { textAlign: "right" }
|
|
3970
3991
|
} : {}), r.blockDefaults ?? {}));
|
|
3971
3992
|
n.setUiTheme(r.uiTheme ?? "auto");
|
|
3972
|
-
let { resolvedTheme: u } =
|
|
3993
|
+
let { resolvedTheme: u } = Wn(N(() => n.state.uiTheme)), d = _(r.theme ?? {}), { themeStyles: p } = Kn({
|
|
3973
3994
|
themeOverrides: d,
|
|
3974
3995
|
resolvedTheme: u,
|
|
3975
3996
|
extraStyles: () => ({
|
|
3976
3997
|
"--tpl-drop-text": `"${i.canvas.dropHere}"`,
|
|
3977
3998
|
...t.themeExtraStyles?.()
|
|
3978
3999
|
})
|
|
3979
|
-
}), m =
|
|
4000
|
+
}), m = Ke({
|
|
3980
4001
|
content: n.content,
|
|
3981
4002
|
setContent: (e, t) => n.setContent(e, t),
|
|
3982
4003
|
...t.historyOptions
|
|
3983
4004
|
});
|
|
3984
|
-
|
|
3985
|
-
let g =
|
|
4005
|
+
ot(n, m);
|
|
4006
|
+
let g = qe({
|
|
3986
4007
|
addBlock: n.addBlock,
|
|
3987
4008
|
removeBlock: n.removeBlock,
|
|
3988
4009
|
updateBlock: n.updateBlock,
|
|
3989
4010
|
selectBlock: n.selectBlock,
|
|
3990
4011
|
findBlockLocation: n.findBlockLocation,
|
|
3991
4012
|
blockDefaults: () => l.value
|
|
3992
|
-
}), v =
|
|
4013
|
+
}), v = Ye(n), y = t.autoSaveOptions !== null && t.autoSaveOptions !== void 0 ? Qe({
|
|
3993
4014
|
content: n.content,
|
|
3994
4015
|
isDirty: () => n.state.isDirty,
|
|
3995
4016
|
...t.autoSaveOptions
|
|
@@ -3997,30 +4018,30 @@ function kc(t) {
|
|
|
3997
4018
|
y && (b = f(m.isNavigating, (e) => {
|
|
3998
4019
|
e ? y.pause() : y.resume();
|
|
3999
4020
|
}));
|
|
4000
|
-
let x =
|
|
4021
|
+
let x = Un(n, {
|
|
4001
4022
|
t: o,
|
|
4002
4023
|
format: c
|
|
4003
|
-
}, r.customBlocks ?? []), S =
|
|
4004
|
-
if (S.allowCustomIgnored &&
|
|
4005
|
-
let e =
|
|
4006
|
-
e.length > 0 &&
|
|
4007
|
-
}
|
|
4008
|
-
let C =
|
|
4009
|
-
for (let e of C.unknown)
|
|
4010
|
-
let w =
|
|
4011
|
-
|
|
4024
|
+
}, r.customBlocks ?? []), S = mn(r.colors);
|
|
4025
|
+
if (S.allowCustomIgnored && dn.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), S.invalidPresets.length > 0 && dn.warn(`config.colors.presets skipped invalid entries: ${S.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), S.allowCustom === !1) {
|
|
4026
|
+
let e = tr(S.presets, r.blockDefaults, r.templateDefaults);
|
|
4027
|
+
e.length > 0 && dn.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.`);
|
|
4028
|
+
}
|
|
4029
|
+
let C = gn(r.templateSettings);
|
|
4030
|
+
for (let e of C.unknown) dn.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${_n.join(", ")}) — skipping it.`);
|
|
4031
|
+
let w = qn();
|
|
4032
|
+
Qn(w, Mc);
|
|
4012
4033
|
let T = /* @__PURE__ */ new Set();
|
|
4013
4034
|
function D(e) {
|
|
4014
4035
|
for (let t of e) {
|
|
4015
|
-
w.registerCustom(t,
|
|
4016
|
-
for (let e of
|
|
4036
|
+
w.registerCustom(t, _i);
|
|
4037
|
+
for (let e of Cr(t, S)) T.has(e.id) || (T.add(e.id), dn.warn(e.message));
|
|
4017
4038
|
}
|
|
4018
4039
|
}
|
|
4019
4040
|
r.customBlocks?.length && D(r.customBlocks);
|
|
4020
|
-
let O =
|
|
4041
|
+
let O = Pn();
|
|
4021
4042
|
if (h() && s(O.dispose), t.containerEl) {
|
|
4022
4043
|
let e = t.containerEl;
|
|
4023
|
-
|
|
4044
|
+
ft(document, "pointerdown", (t) => {
|
|
4024
4045
|
let n = e.value;
|
|
4025
4046
|
n && (t.composedPath?.() ?? []).includes(n) && O.claim();
|
|
4026
4047
|
}, { capture: !0 });
|
|
@@ -4034,7 +4055,7 @@ function kc(t) {
|
|
|
4034
4055
|
y?.flush();
|
|
4035
4056
|
}
|
|
4036
4057
|
function A(e) {
|
|
4037
|
-
O.isActive() &&
|
|
4058
|
+
O.isActive() && Tr(e, {
|
|
4038
4059
|
history: m,
|
|
4039
4060
|
selectBlock: (e) => n.selectBlock(e),
|
|
4040
4061
|
getSelectedBlockId: () => n.state.selectedBlockId,
|
|
@@ -4046,41 +4067,41 @@ function kc(t) {
|
|
|
4046
4067
|
onCancelPick: () => t.capabilities?.savedBlocks?.cancelPicking()
|
|
4047
4068
|
});
|
|
4048
4069
|
}
|
|
4049
|
-
|
|
4070
|
+
ft(document, "keydown", A);
|
|
4050
4071
|
let j = _(null);
|
|
4051
|
-
E(
|
|
4052
|
-
let M =
|
|
4072
|
+
E(Bt, t.editorRoot ?? document), E(_t, j), E(Rt, i), E(Kt, n), E(cn, m), E(Vt, g), E(Gt, v), E(an, a), E(Tt, p), E(zt, u), E($t, l), E(Lt, r.locale), E(rn, w), E(en, r.customBlocks ?? []), E(ln, r.paletteBlocks), E(Ht, $n(r.htmlBlockPreview)), E(vt, r.layout), E(St, r.sectionWrapper), E(Wt, S), E(tn, C.fields), E(Zt, Jn(n.content, w));
|
|
4073
|
+
let M = he(r.mergeTags?.syntax), ee = e(r.mergeTags?.tags ?? []);
|
|
4053
4074
|
function P(e) {
|
|
4054
4075
|
if (!Array.isArray(e)) {
|
|
4055
|
-
|
|
4076
|
+
dn.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
4056
4077
|
return;
|
|
4057
4078
|
}
|
|
4058
4079
|
ee.value = e;
|
|
4059
4080
|
}
|
|
4060
|
-
E(
|
|
4061
|
-
let F = _(
|
|
4062
|
-
E(
|
|
4063
|
-
let te =
|
|
4081
|
+
E(At, ee), E(jt, M), E(Nt, r.mergeTags?.onRequest ?? null), E(Yt, r.mergeTags?.autocomplete !== !1), E(kt, r.mergeTags?.showRawValue !== !1);
|
|
4082
|
+
let F = _(oe(r.mergeTags?.tags ?? []));
|
|
4083
|
+
E(Ot, F);
|
|
4084
|
+
let te = In({
|
|
4064
4085
|
resolvePreview: r.resolvePreview,
|
|
4065
4086
|
getContent: () => {
|
|
4066
4087
|
let e = n.content.value;
|
|
4067
|
-
return r.layout && n.state.previewMode ?
|
|
4088
|
+
return r.layout && n.state.previewMode ? Ve(r.layout, e) : e;
|
|
4068
4089
|
},
|
|
4069
4090
|
isActive: () => n.state.previewMode
|
|
4070
4091
|
});
|
|
4071
|
-
E(
|
|
4092
|
+
E(It, te), E(Ct, r.resolvePreview);
|
|
4072
4093
|
let I = N(() => !(n.state.previewMode && te.isConfigured));
|
|
4073
|
-
E(
|
|
4074
|
-
let ne =
|
|
4075
|
-
E(
|
|
4076
|
-
let re =
|
|
4094
|
+
E(nn, I);
|
|
4095
|
+
let ne = zn();
|
|
4096
|
+
E(gt, ne), E(Jt, _(!1)), E(yt, _(!1)), E(Ft, r.logicTags?.tags ?? []), E(on, r.logicTags?.pairs ?? []), E(wt, r.logicTags?.onRequest ?? null), E(bt, Bn()), E(Dt, r.onRequestMedia ?? null), E(Ut, r.canDropMedia ?? null), E(sn, r.resolveImageUrl ? Ln(r.resolveImageUrl) : null), E(qt, r.displayConditions?.conditions ?? []), E(Qt, r.displayConditions?.allowCustom ?? !1), E(Xt, t.capabilities ?? {}), E(Pt, x);
|
|
4097
|
+
let re = Vn(r.lint) ? null : Hn({
|
|
4077
4098
|
content: n.content,
|
|
4078
4099
|
options: r.lint ?? {},
|
|
4079
4100
|
updateBlock: n.updateBlock,
|
|
4080
4101
|
updateSettings: n.updateSettings,
|
|
4081
4102
|
removeBlock: n.removeBlock
|
|
4082
4103
|
});
|
|
4083
|
-
E(
|
|
4104
|
+
E(Et, re);
|
|
4084
4105
|
function ie() {
|
|
4085
4106
|
b?.(), re?.destroy(), y?.destroy(), m.destroy();
|
|
4086
4107
|
}
|
|
@@ -4107,4 +4128,4 @@ function kc(t) {
|
|
|
4107
4128
|
};
|
|
4108
4129
|
}
|
|
4109
4130
|
//#endregion
|
|
4110
|
-
export {
|
|
4131
|
+
export { Dr as A, Br as C, Or as D, Fr as E, hr as F, mr as I, pr as L, vr as M, _r as N, Er as O, gr as P, In as R, Gr as S, Ir as T, oi as _, fc as a, Jr as b, fa as c, Hi as d, Ri as f, ci as g, _i as h, hc as i, ur as j, jr as k, ua as l, yi as m, jc as n, ac as o, Ti as p, xc as r, tc as s, Nc as t, Zi as u, ii as v, Rr as w, qr as x, $r as y };
|