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