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