@templatical/editor 0.52.0 → 0.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/AiAltTextPopover-NMJqQKvD.js +106 -0
- package/dist/{AiAltTextReview-DE8t8Rud.js → AiAltTextReview-Ci4zHwRc.js} +68 -66
- package/dist/{AiChatPanel-7ftS7d40.js → AiChatPanel-DdhtfsmO.js} +223 -210
- package/dist/{AiPanels-CxGp6klr.js → AiPanels-HBx7xoJR.js} +6 -6
- package/dist/{AiRewriteMenu-DNI-5CUj.js → AiRewriteMenu-DPzSekZt.js} +78 -107
- package/dist/BlockIssueBadge-eIXZJ9M3.js +33 -0
- package/dist/BlockPreviewCanvas-DO-2TP_6.js +140 -0
- package/dist/{CloudHeaderExtras-CsgyNNV1.js → CloudHeaderExtras-XpjJjn3o.js} +4 -4
- package/dist/{CloudPanels-BDV4XQ_l.js → CloudPanels-i2kZdrdP.js} +44 -44
- package/dist/CollaborationNotices-DANsjl7c.js +65 -0
- package/dist/{CollaboratorBar-EeqqWcX6.js → CollaboratorBar-CbbAA0m1.js} +24 -24
- package/dist/CommentsPanel-CYW3LWis.js +16 -0
- package/dist/CommentsSidebar-CcF4ISMi.js +526 -0
- package/dist/{CountdownBlock-BT3ZTH1F.js → CountdownBlock-BMezkFbJ.js} +21 -21
- package/dist/CountdownToolbar-D3Lv74kU.js +258 -0
- package/dist/{IssuesPanel-BHFQ3wrP.js → IssuesPanel-BMAG9042.js} +141 -129
- package/dist/LanguageMenu-FlP_Jbup.js +403 -0
- package/dist/{LoadingTrack-DZA5AoP9.js → LoadingTrack-BG8cg9xi.js} +2 -2
- package/dist/LocaleNotices-DAnVszWu.js +46 -0
- package/dist/{LogicTagInsertButton-CSD9cfJB.js → LogicTagInsertButton-BjYs-UQX.js} +439 -430
- package/dist/{MediaEditModal-DQl5w44r.js → MediaEditModal-LnG-cF_S.js} +160 -160
- package/dist/{MediaPanels-BFWYuJot.js → MediaPanels-C2r5fiFo.js} +4 -4
- package/dist/{cdn/chunks/MergeTagInput-CFu9VXPS.js → MergeTagInput-BsnogCeY.js} +32 -34
- package/dist/{MergeTagModeToggle-DvD0ne7N.js → MergeTagModeToggle-DiufIQ-_.js} +49 -49
- package/dist/MergeTagTextarea-BweI-Xsi.js +126 -0
- package/dist/{ParagraphEditor-D-nqs82g.js → ParagraphEditor-qgBp5yIB.js} +286 -257
- package/dist/{RestoreVersionDialog-DqUPsLB9.js → RestoreVersionDialog-DdYUrFiK.js} +23 -23
- package/dist/{RichTextEditorContent-Xq9D0Zs3.js → RichTextEditorContent-C5MAzx3E.js} +54 -53
- package/dist/{SaveBlockDialog-DAPv70p4.js → SaveBlockDialog-eK6fjtTy.js} +86 -86
- package/dist/SavedBlocksBrowserModal-D2QHd2Yp.js +359 -0
- package/dist/{SavedBlocksPanels-ChbL9v9x.js → SavedBlocksPanels-Cl61f4Mf.js} +9 -9
- package/dist/{SavedBlocksPickBar-hRaiLNdu.js → SavedBlocksPickBar-CXP2dkeB.js} +15 -15
- package/dist/TemplateSettings-BKJrdZcH.js +294 -0
- package/dist/TestEmailModal-DQotJg6g.js +212 -0
- package/dist/{TestEmailPanel-COJQa2A9.js → TestEmailPanel-CwiTzJsh.js} +4 -4
- package/dist/TitleEditor-CzSvsPAn.js +202 -0
- package/dist/ToggleSwitch-R3wCCYE6.js +43 -0
- package/dist/Toolbar-Cd75ci5W.js +3711 -0
- package/dist/{TplModal-9IndEYk5.js → TplModal-ZoXu40T9.js} +17 -17
- package/dist/{VersionHistoryMenu-BG5qayvg.js → VersionHistoryMenu-BvhN-Ofk.js} +39 -39
- package/dist/{VersionHistoryPanels-hPg7Q5-f.js → VersionHistoryPanels-DPWMnYbd.js} +5 -5
- package/dist/VersionPreviewBanner-CuJnasxH.js +37 -0
- package/dist/WrapperBlock-D4fPwO0t.js +44 -0
- package/dist/{blockTypeIcons-yt7SLzub.js → blockTypeIcons-BXMxu86H.js} +27 -26
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-CD-Kt1qz.js → ca-DOuIxWRv.js} +114 -2
- package/dist/cdn/chunks/AiAltTextPopover-ByZ0FEqI.js +107 -0
- package/dist/cdn/chunks/AiAltTextPopover-ByZ0FEqI.js.map +1 -0
- package/dist/cdn/chunks/{AiAltTextReview-BafAtBoA.js → AiAltTextReview-Dtm3A2cD.js} +71 -69
- package/dist/cdn/chunks/AiAltTextReview-Dtm3A2cD.js.map +1 -0
- package/dist/cdn/chunks/AiChatPanel-DciEt27y.js +487 -0
- package/dist/cdn/chunks/AiChatPanel-DciEt27y.js.map +1 -0
- package/dist/cdn/chunks/{AiPanels-B4uAVRoO.js → AiPanels-BV5D1itk.js} +11 -11
- package/dist/cdn/chunks/{AiPanels-B4uAVRoO.js.map → AiPanels-BV5D1itk.js.map} +1 -1
- package/dist/cdn/chunks/{AiRewriteMenu-4F6vwhJ5.js → AiRewriteMenu-D3jkh6Xb.js} +80 -80
- package/dist/cdn/chunks/AiRewriteMenu-D3jkh6Xb.js.map +1 -0
- package/dist/cdn/chunks/BlockIssueBadge-DyEgBZtR.js +34 -0
- package/dist/cdn/chunks/BlockIssueBadge-DyEgBZtR.js.map +1 -0
- package/dist/cdn/chunks/BlockPreviewCanvas-RQFilqXC.js +142 -0
- package/dist/cdn/chunks/{BlockPreviewCanvas-Ny1X_mee.js.map → BlockPreviewCanvas-RQFilqXC.js.map} +1 -1
- package/dist/cdn/chunks/{CloudHeaderExtras-DtMORiLS.js → CloudHeaderExtras-BtqdN777.js} +4 -4
- package/dist/cdn/chunks/{CloudHeaderExtras-DtMORiLS.js.map → CloudHeaderExtras-BtqdN777.js.map} +1 -1
- package/dist/cdn/chunks/{CloudPanels-BkmLc2Fl.js → CloudPanels-BSJ-Z5Hw.js} +43 -43
- package/dist/cdn/chunks/{CloudPanels-BkmLc2Fl.js.map → CloudPanels-BSJ-Z5Hw.js.map} +1 -1
- package/dist/cdn/chunks/CollaborationNotices-BS7xrlPE.js +67 -0
- package/dist/cdn/chunks/CollaborationNotices-BS7xrlPE.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-II8eYtKu.js → CollaboratorBar-Bc9914Az.js} +16 -16
- package/dist/cdn/chunks/{CollaboratorBar-II8eYtKu.js.map → CollaboratorBar-Bc9914Az.js.map} +1 -1
- package/dist/cdn/chunks/CommentsPanel-DbR9phAk.js +18 -0
- package/dist/cdn/chunks/{CommentsPanel-CAiwilM2.js.map → CommentsPanel-DbR9phAk.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-BD4--XP2.js +496 -0
- package/dist/cdn/chunks/CommentsSidebar-BD4--XP2.js.map +1 -0
- package/dist/cdn/chunks/{CountdownBlock-Dyr5P0IP.js → CountdownBlock-CjMhMhnv.js} +26 -26
- package/dist/cdn/chunks/{CountdownBlock-Dyr5P0IP.js.map → CountdownBlock-CjMhMhnv.js.map} +1 -1
- package/dist/cdn/chunks/CountdownToolbar-DxwYBw-d.js +260 -0
- package/dist/cdn/chunks/CountdownToolbar-DxwYBw-d.js.map +1 -0
- package/dist/cdn/chunks/{IssuesPanel-pr7_nuLI.js → IssuesPanel-CUmI4HMm.js} +132 -120
- package/dist/cdn/chunks/IssuesPanel-CUmI4HMm.js.map +1 -0
- package/dist/cdn/chunks/LanguageMenu-3ydCozQJ.js +359 -0
- package/dist/cdn/chunks/LanguageMenu-3ydCozQJ.js.map +1 -0
- package/dist/cdn/chunks/{LoadingTrack-DfJ_C33G.js → LoadingTrack-DUYcDHOV.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-DfJ_C33G.js.map → LoadingTrack-DUYcDHOV.js.map} +1 -1
- package/dist/cdn/chunks/LocaleNotices-BfoH6gST.js +47 -0
- package/dist/cdn/chunks/LocaleNotices-BfoH6gST.js.map +1 -0
- package/dist/cdn/chunks/{LogicTagInsertButton-B_ldj3TO.js → LogicTagInsertButton-5Z3fFzjc.js} +465 -456
- package/dist/cdn/chunks/LogicTagInsertButton-5Z3fFzjc.js.map +1 -0
- package/dist/cdn/chunks/{MediaEditModal-CGfzcHwP.js → MediaEditModal-DDCIwr9U.js} +439 -439
- package/dist/cdn/chunks/MediaEditModal-DDCIwr9U.js.map +1 -0
- package/dist/cdn/chunks/{MediaPanels-D0BdxdqP.js → MediaPanels-Dz79oy8P.js} +5 -5
- package/dist/cdn/chunks/{MediaPanels-D0BdxdqP.js.map → MediaPanels-Dz79oy8P.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagInput-CIWy-cXf.js +82 -0
- package/dist/cdn/chunks/{MergeTagInput-CFu9VXPS.js.map → MergeTagInput-CIWy-cXf.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-BFpK5dxg.js → MergeTagModeToggle-BrP5GR-x.js} +50 -50
- package/dist/cdn/chunks/MergeTagModeToggle-BrP5GR-x.js.map +1 -0
- package/dist/cdn/chunks/MergeTagTextarea-D3nNDlhV.js +128 -0
- package/dist/cdn/chunks/MergeTagTextarea-D3nNDlhV.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-DDolH_Pf.js +660 -0
- package/dist/cdn/chunks/ParagraphEditor-DDolH_Pf.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-B866zFP0.js → RestoreVersionDialog-Crj1DBqC.js} +18 -18
- package/dist/cdn/chunks/{RestoreVersionDialog-B866zFP0.js.map → RestoreVersionDialog-Crj1DBqC.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DaY63kye.js → RichTextEditorContent-rCCqFlwJ.js} +43 -43
- package/dist/cdn/chunks/{RichTextEditorContent-DaY63kye.js.map → RichTextEditorContent-rCCqFlwJ.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-B7nftAAS.js → SaveBlockDialog-C34RW1aM.js} +71 -71
- package/dist/cdn/chunks/{SaveBlockDialog-B7nftAAS.js.map → SaveBlockDialog-C34RW1aM.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-CJnwWPT-.js +356 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-B9XCjDfm.js.map → SavedBlocksBrowserModal-CJnwWPT-.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPanels-C3nK90pz.js → SavedBlocksPanels-CA2PqXIH.js} +9 -9
- package/dist/cdn/chunks/{SavedBlocksPanels-C3nK90pz.js.map → SavedBlocksPanels-CA2PqXIH.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-B166Mek9.js → SavedBlocksPickBar-Dj3ortee.js} +16 -16
- package/dist/cdn/chunks/{SavedBlocksPickBar-B166Mek9.js.map → SavedBlocksPickBar-Dj3ortee.js.map} +1 -1
- package/dist/cdn/chunks/TemplateSettings-sW0ZlDl1.js +266 -0
- package/dist/cdn/chunks/TemplateSettings-sW0ZlDl1.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailModal-DcwKhFnI.js → TestEmailModal-BXeCtTjU.js} +81 -78
- package/dist/cdn/chunks/TestEmailModal-BXeCtTjU.js.map +1 -0
- package/dist/cdn/chunks/{TestEmailPanel-BDBAvAfI.js → TestEmailPanel-CpZcpB9D.js} +5 -5
- package/dist/cdn/chunks/{TestEmailPanel-BDBAvAfI.js.map → TestEmailPanel-CpZcpB9D.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-Bv3SmSO6.js +202 -0
- package/dist/cdn/chunks/TitleEditor-Bv3SmSO6.js.map +1 -0
- package/dist/cdn/chunks/ToggleSwitch-BSkySwA1.js +45 -0
- package/dist/cdn/chunks/ToggleSwitch-BSkySwA1.js.map +1 -0
- package/dist/cdn/chunks/Toolbar-BJKpJ2Mg.js +3626 -0
- package/dist/cdn/chunks/Toolbar-BJKpJ2Mg.js.map +1 -0
- package/dist/cdn/chunks/{TplModal-BDyeS69p.js → TplModal-DDDUDMYC.js} +19 -19
- package/dist/cdn/chunks/{TplModal-BDyeS69p.js.map → TplModal-DDDUDMYC.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-CmpgUI4Q.js → VersionHistoryMenu-DSElv3Sv.js} +36 -36
- package/dist/cdn/chunks/{VersionHistoryMenu-CmpgUI4Q.js.map → VersionHistoryMenu-DSElv3Sv.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryPanels-DB_FZyyg.js → VersionHistoryPanels-H2nuik1l.js} +6 -6
- package/dist/cdn/chunks/{VersionHistoryPanels-DB_FZyyg.js.map → VersionHistoryPanels-H2nuik1l.js.map} +1 -1
- package/dist/cdn/chunks/VersionPreviewBanner-Whwxh55w.js +39 -0
- package/dist/cdn/chunks/VersionPreviewBanner-Whwxh55w.js.map +1 -0
- package/dist/cdn/chunks/WrapperBlock-jTqsuLnS.js +46 -0
- package/dist/cdn/chunks/WrapperBlock-jTqsuLnS.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-DMgLcuI8.js +21 -0
- package/dist/cdn/chunks/blockTypeIcons-DMgLcuI8.js.map +1 -0
- package/dist/{ca-CD-Kt1qz.js → cdn/chunks/ca-DOuIxWRv.js} +116 -0
- package/dist/cdn/chunks/ca-DOuIxWRv.js.map +1 -0
- package/dist/cdn/chunks/composables-D0UYam2P.js +3039 -0
- package/dist/cdn/chunks/composables-D0UYam2P.js.map +1 -0
- package/dist/cdn/chunks/{createCloudRuntime-D6niZ2Rc.js → createCloudRuntime-BdsclY8_.js} +85 -83
- package/dist/cdn/chunks/createCloudRuntime-BdsclY8_.js.map +1 -0
- package/dist/{de-CeFJ6wbM.js → cdn/chunks/de-DaOUfYBX.js} +116 -0
- package/dist/cdn/chunks/de-DaOUfYBX.js.map +1 -0
- package/dist/{dist-CEdyyDn7.js → cdn/chunks/dist-BzXULHvI.js} +63 -61
- package/dist/cdn/chunks/{dist-C2epoAwW.js.map → dist-BzXULHvI.js.map} +1 -1
- package/dist/{dist-BA-jTQgw.js → cdn/chunks/dist-DqGgijFI.js} +108 -109
- package/dist/cdn/chunks/{dist-CONcGNwy.js.map → dist-DqGgijFI.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-B8hTTYFO.js → draggable-DepKdldn.js} +1384 -1376
- package/dist/cdn/chunks/draggable-DepKdldn.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-cvYkpbHD.js → editor-modal-CPbgthOv.js} +986 -986
- package/dist/cdn/chunks/{editor-modal-cvYkpbHD.js.map → editor-modal-CPbgthOv.js.map} +1 -1
- package/dist/{en-D14i5nFh.js → cdn/chunks/en-C0pHHMiR.js} +116 -0
- package/dist/cdn/chunks/en-C0pHHMiR.js.map +1 -0
- package/dist/cdn/chunks/en-IYVryJRl.js +1 -0
- package/dist/{es-zDacbMhs.js → cdn/chunks/es-CxyEKr6n.js} +116 -0
- package/dist/cdn/chunks/es-CxyEKr6n.js.map +1 -0
- package/dist/cdn/chunks/{extensions-ClDhn88e.js → extensions-Uh9vuFfK.js} +57 -57
- package/dist/cdn/chunks/{extensions-ClDhn88e.js.map → extensions-Uh9vuFfK.js.map} +1 -1
- package/dist/{fr-CSgYtjOd.js → cdn/chunks/fr-CYbamiI6.js} +116 -0
- package/dist/cdn/chunks/fr-CYbamiI6.js.map +1 -0
- package/dist/cdn/chunks/{icons-HCBP93Ch.js → icons-CSSMtbGK.js} +187 -144
- package/dist/cdn/chunks/icons-CSSMtbGK.js.map +1 -0
- package/dist/{ja-B7H3ID8O.js → cdn/chunks/ja-DfaIAoGI.js} +116 -0
- package/dist/cdn/chunks/ja-DfaIAoGI.js.map +1 -0
- package/dist/cdn/chunks/keys-CoQtCqNv.js +11 -0
- package/dist/cdn/chunks/keys-CoQtCqNv.js.map +1 -0
- package/dist/cdn/chunks/languageName-DEEOhDWI.js +12 -0
- package/dist/cdn/chunks/languageName-DEEOhDWI.js.map +1 -0
- package/dist/cdn/chunks/{liquid.browser-DkLBNrft.js → liquid.browser-rubac0VA.js} +782 -746
- package/dist/cdn/chunks/liquid.browser-rubac0VA.js.map +1 -0
- package/dist/{nl-176ySmc5.js → cdn/chunks/nl-DkrB-VKZ.js} +116 -0
- package/dist/cdn/chunks/nl-DkrB-VKZ.js.map +1 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-oGhwVscw.js +290 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-oGhwVscw.js.map +1 -0
- package/dist/cdn/chunks/noticeTones-D7BPu-Le.js +16 -0
- package/dist/cdn/chunks/noticeTones-D7BPu-Le.js.map +1 -0
- package/dist/cdn/chunks/plural-CyxrJXL1.js +17 -0
- package/dist/cdn/chunks/plural-CyxrJXL1.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-D-dsBq5t.js → preRenderCustomBlocks-C8k7tw98.js} +5 -5
- package/dist/cdn/chunks/{preRenderCustomBlocks-D-dsBq5t.js.map → preRenderCustomBlocks-C8k7tw98.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-dDlTwX18.js → pt-BR-CY5Ye7eP.js} +115 -1
- package/dist/cdn/chunks/pt-BR-CY5Ye7eP.js.map +1 -0
- package/dist/cdn/chunks/sanitizeHtml-DYklmvgX.js +61 -0
- package/dist/cdn/chunks/sanitizeHtml-DYklmvgX.js.map +1 -0
- package/dist/cdn/chunks/socialIcons-BAiuHyJs.js +2638 -0
- package/dist/cdn/chunks/socialIcons-BAiuHyJs.js.map +1 -0
- package/dist/cdn/chunks/src-CACM3o--.js +2606 -0
- package/dist/cdn/chunks/src-CACM3o--.js.map +1 -0
- package/dist/cdn/chunks/{src-CUH_EI7k.js → src-Ddpm4HsS.js} +225 -259
- package/dist/cdn/chunks/src-Ddpm4HsS.js.map +1 -0
- package/dist/cdn/chunks/{src-BKpAis_q.js → src-DheBmnvF.js} +635 -478
- package/dist/cdn/chunks/src-DheBmnvF.js.map +1 -0
- package/dist/{styleConstants-B8xVRiwX.js → cdn/chunks/styleConstants-CgiNKdnc.js} +7 -5
- package/dist/cdn/chunks/styleConstants-CgiNKdnc.js.map +1 -0
- package/dist/cdn/chunks/templateSettingsFields-cjlP-jdw.js.map +1 -1
- package/dist/cdn/chunks/{tiptap-ChSZybTi.js → tiptap-Dipw_zOQ.js} +48 -48
- package/dist/cdn/chunks/{tiptap-ChSZybTi.js.map → tiptap-Dipw_zOQ.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-RJXyVnIf.js → useCloudI18n-Cc5NZqiI.js} +3 -3
- package/dist/cdn/chunks/{useCloudI18n-RJXyVnIf.js.map → useCloudI18n-Cc5NZqiI.js.map} +1 -1
- package/dist/cdn/chunks/useEditorRoot-D_LuZ_hE.js +9 -0
- package/dist/cdn/chunks/{useEditorRoot-BT3c9CXj.js.map → useEditorRoot-D_LuZ_hE.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-11iqzC6m.js → useI18n-BnJYydPv.js} +3 -3
- package/dist/cdn/chunks/{useI18n-11iqzC6m.js.map → useI18n-BnJYydPv.js.map} +1 -1
- package/dist/cdn/chunks/useLocalizedDisplay-yXbRKNrs.js +33 -0
- package/dist/cdn/chunks/useLocalizedDisplay-yXbRKNrs.js.map +1 -0
- package/dist/cdn/chunks/{useLogicTag-vy5KGg5D.js → useLogicTag-B7RpqVFQ.js} +5 -5
- package/dist/cdn/chunks/{useLogicTag-vy5KGg5D.js.map → useLogicTag-B7RpqVFQ.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-BFBBjnwh.js → useMergeTag-C-32ETjj.js} +6 -6
- package/dist/cdn/chunks/{useMergeTag-BFBBjnwh.js.map → useMergeTag-C-32ETjj.js.map} +1 -1
- package/dist/cdn/chunks/usePopoverPosition-BWAXWeBv.js +78 -0
- package/dist/cdn/chunks/usePopoverPosition-BWAXWeBv.js.map +1 -0
- package/dist/cdn/chunks/{useScrollToBlock-C0dawxGr.js → useScrollToBlock-Ct1AwLD-.js} +5 -5
- package/dist/cdn/chunks/useScrollToBlock-Ct1AwLD-.js.map +1 -0
- package/dist/cdn/chunks/{withCurrentFont-C3CquBQN.js → withCurrentFont-D33ZXoWp.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-C3CquBQN.js.map → withCurrentFont-D33ZXoWp.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +2503 -1809
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-N3x4z_rH.js → check-ChQ0l8EQ.js} +1 -1
- package/dist/{chevron-down-gXu9qNwO.js → chevron-down-Bh6cp6PI.js} +1 -1
- package/dist/{chevron-right-rL0ayGk5.js → chevron-right-LUgdqdoW.js} +1 -1
- package/dist/{chevron-up-0ugh8HnW.js → chevron-up-XsDeJxQN.js} +1 -1
- package/dist/{circle-alert-B9Ls75B5.js → circle-alert-lODfDsrj.js} +1 -1
- package/dist/{clock-BqHBaCLm.js → clock-DrqFEZkT.js} +1 -1
- package/dist/composables-BOP3ERRP.js +4517 -0
- package/dist/{createCloudRuntime-B5VIdnwz.js → createCloudRuntime-DGV5a5Af.js} +47 -45
- package/dist/{createLucideIcon-BV7Gwz_Z.js → createLucideIcon-Dw5e5gVE.js} +16 -16
- package/dist/{cdn/chunks/de-CeFJ6wbM.js → de-DaOUfYBX.js} +114 -2
- package/dist/{cdn/chunks/dist-CONcGNwy.js → dist-0alKVRc_.js} +100 -99
- package/dist/{dist-Cy8I5scI.js → dist-54VCNoC0.js} +2 -2
- package/dist/dist-6DU0me3E.js +4 -0
- package/dist/{dist-p3wymUDt.js → dist-B8dY8drK.js} +2 -2
- package/dist/{dist-Dd5MU2Ev.js → dist-B9a7iVye.js} +2 -2
- package/dist/{dist-V7W1UhVr.js → dist-BWflWcpW.js} +2 -2
- package/dist/{dist-D6fZec6r.js → dist-C3hu_C3w.js} +2 -2
- package/dist/{cdn/chunks/dist-C2epoAwW.js → dist-CX7skkvG.js} +29 -31
- package/dist/dist-CcOn7WCo.js +4 -0
- package/dist/dist-Cdkm20M6.js +2542 -0
- package/dist/{dist-BS5uKktL.js → dist-ChOb5XHW.js} +2 -2
- package/dist/{dist-BF5zEHop.js → dist-DZ3X-uB8.js} +2 -2
- package/dist/{dist-CWSG7Kj0.js → dist-D_XrUEET.js} +5 -5
- package/dist/{dist-txQLT2sF.js → dist-TAv500j6.js} +2 -2
- package/dist/{dist-DDN7yR-w.js → dist-fqSers8_.js} +131 -131
- package/dist/{editor-modal-Du9VI9q4.js → editor-modal-B_2EAOjN.js} +907 -906
- package/dist/{cdn/chunks/en-D14i5nFh.js → en-C0pHHMiR.js} +114 -2
- package/dist/en-DTtwco2Q.js +1 -0
- package/dist/{cdn/chunks/es-zDacbMhs.js → es-CxyEKr6n.js} +114 -2
- package/dist/{extensions-FRYhx7qa.js → extensions-DOLZkLzV.js} +173 -173
- package/dist/{eye-BKj9Tfnc.js → eye-DChfk0gi.js} +1 -1
- package/dist/{cdn/chunks/fr-CSgYtjOd.js → fr-CYbamiI6.js} +114 -2
- package/dist/{image-DNdvdTla.js → image--Hj2by1G.js} +1 -1
- package/dist/index.d.ts +182 -14
- package/dist/{info-Bx-kBkbH.js → info-BbXgy82f.js} +1 -1
- package/dist/{cdn/chunks/ja-B7H3ID8O.js → ja-DfaIAoGI.js} +114 -2
- package/dist/keys-BCqskl51.js +9 -0
- package/dist/languageName-DEEOhDWI.js +10 -0
- package/dist/{link-D8-rYdIQ.js → link-C2_8yJno.js} +1 -1
- package/dist/{liquid.browser-D1RxawkY.js → liquid.browser-DUXEekoN.js} +781 -745
- package/dist/{list-BneisA27.js → list-DLGs2n0V.js} +1 -1
- package/dist/{loader-circle-DBEXphyx.js → loader-circle-BbDItE_O.js} +1 -1
- package/dist/{message-circle-Bg4xInCM.js → message-circle-NAModq0p.js} +1 -1
- package/dist/{cdn/chunks/nl-176ySmc5.js → nl-DkrB-VKZ.js} +114 -2
- package/dist/normalizeMergeTagMarkup-CUCo7B5X.js +288 -0
- package/dist/noticeTones-D7BPu-Le.js +14 -0
- package/dist/{package-B40Vkfsp.js → package-BuzsfRyH.js} +1 -1
- package/dist/{pencil-CYdAHTds.js → pencil-BTUUECH4.js} +1 -1
- package/dist/plural-CyxrJXL1.js +15 -0
- package/dist/plus-Dm7DN65T.js +13 -0
- package/dist/{preRenderCustomBlocks-AbZArwkR.js → preRenderCustomBlocks-Bs3N9no-.js} +4 -4
- package/dist/{pt-BR-dDlTwX18.js → pt-BR-CY5Ye7eP.js} +114 -0
- package/dist/{refresh-cw-Bb1FWrU0.js → refresh-cw-xMURqGWi.js} +2 -12
- package/dist/rotate-ccw-DqVcEIn5.js +13 -0
- package/dist/{runtime-dom.esm-bundler-CLGymEyk.js → runtime-dom.esm-bundler-DlHp8xgy.js} +167 -167
- package/dist/sanitizeHtml-mKgNUdME.js +962 -0
- package/dist/{search-BZEo08gi.js → search-Cfr3W44N.js} +1 -1
- package/dist/{send-DHtrnXQs.js → send-CH1SrvyB.js} +1 -1
- package/dist/{smartphone-dlN3vpA3.js → smartphone-pAkvzjdI.js} +1 -1
- package/dist/socialIcons-Dqr4DJOz.js +2705 -0
- package/dist/{sparkles-NOttoDnJ.js → sparkles-CRO0cCnp.js} +1 -1
- package/dist/{square-B1CJgdt2.js → square-CaQWMntx.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{cdn/chunks/styleConstants-B8xVRiwX.js → styleConstants-CgiNKdnc.js} +5 -7
- package/dist/templatical-editor.js +2294 -1608
- package/dist/{text-align-start-zpoXmb-Z.js → text-align-start-BQ39AaRK.js} +1 -1
- package/dist/{trash-CGbk4Sgt.js → trash-BL5gEFHN.js} +1 -1
- package/dist/{triangle-alert-CKLMyGVp.js → triangle-alert-BYbKu7zZ.js} +1 -1
- package/dist/{upload-DQoackAn.js → upload-BhmL4Vqx.js} +1 -1
- package/dist/{useCloudI18n-DcLtxOQZ.js → useCloudI18n-Dh2iydo1.js} +4 -4
- package/dist/useEditorRoot-DY3mgcHm.js +7 -0
- package/dist/{useI18n-CeTm777E.js → useI18n-CgtvtF4C.js} +4 -4
- package/dist/useLocalizedDisplay-DNNwDRxL.js +31 -0
- package/dist/{useLogicTag-DFDYJeMN.js → useLogicTag-BXXXQQmi.js} +4 -4
- package/dist/{useMergeTag-B46vACAG.js → useMergeTag-C9Okr87y.js} +5 -5
- package/dist/usePopoverPosition-VDQjyX_A.js +76 -0
- package/dist/{useScrollToBlock-C-NzvjeO.js → useScrollToBlock-C0Kapxdh.js} +5 -5
- package/dist/{vue.runtime.esm-bundler-CrlI8j5R.js → vue.runtime.esm-bundler-BJXc_Mri.js} +1247 -1239
- package/dist/withCurrentFont-DJiQqZzL.js +18 -0
- package/dist/{x-zcrnmcmU.js → x-B7NZYzhx.js} +1 -1
- package/package.json +23 -23
- package/dist/AiAltTextPopover-Cm11CsKH.js +0 -105
- package/dist/BlockIssueBadge-6Ri2FfX-.js +0 -33
- package/dist/BlockPreviewCanvas-Df9iz7sK.js +0 -140
- package/dist/CollaborationNotices-JQ3vQoqO.js +0 -75
- package/dist/CommentsPanel-BuftXc0U.js +0 -16
- package/dist/CommentsSidebar-Co3x4uH0.js +0 -499
- package/dist/CountdownToolbar-CrL4WKy9.js +0 -197
- package/dist/MergeTagInput-DE7kWwXx.js +0 -80
- package/dist/MergeTagTextarea-DVPQkiYY.js +0 -69
- package/dist/SavedBlocksBrowserModal-SRtN5h9q.js +0 -359
- package/dist/TemplateSettings-D0XcH32O.js +0 -236
- package/dist/TestEmailModal-Cb5t0yB2.js +0 -209
- package/dist/TitleEditor-BYk_9SpQ.js +0 -198
- package/dist/ToggleSwitch-poGWbduy.js +0 -36
- package/dist/Toolbar-Dku_pZni.js +0 -3145
- package/dist/VersionPreviewBanner-CSs7zum_.js +0 -37
- package/dist/WrapperBlock-DwjK_IdJ.js +0 -44
- package/dist/cdn/chunks/AiAltTextPopover-DjMoJCgU.js +0 -106
- package/dist/cdn/chunks/AiAltTextPopover-DjMoJCgU.js.map +0 -1
- package/dist/cdn/chunks/AiAltTextReview-BafAtBoA.js.map +0 -1
- package/dist/cdn/chunks/AiChatPanel-DXeZgc7D.js +0 -474
- package/dist/cdn/chunks/AiChatPanel-DXeZgc7D.js.map +0 -1
- package/dist/cdn/chunks/AiRewriteMenu-4F6vwhJ5.js.map +0 -1
- package/dist/cdn/chunks/BlockIssueBadge-DIJDqqcY.js +0 -34
- package/dist/cdn/chunks/BlockIssueBadge-DIJDqqcY.js.map +0 -1
- package/dist/cdn/chunks/BlockPreviewCanvas-Ny1X_mee.js +0 -142
- package/dist/cdn/chunks/CollaborationNotices-Hf8r08Sw.js +0 -77
- package/dist/cdn/chunks/CollaborationNotices-Hf8r08Sw.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-CAiwilM2.js +0 -18
- package/dist/cdn/chunks/CommentsSidebar-Dj8sDiLN.js +0 -469
- package/dist/cdn/chunks/CommentsSidebar-Dj8sDiLN.js.map +0 -1
- package/dist/cdn/chunks/CountdownToolbar-CguFJdqn.js +0 -199
- package/dist/cdn/chunks/CountdownToolbar-CguFJdqn.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-pr7_nuLI.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-B_ldj3TO.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-CGfzcHwP.js.map +0 -1
- package/dist/cdn/chunks/MergeTagModeToggle-BFpK5dxg.js.map +0 -1
- package/dist/cdn/chunks/MergeTagTextarea-Zo0mYWbf.js +0 -71
- package/dist/cdn/chunks/MergeTagTextarea-Zo0mYWbf.js.map +0 -1
- package/dist/cdn/chunks/ParagraphEditor-DsPLVAgm.js +0 -631
- package/dist/cdn/chunks/ParagraphEditor-DsPLVAgm.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-B9XCjDfm.js +0 -356
- package/dist/cdn/chunks/TemplateSettings-jWpmuWDR.js +0 -208
- package/dist/cdn/chunks/TemplateSettings-jWpmuWDR.js.map +0 -1
- package/dist/cdn/chunks/TestEmailModal-DcwKhFnI.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-R2lQw6WA.js +0 -198
- package/dist/cdn/chunks/TitleEditor-R2lQw6WA.js.map +0 -1
- package/dist/cdn/chunks/ToggleSwitch-BDMugNES.js +0 -38
- package/dist/cdn/chunks/ToggleSwitch-BDMugNES.js.map +0 -1
- package/dist/cdn/chunks/Toolbar-CnvfW72e.js +0 -3061
- package/dist/cdn/chunks/Toolbar-CnvfW72e.js.map +0 -1
- package/dist/cdn/chunks/VersionPreviewBanner-CZ--HOoa.js +0 -39
- package/dist/cdn/chunks/VersionPreviewBanner-CZ--HOoa.js.map +0 -1
- package/dist/cdn/chunks/WrapperBlock-D3obNGab.js +0 -46
- package/dist/cdn/chunks/WrapperBlock-D3obNGab.js.map +0 -1
- package/dist/cdn/chunks/blockTypeIcons-DFf7AyqI.js +0 -21
- package/dist/cdn/chunks/blockTypeIcons-DFf7AyqI.js.map +0 -1
- package/dist/cdn/chunks/ca-CD-Kt1qz.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-D6niZ2Rc.js.map +0 -1
- package/dist/cdn/chunks/de-CeFJ6wbM.js.map +0 -1
- package/dist/cdn/chunks/draggable-B8hTTYFO.js.map +0 -1
- package/dist/cdn/chunks/en-CKAXAo3Z.js +0 -1
- package/dist/cdn/chunks/en-D14i5nFh.js.map +0 -1
- package/dist/cdn/chunks/es-zDacbMhs.js.map +0 -1
- package/dist/cdn/chunks/fr-CSgYtjOd.js.map +0 -1
- package/dist/cdn/chunks/icons-HCBP93Ch.js.map +0 -1
- package/dist/cdn/chunks/ja-B7H3ID8O.js.map +0 -1
- package/dist/cdn/chunks/keys-BF9gazbd.js +0 -11
- package/dist/cdn/chunks/keys-BF9gazbd.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-DkLBNrft.js.map +0 -1
- package/dist/cdn/chunks/nl-176ySmc5.js.map +0 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DpHCSESZ.js +0 -198
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DpHCSESZ.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-dDlTwX18.js.map +0 -1
- package/dist/cdn/chunks/sanitizeHtml-B2h15u0_.js +0 -72
- package/dist/cdn/chunks/sanitizeHtml-B2h15u0_.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-rJoqO1TJ.js +0 -2008
- package/dist/cdn/chunks/socialIcons-rJoqO1TJ.js.map +0 -1
- package/dist/cdn/chunks/src-BKpAis_q.js.map +0 -1
- package/dist/cdn/chunks/src-C9DTvn1H.js +0 -1423
- package/dist/cdn/chunks/src-C9DTvn1H.js.map +0 -1
- package/dist/cdn/chunks/src-CUH_EI7k.js.map +0 -1
- package/dist/cdn/chunks/styleConstants-B8xVRiwX.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-CjaEV_01.js +0 -2534
- package/dist/cdn/chunks/useEditorCore-CjaEV_01.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-BT3c9CXj.js +0 -9
- package/dist/cdn/chunks/usePopoverPosition-AnVIwiVv.js +0 -70
- package/dist/cdn/chunks/usePopoverPosition-AnVIwiVv.js.map +0 -1
- package/dist/cdn/chunks/useScrollToBlock-C0dawxGr.js.map +0 -1
- package/dist/dist-CzrLYq2s.js +0 -1363
- package/dist/dist-DyFArF_G.js +0 -4
- package/dist/dist-pA3ooG6N.js +0 -4
- package/dist/en-CyEE7FPY.js +0 -1
- package/dist/keys-DBjrQkYH.js +0 -9
- package/dist/normalizeMergeTagMarkup-IH8COHzd.js +0 -196
- package/dist/sanitizeHtml-CnOA1efV.js +0 -942
- package/dist/socialIcons-B_d52_eS.js +0 -2075
- package/dist/useEditorCore-DG9UvWUm.js +0 -4011
- package/dist/useEditorRoot-BKr6nNkC.js +0 -7
- package/dist/usePopoverPosition-C42kD7zt.js +0 -68
- package/dist/withCurrentFont-v_a4Oso8.js +0 -18
|
@@ -1,4011 +0,0 @@
|
|
|
1
|
-
import { A as e, At as t, C as n, D as r, G as i, H as a, I as o, M as s, Mt as c, N as l, O as u, P as d, Q as f, V as p, X as m, Y as h, _ as g, at as _, b as v, c as y, d as b, et as x, f as S, g as C, it as w, j as T, jt as E, k as D, l as O, ot as k, q as A, r as j, rt as M, u as N, v as ee, x as P, y as F, z as I } from "./vue.runtime.esm-bundler-CrlI8j5R.js";
|
|
2
|
-
import { c as L, o as te, s as ne } from "./runtime-dom.esm-bundler-CLGymEyk.js";
|
|
3
|
-
import { $ as re, A as ie, At as ae, B as oe, Ct as se, D as ce, Dt as le, E as ue, Et as de, F as fe, G as pe, K as me, L as he, M as ge, N as _e, O as ve, Ot as ye, P as be, Q as xe, R as Se, S as Ce, St as we, T as Te, Tt as Ee, V as De, W as Oe, Z as ke, _t as Ae, at as je, bt as Me, c as Ne, ct as Pe, d as Fe, ft as Ie, g as Le, gt as Re, h as ze, ht as Be, j as Ve, kt as He, nt as Ue, o as We, ot as Ge, p as Ke, q as qe, s as Je, st as Ye, tt as Xe, u as Ze, vt as Qe, w as $e, wt as et, xt as tt, yt as nt, z as rt } from "./dist-CzrLYq2s.js";
|
|
4
|
-
import { B as it, D as at, E as ot, L as st, M as ct, N as lt, O as ut, R as dt, S as ft, V as pt, _ as mt, a as ht, b as gt, d as _t, g as vt, l as yt, m as bt, n as xt, t as St, v as Ct, w as wt, x as Tt, y as Et } from "./socialIcons-B_d52_eS.js";
|
|
5
|
-
import { _ as Dt, h as Ot, v as kt, y as At } from "./dist-CEdyyDn7.js";
|
|
6
|
-
import { a as jt, c as Mt, i as Nt } from "./dist-BA-jTQgw.js";
|
|
7
|
-
import { $ as Pt, A as Ft, B as It, C as Lt, D as Rt, E as zt, F as Bt, H as Vt, I as Ht, J as Ut, K as Wt, L as Gt, M as Kt, N as qt, O as Jt, P as Yt, Q as Xt, R as Zt, S as Qt, T as $t, V as en, W as tn, X as nn, Y as rn, Z as an, _ as on, a as sn, b as cn, c as ln, d as un, f as dn, g as fn, h as pn, j as mn, k as hn, l as gn, m as _n, n as vn, o as yn, p as bn, q as xn, r as Sn, s as Cn, v as wn, w as Tn, x as En, y as Dn, z as On } from "./keys-DBjrQkYH.js";
|
|
8
|
-
import { t as R } from "./logger-BOu7oEtk.js";
|
|
9
|
-
import { t as kn } from "./useI18n-CeTm777E.js";
|
|
10
|
-
import { i as An, r as jn, s as Mn, t as Nn } from "./usePopoverPosition-C42kD7zt.js";
|
|
11
|
-
import { r as Pn, t as Fn } from "./templateSettingsFields-cjlP-jdw.js";
|
|
12
|
-
import { n as In, t as Ln } from "./sanitizeHtml-CnOA1efV.js";
|
|
13
|
-
import { t as Rn } from "./createLucideIcon-BV7Gwz_Z.js";
|
|
14
|
-
import { n as zn } from "./upload-DQoackAn.js";
|
|
15
|
-
import { t as Bn } from "./image-DNdvdTla.js";
|
|
16
|
-
import { t as Vn } from "./message-circle-Bg4xInCM.js";
|
|
17
|
-
import { t as Hn } from "./trash-CGbk4Sgt.js";
|
|
18
|
-
import { t as Un } from "./triangle-alert-CKLMyGVp.js";
|
|
19
|
-
import { t as Wn } from "./LoadingTrack-DZA5AoP9.js";
|
|
20
|
-
import { t as Gn } from "./_plugin-vue_export-helper-Djzt4Yr7.js";
|
|
21
|
-
import { t as Kn } from "./useEditorRoot-BKr6nNkC.js";
|
|
22
|
-
import "./useCloudI18n-DcLtxOQZ.js";
|
|
23
|
-
import { t as qn } from "./useMergeTag-B46vACAG.js";
|
|
24
|
-
import { t as Jn } from "./useLogicTag-DFDYJeMN.js";
|
|
25
|
-
import { t as Yn } from "./readableTextColor-BfZUGnVj.js";
|
|
26
|
-
// src/utils/activeEditorTracker.ts
|
|
27
|
-
var Xn = /* @__PURE__ */ new Set(), Zn = 0, Qn = 0;
|
|
28
|
-
function $n() {
|
|
29
|
-
let e = ++Qn;
|
|
30
|
-
return Xn.add(e), Zn === 0 && (Zn = e), {
|
|
31
|
-
id: e,
|
|
32
|
-
isActive: () => Xn.size <= 1 || Zn === e,
|
|
33
|
-
claim: () => {
|
|
34
|
-
Zn = e;
|
|
35
|
-
},
|
|
36
|
-
dispose: () => {
|
|
37
|
-
if (Xn.delete(e), Zn === e) {
|
|
38
|
-
let e = Array.from(Xn);
|
|
39
|
-
Zn = e[e.length - 1] ?? 0;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
// src/composables/usePreviewResolution.ts
|
|
45
|
-
var er = 500;
|
|
46
|
-
function tr(e) {
|
|
47
|
-
let t = typeof e.resolvePreview == "function", n = f(null), r = f(!1), i = f(!1), a = 0, o = null;
|
|
48
|
-
function s() {
|
|
49
|
-
o !== null && (clearTimeout(o), o = null);
|
|
50
|
-
}
|
|
51
|
-
async function c() {
|
|
52
|
-
let t = e.resolvePreview;
|
|
53
|
-
if (!t) return;
|
|
54
|
-
let o = ++a;
|
|
55
|
-
r.value = !0;
|
|
56
|
-
let s = {
|
|
57
|
-
content: we(e.getContent()),
|
|
58
|
-
...e.getRecipient?.() === void 0 ? {} : { recipient: e.getRecipient() }
|
|
59
|
-
};
|
|
60
|
-
try {
|
|
61
|
-
let e = await t(s);
|
|
62
|
-
if (o !== a) return;
|
|
63
|
-
if (!Pe(e)) {
|
|
64
|
-
i.value = !0;
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
n.value = e, i.value = !1;
|
|
68
|
-
} catch {
|
|
69
|
-
if (o !== a) return;
|
|
70
|
-
i.value = !0;
|
|
71
|
-
} finally {
|
|
72
|
-
o === a && (r.value = !1);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
function l() {
|
|
76
|
-
t && (s(), n.value === null ? c() : o = setTimeout(() => {
|
|
77
|
-
o = null, c();
|
|
78
|
-
}, er));
|
|
79
|
-
}
|
|
80
|
-
return I(() => [e.isActive(), e.getRecipient?.()], ([e]) => {
|
|
81
|
-
e ? l() : (s(), a++, r.value = !1, n.value = null, i.value = !1);
|
|
82
|
-
}, { immediate: !0 }), h(() => {
|
|
83
|
-
s(), a++;
|
|
84
|
-
}), {
|
|
85
|
-
isConfigured: t,
|
|
86
|
-
content: y(() => n.value ?? e.getContent()),
|
|
87
|
-
isResolving: r,
|
|
88
|
-
isInitialResolve: y(() => r.value && n.value === null),
|
|
89
|
-
hasFailed: i,
|
|
90
|
-
supersedesSamples: y(() => t)
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
// src/composables/useMergeTagPicker.ts
|
|
94
|
-
function nr() {
|
|
95
|
-
let e = f(!1), t = f([]), n = f(null), r = null;
|
|
96
|
-
function a(i, a) {
|
|
97
|
-
if (r) {
|
|
98
|
-
let e = r;
|
|
99
|
-
r = null, e(null);
|
|
100
|
-
}
|
|
101
|
-
return t.value = i, n.value = a?.current ?? null, e.value = !0, new Promise((e) => {
|
|
102
|
-
r = e;
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
function o(i) {
|
|
106
|
-
let a = r;
|
|
107
|
-
r = null, e.value = !1, t.value = [], n.value = null, a && a(i);
|
|
108
|
-
}
|
|
109
|
-
return i() && h(() => {
|
|
110
|
-
if (r) {
|
|
111
|
-
let e = r;
|
|
112
|
-
r = null, e(null);
|
|
113
|
-
}
|
|
114
|
-
e.value = !1, t.value = [], n.value = null;
|
|
115
|
-
}), {
|
|
116
|
-
isOpen: e,
|
|
117
|
-
tags: t,
|
|
118
|
-
current: n,
|
|
119
|
-
open: a,
|
|
120
|
-
resolve: o
|
|
121
|
-
};
|
|
122
|
-
}
|
|
123
|
-
// src/composables/useLogicTagPicker.ts
|
|
124
|
-
function rr() {
|
|
125
|
-
let e = f(!1), t = f([]), n = f([]), r = null;
|
|
126
|
-
function a(i, a) {
|
|
127
|
-
if (r) {
|
|
128
|
-
let e = r;
|
|
129
|
-
r = null, e(null);
|
|
130
|
-
}
|
|
131
|
-
return t.value = i, n.value = a, e.value = !0, new Promise((e) => {
|
|
132
|
-
r = e;
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
function o(i) {
|
|
136
|
-
let a = r;
|
|
137
|
-
r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
|
|
138
|
-
}
|
|
139
|
-
return i() && h(() => {
|
|
140
|
-
if (r) {
|
|
141
|
-
let e = r;
|
|
142
|
-
r = null, e(null);
|
|
143
|
-
}
|
|
144
|
-
e.value = !1, t.value = [], n.value = [];
|
|
145
|
-
}), {
|
|
146
|
-
isOpen: e,
|
|
147
|
-
tags: t,
|
|
148
|
-
pairs: n,
|
|
149
|
-
open: a,
|
|
150
|
-
resolve: o
|
|
151
|
-
};
|
|
152
|
-
}
|
|
153
|
-
// src/composables/useTemplateLint.ts
|
|
154
|
-
function ir(e) {
|
|
155
|
-
return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 && e.deliverability === !1 && e.compatibility === !1 : !1;
|
|
156
|
-
}
|
|
157
|
-
var ar = !1;
|
|
158
|
-
function or(e) {
|
|
159
|
-
let t = f([]), n = f(0), r = f(-1), i = I(e.content, () => {
|
|
160
|
-
n.value++;
|
|
161
|
-
}, {
|
|
162
|
-
deep: !0,
|
|
163
|
-
flush: "sync"
|
|
164
|
-
}), a = f(!1), o = f(!1), s = x(null), c = ir(e.options), l = null, u = !1;
|
|
165
|
-
c || d();
|
|
166
|
-
async function d() {
|
|
167
|
-
try {
|
|
168
|
-
let t = await import("@templatical/quality");
|
|
169
|
-
if (u) return;
|
|
170
|
-
s.value = { lintTemplate: t.lintTemplate }, a.value = !0, p(), l = At(e.content, p, {
|
|
171
|
-
debounce: e.debounce ?? 500,
|
|
172
|
-
deep: !0
|
|
173
|
-
});
|
|
174
|
-
} catch {
|
|
175
|
-
if (u) return;
|
|
176
|
-
o.value = !0, ar || (ar = !0, R.info("@templatical/quality isn't installed, so the Issues panel and its lint badges are off. Add @templatical/quality to your dependencies to turn them on."));
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
function p() {
|
|
180
|
-
if (!s.value) return;
|
|
181
|
-
let i = s.value.lintTemplate(e.content.value, e.options);
|
|
182
|
-
r.value = n.value, t.value = i;
|
|
183
|
-
}
|
|
184
|
-
let m = I(() => e.options, () => {
|
|
185
|
-
s.value && p();
|
|
186
|
-
}, { deep: !0 });
|
|
187
|
-
function h(t) {
|
|
188
|
-
t.fix && t.fix.apply({
|
|
189
|
-
updateBlock: e.updateBlock,
|
|
190
|
-
updateSettings: e.updateSettings,
|
|
191
|
-
removeBlock: e.removeBlock
|
|
192
|
-
});
|
|
193
|
-
}
|
|
194
|
-
function g() {
|
|
195
|
-
u = !0, l?.(), i(), m();
|
|
196
|
-
}
|
|
197
|
-
return {
|
|
198
|
-
issues: t,
|
|
199
|
-
contentVersion: n,
|
|
200
|
-
lintVersion: r,
|
|
201
|
-
ready: a,
|
|
202
|
-
unavailable: o,
|
|
203
|
-
applyFix: h,
|
|
204
|
-
destroy: g
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
// src/composables/useKeyboardReorder.ts
|
|
208
|
-
function sr(e, t, n = []) {
|
|
209
|
-
let r = f(null), i = f(""), a = null;
|
|
210
|
-
function o(t) {
|
|
211
|
-
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
212
|
-
if (r !== -1) return {
|
|
213
|
-
index: r,
|
|
214
|
-
total: n.length
|
|
215
|
-
};
|
|
216
|
-
for (let e of n) {
|
|
217
|
-
if (e.type !== "section") continue;
|
|
218
|
-
let n = e;
|
|
219
|
-
for (let e = 0; e < n.children.length; e++) {
|
|
220
|
-
let r = n.children[e], i = r.findIndex((e) => e.id === t);
|
|
221
|
-
if (i !== -1) return {
|
|
222
|
-
index: i,
|
|
223
|
-
total: r.length,
|
|
224
|
-
sectionId: n.id,
|
|
225
|
-
columnIndex: e
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
return null;
|
|
230
|
-
}
|
|
231
|
-
function s(r) {
|
|
232
|
-
let i = o(r);
|
|
233
|
-
if (!i) return "";
|
|
234
|
-
let a = (i.sectionId ? c(i.sectionId, i.columnIndex ?? 0) : e.content.value.blocks)?.[i.index];
|
|
235
|
-
return a ? ft(a, t.t, n) : "";
|
|
236
|
-
}
|
|
237
|
-
function c(t, n) {
|
|
238
|
-
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
239
|
-
}
|
|
240
|
-
function l(e) {
|
|
241
|
-
i.value = "", queueMicrotask(() => {
|
|
242
|
-
i.value = e;
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
function u(e) {
|
|
246
|
-
return r.value === e;
|
|
247
|
-
}
|
|
248
|
-
function d(e) {
|
|
249
|
-
let n = o(e);
|
|
250
|
-
n && (r.value = e, a = n, l(t.format(t.t.blockActions.lifted, {
|
|
251
|
-
block: s(e),
|
|
252
|
-
position: String(n.index + 1),
|
|
253
|
-
total: String(n.total)
|
|
254
|
-
})));
|
|
255
|
-
}
|
|
256
|
-
function p(n, r) {
|
|
257
|
-
let i = o(n);
|
|
258
|
-
if (!i) return;
|
|
259
|
-
let a = i.index + r;
|
|
260
|
-
a < 0 || a >= i.total || (e.moveBlock(n, a, i.sectionId, i.columnIndex), l(t.format(t.t.blockActions.moved, {
|
|
261
|
-
block: s(n),
|
|
262
|
-
position: String(a + 1),
|
|
263
|
-
total: String(i.total)
|
|
264
|
-
})));
|
|
265
|
-
}
|
|
266
|
-
function m(e) {
|
|
267
|
-
p(e, -1);
|
|
268
|
-
}
|
|
269
|
-
function h(e) {
|
|
270
|
-
p(e, 1);
|
|
271
|
-
}
|
|
272
|
-
function g(e) {
|
|
273
|
-
let n = o(e);
|
|
274
|
-
n && l(t.format(t.t.blockActions.dropped, {
|
|
275
|
-
block: s(e),
|
|
276
|
-
position: String(n.index + 1),
|
|
277
|
-
total: String(n.total)
|
|
278
|
-
})), r.value = null, a = null;
|
|
279
|
-
}
|
|
280
|
-
function _() {
|
|
281
|
-
let n = r.value;
|
|
282
|
-
if (n && a) {
|
|
283
|
-
let r = o(n), i = !!r && (r.sectionId !== a.sectionId || r.columnIndex !== a.columnIndex), c = !!r && r.index !== a.index;
|
|
284
|
-
r && (i || c) && e.moveBlock(n, a.index, a.sectionId, a.columnIndex), l(t.format(t.t.blockActions.cancelled, {
|
|
285
|
-
block: s(n),
|
|
286
|
-
position: String(a.index + 1)
|
|
287
|
-
}));
|
|
288
|
-
}
|
|
289
|
-
r.value = null, a = null;
|
|
290
|
-
}
|
|
291
|
-
return {
|
|
292
|
-
liftedBlockId: r,
|
|
293
|
-
announcement: i,
|
|
294
|
-
isLifted: u,
|
|
295
|
-
lift: d,
|
|
296
|
-
cancel: _,
|
|
297
|
-
moveUp: m,
|
|
298
|
-
moveDown: h,
|
|
299
|
-
drop: g
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
// src/composables/useUiTheme.ts
|
|
303
|
-
function cr(e) {
|
|
304
|
-
let t = Mt("(prefers-color-scheme: dark)");
|
|
305
|
-
return { resolvedTheme: y(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
306
|
-
}
|
|
307
|
-
// src/composables/useThemeStyles.ts
|
|
308
|
-
var lr = {
|
|
309
|
-
bg: "--tpl-bg",
|
|
310
|
-
bgElevated: "--tpl-bg-elevated",
|
|
311
|
-
bgHover: "--tpl-bg-hover",
|
|
312
|
-
bgActive: "--tpl-bg-active",
|
|
313
|
-
border: "--tpl-border",
|
|
314
|
-
borderLight: "--tpl-border-light",
|
|
315
|
-
text: "--tpl-text",
|
|
316
|
-
textMuted: "--tpl-text-muted",
|
|
317
|
-
textDim: "--tpl-text-dim",
|
|
318
|
-
primary: "--tpl-primary",
|
|
319
|
-
primaryHover: "--tpl-primary-hover",
|
|
320
|
-
primaryLight: "--tpl-primary-light",
|
|
321
|
-
secondary: "--tpl-secondary",
|
|
322
|
-
secondaryHover: "--tpl-secondary-hover",
|
|
323
|
-
secondaryLight: "--tpl-secondary-light",
|
|
324
|
-
success: "--tpl-success",
|
|
325
|
-
successLight: "--tpl-success-light",
|
|
326
|
-
warning: "--tpl-warning",
|
|
327
|
-
warningLight: "--tpl-warning-light",
|
|
328
|
-
danger: "--tpl-danger",
|
|
329
|
-
dangerLight: "--tpl-danger-light",
|
|
330
|
-
canvasBg: "--tpl-canvas-bg"
|
|
331
|
-
};
|
|
332
|
-
function ur({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
333
|
-
return { themeStyles: y(() => {
|
|
334
|
-
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
335
|
-
if (a) for (let [e, t] of Object.entries(lr)) {
|
|
336
|
-
let n = a[e];
|
|
337
|
-
n && (r[t] = n);
|
|
338
|
-
}
|
|
339
|
-
return n && Object.assign(r, n()), r;
|
|
340
|
-
}) };
|
|
341
|
-
}
|
|
342
|
-
// src/composables/useBlockRegistry.ts
|
|
343
|
-
function dr() {
|
|
344
|
-
let e = x(/* @__PURE__ */ new Map());
|
|
345
|
-
function t(t, n) {
|
|
346
|
-
e.value.set(t, n), _(e);
|
|
347
|
-
}
|
|
348
|
-
function n(t, n) {
|
|
349
|
-
let r = `custom:${t.type}`, i = {
|
|
350
|
-
component: n,
|
|
351
|
-
createBlock: () => ce(t),
|
|
352
|
-
definition: t
|
|
353
|
-
};
|
|
354
|
-
e.value.set(r, i), _(e);
|
|
355
|
-
}
|
|
356
|
-
function r(t) {
|
|
357
|
-
if (t.type === "custom") {
|
|
358
|
-
let n = `custom:${t.customType}`;
|
|
359
|
-
return e.value.get(n)?.component;
|
|
360
|
-
}
|
|
361
|
-
return e.value.get(t.type)?.component;
|
|
362
|
-
}
|
|
363
|
-
function i(t) {
|
|
364
|
-
return e.value.get(t)?.createBlock();
|
|
365
|
-
}
|
|
366
|
-
function a(t) {
|
|
367
|
-
let n = `custom:${t}`;
|
|
368
|
-
return e.value.get(n)?.definition;
|
|
369
|
-
}
|
|
370
|
-
function o(e) {
|
|
371
|
-
return `<div style="color: var(--tpl-text-muted); padding: 16px; text-align: center; border: 1px dashed var(--tpl-border); border-radius: var(--tpl-radius-sm); font-family: var(--tpl-font-family); font-size: 14px;">${e}</div>`;
|
|
372
|
-
}
|
|
373
|
-
async function s(e) {
|
|
374
|
-
let t = a(e.customType);
|
|
375
|
-
if (!t) return o("Block definition not found");
|
|
376
|
-
try {
|
|
377
|
-
return await ve(await import("./liquid.browser-D1RxawkY.js")).parseAndRender(t.template, e.fieldValues);
|
|
378
|
-
} catch (t) {
|
|
379
|
-
return R.error(`Failed to render custom block "${e.customType}":`, t), o(`Render error: ${e.customType}`);
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
function c(t) {
|
|
383
|
-
return e.value.has(t);
|
|
384
|
-
}
|
|
385
|
-
return {
|
|
386
|
-
registerBuiltIn: t,
|
|
387
|
-
registerCustom: n,
|
|
388
|
-
getComponent: r,
|
|
389
|
-
createBlock: i,
|
|
390
|
-
getDefinition: a,
|
|
391
|
-
renderCustomBlock: s,
|
|
392
|
-
isRegistered: c
|
|
393
|
-
};
|
|
394
|
-
}
|
|
395
|
-
// src/composables/useCustomBlockStylesheets.ts
|
|
396
|
-
function fr(e, t) {
|
|
397
|
-
return y(() => {
|
|
398
|
-
let n = pr(e.value.blocks);
|
|
399
|
-
if (n.size === 0) return [];
|
|
400
|
-
let r = /* @__PURE__ */ new Set(), i = [];
|
|
401
|
-
for (let e of n) {
|
|
402
|
-
let n = t.getDefinition(e)?.stylesheet;
|
|
403
|
-
if (!n) continue;
|
|
404
|
-
let a = n.trim();
|
|
405
|
-
a === "" || r.has(a) || (r.add(a), i.push(a));
|
|
406
|
-
}
|
|
407
|
-
return i;
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
function pr(e) {
|
|
411
|
-
let t = /* @__PURE__ */ new Set();
|
|
412
|
-
return mr(e, t), t;
|
|
413
|
-
}
|
|
414
|
-
function mr(e, t) {
|
|
415
|
-
for (let n of e) if (je(n)) t.add(n.customType);
|
|
416
|
-
else if (n.type === "section") {
|
|
417
|
-
let e = n.children;
|
|
418
|
-
if (!e) continue;
|
|
419
|
-
for (let n of e) mr(n, t);
|
|
420
|
-
} else Ie(n) && mr(n.children, t);
|
|
421
|
-
}
|
|
422
|
-
// src/utils/registerBuiltInBlocks.ts
|
|
423
|
-
var hr = [
|
|
424
|
-
{
|
|
425
|
-
type: "section",
|
|
426
|
-
createBlock: fe
|
|
427
|
-
},
|
|
428
|
-
{
|
|
429
|
-
type: "title",
|
|
430
|
-
createBlock: oe
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
type: "paragraph",
|
|
434
|
-
createBlock: be
|
|
435
|
-
},
|
|
436
|
-
{
|
|
437
|
-
type: "image",
|
|
438
|
-
createBlock: ge
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
type: "button",
|
|
442
|
-
createBlock: Te
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
type: "divider",
|
|
446
|
-
createBlock: ie
|
|
447
|
-
},
|
|
448
|
-
{
|
|
449
|
-
type: "video",
|
|
450
|
-
createBlock: De
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
type: "social",
|
|
454
|
-
createBlock: he
|
|
455
|
-
},
|
|
456
|
-
{
|
|
457
|
-
type: "menu",
|
|
458
|
-
createBlock: _e
|
|
459
|
-
},
|
|
460
|
-
{
|
|
461
|
-
type: "table",
|
|
462
|
-
createBlock: rt
|
|
463
|
-
},
|
|
464
|
-
{
|
|
465
|
-
type: "spacer",
|
|
466
|
-
createBlock: Se
|
|
467
|
-
},
|
|
468
|
-
{
|
|
469
|
-
type: "html",
|
|
470
|
-
createBlock: Ve
|
|
471
|
-
},
|
|
472
|
-
{
|
|
473
|
-
type: "countdown",
|
|
474
|
-
createBlock: ue
|
|
475
|
-
}
|
|
476
|
-
];
|
|
477
|
-
function gr(e, t) {
|
|
478
|
-
for (let n of hr) {
|
|
479
|
-
let r = t[n.type];
|
|
480
|
-
r && e.registerBuiltIn(n.type, {
|
|
481
|
-
component: r,
|
|
482
|
-
createBlock: n.createBlock
|
|
483
|
-
});
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
// src/utils/resolveHtmlBlockPreview.ts
|
|
487
|
-
function _r(e) {
|
|
488
|
-
return typeof e == "boolean" ? e : e?.enabled ?? !1;
|
|
489
|
-
}
|
|
490
|
-
// src/utils/collectOffPaletteDefaults.ts
|
|
491
|
-
function vr(e) {
|
|
492
|
-
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
493
|
-
}
|
|
494
|
-
function yr(e, t, n) {
|
|
495
|
-
let r = new Set(e.map((e) => jn(e))), i = [], a = (e, t) => {
|
|
496
|
-
for (let [n, o] of Object.entries(e)) typeof o == "string" ? o !== "" && /color$/i.test(n) && !r.has(jn(o)) && i.push(`${t}.${n}: ${o}`) : vr(o) && a(o, `${t}.${n}`);
|
|
497
|
-
}, o = t;
|
|
498
|
-
for (let [e, t] of Object.entries(We)) {
|
|
499
|
-
let n = o?.[e];
|
|
500
|
-
a({
|
|
501
|
-
...t,
|
|
502
|
-
...vr(n) ? n : {}
|
|
503
|
-
}, e);
|
|
504
|
-
}
|
|
505
|
-
return a({
|
|
506
|
-
...Je,
|
|
507
|
-
...n ?? {}
|
|
508
|
-
}, "template"), i;
|
|
509
|
-
}
|
|
510
|
-
// src/utils/localizedBlockDefaults.ts
|
|
511
|
-
function br(e) {
|
|
512
|
-
return {
|
|
513
|
-
title: { content: `<p>${e.blockDefaults.title}</p>` },
|
|
514
|
-
paragraph: { content: `<p>${e.blockDefaults.paragraph}</p>` },
|
|
515
|
-
button: { text: e.blockDefaults.button }
|
|
516
|
-
};
|
|
517
|
-
}
|
|
518
|
-
// src/i18n/index.ts
|
|
519
|
-
var xr = /* #__PURE__ */ Object.assign({
|
|
520
|
-
"./locales/ca.ts": () => import("./ca-CD-Kt1qz.js"),
|
|
521
|
-
"./locales/de.ts": () => import("./de-CeFJ6wbM.js"),
|
|
522
|
-
"./locales/en.ts": () => import("./en-D14i5nFh.js"),
|
|
523
|
-
"./locales/es.ts": () => import("./es-zDacbMhs.js"),
|
|
524
|
-
"./locales/fr.ts": () => import("./fr-CSgYtjOd.js"),
|
|
525
|
-
"./locales/ja.ts": () => import("./ja-B7H3ID8O.js"),
|
|
526
|
-
"./locales/nl.ts": () => import("./nl-176ySmc5.js"),
|
|
527
|
-
"./locales/pt-BR.ts": () => import("./pt-BR-dDlTwX18.js")
|
|
528
|
-
}), Sr = /* #__PURE__ */ Object.assign({
|
|
529
|
-
"./locales/cloud/de.ts": () => import("./de-6M4JoHoD.js"),
|
|
530
|
-
"./locales/cloud/en.ts": () => import("./en-FzUuJ8HW.js"),
|
|
531
|
-
"./locales/cloud/pt-BR.ts": () => import("./pt-BR-Bp92Fc6J.js")
|
|
532
|
-
});
|
|
533
|
-
function Cr(e) {
|
|
534
|
-
return Object.keys(e).map((e) => e.match(/\/([^/]+)\.ts$/)?.[1]).filter((e) => !!e);
|
|
535
|
-
}
|
|
536
|
-
var wr = Cr(xr), Tr = Cr(Sr);
|
|
537
|
-
function Er(e) {
|
|
538
|
-
return e.trim().replace(/_/g, "-").toLowerCase();
|
|
539
|
-
}
|
|
540
|
-
function Dr(e, t) {
|
|
541
|
-
let n = Er(e);
|
|
542
|
-
return t.find((e) => Er(e) === n);
|
|
543
|
-
}
|
|
544
|
-
function Or(e) {
|
|
545
|
-
return Er(e).split("-")[0];
|
|
546
|
-
}
|
|
547
|
-
function kr(e, t) {
|
|
548
|
-
return Dr(e, t) ?? Dr(Or(e), t);
|
|
549
|
-
}
|
|
550
|
-
function Ar(e, t) {
|
|
551
|
-
return kr(e, t) ?? "en";
|
|
552
|
-
}
|
|
553
|
-
async function jr(e) {
|
|
554
|
-
let t = xr[`./locales/${Ar(e, wr)}.ts`];
|
|
555
|
-
return (await t()).default;
|
|
556
|
-
}
|
|
557
|
-
async function Mr(e) {
|
|
558
|
-
let t = Sr[`./locales/cloud/${Ar(e, Tr)}.ts`];
|
|
559
|
-
return (await t()).default;
|
|
560
|
-
}
|
|
561
|
-
function Nr(e) {
|
|
562
|
-
return kr(e, wr) !== void 0;
|
|
563
|
-
}
|
|
564
|
-
function Pr(e) {
|
|
565
|
-
return kr(e, Tr) !== void 0;
|
|
566
|
-
}
|
|
567
|
-
function Fr() {
|
|
568
|
-
return [...wr];
|
|
569
|
-
}
|
|
570
|
-
function Ir() {
|
|
571
|
-
return [...Tr];
|
|
572
|
-
}
|
|
573
|
-
// src/i18n/contentDefaults.ts
|
|
574
|
-
var Lr = {
|
|
575
|
-
en: {
|
|
576
|
-
video: "Video",
|
|
577
|
-
days: "Days",
|
|
578
|
-
hours: "Hours",
|
|
579
|
-
minutes: "Minutes",
|
|
580
|
-
seconds: "Seconds",
|
|
581
|
-
expired: "This offer has expired"
|
|
582
|
-
},
|
|
583
|
-
de: {
|
|
584
|
-
video: "Video",
|
|
585
|
-
days: "Tage",
|
|
586
|
-
hours: "Stunden",
|
|
587
|
-
minutes: "Minuten",
|
|
588
|
-
seconds: "Sekunden",
|
|
589
|
-
expired: "Dieses Angebot ist abgelaufen"
|
|
590
|
-
},
|
|
591
|
-
es: {
|
|
592
|
-
video: "Vídeo",
|
|
593
|
-
days: "Días",
|
|
594
|
-
hours: "Horas",
|
|
595
|
-
minutes: "Minutos",
|
|
596
|
-
seconds: "Segundos",
|
|
597
|
-
expired: "Esta oferta ha expirado"
|
|
598
|
-
},
|
|
599
|
-
fr: {
|
|
600
|
-
video: "Vidéo",
|
|
601
|
-
days: "Jours",
|
|
602
|
-
hours: "Heures",
|
|
603
|
-
minutes: "Minutes",
|
|
604
|
-
seconds: "Secondes",
|
|
605
|
-
expired: "Cette offre a expiré"
|
|
606
|
-
},
|
|
607
|
-
nl: {
|
|
608
|
-
video: "Video",
|
|
609
|
-
days: "Dagen",
|
|
610
|
-
hours: "Uren",
|
|
611
|
-
minutes: "Minuten",
|
|
612
|
-
seconds: "Seconden",
|
|
613
|
-
expired: "Deze aanbieding is verlopen"
|
|
614
|
-
},
|
|
615
|
-
"pt-BR": {
|
|
616
|
-
video: "Vídeo",
|
|
617
|
-
days: "Dias",
|
|
618
|
-
hours: "Horas",
|
|
619
|
-
minutes: "Minutos",
|
|
620
|
-
seconds: "Segundos",
|
|
621
|
-
expired: "Esta oferta expirou"
|
|
622
|
-
},
|
|
623
|
-
ca: {
|
|
624
|
-
video: "Vídeo",
|
|
625
|
-
days: "Dies",
|
|
626
|
-
hours: "Hores",
|
|
627
|
-
minutes: "Minuts",
|
|
628
|
-
seconds: "Segons",
|
|
629
|
-
expired: "Aquesta oferta ha caducat"
|
|
630
|
-
},
|
|
631
|
-
ja: {
|
|
632
|
-
video: "動画",
|
|
633
|
-
days: "日",
|
|
634
|
-
hours: "時間",
|
|
635
|
-
minutes: "分",
|
|
636
|
-
seconds: "秒",
|
|
637
|
-
expired: "このオファーは終了しました"
|
|
638
|
-
}
|
|
639
|
-
};
|
|
640
|
-
Object.keys(Lr);
|
|
641
|
-
var Rr = new Map(Object.keys(Lr).map((e) => [e.toLowerCase(), e]));
|
|
642
|
-
function zr(e) {
|
|
643
|
-
if (!e) return Lr.en;
|
|
644
|
-
let t = e.trim().replace(/_/g, "-").toLowerCase(), n = Rr.get(t);
|
|
645
|
-
if (n) return Lr[n];
|
|
646
|
-
let r = Rr.get(Or(t));
|
|
647
|
-
return r ? Lr[r] : Lr.en;
|
|
648
|
-
}
|
|
649
|
-
function Br(e) {
|
|
650
|
-
let t = zr(e);
|
|
651
|
-
return {
|
|
652
|
-
video: { alt: t.video },
|
|
653
|
-
countdown: {
|
|
654
|
-
labelDays: t.days,
|
|
655
|
-
labelHours: t.hours,
|
|
656
|
-
labelMinutes: t.minutes,
|
|
657
|
-
labelSeconds: t.seconds,
|
|
658
|
-
expiredMessage: t.expired
|
|
659
|
-
}
|
|
660
|
-
};
|
|
661
|
-
}
|
|
662
|
-
// src/utils/collectColorFieldIssues.ts
|
|
663
|
-
function Vr(e, t) {
|
|
664
|
-
let n = [], r = (r, i) => {
|
|
665
|
-
let a = Tt(r, t), o = `custom block "${e.type}" field "${i}"`, s = (t) => `${e.type}:${i}:${t}`;
|
|
666
|
-
if (a.invalidPresets.length > 0 && n.push({
|
|
667
|
-
id: s("invalid-presets"),
|
|
668
|
-
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." : "")
|
|
669
|
-
}), a.emptyPresets && n.push({
|
|
670
|
-
id: s("empty-presets"),
|
|
671
|
-
message: `${o}: presets is empty — a field palette can only narrow the editor's, so an empty list is ignored and the field inherits colors.presets.`
|
|
672
|
-
}), a.allowCustomIgnored && n.push({
|
|
673
|
-
id: s("allow-custom-ignored"),
|
|
674
|
-
message: `${o}: allowCustom: true is ignored because colors.allowCustom is false — a field can narrow the editor-wide palette, never unlock it.`
|
|
675
|
-
}), !a.allowCustom && a.presets.length > 0) {
|
|
676
|
-
let e = r.default ?? "", t = new Set(a.presets.map((e) => jn(e)));
|
|
677
|
-
e !== "" && !t.has(jn(e)) && n.push({
|
|
678
|
-
id: s("off-palette-default"),
|
|
679
|
-
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.`
|
|
680
|
-
});
|
|
681
|
-
}
|
|
682
|
-
};
|
|
683
|
-
for (let t of e.fields) if (t.type === "color") r(t, t.key);
|
|
684
|
-
else if (t.type === "repeatable") for (let e of t.fields) e.type === "color" && r(e, `${t.key}[].${e.key}`);
|
|
685
|
-
return n;
|
|
686
|
-
}
|
|
687
|
-
// src/utils/keyboardShortcuts.ts
|
|
688
|
-
function Hr(e) {
|
|
689
|
-
for (let t of e.composedPath()) {
|
|
690
|
-
if (!(t instanceof HTMLElement)) continue;
|
|
691
|
-
if (t.isContentEditable) return !0;
|
|
692
|
-
let e = t.tagName;
|
|
693
|
-
if (e === "INPUT" || e === "TEXTAREA" || e === "SELECT") return !0;
|
|
694
|
-
}
|
|
695
|
-
return !1;
|
|
696
|
-
}
|
|
697
|
-
function Ur(e, t) {
|
|
698
|
-
let n = e.metaKey || e.ctrlKey;
|
|
699
|
-
if (n && e.key.toLowerCase() === "s") e.preventDefault(), t.onSave?.();
|
|
700
|
-
else if (n && e.key.toLowerCase() === "z") {
|
|
701
|
-
if (Hr(e)) return;
|
|
702
|
-
e.preventDefault(), e.shiftKey ? t.history.redo() : t.history.undo();
|
|
703
|
-
} else {
|
|
704
|
-
if (t.isPicking?.() && !Hr(e)) {
|
|
705
|
-
if (e.key === "Escape") {
|
|
706
|
-
e.preventDefault(), t.onCancelPick?.();
|
|
707
|
-
return;
|
|
708
|
-
}
|
|
709
|
-
if (e.key === "Enter") {
|
|
710
|
-
e.preventDefault(), t.onConfirmPick?.();
|
|
711
|
-
return;
|
|
712
|
-
}
|
|
713
|
-
if (e.key === "Delete" || e.key === "Backspace") {
|
|
714
|
-
e.preventDefault();
|
|
715
|
-
return;
|
|
716
|
-
}
|
|
717
|
-
}
|
|
718
|
-
e.key === "Escape" ? t.selectBlock(null) : (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Hr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
719
|
-
}
|
|
720
|
-
}
|
|
721
|
-
// src/utils/blockComponentResolver.ts
|
|
722
|
-
function Wr(e, t) {
|
|
723
|
-
let n = { fontFamily: t(e.fontFamily) };
|
|
724
|
-
return e.textColor && (n.color = e.textColor), e.linkColor && (n["--tpl-doc-link-color"] = e.linkColor), e.linkUnderline && (n["--tpl-doc-link-underline"] = "underline"), n;
|
|
725
|
-
}
|
|
726
|
-
function Gr(e, t, n) {
|
|
727
|
-
if (t) {
|
|
728
|
-
let n = t.getComponent(e);
|
|
729
|
-
if (n) return n;
|
|
730
|
-
}
|
|
731
|
-
return n[e.type] ?? null;
|
|
732
|
-
}
|
|
733
|
-
var Kr = "--tpl-block-bg-layer", qr = "tpl-has-bg-image";
|
|
734
|
-
function Jr(e, t) {
|
|
735
|
-
if (t === null) return {};
|
|
736
|
-
let n = Be(e);
|
|
737
|
-
if (n === null) return {};
|
|
738
|
-
let r = t?.trim(), i = r ? pe(r) : n.url;
|
|
739
|
-
return {
|
|
740
|
-
backgroundImage: `url("${i}")`,
|
|
741
|
-
backgroundSize: n.size,
|
|
742
|
-
backgroundPosition: n.position,
|
|
743
|
-
backgroundRepeat: n.repeat,
|
|
744
|
-
[Kr]: `url("${i}") ${n.position} / ${n.size} ${n.repeat}`
|
|
745
|
-
};
|
|
746
|
-
}
|
|
747
|
-
function Yr(e) {
|
|
748
|
-
return e && Kr in e ? qr : void 0;
|
|
749
|
-
}
|
|
750
|
-
var Xr = {
|
|
751
|
-
top: "flex-start",
|
|
752
|
-
middle: "center",
|
|
753
|
-
bottom: "flex-end"
|
|
754
|
-
};
|
|
755
|
-
function Zr(e, t) {
|
|
756
|
-
let n = typeof e.height == "number" ? { minHeight: `${e.height}px` } : t !== void 0 && e.aspectRatio !== null ? { minHeight: `${Qr(t, e.aspectRatio)}px` } : { aspectRatio: `1 / ${e.aspectRatio ?? 1}` };
|
|
757
|
-
return {
|
|
758
|
-
display: "flex",
|
|
759
|
-
flexDirection: "column",
|
|
760
|
-
justifyContent: Xr[e.verticalAlign],
|
|
761
|
-
boxSizing: "border-box",
|
|
762
|
-
...n
|
|
763
|
-
};
|
|
764
|
-
}
|
|
765
|
-
function Qr(e, t) {
|
|
766
|
-
return Math.max(1, Math.round(Math.max(1, Math.round(e)) * t));
|
|
767
|
-
}
|
|
768
|
-
function $r(e, t = {}) {
|
|
769
|
-
if (e.type === "wrapper") return {};
|
|
770
|
-
let { padding: n, backgroundColor: r } = e.styles, i = {
|
|
771
|
-
padding: `${n.top}px ${n.right}px ${n.bottom}px ${n.left}px`,
|
|
772
|
-
backgroundColor: r || "transparent"
|
|
773
|
-
};
|
|
774
|
-
if ((e.type === "paragraph" || e.type === "title") && (i["--tpl-doc-paragraph-spacing"] = `${e.type === "paragraph" ? e.paragraphSpacing ?? Ze.paragraphGap : Ze.paragraphGap}px`), e.type === "section") {
|
|
775
|
-
let n = ae(e.borderRadius);
|
|
776
|
-
n !== null && (i.borderRadius = n);
|
|
777
|
-
let r = Qe(e);
|
|
778
|
-
r?.applied && e.backgroundImage ? (Object.assign(i, Zr(r, t.heroBoxWidth)), Object.assign(i, Jr({
|
|
779
|
-
...e.backgroundImage,
|
|
780
|
-
size: "cover",
|
|
781
|
-
repeat: !1
|
|
782
|
-
}, t.backgroundImageUrl))) : (Object.assign(i, ti(e.border)), Object.assign(i, Jr(e.backgroundImage, t.backgroundImageUrl)));
|
|
783
|
-
}
|
|
784
|
-
return i;
|
|
785
|
-
}
|
|
786
|
-
function ei(e, t, n, r) {
|
|
787
|
-
return e.type === "section" ? $r(e, {
|
|
788
|
-
backgroundImageUrl: ot(t, e.backgroundImage, n),
|
|
789
|
-
heroBoxWidth: r
|
|
790
|
-
}) : $r(e);
|
|
791
|
-
}
|
|
792
|
-
function ti(e) {
|
|
793
|
-
let t = {};
|
|
794
|
-
for (let [n, r] of Object.entries(He(e))) t[n.replace(/-(\w)/g, (e, t) => t.toUpperCase())] = r;
|
|
795
|
-
return t;
|
|
796
|
-
}
|
|
797
|
-
function ni(e, t = {}) {
|
|
798
|
-
if (e.type !== "section" || !e.wrapper) return null;
|
|
799
|
-
let n = e.wrapper, r = {};
|
|
800
|
-
n.backgroundColor && (r.backgroundColor = n.backgroundColor), n.padding && (r.padding = `${n.padding.top}px ${n.padding.right}px ${n.padding.bottom}px ${n.padding.left}px`);
|
|
801
|
-
let i = ae(n.borderRadius);
|
|
802
|
-
return i !== null && (r.borderRadius = i), Object.assign(r, Jr(n.backgroundImage, t.backgroundImageUrl)), r;
|
|
803
|
-
}
|
|
804
|
-
function ri(e, t = {}) {
|
|
805
|
-
if (e.type !== "wrapper") return null;
|
|
806
|
-
let n = {};
|
|
807
|
-
if (e.styles.backgroundColor && (n.backgroundColor = e.styles.backgroundColor), e.styles.padding) {
|
|
808
|
-
let t = e.styles.padding;
|
|
809
|
-
n.padding = `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`;
|
|
810
|
-
}
|
|
811
|
-
return e.borderRadius && e.borderRadius > 0 && (n.borderRadius = `${e.borderRadius}px`), Object.assign(n, Jr(e.backgroundImage, t.backgroundImageUrl)), n;
|
|
812
|
-
}
|
|
813
|
-
// src/utils/mergeTagLabelSegments.ts
|
|
814
|
-
function ii(e, t, n, r = !1) {
|
|
815
|
-
if (!e) return [];
|
|
816
|
-
let i = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), a = [], o = 0, s;
|
|
817
|
-
for (; (s = i.exec(e)) !== null;) {
|
|
818
|
-
s.index > o && a.push({
|
|
819
|
-
type: "text",
|
|
820
|
-
value: e.slice(o, s.index)
|
|
821
|
-
});
|
|
822
|
-
let i = s[0];
|
|
823
|
-
if (Ye(i, n)) {
|
|
824
|
-
let e = r ? re(i, t) : void 0;
|
|
825
|
-
a.push(e === void 0 ? {
|
|
826
|
-
type: "tag",
|
|
827
|
-
value: xe(i, t)
|
|
828
|
-
} : {
|
|
829
|
-
type: "text",
|
|
830
|
-
value: e
|
|
831
|
-
});
|
|
832
|
-
} else Ge(i, n) ? a.push({
|
|
833
|
-
type: "tag",
|
|
834
|
-
value: ke(i, n)
|
|
835
|
-
}) : a.push({
|
|
836
|
-
type: "text",
|
|
837
|
-
value: i
|
|
838
|
-
});
|
|
839
|
-
o = s.index + i.length;
|
|
840
|
-
}
|
|
841
|
-
return o < e.length && a.push({
|
|
842
|
-
type: "text",
|
|
843
|
-
value: e.slice(o)
|
|
844
|
-
}), a;
|
|
845
|
-
}
|
|
846
|
-
// src/components/MergeTagPreviewText.vue
|
|
847
|
-
var ai = F({
|
|
848
|
-
name: "MergeTagPreviewText",
|
|
849
|
-
props: { text: {
|
|
850
|
-
type: String,
|
|
851
|
-
required: !0
|
|
852
|
-
} },
|
|
853
|
-
setup(e) {
|
|
854
|
-
let t = n(Jt, Bt), r = n(Yt, Ke.liquid), i = n(Xt, null), a = y(() => ii(e.text, t.value, r, i?.value ?? !1));
|
|
855
|
-
return () => a.value.map((e, t) => e.type === "tag" ? P("span", {
|
|
856
|
-
key: t,
|
|
857
|
-
class: "tpl-merge-tag-label"
|
|
858
|
-
}, e.value) : e.value);
|
|
859
|
-
}
|
|
860
|
-
}), oi = ["href"], si = /* @__PURE__ */ F({
|
|
861
|
-
__name: "ButtonBlock",
|
|
862
|
-
props: {
|
|
863
|
-
block: {},
|
|
864
|
-
viewport: {}
|
|
865
|
-
},
|
|
866
|
-
setup(e) {
|
|
867
|
-
let t = e, n = Pt(wn, "ButtonBlock"), r = y(() => {
|
|
868
|
-
let e = {
|
|
869
|
-
display: "inline-block",
|
|
870
|
-
padding: `${t.block.buttonPadding.top}px ${t.block.buttonPadding.right}px ${t.block.buttonPadding.bottom}px ${t.block.buttonPadding.left}px`,
|
|
871
|
-
backgroundColor: t.block.backgroundColor,
|
|
872
|
-
color: t.block.textColor,
|
|
873
|
-
fontSize: `${t.block.fontSize}px`,
|
|
874
|
-
fontWeight: "bold",
|
|
875
|
-
textDecoration: "none",
|
|
876
|
-
borderRadius: typeof t.block.borderRadius == "number" ? `${t.block.borderRadius}px` : ae(t.block.borderRadius) ?? "0px",
|
|
877
|
-
textAlign: "center"
|
|
878
|
-
};
|
|
879
|
-
return Object.assign(e, ti(t.block.border)), t.block.fontFamily && (e.fontFamily = n.resolveFontFamily(t.block.fontFamily)), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
|
|
880
|
-
}), i = y(() => ({ textAlign: t.block.align ?? "center" }));
|
|
881
|
-
return (t, n) => (T(), S("div", { style: E(i.value) }, [O("a", {
|
|
882
|
-
href: e.block.url || "#",
|
|
883
|
-
style: E(r.value),
|
|
884
|
-
class: "tpl:cursor-default",
|
|
885
|
-
onClick: n[0] ||= L(() => {}, ["prevent"])
|
|
886
|
-
}, [g(ai, { text: e.block.text }, null, 8, ["text"])], 12, oi)], 4));
|
|
887
|
-
}
|
|
888
|
-
}), ci = Rn({
|
|
889
|
-
name: "bookmark",
|
|
890
|
-
size: 24,
|
|
891
|
-
node: [["path", {
|
|
892
|
-
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",
|
|
893
|
-
key: "oz39mx"
|
|
894
|
-
}]]
|
|
895
|
-
}), li = Rn({
|
|
896
|
-
name: "box",
|
|
897
|
-
size: 24,
|
|
898
|
-
node: [
|
|
899
|
-
["path", {
|
|
900
|
-
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",
|
|
901
|
-
key: "hh9hay"
|
|
902
|
-
}],
|
|
903
|
-
["path", {
|
|
904
|
-
d: "m3.3 7 8.7 5 8.7-5",
|
|
905
|
-
key: "g66t2b"
|
|
906
|
-
}],
|
|
907
|
-
["path", {
|
|
908
|
-
d: "M12 22V12",
|
|
909
|
-
key: "d0xqtd"
|
|
910
|
-
}]
|
|
911
|
-
]
|
|
912
|
-
}), ui = Rn({
|
|
913
|
-
name: "eye-off",
|
|
914
|
-
size: 24,
|
|
915
|
-
node: [
|
|
916
|
-
["path", {
|
|
917
|
-
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",
|
|
918
|
-
key: "ct8e1f"
|
|
919
|
-
}],
|
|
920
|
-
["path", {
|
|
921
|
-
d: "M14.084 14.158a3 3 0 0 1-4.242-4.242",
|
|
922
|
-
key: "151rxh"
|
|
923
|
-
}],
|
|
924
|
-
["path", {
|
|
925
|
-
d: "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",
|
|
926
|
-
key: "13bj9a"
|
|
927
|
-
}],
|
|
928
|
-
["path", {
|
|
929
|
-
d: "m2 2 20 20",
|
|
930
|
-
key: "1ooewy"
|
|
931
|
-
}]
|
|
932
|
-
]
|
|
933
|
-
}), di = Rn({
|
|
934
|
-
name: "funnel",
|
|
935
|
-
size: 24,
|
|
936
|
-
node: [["path", {
|
|
937
|
-
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",
|
|
938
|
-
key: "sc7q7i"
|
|
939
|
-
}]],
|
|
940
|
-
aliases: ["filter"]
|
|
941
|
-
}), fi = Rn({
|
|
942
|
-
name: "grip-vertical",
|
|
943
|
-
size: 24,
|
|
944
|
-
node: [
|
|
945
|
-
["circle", {
|
|
946
|
-
cx: "9",
|
|
947
|
-
cy: "12",
|
|
948
|
-
r: "1",
|
|
949
|
-
key: "1vctgf"
|
|
950
|
-
}],
|
|
951
|
-
["circle", {
|
|
952
|
-
cx: "9",
|
|
953
|
-
cy: "5",
|
|
954
|
-
r: "1",
|
|
955
|
-
key: "hp0tcf"
|
|
956
|
-
}],
|
|
957
|
-
["circle", {
|
|
958
|
-
cx: "9",
|
|
959
|
-
cy: "19",
|
|
960
|
-
r: "1",
|
|
961
|
-
key: "fkjjf6"
|
|
962
|
-
}],
|
|
963
|
-
["circle", {
|
|
964
|
-
cx: "15",
|
|
965
|
-
cy: "12",
|
|
966
|
-
r: "1",
|
|
967
|
-
key: "1tmaij"
|
|
968
|
-
}],
|
|
969
|
-
["circle", {
|
|
970
|
-
cx: "15",
|
|
971
|
-
cy: "5",
|
|
972
|
-
r: "1",
|
|
973
|
-
key: "19l28e"
|
|
974
|
-
}],
|
|
975
|
-
["circle", {
|
|
976
|
-
cx: "15",
|
|
977
|
-
cy: "19",
|
|
978
|
-
r: "1",
|
|
979
|
-
key: "f4zoj3"
|
|
980
|
-
}]
|
|
981
|
-
]
|
|
982
|
-
}), pi = Rn({
|
|
983
|
-
name: "puzzle",
|
|
984
|
-
size: 24,
|
|
985
|
-
node: [["path", {
|
|
986
|
-
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",
|
|
987
|
-
key: "w46dr5"
|
|
988
|
-
}]]
|
|
989
|
-
}), mi = Rn({
|
|
990
|
-
name: "video",
|
|
991
|
-
size: 24,
|
|
992
|
-
node: [["path", {
|
|
993
|
-
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
994
|
-
key: "ftymec"
|
|
995
|
-
}], ["rect", {
|
|
996
|
-
x: "2",
|
|
997
|
-
y: "6",
|
|
998
|
-
width: "14",
|
|
999
|
-
height: "12",
|
|
1000
|
-
rx: "2",
|
|
1001
|
-
key: "158x01"
|
|
1002
|
-
}]]
|
|
1003
|
-
}), hi = ["innerHTML"], gi = [
|
|
1004
|
-
"src",
|
|
1005
|
-
"width",
|
|
1006
|
-
"height"
|
|
1007
|
-
], _i = /* @__PURE__ */ F({
|
|
1008
|
-
__name: "CustomBlockIcon",
|
|
1009
|
-
props: {
|
|
1010
|
-
icon: {},
|
|
1011
|
-
size: {}
|
|
1012
|
-
},
|
|
1013
|
-
setup(e) {
|
|
1014
|
-
let t = e, n = y(() => t.size ?? 20), r = y(() => t.icon && (t.icon.trimStart().startsWith("<svg") || t.icon.trimStart().startsWith("<SVG"))), i = y(() => t.icon && !r.value && (t.icon.startsWith("http") || t.icon.startsWith("/"))), a = y(() => r.value ? In(t.icon ?? "") : "");
|
|
1015
|
-
return (t, o) => r.value ? (T(), S("span", {
|
|
1016
|
-
key: 0,
|
|
1017
|
-
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
1018
|
-
style: E({
|
|
1019
|
-
width: `${n.value}px`,
|
|
1020
|
-
height: `${n.value}px`
|
|
1021
|
-
}),
|
|
1022
|
-
innerHTML: a.value
|
|
1023
|
-
}, null, 12, hi)) : i.value ? (T(), S("img", {
|
|
1024
|
-
key: 1,
|
|
1025
|
-
src: e.icon,
|
|
1026
|
-
width: n.value,
|
|
1027
|
-
height: n.value,
|
|
1028
|
-
class: "tpl:inline-block",
|
|
1029
|
-
alt: ""
|
|
1030
|
-
}, null, 8, gi)) : (T(), N(k(li), {
|
|
1031
|
-
key: 2,
|
|
1032
|
-
size: n.value,
|
|
1033
|
-
"stroke-width": 1.5
|
|
1034
|
-
}, null, 8, ["size"]));
|
|
1035
|
-
}
|
|
1036
|
-
}), vi = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
1037
|
-
function yi(e, t) {
|
|
1038
|
-
let n = Kn(), r = null, i = null, a = null;
|
|
1039
|
-
function o() {
|
|
1040
|
-
return e.value ? Array.from(e.value.querySelectorAll(vi)).filter((e) => e.offsetParent !== null) : [];
|
|
1041
|
-
}
|
|
1042
|
-
function s(e) {
|
|
1043
|
-
if (e.key !== "Tab") return;
|
|
1044
|
-
let t = o();
|
|
1045
|
-
if (t.length === 0) return;
|
|
1046
|
-
let r = t[0], i = t[t.length - 1];
|
|
1047
|
-
e.shiftKey ? n.activeElement === r && (e.preventDefault(), i.focus()) : n.activeElement === i && (e.preventDefault(), r.focus());
|
|
1048
|
-
}
|
|
1049
|
-
function c() {
|
|
1050
|
-
let t = i !== null || a !== null;
|
|
1051
|
-
t && l({ restoreFocus: !1 }), t || (r = n.activeElement), a = requestAnimationFrame(() => {
|
|
1052
|
-
a = null;
|
|
1053
|
-
let t = o();
|
|
1054
|
-
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
1055
|
-
}), i = jt(e, "keydown", s);
|
|
1056
|
-
}
|
|
1057
|
-
function l(e = {}) {
|
|
1058
|
-
let t = e.restoreFocus !== !1;
|
|
1059
|
-
a !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(a), a = null), i?.(), i = null, t && r && r.focus && (r.focus(), r = null);
|
|
1060
|
-
}
|
|
1061
|
-
let u = I([t, e], ([e, t]) => {
|
|
1062
|
-
e && t ? c() : l();
|
|
1063
|
-
}, { flush: "post" });
|
|
1064
|
-
h(() => {
|
|
1065
|
-
u(), l();
|
|
1066
|
-
});
|
|
1067
|
-
}
|
|
1068
|
-
// src/composables/useEmoji.ts
|
|
1069
|
-
function bi() {
|
|
1070
|
-
let [e, t] = kt(!1), n = x([]), r = !1;
|
|
1071
|
-
h(() => {
|
|
1072
|
-
r = !0;
|
|
1073
|
-
}), I(e, async (e) => {
|
|
1074
|
-
if (e && n.value.length === 0) {
|
|
1075
|
-
let { emojiCategories: e } = await import("./emojiData-CBNuCfum.js");
|
|
1076
|
-
if (r) return;
|
|
1077
|
-
n.value = e;
|
|
1078
|
-
}
|
|
1079
|
-
});
|
|
1080
|
-
function i() {
|
|
1081
|
-
t();
|
|
1082
|
-
}
|
|
1083
|
-
function a() {
|
|
1084
|
-
e.value = !1;
|
|
1085
|
-
}
|
|
1086
|
-
return {
|
|
1087
|
-
categories: n,
|
|
1088
|
-
isOpen: e,
|
|
1089
|
-
toggle: i,
|
|
1090
|
-
close: a
|
|
1091
|
-
};
|
|
1092
|
-
}
|
|
1093
|
-
// src/composables/useFonts.ts
|
|
1094
|
-
var xi = [
|
|
1095
|
-
{
|
|
1096
|
-
value: "Arial",
|
|
1097
|
-
label: "Arial"
|
|
1098
|
-
},
|
|
1099
|
-
{
|
|
1100
|
-
value: "Helvetica",
|
|
1101
|
-
label: "Helvetica"
|
|
1102
|
-
},
|
|
1103
|
-
{
|
|
1104
|
-
value: "Georgia",
|
|
1105
|
-
label: "Georgia"
|
|
1106
|
-
},
|
|
1107
|
-
{
|
|
1108
|
-
value: "Times New Roman",
|
|
1109
|
-
label: "Times New Roman"
|
|
1110
|
-
},
|
|
1111
|
-
{
|
|
1112
|
-
value: "Verdana",
|
|
1113
|
-
label: "Verdana"
|
|
1114
|
-
},
|
|
1115
|
-
{
|
|
1116
|
-
value: "Trebuchet MS",
|
|
1117
|
-
label: "Trebuchet MS"
|
|
1118
|
-
},
|
|
1119
|
-
{
|
|
1120
|
-
value: "Courier New",
|
|
1121
|
-
label: "Courier New"
|
|
1122
|
-
}
|
|
1123
|
-
], Si = "Arial, sans-serif";
|
|
1124
|
-
function Ci(e) {
|
|
1125
|
-
if (e === void 0 || e === !0) return [...xi];
|
|
1126
|
-
if (e === !1) return [];
|
|
1127
|
-
let t = [], n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set();
|
|
1128
|
-
for (let i of e) {
|
|
1129
|
-
let e = i.toLowerCase(), a = xi.find((t) => t.value.toLowerCase() === e);
|
|
1130
|
-
a ? n.has(a.value) || (n.add(a.value), t.push(a)) : r.has(e) || (r.add(e), R.warn(`config.fonts.builtIns: "${i}" is not a built-in font — skipping it. Built-in fonts are: ${xi.map((e) => e.value).join(", ")}.`));
|
|
1131
|
-
}
|
|
1132
|
-
return t;
|
|
1133
|
-
}
|
|
1134
|
-
function wi(e) {
|
|
1135
|
-
let t = f(e?.customFonts ?? []), n = f(!1), r = Ci(e?.builtIns), a = y(() => e?.defaultFallback ?? Si), o = y(() => {
|
|
1136
|
-
let e = [...r], n = t.value.map((e) => ({
|
|
1137
|
-
value: e.name,
|
|
1138
|
-
label: e.name,
|
|
1139
|
-
isCustom: !0
|
|
1140
|
-
})), i = [...e, ...n];
|
|
1141
|
-
return i.sort((e, t) => e.label.localeCompare(t.label)), i;
|
|
1142
|
-
});
|
|
1143
|
-
function s(e) {
|
|
1144
|
-
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
1145
|
-
}
|
|
1146
|
-
let c = e?.defaultFont ?? Si.split(",")[0].trim();
|
|
1147
|
-
s(c) || R.warn(`config.fonts: new templates seed "${c}", which the font picker doesn't offer — authors can't reselect it. Either add it to fonts.builtIns, or set fonts.defaultFont to an offered font.`);
|
|
1148
|
-
function l() {
|
|
1149
|
-
if (e?.defaultFont && s(e.defaultFont)) {
|
|
1150
|
-
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
1151
|
-
if (t) return t.value;
|
|
1152
|
-
}
|
|
1153
|
-
return Si;
|
|
1154
|
-
}
|
|
1155
|
-
let u = y(() => l());
|
|
1156
|
-
function d(e) {
|
|
1157
|
-
return Ae(e, {
|
|
1158
|
-
customFonts: t.value,
|
|
1159
|
-
defaultFallback: a.value
|
|
1160
|
-
});
|
|
1161
|
-
}
|
|
1162
|
-
let p = [], m = !1;
|
|
1163
|
-
async function g() {
|
|
1164
|
-
if (t.value.length === 0) {
|
|
1165
|
-
m || (n.value = !0);
|
|
1166
|
-
return;
|
|
1167
|
-
}
|
|
1168
|
-
let e = t.value.map(async (e) => {
|
|
1169
|
-
try {
|
|
1170
|
-
if (document.querySelector(`link[data-custom-font="${CSS.escape(e.name)}"]`)) return;
|
|
1171
|
-
let t = document.createElement("link");
|
|
1172
|
-
t.rel = "stylesheet", t.href = e.url, t.setAttribute("data-custom-font", e.name), p.push(t), await new Promise((n, r) => {
|
|
1173
|
-
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
1174
|
-
});
|
|
1175
|
-
} catch (t) {
|
|
1176
|
-
R.warn(`Failed to load custom font "${e.name}":`, t);
|
|
1177
|
-
}
|
|
1178
|
-
});
|
|
1179
|
-
await Promise.allSettled(e), !m && (n.value = !0);
|
|
1180
|
-
}
|
|
1181
|
-
function _() {
|
|
1182
|
-
for (let e of p) e.remove();
|
|
1183
|
-
p.length = 0;
|
|
1184
|
-
}
|
|
1185
|
-
return i() && h(() => {
|
|
1186
|
-
m = !0, _();
|
|
1187
|
-
}), {
|
|
1188
|
-
fonts: o,
|
|
1189
|
-
defaultFont: u,
|
|
1190
|
-
defaultFallback: a,
|
|
1191
|
-
customFonts: t,
|
|
1192
|
-
isLoaded: n,
|
|
1193
|
-
loadCustomFonts: g,
|
|
1194
|
-
cleanupFontLinks: _,
|
|
1195
|
-
resolveFontFamily: d,
|
|
1196
|
-
getDefaultFont: l
|
|
1197
|
-
};
|
|
1198
|
-
}
|
|
1199
|
-
// src/utils/mergeTagNodeSpec.ts
|
|
1200
|
-
function Ti(e, t, n) {
|
|
1201
|
-
return Ge(e, n) ? {
|
|
1202
|
-
type: "logicMergeTagNode",
|
|
1203
|
-
attrs: {
|
|
1204
|
-
value: e,
|
|
1205
|
-
keyword: ke(e, n)
|
|
1206
|
-
}
|
|
1207
|
-
} : {
|
|
1208
|
-
type: "mergeTagNode",
|
|
1209
|
-
attrs: {
|
|
1210
|
-
label: t,
|
|
1211
|
-
value: e
|
|
1212
|
-
}
|
|
1213
|
-
};
|
|
1214
|
-
}
|
|
1215
|
-
// src/utils/insertLogicTag.ts
|
|
1216
|
-
function Ei(e) {
|
|
1217
|
-
return "before" in e && "after" in e;
|
|
1218
|
-
}
|
|
1219
|
-
function Di(e, t, n) {
|
|
1220
|
-
if (!Ei(t)) {
|
|
1221
|
-
e.chain().focus().insertContent(Ti(t.value, t.label, n)).run();
|
|
1222
|
-
return;
|
|
1223
|
-
}
|
|
1224
|
-
let r = Ti(t.before, t.label, n), i = Ti(t.after, t.label, n), { from: a, to: o } = e.state.selection;
|
|
1225
|
-
a === o ? e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run() : e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
|
|
1226
|
-
}
|
|
1227
|
-
// src/utils/linkColorExtension.ts
|
|
1228
|
-
function Oi(e) {
|
|
1229
|
-
if (!e) return null;
|
|
1230
|
-
let t = e.trim();
|
|
1231
|
-
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;
|
|
1232
|
-
}
|
|
1233
|
-
function ki(e) {
|
|
1234
|
-
return e.extend({ addAttributes() {
|
|
1235
|
-
return {
|
|
1236
|
-
...this.parent?.(),
|
|
1237
|
-
color: {
|
|
1238
|
-
default: null,
|
|
1239
|
-
parseHTML: (e) => Oi(An(e.style.color)),
|
|
1240
|
-
renderHTML: (e) => {
|
|
1241
|
-
let t = Oi(e.color);
|
|
1242
|
-
return t ? { style: `color: ${t}` } : {};
|
|
1243
|
-
}
|
|
1244
|
-
}
|
|
1245
|
-
};
|
|
1246
|
-
} });
|
|
1247
|
-
}
|
|
1248
|
-
// src/composables/useRichTextLinkDialog.ts
|
|
1249
|
-
function Ai(e, t = Ke.liquid) {
|
|
1250
|
-
let n = f(!1), r = f(""), i = f(""), a = f(null);
|
|
1251
|
-
yi(a, n);
|
|
1252
|
-
function o() {
|
|
1253
|
-
let t = e.value?.getAttributes("link") ?? {};
|
|
1254
|
-
r.value = t.href || "", i.value = t.color || "", n.value = !0;
|
|
1255
|
-
}
|
|
1256
|
-
function s() {
|
|
1257
|
-
if (r.value) {
|
|
1258
|
-
let t = u(r.value);
|
|
1259
|
-
if (t !== null) {
|
|
1260
|
-
let n = Oi(i.value), r = e.value?.chain().focus().extendMarkRange("link").setLink({ href: t }).updateAttributes("link", { color: n });
|
|
1261
|
-
n && typeof e.value?.commands.unsetColor == "function" && r?.unsetColor(), r?.run();
|
|
1262
|
-
}
|
|
1263
|
-
}
|
|
1264
|
-
p();
|
|
1265
|
-
}
|
|
1266
|
-
let c = /^(?:\/|\.{1,2}\/|\?)/;
|
|
1267
|
-
function l(e) {
|
|
1268
|
-
return RegExp(`^(?:${t.value.source})`).test(e);
|
|
1269
|
-
}
|
|
1270
|
-
function u(e) {
|
|
1271
|
-
let t = e.trim();
|
|
1272
|
-
if (!t) return null;
|
|
1273
|
-
if (t.startsWith("#")) return t;
|
|
1274
|
-
if (t.startsWith("//")) return `https:${t}`;
|
|
1275
|
-
if (c.test(t)) return t;
|
|
1276
|
-
let n = me(t);
|
|
1277
|
-
return n ? Fe.some((e) => e === n) ? t : null : l(t) ? t : `https://${t}`;
|
|
1278
|
-
}
|
|
1279
|
-
function d() {
|
|
1280
|
-
e.value?.chain().focus().extendMarkRange("link").unsetLink().run(), p();
|
|
1281
|
-
}
|
|
1282
|
-
function p() {
|
|
1283
|
-
n.value = !1, r.value = "", i.value = "";
|
|
1284
|
-
}
|
|
1285
|
-
function m(e) {
|
|
1286
|
-
e.key === "Enter" ? (e.preventDefault(), s()) : e.key === "Escape" && p();
|
|
1287
|
-
}
|
|
1288
|
-
return {
|
|
1289
|
-
showLinkDialog: n,
|
|
1290
|
-
linkUrl: r,
|
|
1291
|
-
linkColor: i,
|
|
1292
|
-
linkDialogRef: a,
|
|
1293
|
-
openLinkDialog: o,
|
|
1294
|
-
insertLink: s,
|
|
1295
|
-
removeLink: d,
|
|
1296
|
-
closeLinkDialog: p,
|
|
1297
|
-
handleLinkKeydown: m
|
|
1298
|
-
};
|
|
1299
|
-
}
|
|
1300
|
-
// src/composables/useRichTextEditor.ts
|
|
1301
|
-
function ji(e) {
|
|
1302
|
-
let t = n(fn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = qn(), { canInsertLogicTag: l, isRequesting: d, requestLogicTag: p } = Jn(), m = n(rn, null), h = (A(m) ? m.value : m)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", g = Xe(s), _ = x(null), v = () => Re(t?.content?.value?.settings ?? { locale: "en" });
|
|
1303
|
-
I(v, (e) => {
|
|
1304
|
-
let t = _.value?.view.dom;
|
|
1305
|
-
t && t.setAttribute("dir", e);
|
|
1306
|
-
});
|
|
1307
|
-
let { showLinkDialog: y, linkUrl: b, linkColor: S, linkDialogRef: C, openLinkDialog: w, insertLink: T, removeLink: E, closeLinkDialog: D, handleLinkKeydown: O } = Ai(_, s), { start: k, stop: j } = Dt(() => _.value?.commands.focus("end"), 0, { immediate: !1 }), M = x(null), N = f(!0), ee = f(null), P = !1, F = null;
|
|
1308
|
-
async function L() {
|
|
1309
|
-
ee.value = null, N.value = !0;
|
|
1310
|
-
try {
|
|
1311
|
-
let { TiptapEditor: n, EC: i, extensions: a } = await e.loadExtensions({
|
|
1312
|
-
mergeTags: r,
|
|
1313
|
-
syntax: s,
|
|
1314
|
-
triggerChar: g,
|
|
1315
|
-
autocompleteEnabled: c,
|
|
1316
|
-
suggestionEmptyText: h
|
|
1317
|
-
});
|
|
1318
|
-
if (P) return;
|
|
1319
|
-
M.value = i;
|
|
1320
|
-
let o = /* @__PURE__ */ new Map();
|
|
1321
|
-
a.forEach((e, t) => o.set(e.name, t));
|
|
1322
|
-
let l = new n({
|
|
1323
|
-
extensions: a.filter((e, t) => o.get(e.name) === t),
|
|
1324
|
-
content: e.blockContent(),
|
|
1325
|
-
editable: !0,
|
|
1326
|
-
editorProps: { attributes: { dir: v() } },
|
|
1327
|
-
onUpdate: ({ editor: n }) => {
|
|
1328
|
-
P || t && (F = n.getHTML(), t.updateBlock(e.blockId(), { content: F }));
|
|
1329
|
-
}
|
|
1330
|
-
});
|
|
1331
|
-
if (P) {
|
|
1332
|
-
l.destroy();
|
|
1333
|
-
return;
|
|
1334
|
-
}
|
|
1335
|
-
_.value = l, N.value = !1, k();
|
|
1336
|
-
} catch (t) {
|
|
1337
|
-
if (P) return;
|
|
1338
|
-
R.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), ee.value = t instanceof Error ? t.message : "Failed to load editor", N.value = !1;
|
|
1339
|
-
}
|
|
1340
|
-
}
|
|
1341
|
-
function te() {
|
|
1342
|
-
_.value?.destroy(), _.value = null, L();
|
|
1343
|
-
}
|
|
1344
|
-
L();
|
|
1345
|
-
let ne = I(() => e.blockContent(), (e) => {
|
|
1346
|
-
_.value && e !== F && (F = e, _.value.getHTML() !== e && _.value.commands.setContent(e, { emitUpdate: !1 }));
|
|
1347
|
-
});
|
|
1348
|
-
function re(t) {
|
|
1349
|
-
if (a.value || d.value) return;
|
|
1350
|
-
let n = t.composedPath(), r = n.find((e) => e instanceof HTMLElement);
|
|
1351
|
-
if (!r) return;
|
|
1352
|
-
e.onClickOutsideSideEffect?.(r);
|
|
1353
|
-
let i = n.some((e) => e instanceof HTMLElement && e.classList.contains("tpl-color-popover"));
|
|
1354
|
-
r.closest(".tpl-text-editor-wrapper") || r.closest(".tpl-text-toolbar") || r.closest(".tpl-link-dialog") || i || e.onDone();
|
|
1355
|
-
}
|
|
1356
|
-
jt(document, "mousedown", re), u(() => {
|
|
1357
|
-
P = !0, ne(), j(), _.value?.destroy();
|
|
1358
|
-
});
|
|
1359
|
-
async function ie() {
|
|
1360
|
-
let e = await o();
|
|
1361
|
-
P || (e && _.value ? _.value.chain().focus().insertMergeTag({
|
|
1362
|
-
label: e.label,
|
|
1363
|
-
value: e.value
|
|
1364
|
-
}).run() : _.value?.commands.focus());
|
|
1365
|
-
}
|
|
1366
|
-
async function ae() {
|
|
1367
|
-
let e = await p();
|
|
1368
|
-
P || (e && _.value ? Di(_.value, e, s) : _.value?.commands.focus());
|
|
1369
|
-
}
|
|
1370
|
-
return {
|
|
1371
|
-
editor: _,
|
|
1372
|
-
EditorContent: M,
|
|
1373
|
-
isLoading: N,
|
|
1374
|
-
initError: ee,
|
|
1375
|
-
retry: te,
|
|
1376
|
-
showLinkDialog: y,
|
|
1377
|
-
linkUrl: b,
|
|
1378
|
-
linkColor: S,
|
|
1379
|
-
linkDialogRef: C,
|
|
1380
|
-
mergeTags: r,
|
|
1381
|
-
canRequestMergeTag: i,
|
|
1382
|
-
isRequestingMergeTag: a,
|
|
1383
|
-
syntax: s,
|
|
1384
|
-
canInsertLogicTag: l,
|
|
1385
|
-
isRequestingLogicTag: d,
|
|
1386
|
-
openLinkDialog: w,
|
|
1387
|
-
insertLink: T,
|
|
1388
|
-
removeLink: E,
|
|
1389
|
-
closeLinkDialog: D,
|
|
1390
|
-
handleLinkKeydown: O,
|
|
1391
|
-
handleAddMergeTag: ie,
|
|
1392
|
-
handleAddLogicTag: ae
|
|
1393
|
-
};
|
|
1394
|
-
}
|
|
1395
|
-
// src/composables/useSmallScreenNotice.ts
|
|
1396
|
-
var Mi = "(max-width: 767px)";
|
|
1397
|
-
function Ni(e) {
|
|
1398
|
-
let t = Mt(Mi);
|
|
1399
|
-
return {
|
|
1400
|
-
isSmallScreen: t,
|
|
1401
|
-
showNotice: y(() => (w(e) ?? !0) && t.value)
|
|
1402
|
-
};
|
|
1403
|
-
}
|
|
1404
|
-
// src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1405
|
-
var Pi = { class: "tpl:w-full" }, Fi = {
|
|
1406
|
-
key: 0,
|
|
1407
|
-
class: "tpl:flex tpl:box-border 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)]"
|
|
1408
|
-
}, Ii = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Li = {
|
|
1409
|
-
key: 1,
|
|
1410
|
-
class: "tpl:flex tpl:box-border 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)]"
|
|
1411
|
-
}, Ri = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, zi = {
|
|
1412
|
-
key: 2,
|
|
1413
|
-
class: "tpl:relative"
|
|
1414
|
-
}, Bi = ["innerHTML"], Vi = {
|
|
1415
|
-
key: 0,
|
|
1416
|
-
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]",
|
|
1417
|
-
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
1418
|
-
}, Hi = /* @__PURE__ */ F({
|
|
1419
|
-
__name: "CustomBlock",
|
|
1420
|
-
props: {
|
|
1421
|
-
block: {},
|
|
1422
|
-
viewport: {}
|
|
1423
|
-
},
|
|
1424
|
-
emits: ["fetchData"],
|
|
1425
|
-
setup(e, { emit: t }) {
|
|
1426
|
-
let r = e, i = t, { t: a } = kn(), o = n(Cn, null), s = f(""), l = y(() => Ln(s.value)), u = f(!1), d = y(() => o?.getDefinition(r.block.customType)), p = y(() => !!d.value), m = y(() => r.block), { isFetching: h, fetch: _, needsFetch: v, hasDataSource: x } = dt({
|
|
1427
|
-
definition: d,
|
|
1428
|
-
block: m,
|
|
1429
|
-
onUpdate: (e, t) => {
|
|
1430
|
-
i("fetchData", {
|
|
1431
|
-
fieldValues: e,
|
|
1432
|
-
dataSourceFetched: t
|
|
1433
|
-
});
|
|
1434
|
-
}
|
|
1435
|
-
}), w = n(Jt, Bt), E = n(Xt, null), A = y(() => {
|
|
1436
|
-
if (!E?.value) return r.block;
|
|
1437
|
-
let e = {};
|
|
1438
|
-
for (let [t, n] of Object.entries(r.block.fieldValues)) e[t] = typeof n == "string" ? le(n, w.value) : n;
|
|
1439
|
-
return {
|
|
1440
|
-
...r.block,
|
|
1441
|
-
fieldValues: e
|
|
1442
|
-
};
|
|
1443
|
-
});
|
|
1444
|
-
async function j() {
|
|
1445
|
-
if (o) {
|
|
1446
|
-
u.value = !1;
|
|
1447
|
-
try {
|
|
1448
|
-
let e = await o.renderCustomBlock(A.value);
|
|
1449
|
-
e.includes("Template render error:") && (u.value = !0), s.value = e;
|
|
1450
|
-
} catch {
|
|
1451
|
-
u.value = !0, s.value = "";
|
|
1452
|
-
}
|
|
1453
|
-
}
|
|
1454
|
-
}
|
|
1455
|
-
let M = Ot(j, 150);
|
|
1456
|
-
return D(() => {
|
|
1457
|
-
j();
|
|
1458
|
-
}), I(() => r.block.fieldValues, () => {
|
|
1459
|
-
M();
|
|
1460
|
-
}, { deep: !0 }), I(() => E?.value, () => {
|
|
1461
|
-
M();
|
|
1462
|
-
}), (e, t) => (T(), S("div", Pi, [p.value ? u.value ? (T(), S("div", Li, [g(k(Un), {
|
|
1463
|
-
size: 24,
|
|
1464
|
-
class: "tpl:text-[var(--tpl-danger)]"
|
|
1465
|
-
}), O("span", Ri, c(k(a).customBlocks.renderError), 1)])) : (T(), S("div", zi, [O("div", { innerHTML: l.value }, null, 8, Bi), k(x) && k(v) ? (T(), S("div", Vi, [k(h) ? (T(), N(Wn, {
|
|
1466
|
-
key: 1,
|
|
1467
|
-
class: "tpl:w-48"
|
|
1468
|
-
})) : (T(), S("button", {
|
|
1469
|
-
key: 0,
|
|
1470
|
-
type: "button",
|
|
1471
|
-
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-[var(--tpl-shadow)] tpl:transition-all tpl:hover:border-[var(--tpl-primary)] tpl:hover:shadow-[var(--tpl-shadow-md)] tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
1472
|
-
onClick: t[0] ||= L((...e) => k(_) && k(_)(...e), ["stop"])
|
|
1473
|
-
}, [d.value?.icon ? (T(), N(_i, {
|
|
1474
|
-
key: 0,
|
|
1475
|
-
icon: d.value.icon,
|
|
1476
|
-
size: 16
|
|
1477
|
-
}, null, 8, ["icon"])) : b("", !0), C(" " + c(d.value?.dataSource?.label || k(a).customBlocks.dataSource.fetchButton), 1)]))])) : b("", !0)])) : (T(), S("div", Fi, [g(k(pi), {
|
|
1478
|
-
size: 24,
|
|
1479
|
-
class: "tpl:text-[var(--tpl-warning)]"
|
|
1480
|
-
}), O("span", Ii, c(k(a).customBlocks.definitionNotFound), 1)]))]));
|
|
1481
|
-
}
|
|
1482
|
-
}), Ui = { class: "tpl:w-full" }, Wi = /* @__PURE__ */ F({
|
|
1483
|
-
__name: "DividerBlock",
|
|
1484
|
-
props: {
|
|
1485
|
-
block: {},
|
|
1486
|
-
viewport: {}
|
|
1487
|
-
},
|
|
1488
|
-
setup(e) {
|
|
1489
|
-
let t = e, n = y(() => ({
|
|
1490
|
-
borderTop: `${t.block.thickness}px ${t.block.lineStyle} ${t.block.color}`,
|
|
1491
|
-
width: t.block.width === "full" ? "100%" : typeof t.block.width == "number" ? `${t.block.width}px` : t.block.width,
|
|
1492
|
-
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
1493
|
-
}));
|
|
1494
|
-
return (e, t) => (T(), S("div", Ui, [O("hr", {
|
|
1495
|
-
class: "tpl:m-0 tpl:border-none",
|
|
1496
|
-
style: E(n.value)
|
|
1497
|
-
}, null, 4)]));
|
|
1498
|
-
}
|
|
1499
|
-
}), Gi = { class: "tpl:w-full" }, Ki = ["srcdoc", "title"], qi = {
|
|
1500
|
-
key: 1,
|
|
1501
|
-
class: "tpl:flex tpl:box-border 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)]"
|
|
1502
|
-
}, Ji = {
|
|
1503
|
-
key: 0,
|
|
1504
|
-
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
1505
|
-
}, Yi = {
|
|
1506
|
-
key: 1,
|
|
1507
|
-
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
1508
|
-
}, Xi = /* @__PURE__ */ F({
|
|
1509
|
-
__name: "HtmlBlock",
|
|
1510
|
-
props: {
|
|
1511
|
-
block: {},
|
|
1512
|
-
viewport: {}
|
|
1513
|
-
},
|
|
1514
|
-
setup(e) {
|
|
1515
|
-
let t = e, { t: r } = kn(), i = n(cn, !1), a = y(() => t.block.content.trim().length > 0), o = y(() => i && a.value), s = n(Jt, Bt), l = n(Xt, null), d = y(() => l?.value ? le(t.block.content, s.value) : t.block.content), p = f(null), m = f(60), h = null;
|
|
1516
|
-
function _() {
|
|
1517
|
-
let e = p.value?.contentDocument;
|
|
1518
|
-
e && (m.value = Math.max(e.body?.scrollHeight ?? 0, e.documentElement?.scrollHeight ?? 0));
|
|
1519
|
-
}
|
|
1520
|
-
function v() {
|
|
1521
|
-
h?.disconnect(), h = null, _();
|
|
1522
|
-
let e = p.value?.contentDocument?.documentElement;
|
|
1523
|
-
e && typeof ResizeObserver < "u" && (h = new ResizeObserver(() => _()), h.observe(e));
|
|
1524
|
-
}
|
|
1525
|
-
return I(o, (e) => {
|
|
1526
|
-
e || (h?.disconnect(), h = null);
|
|
1527
|
-
}), u(() => {
|
|
1528
|
-
h?.disconnect(), h = null;
|
|
1529
|
-
}), (e, t) => (T(), S("div", Gi, [o.value ? (T(), S("iframe", {
|
|
1530
|
-
key: 0,
|
|
1531
|
-
ref_key: "iframeRef",
|
|
1532
|
-
ref: p,
|
|
1533
|
-
srcdoc: d.value,
|
|
1534
|
-
sandbox: "allow-same-origin",
|
|
1535
|
-
title: k(r).html.preview,
|
|
1536
|
-
class: "tpl:block tpl:w-full tpl:border-0",
|
|
1537
|
-
style: E({ height: `${m.value}px` }),
|
|
1538
|
-
onLoad: v
|
|
1539
|
-
}, null, 44, Ki)) : (T(), S("div", qi, [g(k(gt), {
|
|
1540
|
-
size: 24,
|
|
1541
|
-
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
1542
|
-
}), a.value ? (T(), S("span", Ji, c(k(r).html.preview), 1)) : (T(), S("span", Yi, c(k(r).html.empty), 1))]))]));
|
|
1543
|
-
}
|
|
1544
|
-
}), Zi = ["data-drop-enabled"], Qi = ["href"], $i = ["src", "alt"], ea = ["src", "alt"], ta = {
|
|
1545
|
-
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
1546
|
-
style: { opacity: "0.7" }
|
|
1547
|
-
}, na = ["href"], ra = ["src", "alt"], ia = ["src", "alt"], aa = {
|
|
1548
|
-
key: 4,
|
|
1549
|
-
class: "tpl:flex tpl:box-border tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
1550
|
-
}, oa = ["aria-label"], sa = { key: 1 }, ca = /* @__PURE__ */ F({
|
|
1551
|
-
__name: "ImageBlock",
|
|
1552
|
-
props: {
|
|
1553
|
-
block: {},
|
|
1554
|
-
viewport: {}
|
|
1555
|
-
},
|
|
1556
|
-
emits: ["update"],
|
|
1557
|
-
setup(e, { emit: t }) {
|
|
1558
|
-
let n = e, r = t, { t: i } = kn(), { syntax: a } = qn(), o = y(() => Ce(n.block.src, a));
|
|
1559
|
-
function s(e) {
|
|
1560
|
-
let t = {
|
|
1561
|
-
src: e.url,
|
|
1562
|
-
...bt(vt(e.width, e.height))
|
|
1563
|
-
};
|
|
1564
|
-
e.alt && (t.alt = e.alt), r("update", t);
|
|
1565
|
-
}
|
|
1566
|
-
let l = f(), { canBrowse: u, dropEnabled: d, isUploading: p, showOverlay: m, openMediaBrowser: h } = yt({
|
|
1567
|
-
target: l,
|
|
1568
|
-
blocked: o,
|
|
1569
|
-
apply: s
|
|
1570
|
-
}), _ = y(() => ({ textAlign: n.block.align })), v = y(() => {
|
|
1571
|
-
let e = n.block.border, t = ["left", "right"].map((t) => ye(e?.[t]) === null ? 0 : e[t].width).reduce((e, t) => e + t, 0);
|
|
1572
|
-
return t > 0 ? `calc(100% - ${t}px)` : "100%";
|
|
1573
|
-
}), x = y(() => {
|
|
1574
|
-
let e = n.block.align;
|
|
1575
|
-
return {
|
|
1576
|
-
maxWidth: "100%",
|
|
1577
|
-
width: n.block.width === "full" ? v.value : `${n.block.width}px`,
|
|
1578
|
-
height: n.block.height ? `${n.block.height}px` : void 0,
|
|
1579
|
-
borderRadius: ae(n.block.borderRadius) ?? void 0,
|
|
1580
|
-
...ti(n.block.border),
|
|
1581
|
-
display: "block",
|
|
1582
|
-
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
1583
|
-
marginRight: e === "center" ? "auto" : void 0
|
|
1584
|
-
};
|
|
1585
|
-
}), w = ut(() => o.value ? void 0 : n.block.src), D = ut(() => o.value ? n.block.placeholderUrl : void 0);
|
|
1586
|
-
return (t, n) => (T(), S("div", {
|
|
1587
|
-
ref_key: "dropZoneRef",
|
|
1588
|
-
ref: l,
|
|
1589
|
-
"data-testid": "image-drop-zone",
|
|
1590
|
-
"data-drop-enabled": k(d),
|
|
1591
|
-
class: "tpl:relative tpl:w-full",
|
|
1592
|
-
style: E(_.value)
|
|
1593
|
-
}, [k(m) ? (T(), N(_t, {
|
|
1594
|
-
key: 0,
|
|
1595
|
-
uploading: k(p),
|
|
1596
|
-
size: "canvas"
|
|
1597
|
-
}, null, 8, ["uploading"])) : b("", !0), e.block.src && o.value && e.block.placeholderUrl ? (T(), S(j, { key: 1 }, [e.block.linkUrl ? (T(), S("a", {
|
|
1598
|
-
key: 0,
|
|
1599
|
-
href: e.block.linkUrl,
|
|
1600
|
-
target: "_blank",
|
|
1601
|
-
rel: "noopener noreferrer",
|
|
1602
|
-
onClick: n[0] ||= L(() => {}, ["prevent"])
|
|
1603
|
-
}, [O("img", {
|
|
1604
|
-
class: "tpl:border-0",
|
|
1605
|
-
loading: "lazy",
|
|
1606
|
-
src: k(D),
|
|
1607
|
-
alt: e.block.alt || k(i).image.altTextPlaceholder,
|
|
1608
|
-
style: E(x.value)
|
|
1609
|
-
}, null, 12, $i)], 8, Qi)) : (T(), S("img", {
|
|
1610
|
-
key: 1,
|
|
1611
|
-
class: "tpl:border-0",
|
|
1612
|
-
src: k(D),
|
|
1613
|
-
alt: e.block.alt,
|
|
1614
|
-
style: E(x.value)
|
|
1615
|
-
}, null, 12, ea))], 64)) : e.block.src && o.value ? (T(), S("div", {
|
|
1616
|
-
key: 2,
|
|
1617
|
-
class: "tpl:!flex tpl:box-border 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)]",
|
|
1618
|
-
style: E([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, x.value])
|
|
1619
|
-
}, [g(k(Bn), {
|
|
1620
|
-
size: 32,
|
|
1621
|
-
"stroke-width": 1.5,
|
|
1622
|
-
class: "tpl:text-[var(--tpl-primary)]",
|
|
1623
|
-
style: { opacity: "0.5" }
|
|
1624
|
-
}), O("span", ta, [g(ai, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (T(), S(j, { key: 3 }, [e.block.linkUrl ? (T(), S("a", {
|
|
1625
|
-
key: 0,
|
|
1626
|
-
href: e.block.linkUrl,
|
|
1627
|
-
target: "_blank",
|
|
1628
|
-
rel: "noopener noreferrer",
|
|
1629
|
-
onClick: n[1] ||= L(() => {}, ["prevent"])
|
|
1630
|
-
}, [O("img", {
|
|
1631
|
-
class: "tpl:border-0",
|
|
1632
|
-
loading: "lazy",
|
|
1633
|
-
src: k(w),
|
|
1634
|
-
alt: e.block.alt || k(i).image.altTextPlaceholder,
|
|
1635
|
-
style: E(x.value)
|
|
1636
|
-
}, null, 12, ra)], 8, na)) : (T(), S("img", {
|
|
1637
|
-
key: 1,
|
|
1638
|
-
class: "tpl:border-0",
|
|
1639
|
-
src: k(w),
|
|
1640
|
-
alt: e.block.alt,
|
|
1641
|
-
style: E(x.value)
|
|
1642
|
-
}, null, 12, ia))], 64)) : (T(), S("div", aa, [k(u) ? (T(), S("button", {
|
|
1643
|
-
key: 0,
|
|
1644
|
-
"aria-label": k(i).image.browseMedia,
|
|
1645
|
-
class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
1646
|
-
onClick: n[2] ||= L((...e) => k(h) && k(h)(...e), ["stop"])
|
|
1647
|
-
}, [g(k(Bn), {
|
|
1648
|
-
size: 14,
|
|
1649
|
-
"stroke-width": 1.5
|
|
1650
|
-
}), C(" " + c(k(i).image.browseMedia), 1)], 8, oa)) : (T(), S("span", sa, c(k(i).image.clickToAdd), 1))]))], 12, Zi));
|
|
1651
|
-
}
|
|
1652
|
-
}), la = { class: "tpl:w-full" }, ua = ["href"], da = {
|
|
1653
|
-
key: 1,
|
|
1654
|
-
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)]"
|
|
1655
|
-
}, fa = /* @__PURE__ */ F({
|
|
1656
|
-
__name: "MenuBlock",
|
|
1657
|
-
props: {
|
|
1658
|
-
block: {},
|
|
1659
|
-
viewport: {}
|
|
1660
|
-
},
|
|
1661
|
-
setup(e) {
|
|
1662
|
-
let t = e, { t: n } = kn(), r = Pt(wn, "MenuBlock"), i = y(() => ({
|
|
1663
|
-
display: "flex",
|
|
1664
|
-
flexWrap: "wrap",
|
|
1665
|
-
gap: `0 ${t.block.spacing}px`,
|
|
1666
|
-
justifyContent: t.block.textAlign === "left" ? "flex-start" : t.block.textAlign === "right" ? "flex-end" : "center",
|
|
1667
|
-
fontSize: `${t.block.fontSize}px`,
|
|
1668
|
-
fontFamily: t.block.fontFamily ? r.resolveFontFamily(t.block.fontFamily) : "inherit",
|
|
1669
|
-
alignItems: "center"
|
|
1670
|
-
})), a = y(() => t.block.items.length > 0);
|
|
1671
|
-
function o(e) {
|
|
1672
|
-
return e || t.block.linkColor || t.block.color;
|
|
1673
|
-
}
|
|
1674
|
-
return (t, r) => (T(), S("div", la, [a.value ? (T(), S("div", {
|
|
1675
|
-
key: 0,
|
|
1676
|
-
style: E(i.value)
|
|
1677
|
-
}, [(T(!0), S(j, null, l(e.block.items, (t, n) => (T(), S(j, { key: t.id }, [O("a", {
|
|
1678
|
-
href: t.url || "#",
|
|
1679
|
-
class: "tpl:cursor-default tpl:no-underline",
|
|
1680
|
-
style: E({
|
|
1681
|
-
color: o(t.color),
|
|
1682
|
-
fontWeight: t.bold ? "bold" : "normal",
|
|
1683
|
-
textDecoration: t.underline ? "underline" : "none"
|
|
1684
|
-
}),
|
|
1685
|
-
onClick: r[0] ||= L(() => {}, ["prevent"])
|
|
1686
|
-
}, [g(ai, { text: t.text || "..." }, null, 8, ["text"])], 12, ua), n < e.block.items.length - 1 ? (T(), S("span", {
|
|
1687
|
-
key: 0,
|
|
1688
|
-
style: E({
|
|
1689
|
-
color: e.block.separatorColor,
|
|
1690
|
-
padding: `0 ${e.block.spacing}px`
|
|
1691
|
-
})
|
|
1692
|
-
}, c(e.block.separator), 5)) : b("", !0)], 64))), 128))], 4)) : (T(), S("div", da, [g(k(Et), { size: 16 }), O("span", null, c(k(n).menu.addLinks), 1)]))]));
|
|
1693
|
-
}
|
|
1694
|
-
});
|
|
1695
|
-
// src/composables/useEditableTextBlock.ts
|
|
1696
|
-
function pa(e) {
|
|
1697
|
-
let t = n(Jt, Bt), r = n(Xt, null), { syntax: i } = qn(), a = y(() => r?.value ? de(e(), t.value) : Me(e(), t.value)), o = y(() => qe(Ln(nt(a.value, i)))), s = f(!1), c = f(null), { top: l, left: u } = Nt(c), { toLocal: d } = Nn(), p = y(() => d({
|
|
1698
|
-
top: l.value - 8,
|
|
1699
|
-
left: u.value
|
|
1700
|
-
}));
|
|
1701
|
-
function m() {
|
|
1702
|
-
s.value = !0;
|
|
1703
|
-
}
|
|
1704
|
-
function h() {
|
|
1705
|
-
s.value = !1;
|
|
1706
|
-
}
|
|
1707
|
-
return {
|
|
1708
|
-
isEditing: s,
|
|
1709
|
-
blockRef: c,
|
|
1710
|
-
toolbarPosition: p,
|
|
1711
|
-
resolvedContent: o,
|
|
1712
|
-
handleDoubleClick: m,
|
|
1713
|
-
handleEditorDone: h
|
|
1714
|
-
};
|
|
1715
|
-
}
|
|
1716
|
-
// src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1717
|
-
var ma = ["innerHTML"], ha = /* @__PURE__ */ F({
|
|
1718
|
-
__name: "ParagraphBlock",
|
|
1719
|
-
props: {
|
|
1720
|
-
block: {},
|
|
1721
|
-
viewport: {}
|
|
1722
|
-
},
|
|
1723
|
-
setup(e) {
|
|
1724
|
-
let t = e, n = ee(() => import("./ParagraphEditor-D-nqs82g.js").then((e) => e.t)), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = pa(() => t.block.content);
|
|
1725
|
-
return (t, l) => (T(), S("div", {
|
|
1726
|
-
ref_key: "blockRef",
|
|
1727
|
-
ref: i,
|
|
1728
|
-
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1729
|
-
onDblclick: l[0] ||= (...e) => k(s) && k(s)(...e)
|
|
1730
|
-
}, [k(r) ? (T(), N(k(n), {
|
|
1731
|
-
key: 0,
|
|
1732
|
-
block: e.block,
|
|
1733
|
-
"toolbar-position": k(a),
|
|
1734
|
-
onDone: k(c)
|
|
1735
|
-
}, null, 8, [
|
|
1736
|
-
"block",
|
|
1737
|
-
"toolbar-position",
|
|
1738
|
-
"onDone"
|
|
1739
|
-
])) : (T(), S("div", {
|
|
1740
|
-
key: 1,
|
|
1741
|
-
class: "tpl-text-content tpl:outline-none",
|
|
1742
|
-
innerHTML: k(o)
|
|
1743
|
-
}, null, 8, ma))], 544));
|
|
1744
|
-
}
|
|
1745
|
-
}), ga = [
|
|
1746
|
-
"data-block-id",
|
|
1747
|
-
"data-block-type",
|
|
1748
|
-
"data-tpl-picked"
|
|
1749
|
-
], _a = ["data-lock-holder"], va = ["aria-label"], ya = [
|
|
1750
|
-
"aria-label",
|
|
1751
|
-
"aria-pressed",
|
|
1752
|
-
"title"
|
|
1753
|
-
], ba = ["aria-label", "title"], xa = ["aria-label", "title"], Sa = ["aria-label", "title"], Ca = {
|
|
1754
|
-
key: 3,
|
|
1755
|
-
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"
|
|
1756
|
-
}, wa = { 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)]" }, Ta = {
|
|
1757
|
-
key: 4,
|
|
1758
|
-
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
1759
|
-
}, Ea = ["aria-label", "title"], Da = {
|
|
1760
|
-
key: 5,
|
|
1761
|
-
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
1762
|
-
}, Oa = ["aria-label"], ka = /*#__PURE__*/ Gn(/* @__PURE__ */ F({
|
|
1763
|
-
__name: "BlockWrapper",
|
|
1764
|
-
props: {
|
|
1765
|
-
block: {},
|
|
1766
|
-
isSelected: { type: Boolean },
|
|
1767
|
-
viewport: {},
|
|
1768
|
-
previewMode: { type: Boolean },
|
|
1769
|
-
nested: { type: Boolean },
|
|
1770
|
-
picked: { type: Boolean }
|
|
1771
|
-
},
|
|
1772
|
-
emits: ["select"],
|
|
1773
|
-
setup(e, { emit: i }) {
|
|
1774
|
-
let a = ee(() => import("./BlockIssueBadge-6Ri2FfX-.js")), o = e, s = i, { t: l, format: u } = kn(), p = n(Qt, null), m = f(null), h = y(() => p?.liftedBlockId.value === o.block.id), _ = y(() => h.value ? u(l.blockActions.dragLifted, { block: o.block.type }) : l.blockActions.drag);
|
|
1775
|
-
async function v() {
|
|
1776
|
-
await r(), m.value?.focus();
|
|
1777
|
-
}
|
|
1778
|
-
function x(e) {
|
|
1779
|
-
p && (e.key === " " || e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), h.value ? p.drop(o.block.id) : p.lift(o.block.id)) : h.value && (e.key === "Escape" ? (e.preventDefault(), e.stopPropagation(), p.cancel(), v()) : e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), p.moveUp(o.block.id), v()) : e.key === "ArrowDown" && (e.preventDefault(), e.stopPropagation(), p.moveDown(o.block.id), v())));
|
|
1780
|
-
}
|
|
1781
|
-
let w = y(() => !o.viewport || !o.block.visibility ? !1 : o.block.visibility[o.viewport] === !1), D = y(() => o.previewMode === !0 && w.value), A = y(() => o.viewport ? {
|
|
1782
|
-
desktop: l.viewport.desktop,
|
|
1783
|
-
mobile: l.viewport.mobile
|
|
1784
|
-
}[o.viewport] ?? o.viewport : ""), j = y(() => !!o.block.displayCondition), M = n(sn, null), N = n(dn, null), P = n(gn, {}), F = y(() => P.savedBlocks?.isPicking.value === !0), I = y(() => !o.nested && P.savedBlocks?.isAvailable.value === !0 && P.savedBlocks?.canCreate.value === !0), te = y(() => o.isSelected && !F.value), ne = y(() => P.comments?.getBlockCount(o.block.id) ?? 0), re = y(() => P.collaboration?.lockOf(o.block.id) ?? null), ie = y(() => re.value?.holder.type === "guest" ? l.collaboration.guest : re.value?.holder.name ?? ""), ae = y(() => P.collaboration?.agentHighlightOf(o.block.id) ?? P.ai?.highlightOf(o.block.id) ?? null), oe = at(() => o.block.type === "section" ? o.block.backgroundImage : void 0), se = at(() => o.block.type === "section" ? o.block.wrapper?.backgroundImage : void 0), ce = n(fn, null), le = n(Lt, void 0), ue = y(() => $r(o.block, {
|
|
1785
|
-
backgroundImageUrl: oe.value,
|
|
1786
|
-
heroBoxWidth: ht(o.block, ce?.content.value, le)
|
|
1787
|
-
})), de = y(() => ni(o.block, { backgroundImageUrl: se.value }));
|
|
1788
|
-
function fe(e) {
|
|
1789
|
-
o.previewMode || (e.target?.closest("a") && e.preventDefault(), e.stopPropagation(), s("select"));
|
|
1790
|
-
}
|
|
1791
|
-
function pe() {
|
|
1792
|
-
M?.deleteBlock(o.block.id);
|
|
1793
|
-
}
|
|
1794
|
-
function me() {
|
|
1795
|
-
M?.duplicateBlock(o.block);
|
|
1796
|
-
}
|
|
1797
|
-
function he() {
|
|
1798
|
-
P.savedBlocks?.startPicking(o.block.id);
|
|
1799
|
-
}
|
|
1800
|
-
function ge() {
|
|
1801
|
-
N?.toggleBlock(o.block.id);
|
|
1802
|
-
}
|
|
1803
|
-
return (n, r) => D.value ? b("", !0) : (T(), S("div", {
|
|
1804
|
-
key: 0,
|
|
1805
|
-
class: t(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow", {
|
|
1806
|
-
"tpl-block--selected": e.isSelected,
|
|
1807
|
-
"tpl-block--picked": e.picked,
|
|
1808
|
-
"tpl-block--idle": !e.isSelected && !e.picked,
|
|
1809
|
-
"tpl-block--lifted": h.value
|
|
1810
|
-
}]),
|
|
1811
|
-
"data-block-id": e.block.id,
|
|
1812
|
-
"data-block-type": e.block.type,
|
|
1813
|
-
"data-tpl-picked": e.picked || void 0,
|
|
1814
|
-
onClick: fe
|
|
1815
|
-
}, [
|
|
1816
|
-
g(k(a), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
1817
|
-
re.value ? (T(), S("div", {
|
|
1818
|
-
key: 0,
|
|
1819
|
-
"data-testid": "block-lock",
|
|
1820
|
-
"data-lock-holder": re.value.holder.sessionId,
|
|
1821
|
-
class: "tpl-block-lock tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm",
|
|
1822
|
-
style: E({
|
|
1823
|
-
outline: `2px solid ${re.value.holder.color}`,
|
|
1824
|
-
outlineOffset: "-1px"
|
|
1825
|
-
})
|
|
1826
|
-
}, [O("span", {
|
|
1827
|
-
class: "tpl:absolute tpl:-top-0.5 tpl:left-1/2 tpl:z-[5] tpl:-translate-x-1/2 tpl:-translate-y-full tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:whitespace-nowrap",
|
|
1828
|
-
style: E({
|
|
1829
|
-
backgroundColor: re.value.holder.color,
|
|
1830
|
-
color: k(Yn)(re.value.holder.color)
|
|
1831
|
-
})
|
|
1832
|
-
}, c(k(u)(k(l).collaboration.editing, { name: ie.value })), 5)], 12, _a)) : b("", !0),
|
|
1833
|
-
ae.value === null ? b("", !0) : (T(), S("div", {
|
|
1834
|
-
key: ae.value,
|
|
1835
|
-
"data-testid": "block-agent-highlight",
|
|
1836
|
-
"aria-hidden": "true",
|
|
1837
|
-
class: "tpl-block-agent-highlight tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[4] tpl:rounded-sm"
|
|
1838
|
-
})),
|
|
1839
|
-
te.value ? (T(), S("div", {
|
|
1840
|
-
key: 2,
|
|
1841
|
-
role: "toolbar",
|
|
1842
|
-
"aria-label": k(l).blockActions.drag,
|
|
1843
|
-
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)]"
|
|
1844
|
-
}, [
|
|
1845
|
-
O("button", {
|
|
1846
|
-
ref_key: "dragButtonRef",
|
|
1847
|
-
ref: m,
|
|
1848
|
-
class: "tpl-block-btn tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-grab tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:active:cursor-grabbing",
|
|
1849
|
-
"aria-label": _.value,
|
|
1850
|
-
"aria-pressed": h.value,
|
|
1851
|
-
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
1852
|
-
title: k(l).blockActions.drag,
|
|
1853
|
-
onKeydown: x
|
|
1854
|
-
}, [g(k(fi), {
|
|
1855
|
-
size: 14,
|
|
1856
|
-
"stroke-width": 1.5
|
|
1857
|
-
})], 40, ya),
|
|
1858
|
-
O("button", {
|
|
1859
|
-
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",
|
|
1860
|
-
"aria-label": k(l).blockActions.duplicate,
|
|
1861
|
-
title: k(l).blockActions.duplicate,
|
|
1862
|
-
onClick: L(me, ["stop"])
|
|
1863
|
-
}, [g(k(zn), {
|
|
1864
|
-
size: 14,
|
|
1865
|
-
"stroke-width": 1.5
|
|
1866
|
-
})], 8, ba),
|
|
1867
|
-
I.value ? (T(), S("button", {
|
|
1868
|
-
key: 0,
|
|
1869
|
-
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",
|
|
1870
|
-
"aria-label": k(l).blockActions.saveAsBlock,
|
|
1871
|
-
title: k(l).blockActions.saveAsBlock,
|
|
1872
|
-
onClick: L(he, ["stop"])
|
|
1873
|
-
}, [g(k(ci), {
|
|
1874
|
-
size: 14,
|
|
1875
|
-
"stroke-width": 1.5
|
|
1876
|
-
})], 8, xa)) : b("", !0),
|
|
1877
|
-
O("button", {
|
|
1878
|
-
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",
|
|
1879
|
-
"aria-label": k(l).blockActions.delete,
|
|
1880
|
-
title: k(l).blockActions.delete,
|
|
1881
|
-
onClick: L(pe, ["stop"])
|
|
1882
|
-
}, [g(k(Hn), {
|
|
1883
|
-
size: 14,
|
|
1884
|
-
"stroke-width": 1.5
|
|
1885
|
-
})], 8, Sa)
|
|
1886
|
-
], 8, va)) : b("", !0),
|
|
1887
|
-
w.value ? (T(), S("div", Ca, [O("span", wa, [g(k(ui), {
|
|
1888
|
-
size: 12,
|
|
1889
|
-
"stroke-width": 1.5
|
|
1890
|
-
}), C(" " + c(k(u)(k(l).blockActions.hiddenOnViewport, { viewport: A.value })), 1)])])) : b("", !0),
|
|
1891
|
-
j.value && !w.value ? (T(), S("div", Ta, [O("button", {
|
|
1892
|
-
"data-testid": "condition-toggle",
|
|
1893
|
-
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:bg-[var(--tpl-chrome-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
1894
|
-
"aria-label": k(l).blockActions.conditionToggle,
|
|
1895
|
-
title: e.block.displayCondition?.label,
|
|
1896
|
-
onClick: L(ge, ["stop"])
|
|
1897
|
-
}, [g(k(di), {
|
|
1898
|
-
size: 12,
|
|
1899
|
-
"stroke-width": 2
|
|
1900
|
-
})], 8, Ea)])) : b("", !0),
|
|
1901
|
-
ne.value > 0 && !w.value ? (T(), S("div", Da, [O("button", {
|
|
1902
|
-
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:bg-[var(--tpl-chrome-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
1903
|
-
"aria-label": k(u)(k(l).blockActions.comments, { count: String(ne.value) }),
|
|
1904
|
-
onClick: r[0] ||= L((t) => k(P).comments?.openForBlock(e.block.id), ["stop"])
|
|
1905
|
-
}, [g(k(Vn), {
|
|
1906
|
-
size: 12,
|
|
1907
|
-
"stroke-width": 2.5
|
|
1908
|
-
}), C(" " + c(ne.value), 1)], 8, Oa)])) : b("", !0),
|
|
1909
|
-
de.value ? (T(), S("div", {
|
|
1910
|
-
key: 6,
|
|
1911
|
-
class: t(["tpl-section-wrapper tpl-email-surface", k(Yr)(de.value)]),
|
|
1912
|
-
style: E(de.value)
|
|
1913
|
-
}, [O("div", {
|
|
1914
|
-
class: t(["tpl-block-content tpl-email-surface", k(Yr)(ue.value)]),
|
|
1915
|
-
style: E(ue.value)
|
|
1916
|
-
}, [d(n.$slots, "default", {}, void 0, !0)], 6)], 6)) : (T(), S("div", {
|
|
1917
|
-
key: 7,
|
|
1918
|
-
class: t(["tpl-block-content tpl-email-surface", k(Yr)(ue.value)]),
|
|
1919
|
-
style: E(ue.value)
|
|
1920
|
-
}, [d(n.$slots, "default", {}, void 0, !0)], 6))
|
|
1921
|
-
], 10, ga));
|
|
1922
|
-
}
|
|
1923
|
-
}), [["__scopeId", "data-v-126b991e"]]);
|
|
1924
|
-
// src/utils/unwrapParagraph.ts
|
|
1925
|
-
function Aa(e) {
|
|
1926
|
-
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
1927
|
-
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
1928
|
-
}
|
|
1929
|
-
// src/components/blocks/TitleBlock.vue
|
|
1930
|
-
var ja = /* @__PURE__ */ F({
|
|
1931
|
-
__name: "TitleBlock",
|
|
1932
|
-
props: {
|
|
1933
|
-
block: {},
|
|
1934
|
-
viewport: {}
|
|
1935
|
-
},
|
|
1936
|
-
setup(e) {
|
|
1937
|
-
let t = e, n = ee(() => import("./TitleEditor-BYk_9SpQ.js")), r = Pt(wn, "TitleBlock"), { isEditing: i, blockRef: a, toolbarPosition: s, resolvedContent: c, handleDoubleClick: l, handleEditorDone: u } = pa(() => t.block.content), d = y(() => {
|
|
1938
|
-
let e = {
|
|
1939
|
-
fontSize: `${Ne[t.block.level]}px`,
|
|
1940
|
-
lineHeight: String(ze),
|
|
1941
|
-
fontWeight: "700",
|
|
1942
|
-
textAlign: t.block.textAlign
|
|
1943
|
-
};
|
|
1944
|
-
return t.block.color && (e.color = t.block.color), t.block.fontFamily && (e.fontFamily = r.resolveFontFamily(t.block.fontFamily)), e;
|
|
1945
|
-
}), f = y(() => `h${t.block.level}`), p = y(() => Aa(c.value));
|
|
1946
|
-
return (t, r) => (T(), S("div", {
|
|
1947
|
-
ref_key: "blockRef",
|
|
1948
|
-
ref: a,
|
|
1949
|
-
class: "tpl:min-h-[1em] tpl:w-full",
|
|
1950
|
-
style: E(d.value),
|
|
1951
|
-
onDblclick: r[0] ||= (...e) => k(l) && k(l)(...e)
|
|
1952
|
-
}, [k(i) ? (T(), N(k(n), {
|
|
1953
|
-
key: 0,
|
|
1954
|
-
block: e.block,
|
|
1955
|
-
"toolbar-position": k(s),
|
|
1956
|
-
onDone: k(u)
|
|
1957
|
-
}, null, 8, [
|
|
1958
|
-
"block",
|
|
1959
|
-
"toolbar-position",
|
|
1960
|
-
"onDone"
|
|
1961
|
-
])) : (T(), N(o(f.value), {
|
|
1962
|
-
key: 1,
|
|
1963
|
-
class: "tpl-text-content tpl:m-0 tpl:font-[inherit] tpl:text-[length:inherit] tpl:leading-[inherit] tpl:outline-none",
|
|
1964
|
-
style: {
|
|
1965
|
-
color: "inherit",
|
|
1966
|
-
fontWeight: "inherit"
|
|
1967
|
-
},
|
|
1968
|
-
innerHTML: p.value
|
|
1969
|
-
}, null, 8, ["innerHTML"]))], 36));
|
|
1970
|
-
}
|
|
1971
|
-
}), Ma = "hero", Na = "#1f2937", Pa = "#ffffff";
|
|
1972
|
-
function Fa(e, t) {
|
|
1973
|
-
let n = $e("title", e);
|
|
1974
|
-
n.color = Pa, n.textAlign = "center";
|
|
1975
|
-
let r = $e("paragraph", e);
|
|
1976
|
-
r.content = `<p style="text-align: center"><span style="color: ${Pa}">${Ia(t)}</span></p>`;
|
|
1977
|
-
let i = $e("button", e);
|
|
1978
|
-
return i.align = "center", fe({
|
|
1979
|
-
columns: "1",
|
|
1980
|
-
children: [[
|
|
1981
|
-
n,
|
|
1982
|
-
r,
|
|
1983
|
-
i
|
|
1984
|
-
]],
|
|
1985
|
-
hero: {
|
|
1986
|
-
height: "image",
|
|
1987
|
-
verticalAlign: "middle"
|
|
1988
|
-
},
|
|
1989
|
-
styles: {
|
|
1990
|
-
padding: {
|
|
1991
|
-
top: 48,
|
|
1992
|
-
right: 24,
|
|
1993
|
-
bottom: 48,
|
|
1994
|
-
left: 24
|
|
1995
|
-
},
|
|
1996
|
-
backgroundColor: Na
|
|
1997
|
-
}
|
|
1998
|
-
});
|
|
1999
|
-
}
|
|
2000
|
-
function Ia(e) {
|
|
2001
|
-
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
2002
|
-
}
|
|
2003
|
-
// src/utils/sectionColumnDrop.ts
|
|
2004
|
-
var La = /* @__PURE__ */ new Set(["section", Ma]);
|
|
2005
|
-
function Ra(e) {
|
|
2006
|
-
return e.dataset.blockType !== "section" && !La.has(e.dataset.paletteType ?? "");
|
|
2007
|
-
}
|
|
2008
|
-
// ../../node_modules/.pnpm/vue-draggable-plus@0.6.1_@types+sortablejs@1.15.9/node_modules/vue-draggable-plus/dist/vue-draggable-plus.js
|
|
2009
|
-
var za = Object.defineProperty, Ba = Object.getOwnPropertySymbols, Va = Object.prototype.hasOwnProperty, Ha = Object.prototype.propertyIsEnumerable, Ua = (e, t, n) => t in e ? za(e, t, {
|
|
2010
|
-
enumerable: !0,
|
|
2011
|
-
configurable: !0,
|
|
2012
|
-
writable: !0,
|
|
2013
|
-
value: n
|
|
2014
|
-
}) : e[t] = n, Wa = (e, t) => {
|
|
2015
|
-
for (var n in t ||= {}) Va.call(t, n) && Ua(e, n, t[n]);
|
|
2016
|
-
if (Ba) for (var n of Ba(t)) Ha.call(t, n) && Ua(e, n, t[n]);
|
|
2017
|
-
return e;
|
|
2018
|
-
}, Ga = (e, t) => {
|
|
2019
|
-
var n = {};
|
|
2020
|
-
for (var r in e) Va.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
|
|
2021
|
-
if (e != null && Ba) for (var r of Ba(e)) t.indexOf(r) < 0 && Ha.call(e, r) && (n[r] = e[r]);
|
|
2022
|
-
return n;
|
|
2023
|
-
}, Ka = "[vue-draggable-plus]: ";
|
|
2024
|
-
function qa(e) {
|
|
2025
|
-
console.warn(Ka + e);
|
|
2026
|
-
}
|
|
2027
|
-
function Ja(e) {
|
|
2028
|
-
console.error(Ka + e);
|
|
2029
|
-
}
|
|
2030
|
-
function Ya(e, t, n) {
|
|
2031
|
-
return n >= 0 && n < e.length && e.splice(n, 0, e.splice(t, 1)[0]), e;
|
|
2032
|
-
}
|
|
2033
|
-
function Xa(e) {
|
|
2034
|
-
return e.replace(/-(\w)/g, (e, t) => t ? t.toUpperCase() : "");
|
|
2035
|
-
}
|
|
2036
|
-
function Za(e) {
|
|
2037
|
-
return Object.keys(e).reduce((t, n) => (e[n] !== void 0 && (t[Xa(n)] = e[n]), t), {});
|
|
2038
|
-
}
|
|
2039
|
-
function Qa(e, t) {
|
|
2040
|
-
return Array.isArray(e) && e.splice(t, 1), e;
|
|
2041
|
-
}
|
|
2042
|
-
function $a(e, t, n) {
|
|
2043
|
-
return Array.isArray(e) && e.splice(t, 0, n), e;
|
|
2044
|
-
}
|
|
2045
|
-
function eo(e) {
|
|
2046
|
-
return e === void 0;
|
|
2047
|
-
}
|
|
2048
|
-
function to(e) {
|
|
2049
|
-
return typeof e == "string";
|
|
2050
|
-
}
|
|
2051
|
-
function no(e, t, n) {
|
|
2052
|
-
let r = e.children[n];
|
|
2053
|
-
e.insertBefore(t, r);
|
|
2054
|
-
}
|
|
2055
|
-
function ro(e) {
|
|
2056
|
-
e.parentNode && e.parentNode.removeChild(e);
|
|
2057
|
-
}
|
|
2058
|
-
function io(e, t = document) {
|
|
2059
|
-
let n = null;
|
|
2060
|
-
return n = typeof t?.querySelector == "function" ? (t?.querySelector)?.call(t, e) : document.querySelector(e), n || qa(`Element not found: ${e}`), n;
|
|
2061
|
-
}
|
|
2062
|
-
function ao(e, t, n = null) {
|
|
2063
|
-
return function(...r) {
|
|
2064
|
-
return e.apply(n, r), t.apply(n, r);
|
|
2065
|
-
};
|
|
2066
|
-
}
|
|
2067
|
-
function oo(e, t) {
|
|
2068
|
-
let n = Wa({}, e);
|
|
2069
|
-
return Object.keys(t).forEach((r) => {
|
|
2070
|
-
n[r] ? n[r] = ao(e[r], t[r]) : n[r] = t[r];
|
|
2071
|
-
}), n;
|
|
2072
|
-
}
|
|
2073
|
-
function so(e) {
|
|
2074
|
-
return e instanceof HTMLElement;
|
|
2075
|
-
}
|
|
2076
|
-
function co(e, t) {
|
|
2077
|
-
Object.keys(e).forEach((n) => {
|
|
2078
|
-
t(n, e[n]);
|
|
2079
|
-
});
|
|
2080
|
-
}
|
|
2081
|
-
function lo(e) {
|
|
2082
|
-
return e.charCodeAt(0) === 111 && e.charCodeAt(1) === 110 && (e.charCodeAt(2) > 122 || e.charCodeAt(2) < 97);
|
|
2083
|
-
}
|
|
2084
|
-
var uo = Object.assign;
|
|
2085
|
-
function fo(e, t) {
|
|
2086
|
-
var n = Object.keys(e);
|
|
2087
|
-
if (Object.getOwnPropertySymbols) {
|
|
2088
|
-
var r = Object.getOwnPropertySymbols(e);
|
|
2089
|
-
t && (r = r.filter(function(t) {
|
|
2090
|
-
return Object.getOwnPropertyDescriptor(e, t).enumerable;
|
|
2091
|
-
})), n.push.apply(n, r);
|
|
2092
|
-
}
|
|
2093
|
-
return n;
|
|
2094
|
-
}
|
|
2095
|
-
function po(e) {
|
|
2096
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
2097
|
-
var n = arguments[t] == null ? {} : arguments[t];
|
|
2098
|
-
t % 2 ? fo(Object(n), !0).forEach(function(t) {
|
|
2099
|
-
ho(e, t, n[t]);
|
|
2100
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : fo(Object(n)).forEach(function(t) {
|
|
2101
|
-
Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
|
|
2102
|
-
});
|
|
2103
|
-
}
|
|
2104
|
-
return e;
|
|
2105
|
-
}
|
|
2106
|
-
function mo(e) {
|
|
2107
|
-
"@babel/helpers - typeof";
|
|
2108
|
-
return mo = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
2109
|
-
return typeof e;
|
|
2110
|
-
} : function(e) {
|
|
2111
|
-
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
2112
|
-
}, mo(e);
|
|
2113
|
-
}
|
|
2114
|
-
function ho(e, t, n) {
|
|
2115
|
-
return t in e ? Object.defineProperty(e, t, {
|
|
2116
|
-
value: n,
|
|
2117
|
-
enumerable: !0,
|
|
2118
|
-
configurable: !0,
|
|
2119
|
-
writable: !0
|
|
2120
|
-
}) : e[t] = n, e;
|
|
2121
|
-
}
|
|
2122
|
-
function go() {
|
|
2123
|
-
return go = Object.assign || function(e) {
|
|
2124
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
2125
|
-
var n = arguments[t];
|
|
2126
|
-
for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
2127
|
-
}
|
|
2128
|
-
return e;
|
|
2129
|
-
}, go.apply(this, arguments);
|
|
2130
|
-
}
|
|
2131
|
-
function _o(e, t) {
|
|
2132
|
-
if (e == null) return {};
|
|
2133
|
-
for (var n = {}, r = Object.keys(e), i, a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2134
|
-
return n;
|
|
2135
|
-
}
|
|
2136
|
-
function vo(e, t) {
|
|
2137
|
-
if (e == null) return {};
|
|
2138
|
-
var n = _o(e, t), r, i;
|
|
2139
|
-
if (Object.getOwnPropertySymbols) {
|
|
2140
|
-
var a = Object.getOwnPropertySymbols(e);
|
|
2141
|
-
for (i = 0; i < a.length; i++) r = a[i], !(t.indexOf(r) >= 0) && Object.prototype.propertyIsEnumerable.call(e, r) && (n[r] = e[r]);
|
|
2142
|
-
}
|
|
2143
|
-
return n;
|
|
2144
|
-
}
|
|
2145
|
-
var yo = "1.15.2";
|
|
2146
|
-
function bo(e) {
|
|
2147
|
-
if (typeof window < "u" && window.navigator) return !!/* @__PURE__ */ navigator.userAgent.match(e);
|
|
2148
|
-
}
|
|
2149
|
-
var xo = bo(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i), So = bo(/Edge/i), Co = bo(/firefox/i), wo = bo(/safari/i) && !bo(/chrome/i) && !bo(/android/i), To = bo(/iP(ad|od|hone)/i), Eo = bo(/chrome/i) && bo(/android/i), Do = {
|
|
2150
|
-
capture: !1,
|
|
2151
|
-
passive: !1
|
|
2152
|
-
};
|
|
2153
|
-
function z(e, t, n) {
|
|
2154
|
-
e.addEventListener(t, n, !xo && Do);
|
|
2155
|
-
}
|
|
2156
|
-
function B(e, t, n) {
|
|
2157
|
-
e.removeEventListener(t, n, !xo && Do);
|
|
2158
|
-
}
|
|
2159
|
-
function Oo(e, t) {
|
|
2160
|
-
if (t) {
|
|
2161
|
-
if (t[0] === ">" && (t = t.substring(1)), e) try {
|
|
2162
|
-
if (e.matches) return e.matches(t);
|
|
2163
|
-
if (e.msMatchesSelector) return e.msMatchesSelector(t);
|
|
2164
|
-
if (e.webkitMatchesSelector) return e.webkitMatchesSelector(t);
|
|
2165
|
-
} catch {
|
|
2166
|
-
return !1;
|
|
2167
|
-
}
|
|
2168
|
-
return !1;
|
|
2169
|
-
}
|
|
2170
|
-
}
|
|
2171
|
-
function ko(e) {
|
|
2172
|
-
return e.host && e !== document && e.host.nodeType ? e.host : e.parentNode;
|
|
2173
|
-
}
|
|
2174
|
-
function Ao(e, t, n, r) {
|
|
2175
|
-
if (e) {
|
|
2176
|
-
n ||= document;
|
|
2177
|
-
do {
|
|
2178
|
-
if (t != null && (t[0] === ">" ? e.parentNode === n && Oo(e, t) : Oo(e, t)) || r && e === n) return e;
|
|
2179
|
-
if (e === n) break;
|
|
2180
|
-
} while (e = ko(e));
|
|
2181
|
-
}
|
|
2182
|
-
return null;
|
|
2183
|
-
}
|
|
2184
|
-
var jo = /\s+/g;
|
|
2185
|
-
function Mo(e, t, n) {
|
|
2186
|
-
e && t && (e.classList ? e.classList[n ? "add" : "remove"](t) : e.className = ((" " + e.className + " ").replace(jo, " ").replace(" " + t + " ", " ") + (n ? " " + t : "")).replace(jo, " "));
|
|
2187
|
-
}
|
|
2188
|
-
function V(e, t, n) {
|
|
2189
|
-
var r = e && e.style;
|
|
2190
|
-
if (r) {
|
|
2191
|
-
if (n === void 0) return document.defaultView && document.defaultView.getComputedStyle ? n = document.defaultView.getComputedStyle(e, "") : e.currentStyle && (n = e.currentStyle), t === void 0 ? n : n[t];
|
|
2192
|
-
!(t in r) && t.indexOf("webkit") === -1 && (t = "-webkit-" + t), r[t] = n + (typeof n == "string" ? "" : "px");
|
|
2193
|
-
}
|
|
2194
|
-
}
|
|
2195
|
-
function No(e, t) {
|
|
2196
|
-
var n = "";
|
|
2197
|
-
if (typeof e == "string") n = e;
|
|
2198
|
-
else do {
|
|
2199
|
-
var r = V(e, "transform");
|
|
2200
|
-
r && r !== "none" && (n = r + " " + n);
|
|
2201
|
-
} while (!t && (e = e.parentNode));
|
|
2202
|
-
var i = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix;
|
|
2203
|
-
return i && new i(n);
|
|
2204
|
-
}
|
|
2205
|
-
function Po(e, t, n) {
|
|
2206
|
-
if (e) {
|
|
2207
|
-
var r = e.getElementsByTagName(t), i = 0, a = r.length;
|
|
2208
|
-
if (n) for (; i < a; i++) n(r[i], i);
|
|
2209
|
-
return r;
|
|
2210
|
-
}
|
|
2211
|
-
return [];
|
|
2212
|
-
}
|
|
2213
|
-
function Fo() {
|
|
2214
|
-
return document.scrollingElement || document.documentElement;
|
|
2215
|
-
}
|
|
2216
|
-
function H(e, t, n, r, i) {
|
|
2217
|
-
if (e.getBoundingClientRect || e === window) {
|
|
2218
|
-
var a, o, s, c, l, u, d;
|
|
2219
|
-
if (e !== window && e.parentNode && e !== Fo() ? (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, !xo)) do
|
|
2220
|
-
if (i && i.getBoundingClientRect && (V(i, "transform") !== "none" || n && V(i, "position") !== "static")) {
|
|
2221
|
-
var f = i.getBoundingClientRect();
|
|
2222
|
-
o -= f.top + parseInt(V(i, "border-top-width")), s -= f.left + parseInt(V(i, "border-left-width")), c = o + a.height, l = s + a.width;
|
|
2223
|
-
break;
|
|
2224
|
-
}
|
|
2225
|
-
while (i = i.parentNode);
|
|
2226
|
-
if (r && e !== window) {
|
|
2227
|
-
var p = No(i || e), m = p && p.a, h = p && p.d;
|
|
2228
|
-
p && (o /= h, s /= m, d /= m, u /= h, c = o + u, l = s + d);
|
|
2229
|
-
}
|
|
2230
|
-
return {
|
|
2231
|
-
top: o,
|
|
2232
|
-
left: s,
|
|
2233
|
-
bottom: c,
|
|
2234
|
-
right: l,
|
|
2235
|
-
width: d,
|
|
2236
|
-
height: u
|
|
2237
|
-
};
|
|
2238
|
-
}
|
|
2239
|
-
}
|
|
2240
|
-
function Io(e, t, n) {
|
|
2241
|
-
for (var r = Ho(e, !0), i = H(e)[t]; r;) {
|
|
2242
|
-
var a = H(r)[n], o = void 0;
|
|
2243
|
-
if (o = i >= a, !o) return r;
|
|
2244
|
-
if (r === Fo()) break;
|
|
2245
|
-
r = Ho(r, !1);
|
|
2246
|
-
}
|
|
2247
|
-
return !1;
|
|
2248
|
-
}
|
|
2249
|
-
function Lo(e, t, n, r) {
|
|
2250
|
-
for (var i = 0, a = 0, o = e.children; a < o.length;) {
|
|
2251
|
-
if (o[a].style.display !== "none" && o[a] !== Q.ghost && (r || o[a] !== Q.dragged) && Ao(o[a], n.draggable, e, !1)) {
|
|
2252
|
-
if (i === t) return o[a];
|
|
2253
|
-
i++;
|
|
2254
|
-
}
|
|
2255
|
-
a++;
|
|
2256
|
-
}
|
|
2257
|
-
return null;
|
|
2258
|
-
}
|
|
2259
|
-
function Ro(e, t) {
|
|
2260
|
-
for (var n = e.lastElementChild; n && (n === Q.ghost || V(n, "display") === "none" || t && !Oo(n, t));) n = n.previousElementSibling;
|
|
2261
|
-
return n || null;
|
|
2262
|
-
}
|
|
2263
|
-
function zo(e, t) {
|
|
2264
|
-
var n = 0;
|
|
2265
|
-
if (!e || !e.parentNode) return -1;
|
|
2266
|
-
for (; e = e.previousElementSibling;) e.nodeName.toUpperCase() !== "TEMPLATE" && e !== Q.clone && (!t || Oo(e, t)) && n++;
|
|
2267
|
-
return n;
|
|
2268
|
-
}
|
|
2269
|
-
function Bo(e) {
|
|
2270
|
-
var t = 0, n = 0, r = Fo();
|
|
2271
|
-
if (e) do {
|
|
2272
|
-
var i = No(e), a = i.a, o = i.d;
|
|
2273
|
-
t += e.scrollLeft * a, n += e.scrollTop * o;
|
|
2274
|
-
} while (e !== r && (e = e.parentNode));
|
|
2275
|
-
return [t, n];
|
|
2276
|
-
}
|
|
2277
|
-
function Vo(e, t) {
|
|
2278
|
-
for (var n in e) if (e.hasOwnProperty(n)) {
|
|
2279
|
-
for (var r in t) if (t.hasOwnProperty(r) && t[r] === e[n][r]) return Number(n);
|
|
2280
|
-
}
|
|
2281
|
-
return -1;
|
|
2282
|
-
}
|
|
2283
|
-
function Ho(e, t) {
|
|
2284
|
-
if (!e || !e.getBoundingClientRect) return Fo();
|
|
2285
|
-
var n = e, r = !1;
|
|
2286
|
-
do
|
|
2287
|
-
if (n.clientWidth < n.scrollWidth || n.clientHeight < n.scrollHeight) {
|
|
2288
|
-
var i = V(n);
|
|
2289
|
-
if (n.clientWidth < n.scrollWidth && (i.overflowX == "auto" || i.overflowX == "scroll") || n.clientHeight < n.scrollHeight && (i.overflowY == "auto" || i.overflowY == "scroll")) {
|
|
2290
|
-
if (!n.getBoundingClientRect || n === document.body) return Fo();
|
|
2291
|
-
if (r || t) return n;
|
|
2292
|
-
r = !0;
|
|
2293
|
-
}
|
|
2294
|
-
}
|
|
2295
|
-
while (n = n.parentNode);
|
|
2296
|
-
return Fo();
|
|
2297
|
-
}
|
|
2298
|
-
function Uo(e, t) {
|
|
2299
|
-
if (e && t) for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
|
2300
|
-
return e;
|
|
2301
|
-
}
|
|
2302
|
-
function Wo(e, t) {
|
|
2303
|
-
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);
|
|
2304
|
-
}
|
|
2305
|
-
var Go;
|
|
2306
|
-
function Ko(e, t) {
|
|
2307
|
-
return function() {
|
|
2308
|
-
if (!Go) {
|
|
2309
|
-
var n = arguments, r = this;
|
|
2310
|
-
n.length === 1 ? e.call(r, n[0]) : e.apply(r, n), Go = setTimeout(function() {
|
|
2311
|
-
Go = void 0;
|
|
2312
|
-
}, t);
|
|
2313
|
-
}
|
|
2314
|
-
};
|
|
2315
|
-
}
|
|
2316
|
-
function qo() {
|
|
2317
|
-
clearTimeout(Go), Go = void 0;
|
|
2318
|
-
}
|
|
2319
|
-
function Jo(e, t, n) {
|
|
2320
|
-
e.scrollLeft += t, e.scrollTop += n;
|
|
2321
|
-
}
|
|
2322
|
-
function Yo(e) {
|
|
2323
|
-
var t = window.Polymer, n = window.jQuery || window.Zepto;
|
|
2324
|
-
return t && t.dom ? t.dom(e).cloneNode(!0) : n ? n(e).clone(!0)[0] : e.cloneNode(!0);
|
|
2325
|
-
}
|
|
2326
|
-
function Xo(e, t, n) {
|
|
2327
|
-
var r = {};
|
|
2328
|
-
return Array.from(e.children).forEach(function(i) {
|
|
2329
|
-
if (Ao(i, t.draggable, e, !1) && !i.animated && i !== n) {
|
|
2330
|
-
var a = H(i);
|
|
2331
|
-
r.left = Math.min(r.left ?? 1 / 0, a.left), r.top = Math.min(r.top ?? 1 / 0, a.top), r.right = Math.max(r.right ?? -1 / 0, a.right), r.bottom = Math.max(r.bottom ?? -1 / 0, a.bottom);
|
|
2332
|
-
}
|
|
2333
|
-
}), r.width = r.right - r.left, r.height = r.bottom - r.top, r.x = r.left, r.y = r.top, r;
|
|
2334
|
-
}
|
|
2335
|
-
var Zo = "Sortable" + (/* @__PURE__ */ new Date()).getTime();
|
|
2336
|
-
function Qo() {
|
|
2337
|
-
var e = [], t;
|
|
2338
|
-
return {
|
|
2339
|
-
captureAnimationState: function() {
|
|
2340
|
-
e = [], this.options.animation && [].slice.call(this.el.children).forEach(function(t) {
|
|
2341
|
-
if (V(t, "display") !== "none" && t !== Q.ghost) {
|
|
2342
|
-
e.push({
|
|
2343
|
-
target: t,
|
|
2344
|
-
rect: H(t)
|
|
2345
|
-
});
|
|
2346
|
-
var n = po({}, e[e.length - 1].rect);
|
|
2347
|
-
if (t.thisAnimationDuration) {
|
|
2348
|
-
var r = No(t, !0);
|
|
2349
|
-
r && (n.top -= r.f, n.left -= r.e);
|
|
2350
|
-
}
|
|
2351
|
-
t.fromRect = n;
|
|
2352
|
-
}
|
|
2353
|
-
});
|
|
2354
|
-
},
|
|
2355
|
-
addAnimationState: function(t) {
|
|
2356
|
-
e.push(t);
|
|
2357
|
-
},
|
|
2358
|
-
removeAnimationState: function(t) {
|
|
2359
|
-
e.splice(Vo(e, { target: t }), 1);
|
|
2360
|
-
},
|
|
2361
|
-
animateAll: function(n) {
|
|
2362
|
-
var r = this;
|
|
2363
|
-
if (!this.options.animation) clearTimeout(t), typeof n == "function" && n();
|
|
2364
|
-
else {
|
|
2365
|
-
var i = !1, a = 0;
|
|
2366
|
-
e.forEach(function(e) {
|
|
2367
|
-
var t = 0, n = e.target, o = n.fromRect, s = H(n), c = n.prevFromRect, l = n.prevToRect, u = e.rect, d = No(n, !0);
|
|
2368
|
-
d && (s.top -= d.f, s.left -= d.e), n.toRect = s, n.thisAnimationDuration && Wo(c, s) && !Wo(o, s) && (u.top - s.top) / (u.left - s.left) === (o.top - s.top) / (o.left - s.left) && (t = es(u, c, l, r.options)), Wo(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() {
|
|
2369
|
-
n.animationTime = 0, n.prevFromRect = null, n.fromRect = null, n.prevToRect = null, n.thisAnimationDuration = null;
|
|
2370
|
-
}, t), n.thisAnimationDuration = t);
|
|
2371
|
-
}), clearTimeout(t), i ? t = setTimeout(function() {
|
|
2372
|
-
typeof n == "function" && n();
|
|
2373
|
-
}, a) : typeof n == "function" && n(), e = [];
|
|
2374
|
-
}
|
|
2375
|
-
},
|
|
2376
|
-
animate: function(e, t, n, r) {
|
|
2377
|
-
if (r) {
|
|
2378
|
-
V(e, "transition", ""), V(e, "transform", "");
|
|
2379
|
-
var i = No(this.el), a = i && i.a, o = i && i.d, s = (t.left - n.left) / (a || 1), c = (t.top - n.top) / (o || 1);
|
|
2380
|
-
e.animatingX = !!s, e.animatingY = !!c, V(e, "transform", "translate3d(" + s + "px," + c + "px,0)"), this.forRepaintDummy = $o(e), V(e, "transition", "transform " + r + "ms" + (this.options.easing ? " " + this.options.easing : "")), V(e, "transform", "translate3d(0,0,0)"), typeof e.animated == "number" && clearTimeout(e.animated), e.animated = setTimeout(function() {
|
|
2381
|
-
V(e, "transition", ""), V(e, "transform", ""), e.animated = !1, e.animatingX = !1, e.animatingY = !1;
|
|
2382
|
-
}, r);
|
|
2383
|
-
}
|
|
2384
|
-
}
|
|
2385
|
-
};
|
|
2386
|
-
}
|
|
2387
|
-
function $o(e) {
|
|
2388
|
-
return e.offsetWidth;
|
|
2389
|
-
}
|
|
2390
|
-
function es(e, t, n, r) {
|
|
2391
|
-
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;
|
|
2392
|
-
}
|
|
2393
|
-
var ts = [], ns = { initializeByDefault: !0 }, rs = {
|
|
2394
|
-
mount: function(e) {
|
|
2395
|
-
for (var t in ns) ns.hasOwnProperty(t) && !(t in e) && (e[t] = ns[t]);
|
|
2396
|
-
ts.forEach(function(t) {
|
|
2397
|
-
if (t.pluginName === e.pluginName) throw `Sortable: Cannot mount plugin ${e.pluginName} more than once`;
|
|
2398
|
-
}), ts.push(e);
|
|
2399
|
-
},
|
|
2400
|
-
pluginEvent: function(e, t, n) {
|
|
2401
|
-
var r = this;
|
|
2402
|
-
this.eventCanceled = !1, n.cancel = function() {
|
|
2403
|
-
r.eventCanceled = !0;
|
|
2404
|
-
};
|
|
2405
|
-
var i = e + "Global";
|
|
2406
|
-
ts.forEach(function(r) {
|
|
2407
|
-
t[r.pluginName] && (t[r.pluginName][i] && t[r.pluginName][i](po({ sortable: t }, n)), t.options[r.pluginName] && t[r.pluginName][e] && t[r.pluginName][e](po({ sortable: t }, n)));
|
|
2408
|
-
});
|
|
2409
|
-
},
|
|
2410
|
-
initializePlugins: function(e, t, n, r) {
|
|
2411
|
-
for (var i in ts.forEach(function(r) {
|
|
2412
|
-
var i = r.pluginName;
|
|
2413
|
-
if (e.options[i] || r.initializeByDefault) {
|
|
2414
|
-
var a = new r(e, t, e.options);
|
|
2415
|
-
a.sortable = e, a.options = e.options, e[i] = a, go(n, a.defaults);
|
|
2416
|
-
}
|
|
2417
|
-
}), e.options) if (e.options.hasOwnProperty(i)) {
|
|
2418
|
-
var a = this.modifyOption(e, i, e.options[i]);
|
|
2419
|
-
a !== void 0 && (e.options[i] = a);
|
|
2420
|
-
}
|
|
2421
|
-
},
|
|
2422
|
-
getEventProperties: function(e, t) {
|
|
2423
|
-
var n = {};
|
|
2424
|
-
return ts.forEach(function(r) {
|
|
2425
|
-
typeof r.eventProperties == "function" && go(n, r.eventProperties.call(t[r.pluginName], e));
|
|
2426
|
-
}), n;
|
|
2427
|
-
},
|
|
2428
|
-
modifyOption: function(e, t, n) {
|
|
2429
|
-
var r;
|
|
2430
|
-
return ts.forEach(function(i) {
|
|
2431
|
-
e[i.pluginName] && i.optionListeners && typeof i.optionListeners[t] == "function" && (r = i.optionListeners[t].call(e[i.pluginName], n));
|
|
2432
|
-
}), r;
|
|
2433
|
-
}
|
|
2434
|
-
};
|
|
2435
|
-
function is(e) {
|
|
2436
|
-
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;
|
|
2437
|
-
if (t ||= n && n[Zo], t) {
|
|
2438
|
-
var h, g = t.options, _ = "on" + r.charAt(0).toUpperCase() + r.substr(1);
|
|
2439
|
-
window.CustomEvent && !xo && !So ? h = new CustomEvent(r, {
|
|
2440
|
-
bubbles: !0,
|
|
2441
|
-
cancelable: !0
|
|
2442
|
-
}) : (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;
|
|
2443
|
-
var v = po(po({}, m), rs.getEventProperties(r, t));
|
|
2444
|
-
for (var y in v) h[y] = v[y];
|
|
2445
|
-
n && n.dispatchEvent(h), g[_] && g[_].call(t, h);
|
|
2446
|
-
}
|
|
2447
|
-
}
|
|
2448
|
-
var as = ["evt"], U = function(e, t) {
|
|
2449
|
-
var n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, r = n.evt, i = vo(n, as);
|
|
2450
|
-
rs.pluginEvent.bind(Q)(e, t, po({
|
|
2451
|
-
dragEl: G,
|
|
2452
|
-
parentEl: K,
|
|
2453
|
-
ghostEl: q,
|
|
2454
|
-
rootEl: J,
|
|
2455
|
-
nextEl: os,
|
|
2456
|
-
lastDownEl: ss,
|
|
2457
|
-
cloneEl: Y,
|
|
2458
|
-
cloneHidden: cs,
|
|
2459
|
-
dragStarted: Cs,
|
|
2460
|
-
putSortable: X,
|
|
2461
|
-
activeSortable: Q.active,
|
|
2462
|
-
originalEvent: r,
|
|
2463
|
-
oldIndex: ls,
|
|
2464
|
-
oldDraggableIndex: ds,
|
|
2465
|
-
newIndex: us,
|
|
2466
|
-
newDraggableIndex: fs,
|
|
2467
|
-
hideGhostForTarget: Vs,
|
|
2468
|
-
unhideGhostForTarget: Hs,
|
|
2469
|
-
cloneNowHidden: function() {
|
|
2470
|
-
cs = !0;
|
|
2471
|
-
},
|
|
2472
|
-
cloneNowShown: function() {
|
|
2473
|
-
cs = !1;
|
|
2474
|
-
},
|
|
2475
|
-
dispatchSortableEvent: function(e) {
|
|
2476
|
-
W({
|
|
2477
|
-
sortable: t,
|
|
2478
|
-
name: e,
|
|
2479
|
-
originalEvent: r
|
|
2480
|
-
});
|
|
2481
|
-
}
|
|
2482
|
-
}, i));
|
|
2483
|
-
};
|
|
2484
|
-
function W(e) {
|
|
2485
|
-
is(po({
|
|
2486
|
-
putSortable: X,
|
|
2487
|
-
cloneEl: Y,
|
|
2488
|
-
targetEl: G,
|
|
2489
|
-
rootEl: J,
|
|
2490
|
-
oldIndex: ls,
|
|
2491
|
-
oldDraggableIndex: ds,
|
|
2492
|
-
newIndex: us,
|
|
2493
|
-
newDraggableIndex: fs
|
|
2494
|
-
}, e));
|
|
2495
|
-
}
|
|
2496
|
-
var G, K, q, J, os, ss, Y, cs, ls, us, ds, fs, ps, X, ms = !1, hs = !1, gs = [], _s, vs, ys, bs, xs, Ss, Cs, ws, Ts, Es = !1, Ds = !1, Os, Z, ks = [], As = !1, js = [], Ms = typeof document < "u", Ns = To, Ps = So || xo ? "cssFloat" : "float", Fs = Ms && !Eo && !To && "draggable" in document.createElement("div"), Is = function() {
|
|
2497
|
-
if (Ms) {
|
|
2498
|
-
if (xo) return !1;
|
|
2499
|
-
var e = document.createElement("x");
|
|
2500
|
-
return e.style.cssText = "pointer-events:auto", e.style.pointerEvents === "auto";
|
|
2501
|
-
}
|
|
2502
|
-
}(), Ls = function(e, t) {
|
|
2503
|
-
var n = V(e), r = parseInt(n.width) - parseInt(n.paddingLeft) - parseInt(n.paddingRight) - parseInt(n.borderLeftWidth) - parseInt(n.borderRightWidth), i = Lo(e, 0, t), a = Lo(e, 1, t), o = i && V(i), s = a && V(a), c = o && parseInt(o.marginLeft) + parseInt(o.marginRight) + H(i).width, l = s && parseInt(s.marginLeft) + parseInt(s.marginRight) + H(a).width;
|
|
2504
|
-
if (n.display === "flex") return n.flexDirection === "column" || n.flexDirection === "column-reverse" ? "vertical" : "horizontal";
|
|
2505
|
-
if (n.display === "grid") return n.gridTemplateColumns.split(" ").length <= 1 ? "vertical" : "horizontal";
|
|
2506
|
-
if (i && o.float && o.float !== "none") {
|
|
2507
|
-
var u = o.float === "left" ? "left" : "right";
|
|
2508
|
-
return a && (s.clear === "both" || s.clear === u) ? "vertical" : "horizontal";
|
|
2509
|
-
}
|
|
2510
|
-
return i && (o.display === "block" || o.display === "flex" || o.display === "table" || o.display === "grid" || c >= r && n[Ps] === "none" || a && n[Ps] === "none" && c + l > r) ? "vertical" : "horizontal";
|
|
2511
|
-
}, Rs = function(e, t, n) {
|
|
2512
|
-
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;
|
|
2513
|
-
return r === o || i === s || r + a / 2 === o + c / 2;
|
|
2514
|
-
}, zs = function(e, t) {
|
|
2515
|
-
var n;
|
|
2516
|
-
return gs.some(function(r) {
|
|
2517
|
-
var i = r[Zo].options.emptyInsertThreshold;
|
|
2518
|
-
if (i && !Ro(r)) {
|
|
2519
|
-
var a = H(r), o = e >= a.left - i && e <= a.right + i, s = t >= a.top - i && t <= a.bottom + i;
|
|
2520
|
-
if (o && s) return n = r;
|
|
2521
|
-
}
|
|
2522
|
-
}), n;
|
|
2523
|
-
}, Bs = function(e) {
|
|
2524
|
-
function t(e, n) {
|
|
2525
|
-
return function(r, i, a, o) {
|
|
2526
|
-
var s = r.options.group.name && i.options.group.name && r.options.group.name === i.options.group.name;
|
|
2527
|
-
if (e == null && (n || s)) return !0;
|
|
2528
|
-
if (e == null || e === !1) return !1;
|
|
2529
|
-
if (n && e === "clone") return e;
|
|
2530
|
-
if (typeof e == "function") return t(e(r, i, a, o), n)(r, i, a, o);
|
|
2531
|
-
var c = (n ? r : i).options.group.name;
|
|
2532
|
-
return e === !0 || typeof e == "string" && e === c || e.join && e.indexOf(c) > -1;
|
|
2533
|
-
};
|
|
2534
|
-
}
|
|
2535
|
-
var n = {}, r = e.group;
|
|
2536
|
-
r && mo(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;
|
|
2537
|
-
}, Vs = function() {
|
|
2538
|
-
!Is && q && V(q, "display", "none");
|
|
2539
|
-
}, Hs = function() {
|
|
2540
|
-
!Is && q && V(q, "display", "");
|
|
2541
|
-
};
|
|
2542
|
-
Ms && !Eo && document.addEventListener("click", function(e) {
|
|
2543
|
-
if (hs) return e.preventDefault(), e.stopPropagation && e.stopPropagation(), e.stopImmediatePropagation && e.stopImmediatePropagation(), hs = !1, !1;
|
|
2544
|
-
}, !0);
|
|
2545
|
-
var Us = function(e) {
|
|
2546
|
-
if (G) {
|
|
2547
|
-
e = e.touches ? e.touches[0] : e;
|
|
2548
|
-
var t = zs(e.clientX, e.clientY);
|
|
2549
|
-
if (t) {
|
|
2550
|
-
var n = {};
|
|
2551
|
-
for (var r in e) e.hasOwnProperty(r) && (n[r] = e[r]);
|
|
2552
|
-
n.target = n.rootEl = t, n.preventDefault = void 0, n.stopPropagation = void 0, t[Zo]._onDragOver(n);
|
|
2553
|
-
}
|
|
2554
|
-
}
|
|
2555
|
-
}, Ws = function(e) {
|
|
2556
|
-
G && G.parentNode[Zo]._isOutsideThisEl(e.target);
|
|
2557
|
-
};
|
|
2558
|
-
function Q(e, t) {
|
|
2559
|
-
if (!(e && e.nodeType && e.nodeType === 1)) throw `Sortable: \`el\` must be an HTMLElement, not ${{}.toString.call(e)}`;
|
|
2560
|
-
this.el = e, this.options = t = go({}, t), e[Zo] = this;
|
|
2561
|
-
var n = {
|
|
2562
|
-
group: null,
|
|
2563
|
-
sort: !0,
|
|
2564
|
-
disabled: !1,
|
|
2565
|
-
store: null,
|
|
2566
|
-
handle: null,
|
|
2567
|
-
draggable: /^[uo]l$/i.test(e.nodeName) ? ">li" : ">*",
|
|
2568
|
-
swapThreshold: 1,
|
|
2569
|
-
invertSwap: !1,
|
|
2570
|
-
invertedSwapThreshold: null,
|
|
2571
|
-
removeCloneOnHide: !0,
|
|
2572
|
-
direction: function() {
|
|
2573
|
-
return Ls(e, this.options);
|
|
2574
|
-
},
|
|
2575
|
-
ghostClass: "sortable-ghost",
|
|
2576
|
-
chosenClass: "sortable-chosen",
|
|
2577
|
-
dragClass: "sortable-drag",
|
|
2578
|
-
ignore: "a, img",
|
|
2579
|
-
filter: null,
|
|
2580
|
-
preventOnFilter: !0,
|
|
2581
|
-
animation: 0,
|
|
2582
|
-
easing: null,
|
|
2583
|
-
setData: function(e, t) {
|
|
2584
|
-
e.setData("Text", t.textContent);
|
|
2585
|
-
},
|
|
2586
|
-
dropBubble: !1,
|
|
2587
|
-
dragoverBubble: !1,
|
|
2588
|
-
dataIdAttr: "data-id",
|
|
2589
|
-
delay: 0,
|
|
2590
|
-
delayOnTouchOnly: !1,
|
|
2591
|
-
touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1,
|
|
2592
|
-
forceFallback: !1,
|
|
2593
|
-
fallbackClass: "sortable-fallback",
|
|
2594
|
-
fallbackOnBody: !1,
|
|
2595
|
-
fallbackTolerance: 0,
|
|
2596
|
-
fallbackOffset: {
|
|
2597
|
-
x: 0,
|
|
2598
|
-
y: 0
|
|
2599
|
-
},
|
|
2600
|
-
supportPointer: Q.supportPointer !== !1 && "PointerEvent" in window && !wo,
|
|
2601
|
-
emptyInsertThreshold: 5
|
|
2602
|
-
};
|
|
2603
|
-
for (var r in rs.initializePlugins(this, e, n), n) !(r in t) && (t[r] = n[r]);
|
|
2604
|
-
for (var i in Bs(t), this) i.charAt(0) === "_" && typeof this[i] == "function" && (this[i] = this[i].bind(this));
|
|
2605
|
-
this.nativeDraggable = !t.forceFallback && Fs, this.nativeDraggable && (this.options.touchStartThreshold = 1), t.supportPointer ? z(e, "pointerdown", this._onTapStart) : (z(e, "mousedown", this._onTapStart), z(e, "touchstart", this._onTapStart)), this.nativeDraggable && (z(e, "dragover", this), z(e, "dragenter", this)), gs.push(this.el), t.store && t.store.get && this.sort(t.store.get(this) || []), go(this, Qo());
|
|
2606
|
-
}
|
|
2607
|
-
Q.prototype = {
|
|
2608
|
-
constructor: Q,
|
|
2609
|
-
_isOutsideThisEl: function(e) {
|
|
2610
|
-
!this.el.contains(e) && e !== this.el && (ws = null);
|
|
2611
|
-
},
|
|
2612
|
-
_getDirection: function(e, t) {
|
|
2613
|
-
return typeof this.options.direction == "function" ? this.options.direction.call(this, e, t, G) : this.options.direction;
|
|
2614
|
-
},
|
|
2615
|
-
_onTapStart: function(e) {
|
|
2616
|
-
if (e.cancelable) {
|
|
2617
|
-
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;
|
|
2618
|
-
if (ec(n), !G && !(/mousedown|pointerdown/.test(a) && e.button !== 0 || r.disabled) && !c.isContentEditable && !(!this.nativeDraggable && wo && s && s.tagName.toUpperCase() === "SELECT") && (s = Ao(s, r.draggable, n, !1), !(s && s.animated) && ss !== s)) {
|
|
2619
|
-
if (ls = zo(s), ds = zo(s, r.draggable), typeof l == "function") {
|
|
2620
|
-
if (l.call(this, e, s, this)) {
|
|
2621
|
-
W({
|
|
2622
|
-
sortable: t,
|
|
2623
|
-
rootEl: c,
|
|
2624
|
-
name: "filter",
|
|
2625
|
-
targetEl: s,
|
|
2626
|
-
toEl: n,
|
|
2627
|
-
fromEl: n
|
|
2628
|
-
}), U("filter", t, { evt: e }), i && e.cancelable && e.preventDefault();
|
|
2629
|
-
return;
|
|
2630
|
-
}
|
|
2631
|
-
} else if (l && (l = l.split(",").some(function(r) {
|
|
2632
|
-
if (r = Ao(c, r.trim(), n, !1), r) return W({
|
|
2633
|
-
sortable: t,
|
|
2634
|
-
rootEl: r,
|
|
2635
|
-
name: "filter",
|
|
2636
|
-
targetEl: s,
|
|
2637
|
-
fromEl: n,
|
|
2638
|
-
toEl: n
|
|
2639
|
-
}), U("filter", t, { evt: e }), !0;
|
|
2640
|
-
}), l)) {
|
|
2641
|
-
i && e.cancelable && e.preventDefault();
|
|
2642
|
-
return;
|
|
2643
|
-
}
|
|
2644
|
-
r.handle && !Ao(c, r.handle, n, !1) || this._prepareDragStart(e, o, s);
|
|
2645
|
-
}
|
|
2646
|
-
}
|
|
2647
|
-
},
|
|
2648
|
-
_prepareDragStart: function(e, t, n) {
|
|
2649
|
-
var r = this, i = r.el, a = r.options, o = i.ownerDocument, s;
|
|
2650
|
-
if (n && !G && n.parentNode === i) {
|
|
2651
|
-
var c = H(n);
|
|
2652
|
-
if (J = i, G = n, K = G.parentNode, os = G.nextSibling, ss = n, ps = a.group, Q.dragged = G, _s = {
|
|
2653
|
-
target: G,
|
|
2654
|
-
clientX: (t || e).clientX,
|
|
2655
|
-
clientY: (t || e).clientY
|
|
2656
|
-
}, xs = _s.clientX - c.left, Ss = _s.clientY - c.top, this._lastX = (t || e).clientX, this._lastY = (t || e).clientY, G.style["will-change"] = "all", s = function() {
|
|
2657
|
-
U("delayEnded", r, { evt: e }), Q.eventCanceled ? r._onDrop() : (r._disableDelayedDragEvents(), !Co && r.nativeDraggable && (G.draggable = !0), r._triggerDragStart(e, t), W({
|
|
2658
|
-
sortable: r,
|
|
2659
|
-
name: "choose",
|
|
2660
|
-
originalEvent: e
|
|
2661
|
-
}), Mo(G, a.chosenClass, !0));
|
|
2662
|
-
}, a.ignore.split(",").forEach(function(e) {
|
|
2663
|
-
Po(G, e.trim(), qs);
|
|
2664
|
-
}), z(o, "dragover", Us), z(o, "mousemove", Us), z(o, "touchmove", Us), z(o, "mouseup", r._onDrop), z(o, "touchend", r._onDrop), z(o, "touchcancel", r._onDrop), Co && this.nativeDraggable && (this.options.touchStartThreshold = 4, G.draggable = !0), U("delayStart", this, { evt: e }), a.delay && (!a.delayOnTouchOnly || t) && (!this.nativeDraggable || !(So || xo))) {
|
|
2665
|
-
if (Q.eventCanceled) {
|
|
2666
|
-
this._onDrop();
|
|
2667
|
-
return;
|
|
2668
|
-
}
|
|
2669
|
-
z(o, "mouseup", r._disableDelayedDrag), z(o, "touchend", r._disableDelayedDrag), z(o, "touchcancel", r._disableDelayedDrag), z(o, "mousemove", r._delayedDragTouchMoveHandler), z(o, "touchmove", r._delayedDragTouchMoveHandler), a.supportPointer && z(o, "pointermove", r._delayedDragTouchMoveHandler), r._dragStartTimer = setTimeout(s, a.delay);
|
|
2670
|
-
} else s();
|
|
2671
|
-
}
|
|
2672
|
-
},
|
|
2673
|
-
_delayedDragTouchMoveHandler: function(e) {
|
|
2674
|
-
var t = e.touches ? e.touches[0] : e;
|
|
2675
|
-
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();
|
|
2676
|
-
},
|
|
2677
|
-
_disableDelayedDrag: function() {
|
|
2678
|
-
G && qs(G), clearTimeout(this._dragStartTimer), this._disableDelayedDragEvents();
|
|
2679
|
-
},
|
|
2680
|
-
_disableDelayedDragEvents: function() {
|
|
2681
|
-
var e = this.el.ownerDocument;
|
|
2682
|
-
B(e, "mouseup", this._disableDelayedDrag), B(e, "touchend", this._disableDelayedDrag), B(e, "touchcancel", this._disableDelayedDrag), B(e, "mousemove", this._delayedDragTouchMoveHandler), B(e, "touchmove", this._delayedDragTouchMoveHandler), B(e, "pointermove", this._delayedDragTouchMoveHandler);
|
|
2683
|
-
},
|
|
2684
|
-
_triggerDragStart: function(e, t) {
|
|
2685
|
-
t ||= e.pointerType == "touch" && e, !this.nativeDraggable || t ? this.options.supportPointer ? z(document, "pointermove", this._onTouchMove) : t ? z(document, "touchmove", this._onTouchMove) : z(document, "mousemove", this._onTouchMove) : (z(G, "dragend", this), z(J, "dragstart", this._onDragStart));
|
|
2686
|
-
try {
|
|
2687
|
-
document.selection ? tc(function() {
|
|
2688
|
-
document.selection.empty();
|
|
2689
|
-
}) : window.getSelection().removeAllRanges();
|
|
2690
|
-
} catch {}
|
|
2691
|
-
},
|
|
2692
|
-
_dragStarted: function(e, t) {
|
|
2693
|
-
if (ms = !1, J && G) {
|
|
2694
|
-
U("dragStarted", this, { evt: t }), this.nativeDraggable && z(document, "dragover", Ws);
|
|
2695
|
-
var n = this.options;
|
|
2696
|
-
!e && Mo(G, n.dragClass, !1), Mo(G, n.ghostClass, !0), Q.active = this, e && this._appendGhost(), W({
|
|
2697
|
-
sortable: this,
|
|
2698
|
-
name: "start",
|
|
2699
|
-
originalEvent: t
|
|
2700
|
-
});
|
|
2701
|
-
} else this._nulling();
|
|
2702
|
-
},
|
|
2703
|
-
_emulateDragOver: function() {
|
|
2704
|
-
if (vs) {
|
|
2705
|
-
this._lastX = vs.clientX, this._lastY = vs.clientY, Vs();
|
|
2706
|
-
for (var e = document.elementFromPoint(vs.clientX, vs.clientY), t = e; e && e.shadowRoot && (e = e.shadowRoot.elementFromPoint(vs.clientX, vs.clientY), e !== t);) t = e;
|
|
2707
|
-
if (G.parentNode[Zo]._isOutsideThisEl(e), t) do {
|
|
2708
|
-
if (t[Zo]) {
|
|
2709
|
-
var n = void 0;
|
|
2710
|
-
if (n = t[Zo]._onDragOver({
|
|
2711
|
-
clientX: vs.clientX,
|
|
2712
|
-
clientY: vs.clientY,
|
|
2713
|
-
target: e,
|
|
2714
|
-
rootEl: t
|
|
2715
|
-
}), n && !this.options.dragoverBubble) break;
|
|
2716
|
-
}
|
|
2717
|
-
e = t;
|
|
2718
|
-
} while (t = t.parentNode);
|
|
2719
|
-
Hs();
|
|
2720
|
-
}
|
|
2721
|
-
},
|
|
2722
|
-
_onTouchMove: function(e) {
|
|
2723
|
-
if (_s) {
|
|
2724
|
-
var t = this.options, n = t.fallbackTolerance, r = t.fallbackOffset, i = e.touches ? e.touches[0] : e, a = q && No(q, !0), o = q && a && a.a, s = q && a && a.d, c = Ns && Z && Bo(Z), l = (i.clientX - _s.clientX + r.x) / (o || 1) + (c ? c[0] - ks[0] : 0) / (o || 1), u = (i.clientY - _s.clientY + r.y) / (s || 1) + (c ? c[1] - ks[1] : 0) / (s || 1);
|
|
2725
|
-
if (!Q.active && !ms) {
|
|
2726
|
-
if (n && Math.max(Math.abs(i.clientX - this._lastX), Math.abs(i.clientY - this._lastY)) < n) return;
|
|
2727
|
-
this._onDragStart(e, !0);
|
|
2728
|
-
}
|
|
2729
|
-
if (q) {
|
|
2730
|
-
a ? (a.e += l - (ys || 0), a.f += u - (bs || 0)) : a = {
|
|
2731
|
-
a: 1,
|
|
2732
|
-
b: 0,
|
|
2733
|
-
c: 0,
|
|
2734
|
-
d: 1,
|
|
2735
|
-
e: l,
|
|
2736
|
-
f: u
|
|
2737
|
-
};
|
|
2738
|
-
var d = `matrix(${a.a},${a.b},${a.c},${a.d},${a.e},${a.f})`;
|
|
2739
|
-
V(q, "webkitTransform", d), V(q, "mozTransform", d), V(q, "msTransform", d), V(q, "transform", d), ys = l, bs = u, vs = i;
|
|
2740
|
-
}
|
|
2741
|
-
e.cancelable && e.preventDefault();
|
|
2742
|
-
}
|
|
2743
|
-
},
|
|
2744
|
-
_appendGhost: function() {
|
|
2745
|
-
if (!q) {
|
|
2746
|
-
var e = this.options.fallbackOnBody ? document.body : J, t = H(G, !0, Ns, !0, e), n = this.options;
|
|
2747
|
-
if (Ns) {
|
|
2748
|
-
for (Z = e; V(Z, "position") === "static" && V(Z, "transform") === "none" && Z !== document;) Z = Z.parentNode;
|
|
2749
|
-
Z !== document.body && Z !== document.documentElement ? (Z === document && (Z = Fo()), t.top += Z.scrollTop, t.left += Z.scrollLeft) : Z = Fo(), ks = Bo(Z);
|
|
2750
|
-
}
|
|
2751
|
-
q = G.cloneNode(!0), Mo(q, n.ghostClass, !1), Mo(q, n.fallbackClass, !0), Mo(q, n.dragClass, !0), V(q, "transition", ""), V(q, "transform", ""), V(q, "box-sizing", "border-box"), V(q, "margin", 0), V(q, "top", t.top), V(q, "left", t.left), V(q, "width", t.width), V(q, "height", t.height), V(q, "opacity", "0.8"), V(q, "position", Ns ? "absolute" : "fixed"), V(q, "zIndex", "100000"), V(q, "pointerEvents", "none"), Q.ghost = q, e.appendChild(q), V(q, "transform-origin", xs / parseInt(q.style.width) * 100 + "% " + Ss / parseInt(q.style.height) * 100 + "%");
|
|
2752
|
-
}
|
|
2753
|
-
},
|
|
2754
|
-
_onDragStart: function(e, t) {
|
|
2755
|
-
var n = this, r = e.dataTransfer, i = n.options;
|
|
2756
|
-
U("dragStart", this, { evt: e }), Q.eventCanceled ? this._onDrop() : (U("setupClone", this), Q.eventCanceled || (Y = Yo(G), Y.removeAttribute("id"), Y.draggable = !1, Y.style["will-change"] = "", this._hideClone(), Mo(Y, this.options.chosenClass, !1), Q.clone = Y), n.cloneId = tc(function() {
|
|
2757
|
-
U("clone", n), !Q.eventCanceled && (n.options.removeCloneOnHide || J.insertBefore(Y, G), n._hideClone(), W({
|
|
2758
|
-
sortable: n,
|
|
2759
|
-
name: "clone"
|
|
2760
|
-
}));
|
|
2761
|
-
}), !t && Mo(G, i.dragClass, !0), t ? (hs = !0, n._loopId = setInterval(n._emulateDragOver, 50)) : (B(document, "mouseup", n._onDrop), B(document, "touchend", n._onDrop), B(document, "touchcancel", n._onDrop), r && (r.effectAllowed = "move", i.setData && i.setData.call(n, r, G)), z(document, "drop", n), V(G, "transform", "translateZ(0)")), ms = !0, n._dragStartId = tc(n._dragStarted.bind(n, t, e)), z(document, "selectstart", n), Cs = !0, wo && V(document.body, "user-select", "none"));
|
|
2762
|
-
},
|
|
2763
|
-
_onDragOver: function(e) {
|
|
2764
|
-
var t = this.el, n = e.target, r, i, a, o = this.options, s = o.group, c = Q.active, l = ps === s, u = o.sort, d = X || c, f, p = this, m = !1;
|
|
2765
|
-
if (As) return;
|
|
2766
|
-
function h(o, s) {
|
|
2767
|
-
U(o, p, po({
|
|
2768
|
-
evt: e,
|
|
2769
|
-
isOwner: l,
|
|
2770
|
-
axis: f ? "vertical" : "horizontal",
|
|
2771
|
-
revert: a,
|
|
2772
|
-
dragRect: r,
|
|
2773
|
-
targetRect: i,
|
|
2774
|
-
canSort: u,
|
|
2775
|
-
fromSortable: d,
|
|
2776
|
-
target: n,
|
|
2777
|
-
completed: _,
|
|
2778
|
-
onMove: function(n, i) {
|
|
2779
|
-
return Ks(J, t, G, r, n, H(n), e, i);
|
|
2780
|
-
},
|
|
2781
|
-
changed: v
|
|
2782
|
-
}, s));
|
|
2783
|
-
}
|
|
2784
|
-
function g() {
|
|
2785
|
-
h("dragOverAnimationCapture"), p.captureAnimationState(), p !== d && d.captureAnimationState();
|
|
2786
|
-
}
|
|
2787
|
-
function _(r) {
|
|
2788
|
-
return h("dragOverCompleted", { insertion: r }), r && (l ? c._hideClone() : c._showClone(p), p !== d && (Mo(G, X ? X.options.ghostClass : c.options.ghostClass, !1), Mo(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() {
|
|
2789
|
-
h("dragOverAnimationComplete"), p._ignoreWhileAnimating = null;
|
|
2790
|
-
}), p !== d && (d.animateAll(), d._ignoreWhileAnimating = null)), (n === G && !G.animated || n === t && !n.animated) && (ws = null), !o.dragoverBubble && !e.rootEl && n !== document && (G.parentNode[Zo]._isOutsideThisEl(e.target), !r && Us(e)), !o.dragoverBubble && e.stopPropagation && e.stopPropagation(), m = !0;
|
|
2791
|
-
}
|
|
2792
|
-
function v() {
|
|
2793
|
-
us = zo(G), fs = zo(G, o.draggable), W({
|
|
2794
|
-
sortable: p,
|
|
2795
|
-
name: "change",
|
|
2796
|
-
toEl: t,
|
|
2797
|
-
newIndex: us,
|
|
2798
|
-
newDraggableIndex: fs,
|
|
2799
|
-
originalEvent: e
|
|
2800
|
-
});
|
|
2801
|
-
}
|
|
2802
|
-
if (e.preventDefault !== void 0 && e.cancelable && e.preventDefault(), n = Ao(n, o.draggable, t, !0), h("dragOver"), Q.eventCanceled) return m;
|
|
2803
|
-
if (G.contains(e.target) || n.animated && n.animatingX && n.animatingY || p._ignoreWhileAnimating === n) return _(!1);
|
|
2804
|
-
if (hs = !1, c && !o.disabled && (l ? u || (a = K !== J) : X === this || (this.lastPutMode = ps.checkPull(this, c, G, e)) && s.checkPut(this, c, G, e))) {
|
|
2805
|
-
if (f = this._getDirection(e, n) === "vertical", r = H(G), h("dragOverValid"), Q.eventCanceled) return m;
|
|
2806
|
-
if (a) return K = J, g(), this._hideClone(), h("revert"), Q.eventCanceled || (os ? J.insertBefore(G, os) : J.appendChild(G)), _(!0);
|
|
2807
|
-
var y = Ro(t, o.draggable);
|
|
2808
|
-
if (!y || Xs(e, f, this) && !y.animated) {
|
|
2809
|
-
if (y === G) return _(!1);
|
|
2810
|
-
if (y && t === e.target && (n = y), n && (i = H(n)), Ks(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);
|
|
2811
|
-
} else if (y && Ys(e, f, this)) {
|
|
2812
|
-
var b = Lo(t, 0, o, !0);
|
|
2813
|
-
if (b === G) return _(!1);
|
|
2814
|
-
if (n = b, i = H(n), Ks(J, t, G, r, n, i, e, !1) !== !1) return g(), t.insertBefore(G, b), K = t, v(), _(!0);
|
|
2815
|
-
} else if (n.parentNode === t) {
|
|
2816
|
-
i = H(n);
|
|
2817
|
-
var x = 0, S, C = G.parentNode !== t, w = !Rs(G.animated && G.toRect || r, n.animated && n.toRect || i, f), T = f ? "top" : "left", E = Io(n, "top", "top") || Io(G, "top", "top"), D = E ? E.scrollTop : void 0;
|
|
2818
|
-
ws !== n && (S = i[T], Es = !1, Ds = !w && o.invertSwap || C), x = Zs(e, n, i, f, w ? 1 : o.swapThreshold, o.invertedSwapThreshold == null ? o.swapThreshold : o.invertedSwapThreshold, Ds, ws === n);
|
|
2819
|
-
var O;
|
|
2820
|
-
if (x !== 0) {
|
|
2821
|
-
var k = zo(G);
|
|
2822
|
-
do
|
|
2823
|
-
k -= x, O = K.children[k];
|
|
2824
|
-
while (O && (V(O, "display") === "none" || O === q));
|
|
2825
|
-
}
|
|
2826
|
-
if (x === 0 || O === n) return _(!1);
|
|
2827
|
-
ws = n, Ts = x;
|
|
2828
|
-
var A = n.nextElementSibling, j = !1;
|
|
2829
|
-
j = x === 1;
|
|
2830
|
-
var M = Ks(J, t, G, r, n, i, e, j);
|
|
2831
|
-
if (M !== !1) return (M === 1 || M === -1) && (j = M === 1), As = !0, setTimeout(Js, 30), g(), j && !A ? t.appendChild(G) : n.parentNode.insertBefore(G, j ? A : n), E && Jo(E, 0, D - E.scrollTop), K = G.parentNode, S !== void 0 && !Ds && (Os = Math.abs(S - H(n)[T])), v(), _(!0);
|
|
2832
|
-
}
|
|
2833
|
-
if (t.contains(G)) return _(!1);
|
|
2834
|
-
}
|
|
2835
|
-
return !1;
|
|
2836
|
-
},
|
|
2837
|
-
_ignoreWhileAnimating: null,
|
|
2838
|
-
_offMoveEvents: function() {
|
|
2839
|
-
B(document, "mousemove", this._onTouchMove), B(document, "touchmove", this._onTouchMove), B(document, "pointermove", this._onTouchMove), B(document, "dragover", Us), B(document, "mousemove", Us), B(document, "touchmove", Us);
|
|
2840
|
-
},
|
|
2841
|
-
_offUpEvents: function() {
|
|
2842
|
-
var e = this.el.ownerDocument;
|
|
2843
|
-
B(e, "mouseup", this._onDrop), B(e, "touchend", this._onDrop), B(e, "pointerup", this._onDrop), B(e, "touchcancel", this._onDrop), B(document, "selectstart", this);
|
|
2844
|
-
},
|
|
2845
|
-
_onDrop: function(e) {
|
|
2846
|
-
var t = this.el, n = this.options;
|
|
2847
|
-
us = zo(G), fs = zo(G, n.draggable), U("drop", this, { evt: e }), K = G && G.parentNode, us = zo(G), fs = zo(G, n.draggable), Q.eventCanceled || (ms = !1, Ds = !1, Es = !1, clearInterval(this._loopId), clearTimeout(this._dragStartTimer), nc(this.cloneId), nc(this._dragStartId), this.nativeDraggable && (B(document, "drop", this), B(t, "dragstart", this._onDragStart)), this._offMoveEvents(), this._offUpEvents(), wo && V(document.body, "user-select", ""), V(G, "transform", ""), e && (Cs && (e.cancelable && e.preventDefault(), !n.dropBubble && e.stopPropagation()), q && q.parentNode && q.parentNode.removeChild(q), (J === K || X && X.lastPutMode !== "clone") && Y && Y.parentNode && Y.parentNode.removeChild(Y), G && (this.nativeDraggable && B(G, "dragend", this), qs(G), G.style["will-change"] = "", Cs && !ms && Mo(G, X ? X.options.ghostClass : this.options.ghostClass, !1), Mo(G, this.options.chosenClass, !1), W({
|
|
2848
|
-
sortable: this,
|
|
2849
|
-
name: "unchoose",
|
|
2850
|
-
toEl: K,
|
|
2851
|
-
newIndex: null,
|
|
2852
|
-
newDraggableIndex: null,
|
|
2853
|
-
originalEvent: e
|
|
2854
|
-
}), J === K ? us !== ls && us >= 0 && (W({
|
|
2855
|
-
sortable: this,
|
|
2856
|
-
name: "update",
|
|
2857
|
-
toEl: K,
|
|
2858
|
-
originalEvent: e
|
|
2859
|
-
}), W({
|
|
2860
|
-
sortable: this,
|
|
2861
|
-
name: "sort",
|
|
2862
|
-
toEl: K,
|
|
2863
|
-
originalEvent: e
|
|
2864
|
-
})) : (us >= 0 && (W({
|
|
2865
|
-
rootEl: K,
|
|
2866
|
-
name: "add",
|
|
2867
|
-
toEl: K,
|
|
2868
|
-
fromEl: J,
|
|
2869
|
-
originalEvent: e
|
|
2870
|
-
}), W({
|
|
2871
|
-
sortable: this,
|
|
2872
|
-
name: "remove",
|
|
2873
|
-
toEl: K,
|
|
2874
|
-
originalEvent: e
|
|
2875
|
-
}), W({
|
|
2876
|
-
rootEl: K,
|
|
2877
|
-
name: "sort",
|
|
2878
|
-
toEl: K,
|
|
2879
|
-
fromEl: J,
|
|
2880
|
-
originalEvent: e
|
|
2881
|
-
}), W({
|
|
2882
|
-
sortable: this,
|
|
2883
|
-
name: "sort",
|
|
2884
|
-
toEl: K,
|
|
2885
|
-
originalEvent: e
|
|
2886
|
-
})), X && X.save()), Q.active && ((us == null || us === -1) && (us = ls, fs = ds), W({
|
|
2887
|
-
sortable: this,
|
|
2888
|
-
name: "end",
|
|
2889
|
-
toEl: K,
|
|
2890
|
-
originalEvent: e
|
|
2891
|
-
}), this.save())))), this._nulling();
|
|
2892
|
-
},
|
|
2893
|
-
_nulling: function() {
|
|
2894
|
-
U("nulling", this), J = G = K = q = os = Y = ss = cs = _s = vs = Cs = us = fs = ls = ds = ws = Ts = X = ps = Q.dragged = Q.ghost = Q.clone = Q.active = null, js.forEach(function(e) {
|
|
2895
|
-
e.checked = !0;
|
|
2896
|
-
}), js.length = ys = bs = 0;
|
|
2897
|
-
},
|
|
2898
|
-
handleEvent: function(e) {
|
|
2899
|
-
switch (e.type) {
|
|
2900
|
-
case "drop":
|
|
2901
|
-
case "dragend":
|
|
2902
|
-
this._onDrop(e);
|
|
2903
|
-
break;
|
|
2904
|
-
case "dragenter":
|
|
2905
|
-
case "dragover":
|
|
2906
|
-
G && (this._onDragOver(e), Gs(e));
|
|
2907
|
-
break;
|
|
2908
|
-
case "selectstart": e.preventDefault();
|
|
2909
|
-
}
|
|
2910
|
-
},
|
|
2911
|
-
toArray: function() {
|
|
2912
|
-
for (var e = [], t, n = this.el.children, r = 0, i = n.length, a = this.options; r < i; r++) t = n[r], Ao(t, a.draggable, this.el, !1) && e.push(t.getAttribute(a.dataIdAttr) || $s(t));
|
|
2913
|
-
return e;
|
|
2914
|
-
},
|
|
2915
|
-
sort: function(e, t) {
|
|
2916
|
-
var n = {}, r = this.el;
|
|
2917
|
-
this.toArray().forEach(function(e, t) {
|
|
2918
|
-
var i = r.children[t];
|
|
2919
|
-
Ao(i, this.options.draggable, r, !1) && (n[e] = i);
|
|
2920
|
-
}, this), t && this.captureAnimationState(), e.forEach(function(e) {
|
|
2921
|
-
n[e] && (r.removeChild(n[e]), r.appendChild(n[e]));
|
|
2922
|
-
}), t && this.animateAll();
|
|
2923
|
-
},
|
|
2924
|
-
save: function() {
|
|
2925
|
-
var e = this.options.store;
|
|
2926
|
-
e && e.set && e.set(this);
|
|
2927
|
-
},
|
|
2928
|
-
closest: function(e, t) {
|
|
2929
|
-
return Ao(e, t || this.options.draggable, this.el, !1);
|
|
2930
|
-
},
|
|
2931
|
-
option: function(e, t) {
|
|
2932
|
-
var n = this.options;
|
|
2933
|
-
if (t === void 0) return n[e];
|
|
2934
|
-
var r = rs.modifyOption(this, e, t);
|
|
2935
|
-
n[e] = r === void 0 ? t : r, e === "group" && Bs(n);
|
|
2936
|
-
},
|
|
2937
|
-
destroy: function() {
|
|
2938
|
-
U("destroy", this);
|
|
2939
|
-
var e = this.el;
|
|
2940
|
-
e[Zo] = null, B(e, "mousedown", this._onTapStart), B(e, "touchstart", this._onTapStart), B(e, "pointerdown", this._onTapStart), this.nativeDraggable && (B(e, "dragover", this), B(e, "dragenter", this)), Array.prototype.forEach.call(e.querySelectorAll("[draggable]"), function(e) {
|
|
2941
|
-
e.removeAttribute("draggable");
|
|
2942
|
-
}), this._onDrop(), this._disableDelayedDragEvents(), gs.splice(gs.indexOf(this.el), 1), this.el = e = null;
|
|
2943
|
-
},
|
|
2944
|
-
_hideClone: function() {
|
|
2945
|
-
if (!cs) {
|
|
2946
|
-
if (U("hideClone", this), Q.eventCanceled) return;
|
|
2947
|
-
V(Y, "display", "none"), this.options.removeCloneOnHide && Y.parentNode && Y.parentNode.removeChild(Y), cs = !0;
|
|
2948
|
-
}
|
|
2949
|
-
},
|
|
2950
|
-
_showClone: function(e) {
|
|
2951
|
-
if (e.lastPutMode !== "clone") this._hideClone();
|
|
2952
|
-
else if (cs) {
|
|
2953
|
-
if (U("showClone", this), Q.eventCanceled) return;
|
|
2954
|
-
G.parentNode == J && !this.options.group.revertClone ? J.insertBefore(Y, G) : os ? J.insertBefore(Y, os) : J.appendChild(Y), this.options.group.revertClone && this.animate(G, Y), V(Y, "display", ""), cs = !1;
|
|
2955
|
-
}
|
|
2956
|
-
}
|
|
2957
|
-
};
|
|
2958
|
-
function Gs(e) {
|
|
2959
|
-
e.dataTransfer && (e.dataTransfer.dropEffect = "move"), e.cancelable && e.preventDefault();
|
|
2960
|
-
}
|
|
2961
|
-
function Ks(e, t, n, r, i, a, o, s) {
|
|
2962
|
-
var c, l = e[Zo], u = l.options.onMove, d;
|
|
2963
|
-
return window.CustomEvent && !xo && !So ? c = new CustomEvent("move", {
|
|
2964
|
-
bubbles: !0,
|
|
2965
|
-
cancelable: !0
|
|
2966
|
-
}) : (c = document.createEvent("Event"), c.initEvent("move", !0, !0)), c.to = t, c.from = e, c.dragged = n, c.draggedRect = r, c.related = i || t, c.relatedRect = a || H(t), c.willInsertAfter = s, c.originalEvent = o, e.dispatchEvent(c), u && (d = u.call(l, c, o)), d;
|
|
2967
|
-
}
|
|
2968
|
-
function qs(e) {
|
|
2969
|
-
e.draggable = !1;
|
|
2970
|
-
}
|
|
2971
|
-
function Js() {
|
|
2972
|
-
As = !1;
|
|
2973
|
-
}
|
|
2974
|
-
function Ys(e, t, n) {
|
|
2975
|
-
var r = H(Lo(n.el, 0, n.options, !0)), i = Xo(n.el, n.options, q), a = 10;
|
|
2976
|
-
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;
|
|
2977
|
-
}
|
|
2978
|
-
function Xs(e, t, n) {
|
|
2979
|
-
var r = H(Ro(n.el, n.options.draggable)), i = Xo(n.el, n.options, q), a = 10;
|
|
2980
|
-
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;
|
|
2981
|
-
}
|
|
2982
|
-
function Zs(e, t, n, r, i, a, o, s) {
|
|
2983
|
-
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;
|
|
2984
|
-
if (!o) {
|
|
2985
|
-
if (s && Os < l * i) {
|
|
2986
|
-
if (!Es && (Ts === 1 ? c > u + l * a / 2 : c < d - l * a / 2) && (Es = !0), Es) f = !0;
|
|
2987
|
-
else if (Ts === 1 ? c < u + Os : c > d - Os) return -Ts;
|
|
2988
|
-
} else if (c > u + l * (1 - i) / 2 && c < d - l * (1 - i) / 2) return Qs(t);
|
|
2989
|
-
}
|
|
2990
|
-
return f ||= o, f && (c < u + l * a / 2 || c > d - l * a / 2) ? c > u + l / 2 ? 1 : -1 : 0;
|
|
2991
|
-
}
|
|
2992
|
-
function Qs(e) {
|
|
2993
|
-
return zo(G) < zo(e) ? 1 : -1;
|
|
2994
|
-
}
|
|
2995
|
-
function $s(e) {
|
|
2996
|
-
for (var t = e.tagName + e.className + e.src + e.href + e.textContent, n = t.length, r = 0; n--;) r += t.charCodeAt(n);
|
|
2997
|
-
return r.toString(36);
|
|
2998
|
-
}
|
|
2999
|
-
function ec(e) {
|
|
3000
|
-
js.length = 0;
|
|
3001
|
-
for (var t = e.getElementsByTagName("input"), n = t.length; n--;) {
|
|
3002
|
-
var r = t[n];
|
|
3003
|
-
r.checked && js.push(r);
|
|
3004
|
-
}
|
|
3005
|
-
}
|
|
3006
|
-
function tc(e) {
|
|
3007
|
-
return setTimeout(e, 0);
|
|
3008
|
-
}
|
|
3009
|
-
function nc(e) {
|
|
3010
|
-
return clearTimeout(e);
|
|
3011
|
-
}
|
|
3012
|
-
Ms && z(document, "touchmove", function(e) {
|
|
3013
|
-
(Q.active || ms) && e.cancelable && e.preventDefault();
|
|
3014
|
-
}), Q.utils = {
|
|
3015
|
-
on: z,
|
|
3016
|
-
off: B,
|
|
3017
|
-
css: V,
|
|
3018
|
-
find: Po,
|
|
3019
|
-
is: function(e, t) {
|
|
3020
|
-
return !!Ao(e, t, e, !1);
|
|
3021
|
-
},
|
|
3022
|
-
extend: Uo,
|
|
3023
|
-
throttle: Ko,
|
|
3024
|
-
closest: Ao,
|
|
3025
|
-
toggleClass: Mo,
|
|
3026
|
-
clone: Yo,
|
|
3027
|
-
index: zo,
|
|
3028
|
-
nextTick: tc,
|
|
3029
|
-
cancelNextTick: nc,
|
|
3030
|
-
detectDirection: Ls,
|
|
3031
|
-
getChild: Lo
|
|
3032
|
-
}, Q.get = function(e) {
|
|
3033
|
-
return e[Zo];
|
|
3034
|
-
}, Q.mount = function() {
|
|
3035
|
-
var e = [...arguments];
|
|
3036
|
-
e[0].constructor === Array && (e = e[0]), e.forEach(function(e) {
|
|
3037
|
-
if (!e.prototype || !e.prototype.constructor) throw `Sortable: Mounted plugin must be a constructor function, not ${{}.toString.call(e)}`;
|
|
3038
|
-
e.utils && (Q.utils = po(po({}, Q.utils), e.utils)), rs.mount(e);
|
|
3039
|
-
});
|
|
3040
|
-
}, Q.create = function(e, t) {
|
|
3041
|
-
return new Q(e, t);
|
|
3042
|
-
}, Q.version = yo;
|
|
3043
|
-
var $ = [], rc, ic, ac = !1, oc, sc, cc, lc;
|
|
3044
|
-
function uc() {
|
|
3045
|
-
function e() {
|
|
3046
|
-
for (var e in this.defaults = {
|
|
3047
|
-
scroll: !0,
|
|
3048
|
-
forceAutoScrollFallback: !1,
|
|
3049
|
-
scrollSensitivity: 30,
|
|
3050
|
-
scrollSpeed: 10,
|
|
3051
|
-
bubbleScroll: !0
|
|
3052
|
-
}, this) e.charAt(0) === "_" && typeof this[e] == "function" && (this[e] = this[e].bind(this));
|
|
3053
|
-
}
|
|
3054
|
-
return e.prototype = {
|
|
3055
|
-
dragStarted: function(e) {
|
|
3056
|
-
var t = e.originalEvent;
|
|
3057
|
-
this.sortable.nativeDraggable ? z(document, "dragover", this._handleAutoScroll) : this.options.supportPointer ? z(document, "pointermove", this._handleFallbackAutoScroll) : t.touches ? z(document, "touchmove", this._handleFallbackAutoScroll) : z(document, "mousemove", this._handleFallbackAutoScroll);
|
|
3058
|
-
},
|
|
3059
|
-
dragOverCompleted: function(e) {
|
|
3060
|
-
var t = e.originalEvent;
|
|
3061
|
-
!this.options.dragOverBubble && !t.rootEl && this._handleAutoScroll(t);
|
|
3062
|
-
},
|
|
3063
|
-
drop: function() {
|
|
3064
|
-
this.sortable.nativeDraggable ? B(document, "dragover", this._handleAutoScroll) : (B(document, "pointermove", this._handleFallbackAutoScroll), B(document, "touchmove", this._handleFallbackAutoScroll), B(document, "mousemove", this._handleFallbackAutoScroll)), fc(), dc(), qo();
|
|
3065
|
-
},
|
|
3066
|
-
nulling: function() {
|
|
3067
|
-
cc = ic = rc = ac = lc = oc = sc = null, $.length = 0;
|
|
3068
|
-
},
|
|
3069
|
-
_handleFallbackAutoScroll: function(e) {
|
|
3070
|
-
this._handleAutoScroll(e, !0);
|
|
3071
|
-
},
|
|
3072
|
-
_handleAutoScroll: function(e, t) {
|
|
3073
|
-
var n = this, r = (e.touches ? e.touches[0] : e).clientX, i = (e.touches ? e.touches[0] : e).clientY, a = document.elementFromPoint(r, i);
|
|
3074
|
-
if (cc = e, t || this.options.forceAutoScrollFallback || So || xo || wo) {
|
|
3075
|
-
pc(e, this.options, a, t);
|
|
3076
|
-
var o = Ho(a, !0);
|
|
3077
|
-
ac && (!lc || r !== oc || i !== sc) && (lc && fc(), lc = setInterval(function() {
|
|
3078
|
-
var a = Ho(document.elementFromPoint(r, i), !0);
|
|
3079
|
-
a !== o && (o = a, dc()), pc(e, n.options, a, t);
|
|
3080
|
-
}, 10), oc = r, sc = i);
|
|
3081
|
-
} else {
|
|
3082
|
-
if (!this.options.bubbleScroll || Ho(a, !0) === Fo()) {
|
|
3083
|
-
dc();
|
|
3084
|
-
return;
|
|
3085
|
-
}
|
|
3086
|
-
pc(e, this.options, Ho(a, !1), !1);
|
|
3087
|
-
}
|
|
3088
|
-
}
|
|
3089
|
-
}, go(e, {
|
|
3090
|
-
pluginName: "scroll",
|
|
3091
|
-
initializeByDefault: !0
|
|
3092
|
-
});
|
|
3093
|
-
}
|
|
3094
|
-
function dc() {
|
|
3095
|
-
$.forEach(function(e) {
|
|
3096
|
-
clearInterval(e.pid);
|
|
3097
|
-
}), $ = [];
|
|
3098
|
-
}
|
|
3099
|
-
function fc() {
|
|
3100
|
-
clearInterval(lc);
|
|
3101
|
-
}
|
|
3102
|
-
var pc = Ko(function(e, t, n, r) {
|
|
3103
|
-
if (t.scroll) {
|
|
3104
|
-
var i = (e.touches ? e.touches[0] : e).clientX, a = (e.touches ? e.touches[0] : e).clientY, o = t.scrollSensitivity, s = t.scrollSpeed, c = Fo(), l = !1, u;
|
|
3105
|
-
ic !== n && (ic = n, dc(), rc = t.scroll, u = t.scrollFn, rc === !0 && (rc = Ho(n, !0)));
|
|
3106
|
-
var d = 0, f = rc;
|
|
3107
|
-
do {
|
|
3108
|
-
var p = f, m = H(p), h = m.top, g = m.bottom, _ = m.left, v = m.right, y = m.width, b = m.height, x = void 0, S = void 0, C = p.scrollWidth, w = p.scrollHeight, T = V(p), E = p.scrollLeft, D = p.scrollTop;
|
|
3109
|
-
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"));
|
|
3110
|
-
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);
|
|
3111
|
-
if (!$[d]) for (var A = 0; A <= d; A++) $[A] || ($[A] = {});
|
|
3112
|
-
($[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() {
|
|
3113
|
-
r && this.layer === 0 && Q.active._onTouchMove(cc);
|
|
3114
|
-
var t = $[this.layer].vy ? $[this.layer].vy * s : 0, n = $[this.layer].vx ? $[this.layer].vx * s : 0;
|
|
3115
|
-
typeof u == "function" && u.call(Q.dragged.parentNode[Zo], n, t, e, cc, $[this.layer].el) !== "continue" || Jo($[this.layer].el, n, t);
|
|
3116
|
-
}.bind({ layer: d }), 24))), d++;
|
|
3117
|
-
} while (t.bubbleScroll && f !== c && (f = Ho(f, !1)));
|
|
3118
|
-
ac = l;
|
|
3119
|
-
}
|
|
3120
|
-
}, 30), mc = function(e) {
|
|
3121
|
-
var t = e.originalEvent, n = e.putSortable, r = e.dragEl, i = e.activeSortable, a = e.dispatchSortableEvent, o = e.hideGhostForTarget, s = e.unhideGhostForTarget;
|
|
3122
|
-
if (t) {
|
|
3123
|
-
var c = n || i;
|
|
3124
|
-
o();
|
|
3125
|
-
var l = t.changedTouches && t.changedTouches.length ? t.changedTouches[0] : t, u = document.elementFromPoint(l.clientX, l.clientY);
|
|
3126
|
-
s(), c && !c.el.contains(u) && (a("spill"), this.onSpill({
|
|
3127
|
-
dragEl: r,
|
|
3128
|
-
putSortable: n
|
|
3129
|
-
}));
|
|
3130
|
-
}
|
|
3131
|
-
};
|
|
3132
|
-
function hc() {}
|
|
3133
|
-
hc.prototype = {
|
|
3134
|
-
startIndex: null,
|
|
3135
|
-
dragStart: function(e) {
|
|
3136
|
-
var t = e.oldDraggableIndex;
|
|
3137
|
-
this.startIndex = t;
|
|
3138
|
-
},
|
|
3139
|
-
onSpill: function(e) {
|
|
3140
|
-
var t = e.dragEl, n = e.putSortable;
|
|
3141
|
-
this.sortable.captureAnimationState(), n && n.captureAnimationState();
|
|
3142
|
-
var r = Lo(this.sortable.el, this.startIndex, this.options);
|
|
3143
|
-
r ? this.sortable.el.insertBefore(t, r) : this.sortable.el.appendChild(t), this.sortable.animateAll(), n && n.animateAll();
|
|
3144
|
-
},
|
|
3145
|
-
drop: mc
|
|
3146
|
-
}, go(hc, { pluginName: "revertOnSpill" });
|
|
3147
|
-
function gc() {}
|
|
3148
|
-
gc.prototype = {
|
|
3149
|
-
onSpill: function(e) {
|
|
3150
|
-
var t = e.dragEl, n = e.putSortable || this.sortable;
|
|
3151
|
-
n.captureAnimationState(), t.parentNode && t.parentNode.removeChild(t), n.animateAll();
|
|
3152
|
-
},
|
|
3153
|
-
drop: mc
|
|
3154
|
-
}, go(gc, { pluginName: "removeOnSpill" }), Q.mount(new uc()), Q.mount(gc, hc);
|
|
3155
|
-
function _c(e) {
|
|
3156
|
-
return e == null ? e : JSON.parse(JSON.stringify(e));
|
|
3157
|
-
}
|
|
3158
|
-
function vc(t) {
|
|
3159
|
-
v() && e(t);
|
|
3160
|
-
}
|
|
3161
|
-
function yc(e) {
|
|
3162
|
-
v() ? D(e) : r(e);
|
|
3163
|
-
}
|
|
3164
|
-
var bc = null, xc = null;
|
|
3165
|
-
function Sc(e = null, t = null) {
|
|
3166
|
-
bc = e, xc = t;
|
|
3167
|
-
}
|
|
3168
|
-
function Cc() {
|
|
3169
|
-
return {
|
|
3170
|
-
data: bc,
|
|
3171
|
-
clonedData: xc
|
|
3172
|
-
};
|
|
3173
|
-
}
|
|
3174
|
-
var wc = Symbol("cloneElement");
|
|
3175
|
-
function Tc(...e) {
|
|
3176
|
-
let t = v()?.proxy, n = null, i = e[0], [, a, o] = e;
|
|
3177
|
-
Array.isArray(k(a)) || (o = a, a = null);
|
|
3178
|
-
let s = null, { immediate: c = !0, clone: l = _c, forceFallback: u, fallbackOnBody: d, customUpdate: f } = k(o) ?? {};
|
|
3179
|
-
function p(e) {
|
|
3180
|
-
let { from: t, oldIndex: r, item: i } = e, o = Array.from(t.childNodes);
|
|
3181
|
-
n = u && !d ? o.slice(0, -1) : o;
|
|
3182
|
-
let s = k(k(a)?.[r]), c = l(s);
|
|
3183
|
-
Sc(s, c), i[wc] = c;
|
|
3184
|
-
}
|
|
3185
|
-
function m(e) {
|
|
3186
|
-
let t = e.item[wc];
|
|
3187
|
-
if (!eo(t)) {
|
|
3188
|
-
if (ro(e.item), A(a)) {
|
|
3189
|
-
let n = [...k(a)];
|
|
3190
|
-
a.value = $a(n, e.newDraggableIndex, t);
|
|
3191
|
-
return;
|
|
3192
|
-
}
|
|
3193
|
-
$a(k(a), e.newDraggableIndex, t);
|
|
3194
|
-
}
|
|
3195
|
-
}
|
|
3196
|
-
function h(e) {
|
|
3197
|
-
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, pullMode: o, clone: s } = e;
|
|
3198
|
-
if (no(t, n, r), o === "clone") ro(s);
|
|
3199
|
-
else if (A(a)) {
|
|
3200
|
-
let e = [...k(a)];
|
|
3201
|
-
a.value = Qa(e, i);
|
|
3202
|
-
} else Qa(k(a), i);
|
|
3203
|
-
}
|
|
3204
|
-
function g(e) {
|
|
3205
|
-
if (f) {
|
|
3206
|
-
f(e);
|
|
3207
|
-
return;
|
|
3208
|
-
}
|
|
3209
|
-
let { from: t, item: n, oldIndex: r, oldDraggableIndex: i, newDraggableIndex: o } = e;
|
|
3210
|
-
if (ro(n), no(t, n, r), A(a)) {
|
|
3211
|
-
let e = [...k(a)];
|
|
3212
|
-
a.value = Ya(e, i, o);
|
|
3213
|
-
} else Ya(k(a), i, o);
|
|
3214
|
-
}
|
|
3215
|
-
function _(e) {
|
|
3216
|
-
let { newIndex: t, oldIndex: i, from: a, to: o } = e, s = null, c = t === i && a === o;
|
|
3217
|
-
try {
|
|
3218
|
-
if (c) {
|
|
3219
|
-
let e = null;
|
|
3220
|
-
n?.some((t, r) => {
|
|
3221
|
-
if (e && n?.length !== o.childNodes.length) return a.insertBefore(e, t.nextSibling), !0;
|
|
3222
|
-
let i = o.childNodes[r];
|
|
3223
|
-
e = o?.replaceChild(t, i);
|
|
3224
|
-
});
|
|
3225
|
-
}
|
|
3226
|
-
} catch (e) {
|
|
3227
|
-
s = e;
|
|
3228
|
-
} finally {
|
|
3229
|
-
n = null;
|
|
3230
|
-
}
|
|
3231
|
-
r(() => {
|
|
3232
|
-
if (Sc(), s) throw s;
|
|
3233
|
-
});
|
|
3234
|
-
}
|
|
3235
|
-
let y = {
|
|
3236
|
-
onUpdate: g,
|
|
3237
|
-
onStart: p,
|
|
3238
|
-
onAdd: m,
|
|
3239
|
-
onRemove: h,
|
|
3240
|
-
onEnd: _
|
|
3241
|
-
};
|
|
3242
|
-
function b(e) {
|
|
3243
|
-
let n = k(i);
|
|
3244
|
-
return e ||= to(n) ? io(n, t?.$el) : n, e && !so(e) && (e = e.$el), e || Ja("Root element not found"), e;
|
|
3245
|
-
}
|
|
3246
|
-
function x() {
|
|
3247
|
-
let e = k(o) ?? {}, { immediate: t, clone: n } = e, r = Ga(e, ["immediate", "clone"]);
|
|
3248
|
-
return co(r, (e, t) => {
|
|
3249
|
-
lo(e) && (r[e] = (e, ...n) => (uo(e, Cc()), t(e, ...n)));
|
|
3250
|
-
}), oo(a === null ? {} : y, r);
|
|
3251
|
-
}
|
|
3252
|
-
let S = (e) => {
|
|
3253
|
-
e = b(e), s && C.destroy(), s = new Q(e, x());
|
|
3254
|
-
};
|
|
3255
|
-
I(() => o, () => {
|
|
3256
|
-
s && co(x(), (e, t) => {
|
|
3257
|
-
s?.option(e, t);
|
|
3258
|
-
});
|
|
3259
|
-
}, { deep: !0 });
|
|
3260
|
-
let C = {
|
|
3261
|
-
option: (e, t) => s?.option(e, t),
|
|
3262
|
-
destroy: () => {
|
|
3263
|
-
s?.destroy(), s = null;
|
|
3264
|
-
},
|
|
3265
|
-
save: () => s?.save(),
|
|
3266
|
-
toArray: () => s?.toArray(),
|
|
3267
|
-
closest: (...e) => s?.closest(...e)
|
|
3268
|
-
};
|
|
3269
|
-
return yc(() => {
|
|
3270
|
-
c && S();
|
|
3271
|
-
}), vc(C.destroy), Wa({
|
|
3272
|
-
start: S,
|
|
3273
|
-
pause: () => C?.option("disabled", !0),
|
|
3274
|
-
resume: () => C?.option("disabled", !1)
|
|
3275
|
-
}, C);
|
|
3276
|
-
}
|
|
3277
|
-
var Ec = [
|
|
3278
|
-
"update",
|
|
3279
|
-
"start",
|
|
3280
|
-
"add",
|
|
3281
|
-
"remove",
|
|
3282
|
-
"choose",
|
|
3283
|
-
"unchoose",
|
|
3284
|
-
"end",
|
|
3285
|
-
"sort",
|
|
3286
|
-
"filter",
|
|
3287
|
-
"clone",
|
|
3288
|
-
"move",
|
|
3289
|
-
"change"
|
|
3290
|
-
], Dc = [
|
|
3291
|
-
"clone",
|
|
3292
|
-
"animation",
|
|
3293
|
-
"ghostClass",
|
|
3294
|
-
"group",
|
|
3295
|
-
"sort",
|
|
3296
|
-
"disabled",
|
|
3297
|
-
"store",
|
|
3298
|
-
"handle",
|
|
3299
|
-
"draggable",
|
|
3300
|
-
"swapThreshold",
|
|
3301
|
-
"invertSwap",
|
|
3302
|
-
"invertedSwapThreshold",
|
|
3303
|
-
"removeCloneOnHide",
|
|
3304
|
-
"direction",
|
|
3305
|
-
"chosenClass",
|
|
3306
|
-
"dragClass",
|
|
3307
|
-
"ignore",
|
|
3308
|
-
"filter",
|
|
3309
|
-
"preventOnFilter",
|
|
3310
|
-
"easing",
|
|
3311
|
-
"setData",
|
|
3312
|
-
"dropBubble",
|
|
3313
|
-
"dragoverBubble",
|
|
3314
|
-
"dataIdAttr",
|
|
3315
|
-
"delay",
|
|
3316
|
-
"delayOnTouchOnly",
|
|
3317
|
-
"touchStartThreshold",
|
|
3318
|
-
"forceFallback",
|
|
3319
|
-
"fallbackClass",
|
|
3320
|
-
"fallbackOnBody",
|
|
3321
|
-
"fallbackTolerance",
|
|
3322
|
-
"fallbackOffset",
|
|
3323
|
-
"supportPointer",
|
|
3324
|
-
"emptyInsertThreshold",
|
|
3325
|
-
"scroll",
|
|
3326
|
-
"forceAutoScrollFallback",
|
|
3327
|
-
"scrollSensitivity",
|
|
3328
|
-
"scrollSpeed",
|
|
3329
|
-
"bubbleScroll",
|
|
3330
|
-
"modelValue",
|
|
3331
|
-
"tag",
|
|
3332
|
-
"target",
|
|
3333
|
-
"customUpdate",
|
|
3334
|
-
...Ec.map((e) => `on${e.replace(/^\S/, (e) => e.toUpperCase())}`)
|
|
3335
|
-
], Oc = F({
|
|
3336
|
-
name: "VueDraggable",
|
|
3337
|
-
model: {
|
|
3338
|
-
prop: "modelValue",
|
|
3339
|
-
event: "update:modelValue"
|
|
3340
|
-
},
|
|
3341
|
-
props: Dc,
|
|
3342
|
-
emits: ["update:modelValue", ...Ec],
|
|
3343
|
-
setup(e, { slots: t, emit: n, expose: r, attrs: i }) {
|
|
3344
|
-
let a = Ec.reduce((e, t) => {
|
|
3345
|
-
let r = `on${t.replace(/^\S/, (e) => e.toUpperCase())}`;
|
|
3346
|
-
return e[r] = (...e) => n(t, ...e), e;
|
|
3347
|
-
}, {}), o = y(() => {
|
|
3348
|
-
let t = M(e), { modelValue: n } = t, r = Ga(t, ["modelValue"]), o = Object.entries(r).reduce((e, [t, n]) => {
|
|
3349
|
-
let r = k(n);
|
|
3350
|
-
return r !== void 0 && (e[t] = r), e;
|
|
3351
|
-
}, {});
|
|
3352
|
-
return Wa(Wa({}, a), Za(Wa(Wa({}, i), o)));
|
|
3353
|
-
}), s = y({
|
|
3354
|
-
get: () => e.modelValue,
|
|
3355
|
-
set: (e) => n("update:modelValue", e)
|
|
3356
|
-
}), c = f(), l = m(Tc(e.target || c, s, o));
|
|
3357
|
-
return r(l), () => P(e.tag || "div", { ref: c }, (t?.default)?.call(t, l));
|
|
3358
|
-
}
|
|
3359
|
-
}), kc = {
|
|
3360
|
-
mounted: "mounted",
|
|
3361
|
-
unmounted: "unmounted"
|
|
3362
|
-
};
|
|
3363
|
-
kc.mounted, kc.unmounted;
|
|
3364
|
-
// src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3365
|
-
var Ac = { class: "tpl:relative tpl:w-full" }, jc = {
|
|
3366
|
-
key: 0,
|
|
3367
|
-
"data-testid": "hero-image-hint",
|
|
3368
|
-
class: "tpl:pointer-events-none tpl:absolute tpl:inset-x-0 tpl:bottom-full tpl:mb-2 tpl:flex tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-chrome-text-dim)]"
|
|
3369
|
-
}, Mc = {
|
|
3370
|
-
key: 0,
|
|
3371
|
-
"data-testid": "section-drop-hint",
|
|
3372
|
-
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)]"
|
|
3373
|
-
}, Nc = /* @__PURE__ */ F({
|
|
3374
|
-
__name: "SectionBlock",
|
|
3375
|
-
props: {
|
|
3376
|
-
block: {},
|
|
3377
|
-
viewport: {}
|
|
3378
|
-
},
|
|
3379
|
-
setup(e) {
|
|
3380
|
-
let r = {
|
|
3381
|
-
title: ja,
|
|
3382
|
-
paragraph: ha,
|
|
3383
|
-
image: ca,
|
|
3384
|
-
button: si,
|
|
3385
|
-
divider: Wi,
|
|
3386
|
-
custom: Hi
|
|
3387
|
-
}, i = e, { t: s } = kn(), u = Pt(fn, "SectionBlock"), d = n(dn, null), m = n(Cn, null), h = n(gn, {}), _ = n(Sn, null);
|
|
3388
|
-
function v(e) {
|
|
3389
|
-
let t = h.savedBlocks;
|
|
3390
|
-
t?.isPicking.value ? t.togglePick(i.block.id) : u.selectBlock(e);
|
|
3391
|
-
}
|
|
3392
|
-
let x = y(() => {
|
|
3393
|
-
switch (i.block.columns) {
|
|
3394
|
-
case "2": return ["50%", "50%"];
|
|
3395
|
-
case "3": return [
|
|
3396
|
-
"33.33%",
|
|
3397
|
-
"33.33%",
|
|
3398
|
-
"33.33%"
|
|
3399
|
-
];
|
|
3400
|
-
case "1-2": return ["33.33%", "66.67%"];
|
|
3401
|
-
case "2-1": return ["66.67%", "33.33%"];
|
|
3402
|
-
default: return ["100%"];
|
|
3403
|
-
}
|
|
3404
|
-
}), C = y(() => {
|
|
3405
|
-
let e = x.value.length, t = [...i.block.children];
|
|
3406
|
-
for (; t.length < e;) t.push([]);
|
|
3407
|
-
return t.slice(0, e);
|
|
3408
|
-
}), w = y(() => i.viewport === "mobile" && i.block.stackOnMobile !== !1);
|
|
3409
|
-
function D(e) {
|
|
3410
|
-
return C.value[e] || [];
|
|
3411
|
-
}
|
|
3412
|
-
function A(e) {
|
|
3413
|
-
return _?.value === !1 || !d?.isHidden(e);
|
|
3414
|
-
}
|
|
3415
|
-
function M(e) {
|
|
3416
|
-
return !D(e).some((e) => A(e.id));
|
|
3417
|
-
}
|
|
3418
|
-
let ee = f(null);
|
|
3419
|
-
function P(e) {
|
|
3420
|
-
return u.state.previewMode ? !1 : M(e) ? !0 : ee.value === e && D(e).filter((e) => A(e.id)).length <= 1;
|
|
3421
|
-
}
|
|
3422
|
-
let F = y(() => {
|
|
3423
|
-
if (u.state.previewMode) return !1;
|
|
3424
|
-
let e = Qe(i.block);
|
|
3425
|
-
return e !== null && !e.applied && e.reason === "image";
|
|
3426
|
-
});
|
|
3427
|
-
function I(e) {
|
|
3428
|
-
return D(e).length === 0 && !u.state.previewMode;
|
|
3429
|
-
}
|
|
3430
|
-
function L(e) {
|
|
3431
|
-
return D(e).length === 0 && u.state.previewMode;
|
|
3432
|
-
}
|
|
3433
|
-
function ne(e, t) {
|
|
3434
|
-
let n = t.map((e) => JSON.parse(JSON.stringify(e))), r = [...i.block.children];
|
|
3435
|
-
for (; r.length <= e;) r.push([]);
|
|
3436
|
-
r[e] = n, u.updateBlock(i.block.id, { children: r });
|
|
3437
|
-
}
|
|
3438
|
-
function re(e) {
|
|
3439
|
-
return Gr(e, m, r);
|
|
3440
|
-
}
|
|
3441
|
-
function ie(e, t) {
|
|
3442
|
-
e.type === "custom" && u.updateBlock(e.id, {
|
|
3443
|
-
fieldValues: t.fieldValues,
|
|
3444
|
-
dataSourceFetched: t.dataSourceFetched
|
|
3445
|
-
});
|
|
3446
|
-
}
|
|
3447
|
-
return (n, r) => (T(), S("div", Ac, [F.value ? (T(), S("div", jc, [O("span", null, c(k(s).section.heroAddImage), 1)])) : b("", !0), O("div", { class: t(["tpl:flex tpl:gap-0", { "tpl:flex-col": w.value }]) }, [(T(!0), S(j, null, l(C.value, (n, i) => (T(), S("div", {
|
|
3448
|
-
key: i,
|
|
3449
|
-
class: t(["tpl:relative tpl:flex tpl:flex-col tpl:rounded", I(i) ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3450
|
-
style: E({ width: w.value ? "100%" : x.value[i] })
|
|
3451
|
-
}, [g(k(Oc), {
|
|
3452
|
-
"model-value": D(i),
|
|
3453
|
-
group: {
|
|
3454
|
-
name: "blocks",
|
|
3455
|
-
pull: !0,
|
|
3456
|
-
put: (e, t, n) => k(Ra)(n)
|
|
3457
|
-
},
|
|
3458
|
-
animation: 150,
|
|
3459
|
-
"ghost-class": "tpl-ghost",
|
|
3460
|
-
"drag-class": "tpl-dragging",
|
|
3461
|
-
handle: ".tpl-block-btn",
|
|
3462
|
-
"invert-swap": !0,
|
|
3463
|
-
"inverted-swap-threshold": .65,
|
|
3464
|
-
"empty-insert-threshold": 20,
|
|
3465
|
-
"force-fallback": !0,
|
|
3466
|
-
class: t(["tpl:grow", {
|
|
3467
|
-
"tpl:min-h-[60px]": P(i),
|
|
3468
|
-
"tpl:min-h-[34px]": L(i)
|
|
3469
|
-
}]),
|
|
3470
|
-
onStart: (e) => ee.value = i,
|
|
3471
|
-
onEnd: r[0] ||= (e) => ee.value = null,
|
|
3472
|
-
"onUpdate:modelValue": (e) => ne(i, e)
|
|
3473
|
-
}, {
|
|
3474
|
-
default: p(() => [(T(!0), S(j, null, l(D(i), (t) => a((T(), S("div", { key: t.id }, [g(ka, {
|
|
3475
|
-
block: t,
|
|
3476
|
-
"is-selected": k(u).state.selectedBlockId === t.id,
|
|
3477
|
-
viewport: e.viewport,
|
|
3478
|
-
"preview-mode": k(u).state.previewMode,
|
|
3479
|
-
nested: "",
|
|
3480
|
-
onSelect: (e) => v(t.id)
|
|
3481
|
-
}, {
|
|
3482
|
-
default: p(() => [(T(), N(o(re(t)), {
|
|
3483
|
-
block: t,
|
|
3484
|
-
viewport: e.viewport,
|
|
3485
|
-
onFetchData: (e) => ie(t, e),
|
|
3486
|
-
onUpdate: (e) => k(u).updateBlock(t.id, e)
|
|
3487
|
-
}, null, 40, [
|
|
3488
|
-
"block",
|
|
3489
|
-
"viewport",
|
|
3490
|
-
"onFetchData",
|
|
3491
|
-
"onUpdate"
|
|
3492
|
-
]))]),
|
|
3493
|
-
_: 2
|
|
3494
|
-
}, 1032, [
|
|
3495
|
-
"block",
|
|
3496
|
-
"is-selected",
|
|
3497
|
-
"viewport",
|
|
3498
|
-
"preview-mode",
|
|
3499
|
-
"onSelect"
|
|
3500
|
-
])])), [[te, A(t.id)]])), 128))]),
|
|
3501
|
-
_: 2
|
|
3502
|
-
}, 1032, [
|
|
3503
|
-
"model-value",
|
|
3504
|
-
"group",
|
|
3505
|
-
"class",
|
|
3506
|
-
"onStart",
|
|
3507
|
-
"onUpdate:modelValue"
|
|
3508
|
-
]), I(i) ? (T(), S("div", Mc, [O("span", null, c(k(s).section.dropHere), 1)])) : b("", !0)], 6))), 128))], 2)]));
|
|
3509
|
-
}
|
|
3510
|
-
}), Pc = ["width", "height"], Fc = [
|
|
3511
|
-
"d",
|
|
3512
|
-
"stroke",
|
|
3513
|
-
"stroke-opacity",
|
|
3514
|
-
"stroke-width"
|
|
3515
|
-
], Ic = ["d", "fill"], Lc = /* @__PURE__ */ F({
|
|
3516
|
-
__name: "SocialIconSvg",
|
|
3517
|
-
props: {
|
|
3518
|
-
platform: {},
|
|
3519
|
-
iconStyle: {},
|
|
3520
|
-
iconTone: {},
|
|
3521
|
-
iconSize: {}
|
|
3522
|
-
},
|
|
3523
|
-
setup(e) {
|
|
3524
|
-
let t = e, n = y(() => xt[t.platform]), r = y(() => St[t.iconSize]), i = y(() => se(t.platform, t.iconTone)), a = y(() => Ee(t.iconStyle, t.iconTone)), o = y(() => {
|
|
3525
|
-
let e = {
|
|
3526
|
-
display: "inline-flex",
|
|
3527
|
-
alignItems: "center",
|
|
3528
|
-
justifyContent: "center",
|
|
3529
|
-
width: `${r.value}px`,
|
|
3530
|
-
height: `${r.value}px`
|
|
3531
|
-
}, n = i.value.fill;
|
|
3532
|
-
switch (t.iconStyle) {
|
|
3533
|
-
case "solid": return {
|
|
3534
|
-
...e,
|
|
3535
|
-
backgroundColor: n,
|
|
3536
|
-
borderRadius: "4px"
|
|
3537
|
-
};
|
|
3538
|
-
case "outlined": return {
|
|
3539
|
-
...e,
|
|
3540
|
-
backgroundColor: "transparent",
|
|
3541
|
-
border: `2px solid ${n}`,
|
|
3542
|
-
borderRadius: "4px",
|
|
3543
|
-
...a.value && { boxShadow: l(a.value) }
|
|
3544
|
-
};
|
|
3545
|
-
case "rounded": return {
|
|
3546
|
-
...e,
|
|
3547
|
-
backgroundColor: n,
|
|
3548
|
-
borderRadius: "8px"
|
|
3549
|
-
};
|
|
3550
|
-
case "square": return {
|
|
3551
|
-
...e,
|
|
3552
|
-
backgroundColor: n,
|
|
3553
|
-
borderRadius: "0"
|
|
3554
|
-
};
|
|
3555
|
-
case "circle": return {
|
|
3556
|
-
...e,
|
|
3557
|
-
backgroundColor: n,
|
|
3558
|
-
borderRadius: "50%"
|
|
3559
|
-
};
|
|
3560
|
-
default: return e;
|
|
3561
|
-
}
|
|
3562
|
-
}), s = y(() => et(t.iconStyle)), c = y(() => Math.floor(r.value * s.value));
|
|
3563
|
-
function l(e) {
|
|
3564
|
-
let t = `${e.width / 2 * r.value / 24}px`, n = Math.round(e.opacity * 255).toString(16).padStart(2, "0"), i = `${e.color}${n}`;
|
|
3565
|
-
return `0 0 0 ${t} ${i}, inset 0 0 0 ${t} ${i}`;
|
|
3566
|
-
}
|
|
3567
|
-
let u = y(() => t.iconStyle === "outlined" || t.iconStyle === "plain" ? i.value.fill : i.value.onFill);
|
|
3568
|
-
return (e, t) => (T(), S("span", { style: E(o.value) }, [(T(), S("svg", {
|
|
3569
|
-
width: c.value,
|
|
3570
|
-
height: c.value,
|
|
3571
|
-
viewBox: "0 0 24 24",
|
|
3572
|
-
overflow: "visible",
|
|
3573
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
3574
|
-
}, [a.value ? (T(), S("path", {
|
|
3575
|
-
key: 0,
|
|
3576
|
-
"data-testid": "social-icon-halo",
|
|
3577
|
-
d: n.value.path,
|
|
3578
|
-
fill: "none",
|
|
3579
|
-
stroke: a.value.color,
|
|
3580
|
-
"stroke-opacity": a.value.opacity,
|
|
3581
|
-
"stroke-width": a.value.width / s.value,
|
|
3582
|
-
"stroke-linejoin": "round"
|
|
3583
|
-
}, null, 8, Fc)) : b("", !0), O("path", {
|
|
3584
|
-
d: n.value.path,
|
|
3585
|
-
fill: u.value
|
|
3586
|
-
}, null, 8, Ic)], 8, Pc))], 4));
|
|
3587
|
-
}
|
|
3588
|
-
}), Rc = { class: "tpl:w-full" }, zc = ["href"], Bc = {
|
|
3589
|
-
key: 1,
|
|
3590
|
-
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)]"
|
|
3591
|
-
}, Vc = /* @__PURE__ */ F({
|
|
3592
|
-
__name: "SocialIconsBlock",
|
|
3593
|
-
props: {
|
|
3594
|
-
block: {},
|
|
3595
|
-
viewport: {}
|
|
3596
|
-
},
|
|
3597
|
-
setup(e) {
|
|
3598
|
-
let t = e, { t: n } = kn(), r = y(() => ({
|
|
3599
|
-
display: "flex",
|
|
3600
|
-
flexWrap: "wrap",
|
|
3601
|
-
gap: `${t.block.spacing}px`,
|
|
3602
|
-
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
3603
|
-
})), i = y(() => t.block.icons.length > 0);
|
|
3604
|
-
return (t, a) => (T(), S("div", Rc, [i.value ? (T(), S("div", {
|
|
3605
|
-
key: 0,
|
|
3606
|
-
style: E(r.value)
|
|
3607
|
-
}, [(T(!0), S(j, null, l(e.block.icons, (t) => (T(), S("a", {
|
|
3608
|
-
key: t.id,
|
|
3609
|
-
href: t.url || "#",
|
|
3610
|
-
class: "tpl:cursor-default",
|
|
3611
|
-
onClick: a[0] ||= L(() => {}, ["prevent"])
|
|
3612
|
-
}, [g(Lc, {
|
|
3613
|
-
platform: t.platform,
|
|
3614
|
-
"icon-style": e.block.iconStyle,
|
|
3615
|
-
"icon-tone": e.block.iconTone,
|
|
3616
|
-
"icon-size": e.block.iconSize
|
|
3617
|
-
}, null, 8, [
|
|
3618
|
-
"platform",
|
|
3619
|
-
"icon-style",
|
|
3620
|
-
"icon-tone",
|
|
3621
|
-
"icon-size"
|
|
3622
|
-
])], 8, zc))), 128))], 4)) : (T(), S("div", Bc, [g(k(Ct), { size: 16 }), O("span", null, c(k(n).social.addIcons), 1)]))]));
|
|
3623
|
-
}
|
|
3624
|
-
}), Hc = { class: "tpl:w-full" }, Uc = {
|
|
3625
|
-
key: 0,
|
|
3626
|
-
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3627
|
-
style: {
|
|
3628
|
-
"background-color": "var(--tpl-bg-hover)",
|
|
3629
|
-
color: "var(--tpl-text-dim)"
|
|
3630
|
-
}
|
|
3631
|
-
}, Wc = /* @__PURE__ */ F({
|
|
3632
|
-
__name: "SpacerBlock",
|
|
3633
|
-
props: {
|
|
3634
|
-
block: {},
|
|
3635
|
-
viewport: {}
|
|
3636
|
-
},
|
|
3637
|
-
setup(e) {
|
|
3638
|
-
let n = e, r = Pt(fn, "SpacerBlock"), i = y(() => ({
|
|
3639
|
-
height: `${n.block.height}px`,
|
|
3640
|
-
minHeight: `${n.block.height}px`,
|
|
3641
|
-
...r.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3642
|
-
}));
|
|
3643
|
-
return (n, a) => (T(), S("div", Hc, [O("div", {
|
|
3644
|
-
style: E(i.value),
|
|
3645
|
-
class: t(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:box-border tpl:border-y tpl:border-x-0 tpl:border-dashed": !k(r).state.previewMode }])
|
|
3646
|
-
}, [k(r).state.previewMode ? b("", !0) : (T(), S("span", Uc, c(e.block.height) + "px ", 1))], 6)]));
|
|
3647
|
-
}
|
|
3648
|
-
}), Gc = { class: "tpl:w-full" }, Kc = { key: 0 }, qc = [
|
|
3649
|
-
"aria-label",
|
|
3650
|
-
"data-placeholder",
|
|
3651
|
-
"onBlur"
|
|
3652
|
-
], Jc = [
|
|
3653
|
-
"aria-label",
|
|
3654
|
-
"data-placeholder",
|
|
3655
|
-
"onBlur"
|
|
3656
|
-
], Yc = {
|
|
3657
|
-
key: 1,
|
|
3658
|
-
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)]"
|
|
3659
|
-
}, Xc = /*#__PURE__*/ Gn(/* @__PURE__ */ F({
|
|
3660
|
-
__name: "TableBlock",
|
|
3661
|
-
props: {
|
|
3662
|
-
block: {},
|
|
3663
|
-
viewport: {}
|
|
3664
|
-
},
|
|
3665
|
-
setup(e) {
|
|
3666
|
-
let t = {
|
|
3667
|
-
mounted(e, t) {
|
|
3668
|
-
e.textContent = t.value ?? "";
|
|
3669
|
-
},
|
|
3670
|
-
updated(e, t) {
|
|
3671
|
-
t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
|
|
3672
|
-
}
|
|
3673
|
-
}, n = e, { t: r } = kn(), i = Pt(fn, "TableBlock"), o = Pt(wn, "TableBlock"), s = y(() => n.block.rows.length > 0), u = y(() => {
|
|
3674
|
-
let e = {
|
|
3675
|
-
width: "100%",
|
|
3676
|
-
borderCollapse: "collapse",
|
|
3677
|
-
fontSize: `${n.block.fontSize}px`,
|
|
3678
|
-
textAlign: n.block.textAlign,
|
|
3679
|
-
fontFamily: n.block.fontFamily ? o.resolveFontFamily(n.block.fontFamily) : "inherit"
|
|
3680
|
-
};
|
|
3681
|
-
return n.block.color && (e.color = n.block.color), e;
|
|
3682
|
-
}), d = y(() => ({
|
|
3683
|
-
border: `${n.block.borderWidth}px solid ${n.block.borderColor}`,
|
|
3684
|
-
padding: `${n.block.cellPadding}px`,
|
|
3685
|
-
textAlign: n.block.textAlign
|
|
3686
|
-
})), f = y(() => ({
|
|
3687
|
-
...d.value,
|
|
3688
|
-
fontWeight: "bold",
|
|
3689
|
-
backgroundColor: n.block.headerBackgroundColor || "transparent"
|
|
3690
|
-
})), p = y(() => n.block.hasHeaderRow && n.block.rows.length > 0 ? n.block.rows[0] : null), m = y(() => n.block.hasHeaderRow ? n.block.rows.slice(1) : n.block.rows);
|
|
3691
|
-
function h() {
|
|
3692
|
-
i.selectBlock(n.block.id);
|
|
3693
|
-
}
|
|
3694
|
-
function _(e, t, r) {
|
|
3695
|
-
let a = r.target.innerText.trim(), o = n.block.rows.map((n) => n.id === e ? {
|
|
3696
|
-
...n,
|
|
3697
|
-
cells: n.cells.map((e) => e.id === t ? {
|
|
3698
|
-
...e,
|
|
3699
|
-
content: a
|
|
3700
|
-
} : e)
|
|
3701
|
-
} : n);
|
|
3702
|
-
i.updateBlock(n.block.id, { rows: o });
|
|
3703
|
-
}
|
|
3704
|
-
return (e, n) => (T(), S("div", Gc, [s.value ? (T(), S("table", {
|
|
3705
|
-
key: 0,
|
|
3706
|
-
style: E(u.value),
|
|
3707
|
-
class: "tpl-table-editable"
|
|
3708
|
-
}, [p.value ? (T(), S("thead", Kc, [O("tr", null, [(T(!0), S(j, null, l(p.value.cells, (e) => a((T(), S("th", {
|
|
3709
|
-
key: e.id,
|
|
3710
|
-
style: E(f.value),
|
|
3711
|
-
"aria-label": k(r).table.cellPlaceholder,
|
|
3712
|
-
contenteditable: "true",
|
|
3713
|
-
"data-placeholder": k(r).table.cellPlaceholder,
|
|
3714
|
-
onBlur: (t) => _(p.value.id, e.id, t),
|
|
3715
|
-
onKeydown: n[0] ||= ne(L((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3716
|
-
onClick: L(h, ["stop"])
|
|
3717
|
-
}, null, 44, qc)), [[t, e.content]])), 128))])])) : b("", !0), O("tbody", null, [(T(!0), S(j, null, l(m.value, (e) => (T(), S("tr", { key: e.id }, [(T(!0), S(j, null, l(e.cells, (i) => a((T(), S("td", {
|
|
3718
|
-
key: i.id,
|
|
3719
|
-
style: E(d.value),
|
|
3720
|
-
"aria-label": k(r).table.cellPlaceholder,
|
|
3721
|
-
contenteditable: "true",
|
|
3722
|
-
"data-placeholder": k(r).table.cellPlaceholder,
|
|
3723
|
-
onBlur: (t) => _(e.id, i.id, t),
|
|
3724
|
-
onKeydown: n[1] ||= ne(L((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3725
|
-
onClick: L(h, ["stop"])
|
|
3726
|
-
}, null, 44, Jc)), [[t, i.content]])), 128))]))), 128))])], 4)) : (T(), S("div", Yc, [g(k(mt), { size: 16 }), O("span", null, c(k(r).table.empty), 1)]))]));
|
|
3727
|
-
}
|
|
3728
|
-
}), [["__scopeId", "data-v-6751d456"]]), Zc = /* @__PURE__ */ F({
|
|
3729
|
-
__name: "VideoPlayButton",
|
|
3730
|
-
props: { hoverEffect: {
|
|
3731
|
-
type: Boolean,
|
|
3732
|
-
default: !1
|
|
3733
|
-
} },
|
|
3734
|
-
setup(e) {
|
|
3735
|
-
return (n, r) => (T(), S("div", { class: t(["tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/30", e.hoverEffect && "tpl:transition-opacity tpl:group-hover:bg-black/40"]) }, [...r[0] ||= [O("div", { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[color-mix(in_srgb,var(--tpl-bg)_90%,transparent)] tpl:shadow-[var(--tpl-shadow-lg)]" }, [O("svg", {
|
|
3736
|
-
class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
|
|
3737
|
-
width: "28",
|
|
3738
|
-
height: "28",
|
|
3739
|
-
viewBox: "0 0 24 24",
|
|
3740
|
-
fill: "currentColor"
|
|
3741
|
-
}, [O("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
|
|
3742
|
-
}
|
|
3743
|
-
});
|
|
3744
|
-
// src/utils/videoThumbnail.ts
|
|
3745
|
-
function Qc(e) {
|
|
3746
|
-
if (!e) return {
|
|
3747
|
-
platform: "unknown",
|
|
3748
|
-
videoId: null,
|
|
3749
|
-
thumbnailUrl: null
|
|
3750
|
-
};
|
|
3751
|
-
for (let t of [/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]{11})/i, /youtube\.com\/shorts\/([a-zA-Z0-9_-]{11})/i]) {
|
|
3752
|
-
let n = e.match(t);
|
|
3753
|
-
if (n) {
|
|
3754
|
-
let e = n[1];
|
|
3755
|
-
return {
|
|
3756
|
-
platform: "youtube",
|
|
3757
|
-
videoId: e,
|
|
3758
|
-
thumbnailUrl: `https://img.youtube.com/vi/${e}/maxresdefault.jpg`
|
|
3759
|
-
};
|
|
3760
|
-
}
|
|
3761
|
-
}
|
|
3762
|
-
let t = e.match(/vimeo\.com\/(?:video\/)?(\d+)/i);
|
|
3763
|
-
if (t) {
|
|
3764
|
-
let e = t[1];
|
|
3765
|
-
return {
|
|
3766
|
-
platform: "vimeo",
|
|
3767
|
-
videoId: e,
|
|
3768
|
-
thumbnailUrl: `https://vumbnail.com/${e}.jpg`
|
|
3769
|
-
};
|
|
3770
|
-
}
|
|
3771
|
-
return {
|
|
3772
|
-
platform: "unknown",
|
|
3773
|
-
videoId: null,
|
|
3774
|
-
thumbnailUrl: null
|
|
3775
|
-
};
|
|
3776
|
-
}
|
|
3777
|
-
function $c(e, t) {
|
|
3778
|
-
return t || Qc(e).thumbnailUrl;
|
|
3779
|
-
}
|
|
3780
|
-
// src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3781
|
-
var el = ["src", "alt"], tl = {
|
|
3782
|
-
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3783
|
-
style: { opacity: "0.7" }
|
|
3784
|
-
}, nl = ["href"], rl = ["src", "alt"], il = ["src", "alt"], al = {
|
|
3785
|
-
key: 3,
|
|
3786
|
-
class: "tpl:flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
3787
|
-
}, ol = /* @__PURE__ */ F({
|
|
3788
|
-
__name: "VideoBlock",
|
|
3789
|
-
props: {
|
|
3790
|
-
block: {},
|
|
3791
|
-
viewport: {}
|
|
3792
|
-
},
|
|
3793
|
-
setup(e) {
|
|
3794
|
-
let t = e, { t: n } = kn(), { syntax: r } = qn(), i = y(() => Ce(t.block.url, r) || Ce(t.block.thumbnailUrl, r)), a = ut(() => i.value ? void 0 : t.block.thumbnailUrl || void 0), o = ut(() => i.value ? t.block.placeholderUrl : void 0), s = y(() => i.value ? null : t.block.thumbnailUrl ? a.value ?? null : $c(t.block.url)), l = y(() => ({ textAlign: t.block.align })), u = y(() => {
|
|
3795
|
-
let e = t.block.align;
|
|
3796
|
-
return {
|
|
3797
|
-
maxWidth: "100%",
|
|
3798
|
-
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
3799
|
-
height: t.block.height ? `${t.block.height}px` : void 0,
|
|
3800
|
-
display: "block",
|
|
3801
|
-
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
3802
|
-
marginRight: e === "center" ? "auto" : void 0
|
|
3803
|
-
};
|
|
3804
|
-
}), d = y(() => ({ height: t.block.height ? `${t.block.height}px` : void 0 })), f = y(() => Ce(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
3805
|
-
return (t, r) => (T(), S("div", {
|
|
3806
|
-
class: "tpl:w-full",
|
|
3807
|
-
style: E(l.value)
|
|
3808
|
-
}, [i.value && e.block.placeholderUrl ? (T(), S("div", {
|
|
3809
|
-
key: 0,
|
|
3810
|
-
class: "tpl:relative tpl:inline-block",
|
|
3811
|
-
style: E(u.value)
|
|
3812
|
-
}, [O("img", {
|
|
3813
|
-
class: "tpl:block tpl:w-full tpl:border-0",
|
|
3814
|
-
src: k(o),
|
|
3815
|
-
alt: e.block.alt,
|
|
3816
|
-
style: E(d.value)
|
|
3817
|
-
}, null, 12, el), g(Zc)], 4)) : i.value ? (T(), S("div", {
|
|
3818
|
-
key: 1,
|
|
3819
|
-
class: "tpl:relative tpl:!flex tpl:box-border tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
3820
|
-
style: E([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, u.value])
|
|
3821
|
-
}, [g(k(mi), {
|
|
3822
|
-
size: 36,
|
|
3823
|
-
"stroke-width": 1.5,
|
|
3824
|
-
class: "tpl:text-[var(--tpl-primary)]",
|
|
3825
|
-
style: { opacity: "0.5" }
|
|
3826
|
-
}), O("span", tl, [g(ai, { text: f.value }, null, 8, ["text"])])], 4)) : s.value ? (T(), S(j, { key: 2 }, [e.block.url ? (T(), S("a", {
|
|
3827
|
-
key: 0,
|
|
3828
|
-
href: e.block.url,
|
|
3829
|
-
target: "_blank",
|
|
3830
|
-
rel: "noopener noreferrer",
|
|
3831
|
-
class: "tpl:group tpl:relative tpl:inline-block",
|
|
3832
|
-
style: E(u.value),
|
|
3833
|
-
onClick: r[0] ||= L(() => {}, ["prevent"])
|
|
3834
|
-
}, [O("img", {
|
|
3835
|
-
class: "tpl:block tpl:w-full tpl:border-0",
|
|
3836
|
-
src: s.value,
|
|
3837
|
-
alt: e.block.alt,
|
|
3838
|
-
style: E(d.value)
|
|
3839
|
-
}, null, 12, rl), g(Zc, { "hover-effect": "" })], 12, nl)) : (T(), S("div", {
|
|
3840
|
-
key: 1,
|
|
3841
|
-
class: "tpl:relative tpl:inline-block",
|
|
3842
|
-
style: E(u.value)
|
|
3843
|
-
}, [O("img", {
|
|
3844
|
-
class: "tpl:block tpl:w-full tpl:border-0",
|
|
3845
|
-
src: s.value,
|
|
3846
|
-
alt: e.block.alt,
|
|
3847
|
-
style: E(d.value)
|
|
3848
|
-
}, null, 12, il), g(Zc)], 4))], 64)) : (T(), S("div", al, [g(k(mi), {
|
|
3849
|
-
size: 40,
|
|
3850
|
-
"stroke-width": 1.5,
|
|
3851
|
-
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3852
|
-
}), O("span", null, c(k(n).video.addVideo), 1)]))], 4));
|
|
3853
|
-
}
|
|
3854
|
-
}), sl = {
|
|
3855
|
-
section: Nc,
|
|
3856
|
-
title: ja,
|
|
3857
|
-
paragraph: ha,
|
|
3858
|
-
image: ca,
|
|
3859
|
-
button: si,
|
|
3860
|
-
divider: Wi,
|
|
3861
|
-
video: ol,
|
|
3862
|
-
social: Vc,
|
|
3863
|
-
menu: fa,
|
|
3864
|
-
table: Xc,
|
|
3865
|
-
spacer: Wc,
|
|
3866
|
-
html: Xi,
|
|
3867
|
-
countdown: ee(() => import("./CountdownBlock-BT3ZTH1F.js"))
|
|
3868
|
-
};
|
|
3869
|
-
function cl(e) {
|
|
3870
|
-
let { editor: t, config: n, translations: r, fontsManager: a } = e, { t: o, format: c } = kn(r), l = y(() => Oe(Oe(Oe(br(r), Br(t.content.value.settings?.locale)), Re(t.content.value.settings) === "rtl" ? {
|
|
3871
|
-
title: { textAlign: "right" },
|
|
3872
|
-
table: { textAlign: "right" }
|
|
3873
|
-
} : {}), n.blockDefaults ?? {}));
|
|
3874
|
-
t.setUiTheme(n.uiTheme ?? "auto");
|
|
3875
|
-
let { resolvedTheme: u } = cr(y(() => t.state.uiTheme)), d = f(n.theme ?? {}), { themeStyles: p } = ur({
|
|
3876
|
-
themeOverrides: d,
|
|
3877
|
-
resolvedTheme: u,
|
|
3878
|
-
extraStyles: () => ({
|
|
3879
|
-
"--tpl-drop-text": `"${r.canvas.dropHere}"`,
|
|
3880
|
-
...e.themeExtraStyles?.()
|
|
3881
|
-
})
|
|
3882
|
-
}), m = e.history ?? it({
|
|
3883
|
-
content: t.content,
|
|
3884
|
-
setContent: (e, n) => t.setContent(e, n)
|
|
3885
|
-
});
|
|
3886
|
-
e.history || pt(t, m);
|
|
3887
|
-
let g = lt({
|
|
3888
|
-
addBlock: t.addBlock,
|
|
3889
|
-
removeBlock: t.removeBlock,
|
|
3890
|
-
updateBlock: t.updateBlock,
|
|
3891
|
-
selectBlock: t.selectBlock,
|
|
3892
|
-
findBlockLocation: t.findBlockLocation,
|
|
3893
|
-
blockDefaults: () => l.value
|
|
3894
|
-
}), _ = st(t), v = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? ct({
|
|
3895
|
-
content: t.content,
|
|
3896
|
-
isDirty: () => t.state.isDirty,
|
|
3897
|
-
...e.autoSaveOptions
|
|
3898
|
-
}) : null, b = null;
|
|
3899
|
-
v && (b = I(m.isNavigating, (e) => {
|
|
3900
|
-
e ? v.pause() : v.resume();
|
|
3901
|
-
}));
|
|
3902
|
-
let S = sr(t, {
|
|
3903
|
-
t: o,
|
|
3904
|
-
format: c
|
|
3905
|
-
}, n.customBlocks ?? []), C = Mn(n.colors);
|
|
3906
|
-
if (C.allowCustomIgnored && R.warn("config.colors.allowCustom: false is ignored without presets — keeping the color wheel and hex input so a color can still be chosen."), C.invalidPresets.length > 0 && R.warn(`config.colors.presets skipped invalid entries: ${C.invalidPresets.join(", ")} — presets must be hex colors (#rgb or #rrggbb).`), C.allowCustom === !1) {
|
|
3907
|
-
let e = yr(C.presets, n.blockDefaults, n.templateDefaults);
|
|
3908
|
-
e.length > 0 && R.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.`);
|
|
3909
|
-
}
|
|
3910
|
-
let w = Pn(n.templateSettings);
|
|
3911
|
-
for (let e of w.unknown) R.warn(`config.templateSettings.fields: "${e}" is not a template setting (expected one of ${Fn.join(", ")}) — skipping it.`);
|
|
3912
|
-
let T = dr();
|
|
3913
|
-
gr(T, sl);
|
|
3914
|
-
let E = /* @__PURE__ */ new Set();
|
|
3915
|
-
function D(e) {
|
|
3916
|
-
for (let t of e) {
|
|
3917
|
-
T.registerCustom(t, Hi);
|
|
3918
|
-
for (let e of Vr(t, C)) E.has(e.id) || (E.add(e.id), R.warn(e.message));
|
|
3919
|
-
}
|
|
3920
|
-
}
|
|
3921
|
-
n.customBlocks?.length && D(n.customBlocks);
|
|
3922
|
-
let O = $n();
|
|
3923
|
-
if (i() && h(O.dispose), e.containerEl) {
|
|
3924
|
-
let t = e.containerEl;
|
|
3925
|
-
jt(document, "pointerdown", (e) => {
|
|
3926
|
-
let n = t.value;
|
|
3927
|
-
n && (e.composedPath?.() ?? []).includes(n) && O.claim();
|
|
3928
|
-
}, { capture: !0 });
|
|
3929
|
-
}
|
|
3930
|
-
function k() {
|
|
3931
|
-
let t = e.capabilities?.templates;
|
|
3932
|
-
t ? t.save() : v?.flush();
|
|
3933
|
-
}
|
|
3934
|
-
function A(n) {
|
|
3935
|
-
O.isActive() && Ur(n, {
|
|
3936
|
-
history: m,
|
|
3937
|
-
selectBlock: (e) => t.selectBlock(e),
|
|
3938
|
-
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
3939
|
-
removeBlock: (e) => t.removeBlock(e),
|
|
3940
|
-
onSave: k,
|
|
3941
|
-
isPicking: () => e.capabilities?.savedBlocks?.isPicking.value === !0,
|
|
3942
|
-
onConfirmPick: () => e.capabilities?.savedBlocks?.confirmPicking(),
|
|
3943
|
-
onCancelPick: () => e.capabilities?.savedBlocks?.cancelPicking()
|
|
3944
|
-
});
|
|
3945
|
-
}
|
|
3946
|
-
jt(document, "keydown", A);
|
|
3947
|
-
let j = f(null), M = e.editorRoot ?? document;
|
|
3948
|
-
s(on, M), s(It, j), s(rn, r), s(fn, t), s(Dn, m), s(sn, g), s(dn, _), s(wn, a), s(Ut, p), s(an, u), s(yn, l), s(nn, n.locale), s(Cn, T), s(bn, n.customBlocks ?? []), s(On, n.paletteBlocks), s(cn, _r(n.htmlBlockPreview)), s(Lt, n.layout), s(tn, n.sectionWrapper), s(un, C), s(xn, w.fields), s(_n, fr(t.content, T));
|
|
3949
|
-
let N = tt(n.mergeTags?.syntax);
|
|
3950
|
-
for (let e of ["opener", "closer"]) {
|
|
3951
|
-
let t = N[e];
|
|
3952
|
-
typeof t == "string" && t.trim() === "" && R.warn(`config.mergeTags.syntax.${e} is blank — ignoring it.`);
|
|
3953
|
-
}
|
|
3954
|
-
typeof N.opener != "string" && typeof N.closer == "string" && N.closer.trim() !== "" && Xe(N) === null && R.warn("config.mergeTags.syntax.closer has no effect without an opener — set opener to turn on autocomplete for this syntax.");
|
|
3955
|
-
let ee = x(n.mergeTags?.tags ?? []);
|
|
3956
|
-
function P(e) {
|
|
3957
|
-
Array.isArray(e) ? ee.value = e : R.warn(`setMergeTags() expects an array of merge tags, received ${typeof e} — ignoring.`);
|
|
3958
|
-
}
|
|
3959
|
-
s(Jt, ee), s(Yt, N), s(Zt, n.mergeTags?.onRequest ?? null), s(hn, n.mergeTags?.autocomplete !== !1), s(qt, n.mergeTags?.showRawValue !== !1);
|
|
3960
|
-
let F = f(Ue(n.mergeTags?.tags ?? []));
|
|
3961
|
-
s(Kt, F);
|
|
3962
|
-
let L = tr({
|
|
3963
|
-
resolvePreview: n.resolvePreview,
|
|
3964
|
-
getContent: () => {
|
|
3965
|
-
let e = t.content.value;
|
|
3966
|
-
return n.layout && t.state.previewMode ? Le(n.layout, e) : e;
|
|
3967
|
-
},
|
|
3968
|
-
isActive: () => t.state.previewMode
|
|
3969
|
-
});
|
|
3970
|
-
s(en, L), s(Vt, n.resolvePreview);
|
|
3971
|
-
let te = y(() => !(t.state.previewMode && L.isConfigured));
|
|
3972
|
-
s(Sn, te);
|
|
3973
|
-
let ne = nr();
|
|
3974
|
-
s(Ft, ne), s(mn, f(!1)), s(Rt, f(!1)), s($t, n.logicTags?.tags ?? []), s(Tn, n.logicTags?.pairs ?? []), s(Ht, n.logicTags?.onRequest ?? null), s(zt, rr()), s(Gt, n.onRequestMedia ?? null), s(ln, n.canDropMedia ?? null), s(En, n.resolveImageUrl ? wt(n.resolveImageUrl) : null), s(pn, n.displayConditions?.conditions ?? []), s(vn, n.displayConditions?.allowCustom ?? !1), s(gn, e.capabilities ?? {}), s(Qt, S);
|
|
3975
|
-
let re = ir(n.lint) ? null : or({
|
|
3976
|
-
content: t.content,
|
|
3977
|
-
options: n.lint ?? {},
|
|
3978
|
-
updateBlock: t.updateBlock,
|
|
3979
|
-
updateSettings: t.updateSettings,
|
|
3980
|
-
removeBlock: t.removeBlock
|
|
3981
|
-
});
|
|
3982
|
-
s(Wt, re);
|
|
3983
|
-
function ie() {
|
|
3984
|
-
b?.(), re?.destroy(), v?.destroy(), m.destroy();
|
|
3985
|
-
}
|
|
3986
|
-
return {
|
|
3987
|
-
t: o,
|
|
3988
|
-
format: c,
|
|
3989
|
-
editorRoot: M,
|
|
3990
|
-
history: m,
|
|
3991
|
-
blockActions: g,
|
|
3992
|
-
conditionPreview: _,
|
|
3993
|
-
autoSave: v,
|
|
3994
|
-
resolvedTheme: u,
|
|
3995
|
-
themeStyles: p,
|
|
3996
|
-
themeOverrides: d,
|
|
3997
|
-
registry: T,
|
|
3998
|
-
keyboardReorder: S,
|
|
3999
|
-
templateLint: re,
|
|
4000
|
-
popoverRoot: j,
|
|
4001
|
-
mergeTagSampleMode: F,
|
|
4002
|
-
previewResolution: L,
|
|
4003
|
-
appliesConditionFilter: te,
|
|
4004
|
-
registerCustomBlocks: D,
|
|
4005
|
-
setMergeTags: P,
|
|
4006
|
-
mergeTags: ee,
|
|
4007
|
-
mergeTagSyntax: N,
|
|
4008
|
-
destroy: ie
|
|
4009
|
-
};
|
|
4010
|
-
}
|
|
4011
|
-
export { $r as A, Mr as B, yi as C, ci as D, ui as E, Or as F, tr as H, Ir as I, Fr as L, Wr as M, ri as N, si as O, Gr as P, Pr as R, bi as S, fi as T, jr as V, Hi as _, Vc as a, ki as b, Ma as c, ka as d, ha as f, Wi as g, Xi as h, Wc as i, ei as j, Yr as k, Fa as l, ca as m, ol as n, Nc as o, fa as p, Xc as r, Oc as s, cl as t, ja as u, Ni as v, _i as w, wi as x, ji as y, Nr as z };
|