@templatical/editor 0.20.0 → 0.21.1
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 -0
- package/dist/{AiChatSidebar-ChrE6pUq.js → AiChatSidebar-K_AehWc-.js} +9 -9
- package/dist/{AiFeatureMenu-DkQ9HhQ6.js → AiFeatureMenu-CcqQDHzJ.js} +6 -6
- package/dist/{BlockIssueBadge-B4QjePax.js → BlockIssueBadge-Dmj9rVra.js} +4 -4
- package/dist/{CloudEditor-CfX-aMiV.js → CloudEditor-Dnww6og-.js} +263 -315
- package/dist/{CollaboratorBar-DTibhQ1j.js → CollaboratorBar-Bj4NZiie.js} +3 -3
- package/dist/{ColorPicker-4vDYhdGe.js → ColorPicker-s9GHXjZs.js} +4 -4
- package/dist/CommentsSidebar-DvNEdugN.js +435 -0
- package/dist/CountdownBlock-J_Q9JRQM.js +91 -0
- package/dist/{CountdownToolbar-D7yQqnA2.js → CountdownToolbar-DPRcv3Fu.js} +3 -4
- package/dist/{DesignReferenceSidebar-DnO6ZdwS.js → DesignReferenceSidebar-DNmK3dxp.js} +8 -8
- package/dist/{IssuesPanel-X_vkNGrs.js → IssuesPanel-CEnEGFtd.js} +7 -7
- package/dist/{MergeTagSuggestion-DCuaSOPQ.js → MergeTagSuggestion-DMe4rqn0.js} +2 -2
- package/dist/NumberWithSuffix-CCPN_oCh.js +121 -0
- package/dist/{ParagraphEditor-C5ixOIYb.js → ParagraphEditor--_zWfxps.js} +47 -47
- package/dist/{RichTextEditorContent-DwhDnMsG.js → RichTextEditorContent-FbnWsh46.js} +6 -6
- package/dist/SaveBlockDialog-CYIEHABH.js +264 -0
- package/dist/SavedBlockPreviewCanvas-2-mzAnZE.js +109 -0
- package/dist/SavedBlocksBrowserModal-D5V5yF_3.js +323 -0
- package/dist/SavedBlocksPanels-Dff38YXu.js +36 -0
- package/dist/SavedBlocksPickBar-rB6iyji6.js +52 -0
- package/dist/{SnapshotHistory-DaVueFv6.js → SnapshotHistory-FtzDq8f0.js} +8 -8
- package/dist/{TemplateScoringPanel-B0UHoTLx.js → TemplateScoringPanel-ifGGGWs5.js} +14 -14
- package/dist/{TestEmailModal-BkauxF7j.js → TestEmailModal-DL2O1H8M.js} +4 -4
- package/dist/{TitleEditor-n6WDVDjW.js → TitleEditor-CPda5lh-.js} +11 -11
- package/dist/{TplModal-BDDyvT-C.js → TplModal-C7Koj5gM.js} +3 -3
- package/dist/{blockTypeIcons-4D0aFXNg.js → blockTypeIcons-CgwECCut.js} +6 -6
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-DbWoy4rG.js → ca-BBgad6y5.js} +50 -5
- package/dist/cdn/chunks/AiChatSidebar-A1CuWGY0.js +203 -0
- package/dist/cdn/chunks/AiChatSidebar-A1CuWGY0.js.map +1 -0
- package/dist/cdn/chunks/{AiFeatureMenu-CIBHAGSz.js → AiFeatureMenu-Duwg413F.js} +12 -8
- package/dist/cdn/chunks/{AiFeatureMenu-CIBHAGSz.js.map → AiFeatureMenu-Duwg413F.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-CxMiLo3p.js → BlockIssueBadge-Da4yR-mh.js} +7 -5
- package/dist/cdn/chunks/{BlockIssueBadge-CxMiLo3p.js.map → BlockIssueBadge-Da4yR-mh.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-CEa3Xgqh.js → CloudEditor-B3hqbwfP.js} +275 -318
- package/dist/cdn/chunks/CloudEditor-B3hqbwfP.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-Bk1gD02G.js → CollaboratorBar-BS3rJy6-.js} +7 -6
- package/dist/cdn/chunks/{CollaboratorBar-Bk1gD02G.js.map → CollaboratorBar-BS3rJy6-.js.map} +1 -1
- package/dist/cdn/chunks/{ColorPicker-ll8pynws.js → ColorPicker-DZSzZ5ZP.js} +168 -164
- package/dist/cdn/chunks/{ColorPicker-ll8pynws.js.map → ColorPicker-DZSzZ5ZP.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-DHdRiGPX.js +412 -0
- package/dist/cdn/chunks/CommentsSidebar-DHdRiGPX.js.map +1 -0
- package/dist/cdn/chunks/CountdownBlock-Bffpoppw.js +93 -0
- package/dist/cdn/chunks/{CountdownBlock-eGUE7hhw.js.map → CountdownBlock-Bffpoppw.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-C1bkSjUR.js → CountdownToolbar-DAnmIZjq.js} +4 -5
- package/dist/cdn/chunks/{CountdownToolbar-C1bkSjUR.js.map → CountdownToolbar-DAnmIZjq.js.map} +1 -1
- package/dist/cdn/chunks/DesignReferenceSidebar-Dre99DTH.js +223 -0
- package/dist/cdn/chunks/DesignReferenceSidebar-Dre99DTH.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-Csasylf_.js → IssuesPanel-D80JedOj.js} +11 -10
- package/dist/cdn/chunks/{IssuesPanel-Csasylf_.js.map → IssuesPanel-D80JedOj.js.map} +1 -1
- package/dist/cdn/chunks/LoadingTrack-D-CW2tUa.js +12 -0
- package/dist/cdn/chunks/LoadingTrack-D-CW2tUa.js.map +1 -0
- package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js → MergeTagSuggestion-D7TsECll.js} +2 -2
- package/dist/cdn/chunks/{MergeTagSuggestion-BmMmdcRg.js.map → MergeTagSuggestion-D7TsECll.js.map} +1 -1
- package/dist/cdn/chunks/NumberWithSuffix-CjlVNIEe.js +123 -0
- package/dist/cdn/chunks/NumberWithSuffix-CjlVNIEe.js.map +1 -0
- package/dist/cdn/chunks/{ParagraphEditor-v0_XEL-v.js → ParagraphEditor-CtaRa1vr.js} +90 -85
- package/dist/cdn/chunks/{ParagraphEditor-v0_XEL-v.js.map → ParagraphEditor-CtaRa1vr.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-NQExNsaV.js → RichTextEditorContent-BbdgJqWM.js} +9 -6
- package/dist/cdn/chunks/{RichTextEditorContent-NQExNsaV.js.map → RichTextEditorContent-BbdgJqWM.js.map} +1 -1
- package/dist/cdn/chunks/SaveBlockDialog-Bb3fdUEZ.js +263 -0
- package/dist/cdn/chunks/SaveBlockDialog-Bb3fdUEZ.js.map +1 -0
- package/dist/cdn/chunks/SavedBlockPreviewCanvas-DZOMgNsz.js +111 -0
- package/dist/cdn/chunks/SavedBlockPreviewCanvas-DZOMgNsz.js.map +1 -0
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CeUWcPv0.js +322 -0
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CeUWcPv0.js.map +1 -0
- package/dist/cdn/chunks/SavedBlocksPanels-D-pA_wfk.js +38 -0
- package/dist/cdn/chunks/SavedBlocksPanels-D-pA_wfk.js.map +1 -0
- package/dist/cdn/chunks/SavedBlocksPickBar-1rf1KpqS.js +54 -0
- package/dist/cdn/chunks/SavedBlocksPickBar-1rf1KpqS.js.map +1 -0
- package/dist/cdn/chunks/SnapshotHistory-Bf1uovti.js +121 -0
- package/dist/cdn/chunks/SnapshotHistory-Bf1uovti.js.map +1 -0
- package/dist/cdn/chunks/TemplateScoringPanel-CTk8WwxU.js +231 -0
- package/dist/cdn/chunks/TemplateScoringPanel-CTk8WwxU.js.map +1 -0
- package/dist/cdn/chunks/TestEmailModal-BJTDxFHh.js +96 -0
- package/dist/cdn/chunks/TestEmailModal-BJTDxFHh.js.map +1 -0
- package/dist/cdn/chunks/{TitleEditor-CS-_MzYs.js → TitleEditor-BJ7LFykI.js} +18 -15
- package/dist/cdn/chunks/{TitleEditor-CS-_MzYs.js.map → TitleEditor-BJ7LFykI.js.map} +1 -1
- package/dist/cdn/chunks/TplModal-CH9RzKF7.js +50 -0
- package/dist/cdn/chunks/TplModal-CH9RzKF7.js.map +1 -0
- package/dist/cdn/chunks/_plugin-vue_export-helper-B3ysoDQm.js +8 -0
- package/dist/cdn/chunks/blockTypeIcons-etMMQoVv.js +21 -0
- package/dist/cdn/chunks/{blockTypeIcons-B0Hjh42a.js.map → blockTypeIcons-etMMQoVv.js.map} +1 -1
- package/dist/{ca-DbWoy4rG.js → cdn/chunks/ca-BBgad6y5.js} +52 -3
- package/dist/cdn/chunks/ca-BBgad6y5.js.map +1 -0
- package/dist/cdn/chunks/cloud-BJlbXGTJ.js +1787 -0
- package/dist/cdn/chunks/cloud-BJlbXGTJ.js.map +1 -0
- package/dist/{de-CTYXVU9v.js → cdn/chunks/de-Bw6fB5JU.js} +2 -24
- package/dist/cdn/chunks/{de-CTYXVU9v.js.map → de-Bw6fB5JU.js.map} +1 -1
- package/dist/cdn/chunks/{de-CgGOnerg.js → de-D7WbpFBR.js} +50 -3
- package/dist/cdn/chunks/de-D7WbpFBR.js.map +1 -0
- package/dist/cdn/chunks/dist-CiBEt0VR.js +163 -0
- package/dist/cdn/chunks/dist-CiBEt0VR.js.map +1 -0
- package/dist/cdn/chunks/dist-CxTt8FRE.js +403 -0
- package/dist/cdn/chunks/dist-CxTt8FRE.js.map +1 -0
- package/dist/{en-DrUV9xth.js → cdn/chunks/en-BrZ0uGK2.js} +51 -2
- package/dist/cdn/chunks/en-BrZ0uGK2.js.map +1 -0
- package/dist/{en-BtmIaJeb.js → cdn/chunks/en-DAdHJz7h.js} +2 -24
- package/dist/cdn/chunks/{en-BtmIaJeb.js.map → en-DAdHJz7h.js.map} +1 -1
- package/dist/{es-DwbKjU7q.js → cdn/chunks/es-tLSLysPs.js} +51 -2
- package/dist/cdn/chunks/es-tLSLysPs.js.map +1 -0
- package/dist/cdn/chunks/{extensions-Di3hdIRT.js → extensions-ZX2oarW6.js} +28 -26
- package/dist/cdn/chunks/{extensions-Di3hdIRT.js.map → extensions-ZX2oarW6.js.map} +1 -1
- package/dist/cdn/chunks/formatRelativeTime-CtUU-QZ8.js +12 -0
- package/dist/cdn/chunks/formatRelativeTime-CtUU-QZ8.js.map +1 -0
- package/dist/cdn/chunks/htmlparser-CZa2V5cF.js +1008 -0
- package/dist/cdn/chunks/htmlparser-CZa2V5cF.js.map +1 -0
- package/dist/cdn/chunks/icons-CYWw8Xfp.js +1190 -0
- package/dist/cdn/chunks/icons-CYWw8Xfp.js.map +1 -0
- package/dist/cdn/chunks/keys-D7kUmfpE.js +12 -0
- package/dist/cdn/chunks/keys-D7kUmfpE.js.map +1 -0
- package/dist/cdn/chunks/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +50 -3
- package/dist/cdn/chunks/pt-BR-BWFokdTU.js.map +1 -0
- package/dist/{pt-BR-B2ZvFlRL.js → cdn/chunks/pt-BR-w2sGzHNX.js} +2 -24
- package/dist/cdn/chunks/{pt-BR-B2ZvFlRL.js.map → pt-BR-w2sGzHNX.js.map} +1 -1
- package/dist/cdn/chunks/src-BKI1x1k7.js +546 -0
- package/dist/cdn/chunks/src-BKI1x1k7.js.map +1 -0
- package/dist/cdn/chunks/src-CM0gCvAS.js +1176 -0
- package/dist/cdn/chunks/src-CM0gCvAS.js.map +1 -0
- package/dist/cdn/chunks/{media-library-yYAkAagU.js → src-D6F_3XkE.js} +1754 -1252
- package/dist/cdn/chunks/src-D6F_3XkE.js.map +1 -0
- package/dist/cdn/chunks/{renderer-DpBGiXOg.js → src-DYji-wXB.js} +117 -133
- package/dist/cdn/chunks/src-DYji-wXB.js.map +1 -0
- package/dist/cdn/chunks/{styles-DHSmjlpX.js → styles-DMOEiSX9.js} +1448 -1354
- package/dist/cdn/chunks/styles-DMOEiSX9.js.map +1 -0
- package/dist/cdn/chunks/timeouts-Bmi_yePw.js +6 -0
- package/dist/cdn/chunks/timeouts-Bmi_yePw.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-C2indasq.js → tiptap-BMZ-OENR.js} +2012 -1863
- package/dist/cdn/chunks/tiptap-BMZ-OENR.js.map +1 -0
- package/dist/cdn/chunks/useAliveFlag-aanU8uqB.js +12 -0
- package/dist/cdn/chunks/useAliveFlag-aanU8uqB.js.map +1 -0
- package/dist/cdn/chunks/useCloudI18n-BjNENqkM.js +25 -0
- package/dist/cdn/chunks/useCloudI18n-BjNENqkM.js.map +1 -0
- package/dist/cdn/chunks/useEditorCore-BA6mspzD.js +3019 -0
- package/dist/cdn/chunks/useEditorCore-BA6mspzD.js.map +1 -0
- package/dist/cdn/chunks/useI18n-8Wd7G-cq.js +19 -0
- package/dist/cdn/chunks/useI18n-8Wd7G-cq.js.map +1 -0
- package/dist/cdn/chunks/useMergeTag-C7G31KV-.js +46 -0
- package/dist/cdn/chunks/useMergeTag-C7G31KV-.js.map +1 -0
- package/dist/cdn/chunks/usePopoverPosition-Bx0QewTv.js +61 -0
- package/dist/cdn/chunks/usePopoverPosition-Bx0QewTv.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +132 -120
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-Bl4J_tYV.js → check-BpQDKiPz.js} +1 -1
- package/dist/{chevron-down-COEcl2iP.js → chevron-down-j8GrdTyz.js} +1 -1
- package/dist/chevron-up-BACyVhyC.js +7 -0
- package/dist/{circle-alert-CvHi5etc.js → circle-alert-CgtE46ND.js} +1 -1
- package/dist/{clock-CZZw62e8.js → clock-BzKLLW5L.js} +1 -1
- package/dist/{cloud-B-RebwxI.js → cloud-Du7mnkz2.js} +19 -47
- package/dist/{createLucideIcon-_peTZQtY.js → createLucideIcon-JWHwTI6N.js} +2 -2
- package/dist/{cdn/chunks/de-CTYXVU9v.js → de-Bw6fB5JU.js} +0 -26
- package/dist/{de-CgGOnerg.js → de-D7WbpFBR.js} +49 -2
- package/dist/{dist-CgTKuIUN.js → dist-BEpCh2mG.js} +1158 -1125
- package/dist/{dist-Cx7IUM7J.js → dist-BgPYC_8-.js} +14 -6
- package/dist/{dist-BKKo5wPC.js → dist-BkM8A17N.js} +2 -2
- package/dist/{dist-CcX5sLpz.js → dist-BuNDAAVp.js} +361 -256
- package/dist/{dist-COSN3oDJ.js → dist-CBzCU-a-.js} +2 -2
- package/dist/{dist-YSCPD13F.js → dist-CDO52Rxy.js} +2 -2
- package/dist/{dist-Dk5AdwoQ.js → dist-CrjzhIxB.js} +2 -2
- package/dist/{dist-DXAZUjj3.js → dist-CtcgoC_R.js} +2 -2
- package/dist/{dist-D6M5FAY7.js → dist-CuXha2_7.js} +2 -2
- package/dist/dist-CweLDZrs.js +5 -0
- package/dist/dist-DOsdqAEZ.js +5 -0
- package/dist/{dist-8TKf-Jpg.js → dist-DYClLqy8.js} +6 -3
- package/dist/{cdn/chunks/en-DrUV9xth.js → en-BrZ0uGK2.js} +49 -4
- package/dist/{cdn/chunks/en-BtmIaJeb.js → en-DAdHJz7h.js} +0 -26
- package/dist/{cdn/chunks/es-DwbKjU7q.js → es-tLSLysPs.js} +49 -4
- package/dist/{extensions-BCA9pyer.js → extensions-ClY5Sh7S.js} +5 -5
- package/dist/{image-up-D26rNdfX.js → image-up-CQdtq8ge.js} +1 -1
- package/dist/index.d.ts +81 -4
- package/dist/{info-CE3JSTqk.js → info-BUJBXoE6.js} +1 -1
- package/dist/{keys-DFaIbGR8.js → keys-CHPcp-Nz.js} +2 -2
- package/dist/{list-checks-BQsLrtBB.js → list-checks-BGHaCSD5.js} +1 -1
- package/dist/{loader-circle-s9Rh5lLd.js → loader-circle-C-Z6kgI6.js} +1 -1
- package/dist/{message-circle-CI62d690.js → message-circle-CEm5qckV.js} +1 -1
- package/dist/pencil-DdwmkKLb.js +10 -0
- package/dist/{pt-BR-Bcc5Tjed.js → pt-BR-BWFokdTU.js} +49 -2
- package/dist/{cdn/chunks/pt-BR-B2ZvFlRL.js → pt-BR-w2sGzHNX.js} +0 -26
- package/dist/{refresh-cw-DlYfl65Y.js → refresh-cw-maKlg0dl.js} +1 -1
- package/dist/{scan-line-CHadrYVb.js → scan-line-BFgesTOY.js} +1 -1
- package/dist/{send-CbP40otC.js → send-B70aQDrA.js} +1 -1
- package/dist/{shield-check-Bnj9aRoJ.js → shield-check-B7x5OKt5.js} +1 -1
- package/dist/{sparkles-CncWT57a.js → sparkles-DVlm1Ipp.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-DkF_-uX8.js → styles-PcOPXvLO.js} +1235 -1151
- package/dist/templatical-editor.js +134 -125
- package/dist/{text-align-start-B458vzYw.js → text-align-start-Vay3Kvo2.js} +1 -1
- package/dist/{trash-2-DO0yjSU1.js → trash-2-DE8CmxAG.js} +1 -1
- package/dist/{triangle-alert-C18_ima6.js → triangle-alert-Djg6IG8N.js} +1 -1
- package/dist/{upload-DsCd2zTR.js → upload-BwwE0U6G.js} +1 -1
- package/dist/{useCloudI18n-PCDOC2kz.js → useCloudI18n-BmiygEM4.js} +1 -1
- package/dist/{useEditorCore-kKUemYY6.js → useEditorCore-CT1slufs.js} +997 -817
- package/dist/{useI18n-BNMzZTM5.js → useI18n-D2L9Mkik.js} +1 -1
- package/dist/{useMergeTag-DfEY0eK5.js → useMergeTag-BTdDq5DC.js} +1 -1
- package/dist/{usePopoverPosition-F9STHRIr.js → usePopoverPosition-BO2LNy5n.js} +1 -1
- package/dist/{x-BCFQuE_q.js → x-CkD6A1iB.js} +1 -1
- package/package.json +21 -21
- package/dist/CommentsSidebar-D-o5Stlg.js +0 -442
- package/dist/CountdownBlock-Bn5w7C-p.js +0 -92
- package/dist/ModuleBrowserModal-AJt--JPh.js +0 -202
- package/dist/ModulePreviewCanvas-BKYOcVCh.js +0 -106
- package/dist/NumberWithSuffix-Bf3rNxza.js +0 -89
- package/dist/SaveModuleDialog-B4QX9eiv.js +0 -125
- package/dist/ToggleSwitch-DUNuUPsZ.js +0 -37
- package/dist/cdn/chunks/CloudEditor-CEa3Xgqh.js.map +0 -1
- package/dist/cdn/chunks/CountdownBlock-eGUE7hhw.js +0 -93
- package/dist/cdn/chunks/ModuleBrowserModal-DznWWtBI.js +0 -198
- package/dist/cdn/chunks/ModuleBrowserModal-DznWWtBI.js.map +0 -1
- package/dist/cdn/chunks/ModulePreviewCanvas-D-h7fr87.js +0 -107
- package/dist/cdn/chunks/ModulePreviewCanvas-D-h7fr87.js.map +0 -1
- package/dist/cdn/chunks/NumberWithSuffix-Dt-0odUN.js +0 -91
- package/dist/cdn/chunks/NumberWithSuffix-Dt-0odUN.js.map +0 -1
- package/dist/cdn/chunks/SaveModuleDialog-BpFhTi-k.js +0 -120
- package/dist/cdn/chunks/SaveModuleDialog-BpFhTi-k.js.map +0 -1
- package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js +0 -39
- package/dist/cdn/chunks/ToggleSwitch-OrmX_w18.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-B0Hjh42a.js +0 -22
- package/dist/cdn/chunks/ca-DbWoy4rG.js.map +0 -1
- package/dist/cdn/chunks/de-CgGOnerg.js.map +0 -1
- package/dist/cdn/chunks/en-DrUV9xth.js.map +0 -1
- package/dist/cdn/chunks/es-DwbKjU7q.js.map +0 -1
- package/dist/cdn/chunks/features-CLIZ7Q-Y.js +0 -7657
- package/dist/cdn/chunks/features-CLIZ7Q-Y.js.map +0 -1
- package/dist/cdn/chunks/icons-GX40Qm2W.js +0 -690
- package/dist/cdn/chunks/icons-GX40Qm2W.js.map +0 -1
- package/dist/cdn/chunks/media-library-yYAkAagU.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-Bcc5Tjed.js.map +0 -1
- package/dist/cdn/chunks/quality-DffYv9j5.js +0 -2180
- package/dist/cdn/chunks/quality-DffYv9j5.js.map +0 -1
- package/dist/cdn/chunks/renderer-DpBGiXOg.js.map +0 -1
- package/dist/cdn/chunks/src-9K6uFiuK.js +0 -509
- package/dist/cdn/chunks/src-9K6uFiuK.js.map +0 -1
- package/dist/cdn/chunks/styles-DHSmjlpX.js.map +0 -1
- package/dist/cdn/chunks/tiptap-C2indasq.js.map +0 -1
- package/dist/dist-BDVm2MrW.js +0 -5
- package/dist/dist-DbekZDmJ.js +0 -5
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { $ as e, A as t, B as n, D as r, Dt as i, E as a, Et as o, H as s, I as c, J as l, K as u, N as d, O as f, Ot as p, R as m, T as h, W as g, Y as _, Z as v, _ as y, c as b, d as x, et as S, g as C, h as w, j as T, k as E, l as D, m as O, nt as k, q as A, r as j, rt as ee, s as M, tt as te, u as N, v as ne, w as re, x as P, y as ie, z as ae } from "./vue.runtime.esm-bundler-B0xoGkDv.js";
|
|
2
2
|
import { c as F, o as oe, s as se } from "./runtime-dom.esm-bundler-GdMI8WqG.js";
|
|
3
|
-
import { t as ce } from "./upload-
|
|
4
|
-
import { A as le, C as ue, D as de, E as fe, F as pe, I as me, M as he, N as ge, P as _e, S as ve, T as ye, _ as be, a as xe, b as Se, c as Ce, d as we, f as Te, g as Ee, h as De, i as Oe, j as ke, k as Ae, l as je, m as Me, n as Ne,
|
|
5
|
-
import { f as
|
|
6
|
-
import { a as
|
|
7
|
-
import { A as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as I } from "./createLucideIcon-
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import "./useCloudI18n-
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
3
|
+
import { t as ce } from "./upload-BwwE0U6G.js";
|
|
4
|
+
import { A as le, C as ue, D as de, E as fe, F as pe, I as me, M as he, N as ge, P as _e, S as ve, T as ye, _ as be, a as xe, b as Se, c as Ce, d as we, f as Te, g as Ee, h as De, i as Oe, j as ke, k as Ae, l as je, m as Me, n as Ne, o as Pe, p as Fe, r as Ie, t as Le, u as Re, v as ze, w as Be, x as Ve, y as He } from "./dist-BJbqgyPn.js";
|
|
5
|
+
import { f as Ue, g as We, h as Ge, m as Ke } from "./dist-DYv_Pttj.js";
|
|
6
|
+
import { a as qe, c as Je, d as Ye, i as Xe, l as Ze, o as Qe, r as $e, t as et, u as tt } from "./usePopoverPosition-BO2LNy5n.js";
|
|
7
|
+
import { A as nt, B as rt, C as it, D as at, E as ot, I as st, L as ct, M as lt, N as ut, O as dt, R as ft, S as pt, T as mt, _ as ht, a as gt, b as _t, d as vt, f as yt, g as bt, h as xt, i as St, j as Ct, k as wt, l as Tt, m as Et, n as Dt, o as Ot, p as kt, s as At, v as jt, w as Mt, x as Nt, y as Pt, z as Ft } from "./keys-CHPcp-Nz.js";
|
|
8
|
+
import { t as It } from "./useI18n-D2L9Mkik.js";
|
|
9
|
+
import { t as I } from "./createLucideIcon-JWHwTI6N.js";
|
|
10
|
+
import { t as Lt } from "./loader-circle-C-Z6kgI6.js";
|
|
11
|
+
import { t as Rt } from "./message-circle-CEm5qckV.js";
|
|
12
|
+
import { t as zt } from "./trash-2-DE8CmxAG.js";
|
|
13
|
+
import { t as Bt } from "./triangle-alert-Djg6IG8N.js";
|
|
14
|
+
import { t as Vt } from "./LoadingTrack-KIcREPlS.js";
|
|
15
|
+
import { t as Ht } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
16
|
+
import "./useCloudI18n-BmiygEM4.js";
|
|
17
|
+
import { t as Ut } from "./useMergeTag-BTdDq5DC.js";
|
|
18
|
+
import { t as Wt } from "./useAliveFlag-C43EhZFY.js";
|
|
19
19
|
//#region ../core/dist/index.js
|
|
20
|
-
function
|
|
20
|
+
function Gt(e) {
|
|
21
21
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Kt(e) {
|
|
24
24
|
let t = A({
|
|
25
|
-
content: e.content ??
|
|
25
|
+
content: e.content ?? Fe(e.defaultFontFamily, e.templateDefaults),
|
|
26
26
|
selectedBlockId: null,
|
|
27
27
|
viewport: "desktop",
|
|
28
28
|
darkMode: !1,
|
|
@@ -111,7 +111,7 @@ function Gt(e) {
|
|
|
111
111
|
if (c(n)) return;
|
|
112
112
|
let o = a(t.content.blocks, n);
|
|
113
113
|
if (o && o.type === "section") {
|
|
114
|
-
if (r < 0 || r >=
|
|
114
|
+
if (r < 0 || r >= Gt(o.columns)) return;
|
|
115
115
|
o.children[r] = o.children[r] || [];
|
|
116
116
|
let t = o.children[r];
|
|
117
117
|
i !== void 0 && i < t.length ? t.splice(i, 0, e) : t.push(e);
|
|
@@ -144,7 +144,7 @@ function Gt(e) {
|
|
|
144
144
|
let u;
|
|
145
145
|
if (r) {
|
|
146
146
|
let e = a(t.content.blocks, r);
|
|
147
|
-
if (!e || e.type !== "section" || i < 0 || i >=
|
|
147
|
+
if (!e || e.type !== "section" || i < 0 || i >= Gt(e.columns)) return;
|
|
148
148
|
e.children[i] = e.children[i] || [], u = e.children[i];
|
|
149
149
|
} else u = t.content.blocks;
|
|
150
150
|
let [d] = o.blocks.splice(l, 1);
|
|
@@ -173,9 +173,9 @@ function Gt(e) {
|
|
|
173
173
|
findBlockLocation: u
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
|
-
var
|
|
177
|
-
function
|
|
178
|
-
let { content: t, setContent: r, isRemoteOperation: i, maxSize: a =
|
|
176
|
+
var qt = 50, Jt = 300, Yt = 1500;
|
|
177
|
+
function Xt(e) {
|
|
178
|
+
let { content: t, setContent: r, isRemoteOperation: i, maxSize: a = qt } = e, o = _([]), s = _([]), c = _(!1), l = null, u = null, d = n(() => o.value.length > 0), f = n(() => s.value.length > 0);
|
|
179
179
|
function p() {
|
|
180
180
|
return me(t.value);
|
|
181
181
|
}
|
|
@@ -193,21 +193,21 @@ function Yt(e) {
|
|
|
193
193
|
if (u && u.blockId === e) {
|
|
194
194
|
clearTimeout(u.timeoutId), u.timeoutId = setTimeout(() => {
|
|
195
195
|
u = null;
|
|
196
|
-
},
|
|
196
|
+
}, Jt);
|
|
197
197
|
return;
|
|
198
198
|
}
|
|
199
199
|
h(), m(p()), s.value = [], u = {
|
|
200
200
|
blockId: e,
|
|
201
201
|
timeoutId: setTimeout(() => {
|
|
202
202
|
u = null;
|
|
203
|
-
},
|
|
203
|
+
}, Jt)
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
207
|
function y() {
|
|
208
208
|
c.value = !0, l && clearTimeout(l), l = setTimeout(() => {
|
|
209
209
|
c.value = !1, l = null;
|
|
210
|
-
},
|
|
210
|
+
}, Yt);
|
|
211
211
|
}
|
|
212
212
|
function b() {
|
|
213
213
|
if (o.value.length === 0) return;
|
|
@@ -239,7 +239,7 @@ function Yt(e) {
|
|
|
239
239
|
destroy: C
|
|
240
240
|
};
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function Zt(e) {
|
|
243
243
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
244
244
|
...e,
|
|
245
245
|
id: ye(),
|
|
@@ -255,7 +255,7 @@ function Xt(e) {
|
|
|
255
255
|
id: ye()
|
|
256
256
|
})));
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function Qt(e) {
|
|
259
259
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
260
260
|
function o(n, r, a) {
|
|
261
261
|
let o = je(n, e.blockDefaults);
|
|
@@ -263,9 +263,9 @@ function Zt(e) {
|
|
|
263
263
|
}
|
|
264
264
|
function s(e, n, r) {
|
|
265
265
|
let o = JSON.parse(JSON.stringify(e));
|
|
266
|
-
if (o.id = ye(),
|
|
266
|
+
if (o.id = ye(), Zt(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
267
267
|
let t = JSON.parse(JSON.stringify(e));
|
|
268
|
-
return t.id = ye(),
|
|
268
|
+
return t.id = ye(), Zt(t), t;
|
|
269
269
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
270
270
|
else {
|
|
271
271
|
let i = a?.(e.id) ?? null;
|
|
@@ -286,7 +286,7 @@ function Zt(e) {
|
|
|
286
286
|
updateBlockProperty: l
|
|
287
287
|
};
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function $t(e) {
|
|
290
290
|
let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
|
|
291
291
|
function c() {
|
|
292
292
|
return typeof a == "function" ? a() : a;
|
|
@@ -322,7 +322,7 @@ function Qt(e) {
|
|
|
322
322
|
destroy: h
|
|
323
323
|
};
|
|
324
324
|
}
|
|
325
|
-
function
|
|
325
|
+
function en(e) {
|
|
326
326
|
let t = A(/* @__PURE__ */ new Set()), r = n(() => t.size > 0);
|
|
327
327
|
function i(e) {
|
|
328
328
|
return t.has(e);
|
|
@@ -340,7 +340,7 @@ function $t(e) {
|
|
|
340
340
|
hasHiddenBlocks: r
|
|
341
341
|
};
|
|
342
342
|
}
|
|
343
|
-
function
|
|
343
|
+
function tn(e) {
|
|
344
344
|
let t = _(!1), r = _(!1), i = n(() => !!e.definition.value?.dataSource), a = n(() => i.value && !e.block.value.dataSourceFetched);
|
|
345
345
|
async function o() {
|
|
346
346
|
let n = e.definition.value;
|
|
@@ -370,7 +370,7 @@ function en(e) {
|
|
|
370
370
|
needsFetch: a
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function nn(e, t) {
|
|
374
374
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
375
375
|
e.addBlock = (r, i, a, o) => {
|
|
376
376
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -384,28 +384,164 @@ function tn(e, t) {
|
|
|
384
384
|
t.record(), o(e);
|
|
385
385
|
};
|
|
386
386
|
}
|
|
387
|
+
function rn(e) {
|
|
388
|
+
let { provider: t } = e, n = _([]), r = _(!1), i = M(() => {
|
|
389
|
+
let e = /* @__PURE__ */ new Set();
|
|
390
|
+
for (let t of n.value) {
|
|
391
|
+
let n = t.category?.trim();
|
|
392
|
+
n && e.add(n);
|
|
393
|
+
}
|
|
394
|
+
return [...e].sort((e, t) => e.localeCompare(t));
|
|
395
|
+
}), a = M(() => typeof t.create == "function"), o = M(() => typeof t.update == "function"), s = M(() => typeof t.delete == "function");
|
|
396
|
+
function c(e) {
|
|
397
|
+
return o.value && e.canUpdate !== !1;
|
|
398
|
+
}
|
|
399
|
+
function l(e) {
|
|
400
|
+
return s.value && e.canDelete !== !1;
|
|
401
|
+
}
|
|
402
|
+
function u(e, t) {
|
|
403
|
+
throw new Pe(`[Templatical] Saved blocks: ${e} is ${t}. Check the capability before calling — the editor's own UI hides the action.`);
|
|
404
|
+
}
|
|
405
|
+
async function d(i) {
|
|
406
|
+
r.value = !0;
|
|
407
|
+
try {
|
|
408
|
+
n.value = await t.list(i);
|
|
409
|
+
} catch (t) {
|
|
410
|
+
throw e.onError?.(t), t;
|
|
411
|
+
} finally {
|
|
412
|
+
r.value = !1;
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
async function f(r, i, a) {
|
|
416
|
+
let { create: o } = t;
|
|
417
|
+
typeof o != "function" && u("create", "disabled by the provider");
|
|
418
|
+
try {
|
|
419
|
+
let e = await o(a ? {
|
|
420
|
+
name: r,
|
|
421
|
+
content: i,
|
|
422
|
+
category: a
|
|
423
|
+
} : {
|
|
424
|
+
name: r,
|
|
425
|
+
content: i
|
|
426
|
+
});
|
|
427
|
+
return n.value = [e, ...n.value], e;
|
|
428
|
+
} catch (t) {
|
|
429
|
+
throw e.onError?.(t), t;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
async function p(r, i) {
|
|
433
|
+
let { update: a } = t;
|
|
434
|
+
typeof a != "function" && u("update", "disabled by the provider");
|
|
435
|
+
let o = n.value.find((e) => e.id === r);
|
|
436
|
+
o && o.canUpdate === !1 && u("update", `not permitted for entry "${r}"`);
|
|
437
|
+
try {
|
|
438
|
+
let e = await a(r, i);
|
|
439
|
+
return n.value = n.value.map((t) => t.id === r ? e : t), e;
|
|
440
|
+
} catch (t) {
|
|
441
|
+
throw e.onError?.(t), t;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
async function m(r) {
|
|
445
|
+
let { delete: i } = t;
|
|
446
|
+
typeof i != "function" && u("delete", "disabled by the provider");
|
|
447
|
+
let a = n.value.find((e) => e.id === r);
|
|
448
|
+
a && a.canDelete === !1 && u("delete", `not permitted for entry "${r}"`);
|
|
449
|
+
try {
|
|
450
|
+
await i(r), n.value = n.value.filter((e) => e.id !== r);
|
|
451
|
+
} catch (t) {
|
|
452
|
+
throw e.onError?.(t), t;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
return {
|
|
456
|
+
savedBlocks: n,
|
|
457
|
+
isLoading: r,
|
|
458
|
+
categories: i,
|
|
459
|
+
canCreate: a,
|
|
460
|
+
canUpdate: o,
|
|
461
|
+
canDelete: s,
|
|
462
|
+
canUpdateBlock: c,
|
|
463
|
+
canDeleteBlock: l,
|
|
464
|
+
load: d,
|
|
465
|
+
create: f,
|
|
466
|
+
update: p,
|
|
467
|
+
remove: m
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
var an = "templatical:saved-blocks";
|
|
471
|
+
function on(e = {}) {
|
|
472
|
+
let t = e.key ?? an;
|
|
473
|
+
function n() {
|
|
474
|
+
if (typeof localStorage > "u") throw Error("[Templatical] createLocalStorageSavedBlocksProvider requires a browser environment with localStorage. Supply your own SavedBlocksProvider for server-side or non-browser use.");
|
|
475
|
+
return localStorage;
|
|
476
|
+
}
|
|
477
|
+
function r() {
|
|
478
|
+
let e = n().getItem(t);
|
|
479
|
+
if (!e) return [];
|
|
480
|
+
try {
|
|
481
|
+
let t = JSON.parse(e);
|
|
482
|
+
return Array.isArray(t) ? t : [];
|
|
483
|
+
} catch {
|
|
484
|
+
return [];
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
function i(e) {
|
|
488
|
+
n().setItem(t, JSON.stringify(e));
|
|
489
|
+
}
|
|
490
|
+
return {
|
|
491
|
+
async list(e) {
|
|
492
|
+
let t = r(), n = e?.search?.trim().toLowerCase(), i = e?.category?.trim();
|
|
493
|
+
return t.filter((e) => !(n && !e.name.toLowerCase().includes(n) || i && e.category !== i));
|
|
494
|
+
},
|
|
495
|
+
async create(e) {
|
|
496
|
+
let t = (/* @__PURE__ */ new Date()).toISOString(), n = {
|
|
497
|
+
id: ye(),
|
|
498
|
+
name: e.name,
|
|
499
|
+
content: e.content,
|
|
500
|
+
...e.category ? { category: e.category } : {},
|
|
501
|
+
createdAt: t,
|
|
502
|
+
updatedAt: t
|
|
503
|
+
};
|
|
504
|
+
return i([n, ...r()]), n;
|
|
505
|
+
},
|
|
506
|
+
async update(e, t) {
|
|
507
|
+
let n = r(), a = n.findIndex((t) => t.id === e);
|
|
508
|
+
if (a === -1) throw Error(`[Templatical] Saved block not found: ${e}`);
|
|
509
|
+
let o = {
|
|
510
|
+
...n[a],
|
|
511
|
+
...t,
|
|
512
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
513
|
+
}, s = [...n];
|
|
514
|
+
return s[a] = o, i(s), o;
|
|
515
|
+
},
|
|
516
|
+
async delete(e) {
|
|
517
|
+
let t = r();
|
|
518
|
+
if (!t.some((t) => t.id === e)) throw Error(`[Templatical] Saved block not found: ${e}`);
|
|
519
|
+
i(t.filter((t) => t.id !== e));
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
}
|
|
387
523
|
//#endregion
|
|
388
524
|
//#region src/utils/activeEditorTracker.ts
|
|
389
|
-
var
|
|
390
|
-
function
|
|
391
|
-
let e = ++
|
|
392
|
-
return
|
|
525
|
+
var sn = /* @__PURE__ */ new Set(), cn = 0, ln = 0;
|
|
526
|
+
function un() {
|
|
527
|
+
let e = ++ln;
|
|
528
|
+
return sn.add(e), cn === 0 && (cn = e), {
|
|
393
529
|
id: e,
|
|
394
|
-
isActive: () =>
|
|
530
|
+
isActive: () => sn.size <= 1 || cn === e,
|
|
395
531
|
claim: () => {
|
|
396
|
-
|
|
532
|
+
cn = e;
|
|
397
533
|
},
|
|
398
534
|
dispose: () => {
|
|
399
|
-
if (
|
|
400
|
-
let e = Array.from(
|
|
401
|
-
|
|
535
|
+
if (sn.delete(e), cn === e) {
|
|
536
|
+
let e = Array.from(sn);
|
|
537
|
+
cn = e[e.length - 1] ?? 0;
|
|
402
538
|
}
|
|
403
539
|
}
|
|
404
540
|
};
|
|
405
541
|
}
|
|
406
542
|
//#endregion
|
|
407
543
|
//#region src/composables/useImageUrlResolver.ts
|
|
408
|
-
function
|
|
544
|
+
function dn(e) {
|
|
409
545
|
let t = A(/* @__PURE__ */ new Map()), n = /* @__PURE__ */ new Set();
|
|
410
546
|
function r(e) {
|
|
411
547
|
return t.get(e);
|
|
@@ -438,8 +574,8 @@ function sn(e) {
|
|
|
438
574
|
lookup: a
|
|
439
575
|
};
|
|
440
576
|
}
|
|
441
|
-
function
|
|
442
|
-
let t = P(
|
|
577
|
+
function fn(e) {
|
|
578
|
+
let t = P(_t, null), n = M(e);
|
|
443
579
|
if (!t) return n;
|
|
444
580
|
let r;
|
|
445
581
|
function i() {
|
|
@@ -468,7 +604,7 @@ function cn(e) {
|
|
|
468
604
|
}
|
|
469
605
|
//#endregion
|
|
470
606
|
//#region src/composables/useMergeTagPicker.ts
|
|
471
|
-
function
|
|
607
|
+
function pn() {
|
|
472
608
|
let e = _(!1), t = _([]), n = null;
|
|
473
609
|
function r(r) {
|
|
474
610
|
if (n) {
|
|
@@ -498,7 +634,7 @@ function ln() {
|
|
|
498
634
|
}
|
|
499
635
|
//#endregion
|
|
500
636
|
//#region src/composables/useLogicTagPicker.ts
|
|
501
|
-
function
|
|
637
|
+
function mn() {
|
|
502
638
|
let e = _(!1), t = _([]), n = _([]), r = null;
|
|
503
639
|
function i(i, a) {
|
|
504
640
|
if (r) {
|
|
@@ -529,17 +665,17 @@ function un() {
|
|
|
529
665
|
}
|
|
530
666
|
//#endregion
|
|
531
667
|
//#region src/composables/useTemplateLint.ts
|
|
532
|
-
function
|
|
668
|
+
function hn(e) {
|
|
533
669
|
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
534
670
|
}
|
|
535
|
-
function
|
|
536
|
-
let t = _([]), n = _(!1), r = _(!1), i = v(null), a =
|
|
671
|
+
function gn(e) {
|
|
672
|
+
let t = _([]), n = _(!1), r = _(!1), i = v(null), a = hn(e.options), o = null, s = !1;
|
|
537
673
|
a || l();
|
|
538
674
|
async function l() {
|
|
539
675
|
try {
|
|
540
676
|
let t = await import("@templatical/quality");
|
|
541
677
|
if (s) return;
|
|
542
|
-
i.value = { lintTemplate: t.lintTemplate }, n.value = !0, u(), o =
|
|
678
|
+
i.value = { lintTemplate: t.lintTemplate }, n.value = !0, u(), o = We(e.content, u, {
|
|
543
679
|
debounce: e.debounce ?? 500,
|
|
544
680
|
deep: !0
|
|
545
681
|
});
|
|
@@ -574,14 +710,19 @@ function fn(e) {
|
|
|
574
710
|
}
|
|
575
711
|
//#endregion
|
|
576
712
|
//#region src/utils/blockTypeLabels.ts
|
|
577
|
-
function
|
|
713
|
+
function _n(e, t) {
|
|
578
714
|
return t.blocks[e] ?? e;
|
|
579
715
|
}
|
|
716
|
+
function vn(e, t, n = []) {
|
|
717
|
+
if (e.type !== "custom") return _n(e.type, t);
|
|
718
|
+
let { customType: r } = e;
|
|
719
|
+
return n.find((e) => e.type === r)?.name ?? r;
|
|
720
|
+
}
|
|
580
721
|
//#endregion
|
|
581
722
|
//#region src/composables/useKeyboardReorder.ts
|
|
582
|
-
function
|
|
583
|
-
let
|
|
584
|
-
function
|
|
723
|
+
function yn(e, t, n = []) {
|
|
724
|
+
let r = _(null), i = _(""), a = null;
|
|
725
|
+
function o(t) {
|
|
585
726
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
586
727
|
if (r !== -1) return {
|
|
587
728
|
index: r,
|
|
@@ -602,86 +743,86 @@ function mn(e, t) {
|
|
|
602
743
|
}
|
|
603
744
|
return null;
|
|
604
745
|
}
|
|
605
|
-
function
|
|
606
|
-
let
|
|
607
|
-
if (!
|
|
608
|
-
let
|
|
609
|
-
return
|
|
746
|
+
function s(r) {
|
|
747
|
+
let i = o(r);
|
|
748
|
+
if (!i) return "";
|
|
749
|
+
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
750
|
+
return a ? vn(a, t.t, n) : "";
|
|
610
751
|
}
|
|
611
|
-
function
|
|
752
|
+
function c(t, n) {
|
|
612
753
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
613
754
|
}
|
|
614
|
-
function c(e) {
|
|
615
|
-
r.value = "", queueMicrotask(() => {
|
|
616
|
-
r.value = e;
|
|
617
|
-
});
|
|
618
|
-
}
|
|
619
755
|
function l(e) {
|
|
620
|
-
|
|
756
|
+
i.value = "", queueMicrotask(() => {
|
|
757
|
+
i.value = e;
|
|
758
|
+
});
|
|
621
759
|
}
|
|
622
760
|
function u(e) {
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
761
|
+
return r.value === e;
|
|
762
|
+
}
|
|
763
|
+
function d(e) {
|
|
764
|
+
let n = o(e);
|
|
765
|
+
n && (r.value = e, a = n, l(t.format(t.t.blockActions.lifted, {
|
|
766
|
+
block: s(e),
|
|
767
|
+
position: String(n.index + 1),
|
|
768
|
+
total: String(n.total)
|
|
628
769
|
})));
|
|
629
770
|
}
|
|
630
|
-
function
|
|
631
|
-
let i =
|
|
771
|
+
function f(n, r) {
|
|
772
|
+
let i = o(n);
|
|
632
773
|
if (!i) return;
|
|
633
|
-
let
|
|
634
|
-
|
|
635
|
-
block:
|
|
636
|
-
position: String(
|
|
774
|
+
let a = i.index + r;
|
|
775
|
+
a < 0 || a >= i.total || (e.moveBlock(n, a, i.sectionId, i.columnIndex), l(t.format(t.t.blockActions.moved, {
|
|
776
|
+
block: s(n),
|
|
777
|
+
position: String(a + 1),
|
|
637
778
|
total: String(i.total)
|
|
638
779
|
})));
|
|
639
780
|
}
|
|
640
|
-
function f(e) {
|
|
641
|
-
d(e, -1);
|
|
642
|
-
}
|
|
643
781
|
function p(e) {
|
|
644
|
-
|
|
782
|
+
f(e, -1);
|
|
645
783
|
}
|
|
646
784
|
function m(e) {
|
|
647
|
-
|
|
648
|
-
r && c(t.format(t.t.blockActions.dropped, {
|
|
649
|
-
block: o(e),
|
|
650
|
-
position: String(r.index + 1),
|
|
651
|
-
total: String(r.total)
|
|
652
|
-
})), n.value = null, i = null;
|
|
785
|
+
f(e, 1);
|
|
653
786
|
}
|
|
654
|
-
function h() {
|
|
655
|
-
let
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
787
|
+
function h(e) {
|
|
788
|
+
let n = o(e);
|
|
789
|
+
n && l(t.format(t.t.blockActions.dropped, {
|
|
790
|
+
block: s(e),
|
|
791
|
+
position: String(n.index + 1),
|
|
792
|
+
total: String(n.total)
|
|
793
|
+
})), r.value = null, a = null;
|
|
794
|
+
}
|
|
795
|
+
function g() {
|
|
796
|
+
let n = r.value;
|
|
797
|
+
if (n && a) {
|
|
798
|
+
let r = o(n), i = !!r && (r.sectionId !== a.sectionId || r.columnIndex !== a.columnIndex), c = !!r && r.index !== a.index;
|
|
799
|
+
r && (i || c) && e.moveBlock(n, a.index, a.sectionId, a.columnIndex), l(t.format(t.t.blockActions.cancelled, {
|
|
800
|
+
block: s(n),
|
|
801
|
+
position: String(a.index + 1)
|
|
661
802
|
}));
|
|
662
803
|
}
|
|
663
|
-
|
|
804
|
+
r.value = null, a = null;
|
|
664
805
|
}
|
|
665
806
|
return {
|
|
666
|
-
liftedBlockId:
|
|
667
|
-
announcement:
|
|
668
|
-
isLifted:
|
|
669
|
-
lift:
|
|
670
|
-
cancel:
|
|
671
|
-
moveUp:
|
|
672
|
-
moveDown:
|
|
673
|
-
drop:
|
|
807
|
+
liftedBlockId: r,
|
|
808
|
+
announcement: i,
|
|
809
|
+
isLifted: u,
|
|
810
|
+
lift: d,
|
|
811
|
+
cancel: g,
|
|
812
|
+
moveUp: p,
|
|
813
|
+
moveDown: m,
|
|
814
|
+
drop: h
|
|
674
815
|
};
|
|
675
816
|
}
|
|
676
817
|
//#endregion
|
|
677
818
|
//#region src/composables/useUiTheme.ts
|
|
678
|
-
function
|
|
679
|
-
let t =
|
|
819
|
+
function bn(e) {
|
|
820
|
+
let t = Ye("(prefers-color-scheme: dark)");
|
|
680
821
|
return { resolvedTheme: M(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
681
822
|
}
|
|
682
823
|
//#endregion
|
|
683
824
|
//#region src/composables/useThemeStyles.ts
|
|
684
|
-
var
|
|
825
|
+
var xn = {
|
|
685
826
|
bg: "--tpl-bg",
|
|
686
827
|
bgElevated: "--tpl-bg-elevated",
|
|
687
828
|
bgHover: "--tpl-bg-hover",
|
|
@@ -705,10 +846,10 @@ var gn = {
|
|
|
705
846
|
dangerLight: "--tpl-danger-light",
|
|
706
847
|
canvasBg: "--tpl-canvas-bg"
|
|
707
848
|
};
|
|
708
|
-
function
|
|
849
|
+
function Sn({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
709
850
|
return { themeStyles: M(() => {
|
|
710
851
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
711
|
-
if (a) for (let [e, t] of Object.entries(
|
|
852
|
+
if (a) for (let [e, t] of Object.entries(xn)) {
|
|
712
853
|
let n = a[e];
|
|
713
854
|
n && (r[t] = n);
|
|
714
855
|
}
|
|
@@ -717,27 +858,27 @@ function _n({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
717
858
|
}
|
|
718
859
|
//#endregion
|
|
719
860
|
//#region src/utils/logger.ts
|
|
720
|
-
var
|
|
721
|
-
function
|
|
861
|
+
var Cn = "[Templatical]";
|
|
862
|
+
function wn() {
|
|
722
863
|
return typeof process < "u" && process.env.NODE_ENV === "production";
|
|
723
864
|
}
|
|
724
|
-
var
|
|
865
|
+
var Tn = {
|
|
725
866
|
warn(...e) {
|
|
726
|
-
console.warn(
|
|
867
|
+
console.warn(Cn, ...e);
|
|
727
868
|
},
|
|
728
869
|
error(...e) {
|
|
729
|
-
console.error(
|
|
870
|
+
console.error(Cn, ...e);
|
|
730
871
|
},
|
|
731
872
|
debug(...e) {
|
|
732
|
-
|
|
873
|
+
wn() || console.debug(Cn, ...e);
|
|
733
874
|
},
|
|
734
875
|
info(...e) {
|
|
735
|
-
|
|
876
|
+
wn() || console.info(Cn, ...e);
|
|
736
877
|
}
|
|
737
878
|
};
|
|
738
879
|
//#endregion
|
|
739
880
|
//#region src/composables/useBlockRegistry.ts
|
|
740
|
-
function
|
|
881
|
+
function En() {
|
|
741
882
|
let e = v(/* @__PURE__ */ new Map());
|
|
742
883
|
function t(t, n) {
|
|
743
884
|
e.value.set(t, n), te(e);
|
|
@@ -777,7 +918,7 @@ function xn() {
|
|
|
777
918
|
strictFilters: !1
|
|
778
919
|
}).parseAndRender(t.template, e.fieldValues);
|
|
779
920
|
} catch (t) {
|
|
780
|
-
return
|
|
921
|
+
return Tn.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
781
922
|
}
|
|
782
923
|
}
|
|
783
924
|
function c(t) {
|
|
@@ -795,9 +936,9 @@ function xn() {
|
|
|
795
936
|
}
|
|
796
937
|
//#endregion
|
|
797
938
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
798
|
-
function
|
|
939
|
+
function Dn(e, t) {
|
|
799
940
|
return M(() => {
|
|
800
|
-
let n =
|
|
941
|
+
let n = On(e.value.blocks);
|
|
801
942
|
if (n.size === 0) return [];
|
|
802
943
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
803
944
|
for (let e of n) {
|
|
@@ -809,11 +950,11 @@ function Sn(e, t) {
|
|
|
809
950
|
return i;
|
|
810
951
|
});
|
|
811
952
|
}
|
|
812
|
-
function
|
|
953
|
+
function On(e) {
|
|
813
954
|
let t = /* @__PURE__ */ new Set();
|
|
814
|
-
return
|
|
955
|
+
return kn(e, t), t;
|
|
815
956
|
}
|
|
816
|
-
function
|
|
957
|
+
function kn(e, t) {
|
|
817
958
|
for (let n of e) {
|
|
818
959
|
if (le(n)) {
|
|
819
960
|
t.add(n.customType);
|
|
@@ -822,16 +963,16 @@ function wn(e, t) {
|
|
|
822
963
|
if (n.type === "section") {
|
|
823
964
|
let e = n.children;
|
|
824
965
|
if (!e) continue;
|
|
825
|
-
for (let n of e)
|
|
966
|
+
for (let n of e) kn(n, t);
|
|
826
967
|
}
|
|
827
968
|
}
|
|
828
969
|
}
|
|
829
970
|
//#endregion
|
|
830
971
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
831
|
-
var
|
|
972
|
+
var An = [
|
|
832
973
|
{
|
|
833
974
|
type: "section",
|
|
834
|
-
createBlock:
|
|
975
|
+
createBlock: He
|
|
835
976
|
},
|
|
836
977
|
{
|
|
837
978
|
type: "title",
|
|
@@ -839,7 +980,7 @@ var Tn = [
|
|
|
839
980
|
},
|
|
840
981
|
{
|
|
841
982
|
type: "paragraph",
|
|
842
|
-
createBlock:
|
|
983
|
+
createBlock: ze
|
|
843
984
|
},
|
|
844
985
|
{
|
|
845
986
|
type: "image",
|
|
@@ -847,7 +988,7 @@ var Tn = [
|
|
|
847
988
|
},
|
|
848
989
|
{
|
|
849
990
|
type: "button",
|
|
850
|
-
createBlock:
|
|
991
|
+
createBlock: Re
|
|
851
992
|
},
|
|
852
993
|
{
|
|
853
994
|
type: "divider",
|
|
@@ -855,7 +996,7 @@ var Tn = [
|
|
|
855
996
|
},
|
|
856
997
|
{
|
|
857
998
|
type: "video",
|
|
858
|
-
createBlock:
|
|
999
|
+
createBlock: Be
|
|
859
1000
|
},
|
|
860
1001
|
{
|
|
861
1002
|
type: "social",
|
|
@@ -871,7 +1012,7 @@ var Tn = [
|
|
|
871
1012
|
},
|
|
872
1013
|
{
|
|
873
1014
|
type: "spacer",
|
|
874
|
-
createBlock:
|
|
1015
|
+
createBlock: Ve
|
|
875
1016
|
},
|
|
876
1017
|
{
|
|
877
1018
|
type: "html",
|
|
@@ -882,8 +1023,8 @@ var Tn = [
|
|
|
882
1023
|
createBlock: we
|
|
883
1024
|
}
|
|
884
1025
|
];
|
|
885
|
-
function
|
|
886
|
-
for (let n of
|
|
1026
|
+
function jn(e, t) {
|
|
1027
|
+
for (let n of An) {
|
|
887
1028
|
let r = t[n.type];
|
|
888
1029
|
r && e.registerBuiltIn(n.type, {
|
|
889
1030
|
component: r,
|
|
@@ -893,23 +1034,23 @@ function En(e, t) {
|
|
|
893
1034
|
}
|
|
894
1035
|
//#endregion
|
|
895
1036
|
//#region src/utils/resolveHtmlBlockPreview.ts
|
|
896
|
-
function
|
|
1037
|
+
function Mn(e) {
|
|
897
1038
|
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
898
1039
|
}
|
|
899
1040
|
//#endregion
|
|
900
1041
|
//#region src/utils/collectOffPaletteDefaults.ts
|
|
901
|
-
function
|
|
1042
|
+
function Nn(e) {
|
|
902
1043
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
903
1044
|
}
|
|
904
|
-
function
|
|
905
|
-
let r = new Set(e.map((e) =>
|
|
906
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(
|
|
1045
|
+
function Pn(e, t, n) {
|
|
1046
|
+
let r = new Set(e.map((e) => $e(e))), i = [], a = (e, t) => {
|
|
1047
|
+
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has($e(o)) && i.push(`${t}.${n}: ${o}`) : Nn(o) && a(o, `${t}.${n}`);
|
|
907
1048
|
}, o = t;
|
|
908
|
-
for (let [e, t] of Object.entries(
|
|
1049
|
+
for (let [e, t] of Object.entries(Le)) {
|
|
909
1050
|
let n = o?.[e];
|
|
910
1051
|
a({
|
|
911
1052
|
...t,
|
|
912
|
-
...
|
|
1053
|
+
...Nn(n) ? n : {}
|
|
913
1054
|
}, e);
|
|
914
1055
|
}
|
|
915
1056
|
return a({
|
|
@@ -919,8 +1060,8 @@ function kn(e, t, n) {
|
|
|
919
1060
|
}
|
|
920
1061
|
//#endregion
|
|
921
1062
|
//#region src/utils/resolveFieldColors.ts
|
|
922
|
-
function
|
|
923
|
-
let n =
|
|
1063
|
+
function Fn(e, t) {
|
|
1064
|
+
let n = Qe({ presets: e.presets }, qe), r = n.presets.length === 0, i = e.allowCustom ?? t.allowCustom;
|
|
924
1065
|
return {
|
|
925
1066
|
presets: r ? t.presets : n.presets,
|
|
926
1067
|
allowCustom: t.allowCustom !== !1 && i,
|
|
@@ -932,9 +1073,9 @@ function An(e, t) {
|
|
|
932
1073
|
}
|
|
933
1074
|
//#endregion
|
|
934
1075
|
//#region src/utils/collectColorFieldIssues.ts
|
|
935
|
-
function
|
|
1076
|
+
function In(e, t) {
|
|
936
1077
|
let n = [], r = (r, i) => {
|
|
937
|
-
let a =
|
|
1078
|
+
let a = Fn(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
938
1079
|
if (a.invalidPresets.length > 0 && n.push({
|
|
939
1080
|
id: s("invalid-presets"),
|
|
940
1081
|
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." : "")
|
|
@@ -945,8 +1086,8 @@ function jn(e, t) {
|
|
|
945
1086
|
id: s("allow-custom-ignored"),
|
|
946
1087
|
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
947
1088
|
}), !a.allowCustom && a.presets.length > 0) {
|
|
948
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) =>
|
|
949
|
-
e !== "" && !t.has(
|
|
1089
|
+
let e = r.default ?? "", t = new Set(a.presets.map((e) => $e(e)));
|
|
1090
|
+
e !== "" && !t.has($e(e)) && n.push({
|
|
950
1091
|
id: s("off-palette-default"),
|
|
951
1092
|
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.`
|
|
952
1093
|
});
|
|
@@ -958,7 +1099,7 @@ function jn(e, t) {
|
|
|
958
1099
|
}
|
|
959
1100
|
//#endregion
|
|
960
1101
|
//#region src/utils/keyboardShortcuts.ts
|
|
961
|
-
function
|
|
1102
|
+
function Ln(e) {
|
|
962
1103
|
for (let t of e.composedPath()) {
|
|
963
1104
|
if (!(t instanceof HTMLElement)) continue;
|
|
964
1105
|
if (t.isContentEditable) return !0;
|
|
@@ -967,26 +1108,40 @@ function Mn(e) {
|
|
|
967
1108
|
}
|
|
968
1109
|
return !1;
|
|
969
1110
|
}
|
|
970
|
-
function
|
|
1111
|
+
function Rn(e, t) {
|
|
971
1112
|
let n = e.metaKey || e.ctrlKey;
|
|
972
1113
|
if (n && e.key.toLowerCase() === "s") {
|
|
973
1114
|
e.preventDefault(), t.onSave?.();
|
|
974
1115
|
return;
|
|
975
1116
|
}
|
|
976
1117
|
if (n && e.key.toLowerCase() === "z") {
|
|
977
|
-
if (
|
|
1118
|
+
if (Ln(e)) return;
|
|
978
1119
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
979
1120
|
return;
|
|
980
1121
|
}
|
|
1122
|
+
if (t.isPicking?.() && !Ln(e)) {
|
|
1123
|
+
if (e.key === "Escape") {
|
|
1124
|
+
e.preventDefault(), t.onCancelPick?.();
|
|
1125
|
+
return;
|
|
1126
|
+
}
|
|
1127
|
+
if (e.key === "Enter") {
|
|
1128
|
+
e.preventDefault(), t.onConfirmPick?.();
|
|
1129
|
+
return;
|
|
1130
|
+
}
|
|
1131
|
+
if (e.key === "Delete" || e.key === "Backspace") {
|
|
1132
|
+
e.preventDefault();
|
|
1133
|
+
return;
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
981
1136
|
if (e.key === "Escape") {
|
|
982
1137
|
t.selectBlock(null);
|
|
983
1138
|
return;
|
|
984
1139
|
}
|
|
985
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1140
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Ln(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
986
1141
|
}
|
|
987
1142
|
//#endregion
|
|
988
1143
|
//#region src/utils/mergeTagLabelSegments.ts
|
|
989
|
-
function
|
|
1144
|
+
function zn(e, t, n) {
|
|
990
1145
|
if (!e) return [];
|
|
991
1146
|
let r = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), i = [], a = 0, o;
|
|
992
1147
|
for (; (o = r.exec(e)) !== null;) {
|
|
@@ -1013,20 +1168,20 @@ function Pn(e, t, n) {
|
|
|
1013
1168
|
}
|
|
1014
1169
|
//#endregion
|
|
1015
1170
|
//#region src/components/MergeTagPreviewText.vue
|
|
1016
|
-
var
|
|
1171
|
+
var Bn = y({
|
|
1017
1172
|
name: "MergeTagPreviewText",
|
|
1018
1173
|
props: { text: {
|
|
1019
1174
|
type: String,
|
|
1020
1175
|
required: !0
|
|
1021
1176
|
} },
|
|
1022
1177
|
setup(e) {
|
|
1023
|
-
let t = P(
|
|
1178
|
+
let t = P(mt, []), n = P(dt, xe.liquid), r = M(() => zn(e.text, t, n));
|
|
1024
1179
|
return () => r.value.map((e, t) => e.type === "tag" ? ie("span", {
|
|
1025
1180
|
key: t,
|
|
1026
1181
|
class: "tpl-merge-tag-label"
|
|
1027
1182
|
}, e.value) : e.value);
|
|
1028
1183
|
}
|
|
1029
|
-
}),
|
|
1184
|
+
}), Vn = { class: "tpl:text-center" }, Hn = ["href"], Un = /* @__PURE__ */ y({
|
|
1030
1185
|
__name: "ButtonBlock",
|
|
1031
1186
|
props: {
|
|
1032
1187
|
block: {},
|
|
@@ -1047,17 +1202,17 @@ var Fn = y({
|
|
|
1047
1202
|
};
|
|
1048
1203
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
1049
1204
|
});
|
|
1050
|
-
return (t, r) => (f(), x("div",
|
|
1205
|
+
return (t, r) => (f(), x("div", Vn, [b("a", {
|
|
1051
1206
|
href: e.block.url || "#",
|
|
1052
1207
|
style: i(n.value),
|
|
1053
1208
|
class: "tpl:cursor-default",
|
|
1054
1209
|
onClick: r[0] ||= F(() => {}, ["prevent"])
|
|
1055
|
-
}, [w(
|
|
1210
|
+
}, [w(Bn, { text: e.block.text }, null, 8, ["text"])], 12, Hn)]));
|
|
1056
1211
|
}
|
|
1057
|
-
}),
|
|
1212
|
+
}), Wn = I("bookmark", [["path", {
|
|
1058
1213
|
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",
|
|
1059
1214
|
key: "oz39mx"
|
|
1060
|
-
}]]),
|
|
1215
|
+
}]]), Gn = I("box", [
|
|
1061
1216
|
["path", {
|
|
1062
1217
|
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
|
|
1063
1218
|
key: "hh9hay"
|
|
@@ -1070,13 +1225,13 @@ var Fn = y({
|
|
|
1070
1225
|
d: "M12 22V12",
|
|
1071
1226
|
key: "d0xqtd"
|
|
1072
1227
|
}]
|
|
1073
|
-
]),
|
|
1228
|
+
]), Kn = I("code", [["path", {
|
|
1074
1229
|
d: "m16 18 6-6-6-6",
|
|
1075
1230
|
key: "eg8j8"
|
|
1076
1231
|
}], ["path", {
|
|
1077
1232
|
d: "m8 6-6 6 6 6",
|
|
1078
1233
|
key: "ppft3o"
|
|
1079
|
-
}]]),
|
|
1234
|
+
}]]), qn = I("copy", [["rect", {
|
|
1080
1235
|
width: "14",
|
|
1081
1236
|
height: "14",
|
|
1082
1237
|
x: "8",
|
|
@@ -1087,7 +1242,7 @@ var Fn = y({
|
|
|
1087
1242
|
}], ["path", {
|
|
1088
1243
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
1089
1244
|
key: "zix9uf"
|
|
1090
|
-
}]]),
|
|
1245
|
+
}]]), Jn = I("eye-off", [
|
|
1091
1246
|
["path", {
|
|
1092
1247
|
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
1093
1248
|
key: "ct8e1f"
|
|
@@ -1104,10 +1259,10 @@ var Fn = y({
|
|
|
1104
1259
|
d: "m2 2 20 20",
|
|
1105
1260
|
key: "1ooewy"
|
|
1106
1261
|
}]
|
|
1107
|
-
]),
|
|
1262
|
+
]), Yn = I("funnel", [["path", {
|
|
1108
1263
|
d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
|
|
1109
1264
|
key: "sc7q7i"
|
|
1110
|
-
}]]),
|
|
1265
|
+
}]]), Xn = I("grip-vertical", [
|
|
1111
1266
|
["circle", {
|
|
1112
1267
|
cx: "9",
|
|
1113
1268
|
cy: "12",
|
|
@@ -1144,7 +1299,7 @@ var Fn = y({
|
|
|
1144
1299
|
r: "1",
|
|
1145
1300
|
key: "f4zoj3"
|
|
1146
1301
|
}]
|
|
1147
|
-
]),
|
|
1302
|
+
]), Zn = I("image", [
|
|
1148
1303
|
["rect", {
|
|
1149
1304
|
width: "18",
|
|
1150
1305
|
height: "18",
|
|
@@ -1164,13 +1319,13 @@ var Fn = y({
|
|
|
1164
1319
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
1165
1320
|
key: "1xmnt7"
|
|
1166
1321
|
}]
|
|
1167
|
-
]),
|
|
1322
|
+
]), Qn = I("navigation", [["polygon", {
|
|
1168
1323
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
1169
1324
|
key: "1ltx0t"
|
|
1170
|
-
}]]),
|
|
1325
|
+
}]]), $n = I("puzzle", [["path", {
|
|
1171
1326
|
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",
|
|
1172
1327
|
key: "w46dr5"
|
|
1173
|
-
}]]),
|
|
1328
|
+
}]]), er = I("share-2", [
|
|
1174
1329
|
["circle", {
|
|
1175
1330
|
cx: "18",
|
|
1176
1331
|
cy: "5",
|
|
@@ -1203,7 +1358,7 @@ var Fn = y({
|
|
|
1203
1358
|
y2: "10.49",
|
|
1204
1359
|
key: "1n3mei"
|
|
1205
1360
|
}]
|
|
1206
|
-
]),
|
|
1361
|
+
]), tr = I("table", [
|
|
1207
1362
|
["path", {
|
|
1208
1363
|
d: "M12 3v18",
|
|
1209
1364
|
key: "108xh3"
|
|
@@ -1224,7 +1379,7 @@ var Fn = y({
|
|
|
1224
1379
|
d: "M3 15h18",
|
|
1225
1380
|
key: "5xshup"
|
|
1226
1381
|
}]
|
|
1227
|
-
]),
|
|
1382
|
+
]), nr = I("video", [["path", {
|
|
1228
1383
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
1229
1384
|
key: "ftymec"
|
|
1230
1385
|
}], ["rect", {
|
|
@@ -1234,11 +1389,11 @@ var Fn = y({
|
|
|
1234
1389
|
height: "12",
|
|
1235
1390
|
rx: "2",
|
|
1236
1391
|
key: "158x01"
|
|
1237
|
-
}]]),
|
|
1392
|
+
}]]), rr = ["innerHTML"], ir = [
|
|
1238
1393
|
"src",
|
|
1239
1394
|
"width",
|
|
1240
1395
|
"height"
|
|
1241
|
-
],
|
|
1396
|
+
], ar = /* @__PURE__ */ y({
|
|
1242
1397
|
__name: "CustomBlockIcon",
|
|
1243
1398
|
props: {
|
|
1244
1399
|
icon: {},
|
|
@@ -1254,14 +1409,14 @@ var Fn = y({
|
|
|
1254
1409
|
height: `${n.value}px`
|
|
1255
1410
|
}),
|
|
1256
1411
|
innerHTML: e.icon
|
|
1257
|
-
}, null, 12,
|
|
1412
|
+
}, null, 12, rr)) : a.value ? (f(), x("img", {
|
|
1258
1413
|
key: 1,
|
|
1259
1414
|
src: e.icon,
|
|
1260
1415
|
width: n.value,
|
|
1261
1416
|
height: n.value,
|
|
1262
1417
|
class: "tpl:inline-block",
|
|
1263
1418
|
alt: ""
|
|
1264
|
-
}, null, 8,
|
|
1419
|
+
}, null, 8, ir)) : (f(), D(k(Gn), {
|
|
1265
1420
|
key: 2,
|
|
1266
1421
|
size: n.value,
|
|
1267
1422
|
"stroke-width": 1.5
|
|
@@ -1270,16 +1425,16 @@ var Fn = y({
|
|
|
1270
1425
|
});
|
|
1271
1426
|
//#endregion
|
|
1272
1427
|
//#region src/composables/useEditorRoot.ts
|
|
1273
|
-
function
|
|
1274
|
-
return P(
|
|
1428
|
+
function or() {
|
|
1429
|
+
return P(bt, document) ?? document;
|
|
1275
1430
|
}
|
|
1276
1431
|
//#endregion
|
|
1277
1432
|
//#region src/composables/useFocusTrap.ts
|
|
1278
|
-
var
|
|
1279
|
-
function
|
|
1280
|
-
let n =
|
|
1433
|
+
var sr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1434
|
+
function cr(e, t) {
|
|
1435
|
+
let n = or(), r = null, i = null, a = null;
|
|
1281
1436
|
function o() {
|
|
1282
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
1437
|
+
return e.value ? Array.from(e.value.querySelectorAll(sr)).filter((e) => e.offsetParent !== null) : [];
|
|
1283
1438
|
}
|
|
1284
1439
|
function s(e) {
|
|
1285
1440
|
if (e.key !== "Tab") return;
|
|
@@ -1294,7 +1449,7 @@ function rr(e, t) {
|
|
|
1294
1449
|
a = null;
|
|
1295
1450
|
let t = o();
|
|
1296
1451
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1297
|
-
}), i =
|
|
1452
|
+
}), i = tt(e, "keydown", s);
|
|
1298
1453
|
}
|
|
1299
1454
|
function d(e = {}) {
|
|
1300
1455
|
let t = e.restoreFocus !== !1;
|
|
@@ -1309,8 +1464,8 @@ function rr(e, t) {
|
|
|
1309
1464
|
}
|
|
1310
1465
|
//#endregion
|
|
1311
1466
|
//#region src/composables/useEmoji.ts
|
|
1312
|
-
function
|
|
1313
|
-
let [e, t] =
|
|
1467
|
+
function lr() {
|
|
1468
|
+
let [e, t] = Ge(!1), n = v([]), r = !1;
|
|
1314
1469
|
u(() => {
|
|
1315
1470
|
r = !0;
|
|
1316
1471
|
}), c(e, async (e) => {
|
|
@@ -1335,7 +1490,7 @@ function ir() {
|
|
|
1335
1490
|
}
|
|
1336
1491
|
//#endregion
|
|
1337
1492
|
//#region src/composables/useDragDrop.ts
|
|
1338
|
-
function
|
|
1493
|
+
function ur(e) {
|
|
1339
1494
|
let { onBlockMove: t, onBlockAdd: n } = e, r = _(!1), i = _(null), a = _(null);
|
|
1340
1495
|
function o(e) {
|
|
1341
1496
|
r.value = !0, i.value = e;
|
|
@@ -1385,7 +1540,7 @@ function ar(e) {
|
|
|
1385
1540
|
}
|
|
1386
1541
|
//#endregion
|
|
1387
1542
|
//#region src/composables/useFonts.ts
|
|
1388
|
-
var
|
|
1543
|
+
var dr = [
|
|
1389
1544
|
{
|
|
1390
1545
|
value: "Arial",
|
|
1391
1546
|
label: "Arial"
|
|
@@ -1414,7 +1569,7 @@ var or = [
|
|
|
1414
1569
|
value: "Courier New",
|
|
1415
1570
|
label: "Courier New"
|
|
1416
1571
|
}
|
|
1417
|
-
],
|
|
1572
|
+
], fr = {
|
|
1418
1573
|
arial: "Arial, sans-serif",
|
|
1419
1574
|
helvetica: "Helvetica, sans-serif",
|
|
1420
1575
|
georgia: "Georgia, serif",
|
|
@@ -1422,23 +1577,23 @@ var or = [
|
|
|
1422
1577
|
verdana: "Verdana, sans-serif",
|
|
1423
1578
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
1424
1579
|
"courier new": "'Courier New', monospace"
|
|
1425
|
-
},
|
|
1426
|
-
function
|
|
1427
|
-
if (e === void 0 || e === !0) return [...
|
|
1580
|
+
}, pr = "Arial, sans-serif";
|
|
1581
|
+
function mr(e) {
|
|
1582
|
+
if (e === void 0 || e === !0) return [...dr];
|
|
1428
1583
|
if (e === !1) return [];
|
|
1429
1584
|
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1430
1585
|
for (let i of e) {
|
|
1431
|
-
let e = i.toLowerCase(), a =
|
|
1586
|
+
let e = i.toLowerCase(), a = dr.find((t) => t.value.toLowerCase() === e);
|
|
1432
1587
|
if (!a) {
|
|
1433
|
-
r.has(e) || (r.add(e),
|
|
1588
|
+
r.has(e) || (r.add(e), Tn.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${dr.map((e) => e.value).join(", ")}.`));
|
|
1434
1589
|
continue;
|
|
1435
1590
|
}
|
|
1436
1591
|
n.has(a.value) || (n.add(a.value), t.push(a));
|
|
1437
1592
|
}
|
|
1438
1593
|
return t;
|
|
1439
1594
|
}
|
|
1440
|
-
function
|
|
1441
|
-
let t = _(e?.customFonts ?? []), n = _(!0), r = _(!1), i =
|
|
1595
|
+
function hr(e) {
|
|
1596
|
+
let t = _(e?.customFonts ?? []), n = _(!0), r = _(!1), i = mr(e?.builtIns), a = M(() => e?.defaultFallback ?? pr);
|
|
1442
1597
|
function o(e) {
|
|
1443
1598
|
n.value = e;
|
|
1444
1599
|
}
|
|
@@ -1455,20 +1610,20 @@ function ur(e) {
|
|
|
1455
1610
|
function l(e) {
|
|
1456
1611
|
return c.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1457
1612
|
}
|
|
1458
|
-
let d = e?.defaultFont ??
|
|
1459
|
-
l(d) ||
|
|
1613
|
+
let d = e?.defaultFont ?? pr.split(",")[0].trim();
|
|
1614
|
+
l(d) || Tn.warn(`config.fonts: new templates seed "${d}", 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.`);
|
|
1460
1615
|
function f(e) {
|
|
1461
|
-
return
|
|
1616
|
+
return dr.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1462
1617
|
}
|
|
1463
1618
|
function p() {
|
|
1464
1619
|
if (e?.defaultFont) {
|
|
1465
|
-
if (!n.value && !f(e.defaultFont)) return
|
|
1620
|
+
if (!n.value && !f(e.defaultFont)) return pr;
|
|
1466
1621
|
if (l(e.defaultFont)) {
|
|
1467
1622
|
let t = c.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1468
1623
|
if (t) return t.value;
|
|
1469
1624
|
}
|
|
1470
1625
|
}
|
|
1471
|
-
return
|
|
1626
|
+
return pr;
|
|
1472
1627
|
}
|
|
1473
1628
|
let m = M(() => p());
|
|
1474
1629
|
function h(e) {
|
|
@@ -1478,7 +1633,7 @@ function ur(e) {
|
|
|
1478
1633
|
let e = n.fallback ?? a.value;
|
|
1479
1634
|
return `'${n.name}', ${e}`;
|
|
1480
1635
|
}
|
|
1481
|
-
return
|
|
1636
|
+
return fr[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${a.value}`);
|
|
1482
1637
|
}
|
|
1483
1638
|
let g = [], v = !1;
|
|
1484
1639
|
async function y() {
|
|
@@ -1494,7 +1649,7 @@ function ur(e) {
|
|
|
1494
1649
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1495
1650
|
});
|
|
1496
1651
|
} catch (t) {
|
|
1497
|
-
|
|
1652
|
+
Tn.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1498
1653
|
}
|
|
1499
1654
|
});
|
|
1500
1655
|
await Promise.allSettled(e), !v && (r.value = !0);
|
|
@@ -1521,8 +1676,8 @@ function ur(e) {
|
|
|
1521
1676
|
}
|
|
1522
1677
|
//#endregion
|
|
1523
1678
|
//#region src/composables/useLogicTag.ts
|
|
1524
|
-
function
|
|
1525
|
-
let e = P(
|
|
1679
|
+
function gr() {
|
|
1680
|
+
let e = P(it, []), t = P(pt, []), n = P(dt, xe.liquid), r = P(wt, null), i = P(Mt, null), a = _(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
|
|
1526
1681
|
async function c() {
|
|
1527
1682
|
if (r) {
|
|
1528
1683
|
a.value = !0;
|
|
@@ -1553,7 +1708,7 @@ function dr() {
|
|
|
1553
1708
|
}
|
|
1554
1709
|
//#endregion
|
|
1555
1710
|
//#region src/utils/mergeTagNodeSpec.ts
|
|
1556
|
-
function
|
|
1711
|
+
function _r(e, t, n) {
|
|
1557
1712
|
return ke(e, n) ? {
|
|
1558
1713
|
type: "logicMergeTagNode",
|
|
1559
1714
|
attrs: {
|
|
@@ -1570,15 +1725,15 @@ function fr(e, t, n) {
|
|
|
1570
1725
|
}
|
|
1571
1726
|
//#endregion
|
|
1572
1727
|
//#region src/utils/insertLogicTag.ts
|
|
1573
|
-
function
|
|
1728
|
+
function vr(e) {
|
|
1574
1729
|
return "before" in e && "after" in e;
|
|
1575
1730
|
}
|
|
1576
|
-
function
|
|
1577
|
-
if (!
|
|
1578
|
-
e.chain().focus().insertContent(
|
|
1731
|
+
function yr(e, t, n) {
|
|
1732
|
+
if (!vr(t)) {
|
|
1733
|
+
e.chain().focus().insertContent(_r(t.value, t.label, n)).run();
|
|
1579
1734
|
return;
|
|
1580
1735
|
}
|
|
1581
|
-
let r =
|
|
1736
|
+
let r = _r(t.before, t.label, n), i = _r(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1582
1737
|
if (a !== o) {
|
|
1583
1738
|
e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1584
1739
|
return;
|
|
@@ -1587,20 +1742,20 @@ function mr(e, t, n) {
|
|
|
1587
1742
|
}
|
|
1588
1743
|
//#endregion
|
|
1589
1744
|
//#region src/utils/linkColorExtension.ts
|
|
1590
|
-
function
|
|
1745
|
+
function br(e) {
|
|
1591
1746
|
if (!e) return null;
|
|
1592
1747
|
let t = e.trim();
|
|
1593
1748
|
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;
|
|
1594
1749
|
}
|
|
1595
|
-
function
|
|
1750
|
+
function xr(e) {
|
|
1596
1751
|
return e.extend({ addAttributes() {
|
|
1597
1752
|
return {
|
|
1598
1753
|
...this.parent?.(),
|
|
1599
1754
|
color: {
|
|
1600
1755
|
default: null,
|
|
1601
|
-
parseHTML: (e) =>
|
|
1756
|
+
parseHTML: (e) => br(Xe(e.style.color)),
|
|
1602
1757
|
renderHTML: (e) => {
|
|
1603
|
-
let t =
|
|
1758
|
+
let t = br(e.color);
|
|
1604
1759
|
return t ? { style: `color: ${t}` } : {};
|
|
1605
1760
|
}
|
|
1606
1761
|
}
|
|
@@ -1609,9 +1764,9 @@ function gr(e) {
|
|
|
1609
1764
|
}
|
|
1610
1765
|
//#endregion
|
|
1611
1766
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
1612
|
-
function
|
|
1767
|
+
function Sr(e) {
|
|
1613
1768
|
let t = _(!1), n = _(""), r = _(""), i = _(null);
|
|
1614
|
-
|
|
1769
|
+
cr(i, t);
|
|
1615
1770
|
function a() {
|
|
1616
1771
|
let i = e.value?.getAttributes("link") ?? {};
|
|
1617
1772
|
n.value = i.href || "", r.value = i.color || "", t.value = !0;
|
|
@@ -1620,7 +1775,7 @@ function _r(e) {
|
|
|
1620
1775
|
if (n.value) {
|
|
1621
1776
|
let t = c(n.value);
|
|
1622
1777
|
if (t !== null) {
|
|
1623
|
-
let n =
|
|
1778
|
+
let n = br(r.value), i = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1624
1779
|
n && typeof e.value?.commands.unsetColor == "function" && i?.unsetColor(), i?.run();
|
|
1625
1780
|
}
|
|
1626
1781
|
}
|
|
@@ -1667,8 +1822,8 @@ function _r(e) {
|
|
|
1667
1822
|
}
|
|
1668
1823
|
//#endregion
|
|
1669
1824
|
//#region src/composables/useRichTextEditor.ts
|
|
1670
|
-
function
|
|
1671
|
-
let t = P(
|
|
1825
|
+
function Cr(e) {
|
|
1826
|
+
let t = P(xt, null), { mergeTags: n, canRequestMergeTag: r, isRequesting: i, requestMergeTag: a, syntax: o, autocomplete: s } = Ut(), { canInsertLogicTag: l, isRequesting: u, requestLogicTag: d } = gr(), f = P(ft, null), p = (g(f) ? f.value : f)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", m = Ae(o), y = v(null), { showLinkDialog: b, linkUrl: x, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: E, closeLinkDialog: D, handleLinkKeydown: O } = Sr(y), { start: k, stop: A } = Ke(() => y.value?.commands.focus("end"), 0, { immediate: !1 }), j = v(null), ee = _(!0), M = _(null), te = !1;
|
|
1672
1827
|
async function N() {
|
|
1673
1828
|
M.value = null, ee.value = !0;
|
|
1674
1829
|
try {
|
|
@@ -1698,7 +1853,7 @@ function vr(e) {
|
|
|
1698
1853
|
y.value = l, ee.value = !1, k();
|
|
1699
1854
|
} catch (t) {
|
|
1700
1855
|
if (te) return;
|
|
1701
|
-
|
|
1856
|
+
Tn.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), M.value = t instanceof Error ? t.message : "Failed to load editor", ee.value = !1;
|
|
1702
1857
|
}
|
|
1703
1858
|
}
|
|
1704
1859
|
function ne() {
|
|
@@ -1716,7 +1871,7 @@ function vr(e) {
|
|
|
1716
1871
|
let a = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1717
1872
|
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || a || e.onDone();
|
|
1718
1873
|
}
|
|
1719
|
-
|
|
1874
|
+
tt(document, "mousedown", ie), h(() => {
|
|
1720
1875
|
te = !0, re(), A(), y.value?.destroy();
|
|
1721
1876
|
});
|
|
1722
1877
|
async function ae() {
|
|
@@ -1728,7 +1883,7 @@ function vr(e) {
|
|
|
1728
1883
|
}
|
|
1729
1884
|
async function F() {
|
|
1730
1885
|
let e = await d();
|
|
1731
|
-
te || (e && y.value ?
|
|
1886
|
+
te || (e && y.value ? yr(y.value, e, o) : y.value?.commands.focus());
|
|
1732
1887
|
}
|
|
1733
1888
|
return {
|
|
1734
1889
|
editor: y,
|
|
@@ -1757,9 +1912,9 @@ function vr(e) {
|
|
|
1757
1912
|
}
|
|
1758
1913
|
//#endregion
|
|
1759
1914
|
//#region src/composables/useSmallScreenNotice.ts
|
|
1760
|
-
var
|
|
1761
|
-
function
|
|
1762
|
-
let t =
|
|
1915
|
+
var wr = "(max-width: 767px)";
|
|
1916
|
+
function Tr(e) {
|
|
1917
|
+
let t = Ye(wr);
|
|
1763
1918
|
return {
|
|
1764
1919
|
isSmallScreen: t,
|
|
1765
1920
|
showNotice: M(() => (S(e) ?? !0) && t.value)
|
|
@@ -1767,20 +1922,20 @@ function br(e) {
|
|
|
1767
1922
|
}
|
|
1768
1923
|
//#endregion
|
|
1769
1924
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1770
|
-
var
|
|
1925
|
+
var Er = { class: "tpl:w-full" }, Dr = {
|
|
1771
1926
|
key: 0,
|
|
1772
1927
|
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)]"
|
|
1773
|
-
},
|
|
1928
|
+
}, Or = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, kr = {
|
|
1774
1929
|
key: 1,
|
|
1775
1930
|
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)]"
|
|
1776
|
-
},
|
|
1931
|
+
}, Ar = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, jr = {
|
|
1777
1932
|
key: 2,
|
|
1778
1933
|
class: "tpl:relative"
|
|
1779
|
-
},
|
|
1934
|
+
}, Mr = ["innerHTML"], Nr = {
|
|
1780
1935
|
key: 0,
|
|
1781
1936
|
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]",
|
|
1782
1937
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1783
|
-
},
|
|
1938
|
+
}, Pr = /* @__PURE__ */ y({
|
|
1784
1939
|
__name: "CustomBlock",
|
|
1785
1940
|
props: {
|
|
1786
1941
|
block: {},
|
|
@@ -1788,7 +1943,7 @@ var xr = { class: "tpl:w-full" }, Sr = {
|
|
|
1788
1943
|
},
|
|
1789
1944
|
emits: ["fetchData"],
|
|
1790
1945
|
setup(e, { emit: t }) {
|
|
1791
|
-
let n = e, r = t, { t: i } =
|
|
1946
|
+
let n = e, r = t, { t: i } = It(), o = P(Ot, null), s = _(""), l = _(!1), u = M(() => o?.getDefinition(n.block.customType)), d = M(() => !!u.value), { isFetching: m, fetch: h, needsFetch: g, hasDataSource: v } = tn({
|
|
1792
1947
|
definition: u,
|
|
1793
1948
|
block: M(() => n.block),
|
|
1794
1949
|
onUpdate: (e, t) => {
|
|
@@ -1809,15 +1964,15 @@ var xr = { class: "tpl:w-full" }, Sr = {
|
|
|
1809
1964
|
}
|
|
1810
1965
|
}
|
|
1811
1966
|
}
|
|
1812
|
-
let S =
|
|
1967
|
+
let S = Ue(y, 150);
|
|
1813
1968
|
return a(() => {
|
|
1814
1969
|
y();
|
|
1815
1970
|
}), c(() => n.block.fieldValues, () => {
|
|
1816
1971
|
S();
|
|
1817
|
-
}, { deep: !0 }), (e, t) => (f(), x("div",
|
|
1972
|
+
}, { deep: !0 }), (e, t) => (f(), x("div", Er, [d.value ? l.value ? (f(), x("div", kr, [w(k(Bt), {
|
|
1818
1973
|
size: 24,
|
|
1819
1974
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
1820
|
-
}), b("span",
|
|
1975
|
+
}), b("span", Ar, p(k(i).customBlocks.renderError), 1)])) : (f(), x("div", jr, [b("div", { innerHTML: s.value }, null, 8, Mr), k(v) && k(g) ? (f(), x("div", Nr, [k(m) ? (f(), D(Vt, {
|
|
1821
1976
|
key: 1,
|
|
1822
1977
|
class: "tpl:w-48"
|
|
1823
1978
|
})) : (f(), x("button", {
|
|
@@ -1825,16 +1980,16 @@ var xr = { class: "tpl:w-full" }, Sr = {
|
|
|
1825
1980
|
type: "button",
|
|
1826
1981
|
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-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1827
1982
|
onClick: t[0] ||= F((...e) => k(h) && k(h)(...e), ["stop"])
|
|
1828
|
-
}, [u.value?.icon ? (f(), D(
|
|
1983
|
+
}, [u.value?.icon ? (f(), D(ar, {
|
|
1829
1984
|
key: 0,
|
|
1830
1985
|
icon: u.value.icon,
|
|
1831
1986
|
size: 16
|
|
1832
|
-
}, null, 8, ["icon"])) : N("", !0), O(" " + p(u.value?.dataSource?.label || k(i).customBlocks.dataSource.fetchButton), 1)]))])) : N("", !0)])) : (f(), x("div",
|
|
1987
|
+
}, null, 8, ["icon"])) : N("", !0), O(" " + p(u.value?.dataSource?.label || k(i).customBlocks.dataSource.fetchButton), 1)]))])) : N("", !0)])) : (f(), x("div", Dr, [w(k($n), {
|
|
1833
1988
|
size: 24,
|
|
1834
1989
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
1835
|
-
}), b("span",
|
|
1990
|
+
}), b("span", Or, p(k(i).customBlocks.definitionNotFound), 1)]))]));
|
|
1836
1991
|
}
|
|
1837
|
-
}),
|
|
1992
|
+
}), Fr = { class: "tpl:w-full" }, Ir = /* @__PURE__ */ y({
|
|
1838
1993
|
__name: "DividerBlock",
|
|
1839
1994
|
props: {
|
|
1840
1995
|
block: {},
|
|
@@ -1846,28 +2001,28 @@ var xr = { class: "tpl:w-full" }, Sr = {
|
|
|
1846
2001
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
1847
2002
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1848
2003
|
}));
|
|
1849
|
-
return (e, t) => (f(), x("div",
|
|
2004
|
+
return (e, t) => (f(), x("div", Fr, [b("hr", {
|
|
1850
2005
|
class: "tpl:m-0 tpl:border-none",
|
|
1851
2006
|
style: i(n.value)
|
|
1852
2007
|
}, null, 4)]));
|
|
1853
2008
|
}
|
|
1854
|
-
}),
|
|
2009
|
+
}), Lr = { class: "tpl:w-full" }, Rr = ["srcdoc", "title"], zr = {
|
|
1855
2010
|
key: 1,
|
|
1856
2011
|
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)]"
|
|
1857
|
-
},
|
|
2012
|
+
}, Br = {
|
|
1858
2013
|
key: 0,
|
|
1859
2014
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1860
|
-
},
|
|
2015
|
+
}, Vr = {
|
|
1861
2016
|
key: 1,
|
|
1862
2017
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1863
|
-
},
|
|
2018
|
+
}, Hr = /* @__PURE__ */ y({
|
|
1864
2019
|
__name: "HtmlBlock",
|
|
1865
2020
|
props: {
|
|
1866
2021
|
block: {},
|
|
1867
2022
|
viewport: {}
|
|
1868
2023
|
},
|
|
1869
2024
|
setup(e) {
|
|
1870
|
-
let t = e, { t: n } =
|
|
2025
|
+
let t = e, { t: n } = It(), r = P(Pt, !1), a = M(() => t.block.content.trim().length > 0), o = M(() => r && a.value), s = _(null), l = _(60), u = null;
|
|
1871
2026
|
function d() {
|
|
1872
2027
|
let e = s.value?.contentDocument;
|
|
1873
2028
|
e && (l.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
@@ -1881,7 +2036,7 @@ var xr = { class: "tpl:w-full" }, Sr = {
|
|
|
1881
2036
|
e || (u?.disconnect(), u = null);
|
|
1882
2037
|
}), h(() => {
|
|
1883
2038
|
u?.disconnect(), u = null;
|
|
1884
|
-
}), (t, r) => (f(), x("div",
|
|
2039
|
+
}), (t, r) => (f(), x("div", Lr, [o.value ? (f(), x("iframe", {
|
|
1885
2040
|
key: 0,
|
|
1886
2041
|
ref_key: "iframeRef",
|
|
1887
2042
|
ref: s,
|
|
@@ -1891,18 +2046,18 @@ var xr = { class: "tpl:w-full" }, Sr = {
|
|
|
1891
2046
|
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1892
2047
|
style: i({ height: `${l.value}px` }),
|
|
1893
2048
|
onLoad: m
|
|
1894
|
-
}, null, 44,
|
|
2049
|
+
}, null, 44, Rr)) : (f(), x("div", zr, [w(k(Kn), {
|
|
1895
2050
|
size: 24,
|
|
1896
2051
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1897
|
-
}), a.value ? (f(), x("span",
|
|
2052
|
+
}), a.value ? (f(), x("span", Br, p(k(n).html.preview), 1)) : (f(), x("span", Vr, p(k(n).html.empty), 1))]))]));
|
|
1898
2053
|
}
|
|
1899
|
-
}),
|
|
1900
|
-
function
|
|
1901
|
-
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || S(r), { isOverDropZone: a } =
|
|
2054
|
+
}), Ur = "image/";
|
|
2055
|
+
function Wr(e) {
|
|
2056
|
+
let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || S(r), { isOverDropZone: a } = Je(t, {
|
|
1902
2057
|
preventDefaultForUnhandled: !0,
|
|
1903
2058
|
onDrop: (e) => {
|
|
1904
2059
|
if (!i()) return;
|
|
1905
|
-
let t = (e ?? []).filter((e) => e.type.startsWith(
|
|
2060
|
+
let t = (e ?? []).filter((e) => e.type.startsWith(Ur));
|
|
1906
2061
|
t.length > 0 && n([t[0]]);
|
|
1907
2062
|
}
|
|
1908
2063
|
});
|
|
@@ -1910,17 +2065,17 @@ function zr(e) {
|
|
|
1910
2065
|
}
|
|
1911
2066
|
//#endregion
|
|
1912
2067
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1913
|
-
var
|
|
2068
|
+
var Gr = {
|
|
1914
2069
|
key: 0,
|
|
1915
2070
|
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)]",
|
|
1916
2071
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
|
|
1917
|
-
},
|
|
2072
|
+
}, Kr = ["href"], qr = ["src", "alt"], Jr = ["src", "alt"], Yr = {
|
|
1918
2073
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1919
2074
|
style: { opacity: "0.7" }
|
|
1920
|
-
},
|
|
2075
|
+
}, Xr = ["href"], Zr = ["src", "alt"], Qr = ["src", "alt"], $r = {
|
|
1921
2076
|
key: 4,
|
|
1922
2077
|
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)]"
|
|
1923
|
-
},
|
|
2078
|
+
}, ei = ["aria-label"], ti = { key: 1 }, ni = /* @__PURE__ */ y({
|
|
1924
2079
|
__name: "ImageBlock",
|
|
1925
2080
|
props: {
|
|
1926
2081
|
block: {},
|
|
@@ -1928,7 +2083,7 @@ var Br = {
|
|
|
1928
2083
|
},
|
|
1929
2084
|
emits: ["update"],
|
|
1930
2085
|
setup(e, { emit: t }) {
|
|
1931
|
-
let n = e, r = t, { t: a } =
|
|
2086
|
+
let n = e, r = t, { t: a } = It(), { syntax: o } = Ut(), s = P(nt, null), c = M(() => !!s), l = Wt();
|
|
1932
2087
|
async function u() {
|
|
1933
2088
|
let e = await s?.({ accept: ["images"] });
|
|
1934
2089
|
if (l.alive && e) {
|
|
@@ -1955,7 +2110,7 @@ var Br = {
|
|
|
1955
2110
|
}
|
|
1956
2111
|
}
|
|
1957
2112
|
}
|
|
1958
|
-
let { isOver: v } =
|
|
2113
|
+
let { isOver: v } = Wr({
|
|
1959
2114
|
target: d,
|
|
1960
2115
|
enabled: h,
|
|
1961
2116
|
onFiles: g
|
|
@@ -1968,14 +2123,14 @@ var Br = {
|
|
|
1968
2123
|
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1969
2124
|
marginRight: e === "center" ? "auto" : void 0
|
|
1970
2125
|
};
|
|
1971
|
-
}), C = M(() => Ce(n.block.src, o)), T =
|
|
2126
|
+
}), C = M(() => Ce(n.block.src, o)), T = fn(() => C.value ? void 0 : n.block.src), E = fn(() => C.value ? n.block.placeholderUrl : void 0);
|
|
1972
2127
|
return (t, n) => (f(), x("div", {
|
|
1973
2128
|
ref_key: "dropZoneRef",
|
|
1974
2129
|
ref: d,
|
|
1975
2130
|
"data-testid": "image-drop-zone",
|
|
1976
2131
|
class: "tpl:relative tpl:w-full",
|
|
1977
2132
|
style: i(y.value)
|
|
1978
|
-
}, [h.value && (k(v) || m.value) ? (f(), x("div",
|
|
2133
|
+
}, [h.value && (k(v) || m.value) ? (f(), x("div", Gr, [m.value ? (f(), x(j, { key: 0 }, [w(k(Lt), {
|
|
1979
2134
|
class: "tpl-spinner",
|
|
1980
2135
|
size: 20,
|
|
1981
2136
|
"stroke-width": 2
|
|
@@ -1994,22 +2149,22 @@ var Br = {
|
|
|
1994
2149
|
src: k(E),
|
|
1995
2150
|
alt: e.block.alt || k(a).image.altTextPlaceholder,
|
|
1996
2151
|
style: i(S.value)
|
|
1997
|
-
}, null, 12,
|
|
2152
|
+
}, null, 12, qr)], 8, Kr)) : (f(), x("img", {
|
|
1998
2153
|
key: 1,
|
|
1999
2154
|
class: "tpl:border-0",
|
|
2000
2155
|
src: k(E),
|
|
2001
2156
|
alt: e.block.alt,
|
|
2002
2157
|
style: i(S.value)
|
|
2003
|
-
}, null, 12,
|
|
2158
|
+
}, null, 12, Jr))], 64)) : e.block.src && C.value ? (f(), x("div", {
|
|
2004
2159
|
key: 2,
|
|
2005
2160
|
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)]",
|
|
2006
2161
|
style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, S.value])
|
|
2007
|
-
}, [w(k(
|
|
2162
|
+
}, [w(k(Zn), {
|
|
2008
2163
|
size: 32,
|
|
2009
2164
|
"stroke-width": 1.5,
|
|
2010
2165
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2011
2166
|
style: { opacity: "0.5" }
|
|
2012
|
-
}), b("span",
|
|
2167
|
+
}), b("span", Yr, [w(Bn, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (f(), x(j, { key: 3 }, [e.block.linkUrl ? (f(), x("a", {
|
|
2013
2168
|
key: 0,
|
|
2014
2169
|
href: e.block.linkUrl,
|
|
2015
2170
|
target: "_blank",
|
|
@@ -2021,33 +2176,33 @@ var Br = {
|
|
|
2021
2176
|
src: k(T),
|
|
2022
2177
|
alt: e.block.alt || k(a).image.altTextPlaceholder,
|
|
2023
2178
|
style: i(S.value)
|
|
2024
|
-
}, null, 12,
|
|
2179
|
+
}, null, 12, Zr)], 8, Xr)) : (f(), x("img", {
|
|
2025
2180
|
key: 1,
|
|
2026
2181
|
class: "tpl:border-0",
|
|
2027
2182
|
src: k(T),
|
|
2028
2183
|
alt: e.block.alt,
|
|
2029
2184
|
style: i(S.value)
|
|
2030
|
-
}, null, 12,
|
|
2185
|
+
}, null, 12, Qr))], 64)) : (f(), x("div", $r, [c.value ? (f(), x("button", {
|
|
2031
2186
|
key: 0,
|
|
2032
2187
|
"aria-label": k(a).image.browseMedia,
|
|
2033
2188
|
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:duration-150 tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
2034
2189
|
onClick: F(u, ["stop"])
|
|
2035
|
-
}, [w(k(
|
|
2190
|
+
}, [w(k(Zn), {
|
|
2036
2191
|
size: 14,
|
|
2037
2192
|
"stroke-width": 1.5
|
|
2038
|
-
}), O(" " + p(k(a).image.browseMedia), 1)], 8,
|
|
2193
|
+
}), O(" " + p(k(a).image.browseMedia), 1)], 8, ei)) : (f(), x("span", ti, p(k(a).image.clickToAdd), 1))]))], 4));
|
|
2039
2194
|
}
|
|
2040
|
-
}),
|
|
2195
|
+
}), ri = { class: "tpl:w-full" }, ii = ["href"], ai = {
|
|
2041
2196
|
key: 1,
|
|
2042
2197
|
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)]"
|
|
2043
|
-
},
|
|
2198
|
+
}, oi = /* @__PURE__ */ y({
|
|
2044
2199
|
__name: "MenuBlock",
|
|
2045
2200
|
props: {
|
|
2046
2201
|
block: {},
|
|
2047
2202
|
viewport: {}
|
|
2048
2203
|
},
|
|
2049
2204
|
setup(e) {
|
|
2050
|
-
let n = e, { t: r } =
|
|
2205
|
+
let n = e, { t: r } = It(), a = M(() => ({
|
|
2051
2206
|
display: "flex",
|
|
2052
2207
|
flexWrap: "wrap",
|
|
2053
2208
|
gap: `0 ${n.block.spacing}px`,
|
|
@@ -2059,7 +2214,7 @@ var Br = {
|
|
|
2059
2214
|
function s(e) {
|
|
2060
2215
|
return e || n.block.linkColor || n.block.color;
|
|
2061
2216
|
}
|
|
2062
|
-
return (n, c) => (f(), x("div",
|
|
2217
|
+
return (n, c) => (f(), x("div", ri, [o.value ? (f(), x("div", {
|
|
2063
2218
|
key: 0,
|
|
2064
2219
|
style: i(a.value)
|
|
2065
2220
|
}, [(f(!0), x(j, null, t(e.block.items, (t, n) => (f(), x(j, { key: t.id }, [b("a", {
|
|
@@ -2071,15 +2226,15 @@ var Br = {
|
|
|
2071
2226
|
textDecoration: t.underline ? "underline" : "none"
|
|
2072
2227
|
}),
|
|
2073
2228
|
onClick: c[0] ||= F(() => {}, ["prevent"])
|
|
2074
|
-
}, [w(
|
|
2229
|
+
}, [w(Bn, { text: t.text || "..." }, null, 8, ["text"])], 12, ii), n < e.block.items.length - 1 ? (f(), x("span", {
|
|
2075
2230
|
key: 0,
|
|
2076
2231
|
style: i({
|
|
2077
2232
|
color: e.block.separatorColor,
|
|
2078
2233
|
padding: `0 ${e.block.spacing}px`
|
|
2079
2234
|
})
|
|
2080
|
-
}, p(e.block.separator), 5)) : N("", !0)], 64))), 128))], 4)) : (f(), x("div",
|
|
2235
|
+
}, p(e.block.separator), 5)) : N("", !0)], 64))), 128))], 4)) : (f(), x("div", ai, [w(k(Qn), { size: 16 }), b("span", null, p(k(r).menu.addLinks), 1)]))]));
|
|
2081
2236
|
}
|
|
2082
|
-
}),
|
|
2237
|
+
}), si = /* @__PURE__ */ new Set([
|
|
2083
2238
|
"http",
|
|
2084
2239
|
"https",
|
|
2085
2240
|
"mailto",
|
|
@@ -2089,7 +2244,7 @@ var Br = {
|
|
|
2089
2244
|
"sms",
|
|
2090
2245
|
"xmpp",
|
|
2091
2246
|
"cid"
|
|
2092
|
-
]),
|
|
2247
|
+
]), ci = /* @__PURE__ */ new Set([
|
|
2093
2248
|
"SCRIPT",
|
|
2094
2249
|
"STYLE",
|
|
2095
2250
|
"IFRAME",
|
|
@@ -2099,7 +2254,7 @@ var Br = {
|
|
|
2099
2254
|
"META",
|
|
2100
2255
|
"BASE",
|
|
2101
2256
|
"FORM"
|
|
2102
|
-
]),
|
|
2257
|
+
]), li = /* @__PURE__ */ new Set([
|
|
2103
2258
|
"href",
|
|
2104
2259
|
"xlink:href",
|
|
2105
2260
|
"formaction",
|
|
@@ -2108,16 +2263,16 @@ var Br = {
|
|
|
2108
2263
|
"background",
|
|
2109
2264
|
"poster"
|
|
2110
2265
|
]);
|
|
2111
|
-
function
|
|
2266
|
+
function ui(e, t) {
|
|
2112
2267
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
2113
2268
|
if (!n || n.startsWith("#")) return !0;
|
|
2114
2269
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
2115
2270
|
if (!r) return !0;
|
|
2116
2271
|
let i = r[1].toLowerCase();
|
|
2117
|
-
return
|
|
2272
|
+
return si.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
2118
2273
|
}
|
|
2119
|
-
function
|
|
2120
|
-
if (
|
|
2274
|
+
function di(e) {
|
|
2275
|
+
if (ci.has(e.tagName)) {
|
|
2121
2276
|
e.remove();
|
|
2122
2277
|
return;
|
|
2123
2278
|
}
|
|
@@ -2129,29 +2284,29 @@ function oi(e) {
|
|
|
2129
2284
|
e.removeAttribute(n);
|
|
2130
2285
|
continue;
|
|
2131
2286
|
}
|
|
2132
|
-
if (
|
|
2133
|
-
|
|
2287
|
+
if (li.has(t)) {
|
|
2288
|
+
ui(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
2134
2289
|
continue;
|
|
2135
2290
|
}
|
|
2136
2291
|
if (t === "src") {
|
|
2137
|
-
|
|
2292
|
+
ui(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
2138
2293
|
continue;
|
|
2139
2294
|
}
|
|
2140
2295
|
t === "srcdoc" && e.removeAttribute(n);
|
|
2141
2296
|
}
|
|
2142
2297
|
let n = Array.from(e.children);
|
|
2143
|
-
for (let e of n)
|
|
2298
|
+
for (let e of n) di(e);
|
|
2144
2299
|
}
|
|
2145
|
-
function
|
|
2300
|
+
function fi(e) {
|
|
2146
2301
|
if (typeof DOMParser > "u") return e;
|
|
2147
2302
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
2148
|
-
for (let e of n)
|
|
2303
|
+
for (let e of n) di(e);
|
|
2149
2304
|
return t.innerHTML;
|
|
2150
2305
|
}
|
|
2151
2306
|
//#endregion
|
|
2152
2307
|
//#region src/composables/useEditableTextBlock.ts
|
|
2153
|
-
function
|
|
2154
|
-
let t = P(
|
|
2308
|
+
function pi(e) {
|
|
2309
|
+
let t = P(mt, []), { syntax: n } = Ut(), r = M(() => fi(ge(_e(e(), t), n))), i = _(!1), a = _(null), { top: o, left: s } = Ze(a), { toLocal: c } = et(), l = M(() => c({
|
|
2155
2310
|
top: o.value - 8,
|
|
2156
2311
|
left: s.value
|
|
2157
2312
|
}));
|
|
@@ -2172,14 +2327,14 @@ function ci(e) {
|
|
|
2172
2327
|
}
|
|
2173
2328
|
//#endregion
|
|
2174
2329
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2175
|
-
var
|
|
2330
|
+
var mi = ["innerHTML"], hi = /* @__PURE__ */ y({
|
|
2176
2331
|
__name: "ParagraphBlock",
|
|
2177
2332
|
props: {
|
|
2178
2333
|
block: {},
|
|
2179
2334
|
viewport: {}
|
|
2180
2335
|
},
|
|
2181
2336
|
setup(e) {
|
|
2182
|
-
let t = e, n = C(() => import("./ParagraphEditor
|
|
2337
|
+
let t = e, n = C(() => import("./ParagraphEditor--_zWfxps.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = pi(() => t.block.content);
|
|
2183
2338
|
return (t, l) => (f(), x("div", {
|
|
2184
2339
|
ref_key: "blockRef",
|
|
2185
2340
|
ref: i,
|
|
@@ -2198,56 +2353,66 @@ var li = ["innerHTML"], ui = /* @__PURE__ */ y({
|
|
|
2198
2353
|
key: 1,
|
|
2199
2354
|
class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
|
|
2200
2355
|
innerHTML: k(o)
|
|
2201
|
-
}, null, 8,
|
|
2356
|
+
}, null, 8, mi))], 544));
|
|
2202
2357
|
}
|
|
2203
2358
|
});
|
|
2204
2359
|
//#endregion
|
|
2205
2360
|
//#region src/utils/blockComponentResolver.ts
|
|
2206
|
-
function
|
|
2361
|
+
function gi(e) {
|
|
2362
|
+
let t = { fontFamily: e.fontFamily };
|
|
2363
|
+
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;
|
|
2364
|
+
}
|
|
2365
|
+
function _i(e, t, n) {
|
|
2207
2366
|
if (t) {
|
|
2208
2367
|
let n = t.getComponent(e);
|
|
2209
2368
|
if (n) return n;
|
|
2210
2369
|
}
|
|
2211
2370
|
return n[e.type] ?? null;
|
|
2212
2371
|
}
|
|
2213
|
-
function
|
|
2372
|
+
function vi(e) {
|
|
2214
2373
|
let { padding: t, backgroundColor: n } = e.styles, r = {
|
|
2215
2374
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
2216
2375
|
backgroundColor: n || "transparent"
|
|
2217
2376
|
};
|
|
2218
2377
|
return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
|
|
2219
2378
|
}
|
|
2220
|
-
function
|
|
2379
|
+
function yi(e) {
|
|
2221
2380
|
if (e.type !== "section" || !e.wrapper) return null;
|
|
2222
2381
|
let t = e.wrapper, n = {};
|
|
2223
2382
|
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;
|
|
2224
2383
|
}
|
|
2225
2384
|
//#endregion
|
|
2226
2385
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
2227
|
-
var
|
|
2386
|
+
var bi = [
|
|
2387
|
+
"data-block-id",
|
|
2388
|
+
"data-block-type",
|
|
2389
|
+
"data-tpl-picked"
|
|
2390
|
+
], xi = ["aria-label"], Si = [
|
|
2228
2391
|
"aria-label",
|
|
2229
2392
|
"aria-pressed",
|
|
2230
2393
|
"title"
|
|
2231
|
-
],
|
|
2394
|
+
], Ci = ["aria-label", "title"], wi = ["aria-label", "title"], Ti = ["aria-label", "title"], Ei = {
|
|
2232
2395
|
key: 1,
|
|
2233
2396
|
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"
|
|
2234
|
-
},
|
|
2397
|
+
}, Di = { 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)]" }, Oi = {
|
|
2235
2398
|
key: 2,
|
|
2236
2399
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
2237
|
-
},
|
|
2400
|
+
}, ki = ["aria-label", "title"], Ai = {
|
|
2238
2401
|
key: 3,
|
|
2239
2402
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
2240
|
-
},
|
|
2403
|
+
}, ji = ["aria-label"], Mi = /*#__PURE__*/ Ht(/* @__PURE__ */ y({
|
|
2241
2404
|
__name: "BlockWrapper",
|
|
2242
2405
|
props: {
|
|
2243
2406
|
block: {},
|
|
2244
2407
|
isSelected: { type: Boolean },
|
|
2245
2408
|
viewport: {},
|
|
2246
|
-
previewMode: { type: Boolean }
|
|
2409
|
+
previewMode: { type: Boolean },
|
|
2410
|
+
nested: { type: Boolean },
|
|
2411
|
+
picked: { type: Boolean }
|
|
2247
2412
|
},
|
|
2248
2413
|
emits: ["select"],
|
|
2249
2414
|
setup(e, { emit: t }) {
|
|
2250
|
-
let n = C(() => import("./BlockIssueBadge-
|
|
2415
|
+
let n = C(() => import("./BlockIssueBadge-Dmj9rVra.js")), r = e, a = t, { t: s, format: c } = It(), l = P(Nt, null), u = _(null), d = M(() => l?.liftedBlockId.value === r.block.id), m = M(() => d.value ? c(s.blockActions.dragLifted, { block: r.block.type }) : s.blockActions.drag);
|
|
2251
2416
|
async function h() {
|
|
2252
2417
|
await re(), u.value?.focus();
|
|
2253
2418
|
}
|
|
@@ -2273,45 +2438,47 @@ var mi = ["data-block-id", "data-block-type"], hi = ["aria-label"], gi = [
|
|
|
2273
2438
|
let v = M(() => !r.viewport || !r.block.visibility ? !1 : r.block.visibility[r.viewport] === !1), y = M(() => r.previewMode === !0 && v.value), S = M(() => r.viewport ? {
|
|
2274
2439
|
desktop: s.viewport.desktop,
|
|
2275
2440
|
mobile: s.viewport.mobile
|
|
2276
|
-
}[r.viewport] ?? r.viewport : ""), E = M(() => !!r.block.displayCondition), D = P(
|
|
2277
|
-
let e =
|
|
2441
|
+
}[r.viewport] ?? r.viewport : ""), E = M(() => !!r.block.displayCondition), D = P(St, null), A = P(vt, null), j = P(At, {}), ee = M(() => j.savedBlocks?.isPicking.value === !0), te = M(() => !r.nested && j.savedBlocks?.isAvailable.value === !0 && j.savedBlocks?.canCreate.value === !0), ne = M(() => r.isSelected && !ee.value), ie = M(() => j.comments?.getBlockCount(r.block.id) ?? 0), ae = M(() => {
|
|
2442
|
+
let e = vi(r.block), t = {
|
|
2278
2443
|
padding: e.padding,
|
|
2279
2444
|
backgroundColor: e.backgroundColor
|
|
2280
2445
|
};
|
|
2281
2446
|
return e.borderRadius && (t.borderRadius = e.borderRadius), t;
|
|
2282
|
-
}),
|
|
2283
|
-
function
|
|
2447
|
+
}), oe = M(() => yi(r.block));
|
|
2448
|
+
function se(e) {
|
|
2284
2449
|
r.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), a("select"));
|
|
2285
2450
|
}
|
|
2286
|
-
function
|
|
2451
|
+
function ce() {
|
|
2287
2452
|
D?.deleteBlock(r.block.id);
|
|
2288
2453
|
}
|
|
2289
|
-
function
|
|
2454
|
+
function le() {
|
|
2290
2455
|
D?.duplicateBlock(r.block);
|
|
2291
2456
|
}
|
|
2292
|
-
function
|
|
2293
|
-
j.
|
|
2457
|
+
function ue() {
|
|
2458
|
+
j.savedBlocks?.startPicking(r.block.id);
|
|
2294
2459
|
}
|
|
2295
|
-
function
|
|
2460
|
+
function de() {
|
|
2296
2461
|
A?.toggleBlock(r.block.id);
|
|
2297
2462
|
}
|
|
2298
2463
|
return (t, r) => y.value ? N("", !0) : (f(), x("div", {
|
|
2299
2464
|
key: 0,
|
|
2300
2465
|
class: o(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
|
|
2301
2466
|
"tpl-block--selected": e.isSelected,
|
|
2302
|
-
"tpl-block--
|
|
2467
|
+
"tpl-block--picked": e.picked,
|
|
2468
|
+
"tpl-block--idle": !e.isSelected && !e.picked,
|
|
2303
2469
|
"tpl-block--lifted": d.value
|
|
2304
2470
|
}]),
|
|
2305
2471
|
"data-block-id": e.block.id,
|
|
2306
2472
|
"data-block-type": e.block.type,
|
|
2307
|
-
|
|
2473
|
+
"data-tpl-picked": e.picked || void 0,
|
|
2474
|
+
onClick: se
|
|
2308
2475
|
}, [
|
|
2309
2476
|
w(k(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
2310
|
-
|
|
2477
|
+
ne.value ? (f(), x("div", {
|
|
2311
2478
|
key: 0,
|
|
2312
2479
|
role: "toolbar",
|
|
2313
2480
|
"aria-label": k(s).blockActions.drag,
|
|
2314
|
-
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
2481
|
+
class: "tpl-block-actions tpl-fade-in tpl:absolute tpl:-right-2 tpl:top-1/2 tpl:z-10 tpl:flex tpl:-translate-y-1/2 tpl:translate-x-full tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:shadow-[var(--tpl-shadow-md)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
2315
2482
|
}, [
|
|
2316
2483
|
b("button", {
|
|
2317
2484
|
ref_key: "dragButtonRef",
|
|
@@ -2322,97 +2489,97 @@ var mi = ["data-block-id", "data-block-type"], hi = ["aria-label"], gi = [
|
|
|
2322
2489
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
2323
2490
|
title: k(s).blockActions.drag,
|
|
2324
2491
|
onKeydown: g
|
|
2325
|
-
}, [w(k(
|
|
2492
|
+
}, [w(k(Xn), {
|
|
2326
2493
|
size: 14,
|
|
2327
2494
|
"stroke-width": 1.5
|
|
2328
|
-
})], 40,
|
|
2495
|
+
})], 40, Si),
|
|
2329
2496
|
b("button", {
|
|
2330
2497
|
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 tpl:duration-150",
|
|
2331
2498
|
"aria-label": k(s).blockActions.duplicate,
|
|
2332
2499
|
title: k(s).blockActions.duplicate,
|
|
2333
|
-
onClick: F(
|
|
2334
|
-
}, [w(k(
|
|
2500
|
+
onClick: F(le, ["stop"])
|
|
2501
|
+
}, [w(k(qn), {
|
|
2335
2502
|
size: 14,
|
|
2336
2503
|
"stroke-width": 1.5
|
|
2337
|
-
})], 8,
|
|
2338
|
-
|
|
2504
|
+
})], 8, Ci),
|
|
2505
|
+
te.value ? (f(), x("button", {
|
|
2339
2506
|
key: 0,
|
|
2340
2507
|
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 tpl:duration-150",
|
|
2341
|
-
"aria-label": k(s).blockActions.
|
|
2342
|
-
title: k(s).blockActions.
|
|
2343
|
-
onClick: F(
|
|
2344
|
-
}, [w(k(
|
|
2508
|
+
"aria-label": k(s).blockActions.saveAsBlock,
|
|
2509
|
+
title: k(s).blockActions.saveAsBlock,
|
|
2510
|
+
onClick: F(ue, ["stop"])
|
|
2511
|
+
}, [w(k(Wn), {
|
|
2345
2512
|
size: 14,
|
|
2346
2513
|
"stroke-width": 1.5
|
|
2347
|
-
})], 8,
|
|
2514
|
+
})], 8, wi)) : N("", !0),
|
|
2348
2515
|
b("button", {
|
|
2349
2516
|
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 tpl:duration-150",
|
|
2350
2517
|
"aria-label": k(s).blockActions.delete,
|
|
2351
2518
|
title: k(s).blockActions.delete,
|
|
2352
|
-
onClick: F(
|
|
2353
|
-
}, [w(k(
|
|
2519
|
+
onClick: F(ce, ["stop"])
|
|
2520
|
+
}, [w(k(zt), {
|
|
2354
2521
|
size: 14,
|
|
2355
2522
|
"stroke-width": 1.5
|
|
2356
|
-
})], 8,
|
|
2357
|
-
], 8,
|
|
2358
|
-
v.value ? (f(), x("div",
|
|
2523
|
+
})], 8, Ti)
|
|
2524
|
+
], 8, xi)) : N("", !0),
|
|
2525
|
+
v.value ? (f(), x("div", Ei, [b("span", Di, [w(k(Jn), {
|
|
2359
2526
|
size: 12,
|
|
2360
2527
|
"stroke-width": 1.5
|
|
2361
2528
|
}), O(" " + p(k(c)(k(s).blockActions.hiddenOnViewport, { viewport: S.value })), 1)])])) : N("", !0),
|
|
2362
|
-
E.value && !v.value ? (f(), x("div",
|
|
2363
|
-
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:duration-150 tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
2529
|
+
E.value && !v.value ? (f(), x("div", Oi, [b("button", {
|
|
2530
|
+
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:duration-150 tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
2364
2531
|
"aria-label": k(s).blockActions.conditionToggle,
|
|
2365
2532
|
title: e.block.displayCondition?.label,
|
|
2366
|
-
onClick: F(
|
|
2367
|
-
}, [w(k(
|
|
2533
|
+
onClick: F(de, ["stop"])
|
|
2534
|
+
}, [w(k(Yn), {
|
|
2368
2535
|
size: 12,
|
|
2369
2536
|
"stroke-width": 2
|
|
2370
|
-
})], 8,
|
|
2371
|
-
|
|
2372
|
-
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:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
2373
|
-
"aria-label": k(c)(k(s).blockActions.comments, { count: String(
|
|
2537
|
+
})], 8, ki)])) : N("", !0),
|
|
2538
|
+
ie.value > 0 && !v.value ? (f(), x("div", Ai, [b("button", {
|
|
2539
|
+
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:duration-150 tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
2540
|
+
"aria-label": k(c)(k(s).blockActions.comments, { count: String(ie.value) }),
|
|
2374
2541
|
onClick: r[0] ||= F((t) => k(j).comments?.openForBlock(e.block.id), ["stop"])
|
|
2375
|
-
}, [w(k(
|
|
2542
|
+
}, [w(k(Rt), {
|
|
2376
2543
|
size: 12,
|
|
2377
2544
|
"stroke-width": 2.5
|
|
2378
|
-
}), O(" " + p(
|
|
2379
|
-
|
|
2545
|
+
}), O(" " + p(ie.value), 1)], 8, ji)])) : N("", !0),
|
|
2546
|
+
oe.value ? (f(), x("div", {
|
|
2380
2547
|
key: 4,
|
|
2381
2548
|
class: "tpl-section-wrapper",
|
|
2382
|
-
style: i(
|
|
2549
|
+
style: i(oe.value)
|
|
2383
2550
|
}, [b("div", {
|
|
2384
2551
|
class: "tpl-block-content",
|
|
2385
|
-
style: i(
|
|
2552
|
+
style: i(ae.value)
|
|
2386
2553
|
}, [T(t.$slots, "default", {}, void 0, !0)], 4)], 4)) : (f(), x("div", {
|
|
2387
2554
|
key: 5,
|
|
2388
2555
|
class: "tpl-block-content",
|
|
2389
|
-
style: i(
|
|
2556
|
+
style: i(ae.value)
|
|
2390
2557
|
}, [T(t.$slots, "default", {}, void 0, !0)], 4))
|
|
2391
|
-
], 10,
|
|
2558
|
+
], 10, bi));
|
|
2392
2559
|
}
|
|
2393
|
-
}), [["__scopeId", "data-v-
|
|
2560
|
+
}), [["__scopeId", "data-v-43c10a08"]]);
|
|
2394
2561
|
//#endregion
|
|
2395
2562
|
//#region src/utils/unwrapParagraph.ts
|
|
2396
|
-
function
|
|
2563
|
+
function Ni(e) {
|
|
2397
2564
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
2398
2565
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
2399
2566
|
}
|
|
2400
2567
|
//#endregion
|
|
2401
2568
|
//#region src/components/blocks/TitleBlock.vue
|
|
2402
|
-
var
|
|
2569
|
+
var Pi = /* @__PURE__ */ y({
|
|
2403
2570
|
__name: "TitleBlock",
|
|
2404
2571
|
props: {
|
|
2405
2572
|
block: {},
|
|
2406
2573
|
viewport: {}
|
|
2407
2574
|
},
|
|
2408
2575
|
setup(e) {
|
|
2409
|
-
let t = e, n = C(() => import("./TitleEditor-
|
|
2576
|
+
let t = e, n = C(() => import("./TitleEditor-CPda5lh-.js")), { isEditing: r, blockRef: a, toolbarPosition: o, resolvedContent: s, handleDoubleClick: c, handleEditorDone: l } = pi(() => t.block.content), u = M(() => {
|
|
2410
2577
|
let e = {
|
|
2411
|
-
fontSize: `${
|
|
2578
|
+
fontSize: `${Ie[t.block.level]}px`,
|
|
2412
2579
|
textAlign: t.block.textAlign
|
|
2413
2580
|
};
|
|
2414
2581
|
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
2415
|
-
}), p = M(() => `h${t.block.level}`), m = M(() =>
|
|
2582
|
+
}), p = M(() => `h${t.block.level}`), m = M(() => Ni(s.value));
|
|
2416
2583
|
return (t, s) => (f(), x("div", {
|
|
2417
2584
|
ref_key: "blockRef",
|
|
2418
2585
|
ref: a,
|
|
@@ -2438,88 +2605,88 @@ var Oi = /* @__PURE__ */ y({
|
|
|
2438
2605
|
});
|
|
2439
2606
|
//#endregion
|
|
2440
2607
|
//#region src/utils/sectionColumnDrop.ts
|
|
2441
|
-
function
|
|
2608
|
+
function Fi(e) {
|
|
2442
2609
|
return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
|
|
2443
2610
|
}
|
|
2444
2611
|
//#endregion
|
|
2445
2612
|
//#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
|
|
2446
|
-
var
|
|
2613
|
+
var Ii = Object.defineProperty, Li = Object.getOwnPropertySymbols, Ri = Object.prototype.hasOwnProperty, zi = Object.prototype.propertyIsEnumerable, Bi = (e, t, n) => t in e ? Ii(e, t, {
|
|
2447
2614
|
enumerable: !0,
|
|
2448
2615
|
configurable: !0,
|
|
2449
2616
|
writable: !0,
|
|
2450
2617
|
value: n
|
|
2451
|
-
}) : e[t] = n,
|
|
2452
|
-
for (var n in t ||= {})
|
|
2453
|
-
if (
|
|
2618
|
+
}) : e[t] = n, Vi = (e, t) => {
|
|
2619
|
+
for (var n in t ||= {}) Ri.call(t, n) && Bi(e, n, t[n]);
|
|
2620
|
+
if (Li) for (var n of Li(t)) zi.call(t, n) && Bi(e, n, t[n]);
|
|
2454
2621
|
return e;
|
|
2455
|
-
},
|
|
2622
|
+
}, Hi = (e, t) => {
|
|
2456
2623
|
var n = {};
|
|
2457
|
-
for (var r in e)
|
|
2458
|
-
if (e != null &&
|
|
2624
|
+
for (var r in e) Ri.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2625
|
+
if (e != null && Li) for (var r of Li(e)) t.indexOf(r) < 0 && zi.call(e, r) && (n[r] = e[r]);
|
|
2459
2626
|
return n;
|
|
2460
|
-
},
|
|
2461
|
-
function
|
|
2462
|
-
console.warn(
|
|
2627
|
+
}, Ui = "[vue-draggable-plus]: ";
|
|
2628
|
+
function Wi(e) {
|
|
2629
|
+
console.warn(Ui + e);
|
|
2463
2630
|
}
|
|
2464
|
-
function
|
|
2465
|
-
console.error(
|
|
2631
|
+
function Gi(e) {
|
|
2632
|
+
console.error(Ui + e);
|
|
2466
2633
|
}
|
|
2467
|
-
function
|
|
2634
|
+
function Ki(e, t, n) {
|
|
2468
2635
|
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2469
2636
|
}
|
|
2470
|
-
function
|
|
2637
|
+
function qi(e) {
|
|
2471
2638
|
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2472
2639
|
}
|
|
2473
|
-
function
|
|
2474
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[
|
|
2640
|
+
function Ji(e) {
|
|
2641
|
+
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[qi(n)] = e[n]), t), {});
|
|
2475
2642
|
}
|
|
2476
|
-
function
|
|
2643
|
+
function Yi(e, t) {
|
|
2477
2644
|
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2478
2645
|
}
|
|
2479
|
-
function
|
|
2646
|
+
function Xi(e, t, n) {
|
|
2480
2647
|
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2481
2648
|
}
|
|
2482
|
-
function
|
|
2649
|
+
function Zi(e) {
|
|
2483
2650
|
return e === void 0;
|
|
2484
2651
|
}
|
|
2485
|
-
function
|
|
2652
|
+
function Qi(e) {
|
|
2486
2653
|
return typeof e == "string";
|
|
2487
2654
|
}
|
|
2488
|
-
function
|
|
2655
|
+
function $i(e, t, n) {
|
|
2489
2656
|
let r = e.children[n];
|
|
2490
2657
|
e.insertBefore(t, r);
|
|
2491
2658
|
}
|
|
2492
|
-
function
|
|
2659
|
+
function ea(e) {
|
|
2493
2660
|
e.parentNode && e.parentNode.removeChild(e);
|
|
2494
2661
|
}
|
|
2495
|
-
function
|
|
2662
|
+
function ta(e, t = document) {
|
|
2496
2663
|
let n = null;
|
|
2497
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n ||
|
|
2664
|
+
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || Wi(`Element not found: ${e}`), n;
|
|
2498
2665
|
}
|
|
2499
|
-
function
|
|
2666
|
+
function na(e, t, n = null) {
|
|
2500
2667
|
return function(...r) {
|
|
2501
2668
|
return e.apply(n, r), t.apply(n, r);
|
|
2502
2669
|
};
|
|
2503
2670
|
}
|
|
2504
|
-
function
|
|
2505
|
-
let n =
|
|
2671
|
+
function ra(e, t) {
|
|
2672
|
+
let n = Vi({}, e);
|
|
2506
2673
|
return Object.keys(t).forEach((r) => {
|
|
2507
|
-
n[r] ? n[r] =
|
|
2674
|
+
n[r] ? n[r] = na(e[r], t[r]) : n[r] = t[r];
|
|
2508
2675
|
}), n;
|
|
2509
2676
|
}
|
|
2510
|
-
function
|
|
2677
|
+
function ia(e) {
|
|
2511
2678
|
return e instanceof HTMLElement;
|
|
2512
2679
|
}
|
|
2513
|
-
function
|
|
2680
|
+
function aa(e, t) {
|
|
2514
2681
|
Object.keys(e).forEach((n) => {
|
|
2515
2682
|
t(n, e[n]);
|
|
2516
2683
|
});
|
|
2517
2684
|
}
|
|
2518
|
-
function
|
|
2685
|
+
function oa(e) {
|
|
2519
2686
|
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2520
2687
|
}
|
|
2521
|
-
var
|
|
2522
|
-
function
|
|
2688
|
+
var sa = Object.assign;
|
|
2689
|
+
function ca(e, t) {
|
|
2523
2690
|
var n = Object.keys(e);
|
|
2524
2691
|
if (Object.getOwnPropertySymbols) {
|
|
2525
2692
|
var r = Object.getOwnPropertySymbols(e);
|
|
@@ -2529,26 +2696,26 @@ function na(e, t) {
|
|
|
2529
2696
|
}
|
|
2530
2697
|
return n;
|
|
2531
2698
|
}
|
|
2532
|
-
function
|
|
2699
|
+
function la(e) {
|
|
2533
2700
|
for (var t = 1; t < arguments.length; t++) {
|
|
2534
2701
|
var n = arguments[t] == null ? {} : arguments[t];
|
|
2535
|
-
t % 2 ?
|
|
2536
|
-
|
|
2537
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2702
|
+
t % 2 ? ca(Object(n), !0).forEach(function(t) {
|
|
2703
|
+
da(e, t, n[t]);
|
|
2704
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : ca(Object(n)).forEach(function(t) {
|
|
2538
2705
|
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2539
2706
|
});
|
|
2540
2707
|
}
|
|
2541
2708
|
return e;
|
|
2542
2709
|
}
|
|
2543
|
-
function
|
|
2710
|
+
function ua(e) {
|
|
2544
2711
|
"@babel/helpers - typeof";
|
|
2545
|
-
return
|
|
2712
|
+
return ua = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2546
2713
|
return typeof e;
|
|
2547
2714
|
} : function(e) {
|
|
2548
2715
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2549
|
-
},
|
|
2716
|
+
}, ua(e);
|
|
2550
2717
|
}
|
|
2551
|
-
function
|
|
2718
|
+
function da(e, t, n) {
|
|
2552
2719
|
return t in e ? Object.defineProperty(e, t, {
|
|
2553
2720
|
value: n,
|
|
2554
2721
|
enumerable: !0,
|
|
@@ -2556,45 +2723,45 @@ function aa(e, t, n) {
|
|
|
2556
2723
|
writable: !0
|
|
2557
2724
|
}) : e[t] = n, e;
|
|
2558
2725
|
}
|
|
2559
|
-
function
|
|
2560
|
-
return
|
|
2726
|
+
function fa() {
|
|
2727
|
+
return fa = Object.assign || function(e) {
|
|
2561
2728
|
for (var t = 1; t < arguments.length; t++) {
|
|
2562
2729
|
var n = arguments[t];
|
|
2563
2730
|
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2564
2731
|
}
|
|
2565
2732
|
return e;
|
|
2566
|
-
},
|
|
2733
|
+
}, fa.apply(this, arguments);
|
|
2567
2734
|
}
|
|
2568
|
-
function
|
|
2735
|
+
function pa(e, t) {
|
|
2569
2736
|
if (e == null) return {};
|
|
2570
2737
|
var n = {}, r = Object.keys(e), i, a;
|
|
2571
2738
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2572
2739
|
return n;
|
|
2573
2740
|
}
|
|
2574
|
-
function
|
|
2741
|
+
function ma(e, t) {
|
|
2575
2742
|
if (e == null) return {};
|
|
2576
|
-
var n =
|
|
2743
|
+
var n = pa(e, t), r, i;
|
|
2577
2744
|
if (Object.getOwnPropertySymbols) {
|
|
2578
2745
|
var a = Object.getOwnPropertySymbols(e);
|
|
2579
2746
|
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2580
2747
|
}
|
|
2581
2748
|
return n;
|
|
2582
2749
|
}
|
|
2583
|
-
var
|
|
2584
|
-
function
|
|
2750
|
+
var ha = "1.15.2";
|
|
2751
|
+
function ga(e) {
|
|
2585
2752
|
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2586
2753
|
}
|
|
2587
|
-
var
|
|
2754
|
+
var _a = ga(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), va = ga(/Edge/i), ya = ga(/firefox/i), ba = ga(/safari/i) && !ga(/chrome/i) && !ga(/android/i), xa = ga(/iP(ad|od|hone)/i), Sa = ga(/chrome/i) && ga(/android/i), Ca = {
|
|
2588
2755
|
capture: !1,
|
|
2589
2756
|
passive: !1
|
|
2590
2757
|
};
|
|
2591
2758
|
function L(e, t, n) {
|
|
2592
|
-
e.addEventListener(t, n, !
|
|
2759
|
+
e.addEventListener(t, n, !_a && Ca);
|
|
2593
2760
|
}
|
|
2594
2761
|
function R(e, t, n) {
|
|
2595
|
-
e.removeEventListener(t, n, !
|
|
2762
|
+
e.removeEventListener(t, n, !_a && Ca);
|
|
2596
2763
|
}
|
|
2597
|
-
function
|
|
2764
|
+
function wa(e, t) {
|
|
2598
2765
|
if (t) {
|
|
2599
2766
|
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2600
2767
|
if (e.matches) return e.matches(t);
|
|
@@ -2606,22 +2773,22 @@ function va(e, t) {
|
|
|
2606
2773
|
return !1;
|
|
2607
2774
|
}
|
|
2608
2775
|
}
|
|
2609
|
-
function
|
|
2776
|
+
function Ta(e) {
|
|
2610
2777
|
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2611
2778
|
}
|
|
2612
|
-
function
|
|
2779
|
+
function Ea(e, t, n, r) {
|
|
2613
2780
|
if (e) {
|
|
2614
2781
|
n ||= document;
|
|
2615
2782
|
do {
|
|
2616
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n &&
|
|
2783
|
+
if (t != null && (t[0] === ">" ? e.parentNode === n && wa(e, t) : wa(e, t)) || r && e === n) return e;
|
|
2617
2784
|
if (e === n) break;
|
|
2618
|
-
} while (e =
|
|
2785
|
+
} while (e = Ta(e));
|
|
2619
2786
|
}
|
|
2620
2787
|
return null;
|
|
2621
2788
|
}
|
|
2622
|
-
var
|
|
2789
|
+
var Da = /\s+/g;
|
|
2623
2790
|
function z(e, t, n) {
|
|
2624
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(
|
|
2791
|
+
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(Da, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(Da, " "));
|
|
2625
2792
|
}
|
|
2626
2793
|
function B(e, t, n) {
|
|
2627
2794
|
var r = e && e.style;
|
|
@@ -2630,7 +2797,7 @@ function B(e, t, n) {
|
|
|
2630
2797
|
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2631
2798
|
}
|
|
2632
2799
|
}
|
|
2633
|
-
function
|
|
2800
|
+
function Oa(e, t) {
|
|
2634
2801
|
var n = "";
|
|
2635
2802
|
if (typeof e == "string") n = e;
|
|
2636
2803
|
else do {
|
|
@@ -2640,7 +2807,7 @@ function Sa(e, t) {
|
|
|
2640
2807
|
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2641
2808
|
return i && new i(n);
|
|
2642
2809
|
}
|
|
2643
|
-
function
|
|
2810
|
+
function ka(e, t, n) {
|
|
2644
2811
|
if (e) {
|
|
2645
2812
|
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2646
2813
|
if (n) for (; i < a; i++) n(r[i], i);
|
|
@@ -2648,13 +2815,13 @@ function Ca(e, t, n) {
|
|
|
2648
2815
|
}
|
|
2649
2816
|
return [];
|
|
2650
2817
|
}
|
|
2651
|
-
function
|
|
2818
|
+
function Aa() {
|
|
2652
2819
|
return document.scrollingElement || document.documentElement;
|
|
2653
2820
|
}
|
|
2654
2821
|
function V(e, t, n, r, i) {
|
|
2655
2822
|
if (!(!e.getBoundingClientRect && e !== window)) {
|
|
2656
2823
|
var a, o, s, c, l, u, d;
|
|
2657
|
-
if (e !== window && e.parentNode && e !==
|
|
2824
|
+
if (e !== window && e.parentNode && e !== Aa() ? (a = e.getBoundingClientRect(), o = a.top, s = a.left, c = a.bottom, l = a.right, u = a.height, d = a.width) : (o = 0, s = 0, c = window.innerHeight, l = window.innerWidth, u = window.innerHeight, d = window.innerWidth), (t || n) && e !== window && (i ||= e.parentNode, !_a)) do
|
|
2658
2825
|
if (i && i.getBoundingClientRect && (B(i, "transform") !== "none" || n && B(i, "position") !== "static")) {
|
|
2659
2826
|
var f = i.getBoundingClientRect();
|
|
2660
2827
|
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;
|
|
@@ -2662,7 +2829,7 @@ function V(e, t, n, r, i) {
|
|
|
2662
2829
|
}
|
|
2663
2830
|
while (i = i.parentNode);
|
|
2664
2831
|
if (r && e !== window) {
|
|
2665
|
-
var p =
|
|
2832
|
+
var p = Oa(i || e), m = p && p.a, h = p && p.d;
|
|
2666
2833
|
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2667
2834
|
}
|
|
2668
2835
|
return {
|
|
@@ -2675,18 +2842,18 @@ function V(e, t, n, r, i) {
|
|
|
2675
2842
|
};
|
|
2676
2843
|
}
|
|
2677
2844
|
}
|
|
2678
|
-
function
|
|
2679
|
-
for (var r =
|
|
2845
|
+
function ja(e, t, n) {
|
|
2846
|
+
for (var r = La(e, !0), i = V(e)[t]; r;) {
|
|
2680
2847
|
var a = V(r)[n], o = void 0;
|
|
2681
2848
|
if (o = i >= a, !o) return r;
|
|
2682
|
-
if (r ===
|
|
2683
|
-
r =
|
|
2849
|
+
if (r === Aa()) break;
|
|
2850
|
+
r = La(r, !1);
|
|
2684
2851
|
}
|
|
2685
2852
|
return !1;
|
|
2686
2853
|
}
|
|
2687
|
-
function
|
|
2854
|
+
function Ma(e, t, n, r) {
|
|
2688
2855
|
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2689
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) &&
|
|
2856
|
+
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Ea(o[a], n.draggable, e, !1)) {
|
|
2690
2857
|
if (i === t) return o[a];
|
|
2691
2858
|
i++;
|
|
2692
2859
|
}
|
|
@@ -2694,84 +2861,84 @@ function Ea(e, t, n, r) {
|
|
|
2694
2861
|
}
|
|
2695
2862
|
return null;
|
|
2696
2863
|
}
|
|
2697
|
-
function
|
|
2698
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || B(n, "display") === "none" || t && !
|
|
2864
|
+
function Na(e, t) {
|
|
2865
|
+
for (var n = e.lastElementChild; n && (n === Q.ghost || B(n, "display") === "none" || t && !wa(n, t));) n = n.previousElementSibling;
|
|
2699
2866
|
return n || null;
|
|
2700
2867
|
}
|
|
2701
|
-
function
|
|
2868
|
+
function Pa(e, t) {
|
|
2702
2869
|
var n = 0;
|
|
2703
2870
|
if (!e || !e.parentNode) return -1;
|
|
2704
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t ||
|
|
2871
|
+
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || wa(e, t)) && n++;
|
|
2705
2872
|
return n;
|
|
2706
2873
|
}
|
|
2707
|
-
function
|
|
2708
|
-
var t = 0, n = 0, r =
|
|
2874
|
+
function Fa(e) {
|
|
2875
|
+
var t = 0, n = 0, r = Aa();
|
|
2709
2876
|
if (e) do {
|
|
2710
|
-
var i =
|
|
2877
|
+
var i = Oa(e), a = i.a, o = i.d;
|
|
2711
2878
|
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2712
2879
|
} while (e !== r && (e = e.parentNode));
|
|
2713
2880
|
return [t, n];
|
|
2714
2881
|
}
|
|
2715
|
-
function
|
|
2882
|
+
function Ia(e, t) {
|
|
2716
2883
|
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2717
2884
|
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2718
2885
|
}
|
|
2719
2886
|
return -1;
|
|
2720
2887
|
}
|
|
2721
|
-
function
|
|
2722
|
-
if (!e || !e.getBoundingClientRect) return
|
|
2888
|
+
function La(e, t) {
|
|
2889
|
+
if (!e || !e.getBoundingClientRect) return Aa();
|
|
2723
2890
|
var n = e, r = !1;
|
|
2724
2891
|
do
|
|
2725
2892
|
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2726
2893
|
var i = B(n);
|
|
2727
2894
|
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2728
|
-
if (!n.getBoundingClientRect || n === document.body) return
|
|
2895
|
+
if (!n.getBoundingClientRect || n === document.body) return Aa();
|
|
2729
2896
|
if (r || t) return n;
|
|
2730
2897
|
r = !0;
|
|
2731
2898
|
}
|
|
2732
2899
|
}
|
|
2733
2900
|
while (n = n.parentNode);
|
|
2734
|
-
return
|
|
2901
|
+
return Aa();
|
|
2735
2902
|
}
|
|
2736
|
-
function
|
|
2903
|
+
function Ra(e, t) {
|
|
2737
2904
|
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2738
2905
|
return e;
|
|
2739
2906
|
}
|
|
2740
|
-
function
|
|
2907
|
+
function za(e, t) {
|
|
2741
2908
|
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);
|
|
2742
2909
|
}
|
|
2743
|
-
var
|
|
2744
|
-
function
|
|
2910
|
+
var Ba;
|
|
2911
|
+
function Va(e, t) {
|
|
2745
2912
|
return function() {
|
|
2746
|
-
if (!
|
|
2913
|
+
if (!Ba) {
|
|
2747
2914
|
var n = arguments, r = this;
|
|
2748
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n),
|
|
2749
|
-
|
|
2915
|
+
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Ba = setTimeout(function() {
|
|
2916
|
+
Ba = void 0;
|
|
2750
2917
|
}, t);
|
|
2751
2918
|
}
|
|
2752
2919
|
};
|
|
2753
2920
|
}
|
|
2754
|
-
function
|
|
2755
|
-
clearTimeout(
|
|
2921
|
+
function Ha() {
|
|
2922
|
+
clearTimeout(Ba), Ba = void 0;
|
|
2756
2923
|
}
|
|
2757
|
-
function
|
|
2924
|
+
function Ua(e, t, n) {
|
|
2758
2925
|
e.scrollLeft += t, e.scrollTop += n;
|
|
2759
2926
|
}
|
|
2760
|
-
function
|
|
2927
|
+
function Wa(e) {
|
|
2761
2928
|
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2762
2929
|
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2763
2930
|
}
|
|
2764
|
-
function
|
|
2931
|
+
function Ga(e, t, n) {
|
|
2765
2932
|
var r = {};
|
|
2766
2933
|
return Array.from(e.children).forEach(function(i) {
|
|
2767
|
-
if (!(!
|
|
2934
|
+
if (!(!Ea(i, t.draggable, e, !1) || i.animated || i === n)) {
|
|
2768
2935
|
var a = V(i);
|
|
2769
2936
|
r.left = Math.min(r.left ?? Infinity, a.left), r.top = Math.min(r.top ?? Infinity, a.top), r.right = Math.max(r.right ?? -Infinity, a.right), r.bottom = Math.max(r.bottom ?? -Infinity, a.bottom);
|
|
2770
2937
|
}
|
|
2771
2938
|
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2772
2939
|
}
|
|
2773
2940
|
var H = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2774
|
-
function
|
|
2941
|
+
function Ka() {
|
|
2775
2942
|
var e = [], t;
|
|
2776
2943
|
return {
|
|
2777
2944
|
captureAnimationState: function() {
|
|
@@ -2781,9 +2948,9 @@ function Ba() {
|
|
|
2781
2948
|
target: t,
|
|
2782
2949
|
rect: V(t)
|
|
2783
2950
|
});
|
|
2784
|
-
var n =
|
|
2951
|
+
var n = la({}, e[e.length - 1].rect);
|
|
2785
2952
|
if (t.thisAnimationDuration) {
|
|
2786
|
-
var r =
|
|
2953
|
+
var r = Oa(t, !0);
|
|
2787
2954
|
r && (n.top -= r.f, n.left -= r.e);
|
|
2788
2955
|
}
|
|
2789
2956
|
t.fromRect = n;
|
|
@@ -2794,7 +2961,7 @@ function Ba() {
|
|
|
2794
2961
|
e.push(t);
|
|
2795
2962
|
},
|
|
2796
2963
|
removeAnimationState: function(t) {
|
|
2797
|
-
e.splice(
|
|
2964
|
+
e.splice(Ia(e, { target: t }), 1);
|
|
2798
2965
|
},
|
|
2799
2966
|
animateAll: function(n) {
|
|
2800
2967
|
var r = this;
|
|
@@ -2804,8 +2971,8 @@ function Ba() {
|
|
|
2804
2971
|
}
|
|
2805
2972
|
var i = !1, a = 0;
|
|
2806
2973
|
e.forEach(function(e) {
|
|
2807
|
-
var t = 0, n = e.target, o = n.fromRect, s = V(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d =
|
|
2808
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration &&
|
|
2974
|
+
var t = 0, n = e.target, o = n.fromRect, s = V(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = Oa(n, !0);
|
|
2975
|
+
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && za(c, s) && !za(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = Ja(u, c, l, r.options)), za(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() {
|
|
2809
2976
|
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2810
2977
|
}, t), n.thisAnimationDuration = t);
|
|
2811
2978
|
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
@@ -2815,26 +2982,26 @@ function Ba() {
|
|
|
2815
2982
|
animate: function(e, t, n, r) {
|
|
2816
2983
|
if (r) {
|
|
2817
2984
|
B(e, "transition", ""), B(e, "transform", "");
|
|
2818
|
-
var i =
|
|
2819
|
-
e.animatingX = !!s, e.animatingY = !!c, B(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy =
|
|
2985
|
+
var i = Oa(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2986
|
+
e.animatingX = !!s, e.animatingY = !!c, B(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = qa(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() {
|
|
2820
2987
|
B(e, "transition", ""), B(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2821
2988
|
}, r);
|
|
2822
2989
|
}
|
|
2823
2990
|
}
|
|
2824
2991
|
};
|
|
2825
2992
|
}
|
|
2826
|
-
function
|
|
2993
|
+
function qa(e) {
|
|
2827
2994
|
return e.offsetWidth;
|
|
2828
2995
|
}
|
|
2829
|
-
function
|
|
2996
|
+
function Ja(e, t, n, r) {
|
|
2830
2997
|
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;
|
|
2831
2998
|
}
|
|
2832
|
-
var
|
|
2999
|
+
var Ya = [], Xa = { initializeByDefault: !0 }, Za = {
|
|
2833
3000
|
mount: function(e) {
|
|
2834
|
-
for (var t in
|
|
2835
|
-
|
|
3001
|
+
for (var t in Xa) Xa.hasOwnProperty(t) && !(t in e) && (e[t] = Xa[t]);
|
|
3002
|
+
Ya.forEach(function(t) {
|
|
2836
3003
|
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2837
|
-
}),
|
|
3004
|
+
}), Ya.push(e);
|
|
2838
3005
|
},
|
|
2839
3006
|
pluginEvent: function(e, t, n) {
|
|
2840
3007
|
var r = this;
|
|
@@ -2842,16 +3009,16 @@ var Ua = [], Wa = { initializeByDefault: !0 }, Ga = {
|
|
|
2842
3009
|
r.eventCanceled = !0;
|
|
2843
3010
|
};
|
|
2844
3011
|
var i = e + "Global";
|
|
2845
|
-
|
|
2846
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](
|
|
3012
|
+
Ya.forEach(function(r) {
|
|
3013
|
+
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)));
|
|
2847
3014
|
});
|
|
2848
3015
|
},
|
|
2849
3016
|
initializePlugins: function(e, t, n, r) {
|
|
2850
|
-
for (var i in
|
|
3017
|
+
for (var i in Ya.forEach(function(r) {
|
|
2851
3018
|
var i = r.pluginName;
|
|
2852
3019
|
if (!(!e.options[i] && !r.initializeByDefault)) {
|
|
2853
3020
|
var a = new r(e, t, e.options);
|
|
2854
|
-
a.sortable = e, a.options = e.options, e[i] = a,
|
|
3021
|
+
a.sortable = e, a.options = e.options, e[i] = a, fa(n, a.defaults);
|
|
2855
3022
|
}
|
|
2856
3023
|
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2857
3024
|
var a = this.modifyOption(e, i, e.options[i]);
|
|
@@ -2860,56 +3027,56 @@ var Ua = [], Wa = { initializeByDefault: !0 }, Ga = {
|
|
|
2860
3027
|
},
|
|
2861
3028
|
getEventProperties: function(e, t) {
|
|
2862
3029
|
var n = {};
|
|
2863
|
-
return
|
|
2864
|
-
typeof r.eventProperties == "function" &&
|
|
3030
|
+
return Ya.forEach(function(r) {
|
|
3031
|
+
typeof r.eventProperties == "function" && fa(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2865
3032
|
}), n;
|
|
2866
3033
|
},
|
|
2867
3034
|
modifyOption: function(e, t, n) {
|
|
2868
3035
|
var r;
|
|
2869
|
-
return
|
|
3036
|
+
return Ya.forEach(function(i) {
|
|
2870
3037
|
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2871
3038
|
}), r;
|
|
2872
3039
|
}
|
|
2873
3040
|
};
|
|
2874
|
-
function
|
|
3041
|
+
function Qa(e) {
|
|
2875
3042
|
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;
|
|
2876
3043
|
if (t ||= n && n[H], t) {
|
|
2877
3044
|
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2878
|
-
window.CustomEvent && !
|
|
3045
|
+
window.CustomEvent && !_a && !va ? h = new CustomEvent(r, {
|
|
2879
3046
|
bubbles: !0,
|
|
2880
3047
|
cancelable: !0
|
|
2881
3048
|
}) : (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;
|
|
2882
|
-
var v =
|
|
3049
|
+
var v = la(la({}, m), Za.getEventProperties(r, t));
|
|
2883
3050
|
for (var y in v) h[y] = v[y];
|
|
2884
3051
|
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2885
3052
|
}
|
|
2886
3053
|
}
|
|
2887
|
-
var
|
|
2888
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i =
|
|
2889
|
-
|
|
3054
|
+
var $a = ["evt"], U = function(e, t) {
|
|
3055
|
+
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = ma(n, $a);
|
|
3056
|
+
Za.pluginEvent.bind(Q)(e, t, la({
|
|
2890
3057
|
dragEl: G,
|
|
2891
3058
|
parentEl: K,
|
|
2892
3059
|
ghostEl: q,
|
|
2893
3060
|
rootEl: J,
|
|
2894
|
-
nextEl:
|
|
2895
|
-
lastDownEl:
|
|
3061
|
+
nextEl: eo,
|
|
3062
|
+
lastDownEl: to,
|
|
2896
3063
|
cloneEl: Y,
|
|
2897
|
-
cloneHidden:
|
|
2898
|
-
dragStarted:
|
|
3064
|
+
cloneHidden: no,
|
|
3065
|
+
dragStarted: vo,
|
|
2899
3066
|
putSortable: X,
|
|
2900
3067
|
activeSortable: Q.active,
|
|
2901
3068
|
originalEvent: r,
|
|
2902
|
-
oldIndex:
|
|
2903
|
-
oldDraggableIndex:
|
|
2904
|
-
newIndex:
|
|
2905
|
-
newDraggableIndex:
|
|
2906
|
-
hideGhostForTarget:
|
|
2907
|
-
unhideGhostForTarget:
|
|
3069
|
+
oldIndex: ro,
|
|
3070
|
+
oldDraggableIndex: ao,
|
|
3071
|
+
newIndex: io,
|
|
3072
|
+
newDraggableIndex: oo,
|
|
3073
|
+
hideGhostForTarget: Io,
|
|
3074
|
+
unhideGhostForTarget: Lo,
|
|
2908
3075
|
cloneNowHidden: function() {
|
|
2909
|
-
|
|
3076
|
+
no = !0;
|
|
2910
3077
|
},
|
|
2911
3078
|
cloneNowShown: function() {
|
|
2912
|
-
|
|
3079
|
+
no = !1;
|
|
2913
3080
|
},
|
|
2914
3081
|
dispatchSortableEvent: function(e) {
|
|
2915
3082
|
W({
|
|
@@ -2921,45 +3088,45 @@ var qa = ["evt"], U = function(e, t) {
|
|
|
2921
3088
|
}, i));
|
|
2922
3089
|
};
|
|
2923
3090
|
function W(e) {
|
|
2924
|
-
|
|
3091
|
+
Qa(la({
|
|
2925
3092
|
putSortable: X,
|
|
2926
3093
|
cloneEl: Y,
|
|
2927
3094
|
targetEl: G,
|
|
2928
3095
|
rootEl: J,
|
|
2929
|
-
oldIndex:
|
|
2930
|
-
oldDraggableIndex:
|
|
2931
|
-
newIndex:
|
|
2932
|
-
newDraggableIndex:
|
|
3096
|
+
oldIndex: ro,
|
|
3097
|
+
oldDraggableIndex: ao,
|
|
3098
|
+
newIndex: io,
|
|
3099
|
+
newDraggableIndex: oo
|
|
2933
3100
|
}, e));
|
|
2934
3101
|
}
|
|
2935
|
-
var G, K, q, J,
|
|
2936
|
-
if (
|
|
2937
|
-
if (
|
|
3102
|
+
var G, K, q, J, eo, to, Y, no, ro, io, ao, oo, so, X, co = !1, lo = !1, uo = [], fo, po, mo, ho, go, _o, vo, yo, bo, xo = !1, So = !1, Co, Z, wo = [], To = !1, Eo = [], Do = typeof document < "u", Oo = xa, ko = va || _a ? "cssFloat" : "float", Ao = Do && !Sa && !xa && "draggable" in document.createElement("div"), jo = function() {
|
|
3103
|
+
if (Do) {
|
|
3104
|
+
if (_a) return !1;
|
|
2938
3105
|
var e = document.createElement("x");
|
|
2939
3106
|
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2940
3107
|
}
|
|
2941
|
-
}(),
|
|
2942
|
-
var n = B(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i =
|
|
3108
|
+
}(), Mo = function(e, t) {
|
|
3109
|
+
var n = B(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Ma(e, 0, t), a = Ma(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;
|
|
2943
3110
|
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2944
3111
|
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2945
3112
|
if (i && o.float && o.float !== "none") {
|
|
2946
3113
|
var u = o.float === "left" ? "left" : "right";
|
|
2947
3114
|
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2948
3115
|
}
|
|
2949
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[
|
|
2950
|
-
},
|
|
3116
|
+
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[ko] === "none" || a && n[ko] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
3117
|
+
}, No = function(e, t, n) {
|
|
2951
3118
|
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;
|
|
2952
3119
|
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2953
|
-
},
|
|
3120
|
+
}, Po = function(e, t) {
|
|
2954
3121
|
var n;
|
|
2955
|
-
return
|
|
3122
|
+
return uo.some(function(r) {
|
|
2956
3123
|
var i = r[H].options.emptyInsertThreshold;
|
|
2957
|
-
if (!(!i ||
|
|
3124
|
+
if (!(!i || Na(r))) {
|
|
2958
3125
|
var a = V(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2959
3126
|
if (o && s) return n = r;
|
|
2960
3127
|
}
|
|
2961
3128
|
}), n;
|
|
2962
|
-
},
|
|
3129
|
+
}, Fo = function(e) {
|
|
2963
3130
|
function t(e, n) {
|
|
2964
3131
|
return function(r, i, a, o) {
|
|
2965
3132
|
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
@@ -2972,31 +3139,31 @@ var G, K, q, J, Ja, Ya, Y, Xa, Za, Qa, $a, eo, to, X, no = !1, ro = !1, io = [],
|
|
|
2972
3139
|
};
|
|
2973
3140
|
}
|
|
2974
3141
|
var n = {}, r = e.group;
|
|
2975
|
-
(!r ||
|
|
2976
|
-
},
|
|
2977
|
-
!
|
|
2978
|
-
},
|
|
2979
|
-
!
|
|
3142
|
+
(!r || ua(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;
|
|
3143
|
+
}, Io = function() {
|
|
3144
|
+
!jo && q && B(q, "display", "none");
|
|
3145
|
+
}, Lo = function() {
|
|
3146
|
+
!jo && q && B(q, "display", "");
|
|
2980
3147
|
};
|
|
2981
|
-
|
|
2982
|
-
if (
|
|
3148
|
+
Do && !Sa && document.addEventListener("click", function(e) {
|
|
3149
|
+
if (lo) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), lo = !1, !1;
|
|
2983
3150
|
}, !0);
|
|
2984
|
-
var
|
|
3151
|
+
var Ro = function(e) {
|
|
2985
3152
|
if (G) {
|
|
2986
3153
|
e = e.touches ? e.touches[0] : e;
|
|
2987
|
-
var t =
|
|
3154
|
+
var t = Po(e.clientX, e.clientY);
|
|
2988
3155
|
if (t) {
|
|
2989
3156
|
var n = {};
|
|
2990
3157
|
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2991
3158
|
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[H]._onDragOver(n);
|
|
2992
3159
|
}
|
|
2993
3160
|
}
|
|
2994
|
-
},
|
|
3161
|
+
}, zo = function(e) {
|
|
2995
3162
|
G && G.parentNode[H]._isOutsideThisEl(e.target);
|
|
2996
3163
|
};
|
|
2997
3164
|
function Q(e, t) {
|
|
2998
3165
|
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2999
|
-
this.el = e, this.options = t =
|
|
3166
|
+
this.el = e, this.options = t = fa({}, t), e[H] = this;
|
|
3000
3167
|
var n = {
|
|
3001
3168
|
group: null,
|
|
3002
3169
|
sort: !0,
|
|
@@ -3009,7 +3176,7 @@ function Q(e, t) {
|
|
|
3009
3176
|
invertedSwapThreshold: null,
|
|
3010
3177
|
removeCloneOnHide: !0,
|
|
3011
3178
|
direction: function() {
|
|
3012
|
-
return
|
|
3179
|
+
return Mo(e, this.options);
|
|
3013
3180
|
},
|
|
3014
3181
|
ghostClass: "sortable-ghost",
|
|
3015
3182
|
chosenClass: "sortable-chosen",
|
|
@@ -3036,17 +3203,17 @@ function Q(e, t) {
|
|
|
3036
3203
|
x: 0,
|
|
3037
3204
|
y: 0
|
|
3038
3205
|
},
|
|
3039
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !
|
|
3206
|
+
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !ba,
|
|
3040
3207
|
emptyInsertThreshold: 5
|
|
3041
3208
|
};
|
|
3042
|
-
for (var r in
|
|
3043
|
-
for (var i in
|
|
3044
|
-
this.nativeDraggable = !t.forceFallback &&
|
|
3209
|
+
for (var r in Za.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
3210
|
+
for (var i in Fo(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
3211
|
+
this.nativeDraggable = !t.forceFallback && Ao, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? L(e, "pointerdown", this._onTapStart) : (L(e, "mousedown", this._onTapStart), L(e, "touchstart", this._onTapStart)), this.nativeDraggable && (L(e, "dragover", this), L(e, "dragenter", this)), uo.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), fa(this, Ka());
|
|
3045
3212
|
}
|
|
3046
3213
|
Q.prototype = {
|
|
3047
3214
|
constructor: Q,
|
|
3048
3215
|
_isOutsideThisEl: function(e) {
|
|
3049
|
-
!this.el.contains(e) && e !== this.el && (
|
|
3216
|
+
!this.el.contains(e) && e !== this.el && (yo = null);
|
|
3050
3217
|
},
|
|
3051
3218
|
_getDirection: function(e, t) {
|
|
3052
3219
|
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, G) : this.options.direction;
|
|
@@ -3054,8 +3221,8 @@ Q.prototype = {
|
|
|
3054
3221
|
_onTapStart: function(e) {
|
|
3055
3222
|
if (e.cancelable) {
|
|
3056
3223
|
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;
|
|
3057
|
-
if (
|
|
3058
|
-
if (
|
|
3224
|
+
if (Yo(n), !G && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && ba && s && s.tagName.toUpperCase() === "SELECT") && (s = Ea(s, r.draggable, n, !1), !(s && s.animated) && to !== s)) {
|
|
3225
|
+
if (ro = Pa(s), ao = Pa(s, r.draggable), typeof l == "function") {
|
|
3059
3226
|
if (l.call(this, e, s, this)) {
|
|
3060
3227
|
W({
|
|
3061
3228
|
sortable: t,
|
|
@@ -3068,7 +3235,7 @@ Q.prototype = {
|
|
|
3068
3235
|
return;
|
|
3069
3236
|
}
|
|
3070
3237
|
} else if (l && (l = l.split(",").some(function(r) {
|
|
3071
|
-
if (r =
|
|
3238
|
+
if (r = Ea(c, r.trim(), n, !1), r) return W({
|
|
3072
3239
|
sortable: t,
|
|
3073
3240
|
rootEl: r,
|
|
3074
3241
|
name: "filter",
|
|
@@ -3080,7 +3247,7 @@ Q.prototype = {
|
|
|
3080
3247
|
i && e.cancelable && e.preventDefault();
|
|
3081
3248
|
return;
|
|
3082
3249
|
}
|
|
3083
|
-
r.handle && !
|
|
3250
|
+
r.handle && !Ea(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
3084
3251
|
}
|
|
3085
3252
|
}
|
|
3086
3253
|
},
|
|
@@ -3088,23 +3255,23 @@ Q.prototype = {
|
|
|
3088
3255
|
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
3089
3256
|
if (n && !G && n.parentNode === i) {
|
|
3090
3257
|
var c = V(n);
|
|
3091
|
-
if (J = i, G = n, K = G.parentNode,
|
|
3258
|
+
if (J = i, G = n, K = G.parentNode, eo = G.nextSibling, to = n, so = a.group, Q.dragged = G, fo = {
|
|
3092
3259
|
target: G,
|
|
3093
3260
|
clientX: (t || e).clientX,
|
|
3094
3261
|
clientY: (t || e).clientY
|
|
3095
|
-
},
|
|
3262
|
+
}, go = fo.clientX - c.left, _o = fo.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, G.style["will-change"] = "all", s = function() {
|
|
3096
3263
|
if (U("delayEnded", r, { evt: e }), Q.eventCanceled) {
|
|
3097
3264
|
r._onDrop();
|
|
3098
3265
|
return;
|
|
3099
3266
|
}
|
|
3100
|
-
r._disableDelayedDragEvents(), !
|
|
3267
|
+
r._disableDelayedDragEvents(), !ya && r.nativeDraggable && (G.draggable = !0), r._triggerDragStart(e, t), W({
|
|
3101
3268
|
sortable: r,
|
|
3102
3269
|
name: "choose",
|
|
3103
3270
|
originalEvent: e
|
|
3104
3271
|
}), z(G, a.chosenClass, !0);
|
|
3105
3272
|
}, a.ignore.split(",").forEach(function(e) {
|
|
3106
|
-
|
|
3107
|
-
}), L(o, "dragover",
|
|
3273
|
+
ka(G, e.trim(), Ho);
|
|
3274
|
+
}), L(o, "dragover", Ro), L(o, "mousemove", Ro), L(o, "touchmove", Ro), L(o, "mouseup", r._onDrop), L(o, "touchend", r._onDrop), L(o, "touchcancel", r._onDrop), ya && this.nativeDraggable && (this.options.touchStartThreshold = 4, G.draggable = !0), U("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(va || _a))) {
|
|
3108
3275
|
if (Q.eventCanceled) {
|
|
3109
3276
|
this._onDrop();
|
|
3110
3277
|
return;
|
|
@@ -3118,7 +3285,7 @@ Q.prototype = {
|
|
|
3118
3285
|
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();
|
|
3119
3286
|
},
|
|
3120
3287
|
_disableDelayedDrag: function() {
|
|
3121
|
-
G &&
|
|
3288
|
+
G && Ho(G), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
3122
3289
|
},
|
|
3123
3290
|
_disableDelayedDragEvents: function() {
|
|
3124
3291
|
var e = this.el.ownerDocument;
|
|
@@ -3127,14 +3294,14 @@ Q.prototype = {
|
|
|
3127
3294
|
_triggerDragStart: function(e, t) {
|
|
3128
3295
|
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? L(document, "pointermove", this._onTouchMove) : t ? L(document, "touchmove", this._onTouchMove) : L(document, "mousemove", this._onTouchMove) : (L(G, "dragend", this), L(J, "dragstart", this._onDragStart));
|
|
3129
3296
|
try {
|
|
3130
|
-
document.selection ?
|
|
3297
|
+
document.selection ? Xo(function() {
|
|
3131
3298
|
document.selection.empty();
|
|
3132
3299
|
}) : window.getSelection().removeAllRanges();
|
|
3133
3300
|
} catch {}
|
|
3134
3301
|
},
|
|
3135
3302
|
_dragStarted: function(e, t) {
|
|
3136
|
-
if (
|
|
3137
|
-
U("dragStarted", this, { evt: t }), this.nativeDraggable && L(document, "dragover",
|
|
3303
|
+
if (co = !1, J && G) {
|
|
3304
|
+
U("dragStarted", this, { evt: t }), this.nativeDraggable && L(document, "dragover", zo);
|
|
3138
3305
|
var n = this.options;
|
|
3139
3306
|
!e && z(G, n.dragClass, !1), z(G, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), W({
|
|
3140
3307
|
sortable: this,
|
|
@@ -3144,33 +3311,33 @@ Q.prototype = {
|
|
|
3144
3311
|
} else this._nulling();
|
|
3145
3312
|
},
|
|
3146
3313
|
_emulateDragOver: function() {
|
|
3147
|
-
if (
|
|
3148
|
-
this._lastX =
|
|
3149
|
-
for (var e = document.elementFromPoint(
|
|
3314
|
+
if (po) {
|
|
3315
|
+
this._lastX = po.clientX, this._lastY = po.clientY, Io();
|
|
3316
|
+
for (var e = document.elementFromPoint(po.clientX, po.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(po.clientX, po.clientY), e !== t);) t = e;
|
|
3150
3317
|
if (G.parentNode[H]._isOutsideThisEl(e), t) do {
|
|
3151
3318
|
if (t[H]) {
|
|
3152
3319
|
var n = void 0;
|
|
3153
3320
|
if (n = t[H]._onDragOver({
|
|
3154
|
-
clientX:
|
|
3155
|
-
clientY:
|
|
3321
|
+
clientX: po.clientX,
|
|
3322
|
+
clientY: po.clientY,
|
|
3156
3323
|
target: e,
|
|
3157
3324
|
rootEl: t
|
|
3158
3325
|
}), n && !this.options.dragoverBubble) break;
|
|
3159
3326
|
}
|
|
3160
3327
|
e = t;
|
|
3161
3328
|
} while (t = t.parentNode);
|
|
3162
|
-
|
|
3329
|
+
Lo();
|
|
3163
3330
|
}
|
|
3164
3331
|
},
|
|
3165
3332
|
_onTouchMove: function(e) {
|
|
3166
|
-
if (
|
|
3167
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q &&
|
|
3168
|
-
if (!Q.active && !
|
|
3333
|
+
if (fo) {
|
|
3334
|
+
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q && Oa(q, !0), o = q && a && a.a, s = q && a && a.d, c = Oo && Z && Fa(Z), l = (i.clientX - fo.clientX + r.x) / (o || 1) + (c ? c[0] - wo[0] : 0) / (o || 1), u = (i.clientY - fo.clientY + r.y) / (s || 1) + (c ? c[1] - wo[1] : 0) / (s || 1);
|
|
3335
|
+
if (!Q.active && !co) {
|
|
3169
3336
|
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
3170
3337
|
this._onDragStart(e, !0);
|
|
3171
3338
|
}
|
|
3172
3339
|
if (q) {
|
|
3173
|
-
a ? (a.e += l - (
|
|
3340
|
+
a ? (a.e += l - (mo || 0), a.f += u - (ho || 0)) : a = {
|
|
3174
3341
|
a: 1,
|
|
3175
3342
|
b: 0,
|
|
3176
3343
|
c: 0,
|
|
@@ -3179,19 +3346,19 @@ Q.prototype = {
|
|
|
3179
3346
|
f: u
|
|
3180
3347
|
};
|
|
3181
3348
|
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
3182
|
-
B(q, "webkitTransform", d), B(q, "mozTransform", d), B(q, "msTransform", d), B(q, "transform", d),
|
|
3349
|
+
B(q, "webkitTransform", d), B(q, "mozTransform", d), B(q, "msTransform", d), B(q, "transform", d), mo = l, ho = u, po = i;
|
|
3183
3350
|
}
|
|
3184
3351
|
e.cancelable && e.preventDefault();
|
|
3185
3352
|
}
|
|
3186
3353
|
},
|
|
3187
3354
|
_appendGhost: function() {
|
|
3188
3355
|
if (!q) {
|
|
3189
|
-
var e = this.options.fallbackOnBody ? document.body : J, t = V(G, !0,
|
|
3190
|
-
if (
|
|
3356
|
+
var e = this.options.fallbackOnBody ? document.body : J, t = V(G, !0, Oo, !0, e), n = this.options;
|
|
3357
|
+
if (Oo) {
|
|
3191
3358
|
for (Z = e; B(Z, "position") === "static" && B(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
3192
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z =
|
|
3359
|
+
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = Aa()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = Aa(), wo = Fa(Z);
|
|
3193
3360
|
}
|
|
3194
|
-
q = G.cloneNode(!0), z(q, n.ghostClass, !1), z(q, n.fallbackClass, !0), z(q, n.dragClass, !0), B(q, "transition", ""), B(q, "transform", ""), B(q, "box-sizing", "border-box"), B(q, "margin", 0), B(q, "top", t.top), B(q, "left", t.left), B(q, "width", t.width), B(q, "height", t.height), B(q, "opacity", "0.8"), B(q, "position",
|
|
3361
|
+
q = G.cloneNode(!0), z(q, n.ghostClass, !1), z(q, n.fallbackClass, !0), z(q, n.dragClass, !0), B(q, "transition", ""), B(q, "transform", ""), B(q, "box-sizing", "border-box"), B(q, "margin", 0), B(q, "top", t.top), B(q, "left", t.left), B(q, "width", t.width), B(q, "height", t.height), B(q, "opacity", "0.8"), B(q, "position", Oo ? "absolute" : "fixed"), B(q, "zIndex", "100000"), B(q, "pointerEvents", "none"), Q.ghost = q, e.appendChild(q), B(q, "transform-origin", go / parseInt(q.style.width) * 100 + "% " + _o / parseInt(q.style.height) * 100 + "%");
|
|
3195
3362
|
}
|
|
3196
3363
|
},
|
|
3197
3364
|
_onDragStart: function(e, t) {
|
|
@@ -3200,18 +3367,18 @@ Q.prototype = {
|
|
|
3200
3367
|
this._onDrop();
|
|
3201
3368
|
return;
|
|
3202
3369
|
}
|
|
3203
|
-
U("setupClone", this), Q.eventCanceled || (Y =
|
|
3370
|
+
U("setupClone", this), Q.eventCanceled || (Y = Wa(G), Y.removeAttribute("id"), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), z(Y, this.options.chosenClass, !1), Q.clone = Y), n.cloneId = Xo(function() {
|
|
3204
3371
|
U("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || J.insertBefore(Y, G), n._hideClone(), W({
|
|
3205
3372
|
sortable: n,
|
|
3206
3373
|
name: "clone"
|
|
3207
3374
|
}));
|
|
3208
|
-
}), !t && z(G, i.dragClass, !0), t ? (
|
|
3375
|
+
}), !t && z(G, i.dragClass, !0), t ? (lo = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (R(document, "mouseup", n._onDrop), R(document, "touchend", n._onDrop), R(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, G)), L(document, "drop", n), B(G, "transform", "translateZ(0)")), co = !0, n._dragStartId = Xo(n._dragStarted.bind(n, t, e)), L(document, "selectstart", n), vo = !0, ba && B(document.body, "user-select", "none");
|
|
3209
3376
|
},
|
|
3210
3377
|
_onDragOver: function(e) {
|
|
3211
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l =
|
|
3212
|
-
if (
|
|
3378
|
+
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = so === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
3379
|
+
if (To) return;
|
|
3213
3380
|
function h(o, s) {
|
|
3214
|
-
U(o, p,
|
|
3381
|
+
U(o, p, la({
|
|
3215
3382
|
evt: e,
|
|
3216
3383
|
isOwner: l,
|
|
3217
3384
|
axis: f ? "vertical" : "horizontal",
|
|
@@ -3223,7 +3390,7 @@ Q.prototype = {
|
|
|
3223
3390
|
target: n,
|
|
3224
3391
|
completed: _,
|
|
3225
3392
|
onMove: function(n, i) {
|
|
3226
|
-
return
|
|
3393
|
+
return Vo(J, t, G, r, n, V(n), e, i);
|
|
3227
3394
|
},
|
|
3228
3395
|
changed: v
|
|
3229
3396
|
}, s));
|
|
@@ -3234,48 +3401,48 @@ Q.prototype = {
|
|
|
3234
3401
|
function _(r) {
|
|
3235
3402
|
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (z(G, X ? X.options.ghostClass : c.options.ghostClass, !1), z(G, o.ghostClass, !0)), X !== p && p !== Q.active ? X = p : p === Q.active && X && (X = null), d === p && (p._ignoreWhileAnimating = n), p.animateAll(function() {
|
|
3236
3403
|
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
3237
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (
|
|
3404
|
+
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (yo = null), !o.dragoverBubble && !e.rootEl && n !== document && (G.parentNode[H]._isOutsideThisEl(e.target), !r && Ro(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
3238
3405
|
}
|
|
3239
3406
|
function v() {
|
|
3240
|
-
|
|
3407
|
+
io = Pa(G), oo = Pa(G, o.draggable), W({
|
|
3241
3408
|
sortable: p,
|
|
3242
3409
|
name: "change",
|
|
3243
3410
|
toEl: t,
|
|
3244
|
-
newIndex:
|
|
3245
|
-
newDraggableIndex:
|
|
3411
|
+
newIndex: io,
|
|
3412
|
+
newDraggableIndex: oo,
|
|
3246
3413
|
originalEvent: e
|
|
3247
3414
|
});
|
|
3248
3415
|
}
|
|
3249
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n =
|
|
3416
|
+
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Ea(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
3250
3417
|
if (G.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
3251
|
-
if (
|
|
3418
|
+
if (lo = !1, c && !o.disabled && (l ? u || (a = K !== J) : X === this || (this.lastPutMode = so.checkPull(this, c, G, e)) && s.checkPut(this, c, G, e))) {
|
|
3252
3419
|
if (f = this._getDirection(e, n) === "vertical", r = V(G), h("dragOverValid"), Q.eventCanceled) return m;
|
|
3253
|
-
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (
|
|
3254
|
-
var y =
|
|
3255
|
-
if (!y ||
|
|
3420
|
+
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (eo ? J.insertBefore(G, eo) : J.appendChild(G)), _(!0);
|
|
3421
|
+
var y = Na(t, o.draggable);
|
|
3422
|
+
if (!y || Go(e, f, this) && !y.animated) {
|
|
3256
3423
|
if (y === G) return _(!1);
|
|
3257
|
-
if (y && t === e.target && (n = y), n && (i = V(n)),
|
|
3258
|
-
} else if (y &&
|
|
3259
|
-
var b =
|
|
3424
|
+
if (y && t === e.target && (n = y), n && (i = V(n)), Vo(J, t, G, r, n, i, e, !!n) !== !1) return g(), y && y.nextSibling ? t.insertBefore(G, y.nextSibling) : t.appendChild(G), K = t, v(), _(!0);
|
|
3425
|
+
} else if (y && Wo(e, f, this)) {
|
|
3426
|
+
var b = Ma(t, 0, o, !0);
|
|
3260
3427
|
if (b === G) return _(!1);
|
|
3261
|
-
if (n = b, i = V(n),
|
|
3428
|
+
if (n = b, i = V(n), Vo(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
|
|
3262
3429
|
} else if (n.parentNode === t) {
|
|
3263
3430
|
i = V(n);
|
|
3264
|
-
var x = 0, S, C = G.parentNode !== t, w = !
|
|
3265
|
-
|
|
3431
|
+
var x = 0, S, C = G.parentNode !== t, w = !No(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = ja(n, "top", "top") || ja(G, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
3432
|
+
yo !== n && (S = i[T], xo = !1, So = !w && o.invertSwap || C), x = Ko(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, So, yo === n);
|
|
3266
3433
|
var O;
|
|
3267
3434
|
if (x !== 0) {
|
|
3268
|
-
var k =
|
|
3435
|
+
var k = Pa(G);
|
|
3269
3436
|
do
|
|
3270
3437
|
k -= x, O = K.children[k];
|
|
3271
3438
|
while (O && (B(O, "display") === "none" || O === q));
|
|
3272
3439
|
}
|
|
3273
3440
|
if (x === 0 || O === n) return _(!1);
|
|
3274
|
-
|
|
3441
|
+
yo = n, bo = x;
|
|
3275
3442
|
var A = n.nextElementSibling, j = !1;
|
|
3276
3443
|
j = x === 1;
|
|
3277
|
-
var ee =
|
|
3278
|
-
if (ee !== !1) return (ee === 1 || ee === -1) && (j = ee === 1),
|
|
3444
|
+
var ee = Vo(J, t, G, r, n, i, e, j);
|
|
3445
|
+
if (ee !== !1) return (ee === 1 || ee === -1) && (j = ee === 1), To = !0, setTimeout(Uo, 30), g(), j && !A ? t.appendChild(G) : n.parentNode.insertBefore(G, j ? A : n), E && Ua(E, 0, D - E.scrollTop), K = G.parentNode, S !== void 0 && !So && (Co = Math.abs(S - V(n)[T])), v(), _(!0);
|
|
3279
3446
|
}
|
|
3280
3447
|
if (t.contains(G)) return _(!1);
|
|
3281
3448
|
}
|
|
@@ -3283,7 +3450,7 @@ Q.prototype = {
|
|
|
3283
3450
|
},
|
|
3284
3451
|
_ignoreWhileAnimating: null,
|
|
3285
3452
|
_offMoveEvents: function() {
|
|
3286
|
-
R(document, "mousemove", this._onTouchMove), R(document, "touchmove", this._onTouchMove), R(document, "pointermove", this._onTouchMove), R(document, "dragover",
|
|
3453
|
+
R(document, "mousemove", this._onTouchMove), R(document, "touchmove", this._onTouchMove), R(document, "pointermove", this._onTouchMove), R(document, "dragover", Ro), R(document, "mousemove", Ro), R(document, "touchmove", Ro);
|
|
3287
3454
|
},
|
|
3288
3455
|
_offUpEvents: function() {
|
|
3289
3456
|
var e = this.el.ownerDocument;
|
|
@@ -3291,18 +3458,18 @@ Q.prototype = {
|
|
|
3291
3458
|
},
|
|
3292
3459
|
_onDrop: function(e) {
|
|
3293
3460
|
var t = this.el, n = this.options;
|
|
3294
|
-
if (
|
|
3461
|
+
if (io = Pa(G), oo = Pa(G, n.draggable), U("drop", this, { evt: e }), K = G && G.parentNode, io = Pa(G), oo = Pa(G, n.draggable), Q.eventCanceled) {
|
|
3295
3462
|
this._nulling();
|
|
3296
3463
|
return;
|
|
3297
3464
|
}
|
|
3298
|
-
|
|
3465
|
+
co = !1, So = !1, xo = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), Zo(this.cloneId), Zo(this._dragStartId), this.nativeDraggable && (R(document, "drop", this), R(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), ba && B(document.body, "user-select", ""), B(G, "transform", ""), e && (vo && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), q && q.parentNode && q.parentNode.removeChild(q), (J === K || X && X.lastPutMode !== "clone") && Y && Y.parentNode && Y.parentNode.removeChild(Y), G && (this.nativeDraggable && R(G, "dragend", this), Ho(G), G.style["will-change"] = "", vo && !co && z(G, X ? X.options.ghostClass : this.options.ghostClass, !1), z(G, this.options.chosenClass, !1), W({
|
|
3299
3466
|
sortable: this,
|
|
3300
3467
|
name: "unchoose",
|
|
3301
3468
|
toEl: K,
|
|
3302
3469
|
newIndex: null,
|
|
3303
3470
|
newDraggableIndex: null,
|
|
3304
3471
|
originalEvent: e
|
|
3305
|
-
}), J === K ?
|
|
3472
|
+
}), J === K ? io !== ro && io >= 0 && (W({
|
|
3306
3473
|
sortable: this,
|
|
3307
3474
|
name: "update",
|
|
3308
3475
|
toEl: K,
|
|
@@ -3312,7 +3479,7 @@ Q.prototype = {
|
|
|
3312
3479
|
name: "sort",
|
|
3313
3480
|
toEl: K,
|
|
3314
3481
|
originalEvent: e
|
|
3315
|
-
})) : (
|
|
3482
|
+
})) : (io >= 0 && (W({
|
|
3316
3483
|
rootEl: K,
|
|
3317
3484
|
name: "add",
|
|
3318
3485
|
toEl: K,
|
|
@@ -3334,7 +3501,7 @@ Q.prototype = {
|
|
|
3334
3501
|
name: "sort",
|
|
3335
3502
|
toEl: K,
|
|
3336
3503
|
originalEvent: e
|
|
3337
|
-
})), X && X.save()), Q.active && ((
|
|
3504
|
+
})), X && X.save()), Q.active && ((io == null || io === -1) && (io = ro, oo = ao), W({
|
|
3338
3505
|
sortable: this,
|
|
3339
3506
|
name: "end",
|
|
3340
3507
|
toEl: K,
|
|
@@ -3342,9 +3509,9 @@ Q.prototype = {
|
|
|
3342
3509
|
}), this.save()))), this._nulling();
|
|
3343
3510
|
},
|
|
3344
3511
|
_nulling: function() {
|
|
3345
|
-
U("nulling", this), J = G = K = q =
|
|
3512
|
+
U("nulling", this), J = G = K = q = eo = Y = to = no = fo = po = vo = io = oo = ro = ao = yo = bo = X = so = Q.dragged = Q.ghost = Q.clone = Q.active = null, Eo.forEach(function(e) {
|
|
3346
3513
|
e.checked = !0;
|
|
3347
|
-
}),
|
|
3514
|
+
}), Eo.length = mo = ho = 0;
|
|
3348
3515
|
},
|
|
3349
3516
|
handleEvent: function(e) {
|
|
3350
3517
|
switch (e.type) {
|
|
@@ -3354,7 +3521,7 @@ Q.prototype = {
|
|
|
3354
3521
|
break;
|
|
3355
3522
|
case "dragenter":
|
|
3356
3523
|
case "dragover":
|
|
3357
|
-
G && (this._onDragOver(e),
|
|
3524
|
+
G && (this._onDragOver(e), Bo(e));
|
|
3358
3525
|
break;
|
|
3359
3526
|
case "selectstart":
|
|
3360
3527
|
e.preventDefault();
|
|
@@ -3362,14 +3529,14 @@ Q.prototype = {
|
|
|
3362
3529
|
}
|
|
3363
3530
|
},
|
|
3364
3531
|
toArray: function() {
|
|
3365
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r],
|
|
3532
|
+
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Ea(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || Jo(t));
|
|
3366
3533
|
return e;
|
|
3367
3534
|
},
|
|
3368
3535
|
sort: function(e, t) {
|
|
3369
3536
|
var n = {}, r = this.el;
|
|
3370
3537
|
this.toArray().forEach(function(e, t) {
|
|
3371
3538
|
var i = r.children[t];
|
|
3372
|
-
|
|
3539
|
+
Ea(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
3373
3540
|
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
3374
3541
|
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
3375
3542
|
}), t && this.animateAll();
|
|
@@ -3379,25 +3546,25 @@ Q.prototype = {
|
|
|
3379
3546
|
e && e.set && e.set(this);
|
|
3380
3547
|
},
|
|
3381
3548
|
closest: function(e, t) {
|
|
3382
|
-
return
|
|
3549
|
+
return Ea(e, t || this.options.draggable, this.el, !1);
|
|
3383
3550
|
},
|
|
3384
3551
|
option: function(e, t) {
|
|
3385
3552
|
var n = this.options;
|
|
3386
3553
|
if (t === void 0) return n[e];
|
|
3387
|
-
var r =
|
|
3388
|
-
r === void 0 ? n[e] = t : n[e] = r, e === "group" &&
|
|
3554
|
+
var r = Za.modifyOption(this, e, t);
|
|
3555
|
+
r === void 0 ? n[e] = t : n[e] = r, e === "group" && Fo(n);
|
|
3389
3556
|
},
|
|
3390
3557
|
destroy: function() {
|
|
3391
3558
|
U("destroy", this);
|
|
3392
3559
|
var e = this.el;
|
|
3393
3560
|
e[H] = null, R(e, "mousedown", this._onTapStart), R(e, "touchstart", this._onTapStart), R(e, "pointerdown", this._onTapStart), this.nativeDraggable && (R(e, "dragover", this), R(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
3394
3561
|
e.removeAttribute("draggable");
|
|
3395
|
-
}), this._onDrop(), this._disableDelayedDragEvents(),
|
|
3562
|
+
}), this._onDrop(), this._disableDelayedDragEvents(), uo.splice(uo.indexOf(this.el), 1), this.el = e = null;
|
|
3396
3563
|
},
|
|
3397
3564
|
_hideClone: function() {
|
|
3398
|
-
if (!
|
|
3565
|
+
if (!no) {
|
|
3399
3566
|
if (U("hideClone", this), Q.eventCanceled) return;
|
|
3400
|
-
B(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y),
|
|
3567
|
+
B(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), no = !0;
|
|
3401
3568
|
}
|
|
3402
3569
|
},
|
|
3403
3570
|
_showClone: function(e) {
|
|
@@ -3405,99 +3572,99 @@ Q.prototype = {
|
|
|
3405
3572
|
this._hideClone();
|
|
3406
3573
|
return;
|
|
3407
3574
|
}
|
|
3408
|
-
if (
|
|
3575
|
+
if (no) {
|
|
3409
3576
|
if (U("showClone", this), Q.eventCanceled) return;
|
|
3410
|
-
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) :
|
|
3577
|
+
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) : eo ? J.insertBefore(Y, eo) : J.appendChild(Y), this.options.group.revertClone && this.animate(G, Y), B(Y, "display", ""), no = !1;
|
|
3411
3578
|
}
|
|
3412
3579
|
}
|
|
3413
3580
|
};
|
|
3414
|
-
function
|
|
3581
|
+
function Bo(e) {
|
|
3415
3582
|
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
3416
3583
|
}
|
|
3417
|
-
function
|
|
3584
|
+
function Vo(e, t, n, r, i, a, o, s) {
|
|
3418
3585
|
var c, l = e[H], u = l.options.onMove, d;
|
|
3419
|
-
return window.CustomEvent && !
|
|
3586
|
+
return window.CustomEvent && !_a && !va ? c = new CustomEvent("move", {
|
|
3420
3587
|
bubbles: !0,
|
|
3421
3588
|
cancelable: !0
|
|
3422
3589
|
}) : (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;
|
|
3423
3590
|
}
|
|
3424
|
-
function
|
|
3591
|
+
function Ho(e) {
|
|
3425
3592
|
e.draggable = !1;
|
|
3426
3593
|
}
|
|
3427
|
-
function
|
|
3428
|
-
|
|
3594
|
+
function Uo() {
|
|
3595
|
+
To = !1;
|
|
3429
3596
|
}
|
|
3430
|
-
function
|
|
3431
|
-
var r = V(
|
|
3597
|
+
function Wo(e, t, n) {
|
|
3598
|
+
var r = V(Ma(n.el, 0, n.options, !0)), i = Ga(n.el, n.options, q), a = 10;
|
|
3432
3599
|
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;
|
|
3433
3600
|
}
|
|
3434
|
-
function
|
|
3435
|
-
var r = V(
|
|
3601
|
+
function Go(e, t, n) {
|
|
3602
|
+
var r = V(Na(n.el, n.options.draggable)), i = Ga(n.el, n.options, q), a = 10;
|
|
3436
3603
|
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;
|
|
3437
3604
|
}
|
|
3438
|
-
function
|
|
3605
|
+
function Ko(e, t, n, r, i, a, o, s) {
|
|
3439
3606
|
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;
|
|
3440
3607
|
if (!o) {
|
|
3441
|
-
if (s &&
|
|
3442
|
-
if (!
|
|
3443
|
-
else if (
|
|
3444
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return
|
|
3608
|
+
if (s && Co < l * i) {
|
|
3609
|
+
if (!xo && (bo === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (xo = !0), xo) f = !0;
|
|
3610
|
+
else if (bo === 1 ? c < u + Co : c > d - Co) return -bo;
|
|
3611
|
+
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return qo(t);
|
|
3445
3612
|
}
|
|
3446
3613
|
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
3447
3614
|
}
|
|
3448
|
-
function
|
|
3449
|
-
return
|
|
3615
|
+
function qo(e) {
|
|
3616
|
+
return Pa(G) < Pa(e) ? 1 : -1;
|
|
3450
3617
|
}
|
|
3451
|
-
function
|
|
3618
|
+
function Jo(e) {
|
|
3452
3619
|
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
3453
3620
|
return r.toString(36);
|
|
3454
3621
|
}
|
|
3455
|
-
function
|
|
3456
|
-
|
|
3622
|
+
function Yo(e) {
|
|
3623
|
+
Eo.length = 0;
|
|
3457
3624
|
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3458
3625
|
var r = t[n];
|
|
3459
|
-
r.checked &&
|
|
3626
|
+
r.checked && Eo.push(r);
|
|
3460
3627
|
}
|
|
3461
3628
|
}
|
|
3462
|
-
function
|
|
3629
|
+
function Xo(e) {
|
|
3463
3630
|
return setTimeout(e, 0);
|
|
3464
3631
|
}
|
|
3465
|
-
function
|
|
3632
|
+
function Zo(e) {
|
|
3466
3633
|
return clearTimeout(e);
|
|
3467
3634
|
}
|
|
3468
|
-
|
|
3469
|
-
(Q.active ||
|
|
3635
|
+
Do && L(document, "touchmove", function(e) {
|
|
3636
|
+
(Q.active || co) && e.cancelable && e.preventDefault();
|
|
3470
3637
|
}), Q.utils = {
|
|
3471
3638
|
on: L,
|
|
3472
3639
|
off: R,
|
|
3473
3640
|
css: B,
|
|
3474
|
-
find:
|
|
3641
|
+
find: ka,
|
|
3475
3642
|
is: function(e, t) {
|
|
3476
|
-
return !!
|
|
3643
|
+
return !!Ea(e, t, e, !1);
|
|
3477
3644
|
},
|
|
3478
|
-
extend:
|
|
3479
|
-
throttle:
|
|
3480
|
-
closest:
|
|
3645
|
+
extend: Ra,
|
|
3646
|
+
throttle: Va,
|
|
3647
|
+
closest: Ea,
|
|
3481
3648
|
toggleClass: z,
|
|
3482
|
-
clone:
|
|
3483
|
-
index:
|
|
3484
|
-
nextTick:
|
|
3485
|
-
cancelNextTick:
|
|
3486
|
-
detectDirection:
|
|
3487
|
-
getChild:
|
|
3649
|
+
clone: Wa,
|
|
3650
|
+
index: Pa,
|
|
3651
|
+
nextTick: Xo,
|
|
3652
|
+
cancelNextTick: Zo,
|
|
3653
|
+
detectDirection: Mo,
|
|
3654
|
+
getChild: Ma
|
|
3488
3655
|
}, Q.get = function(e) {
|
|
3489
3656
|
return e[H];
|
|
3490
3657
|
}, Q.mount = function() {
|
|
3491
3658
|
var e = [...arguments];
|
|
3492
3659
|
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3493
3660
|
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3494
|
-
e.utils && (Q.utils =
|
|
3661
|
+
e.utils && (Q.utils = la(la({}, Q.utils), e.utils)), Za.mount(e);
|
|
3495
3662
|
});
|
|
3496
3663
|
}, Q.create = function(e, t) {
|
|
3497
3664
|
return new Q(e, t);
|
|
3498
|
-
}, Q.version =
|
|
3499
|
-
var $ = [],
|
|
3500
|
-
function
|
|
3665
|
+
}, Q.version = ha;
|
|
3666
|
+
var $ = [], Qo, $o, es = !1, ts, ns, rs, is;
|
|
3667
|
+
function as() {
|
|
3501
3668
|
function e() {
|
|
3502
3669
|
for (var e in this.defaults = {
|
|
3503
3670
|
scroll: !0,
|
|
@@ -3517,63 +3684,63 @@ function $o() {
|
|
|
3517
3684
|
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3518
3685
|
},
|
|
3519
3686
|
drop: function() {
|
|
3520
|
-
this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : (R(document, "pointermove", this._handleFallbackAutoScroll), R(document, "touchmove", this._handleFallbackAutoScroll), R(document, "mousemove", this._handleFallbackAutoScroll)),
|
|
3687
|
+
this.sortable.nativeDraggable ? R(document, "dragover", this._handleAutoScroll) : (R(document, "pointermove", this._handleFallbackAutoScroll), R(document, "touchmove", this._handleFallbackAutoScroll), R(document, "mousemove", this._handleFallbackAutoScroll)), ss(), os(), Ha();
|
|
3521
3688
|
},
|
|
3522
3689
|
nulling: function() {
|
|
3523
|
-
|
|
3690
|
+
rs = $o = Qo = es = is = ts = ns = null, $.length = 0;
|
|
3524
3691
|
},
|
|
3525
3692
|
_handleFallbackAutoScroll: function(e) {
|
|
3526
3693
|
this._handleAutoScroll(e, !0);
|
|
3527
3694
|
},
|
|
3528
3695
|
_handleAutoScroll: function(e, t) {
|
|
3529
3696
|
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3530
|
-
if (
|
|
3531
|
-
|
|
3532
|
-
var o =
|
|
3533
|
-
|
|
3534
|
-
var a =
|
|
3535
|
-
a !== o && (o = a,
|
|
3536
|
-
}, 10),
|
|
3697
|
+
if (rs = e, t || this.options.forceAutoScrollFallback || va || _a || ba) {
|
|
3698
|
+
cs(e, this.options, a, t);
|
|
3699
|
+
var o = La(a, !0);
|
|
3700
|
+
es && (!is || r !== ts || i !== ns) && (is && ss(), is = setInterval(function() {
|
|
3701
|
+
var a = La(document.elementFromPoint(r, i), !0);
|
|
3702
|
+
a !== o && (o = a, os()), cs(e, n.options, a, t);
|
|
3703
|
+
}, 10), ts = r, ns = i);
|
|
3537
3704
|
} else {
|
|
3538
|
-
if (!this.options.bubbleScroll ||
|
|
3539
|
-
|
|
3705
|
+
if (!this.options.bubbleScroll || La(a, !0) === Aa()) {
|
|
3706
|
+
os();
|
|
3540
3707
|
return;
|
|
3541
3708
|
}
|
|
3542
|
-
|
|
3709
|
+
cs(e, this.options, La(a, !1), !1);
|
|
3543
3710
|
}
|
|
3544
3711
|
}
|
|
3545
|
-
},
|
|
3712
|
+
}, fa(e, {
|
|
3546
3713
|
pluginName: "scroll",
|
|
3547
3714
|
initializeByDefault: !0
|
|
3548
3715
|
});
|
|
3549
3716
|
}
|
|
3550
|
-
function
|
|
3717
|
+
function os() {
|
|
3551
3718
|
$.forEach(function(e) {
|
|
3552
3719
|
clearInterval(e.pid);
|
|
3553
3720
|
}), $ = [];
|
|
3554
3721
|
}
|
|
3555
|
-
function
|
|
3556
|
-
clearInterval(
|
|
3722
|
+
function ss() {
|
|
3723
|
+
clearInterval(is);
|
|
3557
3724
|
}
|
|
3558
|
-
var
|
|
3725
|
+
var cs = Va(function(e, t, n, r) {
|
|
3559
3726
|
if (t.scroll) {
|
|
3560
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c =
|
|
3561
|
-
|
|
3562
|
-
var d = 0, f =
|
|
3727
|
+
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Aa(), l = !1, u;
|
|
3728
|
+
$o !== n && ($o = n, os(), Qo = t.scroll, u = t.scrollFn, Qo === !0 && (Qo = La(n, !0)));
|
|
3729
|
+
var d = 0, f = Qo;
|
|
3563
3730
|
do {
|
|
3564
3731
|
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;
|
|
3565
3732
|
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"));
|
|
3566
3733
|
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);
|
|
3567
3734
|
if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
|
|
3568
3735
|
($[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() {
|
|
3569
|
-
r && this.layer === 0 && Q.active._onTouchMove(
|
|
3736
|
+
r && this.layer === 0 && Q.active._onTouchMove(rs);
|
|
3570
3737
|
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3571
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[H], n, t, e,
|
|
3738
|
+
typeof u == "function" && u.call(Q.dragged.parentNode[H], n, t, e, rs, $[this.layer].el) !== "continue" || Ua($[this.layer].el, n, t);
|
|
3572
3739
|
}.bind({ layer: d }), 24))), d++;
|
|
3573
|
-
} while (t.bubbleScroll && f !== c && (f =
|
|
3574
|
-
|
|
3740
|
+
} while (t.bubbleScroll && f !== c && (f = La(f, !1)));
|
|
3741
|
+
es = l;
|
|
3575
3742
|
}
|
|
3576
|
-
}, 30),
|
|
3743
|
+
}, 30), ls = function(e) {
|
|
3577
3744
|
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3578
3745
|
if (t) {
|
|
3579
3746
|
var c = n || i;
|
|
@@ -3585,8 +3752,8 @@ var ns = Fa(function(e, t, n, r) {
|
|
|
3585
3752
|
}));
|
|
3586
3753
|
}
|
|
3587
3754
|
};
|
|
3588
|
-
function
|
|
3589
|
-
|
|
3755
|
+
function us() {}
|
|
3756
|
+
us.prototype = {
|
|
3590
3757
|
startIndex: null,
|
|
3591
3758
|
dragStart: function(e) {
|
|
3592
3759
|
var t = e.oldDraggableIndex;
|
|
@@ -3595,72 +3762,72 @@ is.prototype = {
|
|
|
3595
3762
|
onSpill: function(e) {
|
|
3596
3763
|
var t = e.dragEl, n = e.putSortable;
|
|
3597
3764
|
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3598
|
-
var r =
|
|
3765
|
+
var r = Ma(this.sortable.el, this.startIndex, this.options);
|
|
3599
3766
|
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3600
3767
|
},
|
|
3601
|
-
drop:
|
|
3602
|
-
},
|
|
3603
|
-
function
|
|
3604
|
-
|
|
3768
|
+
drop: ls
|
|
3769
|
+
}, fa(us, { pluginName: "revertOnSpill" });
|
|
3770
|
+
function ds() {}
|
|
3771
|
+
ds.prototype = {
|
|
3605
3772
|
onSpill: function(e) {
|
|
3606
3773
|
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3607
3774
|
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3608
3775
|
},
|
|
3609
|
-
drop:
|
|
3610
|
-
},
|
|
3611
|
-
function
|
|
3776
|
+
drop: ls
|
|
3777
|
+
}, fa(ds, { pluginName: "removeOnSpill" }), Q.mount(new as()), Q.mount(ds, us);
|
|
3778
|
+
function fs(e) {
|
|
3612
3779
|
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3613
3780
|
}
|
|
3614
|
-
function
|
|
3781
|
+
function ps(e) {
|
|
3615
3782
|
ne() && r(e);
|
|
3616
3783
|
}
|
|
3617
|
-
function
|
|
3784
|
+
function ms(e) {
|
|
3618
3785
|
ne() ? a(e) : re(e);
|
|
3619
3786
|
}
|
|
3620
|
-
var
|
|
3621
|
-
function
|
|
3622
|
-
|
|
3787
|
+
var hs = null, gs = null;
|
|
3788
|
+
function _s(e = null, t = null) {
|
|
3789
|
+
hs = e, gs = t;
|
|
3623
3790
|
}
|
|
3624
|
-
function
|
|
3791
|
+
function vs() {
|
|
3625
3792
|
return {
|
|
3626
|
-
data:
|
|
3627
|
-
clonedData:
|
|
3793
|
+
data: hs,
|
|
3794
|
+
clonedData: gs
|
|
3628
3795
|
};
|
|
3629
3796
|
}
|
|
3630
|
-
var
|
|
3631
|
-
function
|
|
3797
|
+
var ys = Symbol("cloneElement");
|
|
3798
|
+
function bs(...e) {
|
|
3632
3799
|
let t = ne()?.proxy, n = null, r = e[0], [, i, a] = e;
|
|
3633
3800
|
Array.isArray(k(i)) || (a = i, i = null);
|
|
3634
|
-
let o = null, { immediate: s = !0, clone: l =
|
|
3801
|
+
let o = null, { immediate: s = !0, clone: l = fs, forceFallback: u, fallbackOnBody: d, customUpdate: f } = k(a) ?? {};
|
|
3635
3802
|
function p(e) {
|
|
3636
3803
|
let { from: t, oldIndex: r, item: a } = e, o = Array.from(t.childNodes);
|
|
3637
3804
|
n = u && !d ? o.slice(0, -1) : o;
|
|
3638
3805
|
let s = k(k(i)?.[r]), c = l(s);
|
|
3639
|
-
|
|
3806
|
+
_s(s, c), a[ys] = c;
|
|
3640
3807
|
}
|
|
3641
3808
|
function m(e) {
|
|
3642
|
-
let t = e.item[
|
|
3643
|
-
if (!
|
|
3644
|
-
if (
|
|
3809
|
+
let t = e.item[ys];
|
|
3810
|
+
if (!Zi(t)) {
|
|
3811
|
+
if (ea(e.item), g(i)) {
|
|
3645
3812
|
let n = [...k(i)];
|
|
3646
|
-
i.value =
|
|
3813
|
+
i.value = Xi(n, e.newDraggableIndex, t);
|
|
3647
3814
|
return;
|
|
3648
3815
|
}
|
|
3649
|
-
|
|
3816
|
+
Xi(k(i), e.newDraggableIndex, t);
|
|
3650
3817
|
}
|
|
3651
3818
|
}
|
|
3652
3819
|
function h(e) {
|
|
3653
3820
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, pullMode: o, clone: s } = e;
|
|
3654
|
-
if (
|
|
3655
|
-
|
|
3821
|
+
if ($i(t, n, r), o === "clone") {
|
|
3822
|
+
ea(s);
|
|
3656
3823
|
return;
|
|
3657
3824
|
}
|
|
3658
3825
|
if (g(i)) {
|
|
3659
3826
|
let e = [...k(i)];
|
|
3660
|
-
i.value =
|
|
3827
|
+
i.value = Yi(e, a);
|
|
3661
3828
|
return;
|
|
3662
3829
|
}
|
|
3663
|
-
|
|
3830
|
+
Yi(k(i), a);
|
|
3664
3831
|
}
|
|
3665
3832
|
function _(e) {
|
|
3666
3833
|
if (f) {
|
|
@@ -3668,12 +3835,12 @@ function ms(...e) {
|
|
|
3668
3835
|
return;
|
|
3669
3836
|
}
|
|
3670
3837
|
let { from: t, item: n, oldIndex: r, oldDraggableIndex: a, newDraggableIndex: o } = e;
|
|
3671
|
-
if (
|
|
3838
|
+
if (ea(n), $i(t, n, r), g(i)) {
|
|
3672
3839
|
let e = [...k(i)];
|
|
3673
|
-
i.value =
|
|
3840
|
+
i.value = Ki(e, a, o);
|
|
3674
3841
|
return;
|
|
3675
3842
|
}
|
|
3676
|
-
|
|
3843
|
+
Ki(k(i), a, o);
|
|
3677
3844
|
}
|
|
3678
3845
|
function v(e) {
|
|
3679
3846
|
let { newIndex: t, oldIndex: r, from: i, to: a } = e, o = null, s = t === r && i === a;
|
|
@@ -3692,7 +3859,7 @@ function ms(...e) {
|
|
|
3692
3859
|
n = null;
|
|
3693
3860
|
}
|
|
3694
3861
|
re(() => {
|
|
3695
|
-
if (
|
|
3862
|
+
if (_s(), o) throw o;
|
|
3696
3863
|
});
|
|
3697
3864
|
}
|
|
3698
3865
|
let y = {
|
|
@@ -3704,19 +3871,19 @@ function ms(...e) {
|
|
|
3704
3871
|
};
|
|
3705
3872
|
function b(e) {
|
|
3706
3873
|
let n = k(r);
|
|
3707
|
-
return e ||=
|
|
3874
|
+
return e ||= Qi(n) ? ta(n, t?.$el) : n, e && !ia(e) && (e = e.$el), e || Gi("Root element not found"), e;
|
|
3708
3875
|
}
|
|
3709
3876
|
function x() {
|
|
3710
|
-
let e = k(a) ?? {}, { immediate: t, clone: n } = e, r =
|
|
3711
|
-
return
|
|
3712
|
-
|
|
3713
|
-
}),
|
|
3877
|
+
let e = k(a) ?? {}, { immediate: t, clone: n } = e, r = Hi(e, ["immediate", "clone"]);
|
|
3878
|
+
return aa(r, (e, t) => {
|
|
3879
|
+
oa(e) && (r[e] = (e, ...n) => (sa(e, vs()), t(e, ...n)));
|
|
3880
|
+
}), ra(i === null ? {} : y, r);
|
|
3714
3881
|
}
|
|
3715
3882
|
let S = (e) => {
|
|
3716
3883
|
e = b(e), o && C.destroy(), o = new Q(e, x());
|
|
3717
3884
|
};
|
|
3718
3885
|
c(() => a, () => {
|
|
3719
|
-
o &&
|
|
3886
|
+
o && aa(x(), (e, t) => {
|
|
3720
3887
|
o?.option(e, t);
|
|
3721
3888
|
});
|
|
3722
3889
|
}, { deep: !0 });
|
|
@@ -3729,15 +3896,15 @@ function ms(...e) {
|
|
|
3729
3896
|
toArray: () => o?.toArray(),
|
|
3730
3897
|
closest: (...e) => o?.closest(...e)
|
|
3731
3898
|
};
|
|
3732
|
-
return
|
|
3899
|
+
return ms(() => {
|
|
3733
3900
|
s && S();
|
|
3734
|
-
}),
|
|
3901
|
+
}), ps(C.destroy), Vi({
|
|
3735
3902
|
start: S,
|
|
3736
3903
|
pause: () => C?.option("disabled", !0),
|
|
3737
3904
|
resume: () => C?.option("disabled", !1)
|
|
3738
3905
|
}, C);
|
|
3739
3906
|
}
|
|
3740
|
-
var
|
|
3907
|
+
var xs = [
|
|
3741
3908
|
"update",
|
|
3742
3909
|
"start",
|
|
3743
3910
|
"add",
|
|
@@ -3750,7 +3917,7 @@ var hs = [
|
|
|
3750
3917
|
"clone",
|
|
3751
3918
|
"move",
|
|
3752
3919
|
"change"
|
|
3753
|
-
],
|
|
3920
|
+
], Ss = y({
|
|
3754
3921
|
name: "VueDraggable",
|
|
3755
3922
|
model: {
|
|
3756
3923
|
prop: "modelValue",
|
|
@@ -3800,37 +3967,37 @@ var hs = [
|
|
|
3800
3967
|
"tag",
|
|
3801
3968
|
"target",
|
|
3802
3969
|
"customUpdate",
|
|
3803
|
-
...
|
|
3970
|
+
...xs.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3804
3971
|
],
|
|
3805
|
-
emits: ["update:modelValue", ...
|
|
3972
|
+
emits: ["update:modelValue", ...xs],
|
|
3806
3973
|
setup(t, { slots: n, emit: r, expose: i, attrs: a }) {
|
|
3807
|
-
let o =
|
|
3974
|
+
let o = xs.reduce((e, t) => {
|
|
3808
3975
|
let n = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3809
3976
|
return e[n] = (...e) => r(t, ...e), e;
|
|
3810
3977
|
}, {}), s = M(() => {
|
|
3811
|
-
let n = e(t), { modelValue: r } = n, i =
|
|
3978
|
+
let n = e(t), { modelValue: r } = n, i = Hi(n, ["modelValue"]), s = Object.entries(i).reduce((e, [t, n]) => {
|
|
3812
3979
|
let r = k(n);
|
|
3813
3980
|
return r !== void 0 && (e[t] = r), e;
|
|
3814
3981
|
}, {});
|
|
3815
|
-
return
|
|
3982
|
+
return Vi(Vi({}, o), Ji(Vi(Vi({}, a), s)));
|
|
3816
3983
|
}), c = M({
|
|
3817
3984
|
get: () => t.modelValue,
|
|
3818
3985
|
set: (e) => r("update:modelValue", e)
|
|
3819
|
-
}), l = _(), u = A(
|
|
3986
|
+
}), l = _(), u = A(bs(t.target || l, c, s));
|
|
3820
3987
|
return i(u), () => ie(t.tag || "div", { ref: l }, (n?.default)?.call(n, u));
|
|
3821
3988
|
}
|
|
3822
|
-
}),
|
|
3989
|
+
}), Cs = {
|
|
3823
3990
|
mounted: "mounted",
|
|
3824
3991
|
unmounted: "unmounted"
|
|
3825
3992
|
};
|
|
3826
|
-
|
|
3993
|
+
Cs.mounted, Cs.unmounted;
|
|
3827
3994
|
//#endregion
|
|
3828
3995
|
//#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3829
|
-
var
|
|
3996
|
+
var ws = { class: "tpl:w-full" }, Ts = {
|
|
3830
3997
|
key: 0,
|
|
3831
3998
|
"data-testid": "section-drop-hint",
|
|
3832
|
-
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-text-dim)]"
|
|
3833
|
-
},
|
|
3999
|
+
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)]"
|
|
4000
|
+
}, Es = /* @__PURE__ */ y({
|
|
3834
4001
|
__name: "SectionBlock",
|
|
3835
4002
|
props: {
|
|
3836
4003
|
block: {},
|
|
@@ -3838,13 +4005,22 @@ var vs = { class: "tpl:w-full" }, ys = {
|
|
|
3838
4005
|
},
|
|
3839
4006
|
setup(e) {
|
|
3840
4007
|
let n = {
|
|
3841
|
-
title:
|
|
3842
|
-
paragraph:
|
|
3843
|
-
image:
|
|
3844
|
-
button:
|
|
3845
|
-
divider:
|
|
3846
|
-
custom:
|
|
3847
|
-
}, r = e, { t: a } =
|
|
4008
|
+
title: Pi,
|
|
4009
|
+
paragraph: hi,
|
|
4010
|
+
image: ni,
|
|
4011
|
+
button: Un,
|
|
4012
|
+
divider: Ir,
|
|
4013
|
+
custom: Pr
|
|
4014
|
+
}, r = e, { t: a } = It(), s = rt(xt, "SectionBlock"), c = P(vt, null), l = P(Ot, null), u = P(At, {});
|
|
4015
|
+
function h(e) {
|
|
4016
|
+
let t = u.savedBlocks;
|
|
4017
|
+
if (t?.isPicking.value) {
|
|
4018
|
+
t.togglePick(r.block.id);
|
|
4019
|
+
return;
|
|
4020
|
+
}
|
|
4021
|
+
s.selectBlock(e);
|
|
4022
|
+
}
|
|
4023
|
+
let g = M(() => {
|
|
3848
4024
|
switch (r.block.columns) {
|
|
3849
4025
|
case "2": return ["50%", "50%"];
|
|
3850
4026
|
case "3": return [
|
|
@@ -3856,38 +4032,38 @@ var vs = { class: "tpl:w-full" }, ys = {
|
|
|
3856
4032
|
case "2-1": return ["66.67%", "33.33%"];
|
|
3857
4033
|
default: return ["100%"];
|
|
3858
4034
|
}
|
|
3859
|
-
}),
|
|
3860
|
-
let e =
|
|
4035
|
+
}), _ = M(() => {
|
|
4036
|
+
let e = g.value.length, t = [...r.block.children];
|
|
3861
4037
|
for (; t.length < e;) t.push([]);
|
|
3862
4038
|
return t.slice(0, e);
|
|
3863
|
-
}),
|
|
3864
|
-
function
|
|
3865
|
-
return
|
|
4039
|
+
}), v = M(() => r.viewport === "mobile" && r.block.stackOnMobile !== !1);
|
|
4040
|
+
function y(e) {
|
|
4041
|
+
return _.value[e] || [];
|
|
3866
4042
|
}
|
|
3867
|
-
function
|
|
4043
|
+
function S(e, t) {
|
|
3868
4044
|
let n = t.map((e) => JSON.parse(JSON.stringify(e))), i = [...r.block.children];
|
|
3869
4045
|
for (; i.length <= e;) i.push([]);
|
|
3870
4046
|
i[e] = n, s.updateBlock(r.block.id, { children: i });
|
|
3871
4047
|
}
|
|
3872
|
-
function
|
|
3873
|
-
return
|
|
4048
|
+
function C(e) {
|
|
4049
|
+
return _i(e, l, n);
|
|
3874
4050
|
}
|
|
3875
|
-
function
|
|
4051
|
+
function T(e, t) {
|
|
3876
4052
|
e.type === "custom" && s.updateBlock(e.id, {
|
|
3877
4053
|
fieldValues: t.fieldValues,
|
|
3878
4054
|
dataSourceFetched: t.dataSourceFetched
|
|
3879
4055
|
});
|
|
3880
4056
|
}
|
|
3881
|
-
return (n, r) => (f(), x("div",
|
|
4057
|
+
return (n, r) => (f(), x("div", ws, [b("div", { class: o(["tpl:flex tpl:gap-0", { "tpl:flex-col": v.value }]) }, [(f(!0), x(j, null, t(_.value, (n, r) => (f(), x("div", {
|
|
3882
4058
|
key: r,
|
|
3883
|
-
class: o(["tpl:relative tpl:min-h-[60px] tpl:rounded",
|
|
3884
|
-
style: i({ width:
|
|
3885
|
-
}, [w(k(
|
|
3886
|
-
"model-value":
|
|
4059
|
+
class: o(["tpl:relative tpl:min-h-[60px] tpl:rounded", y(r).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
4060
|
+
style: i({ width: v.value ? "100%" : g.value[r] })
|
|
4061
|
+
}, [w(k(Ss), {
|
|
4062
|
+
"model-value": y(r),
|
|
3887
4063
|
group: {
|
|
3888
4064
|
name: "blocks",
|
|
3889
4065
|
pull: !0,
|
|
3890
|
-
put: (e, t, n) => k(
|
|
4066
|
+
put: (e, t, n) => k(Fi)(n)
|
|
3891
4067
|
},
|
|
3892
4068
|
animation: 150,
|
|
3893
4069
|
"ghost-class": "tpl-ghost",
|
|
@@ -3898,19 +4074,20 @@ var vs = { class: "tpl:w-full" }, ys = {
|
|
|
3898
4074
|
"empty-insert-threshold": 20,
|
|
3899
4075
|
"force-fallback": !0,
|
|
3900
4076
|
class: "tpl:min-h-[60px]",
|
|
3901
|
-
"onUpdate:modelValue": (e) =>
|
|
4077
|
+
"onUpdate:modelValue": (e) => S(r, e)
|
|
3902
4078
|
}, {
|
|
3903
|
-
default: m(() => [(f(!0), x(j, null, t(
|
|
4079
|
+
default: m(() => [(f(!0), x(j, null, t(y(r), (t) => ae((f(), x("div", { key: t.id }, [w(Mi, {
|
|
3904
4080
|
block: t,
|
|
3905
4081
|
"is-selected": k(s).state.selectedBlockId === t.id,
|
|
3906
4082
|
viewport: e.viewport,
|
|
3907
4083
|
"preview-mode": k(s).state.previewMode,
|
|
3908
|
-
|
|
4084
|
+
nested: "",
|
|
4085
|
+
onSelect: (e) => h(t.id)
|
|
3909
4086
|
}, {
|
|
3910
|
-
default: m(() => [(f(), D(d(
|
|
4087
|
+
default: m(() => [(f(), D(d(C(t)), {
|
|
3911
4088
|
block: t,
|
|
3912
4089
|
viewport: e.viewport,
|
|
3913
|
-
onFetchData: (e) =>
|
|
4090
|
+
onFetchData: (e) => T(t, e),
|
|
3914
4091
|
onUpdate: (e) => k(s).updateBlock(t.id, e)
|
|
3915
4092
|
}, null, 40, [
|
|
3916
4093
|
"block",
|
|
@@ -3931,13 +4108,13 @@ var vs = { class: "tpl:w-full" }, ys = {
|
|
|
3931
4108
|
"model-value",
|
|
3932
4109
|
"group",
|
|
3933
4110
|
"onUpdate:modelValue"
|
|
3934
|
-
]),
|
|
4111
|
+
]), y(r).length === 0 ? (f(), x("div", Ts, [b("span", null, p(k(a).section.dropHere), 1)])) : N("", !0)], 6))), 128))], 2)]));
|
|
3935
4112
|
}
|
|
3936
|
-
}),
|
|
4113
|
+
}), Ds = Oe, Os = {
|
|
3937
4114
|
small: 24,
|
|
3938
4115
|
medium: 32,
|
|
3939
4116
|
large: 48
|
|
3940
|
-
},
|
|
4117
|
+
}, ks = [
|
|
3941
4118
|
"facebook",
|
|
3942
4119
|
"twitter",
|
|
3943
4120
|
"instagram",
|
|
@@ -3955,11 +4132,11 @@ var vs = { class: "tpl:w-full" }, ys = {
|
|
|
3955
4132
|
"github",
|
|
3956
4133
|
"dribbble",
|
|
3957
4134
|
"behance"
|
|
3958
|
-
],
|
|
4135
|
+
], As = [
|
|
3959
4136
|
"width",
|
|
3960
4137
|
"height",
|
|
3961
4138
|
"fill"
|
|
3962
|
-
],
|
|
4139
|
+
], js = ["d"], Ms = /* @__PURE__ */ y({
|
|
3963
4140
|
__name: "SocialIconSvg",
|
|
3964
4141
|
props: {
|
|
3965
4142
|
platform: {},
|
|
@@ -3967,7 +4144,7 @@ var vs = { class: "tpl:w-full" }, ys = {
|
|
|
3967
4144
|
iconSize: {}
|
|
3968
4145
|
},
|
|
3969
4146
|
setup(e) {
|
|
3970
|
-
let t = e, n = M(() =>
|
|
4147
|
+
let t = e, n = M(() => Ds[t.platform]), r = M(() => Os[t.iconSize]), a = M(() => {
|
|
3971
4148
|
let e = {
|
|
3972
4149
|
display: "inline-flex",
|
|
3973
4150
|
alignItems: "center",
|
|
@@ -4011,25 +4188,25 @@ var vs = { class: "tpl:w-full" }, ys = {
|
|
|
4011
4188
|
viewBox: "0 0 24 24",
|
|
4012
4189
|
fill: s.value,
|
|
4013
4190
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4014
|
-
}, [b("path", { d: n.value.path }, null, 8,
|
|
4191
|
+
}, [b("path", { d: n.value.path }, null, 8, js)], 8, As))], 4));
|
|
4015
4192
|
}
|
|
4016
|
-
}),
|
|
4193
|
+
}), Ns = { class: "tpl:w-full" }, Ps = ["href"], Fs = {
|
|
4017
4194
|
key: 1,
|
|
4018
4195
|
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)]"
|
|
4019
|
-
},
|
|
4196
|
+
}, Is = /* @__PURE__ */ y({
|
|
4020
4197
|
__name: "SocialIconsBlock",
|
|
4021
4198
|
props: {
|
|
4022
4199
|
block: {},
|
|
4023
4200
|
viewport: {}
|
|
4024
4201
|
},
|
|
4025
4202
|
setup(e) {
|
|
4026
|
-
let n = e, { t: r } =
|
|
4203
|
+
let n = e, { t: r } = It(), a = M(() => ({
|
|
4027
4204
|
display: "flex",
|
|
4028
4205
|
flexWrap: "wrap",
|
|
4029
4206
|
gap: `${n.block.spacing}px`,
|
|
4030
4207
|
justifyContent: n.block.align === "left" ? "flex-start" : n.block.align === "right" ? "flex-end" : "center"
|
|
4031
4208
|
})), o = M(() => n.block.icons.length > 0);
|
|
4032
|
-
return (n, s) => (f(), x("div",
|
|
4209
|
+
return (n, s) => (f(), x("div", Ns, [o.value ? (f(), x("div", {
|
|
4033
4210
|
key: 0,
|
|
4034
4211
|
style: i(a.value)
|
|
4035
4212
|
}, [(f(!0), x(j, null, t(e.block.icons, (t) => (f(), x("a", {
|
|
@@ -4037,7 +4214,7 @@ var vs = { class: "tpl:w-full" }, ys = {
|
|
|
4037
4214
|
href: t.url || "#",
|
|
4038
4215
|
class: "tpl:cursor-default",
|
|
4039
4216
|
onClick: s[0] ||= F(() => {}, ["prevent"])
|
|
4040
|
-
}, [w(
|
|
4217
|
+
}, [w(Ms, {
|
|
4041
4218
|
platform: t.platform,
|
|
4042
4219
|
"icon-style": e.block.iconStyle,
|
|
4043
4220
|
"icon-size": e.block.iconSize
|
|
@@ -4045,44 +4222,44 @@ var vs = { class: "tpl:w-full" }, ys = {
|
|
|
4045
4222
|
"platform",
|
|
4046
4223
|
"icon-style",
|
|
4047
4224
|
"icon-size"
|
|
4048
|
-
])], 8,
|
|
4225
|
+
])], 8, Ps))), 128))], 4)) : (f(), x("div", Fs, [w(k(er), { size: 16 }), b("span", null, p(k(r).social.addIcons), 1)]))]));
|
|
4049
4226
|
}
|
|
4050
|
-
}),
|
|
4227
|
+
}), Ls = { class: "tpl:w-full" }, Rs = {
|
|
4051
4228
|
key: 0,
|
|
4052
4229
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
4053
4230
|
style: {
|
|
4054
4231
|
"background-color": "var(--tpl-bg-hover)",
|
|
4055
4232
|
color: "var(--tpl-text-dim)"
|
|
4056
4233
|
}
|
|
4057
|
-
},
|
|
4234
|
+
}, zs = /* @__PURE__ */ y({
|
|
4058
4235
|
__name: "SpacerBlock",
|
|
4059
4236
|
props: {
|
|
4060
4237
|
block: {},
|
|
4061
4238
|
viewport: {}
|
|
4062
4239
|
},
|
|
4063
4240
|
setup(e) {
|
|
4064
|
-
let t = e, n =
|
|
4241
|
+
let t = e, n = rt(xt, "SpacerBlock"), r = M(() => ({
|
|
4065
4242
|
height: `${t.block.height}px`,
|
|
4066
4243
|
minHeight: `${t.block.height}px`,
|
|
4067
4244
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
4068
4245
|
}));
|
|
4069
|
-
return (t, a) => (f(), x("div",
|
|
4246
|
+
return (t, a) => (f(), x("div", Ls, [b("div", {
|
|
4070
4247
|
style: i(r.value),
|
|
4071
4248
|
class: o(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !k(n).state.previewMode }])
|
|
4072
|
-
}, [k(n).state.previewMode ? N("", !0) : (f(), x("span",
|
|
4249
|
+
}, [k(n).state.previewMode ? N("", !0) : (f(), x("span", Rs, p(e.block.height) + "px ", 1))], 6)]));
|
|
4073
4250
|
}
|
|
4074
|
-
}),
|
|
4251
|
+
}), Bs = { class: "tpl:w-full" }, Vs = { key: 0 }, Hs = [
|
|
4075
4252
|
"aria-label",
|
|
4076
4253
|
"data-placeholder",
|
|
4077
4254
|
"onBlur"
|
|
4078
|
-
],
|
|
4255
|
+
], Us = [
|
|
4079
4256
|
"aria-label",
|
|
4080
4257
|
"data-placeholder",
|
|
4081
4258
|
"onBlur"
|
|
4082
|
-
],
|
|
4259
|
+
], Ws = {
|
|
4083
4260
|
key: 1,
|
|
4084
4261
|
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)]"
|
|
4085
|
-
},
|
|
4262
|
+
}, Gs = /*#__PURE__*/ Ht(/* @__PURE__ */ y({
|
|
4086
4263
|
__name: "TableBlock",
|
|
4087
4264
|
props: {
|
|
4088
4265
|
block: {},
|
|
@@ -4096,7 +4273,7 @@ var vs = { class: "tpl:w-full" }, ys = {
|
|
|
4096
4273
|
updated(e, t) {
|
|
4097
4274
|
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
4098
4275
|
}
|
|
4099
|
-
}, r = e, { t: a } =
|
|
4276
|
+
}, r = e, { t: a } = It(), o = rt(xt, "TableBlock"), s = M(() => r.block.rows.length > 0), c = M(() => {
|
|
4100
4277
|
let e = {
|
|
4101
4278
|
width: "100%",
|
|
4102
4279
|
borderCollapse: "collapse",
|
|
@@ -4127,11 +4304,11 @@ var vs = { class: "tpl:w-full" }, ys = {
|
|
|
4127
4304
|
} : n);
|
|
4128
4305
|
o.updateBlock(r.block.id, { rows: a });
|
|
4129
4306
|
}
|
|
4130
|
-
return (e, r) => (f(), x("div",
|
|
4307
|
+
return (e, r) => (f(), x("div", Bs, [s.value ? (f(), x("table", {
|
|
4131
4308
|
key: 0,
|
|
4132
4309
|
style: i(c.value),
|
|
4133
4310
|
class: "tpl-table-editable"
|
|
4134
|
-
}, [d.value ? (f(), x("thead",
|
|
4311
|
+
}, [d.value ? (f(), x("thead", Vs, [b("tr", null, [(f(!0), x(j, null, t(d.value.cells, (e) => ae((f(), x("th", {
|
|
4135
4312
|
key: e.id,
|
|
4136
4313
|
style: i(u.value),
|
|
4137
4314
|
"aria-label": k(a).table.cellPlaceholder,
|
|
@@ -4140,7 +4317,7 @@ var vs = { class: "tpl:w-full" }, ys = {
|
|
|
4140
4317
|
onBlur: (t) => g(d.value.id, e.id, t),
|
|
4141
4318
|
onKeydown: r[0] ||= se(F((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4142
4319
|
onClick: F(h, ["stop"])
|
|
4143
|
-
}, null, 44,
|
|
4320
|
+
}, null, 44, Hs)), [[n, e.content]])), 128))])])) : N("", !0), b("tbody", null, [(f(!0), x(j, null, t(m.value, (e) => (f(), x("tr", { key: e.id }, [(f(!0), x(j, null, t(e.cells, (t) => ae((f(), x("td", {
|
|
4144
4321
|
key: t.id,
|
|
4145
4322
|
style: i(l.value),
|
|
4146
4323
|
"aria-label": k(a).table.cellPlaceholder,
|
|
@@ -4149,9 +4326,9 @@ var vs = { class: "tpl:w-full" }, ys = {
|
|
|
4149
4326
|
onBlur: (n) => g(e.id, t.id, n),
|
|
4150
4327
|
onKeydown: r[1] ||= se(F((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
4151
4328
|
onClick: F(h, ["stop"])
|
|
4152
|
-
}, null, 44,
|
|
4329
|
+
}, null, 44, Us)), [[n, t.content]])), 128))]))), 128))])], 4)) : (f(), x("div", Ws, [w(k(tr), { size: 16 }), b("span", null, p(k(a).table.empty), 1)]))]));
|
|
4153
4330
|
}
|
|
4154
|
-
}), [["__scopeId", "data-v-963ac422"]]),
|
|
4331
|
+
}), [["__scopeId", "data-v-963ac422"]]), Ks = /* @__PURE__ */ y({
|
|
4155
4332
|
__name: "VideoPlayButton",
|
|
4156
4333
|
props: { hoverEffect: {
|
|
4157
4334
|
type: Boolean,
|
|
@@ -4169,7 +4346,7 @@ var vs = { class: "tpl:w-full" }, ys = {
|
|
|
4169
4346
|
});
|
|
4170
4347
|
//#endregion
|
|
4171
4348
|
//#region src/utils/videoThumbnail.ts
|
|
4172
|
-
function
|
|
4349
|
+
function qs(e) {
|
|
4173
4350
|
if (!e) return {
|
|
4174
4351
|
platform: "unknown",
|
|
4175
4352
|
videoId: null,
|
|
@@ -4201,25 +4378,25 @@ function Vs(e) {
|
|
|
4201
4378
|
thumbnailUrl: null
|
|
4202
4379
|
};
|
|
4203
4380
|
}
|
|
4204
|
-
function
|
|
4205
|
-
return t ||
|
|
4381
|
+
function Js(e, t) {
|
|
4382
|
+
return t || qs(e).thumbnailUrl;
|
|
4206
4383
|
}
|
|
4207
4384
|
//#endregion
|
|
4208
4385
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
4209
|
-
var
|
|
4386
|
+
var Ys = ["src", "alt"], Xs = {
|
|
4210
4387
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
4211
4388
|
style: { opacity: "0.7" }
|
|
4212
|
-
},
|
|
4389
|
+
}, Zs = ["href"], Qs = ["src", "alt"], $s = ["src", "alt"], ec = {
|
|
4213
4390
|
key: 3,
|
|
4214
4391
|
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)]"
|
|
4215
|
-
},
|
|
4392
|
+
}, tc = /* @__PURE__ */ y({
|
|
4216
4393
|
__name: "VideoBlock",
|
|
4217
4394
|
props: {
|
|
4218
4395
|
block: {},
|
|
4219
4396
|
viewport: {}
|
|
4220
4397
|
},
|
|
4221
4398
|
setup(e) {
|
|
4222
|
-
let t = e, { t: n } =
|
|
4399
|
+
let t = e, { t: n } = It(), { syntax: r } = Ut(), a = M(() => Ce(t.block.url, r) || Ce(t.block.thumbnailUrl, r)), o = fn(() => a.value ? void 0 : t.block.thumbnailUrl || void 0), s = fn(() => a.value ? t.block.placeholderUrl : void 0), c = M(() => a.value ? null : t.block.thumbnailUrl ? o.value ?? null : Js(t.block.url)), l = M(() => ({ textAlign: t.block.align })), u = M(() => {
|
|
4223
4400
|
let e = t.block.align;
|
|
4224
4401
|
return {
|
|
4225
4402
|
maxWidth: "100%",
|
|
@@ -4240,16 +4417,16 @@ var Us = ["src", "alt"], Ws = {
|
|
|
4240
4417
|
class: "tpl:w-full tpl:border-0",
|
|
4241
4418
|
src: k(s),
|
|
4242
4419
|
alt: e.block.alt
|
|
4243
|
-
}, null, 8,
|
|
4420
|
+
}, null, 8, Ys), w(Ks)], 4)) : a.value ? (f(), x("div", {
|
|
4244
4421
|
key: 1,
|
|
4245
4422
|
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)]",
|
|
4246
4423
|
style: i([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
4247
|
-
}, [w(k(
|
|
4424
|
+
}, [w(k(nr), {
|
|
4248
4425
|
size: 36,
|
|
4249
4426
|
"stroke-width": 1.5,
|
|
4250
4427
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
4251
4428
|
style: { opacity: "0.5" }
|
|
4252
|
-
}), b("span",
|
|
4429
|
+
}), b("span", Xs, [w(Bn, { text: d.value }, null, 8, ["text"])])], 4)) : c.value ? (f(), x(j, { key: 2 }, [e.block.url ? (f(), x("a", {
|
|
4253
4430
|
key: 0,
|
|
4254
4431
|
href: e.block.url,
|
|
4255
4432
|
target: "_blank",
|
|
@@ -4261,7 +4438,7 @@ var Us = ["src", "alt"], Ws = {
|
|
|
4261
4438
|
class: "tpl:w-full tpl:border-0",
|
|
4262
4439
|
src: c.value,
|
|
4263
4440
|
alt: e.block.alt
|
|
4264
|
-
}, null, 8,
|
|
4441
|
+
}, null, 8, Qs), w(Ks, { "hover-effect": "" })], 12, Zs)) : (f(), x("div", {
|
|
4265
4442
|
key: 1,
|
|
4266
4443
|
class: "tpl:relative tpl:inline-block",
|
|
4267
4444
|
style: i(u.value)
|
|
@@ -4269,48 +4446,48 @@ var Us = ["src", "alt"], Ws = {
|
|
|
4269
4446
|
class: "tpl:w-full tpl:border-0",
|
|
4270
4447
|
src: c.value,
|
|
4271
4448
|
alt: e.block.alt
|
|
4272
|
-
}, null, 8,
|
|
4449
|
+
}, null, 8, $s), w(Ks)], 4))], 64)) : (f(), x("div", ec, [w(k(nr), {
|
|
4273
4450
|
size: 40,
|
|
4274
4451
|
"stroke-width": 1.5,
|
|
4275
4452
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
4276
4453
|
}), b("span", null, p(k(n).video.addVideo), 1)]))], 4));
|
|
4277
4454
|
}
|
|
4278
|
-
}),
|
|
4279
|
-
section:
|
|
4280
|
-
title:
|
|
4281
|
-
paragraph:
|
|
4282
|
-
image:
|
|
4283
|
-
button:
|
|
4284
|
-
divider:
|
|
4285
|
-
video:
|
|
4286
|
-
social:
|
|
4287
|
-
menu:
|
|
4288
|
-
table:
|
|
4289
|
-
spacer:
|
|
4290
|
-
html:
|
|
4291
|
-
countdown: C(() => import("./CountdownBlock-
|
|
4455
|
+
}), nc = {
|
|
4456
|
+
section: Es,
|
|
4457
|
+
title: Pi,
|
|
4458
|
+
paragraph: hi,
|
|
4459
|
+
image: ni,
|
|
4460
|
+
button: Un,
|
|
4461
|
+
divider: Ir,
|
|
4462
|
+
video: tc,
|
|
4463
|
+
social: Is,
|
|
4464
|
+
menu: oi,
|
|
4465
|
+
table: Gs,
|
|
4466
|
+
spacer: zs,
|
|
4467
|
+
html: Hr,
|
|
4468
|
+
countdown: C(() => import("./CountdownBlock-J_Q9JRQM.js"))
|
|
4292
4469
|
};
|
|
4293
|
-
function
|
|
4294
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } =
|
|
4470
|
+
function rc(e) {
|
|
4471
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = It(r);
|
|
4295
4472
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
4296
|
-
let { resolvedTheme: l } =
|
|
4473
|
+
let { resolvedTheme: l } = bn(M(() => t.state.uiTheme)), d = _(n.theme ?? {}), { themeStyles: f } = Sn({
|
|
4297
4474
|
themeOverrides: d,
|
|
4298
4475
|
resolvedTheme: l,
|
|
4299
4476
|
extraStyles: e.themeExtraStyles
|
|
4300
|
-
}), p =
|
|
4477
|
+
}), p = Xt({
|
|
4301
4478
|
content: t.content,
|
|
4302
4479
|
setContent: (e, n) => t.setContent(e, n),
|
|
4303
4480
|
...e.historyOptions
|
|
4304
4481
|
});
|
|
4305
|
-
|
|
4306
|
-
let m =
|
|
4482
|
+
nn(t, p);
|
|
4483
|
+
let m = Qt({
|
|
4307
4484
|
addBlock: t.addBlock,
|
|
4308
4485
|
removeBlock: t.removeBlock,
|
|
4309
4486
|
updateBlock: t.updateBlock,
|
|
4310
4487
|
selectBlock: t.selectBlock,
|
|
4311
4488
|
findBlockLocation: t.findBlockLocation,
|
|
4312
4489
|
blockDefaults: n.blockDefaults
|
|
4313
|
-
}), h =
|
|
4490
|
+
}), h = en(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? $t({
|
|
4314
4491
|
content: t.content,
|
|
4315
4492
|
isDirty: () => t.state.isDirty,
|
|
4316
4493
|
...e.autoSaveOptions
|
|
@@ -4318,55 +4495,58 @@ function Zs(e) {
|
|
|
4318
4495
|
g && (v = c(p.isNavigating, (e) => {
|
|
4319
4496
|
e ? g.pause() : g.resume();
|
|
4320
4497
|
}));
|
|
4321
|
-
let y =
|
|
4498
|
+
let y = yn(t, {
|
|
4322
4499
|
t: a,
|
|
4323
4500
|
format: o
|
|
4324
|
-
}), b =
|
|
4325
|
-
if (b.allowCustomIgnored &&
|
|
4326
|
-
let e =
|
|
4327
|
-
e.length > 0 &&
|
|
4501
|
+
}, n.customBlocks ?? []), b = Qe(n.colors);
|
|
4502
|
+
if (b.allowCustomIgnored && Tn.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), b.invalidPresets.length > 0 && Tn.warn(`config.colors.presets skipped invalid entries: ${b.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), b.allowCustom === !1) {
|
|
4503
|
+
let e = Pn(b.presets, n.blockDefaults, n.templateDefaults);
|
|
4504
|
+
e.length > 0 && Tn.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.`);
|
|
4328
4505
|
}
|
|
4329
|
-
let x =
|
|
4330
|
-
|
|
4506
|
+
let x = En();
|
|
4507
|
+
jn(x, nc);
|
|
4331
4508
|
let S = /* @__PURE__ */ new Set();
|
|
4332
4509
|
function C(e) {
|
|
4333
4510
|
for (let t of e) {
|
|
4334
|
-
x.registerCustom(t,
|
|
4335
|
-
for (let e of
|
|
4511
|
+
x.registerCustom(t, Pr);
|
|
4512
|
+
for (let e of In(t, b)) S.has(e.id) || (S.add(e.id), Tn.warn(e.message));
|
|
4336
4513
|
}
|
|
4337
4514
|
}
|
|
4338
4515
|
n.customBlocks?.length && C(n.customBlocks);
|
|
4339
|
-
let w =
|
|
4516
|
+
let w = un();
|
|
4340
4517
|
if (s() && u(w.dispose), e.containerEl) {
|
|
4341
4518
|
let t = e.containerEl;
|
|
4342
|
-
|
|
4519
|
+
tt(document, "pointerdown", (e) => {
|
|
4343
4520
|
let n = t.value;
|
|
4344
4521
|
n && (e.composedPath?.() ?? []).includes(n) && w.claim();
|
|
4345
4522
|
}, { capture: !0 });
|
|
4346
4523
|
}
|
|
4347
4524
|
function T(r) {
|
|
4348
|
-
w.isActive() &&
|
|
4525
|
+
w.isActive() && Rn(r, {
|
|
4349
4526
|
history: p,
|
|
4350
4527
|
selectBlock: (e) => t.selectBlock(e),
|
|
4351
4528
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
4352
4529
|
removeBlock: (e) => t.removeBlock(e),
|
|
4353
4530
|
onSave: n.onSave,
|
|
4354
|
-
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
4531
|
+
onBeforeUndo: e.keyboardOptions?.onBeforeUndo,
|
|
4532
|
+
isPicking: () => e.capabilities?.savedBlocks?.isPicking.value === !0,
|
|
4533
|
+
onConfirmPick: () => e.capabilities?.savedBlocks?.confirmPicking(),
|
|
4534
|
+
onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
|
|
4355
4535
|
});
|
|
4356
4536
|
}
|
|
4357
|
-
|
|
4537
|
+
tt(document, "keydown", T);
|
|
4358
4538
|
let D = _(null);
|
|
4359
|
-
E(
|
|
4539
|
+
E(bt, e.editorRoot ?? document), E(ut, D), E(ft, r), E(xt, t), E(jt, p), E(St, m), E(vt, h), E(ht, i), E(ct, f), E(Ft, l), E(gt, n.blockDefaults), E(Ot, x), E(yt, n.customBlocks ?? []), E(lt, n.paletteBlocks), E(Pt, Mn(n.htmlBlockPreview)), E(Tt, b), E(kt, Dn(t.content, x));
|
|
4360
4540
|
let O = pe(n.mergeTags?.syntax);
|
|
4361
|
-
E(
|
|
4362
|
-
let k =
|
|
4541
|
+
E(mt, n.mergeTags?.tags ?? []), E(dt, O), E(Ct, n.mergeTags?.onRequest ?? null), E(ot, n.mergeTags?.autocomplete !== !1), E(at, pn()), E(it, n.logicTags?.tags ?? []), E(pt, n.logicTags?.pairs ?? []), E(wt, n.logicTags?.onRequest ?? null), E(Mt, mn()), E(nt, n.onRequestMedia ?? null), E(_t, n.resolveImageUrl ? dn(n.resolveImageUrl) : null), E(Et, n.displayConditions?.conditions ?? []), E(Dt, n.displayConditions?.allowCustom ?? !1), E(At, e.capabilities ?? {}), E(Nt, y);
|
|
4542
|
+
let k = hn(n.lint) ? null : gn({
|
|
4363
4543
|
content: t.content,
|
|
4364
4544
|
options: n.lint ?? {},
|
|
4365
4545
|
updateBlock: t.updateBlock,
|
|
4366
4546
|
updateSettings: t.updateSettings,
|
|
4367
4547
|
removeBlock: t.removeBlock
|
|
4368
4548
|
});
|
|
4369
|
-
E(
|
|
4549
|
+
E(st, k);
|
|
4370
4550
|
function A() {
|
|
4371
4551
|
v?.(), k?.destroy(), g?.destroy(), p.destroy();
|
|
4372
4552
|
}
|
|
@@ -4389,4 +4569,4 @@ function Zs(e) {
|
|
|
4389
4569
|
};
|
|
4390
4570
|
}
|
|
4391
4571
|
//#endregion
|
|
4392
|
-
export {
|
|
4572
|
+
export { tr as A, Fn as B, xr as C, lr as D, ur as E, Jn as F, tn as G, vn as H, qn as I, Kt as K, Kn as L, Qn as M, Zn as N, cr as O, Xn as P, Wn as R, Cr as S, hr as T, _n as U, Tn as V, on as W, Wr as _, Is as a, Pr as b, Ss as c, vi as d, gi as f, ni as g, oi as h, zs as i, er as j, ar as k, Pi as l, hi as m, tc as n, ks as o, _i as p, rn as q, Gs as r, Es as s, rc as t, Mi as u, Hr as v, gr as w, Tr as x, Ir as y, Un as z };
|